After you select Use Web Application, click Browse to the right of the WAR File to Upload field and navigate to select a local WAR file to upload to the application server.
When you locate the WAR file, select the file and click Open in the Choose File dialog box.
When the path to the WAR file displays in the JSP Element Definition window, click Upload. When the confirmation that the WAR file was uploaded successfully displays, click OK. The WAR File and Web App Display Name fields are automatically filled in.
Click Deploy. When the confirmation that the WAR file was deployed successfully displays, click OK.
Enter the Initial Resource—the initial JSP page to display.
Complete these options:
Web App Qualified URLs – select this option to enter an URL with parameters to call a Web application from the JSP portlet. See “Using a remote URL”.
Single Sign-On Required – select if single sign-on is required. See “JSP portlet single-sign-on check box”. When you select this option, three more options become available:
JSP Include – use the javax.servlet.RequestDispatcher.include(...) method to enable the target JSP to retrieve the JSP’s contents. This method returns the target JSP’s output to the portal and allows you to manipulate, filter, and integrate that output with other elements in a portlet with multiple elements—an aggregate portlet. Aggregate portlets use either an <IFRAME> or <DIV> tag style.
The target JSP gets a contextPath in the ServletRequest object that matches the application name under which the JSP is installed.
JSPs using the .include() method have a <BASE HREF=“targetJSP path”> element inserted into the HTML <HEAD> element. This ensures that relative HREFs or IMG links generated from that JSP are loaded correctly.
JSP Forward – use the javax.servlet.RequestDispatcher.forward(...) method to enable the target JSP to retrieve the JSP’s contents. This method does not return the target JSP’s output back to the portal.
This portlet style must run in an <IFRAME> tag and cannot be included in an aggregate portlet (portlet with multiple elements). The forward method ensures that the target JSP receives the contextPath with which it was installed. There is no opportunity for the portal to insert the <BASE HREF=...> element into the returned HTML, so if the <BASE HREF=...> information is not provided by the portlet, relative HREFs or IMG links may not work.
302 Redirect – this option generates a HTTP Status 302 redirect back to the browser. When the browser receives a 302 redirect status, it executes a get method to the URL contained in that 302 message. This portlet style must run in an <IFRAME> tag, otherwise the portlet overlays the entire screen.
One benefit of this portlet style, is that the declarative J2EE security constraints that are part of the target Web application are enforced by the container. The J2EE standard does not require the container to apply declarative security constraints for RequestDispatcher include or forward.
See Appendix D, “Using the Enterprise Portal Samples,” for an example of creating a single-sign-on portlets.
Web applications in J2EE containers can have security descriptors
that are mentioned in web.xml. This section
of the XML puts a constraint on all the resources of the Web application.
Access is granted only to users who are in the manager role. Users
who try to access the Web application from the browser (or other
client program) must be authenticated. If the type of authentication
required is basic authentication, the browser prompts the user for
a user name and password.
If the Web application is added as a portlet to a page, users need not reauthenticate with the application. The portal uses container authentication to authenticate users when they log in to the portal. The same session context is used to authenticate the user with the Web application that is used to authenticate the user with a portlet. If the user roles are same across the Web application, the user is authenticated into the Web application and the contents display in the portlet.
See the Enterprise Security Administration Guide for details.
Input Parameters – enter the input parameter names as defined by the JSP code.
You must use a name–value pattern like this:
name1=value1&name2=value2&name3=value3
The name must be exactly the same as your JSP code’s input parameter’s name. For example, if the JSP page’s code is:
EPLogin:<input type ="text" name="epuser"> EPPswd:<input type="password" name="eppassword"> HostName:<input type="text" name="hostname"> AssetDN:<input type ="text" name="asset"> PAI URL:<input type="text" name="paiURL">
The Input Parameters must then be:
epuser=tester&eppassword=test123&hostname=drillbit2k&asset=a1=pubs, dc=sybase,dc=com&paiURL=jdbc:sybase:Tds:sapphire:5000/pubs2
Copyright © 2004. Sybase Inc. All rights reserved. |
![]() |