• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 631
  • Last Modified:

Regarding the deprecated javax.servlet.http.HttpUtils class

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
piou
Asked:
piou
  • 3
1 Solution
 
girionisCommented:
>  How can you _parse_ the query string?

  Use request.getParameter("parameter");
0
 
girionisCommented:
 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
 
piouAuthor Commented:
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
 
girionisCommented:
 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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Microsoft Windows 7 Basic

This introductory course to Windows 7 environment will teach you about working with the Windows operating system. You will learn about basic functions including start menu; the desktop; managing files, folders, and libraries.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now