Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
B
belajarJavaServlet_Fabian
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
belajarJavaServlet_Fabian
Commits
ac6016de
Commit
ac6016de
authored
Mar 22, 2022
by
Fabian Dewantara Santonie
🕊
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Memberikan halaman tampilan data
parent
f8fc182d
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
65 additions
and
18 deletions
+65
-18
DataDiri.java
src/main/java/org/testing/inputName/DataDiri.java
+62
-16
Registrasi.jsp
src/main/webapp/Registrasi.jsp
+1
-1
detailDataDiri.jsp
src/main/webapp/detailDataDiri.jsp
+2
-1
No files found.
src/main/java/org/testing/inputName/DataDiri.java
View file @
ac6016de
...
@@ -23,34 +23,80 @@ public class DataDiri extends HttpServlet {
...
@@ -23,34 +23,80 @@ public class DataDiri extends HttpServlet {
}
}
/**
/**
* @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
* @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse
* response)
*/
*/
protected
void
doGet
(
HttpServletRequest
request
,
HttpServletResponse
response
)
throws
ServletException
,
IOException
{
protected
void
doGet
(
HttpServletRequest
request
,
HttpServletResponse
response
)
throws
ServletException
,
IOException
{
// TODO Auto-generated method stub
// TODO Auto-generated method stub
response
.
getWriter
().
append
(
"Served at: "
).
append
(
request
.
getContextPath
());
response
.
getWriter
().
append
(
"Served at: "
).
append
(
request
.
getContextPath
());
}
}
/**
/**
* @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
* @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse
* response)
*/
*/
protected
void
doPost
(
HttpServletRequest
request
,
HttpServletResponse
response
)
throws
ServletException
,
IOException
{
protected
void
doPost
(
HttpServletRequest
request
,
HttpServletResponse
response
)
throws
ServletException
,
IOException
{
// TODO Auto-generated method stub
// TODO Auto-generated method stub
String
namaLengkap
=
request
.
getParameter
(
"namaLengkap"
);
String
namaLengkap
=
request
.
getParameter
(
"namaLengkap"
);
String
namaPanggilan
=
request
.
getParameter
(
"namaPanggilan"
);
String
namaPanggilan
=
request
.
getParameter
(
"namaPanggilan"
);
String
tempatLahir
=
request
.
getParameter
(
"tempatLahir"
);
String
tempatLahir
=
request
.
getParameter
(
"tempatLahir"
);
String
tanggalLahir
=
request
.
getParameter
(
"tanggalLahir"
);
String
tanggalLahir
=
request
.
getParameter
(
"tanggalLahir"
);
String
jenisKelamin
=
request
.
getParameter
(
"jenisKelamin"
);
String
jenisKelamin
=
request
.
getParameter
(
"jenisKelamin"
);
String
hobi
=
request
.
getParameter
(
"hobi"
);
String
hobiBerenang
=
request
.
getParameter
(
"hobiBerenang"
);
String
hobiFutsal
=
request
.
getParameter
(
"hobiFutsal"
);
String
hobiBuku
=
request
.
getParameter
(
"hobiBuku"
);
String
hobiBadminton
=
request
.
getParameter
(
"hobiBadminton"
);
String
hobiLainnya
=
request
.
getParameter
(
"hobiLainnya"
);
String
email
=
request
.
getParameter
(
"email"
);
String
email
=
request
.
getParameter
(
"email"
);
String
anak
=
request
.
getParameter
(
"anak"
);
String
anak
=
request
.
getParameter
(
"anak"
);
String
pendidikan
=
request
.
getParameter
(
"pendidikan"
);
String
pendidikan
=
request
.
getParameter
(
"pendidikan"
);
String
alamat
=
request
.
getParameter
(
"alamat"
);
String
alamat
=
request
.
getParameter
(
"alamat"
);
String
username
=
request
.
getParameter
(
"username"
);
request
.
setAttribute
(
"username"
,
username
);
request
.
setAttribute
(
"namaLengkap"
,
namaLengkap
);
request
.
setAttribute
(
"namaLengkap"
,
namaLengkap
);
request
.
setAttribute
(
"namaPanggilan"
,
namaPanggilan
);
request
.
setAttribute
(
"namaPanggilan"
,
namaPanggilan
);
request
.
setAttribute
(
"tempatLahir"
,
tempatLahir
);
request
.
setAttribute
(
"tempatLahir"
,
tempatLahir
);
request
.
setAttribute
(
"tanggalLahir"
,
tanggalLahir
);
request
.
setAttribute
(
"tanggalLahir"
,
tanggalLahir
);
request
.
setAttribute
(
"jenisKelamin"
,
jenisKelamin
);
request
.
setAttribute
(
"jenisKelamin"
,
jenisKelamin
);
String
hobi
=
""
;
try
{
if
(
hobiBerenang
.
equals
(
"Berenang"
))
{
hobi
=
hobi
+
hobiBerenang
+
" ,"
;
}
}
catch
(
Exception
e
)
{
}
try
{
if
(
hobiBuku
.
equals
(
"Membaca_Buku"
))
{
hobi
=
hobi
+
hobiBuku
+
" "
;
}
}
catch
(
Exception
e
)
{
}
try
{
if
(
hobiFutsal
.
equals
(
"Futsal"
))
{
hobi
=
hobi
+
hobiFutsal
+
" "
;
}
}
catch
(
Exception
e
)
{
}
try
{
if
(
hobiBadminton
.
equals
(
"Badminton"
))
{
hobi
=
hobi
+
hobiBadminton
+
" "
;
}
}
catch
(
Exception
e
)
{
}
try
{
if
(
hobiLainnya
.
equals
(
"Lainnya"
))
{
hobi
=
hobi
+
hobiLainnya
+
" "
;
}
}
catch
(
Exception
e
)
{
}
request
.
setAttribute
(
"hobi"
,
hobi
);
request
.
setAttribute
(
"hobi"
,
hobi
);
request
.
setAttribute
(
"email"
,
email
);
request
.
setAttribute
(
"email"
,
email
);
request
.
setAttribute
(
"anak"
,
anak
);
request
.
setAttribute
(
"anak"
,
anak
);
...
...
src/main/webapp/Registrasi.jsp
View file @
ac6016de
...
@@ -37,7 +37,7 @@
...
@@ -37,7 +37,7 @@
<td>
Hobi
</td>
<td>
Hobi
</td>
<td>
<td>
<input
type=
"checkbox"
id=
"hobiBerenang"
name=
"hobiBerenang"
value=
"Berenang"
><label
for=
"hobiBerenang"
>
Berenang
</label>
<input
type=
"checkbox"
id=
"hobiBerenang"
name=
"hobiBerenang"
value=
"Berenang"
><label
for=
"hobiBerenang"
>
Berenang
</label>
<input
type=
"checkbox"
id=
"hobiBuku"
name=
"hobiBuku"
value=
"Membaca
Buku"
><label
for=
"hobiBuku"
>
MembacaBuku
</label>
<input
type=
"checkbox"
id=
"hobiBuku"
name=
"hobiBuku"
value=
"Membaca
_
Buku"
><label
for=
"hobiBuku"
>
MembacaBuku
</label>
<input
type=
"checkbox"
id=
"hobiFutsal"
name=
"hobiFutsal"
value=
"Futsal"
><label
for=
"hobiFutsal"
>
Futsal
</label>
<input
type=
"checkbox"
id=
"hobiFutsal"
name=
"hobiFutsal"
value=
"Futsal"
><label
for=
"hobiFutsal"
>
Futsal
</label>
<input
type=
"checkbox"
id=
"hobiBadminton"
name=
"hobiBadminton"
value=
"Badminton"
><label
for=
"hobiBadminton"
>
Badminton
</label>
<input
type=
"checkbox"
id=
"hobiBadminton"
name=
"hobiBadminton"
value=
"Badminton"
><label
for=
"hobiBadminton"
>
Badminton
</label>
<input
type=
"checkbox"
id=
"hobiLainnya"
name=
"hobiLainnya"
value=
"Lainnya"
><label
for=
"hobiLainnya"
>
Lainnya
</label>
<input
type=
"checkbox"
id=
"hobiLainnya"
name=
"hobiLainnya"
value=
"Lainnya"
><label
for=
"hobiLainnya"
>
Lainnya
</label>
...
...
src/main/webapp/detailDataDiri.jsp
View file @
ac6016de
...
@@ -7,6 +7,7 @@
...
@@ -7,6 +7,7 @@
<title>
Insert title here
</title>
<title>
Insert title here
</title>
</head>
</head>
<body>
<body>
<b>
Selamat Datang ${username}
</b>
<table
border=
"2"
>
<table
border=
"2"
>
<tr>
<tr>
<th>
Nama Lengkap
</th>
<th>
Nama Lengkap
</th>
...
@@ -26,7 +27,7 @@
...
@@ -26,7 +27,7 @@
<th>
${tempatLahir}
</th>
<th>
${tempatLahir}
</th>
<th>
${tanggalLahir}
</th>
<th>
${tanggalLahir}
</th>
<th>
${jenisKelamin}
</th>
<th>
${jenisKelamin}
</th>
<th>
${
H
obi}
</th>
<th>
${
h
obi}
</th>
<th>
${email}
</th>
<th>
${email}
</th>
<th>
${anak}
</th>
<th>
${anak}
</th>
<th>
${pendidikan}
</th>
<th>
${pendidikan}
</th>
...
...
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