• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

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

 
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
 
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.
 
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • 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.
 
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
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • 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.
 
But how did the elephant get like that? What did you do? I think all we can do now is read this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic