Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Here is the code of the HTMLBank.java servlet file: Now, I might mention that I did succeed in launching a servlet once before, but that was only if I used a package, say com.example and mapped it in the web.xml file, but as stated before, this deviates from the textbook and I need to get it to work using the default package and ROOT directory. After doing this, the following error results:ĭescription The requested resource (/servlet/HTMLBank) is not available. Yes, the textbook uses the default package for this and the ROOT directory of Tomcat.Ģ) Run the Tomcat service - it is running (shown as a green "play" arrow in right-bottom of the screen).ģ) In the browser, type URL: and enter it. class file into C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\ROOT\WEB-INF\classes folder.
Now, according to the textbook:ġ) Place the.
I have a Java servlet, called HTMLBank.java which I successfully compiled with no compilation errors. I seek help with doing it in THIS method. I am aware of the advice given here to other people with this/similar problems, that servlets should preferably be written under a package, and not packageless, but I am following the textbook's guidance with this, and of course being a textbook, its method must work. Java Programming: Comprehensive Concepts and Techniques, Shelly Cashman Series, ISBN: 9781418859855. I am trying to launch a simple Java servlet in the browser, following instructions from the textbook: Unfortunately, having tried all this advice I still cannot resolve this problem. I am well aware there have been many, many related questions asked already about this, as well as even more answers. Also, when you are doing your ANT builds - ypou might want to add the VERBOSE flag to the commands, as in "ant -f jboss-build.xml -v compile" - You may see some more errors or clues as to where the ball is getting dropped.Hey, everyone! I truly hope you can help. Search the Archives here for more specific info on which package to get - I apologize but I didn't save the kind at the time.
It took me ALL DAY to finally get the mix corrrect - now it works perfectly. You want to hunt down the package on the Sun site named 'j2ee-1_4-doc-tutorial_2.zip' (from June 2004) as the base materials into which you add the JBoss materials. Look at your terminal when you deploy - you should see entries that look like this: (Notice they are all INFO messages - no warnings or errors) 00:34:07,468 INFO Init J2EE application: file:/Developer/JBOSS/server/default/deploy/JBossDukesBank.ear 00:34:08,038 INFO Deploying CustomerBean 00:34:08,291 INFO Deploying AccountBean 00:34:08,315 INFO Deploying TxBean 00:34:08,333 INFO Deploying AccountControllerBean 00:34:08,400 INFO Deploying CustomerControllerBean 00:34:08,421 INFO Deploying TxControllerBean 00:34:08,812 INFO Client ENC bound under: bank-client 00:34:08,866 INFO Bound EJB LocalHome 'CustomerBean' to jndi 00:34:08,900 INFO Bound EJB LocalHome 'AccountBean' to jndi 00:34:08,922 INFO Bound EJB LocalHome 'TxBean' to jndi 00:34:08,959 INFO Bound EJB Home 'AccountControllerBean' to jndi 'MyAccountController' 00:34:08,983 INFO Bound EJB Home 'CustomerControllerBean' to jndi 'M圜ustomerController' 00:34:09,008 INFO Bound EJB Home 'TxControllerBean' to jndi 'MyTxController' 00:34:09,011 INFO Deployed: file:/Developer/JBOSS/server/default/tmp/deploy/tmp23042JBossDukesBank.ear-contents/bank-ejb.jar 00:34:09,149 INFO deploy, ctxPath=/bank, warUrl=./tmp/deploy/tmp23042JBossDukesBank.ear-contents/web-client-exp.war/ 00:34:09,426 INFO Started J2EE application: file:/Developer/JBOSS/server/default/deploy/JBossDukesBank.ear As has been mentioned in several other postings to these forums - there is INCORRECT CODE in that latest version of the DUKE'S BANK, etc J2EE Tutorial Demos from Sun. JBOSS/server/default/work/jboss.web/localhost/bank/org/apache/jsp/logon_jsp.class If that file ( and logon_jsp.java ) are not there - then your app did not get built with all the needed pieces and cannot be successfully deployed. You can see if your J2EE app got deployed when accessing that URL by looking for a file at.