• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 60
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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!!!
 
Ranch Hand
Posts: 485
Eclipse IDE Firefox Browser Linux
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Try this.
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Mohana Rao Sv wrote:Try this.



yep, works.
thanks
 
Gerenne Vives
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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!!!
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic