This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes URL rewriting Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "URL rewriting" Watch "URL rewriting" New topic
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: 4727

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: 14687
    
  16

This is a 3 years old thread. Please don't wake zombies.


[My Blog]
All roads lead to JavaRanch
 
 
subject: URL rewriting
 
Similar Threads
How to use EL to get the value
EL question with [] operator
Mock exam questions
expression language query
A EL Question