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="<%= browser_name %>" 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]

Reply via email to