Download JBoss Portal 2.6.5 - JBoss.org Documentation

Transcript
Portlet Primer
<a href="<portlet:renderURL><portlet:param name="yourname" value="Roy Russo">
</portlet:param></portlet:renderURL>">
You can create a link to the doView method by creating a renderURL, which passes the yourname parameter.
5.2.2.5. Building your JSP Portlet
The HelloWorldJSPPortlet.zip file contains a pre-compiled helloworldjspportlet.war file; however, to manually build the helloworldjspportlet.war file:
1.
Change into the HelloWorldJSPPortlet/ directory, and remove the existing helloworldjspportlet.war file.
2.
If
required,
edit
the
HelloWorldJSPPortlet/
file, and the application descriptors in
the HelloWorldJSPPortlet/src/resources/helloworldjspportlet-war/WEB-INF/ directory.
src/main/org/jboss/portlet/hello/HelloWorldJSPPortlet.java
3.
Change into HelloWorldJSPPortlet/ directory, and run the ant deploy command. On Linux, the output will
be similar to the following:
Note: the directory names will be different for your system.
Expanding the helloworldjspportlet.war file allows you to deploy the portlet as an expanded directory, which
makes development easier. As well, it gives you access to the application descriptors, resource files, JSF, and JSP
pages. To expand the helloworldjspportlet.war file:
1.
If you do not have the HelloWorldJSPPortlet/helloworldjspportlet.war file, change into the HelloWorldJSPPortlet/ directory, and run the ant deploy command. This creates the helloworldjspportlet.war
file.
2.
To expand the WAR file, change into the HelloWorldJSPPortlet/ directory, and run the ant explode command. On Linux, the output will be similar to the following:
JBoss Release 2.6.5
44