• 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

design with spring+struts

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Only use Struts,We can extends struts's Action,Achieve only one Action Object control business logic using java reflect. I trust anyone is aware.
Classical example is IBatis Dao example.

But I think of using spring and struts.Thereinto controler is spring's API,
According to it,It's will being a lot of struts's Action Object,how to achieve one Action controls business logic.

I try to According to IBatis Dao to achieve,but spring is controler,achieve no good.
 
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Tang,

i guess you want to know how to integrate Spring with Struts. Here is an example to integrate Struts with Spring:

1)In your web.xml have the following entry:


2)In your struts-config.xml do the following changes:


AND


3) You need to make one xml file like action-servlet.xml where you need to map the action class which would take care of your request like :

where valentinesService is a Service class.

For all your action classes you need to repeat steps 2) and 3)

Hope this answers your question.

[ February 20, 2006: Message edited by: dnyan ginde ]
[ February 20, 2006: Message edited by: dnyan ginde ]
 
tang zichao
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hello dnyan,Frist I thanks you answer my question,but you misapprehended me.
I mean it is if according to your answer,we will write a lot of acion class when I need other business logic.

I think achieve only one Action class to control business logic,real business logic method in ActionForm...
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic