Home > Archive > Java Beans > February 2005 > Difficulties with Include Parameters/java.net.URLEncoder class
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Difficulties with Include Parameters/java.net.URLEncoder class
|
|
| Rick Huby 2005-02-27, 8:58 am |
| I am building a JSP website and have created a page template that has
two include pages - a navigation page and a footer page.
For obvious reasons I am using this for easier maintenance if
navigation or footer details change.
However the way that the navigation works I need to pass it a heading
value - and on some pages this will be dynamically obtained from a DB.
The code I am using is :
<jsp:include flush="true" page="/jspinc/nav.jsp">
<jsp:param name="heading1" value="<%=title%>" />
</jsp:include
I am getting a deprecation issue on using the a variable for the param
value, instead of hard coding it.
It all boils down to the java.net.URLEncoder class and specifically the
encode(String) method. This has been replaced by encode(String s,
String encType).
My problem is that I have no idea how to use this new method using the
syntax I already have. Can anybody help?
| |
| John C. Bollinger 2005-02-27, 3:59 pm |
| This is off-topic in comp.lang.java.beans. Followups set to
comp.lang.java.programmer.
Rick Huby wrote:
> I am building a JSP website and have created a page template that has
> two include pages - a navigation page and a footer page.
[...]
> It all boils down to the java.net.URLEncoder class and specifically the
> encode(String) method. This has been replaced by encode(String s,
> String encType).
>
> My problem is that I have no idea how to use this new method using the
> syntax I already have. Can anybody help?
You cannot fix this in your JSP code: it is an issue with the JSP page
translator provided by your JSP container. I know from personal
experience that Tomcat 4 has this issue, but likely many others do too.
You can s a JSP container that does not have the issue, you can
abandon JSP for pure servlets, or you can just live with it.
--
John Bollinger
jobollin@indiana.edu
|
|
|
|
|