Chapter 7 Developing Applications with PowerJ and EAServer


Building JavaServer Pages

JavaServer Pages (JSP) technology provides a quick, easy way to create web pages that have both static and dynamic content. JSP pages are text-based documents that contain static markup, usually in HTML or XML, as well as Java content in the form of scripts and/or calls to Java components. JSP pages extend the Java Servlet API and have access to all Java APIs and components. PowerJ 3.6 supports Version 1.1 of the JavaServer Pages specification.

In PowerJ, you create a JSP page using the JSP 1.1 wizard on the Target tab of the New dialog box. The wizard creates a JSP page with some basic content, including HTML tags and a JSP page directive with the information you entered in the wizard. When you edit the page, HTML and JSP syntax elements are highlighted.

When you build the JSP page, PowerJ compiles it and checks for compile-time syntax errors. The build process creates a servlet and an XML file with the same name as the JSP page that contains information about how the JSP page is mapped to the servlet class that implements it.

JSP files are deployed in a Web Archive (WAR) collection. PowerJ wizards enable you to collect JSP pages and related files into a WAR target. Building the WAR target merges the XML files for each target in the archive into a single XML file called web.xml.

 


Copyright © 2000 Sybase, Inc. All rights reserved.