wood burning stoves 2.0*
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


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Mock exam question on encodeURL" Watch "Mock exam question on encodeURL" New topic
Author

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 ?

Thanks
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: http://aspose.com/file-tools
 
subject: Mock exam question on encodeURL
 
Similar Threads
Problem in opening my Servlet in the browser...
encodeURL and encodeRedirectURL
How to set conf file file
Installing servlet
problem with struts-config.xml