aspose file tools*
The moose likes JBoss/WildFly and the fly likes Load all JSPs on statup Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "Load all JSPs on statup" Watch "Load all JSPs on statup" New topic
Author

Load all JSPs on statup

Renato Losio
Ranch Hand

Joined: Nov 23, 2005
Posts: 99
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


Renato Losio - www.arsenio.it - renatoweb@arsenio.it
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10285
    
169

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


[My Blog] [JavaRanch Journal]
Renato Losio
Ranch Hand

Joined: Nov 23, 2005
Posts: 99
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

Joined: Jul 20, 2005
Posts: 10285
    
169

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

Joined: Nov 23, 2005
Posts: 99
OK, thanks again!

Renato
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Load all JSPs on statup