my dog learned polymorphism*
The moose likes Servlets and the fly likes HttpSessionEvent.class is a pre-defined class or what? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "HttpSessionEvent.class is a pre-defined class or what?" Watch "HttpSessionEvent.class is a pre-defined class or what?" New topic
Author

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

gokulanand narayanan
Greenhorn

Joined: Feb 16, 2006
Posts: 23
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

Joined: Sep 20, 2003
Posts: 1704
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

Joined: Feb 16, 2006
Posts: 23
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

Joined: Nov 24, 2005
Posts: 14687
    
  16

Where i can find the package javax.servlet.http

You need the Servlet API (servlet-api.jar)


[My Blog]
All roads lead to JavaRanch
Kj Reddy
Ranch Hand

Joined: Sep 20, 2003
Posts: 1704
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

Joined: Feb 16, 2006
Posts: 23
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

Joined: Sep 20, 2003
Posts: 1704
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

Joined: Oct 09, 2002
Posts: 294
In addition to previous post. Where did you get servlet-api.jar? It looks like all classes lost their directories.


Tough in space?, <a href="http://tjws.sf.net" target="_blank" rel="nofollow">Get J2EE servlet container under 150Kbytes here</a><br />Love your iPod and want it anywhere?<a href="http://mediachest.sf.net" target="_blank" rel="nofollow">Check it here.</a><br /><a href="http://7bee.j2ee.us/book/Generics%20in%20JDK%201.5.html" target="_blank" rel="nofollow">Curious about generic in Java?</a><br /><a href="http://7bee.j2ee.us/bee/index-bee.html" target="_blank" rel="nofollow">Hate ant? Use bee.</a><br /><a href="http://7bee.j2ee.us/addressbook/" target="_blank" rel="nofollow">Need contacts anywhere?</a><br /><a href="http://searchdir.sourceforge.net/" target="_blank" rel="nofollow">How to promote your business with a search engine</a>
gokulanand narayanan
Greenhorn

Joined: Feb 16, 2006
Posts: 23
http://www.mtholyoke.edu/courses/srollins/cs341-s04/web/servlet-api.jar

i got the jar file from the above link
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

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.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
dema rogatkin
Ranch Hand

Joined: Oct 09, 2002
Posts: 294
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.
 
jQuery in Action, 2nd edition
 
subject: HttpSessionEvent.class is a pre-defined class or what?
 
Similar Threads
Tab Key Binding JTextField
Possible BUG in VAJ 3.5.3 : Inner class
Doubt with static initializers
sun.misc.BASE64Decoder
Accessing default class methods in other packages (Bug??)