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 September 22nd, 2003, 08:29 AM
Registered User
 
Join Date: Jul 2003
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default ch 12 compiling com\wrox\secure\*.java classes

-Following exactly the text in the books I can't compile the classes (com\wrox\secure\*.java)

-The error is:
com\wrox\secure\ForceLoginTag.java:3: package javax.servlet.http does not exist
import javax.servlet.http.HttpServletRequest;
                          ^
com\wrox\secure\ForceLoginTag.java:4: package javax.servlet.http does not exist
import javax.servlet.http.HttpSession;
                          ^
com\wrox\secure\ValidateTag.java:5: package javax.servlet.http does not exist
import javax.servlet.http.HttpServletRequest;
                          ^
com\wrox\secure\ValidateTag.java:6: package javax.servlet.http does not exist
import javax.servlet.http.HttpSession;
                          ^
com\wrox\secure\ForceLoginTag.java:20: cannot resolve symbol
symbol : class HttpSession
location: class com.wrox.secure.ForceLoginTag
    HttpSession session = pageContext.getSession();
    ^
com\wrox\secure\ValidateTag.java:42: cannot resolve symbol
symbol : class HttpSession
location: class com.wrox.secure.ValidateTag
    HttpSession thisSession = pageContext.getSession();

-First I changed the classpath into:
%CATALINA_HOME%\common\lib\jsp-api.jar;;%CATALINA_HOME%\common\lib\jsp-api.jar; as in the book

-Then I changed in dosbox to:
C:\java\Tomcat-5.0.9\webapps\Security\WEB-INF\classes

-Followed by command:
javac com\wrox\secure\*.java

How to solve this problem?

Thanks in advance JH

 
Old September 22nd, 2003, 09:33 AM
Authorized User
 
Join Date: Aug 2003
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Check your CLASSPATH.

I don't think you have servlet.jar in it.

c:\tomcat\common\lib\servlet.jar should be in it somewhere.

 
Old September 23rd, 2003, 02:25 AM
Registered User
 
Join Date: Jul 2003
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

My classpath is:
%CATALINA_HOME%\common\lib\servlet.jar;%CATALINA_H OME%\common\lib\jsp-api.jar;

So I don't see what is wrong.

 
Old September 23rd, 2003, 07:42 AM
Authorized User
 
Join Date: Aug 2003
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default

You're right, it should work.

Try replacing the %CATALINA_HOME% settings with the proper drive/path just to be sure.






Similar Threads
Thread Thread Starter Forum Replies Last Post
Java Code - Wrox - Beginning JAVA - Ivor Horton ponguru Java Databases 3 May 18th, 2006 12:30 PM
Why java is a secure language? reza_ahmadi Java Espanol 0 April 26th, 2005 01:58 AM
Ch. 4 & Ch. 12 athena BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 0 July 23rd, 2004 10:54 AM
New to Java, problems compiling Kyle Colyer JSP Basics 3 September 6th, 2003 04:58 AM





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