Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

question on struts?  RSS feed

 
raymond yadao
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
  • 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
 
Paul Lester
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • 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
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!