tags:

views:

5528

answers:

1

Hi,

I have a JAVA with JSF/ICEFaces application. I need to pass parameters from one page to another so I user something like:

<f:param name="eventName" value="#{item.event_name}" />

And then get it in the constructor using:

eventName = request.getParameter("eventName");

While works fine unless there is a '/' character in the string submitted, it doesn't get parsed properly. I believe I need to escape the '/' parameter with %2F and then parse it back.

Two things: 1- How to do this in ICEFaces or JSF 2- Are there other parameter I have to escape?

Thanks,

Tam

A: 
<h:outputLink value="http://google.com"&gt;click
    <f:param name="eventName" value="#{param.eventName}" />
</h:outputLink>

works for me - the browser takes care of url-encoding.

Note that you can get request parameters directly in your page, using #{param.paramName}

Bozho
hmmmm...it's weird that's exactly what I'm using (h:outputLink) but I'm still getting a '/' in the link!!
Tam
what browser are you using?
Bozho
I tried it with both IE and FireFox
Tam
what version of JSF? MyFaces or RI? Facelets or JSP? did you try my example?
Bozho
I'm using JSF 1.1 RI, JSP and ICEFaces 1.8.1. I did try your example it didn't work form me
Tam
would it be a problem to switch to jsf 1.2 ?
Bozho
hmmmm....I can give it a shot but it might be an issue
Tam