Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Servlet API missing HttpServletRequest.getRequestURL() ??

843841Feb 2 2006 — edited Feb 2 2006
Hello,

I am using the Servlet 2.3 JARs that come with Tomcat 4.1

In the javadoc there is a listing for the method

HttpServletRequest.getRequestURL()

But when I am developing in eclipse (project JARs point to correct servlet), I am unable to write a line of code in my servlet such as:

String URL = request.getRequestURL();

It just says method is undefined for HttpServletRequest.

I'm going crazy here - I have now tried 2.2, 2.3, and even the 2.4 (? comes with tomcat 5.5) to no avail.

Is there any other way I can get the URL of the request,
such as "http://localhost:8080/servlet?blahblah" from an HttpServletRequest object?

Thanks,

Mike
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 2 2006
Added on Feb 2 2006
1 comment
263 views