• 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

can not find javax.servlet.AsyncContext

 
Ranch Hand
Posts: 128
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Developing with Comet and Java
Implementing the Servlet 3.0 specification

I'm trying to run the demo from the IBM site: WeatherServer

IBM Weather Server.zip

The demo has three versions, (a) tomcat, (b) jetty, (c) glassfish (i believe)

With the glassfish version, (c)

I get the build error:

cannot find symbol
symbol : class AsyncContext
location: package javax.servlet
import javax.servlet.AsyncContext;

I'm using Netbeans 6.7.1, and jee5


 
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think you need to add the tomcat jars to the classpath.
 
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

David Kilcy wrote:I think you need to add the tomcat jars to the classpath.


As he is asking about the Glassfish version, and Tomcat does not yet support 3.0, I don;t the Tomcat jars will be of any use.
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Glassfish is indeed the "reference implementation" of servlet 3.0.

For those of you interested in specification politics, the reason it is glassfish and not tomcat can be found on this record of votes by the expert group. Apache Software Foundation voted against acceptance!

Bill

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
interface referred javax.servlet.AsyncContext
is not available in J2EE 5, instead it is available in J2EE 6
Refer Java Doc for clarification.
J2EE 5 : http://java.sun.com/javaee/5/docs/api/
J2EE 6 : http://java.sun.com/javaee/6/docs/api/
Please update to J2EE 6
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic