Ahh, OK. That makes more sense.
What you need to do with links or actions on the page is create a portlet actionURL that your Portlet submits and is handled by a ActionRequest serverside. The way to do that is to use the porlet taglib on your JSP page, like so - (this is stolen from
here. FYI - there's no space in that portlet: Param tag, that's becuase of the emots)
----
<%@ taglib uri="
http://java.sun.com/portlet" prefix="portlet" %>
<portlet:defineObjects/>
<div align="center">
This is a simple HelloWorld JSP Portlet. Type in a name and it will dispatch to the view2.jsp to print out your name.
<br/>
<form action="
<portlet:actionURL><portlet: Param name="page" value="mainview"/></portlet:actionURL>"
method="POST">
Name:<br/>
<input type="text" name="yourname"/>
</form>
<br/>
You can also link to other pages, using a renderURL, like <a
href="<portlet:renderURL><portlet: Param name="yourname" value="Roy Russo"></portlet: Param></portlet:renderURL>">this</a>.
</div>
----
with the bolded part being the action url. The JSP Porlet tag library uses that to generate an actionURL that is specific for that portlet, which directs to an ActionRequest on the server.
The class that handles that just extends the GenericPorlet class and overrides the processAction() method which is similar to a doGet() or doPost() if you're in the Servlet world. After that action request is completed - some logic can be preformed in there and based on the input and your expected output you use the following line in the processAction() method to direct to your next view state by doing the following:
---
PortletRequestDispatcher prd = getPortletContext().getRequestDispatcher("/WEB-INF/jsp/view.jsp");
prd.include(rRequest, rResponse);
--
the portletRequestDispatcher says what the view to transition to should be. There are other ways to do it, you can create a renderUrl using the <portlet:renderUrl> tag as well that just uses the doView() method which is helpful for link transitions.
It takes a bit to get used to the way the portlets do their thing - this is a good helloWorldPortlet example. BTW - you should only have to tweak this minimally to get it to work in another container, like Liferay becuase this is JSR-168 stuff. The one thing you'll have to probably change is the way the portlet.xml is set up in the project to get it to deploy.
** I'm not posting in your other thread about suppressing java errors for building a sample project, but I'll put my two cents in here. The short answer is NO, you cannot compile your java files without all the required libraries or dependencies. Depending on the compilation method you're using (command line vs IDE, you can specify the libraries you need using the classpath argument or in eclipse and just add the libraries to your project.) It actually sounds like you're doing it on the command line, which is fine - but for this example you'll need ANT (
http://www.axint.net/apache/an...che-ant-1.7.1-bin.zip)) to build this becuase it links in your dependencies and creates the deployable WAR file.
I suggest you Download this sample portlet and compile it get it to
deploy on Liferay. It says "Any JSR 168 compliant portlet WAR will work" and this is, but you might have to look around for a better sample than this JBoss one, I just didn't feel like rewriting what I did for Liferay

**