Struts Action Flow

D

Dom

Hi,

I'm having difficulty in getting my struts application to 'execute'
the execute method from the action class when the first page is
displayed.

If I forward to the .jsp instead of .do for the first page then I get
no errors. If I forward to the .do for the first page then I get a
"HTTP Status 400 - Invalid path /Step1 was requested" error.

I want the first page to execute the execute method so I can
initialise variables on the form with values from a database before
the page is displayed. I tried forwarding from index.jsp but I still
get the same error. Some relevant code is below.


web.xml
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>

index.jsp
<logic:redirect forward="step1"/>

struts-config:
<global-forwards>
<forward name="step1" path="/Step1.jsp" />
</global-forwards>


I can't seem to find an answer in the mail archive so I guess I must
be doing something thats fundamentally wrong. Any help would be
greatly appreciated!!

Cheers,
Dom
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,902
Latest member
Elena68X5

Latest Threads

Top