Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Joined: Mar 10, 2006
Mar 23, 2006 21:47:00
Can anyone pls provide some help rgding SwitchAction? I am not becoming able to work it out.I 've defined two configuartion files , namely -
1. web.xml < Code fragment >
<set-property property = "logResults" value = "true" />
2. Now I ve defined struts-config-admin.xml as follows-
path = "/switch"
type= "org.apache.struts.actions.SwitchAction" />
path = "/admin/login"
name = "loginBean"
type = "com.action.admin.LoginAction"
<forward name = "success" path = "/jsp/switchAction.jsp" />
Now after creating this I am not getting the output.
Anirban, Jnior member<
Joined: Feb 15, 2005
Mar 24, 2006 10:15:00
First of all, the path to your second action in struts-config-admin.xml should be /login instead of /admin/login.
Secondly, According to
javadoc, when using this action you have to provide a page parameter and a prefix parameter. Are you doing this?
For example, if you're currently in the main module and you want to switch to the admin module login page, the url would be switch.do?prefix=/admin&page=/login.
Of course, if you're in the main module, you can also accomplish the same thing by calling admin/login.do
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link:
Combining two different struts modules of a big application
SwitchAction in struts?????
struts(jsp forward to Action?)
what is the significance of SwitchAction in struts framework
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015