File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSF and the fly likes How to retrieve post parmeters from HTML Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » JSF
Reply Bookmark "How to retrieve post parmeters from HTML" Watch "How to retrieve post parmeters from HTML" New topic
Author

How to retrieve post parmeters from HTML

Murali Raj
Greenhorn

Joined: May 13, 2007
Posts: 1
Hi All,

I am new to JSF..just started with small projects in JSF.
I need to retreive post parameters values from plain HTML Pages.
Once i receive the post parameters then i need to validate one of the parameter value based on the parameter value i need to redirect user to diffrent JSF pages.
What is the best way of doing this scenario.

Any help would be highly appriciated.
rajesh vaja
Greenhorn

Joined: May 18, 2007
Posts: 2
See this Code

<t:commandLink id="viewselectsectgfergfionindex" action="#{selectinstrumentindex.populate}" title="xyz">
<t:graphicImage id="id11" align="center" url="/resources/images/Back_Button.gif" border="1" />

<f:param name="surveyCode" value="#{selectsectionindex.ssSurveyCode}"/>
<f:param name="respCode" value="#{selectsectionindex.respCode}"/>

</t:commandLink>



<navigation-rule>
<from-view-id>/modules/mod_surclient/selectsectionindex.jsp</from-view-id>
<navigation-case>
<from-outcome>sectiontoselectsuccess</from-outcome>
<to-view-id>/modules/mod_surclient/surselectoptionindex.jsp</to-view-id>
</navigation-case>
</navigation-rule>


public String populate()
{
try
{
PortletRequest portletRequest1 = (PortletRequest)FacesContext.getCurrentInstance().getExternalContext().getRequest();

setParameterSurveyCode(portletRequest1.getParameter("surveyCode"));
}
catch(Exception e)
{
logger.error(e);
return "surselectoptionindexerror";
}
return "surselectoptionindexsuccess";
}
 
 
subject: How to retrieve post parmeters from HTML
 
Threads others viewed
Do not understand something about parameters
how i can forward to another web application from my web application?
cannot get a value from jsf back to the html
how to access a session value on JSF page?
running javafx from java without jfx sdk installed
IntelliJ Java IDE