Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

design with spring+struts

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • 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...
 
Beauty is in the eye of the tiny ad.
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic