| Author |
web.xml file deployed in tomcat not loading/reading
|
Sujithkumar mp
Greenhorn
Joined: Sep 23, 2011
Posts: 4
|
|
Hi,
I have deployed a wep application war in hosted server. But when I hit the domain url the welcome file specified in web.xml is not getting loaded.
When I hit the complete url I am getting the page but css files in the page are not getting loaded.
The same war when deployed in my local server working fine. I am using tomcat 5.5. Anyone can help on this? Thanks in advance
Please find my web.xml file
<?xml version="1.0" encoding="UTF-8"?>
<web-app id="WebApp_ID" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<display-name>
Fig</display-name>
<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>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>home.jsp</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
</web-app>
|
 |
Sujithkumar mp
Greenhorn
Joined: Sep 23, 2011
Posts: 4
|
|
Hi
can anyone help/suggest on this...?
Thanks
|
 |
William Brogden
Author and all-around good cowpoke
Rancher
Joined: Mar 22, 2000
Posts: 12268
|
|
Getting the HTML but not the CSS suggests the specification of the CSS location is incorrect.
Working locally but not remotely suggests you used a CSS path based on the real file location, not the web app relative location.
Bill
|
Java Resources at www.wbrogden.com
|
 |
Sujithkumar mp
Greenhorn
Joined: Sep 23, 2011
Posts: 4
|
|
Thank you Bill for the suggestion.
But can you please tell why the welcome file specified in web xml is not getting loaded.
Thanks
|
 |
William Brogden
Author and all-around good cowpoke
Rancher
Joined: Mar 22, 2000
Posts: 12268
|
|
What actually happens when you address the web app without specifying the page? Do you get an error report?
If you can get the HTML by directly specifying the page, that suggests that Tomcat recognizes the web app path which implies that the web.xml is being read.
|
 |
Sujithkumar mp
Greenhorn
Joined: Sep 23, 2011
Posts: 4
|
|
Hi,
I am getting the below error when requested url without specifying page.
"The requested url was not found on this server.
Additionally, a 404 not found error was encountered".
Thanks
|
 |
 |
|
|
subject: web.xml file deployed in tomcat not loading/reading
|
|
|