Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

HttpSessionEvent.class is a pre-defined class or what?

 
gokulanand narayanan
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

The HttpSessionEvent.class is a per-defind class or what if pre-defined class under which package it is coming.

And Where to find the per-defind classes and its packages.

Where i can find the package javax.servlet.http.

please guide me i am a newbee

Thanks in advance
 
Kj Reddy
Ranch Hand
Posts: 1704
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can find HttpSessionEvent inside javax.servlet.http. Go to Java api you can find all the classes. for more details for HttpSeesionEvent class
you can look :
http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/http/HttpSessionEvent.html
[ February 22, 2006: Message edited by: KJ Reddy ]
 
gokulanand narayanan
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the immediate reply

And i want view the List of pre-defined classes, For example

under Jdk/jre/lib/rt.jar there u can find the packages like java,javax,

In that ido not find any javax.servlet.http package

how i can view this package.

help me.
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Where i can find the package javax.servlet.http

You need the Servlet API (servlet-api.jar)
 
Kj Reddy
Ranch Hand
Posts: 1704
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by gokulanand narayanan:
Thanks for the immediate reply

And i want view the List of pre-defined classes, For example

under Jdk/jre/lib/rt.jar there u can find the packages like java,javax,

In that ido not find any javax.servlet.http package

how i can view this package.

help me.


You need to look in: servlet-api.jar not in rt.jar
 
gokulanand narayanan
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks again,

i downloded that servlet-api.jar and placed in right place

even i am getting an error

my code follows

import javax.servlet.http.*;

class one
{
public static void main (String args[])
{
HttpSessionEvent HSE = new HttpSessionEvent();
HSE.getSession();
}
}

Error :
one.java:7: cannot access HttpSessionEvent
bad class file: .\HttpSessionEvent.class
class file contains wrong class: javax.servlet.http.HttpSessionEvent
Please remove or make sure it appears in the correct subdirectory of the classpath.
HttpSessionEvent HSE = new HttpSessionEvent();
^
1 error

what is the problem
 
Kj Reddy
Ranch Hand
Posts: 1704
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am not sure what you are trying to do. There is no default constructor for HttpSessionEvent. You need to create HttpSession object and you need to pass this a parameter to HttpSessionEvent constrouctor.
 
dema rogatkin
Ranch Hand
Posts: 294
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In addition to previous post. Where did you get servlet-api.jar? It looks like all classes lost their directories.
 
gokulanand narayanan
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
http://www.mtholyoke.edu/courses/srollins/cs341-s04/web/servlet-api.jar

i got the jar file from the above link
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you download Tomcat, you can find servlet-api.jar in tomcat/common/lib.
There is a link to the Javadoc Servlet API in my signature.
 
dema rogatkin
Ranch Hand
Posts: 294
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you like unofficial sources of servlet API, then you can get it as servlet.jar in TJWS distribution you can find in my signature.
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic