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
| 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 Search this Thread Display Modes
  #1 (permalink)  
Old September 22nd, 2003, 08:29 AM
Registered User
 
Join Date: Jul 2003
Location: , , .
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

Reply With Quote
  #2 (permalink)  
Old September 22nd, 2003, 09:33 AM
Authorized User
 
Join Date: Aug 2003
Location: , , .
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.

Reply With Quote
  #3 (permalink)  
Old September 23rd, 2003, 02:25 AM
Registered User
 
Join Date: Jul 2003
Location: , , .
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.

Reply With Quote
  #4 (permalink)  
Old September 23rd, 2003, 07:42 AM
Authorized User
 
Join Date: Aug 2003
Location: , , .
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.

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
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
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



All times are GMT -4. The time now is 06:48 AM.


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