Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Java > Java and JDK > JSP Basics
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old April 19th, 2004, 09:17 PM
Registered User
 
Join Date: Apr 2004
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Package javax.servlet.jsp does not exist

Hi,

Im trying to compile a file which imports

- import javax.servlet.jsp.*;

but when i compile it i get the error:

package javax.servlet.jsp does not exist
import javax.servlet.jsp.*;
^
I don't believe it is a problem with my classpath as
I also have the command

- import javax.servlet.http.*;

in the file which compiles fine when i comment out

- import javax.servlet.jsp.*;

my classpath contains "c:\tomcat\common\lib\servlet-api.jar"
which points to the javax.servlet class.

Any help greatly appreciated!

Thanks.
Reply With Quote
  #2 (permalink)  
Old April 26th, 2004, 08:16 PM
Registered User
 
Join Date: Apr 2004
Location: liaoning, dalian, China.
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to ale_x
Default

My classpath contains "D:\Tomcat 4.1\common\libˇ˘servlet.jar"



Reply With Quote
  #3 (permalink)  
Old December 4th, 2004, 09:14 AM
Oak Oak is offline
Registered User
 
Join Date: Dec 2004
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I was having problems with this and then discovered that with the version of Tomcat that I am using ( 5.0 ), the commons/lib directory does contain the servlet-api.jar, however, when I opened it to check if it contained the jsp directory, it did not. I then found jsp-api.jar in the same directory and I believe this is the archive that contains the required files.

Hope this helps!

Have a good one.

----------------
-Oak McIlwain-
----------------
Reply With Quote
  #4 (permalink)  
Old December 4th, 2004, 03:16 PM
Friend of Wrox
 
Join Date: Jul 2004
Location: , , .
Posts: 204
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Oak is righ, you need both servlet-api.jar and jsp-api.jar in common/lib folder. You can get them off the SUN site.

Reply With Quote
  #5 (permalink)  
Old January 20th, 2006, 06:36 AM
Registered User
 
Join Date: Jan 2006
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi i have both jsp-api and servlet-api in my common lib directory though i am still having problem when i am trying to compile a java file with import javax.servlet.jsp.*. I will greatly appreciate if any one can let me know what i am doing wrong.
Reply With Quote
  #6 (permalink)  
Old January 17th, 2007, 06:37 AM
rnd rnd is offline
Registered User
 
Join Date: Jan 2007
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I also faced the same problem.
I copied the following jar files in the compile path
javax.servlet.jar
javax.servlet.jsp.jar
jboss-j2ee.jar
servlet-api.jar

I think jboss-j2ee.jar is the one which is needed along with other jar files.
Hope this helps

- RND
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
javax.servlet.ServletException: Exception creating frozen84 Servlets 9 January 29th, 2007 09:13 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 04:58 PM
javax.servlet problem anupamda JSP Basics 2 June 23rd, 2004 10:59 PM
package org.xml does not exist?? CFerthorney J2EE 1 May 10th, 2004 06:26 PM



All times are GMT -4. The time now is 05:30 PM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.