wood burning stoves 2.0*
The moose likes Struts and the fly likes getting 404 error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "getting 404 error" Watch "getting 404 error" New topic
Author

getting 404 error

john mattucci
Ranch Hand

Joined: Nov 03, 2000
Posts: 331
Recently I switched an app to a new web server. However I'm now having problems with struts though, something which worked before.

In index.jsp I have the following

<logic:forward name="index" />

and in my struts-config.xml I have the following

<global-forwards>
<forward name="index" path="/logon.do"/>
</global-forwards>

<action forward="/logon.jsp" name="HtmlFileForm" path="/logon" scope="session" type="org.apache.struts.actions.ForwardAction"/>

This works fine when I enter index.jsp the page is redirected to logon.jsp

logon.jsp contains

<html:form action="/logonSubmit" focus="username">

and in my struts-config.xml I have the following

<action input="logon.do" name="HtmlFileForm" path="/logonSubmit" scope="session" type="LogonAction" validate="true">
<forward name="success" path="/select.do"/>
<forward name="failure" path="/logon.do"/>
</action>

This is where I get the error The requested URL /logonSubmit.do was not found on this server. It worked before. What might be going wrong now?
Damanjit Kaur
Ranch Hand

Joined: Oct 18, 2004
Posts: 346
Hi,

logon.jsp contains

<html:form action="/logonSubmit" focus="username">

and in my struts-config.xml I have the following

<action input="logon.do" name="HtmlFileForm" path="/logonSubmit" scope="session" type="LogonAction"


type="LogonAction" needs to be fully qualified name.
john mattucci
Ranch Hand

Joined: Nov 03, 2000
Posts: 331
I changed to be fully qualified name to shorten my post it is x.y.z.LogonAction. I solved the problem. It was a problem with the provider. They have fixed everything. It now works.
 
jQuery in Action, 2nd edition
 
subject: getting 404 error