Creating and configuring JSPs in EAServer

JSPs in EAServer must be created in a Web application. If necessary, create the Web application to contain the JSPs as described in Chapter 21, “Creating Web Applications.” You can create new JSPs in EAServer Manager or import them from existing JSP source files.

StepsCreating or importing JSPs

  1. In EAServer Manager, select the Web Application folder.

  2. Select an existing Web application to which you are adding a JSP, then import the JSP or create a new one as follows:

StepsConfiguring the JSP properties

To configure your JSP, double-click the JSP or highlight the JSP and select File | Web Application Component Properties. Complete the information described below:

  1. General properties – select this tab to enter general parameters for your JSP:

    • Description – a brief description of the JSP file.

    • Web Component Type – select JSP.

    • JSP File Name – the name and path of the JSP file. The path is relative to the Web application context. For example, if you enter /work/test.jsp, the JSP will be placed in EAServer/Repository/WebApplication/appname/work/test.jsp, where EAServer is the EAServer installation directory and appname is the Web application name. The JSP file must include the .jsp extension.

    • Startup Load Sequence Position – enter a number that indicates when the JSP loads in relation to other JSP files when the Web application starts. This option applies only if Load During Startup is true. The lower the number the earlier it loads; 1 indicates that this JSP loads first. If a JSP is dependent on another JSP that requires time to initialize, specify the JSP that requires additional initialization time to load first. JSPs with a startup load sequence position of 0 loads last.

    • Load During Startup – this option compiles and translates the JSP into a servlet at start-up. If you do not select this option, the JSP is compiled when it is first called.

  2. Init-Args – select this tab to enter the initialization parameters associated with the JSP. If your JSP uses externally configured parameters, add or modify the values with the controls on this tab:

    • Add – enter the Initialization Property Name. Add a default value for your parameter in the Property Value window.

    • Modify – highlight the argument you want to modify and click Modify. Make your modifications and click OK.

    • Delete – highlight the argument you want to delete and click Delete.

  3. Advanced – to improve JSP performance, set the value of the com.sybase.jaguar.webapplicaton.jspc-interval property, which determines if and when the JSP runtime checks whether a JSP is current. Set the property value to an integer.

    Complete the rest of the properties as you would for a servlet.

To configure security for your JSP, see Chapter 3, “Using Web Application Security,” the EAServer Security Administration and Programming Guide.

StepsEditing the JSP source

EAServer supplies an editor for creating and modifying your JSP files; however, you can use any text editor to perform the same tasks. To edit the JSP in EAServer Manager:

  1. Open the Web Application folder and select the Web application to which the JSP belongs.

  2. Highlight the JSP.

  3. Select File | Edit JSP. An editor displays where you can view and modify your JSP. Locate other files for editing by selecting File | Open. When you are finished, select File | Save.

StepsDeleting a JSP

  1. Open the Web Application folder and select the Web application to which the JSP file belongs.

  2. Highlight the JSP.

  3. Select File | Delete Web Application Component.