I have action mapping in the struts-config.xml like this:
The .frame.Content is defined in the tiles-def.xml to display a drop-down menu based on the data obtained from the action servlet SelectPage.java.
This drop-down menu is included in the 'editTitleForm'. The Submit button of the form has the following action mapping:
If there is no validation errors, successful execution of the UpdateTitle.java will lead to a web page ( with a statement saying that the title of the page has been updated), which is the ".title.Confirmation" in the tiles-def.xml. If there are validation errors, I want to go back to the first action mapping (note that in the second action mapping, I have input="/ContentMgmt").
I intentionally made validation mistakes for testing purpose and click on the Submit button of the form. I got Internet Explorer HTTP 404 - file not found:
The page you are looking for might have been removed, had its name changed, or is temporarily unavailable.
Please try the following:
If you typed the page address in the Address bar, make sure that it is spelled correctly.
Open the localhost:8080 home page, and then look for links to the information you want. Click the Back button to try another link. Click Search to look for information on the Internet.
We normally return to the same JSP we were coming from rather than going back through an action with the input= tag. However, when we do go back through an action we use the full url syntax input="/yourAction.do"
Joined: Nov 19, 2000
The reason that validation errors return the control to the original action input="/ContentMgmt" instead a .jsp is because a Collection of JavaBeans are retrieved from the database to generate a drop-down menu (the first action mapping).
If the second action mapping returns the control to a .jsp, it leads to "bean (the Collection object) not found" error.
I have tried input="/ContentMgmt.do". I got the same HTTP 404 file not found error.
Joined: Dec 19, 2002
I noticed your action that accepts the posted data has "content/" specified in it. Are you using Struts modules? If so you'll need go through a Switch action to change modules. If you are using modules see org.apache.struts.actions.SwitchAction.