• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

HTTP Status 500 - Chapter 3 HFJS

 
Varalakshmi Ramanarayan
Ranch Hand
Posts: 108
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ranchers!!

I am trying to do the program explained in Chapter 3 of HFJS. However I am struck in deployment of version 2. I have created the directoty structure as explained in the book.I have created and compiled the BeerExpert.java file. For BeerSelect.java I have used the following commamd line and it compiles fine.

But when I try to deploy it in Tomcat it is giving me HTTP Status 500 error(The form.html page works fine, From that page if I click submit button I get this error). The error statement is as below.

On the 22nd line of my BeerSelect.java file is the line -- BeerExpert be = new BeerExpert();

Some one please help me with this!!
Thanks in advance.
[ March 06, 2008: Message edited by: Christophe Verre ]
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
BeerV1/src/com/example/model/BeerExpert

Shouldn't that be com/example/model/BeerExpert instead ? In what package is BeerExpert ? And check the import in BeerSelect.java.
 
Varalakshmi Ramanarayan
Ranch Hand
Posts: 108
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the help Christophe..
Shouldn't that be com/example/model/BeerExpert instead ?

I am sorry I did not get where should com/example/model/BeerExpert go..
Basically my servlet is not able to find the model(BeerExpert)in my application. I am not able to figure out why..
Here are the details you asked for.

path to BeerExpert.java is
C:\Varu\WEBJavaLearning\tomcat\webapps\Beer-V1\WEB-INF\classes\com\example\model\BeerExpert.java

path to BeerSelect.java is
C:\Varu\WEBJavaLearning\tomcat\webapps\Beer-V1\WEB-INF\classes\com\example\web\BeerSelect.java

Import statment in BeerSelect is import com.example.model.BeerExpert;
Package Statment of BeerExpert is package com.example.model;

Thanks again!!
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mmmh... everything looks fine. Are you sure you did not leave an old .class file in your classes directory ? Try to remove BeerSelect.class and BeerExpert.class, and recompile them.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic