struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Manish-Hirapara <>
Subject RE: *.do ---- Proof of Concepts
Date Fri, 19 Apr 2002 18:55:18 GMT
Struts has a class org.apache.struts.actions.ForwardAction that will
probably fill your need.

In your web.xml, you can leave the default *.do configuration as is.
In your struts-config.xml, add the following action (in the actionmappings
section), and replace the 'parameter' with the jsp file you want to forward
to (and the /test with whatever you would like to call your action): 

    <action    path="/test"

Restart, and now if you issue a / you will be redirected to your jsp
page (through the controller). This way, you don't have to create an action
class, but you still can use the controller.

See the javadoc on the ForwardAction class for more.


-----Original Message-----
From: K J []
Sent: Friday, April 19, 2002 2:04 PM
To: Struts Users Mailing List
Subject: *.do ---- Proof of Concepts

Say I have a web application which contains 1 JSP and
I wanted to use Struts. I don't have any action
classes, but I want to use the controler servelt and
the taglib. Will the *.do work only when you have
action classes? What would this entry look like if I
only want the Controler servelt to forward to a
JSP(without any action classes)?

can you tell me what needs to go where(i.e. web.xml
vs. struts-config.xml). what should go in the global
forward path, and the servelet-mapping section?



Do You Yahoo!?
Yahoo! Tax Center - online filing with TurboTax

To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message