• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Where is HttpServletRequestWrapper?

 
Pat Farrell
Rancher
Posts: 4678
7
Linux Mac OS X VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm using NB 6.7.1 with the bundled JDK and Glassfish v2.1.x servlet
container.

When I try to compile code referencing

javax.servlet.http.HttpServletRequestWrapper:

the compile fails, as the class is undefined.

Its as if the Glassfish libraries are not included in the default
classpath, or perhaps the class is not defined in the standard setup?

What do I need to do to make this compile (and I hope run)
 
Leonardo Carreira
Ranch Hand
Posts: 494
Eclipse IDE Java Postgres Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Pat Farrell..

Have you solved your problem?..
How about if you use Netbeans6.5?
Netbeans6.5 also shipped with GlassfishV2..

Thanks..
 
Punit Singh
Ranch Hand
Posts: 952
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Pat Farrell wrote:I'm using NB 6.7.1 with the bundled JDK and Glassfish v2.1.x servlet
container.

When I try to compile code referencing

javax.servlet.http.HttpServletRequestWrapper:

the compile fails, as the class is undefined.

Its as if the Glassfish libraries are not included in the default
classpath, or perhaps the class is not defined in the standard setup?

What do I need to do to make this compile (and I hope run)


This class comes bundled with tomcate server, in the servlet-api.jar, try to add this jar file in the library of your project.
 
Pat Farrell
Rancher
Posts: 4678
7
Linux Mac OS X VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Punit Singh wrote:
Pat Farrell wrote: Glassfish v2.1.x servlet

This class comes bundled with tomcate server, in the servlet-api.jar, try to add this jar file in the library of your project.


I figured it was in the servlet container. But all the rest of the javax.servlet.* classes are found automatically. I assume that it because Netbeans is linking in the container's classes automatically.

I'm not sure of the wisdom of using Tomcat classes with Glassfish.
 
Vijitha Kumara
Bartender
Pie
Posts: 3930
21
Chrome Fedora Hibernate
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Pat Farrell wrote: I'm not sure of the wisdom of using Tomcat classes with Glassfish.

Always the classes should be compiled against which ever the libraries/implementations used by the server which the application will run. I'm sure GlassFish must have those classes. I have not tried it though
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65335
97
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Meh, compile time doesn't matter. They're all just interfaces. But I would not mix libraries at run-time, that's for sure!
 
Pat Farrell
Rancher
Posts: 4678
7
Linux Mac OS X VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Vijitha Kumara wrote:
Pat Farrell wrote: I'm not sure of the wisdom of using Tomcat classes with Glassfish.

Always the classes should be compiled against which ever the libraries/implementations used by the server which the application will run. I'm sure GlassFish must have those classes. I have not tried it though


I think this is more of a Netbeans not being smart about the libraries to use when you select the embedded Glassfish
 
Pat Farrell
Rancher
Posts: 4678
7
Linux Mac OS X VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bear Bibeault wrote:Meh, compile time doesn't matter. They're all just interfaces. But I would not mix libraries at run-time, that's for sure!

Actually, this one is an class, designed or easy overriding.

I've tried telling Netbeans to use Glassfish v3 beta, and it can't find it either.

I've tried the netbeans user mailing list, but I think that is nearly dead, as I am afraid that Netbeans in general is.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic