6.3. Building, Installing, and Running the Scriptlet

JavaServer Pages are unlike any of the examples we've looked at before in that they aren't compiled until they are deployed. So we don't have a build.xml for this example. Our scriptlet does need the various components that went into the layered version of the application, and we'll leverage off the installation of ServletTwo. To test our scriptlet example, do the following:

1.
Build and install ServletTwo as described in Chapter 5.
2.
Copy the file FavoriteTeamScriptlet.jsp into the context directory of the servlet. With Tomcat, for example, this would place the JSP at the path <TOMCAT_HOME>/webapps/nfl/FavoriteTeamScriptlet.jsp.
3.
Start the servlet container, if it's not already running. ...

Get J2EE™ and JAX™: Developing Web Applications and Web Services now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.