• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Does anyone practice the strut example in HFSJ

 
Anna Wang
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello, everyone:

I am trying to deploy and run the strut example in last chapter of HFSJ. I did everything the book said.
1)write form.jsp and result.jsp
2)put three class files(BeerSelectAction.class, BeerSelectForm.class, BeerExpert.class) in right place
3)put three jar files in WEB-INF/lib/
4)put web.xml, struts-config.xml in right place

When I run , I got error:

message: Servlet FrontController is not available

I checked web.xml, did not find anything wrong. Can anybody explain a little bit about it? Thank you so very much.

Anna
 
Niranjan Deshpande
Ranch Hand
Posts: 1277
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hmmmm anna

i think i got your problem. The problem is that the container is unable to find you Front Contoller class. first check the mapping of your servlet.

Also,You may have not configured the struts.jar in your class path
add this to your class path -

D:\struts-1.2.9-bin\lib\struts.jar

Note - the actual path to your .jar file depends on the physical location
on the hard drive, where you have struts installed.
if you want a running version of the app, my mail id is
niranjan8712@gmail.com

i believe ther eis omething worng with your web.xml
also your struts-config.xml must have this definition

<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE struts-config PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 1.2//EN"
"http://jakarta.apache.org/struts/dtds/struts-config_1_2.dtd">

if youe are using struts1.2

check whehet you are getting any XML parse errors on the console ?

hth
let me know if there are any problems
 
Anna Wang
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, Niranjan ,
Thank you very much for your help. I checked all the things you mentioned. Unfortunatly my struts still can not work.

I will send you an email to discuss this.

Thanks

Anna
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic