You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Tim Jowers <ti...@gmail.com> on 2008/10/17 00:52:23 UTC

404 error in struts 2 blank helloworld example in RAD7

Hi,

 Has anyone run the struts2-blank-2.0.11.2.war in RAD7/WebSphere?  I get 404
on calling an action.
First, https://localhost:9444/testo/example/HelloWorld.jsp works.
Then the action 404's:
https://localhost:9444/testo/example/HelloWorld.action?request_locale=en
I validated the HelloWorld.class can be loaded with a JSP scriptlet.
Here is the struts.xml:
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts
Configuration 2.0//EN" "http://struts.apache.org/dtds/struts-2.0.dtd">

<struts>
    <constant name="struts.enable.DynamicMethodInvocation" value="true" />
    <constant name="struts.devMode" value="true" />

    <package name="example" namespace="/example" extends="struts-default">

        <action name="HelloWorld" class="example.HelloWorld">
            <result>/example/HelloWorld.jsp</result>
        </action>

         <action name="*" class="example.ExampleSupport">
            <result>/example/{1}.jsp</result>
        </action>

    </package>

</struts>

I know it is being loaded as the jsp is being loaded and if I put in a bogus
class name like example.HelloWorld2 then it emits an error message.

This is supposed to be simple but I do not see any other logged messages or
anything telling me why it is 404. Maybe this has something to do with
WebSphere taking over "*.action" mappings or something.???

Thanks for any insights,
Tim Jowers

P.S> I note the example.ExampleSupport class is never classloaded. Not sure
why it was in the example as it seems to be ignored always.

Here's the server log:
[10/16/08 18:45:53:283 EDT] 0000000a WsServerImpl  A   WSVR0001I: Server
server1 open for e-business
[10/16/08 18:47:17:376 EDT] 00000021 ServletWrappe I   SRVE0242I: [samj2ee]
[/testo] [/example/HelloWorld.jsp]: Initialization successful.
[10/16/08 18:47:17:688 EDT] 00000021 XmlConfigurat I
com.opensymphony.xwork2.config.providers.XmlConfigurationProvider register
Parsing configuration file [struts-default.xml]
[10/16/08 18:47:17:798 EDT] 00000021 XmlConfigurat I
com.opensymphony.xwork2.config.providers.XmlConfigurationProvider register
Parsing configuration file [struts-plugin.xml]
[10/16/08 18:47:17:813 EDT] 00000021 XmlConfigurat I
com.opensymphony.xwork2.config.providers.XmlConfigurationProvider register
Parsing configuration file [struts.xml]
[10/16/08 18:47:17:845 EDT] 00000021 Settings      W
org.apache.struts2.config.Settings getLocale Settings: Could not parse
struts.locale setting, substituting default VM locale
[10/16/08 18:47:17:860 EDT] 00000021 DefaultConfig I
com.opensymphony.xwork2.config.impl.DefaultConfiguration$ContainerProperties
setProperty Overriding property struts.i18n.reload - old value: false new
value: true
[10/16/08 18:47:17:860 EDT] 00000021 DefaultConfig I
com.opensymphony.xwork2.config.impl.DefaultConfiguration$ContainerProperties
setProperty Overriding property struts.configuration.xml.reload - old value:
false new value: true
[10/16/08 18:47:18:313 EDT] 00000021 ObjectTypeDet I
com.opensymphony.xwork2.util.ObjectTypeDeterminerFactory <clinit> Setting
DefaultObjectTypeDeterminer as default ...