Re: war file deployment problem

2002-09-06 Thread hoju

You are confusing Tomcat.  If you are going to dynamically deploy your webapp,
don't have the .war file sitting in $TOMCAT_HOME/webapps.  Have it somewhere
else.  Everything in $TOMCAT_HOME/webapps is automatically deployed and, yes, it
is expanded if you *don't* have a Context entry defined for that webapp.

when you install like you are, there is already a webapp defined for the path
you are specifying.  Now you install another webapp under the same name.  I
don't know how Tomcat handles this situation, but it looks as if it hoses the
webapp entry.  Make sure to name your webapps uniquely and don't put any .war
files or expanded directories that you plan on dynamically installing through
the manager in Tomcat's default auto-deploy directory (webapps).

Jake

Quoting Dave Robbins [EMAIL PROTECTED]:

 Hello All,
 kindof a newbie here so be gentle
 I wrote a little dummy app with Forte 4.0 that consists of a jsp page with 
 a link that calls a servlet which does a database lookup and spews out some
 
 data. It works fine with the built in copy of Tomcat that comes with Forte.
 I build a war file and try to deploy it on another machine with Tomcat 
 4.0.4 on it. I put my file dummy.war in the $CATALINA_HOME/webapps/dummy 
 dir and use this command from a browser
 
 http://localhost:8080/manager/install?
 path=/dummywar=jar:file:$CATALINA_HOME/webapps/dummy/dummy.war!/
 
 now the command
 
 http://localhost:8080/manager/install
 
 tells me that my app is running, but when I try to access it with
 
 http://localhost/dummy or http://localhost/dummy/index.jsp it says the 
 resource is not available. I kinda thought Tomcat could access the war file
 
 in it's bundled state but after reading the docs I got the impression the 
 manager app was gonna expand it, is that true? In my case the file wasn't 
 expanded. After some head scratching I figured I'd manually expand the war 
 file in the $CATALINA_HOME/ROOT dir. After doing that and restarting Tomcat
 
 everything works fine with http://localhost/index.jsp.
  
 So, let me ask a few questions
 
 1) What does the manager app do
 does it modify $CATALINA_HOME/conf/server.xml
 should it expand the war file
 
 2)If I'm gonna deploy multiple apps, what's the typical dir structure
 $CATALINA_HOME/ROOT/app1, $CATALINA_HOME/ROOT/app2, etc
 could i deploy an app outside the Tomcat dir structure (ie /home/mydir)
 
 3)Is this the correct flow of things
 Tomcat starts up and reads $CATALINA_HOME/conf/server.xml and now knows 
 about the apps that are installed and what path they're mapped to. when a 
 client tries to access an app, Tomcat goes and looks in the jar file and 
 reads web.xml to discover what all is in the war file. Within the war file 
 any static content goes in the WEB-INF dir, class files go in WEB-
 INF/classes and .jar files goe in WEB-INF/lib
 
 hep me, hep me
 
 Dave
 
 
 
 --
 To unsubscribe, e-mail:  
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 



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




Re: retrieving HttpSession in Filter? ServletResponse.setContentLength()?

2002-08-21 Thread hoju

Quoting tek1 [EMAIL PROTECTED]:
 do you happen to have the link to the article?  i followed sun's example 
 filter using a CharResponseWrapper and my filter's not working...  :|
 
 thanks again for helping.  i appreciate it.
 

I found it at:
http://java.sun.com/products/servlet/Filters.html

Not sure if it is the same article or not.  Might be new code.  See the link at
the bottom of the page for the actual code download.

Jake

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



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




Re: nt4 service

2002-07-12 Thread hoju

After setting up the system variables mentioned in the text below, copy the
following to your command line and hit enter.

Install Catalina Service:

%CATALINA_HOME%\bin\tomcat.exe -install Apache-Catalina
%JAVA_HOME%\jre\bin\server\jvm.dll
-Djava.class.path=%CATALINA_HOME%\bin\bootstrap.jar;%JAVA_HOME%\lib\tools.jar
-Dcatalina.home=%CATALINA_HOME% %CATALINA_OPTS% -Xrs -start
org.apache.catalina.startup.BootstrapService -params start -stop
org.apache.catalina.startup.BootstrapService -params stop -out
%CATALINA_HOME%\logs\stdout.log -err %CATALINA_HOME%\logs\stderr.log

Uninstall Catalina Service:

%CATALINA_HOME%\bin\tomcat.exe -uninstall Apache-Catalina

BTW, I'd really recommend that you upgrade to Tomcat-4.0.4 for the latest stable
version of Tomcat.  Lots of bugs were fixed between 4.0.1 and 4.0.4.  Also,
there are the new 4.1.x releases which have lots of cool new stuff.  4.0.1 is
pretty ancient now and I wouldn't use it unless you are tied to it for some reason.

Jake

Quoting Carlos Silva [EMAIL PROTECTED]:

 Please, tell me as configuration tomcat4.01 as NT4 service.  I would like
 execute my servlet / jsp pages on port 80.  Anybody know same link (ou
 book)
 where I get information about?
 
 Embraces,
 
 Carlos
 
 
 



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




RE: Class loader problem with Xalan under 4.0.2 and 4.0.3

2002-07-11 Thread hoju

That isn't the issue here.  Beginning with Tomcat-4.0.2, Tomcat is enforcing
Sun's classloading spec more stringently and not allowing XML/DOM libraries to
be loaded from a child classloader.  In plain english, this means you cannot
include XML/DOM libraries in WEB-INF/lib.  They must exist in a parent
classloader such as $TOMCAT_HOME/lib (or $TOMCAT_HOME/shared/lib in 4.1.x) or
$TOMCAT_HOME/common/lib (or $TOMCAT_HOME/common/endorsed when using j2sdk1.4.x
in Tomcat-4.1.x).

The reason why you get the ClassCastException is that although Tomcat is
attempting to enforce the spec, it doesn't do it very cleanly.  This was fixed
for the 4.0.4 release as well as the latest releases of 4.1.x.  Upgrade to 4.0.4
or 4.1.7 and move your XML/DOM libraries to the above mentioned directories and
all will be well.

Jake

Quoting Andrew Conrad [EMAIL PROTECTED]:

 This isn't answering your question as you posed it, but aren't
 xml-api.jar and XMLParserAPI.jar from different versions of Xerces?
 Xalan 2.4.D1 comes with Xerces 2.0.1 (xercesImpl.jar and xml-api.jar).
 To use Xerces 2.0.2, aren't you suppose to delete those files and
 replace them with those from the Xerces distribution (xercesImpl.jar and
 XMLParserAPI.jar)?  
 
 Maybe you are having a class loading issue because you are mixing your
 versions.
 
 Just a thought.
 
 - Andrew
 
 
 
 -Original Message-
 From: stephen chan [mailto:[EMAIL PROTECTED]] 
 Sent: Wednesday, July 10, 2002 9:05 PM
 To: 'Tomcat Users List'
 Subject: Class loader problem with Xalan under 4.0.2 and 4.0.3
 
 
 Class loader problem with Xalan under 4.0.2 and 4.0.3
 
 
 Hi, I have:
 
   jakarta-tomcat-4.0.2 / jakarta-tomcat-4.0.3
   Xerces-J-bin.2.0.2
   xalan-j_2_4_D1-bin.tar.gz
   jdom
   sun jdk jdk1.3.1
 
 on a linux box.
 
 According to Tomcat documentation, class loading is
 done in the following order:
 
   /WEB-INF/classes of your web application
   /WEB-INF/lib/*.jar of your web application
   Bootstrap classes of your JVM
   System class loader classses
   $CATALINA_HOME/common/classes
   $CATALINA_HOME/common/lib/*.jar
   $CATALINA_HOME/classes
   $CATALINA_HOME/lib/*.jar
 
 In my /WEB-INF/lib/ directory, I have all the
 xerces, xalan and jdom jar files:
 
   BCEL.jar
   JLex.jar
   bsf.jar
   java_cup.jar
   jdom.jar
   regexp.jar
   runtime.jar
   xalan.jar
   xalansamples.jar
   xalanservlet.jar
   xercesImpl.jar
   xercesSamples.jar
   xml-apis.jar
   xmlParserAPIs.jar
   xsltc.jar
 
 When I run my servlet from /WEB-INF/classes,
 I get this:
 
   root cause
 
 java.lang.NoClassDefFoundError:
 javax/xml/transform/TransformerException
 
 This means Tomcat can't find the xalan lib.
 *** Tomcat can find xerces and jdom libs ***
 
 At this point, I decided to do some testing on other versions of Tomcat
 and here are the results.
 
 
   Tomcatxalan lib in /WEB-INF/lib/
   ----
   3.3.1 OK
   4.0.2 NOT OK
   4.0.3 NOT OK
   4.0.4 OK
 
 
 The only way to make 4.0.2 and 4.0.3 aware of xalan libs is to have the
 xalan jar files in Bootstrap classes of my JVM which is in
 /usr/local/jdk1.3.1_02/jre/lib/ext. But having the libs in this
 directory can effect other applications within the same container. How
 do I make my Tomcat 4.0.2 and 4.0.3 use the xalan lib in my
 /WEB-INF/lib/ directory? Is this a Tomcat config problem or a Xalan
 config problem?
 
 Thanks
 Stephen
 
 
 
 
 --
 To unsubscribe, e-mail:
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 
 
 --
 To unsubscribe, e-mail:  
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 



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