File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes JSP style guide? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "JSP style guide?" Watch "JSP style guide?" New topic

JSP style guide?

Joe McGuire
Ranch Hand

Joined: Mar 19, 2001
Posts: 293
Does anyone know of a widely accepted style guide for writing jsp? Perhaps the Ranch will endorse or develop a style guide similar to the one in the Chicken Coop?
MIchael Kmiec

Joined: Jun 05, 2001
Posts: 9
I'm afraid I don't know what you mean by "style guide". Do you mean a "best practices" approach to developing JSP? If that's the case, I recommend just following the spec. If that's too much information, just remember: logic and presentation don't play well together. Otherwise, I tend to follow the JSP syntax card as gospel:
Zkr Ryz
Ranch Hand

Joined: Jan 04, 2001
Posts: 187
Are there any jsp programming style
like the one in The Chiken coop, here at Javaranch ?
Madhav Lakkapragada
Ranch Hand

Joined: Jun 03, 2000
Posts: 5040
nope, not yet, I think.
Thanks for the idea though.
- satya

Take a Minute, Donate an Hour, Change a Life
Joe McGuire
Ranch Hand

Joined: Mar 19, 2001
Posts: 293
Michael, by "style guide," I mean not so much a best practices approach. I mean a standardized style or convention to things such as: should directives go between the <head> and <body> tags, or in one of them? Indentations, spacings, should the code between the <% and %> scriptlet tags be on separate lines, etc. Something just like the chicken coop's style guide, but for jsp (and I guess that would mean html too).
I'm just getting into writing a lot of jsp, and see that many people write in very different styles.
Deepak Mahbubani
Ranch Hand

Joined: May 12, 2001
Posts: 68
You can refer to Java Server Programming (J2EE Edition) Wrox Publication. A chaper on writing Maintainable JSPs talks about standard coding guidelines for JSPs
Joe McGuire
Ranch Hand

Joined: Mar 19, 2001
Posts: 293
Great! I'll check it out.
I agree. Here's the link:
subject: JSP style guide?
It's not a secret anymore!