File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

URL rewriting

 
Sunjeev Shetty
Ranch Hand
Posts: 48
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4727
Mac Ruby VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
my guesses:

b

a,c,e
 
Ramya Iyer
Ranch Hand
Posts: 66
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 5
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think it is: a, c and a, c, f.
 
Vishnu Prakash
Ranch Hand
Posts: 1026
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1 Question: a,c
2 Question: a,c,e
 
Yati Tan
Ranch Hand
Posts: 56
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1 : a,c
2 : a,c,e

What r the correct ans ?
 
Sunjeev Shetty
Ranch Hand
Posts: 48
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 28
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is a 3 years old thread. Please don't wake zombies.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic