• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

HTTP Status 500 - Chapter 3 HFJS

 
Ranch Hand
Posts: 108
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
You’ll find me in my office. I’ll probably be drinking. And reading this tiny ad.
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic