Problems with url-mapping in Apache-Tomcat-Struts2 environment
Hello guys!I got a problem with a java-struts2-webapp with the url-mapping at a webhotel that uses Apache and Tomcat.
The idea is that the app is supposed to be deployed as the default app "ROOT".
According to the webhotel doc they say that the app should be deployed exploded direct in a folder called public_html.
I have uploaded the app like that, that of course works like a charm in my develop-environment.
According to documenetation I have added a mapping /* that should forward all request to the Tomact.
I just keep getting this error when I click a link from my index.jsp:
HTTP Status 404 - result 'null' not found
type Status report
message result 'null' not found
description The requested resource (result 'null' not found) is not available.
Unfortenately the support-guys at the webhotel says that they do not have the knowledge of Tomcat to help me.
Given that I have tried to set up the same environment at home.
In my Apache httpd.con I have set this (that I guess is the same mapping that I have done at the webhotel)
JkMount /* worker1
In my web.xml
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
At the webhotel I have edit the context.xml.default to:
<?xml version="1.0" encoding="ISO-8859-1"?>
<Context path="" />
I have also added a context.xml like (that should overide the context.xml.default):
<?xml version="1.0" encoding="ISO-8859-1"?>
<Context path="" override="true" />
In my struts.xml i got this:
<package name="basicstruts2" namespace="/" extends="struts-default">
<action name="login">
<result>/login.jsp</result>
</action>
<action name="welcome" class="se.myapp.WelcomeUserAction">
<result name="SUCCESS">/welcome.jsp</result>
</action>
</package>
And my index.jsp looks like below, and that renders out fine but when I click the link I get the error above:
<%@page import="se.myapp.WelcomeUserAction"%>
<%@ page contentType="text/html; charset=UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<html>
<head></head>
<body bgcolor="#FF9900">
<h1>Site is under construction</h1>
<a href="login.action" >Log in</a>
<br>
<%=new java.util.Date().toString()%>
<br>
<%=WelcomeUserAction.getDate()%>
</body>
</html>
The strange thing is that this config works fine in the dev-env, but at the webhotel I get the error.
To me it sounds like a config-misstake but I can not figure it out.
Do you see any thing that I have missed or if you got any ideas please let me know.
Best regards
Fredrik