• 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

question on struts?

 
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Guys!I have a question on struts, here's the scenario.I had an application, servlet - jsp.
I used the servlet as the controller and jsp as the viewer. the servlet doGet method is used for query the database and forwarding the data to the specified viewer, while its doPost method i used it from saving records to the database(insert,edit,delete).im only using one servlet.
my problem is this, in struts how will i know if the "get" or "post" method of the form is being called in the method execute(Action class)?Should i used a separate action class for this?

thanks.
raymond
 
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes. These would be two distinct actions; one action to view the data, another to update it.
If your application is working and is fairly small, I'd stay away from Struts. It's pretty complex to use on small projects and, after having used it for a year, I don't see that much advantage to it other than the tag libraries but you can get that functionality using JSTL.
Regards,
Paul
 
reply
    Bookmark Topic Watch Topic
  • New Topic