how can you switch onemodule to another module by switch
action class plz explain with exapmle?
Answer / m.gangadhar
hi,
let us a senario in our example we have two modules called
1.Module1
2.Module2
we have one main.jsp which is there in default module
main.jsp
--------
<html:form action="switch"?
prefix="/Module1"&page="/mod1.jsp"/>
<html:form action="switch"?
prefix="/Module2"&page="/mod2.jsp"/>
</html:form>
we have to take the struts-config.xml(default config file)
<action
type="org.apache.struts.actions.SwitchAction"
name=""
</action>
and dont forget to configure module specific configure
files in web.xml(mandatory)
<web-app>
<servlet>
<servlet-name>action</servlet-name>
<servlet-
class>org.apache.struts.action.ActionServlet</servlet-class>
<init-param>
<param-name>config</param-name>
<param-value>/WEB-INF/struts-config.xml</param-value>
</init-param>
<init-param>
<param-name>config/Module1</param-name>
<param-value>/WEB-INF/struts-module1-config.xml</param-
value>
</init-param>
<init-param>
<param-name>config/Module2</param-name>
<param-value>/WEB-INF/struts-module2-config.xml</param-
value>
</init-param>
</servlet>
...
...
</web-app>
and many more but these things r very inportant and other
is asusual normal struts program.
if ur not clarified plz mail to ur problem my email id
metari.gangadhar@gmail.com
bye
| Is This Answer Correct ? | 31 Yes | 10 No |
What are the steps involved in creating a strut application?
how can i fetch combo box value into my DAO using struts 2?
Difference between struts and spring? Or why use spring, if you are already using struts?
What is Portlet???? when,where and why we use it ??
3 Answers Infotech, Rebaca, Wipro,
In strurt why w use two differnt files web.xml and strut config.xml?
What is Request Dispatcher and What is reuest Processor??
Is struts 1 still supported?
drawback of Validation Framework where and how to write the connection pool object in the programe how to debug the programe and application in struts without using eclips
in struts without integrate hibernate how to use directly explain?
What is spring and struts in java?
can we change the location of struts-config.xml file?
What is MVC?