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 April 19th, 2004, 08:17 PM
Registered User
 
Join Date: Apr 2004
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.
 
Old April 26th, 2004, 07:16 PM
Registered User
 
Join Date: Apr 2004
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"



 
Old December 4th, 2004, 09:14 AM
Oak Oak is offline
Registered User
 
Join Date: Dec 2004
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-
----------------
 
Old December 4th, 2004, 03:16 PM
Friend of Wrox
 
Join Date: Jul 2004
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.

 
Old January 20th, 2006, 06:36 AM
Registered User
 
Join Date: Jan 2006
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.
 
Old January 17th, 2007, 06:37 AM
rnd rnd is offline
Registered User
 
Join Date: Jan 2007
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





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 03:58 PM
javax.servlet problem anupamda JSP Basics 2 June 23rd, 2004 09:59 PM
package org.xml does not exist?? CFerthorney J2EE 1 May 10th, 2004 05:26 PM





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