| Author |
URL rewriting
|
Sunjeev Shetty
Ranch Hand
Joined: Aug 21, 2005
Posts: 48
|
|
Which two JSTL URL related tags perform URL rewriting? a)url b)link c)param d)import e)redirect a) is one what is the other? <% request.setAttribute("vals",new String[]{"1","2","3","4"}); request.setAttribute("index","2"); %> which 3 EL expressions are valid and evaluate to "3"? a)${vals["2"]} b)${vals.index} c)${vals[index]} d)${vals.(vals.index)} e)${vals[vals[index-1]]} f)${vals}[index] thanks in advance
|
 |
Marc Peabody
pie sneak
Sheriff
Joined: Feb 05, 2003
Posts: 4725
|
|
my guesses: b a,c,e
|
A good workman is known by his tools.
|
 |
Ramya Iyer
Ranch Hand
Joined: Jul 29, 2003
Posts: 66
|
|
Which two JSTL URL related tags perform URL rewriting? a)url b)link c)param d)import e)redirect I think it is a, e.
|
 |
Jesse Fouse
Greenhorn
Joined: Feb 01, 2005
Posts: 5
|
|
|
I think it is: a, c and a, c, f.
|
 |
Vishnu Prakash
Ranch Hand
Joined: Nov 15, 2004
Posts: 1026
|
|
1 Question: a,c 2 Question: a,c,e
|
Servlet Spec 2.4/ Jsp Spec 2.0/ JSTL Spec 1.1 - JSTL Tag Documentation
|
 |
Yati Tan
Ranch Hand
Joined: May 28, 2005
Posts: 56
|
|
1 : a,c 2 : a,c,e What r the correct ans ?
|
SCJP 1.4<br />SCJA 1.0<br />SCWCD 1.4
|
 |
Sunjeev Shetty
Ranch Hand
Joined: Aug 21, 2005
Posts: 48
|
|
Thanks everyone.The answer for the first question was a and e according to the mock exam.But I felt that that was not right and that c should be the other option. [ February 10, 2006: Message edited by: Sunjeev Shetty ]
|
 |
Jim So
Greenhorn
Joined: Mar 18, 2009
Posts: 28
|
|
in the jstl specification, it states that <c:redirect> follows the same rewriting rules as defined for <c:url>
So does this mean that c:redirect does url rewriting? like c:url does?
In otherwords that mock answer is correct? a and e?
Because its sort of a contradiction, as it then discusses c:redirect and its all about redirecting to another url. It doesnt seem to have anything to do with url rewriting.
I dont like this question. No idea what the answer is.
We know c:url does url rewriting
and c:param does url encoding. And that c:param can be combined with c:url to do url rewriting and url encoding. But since c:param is url encoding, not url rewriting, i would not select "c:param" as the answer.
So that leaves c:redirect to be the only other possible answer.
So i say a and e.
But what is right?
|
 |
Christophe Verré
Sheriff
Joined: Nov 24, 2005
Posts: 14672
|
|
|
This is a 3 years old thread. Please don't wake zombies.
|
[My Blog]
All roads lead to JavaRanch
|
 |
 |
|
|
subject: URL rewriting
|
|
|