-
1. Re: Accessing <f:param> parameter's value inside a Servlet
ambrish_kumar Jun 17, 2009 10:48 AM (in response to ambrish_kumar)Hi Everyone,
Is nobody here who can solve my problem ?
Should I ask this question on JSF forums?.Thanks
Ambrish
-
2. Re: Accessing <f:param> parameter's value inside a Servlet
sherkan777 Jun 17, 2009 11:01 AM (in response to ambrish_kumar)Hi,
Is any reason why u use s:link for servlet? Maybe u use simple
<a href="myApp?firstParam=#{someParam.value}&anotherParam=#{anotherParam.quantity}><img ../></a>
and get parameters like get in your example. This should work for servlet.
Another question.
I never tryed, but if u use servlet, first I will try to use servlet url instead of/user/UserDetails.xhtml
something like this.
/myPage/myservlet
from web.xml
<servlet> <description></description> <display-name>/myPage/myservlet</display-name> <servlet-name>/myPage/myservlet</servlet-name> <servlet-class>com.myApp.myServlet</servlet-class> <load-on-startup>2</load-on-startup> </servlet> <servlet-mapping> <servlet-name>/myPage/myservlet</servlet-name> <url-pattern>/myPage/myservlet</url-pattern> </servlet-mapping>
-
3. Re: Accessing <f:param> parameter's value inside a Servlet
ambrish_kumar Jun 17, 2009 12:11 PM (in response to ambrish_kumar)Hi Sherkan,
Thanks for the reply.
Actually I have to display the Report inside the view UserDetails.xhtml.
I am calling the Servlet in UserDetails.xhtml page but I have to set the iUserId parameter before accessing the Servlet.
If I use <a:href> as shown below ,
<a href="../JasperReportServlet?iUserId=#{user.iUserId}" > <img src="/img/send.gif" alt="GetReport" border="0"/> </a>
then it is working and the iUserId parameter is accessible on Servlet.
But my requirement is that when I click on the above link, UserDetails.xhtml page will display and before this request parameter is set.Is it possible ?
Thanks
Ambrish
-
4. Re: Accessing <f:param> parameter's value inside a Servlet
sherkan777 Jun 17, 2009 12:24 PM (in response to ambrish_kumar)Is this important to use servlet to show report?
Can u use SFSB in event/conversation scope instead?I use same on my page. I've got list of reports, user click on someone.
In<s:link .. />
i open new tab window in browser, and whole busines logic is managed in conversation scope SFSB for each report.
after report close I clean everythink about this report.Maybe in servlet u redirect user to this page?
Example:
1. user click on link a href
2. u get parameters?
3. after somethink u want u redirect user to this page or not.