Hi Deeþàn,

This email looks more like a question about using / developing portlets for use in uPortal, than it looks like a post about developing the uPortal framework itself.  I therefore suggest it would be best to move this discussion to [EMAIL PROTECTED]

As far as your question itself: it seems to me that the JSP should be using the portlet tag library to compose the URLs, bind in the portlet request, etc.  It may be best to grab a working example to start from.  For instance, Cris Holdorph's Google Portlet's edit.jsp demonstrates declaring the portlet tag library, defining (binding) the portlet objects, and composing a form that posts to a URL generated using the portlet tag library.

<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
<%@ taglib prefix="portlet" uri="http://java.sun.com/portlet" %>
<portlet:defineObjects/>

<form action=""view"/>" method="POST">
  <strong>KEY: </strong>
  <input type="text" name="KEY" value="<c:out value="${KEY}"/>"/><br/>
  <input type="submit" name="ACTION" value="Save"/>&nbsp;
  <input type="submit" name="ACTION" value="Cancel"/><br/>
</form>



Deeþàn Chakravarthÿ wrote:
Hello All,
I have trouble in accessing post variable sent by a form from the browser inside the Java Portlet code.

I had created a simple JSP that has a simple form which uses POST method.

JSP file:

<%
 final String browser_name = (String) request.getAttribute("javax.servlet.forward.request_uri");
%>
<form name="input" action="" method="post">
Username_post:
<input type="text" name="user_post">
<input type="submit" value="submit_post">
</form>






Portlet Code:

public class FormPortlet extends GenericPortlet
{
 public void doView(RenderRequest request,RenderResponse response)
 throws PortletException, IOException
 {
     parseRequestParameters(request);
     PortletContext portletcontext = getPortletContext();
     PortletRequestDispatcher prd = portletcontext.getRequestDispatcher("/jsp/form.jsp");
     prd.include(request,response);
 }
}



How do I access the  value entered in  user_post input box inside the Java code and JSP code?
I tried printing all parameters and attributes from the request object, but could not find the value of user_post.


Thanks a lot,
Deepan





--
Join your friends and colleagues at JA-SIG with Altitude: June 24-27, 2007 in Denver, CO USA.

Featuring keynotes by: Phil Windley, Matt Raible, Matt Asay
Sessions on topics including: CAS, uPortal, Portlets, Sakai, Identity Management, and Open Source

For more information & registration visit: http://www.ja-sig.org/conferences/07summer/index.html
---
You are currently subscribed to [email protected] as: [EMAIL PROTECTED].
To unsubscribe send a blank email to [EMAIL PROTECTED]

--
Join your friends and colleagues at JA-SIG with Altitude: June 24-27, 2007 in Denver, CO USA.

Featuring keynotes by: Phil Windley, Matt Raible, Matt Asay
Sessions on topics including: CAS, uPortal, Portlets, Sakai, Identity Management, and Open Source

For more information & registration visit: http://www.ja-sig.org/conferences/07summer/index.html
---
You are currently subscribed to [email protected] as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]

Reply via email to