Which should I use: the FileServerPortlet, JSPPortlet or ServletInvokerPortlet?

 

  1. Use the FileServerPortlet when you want to display a file that is directly accessible to the browser. These are typically static HTML and image files.

eg

<config-param>

<param-name>url</param-name>

<param-value>/html/wps.html</param-value>

</config-param>

The above path will map to <wps_root>app\web\portlets\yourparfile\html\wps.html. The path mapping is the same as when you use the encodeURI() method in your portlet JSP page. See the tip “How to access a file from a portlet” for details and how to package your par file

 

  1. Use the JSPPortlet when you want to display a file that is not directly accessible to the browser ie a file that is in the WEB-INF directory. These are typically JSP files that need to be processed by WPS before it can be displayed.

eg

<config-param>

<param-name>url</param-name>

<param-value>/PORTLET-INF/applets/index.jsp</param-value>

</config-param>

The above path will map to <wps_root>app\web\WEB-INF\portletapps\yourparfile\PORTLET-INF\applets\index.jsp. The path mapping is the same as when you access a file from a portlet. See the tip “How to access a file from a portlet” for details and how to package your par file

 

  1. Use the ServletInvokerPortlet when you want to display contents using a web path.

eg

<config-param>

<param-name>url</param-name>

<param-value>http://senang.ibm.com/wps/images/citibank/sg/alerts.html</param-value>

</config-param>

You can also specify an relative web path:

eg

<config-param>

<param-name>url</param-name>

<param-value>/wps/pollingservlet</param-value>

</config-param>

This will map to http://yourWPShostname/wps/pollingservlet

 

Hosted by www.Geocities.ws

1