Here are all the files with the TestAction as well. I still get the
Exception. Any idea as to whats going on?
struts.xml
----------
<!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.devMode" value="true" />
<include file="struts2-cw.xml"/>
</struts>
struts-cw.xml
-------------
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
<package name="cw" namespace="/cw" extends="struts-default">
<action name="test" class="com.ac.web.actions.cw.TestAction">
<result name="success" type="freemarker">/cw/test.ftl</result>
</action>
</package>
</struts>
Action class:
-------------
package com.ac.web.actions.cw;
import com.opensymphony.xwork2.ActionSupport;
public class TestAction extends ActionSupport
{
private static final long serialVersionUID = 1L;
public String execute() throws Exception
{
return SUCCESS;
}
}
The error I get:
----------------
8188 ERROR org.apache.struts2.dispatcher.Dispatcher serviceAction
[512] - Could not find action or result
There is no Action mapped for action name test. - [unknown location]
at com.opensymphony.xwork2.DefaultActionProxy.prepare
(DefaultActionProxy.java:186)
at
org.apache.struts2.impl.StrutsActionProxyFactory.createActionProxy
(StrutsActionProxyFactory.java:41)
at org.apache.struts2.dispatcher.Dispatcher.serviceAction
(Dispatcher.java:494)
at org.apache.struts2.dispatcher.FilterDispatcher.doFilter
(FilterDispatcher.java:419)
Any clues as to what I may be doing wrong?
On Jan 2, 2008, at 6:17 PM, Adam Ruggles wrote:
Looking at this pretty quickly it looks like you left out the class
for your
action="test"
On Jan 2, 2008 2:03 PM, Mufaddal Khumri
<[EMAIL PROTECTED]> wrote:
I need to break my struts.xml into modules. So I came across this
page: http://struts.apache.org/2.x/docs/can-we-break-up-a-large-
strutsxml-file-into-smaller-pieces.html
Accordingly, I tried this:
struts.xml:
==========
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
<include file="struts-default.xml"/>
<include file="struts2-cw.xml"/>
</struts>
struts2-cw.xml:
==============
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
<package name="default" extends="struts-default">
<action name="test">
<result name="success" type="freemarker">/cw/test.ftl</
result>
</action>
</package>
</struts>
Restarted my app and made a request like such:
http://localhost/mywebapp/test.action
I get this exception in my catalina.out under tomcat:
188419 ERROR org.apache.struts2.dispatcher.Dispatcher serviceAction
[512] - Could not find action or result
There is no Action mapped for namespace / and action name test. -
[unknown location]
at com.opensymphony.xwork2.DefaultActionProxy.prepare
(DefaultActionProxy.java:186)
at
org.apache.struts2.impl.StrutsActionProxyFactory.createActionProxy
(StrutsActionProxyFactory.java:41)
at org.apache.struts2.dispatcher.Dispatcher.serviceAction
(Dispatcher.java:494)
at org.apache.struts2.dispatcher.FilterDispatcher.doFilter
(FilterDispatcher.java:419)
Any pointers as to where I am going wrong?
Thanks.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]