943,654 Members | Top Members by Rank

Ad:
  • Java Discussion Thread
  • Unsolved
  • Views: 1613
  • Java RSS
Mar 23rd, 2008
0

MVC Architecture.

Expand Post »
Is it necessary to write a corresponding servlet for each JSP page in case of MVC Architecture?
Similar Threads
Reputation Points: 9
Solved Threads: 1
Light Poster
Parsu7 is offline Offline
29 posts
since Feb 2008
Mar 24th, 2008
0

Re: MVC Architecture.

Nothing is necessary. You can write anything you want in any way you want. In the end it is experience that will tell you when it is better to use servlet to handle the request from the jsp file or just just handle it in the same page by setting action in the form tag to be:
<form action="" ....> If you need to use and declare a lot of methods in order to use them then you use servlets. Or in some cases you can have more than one jsp (whose requests have a common behavior) to go in ONE servlet, handle the request, and then depending on the results you can have more than one selections as in which jsp to go next.
If you need to submit a form and then just display the results in the same page, then one jsp that submits to itself is enough.
Sponsor
Featured Poster
Reputation Points: 1014
Solved Threads: 446
Nearly a Senior Poster
javaAddict is online now Online
3,258 posts
since Dec 2007
Mar 24th, 2008
0

Re: MVC Architecture.

Thanks.
Reputation Points: 9
Solved Threads: 1
Light Poster
Parsu7 is offline Offline
29 posts
since Feb 2008

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Java Forum Timeline: Expression Calculator
Next Thread in Java Forum Timeline: help with j2me code





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC