• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Load all JSPs on statup

 
Renato Losio
Ranch Hand
Posts: 99
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there a way to load all JSPs pages at startup time? I can of course define an entry for each one in the web.xml but I wonder if there's a quicker solution for JBoss 3.2.7 or 4.0.

Cheers,

Renato
 
Jaikiran Pai
Marshal
Pie
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why do you want to do that? Is it because you want save the time that the compilation of jsps takes when they are accessed the first time? If so, why dont you try jsp precompilation?

Here are some links which you might find helpful:

Improve performance of application using precompilation of JSPs

Precompile JSP using JSPC, through build

Precompile JSP Programatically
 
Renato Losio
Ranch Hand
Posts: 99
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your input. Yes, probably precompiling is a better option. Would you usually suggest programming (using a jsp) or a ant script? I can see the first one as more portable but may be the second one has better performance... any idea?

Thanks again.

Cheers,

Renato
 
Jaikiran Pai
Marshal
Pie
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Would you usually suggest programming (using a jsp) or a ant script?


I would suggest using the ant script. Most of the times this is the method which is used. One major advantage of using the ant script is that the precompilation would be part of your deployment and you will not require the server to be up. Whereas if you are going for the programatic approach, you will have to have the server up and running.
 
Renato Losio
Ranch Hand
Posts: 99
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
OK, thanks again!

Renato
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic