Hi All,
I am trying to encode the url, pass spme parameters and decode them in another jsp.
Encoding:
<a href="<c:url value="abc.jsp">
<c:param name="folder" value="${sectionValue.foldername}"/>
<c:param name="filen" value="${fn:trim(sectionValue.filelink)}"/>
</c:url>"
target="_blank">${sectionValue.filename} (${sectionValue.filetype})</a>
Decoding in abc.jsp
<%
out.clear();
out = pageContext.pushBody();
String path ="E:\\web\\forms\\Current\\";
String folder = request.getParameter("folder");
String filen = URLDecoder.decode(request.getParameter("filen"), "UTF-8");
path=path+folder+"\\"+filen;
System.out.println(path);
%>
When I print this path, it still is T L Fam12.19.08.pdf instead of T + L Fam12.19.08.pdf.
It is encoding correctly , cause it is T%2bL%2520Fam12.19.08.pdf
Thanks