| Author |
Chain-config in core struts and Tiles in Struts 1.3
|
Mukesh moudgil
Greenhorn
Joined: Jun 02, 2010
Posts: 1
|
|
Hello Smart people,
I just enrolled to this site and as a newbie..i have one doubt....
I was reading the Struts framework 1.3.x version and i got confused when i got to know that there are two chain-config.xml files.
a) One file is under struts-core-1.3.5.jar
b) Second is under struts-tiles.1.3.x.jar
Incase i want to change the default flow, i will change chain-config.xml file from struts-core and configure it in the web.xml for ActionServlet with chainCongfig parameter as:
<init-param>
<param-name>chainConfig</param-name>
<param-value>/WEB-INF/chain-config.xml</param-value>
</init-param>
I read that, incase you are using tiles....you need to configure chain-config.xml file from tiles jar in the web.xml with the same parameter "chainConfig" as
<init-param>
<param-name>chainConfig</param-name>
<param-value>org/apache/struts/tiles/chain-config.xml</param-value>
</init-param>
Hence i want to know which file will be configured if i am customizing my application as well as using the tiles.
|
 |
Devaka Cooray
Saloon Keeper
Joined: Jul 29, 2008
Posts: 2729
|
|
|
"Hi Exception", please check your private messages regarding an important administrative matter.
|
Author of ExamLab (Download) - the free mock exam kit for SCJP / OCPJP
HELP me! -- Home Page -- Twitter Profile -- JavaRanch FAQ -- How to Ask a Question
|
 |
Chet Hawkins
Greenhorn
Joined: Jun 15, 2011
Posts: 20
|
|
Can anyone answer this? I have a similar scenario with struts 1.3.10 .
When I add this code:
<init-param>
<param-name>chainConfig</param-name>
<param-value>org/apache/struts/tiles/chain-config.xml</param-value>
</init-param>
to my file:
web.xml
between the:
<servlet>
tags I get this error messge:
cvc-complex-type.2.4.a: Invalid content was found starting with element 'init-param'. One of '{"http://java.sun.com/xml/ns/j2ee":description, "http://java.sun.com/xml/ns/j2ee":display-name, "http://java.sun.com/xml/ns/j2ee":icon, "http://java.sun.com/xml/ns/j2ee":servlet-name}' is expected.
can someone demystify that for me? I am following a tutorial that asked me to do everything just like I did it. So maybe something has changed in working versions of struts since then.
|
 |
Chet Hawkins
Greenhorn
Joined: Jun 15, 2011
Posts: 20
|
|
|
Whoops! For me nevermind. I discovered it also had to be after the servlet-class tag. Der!
|
 |
 |
|
|
subject: Chain-config in core struts and Tiles in Struts 1.3
|
|
|