This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes Struts and the fly likes SwtichAction and forwardPattern attribute Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Frameworks » Struts
Bookmark "SwtichAction and forwardPattern attribute" Watch "SwtichAction and forwardPattern attribute" New topic
Author

SwtichAction and forwardPattern attribute

Alec Lee
Ranch Hand

Joined: Jan 28, 2004
Posts: 569
I am trying to use Struts module and encounter some strange behaviour. I am using Struts v1.2.4. This is the first time I try using module and not sure if this is my error or bug related to Struts.

Since I am placing JSP under /WEB-INF, I also used this line in my module's struts-config.xml:

My understanding is this line supposing should affect ONLY how path= attribute of <forward> is resolved. However, it seems that it also affects SwitchAction's behaviour.


In my default struts-config.xml, I have this action:

In my struts-config-synToken.xml, I have this line:

But the browser displays this error when /sf.do is requested:

The above line means that SwitchAction trying to forward to /WEB-INF/synToken/synForm.do instead of /synToken/synForm.do (with the extra /WEB-INF, perhaps erroneously added)

I changed the above controller to

and SwitchAction is now able to forward to /synToken/synForm.do in the synToken module.

Are these normal behaviour of SwitchAction?
 
GeeCON Prague 2014
 
subject: SwtichAction and forwardPattern attribute