
<jsp:useBean id="greeting" type="xptoolkit.model.Greeting"
scope="session"/>
<html>
<head>
<title>Hello World</title>
</head>
<body>
<h1><%=greeting.getGreeting()%></h1>
</body>
<jsp:useBean id="greeting" type="xptoolkit.model.Greeting"
Notice that the jsp:useBean action grabs the Greeting reference that we put into the session with HelloWorldServlet. Then, we print out the greeting with the JSP scriptlet expression <%=greeting.getGreeting()%>.
This sums up what the Model 2 Hello World Web application does. We discuss the other JSP, HelloApplet.jsp, after we examine the applet subproject. For now, the next section explains why the servlet could forward HelloWorldJSP to the JSP HelloWorld.jsp.
Describe what you're looking for in as much detail as you'd like.
Our AI reads your request and finds the best matching books for you.
Popular searches:
Join 2 million readers and get unlimited free ebooks