Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here


Implication of having code inside jsp.

Implication of having code inside jsp.

Implication of having code inside jsp.

HI everyone.
   I stepped on a web application where there's a lot code in the jsp's. I also heard that this application has performance issues. I would like to know if it could be related.

Also, i would like to have an idea of the implication of having long scripts (java) inside jsp's. Is the code executed client side instead of server side? Would it be better to have some kind of back end execute this code?  

RE: Implication of having code inside jsp.

I'm a .net developer, but I'm assuming jsp is very similar to aspx. if this assumption is correct then code in the jsp is the template for how to render dynamic content.

the problem with large amounts of code/logic in the view is that it's difficult to test. you could put the same code in another object to assist with testing, but that doesn't make it faster. it can still suffer from the same poor performance.

you will need utilities (profilers) to pinpoint and quantify where the bottleneck is. you will want to profile the code and the sql queries (assuming there is a relational database involved) typically this is the place to gain the biggest performance boost: optimizing sql queries and balancing the number of remote calls with the volume of data returned by the queries.

Jason Meckley

FAQ855-7190: Database Connection Management
FAQ732-7259: Keeping the UI responsive

RE: Implication of having code inside jsp.

First of all, thanks for your support.
Yes, there's a database involved. There's even some sql queries in the jsp's.


Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close