File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes Extracting Query String from URL Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Extracting Query String from URL" Watch "Extracting Query String from URL" New topic
Author

Extracting Query String from URL

Satyajeet Kadam
Ranch Hand

Joined: Oct 19, 2006
Posts: 215
Q1) My request URL is url: http://localhost:8080/Json/register?action:getReservations. On server side i want to extract string getReservations which is my name of my method in a servlet.To acheive i am writing servlet code



it return me as


How can i get only getReservations String ?
Madhan Sundararajan Devaki
Ranch Hand

Joined: Mar 18, 2011
Posts: 312

Please use the Servlet API, HttpServletRequest.getParameterValues.


S.D. MADHAN
Not many get the right opportunity !
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Extracting Query String from URL