aspose file tools*
The moose likes Struts and the fly likes But this code, throws the exception Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "But this code, throws the exception "The Struts dispatcher cannot be found"." Watch "But this code, throws the exception "The Struts dispatcher cannot be found"." New topic
Author

But this code, throws the exception "The Struts dispatcher cannot be found".

Gerenne Vives
Ranch Hand

Joined: Feb 05, 2005
Posts: 60
Hi all,

I've got the following problem, I must load index.jsp page, when the user is validated, but before I should to obtain some lists in specific action, if I do:

<package name="app" namespace="/" extends="app-default">
<result-types>
<result-type name="tiles" class="org.apache.struts2.views.tiles.TilesResult" />
</result-types>
<action name="login" class="com.app.action.LoginAction">
<result name="success" type="tiles">welcome</result>
<result name="errorLogin">login.jsp</result>
</action>
</package>

It's work fine, but in this case the lists can't be populated, I try to do a redirect:

<package name="app" namespace="/" extends="app-default">
<result-types>
<result-type name="tiles" class="org.apache.struts2.views.tiles.TilesResult" />
</result-types>
<action name="login" class="com.app.action.LoginAction">
<result name="success" type="redirect-action">
<param name="actionName">./ini.action</param>
<param name="parse">true</param>
</result>
</action>
<action name="ini" class="com.app.action.TableAction" method="obtainTable">
<result name="success" type="tiles">welcome</result>
<result name="errorLogin">login.jsp</result>
</action>
</package>

But this code, throws the exception "The Struts dispatcher cannot be found".

Can you help me?, Thanks in advance!
Gerenne Vives
Ranch Hand

Joined: Feb 05, 2005
Posts: 60
Ok, I've found the problem instead of to use redirect:

<action name="login" class="com.app.action.LoginAction">

<result name="errorLogin">login.jsp</result>
<result name="success" type="chain">appFind</result>
</action>
<action name="appFinf" class="com.app.action.TableAction" method="obtainTable">
<result name="success" type="tiles">welcome</result>
</action>


Thanks!!!
Mohana Rao Sv
Ranch Hand

Joined: Aug 01, 2007
Posts: 485

Try this.


ocjp 6 — Feeding a person with food is a great thing in this world. Feeding the same person by transferring the knowledge is far more better thing. The reason is the amount of satisfaction which we get through food is of only one minute or two. But the satisfaction which we can get through the knowledge is of life long.
yem oliv
Greenhorn

Joined: Apr 11, 2012
Posts: 2
Mohana Rao Sv wrote:Try this.


yep, works.
thanks
Gerenne Vives
Ranch Hand

Joined: Feb 05, 2005
Posts: 60
Ok, I found the problem!!

The problem was is the library, I need only this libraries:

commons-fileupload-1.2.2
commons-io-2.0.1
commons-lang-2.5
commons-logging-1.1.1
commons-logging-api-1.1
freemarker-2.3.18
javassist-3.11.0.GA
ognl-3.0.4
struts2-core-2.3.1.2
xwork-core-2.3.1.2

Now, It's work, thanks for all!!!
 
jQuery in Action, 2nd edition
 
subject: But this code, throws the exception "The Struts dispatcher cannot be found".