Solved

Regarding the deprecated javax.servlet.http.HttpUtils class

Posted on 2003-11-19
4
418 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 50 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
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…
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.

706 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now