-
Aug 20th, 2011, 07:58 AM
#1
Application context loaded twice.
Hello ,
I have same problem. Application context loaded twice. that why thread object intialized twice. and Thread run twice. How to stop loading application context twice.
Thanks in advance
please reply as early as possible.
-
Aug 22nd, 2011, 05:37 AM
#2
Don't load it twice... Post your configuration (including web.xml) and/or code that is loading your context(s)... When doing so use [ code][/code ] tags...
-
Aug 22nd, 2011, 11:39 PM
#3
This is my Web.xml file.
<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/applicationContext.xml</param-value>
</context-param>
<!-- log4j configuration-->
<context-param>
<param-name>log4jConfigLocation</param-name>
<param-value>/WEB-INF/log4j.xml</param-value>
</context-param>
<context-param>
<param-name>log4jExposeWebAppRoot</param-name>
<param-value>false</param-value>
</context-param>
<listener>
<listener-class>org.springframework.web.util.Log4jConfigList ener</listener-class>
</listener>
<!-- log4j configuration-->
<context-param>
<param-name>productImagesLocation</param-name>
<param-value>/merchantres/images/seller</param-value>
</context-param>
<listener>
<listener-class>org.springframework.web.context.ContextLoade rListener</listener-class>
</listener>
<servlet>
<servlet-name>dispatcher</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherSe rvlet</servlet-class>
<load-on-startup>2</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>dispatcher</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>
<session-config>
<session-timeout>
30
</session-timeout>
</session-config>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
<welcome-file>index.html</welcome-file>
</welcome-file-list>
</web-app>
Thanks in advance.
-
Aug 23rd, 2011, 01:21 PM
#4
Please use [ code][/code ] tags, that leave the xml readable.. Can you include the content of the different configuration files (you can attach them to a post).
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules