I am trying to insert a struts value into a parameter in a URL. However I need to URL encode the value because else characters like " " will confuse Netscape.
Is there a "proper" way of doing this in Struts?

I am currently doing something like this....

....
<%@ page import="java.net.URLEncoder" %>
....


<a href="listDocument.do?action=List&title=<%=URLEncoder.encode((( MetadataValueForm )title).getValue()) %>">
<bean:write name="title" property="value"/>
</a>

But I am not happy about it....I want as little java in the jsp template as possible.

Alex Mc







Openweb Analysts Ltd, London.
Software For Complex Websites http://www.OWAL.co.uk/
Open Source Software Companies please register here http://www.OWAL.co.uk/oss_support/


--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to