File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Mock exam question on encodeURL Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Mock exam question on encodeURL" Watch "Mock exam question on encodeURL" New topic

Mock exam question on encodeURL

Sudarshan Sreenivasan
Ranch Hand

Joined: Jun 28, 2007
Posts: 188

Which of the following is an example of URL rewriting by using encodeURL(String url)

1) http://localhost:8080/servlet/play;jsessionid=56
2) http://localhost:8080/servlet/play
3 ) http://localhost:8080/servlet/play?jsessionid=56
4 ) None of the above

The answer given is 1 and 2

Why is the third one wrong ?? Is it that encodeURL(..) is always going to use ; instead of ?

Michael Ku
Ranch Hand

Joined: Apr 20, 2002
Posts: 510
the "?" denotes the start of the query string which has nothing to do with URL rewriting. Thaa is why it is not a correct answer
I agree. Here's the link:
subject: Mock exam question on encodeURL
It's not a secret anymore!