Wrox Programmer Forums
|
All Other Wrox Books Do you have a question about a Wrox book that isn't listed anywhere on p2p.wrox.com or where the forum is locked? Here's a forum to post questions about any other Wrox book so that other readers or one of the authors can help you with your questions. IF YOU ARE LOOKING FOR CODE DO NOT ASK "Where can I find the code for this book?" That question is answered here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the All Other Wrox Books 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
  #1 (permalink)  
Old June 9th, 2003, 05:36 AM
Registered User
 
Join Date: Jun 2003
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Beginning J2EE 1.4

I'm interested in IBM's WebSphere App Server but need to check out what J2EE actually means, and so I bought this book.
I'm hoping that someone else has got this book, ir that the authors can help out. Basically, I'm stuck on Chapter 3 where a JSP is being built. One of the Java source files is called FaqCategories.java. This was created. Then using the 'deploytool' to create a WAR file you're asked to add various files one of which is FaqCategories.class. The problem is that this file does not exist and nowhere does it mention you should compile the java. Anyway, after the deploy and trying to run it, it failed.
So, I manually compiled it and added it to the WAR file. After another deploy, it now states it can't find the package called 'Ch03'. This package happens to be the first lihe of the above java code. here is the error:

org.apache.jasper.JasperException: Unable to compile class for JSP

An error occurred at line: -1 in the jsp file: null

Generated servlet error:
    [javac] Compiling 1 source file
C:\j2sdkee1.4\web\repository\Standard-Engine\localhost\Ch03\welcome_jsp.java:8: package Ch03 does not exist
import Ch03.FaqCategories;
            ^
:(

Any ideas?
  #2 (permalink)  
Old September 19th, 2003, 04:43 PM
Registered User
 
Join Date: Sep 2003
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to brainstorm79
Default

been looking through all the fourms, and it seems Wrox was liquidated. isnt much chance of support except maybe from the books writers, or maybe A Press who aquired some of the books! http://www.apress.com. There is a FAQ from Kevin Mukhar athttp://home.earthlink.net/~kmukhar/books/BeginningJ2EE/index.html


Then using the 'deploytool' to create a WAR file you're asked to add various files one of which is FaqCategories.class. The problem is that this file does not exist and nowhere does it mention you should compile the java. Anyway, after the deploy and trying to run it, it failed.

I dont really understand the whole deploytool thing but thats another thread eh! :-)


So finally to answer your question(if i read it right!) i figured(when i hit the problem!) that its got to do with the way you compile FaqCategories.java. As the error shows its looking for the FaqCategories class in the Ch03 package, but doing a normal javac on the java file wont put it in to a package, the 1st line of the java file says its part of the Ch03 package.. On page 71 of the book its got the directory structure of the application, put your FaqCategories.java file into the 'classes' directory and then compile the file with : javac -d . FaqCategories.java

Doing this will create a directory Ch03 in the classes dir & Ch03 contains the FaqCategories class file.took me ages to figure this one out so im glad to see im not alone :-)

Got probs of my own with the javabean/session example (my categories dont show up after i've submitted my registration and when i go back to welcome.jsp after registering i get the "your not registered" part of the page. think its got to do with IE6 caching the page (initially) cos when i hit refresh the page loads as it should. any ideas?????????)

Also cant get the new pages you create for the Exception handling example to load. Think theres a typo on page 108, theres a "href" to welcome.jsp, think it should be "../welcome.jsp"

would be great if you (or anyone else) can help out.. users supporting users!





Similar Threads
Thread Thread Starter Forum Replies Last Post
Beginning J2EE chling J2EE 1 August 9th, 2005 06:24 AM
No Beginning J2EE forum? unplug J2EE 2 December 31st, 2003 05:51 AM
Code for Beginning J2EE 1.4 rosertg Wrox Book Feedback 2 September 12th, 2003 07:05 AM
beginning j2ee 1.4 - prob with cloudscape rerol All Other Wrox Books 6 September 6th, 2003 01:28 PM
Beginning J2EE 1.4 - EJB Fundamentals bbuckholz All Other Wrox Books 0 July 3rd, 2003 10:40 PM





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