• 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

Couple JSP Questions

 
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is there a good debugger or editor for jsps? It gets awfully tricky trying to sort out the java, HTML and javascript to correct errors.
On the same line, are there best practice guidelines for integrating these technologies cleanly so the jsp doesn't end up looking like spaghetti?
 
Ranch Hand
Posts: 98
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
several solution to your Mess :-)
I use Homesite and it does a good job of visually seperating the diff tags by using a diff color scheme for each technology.
Also javascript can be very cleanly seperated by putting all your script in a .js file and having just the script include tag in your jsp tag
<script src="myScript.js"></script>
(infact this should be standard practice even for HTML/JavaScript pages)
also, if your html is very long you can put it in a diff file and use a FileReader in the JSP and push the html to the client .
-manav
 
Pam Doucette
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for your excellent suggestions. Wish me luck separating my spaghetti!
 
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The spaghetti code you mention is exactly why I have been moving from JSPs containing everything to trying to keep only HTML and JSP tags in the JSP files and Java in JavaBeans or tag handler classes employed by the JSP.
The "Blueprints" program at http://java.sun.com lists best practices and architectural recommendations for J2EE, including JSPs ("Web Tier").
 
reply
    Bookmark Topic Watch Topic
  • New Topic