tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nhel...@d.umn.edu
Subject RE: $CATALINA_HOME\shared configuration question
Date Mon, 16 Aug 2004 14:39:34 GMT
Sorry for the delay; I initially sent this message in the wrong direction and
then was gone for the weekend.

I think the bottom line is that I need to familiarize myself more with standard
Tomcat file structures and packaging techniques, and any places to go for that
information would be more than welcome, but for what it's worth, here's my reply:


> From: QM <qm300@brandxdev.net>
> 
> Just a hunch, but I don't think that's possible.  The concept of the
> shared area would imply (at least, to me) that it contains stable,
> unchanging code.

In terms of the unchanging storage area, this is was my thinking as well.

(I suppose the one detail I left out is that I was hoping to find a place to set
the 'reloadable' flag [or equivalent] for the 'shared' folder so it could be set
to true for our development server.  The fact that the contents of the 'shared'
folder are cached becomes more of an issue in this case, as if one is writing a
new class and testing it along the way, in order for the .jsp pages to see the
changes, Tomcat needs to be restarted to clear it's cache of the 'shared'
folder.  Which isn't a _huge_ deal, but it does get rather irritating.)


> What's your end-goal here?  I'm all for re-use of a codebase; but is
> there any reason you're not just wrapping shared classes into JARs and
> distributing those to each webapp?

Well, that's the approach we've been using with our swing development - creating
applets that, in the html for loading the applet, what .jar files to include are
specified.  However, I'm pretty new to the .jsp world, and I'm not sure that I
know how to achieve the same end there.  

So maybe that's quesiton #1 - is it possible to "import" a jar file into a .jsp
page?


To date, we've taken the background classes that were written to support our
swing applications and put them out into the web inf/classes folder of our "web"
Tomcat context.  The .jsp pages themselves have then employed import statements
to grab whatever specific classes they need to run.

This has worked well enough, but became wrinkly once we started integrating a
web security package (Open Network's DirectorySmart, an LDAP and role-based web
access control application) - it likes to have it's own context to take over.

So now we are looking at having "web" and "securedweb" contexts, with mirrored
folder structures, just moving the .jsp or applet information from the one
context to the other to secure it.

Ok, so now that means two web-inf folders.  We have a development server, a
production server, and a backup production server.  So 6 web-inf folders to keep
track of.  While ant helps a lot, and it would just be a couple more lines in
our publish task to move the files out to the other locations, we'd really like
to only have to worry about a single collection of class files on each server.

So, we started looking for a place to put our classes that would be common to
both the "web" and "securedweb" Tomcat contexts.  That's when we ran in to the
$CATALINA_HOME\shared folder.  

But, with the needed rebooting as outlined above each time one of the classes
changes in this location, this hasn't turned out to be as ideal a solution as we
had hoped, and something tells me that this sort of situation has been
encountered before and that there's got to be a better approach.  

So, I suppose that makes question #2: is there a way to have two seperate tomcat
contexts use the same web-inf folder?


Thanks again,

  - Nathan


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message