Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Java > Java and JDK > JSP Basics
|
JSP Basics Beginning-level questions on JSP. More advanced coders should post to Pro JSP.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the JSP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 19th, 2004, 12:46 PM
Registered User
 
Join Date: Feb 2004
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default javax.servlet problem

I am writing a class for using it in a JSP but got stuck in compiling the class (.java file).

I am getting compilation error for the following line:
import javax.servlet.http.*;

I have a method in a class as follows:

  public void addPropertyChangeListener(PropertyChangeListener l) {
    pcs.addPropertyChangeListener(l);
  }

For the type PropertyChangeListener I think I have to import javax.servlet.http.*

I have jdk1.2.2 installed in my m/c. I am getting the compilation error:
"Package javax.servlet.http not found in import."

Please help me to get rid off this problem

Thanks in advance



 
Old June 16th, 2004, 08:09 AM
Authorized User
 
Join Date: Jun 2004
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default

hi,

first u need javax package which can be found with JavaServletDevelopmentKit(Jsdk)
Check your class path.
it should contain path to javax directory and \lib\tools.jar

Prasanth.C

prasanth.c
 
Old June 23rd, 2004, 09:59 PM
Registered User
 
Join Date: Mar 2004
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I may be mistaken but the PropertyChangeListener interface is part of the java.beans package and not thr javax.servlet.http package.

You can look at the api reference at the following link:

http://java.sun.com/j2se/1.4.2/docs/...eListener.html






Similar Threads
Thread Thread Starter Forum Replies Last Post
javax.servlet.ServletException: Exception creating frozen84 Servlets 9 January 29th, 2007 09:13 AM
Package javax.servlet.jsp does not exist wottt JSP Basics 5 January 17th, 2007 06:37 AM
servlet problem discuss Servlets 1 August 29th, 2006 10:03 AM
javax.servlet gauravchhabra9111 Servlets 1 January 19th, 2005 03:14 AM
package javax.servlet does not exist ...HELP Jil Servlets 3 September 12th, 2004 03:58 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.