• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Where is HttpServletRequestWrapper?

 
Rancher
Posts: 4803
7
Mac OS X VI Editor Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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)
 
Ranch Hand
Posts: 494
Eclipse IDE Postgres Database Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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..
 
Ranch Hand
Posts: 952
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 4803
7
Mac OS X VI Editor Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Bartender
Posts: 4116
72
Mac TypeScript Chrome Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 4803
7
Mac OS X VI Editor Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 4803
7
Mac OS X VI Editor Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic