Hello Tomcat-experts!
I have recently bought some space at a webhotel that uses Apache HTTP server as 
front before a Tomcat 6.0.37.My account at the webhotel is said to support 
Struts and Hibernate and such technics.At home I have developed a app that uses 
those technics and of course it runs fine in a similar environment as the one 
at the webhotel. I can deploy my app as a ROOT-app or a ordinary app and the 
Struts works perfectly.
At the webhotel I have tried to deploy it booth as a ROOT-app and as a 
MYAPP-webapp-1.0.0.war-file
Now I have stripped the app down to just a struts2-hello-world-app.
But at the webhotel I just keep getting this when I try to access the 
ActionClass through struts.xml:
HTTP Status 404 - There is no Action mapped for namespace [/] and action name 
[welcome] associated with context path [/MYAPP-webapp-1.0.0].type Status 
reportmessage There is no Action mapped for namespace [/] and action name 
[welcome] associated with context path [/MYAPP-webapp-1.0.0].description The 
requested resource is not available.
Unfortenatly the support guys at the webhotel says they lack knowledge of 
Tomcat so they can not help me out.But today I at least found this exception in 
the catalina.log just after my attempt yo access a struts-path:
/-- Encapsulated exception ------------\ java.lang.NullPointerException: 
permission can't be null at 
java.security.AccessController.checkPermission(Unknown Source) at 
java.lang.SecurityManager.checkPermission(Unknown Source) at 
ognl.OgnlRuntime.invokeMethod(OgnlRuntime.java:834) at 
ognl.OgnlRuntime.callAppropriateMethod(OgnlRuntime.java:1280) at 
ognl.OgnlRuntime.setMethodValue(OgnlRuntime.java:1481) at 
ognl.ObjectPropertyAccessor.setPossibleProperty(ObjectPropertyAccessor.java:85) 
at ognl.ObjectPropertyAccessor.setProperty(ObjectPropertyAccessor.java:162) at 
com.opensymphony.xwork2.ognl.accessor.ObjectAccessor.setProperty(ObjectAccessor.java:27)
 at ognl.OgnlRuntime.setProperty(OgnlRuntime.java:2318) at 
com.opensymphony.xwork2.ognl.accessor.CompoundRootAccessor.setProperty(CompoundRootAccessor.java:77)
 at ognl.OgnlRuntime.setProperty(OgnlRuntime.java:2318) at 
ognl.ASTProperty.setValueBody(ASTProperty.java:127) at 
ognl.SimpleNode.evaluateSetValueBody(SimpleNode.java:220) at 
ognl.SimpleNode.setValue(SimpleNode.java:301) at 
ognl.Ognl.setValue(Ognl.java:737) at 
com.opensymphony.xwork2.ognl.OgnlUtil.setValue(OgnlUtil.java:217) at 
com.opensymphony.xwork2.ognl.OgnlValueStack.trySetValue(OgnlValueStack.java:186)
 at 
com.opensymphony.xwork2.ognl.OgnlValueStack.setValue(OgnlValueStack.java:173) 
at 
com.opensymphony.xwork2.ognl.OgnlValueStack.setParameter(OgnlValueStack.java:151)
 at 
com.opensymphony.xwork2.interceptor.ParametersInterceptor.setParameters(ParametersInterceptor.java:292)
 at 
com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:203)
 at 
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
 at 
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
 at 
com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:211)
 at 
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
 at 
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
 at 
com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:190)
 at 
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
 at 
org.apache.struts2.interceptor.MultiselectInterceptor.intercept(MultiselectInterceptor.java:75)
 at 
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
 at 
org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:90)
 at 
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
 at 
org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:243)
 at 
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
 at 
com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:100)
 at 
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
 at 
com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:141)
 at 
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
 at 
com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:145)
 at 
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
 at 
com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:171)
 at 
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
 at 
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
 at 
com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:176)
 at 
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
 at 
org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:164)
 at 
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
 at 
com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:192)
 at 
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
 at 
com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:187)
 at 
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
 at 
org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:54) at 
org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:510) at 
org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77)
 at 
org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:91)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at 
sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at 
java.lang.reflect.Method.invoke(Unknown Source) at 
org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:270) at 
org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:269) at 
java.security.AccessController.doPrivileged(Native Method) at 
javax.security.auth.Subject.doAsPrivileged(Unknown Source) at 
org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:302) at 
org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:243) 
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)
 at 
org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:56)
 at 
org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:189)
 at java.security.AccessController.doPrivileged(Native Method) at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:185)
 at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
 at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
 at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) 
at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) 
at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
 at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298) 
at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190) at 
org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:291) at 
org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:776) at 
org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:705) at 
org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:898)
 at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690)
 at java.lang.Thread.run(Unknown Source) 
\--------------------------------------/ 

I'm pretty sure this exception come from me. So perhaps the webhotel-admin guys 
has set upp my rights incorrect?
For a couple of weeks I have struggle to test different apache-mapping, 
context.xml and struts-namespace-settings. At home it work but not at the 
webhotel. Even though I start to think that it might not has anything to do 
with this I just add some info below about my settings:
Apache-mappings (that I have set at the webhotel):/*.jsp /*.jspx /*.jsf 
/servlet/* /*.do /MYAPP-webapp-1.0.0/* /*
(At home I just got: JkMount  /* worker1)
Context.xml (from inside the MYAPP-webapp-1.0.0.war)<Context path="" 
override="true" />
In my struts.xml I got this snippet:    <package name="basicstruts2" 
namespace="" extends="struts-default">                     <action 
name="login">               <result type="dispatcher">/login.jsp</result>       
        </action>
                <action name="welcome" 
class="se.MYAPP.web.actions.WelcomeUserAction">                  <result 
name="SUCCESS" type="dispatcher">/welcome.jsp</result>          </action>       
        </package>
In my web.xml I got this snippet:       <filter>                
<filter-name>struts2</filter-name>              
<filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>
      </filter>
        <filter-mapping>                <filter-name>struts2</filter-name>      
        <url-pattern>/*</url-pattern>   </filter-mapping>       But if I try to 
access the struts paths 
like:http://www.MYAPP.se/MYAPP-webapp-1.0.0/loginhttp://www.MYAPP.se/MYAPP-webapp-1.0.0/login.dohttp://www.MYAPP.se/MYAPP-webapp-1.0.0/login.action
...I just get the above 404.http://www.MYAPP.se/MYAPP-webapp-1.0.0/login.jsp of 
course work.
So if you guys got any ideas or anything I could ask the webhotel-support-guys 
to look for please let me know.Any ideas are most welcomeBest regardsFredrik


                                          

Reply via email to