File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes Performance issue in JSP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Performance issue in JSP" Watch "Performance issue in JSP" New topic
Author

Performance issue in JSP

Naresh Talluri
Ranch Hand

Joined: Oct 12, 2007
Posts: 115
Hi All,

I had a small performance problem in my JSP , iam pulling thousands of values from DateBase, it is not taking much time but while constructing this data in JSP
it is taking much time, iam using struts tags to construct HTMl, in Tomcat 6.0,
Here is sample code ,



Here iam declaring one global variable as lXml to add data each and every iteration. i cannot avoid scriplet in this case , if we can how .?
I do have some more conditions like this in my JSP.
please suggest me how can i reduce load time of JSP..

Highly appriciated if you have any solutions

Thanks.
Seetharaman Venkatasamy
Ranch Hand

Joined: Jan 28, 2008
Posts: 5575

1.what you are trying to do(explanation not clear)

2.what error you are getting ?

3.if you want to avoid scriptlet use JSTL/EL
Naresh Talluri
Ranch Hand

Joined: Oct 12, 2007
Posts: 115
Iam not getting any error,

to iterate huge amount of data iam facing some performance problem, it is taking much time to rendering data.

any suggestions please.
Seetharaman Venkatasamy
Ranch Hand

Joined: Jan 28, 2008
Posts: 5575

Naresh Talluri wrote:
to iterate huge amount of data iam facing some performance problem, it is taking much time to rendering data.
any suggestions please.


that is why,Paging(Pagination) Concept is introduced .
Naresh Talluri
Ranch Hand

Joined: Oct 12, 2007
Posts: 115
Exactly, but in my case it has to load the complete data,
can you please suggest..
Seetharaman Venkatasamy
Ranch Hand

Joined: Jan 28, 2008
Posts: 5575

Naresh Talluri wrote:Exactly, but in my case it has to load the complete data


why? you need to show all the datas in one page to the user? if yes what is the benefit ?
Milan Jagatiya
Ranch Hand

Joined: Jan 01, 2007
Posts: 164
Naresh Talluri wrote:Exactly, but in my case it has to load the complete data,
can you please suggest..


If this is the case. You can write some AJAX asynchronous calls to retrieve bunch of data from server. So that user can continue with data which is already loaded.


Milan.<br />I can because I think I can...
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12761
    
    5
Does your user really need to see all this on the browser? Browser pages are so ephemeral - if they once look away, you have to regen the whole monster.

Consider creating a .pdf document in a separate Thread and giving a link to it when ready.

Bill
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Performance issue in JSP
 
Similar Threads
BeanUtils.populate IndexOutofBound
Help with logic:equal
JSTL conversion for struts 1.1 code
bean value persists on clicking back
Passing one id from jsp to javascript