Hi Rouxel,

I am using ScopedModelDriven.
I am not using prepare,since ModelDSriven interceptor takes care of
initializing model object.

I have following implemented methods of ScopedModelDriven and other servlet
config related methods in my Action class.

--------------------

public Object getModel(){
                        System.out.println("getting model.");
                        return cBookingFactorsModel;
                }       

                public String getScopeKey() {
                        System.out.println("getting key.");
                        return key;             
                }
                
                public void setModel(Object obj) {
                        System.out.println("setting model:
"+obj.toString());
                        this.cBookingFactorsModel=(CBookingFactorsModel)obj;

                }
                
                public void setScopeKey(String key) {
                        System.out.println("setting key: "+key);

                        this.key=key;           
                }               
                

                public void setServletRequest(HttpServletRequest request) {
                        this.request=request;           
                }
                public void setSession(Map map) {
                                this.session_map=map;           
                }       
                
                public CBookingFactorsModel getCBookingFactorsModel() {
                        return cBookingFactorsModel;
                }



                public void setCBookingFactorsModel(CBookingFactorsModel
bookingFactorsModel) {
                        cBookingFactorsModel = bookingFactorsModel;
                }


-----Original Message-----
From: Raghuveer.V [mailto:raghuve...@infotechsw.com] 
Sent: Monday, September 21, 2009 12:45 PM
To: user@struts.apache.org
Subject: Struts2 Tiles - Error -There is no Action mapped for namespace /
and action name 

I have been using struts2Tiles2 for my current application.

I get following error when my Result type is "tiles" (struts.xml as show
below).

 

Any suggestion for resolving this error.

 

 

 

 

WARNING: Could not find action or result

There is no Action mapped for namespace / and action name >. - [unknown
location]

        at
com.opensymphony.xwork2.DefaultActionProxy.prepare(DefaultActionProxy.java:1
77)

        at
org.apache.struts2.impl.StrutsActionProxy.prepare(StrutsActionProxy.java:61)

        at
org.apache.struts2.impl.StrutsActionProxyFactory.createActionProxy(StrutsAct
ionProxyFactory.java:39)

        at
com.opensymphony.xwork2.DefaultActionProxyFactory.createActionProxy(DefaultA
ctionProxyFactory.java:47)

        at
org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:458)

        at
org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOper
ations.java:77)

        at
org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilt
er(StrutsPrepareAndExecuteFilter.java:76)

        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:215)

        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:188)

        at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:210)

        at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:174)

        at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127
)

        at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117
)

        at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:108)

        at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)

        at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:870)

        at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processC
onnection(Http11BaseProtocol.java:665)

        at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.jav
a:528)

        at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWo
rkerThread.java:81)

        at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:685)

        at java.lang.Thread.run(Unknown Source)

 

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>

<package name="myPackage" namespace="/" extends="tiles-default"> 

<action name="bookingFactorsAction*" method="{1}"
class="com.test.actions.CEACBookingFactorsAction">          

                                    <interceptor-ref name="servletConfig"/>

                                    <interceptor-ref name="prepare" />

                                    <interceptor-ref name="debugging" />

                                    <interceptor-ref
name="scopedModelDriven">

                                                <param
name="scope">session</param>

                                                <param
name="name">cBookingFactorsModel</param>

                                                <param name="className">

 
com.test.model.CBookingFactorsModel

                                                </param>

                                    </interceptor-ref>

                                    <interceptor-ref name="params" />

                                    <interceptor-ref name="conversionError"
/>

                                    <interceptor-ref name="workflow" />

                                    <interceptor-ref name="defaultStack" />

                                    <result type="tiles" >
test_tiles_page_defination </result>

                                    <result type="tiles" name="input">
test_tiles_page_defination </result>

                                    <result type="tiles"
name="test_tiles_page"> test_tiles_page_defination </result>

            

                                    

            </action>

  </package>

</struts>

 

 

JSP Page

 

<s:url var="bookingFactors" namespace="/"
action="bookingFactorsActionview"/>

<s:a href="%{bookingFactors}">EAC Booking Factors</s:a>



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org

Reply via email to