You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Bret Waldow <Br...@themolesite.com> on 2004/07/15 22:29:49 UTC

RE: [SPAM] - RE: I need a pointer about persistent info for my servlet, please - Email has different SMTP TO: and MIME TO: fields in the email addresses

Yes, we are currently using Tomcat 5.  In fairly short order, we will be
turning what we are writing into an SOA implementation, and I haven't
gone far enough yet to know if we can still use Tomcat 5 with Axis, or
if we need to shift back to Tomcat 4.  Of course, we also intend to be
deployable on anyone's existing server setup, if it meets standards.

Your suggestion makes sense, and thanks for the idea.  I would still
like to hear what the canonical way to persist data for a servlet -
outside of the servlet .WAR file - is.  Is there one for Tomcat?  I'm
assuming that someone else besides us might have this need, I just can't
find anything definitive in the documentation or Google yet.

Regards,
Bret

-----Original Message-----
From: Richard Mixon (qwest) [mailto:rnmixon@qwest.net] 
Sent: Thursday, 15 July 2004 6:27 p.m.
To: Tomcat Users List
Subject: [SPAM] - RE: I need a pointer about persistent info for my
servlet, please - Email has different SMTP TO: and MIME TO: fields in
the email addresses

Bret,

Two questions:
1) Are you using Tomcat 5?
2) If so are you using the Tomcat-Deployer to deploy your application?

If you answer yes to both, then this is probably a good foundation for a
solution to your problem. Let me explain.

The Tomcat deployer uses an Ant script and a associated properties file
to take your war file (in unzipped format) compile it and then deploy it
to Tomcat.

We made some simple modificaitons to Tomcat-Deployer "build.xml" script
and "deployer.properties" file to do additional customization
before/during the JSP compilation process. The customization we do
sounds similar to what you want to do - set directory names, links, etc.
custom for that site/customer.

The Ant build.xml would be customized just once and work everywhere. The
properties in deployer.properties (or an alternate properties file of
your choosing) would be customized once for each customer/site. Then
each time you installed an updated war file the prior customizations
would be "remembered" so to speak.

Hope that was clear and it helps.

Even if you are not using Tomcat, a similar approach should work with
other App servers. Using an Ant script to unzip, customize and then
rejar the webapp should be pretty straightforward.

 - Richard

-----Original Message-----
From: Bret Waldow [mailto:Bret.Waldow@themolesite.com]
Sent: Wednesday, July 14, 2004 10:56 PM
To: tomcat-user@jakarta.apache.org
Subject: I need a pointer about persistent info for my servlet, please


We are deploying a servlet front end to an existing application.  When
the application is installed, the user picks some parameters, like the
install directory, that aren't known to us when we make the .WAR file we
deploy from.



However, our servlet needs to know this, and it needs to know it in a
way that survives redeployment of the servlet from the .WAR file - so I
can't put it into the WEB-INF/web.xml file, as this will be overwritten
when the servlet is redeployed in Tomcat.



During product installation, where can I write the information the user
chooses so that it will always be available to our servlet?  (And in
what form, please?)



I've read about a tomcat/conf/Catalina/localhost/<servletname>.xml file,
but I have only seen the examples for the built-in Tomcat apps, and
those don't show examples of <param...something> for me to use.



Can anyone point me to something that I can use for this?



Thanks,

Bret





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



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


Re: [SPAM] - RE: I need a pointer about persistent info for my servlet, please - Email has different SMTP TO: and MIME TO: fields in the email addresses

Posted by QM <qm...@brandxdev.net>.
On Fri, Jul 16, 2004 at 08:29:49AM +1200, Bret Waldow wrote:
: I would still
: like to hear what the canonical way to persist data for a servlet -
: outside of the servlet .WAR file - is.  Is there one for Tomcat?  I'm
: assuming that someone else besides us might have this need, I just can't
: find anything definitive in the documentation or Google yet.

Does the app otherwise use a database?
If so, it'd be nothing to put the info in an extra table somewhere.

I don't think there's such a thing as a "canonical"/portable way for
this: webapps are supposed to be self-contained, somewhat sealed
products (as far as on-disk files).

The plus side is, this leaves plenty of room for creative solutions.
-or not-so-creative solutions, such as, "put it in a database." ;)

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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