• 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
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

problem in struts example

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am getting follwing error when i try to launch the example.

type Status report

message Servlet FrontController is not available

description The requested resource (Servlet FrontController is not available) is not available.

I am using tomcat 5.5.20 and struts version 1.1 and done all the steps written in HFSJ book.

struts-config.xml is here

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

<struts-config>

<form-beans>
<form-bean name="selectBeerForm"
type="com.example.web.BeerSelectForm" />
</form-beans>

<action-mappings>
<action path="/SelectBeer"
type="com.example.web.BeerSelectAction"
name="selectBeerForm" scope="request"
validate="true" input="/select/form.jsp">
<forward name="show_results"
path="/result.jsp" />
</action>
</action-mappings>

<message-resources parameter="ApplicationResources" null="false" />

</struts-config>


web.xml is here

<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
version="2.4">

<!-- Define the controller servlet -->
<servlet>
<servlet-name>FrontController</servlet-name>
<servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
<!-- Name the struts configuration file -->
<init-param>
<param-name>config</param-name>
<param-value>/WEB-INF/struts-config.xml</param-value>
</init-param>

<!-- Guarantee that this servlet is loaded on startup. -->
<load-on-startup>1</load-on-startup>
</servlet>
<!-- END: Define the null servlet -->

<!-- The Struts controller mapping -->
<servlet-mapping>
<servlet-name>FrontController</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>
<!-- END: The Struts controller mapping -->

</web-app>

help me.
 
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

done all the steps written in HFSJ book


HFSJ uses Struts ??

Anyway, did you put the necessary libraries in your WEB-INF/lib directory ?
 
Hemant Gupta
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i have put following three jars in WEB-INF/lib

commons-beanutils.jar
commons-digester.jar
struts.jar

Anything else needed ?
 
pie sneak
Posts: 4727
Mac VI Editor Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Check your server console during its startup and you will likely see a more helpful error message.
 
Ranch Hand
Posts: 1277
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Try adding struts.jar to your classpath...
 
please buy this thing and then I get a fat cut of the action:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic