Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
tugasAkhir_FabianDewantara
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Fabian Dewantara Santonie
tugasAkhir_FabianDewantara
Commits
109046a7
Commit
109046a7
authored
Mar 25, 2022
by
Fabian Dewantara Santonie
🕊
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Menambahkan Form Registrasi
parent
23173433
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
100 additions
and
7 deletions
+100
-7
halamanLogin.class
build/classes/org/tugasAkhir/servlet/halamanLogin.class
+0
-0
halamanLogin.java
src/main/java/org/tugasAkhir/servlet/halamanLogin.java
+0
-6
userBaru.java
src/main/java/org/tugasAkhir/servlet/userBaru.java
+59
-0
Login.jsp
src/main/webapp/Login.jsp
+1
-0
Registrasi.jsp
src/main/webapp/Registrasi.jsp
+39
-0
mahasiswaBaru.jsp
src/main/webapp/mahasiswaBaru.jsp
+1
-1
No files found.
build/classes/org/tugasAkhir/servlet/halamanLogin.class
View file @
109046a7
No preview for this file type
src/main/java/org/tugasAkhir/servlet/halamanLogin.java
View file @
109046a7
...
...
@@ -24,12 +24,6 @@ public class halamanLogin extends HttpServlet {
}
protected
void
doGet
(
HttpServletRequest
request
,
HttpServletResponse
response
)
throws
ServletException
,
IOException
{
HttpSession
session
=
request
.
getSession
(
false
);
if
(
request
.
getParameter
(
"logout"
)!=
null
)
{
session
.
invalidate
();
response
.
sendRedirect
(
request
.
getContextPath
());
}
}
@SuppressWarnings
(
"deprecation"
)
protected
void
doPost
(
HttpServletRequest
request
,
HttpServletResponse
response
)
throws
ServletException
,
IOException
{
...
...
src/main/java/org/tugasAkhir/servlet/userBaru.java
0 → 100644
View file @
109046a7
package
org
.
tugasAkhir
.
servlet
;
import
java.io.IOException
;
import
java.sql.Connection
;
import
java.sql.PreparedStatement
;
import
javax.servlet.ServletException
;
import
javax.servlet.annotation.WebServlet
;
import
javax.servlet.http.HttpServlet
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
/**
* Servlet implementation class userBaru
*/
@WebServlet
(
"/userBaru"
)
public
class
userBaru
extends
HttpServlet
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* @see HttpServlet#HttpServlet()
*/
public
userBaru
()
{
super
();
// TODO Auto-generated constructor stub
}
/**
* @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
*/
protected
void
doGet
(
HttpServletRequest
request
,
HttpServletResponse
response
)
throws
ServletException
,
IOException
{
// TODO Auto-generated method stub
response
.
getWriter
().
append
(
"Served at: "
).
append
(
request
.
getContextPath
());
}
/**
* @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
*/
protected
void
doPost
(
HttpServletRequest
request
,
HttpServletResponse
response
)
throws
ServletException
,
IOException
{
// TODO Auto-generated method stub
try
{
Connection
con
=
DatabaseConnection
.
initializeDatabase
();
PreparedStatement
st
=
con
.
prepareStatement
(
"insert into tbl_user values(?,?,?,?)"
);
st
.
setString
(
1
,
request
.
getParameter
(
"id"
));
st
.
setString
(
2
,
request
.
getParameter
(
"nama"
));
st
.
setString
(
3
,
request
.
getParameter
(
"email"
));
st
.
setString
(
4
,
request
.
getParameter
(
"password"
));
st
.
executeUpdate
();
st
.
close
();
con
.
close
();
response
.
sendRedirect
(
request
.
getContextPath
()+
"/Login.jsp"
);
}
catch
(
Exception
e
){
}
}
}
src/main/webapp/Login.jsp
View file @
109046a7
...
...
@@ -24,6 +24,7 @@
</table>
<button
type=
"submit"
class =
"btn btn-primary"
>
Login
</button>
</form>
<a
href=
"Registrasi.jsp"
class=
"link-secondary"
>
Belum punya akun? Daftar
</a>
</div>
</form>
</body>
...
...
src/main/webapp/Registrasi.jsp
0 → 100644
View file @
109046a7
<%@ page
language=
"java"
contentType=
"text/html; charset=ISO-8859-1"
pageEncoding=
"ISO-8859-1"
%>
<!DOCTYPE html>
<html>
<link
href=
"https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css"
rel=
"stylesheet"
integrity=
"sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC"
crossorigin=
"anonymous"
>
<head>
<meta
charset=
"ISO-8859-1"
>
<title>
Ngeteh.com
</title>
</head>
<body>
<div
align=
"center"
>
<h1>
Daftar User Baru
</h1>
<h6>
Masukan Data Diri Anda
</h6>
<form
name=
"loginForm"
method=
"post"
action=
"userBaru"
>
<table
class=
"table-sm"
>
<tr>
<td>
ID
</td>
<td><input
type=
"text"
class=
"form-control"
id=
"id"
name=
"id"
maxlength=
"100"
required
placeholder=
"Masukan ID..."
></td>
<tr>
<td>
Nama Lengkap
</td>
<td><input
type=
"text"
class=
"form-control"
id=
"nama"
name=
"nama"
maxlength=
"100"
required
placeholder=
"Masukan Nama Anda..."
></td>
</tr>
<tr>
<td>
E-Mail
</td>
<td><input
type=
"email"
class=
"form-control"
id=
"email"
name=
"email"
required
placeholder=
"Masukan Email..."
></td>
</tr>
<tr>
<td>
Password
</td>
<td><input
type=
"password"
class=
"form-control"
id=
"password"
name=
"password"
minlength=
"8"
required
placeholder=
"Password..."
></td>
</tr>
</table>
<input
type=
"submit"
class=
"btn btn-light"
value=
"Submit Data"
>
<input
type=
"reset"
class=
"btn btn-light"
value=
"Reset"
>
<br><br>
</form>
</div>
</form>
</body>
</html>
\ No newline at end of file
src/main/webapp/mahasiswaBaru.jsp
View file @
109046a7
...
...
@@ -5,7 +5,7 @@
<link
href=
"https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css"
rel=
"stylesheet"
integrity=
"sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC"
crossorigin=
"anonymous"
>
<head>
<meta
charset=
"ISO-8859-1"
>
<title>
Insert title here
</title>
<title>
Ngeteh.com
</title>
</head>
<body>
<div
align=
"center"
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment