• Post Reply Bookmark Topic Watch Topic
  • New Topic

Chain-config in core struts and Tiles in Struts 1.3  RSS feed

 
Mukesh moudgil
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Marshal
Posts: 5613
742
Chrome Eclipse IDE Google App Engine IntelliJ IDE jQuery Postgres Database Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Hi Exception", please check your private messages regarding an important administrative matter.
 
Chet Hawkins
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Whoops! For me nevermind. I discovered it also had to be after the servlet-class tag. Der!
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!