• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

can not find javax.servlet.AsyncContext

 
jite eghagha
Ranch Hand
Posts: 128
  • Mark post as helpful
  • send pies
  • 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


 
David Kilcy
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think you need to add the tomcat jars to the classpath.
 
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
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.
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13077
6
  • Mark post as helpful
  • send pies
  • 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

 
Tarun Manglia
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • 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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic