Re: war deployment and jsp pre-compilation

2003-07-10 Thread Johannes Fiala
Hi Reinhard,

Using TC 4.1.24+ you can use ant to first run JspC and deploy the 
resulting WAR using the manager app.

You can find more info here:
http://www.fwd.at/tomcat/buildmanagement-using-ant-howto.html

Johannes




Reinhard Nägele [EMAIL PROTECTED] 
10.07.2003 15:38
Please respond to
Tomcat Users List [EMAIL PROTECTED]


To
[EMAIL PROTECTED]
cc

Subject
war deployment and jsp pre-compilation






We deploy our application as war file with the manager. unpackWars is 
set to false. Is it possible to deploy pre-compiled JSPs with this 
approach? I guess this would imply that we'd have to have a context.xml 
in our war file specifying that Tomcat should load the compiled JSP 
classes from the war file instead of from its working directory. Can 
this be done?

Reinhard



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




Re: performance

2003-07-08 Thread Johannes Fiala
Hi Mark,

*) One BIG performance improvement is to use a Filter to ZIP your 
HttpServletResponses.
You can find a good example with TC 4.1.24 in the examples 
(compressionFilters).
You can save lot's of network bandwidth and increase the server throughput 
(e.g. 200KB page size gets compressed to 14KB using the 
compressionFilters)

(works only for browser that accept zip/gzip encoding, but most already 
do)

*) You can find more info on using JSPC with Ant as I recently posted:
http://www.fwd.at/tomcat/buildmanagement-using-ant-howto.html

Johannes




Mark F [EMAIL PROTECTED] 
08.07.2003 20:35
Please respond to
Tomcat Users List [EMAIL PROTECTED]


To
Tomcat Users List [EMAIL PROTECTED]
cc

Subject
performance






Running Tomcat 4.0.6 on Solaris 8

Interested in improving performance, any tips or information would be 
appreciated.  Also any tips or information on exactly how to use JSPC to 
improve performance would be great.  I've found a lot by searching but I 
don't exactly know how to use what I've found.

-Mark



Re: cookie based session sharing among web apps

2003-07-08 Thread Johannes Fiala
Yes,

details: http://www.fwd.at/tomcat/sharing-session-data-howto.html

(of course it's a workaround, but it works great with some restrictions 
regarding session serialization and clustering as I use a Context to store 
the shared session data;
using a global cookie at root you can share one sessionid with other 
contexts).

Johannes




Tim Funk [EMAIL PROTECTED] 
08.07.2003 13:21
Please respond to
Tomcat Users List [EMAIL PROTECTED]


To
Tomcat Users List [EMAIL PROTECTED]
cc

Subject
Re: cookie based session sharing among web apps






No - it breaks the servlet spec. Sessions are scoped to their own webapp.

-Tim

Harris Cotton wrote:
 I am keen on having two web applications be able to share sessions. 
 Currently, tomcat creates and maintains a session for each web 
 application for a client.  Moving the session id to the url is an 
 option, but one I hope to avoid because of the refactoring it would 
 generate in my applications jsps.
 
 In essence, I want tomcat to use / as the url path in the JSESSIONID 
 cookie, and use this session id in all web applications the tomcat 
 server hosts.
 
 Can this be accomplished solely with configuration?
 
 Thank You
 


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




Re: cookie based session sharing among web apps

2003-07-08 Thread Johannes Fiala
Ooops - I over-read the comment regarding solely with configuration - 
well as Tim already pointed out the servlet spec doesn't permit it. You'll 
have to throw in some Java code to get things running, but finally it's 
possible to do it - you find a detailed how-to at the link I enclosed.

However, I used the Context to store the shared session data which should 
be ok for smaller traffic, but might cause troubles if lot's of data have 
to be pumped into shared sessions. Then I'd encourage you to use a 
database or other persistence mechanisms :)

johannes




Johannes Fiala [EMAIL PROTECTED] 
08.07.2003 23:01
Please respond to
Tomcat Users List [EMAIL PROTECTED]


To
Tomcat Users List [EMAIL PROTECTED]
cc

Subject
Re: cookie based session sharing among web apps






Yes,

details: http://www.fwd.at/tomcat/sharing-session-data-howto.html

(of course it's a workaround, but it works great with some restrictions 
regarding session serialization and clustering as I use a Context to store 

the shared session data;
using a global cookie at root you can share one sessionid with other 
contexts).

Johannes




Tim Funk [EMAIL PROTECTED] 
08.07.2003 13:21
Please respond to
Tomcat Users List [EMAIL PROTECTED]


To
Tomcat Users List [EMAIL PROTECTED]
cc

Subject
Re: cookie based session sharing among web apps






No - it breaks the servlet spec. Sessions are scoped to their own webapp.

-Tim

Harris Cotton wrote:
 I am keen on having two web applications be able to share sessions. 
 Currently, tomcat creates and maintains a session for each web 
 application for a client.  Moving the session id to the url is an 
 option, but one I hope to avoid because of the refactoring it would 
 generate in my applications jsps.
 
 In essence, I want tomcat to use / as the url path in the JSESSIONID 
 cookie, and use this session id in all web applications the tomcat 
 server hosts.
 
 Can this be accomplished solely with configuration?
 
 Thank You
 


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





Re: cookie based session sharing among web apps

2003-07-08 Thread Johannes Fiala
Yes,

details: http://www.fwd.at/tomcat/sharing-session-data-howto.html

(of course it's a workaround, but it works great with some restrictions 
regarding session serialization and clustering as I use a Context to store 
the shared session data;
using a global cookie at root you can share one sessionid with other 
contexts).

Johannes




Tim Funk [EMAIL PROTECTED] 
08.07.2003 13:21
Please respond to
Tomcat Users List [EMAIL PROTECTED]


To
Tomcat Users List [EMAIL PROTECTED]
cc

Subject
Re: cookie based session sharing among web apps






No - it breaks the servlet spec. Sessions are scoped to their own webapp.

-Tim

Harris Cotton wrote:
 I am keen on having two web applications be able to share sessions. 
 Currently, tomcat creates and maintains a session for each web 
 application for a client.  Moving the session id to the url is an 
 option, but one I hope to avoid because of the refactoring it would 
 generate in my applications jsps.
 
 In essence, I want tomcat to use / as the url path in the JSESSIONID 
 cookie, and use this session id in all web applications the tomcat 
 server hosts.
 
 Can this be accomplished solely with configuration?
 
 Thank You
 


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




Re: cookie based session sharing among web apps

2003-07-08 Thread Johannes Fiala
Ooops - I over-read the comment regarding solely with configuration - 
well as Tim already pointed out the servlet spec doesn't permit it. You'll 
have to throw in some Java code to get things running, but finally it's 
possible to do it - you find a detailed how-to at the link I enclosed.

However, I used the Context to store the shared session data which should 
be ok for smaller traffic, but might cause troubles if lot's of data have 
to be pumped into shared sessions. Then I'd encourage you to use a 
database or other persistence mechanisms :)

johannes




Johannes Fiala [EMAIL PROTECTED] 
08.07.2003 23:01
Please respond to
Tomcat Users List [EMAIL PROTECTED]


To
Tomcat Users List [EMAIL PROTECTED]
cc

Subject
Re: cookie based session sharing among web apps






Yes,

details: http://www.fwd.at/tomcat/sharing-session-data-howto.html

(of course it's a workaround, but it works great with some restrictions 
regarding session serialization and clustering as I use a Context to store 

the shared session data;
using a global cookie at root you can share one sessionid with other 
contexts).

Johannes




Tim Funk [EMAIL PROTECTED] 
08.07.2003 13:21
Please respond to
Tomcat Users List [EMAIL PROTECTED]


To
Tomcat Users List [EMAIL PROTECTED]
cc

Subject
Re: cookie based session sharing among web apps






No - it breaks the servlet spec. Sessions are scoped to their own webapp.

-Tim

Harris Cotton wrote:
 I am keen on having two web applications be able to share sessions. 
 Currently, tomcat creates and maintains a session for each web 
 application for a client.  Moving the session id to the url is an 
 option, but one I hope to avoid because of the refactoring it would 
 generate in my applications jsps.
 
 In essence, I want tomcat to use / as the url path in the JSESSIONID 
 cookie, and use this session id in all web applications the tomcat 
 server hosts.
 
 Can this be accomplished solely with configuration?
 
 Thank You
 


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





Re: jspc ant task and merge web.xml

2003-07-07 Thread Johannes Fiala
Hi Arnaud,

You might be interested in this.
http://www.fwd.at/tomcat/buildmanagement-using-ant-howto.html

(look at the build.xml which is available as a link inside the html file, 
you find the merge-descriptors task there).

Johannes




Elisabeth Rotbach [EMAIL PROTECTED] 
03.07.2003 19:10
Please respond to
Tomcat Users List [EMAIL PROTECTED]


To
[EMAIL PROTECTED]
cc

Subject
Re: jspc ant task and merge web.xml







To merge several xml, I use : xmltask from http://www.oopsconsultancy.com.

EJL
Toulouse


From: BOULAY Arnaud [EMAIL PROTECTED]
Reply-To: Tomcat Users List [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: jspc ant task and merge web.xml
Date: Thu, 03 Jul 2003 16:33:30 +0200

Hi !
I want to do an automatic merge of newweb.xml file generated with 
jspc 
task with an existing  web.xml.
Thanks in advance.
Regards, Arnaud


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


_
MSN Messenger 6 http://g.msn.fr/FR1001/866  : dialoguez en son et en image 

avec vos amis.


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




Some thoughts on memory consumption and gc

2003-06-02 Thread Johannes Fiala
Hi there,

I've made some tests with the gc and the -Xms and -Xmx settings. 
Suppose I have a list generated from a database with a size of 10.000 
records with an average of 200 bytes each. This gives 2 MB data volume.

*) If you have 128 MB heap and 64 MB stack memory assigned, against which 
will the memory consumption count?

*) According to my experiements Runtime.availableMemory will give me the 
heap size. How can I determine the stack size (without using a profiler)

*) Given the 2 MB memory consumption per request, does this effectively 
mean that the server will be able to support a maximum of 64 concurrent 
requests? 

*) To my mind it seems that the MVC approach doesn't come in very handy 
here, the only solution would be to split the list into smaller parts. 
Anyway, right at the time one passes control from the Servlet (Controller) 
which invoked the model and filled it to the view (jsp), we'll have a lot 
of memory allocated per request. 

*) Has anybody practical experience with Garbage collector tuning? 
Currently it seems my gc may come in too late and this will result in 
OutofMemoryExceptions (of course I close all database connections properly 
and always use finally to free Connections). Does anybody have ideas how 
to trace such issues?
(I already tested with Borland Optimizeit and no SQL or Oracle objects 
lurk around in memory longer than needed).

I've previously programmed with many other programming languages, and 
never leaked memory or had any memory issues (ok not to mention C, but 
there you have full memory control and responsibility). With Java memory 
issues are always hard to track but occur frequently in load tests. Has 
anybody tips available how to keep track of memory consumption easily.

Any input is highly appreciated,
Johannes

Sharing Session data between Contexts - HOWTO

2003-06-01 Thread Johannes Fiala
Hi there,

I've just set up a HOWTO describing how to share session data 
(=session-based Java objects) between Contexts 

http://www.fwd.at/tomcat/sharing-session-data-howto.html

I described how to share the Sessionid between two different Contexts and 
how to store and retrieve the shared session data from the central 
Context. Removing the session data by implementing the HttpSessionListener 
interface brushes things up.

I missed out the part about persisting shared session data using XML or 
JDBC with serialization/deserialization techniques as used with Apache 
Axis for XML or JDO for JDBC databases. If anybody wants to share his code 
or has different ideas: welcome!

Suggestions are welcome as well,
Johannes

RE: Switching between releases during runtime

2003-04-05 Thread johannes . fiala
Hi Yoav,

Thanks for your ideas, but how do they work out in the ant deploy 
scenario, where the application actually resides in /usr/local/tomcat/
work/Standalone/localhost/manager/forms.war ?

*) Is it an option to create a symlink forms in the /webapps directory 
to point to /usr/local/tomcat/work/Standalone/localhost/manager/forms.war
?
*) Do I have any other options than creating a symlink? I'm working with a 
Windows-machine for development, so I'd prefer something not os-specific!
*) The best thing would be a pseudo-context which simply points to another 
context, so each request gets mapped to the versioned context.

thx alot
Johannes





Shapira, Yoav [EMAIL PROTECTED] 
31.03.2003 16:51
Please respond to
Tomcat Users List [EMAIL PROTECTED]


To
Tomcat Users List [EMAIL PROTECTED]
cc

Subject
RE: Switching between releases during runtime







Howdy,
Several other approaches, all I think better than your context pointer
idea:

- Have the context XML definition file (tomcat 4.1 or later) name a
symlink as the docBase.  That symlink would point to myapp-1.0 and could
be changed to myapp-1.1 etc.

- Have the context entry itself in the webapps directory be a symlink to
somewhere outside the webapps directory, for example:
/local/build/myapp-1.0
/local/build/myapp-1.1
/local/tomcat/webapps/myapp - /local/build/myapp-1.0
so myapp under webapps is just a symlink.

- Just redeploy appropriately using the ant tasks supplied with tomcat
an save yourself headaches in the long run.

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Saturday, March 29, 2003 12:33 PM
To: Tomcat Users List
Subject: Switching between releases during runtime

hi there,

Is it possible to have a virtual context, which just points to
another
context?
e.g.
myapp = current version, should point to myapp-1.0
myapp-1.0
myapp-1.1

Is it possible to change the context myapp is pointing to during
runtime?
This would make switching between releases much easier rather than
having
to redeploy for each release switch.

What do you think about this idea?

thx
Johannes



This e-mail, including any attachments, is a confidential business 
communication, and may contain information that is confidential, 
proprietary and/or privileged.  This e-mail is intended only for the 
individual(s) to whom it is addressed, and may not be saved, copied, 
printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your 
computer system and notify the sender.  Thank you.


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




Weird problem using ant undeploy/deploy: InitParameters not inited

2003-04-05 Thread johannes . fiala
Hi there,

I'm facing a strange problem sometimes when I'm doing an ant 
undeploy/deploy:

Sometimes, the Context InitParameters don't get initialized, they simply 
resume to null. 

Does anybody have any idea what might cause this? It is reproducible but 
happens at different times. 
The problem occurs especially often on our production machine, which is 
running AIX 4.3.

thx alot
Johannes

High availability Tomcat webapps using ant undeploy/deploy??

2003-04-05 Thread johannes . fiala
Hi there!

My primary focus is high availability of the Tomcat applications running 
in production. 

Currently it takes approximately 10 seconds to redeploy an application 
using ant undeploy/deploy in production. 
This means taking the whole application down for 10 seconds leaving users 
with an 404 error.

== What could I do to have 100% availability of my webapp during the 
undeployed-state?

thx alot
Johannes


Tomcat vs. JBoss

2003-04-05 Thread johannes . fiala
Hi there,

At my company some are discussing to replace our Tomcat installation with 
JBoss application server.
What are the main arguments pro/contra using Tomcat/JBoss?
Is anybody able to share some production experiences?

To my mind it seems
*) if I need EJB - take JBoss
disadvantage: more complex

*) if I need the reference J2EE engine - take Tomcat
advantage: easier to use, less overhead with EJB

What do you think?

cheers,
Johannes

RE: Tomcat 4.1.18-4.1.24 causes standard tag to fail

2003-04-05 Thread johannes . fiala
hi jim,

I had the same trouble when running jspc using ant.

Simply replacing the absolute URI (which BTW points nowhere at the sun 
website) with a relative URI:
%@ taglib prefix=c uri = /WEB-INF/c.tld %

and supplying the c.tld file (below) solved the whole issue easily.
It  has the additional advantage you know what's really in the tld, not 
only a generic absolute uri pointing nowhere.
And... you can use ant to run JSPC!

Make sure you add the c.tld to the webapps' WEB-INF directory.

==
?xml version=1.0 encoding=ISO-8859-1 ?
!DOCTYPE taglib
  PUBLIC -//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN
  http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd;
taglib
  tlib-version1.0/tlib-version
  jsp-version1.2/jsp-version
  short-namec/short-name
  urihttp://java.sun.com/jstl/core/uri
  display-nameJSTL core/display-name
  descriptionJSTL 1.0 core library/description

  validator
validator-class
org.apache.taglibs.standard.tlv.JstlCoreTLV
/validator-class
init-param
param-nameexpressionAttributes/param-name
param-value
out:value
out:default
out:escapeXml
if:test
import:url
import:context
import:charEncoding
forEach:items
forEach:begin
forEach:end
forEach:step
forTokens:items
forTokens:begin
forTokens:end
forTokens:step
param:encode
param:name
param:value
redirect:context
redirect:url
set:property
set:target
set:value
url:context
url:value
when:test
/param-value
description
Whitespace-separated list of colon-separated token pairs
describing tag:attribute combinations that accept expressions.
The validator uses this information to determine which
attributes need their syntax validated.
/description
 /init-param
  /validator

  tag
namecatch/name
 
tag-classorg.apache.taglibs.standard.tag.common.core.CatchTag/tag-class
body-contentJSP/body-content
description
Catches any Throwable that occurs in its body and optionally
exposes it.
/description
attribute
namevar/name
requiredfalse/required
rtexprvaluefalse/rtexprvalue
/attribute
  /tag

  tag
namechoose/name
 
tag-classorg.apache.taglibs.standard.tag.common.core.ChooseTag/tag-class
body-contentJSP/body-content
description
Simple conditional tag that establishes a context for
mutually exclusive conditional operations, marked by
lt;whengt; and lt;otherwisegt;
/description
  /tag

  tag
nameout/name
tag-classorg.apache.taglibs.standard.tag.el.core.OutTag/tag-class
body-contentJSP/body-content
description
Like lt;%= ... gt;, but for expressions.
/description
attribute
namevalue/name
requiredtrue/required
rtexprvaluefalse/rtexprvalue
/attribute
attribute
namedefault/name
requiredfalse/required
rtexprvaluefalse/rtexprvalue
/attribute
attribute
nameescapeXml/name
requiredfalse/required
rtexprvaluefalse/rtexprvalue
/attribute
  /tag

  tag
nameif/name
tag-classorg.apache.taglibs.standard.tag.el.core.IfTag/tag-class
body-contentJSP/body-content
description
Simple conditional tag, which evalutes its body if the
supplied condition is true and optionally exposes a Boolean
scripting variable representing the evaluation of this condition
/description
attribute
nametest/name
requiredtrue/required
rtexprvaluefalse/rtexprvalue
/attribute
attribute
namevar/name
requiredfalse/required
rtexprvaluefalse/rtexprvalue
/attribute
attribute
namescope/name
requiredfalse/required
rtexprvaluefalse/rtexprvalue
/attribute
  /tag

  tag
nameimport/name
 tag-classorg.apache.taglibs.standard.tag.el.core.ImportTag/tag-class
tei-classorg.apache.taglibs.standard.tei.ImportTEI/tei-class
body-contentJSP/body-content
description
Retrieves an absolute or relative URL and exposes its contents
to either the page, a String in 'var', or a Reader in 'varReader'.
/description
attribute
nameurl/name
requiredtrue/required
rtexprvaluefalse/rtexprvalue
/attribute
attribute
namevar/name
requiredfalse/required
rtexprvaluefalse/rtexprvalue
/attribute
attribute
namescope/name
requiredfalse/required
rtexprvaluefalse/rtexprvalue
/attribute
attribute
namevarReader/name
requiredfalse/required
rtexprvaluefalse/rtexprvalue
/attribute
attribute
  

[OFF-TOPIC] Re: Tomcat vs. JBoss

2003-04-05 Thread johannes . fiala
Hi

I cannot leave your claim unanswered here, even it is way off topic - I 
don't see any info on JBoss at my homepage, so I cannot see any sentence 
which is not true.

I hope your next post will be more helpful to the community here, instead 
of blaming others.

cheers
Johannes

Re: Tomcat vs. JBoss

2003-04-05 Thread johannes . fiala
Hi Joe Sam,

Thanks for your detailed reply.

Do you know any real-life scenarios where you can't do it with Tomcat but 
need EJB seriously? 
So far I've done any backend-access using Apache Axis (Soap) and haven't 
yet had a great desire to use RMI/EJB remote access with pages of nested 
exceptions if anything goes wrong. 

Thx alot
Johannes





Joe Sam Shirah [EMAIL PROTECTED] 
05.04.2003 19:41
Please respond to
Tomcat Users List [EMAIL PROTECTED]


To
Tomcat Users List [EMAIL PROTECTED]
cc

Subject
Re: Tomcat vs. JBoss







Hi Johannes,

There is no Tomcat versus JBoss issue.  JBoss is a J2EE container 
which,
per the spec, includes a servlet engine.  The standard JBoss download
includes Jetty, but there is also one that includes Tomcat.  So the real
issue, if you want to have one, is Jetty versus Tomcat.  We've used Jetty
( with JBoss ) because it started life as an HTTP server, with servlet/JSP
functionality included as time went on.  It allows us to avoid the
mod_jk/connector business one sees all the time in questions on this list
and also avoids the Apache - servlet engine handoff; we've seen good
performance..

JBoss is pretty much a full fledged J2EE engine, not just an EJB
container.

The J2EE RI is not authorized for a production environment, so there
also is no JBoss versus J2EE RI issue.  See the RI license, which says:

for the sole purpose of designing, developing and testing your Java
applets and applications (Programs)

  So, the issue is between other J2EE application servers and JBoss.

In any event, while it is my understanding that Tomcat 4.x and 5.x
versions begin to focus on performance ( anyone feel free to jump in ), 
the
J2EE RI makes no performance claims at all, being designed to show how
a J2EE server should work with applications - a *Reference Implementation* 
-
rather than mandate or perform any optimal internal operations.


 Joe Sam

Joe Sam Shirah -http://www.conceptgo.com
conceptGO -Consulting/Development/Outsourcing
Java Filter Forum:   http://www.ibm.com/developerworks/java/
Just the JDBC FAQs: http://www.jguru.com/faq/JDBC
Going International?http://www.jguru.com/faq/I18N
Que Java400? http://www.jguru.com/faq/Java400



- Original Message -
From: [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Sunday, April 06, 2003 6:16 AM
Subject: Tomcat vs. JBoss


 Hi there,

 At my company some are discussing to replace our Tomcat installation 
with
 JBoss application server.
 What are the main arguments pro/contra using Tomcat/JBoss?
 Is anybody able to share some production experiences?

 To my mind it seems
 *) if I need EJB - take JBoss
 disadvantage: more complex

 *) if I need the reference J2EE engine - take Tomcat
 advantage: easier to use, less overhead with EJB

 What do you think?

 cheers,
 Johannes




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




Re: regarding the installation of tomcat

2003-04-05 Thread johannes . fiala
Hi manchi,

As of Tomcat 4.x the variable is called CATALINA_HOME. 

If you don't set it, the startup script (startup.bat on Windows systems) 
will try to guess it:
===
rem Guess CATALINA_HOME if not defined
if not %CATALINA_HOME% ==  goto gotHome
set CATALINA_HOME=.
===

I hope this helps,
Johannes




manchi prathima [EMAIL PROTECTED] 
05.04.2003 12:34
Please respond to
Tomcat Users List [EMAIL PROTECTED]


To
[EMAIL PROTECTED]
cc

Subject
regarding the installation of tomcat







Is it necessary to set the tomcat environmental variable  TOMCAT_HOME to 
run tomcat server

Plz send the information regarding this.

regards

prathima

Catch all the cricket action. Download Yahoo! Score tracker


Re: ISAPI redirector

2003-04-05 Thread johannes . fiala
Hi Rick,

First, make sure you set the log modus to DEBUG (Isapi 2.0.x: logLevel: 
DEBUG, Isapi 1.x: log_level: debug).

Take a look into the Event Viewer of W2K and inspect the Application Log. 
You should see error messages there indicating what doesn't work. 

I posted my configuration info recently at this forum, simply search for: 
SOLVED: Re: Tomcat 4.1.18 - IIS 5.0 plugin - jk2.properties + 
workers2.properties

I hope this helps,
Johannes




Rick Baker [EMAIL PROTECTED] 
04.04.2003 21:31
Please respond to
Tomcat Users List [EMAIL PROTECTED]


To
[EMAIL PROTECTED]
cc

Subject
ISAPI redirector






I'm running a server with the following:
Win2k
IIS5
J2sdk1.4.0
Tomcat 4.1.12
 
I successfully install Tomcat and the ISAPI redirector and test it with 
the
following  http://localhost/examples/servlet/HelloWorldExample
http://localhost/examples/servlet/HelloWorldExample  and it works just
fine.  The redirector is working as advertised.
 
However, after rebooting the server and check that Tomcat, etc is running
the redirector no longer works.  I have to use
http://localhost:8080/examples/servlet/HelloWorldExample
http://localhost:8080/examples/servlet/HelloWorldExample  in order to 
run
the example. 
 
Any suggestion would be appreciated.
 
Rick Baker
GIS/Network Administrator
Salt Lake County Recorder's Office
2001 S. State St.
Suite #N1600
SLC, UT 84190

Ph: 801-468-3399
Fax: 801-468-3335
Email: [EMAIL PROTECTED] 




[OFF-TOPIC] Re: Tomcat vs. JBoss

2003-04-05 Thread johannes . fiala
hi [EMAIL PROTECTED] + Michael Maier [EMAIL PROTECTED] alias blib 
(nickname of your previous posts),

thx for your reply, I've corrected J2EE to Servlets/JSPs to increase the 
focus. I didn't take care of the EJB part of J2EE so far, but certainly 
will in the future. My clients, however, didn't care up to now.

However, I think your response is impolite at best. I don't think its a 
good way to communicate in a forum to tell others they are idiots just 
because they are asking questions. At least you could mark your reply 
OFF-TOPIC or send it directly to me to save all the others from your 
thoughts.
I reserve the right to learn something new, you probably don't have to 
anymore...

I hope you'll receive a better treatment when learning something new than 
you do to others.

Johannes

Re: upload and renameto apache-tomcat problem

2003-04-05 Thread johannes . fiala
Hi Peter,

You could also use the Commons FileUpload package of the Jakarta project:
http://jakarta.apache.org/commons/fileupload/index.html

I personally have used the cos.jar package of Jason Hunter as well and it 
has served its purpose fine so far.

Johannes




joe [EMAIL PROTECTED] 
05.04.2003 22:16
Please respond to
Tomcat Users List [EMAIL PROTECTED]


To
Tomcat Users List [EMAIL PROTECTED]
cc

Subject
Re: upload and renameto apache-tomcat problem






hi!

i'm using the oreilly cos multipart package. it's working perfectly and 
you have the source.

see for yourself:
http://www.servlets.com/cos/index.html

joe

Peter H. wrote:

 Hello Tomcat-Community,

 I try to figure out a strange but reproduceable error:
 Using Apache and Tomcat under windows and maybe linux.

 After uploading a file to a temporary dir and renaming (moving) it
 to a apache accessible folder i have strange problems...

 If i upload a image with the attached servlet and after it accessing 
 the image with apache i must wait some seconds to get a succesful 
 renameTo. the problem is that if i don't create the temporary image 
 file with java the renameTo always succeeds. but the servlet should
 have file upload behaviour...

 maybe its the FileServletWrapper but uploading multiple times without
 accessing the image with apache there is no problem!

 ps. The FileServletWrapper is only available as class code...
 Any Suggestions?

 Thanks
 Peter


 code
 import java.io.*;
 import javax.servlet.*;
 import javax.servlet.http.*;
 import java.util.*;

 public final class FileServlet
 extends HttpServlet {

 static public final String TARGET =
 /export/wwwdoc/test.jpg;

 public void service(HttpServletRequest req, HttpServletResponse resp) 
 throws IOException {
 FileServletWrapper request = new FileServletWrapper(req,
 new File(/temp));
 File source = null;

 if(request.getFileParameter(file) != null) {
 source = request.ucdGetFileParameter(file).getFile();
 }
 PrintWriter writer = resp.getWriter();
 writer.write(HTML);
 writer.write(BODY);
 writer.write(FORM NAME=\main\ 
 ACTION=\http://127.0.0.1/fileservlet\; METHOD=\post\ 
 ENCTYPE=\multipart/form-data\);
 writer.write(INPUT TYPE=\file\ NAME=\file\/);
 writer.write(INPUT TYPE=\submit\ VALUE=\upload\/);
 writer.write(hr);
 if(source != null) {
 File target = new File(TARGET);
 if(target.exists()) {
 writer.write(Target file existsbr);
 if(!target.delete()) {
 writer.write(Target file delete failed: + target + br);
 return;
 }
 }
 if(source.renameTo(target)) {
 writer.write(rename succeededbr);
 }
 else {
 writer.write(rename failedbr);
 }
 }
 writer.write(/FORM);
 writer.write(/BODY);
 writer.write(/HTML);
 }
 }
 /code



 _
 Mit dem MSN Messenger eine Reise für 4 Personen nach Barcelona 
 gewinnen  jetzt mitmachen! 
 http://www.sweepstakes2003.com/entry.aspx?locationid=15


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





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




Issuing self-signed certificates to users for SSLv3

2003-04-04 Thread johannes . fiala
Hi there,

I know it's not absolutely tomcat-specific, but maybe another Tomcat-user 
has come across this issue.

We want to set up a Certificate Authority and issue self-signed 
certificates to users which then will use SSLv3 client certificate 
authentication to authenticate with Tomcat.

Does anybody know an easy tool to generate certificates and package them 
into PKCS #12 files (PFX-files, password-protected).

Thanks alot
Johannes

SOLVED: Re: Issuing self-signed certificates to users for SSLv3

2003-04-04 Thread johannes . fiala
Hi there,

Mark: thx for the hint, unfortunately I'm not using tomcat connector right 
now. I'll come back to you if I'm using one later.
Ramsay: thx for the useful link!

just in case anybody else needs to issue certificates using openssl:


Commandline OpenSSL for Windows

http://gnuwin32.sourceforge.net/packages/openssl.htm
(so you don't have to compile yourself)


SimpleCA/OpenSSL

http://users.skynet.be/ballet/joris/SimpleCA/

allows to create a CA, create certificates, sign them and revoke them.
keeps a log of all the actions done using openssl, so they can easily be 
entered in openssl commandline modus later.
very good for learning how openssl works (since the docs of openssl are a 
bit lousy).

cheers
Johannes





Mark W. Webb [EMAIL PROTECTED] 
04.04.2003 19:14
Please respond to
Tomcat Users List [EMAIL PROTECTED]


To
Tomcat Users List [EMAIL PROTECTED]
cc

Subject
Re: Issuing self-signed certificates to users for SSLv3






openssl is what I have been using. 

PS.  If you are doing SSL using a tomcat connector, I could use some 
help.  My servlets can only get the user's certificate when I run tomcat 
in stand-alone mode.  I would like it if apache could handle the SSL, 
and pass of servlet processing to tomcat.

[EMAIL PROTECTED] wrote:

Hi there,

I know it's not absolutely tomcat-specific, but maybe another Tomcat-user 

has come across this issue.

We want to set up a Certificate Authority and issue self-signed 
certificates to users which then will use SSLv3 client certificate 
authentication to authenticate with Tomcat.

Does anybody know an easy tool to generate certificates and package them 
into PKCS #12 files (PFX-files, password-protected).

Thanks alot
Johannes
 


-- 
Mark Webb
Software Engineer
Dolphin Technology
474 Phoenix Drive
Rome, NY  13441-4911
 
Phone : 315.838.7000 
  : 315.838.7024 
Fax   : 315.838.7096
Email : [EMAIL PROTECTED]





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




partially updating a WAR file using manager app??

2003-04-03 Thread johannes . fiala
hi there,

I'm using a bunch of JSPs for each form and view inside a web application.
Currently I compile them using ANT and JSPC and then package them into a 
WAR file.
This WAR-file gets deployed using ANT at the tomcat server.

However, if I only change one JSP, it would be desirable to update only 
this JSP, instead of uploading the whole WAR file and putting the whole 
application down for a moment.

Has anybody solved this problem using the manager app?
Or would it make sense to put the one updated JSP directly into the 
/work/Standalone/localhost/myapp folder?
Is this a feature to hope for in Tomcat 5?
Does any J2EE container successfully solve this problem?

thx alot
Johannes

RE: partially updating a WAR file using manager app??

2003-04-03 Thread johannes . fiala
Hi Yoav,

I understand this definition, but am not a 100% satisfied with it.
Hmm. Maybe here the J2EE specification of Sun is not sufficient. 

Shouldn't there be some way to add templates or graphics or JSPs on the 
fly (which are more layout information = view part of the MVC model)?

I'm a bit puzzled because adding a form (JSP) in my my forms application 
requires a complete reboot of the application, which takes up to 10 
seconds via a remore deploy using ant. That doesn't sound much, but I 
cannot afford telling my customer, because they add new JSPs frequently 
(5-10 forms a day or so).

So I think there should be an incremental update possibility for WAR 
files, maybe someone will pick this up some day :)

thx alot
Johannes 




Shapira, Yoav [EMAIL PROTECTED] 
03.04.2003 15:55
Please respond to
Tomcat Users List [EMAIL PROTECTED]


To
Tomcat Users List [EMAIL PROTECTED]
cc

Subject
RE: partially updating a WAR file using manager app??







Howdy,
By definition, a war file is a complete application.  Even if you could
get around this limitation by somehow finding a way to deploy one JSP
outside the war file, your solution wouldn't be portable.  Just
repackage and redeploy the war.  Both of these tasks should be quick and
easy as they are automated by ant...

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Thursday, April 03, 2003 5:30 AM
To: [EMAIL PROTECTED]
Subject: partially updating a WAR file using manager app??

hi there,

I'm using a bunch of JSPs for each form and view inside a web
application.
Currently I compile them using ANT and JSPC and then package them into
a
WAR file.
This WAR-file gets deployed using ANT at the tomcat server.

However, if I only change one JSP, it would be desirable to update only
this JSP, instead of uploading the whole WAR file and putting the whole
application down for a moment.

Has anybody solved this problem using the manager app?
Or would it make sense to put the one updated JSP directly into the
/work/Standalone/localhost/myapp folder?
Is this a feature to hope for in Tomcat 5?
Does any J2EE container successfully solve this problem?

thx alot
Johannes



This e-mail, including any attachments, is a confidential business 
communication, and may contain information that is confidential, 
proprietary and/or privileged.  This e-mail is intended only for the 
individual(s) to whom it is addressed, and may not be saved, copied, 
printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your 
computer system and notify the sender.  Thank you.


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




RE: partially updating a WAR file using manager app??

2003-04-03 Thread johannes . fiala
Hi Yoav,

BTW - Let's say portability here is not my primary goal here.

What about extending the manager task so that if there are differences in 
the /web/ folder (i.e. static web content)
to allow to access the /work/ directory directly and put the JSP or 
graphic or whatever directly there.
Same would go for classes or libs.

What would you recommend me to do to extend the manager app? Where should 
I start?
Can you name me the source files I could look into - and how could I 
enhance the manager app while making it still compatible with future 
changes?

BTW - I also have some trouble with the JSPC, it doesn't allow for JSPs 
with the same name - I already posted here twice but haven't got any 
response yet. Maybe you have an idea for this as well?

thx alot
Johannes





Shapira, Yoav [EMAIL PROTECTED] 
03.04.2003 15:55
Please respond to
Tomcat Users List [EMAIL PROTECTED]


To
Tomcat Users List [EMAIL PROTECTED]
cc

Subject
RE: partially updating a WAR file using manager app??







Howdy,
By definition, a war file is a complete application.  Even if you could
get around this limitation by somehow finding a way to deploy one JSP
outside the war file, your solution wouldn't be portable.  Just
repackage and redeploy the war.  Both of these tasks should be quick and
easy as they are automated by ant...

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Thursday, April 03, 2003 5:30 AM
To: [EMAIL PROTECTED]
Subject: partially updating a WAR file using manager app??

hi there,

I'm using a bunch of JSPs for each form and view inside a web
application.
Currently I compile them using ANT and JSPC and then package them into
a
WAR file.
This WAR-file gets deployed using ANT at the tomcat server.

However, if I only change one JSP, it would be desirable to update only
this JSP, instead of uploading the whole WAR file and putting the whole
application down for a moment.

Has anybody solved this problem using the manager app?
Or would it make sense to put the one updated JSP directly into the
/work/Standalone/localhost/myapp folder?
Is this a feature to hope for in Tomcat 5?
Does any J2EE container successfully solve this problem?

thx alot
Johannes



This e-mail, including any attachments, is a confidential business 
communication, and may contain information that is confidential, 
proprietary and/or privileged.  This e-mail is intended only for the 
individual(s) to whom it is addressed, and may not be saved, copied, 
printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your 
computer system and notify the sender.  Thank you.


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




JNDI connection pooling maximum connections exceeded - Tracking?

2003-04-03 Thread johannes . fiala
HI there,

I'd like to know what professional developers do when the maximum number 
of connection in a connection pool has been reached.
What should be done with requests that don't get a connection?
Should the max connection set to a very high number hoping that the number 
of requests served concurrently will be lower? Is it a way to set to -1, 
thus no limit is active?

I think no web application wants to print out maximum number of 
connections exceeded. please try again later.
I for myself would prefer to have a debug log or so to track if the number 
of concurrent connection has some peaks to at least know what the current 
maximum of concurrent connections is.

I wonder why this is not part of the dbcp.commons package. Shouldn't 
connection tracking become a part of it?

thx alot
Johannes

RE: monitoring web apps

2003-04-03 Thread johannes . fiala
Hi there,

I usually track the memory consumption of each request using a debug info 
which prints the free memory available.

Runtime r = Runtime.getRuntime();
long freeMem = r.freeMemory();
System.out.println(free memory:  + freeMem);

I think packaging this into a memory tracking module for all requests 
served could be quite informative for a developer. 
Personally I think it's a fundamental weakness of Java that you don't have 
a String.getMemoryConsumption() method or something like that. That would 
make it much easier to track memory consumption.

However, the garbage collector seems to run at quite undetermined 
intervals, because after ten requests in a row the free memory goes up 
again. Does anybody know how to configure the garbage collector for 
Tomcat?

Cheers,
Johannes





Shapira, Yoav [EMAIL PROTECTED] 
03.04.2003 21:39
Please respond to
Tomcat Users List [EMAIL PROTECTED]


To
Tomcat Users List [EMAIL PROTECTED]
cc

Subject
RE: monitoring web apps







Howdy,
The JVM itself (so tomcat as well) can't track memory usage or CPU usage
per webapp as webapp is not a unit of execution in the JVM.

Using a profiler and some load/stress tests, you can profile one
application at a time to discern its resource consumption and behavior
under stress.  But getting this information at runtime, without a
profiler, is difficult at best and basically intractable in common
setups.

Part of the problem is it all comes down to the basic java data types,
e.g. String and int.  You can see that there are 1 Strings in the
heap, and with a profiler you can tell where those Strings were created,
but you can't tell how much total memory they take.

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: Steve Harris [mailto:[EMAIL PROTECTED]
Sent: Thursday, April 03, 2003 2:35 PM
To: [EMAIL PROTECTED]
Subject: monitoring web apps

Hi all,

I run a few apps under tomcat 4 and I'm wondering if there are any
tools
for monitoring what each app is doing - memory usage, cpu utilization
etc
?  I use the manager for monitoring numbers of users, stopping/starting
etc but I'm looking for something that geives me more insight.

Cheers - Steve


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




This e-mail, including any attachments, is a confidential business 
communication, and may contain information that is confidential, 
proprietary and/or privileged.  This e-mail is intended only for the 
individual(s) to whom it is addressed, and may not be saved, copied, 
printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your 
computer system and notify the sender.  Thank you.


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




RE: partially updating a WAR file using manager app??

2003-04-03 Thread johannes . fiala
Hi Yoav/Craig,

I'll take a look at the entry points you gave me - maybe I'll find my way 
through them.
Of course I'll keep you posted if I get useful results...

However, I still think it's a fundamental lack of the WAR approach not 
being able to incrementally add functionality.
I originally come from the Lotus Notes/Domino world, where adding a form 
or a view is a snap. 
I try to design my J2EE apps this way, but the final displaying component 
according to MVC is a JSP. So I have to add a JSP whenever I want to add a 
form or view (Unless I have a generic component).

Craig: It's always that way that you add a form, test it locally and then 
you want to deploy it to production. This could occur quite frequently, 
and putting down the application just to add another component is really 
not cool.
Who wants to put down a whole app just to add a single JSP or GIF file?

== I'll rethink my approach, but I think images and static stuff should 
be addable during runtime.
This stuff isn't included in EXE files anyway, it is usually stored 
outside the basic application. I think WAR files should have the same 
approache.

thx so far
Johannes

RE: JNDI connection pooling maximum connections exceeded - Tracking?

2003-04-03 Thread johannes . fiala
Hi Mike

It seems poolman is currently considerably exceeding the functionality of 
dbcp.

Can you post a link where I can find it?
Is it in general preferable to use poolman instead of dbcp as dbcp 
provides only a small set of functionality for production sites?

thx alot
Johannes




mike jackson [EMAIL PROTECTED] 
04.04.2003 01:47
Please respond to
Tomcat Users List [EMAIL PROTECTED]


To
'Tomcat Users List' [EMAIL PROTECTED]
cc

Subject
RE: JNDI connection pooling maximum connections exceeded - Tracking?






I set the upper limit as a soft limit (I'm using poolman, not dbcp).
Since the database doesn't seem to care when I exceed the limit (happens
rarely anyway) it hasn't been an issue as of yet. 

However, my old connection pool did have a hard limit.  What I ended up
doing at that point was blocking the request until a connection was
available.  I had an implementation of a counting semaphore to managing
the connection count.  So, to the user it just looked like the request
was taking a bit longer to process.  I'm typically in and out of the
database fairly quickly, so it didn't seem to be much of an issue. 

Occasionally connections would get lost, which would eventually lock the
pool, so I switched to poolman.  With poolman I can watch the connection
pool metrics, at least to the level of being able to see the total count
and connections in use.  The log will typically tell me when connections
have been lost or closed due to expiring their time to live.

--mikej
-=-
mike jackson
[EMAIL PROTECTED]

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Thursday, April 03, 2003 12:07 PM
To: Tomcat Users List
Subject: JNDI connection pooling maximum connections exceeded -
Tracking?

HI there,

I'd like to know what professional developers do when the maximum number

of connection in a connection pool has been reached.
What should be done with requests that don't get a connection?
Should the max connection set to a very high number hoping that the
number 
of requests served concurrently will be lower? Is it a way to set to -1,

thus no limit is active?

I think no web application wants to print out maximum number of 
connections exceeded. please try again later.
I for myself would prefer to have a debug log or so to track if the
number 
of concurrent connection has some peaks to at least know what the
current 
maximum of concurrent connections is.

I wonder why this is not part of the dbcp.commons package. Shouldn't 
connection tracking become a part of it?

thx alot
Johannes



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




RE: monitoring web apps

2003-04-03 Thread johannes . fiala
Hi Yoav,

oops. I didn't line out that this kind of memory tracking is for testing 
locally with my dev environment to see how tomcat does when handling 
100.000 records of a ResultSet or so... and when memory does show up 
again.

Thanks for the link, I'll investigate it later...

Is the JVMPI powerful enough to get used in a memory tracker for tomcat (I 
haven't used it yet)?
Wouldn't it make sense to have a monitoring app for memory and database 
connections for Tomcat (i.e. dbcp/poolman functionality + jvmpi in one 
admin app)?

thx
Johannes

JSPC Precompile using Ant - unique jsp name problem

2003-03-31 Thread johannes . fiala
hi there,

I've searched the whole forum but haven't found any definitive answer on 
this issue; since I'll try to repost with different language:

If somebody runs JSPC using ANT to precompile all the JSPs, the precompile 
fails if any of the JSPs in  different directories has the same name. 

/jsp/mydir1/index.jsp
/jsp/mydir2/index.jsp
== JSPC fails with a quite confusing error message, which boils down to 
not having unique JSP names.

Uniquely naming all JSPs is probably not an option because index.jsp is 
quite convenient.
== I've also scanned the Tomcat 4.1.24 release notes, but haven't found a 
fix there.

Does anybody know how to fix this JSP naming problem??

Thx alot
Johannes

RE: Trouble with ant install command and ResourceLink

2003-03-30 Thread johannes . fiala
hi jacob,

thx for the input, now it works smoothly.
However, it would be great if the config-parameter gets mentioned in the 
manager app howto
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/manager-howto.html



  target name=install description=Install web application
  depends=compile
install url=${url} username=${username} password=${password}
path=${path} war=file://${build}/
  /target


thx alot
Johannes





Jacob Kjome [EMAIL PROTECTED] 
29.03.2003 20:16
Please respond to
Tomcat Users List [EMAIL PROTECTED]


To
Tomcat Users List [EMAIL PROTECTED]
cc

Subject
RE: Trouble with ant install command and ResourceLink







You need to look at the attributes provided for the install task...

target name=catalina-install depends=compile,manager.init
 description=Install application to servlet container 
 catalina-install
 url=${manager.url}
 username=${manager.username}
 password=${manager.password}
 config=${app.ccf}
 path=${app.path} /
 /target

Notice the config attribute.  At build time, that resolves to a file:/// 

URL pointing to where the context configuration file is.

Now look at the deploy task...


target name=catalina-deploy depends=war,manager.init
 description=Deploy web-app war 
 echo message=${app.war}/
 catalina-deploy
 url=${manager.url}
 username=${manager.username}
 password=${manager.password}
 path=${app.path}
 war=${app.war} /
 /target


There is no config attribute.  You might argue that there should be 
one.  File a bug on that if you think so.  However, the fact is, there 
isn't one now and the current mechanism here is the META-INF/context.xml 
file that Tomcat looks for.


Jake


At 05:55 PM 3/29/2003 +0100, you wrote:
p.s. if I do

ant undeploy
ant install - context info gets lost
ant remove
ant deploy - context info is here again!
== so with deploy the context is ok, with install not.

*) I put /build/context.xml and /build/myapp.xml into the 
build-directory,
but it still doesn't get the context inited.

*) wouldn't it make sense to read the context.xml for ant install out of
the same directory as ant deploy?
(e.g. /build/META-INF/context.xml)

thx
Johannes



SOLVED RE: Trouble with ant install command and ResourceLink

2003-03-30 Thread johannes . fiala
Hi Jacob,

My solution for the problem:

target name=install   description=Install application to servlet 
container

install url=${manager.url}
username=${manager.username}
password=${manager.password}
path=${app.path}
config=file:///${build.home}/META-INF/context.xml
 war=file:///${build.home}/

/target

== So I have the same context.xml for development (ant install) and for 
production (ant deploy)

thx alot for your great input!!!

Johannes

SOLVED: Preview Tomcat XML documentation locally with IE 6.0

2003-03-30 Thread johannes . fiala
Hi there,

Has anybody yet tried to preview a xml file from the tomcat docs locally 
with MS IE?
I think this makes sense if you add some sentences and want to see the 
results without ant rebuild.

There are only two minor things MS IE 6.0 complains:
*) the src and 
*) the alt variables are declared twice. 

If one corrects in the file tomcat-docs.xsl to logo-alt and logo-src
xsl:commentJAKARTA LOGO/xsl:comment
xsl:variable name=logo-alt
  xsl:value-of select=$home-name/
/xsl:variable
xsl:variable name=href
  xsl:value-of select=$home-href/
/xsl:variable
xsl:variable name=logo-src
  xsl:value-of select=$relative-path/xsl:value-of 
select=$home-logo/
/xsl:variable
a href={$href}
  img src={$logo-src} align=left alt={$logo-alt} 
border=0/
/a
 
and declares the XSL in the XML file:
?xml-stylesheet type=text/xsl href=tomcat-docs.xsl?

== voila! you can preview the complete XML rendered as HTML in MS IE 6.0!

cheers,
johannes

Strange naming effect when trying to compile JSP using JSPC

2003-03-30 Thread johannes . fiala
hi there,

Imagine the following file structure for the ant build process:
/jsp/firstpart/form.jsp
/jsp/secondpart/form.jsp

if I try to compile these jsps using jspc, they get generated as expected 
to
/jsp-src/firstpart/form_jsp.java
/jsp-src/secondpart/form_jsp.java
== Then I try ant compile, but the compiler complains about having two 
jsps with the same name!!!

If I put the JSPs into the static web directory:
/web/firstpart/form.jsp
/web/secondpart/form.jsp
== then everything runs smoothly.

How can I get rid of this strange effect??
thx alot
Johannes

JSP Taglib resolution trouble

2003-03-30 Thread johannes . fiala
Hi there,

If I try to compile a JSP with an absolute URI to a taglib like 
%@ taglib prefix=c uri = http://java.sun.com/jstl/core; %

then the compiler complains:
jspc:
2003-03-30 12:30:05 - ERROR-the file '\views\mylist\list.jsp' ge
nerated the following general exception: 
org.apache.jasper.JasperException: This
 absolute uri (http://java.sun.com/jstl/core) cannot be resolved in either 
web.x
ml or the jar files deployed with this application
  [jasper2] Error in class org.apache.jasper.JspC

However, if I have this absolut URI in the static web/myfile.jsp 
directory, everything runs smoothly (i.e. if Tomcat compiles during 
runtime, it does not complain).

However, if I change the absolute URI to a local URI and supply the 
TLD-file, everything runs fine again (i.e. JSPC is working fine):
%@ taglib prefix=c uri = /WEB-INF/c.tld %

Has anybody an idea why JSPC works differently to the JSP compilation 
during runtime?

thx alot
Johannes

Library management for Tomcat using ant

2003-03-30 Thread johannes . fiala
Hi there,

I know this is more a question about ant, but maybe a tomcat user here has 
faced the same issue as I do when using a central lib directory for all of 
the JAR files in the various webapps:

In the prepare task I copy the JAR files I need for my webapp into the 
WEB-INF/lib folder in the build path:
===
copy todir=${build.home}/WEB-INF/lib
  fileset dir=${lib.home}
include name=cos.jar /
include name=cos2.jar /

/fileset
/copy
=

However, this library listing is the only thing which distinguishes the 
various build.xml files for my different webapps.
I'd prefer to have only ONE build.xml file for all of my webapps so they 
all have the same structure.

How can I import a fileset like above from a separate filename?
(so I can have 
*) ONE build.xml for all of my webapps and 
*) a specific lib.xml for each of my webapps?

thx alot
Johannes

Jasper2 (JSPC) compiler option for WEB-INF directory?

2003-03-30 Thread johannes . fiala
Hi there,

I have the following file structure:
/jsp/myfile.jsp
/web/WEB-INF/web.xml
/web/WEB-INF/c.tld

When I run ant jspc, it looks for the web.xml file in the 
/jsp/WEB-INF/web.xml directory. 
So I always have to copy the /web/WEB-INF folder to the jsp directory.

Is there a way to tell the jasper2 task where to find the WEB-INF 
directory??

At first glance it seems there is no option for this available:
jasper2
 validateXml=false
 uriroot=${basedir}/jsp
 webXmlFragment=${basedir}/webinc.xml
 outputDir=${basedir}/src /


thx alot
Johannes

Re: Library management for Tomcat using ant

2003-03-30 Thread johannes . fiala
Hi Jerome,

Yes, certainly that's what I thought at the first glance as well.

But wouldn't it make more sense to make the fileset importable from 
another file (i.e. extend the FileSet datatype to allow imports from 
another file)?
e.g.
build.xml:
copy todir=${build.home}/WEB-INF/lib
  fileset src=lib.xml /
/copy

lib.xml:
fileset dir=${lib.home}
  include name=cos.jar /
  include name=cos2.jar /
  
/fileset

== but since I'm not yet an ant expert, I don't know where to start to 
extend the FileSet datatype of ant. Anybody any ideas?
I think this kind of action (=reading a tag from an external file) could 
be required more often, so I think it would make sense to extend the 
FileSet datatype.

Has anybody a good idea where to start? 
(probably at the ant mailinglist :)?

thx,
Johannes





jerome moliere [EMAIL PROTECTED] 
30.03.2003 14:26
Please respond to
Tomcat Users List [EMAIL PROTECTED]


To
Tomcat Users List [EMAIL PROTECTED]
cc

Subject
Re: Library management for Tomcat using ant






[EMAIL PROTECTED] wrote:

Hi there,

I know this is more a question about ant, but maybe a tomcat user here 
has 
faced the same issue as I do when using a central lib directory for all 
of 
the JAR files in the various webapps:

In the prepare task I copy the JAR files I need for my webapp into the 
WEB-INF/lib folder in the build path:
===
copy todir=${build.home}/WEB-INF/lib
  fileset dir=${lib.home}
include name=cos.jar /
include name=cos2.jar /

/fileset
/copy
=

However, this library listing is the only thing which distinguishes the 
various build.xml files for my different webapps.
I'd prefer to have only ONE build.xml file for all of my webapps so they 
all have the same structure.

How can I import a fileset like above from a separate filename?
(so I can have 
*) ONE build.xml for all of my webapps and 
*) a specific lib.xml for each of my webapps?

thx alot
Johannes
 

Hi Johannes,
why not coding your own task ? reading a single filename then copying 
files is an easy task to be coded in Java isn't it ?

HTH
Jerome


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




SOLVED: Re: Library management for Tomcat using ant

2003-03-30 Thread johannes . fiala
hi phil,

the issue has already been solved on the ant mailinglist.
if any tomcat-user is interested, I post the answer of Jake here:

If various lib.xml files contain contents similar to your copy task 
below, the build.xml file might look like

?xml version=1.0 encoding=UTF-8?
!DOCTYPE project [
 !ENTITY lib-project1 SYSTEM file:./lib1.xml
 !ENTITY lib-project2 SYSTEM file:./lib2.xml
]
project name=MyProject default=compile basedir=. 
...
...
...
target name=copyjars
 lib-project1;
 lib-project2;
/target
...
...
...
/project


Jake

Johannes




Phil Steitz [EMAIL PROTECTED] 
30.03.2003 18:30
Please respond to
Tomcat Users List [EMAIL PROTECTED]


To
Tomcat Users List [EMAIL PROTECTED]
cc

Subject
Re: Library management for Tomcat using ant






[EMAIL PROTECTED] wrote:
 Hi Jerome,
 
 Yes, certainly that's what I thought at the first glance as well.
 
 But wouldn't it make more sense to make the fileset importable from 
 another file (i.e. extend the FileSet datatype to allow imports from 
 another file)?
 e.g.
 build.xml:
 copy todir=${build.home}/WEB-INF/lib
   fileset src=lib.xml /
 /copy
 
 lib.xml:
 fileset dir=${lib.home}
   include name=cos.jar /
   include name=cos2.jar /
   
 /fileset
 
 == but since I'm not yet an ant expert, I don't know where to start to 
 extend the FileSet datatype of ant. Anybody any ideas?
 I think this kind of action (=reading a tag from an external file) could 

 be required more often, so I think it would make sense to extend the 
 FileSet datatype.
 
 Has anybody a good idea where to start? 
 (probably at the ant mailinglist :)?

This really is a question for the Ant list.

You might be able to solve your problem, however, using the XML 
include technique described in 
http://ant.apache.org/faq.html#xml-entity-include, or by just piping the 
lib file list in on the command line, using:
http://ant.apache.org/faq.html#passing-cli-args


-Phil

 
 thx,
 Johannes
 
 
 
 
 
 jerome moliere [EMAIL PROTECTED] 
 30.03.2003 14:26
 Please respond to
 Tomcat Users List [EMAIL PROTECTED]
 
 
 To
 Tomcat Users List [EMAIL PROTECTED]
 cc
 
 Subject
 Re: Library management for Tomcat using ant
 
 
 
 
 
 
 [EMAIL PROTECTED] wrote:
 
 
Hi there,

I know this is more a question about ant, but maybe a tomcat user here 
 
 has 
 
faced the same issue as I do when using a central lib directory for all 
 
 of 
 
the JAR files in the various webapps:

In the prepare task I copy the JAR files I need for my webapp into the 
WEB-INF/lib folder in the build path:
===
copy todir=${build.home}/WEB-INF/lib
 fileset dir=${lib.home}
   include name=cos.jar /
   include name=cos2.jar /
   
   /fileset
/copy
=

However, this library listing is the only thing which distinguishes the 
various build.xml files for my different webapps.
I'd prefer to have only ONE build.xml file for all of my webapps so they 

all have the same structure.

How can I import a fileset like above from a separate filename?
(so I can have 
*) ONE build.xml for all of my webapps and 
*) a specific lib.xml for each of my webapps?

thx alot
Johannes


 
 Hi Johannes,
 why not coding your own task ? reading a single filename then copying 
 files is an easy task to be coded in Java isn't it ?
 
 HTH
 Jerome
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 




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




Re: Library management for Tomcat using ant

2003-03-30 Thread johannes . fiala
Hi Phil,

Thx for your input, I already posted to the Ant forum  - if they don't 
jump on this topic I'll try to use the links you sent and keep you posted 
on the results

thx alot
Johannes



Phil Steitz [EMAIL PROTECTED] 
30.03.2003 18:30
Please respond to
Tomcat Users List [EMAIL PROTECTED]


To
Tomcat Users List [EMAIL PROTECTED]
cc

Subject
Re: Library management for Tomcat using ant






[EMAIL PROTECTED] wrote:
 Hi Jerome,
 
 Yes, certainly that's what I thought at the first glance as well.
 
 But wouldn't it make more sense to make the fileset importable from 
 another file (i.e. extend the FileSet datatype to allow imports from 
 another file)?
 e.g.
 build.xml:
 copy todir=${build.home}/WEB-INF/lib
   fileset src=lib.xml /
 /copy
 
 lib.xml:
 fileset dir=${lib.home}
   include name=cos.jar /
   include name=cos2.jar /
   
 /fileset
 
 == but since I'm not yet an ant expert, I don't know where to start to 
 extend the FileSet datatype of ant. Anybody any ideas?
 I think this kind of action (=reading a tag from an external file) could 

 be required more often, so I think it would make sense to extend the 
 FileSet datatype.
 
 Has anybody a good idea where to start? 
 (probably at the ant mailinglist :)?

This really is a question for the Ant list.

You might be able to solve your problem, however, using the XML 
include technique described in 
http://ant.apache.org/faq.html#xml-entity-include, or by just piping the 
lib file list in on the command line, using:
http://ant.apache.org/faq.html#passing-cli-args


-Phil

 
 thx,
 Johannes
 
 
 
 
 
 jerome moliere [EMAIL PROTECTED] 
 30.03.2003 14:26
 Please respond to
 Tomcat Users List [EMAIL PROTECTED]
 
 
 To
 Tomcat Users List [EMAIL PROTECTED]
 cc
 
 Subject
 Re: Library management for Tomcat using ant
 
 
 
 
 
 
 [EMAIL PROTECTED] wrote:
 
 
Hi there,

I know this is more a question about ant, but maybe a tomcat user here 
 
 has 
 
faced the same issue as I do when using a central lib directory for all 
 
 of 
 
the JAR files in the various webapps:

In the prepare task I copy the JAR files I need for my webapp into the 
WEB-INF/lib folder in the build path:
===
copy todir=${build.home}/WEB-INF/lib
 fileset dir=${lib.home}
   include name=cos.jar /
   include name=cos2.jar /
   
   /fileset
/copy
=

However, this library listing is the only thing which distinguishes the 
various build.xml files for my different webapps.
I'd prefer to have only ONE build.xml file for all of my webapps so they 

all have the same structure.

How can I import a fileset like above from a separate filename?
(so I can have 
*) ONE build.xml for all of my webapps and 
*) a specific lib.xml for each of my webapps?

thx alot
Johannes


 
 Hi Johannes,
 why not coding your own task ? reading a single filename then copying 
 files is an easy task to be coded in Java isn't it ?
 
 HTH
 Jerome
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 




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




Re: JSP Taglib resolution trouble

2003-03-30 Thread johannes . fiala
Hi Dov,

Do you know how to describe a taglib with an absolute uri (e.g. 
http://java.sun.com/jstl/core) in web.xml? Can you post a sample here?

I haven't had to describe my taglib in web.xml yet, because I used the 
/WEB-INF/xxx.tld syntax in my JSPs, thus they always have worked so far!

thx alot
Johannes





Dov Rosenberg [EMAIL PROTECTED] 
30.03.2003 17:17
Please respond to
Tomcat Users List [EMAIL PROTECTED]


To
Tomcat Users List [EMAIL PROTECTED]
cc

Subject
Re: JSP Taglib resolution trouble






Make sure you add the TagLib definition in the web.xml.

Dov Rosenberg


On Sunday, March 30, 2003, at 05:32  AM, [EMAIL PROTECTED] wrote:

 Hi there,

 If I try to compile a JSP with an absolute URI to a taglib like
 %@ taglib prefix=c uri = http://java.sun.com/jstl/core; %

 then the compiler complains:
 jspc:
 2003-03-30 12:30:05 - ERROR-the file '\views\mylist\list.jsp' ge
 nerated the following general exception:
 org.apache.jasper.JasperException: This
  absolute uri (http://java.sun.com/jstl/core) cannot be resolved in 
 either
 web.x
 ml or the jar files deployed with this application
   [jasper2] Error in class org.apache.jasper.JspC

 However, if I have this absolut URI in the static web/myfile.jsp
 directory, everything runs smoothly (i.e. if Tomcat compiles during
 runtime, it does not complain).

 However, if I change the absolute URI to a local URI and supply the
 TLD-file, everything runs fine again (i.e. JSPC is working fine):
 %@ taglib prefix=c uri = /WEB-INF/c.tld %

 Has anybody an idea why JSPC works differently to the JSP compilation
 during runtime?

 thx alot
 Johannes


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




Re: Living without a Context - deploying an application using manager app

2003-03-29 Thread johannes . fiala
Hi Jacob,

1.) 1.000 thanks - this was the answer I needed.
Do you know where this is to be found in the docs??? I spent quite some 
time with searching this forum and the internet, but didn't find any 
recommendation like that you just gave me.

2.) I see 
context.getAttribute(javax.servlet.context.tempdir)
returns the directory the application is living at.

Is it ok to access the file system using
=
String mydir = 
(String)context.getAttribute(javax.servlet.context.tempdir);
FileInputStream fin = new FileInputStream(mydir + 
/WEB-INF/myconfig.txt);
= ? 
or is it more preferable to use
=
Class myclass = this;
FileInputStream fin = 
(FileInputStream)myclass.getResourceAsStream(WEB-INF/myconfig.txt);
= ?

pls give me a hint which type of access is more portable?
Do you also know a howto how to create portable web-applications?

thx a lot
Johannes





Jacob Kjome [EMAIL PROTECTED] 
28.03.2003 20:27
Please respond to
Tomcat Users List [EMAIL PROTECTED]


To
Tomcat Users List [EMAIL PROTECTED]
cc

Subject
Re: Living without a Context - deploying an application using  manager app







What do you mean Living without a Context?

Do you mean living without a Tomcat Context ... entry?

All you have to do is add META-INF/context.xml (the name context.xml is 
important so don't name it something else) to your .war file.  context.xml 

is the context configuration file for the context and contains a single 
Context ... element and any nested elements that the Context ... 
element supports.

A sample context.xml might look like...

Context path=/arbitraypath docBase=dbadmin.war/

Note that the path can be anything you want, but the docBase must be the 

name of the .war file.

I also saw your other message where you said

quote
additionaly, an application deployed using the manager app currently
returns null if you use servletcontext.getRealPath();
so it's context seems to be quite obfuscated...
/quote

This is to be expected.  When you deploy your app as a .war file and not a 

directory structure, you have no file system access.  If you are counting 
of having File IO access to within your webapp, you are creating a 
non-portable application.  The servlet spec does not guarantee any direct 
file system access to any resource on the server other than the directory 
path returned by context.getAttribute(javax.servlet.context.tempdir).

there you go.

Jake

At 07:46 PM 3/28/2003 +0100, you wrote:
hi there,

here are my findings after some experimentation with the ant deploy task
of the manager app.

*) a complete application can be easily built into a WAR file using ant
*) this WAR file can be easily deployed using ant deploy task
*) once deployed onto the server, the application is running with the
docbase located somewhere under the manager directory:
ant list
- produces:
/dbadmin:running:1:F:\tomcat-4.1.18\work\Standalone\localhost\manager\dbadmin.war

*) there the application is living
- without a context
- thus, also without any JNDI resources etc. defined in server.xml for a
context dbadmin with docbase dbadmin.

Would renaming the docbase to 
F:\tomcat-4.1.18\work\Standalone\localhost\manager\dbadmin.war resolve
the problem of not having any context?
What else could be done to get a context for the webapplication 
dbadmin?

thx
Johannes



Re: Living without a Context - deploying an application using manager app

2003-03-29 Thread johannes . fiala
p.s. I also have found that
ant deploy
will give me the context as desired (if stored in META-INF/context.xml as 
recommended by you)

however, ant install does not create the same result.
There the context.getInitParameter() and JNDI-configuration 
(ResourceLinks) both return null and are not inited correctly. 

Thus it seems that ant deploy will correctly initialize the Context, but 
ant install fails to do so.
Working this way, ant install seems to be quite useless to me, or does 
it have another sense to use it?

thx alot
Johannes






Jacob Kjome [EMAIL PROTECTED] 
28.03.2003 20:27
Please respond to
Tomcat Users List [EMAIL PROTECTED]


To
Tomcat Users List [EMAIL PROTECTED]
cc

Subject
Re: Living without a Context - deploying an application using  manager app







What do you mean Living without a Context?

Do you mean living without a Tomcat Context ... entry?

All you have to do is add META-INF/context.xml (the name context.xml is 
important so don't name it something else) to your .war file.  context.xml 

is the context configuration file for the context and contains a single 
Context ... element and any nested elements that the Context ... 
element supports.

A sample context.xml might look like...

Context path=/arbitraypath docBase=dbadmin.war/

Note that the path can be anything you want, but the docBase must be the 

name of the .war file.

I also saw your other message where you said

quote
additionaly, an application deployed using the manager app currently
returns null if you use servletcontext.getRealPath();
so it's context seems to be quite obfuscated...
/quote

This is to be expected.  When you deploy your app as a .war file and not a 

directory structure, you have no file system access.  If you are counting 
of having File IO access to within your webapp, you are creating a 
non-portable application.  The servlet spec does not guarantee any direct 
file system access to any resource on the server other than the directory 
path returned by context.getAttribute(javax.servlet.context.tempdir).

there you go.

Jake

At 07:46 PM 3/28/2003 +0100, you wrote:
hi there,

here are my findings after some experimentation with the ant deploy task
of the manager app.

*) a complete application can be easily built into a WAR file using ant
*) this WAR file can be easily deployed using ant deploy task
*) once deployed onto the server, the application is running with the
docbase located somewhere under the manager directory:
ant list
- produces:
/dbadmin:running:1:F:\tomcat-4.1.18\work\Standalone\localhost\manager\dbadmin.war

*) there the application is living
- without a context
- thus, also without any JNDI resources etc. defined in server.xml for a
context dbadmin with docbase dbadmin.

Would renaming the docbase to 
F:\tomcat-4.1.18\work\Standalone\localhost\manager\dbadmin.war resolve
the problem of not having any context?
What else could be done to get a context for the webapplication 
dbadmin?

thx
Johannes



RE: Trouble with ant install command and ResourceLink

2003-03-29 Thread johannes . fiala
Hi Jeff,

no, using the ant deploy task it worked smoothly.
I was just wondering what the install task is all about (if it's not 
working)

thx 
Johannes




Jeff Jensen [EMAIL PROTECTED] 
29.03.2003 15:02
Please respond to
Tomcat Users List [EMAIL PROTECTED]


To
'Tomcat Users List' [EMAIL PROTECTED]
cc

Subject
RE: Trouble with ant install command and ResourceLink






I do not have an answer for your specific issue, but I found minor deploy
issues with install, so I only use deploy and undeploy tasks and do not 
have
any more issues.  Have you tried using deploy - did it have the same
problems?


 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
 Sent: Friday, March 28, 2003 11:52 AM
 To: Tomcat Users List
 Subject: Trouble with ant install command and ResourceLink


 hi there,

 In my /webapps/myapp.xml I'm using a ResourceLink:
   ResourceLink name=jdbc/mydb global=MyDatabase/

 I'm using the manager app via ant to test my application.
 After calling
 ant remove
 ant install

 it tells me the context has been installed OK.
 However, it seems as if the ResourceLink has not been inited during
 install, so it seems Tomcat doesn't read the /webapps/myapp.xml file.

 Sidenote: this problem is somewhat related to my
 initparameter problem
 outlined earlier today, but cannot be overcome as easily.

 has anybody overcome this issue?
 is else using the ant manager task together with JNDI resourcelinks
 successfully?

 thx
 Johannes


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




Where to store files in a portable app?

2003-03-29 Thread johannes . fiala
HI there,

In my app I need to store files after a transaction is complete.
I want to keep my application portable, so where should I store such files 
to??

Should I use a /output/.. directory in the root area or where else could 
be a smart location?

Any ideas on this topic??

thx alot
Johannes

RE: Trouble with ant install command and ResourceLink

2003-03-29 Thread johannes . fiala
hi jeff,

ok. so I will stay with deploy as well.

Currently I do the following to redeploy:
ant remove
ant deploy

However, there is a small time where users will still get a 404 error (the 
small delay where the PUT command is issued by the deploy task). Do you 
know a way how to get around this issue to have 100% uptime of an 
application?

thx alot
Johannes





Jeff Jensen [EMAIL PROTECTED] 
29.03.2003 15:34
Please respond to
Tomcat Users List [EMAIL PROTECTED]


To
'Tomcat Users List' [EMAIL PROTECTED]
cc

Subject
RE: Trouble with ant install command and ResourceLink






Yes, me too.  Based on what the install process does compared to deploy, I
have not yet determined an applicable time to use install vs deploy!  I
haven't looked back since started using deploy... :-)


 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
 Sent: Saturday, March 29, 2003 8:23 AM
 To: Tomcat Users List
 Subject: RE: Trouble with ant install command and ResourceLink


 Hi Jeff,

 no, using the ant deploy task it worked smoothly.
 I was just wondering what the install task is all about
 (if it's not
 working)

 thx
 Johannes




 Jeff Jensen [EMAIL PROTECTED]
 29.03.2003 15:02
 Please respond to
 Tomcat Users List [EMAIL PROTECTED]


 To
 'Tomcat Users List' [EMAIL PROTECTED]
 cc

 Subject
 RE: Trouble with ant install command and ResourceLink






 I do not have an answer for your specific issue, but I found
 minor deploy
 issues with install, so I only use deploy and undeploy tasks
 and do not
 have
 any more issues.  Have you tried using deploy - did it have the same
 problems?


  -Original Message-
  From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
  Sent: Friday, March 28, 2003 11:52 AM
  To: Tomcat Users List
  Subject: Trouble with ant install command and ResourceLink
 
 
  hi there,
 
  In my /webapps/myapp.xml I'm using a ResourceLink:
ResourceLink name=jdbc/mydb global=MyDatabase/
 
  I'm using the manager app via ant to test my application.
  After calling
  ant remove
  ant install
 
  it tells me the context has been installed OK.
  However, it seems as if the ResourceLink has not been inited during
  install, so it seems Tomcat doesn't read the
 /webapps/myapp.xml file.
 
  Sidenote: this problem is somewhat related to my
  initparameter problem
  outlined earlier today, but cannot be overcome as easily.
 
  has anybody overcome this issue?
  is else using the ant manager task together with JNDI resourcelinks
  successfully?
 
  thx
  Johannes


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





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




Re: Where to store files in a portable app?

2003-03-29 Thread johannes . fiala
Hi Kaarle,

Thx for the input.
Unfortunately the development system is Windows and production system is 
Unix, so absolute paths will never be the same.

Do you have any idea for how to manage properties files which will be 
different for windows than unix?
Should I create a separate web_local and web_remote directory and make a 
simple ant copy task to distinguish production/development?
Or is there a more elegant approach to this?

thx alot
Johannes




Kaarle Kaila [EMAIL PROTECTED] 
29.03.2003 15:41
Please respond to
Tomcat Users List [EMAIL PROTECTED]


To
Tomcat Users List [EMAIL PROTECTED]
cc

Subject
Re: Where to store files in a portable app?






At 15:35 29.3.2003 +0100, you wrote:
HI there,

In my app I need to store files after a transaction is complete.
I want to keep my application portable, so where should I store such 
files
to??

I would put the directory address for the files in a properties file 
(ResourceBundle)
Then you can really put them anywhere you like.

regards
Kaarle


Should I use a /output/.. directory in the root area or where else could
be a smart location?

Any ideas on this topic??

thx alot
Johannes

-
Kaarle Kaila
http://www.iki.fi/kaila
mailto:[EMAIL PROTECTED]
tel: +358 50 3725844 


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




SOLVED: Re: Living without a Context - deploying an application using manager app

2003-03-29 Thread johannes . fiala
Hi Jacob,

Thank you for your detailed description.
I'm now using the ant deploy/ant undeploy task successfully and it works 
as expected. 
I replaced all file-system access with .getClass().getResourceAsStream() 
and it works smoothly now.

Also, the ant install command works correctly with the same configuration 
(with META-INF/context.xml), which is quite cool because I'm able to use 
the same file structure for development and production.

Given my current ant/tomcat configuration I think a multi-release 
environment is definitely possible and easy to handle if one has the right 
tools and scripts available (e.g. I'm recently migrated from apache soap 
to axis with multiple releases). 

I'd like to contribute my current configuration experiences and update the 
docs for the other users - how can I do this?

thx
Johannes

Re: Where to store files in a portable app?

2003-03-29 Thread johannes . fiala
Hi Jacob,

I think the decision about where the locally stored data should go should 
be done at build time.
I'd suggest to use two directories within the ant tree structure:

/web/// stores the static data independent of location
/web-production/ // stores the config data which should be used in 
production
/web-preproduction/ // stores the config data which should be used in 
pre-production mode (testenvironment)
/web-development // stores the config data which should be used in 
development

context.xml could store the entry path of the locallay stored data
/web-development/META-INF/context.xml   // stores entry point and urls for 
development
/web-preproduction/META-INF/context.xml   // stores entry point and urls 
for pre-production
/web-production/META-INF/context.xml   // stores entry point and urls for 
production

when I build I could say
ant -Dtarget=production
ant -Dtarget=preproduction
ant -Dtarget=development

and have the ant task copy the proper configuration files.
This way I could easily test in preproduction and then deploy the same 
webapp, with only minor context configuration changes (and thus minimized 
error probability).

What do you think about this approach?

Johannes

RE: Trouble with ant install command and ResourceLink

2003-03-29 Thread johannes . fiala
Hi Jacob,

It seems as if I was wrong with ant install test.
I now undeployed and installed, but the Context information got lost.

Where do I have to put the context.xml in the /build/ directory? 
Would /build/myapp.xml ok? Would the install task accept any *.xml in 
/build/ as context configuration info?

I tried:
/build/context.xml
and 
ant install, but it didn't work.

Any suggestions??

thx
Johannes

RE: Trouble with ant install command and ResourceLink

2003-03-29 Thread johannes . fiala
p.s. if I do 

ant undeploy
ant install - context info gets lost
ant remove
ant deploy - context info is here again!
== so with deploy the context is ok, with install not.

*) I put /build/context.xml and /build/myapp.xml into the build-directory, 
but it still doesn't get the context inited.

*) wouldn't it make sense to read the context.xml for ant install out of 
the same directory as ant deploy?
(e.g. /build/META-INF/context.xml)

thx
Johannes

ant deploy - server.xml changes

2003-03-29 Thread johannes . fiala
Hi there,

1.) My server.xml looks a bit unstructured after doing an ant deploy with 
the manager app.
== Is it possible to tell the ant deploy task not to change server.xml 
itself, but only the /webapps/myapp.xml file belonging to the context 
(myapp)?

2.) Is it possible to turn the automatic renaming of old versions of 
server.xml off?
Every time I redeploy, an additional file shows up:
/conf/server.xml.2003-03-28.19-41-35

thx
Johannes

Listing all JNDI resources available

2003-03-29 Thread johannes . fiala
Hi there,

Is it somehow possible to look up all JNDI configuration values available 
in a servlet/context?
This would be quite fine for debugging purposes, and it seems there is no 
function available for this, only for looking up a specific value.

thx 
Johannes

Different behaviour of JSPC using ant/using tomcat itself

2003-03-29 Thread johannes . fiala
hi there,

I noticed an interesting difference between using ant jspc and having the 
jsp-file compiled by jasper during runtime.

*) during runtime the file is processed ok
*) using jspc it is encoded in UTF-8, which means that the german umlaute 
(ä,ö,ü) are displayed wrong, because the browser renders it as ISO-8859-1 
(which would be ok).

So it seems there is some character encoding conversion taking place using 
ant jspc.

== 
*) why is this happening?
*) how can I get rid of this?

thx alot
Johannes

Switching between releases during runtime

2003-03-29 Thread johannes . fiala
hi there,

Is it possible to have a virtual context, which just points to another 
context?
e.g.
myapp = current version, should point to myapp-1.0
myapp-1.0
myapp-1.1

Is it possible to change the context myapp is pointing to during 
runtime?
This would make switching between releases much easier rather than having 
to redeploy for each release switch.

What do you think about this idea?

thx
Johannes

Re: Listing all JNDI resources available

2003-03-29 Thread johannes . fiala
Hi Jerome,

I thought about the jdbc and env-entity entries in server.xml and web.xml.
I think it could be quite handy to have a servlet which lists all 
resources available (without having to know the name of each JNDI 
resource).

Of course digging in LDAP directories would make no sense, but I think a 
configuration listing would be quite handy for debugging and info 
purposes.

What do you mean?
Johannes





jerome moliere [EMAIL PROTECTED] 
29.03.2003 18:36
Please respond to
Tomcat Users List [EMAIL PROTECTED]


To
Tomcat Users List [EMAIL PROTECTED]
cc

Subject
Re: Listing all JNDI resources available






[EMAIL PROTECTED] wrote:

Hi there,

Is it somehow possible to look up all JNDI configuration values available 

in a servlet/context?
This would be quite fine for debugging purposes, and it seems there is no 

function available for this, only for looking up a specific value.

 

depending from your server config  the corresponding xsource of data 
used as the naming server, this solution could be very expansive
What about listing all resources available in your company LDAP server ?
I think that every other solution should be  preferred to this one...

HTH
Jerome


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




Possible values in web.xml - Reference??

2003-03-28 Thread johannes . fiala
Hi there,

Is there any reference available with samples what can be stored in 
web.xml and how to access the property?
In the examples context I found the following entries in web.xml:

env-entry
  env-entry-namename3/env-entry-name
  env-entry-value1/env-entry-value
  env-entry-typejava.lang.Integer/env-entry-type
/env-entry

How can I access these values? Are these accessible using 
servletcontext.getInitParameter(name3)? Is it getting casted to Integer 
automatically?

It would be quite cool to have a reference of all the possible 
configurations in web.xml and how to access them in Java!

thx alot
Johannes

Tomcat server.xml context-specific configuration

2003-03-28 Thread johannes . fiala
Hi there,

Since I got no replies to any of my inquiries regarding the use of 
context-specific information in server.xml, it seems as if nobody else 
uses this configuration property?

What is the recommended place to put context-specific parameters into?
e.g.
Context crossContext=true debug=0 docBase=myapp path=/myapp 
reloadable=true
Logger className=org.apache.catalina.logger.FileLogger 
prefix=wartung_log. suffix=.txt timestamp=true/
ResourceLink name=jdbc/mydb global=MyDatabase/
Parameter name=myparam override=false value=xxx/
/Context

Should I 
*) put it into server.xml (as is done with the examples demo-context) with 
the disadvantage of having to restart Tomcat if changes occur.
*) put it into webapps/myapp.xml (with the same disadvantage as above)
*) put it into web.xml as servlet-specific configuration?
Or can I also store context-specific info in web.xml??

Thx alot
Johannes

Re: Tomcat server.xml context-specific configuration

2003-03-28 Thread johannes . fiala
Hi there,

Here's what I found so far:

1.) I found that the more modern way of accessing scalar environment 
attributes seems to be JNDI.
2.) JNDI environment entries can be stored in web.xml
3.) 
web.xml file:
env-entry
  env-entry-nametestvaluewebxml/env-entry-name
  env-entry-valuevalue1/env-entry-value
  env-entry-typejava.lang.String/env-entry-type
/env-entry

4.) 
Lookup using Java Code:
 try {
Context globalctx = new InitialContext();
String envEntry = null;

envEntry = (String) 
globalctx.lookup(java:comp/env/testvaluewebxml);
out.println(envEntry testvaluewebxml:  + envEntry);
} catch (Exception e) {
out.println(liCannot get env-entry on JNDI  + e + /li);
return;
}

I didn't find such an example in the JNDI resources howto 
(http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-resources-howto.html) 
, but I think it would be cool to have such one.

p.s. Does anybody know how to access e.g. java:comp/env/ to read all 
environment entries available? Maybe even a code sample to share??

thx alot
Johannes

Re: Tomcat server.xml context-specific configuration

2003-03-28 Thread johannes . fiala
Hi Andoni,

I've got to manage tomcat in production with 99% availabilty, so I cannot 
afford a stop/start of Tomcat just to perform a minor update or bugfix. I 
want Tomcat in general run continuously.

So I have to avoid server.xml and its neighbourhood (/webapps/*.xml) where 
possible to achieve this goal. I think every application will have to 
achieve this goal at a certain point (=production level).

I'd suggest to set up a code of practice , i.e. what has to be done to 
achieve high availability of Tomcat. 
My first suggestion at this point would be to deprecate the usage of 
server.xml for parameter storage and encourage e.g. environment-variables 
(env-entry) in web.xml of each Context. This makes parameter config 
reloadable using ant/the manager application.

Does anybody know who could be in charge of this configuration issues and 
whom I could tell/discuss this idea with?
I think this topic is going to be important for every production quality 
tomcat server out there, which has to run frequent updates of 
functionality (webapps).

thx
Johannes





Andoni [EMAIL PROTECTED] 
28.03.2003 13:36
Please respond to
Tomcat Users List [EMAIL PROTECTED]


To
Tomcat Users List [EMAIL PROTECTED]
cc

Subject
Re: Tomcat server.xml context-specific configuration






I like putting everything possible into servlet.xml even though that means
restarting tomcat.  The advantage to me (and it is purely personal
preference) is that then I can look at one file and see straight away
everything that is going on with my system.  I don't understand people who
break up config files into  smaller files here, there and everywhere 
around
the tree.

If you are just starting out and you are not used to configuring Tomcat
servers then you might start this way and change if you don't like it or
vice-versa.

Hope that's of some help.

Andoni.
- Original Message -
From: [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Friday, March 28, 2003 9:40 AM
Subject: Tomcat server.xml context-specific configuration


 Hi there,

 Since I got no replies to any of my inquiries regarding the use of
 context-specific information in server.xml, it seems as if nobody else
 uses this configuration property?

 What is the recommended place to put context-specific parameters into?
 e.g.
 Context crossContext=true debug=0 docBase=myapp path=/myapp
 reloadable=true
 Logger 
className=org.apache.catalina.logger.FileLogger
 prefix=wartung_log. suffix=.txt timestamp=true/
 ResourceLink name=jdbc/mydb global=MyDatabase/
 Parameter name=myparam override=false value=xxx/
 /Context

 Should I
 *) put it into server.xml (as is done with the examples demo-context) 
with
 the disadvantage of having to restart Tomcat if changes occur.
 *) put it into webapps/myapp.xml (with the same disadvantage as above)
 *) put it into web.xml as servlet-specific configuration?
 Or can I also store context-specific info in web.xml??

 Thx alot
 Johannes


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




RE: Possible values in web.xml - Reference??

2003-03-28 Thread johannes . fiala
Hi Phil,

if you make changes to web.xml env-entries and stop/start the application 
using the manager app, do your changes show up? My changes didn't show up, 
only after a complete restart of the Tomcat Container.

thx
Johannes




Rhodes, Phil [EMAIL PROTECTED] 
28.03.2003 15:26
Please respond to
Tomcat Users List [EMAIL PROTECTED]


To
Tomcat Users List [EMAIL PROTECTED]
cc

Subject
RE: Possible values in web.xml - Reference??






From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
 Is there any reference available with samples what can be stored in 
 web.xml and how to access the property?
 In the examples context I found the following entries in web.xml:
 
 env-entry
   env-entry-namename3/env-entry-name
   env-entry-value1/env-entry-value
   env-entry-typejava.lang.Integer/env-entry-type
 /env-entry
 
 How can I access these values? Are these accessible using 
 servletcontext.getInitParameter(name3)? Is it getting 
 casted to Integer 
 automatically?

Try something like this:

import javax.naming.Context;
import javax.naming.InitialContext;
...
Context initialContext = null;
try {
 initialContext = new InitialContext();
}
catch (Exception e) {
  out.print(liCannot get initial context for JNDI: );
  out.println(e + /li);
 return;
}
Integer envEntry = null;
try {
 envEntry = (Integer) 
initialContext.lookup(java:comp/env/name3);
} 
catch (Exception e) {
 out.println(liCannot get env-entry on JNDI  + e + 
/li);
  return;
}
...

See  http://www.objectweb.org/jonas/current/doc/PG_War.html for a more
complete explanation - it really helped me.

-Phil


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




Re-reading of web.xml during a reload with manager app

2003-03-28 Thread johannes . fiala
hi there,

in the Manager App howto, paragraph on Reload an existing Application 
the following is quoted:
NOTE: The /WEB-INF/web.xml web application configuration file is not 
reread on a reload. If you have made changes to your web.xml file you must 
stop then start the web application. 

However, after I stop and start a web application after I made changes to 
the env-entry in its web.xml file, the new value doesn't show up.
After stopping and starting Tomcat as a whole, it changes in env-entry 
values show up perfectly.
Is this a bug?

Excerpt from web.xml:
 env-entry
  env-entry-nametestvaluewebxml/env-entry-name
  env-entry-value1/env-entry-value
  env-entry-typejava.lang.String/env-entry-type
/env-entry

Code section to read testvaluewebxml:
try {
Context globalctx = new InitialContext();
String envEntry = null;

envEntry = (String) 
globalctx.lookup(java:comp/env/testvaluewebxml);
out.println(envEntry testvaluewebxml:  + envEntry);
} catch (Exception e) {
out.println(liCannot get env-entry on JNDI  + e + /li);
return;
}

Can anybody else verify this behaviour? What do I have to have changes in 
env-entry in web.xml show up without restarting tomcat as a whole (what I 
wanted to avoid to allow high availability).

thx.
Johannes


Trouble with ant install command and ResourceLink

2003-03-28 Thread johannes . fiala
hi there,

In my /webapps/myapp.xml I'm using a ResourceLink:
  ResourceLink name=jdbc/mydb global=MyDatabase/

I'm using the manager app via ant to test my application.
After calling
ant remove
ant install

it tells me the context has been installed OK.
However, it seems as if the ResourceLink has not been inited during 
install, so it seems Tomcat doesn't read the /webapps/myapp.xml file. 

Sidenote: this problem is somewhat related to my initparameter problem 
outlined earlier today, but cannot be overcome as easily.

has anybody overcome this issue?
is else using the ant manager task together with JNDI resourcelinks 
successfully?

thx
Johannes

Living without a Context - deploying an application using manager app

2003-03-28 Thread johannes . fiala
hi there,

here are my findings after some experimentation with the ant deploy task 
of the manager app.

*) a complete application can be easily built into a WAR file using ant
*) this WAR file can be easily deployed using ant deploy task
*) once deployed onto the server, the application is running with the 
docbase located somewhere under the manager directory:
ant list
- produces:
/dbadmin:running:1:F:\tomcat-4.1.18\work\Standalone\localhost\manager\dbadmin.war

*) there the application is living 
- without a context
- thus, also without any JNDI resources etc. defined in server.xml for a 
context dbadmin with docbase dbadmin.

Would renaming the docbase to 
F:\tomcat-4.1.18\work\Standalone\localhost\manager\dbadmin.war resolve 
the problem of not having any context?
What else could be done to get a context for the webapplication dbadmin?

thx
Johannes

Fw: Living without a Context - deploying an application using manager app

2003-03-28 Thread johannes . fiala
additionaly, an application deployed using the manager app currently 
returns null if you use servletcontext.getRealPath();
so it's context seems to be quite obfuscated...

Does anybody else have the same phenomenon?

thx
Johannes

- Forwarded by Johannes Fiala/Johannes Fiala on 28.03.2003 19:53 -

Johannes Fiala/Johannes Fiala 
28.03.2003 19:46

To
'Tomcat Users List' [EMAIL PROTECTED]
cc

Subject
Living without a Context - deploying an application using manager app





hi there,

here are my findings after some experimentation with the ant deploy task 
of the manager app.

*) a complete application can be easily built into a WAR file using ant
*) this WAR file can be easily deployed using ant deploy task
*) once deployed onto the server, the application is running with the 
docbase located somewhere under the manager directory:
ant list
- produces:
/dbadmin:running:1:F:\tomcat-4.1.18\work\Standalone\localhost\manager\dbadmin.war

*) there the application is living 
- without a context
- thus, also without any JNDI resources etc. defined in server.xml for a 
context dbadmin with docbase dbadmin.

Would renaming the docbase to 
F:\tomcat-4.1.18\work\Standalone\localhost\manager\dbadmin.war resolve 
the problem of not having any context?
What else could be done to get a context for the webapplication dbadmin?

thx
Johannes

Reloading context-specific InitParameter

2003-03-26 Thread johannes . fiala
hi there,

is it possible to reload context-specific Initialization parameters stored 
in server.xml on the fly?
if I deploy a new webapp to Tomcat, I always have the problem, that the 
Context InitParameters are not available - only after a restart of Tomcat, 
the application runs as expected.

Is there any way to reload the InitParameters of a context after deploying 
a new webapp?

thx
Johannes

Reloading server.xml with manager app

2003-03-25 Thread johannes . fiala
Hi there,

I've split the server.xml file as follows:
/conf/server.xml = contains the primary 
configuration
/webapps/contextname.xml = contains the context specific configuration

However, when I try to reload an app with the manager app it seems as if 
the information in contextname.xml is not re-read. Also if I simply 
deploy a new application it seems that it has troubles reading the 
information out of the contextname.xml.
Re-Reading everything in the /webapps/contextname-folder works 
perfectly.

Does anybody know how to reload info from server.xml or it's 
context-specific files?
Wouldn't it make sense to include re-reading the context-specific part of 
the server.xml file for each context which gets reloaded???

Thx alot
Johannes

SOLVED: Re: Jasper Compilation - Vol. 2 (continued from WebappPrecompilation using Ant and Jasper howto)

2003-03-24 Thread johannes . fiala
hi all,

I've now found the solutions using some threads in this forum, but want to 
share the complete solution here:
*) jspc-task: all *.jsp files in /jsp will be compiled into the /src 
directory
*) merge-descriptors-task: /jsp/web-template.xml will be used for merging 
the temporary webinc.xml into the real web.xml
place a @WEBINC@ into the web-template.xml between the end of the 
servlet and the start of the servlet-mapping section.
*) now both will get compiled and put into the build-directory correctly.

This means using the build.xml below you can do a compile, install and run 
scenario.
ant compile
ant install

is all you have to do at the commandline.

johannes


!--
 General purpose build script for web applications and web services,
 including enhanced support for deploying directly to a Tomcat 4
 based server.

 This build script assumes that the source code of your web 
application
 is organized into the following subdirectories underneath the source
 code directory from which you execute the build script:

docs Static documentation files to be copied to
 the docs subdirectory of your distribution.

src  Java source code (and associated resource 
files)
 to be compiled to the WEB-INF/classes
 subdirectory of your web applicaiton.

web  Static HTML, JSP, and other content (such as
 image files), including the WEB-INF 
subdirectory
 and its configuration file contents.

 $Id: build.xml.txt,v 1.7 2002/12/28 09:08:58 jfclere Exp $
--


!-- A project describes a set of targets that may be requested
 when Ant is executed.  The default attribute defines the
 target which is executed if no specific target is requested,
 and the basedir attribute defines the current working directory
 from which Ant executes the requested task.  This is normally
 set to the current working directory.
--

project name=My Project default=compile basedir=.



!-- = Property Definitions 
=== --


!--

  Each of the following properties are used in the build script.
  Values for these properties are set by the first place they are
  defined, from the following list:

  * Definitions on the ant command line (ant -Dfoo=bar compile).

  * Definitions from a build.properties file in the top level
source directory of this application.

  * Definitions from a build.properties file in the developer's
home directory.

  * Default definitions in this build.xml file.

  You will note below that property values can be composed based on the
  contents of previously defined properties.  This is a powerful technique
  that helps you minimize the number of changes required when your 
development
  environment is modified.  Note that property composition is allowed 
within
  build.properties files as well as in the build.xml script.

--

  property file=build.properties/
  property file=${user.home}/build.properties/


!--  File and Directory Names 
 --


!--

  These properties generally define file and directory names (or paths) 
that
  affect where the build process stores its outputs.

  app.name Base name of this application, used to
   construct filenames and directories.
   Defaults to myapp.

  app.path Context path to which this application should be
   deployed (defaults to / plus the value of the
   app.name property).

  app.version  Version number of this iteration of the 
application.

  build.home   The directory into which the prepare and
   compile targets will generate their output.
   Defaults to build.

  catalina.homeThe directory in which you have installed
   a binary distribution of Tomcat 4.  This will
   be used by the deploy target.

  dist.homeThe name of the base directory in which
   distribution files are created.
   Defaults to dist.

  manager.password The login password of a user that is assigned the
   manager role (so that he or she can execute
   commands via the /manager web application)

  manager.url  The URL of the /manager web application on the
   Tomcat installation to which we will deploy web
   applications and web services.

  manager.username The login username of a user that is assigned the
   manager role (so that he or she can execute
   commands via the /manager web application)

--

  property name=app.version   value=1.0.0.0/
  property 

Jasper Compilation with Ant including custom taglibs

2003-03-24 Thread johannes . fiala
hi there,

I've used a taglib from the jstl/core-package and would like to compile 
it.
If I try so using ant and a jspc-task, I get the following error:

2003-03-23 05:54:11 - ERROR-the file '\nodigsig.jsp' generated the 
following gen
eral exception: org.apache.jasper.JasperException: This absolute uri 
(http://jav
a.sun.com/jstl/core) cannot be resolved in either web.xml or the jar files 
deployed with this application
  [jasper2] Error in class org.apache.jasper.JspC
BUILD FAILED

== I already tried to include the libraries as properties (external 
dependencies), but no success.

Has anybody else tried to compile JSPs using custom taglibs?

===
nodigsig.jsp
===
%@ page language=java contentType=text/html %
%@ taglib prefix=c uri = http://java.sun.com/jstl/core; %
%
System.out.println(executing scriptlet code);
%
html
body
Ihre Anfrage wurde gespeichert und wird in den nauml;chsten Tagen 
bearbeitet.
/body
/html


build.xml (excerpt)

target name=jspc

taskdef classname=org.apache.jasper.JspC name=jasper2 
  classpath id=jspc.classpath
pathelement location=${java.home}/../lib/tools.jar/
fileset dir=${catalina.home}/server/lib
  include name=*.jar/
/fileset
fileset dir=${catalina.home}/common/lib
  include name=*.jar/
/fileset
  /classpath
/taskdef

jasper2
 validateXml=false
 uriroot=${basedir}/jsp
 webXmlFragment=${basedir}/webinc.xml
 outputDir=${basedir}/src /

  /target


thx alot
johannes



Fw: Jasper Compilation with Ant including custom taglibs

2003-03-24 Thread johannes . fiala
To make the picture more complete: 
it seems that the trouble the Jasper compiler doesn't find the 
/WEB-INF/web.xml file.
But how can I tell it where to find it (simply creating it directly under 
my project directory didn't work)? 
If I include other custom taglibs with reference to e.g. 
/WEB-INF/forms.tld it doesn't find them as well.

So the question is:

How can I tell the Jasper Compiler where to find the /WEB-INF/web.xml or 
/WEB-INF/forms.tld.

===
My directory tree structure:
===
/web/WEB-INF/web.xml
/web/WEB-INF/forms.tld

===
and here it the commandline of the ant-task
===
ant jspc
Buildfile: build.xml

jspc:
2003-03-23 06:11:23 - Internal Error: File /WEB-INF/web.xml not found
2003-03-23 06:11:23 - ERROR-the file '\digsig.jsp' generated the following 
gener
al exception: org.apache.jasper.JasperException: This absolute uri 
(http://java.
sun.com/jstl/core) cannot be resolved in either web.xml or the jar files 
deploye
d with this application
  [jasper2] Error in class org.apache.jasper.JspC

BUILD FAILED
file:F:/soap/esv/forms/build.xml:296: org.apache.jasper.JasperException: 
This ab
solute uri (http://java.sun.com/jstl/core) cannot be resolved in either 
web.xml
or the jar files deployed with this application

- Forwarded by Johannes Fiala/Johannes Fiala on 23.03.2003 18:11 -

Johannes Fiala/Johannes Fiala 
23.03.2003 17:59

To
Tomcat Users List [EMAIL PROTECTED]
cc

Subject
Jasper Compilation with Ant including custom taglibs





hi there,

I've used a taglib from the jstl/core-package and would like to compile 
it.
If I try so using ant and a jspc-task, I get the following error:

2003-03-23 05:54:11 - ERROR-the file '\nodigsig.jsp' generated the 
following gen
eral exception: org.apache.jasper.JasperException: This absolute uri 
(http://jav
a.sun.com/jstl/core) cannot be resolved in either web.xml or the jar files 
deployed with this application
  [jasper2] Error in class org.apache.jasper.JspC
BUILD FAILED

== I already tried to include the libraries as properties (external 
dependencies), but no success.

Has anybody else tried to compile JSPs using custom taglibs?

===
nodigsig.jsp
===
%@ page language=java contentType=text/html %
%@ taglib prefix=c uri = http://java.sun.com/jstl/core; %
%
System.out.println(executing scriptlet code);
%
html
body
Ihre Anfrage wurde gespeichert und wird in den nauml;chsten Tagen 
bearbeitet.
/body
/html


build.xml (excerpt)

target name=jspc

taskdef classname=org.apache.jasper.JspC name=jasper2 
  classpath id=jspc.classpath
pathelement location=${java.home}/../lib/tools.jar/
fileset dir=${catalina.home}/server/lib
  include name=*.jar/
/fileset
fileset dir=${catalina.home}/common/lib
  include name=*.jar/
/fileset
  /classpath
/taskdef

jasper2
 validateXml=false
 uriroot=${basedir}/jsp
 webXmlFragment=${basedir}/webinc.xml
 outputDir=${basedir}/src /

  /target


thx alot
johannes



RE: Reloading shared/lib JAR files?

2003-03-23 Thread Johannes Fiala
Hi Jeff,

Thank you very much for the detailed outline.
The reason why I wanted to use a central library was that I wanted to 
prevent different versions of my core libs haunting the contexts of the 
Tomcat server.  So you're suggested solution would be to leave it up to 
the separate contexts to update and use the newer lib files.

The only drawback of this terms of use is, that you have one component n 
times installed across the various contexts of the Tomcat. This was what I 
wanted to avoid

So to use both ideas, what about the following:
*) central repository of all versions of all helper jar files
/{$tomcat_home}/repository/v1.jar
/{$tomcat_home}/repository/v2.jar

*) each application context picks the version it likes to use
/{$tomcat_home}/webapps/myapp/WEB-INF/lib/link to v1.jar
/{$tomcat_home}/webapps/myapp2/WEB-INF/lib/link to v2.jar

Do you think the approach outlined above makes sense?
I think this would reduce the scattered library version troubles and it 
would even be possible to search all the contexts to find out which 
versions are used.

Thx for your feedback
Johannes




Jeff Jensen [EMAIL PROTECTED] 
22.03.2003 16:44
Please respond to
Tomcat Users List [EMAIL PROTECTED]


To
'Tomcat Users List' [EMAIL PROTECTED]
cc

Subject
RE: Reloading shared/lib JAR files?






Also, from a release management standpoint, the risk is the dependency of
all the apps on the specific versions of the jars in shared/lib.  Meaning,
if one app needs a newer version of a shared component placed in 
shared/lib,
then all are forced to upgrade as well.  Timing on upgrading the other 
apps
is not usually so helpful, particularly when needing even a small coding
change!

It is typically better to use the source control tool to integrate 
specific
versions of shared components into its own codeline - so the codeline is
complete without external dependencies (reproducible builds from the 
source
tree).  If it is a 3rd party component, check-in the distributables and
integrate/merge the right versions of them into your different product
codelines.  If it is your own component, do the same - check-in the
distributables.  For deployment, as part of the normal 
build/package/deploy
process, place the shared components in WEB-INF/lib so each app can have 
its
own version.

As Tim says, this would rethink the design and solve the problem by not
having anything in shared/lib.  At the same time, eliminating a potential
cross-application dependency problem.

Disclaimer - there may be something in your environment that forces you to
use shared/lib (or possibly never even have an upgrade problem), whether
technical (can't think of much other than large footprint jars) or
political ;-)

Your mileage may vary.


 -Original Message-
 From: Tim Funk [mailto:[EMAIL PROTECTED]
 Sent: Saturday, March 22, 2003 8:50 AM
 To: Tomcat Users List
 Subject: Re: Reloading shared/lib JAR files?


 If you redeploy jars into /shared/lib - they will not be
 reloaded on a
 webapp reload and there is no way to reload them(except a
 stop/start of
 tomcat). But jars/classes in WEB-INF/ can be reloaded.

 If you have jars in shared/lib that need reloaded when an webapp is
 reloaded - you might need to rethink the design of those shared libs.

 -Tim

 Johannes Fiala wrote:
  Hi there,
 
  I know it is possible to reload a web-application using the
 manager app
  (especially the JAR-files in WEB-INF/lib).
  Is it possible to also include the shared/lib directory?
 
  We have some helper JARs, which are used by four web
 contexts, so I'd
  prefer to put them into /shared/lib.
  However, if it doesn't get reloaded after an update of
 /shared/lib, I have
  no means to perform a hot redeploy if only the JAR files change.
 
  thx alot
  Johannes


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




Handling release management with Tomcat

2003-03-23 Thread Johannes Fiala
Hi there,

We have a multiple server and multiple release system using Tomcat 4.1.18.
Given the issues we have to address we want to ease updating from version 
to the other without facing big risks or interoperability issues. Servers 
acting as clients calling soap requests etc. should be able to stick with 
lower-level releases or test beta-releases easily.

I'd propose the following procedure for dealing with multiple releases 
easily:
{$TOMCAT_HOME}/webapps/myapp-1.0
{$TOMCAT_HOME}/webapps/myapp-1.1
{$TOMCAT_HOME}/webapps/myapp-1.2beta
{$TOMCAT_HOME}/webapps/myapp-1.3alpha

main application entry:
{$TOMCAT_HOME}/webapps/myapp

Above are the separate versions of the Tomcat Contexts of myapp. 
To switch between the different versions of myapp, two options exist in my 
opinion:
*) using a symbolic file system link to point to the version of myapp 
which is the lead version
*) using JK to link to the proper myapp-x.x directory (only possible with 
Apache/Tomcat connected with JK).

Which version do you think is preferable? 
Do different options exist which make more sense?

The release management should allow to:
*) decide to still take the lower level release (e.g. 1.0) explicitly, 
so clients could take the link with myapp-1.0 to do so. 
*) decide to test a higher level beta release (e.g. 1.2beta)

However, the main entry focuses on the current release. Hotfixes could 
be dealt with that system as well.

What do you think ? 
Johannes

Webapp Precompilation using Ant and Jasper howto

2003-03-23 Thread Johannes Fiala
Hi there,

I read the Jasper howto 
(http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jasper-howto.html), but I 
didn't get the build.xml file to work.

here's the commandline I typed in:
F:\srcant -Dtomcat.home=f:/tomcat-4.1.18 
-Dwebapp.path=f:/tomcat-4.1.18/webapps/myapp

I get the following error:

Buildfile: build.xml

jspc:
2003-03-23 03:26:39 - ERROR-the file '\views\liste.jsp' gene
rated the following general exception: java.lang.NullPointerException
  [jasper2] Error in class org.apache.jasper.JspC

BUILD FAILED
file:F:/soap/esv/src/build.xml:21: org.apache.jasper.JasperException

Total time: 2 seconds


liste.jsp itself is simply empty, so it seems that Jasper didn't produce 
any output! I tried it both with tomcat running and tomcat stopped.

here's the build.xml file in F:\src\build.xml:
project name=Webapp Precompilation default=all basedir=.

  target name=jspc

taskdef classname=org.apache.jasper.JspC name=jasper2 
  classpath id=jspc.classpath
pathelement location=${java.home}/../lib/tools.jar/
fileset dir=${tomcat.home}/server/lib
  include name=*.jar/
/fileset
fileset dir=${tomcat.home}/common/lib
  include name=*.jar/
/fileset
  /classpath
/taskdef

jasper2
 validateXml=false
 uriroot=${webapp.path}
 webXmlFragment=${webapp.path}/WEB-INF/generated_web.xml
 outputDir=${webapp.path}/WEB-INF/src /

  /target

  target name=compile

mkdir dir=${webapp.path}/WEB-INF/classes/
mkdir dir=${webapp.path}/WEB-INF/lib/

javac destdir=${webapp.path}/WEB-INF/classes
   optimize=off
   debug=on failonerror=false
   srcdir=${webapp.path}/WEB-INF/src
   excludes=**/*.smap
  classpath
pathelement location=${webapp.path}/WEB-INF/classes/
fileset dir=${webapp.path}/WEB-INF/lib
  include name=*.jar/
/fileset
pathelement location=${tomcat.home}/common/classes/
fileset dir=${tomcat.home}/common/lib
  include name=*.jar/
/fileset
pathelement location=${tomcat.home}/shared/classes/
fileset dir=${tomcat.home}/shared/lib
  include name=*.jar/
/fileset
  /classpath
  include name=** /
  exclude name=tags/** /
/javac

  /target

  target name=all depends=jspc,compile
  /target

/project

Can anybody shed any light onto this issue?

thx alot
Johannes

Jasper Compilation - Vol. 2 (continued from Webapp Precompilation using Antand Jasper howto)

2003-03-23 Thread Johannes Fiala
Hi there,

I've just built an ant task to allow for compilation of Jsps (jspc)
*) the compiled jsps are put into /web/WEB-INF/src/*.java
*) a generated WEB-INF directory is created at 
/web/WEB-INF/generated_web.xml

However, I'd like to accomplish the following:
*) automatically merge the generated_web.xml into the web.xml that already 
exists
*) deploy the webapp to the container (not only install, I mean deploy)

Has anybody done this so far?
thx
Johannes

!-- ==
jspc task definition
== --
target name=jspc

taskdef classname=org.apache.jasper.JspC name=jasper2 
  classpath id=jspc.classpath
pathelement location=${java.home}/../lib/tools.jar/
fileset dir=${catalina.home}/server/lib
  include name=*.jar/
/fileset
fileset dir=${catalina.home}/common/lib
  include name=*.jar/
/fileset
  /classpath
/taskdef

jasper2
 validateXml=false
 uriroot=${webapp.path}
 webXmlFragment=${webapp.path}/WEB-INF/generated_web.xml
 outputDir=${webapp.path}/WEB-INF/src /

  /target


Reloading shared/lib JAR files?

2003-03-22 Thread Johannes Fiala
Hi there,

I know it is possible to reload a web-application using the manager app 
(especially the JAR-files in WEB-INF/lib).
Is it possible to also include the shared/lib directory?

We have some helper JARs, which are used by four web contexts, so I'd 
prefer to put them into /shared/lib.
However, if it doesn't get reloaded after an update of /shared/lib, I have 
no means to perform a hot redeploy if only the JAR files change.

thx alot
Johannes

Ant redeploy, Apache (mod_webapp) Tomcat 4.1

2003-03-21 Thread Johannes Fiala

Return Receipt
   
Your  Ant redeploy, Apache (mod_webapp)  Tomcat 4.1   
document   
:  
   
was   Johannes Fiala/Johannes Fiala
received   
by:
   
at:   21.03.2003 23:01:55  
   





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



HOT redeploy of webapps using Tomcat 4.1.18?

2003-03-21 Thread Johannes Fiala
Hi there,

Has anybody done a hot redeploy of a web application context using Tomcat?

What I've got to work so far:
*) simply overwrite JARs in the /webapps/myapp/WEB-INF/lib directory and 
reloading the application context runs ok
*) however, if you really want to completeley redeploy a web application, 
I currently have not found any other solution than having to stop and 
start the application (which means putting the whole application down).

== Is there really no way for simply exchanging a webapp during runtime?
What about the most simple solution: 
1.) putting up a new version (e.g. myapp2)
2.) using a redirect to redirect from myapp - myapp2 (without the user 
noticing it)

this would also make it easy to step back if troubles occur.
any thoughts on this matter?

Johannes

RE: Tomcat 4.1.18 - IIS 5.0 plugin - jk2.properties + workers2.properties

2003-03-12 Thread Johannes Fiala
Hi Rick,

It seems that I've finally got round this error. 
However, it (2.0.1/2.0.2 JK) is still not working.

Debug:  [jk_isapi_plugin.c (287)]: HttpFilterProc started
Debug:  [jk_isapi_plugin.c (347)]: In HttpFilterProc Virtual Host 
redirection of localhost : 61531072
Debug:  [jk_isapi_plugin.c (356)]: HttpFilterProc [/examples] is a servlet 
url - should redirect to lb:lb
Debug:  [jk_isapi_plugin.c (422)]: HttpFilterProc check if [/examples] is 
pointing to the web-inf directory
 
I think the term - should redirect to lb:lb seems to have an error, but 
I don't know what is causing it.
Any ideas?

BTW - there is a minor typo in line 367:
env-l-jkLog(env, env-l,  JK_LOG_DEBUG, 
   HttpFilterProc fowarding original URI 
[%s]\n,uri);
should be corrected to
env-l-jkLog(env, env-l,  JK_LOG_DEBUG, 
   HttpFilterProc forwarding original URI 
[%s]\n,uri);

I also don't see any log messages for init_jk() - does anybody know how to 
turn this on?

thx
Johannes




Rick Bullotta [EMAIL PROTECTED] 
10.03.2003 21:53
Please respond to
Tomcat Users List [EMAIL PROTECTED]


To
'Tomcat Users List' [EMAIL PROTECTED]
cc

Subject
RE: Tomcat 4.1.18 - IIS 5.0 plugin - jk2.properties + workers2.properties






Actually, that error is generally related to IIS trying to start up when
Apache Http server is running on the same port...make sure Apache http
server is STOPPED and than Tomcat is not set up to be listening on port
80...


Rick Bullotta
CTO
Lighthammer Software (http://www.lighthammer.com)



-Original Message-
From: Johannes Fiala [mailto:[EMAIL PROTECTED] 
Sent: Monday, March 10, 2003 2:24 PM
To: Tomcat Users List
Cc: [EMAIL PROTECTED]
Subject: RE: Tomcat 4.1.18 - IIS 5.0 plugin - jk2.properties +
workers2.properties


Hi Rick,

I tried both fixes, but they failed. I also tried different releases 
(2.0.1, 2.0.2), but none worked.
It also doesn't log properly, just fails when I look into the event
viewer 


Event Type: Error
Event Source:   W3SVC
Event Category: None
Event ID:   115
Date:   10.03.2003
Time:   20:17:27
User:   N/A
Computer:   DEVELOPER1
Description:
The service could not bind instance 1.  The data is the error code. 
For additional information specific to this message please visit the 
Microsoft Online Support site located at: 
http://www.microsoft.com/contentredirect.asp. 
Data:
: 40 27 00 00   @'.. 

I cannot fully understand why jk 1.x works so smoothly, but 2.0.2 simply

doesn't work out. 
Do you know any location where I can find more info about this error?
Maybe I need a patch for IIS to fix this?? 

I've spent lots of hours trying to get this work, but troubleshooting
this 
IIS connector is much harder than programming Java :)

thx a lot for your input!
johannes




Rick Bullotta [EMAIL PROTECTED] 
09.03.2003 15:34
Please respond to
[EMAIL PROTECTED]


To
Tomcat Users List [EMAIL PROTECTED]
cc

Subject
RE: Tomcat 4.1.18 - IIS 5.0 plugin - jk2.properties +
workers2.properties






Here are a few differences between your configuration and mine:

1) My workers2.properties uses [shm:] instead of [shm].
2) I found that the 2.0.2 jk2 ISAPI redirector dll does not like forward

slash path syntax on Windows (for your SHM file).  Try \\.

 Tomcat Users List [EMAIL PROTECTED] wrote:
 hi there,
 
 here are the properties files I currently use (a merge of Mark's +
Rick's 
 configuration files):
 
 =
 jk2.properties
 =
 ## THIS FILE MAY BE OVERRIDEN AT RUNTIME. MAKE SURE TOMCAT IS STOPED 
 ## WHEN YOU EDIT THE FILE.
 
 ## COMMENTS WILL BE _LOST_
 
 ## DOCUMENTATION OF THE FORMAT IN JkMain javadoc.
 
 # Set the desired handler list
 # handler.list=apr,request,channelJni
 #
 # Override the default port for the socketChannel
 # channelSocket.port=8019
 # Default:
 # channelUnix.file=${jkHome}/work/jk2.socket
 # Just to check if the the config  is working
 # shm.file=${jkHome}/work/jk2.shm
 
 # In order to enable jni use any channelJni directive
 # channelJni.disabled = 0
 # And one of the following directives:
 
 # apr.jniModeSo=/opt/apache2/modules/mod_jk2.so
 
 # If set to inprocess the mod_jk2 will Register natives itself # This 
 will enable the starting of the Tomcat from mod_jk2 # 
 apr.jniModeSo=inprocess
 
 #
 # Socket configuration
 #
 handler.list=request,container,channelSocket
 #apr
 
 #
 # apr configuration
 # jk2.properties file in C:\Tomcat\conf
 #
 #apr.NativeSo=${jkHome}\\bin\\Win32\\jkjni.dll
 #apr.jniModeSo=${jkHome}\\bin\\Win32\\jkjni.dll
 
 #
 # socket configuration
 #
 channelSocket.port=8009
 channelSocket.address=127.0.0.1
 channelSocket.maxPort=port+10
 
 =
 workers2.properties
 =
 # workers2.properties file in C:\Apache2\conf
 # only at beginning. In production uncomment it out
 # [logger.apache2]
 # level=DEBUG
 
 [shm

RE: Tomcat 4.1.18 - IIS 5.0 plugin - jk2.properties + workers2.properties

2003-03-12 Thread Johannes Fiala
Hi Rick,

My last email contained a wrong diagnosis of the problem. 
redirection to lb:lb is fine, because it is defined as a load balancer in 
my workers2.properties. 
However, after entering http://localhost/examples I simply get a Server 
not found exception using MS IE 6 (indicating there was no reply from the 
server), no reply with NS Navigator 7 or Opera 6.

The W3SV1 could not bind instance - error message has vanished after I 
changed the port of IIS to 80 from .

Debug:  [jk_isapi_plugin.c (287)]: HttpFilterProc started
Debug:  [jk_isapi_plugin.c (347)]: In HttpFilterProc Virtual Host 
redirection of localhost : 61531072
Debug:  [jk_isapi_plugin.c (356)]: HttpFilterProc [/examples] is a servlet 

url - should redirect to lb:lb
Debug:  [jk_isapi_plugin.c (422)]: HttpFilterProc check if [/examples] is 
pointing to the web-inf directory
after this entry, no more things show up in the application log.

Here's what my IIS log is showing:
21:12:40 127.0.0.1 GET /jakarta/isapi_redirector2_201.dll 200

So it seems everything is fine, but it isn't. I allowed execution access 
for the virtual directory /jakarta.

So that's my current summary:
JK 1.0 - working fine
JK 2.0.1 - not working
JK 2.0.2 - not working

I don't know what I can do now, do you have any additional ideas what 
could be wrong?

thx alot
Johannes


SOLVED: Re: Tomcat 4.1.18 - IIS 5.0 plugin - jk2.properties + workers2.properties

2003-03-12 Thread Johannes Fiala
Hi to all!

I finally have found the solution:
2.0.1 and 2.0.2 is now working - it seems my try to use a different name 
for the redirector dll other than isapi_redirector2.dll has caused the 
trouble. I thought I could use isapi_redirector2_201.dll and enter it in 
the extensionUri and use it as filter in the IIS properties, but this 
didn't work.

For everybody else to save hours of desperate research, I post my complete 
configuration here:
===
registry settings (edited using regedt32.exe)
===
SOFTWARE - Apache Software Foundation - Jakarta Isapi Redirector - 2.0 
authComplete: 0
extensionUri: /jakarta/isapi_redirector2.dll
logLevel: DEBUG
serverRoot: f:\tomcat-4.1.18
threadPool: 20
workersFile: f:\tomcat-4.1.18\conf\ntiis\workers2.properties

The correct workers2.properties + jk2.properties files can be found in the 
source release (2.0.2) of the JK2 connector.
They are missing in the binary release and are not included in the 
normal Tomcat 4.1.18-distribution.
== So you have to grab them out of the source distribution. 

===
workers2.properties (location: anywhere you like, you have to point with 
the registry entry workersFile to the right filename).
===
[logger]
level=DEBUG

[config:]
file=${serverRoot}/conf/workers2.properties
debug=10
debugEnv=0

[uriMap:]
info=Maps the requests. Options: debug
debug=10

# Alternate file logger
#[logger.file:0]
#level=DEBUG
#file=${serverRoot}/logs/jk2.log

[shm:]
info=Scoreboard. Required for reconfiguration and status with multiprocess 
servers
file=${serverRoot}/logs/jk2.shm
size=100
debug=10
disabled=0

[workerEnv:]
info=Global server options
timing=1
debug=10
# Default Native Logger (apache2 or win32 )
# can be overriden to a file logger, useful
# when tracing win32 related issues
#logger=logger.file:0

[lb:lb]
info=Default load balancer.
debug=10

[lb:lb_1]
info=A second load balancer.
debug=10

[channel.socket:localhost:8009]
info=Ajp13 forwarding over socket
debug=10
tomcatId=localhost:8009

[channel.socket:localhost:8019]
info=A second tomcat instance.
debug=10
tomcatId=localhost:8019
lb_factor=1
group=lb
group=lb_1
disabled=0

[channel.un:/opt/33/work/jk2.socket]
info=A second channel connecting to localhost:8019 via unix socket
tomcatId=localhost:8019
lb_factor=1
debug=10

[channel.jni:jni]
info=The jni channel, used if tomcat is started inprocess

[status:]
info=Status worker, displays runtime informations

[vm:]
info=Parameters used to load a JVM in the server process
#JVM=C:\jdk\jre\bin\hotspot\jvm.dll
classpath=${TOMCAT_HOME}/bin/tomcat-jni.jar
classpath=${TOMCAT_HOME}/server/lib/commons-logging.jar
OPT=-Dtomcat.home=${TOMCAT_HOME}
OPT=-Dcatalina.home=${TOMCAT_HOME}
OPT=-Xmx128M
#OPT=-Djava.compiler=NONE
disabled=1

[worker.jni:onStartup]
info=Command to be executed by the VM on startup. This one will start 
tomcat.
class=org/apache/jk/apr/TomcatStarter
ARG=start
# For Tomcat 5 use the 'stard' for startup argument
# ARG=stard
disabled=1
stdout=${serverRoot}/logs/stdout.log
stderr=${serverRoot}/logs/stderr.log

[worker.jni:onShutdown]
info=Command to be executed by the VM on shutdown. This one will stop 
tomcat.
class=org/apache/jk/apr/TomcatStarter
ARG=stop
disabled=1

[uri:/jkstatus/*]
info=Display status information and checks the config file for changes.
group=status:

[uri:127.0.0.1:8003]
info=Example virtual host. Make sure myVirtualHost is in /etc/hosts to 
test it
alias=myVirtualHost:8003

[uri:127.0.0.1:8003/ex]
info=Example webapp in the virtual host. It'll go to lb_1 ( i.e. 
localhost:8019 )
context=/ex
group=lb_1

[uri:/examples]
info=Example webapp in the default context.
context=/examples
debug=10

[uri:/examples1/*]
info=A second webapp, this time going to the second tomcat only.
group=lb_1
debug=10

[uri:/examples/servlet/*]
info=Prefix mapping
debug=10

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

[uri:/examples/*]
info=Map the whole webapp
debug=10

[uri:/examples/servlet/HelloW]
info=Example with debug enabled.
debug=10
===


===
jk2.properties (location: {$tomcat_home}/conf).
===
## THIS FILE MAY BE OVERRIDEN AT RUNTIME. MAKE SURE TOMCAT IS STOPED
## WHEN YOU EDIT THE FILE.

## COMMENTS WILL BE _LOST_

## DOCUMENTATION OF THE FORMAT IN JkMain javadoc.

# Set the desired handler list
# handler.list=apr,request,channelJni
#
# Override the default port for the socketChannel
# channelSocket.port=8019
# Default: 
# channelUnix.file=${jkHome}/work/jk2.socket
# Just to check if the the config  is working
# shm.file=${jkHome}/work/jk2.shm

# In order to enable jni use any channelJni directive
# channelJni.disabled = 0
# And one of the following directives:

# apr.jniModeSo=/opt/apache2/modules/mod_jk2.so

# If set to inprocess the mod_jk2 will Register natives itself
# This will enable the starting of the Tomcat from mod_jk2
# 

RE: Tomcat 4.1.18 - IIS 5.0 plugin - jk2.properties + workers2.properties

2003-03-10 Thread Johannes Fiala
Hi Rick,

I tried both fixes, but they failed. I also tried different releases 
(2.0.1, 2.0.2), but none worked.
It also doesn't log properly, just fails when I look into the event viewer 


Event Type: Error
Event Source:   W3SVC
Event Category: None
Event ID:   115
Date:   10.03.2003
Time:   20:17:27
User:   N/A
Computer:   DEVELOPER1
Description:
The service could not bind instance 1.  The data is the error code. 
For additional information specific to this message please visit the 
Microsoft Online Support site located at: 
http://www.microsoft.com/contentredirect.asp. 
Data:
: 40 27 00 00   @'.. 

I cannot fully understand why jk 1.x works so smoothly, but 2.0.2 simply 
doesn't work out. 
Do you know any location where I can find more info about this error?
Maybe I need a patch for IIS to fix this?? 

I've spent lots of hours trying to get this work, but troubleshooting this 
IIS connector is much harder than programming Java :)

thx a lot for your input!
johannes




Rick Bullotta [EMAIL PROTECTED] 
09.03.2003 15:34
Please respond to
[EMAIL PROTECTED]


To
Tomcat Users List [EMAIL PROTECTED]
cc

Subject
RE: Tomcat 4.1.18 - IIS 5.0 plugin - jk2.properties + workers2.properties






Here are a few differences between your configuration and mine:

1) My workers2.properties uses [shm:] instead of [shm].
2) I found that the 2.0.2 jk2 ISAPI redirector dll does not like forward 
slash path syntax on Windows (for your SHM file).  Try \\.

 Tomcat Users List [EMAIL PROTECTED] wrote:
 hi there,
 
 here are the properties files I currently use (a merge of Mark's + 
Rick's 
 configuration files):
 
 =
 jk2.properties
 =
 ## THIS FILE MAY BE OVERRIDEN AT RUNTIME. MAKE SURE TOMCAT IS STOPED
 ## WHEN YOU EDIT THE FILE.
 
 ## COMMENTS WILL BE _LOST_
 
 ## DOCUMENTATION OF THE FORMAT IN JkMain javadoc.
 
 # Set the desired handler list
 # handler.list=apr,request,channelJni
 #
 # Override the default port for the socketChannel
 # channelSocket.port=8019
 # Default:
 # channelUnix.file=${jkHome}/work/jk2.socket
 # Just to check if the the config  is working
 # shm.file=${jkHome}/work/jk2.shm
 
 # In order to enable jni use any channelJni directive
 # channelJni.disabled = 0
 # And one of the following directives:
 
 # apr.jniModeSo=/opt/apache2/modules/mod_jk2.so
 
 # If set to inprocess the mod_jk2 will Register natives itself
 # This will enable the starting of the Tomcat from mod_jk2
 # apr.jniModeSo=inprocess
 
 #
 # Socket configuration
 #
 handler.list=request,container,channelSocket
 #apr
 
 #
 # apr configuration
 # jk2.properties file in C:\Tomcat\conf
 #
 #apr.NativeSo=${jkHome}\\bin\\Win32\\jkjni.dll
 #apr.jniModeSo=${jkHome}\\bin\\Win32\\jkjni.dll
 
 #
 # socket configuration
 #
 channelSocket.port=8009
 channelSocket.address=127.0.0.1
 channelSocket.maxPort=port+10
 
 =
 workers2.properties
 =
 # workers2.properties file in C:\Apache2\conf
 # only at beginning. In production uncomment it out
 # [logger.apache2]
 # level=DEBUG
 
 [shm]
 file=f:/tomcat-4.1.18/shm.file
 size=1048576
 
 # Example socket channel, override port and host.
 [channel.socket:localhost:8009]
 port=8009
 host=127.0.0.1
 
 # define the worker
 [ajp13:localhost:8009]
 channel=channel.socket:localhost:8009
 
 # Uri mapping
 [uri:/examples/*]
 worker=ajp13:localhost:8009
 
 [uri:/wartung/*]
 worker=ajp13:localhost:8009
 
 [uri:/SignonClient/*]
 worker=ajp13:localhost:8009
 
 thx
 Johannes

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




RE: Tomcat 4.1.18 - IIS 5.0 plugin

2003-03-09 Thread Johannes Fiala

Hi all,

Thx Mark + Rick for your support.

I tried to use your recommended settings
and succeeded so far, as the green arrow is now showing after I restart
IIS.
However, I could not completely decipher
the following settings (in Mark's jk2.properties):
apr.NativeSo=${jkHome}\\bin\\Win32\\jkjni.dll
apr.jniModeSo=${jkHome}\\bin\\Win32\\jkjni.dll

What is this jkjni.dll? I could not
find it in my bin-directory of default Tomcat 4.1.18 installation. 
Should I obtain it separately? Where
can I get it?

In general: I think the description
of JK2 is quite hard to understand for a JK-newbie. Why does Rick only
have one entry in his jk2.properties file and Mark has much more? Which
one is right? 
Do I have to turn anything on in server.xml
to get JK2 running? Any good links???

2nd question: If I set logLevel to DEBUG,
where does it write its log entries to? 
Shouldn't there be a setting for the
file name?

3rd question: Rick, you wrote your configuration
is a basic scenario, do you know a good description for more advanced scenarios?

Eventually in the event log of W2K I
still see the following error:
The service could not bind instance
1.
and the Plugin doesn't work. Does anybody
know how I can track down this error:



Screenshot of my registry entries:


Luckily, with my version 1.0 of JK POST
method is also working, so I currently have no urgent troubles with JK
1.0.



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

RE: Tomcat 4.1.18 - IIS 5.0 plugin - jk2.properties + workers2.properties

2003-03-09 Thread Johannes Fiala
hi there,

here are the properties files I currently use (a merge of Mark's + Rick's 
configuration files):

=
jk2.properties
=
## THIS FILE MAY BE OVERRIDEN AT RUNTIME. MAKE SURE TOMCAT IS STOPED
## WHEN YOU EDIT THE FILE.

## COMMENTS WILL BE _LOST_

## DOCUMENTATION OF THE FORMAT IN JkMain javadoc.

# Set the desired handler list
# handler.list=apr,request,channelJni
#
# Override the default port for the socketChannel
# channelSocket.port=8019
# Default:
# channelUnix.file=${jkHome}/work/jk2.socket
# Just to check if the the config  is working
# shm.file=${jkHome}/work/jk2.shm

# In order to enable jni use any channelJni directive
# channelJni.disabled = 0
# And one of the following directives:

# apr.jniModeSo=/opt/apache2/modules/mod_jk2.so

# If set to inprocess the mod_jk2 will Register natives itself
# This will enable the starting of the Tomcat from mod_jk2
# apr.jniModeSo=inprocess

#
# Socket configuration
#
handler.list=request,container,channelSocket
#apr

#
# apr configuration
# jk2.properties file in C:\Tomcat\conf
#
#apr.NativeSo=${jkHome}\\bin\\Win32\\jkjni.dll
#apr.jniModeSo=${jkHome}\\bin\\Win32\\jkjni.dll

#
# socket configuration
#
channelSocket.port=8009
channelSocket.address=127.0.0.1
channelSocket.maxPort=port+10

=
workers2.properties
=
# workers2.properties file in C:\Apache2\conf
# only at beginning. In production uncomment it out
# [logger.apache2]
# level=DEBUG

[shm]
file=f:/tomcat-4.1.18/shm.file
size=1048576

# Example socket channel, override port and host.
[channel.socket:localhost:8009]
port=8009
host=127.0.0.1

# define the worker
[ajp13:localhost:8009]
channel=channel.socket:localhost:8009

# Uri mapping
[uri:/examples/*]
worker=ajp13:localhost:8009

[uri:/wartung/*]
worker=ajp13:localhost:8009

[uri:/SignonClient/*]
worker=ajp13:localhost:8009

thx
Johannes

RE: Tomcat 4.1.18 - IIS 5.0 plugin

2003-03-03 Thread Johannes Fiala

Chris,

Unfortunately I cannot even confirm
2.0.1 works with MY configuration.

Using 1.0, everything is ok.

Using 2.0.1 or 2.0.2 however:
*) there is no message in my logfile
entered in the registry, although I turned log_level to debug
*) I get the following error:


Does anybody know what this message
means? 

Here is a screenshot of my registry:

I think it is really hard to debug the
behaviour of the JK-Connector.
Maybe a more detailed logging would
help installing users a lot?

thx
Johannes







Christopher Watson
[EMAIL PROTECTED] 
28.02.2003 10:50



Please respond to
Tomcat Users List [EMAIL PROTECTED]





To
'Tomcat Users List'
[EMAIL PROTECTED]


cc



Subject
RE: Tomcat 4.1.18 - IIS 5.0
plugin








Johannes , All,

I've found the 2.0.1 dll works - with jk2 style config, but not the
2.0.2 dll.

Can anyone else confirm this is the case for them?
If so, does anyone know why 2.0.2 is not working?
Or what I need to change from 2.0.1 config to get it to work?
(My workers2.properties, jk2.properites and exported registry are
attached for the curious)

If it's not a config, perhaps 2.0.2 should be fixed or removed?
I only kind of by accident tried 2.0.1 and found it to work, having
puzzled over 2.0.2 for a long time.

My 2p (UK c version of 2 cents)

Christopehr

 -Original Message-
 From: Johannes Fiala [mailto:[EMAIL PROTECTED] 
 Sent: 28 February 2003 08:08
 To: Tomcat Users List
 Subject: Re: Tomcat 4.1.18 - IIS 5.0 plugin
 
 
 Dear Ben,
 
 isapi_redirector version 1.0 is running smoothly with Tomcat 
 4.1.18 on my 
 PC.
 Being curious, I tried to get 2.0.2 running as well, but it 
 didn't work 
 out (the arrow stays red down).
 However, it should be running, because I used the same 
 uriworkermap/workers.properties. Or did these files change for 2.0?
 
 Can you send me 
 *) the working registry entries and 
 *) uriworkermap.properties
 *) workers.properties
 *) the isapi_redirector2.dll you are using?
 
 I'd like to see 2.0 up and running as well!
 
 thx alot
 Johannes
 
 
 
 
 
 Schleimer, Ben [EMAIL PROTECTED] 
 27.02.2003 15:09
 Please respond to
 Tomcat Users List [EMAIL PROTECTED]
 
 
 To
 Tomcat Users List [EMAIL PROTECTED]
 cc
 
 Subject
 Re: Tomcat 4.1.18 - IIS 5.0 plugin
 
 
 
 
 
 
 Hi,
  You need to get isapi_redirector2.dll from the JK2
 connectors part of the website. I had the same
 problem.
 Also, the registry keys need to be in 2.0, not 1.0.
 4.1.18 is compiled to use jk2, not jk.
 
 Good luck,
 Ben
 
 --- Johannes Fiala [EMAIL PROTECTED] wrote:
  hi there,
  
  I just tried to get the IIS JK2 running using
  Tomcat 4.1.18 with JK isapi 2.0.2 and IIS 5.0 (Win
  2000 Professional)
  
  I added the registry entries correctly (no error in
  event viewer)
  according to the howto.
  I created the virtual directory jakarta which
  displays the entry 
  isapi_redirect.dll correctly.
  However, after I stop and start IIS 5.0 the ISAPI
  Filter shows the red 
  arrow down. 
  
  The log file I specified in the registry entry
  log_file is simplest, but
  there is no log file showing up (c:\isapi.log).
  
  Any ideas on where I have to look at for errors?
  
  thx alot
  Johannes Fiala
 
 
 =
 The competent programmer is fully aware of the strictly 
 limited size of 
 his own skull; therefore he approaches the programming task in full

 humility, and among other things he avoids clever tricks like 
 the plague 
 - Edsger Dijkstra
 
http://snow.prohosting.com/bensch

__
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more
http://taxes.yahoo.com/

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


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
ÿþWindows Registry Editor Version 5.00



[HKEY_LOCAL_MACHINE\SOFTWARE\Apache 
Software Foundation\Jakarta Isapi 
Redirector\2.0]

serverRoot=W:\\jakarta-tomcat

extensionUri=/jakarta/isapi_redirector2.dll

workersFile=W:\\jakarta-tomcat\\conf\\workers2.properties

authComplete=0

threadPool=20

logLevel=DEBUG



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

Re: Tomcat 4.1.18 - IIS 5.0 plugin

2003-02-28 Thread Johannes Fiala
Dear Ben,

isapi_redirector version 1.0 is running smoothly with Tomcat 4.1.18 on my 
PC.
Being curious, I tried to get 2.0.2 running as well, but it didn't work 
out (the arrow stays red down).
However, it should be running, because I used the same 
uriworkermap/workers.properties. Or did these files change for 2.0?

Can you send me 
*) the working registry entries and 
*) uriworkermap.properties
*) workers.properties
*) the isapi_redirector2.dll you are using?

I'd like to see 2.0 up and running as well!

thx alot
Johannes





Schleimer, Ben [EMAIL PROTECTED] 
27.02.2003 15:09
Please respond to
Tomcat Users List [EMAIL PROTECTED]


To
Tomcat Users List [EMAIL PROTECTED]
cc

Subject
Re: Tomcat 4.1.18 - IIS 5.0 plugin






Hi,
  You need to get isapi_redirector2.dll from the JK2
connectors part of the website. I had the same
problem.
Also, the registry keys need to be in 2.0, not 1.0.
4.1.18 is compiled to use jk2, not jk.

Good luck,
Ben

--- Johannes Fiala [EMAIL PROTECTED] wrote:
 hi there,
 
 I just tried to get the IIS JK2 running using 
 Tomcat 4.1.18 with JK isapi 2.0.2 and IIS 5.0 (Win
 2000 Professional)
 
 I added the registry entries correctly (no error in
 event viewer) 
 according to the howto.
 I created the virtual directory jakarta which
 displays the entry 
 isapi_redirect.dll correctly.
 However, after I stop and start IIS 5.0 the ISAPI
 Filter shows the red 
 arrow down. 
 
 The log file I specified in the registry entry
 log_file is simplest, but 
 there is no log file showing up (c:\isapi.log).
 
 Any ideas on where I have to look at for errors?
 
 thx alot
 Johannes Fiala


=
The competent programmer is fully aware of the strictly limited size of 
his own skull; therefore he approaches the programming task in full 
humility, and among other things he avoids clever tricks like the plague 
- Edsger Dijkstra

http://snow.prohosting.com/bensch

__
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more
http://taxes.yahoo.com/

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




Re: Tomcat 4.1.18 - IIS 5.0 plugin

2003-02-26 Thread Johannes Fiala
Hi Konrad,

Thx alot for your hint!!
After using the isapi_redirect.dll and the properties files of the link, 
it worked immediately, with the green arrow showing up after restart of 
IIS and the redirector working smoothly.

It seems the version of isapi_redirector2.dll I used (jk 2.0.2) didn't 
work.
Does anybody know why jk 2.0.2 doesn't work? Or is the old version of jk 
used with the 4.0.1 docs (
http://www.vacodi.com/howto/tomcat/iisnt/index.html) just fine?

thx alot
Johannes Fiala





Konrad Rusz [EMAIL PROTECTED] 
26.02.2003 11:19
Please respond to
Tomcat Users List [EMAIL PROTECTED]


To
Tomcat Users List [EMAIL PROTECTED]
cc

Subject
Re: Tomcat 4.1.18 - IIS 5.0 plugin






Hi Johannes,

Check Your configuration steps with these under this link:
http://www.vacodi.com/howto/tomcat/iisnt/index.html (instead of  Tomcat
4.0.1 You oght to use Your Tomcat 4.1.18). You should chek most of all 
Your
registry key [HKEY_LOCAL_MACHINE\SOFTWARE\Apache Software 
Foundation\Jakarta
Isapi Redirector\1.0] once again. Check 'workers.properties' file as well.
It should to help get Yourself out of this trouble.

Good luck,
Konrad Rusz



- Original Message -
From: Johannes Fiala [EMAIL PROTECTED]
To: 'Tomcat Users List' [EMAIL PROTECTED]
Sent: Wednesday, February 26, 2003 12:01 AM
Subject: Tomcat 4.1.18 - IIS 5.0 plugin


 hi there,

 I just tried to get the IIS JK2 running using
 Tomcat 4.1.18 with JK isapi 2.0.2 and IIS 5.0 (Win 2000 Professional)

 I added the registry entries correctly (no error in event viewer)
 according to the howto.
 I created the virtual directory jakarta which displays the entry
 isapi_redirect.dll correctly.
 However, after I stop and start IIS 5.0 the ISAPI Filter shows the red
 arrow down.

 The log file I specified in the registry entry log_file is simplest, but
 there is no log file showing up (c:\isapi.log).

 Any ideas on where I have to look at for errors?

 thx alot
 Johannes Fiala


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




Tomcat 4.1.18 - IIS 5.0 plugin

2003-02-25 Thread Johannes Fiala
hi there,

I just tried to get the IIS JK2 running using 
Tomcat 4.1.18 with JK isapi 2.0.2 and IIS 5.0 (Win 2000 Professional)

I added the registry entries correctly (no error in event viewer) 
according to the howto.
I created the virtual directory jakarta which displays the entry 
isapi_redirect.dll correctly.
However, after I stop and start IIS 5.0 the ISAPI Filter shows the red 
arrow down. 

The log file I specified in the registry entry log_file is simplest, but 
there is no log file showing up (c:\isapi.log).

Any ideas on where I have to look at for errors?

thx alot
Johannes Fiala