• 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

Request for Code Review

 
Ranch Hand
Posts: 421
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello I wondered if anyone could do a code review. I inherited this application and wanted to know from an expert opinion what may be wrong with the existing code. I noticed the JQuery was very very old, so old it is no longer referenced on the JQuery site when you search for it. However, I wondered if there was a better way to structure this page.



Thanks, Michele
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes, there's a much better way to structure it: move all the Java code to a servlet, or a Java class, and only use the JSP for rendering he output. That is what JSPs should be used (which are, after all, just the "V" in "MVC").
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I never got past the two first characters. "<%" means that scriptlets are in use in the page. Java scriptlets in a page has been obsolete and discredited for 13 years. now. They should never be used in a modern JSP page. Using such cranky and discredited technology in 2014 is just downright irresponsible.

Please read this article for a discussion of how to properly structure modern Java web applications.
 
Michele Smith
Ranch Hand
Posts: 421
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you! I went to the journal and had a really good look and appreciate your suggestions! -- Thanks again, Michele
 
What's that smell? Hey, sniff this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic