Re: overhead running from war rather than unpacked

2003-03-27 Thread Rasputin
* Craig R. McClanahan [EMAIL PROTECTED] [0312 07:12]:

Thanks for that, Craig - top perfromacen tuning tips!

With this in mind, is there a definitive way to
ensure clients get a 'fresh' copy of a webapp? 
How does tomcat/catalina decide when a webapp has been updated -
doe sit look at the war before using the expanded content, for example?

  -Original Message-
  From: Koes, Derrick
  To: '[EMAIL PROTECTED]'
  Sent: 3/26/03 6:13 PM
  Subject: overhead running from war rather than unpacked
 
  How much overhead is there running directly from the war file rather
  than
  unpacked?

snip explanation

 Benchmarks are your friend, if the benchmark you use is *your*
 application.  Otherwise, they are just a distraction :-).
 
  Ilya
 
 Craig McClanahan

-- 
Rasputin :: Jack of All Trades - Master of Nuns

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: overhead running from war rather than unpacked

2003-03-27 Thread Rasputin
* Craig R. McClanahan [EMAIL PROTECTED] [0349 16:49]:
 
  * Craig R. McClanahan [EMAIL PROTECTED] [0312 07:12]:
 
  Thanks for that, Craig - top perfromacen tuning tips!

(In defence of the worst spelling of 'performance' ever witnessed
by man, could I explain I have particularly painful RSI today)

  With this in mind, is there a definitive way to
  ensure clients get a 'fresh' copy of a webapp?
  How does tomcat/catalina decide when a webapp has been updated -
  doe sit look at the war before using the expanded content, for example?
 
 Are you talking about the case where you just drop a WAR file into the
 webapps directory?  

That's right, I've got an ant task that just copies the war into
place (the deploy task doesn't seem to make the webapp 'stick'
over a server restart).

 if you've got expandWARs set to true, the WAR will be
 expanded into a directory with the same base name -- *if* it does not
 exist already.  However, if the directory exists Tomcat will *not*
 re-expand the updated WAR, so you have to remove the old directory first
 (as well as replace the WAR).

Gotcha. That's a 2 line diff to my build.xml, thanks.
Can I just confirm that tomcat doesn't need a restart to detect this;
i.e. if I 'rm -r' the extracted webapp folder, then put a new warfile
into webapps/ , it'll be redeployed?


-- 
Rasputin :: Jack of All Trades - Master of Nuns

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: cross-context DataSource?

2003-03-26 Thread Rasputin
* Jon Archer [EMAIL PROTECTED] [0330 20:30]:
 Certainly do-able. I have done so in two ways: either by putting my
 datasource in under a DefaultContext (using the tomcat admin tool click
 on  Tomcat Server -- Service -- Host, choose create DefaultCOntext
 from dropdown list of actions on RHS, then create a DataSource against
 the new DefaultContext)

Hmm, me and the admin app aren't on speaking terms after it ate my
lovingly-crafted server.xml and crapped out something simlar but invalid
back around 4.1.12...

 or, alternatively like this:
 http://www.mail-archive.com/[EMAIL PROTECTED]/msg88811.html

That's great, cheers Jon!

I've seen the context.xmlin META-INF trick mentioned a few times now;
is that portable? I guess it's a 2.3 thing?


-- 
The early bird who catches the worm works for someone who comes in late
and owns the worm farm.
-- Travis McGee
Rasputin :: Jack of All Trades - Master of Nuns

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: cross-context DataSource?

2003-03-26 Thread Rasputin
* Rasputin [EMAIL PROTECTED] [0332 13:32]:

 * Jon Archer [EMAIL PROTECTED] [0330 20:30]:
  Certainly do-able. I have done so in two ways: either by putting my
  datasource in under a DefaultContext (using the tomcat admin tool click
  on  Tomcat Server -- Service -- Host, choose create DefaultCOntext
  from dropdown list of actions on RHS, then create a DataSource against
  the new DefaultContext)
 
 Hmm, me and the admin app aren't on speaking terms after it ate my
 lovingly-crafted server.xml and crapped out something simlar but invalid
 back around 4.1.12...
 
  or, alternatively like this:
  http://www.mail-archive.com/[EMAIL PROTECTED]/msg88811.html
 
 That's great, cheers Jon!

Ugh, spoke too soon.

I've obviously missed something because I get the infanous
cannot load JDBC driver name 'null' - error.

I went for the global resources and context.xml in META-INF path, if that
makes a difference.

The only thing I can think might be related is that I'm deploying webapps
by copying wars to webapps/ and they don't get extracted , not sure
if  that messes up the code that handles resources forwebapps.

If I went down the DefaultContext route, would that generate a datasource
in each Context that 'inheritsfrom it, or would it be truly shared?
'
-- 
The trouble with a kitten is that
When it grows up, it's always a cat
-- Ogden Nash.
Rasputin :: Jack of All Trades - Master of Nuns

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Too many processes

2003-03-25 Thread Rasputin
 22024  0.0 15.6 243620 39724 pts/0  S14:40   0:00
 /usr/java/j2sdk1.4.1_01/bin/java -Djava.endorsed.dirs=/usr/Tomc
 root 22025  0.3 15.6 243620 39724 pts/0  S14:40   0:00
 /usr/java/j2sdk1.4.1_01/bin/java -Djava.endorsed.dirs=/usr/Tomc
 root 22026  1.7 15.6 243620 39724 pts/0  S14:40   0:00
 /usr/java/j2sdk1.4.1_01/bin/java -Djava.endorsed.dirs=/usr/Tomc
 root 22027  0.0 15.6 243620 39724 pts/0  S14:40   0:00
 /usr/java/j2sdk1.4.1_01/bin/java -Djava.endorsed.dirs=/usr/Tomc
 root 22028  0.0 15.6 243620 39724 pts/0  S14:40   0:00
 /usr/java/j2sdk1.4.1_01/bin/java -Djava.endorsed.dirs=/usr/Tomc
 root 22029  0.0  0.3  2900  944 pts/0R14:40   0:00 ps -aux
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 

-- 
Very few profundities can be expressed in less than 80 characters.
Rasputin :: Jack of All Trades - Master of Nuns

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: What to set docBase attribute to in an individual Context.xml fil e

2003-03-21 Thread Rasputin
* Collins, Jim [EMAIL PROTECTED] [0340 16:40]:
 Hi Jake,
 
 Thanks for getting back so quick. So the context file in META-INF should be
 context.xml and not myapp.xml?
 
 That is maybe where I have been going wrong, I read some previous posts on
 this from Craig and I thought he said you name the context file with the
 name of your app and a .xml extension. 

I've done that before now, when I've needed to add contexts without
editing server.xml - BUT those files have gone into the webapps directory
(where a warfile would normally go) - see manager.xml which I think is in
webapps/ by default. This context.xml method sounds like a safer
solution though...

-- 
He's the kind of man for the times that need the kind of man he is ...
Rasputin :: Jack of All Trades - Master of Nuns

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Trying to use jikes for jsp compiles

2003-03-13 Thread Rasputin
)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:260)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at 
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:509)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:261)
at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:360)
at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:632)
at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:590)
at org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:707)
at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:530)
at java.lang.Thread.run(Thread.java:536)

-- 
$100 invested at 7% interest for 100 years will become $100,000, at
which time it will be worth absolutely nothing.
-- Lazarus Long, Time Enough for Love
Rasputin :: Jack of All Trades - Master of Nuns

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: running tomcat under unix

2003-02-25 Thread Rasputin
* Swapneel Dange [EMAIL PROTECTED] [0231 07:31]:
 i am trying to run TOMCAT 4.0 under unix, but i get the following messages 
 when i try to start the TOMCAT :

 Using CATALINA_HOME:   
 /home/grad12/sdange/tomcat/jakarta-tomcat-4.1.18-src/catalina/src
 Using CATALINA_TMPDIR: 
 /home/grad12/sdange/tomcat/jakarta-tomcat-4.1.18-src/catalina/src/temp

 touch: creating 
 `/home/grad12/sdange/tomcat/jakarta-tomcat-4.1.18-src/catalina/src/logs/catalina.out':
  
 No such file or directory

 yeah its true that there is no file known as 'catalina.out' in my folders 
 and there is no directory such as 'logs' inside the directory 'src'. do i 
 need to create a directory such as 'logs' or somethign like that.

Yes, in a nutshell. No such file od directory is referring to logs/ - you
can't create a file in a directory unless the directory exists.

But those directories *should* exist, so check that CATALINA_HOME points to 
where you installed tomcat.

-- 
The sooner all the animals are dead, the sooner we'll find their money.
-- Ed Bluestone, The National Lampoon
Rasputin :: Jack of All Trades - Master of Nuns

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: problem with classpath modification

2003-02-22 Thread Rasputin
* William Claxton [EMAIL PROTECTED] [0221 05:21]:

 We encountered an issue when adding a classpath entry to the Tomcat
 (v4.1.18) 'setclasspath.sh' script.  It so happens that the classpath entry
 '/home/web/mediaware/WEB-INF/classes' is already accessible as a context,
 but we need the classpath entry for some functions internal to our servlet.
  When we add this classpath entry using 'setclasspath.sh', Tomcat seems to
 loose its context.  There are no errors in any of the startup logs, but
 servlets located in '/home/web/mediaware/WEB-INF/classes' cannot run properly.

STR there's some problem doing this, it causes different classes to be loaded by 
different 
classloaders. If /home/web/mediaware is a webapp directory, then 
classes in WEB_INF/classes  will be searched, as will jarfiles in 
WEB-INF/lib -
if you don't need moroe than that I'd undo your changes to setclasspath.sh, and spare 
yourself a
lot of pain.


-- 
Jone's Law:
The man who smiles when things go wrong has thought of someone to blame it on.
Rasputin :: Jack of All Trades - Master of Nuns

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: problem with classpath modification

2003-02-22 Thread Rasputin
* Steve Guo [EMAIL PROTECTED] [0211 07:11]:
 
 U must be using UNIX, although I have no experience with UNIX, but let me throw out 
 my thoughts at it. I use Tomcat 4.1.18 under Win200, no problem.
 In general I do not modify .sh or.bat file, when I need to put something .jar into 
 the classpath of many webapps, I just do it using system variables (again windows).

It's safer to stick it in CATALINA_HOME/common/lib , does the same thing I believe
(that's how I installed PostGRESQL support in my webapps, anyway).
And it's nice and portable too (across OSes, not servers).

-- 
Nobody said computers were going to be polite.
Rasputin :: Jack of All Trades - Master of Nuns

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: ant install task

2003-02-21 Thread Rasputin
* Rob Abernethy IV [EMAIL PROTECTED] [0252 21:52]:
 When I run 'ant install', I get the response OK - Installed application at
 context path /foo.  When I list the apps using ant list, I see that my app
 is listed, but not started.  When I try to access it via
 http://localhost:8080/foo;, I get the error The requested resource is not
 available.  When I try to manually start this app from the manager gui, I get
 this error FAIL - Application at context path /foo could not be started. 
 Any ideas?

I had the same trouble , possibly the install task likes an
expanded directory rather than a warfile?

If it doesn't work, see the attached build.xml - I knocked it
together over the past couple of days, but it works well for me.

Does the following (assuming you have the standard project layout
a la appdev guide:

build.xml
catalina-tasks.ent # just holds the taskdefs for the tasks you want.
src/
lib/
web/
)

deploys by copying warfiles to $appbase.dir under CATALINA_HOME,
so it sticks after reboots or if the build directory changes

names the warfile after the context.path it'll be deployed to
(not essential, it just simplified the buildfile)

undeploys by calling remove on the context, and physically deleting
the warfile from $appbase.dir to it stays undeployed after a restart
- you'll still have it in dist/ unless you do a clean

It has a few requirements:

1. catalina-ant.jar should be in the classpath
2. CATALINA_HOME should be correctly set in the environment
3.the webapp directory has unpackWARS=false set (not strictly a
requirement, but I found it saves a lot of hassle)
4. You have a file in your home directory called
'.tcdeploy.properties' with two lines:
user=managerusername
pass=managerpassword

Hmm, think that's it, there are other obvious targets, like list,stop,start
- see if it's any use.


-- 
How wonderful opera would be if there were no singers.
Rasputin :: Jack of All Trades - Master of Nuns

?xml version=1.0 ?
!DOCTYPE project [
!ENTITY catalina-tasks SYSTEM ./catalina-tasks.ent
]

project name=deployment test default=webapp

property environment=env /
property file=${user.home}/.tcdeploy.properties prefix=tc /
property file=build.properties /

!-- default properties if not specified elsewhere --

property name=servlet.jar
value=${env.CATALINA_HOME}/common/lib/servlet.jar /

property name=context.path value=deployment /
property name=webapp.name value=${context.path} /
property name=warfile.name location=dist/${webapp.name}.war /

property name=cat.server value=webapps.tenten /
property name=cat.appbase value=webapps /
property name=cat.deploydir
location=${env.CATALINA_HOME}/${cat.appbase} /
property name=cat.port value=8080 /
property name=autoload.delay value=30 /

property name=manager.url
value=http://${cat.server}:${cat.port}/manager; /

path id=compile.classpath
pathelement location=${servlet.jar} /
/path

!-- end of default properties --

!-- pull in the tomcat task definitions --
catalina-tasks;

target name=init description=create required directories
mkdir dir=build/classes /
mkdir dir=dist /
/target

target name=clean description=remove directories created by build
delete dir=build /
delete dir=dist /
/target

target name=compile depends=init 
description=compile servlet classes 
javac srcdir=src destdir=build/classes
classpathref=compile.classpath /
/target

target name=webapp depends=compile
description=generate WARfile 
war destfile=${warfile.name}
webxml=web/WEB-INF/web.xml
fileset dir=web excludes=WEB-INF/web.xml/
classes dir=build/classes /
lib dir=lib /
/war
/target

!-- this task sets ${webapp.deployed} if, uh, it is  --
target name=checkdeploy
condition property=webapp.deployed 
http 
url=http://${cat.server}:${cat.port}/${context.path};
/
/condition
/target

!-- catalina Ant tasks  --

target name=list
description=list Contexts installed on ${cat.server} 
list url=${manager.url}
username=${tc.user} password=${tc.pass}
/
/target

target name=appbase-copy depends=webapp
description=copy ${warfile.name} to ${cat.deploydir} [ needs shared disk ] 
copy file=${warfile.name} todir=${cat.deploydir}
/
/target

target name=wait-for-tc
echo message=waiting

Re: Catalina Ant tasks

2003-02-21 Thread Rasputin
* Paul Yunusov [EMAIL PROTECTED] [0205 22:05]:
 People complained about a lack of documentation for Catalina Ant tasks.

Not complaints as such, just wondered if there was any really :) 

 best fairly accessible document I could find to date is the App Dev Guide at 
 the Tomcat doc site.
 However, I also strongly suggest looking at the tasks'  source code. Look 
 under /catalina/src/share/org/apache/catalina/ant/ in the source 
 distribution.
 
 It can tip you off as to allowed task attributes and reveal things like that 
 the tasks are implemented using java.net.URLConnection. ;)

Allowed attributes is what I was after - thanks Paul.
 
 It's strange that Catalina tasks are not list in the external task list at the 
 Ant site.

Yeah, I started looking there too - struck me a swierd there were no links.

-- 
$100 invested at 7% interest for 100 years will become $100,000, at
which time it will be worth absolutely nothing.
-- Lazarus Long, Time Enough for Love
Rasputin :: Jack of All Trades - Master of Nuns

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: applying server.xml changes without restarting server

2003-02-21 Thread Rasputin
* Simone Chiaretta [EMAIL PROTECTED] [0223 23:23]:
 Hello all,
 I'd like to know if there is a way to apply server.xml changes without
 restarting Tomcat?
 I noticed that even changes to tomcat-user.xml need a server restart...
 it there a way to see the changes without restarting?

It really depend swhat you want to do - most things in server.xml can
be configured in other ways - for eaxmple, if you want tp be able to configure 
username and passwords without restarting tomcat, you could use a jdbcrealm to
store the password info.

Similarly you can add/remove contexts using the manager app.

Most parts of the config you need to restart for will be things like
virtual hosts.
-- 
Anyone who goes to a psychiatrist ought to have his head examined.
-- Samuel Goldwyn
Rasputin :: Jack of All Trades - Master of Nuns

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: deployment with ant

2003-02-20 Thread Rasputin
* Paul Yunusov [EMAIL PROTECTED] [0229 20:29]:
 On Wednesday 19 February 2003 09:14 am, Rasputin wrote:
  Does the install ant task from 'catalina-ant.jar' work for anyone?
 
  When I try to use it works fine until I restart the server -
  it seems like the install task uses a HTTP PUT to put the warfile
  under work/ then catalina edits its own server.xml so the new
  context will survive a reboot.
  This is just what I need, but it seems to write invalid xml back to it.
 
 
 
 Have you read this:
 
 http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/context.html
 
 scroll down to the fourth paragraph under Introduction (In addition to 
 nesting..., etc).

Thanks, but I'm not sure how that helps? It's server.xml that breaks,
I've removed the couple of .xml files from my webapps folder but it
doesn't fix anything.

I've gone for plan B mentioned in another thread - copy the warfile
to an appBase that is set to 'unpackWARS=false', to stop tomcat getting
confused by unpacked contexts. I then call start/stop on the context to force
a reload - it's reliable and clean, I just need to exec scp or something
to get the files up there now.

-- 
I'll defend to the death your right to say that, but I never said I'd
listen to it!
-- Tom Galloway with apologies to Voltaire
Rasputin :: Jack of All Trades - Master of Nuns

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: ant deploy task?

2003-02-20 Thread Rasputin
* John Ruffin [EMAIL PROTECTED] [0205 18:05]:
 I asked this same question last week - with no response.  
 
 What I did was tell TC to not auto-expand and get everything from the war
 file itself.  Ant will copy the war file to catalina_home/webapps.  Then I
 use Manager to stop and start the app - restart doesn't work for me.  
 
 Testing Best Practices from the seasoned folks on the list is greatly
 appreciated.

That works a treat - thanks John, Obviously the file being physically
in webapps means it survives a reboot without requiring edits to server.xml
too. 

I just need to figure out how to remove them now:

a delete task takes care of the WARfile, then a remove ant task
will drop the context, but I get problems if the remove fails while the
file is still there.

Does anyone jnow where the documentation for the catalina ant tasks is?

-- 
There's no future in time travel.
Rasputin :: Jack of All Trades - Master of Nuns

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: ant deploy task?

2003-02-20 Thread Rasputin
* Paul Yunusov [EMAIL PROTECTED] [0223 16:23]:
 On Thursday 20 February 2003 06:43 am, Rasputin wrote:
  * John Ruffin [EMAIL PROTECTED] [0205 18:05]:
   I asked this same question last week - with no response.

   What I did was tell TC to not auto-expand and get everything from the war
   file itself.  Ant will copy the war file to catalina_home/webapps.  Then
   I use Manager to stop and start the app - restart doesn't work for me.

  That works a treat - thanks John, Obviously the file being physically
  in webapps means it survives a reboot without requiring edits to server.xml
  too.

  a delete task takes care of the WARfile, then a remove ant task
  will drop the context, but I get problems if the remove fails while the
  file is still there.

  Does anyone jnow where the documentation for the catalina ant tasks is?
 
 Ant install task doesn't create any war files. It creates a context with the 
 docBase at the same location as your build files. There is no need at all for 
 any war files to use Ant's Catalina tasks. Please read the App Dev Guide at 
 the Tomcat doc site. It is extremely useful.

I think you've misunderstood. Changes by the install task don't survive a
server restart, because they don't seem to edit server.xml.
As I said earlier, I'd prefer this because tomcat is choking
on its own server.xml after editing it. 

In any case, I've got a solution which works - I'm installing by copying
the files to appBase.

I've read the appdev guide - it's useful, but doesn't describe the
attributes of the ant tasks, which is what I need.

To clarify, all I'm looking for is the equivalent of these pages:

http://ant.apache.org/manual/anttaskslist.html

for the tasks defined in catalina-ant.jar. Does anyone know
where they are?


-- 
I thought you were trying to get into shape.
I am. The shape I've selected is a triangle.
Rasputin :: Jack of All Trades - Master of Nuns

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: tomcat ant tasks (docs?)

2003-02-20 Thread Rasputin
* Paul Yunusov [EMAIL PROTECTED] [0245 19:45]:
 On Thursday 20 February 2003 12:51 pm, Wendy Smoak wrote:
  On advice given here, I've got tomcat configured to _not_ unpack my .war
  file.  Then my ant 'deploy' target [not task] simply copies the .war file
  over to /path/to/tomcat/webapps.
 
 Wendy, why are you dealing with war files during development at all? Ant does 
 a great job installing and reloading from docBases at arbitrariry locations 
 on the filesystem. I may not have read into your problem carefully enough but 
 the very mentioning of war files with Ant Catalina tasks being used for 
 something other that final distribution causes misgivings about your setup.

Only problem with this is when you run 'ant clean' the webapp breaks!

I don't understand your phobia about using a warfile - 
it's no more work to deploy a warfile than to run a jar task, so why not do it?

-- 
Real computer scientists don't program in assembler.  They don't write
in anything less portable than a number two pencil.
Rasputin :: Jack of All Trades - Master of Nuns

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




deployment with ant

2003-02-19 Thread Rasputin

Does the install ant task from 'catalina-ant.jar' work for anyone?

When I try to use it works fine until I restart the server -
it seems like the install task uses a HTTP PUT to put the warfile 
under work/ then catalina edits its own server.xml so the new
context will survive a reboot.
This is just what I need, but it seems to write invalid xml back to it.

Next time I restart tomcat I get:

java.lang.IllegalAccessException: org/apache/catalina/core/StandardContextValve
   at java.lang.Class.newInstance0(Native Method)
   at java.lang.Class.newInstance(Class.java:237)
   at org.apache.commons.digester.ObjectCreateRule.begin(ObjectCreateRule.java:2
53)
   at org.apache.commons.digester.Digester.startElement(Digester.java:1237)
   at org.apache.xerces.parsers.AbstractSAXParser.startElement(AbstractSAXParser
.java:459)
   at org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(AbstractX
MLDocumentParser.java:221)
   at org.apache.xerces.impl.XMLNamespaceBinder.emptyElement(XMLNamespaceBinder.
java:595)
   at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XML
DocumentFragmentScannerImpl.java:747)
   at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispa
tcher.dispatch(XMLDocumentFragmentScannerImpl.java:1477)
   at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocu

etc, etc.

A diff of my (thankfully backed up) server.xml shows a *lot* of changes -
it's not like I'm doing anything funny in there:
I have a vhost, a JDBCRealm, and that's it.

I suppose I can work around it by copying the warfile to the appBase
and restarting the server, but that's highly clanky. Has anyone had more
luck? I was hoping to use this for remote deployment, so the HTTP PUT
is very useful - am I right in thinking that if the warfile was copied to
appBase (rather than a subdirectory of work), then the auto-deploy
festure would mean you wouldn't need to restart tomcat at all?
Getting rid of the webapp later would be a pain though..

-- 
Rasputin :: Jack of All Trades - Master of Nuns

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: deployment with ant

2003-02-19 Thread Rasputin
* Jacob Kjome [EMAIL PROTECTED] [0233 14:33]:
 
 First, install does not use HTTP PUT.  You are using deploy which does 
 use it.  

Sorry, yes you're right.

 Second, this has always worked for me.  Are you sure it is the 
 server.xml that is the invalid xml?  What about the web.xml in your 
 context?  

Definitely server.xml, I can see the changes there and restoring it
from backup fixes it.

 I'm not saying that there couldn't be a bug in Digester where it 
 write improper xml.  I'm just saying I've never had that problem.  What 
 version of Tomcat are you using?

tomcat 4.1.18, ant 1.5.1 - latest stable of both.

I'm a bit stumped now, since tomcat doesn't seem to notice when I overwrite
deploytest.war in appBase , even if I rm -r the extracted deploytest/
context

-- 
They're only trying to make me LOOK paranoid!
Rasputin :: Jack of All Trades - Master of Nuns

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Two Host and Same Context

2003-02-14 Thread Rasputin
* Laxmikanth M.S. [EMAIL PROTECTED] [0242 10:42]:
 Hi all,
 In tomcat 4.1.12 I have created two hosts and in each host there is a
 context with same name
 my questions are 
 how to access the second host 
 How to diffrentiate the Hosts

Um, they have different hostnames, or they would be the same host.

-- 
Rasputin :: Jack of All Trades - Master of Nuns

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Two Host and Same Context

2003-02-14 Thread Rasputin
 

  * Laxmikanth M.S. [EMAIL PROTECTED] [0242 10:42]:

   In tomcat 4.1.12 I have created two hosts and in each host there is a
   context with same name
   my questions are 
   how to access the second host 
   How to diffrentiate the Hosts

  Um, they have different hostnames, or they would be the same host.

* Laxmikanth M.S. [EMAIL PROTECTED] [0208 11:08]:
 They are different Host names

Right, so that's how you differentiate them.

You access the first host by going to

http://www.host1.net/contextname

and the second by

http://www.host2.net/contextname

Know what I mean? If the domain names don't exit, just spoof them in 
a hosts file on the client.

-- 
When you have to kill a man it costs nothing to be polite.
-- Winston Churchill, On formal declarations of war
Rasputin :: Jack of All Trades - Master of Nuns

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Fw: Fight war

2003-02-13 Thread Rasputin
* Jonathan Discount [EMAIL PROTECTED] [0223 15:23]:
 Keep this crap off the list!  Find some other way 
 to send out your ignorant drivel.

That's a little harsh, especially considering we've all put up with 
dozens of odd threads this week.

But this is a chain letter:

http://groups.google.com/groups?q=unicwash.orgie=UTF-8oe=UTF-8hl=enbtnG=Google+Search

if you want to stop the war, mail your MP or
congressman, or march.


 
 -Original Message-
 From: Evgeniy Strokin [mailto:[EMAIL PROTECTED]]
 [EMAIL PROTECTED]
 Subject: Fwd: Fw: Fight war
 
 The United States are actually going to start a war.
 Today the balance of power is pretty much uneven,
 which may lead
 to a World War III. If you want to protest as well:
 UNO is collecting
 signatures to prevent this from happening. Please
 copy this mail into a new one,
 sign at the end of the list and send it to
 everybody in your
 adress book. If you receive this list with more than
 600 names, send a copy of it to: [EMAIL PROTECTED]
 
 If you should decide not to sign this petition,
 please forward it anyway.
 Thanks.

-- 
One cannot make an omelette without breaking eggs -- but it is amazing
how many eggs one can break without making a decent omelette.
-- Professor Charles P. Issawi
Rasputin :: Jack of All Trades - Master of Nuns

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Fw: Fight war

2003-02-13 Thread Rasputin
* Turner, John [EMAIL PROTECTED] [0234 16:34]:
 
 +1 for getting this CRAP off the list.

Glad to see the fine art of argument isn't dead.

How does this help, exactly?
You should know better, John.

-- 
One cannot make an omelette without breaking eggs -- but it is amazing
how many eggs one can break without making a decent omelette.
-- Professor Charles P. Issawi
Rasputin :: Jack of All Trades - Master of Nuns

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: [OT] question about killfile

2003-02-13 Thread Rasputin
* Denise Mangano [EMAIL PROTECTED] [0241 21:41]:
 
 Sorry for the dumb question... But I keep seeing people talk about a
 killfile.  Seeing as how this is the first list I've ever subscribed to, I
 had to ask - what exactly is a killfile?  Without pointing fingers, there
 are some poster(s) I'd like to block.  I know I can block the address, or
 set up a rule in Outlook to automatically move messages from a specific
 address to the deleted items folder...  But I was just curious if this
 killfile was something different, and more effective.

I'm using procmail and Spamassassin on BSD, which both work very well
(not just for killfiles but as a general filtering system).

If you're using Outlook, then just use the Rules Wizard to block based
on sender. Most of the regulars don't change e-mail address, so if you want to
filter people out that usually helps. While you're setting it up, try sending to a
folder called 'junk' rather than auto-deleting, just to check it works. And most
people deserve a second chance too :)

On a high traffic list like this one, it might be a good idea to filter
subjects you're not interested in - for example, since i don't use Windows I tend
to remove posts about IIS or SQL server, or with the word windows in the title.

-- 
Rasputin :: Jack of All Trades - Master of Nuns

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Question about Context vs web-app

2003-02-13 Thread Rasputin
* Barley [EMAIL PROTECTED] [0256 21:56]:
 OK, so then do I have this right?
 
 I put virtual host declarations in Host containers in
 the server.xml file.
 
 I put Context's in my Host to point Tomcat at the
 various url patterns it should handle.

Yeah, pretty much - you can also  create a file called
foo.xml in hostroot/
and tomcat will create a context based on that (easier to admin than editing 
server.xml all
the time).

 I configure authorization restraints in the
 /hostroot/WEB-INF/web.xml file. 

hostroot/contextname/WEB-INF/web.xml

Well, the way I do it (I doubt it's the only way) is this:

I have a host called pussy.tenten (as in tomcat, kitty,pussy - nothing kinky), and so 
I create
a vhost called pussy.tenten by creating a Host element in server.xml. It has an 
appBase of
'pussy', so that translates to $CATALINA_HOME/pussy on my box.

Requests to http://pussy.tenten will be answered by this vhost.

Now if I create a directory pussy/test, tomcat automatically reads that as a new 
Context
called 'test'.

pussy/test/index.jsp will be viewable as:

http://pussy.tenten/test/index.jsp

WEB-INF is then inside test/ , and if I copied foo.war to $CATALINA_HOME/pussy, tomcat
auto-deploys it by extracting it to pussy/foo/ and I'd be able to view its contents at

http://pussy.tenten/foo/

 Can I configure
 authorization based on url patterns? Like all access to
 /securestuff/ requires admin access, or does this
 require a separate webapp?

That'll work, but paths inside the web.xml are usually relative to that webapp
(i.e they'd have a test/ prefix in the example above).

Very good explanation of web.xml at http://www.moreservlets.com (downloadable pdf)

Very good explanation of server.xml at the tomcat homepage.

 http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/context.html

Yeah, that's it! 

  Tim Moore / Blackboard Inc. / Software Engineer


-- 
One cannot make an omelette without breaking eggs -- but it is amazing
how many eggs one can break without making a decent omelette.
-- Professor Charles P. Issawi
Rasputin :: Jack of All Trades - Master of Nuns

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Where to put workers2.properties?

2003-02-12 Thread Rasputin
* Jake Robb [EMAIL PROTECTED] [0204 17:04]:
 I've been searching for good documentation on setting up jk2, with no luck.
 Apache's documentation is poor and incomplete.  I went out and bought a book
 on Tomcat, and it has mod_jk information, but it's pretty limited on jk2.
 
 Does anyone have a good online reference?

This one is pretty good:

http://tinyurl.com/5q55

Ignore the title, just search down for the bit on worker2.properties
 I found this one quite painless.

Still don't really understand it, but it works, once you've built
the library.

 -Jake
 
 - Original Message -
 From: Diego Algorta Casamayou [EMAIL PROTECTED]
 To: Tomcat Users List [EMAIL PROTECTED]
 Sent: Wednesday, February 12, 2003 11:52 AM
 Subject: Where to put workers2.properties?
 
 
 Hi.
 
 In mod_jk I had the JkWorkersFile /opt/jakarta/conf/workers.properties
 directive to tell where the hell is workers.properties located.
 
 I'm trying to configure mod_jk2 now but I can't find how to tell it where
 I've put the workers2.properties file.
 
 Bytes
 DAC
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 

-- 
One cannot make an omelette without breaking eggs -- but it is amazing
how many eggs one can break without making a decent omelette.
-- Professor Charles P. Issawi
Rasputin :: Jack of All Trades - Master of Nuns

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Need help w. another jsp!

2003-02-10 Thread Rasputin
* Steve Burrus [EMAIL PROTECTED] [0229 22:29]:
 
 Sean Dockery, while I VERY MUCH APPRECIATE yer helpful advice which you have offered 
to me (in fact, u are the only person so far to offer any advice for this current 
problem of mine!)

Hi Steve, that's because most of us have killfiled you for 
being abusive in the past. Luckily for you my filters expired.

Don't use 'current-Cal' as a variable name, the compiler is confused
and thinks you're asking for it to subtract the variable
'Cal' from 'current'. Replace that with currentCal and it should compile.

HTH, if not tough, cos you're going back in the killfile now :)
Cheers!


 C:\jakarta-tomcat-4.1.18\work\Standalone\localhost\_\calendar_jsp.java:92: cannot 
resolve symbol
 symbol  : variable current 
 location: class org.apache.jsp.calendar_jsp
current-Cal.getActualMaximum(currentCal.DAY_OF_MONTH);
^
 An error occurred at line: 64 in the jsp file: /calendar.jsp
 
 Generated servlet error:
 C:\jakarta-tomcat-4.1.18\work\Standalone\localhost\_\calendar_jsp.java:92: cannot 
resolve symbol
 symbol  : variable Cal 
 location: class org.apache.jsp.calendar_jsp
current-Cal.getActualMaximum(currentCal.DAY_OF_MONTH);
^
 2 errors

-- 
One cannot make an omelette without breaking eggs -- but it is amazing
how many eggs one can break without making a decent omelette.
-- Professor Charles P. Issawi
Rasputin :: Jack of All Trades - Master of Nuns

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Graphics (CEWOLF) using tomcat4.0.3

2003-02-05 Thread Rasputin
* Ralph Einfeldt [EMAIL PROTECTED] [0213 14:13]:
 We use the xvfb to achieve that goal. (It's
 typically part of the linux distribution)

nitpick 
Works over here on BSD too, so I guess it's an XFree86 (4?) thing
/nitpick

 The only thing we have to change in the tomcat 
 installation is to set an env var DISPLAY that
 points to te virtual frame buffer.

-- 
Rasputin :: Jack of All Trades - Master of Nuns

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Betr.: FreeBSD, JK2, Tomcat 4.1, Apache 2.0.44

2003-01-31 Thread Rasputin
* Jacco Braat [EMAIL PROTECTED] [0122 09:22]:

 Hi,
 try rebuilding Apache from the ports with the -DWITH_THREADS option
 Jacco.
  [EMAIL PROTECTED] 31-1-2003 0:05:05 
 Hi, could someone please point me to a reference on how to make these
 three work neatly together? Apache 2.0.44 is nice up and running on
 FreeBSD 4.7, and even Tomcat makes its purring sound. No JK, though.
 
 Syntax error on line 1 of /usr/local/apache2/conf/mod_jk.conf:
 Cannot load /usr/local/apache2/modules/mod_jk.so into server:
 /usr/local/apache2/modules/mod_jk.so: Undefined symbol
 pthread_mutex_unlock
 
 Apparently I need to add a -lpthread to some Makefile statement, but I
 cannot figure out where to put it? Suggestions?

No, on Linux you need '-lpthread' - on BSD it's just '-pthread'.
Grep for -lphtread in the source tree and drop the 'p'.

-- 
Rasputin :: Jack of All Trades - Master of Nuns

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: JK2 workers2.properties (was Re: Apache Tomcat Virtual Host)

2003-01-21 Thread Rasputin
* Rasputin [EMAIL PROTECTED] [0148 21:48]:

Sorted! Just re-enabled the pussy.tenten vhost and mapped  

[uri:pussy.tenten/*]

insread.

 -
 
 workers2.properties has this:
 
 -
 [uri:pussy.tenten]
 group=lb
 
 [uri:/examples/*.jsp]
 info=Extension mapping
 -

-- 
Rasputin :: Jack of All Trades - Master of Nuns

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




JK2 workers2.properties (was Re: Apache Tomcat Virtual Host)

2003-01-20 Thread Rasputin
Are there docs anywhere explaining how to setup jk2 vhosts in
workers2.proeprties?

I'd like to avoid using httpd.conf edits, due to file permission issues.

Google isn't helping as much as it should, and the jakarta docs will no
doubt make sense once they're explained to me :)

Basically, I'm using named-based hosts with apache2.

The virtual host is pussy.tenten - it's defined in server.conf
and httpd.conf.

httpd.conf has a vhost like this:

-

VirtualHost *
ServerAdmin [EMAIL PROTECTED]
#   DocumentRoot /opt/www/pussy/docs
ServerName pussy.tenten
ServerAlias www.pussy.tenten
ErrorLog /opt/www/logs/pussy.error.log
CustomLog /opt/www/logs/pussy.access.log combined
#
/VirtualHost

-

workers2.properties has this:

-
[uri:pussy.tenten]
group=lb

[uri:/examples/*.jsp]
info=Extension mapping
-

Oddly enough, pussy.tenten/examples/foo.jsp gives an apache 404 error,
but docs.tenten/examples/foo.jsp gives a tomcat error - docs.tenten is
another vhost (I disabled the examples webapp).

Basically, my meddling has meant that not even global URI mapings work
for this vhost :)

How do I map all traffic to pussy.tenten over to tomcat?

-- 
Rasputin :: Jack of All Trades - Master of Nuns

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: Game server - two player board game

2003-01-19 Thread Rasputin
* Steven J. Owens [EMAIL PROTECTED] [0128 23:28]:
 On Sat, Jan 18, 2003 at 12:48:20PM -0800, Mark wrote:
  Hi, I'm using Tomcat 4.1 to set up a game server for the two player
  board game, Tanbo (similar to Go). Basically, I will be providing one
  board and a waiting list, and a chat.
   
  I need advice on how to set up the object architecture. I'm
  considering using an int array to represent the board. And possibly a
  separate class to evaluate legal moves.
   
  I need advice on security, persistence, thread safety and anything
  else that I might need to know to make this a successful web site
  (tanbo.com).
 
  You might be better off asking for help at javagaming.org,
 gamedev.net, or possibly rec.games.programmer.  Javagaming.org used to
 have a mailing list, but it appears they've dispensed with that in
 favor of a forums system on the website (frankly, I miss the mailing
 list).  The [EMAIL PROTECTED] mailing list is fairly active
 and (oddly enough) game programming oriented, so they might be able to
 help you out.

Thanks a lot for the link - I've tried several times to write online games,
and have never got a project off the ground because I don't
have clue about architecture.


-- 
Rasputin :: Jack of All Trades - Master of Nuns

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: Basic questions

2003-01-13 Thread Rasputin
* [EMAIL PROTECTED] [EMAIL PROTECTED] [0115 21:15]:
 
 # run the following script
 
 #!/bin/sh
 
 JAVA_HOME=/usr/java
 TOMCAT_HOME=/usr/local/tomcat
 
 su - myuser -c ${TOMCAT_HOME}/bin/startup.sh

This is pretty much what I do, only I find it's generally better not
to set a CLASSPATH - tomcat sets up its own, I always found *un*setting
it led to less confusion in the long run.

The script above can also be used to start tomcat at boot time, since it safely
su's if run as root.

If you set the users home directory to whereever you installed
tomcat, and 'chown -R myuser' it, that usually sorts out permissions.

 a typical crontab entry
 
 0 0 * * * cd /path/to/script ; ./restart_tomcat.sh  /var/log/myout.dat
 
 which says run at midnight every day.

Only snags with that are:
a) it tries to start tomcat each time it runs, without checking if it's already
up. Probably a  non-issue.
b) it only runs every 24 hours! I'd whack that up to every 15 minutes, if there
are stability issues with it. Can't say I'd see this as necessary though - if
tomcat is crashing, that should be resolved, rather than this fix.

 There are probably more elegant ways to do this but that should get you 
 started.

-- 
Rasputin :: Jack of All Trades - Master of Nuns

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: Checking if Tomcat is up

2003-01-13 Thread Rasputin
* Abhijat Thakur [EMAIL PROTECTED] [0155 18:55]:
 
 Is it pssible to check intemittently through my java application if my Tomcat server 
is up ? What can i check for to see if my Tomcat server is up. The scenaruio is that 
if something happens to Tomcat where my it hangs up i should ring my application 
down, for that i have to check intermittently if my Tomcat is up. What is it that i 
can check to see if Tomcat is up ?

I'd either go for a simple test - like seeing if you can reach
port 8005 (the shutdown port).

If you want a fuller test, then maybe download a jsp or similar.

-- 
Rasputin :: Jack of All Trades - Master of Nuns

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: Can't find JAVA_HOME

2003-01-12 Thread Rasputin
* David Durst [EMAIL PROTECTED] [0102 08:02]:
 I just dumped the tomcat 4.1.18 from RPM onto a system.
 It can't seem to find JAVA_HOME.
 
 I echo $JAVA_HOME
 and it comes back perfect, any clues

what does 

ls $JAVA_HOME 

return?

If your java binary is in /opt/bin/java, it should be set to
/opt , not /opt/bin

-- 
Rasputin :: Jack of All Trades - Master of Nuns

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: JDBCRealm

2003-01-12 Thread Rasputin
* Rob Abernethy IV [EMAIL PROTECTED] [0130 19:30]:
 Alright, I finally have my answer.  Postgres prepends the username to the 
 password before creating the digest.  For example, if I wish to create a 
 postgres account with the username 'tomcat' and password 'tomcat', postgres 
 will prepend 'tomcat' to 'tomcat' to create 'tomcattomcat' and then make the 
 digest.  Unfortunately, I don't think there is any way to tell postgres 
 *not* to use a salt when creating the encrypted version of the password.

I don't see this with my setup, so I guess it's specific to pgsql system passwords.
Have you tried asking on the postgresql mailing lists?

-- 
Rasputin :: Jack of All Trades - Master of Nuns

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: help - tomcat/dbcp deployment

2003-01-12 Thread Rasputin
* Paul Yunusov [EMAIL PROTECTED] [0127 19:27]:
 On Sunday 12 January 2003 02:50 pm, David Durst wrote:
   Well, to get DBCP working was not difficult at all. I just followed
   Tomcat how-to docs. And, as I learned from other people, it's being used
   on a production level.
 
  I have been trying to get this damn thing working w/ postgres for about
  a week now.

  I got it working on 1 machine (MY DESKTOP) from a completely fresh install
  of 4.1.18 w/ J2SDK 1.4.

  I attempted to duplicate the enviroment on the development server, and I
  think I have achieved duplication, BUT it still doesn't work.

  It seems not not be able to find the JDBC driver, it thinks the
  driverClassName I am passing through is NULL.
 
 Try putting the driver's jar file in $JAVA_HOME/jre/lib/ext 

I put the j2ee jarfile for postgresql in $catalina_home/common/lib/,
that worked fine. Get the latest jar from jdbc.postgresql.org and try that.
If the OP still has trouble and wants to compare notes, post again - this was a
doddle with my setup. 

I'm using PgSQL 7.2.3 ( upgrading to 7.3.1 as I type this),
tomcat 4.1.18 and suns 1.3.1 jdk. Only snag I had was using md5 passwords to
authenticate tomcat itself, I fixed that by using the 7.3 postgresql jarfile.

-- 
Rasputin :: Jack of All Trades - Master of Nuns

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: SV: Can?t access Tomcat from outside router, help !

2003-01-10 Thread Rasputin
* [EMAIL PROTECTED] [EMAIL PROTECTED] [0110 11:10]:
 No FW 

If you're *sure* about that, might it be a DNS issue?

Try connecting to your ip address insread. And check it;s not a private IP.

-- 
Rasputin :: Jack of All Trades - Master of Nuns

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: why doesn't tomcat see my correct keystore?

2003-01-09 Thread Rasputin
* Rob Lagana [EMAIL PROTECTED] [0108 23:08]:
 
 
 I found out that tomcat was looking at the .keystore default...
 However I specified in the server.xml file the below and tomcat just 
 ignores it.

  Parameter Name=keystore Value=C:/keystore/newstore /

I'd try putting the path relative to $CATALINA_BASE - maybe there's a
bug with the C:\ part?

keystoreFile:
Add this attribute if the keystore file you created is not in the default
place that Tomcat expects (a file named .keystore in the user home
directory under which Tomcat is running). You can specify an absolute
pathname, or a relative pathname that is resolved against the
$CATALINA_BASE environment variable.
-- 
Rasputin :: Jack of All Trades - Master of Nuns

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: limiting access by IP address

2003-01-08 Thread Rasputin
* Joel Rees [EMAIL PROTECTED] [0146 08:46]:
  You can do the
  same things with Valves and Filters for free.
 
 Stupid question, but what exactly is the point of limiting access by IP
 address? (IP addresses being spoofable, and all, ...)

Well, yeah, but if you assume your network is intact
(not necessarily secure), then  it's worth having.

In practice, IPs are fairly hard to spoof without breaking routing.

-- 
Rasputin :: Jack of All Trades - Master of Nuns

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: RPMs

2003-01-07 Thread Rasputin
* Kevin Wilson [EMAIL PROTECTED] [0134 17:34]:
 If you have a Linux box and like to keep your installed programs nice and
 tidy using the RPM program then rpms are essential unless there is another
 program used for managing installation of program from tar/tgz/tar.gz
 archives? 
 
 I run SuSE v8.0  8.1 and there was a kb article that said to use a program
 called /sbin/installpkg for installing .tgz packages but I have never seen
 this nor am I sure that tar.gz is the same as .tgz
 
 Guidance?

tgz == tar.gz == tarball.
You just extract them and everything you need is there. You get on with your life.

For a taste of how much saner than RPM things can get, I recommend the Penguinistas 
among
you try something like gentoo, or another Linux software system which is based on *BSD 
packages.

You get all the ease of admin and version control, without the horrors of updating
(say) Mozilla and finding it's been compiled against slightly differnet versions of 
your
libraries, so having to download 12 new RPMs for those libraries, which in turn breaks 
dependencies on other packages which need those libraries... rinse, repeat.
Try doing that for libraries that RPM itself depends on, or libc, for example.
Fun for all the family.

How we laughed when RedHat released the new version of rpm, and the
rpm of, uh, rpm was released in the *new* format.

Which made it impossible to install, unless you'd already installed it. Nice.
I haven't used Linux since, and still have bad dreams about it.

I hear Suse is less horrible, but then I hear a lot of things...

-- 
Rasputin :: Jack of All Trades - Master of Nuns

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: JDBCRealm

2003-01-07 Thread Rasputin
* Rob Abernethy IV [EMAIL PROTECTED] [0154 21:54]:
 OK. I was able to get clear-text passwords to work, but I still can't get
 encrypted passwords to work.  Using MD5 encryption, Tomcat is able to
 successfully open a connection to the database using the JDBCRealm set up in
 the server.xml, but it is unable to authenticate users for the admin web app.
  I am using the same username and password (username = tomcat, password =
 tomcat) for both the JDBCRealm and the admin web app.
 
 JDBCRealm:
 Realm  className=org.apache.catalina.realm.JDBCRealm debug=99
driverName=org.postgresql.Driver
 connectionURL=jdbc:postgresql://bilbo.dynedge.com/template1
connectionName=abernethy connectionPassword=gceIlu4DaR
 userTable=pg_shadow userNameCol=usename userCredCol=passwd
 userRoleTable=pg_groupview roleNameCol=groname
digest=MD5 /
 pg_shadow:
 usename  | passwd
 -
 tomcat   | md5efcc1c51a80be13b59cdb96d758a0184

You are confusing postgres usernames/passwords with the ones you want in the tables.
Tomcat connects to the database as user connectionName , password connectionPassword

and looks up http authentication users and passwords in userTable  and userRoleTable.

It looks from your post like you have that backwards (pg_shadow holds postgres users, 
not users
for your apps).
 
 postgresql log (for admin web app authentication):
 Jan  7 16:43:34 bilbo postgres[4329]: [9] LOG:  query: SELECT passwd FROM
 pg_shadow WHERE usename = 'tomcat'
 Jan  7 16:43:34 bilbo postgres[4329]: [10] LOG:  duration: 0.001636 sec
 
 catalina_log.2003-01-07.txt:
 2003-01-07 16:43:34 JDBCRealm[Standalone]: Username tomcat NOT successfully
 authenticated

-- 
Rasputin :: Jack of All Trades - Master of Nuns

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




servlet load-on-startup

2003-01-06 Thread Rasputin

Does load-on-startup still work for anyone under 4.1.18?

Just wanted to check for now, I'm not sure if it's a problem with jk
 or with tomcat itself yet.

-- 
Rasputin :: Jack of All Trades - Master of Nuns

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




timestamps in catalina.out ?

2003-01-04 Thread Rasputin

I know it's technically System.err, but is there a way to add
timestamps to it? Sorry if it'sa FAQ, I think I'm seeing problems in
the threading code and this would help confirm or deny it.

-- 
Rasputin :: Jack of All Trades - Master of Nuns

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: Hey Jeffrey

2002-12-28 Thread Rasputin
* Gman [EMAIL PROTECTED] [1221 00:21]:

 Syntax Error on line 985 of C:/Apache/conf/httpd.conf:
 Invalid command 'JkWorkersFile' Perhaps it is mis-spelled or defined by
 a module not included in the server configuration.

 Obvisouly the worker file is not where it is supposed to be hehehe.

No, that means Apache doesn't understand what a JkWorkersFile is -
which means you haven't loaded mod_jk properly.

Have you got an uncommented LoadModule in httpd.conf ?
 
-- 
Rasputin :: Jack of All Trades - Master of Nuns

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: [OFF-TOPIC] RE: Na?ve question about root

2002-12-19 Thread Rasputin
* Ben Ricker [EMAIL PROTECTED] [1231 20:31]:

 On Wed, 2002-12-18 at 12:26, Matt Harris wrote:
  Apache normally runs multiple processes to handle multiple simoultaneous
  user requests.  This can be configured in your httpd.conf.  Tomcat runs
  multiple processes, which it calls workers.  Since tomcat is in java
  and not a truly binary-compiled language (like C or C++) it runs under
  java which is part of your JRE (java runtime environment).  

Is that right? I thought these were multiple threads, not processes
(see below).
 
 Another small tidbit: Linux's 'ps' command shows threads as processes.
 Apache runs multiple processes, but Java runs one processes with
 multiple threads. Can't remember why Linux does that...

geek
Linux uses a model called 'process threads', where a single
process with multiple threads in it gets mapped to one system process
per thread. Technically this breaks POSIX compatibility, because threads
in a single process are supposed to have the same PID.

Solaris uses a totally different threading model called
'schedular activations' which is far too complicated to discuss here.
The BSDs use a different model again.
So generally you only see the
'lots of threads look like lots of processes' bug under Linux.
/geek

 Anyway, we run our Tomcats on Solaris and there is only one java process
 per Tomcat instance listed in 'ps'.

-- 
Rasputin :: Jack of All Trades - Master of Nuns

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: Apache Web Server vs. Tomcat

2002-12-19 Thread Rasputin
* Michael Finney [EMAIL PROTECTED] [1251 18:51]:
 Thank you.   I figured it comes up all the time and
 trying to find something in the jGuru FAQ was not
 yielding anything.
 
 PHP may be desired by someone on the team.  However,
 increasing the complexity of the architecture topology
 just to use PHP does not seem like a great idea.  
 
 Apache doesn't run as root on port 80 ... sounds
 like the only applicable reason.  I assume Tomcat
 handles requests as root then.  That would get into
 security issues.  

Any process needs to be root to open port 80 on a *NIX.
Read the very long thread from a couple of weeks ago for more details.

-- 
Rasputin :: Jack of All Trades - Master of Nuns

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: Tomcat Documentation WAS: jsps and servlets don't work

2002-12-19 Thread Rasputin
* Joseph Shraibman [EMAIL PROTECTED] [1233 03:33]:

 Jerry Ford wrote:
 With all due respect and recognition to the enormous efforts you 
 personally appear to have put into making Tomcat accessible, the 
 documentation is neither comprehensive nor adequate, for either Tomcat 
 or whatever is the connector du jour.  There are pockets of good 
 documentation, such as your how-tos and seemingly tireless presence on 
 this mail list, surrounded by lots of chaffe---incomplete, inaccurate, 
 out-of-date, even non-existent files inside of tarballs or littered 
 around the jakarta.apache.org website.

Definitely. But at the end of the day this is an Open Source project.
If people don't want to write documentation, they won't, and there's not
a lot you can do to persuade them.
I'm not playing the 'use the source Luke' card, I'm just telling you
how it is. In my experience of Open Source projects, all ranting does
is getting you killfiled.

The real fix for this is to put the website docs into CVS and let people
send patches. Then people who like writing documentation can write docs,
and the coders can get on with coding.

Maybe it's already in CVS. I couldn't find any docum... oh :D

Craig (or anyone), do we have an address to recieve doc patches?

-- 
Rasputin :: Jack of All Trades - Master of Nuns

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: custom error 500 page for missing applications

2002-12-19 Thread Rasputin
* Galbayar Dorjgotov [EMAIL PROTECTED] [1248 08:48]:
 error-page
   error-code500/error-code
   location/errors/500.html/location
 /error-page
 
 add this lines to the web.xml

Yeah, you'd think so, wouldn't you? But have you tried this?
I had trouble with this on 4.1.12.  I think 500s might be a special case,
because they mean your servlet died.

Might be worth trying

error-page
exception-typeyour.Exception/exception-type
location/500.jsp/location
/error-page
-- 
Rasputin :: Jack of All Trades - Master of Nuns

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: tomcat config problems

2002-12-19 Thread Rasputin
* Rob Augustinus [EMAIL PROTECTED] [1221 11:21]:
 
 Hi,
 
 Just new to the list.. since I have a little problem with my
 config. I was trying to install tomcat on my linux box and 
 setting it up to use a different appBase in my /var/ directory.
 
 I was assuming that :
 Host name=localhost debug=0 appBase=/var/tomcat/webapps
unpackWARs=true autoDeploy=true

are you sure that's all you changed? Looks like your classpath is b0rken.

Maybe you've found a bug? Does making appBase a relative path fix it?
(i.e. does it work if that directory is under $CATLINA_HOME ? )

 would do the trick, but this seems to get me in some trouble
 as now tomcat will not start. $CATALINA_HOME/logs/catalina.out
 tells me this :
 
 Exception during startup processing
 java.lang.ClassNotFoundException: org.apache.catalina.startup.Catalina
 at
 org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLo
 ader.java:992)
 at
 org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLo
 ader.java:857)
 at
 org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:176)
 
 looking around in the docs (probably not good enough:-) I couldn't 
 really figure out how to fix this. Can someone point me in the
 right direction?
 
 Rob Augustinus
 
 
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]
 

-- 
Rasputin :: Jack of All Trades - Master of Nuns

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: 4.1.17 Problems - Possibly Coyote Connector?

2002-12-19 Thread Rasputin
* Luc Foisy [EMAIL PROTECTED] [1214 20:14]:
  
   The actual web application did not seem to have a problem on 
   the front side. Everything went on as normal on 4.1.12
   Pages failed to be served correctly on 4.1.17 ( they are 
   blank ) though logging on with a new session will serve the 
   first couple pages then start blanking.

  This looks like exactly what is happening to me. 4.1.12 
  works, 4.1.17 gives me the problem. One thing to note is that my application does 
  not use JSP so must be a catalina or coyote issue. Are you using the stock 
  Coyote/HTTP 1.1 connector or are you using one of the JK connectors?

 I am using whatever 4.1.x is set to use by default. Which I am pretty sure is the 
Coyote/HTTP 1.1 connectors.

This might be a dumb question, but have you tried using the older http/1.1
connectors to see if the problem goes away? At least then you know it's
Coyote's fault.

-- 
Rasputin :: Jack of All Trades - Master of Nuns

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: Develop App: Message says JAVA_HOME is not set

2002-12-19 Thread Rasputin
* John Brayton [EMAIL PROTECTED] [1202 15:02]:
 Paul Campbell wrote:
 JAVA_HOME is set in my profile and I have verified
 by echo $JAVA_HOME. Initially, I had it set to a
 symbolic link /var/java but made it explicit with the same result
 
 A couple things to check:
 
 Verify that you have (either in your profile or manually) typed export 
 JAVA_HOME.  This will make the environment variable available inside 
 other scripts, such as the Tomcat start/stop script.

Watch that, not all shells understand 'export FOO=bar', sometimes you need
BAR=foo
export FOO

(Solaris sucks even harder than usual in this respect).

Sticking these two lines in startup.sh and shutdown.sh makes it happy.
I don't like changing /etc/profile because

a) not all shells grok it
b) sometimes I use ropey development JVMs, and I usually want tomcat
to use a stable one


-- 
Rasputin :: Jack of All Trades - Master of Nuns

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: Tomcat Administration Tool

2002-12-18 Thread Rasputin
* Jon Eaves [EMAIL PROTECTED] [1238 13:38]:
 Hi all,
 
 The Tomcat Admin Tool uses a UserDatabaseRealm for authentication and
 for editing as part of the configuration options. This uses the
 conf/tomcat-users.xml file for the source of information
 
 I was interested in knowing if anybody has configured Tomcat _and_
 the Admin tool to use an alternate Realm, like JDBCRealm or a
 close cousin that the Admin Tool can manage ?

Do you using another way to limit access to the admin tool? If so, then
read the realm howto on the homepage; I use a PostgreSQL database for 
storing users and passwords, it works weel for me.

If you mean you want to be able to manage these password databases using
the admin servlet, then I'm not sure; Tomcat doesn't have write access
to my database tables (I use other ways of inserting new users) so it
wouldn't be able to update my database, for example.

-- 
Rasputin :: Jack of All Trades - Master of Nuns

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: Apache-Tomcat HOWTO

2002-12-18 Thread Rasputin
* Turner, John [EMAIL PROTECTED] [1208 17:08]:
 
  -Original Message-
  From: Rasputin [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, December 17, 2002 5:41 AM
  To: Tomcat Users List
  Subject: Re: Apache-Tomcat HOWTO
  
  
  * Turner, John [EMAIL PROTECTED] [1201 14:01]:
   
   Not sure what JK2 needs to work, I don't use it.  You 
  should be able to
   build it from the same source package as JK.  I was able to 
  do so on my Red
   Hat test box, but it took quite a bit of hacking around.
  
  But you need a local install of Java; is that right?
 
 Not sure.  I've used --with-java=${JAVA_HOME} when building the connectors,
 and have also built them without it.

I tried a straight ./configure / ./build.conf.sh, and it complains
about lack of a local JVM. So I think I'm stuck.
 
  although am I right in thinking a JkMount command can only 
  forward URIs
   'as-is'?  i.e if I set 
  
  JkMount /neotokyo/* lb

  then the request is going to be sent as a request to 
  /neotokyo/whatever.jsp  ... to the default host.
 
 Not the defaultHost, but whatever Apache VirtualHost has the JkMount.  If no
 VirtualHost, than the value of Apache's global ServerName.  Tomcat will try
 and match that value with a corresponding Host element and go from there.

  And is the Host part of the protocol, so you can dedicate 
  virtual hosts to AJP clients? I got around this by having a Tomcat virtual 
  host with the DNS name of the Apache webserver, and setting it as the 
  Engines default host - since no HTTP requests should come into tomcat  asking for 
  that host, it solves the problem but is pretty clanky.
 
 As far as I know, there's no need to set defaultHost at all...if you needed
 to do this, you could never have more than one virtual host, which is not
 the case.

Right - from what you say, the reason my setup above works is that my
defaultHost happens to be set to the name of the virtual host in Apache -
it's good to know I can still use tomcat vhosts with JK, I use them
fairly heavily...

Thanks ! 

-- 
Rasputin :: Jack of All Trades - Master of Nuns

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: Almost there...Updated Apach-Tomcat with mod_jk .. please he lp!

2002-12-17 Thread Rasputin
* Denise Mangano [EMAIL PROTECTED] [1236 09:36]:

 I do have appropriate permissions, as I have been able to stop it before.
 There is no error message being logged when I try to stop it.
 
 I ran ps -A which listed all processes.  httpd (apache) was not one of them.
 I am assuming PID means Port ID(?), and neither 443 nor 80 was listed...

Use this next time:

netstat -an|grep LISTEN|grep 443

Nice simple way to show what's listening on a port, and pretty
portable AFAIK.
-- 
Rasputin :: Jack of All Trades - Master of Nuns

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: Apache-Tomcat HOWTO

2002-12-17 Thread Rasputin
* Turner, John [EMAIL PROTECTED] [1201 14:01]:
 
 Not sure what JK2 needs to work, I don't use it.  You should be able to
 build it from the same source package as JK.  I was able to do so on my Red
 Hat test box, but it took quite a bit of hacking around.

But you need a local install of Java; is that right?
 
 JK isn't really deprecated, the dev team is just pursuing JK2.  In my
 opinion, JK is quite stable and JK2 is not ready for prime time, though
 that is my personal preference.  

Ok, thanks. I setup a Coyote/JK2 Connector on the tomcat side and used
mod_jk to forward AJP13 requests to it. That seems to work pretty well,
although am I right in thinking a JkMount command can only forward URIs
 'as-is'?  i.e if I set 

JkMount /neotokyo/* lb

then the request is going to be sent as a request to /neotokyo/whatever.jsp
- that is, as a request for whatever.jsp in the context neotokyo
to the default Host element in my engine? I might have missed something, but
don't see how else it could work. The workers aren't URL aware, they
just shovel requests into sockets.

Doesn't this mean that if you mapped *.jsp, you'd need either a ROOT context
with directories mirroring Apaches tree, or a Context for each top-level
directory on the Apache side?

And is the Host part of the protocol, so you can dedicate virtual hosts to
AJP clients? I got around this by having a Tomcat virtual host with the
DNS name of the Apache webserver, and setting it as the Engines default host
 - since no HTTP requests should come into tomcat  asking for that host, it
solves the problem but is pretty clanky.

If these seem to be odd questions, bear in mind I'm comparing this to
a mod_proxy / Coyote Proxy Connector solution, which seems more
flexible on first impression. I just wanted to be sure I know how this works,
also does anyone know if jk2 addresses these issues?

Thanks a lot.

-- 
Rasputin :: Jack of All Trades - Master of Nuns

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: Multiple realms in tomcat

2002-12-17 Thread Rasputin
* Ben Jessel [EMAIL PROTECTED] [1238 17:38]:
 Can you set up multiple JDBC realms in tomcat 4x or are you stuck with just the one?

From:

http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/realm.html

You may nest a Realm inside any Catalina container (Engine, Host, or
Context). In addition, Realms associated with an Engine or a Host are
automatically inherited by lower-level containers, unless explicitly
overridden.

I haven't tried it, but it sounds like it'll work.

 Also, say that you had no control over configuring server.xml ( say, you had web-app 
space with an ISP ) is there any way you could configure a web-application wide realm 
 without having to play around with other configuration files?

As far as I know, Realms exist on the server level, so if you're asking
about configuring one from web.xml, forget it.
 If you've got autoDeploy enabled for your webapps folder, though, you can
probably add a 'context.xml' file in there which contains a Realm -
that would mean you could avoid editing server.xml...

See:

http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/host.html#Automatic%20Application%20Deployment
-- 
Rasputin :: Jack of All Trades - Master of Nuns

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: Apache-Tomcat HOWTO

2002-12-16 Thread Rasputin
* Turner, John [EMAIL PROTECTED] [1214 14:14]:
 
 NOTE: the ./configure method assumes you have a sane build environment:
 libtool, GNU make, autoconf, m4 
 
 a) cd to CONNECTOR_HOME/jk/native. 
 
 b) check README and README.configure. 
 
 c) run buildconf.sh: ./buildconf.sh. This will create a file called
 configure in CONNECTOR_HOME/jk/native. 
 
 d) run configure: ./configure --with-apxs=/some/path/to/apache/bin/apxs
 --with-java-home=${JAVA_HOME} 
 
 e) run make: make 

I got this far from CVS, then had to manually copy mod_jk.so from
./.libs/ in that directory into place for Apache2 to load it.
It seems fairly happy though, so that's not a problem.

But unless I'm mistaken, this is a mod_jk connector.
I was hoping for JK2 (since I see warnings that JK is deprecated) -
I was following the docs linked from the 4.1 connector reference, are
they for Jk (rather than jk2)?

I tried to build from the native2 directory, but this seems to require a
local JDK - that's no go for me, NetBSD on sparc doesn't have a 1.2 JVM :(

Am I missing something, or does JK2 need a local JVM to work? If so, why?

-- 
Rasputin :: Jack of All Trades - Master of Nuns

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: The future of Tomcat and java.nio

2002-12-11 Thread Rasputin

* micael [EMAIL PROTECTED] [1241 19:41]:
 PLEASE make them use JDK 1.4.

Please don't. 1.4 is unstable on many platforms at present.
 

-- 
Rasputin :: Jack of All Trades - Master of Nuns

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: URGENT : Multiple host in Tomcat

2002-12-10 Thread Rasputin
* Laxmikanth M.S. [EMAIL PROTECTED] [1238 13:38]:

 I have two host...
 one is the default and one more i have created...

 the second host I am pointing to a DNS enrty.I have even created a
 context for this host but when I open the site it show the below error
 check it at http://ftisites.sonata-software.com:8080
 
 even i want to remove te port number from the site...how that can be done
 HTTP Status 500 - No Context configured to process this request

Please post the Host entries from server.xml .
There should be one for each virtual host you want, the trick is each host has
it's own 'webapps' folder, set by the appBase attribute in the XML tag.

The error below seems to suggest you haven't created a ROOT element for one of the 
vhosts.

Name-based virtual hosting generally works a treat on tomcat; it's the same
method Apache uses by default for it's virtual hosts.

 type Status report
 message No Context configured to process this request
 description The server encountered an internal error (No Context configured
 to process this request) that prevented it from fulfilling this request.

-- 
Rasputin :: Jack of All Trades - Master of Nuns

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: Why run tomcat as root

2002-12-09 Thread Rasputin
* Nikola Milutinovic [EMAIL PROTECTED] [1238 08:38]:
 
 Just to clarify things a bit, before I ask for a new feature in Tomcat. 
 Most security conciencious servers on UNIX (like BIND 9) use this 
 sequence:
 
 1. Bind to TCP ports
 2. Load all dynamic modules, libraries (usually done by the loader)
 3. chroot()
 4. setuid()
 
Yes, this looks like a UNIX specific thing, but what does this gain you?
All it protects you from is file access, an unprivileged user does the
same without the hassle of chrooting a JVM. The network is still
vulnerable to abuse.

(following is a general comment and not directed at Nikola personally)

Just run tomcat as a normal user and port-forward. Read Proxy Support HOWTO
and treat the forwarded port as a proxy server. Job done. Get on with
your life.

This discussion has gone on for over a week now.  I seem to remember
there are one or two other lists for Linux system administration on the
Net so can we please pack this thread in? :)

(PS: If you insist on normal users binding to port 80, google for
'privileges' and read some white papers. The BSDs have done a lot of work
in this area.)

-- 
Rasputin :: Jack of All Trades - Master of Nuns

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




mod_webapp status

2002-12-04 Thread Rasputin

Just a quickie - is mod_webapp supported? It seems a bit light on
documentation on the Tomcat site, maybe I'm missing an obvious link?

-- 
Rasputin :: Jack of All Trades - Master of Nuns

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: DNS NAMES

2002-12-04 Thread Rasputin
* Laxmikanth M.S. [EMAIL PROTECTED] [1208 11:08]:
 Hi Noel,
 I want to create a DNS name itself like thatis it possible.

No. But you can create a context called /final on www.test.com,
which will recieve requests for that URL.

(Although test.com is taken :) )

   Is it possible to create a DNS Name like www.test.com/final.

  The DNS name is www.test.com.  The /final is not part of the DNS.  The
  www,
  by convention only, implies a protocol of HTTP and a port of 80.  But if
  you
  are unfamilar with the Domain Name System, that is probably just going to
  confuse you.
  
  see also: http://www.dns.net/dnsrd/rfc/

-- 
Rasputin :: Jack of All Trades - Master of Nuns

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: Different appBase for more virtual hosts

2002-12-04 Thread Rasputin
* cris.moreira [EMAIL PROTECTED] [1220 11:20]:

 Hello. I'd like to know, or if you have some server.xml example to show me, 
 how can I configure more than one Virtual Host in Tomcat, and each host 
 pointing to a different directory of webapps. 

Normally when you define appBase, that defines a new direcotry like webapps,
i.e. if you have an appBase of 'foo', in a host 'foo.com' then requests to

'foo.com/test' get sent to the webapp in $CATALINA_BASE/foo/test/

 I know that I must set up the 
 parameter appBase in the tag Host.../Host, but can I have more than 
 one host... inside an Engine or must I create another Service of it? 

Multiple Hosts can share an Engine, yes.
-- 
Rasputin :: Jack of All Trades - Master of Nuns

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: Cannot shutdown Tomcat with GLIBC in unstable

2002-12-04 Thread Rasputin
* Charles Baker [EMAIL PROTECTED] [1202 15:02]:

 I just tried to shutdown Tomcat 4.1.12-2 using Sun JDK
 1.3.1_03 on my box running unstable. I got the
 following undefined symbol message and Tomcat does not
 shutdown. Does anyone have a suggestion for what I
 should do other than kill the Tomcat pids? I wonder if
 I do that will Tomcat be able to restart?

Upgrade your version of Java  - it looks like your C library is
out of step with your JVM (glibc is the Linux c library).

What version of Linux are you using?

 usmghdebian:~# /usr/share/tomcat4/bin/shutdown.sh
 Using CATALINA_BASE:   /usr/share/tomcat4
 Using CATALINA_HOME:   /usr/share/tomcat4
 Using CATALINA_TMPDIR: /usr/share/tomcat4/temp
 Using JAVA_HOME:   /usr/local/java1.3
 Error occurred during initialization of VM
 Unable to load native library:
 /usr/local/stow/jdk1.3.1_03/jre/lib/i386/libjava.so:
 symbol __libc_wait, version GLIBC_2.0 not
 defined in file libc.so.6 with link time reference

-- 
Rasputin :: Jack of All Trades - Master of Nuns

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: HELP!! Tomcat crashes on me!

2002-12-03 Thread Rasputin
* Steve R. Burrus [EMAIL PROTECTED] [1201 05:01]:
 Kwok, the so-called crash is like it just flat disappearing on me!!! I
 mean, it's like puff, like up in smoke so to speak!! 

Right, and it's given you an error that explains your server.xml is
invalid.
Since it seems to work out of the box for many people,
I'm guessing you've edited it. Why not try reinstalling, and this time,
don't edit the server.xml file - as other people have mentioned, you
shouldn't need to.

If it doesn't work, then try examining the logs to see why, and post
any errors you see there.

And please try not to shout abuse at people who are trying to help you, it
means people who could help you instead set their mailers to ignore you.

Cheers.
-- 
Rasputin :: Jack of All Trades - Master of Nuns

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: Tomcat and security manager: unexpected java.security.AccessControlException on sun linux cobalt

2002-12-03 Thread Rasputin
* J.P.Jarolim [EMAIL PROTECTED] [1217 11:17]:

 java.security.AccessControlException: access denied (java.io.FilePermission
 /home/.sites/143/site40/web/test.txt read)
 
 We looked into the tomcat docs how to setup the security manager correctly
 and looked into the tomcat.policy file
 in the {tomcat.home}/conf dir just to see that everything was set correctly
 (for us) from the site management utility:
 
 ...
 grant codeBase file:/home/.sites/143/site40/web/- {
   permission SocketPermission localhost:1024-, listen,connect,resolve;
   permission java.util.PropertyPermission *, read,write;
   permission java.io.FilePermission /home/.sites/143/site40/-,
 read,write,delete;
   permission java.lang.RuntimePermission accessClassInPackage.sun.io;
 };

Does the class trying to read that directory live in :
'/home/.sites/143/site40/web/-' ?  I doubt it. 

I'm no expert, but that sounds wrong to me, unless the class files live
there. The codebase parameter lists where the Java classes were
loaded from. Writing to a direcotry you load code from is a bad idea
unless you really need to.


 Host name=johannes.jarolim.com !-- Site site40 --
   Context path= docBase=/home/.sites/143/site40/web debug=0/
   !-- user web contexts --
 /Host

 grant codeBase file:/home/.sites/143/site40/web/- {
 permission java.security.AllPermission;
 };

I think your codeBase is wrong - try allowing all code to read it, just to
check.

Also, if you want security, you might want to think twice about running
tomcat as root - it doesn't need to be IMO.

-- 
Rasputin :: Jack of All Trades - Master of Nuns

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: Is it possible to have a serlvet as a first page?

2002-11-28 Thread Rasputin
* [EMAIL PROTECTED] [EMAIL PROTECTED] [1151 01:51]:
 I'm using ajp13 with apache1.3 and tc4.0.x.
 Im using virtual hosts, and the config I use for this one looks like this:
 VirtualHost 130.236.228.174:80
 DocumentRoot /home/httpd/html/blaskan
 ServerName blaskan.studorg.liu.se
 ServerAlias www.blaskan.studorg.liu.se
 ErrorLog /var/log/apache/blaskan-error.log
 CustomLog /var/log/apache/blaskan.log common_with_mod_gzip_info2
 
 Directory /home/httpd/html/blaskan
 DirectoryIndex index.cgi

 I have a servlet mapped to index.cgi (don't ask me why .cgi, its mostly a pun). 
 The problem is that I can not get apache to serve tomcat the request for 
 www.blaskan.studorg.liu.se. It just gives me a listing of the contents in the 
 folder. Right now I'm using a index.html that redirects (after adding 
 index.html in the DirectoryIndex tag), but its not really how I want it to be. 
Get the webapp to understand that index.cgi is a valid 'welcome file' -
like DirectoryIndex on Apache, but you need to do this on the tomcat side.

Add

welcome-file-list
welcome-fileindex.cgi/welcome-file
welcome-fileindex.html/welcome-file
welcome-fileindex.htm/welcome-file
welcome-fileindex.jsp/welcome-file
/welcome-file-list

to the bottom on your web.xml


-- 
Rasputin :: Jack of All Trades - Master of Nuns

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: Using Zip file instead of TAR file

2002-11-28 Thread Rasputin
* randie ursal [EMAIL PROTECTED] [1122 02:22]:
 does it mean, there's a fixed no. of log files ang previous log files 
 will not be cleanup by Tomcat, it will just rotate?

'cron is strong in his mountain' as Conan used to say.

Stick

30 2 * * * /usr/bin/find /path/to/logs -name '*log' -type -f -mtime +7d -exec /bin/rm 
{} \;

in your crontab.

-- 
Rasputin :: Jack of All Trades - Master of Nuns

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: Make Tomcat serve a URL in the form of www.mywebapp.com

2002-11-28 Thread Rasputin
* Panos Konstantinidis [EMAIL PROTECTED] [1142 11:42]:
   Hello more questions about Tomcat.
 
   After a few days and changes in the configuration
 files I managed to transfer all web application from
 Resin to Tomcat. What I would like to do now is to
 configure Tomcat to server a url in the form of
 www.mywebapp.com.
 
   mywebapp is configured under the /webapps folder. So
 far in order to run it I was doing
 http://localhost/mywebapp but I need to change it. I
 have defined the Context tag to be like:
 
 Context path=www.mywebapp.com
 docBase=C:\Tomcat4.1\webapps\mywebapp debug=0 /

That's nor right, are you getting confused with Host direcives?

Try something like:

---

!-- Paste this under the localhost definition in server.xml --

Host name=www.mywebapps.com debug=1 appBase=mywebapps 

Aliaswww.app1.mywebapps.com/Alias

Valve className=org.apache.catalina.valves.AccessLogValve
directory=logs/mywebapps  prefix=access. suffix=.log
pattern=common/

Logger className=org.apache.catalina.logger.FileLogger
directory=logs/mywebapps  prefix=context. suffix=.log
timestamp=true/

/Host

---

and just stick your webapp under

$CATALINA_HOME/mywebapps/ROOT/

 or define other Contexts within this Host ?

I've made a subdirectory under logs too, so it's easier to
find logs for this host when debugging.

-- 
Rasputin :: Jack of All Trades - Master of Nuns

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: How to add a servlet to a new Webapp

2002-11-28 Thread Rasputin
* Curley, Thomas [EMAIL PROTECTED] [1114 14:14]:

 If anyone can explain the web.xml file in plain lang / what filters do and how to 
get rid of the invoker then please do 

See the link to chapter 5 at http://www..moreservlets.com

-- 
Rasputin :: Jack of All Trades - Master of Nuns

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: http.conf

2002-11-28 Thread Rasputin
* mmichot [EMAIL PROTECTED] [1156 14:56]:
 Thanks for helping me!
 
 the folder libexec exist
 and the file mod_jk2-2.0.43.so exist (I m on linux)

Then change the LoadModule line to load .so , not .dll
 

-- 
Rasputin :: Jack of All Trades - Master of Nuns

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




setting Context attributes in web.xml/server.xml?

2002-11-27 Thread Rasputin

Hi folks,

I'm porting a servlet-based reporting system from iPlanet to TOmcat 4.1.12,
and it initialises itself based on a context attribute 'baseDir'.

iPlanet lets you set initial context attributes through the server.
How do I set these in Tomcat4? Is it even possible? If iPlanet 4 has a feature tomcat
doesn't, I'd be amazed.

NB: I've tried context parameters, which tomcat does support, but
they're no good. To clarify, I need an attribute I can retrieve via

ServletContext con = getServletContext();
String dirname = (String) con.getAttribute(baseDir);

to return the value. Being able to do this in web.xml
would be extremely useful...

(Worst case scenario, I can write a new servlet and init-on-startup
it to explicitly set the attribute, but that's clankier
than a bicycle made of saucepans)

-- 
Rasputin :: Jack of All Trades - Master of Nuns

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: setting Context attributes in web.xml/server.xml?

2002-11-27 Thread Rasputin
* Andy Eastham [EMAIL PROTECTED] [1140 16:40]:
 Rasputin,
 
 It's in web.xml

Sorry, I can't see it.

There's a

context-param

element, but I need a context *attribute*, and I don't think they
can be set in tomcat.

 See sample chapter on www.moreservlets.com for more info.

Actually, I bought the book :)
--
Rasputin :: Jack of All Trades - Master of Nuns

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: setting Context attributes in web.xml/server.xml?

2002-11-27 Thread Rasputin
* Boris Prochazka [EMAIL PROTECTED] [1159 17:59]:
 Please read the online documentation page:
 
 http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/context.html
 
 Under heading Context Parameters.

Sorry, to clarify :

 element, but I need a context *attribute*, and I don't think they
 can be set in tomcat.

context Parameter != context attribute.

Thanks anyway!

-- 
Rasputin :: Jack of All Trades - Master of Nuns

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: setting Context attributes in web.xml/server.xml?

2002-11-27 Thread Rasputin
* Craig R. McClanahan [EMAIL PROTECTED] [1153 17:53]:
 
 On Wed, 27 Nov 2002, Rasputin wrote:
 
  * Andy Eastham [EMAIL PROTECTED] [1140 16:40]:

   Rasputin,
   It's in web.xml

  Sorry, I can't see it.
 
  There's a
 
  context-param
 
  element, but I need a context *attribute*, and I don't think they
  can be set in tomcat.

 The context-param element, as you note, sets a context init
 parameter, not a context attribute.  Context
 attributes must be set programatically, not from a web.xml file.

Gotcha - makes sense actually, as getInitParameter returns a String,
whereas getAttribute returns an Object.

 A convenient way to set things up is to create a ServletContextListener
 (assumes you're running Tomcat 4 or later) and configure it in a
 listener element in web.xml.  The contextInitialized() method will be
 called when your web application is first started, and that is a perfect
 place to set up whatever context attributes you need.

Lovely, that's the sort of mechanism I was looking for - is it portable
between servlet containers though?
For the record, the load-on-startup hack works pretty well. Cheers.


-- 
Rasputin :: Jack of All Trades - Master of Nuns

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: Errors when compiling Tomcat Connectors

2002-11-27 Thread Rasputin
* Kevin Andryc [EMAIL PROTECTED] [1115 20:15]:
 Both CATALINA_HOME and TOMCAT_HOME are set in my environment variables.
 Still, when I try to build the connectors using Ant, it contains error. Here
 is the error code:
 
 BUILD FAILED
 File:C:/Program Files/Apache Group/Tomcat
 Connectors/v4.1.12/jk/build.xml:167: Compile failed; see the compiler error
 output for details.

Probably a long shot (I haven't tried ant yet) - it wouldn't be related to
the space in the directory name, would it?

-- 
Rasputin :: Jack of All Trades - Master of Nuns

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: setting Context attributes in web.xml/server.xml?

2002-11-27 Thread Rasputin
* Craig R. McClanahan [EMAIL PROTECTED] [1125 20:25]:

  Lovely, that's the sort of mechanism I was looking for - is it portable
  between servlet containers though?
 
 ServletContextListener is indeed portable to any Servlet 2.3 or later
 container.
 
 APIs that start java. or javax. are portable (although sometimes
 version specific), while APIs that start org.apache. are not portable.

Right, thanks. It's more elegant, so is probably The Right Thing...
 
  For the record, the load-on-startup hack works pretty well. Cheers.
 
 Load-on-startup is indeed a hack (although it's about the only way to do
 this for pre-Servlet-2.3), because there is no guarantee that the servlet
 container will leave your servlet in memory for the lifetime of the web
 application.

Damn, I was folowing all this up until you said that :)

Unless I've got this back-asswards, once the Attribute is saved in
the ServletContext ( which happens in init() ), won't it stay there?
I thought that was the point of a ServletContext?
Sure, it'll vanish when the server restarts, but if the
WorkAround servlet init() method replaces it during 'load-on-startup',
it shouldn't matter, should it?

-- 
Rasputin :: Jack of All Trades - Master of Nuns

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]