Fórumok
Using two jsps in one liferay Portlet
Rafiq Uz Zama, módosítva 12 év-val korábban
Using two jsps in one liferay Portlet
Junior Member Bejegyzések: 30 Csatlakozás dátuma: 2011.11.25. Legújabb bejegyzések
Hi ,
I need to use 2 jsps in a portlet.
Currently i am using view.jsp of a portlet for database interaction but i need to display a custom message after submitting form to database.
So need help for this thing?
Used RequestDispatcher too?
Regards,
Rafiq
I need to use 2 jsps in a portlet.
Currently i am using view.jsp of a portlet for database interaction but i need to display a custom message after submitting form to database.
So need help for this thing?
Used RequestDispatcher too?
Regards,
Rafiq
Rafiq Uz Zama, módosítva 12 év-val korábban
RE: Using two jsps in one liferay Portlet
Junior Member Bejegyzések: 30 Csatlakozás dátuma: 2011.11.25. Legújabb bejegyzések
If you are redirecting from view.jsp to any other jsp say check.jsp then follow these::::::
1) redirecting to another jsp with parameter
Add the following code
<portlet:renderURL var="check">
<portlet:param name="jspPage" value="/check.jsp" />
</portlet:renderURL>
<a href="<%=check%>&abc%></a>
2) add request.getParameterNames(); in check.jsp and retrieve all parameters
Regards,
Rafiq Uz Zama
1) redirecting to another jsp with parameter
Add the following code
<portlet:renderURL var="check">
<portlet:param name="jspPage" value="/check.jsp" />
</portlet:renderURL>
<a href="<%=check%>&abc%></a>
2) add request.getParameterNames(); in check.jsp and retrieve all parameters
Regards,
Rafiq Uz Zama
Juhi Kumari, módosítva 12 év-val korábban
RE: Using two jsps in one liferay Portlet
Expert Bejegyzések: 347 Csatlakozás dátuma: 2011.12.12. Legújabb bejegyzések
Hi Rafiq,
I think in your view.jsp you are submitting a form, for that you are calling a action. To display the success message in check.jsp, you can set
viewJSP = "/html/portlet/check.jsp"; in your render method.
Regards
Juhi
I think in your view.jsp you are submitting a form, for that you are calling a action. To display the success message in check.jsp, you can set
viewJSP = "/html/portlet/check.jsp"; in your render method.
Regards
Juhi
Hitoshi Ozawa, módosítva 12 év-val korábban
RE: Using two jsps in one liferay Portlet
Liferay Legend Bejegyzések: 7942 Csatlakozás dátuma: 2010.03.24. Legújabb bejegyzésekCurrently i am using view.jsp of a portlet for database interaction
If you're posting to a database from view.jsp, your portlet will submit everytime an user refreshes the page.
Rafiq Uz Zama, módosítva 12 év-val korábban
RE: Using two jsps in one liferay Portlet
Junior Member Bejegyzések: 30 Csatlakozás dátuma: 2011.11.25. Legújabb bejegyzések
Hi Ozawa,
Thanks for replying..
my form is in view.jsp and i have submit button in it and after clicking submit itself, it redirects to check.jsp(in this case).
Thanks and Regards,
Rafiq
Thanks for replying..
my form is in view.jsp and i have submit button in it and after clicking submit itself, it redirects to check.jsp(in this case).
Thanks and Regards,
Rafiq