wood burning stoves 2.0*
The moose likes Struts and the fly likes struts concerns...??!!! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "struts concerns...??!!!" Watch "struts concerns...??!!!" New topic
Author

struts concerns...??!!!

lusha tak
Ranch Hand

Joined: Dec 30, 2000
Posts: 185
Hello all,
I am a new struts user…and exploring whether I can construct my web appliction around struts framework instead of using traditional JSP (logic and presentation combined) way of development??
My first issue is :
What is the advantage of using struts taglib to declare Form and other presentaion related tags over std. Html??
Is it somewhere related to the way Form Bean handles request parameter and does front-end validations???
My 2nd issue is :
Can we have multiple actions for the same jsp page in struts depending upon what button the user has pressed??
Then how do we define path and type in action mpping in struts-config and the jsp page itself??
Please throw some light???
Thanks
Lusha
Adam Hardy
Ranch Hand

Joined: Oct 09, 2001
Posts: 566
Originally posted by lusha tak:
What is the advantage of using struts taglib to declare Form and other presentaion related tags over std. Html??

You just write a form bean with the properties as getter/setter methods and struts will initialise the form bean at the beginning of the request, and fill the html with the correct values from the form bean at the end. Much less work than doing it manually.


Is it somewhere related to the way Form Bean handles request parameter and does front-end validations???

Front-end? Do you mean client-side? No - validator module will do that. Or do you mean server-side type validations? Those you write yourself in the form-bean's validate method.


My 2nd issue is :
Can we have multiple actions for the same jsp page in struts depending upon what button the user has pressed??

In struts you generally use a string token which you check in your action perform/execute to decide what to do. This token can be set in many ways. Using submit buttons is just one method. There is a struts solution called DispatchAction.


Then how do we define path and type in action mpping in struts-config and the jsp page itself??

Your path and type would stay the same. Just the token you use changes.


I have seen things you people would not believe, attack ships on fire off the shoulder of Orion, c-beams sparkling in the dark near the Tennhauser Gate. All these moments will be lost in time, like tears in the rain.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: struts concerns...??!!!