Are there any standards for developing JSP pages? All I can find are Java coding standards, which does not help me much when it comes to JSP programming.

swarraj kulkarni

From your question I think you are looking for different architectures for using JSPs in your project. These architectures are sort of standards for developing JSP based projects.

Java coding standards are different than JSP development best practices. Java coding standards, are, as the name implies, used while writing any Java code, and can definitely be used while writing JSP scriptlets too.

JSP Architectures:
Model I: This kind of architecture is useful when everybody on your team are able to write Java code as well as HTML code.You can have Java code generate/fetch the dynamic content and have HTML display them from within the same JSP page. This is a simple technique, but you may lose code readability and these pages may also be difficult to debug.

Model II: Here, you have a servlet or JSP to generate/fetch the dynamic content and a separate JSP to display it. This way, the controller Servlet/JSP can forward the contents to the appropriate display JSP. This technique, commonly known as the Model/View/Controller (MVC) pattern, allows an effective separation of presentation from content.

For more information refer to the article on JSP architectures
0 Comments  (click to add your comment)
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

About | Sitemap | Contact