Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Regarding the deprecated javax.servlet.http.HttpUtils class

Posted on 2003-11-19
4
Medium Priority
?
537 Views
Last Modified: 2008-03-10
The API docs say:

javax.servlet.http.HttpUtils
Deprecated. As of Java(tm) Servlet API 2.3. These methods were only useful with the default encoding and have been moved to the request interfaces.

I am pretty sure there's nothing in the HttpServletRequest interface, nor in the ServletRequest.

Am I wrong? How can you _parse_ the query string? (I use 1.4.0 SE & 1.3.0 EE)

0
Comment
Question by:piou
  • 3
4 Comments
 
LVL 35

Expert Comment

by:girionis
ID: 9777220
>  How can you _parse_ the query string?

  Use request.getParameter("parameter");
0
 
LVL 35

Expert Comment

by:girionis
ID: 9777232
 If you are talking about getting the whole query use:

  request.getQueryString();

  or an Enumeration to get all the parameters:

  Enumeraiton enum = request.getParameterNames();
0
 

Author Comment

by:piou
ID: 9777487
Oh! I thought the getParameter() was only for form data included in the response. You say that the same method parses the query string?!
0
 
LVL 35

Accepted Solution

by:
girionis earned 200 total points
ID: 9777504
 This method is used to get any parameters in the request, whether it is in a form (POST/GET) or explicitly in a URL (GET).
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
In this post we will learn different types of Android Layout and some basics of an Android App.
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
Suggested Courses

824 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question