File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes HTTP 404 Error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Reply locked New topic

HTTP 404 Error

Anirban Das
Ranch Hand

Joined: Nov 22, 2003
Posts: 63
Iam new to struts. Iam developing a web application using JDK 1.4.2, Tomcat 5.5.23 and Struts 1.3.8

When Iam requesting for my logon page(http://localhost:5523/smt/logon.jsp) on the browser I get "The page cannot be found" error (HTTP 404 File Not Found)

Can someone help me on this ?

My tomcat listens to port 5523 and Iam deployoing my war file inside "webapps" folder of tomcat.

My web.xml looks like this

<?xml version="1.0" encoding="ISO-8859-1"?>

"-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"


<!-- Standard Action Servlet Configuration -->

<!-- Standard Action Servlet Mapping -->

<!-- Adding TLD Files -->



<!-- The Usual Welcome File List -->


My Struts-Config file looks like this

<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE struts-config PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 1.3//EN"
<!-- ==================== Form Bean Definitions ======================= -->

<form-bean name="logonForm" type="com.spcs.smt.forms.LogonForm" />
<form-bean name="mainSearchForm" type="com.spcs.smt.forms.mainSearchForm" />

<!-- ==================== Global Exception Definitions ================= -->

<!-- ==================== Global Forward Definitions =================== -->

<!-- ==================== Action Mapping Definitions =================== -->

<action name="logonForm" type="com.spcs.smt.actions.TestAction" input="/logon.jsp" scope="request" path="/test">
<forward name="success" path="/" />
<forward name="failure" path="/error.jsp" />
<forward name="sessiontimeout" path="/" />
<forward name="roleNotFound" path="/roleNotFound.jsp" />

<action name="logonForm" type="com.spcs.smt.actions.LogonAction" input="/logon.jsp" scope="request" path="/logon">
<forward name="success" path="/" />
<forward name="failure" path="/error.jsp" />
<forward name="sessiontimeout" path="/" />
<forward name="roleNotFound" path="/roleNotFound.jsp" />

<action name="mainSearchForm" type="com.spcs.smt.actions.LogonAction2" validate="false" scope="session" path="/logon2">
<forward name="success" path="/mainSearch.jsp" />
<forward name="failure" path="/error.jsp" />
<forward name="sessiontimeout" path="/" />
<forward name="roleNotFound" path="/roleNotFound.jsp" />


<!-- ==================== Message Resources Definitions ================= -->

<message-resources parameter="com.spcs.smt.MessageResources" />

<!-- ======================== Plug Ins Configuration ==================== -->

<!-- ============================ Tiles plugin ======================== -->
This plugin initialize Tiles definition factory. This later can takes some
parameters explained here after. The plugin first read parameters from
web.xml, thenoverload them with parameters defined here. All parameters
are optional.
The plugin should be declared in each struts-config file.
- definitions-config: (optional)
Specify configuration file names. There can be several comma
separated file names (default: ?? )
- moduleAware: (optional - struts1.1)
Specify if the Tiles definition factory is module aware. If true
(default), there will be one factory for each Struts module.
If false, there will be one common factory for all module. In this
later case, it is still needed to declare one plugin per module.
The factory will be initialized with parameters found in the first
initialized plugin (generally the one associated with the default
true : One factory per module. (default)
false : one single shared factory for all modules
- definitions-parser-validate: (optional)
Specify if xml parser should validate the Tiles configuration file.
true : validate. DTD should be specified in file header (default)
false : no validation

Paths found in Tiles definitions are relative to the main context.

To use this plugin, download and add the Tiles jar to your WEB-INF/lib
directory then uncomment the plugin definition below.

<plug-in className="org.apache.struts.tiles.TilesPlugin" >

<set-property property="definitions-config"
value="/WEB-INF/tiles-defs.xml" />
<set-property property="moduleAware" value="true" />

<!-- ============================ Validator plugin ========================= -->

<plug-in className="org.apache.struts.validator.ValidatorPlugIn">


Thanks in advance for your time.

Rahul Bhattacharjee
Ranch Hand

Joined: Nov 29, 2005
Posts: 2308
You have already posted the question in XML forum.Why again ?

Please read this FAQ.

Rahul Bhattacharjee
LinkedIn - Blog
Ulf Dittmer

Joined: Mar 22, 2005
Posts: 42965
Although the post is in the right forum here, you have answers in your duplicate post already, so I'm closing this one.
I agree. Here's the link:
subject: HTTP 404 Error
It's not a secret anymore!