A friendly place for programming greenhorns!
Big Moose Saloon
Search
|
Java FAQ
|
Recent Topics
Register / Login
JavaRanch
»
Java Forums
»
Certification
»
Web Component Certification (SCWCD/OCPJWCD)
Author
problem in struts example
Hemant Gupta
Greenhorn
Joined: Dec 07, 2006
Posts: 6
posted
Apr 24, 2007 23:11:00
0
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.
Christophe Verré
Sheriff
Joined: Nov 24, 2005
Posts: 14672
11
I like...
posted
Apr 24, 2007 23:43:00
0
done all the steps written in HFSJ book
HFSJ uses Struts ??
Anyway, did you put the necessary libraries in your WEB-INF/lib directory ?
[My Blog]
All roads lead to JavaRanch
Hemant Gupta
Greenhorn
Joined: Dec 07, 2006
Posts: 6
posted
Apr 25, 2007 02:16:00
0
i have put following three jars in WEB-INF/lib
commons-beanutils.jar
commons-digester.jar
struts.jar
Anything else needed ?
Marc Peabody
pie sneak
Sheriff
Joined: Feb 05, 2003
Posts: 4725
I like...
posted
Apr 25, 2007 08:23:00
0
Check your server console during its startup and you will likely see a more helpful error message.
A good workman is known by his tools.
Niranjan Deshpande
Ranch Hand
Joined: Oct 16, 2005
Posts: 1277
posted
Apr 25, 2007 08:39:00
0
Try adding struts.jar to your classpath...
SCJP 1.4 - 95%
[ My Story ]
- SCWCD 1.4 - 91%
[ My Story ]
Performance is a compulsion, not a option, if my existence is to be justified.
I agree. Here's the link:
http://ej-technologies/jprofiler
- if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
subject: problem in struts example
Similar Threads
HFSJ page 742
Trouble with Struts
first struts application error
Getting error while running BeerStruts example
404 - Servlet FrontController is not available
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter