To be clear, <load-on-startup> just means the servlet will be *initialized* during the warmup request (not executed).
For JSPs, this means that the jspInit() method is called. If you override it to do something expensive this may provide a big benefit, but otherwise you will just get the benefit of loading the JSP infrastructure ahead of time. If you really want to execute a JSP as a warmup request, you should declare it explicitly with a <servlet> using <jsp-file> and them map it to /_ah/warmup. On Mon, May 16, 2011 at 5:36 PM, Ikai Lan (Google) <[email protected]>wrote: > Yes. Warmup servlets are just URL for you to hit: > > > http://code.google.com/appengine/docs/java/config/appconfig.html#Warmup_Requests > > > <http://code.google.com/appengine/docs/java/config/appconfig.html#Warmup_Requests>That > being said, why would you want to use a JSP as a warmup servlet? The code > will be easier to test/maintain in a servlet itself. Worst case scenario you > can always use JSP dispatch to the JSP. > > Ikai Lan > Developer Programs Engineer, Google App Engine > Blog: http://googleappengine.blogspot.com > Twitter: http://twitter.com/app_engine > Reddit: http://www.reddit.com/r/appengine > > > > On Sun, May 15, 2011 at 11:18 PM, Anders <[email protected]> wrote: > >> Is it possible to use a JSP page as a warmup Servlet in Google App Engine >> for Java? >> >> Example: >> >> <servlet> >> <servlet-name>search</servlet-name> >> <jsp-file>/search.jsp</jsp-file> >> <load-on-startup>1</load-on-startup> >> </servlet> >> >> Sice JSP pages are compiled into Servlets this should work in theory, >> unless JSP pages and ordinary Servlets are treated differently under the >> hood. >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Google App Engine for Java" group. >> To post to this group, send email to >> [email protected]. >> To unsubscribe from this group, send email to >> [email protected]. >> For more options, visit this group at >> http://groups.google.com/group/google-appengine-java?hl=en. >> > > -- > You received this message because you are subscribed to the Google Groups > "Google App Engine for Java" group. > To post to this group, send email to > [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/google-appengine-java?hl=en. > -- You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
