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

July 17th, 2003, 03:05 PM
|
|
Authorized User
|
|
Join Date: Jul 2003
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
classpath problem
hi to all, i have started with "beginning JSP web development" and got stuck on chapter 7 about classes. when i try to compile a code i get "cannot resolve symbol"
i followed the instruction on the book on how to install java & tomcat. I also followed the instruction on how to set the environmental variable including the CLASSPATH. I'm using windows 2000 NT. I currently have the classpath set as (under system variable):
CLASSPATH c:\jakarta-tomcat-4.0\common\lib\servlet.jar;.
I have the files: Book.java, Book.class, TechnicalBook.java & ChildrenBook.java under the following directory:
c:\jakarta-tomcat-4.0\webapps\begjsp-ch07\WEB- INF\classes\com\wrox\library
I'm trying to compile TechicalBook and ChildrenBook and in the code it extends Book. Any help will be appreciated. Thanks.
|
|

July 18th, 2003, 11:09 AM
|
|
Authorized User
|
|
Join Date: Jun 2003
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Hi amcp2002,
Have you had any luck with this? I am having the same problem!
|
|

July 19th, 2003, 12:41 AM
|
|
Authorized User
|
|
Join Date: May 2003
Posts: 50
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Hi
I suggest u kindly provide the details of error you r getting after that only i will be able to help u out.
Regards
Yashraj Chauhan
Java\J2EE Specialist
Wiley Support Team
|
|

July 21st, 2003, 06:58 AM
|
|
Authorized User
|
|
Join Date: Jun 2003
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Quote:
quote:Originally posted by Yashraj Chauhan
Hi
I suggest u kindly provide the details of error you r getting after that only i will be able to help u out.
|
Thanks Yashraj. Here are the details:
When I try to compile the ChildrenBook.java file
Quote:
|
quote: . . . \objects\WEB-INF\classes>javac booklibrary\ChildrenBook.java
|
I get the following error:
Quote:
|
quote: booklibrary\ChildrenBook.java:28: cannot resolve symbol
|
Quote:
symbol : constructor Book (java.lang.String)
location: class booklibrary.Book
super(title);
^
1 error
|
* I have compiled the Book.java class successfully.
|
|

July 21st, 2003, 03:04 PM
|
|
Authorized User
|
|
Join Date: Jul 2003
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
That's the same exact mesage I was getting. The cursor or error is pointing on the second "B" of
"public class TechnicalBook extends Book {" of the TechnicalBook.java & ChildrenBook.java
|
|

July 23rd, 2003, 01:11 PM
|
|
Authorized User
|
|
Join Date: Jul 2003
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
hi,
i finally get it to work after researching on the internet. I had to do the following on the c: prompt.
cd jakarta-tomcat-4.0\webapps\begjsp-ch07\WEB-INF\classes <enter>
and then
javac com\wrox\library\TechnicalBook.java <enter>
&
javac com\wrox\library\ChildrenBook.java <enter>
I realized that this is what was exactly on the book.
|
|

July 24th, 2003, 02:29 AM
|
|
Authorized User
|
|
Join Date: Jun 2003
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
This is what I have been doing all along - and I still get the same error message.
|
|

July 24th, 2003, 07:27 AM
|
|
Authorized User
|
|
Join Date: Jul 2003
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
pedersen, tell me where your files are located (Book.java, Book.class, TechnicalBook.java, ChildrenBook.java, bookPage1.jsp).
Type the codes too.
Also, what do you have on the CLASSPATH variable?
|
|

July 24th, 2003, 09:31 AM
|
|
Authorized User
|
|
Join Date: Jun 2003
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
acmp,
all java files are in c:\Program files\Apache Software Foundation\Tomcat 5.0\webapps\objects\WEB-INF\classes\booklibrary (haven't got to the jsp page yet).
CLASSPATH variable is .;C:\Program Files\SQLLIB\java\db2java.zip;C:\Program Files\SQLLIB\java\runtime.zip;C:\Program Files\SQLLIB\java\sqlj.zip;C:\Program Files\SQLLIB\bin;%CATALINA_HOME%\common\lib\servle t-api.jar; - is this relevant? as the book said nothing about setting the java tools in the class path, only in the PATH?
Cheers,
Ped
|
|

July 25th, 2003, 02:21 AM
|
|
Authorized User
|
|
Join Date: May 2003
Posts: 50
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Hi
To compile ChildrenBook.java and TechnicalBook.java you have to set the following classpath.
javac -classpath "c:\jakarta-tomcat-4.0\webapps\begjsp-ch07\WEB-INF\classes" ChildrenBook.java
same for the TechnicalBook.java
Hope this helps
Yashraj Chauhan
Java\J2EE Specialist
Wiley Support Team
|
|
 |