• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

URL rewriting

 
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
pie sneak
Posts: 4727
Mac VI Editor Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
my guesses:

b

a,c,e
 
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think it is: a, c and a, c, f.
 
Ranch Hand
Posts: 1026
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
1 Question: a,c
2 Question: a,c,e
 
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
1 : a,c
2 : a,c,e

What r the correct ans ?
 
Sunjeev Shetty
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This is a 3 years old thread. Please don't wake zombies.
 
This parrot is no more. It has ceased to be. Now it's a tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic