Java Reference
In-Depth Information
If we had an image file that contained the TNT banner (in this example, a JPEG file called TNTBanner) and added
it to EnterEmpInfo.html file with the following code:
<P align="center">
<IMG border="0" src="TNTBanner.jpg" width="465" height="99">
</P>
Running EnterEmpInfoJSP would result in Figure 9-20 .
Figure 9-20.
Can you feel the power of the include tag?
The second JSP standard action tag we will need is forward . The forward tag takes the place of the
RequestDispatcher's forward method with the big advantage of much simpler syntax. For example, the following tag:
<jsp:forward page = "DispEmpInfoJSP.jsp">
</jsp:forward>
performs the same function as the following EmpServlet code:
RequestDispatcher dispatcher;
dispatcher =
getServletContext().getRequestDispatcher("DispEmpInfoJSP.jsp");
dispatcher.forward(req, resp);
 
Search WWH ::




Custom Search