Pierre Peron

Greenhorn
+ Follow
since Jun 15, 2006
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Pierre Peron

What do you mean? I don't understand. Could you give me the code you want me to test please?
15 years ago
JSP
Thanks for your answer. I already thought about testing with the URLEncoder.class :

<% String url = URLEncoder.encode("test.jsp?code=" + value, "UTF-8"); %>

The returned url seems to be correct (test.jsp%3Fcode%3Dtest) but it doesn't works even if there is no specific character. The following error message is thrown: "The requested resource (/test.jsp%3Fcode%3Dtest) is not available"

Could you tell me what am I doing wrong? Or how can I use JSTL in this example (I hadn't ever use it).
15 years ago
JSP
I'd like to make a simple link from a jsp (A) to another (B) with adding a parameter that I want to transmit from A to B.

In jsp A:
<% String value="object_1"; %>
<a href="url_b.jsp?code=<%= value %>"><%= value %></a>

In jsp B:
<% String code = (String)request.getParameter("code"); %>

This operation is correctly done. But if I change the variable "value" of my jsp A into "object%1" there is a problem. The value of variable "code" in the jsp B is null. The problem seems to come from the character '%'

How can I do to avoid this problem in case of specific character that I have to consider in my application?
15 years ago
JSP