• 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

[struts] mapping actions in modules

 
Ranch Hand
Posts: 1061
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
i'am trying to divide a Struts-App into modules.
It works to associate the action to the corresponding module's config.xml,
but only if i use the normal <form> tag. As soon as i try to use the taglib-syntax <html:form>,
i get a exception, saying "cannot retrieve mapping for action /module2MyAction".
What's wrong?
TIA
cb
 
Ranch Hand
Posts: 415
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi chris

When u r using module specific struts-config ,u might have made an entry in web.xml .while using the <html:form> u should say <modulename>/actionpath.....If u dont have this modulename it will try to look up in default struts-config and wont be able to find the mapping for that
For eg in web.xml
<init-param>
<param-name>config/module1</param-name>
<param-value>/WEB-INF/struts-module1-config.xml</param-value>
</init-param>
and in ur jsp u should say
<html:form action="/module1/search.do" > and after this u will reach a jsp where now the reference is in module 1(URl will be at http://localhost:8080/applicationname/module1) .now u can directly say the action and that wont show any exception
Assume now from this module1 jsp u want to invoke some action in another module .now once agin u need to give action="/module2/search.do"

Hope u fing useful what i told u
 
Chris Baron
Ranch Hand
Posts: 1061
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi sreenath,
thanks for your reply, but i receive the same error
cb
 
sreenath reddy
Ranch Hand
Posts: 415
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi chris
Then it could be better if u can paste the code what u have written so that we can get some idea where things went wrong
reply
    Bookmark Topic Watch Topic
  • New Topic