struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paolo Niccolò Giubelli <paoloniccolo.giube...@itestense.it>
Subject URLEncoding a string
Date Tue, 19 Aug 2008 13:23:11 GMT
This is my scenario: I'm url-rewriting my web application, so I'm 
putting some strings into the html:link href attributes, so to make my 
links more search-engine friendly.
Obviously, those strings are retrieved from the database.
An example follows:
<html:link href="/reserved/new_item/step1/${category.id}/${category.name}">
                             <bean:write name="category" property="name"/>
                         </html:link>
The problem is ${category.name}, because sometimes string contain 
stressed letters, symbols and so on...
How can I Urlencode ${category.name}, keeping the code tidy?
Thanks in advance!
PAolo

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message