File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

multiple struts-confing file

 
Jayesh Sisodiya
Greenhorn
Posts: 11
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI
i am useing multiple struts-config file.
one is default
second is module
how to call module config file ?
in module config file ..global-forward,action-mapping.

so how to call all this ?
 
Raghavan Muthu
Ranch Hand
Posts: 3381
Mac MySQL Database Tomcat Server
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You need to mention all the config files in the Config param of the <servlet> element where you define ActionServlet.

You have two different cases.

Case 1: You can have several configuration (struts-config.xml) files based on the modules for a single large application



You need to specify all your configuration files separated by comma while mentioning the complete relative path of the files.

Case 2: You can have a logical division of the application based on the different URLs being invoked .



HtH.
[ May 22, 2007: Message edited by: Raghavan Muthu ]
 
Jayesh Sisodiya
Greenhorn
Posts: 11
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi
that i do but my problem is how to use that child1 or child2 in jsp or servlet.

it mean i have one jsp file ok
------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.4" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<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/moduleA</param-name>
<param-value>/WEB-INF/myupload-config.xml</param-value>
</init-param>
<init-param>
<param-name>debug</param-name>
<param-value>3</param-value>
</init-param>
<init-param>
<param-name>detail</param-name>
<param-value>3</param-value>
</init-param>
<load-on-startup>0</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>
</web-app>
---------------------------

ok this is my web.xml file

<html:link forward="uploadFile">Upload File</html:link>
now i m using this link so how i know my reqesting passing where?
it mean in which confing file i m calling.
i want to call file moduleA. how i will call.?
 
Raghavan Muthu
Ranch Hand
Posts: 3381
Mac MySQL Database Tomcat Server
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think Struts should automatically find out in which config xml file the requested mapping is present.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic