Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Does making a plain old servlet violate the use of struts?

 
Timothy Sam
Ranch Hand
Posts: 751
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Technically, of course this is possible... I only need to populate a drop-down menu. But as I was suggested... Do the query in the controller , avoid the use of jstl sql tags.... In short... I'm trying to follow the mvc model 2(or is that jsp model). I need to serve a page that would enable the user to create another user(adduser.jsp)... This actually means that he would be coming from another jsp page (let's say main.jsp). In adduser.jsp I need to populate a select tag, so my solution was... Create an extension of HttpSevlet, populate a bean(an ordinary javabean), then use that bean to populate the select tag in the adduser.jsp... I didn't see the the use of ActionSevlets here so I'm not planning on using them... I know there isn't actually any rule like this but... Am I violating the use of struts? Hope you understand my point... Thanks!
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34389
346
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Timothy,
It's using MVC, but not Struts. To do that using Struts you would populate the bean in an Action class.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic