You are right, this is a good idea for ease of adoption and for basic
applications. I have a project though that uses a more advanced form of
.application loading (the Servlet figures out what package it is in and then
locates the .application within that package). This way by simply copying
the Servlet and application file around within Eclipse, I can reconfigure
the application. What the project is, "personalized" banking site, each
branch has a site with local pictures, local text, local rates and services,
etc. Most of the stuff is handled via database, but some of it was simply
easier to do with dynamic application loading (because their is a central
set of pages and we only override the pages that are for the local branch.)
-----Original Message-----
From: "Howard M. Lewis Ship" <[EMAIL PROTECTED]>
To: "Tapestry Developer" <[EMAIL PROTECTED]>
Date: Wed, 23 Oct 2002 09:57:43 -0400
Subject: [Tapestry-developer] New in 2.3 ...
I've been doing a little work in 2.3.
It is now no longer necessary to subclass ApplicationServlet. Instead, you
configure ApplicationServlet, i.e.
<servlet>
<servlet-name>vlib</servlet-name>
<servlet-class>net.sf.tapestry.ApplicationServlet</servlet-class>
<init-param>
<param-name>net.sf.tapestry.application-specification</param-name>
<param-value>/net/sf/tapestry/vlib/Vlib.application</param-value>
</init-param>
<load-on-startup>0</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>vlib</servlet-name>
<url-pattern>/app</url-pattern>
</servlet-mapping>
Seems like its just as much typing as creating a subclass, but we must all
bow down before Marc Fluery :-)
For this to work, we are relying on the servlet container setting
Thread.contextClassLoader properly. I've verified this in Jetty, Tomcat and
Resin, and I'll do WebLogic at some point. I'm looking for someone to help
with validating this is WebSphere (4 and 5, if possible). I need to check
with the servlet spec to see if this behavior is required in the servlet
container, but I think it is.
Actually, I think this will help with new adoptees since currently the
documentation gets bogged down in an unwanted discussion of class loaders.
Now the docs can simply say "do this, its magic" and be done with it.
Very advanced apps may still want to subclass, but for other reasons, such
as having a very different approach to locating or assembling the
application specification.
This will be checked into CVS shortly ...
----
Howard Lewis Ship
[EMAIL PROTECTED]
http://tapestry.sf.net
-------------------------------------------------------
This sf.net email is sponsored by: Influence the future
of Java(TM) technology. Join the Java Community
Process(SM) (JCP(SM)) program now.
http://ads.sourceforge.net/cgi-bin/redirect.pl?sunm0002en
_______________________________________________
Tapestry-developer mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/tapestry-developer