• 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

Java Web Project

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi ..

what is the Best Convention to Build web Java Projects using JSP and servlets...

i can build web Applications using only one Technique for example scriptlet , custom tags or servlets

but i need to know the Best Convention to use all these techniques together in one Application.
 
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Ahmad,
One of the simplest and best approach is to follow MVC pattern in web application.
M-Model
V-View
C-Controller
Model consists of list of java classes, you can give all your business logic in this part.Avoid implementing business logic in jsp itself.
View is collection of jsp pages. Use this only for presentation logic of the web application.(UI design)
Controller is set of servlets that controls the http requests and responses.

There are many frameworks available to develop web application in MVC pattern. Ex. Struts, Spring.You can use them also.

In simple, use jsp for UI design, use Java classes or java beans for business logic ( put all your scriptlet logic here ) and use servlet to control http request and response ( to decide whice business logic t o be used for which http request, and which jsp page to be displayed as a response to that request)..

So one line answer for your question is use MVC pattern...
reply
    Bookmark Topic Watch Topic
  • New Topic