Professional Documents
Culture Documents
Project Details Project 2 Building A Dynamic Website PRJ321x 01 en Courseware FUNiX
Project Details Project 2 Building A Dynamic Website PRJ321x 01 en Courseware FUNiX
Course Module 2: Form Handling & Beans Project 2 - Building a dynamic website
Project Details
Project Details
Bookmark this page
<html><head><title>JSP Templates</title></head>
<body background='graphics/background.jpg'>
<table>
<td><table>
<tr><td><%@include file='header.html'%></td></tr>
<tr><td><%@include file='introduction.html'%></td></tr>
<tr><td><%@include file='footer.html'%></td></tr>
</table>
</td>
</tr>
</table>
Ask Mentors
https://courses.funix.edu.vn/courses/course-v1:FUNiX+PRJ321x_01_EN+2020_T1/courseware/b44118bccb6a453498290e47378a6f86/3c9f4f2ffda64b… 1/4
3/4/2021 Project Details | Project 2 - Building a dynamic website | PRJ321x_01_EN Courseware | FUNiX
In this example, this is considered a data representation page; however, there are four
other pages included: sidebar.html, header.html, introduction.html and footer.html. These
pages are permanent, containing general information on all pages and contained within
every page that shares this interface.
2. In the previous project, you learned how to get user-submitted data. It includes:
Note: When retrieving data using the GET method, all parameters are separated by a
"&" in the address bar, which is often called a "query string".
In the Servlet, JSP to process data, you transfer the data obtained from the String type
to the appropriate data type. For example, from String -> Intenger: int age =
Integer.parseInt(ageString );
From here you can process data in the Java language, and take full advantage of the
power of the platform.
To navigate using Forward in the JSP / Servlet, you will need to use the
keyword requestDispatcher.forward(request,response). For example:
Ask Mentors
https://courses.funix.edu.vn/courses/course-v1:FUNiX+PRJ321x_01_EN+2020_T1/courseware/b44118bccb6a453498290e47378a6f86/3c9f4f2ffda64b… 2/4
3/4/2021 Project Details | Project 2 - Building a dynamic website | PRJ321x_01_EN Courseware | FUNiX
You also need to distinguish the difference between sendRedirect and forward for use
in different situations.
Useful resources
Directives: https://www.javatpoint.com/jsp-page-directive
Example of layout: https://www.javaworld.com/article/2076174/java-web-
development/jsp-templates.html
Form processing:
https://www.tutorialspoint.com/servlets/servlets-form-data.htm
http://www.codejava.net/java-ee/servlet/handling-html-form-data-with-java-servlet
https://www.javaworld.com/article/2076076/java-web-development/server-side-java--
advanced-form-processing-using-jsp.html?page=5
Ask Mentors
https://courses.funix.edu.vn/courses/course-v1:FUNiX+PRJ321x_01_EN+2020_T1/courseware/b44118bccb6a453498290e47378a6f86/3c9f4f2ffda64b… 3/4
3/4/2021 Project Details | Project 2 - Building a dynamic website | PRJ321x_01_EN Courseware | FUNiX
Ask Mentors
https://courses.funix.edu.vn/courses/course-v1:FUNiX+PRJ321x_01_EN+2020_T1/courseware/b44118bccb6a453498290e47378a6f86/3c9f4f2ffda64b… 4/4