RE: EASY Question about Tomcat Instances.

2003-03-28 Thread p niemandt
Yip:

Once instance, but ...

Parameter name=handler
value=org.apache.tomcat.service.http.HttpConnectionHandler/
Parameter name=port value=8443/

... listening on port 8443 

Regards,
Paul

On Fri, 2003-03-28 at 13:41, Shapira, Yoav wrote:
 Howdy,
 That's correct.  One JVM = one instance, no matter how many connectors /
 ports that instance is listening on.  That's the conventional
 definition.
 
 Yoav Shapira
 Millennium ChemInformatics
 
 
 -Original Message-
 From: stev sutherland [mailto:[EMAIL PROTECTED]
 Sent: Thursday, March 27, 2003 6:07 PM
 To: Tomcat Users List
 Subject: EASY Question about Tomcat Instances.
 
 Hi Everyone;
 
 I have a very very quick question about tomcat
 instances.
 
 I configured SSL for tomcat in server.xml. So it is
 listening on port 443.
 
 My supervisor asked me if we have 2 instances of
 tomcat running. one for ssl and one for non-ssl.
 
 I told him we have only 1 instance of tomcat running
 with a handler that listens for port 443.
 
 Is that correct?
 
 Here's the only real change i made to enable ssl.
 
 Connector
 className=org.apache.tomcat.service.PoolTcpConnector
 Parameter name=handler
 value=org.apache.tomcat.service.http.HttpConnectionHandler/
 Parameter name=port   value=8443/
 Parameter name=socketFactory
 value=org.apache.tomcat.net.SSLSocketFactory /
  Parameter name=keystore value=C:/stev1 /
  Parameter name=keypass value=changeit/
  Parameter name=clientAuth value=false/
 
  /Connector
 This is tomcat standalone.
 
 __
 Do you Yahoo!?
 Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
 http://platinum.yahoo.com
 
 -
 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]
-- 
p niemandt [EMAIL PROTECTED]


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



Re: Xvfb and tomcat - how?

2003-03-27 Thread p niemandt
hiya:

Yip: I've been using JFreeChart with huge success on a headless linux
box: You do not need Tomcat and xvfb to communicate as such, xvfb just
needs to be running.

I start mine with

Xvfb :0 -screen 0 1600x1200x32 

hth,
Paul



On Thu, 2003-03-27 at 19:16, Oliver Meyn wrote:
 Hi all,
 
 I'm using the cewolf taglib (which incorporates JFreeChart) to draw charts
 on Linux.  It would seem that cewolf requires an x-server to draw its charts
 (-Djava.awt.headless=true is _not_ good enough) and one possible solution is
 using Xvfb.  The trouble is I can't seem to get Tomcat and the xvfb to
 communicate - the cewolf img just hangs on an eternal load.  Anyone
 successfully set this combo up can give me a step-by-step?
 
 I've tried:
 Xvfb :1
 export DISPLAY=:1
 tomcat/bin/startup.sh
 
 and variations on that theme but always the same problem.  I'm running
 Tomcat 4.0.6, j2sdk1.4.1_02, Apache 1.3.27 on RH 7.3 (2.4.18).
 
 Many thanks in advance,
 Oliver
 
 
 Oliver Meyn
 [EMAIL PROTECTED]
 Things should be made as simple as possible, but no simpler. - Albert
 Einstein
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
-- 
p niemandt [EMAIL PROTECTED]


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



RE: Xvfb and tomcat - how?

2003-03-27 Thread p niemandt
Hi Oliver:

Nope: 

My deployment is extremely simple: I have 2 boxes: One Dev, one Prod: I
compile my servlet on my dev box (RedHat 8.0, XFree 4, KDE 3.1, JDK 1.4,
Tomcat 4.18), and copy the results to my prod box: (RedHat 7, JDK 1.4,
Tomcat 4.18, console only). I just run Xvfb before starting Tomcat /
make sure it is running - Just to reiterate, I do not use the headless
vm settings at all on my production box, and I have not had any
problems. Tomcat  Xvfb has been running for a few months non stop now
...

hth,
Paul



On Thu, 2003-03-27 at 20:19, Oliver Meyn wrote:
 Hi Paul,
 
  hiya:
 
  Yip: I've been using JFreeChart with huge success on a headless linux
  box: You do not need Tomcat and xvfb to communicate as such, xvfb just
  needs to be running.
 
  I start mine with
 
  Xvfb :0 -screen 0 1600x1200x32 
 
 
 Did you have to do any special recompiling with those settings in effect?
 I've read that some are having to do that, but it's not clear to me how/why
 ie have to recompile code on the production box?
 
 Getting closer,
 Oliver
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
-- 
p niemandt [EMAIL PROTECTED]


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



RE: Registering Servlets

2003-03-27 Thread p niemandt
hi,

Here's an idea: Don't know of the relevance, but have you tried with an
actual password, or a password of blank -  - Maybe the problem is
that during the uploading, your password is being converted to a blank,
or zero length string, which would not be the same as a null string.

Just an idea.
Paul

On Thu, 2003-03-27 at 21:07, Sandra Patricia Hunter wrote:
 Well I am finding the file but something else is up: I can enter the
 password three times and it rejects it and then lets me in after the third
 time anyway. The real password value is null.
 I guess I need to do more research into the base64 stuff.
 
 Sandra Patricia Hunter
 Systems Development and Web Design 
  
 
 
 -Original Message-
 From: Erik Price [mailto:[EMAIL PROTECTED] 
 Sent: March 27, 2003 12:04 PM
 To: Tomcat Users List
 Subject: Re: Registering Servlets
 
 
 
 
 Sandra Patricia Hunter wrote:
  Four
  
 
 Yep, I ended up finding it (http://pdf.coreservlets.com/) -- I agree 
 with Justin that it's probably the way you're specifying your file path. 
   Remember that even on Windows, it's easier to use Unix-style file 
 paths in Java.  (Think of it as writing your code not for Windows but 
 for the Java virtual machine.)  Try changing it as he suggests and see 
 if that makes the difference.
 
 
 Erik
 
 
 -
 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]
-- 
p niemandt [EMAIL PROTECTED]


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



Re: Admin is incomplete

2003-03-26 Thread p niemandt
No use in getting angry ;-) Computers don't feel, well, yet ...

Anyways: I don't have a solution for you, but a suggestion: It seems you
are using the LE (Light) of Tomcat, maybe try the full version? Using
the full version, also make sure you have installed the 1.4 JDK and not
just the JRE.

hth,
Paul

On Wed, 2003-03-26 at 19:53, Herbert G. Fischer wrote:
 THE PROBLEM IS BAD THAN I THOUGHT!!!
 
 Sorry for the caps, but I'm very angry!!
 
 Admin only works correctly on MS Internet Explorer...
 
 How a multiplatform tecnology can be made this way
 
 Damn!!!
 
 
 Herbert G. Fischer wrote:
  Hi again,
  
  I'm getting very angry with Tomcat 4.1.24...
  It's half made... There's a lot of classes missing!!!
  
  Another one...
  
  ==
  
  HTTP Status 400 - Invalid path /logger/AddLogger was requested
  
  type Status report
  
  message Invalid path /logger/AddLogger was requested
  
  description The request sent by the client was syntactically incorrect 
  (Invalid path /logger/AddLogger was requested).
  Apache Tomcat/4.1.24-LE-jdk14
  
  ===
  
  
  
  -
  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]
-- 
p niemandt [EMAIL PROTECTED]


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



Re: web.xml - context-param not in order

2003-03-26 Thread p niemandt
Hi;

You are not guaranteed the order of the elements when using an
enumeration. This has more to do with basic data structures than with
the API. You would need to use a container that has a guaranteed order,
should you so wish.

This has to do with the dynamic nature of enumerations: They need to be
able to expand to store an unspecified amount of data. Should the
requirement enforce ordering on as well, you would loose the speed of
the enumeration.

You can always run through the enumeration, store this in an ArrayList,
and run Arrays.sort() on that, assuming that all the elements are
Comparable. Comparable - You must be able to call ElementA  ElementB
without getting a cast exception.

Have a look at the Java Collections Framework.


hth,
Paul

On Wed, 2003-03-26 at 21:55, David Thielen wrote:
 Hi;
 
 When I retrieve the param-name/param-value pairs from web.xml via:
 Enumeration en = pageContext.getServletContext().getInitParameterNames();
 
 It does not return them in the order they appear in web.xml. Is random order just 
 part of the API definition?
 
 thanks - dave
-- 
p niemandt [EMAIL PROTECTED]


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



Re: Database setup in tomcat

2003-03-24 Thread p niemandt
Hi:

Trying to roll your own DBCP is quite fun, but to get it working
properly it does involve a lot of design, foresight, testing, and more
testing.

I would recommend rather use the DBCP that comes standard with Tomcat:
It works, is stable, and is quite mature.

Look at the Tomcat docs, or do a google.

hth,
Paul

On Mon, 2003-03-24 at 19:00, Jason Smartt wrote:
 Hi,
 I am trying to set up a database connection pool using JDBC and MS Access.
 I initially just wrote a small servlet to do a login lookup to my database
 which worked fine and then proceeded onto the connection pool program
 (which I obtained from James Goodwill, Developing Java Servlets book).
 My Servlets compile fine, but for some reason when I run my app in the
 browser window, I get a java.lang.nullPointerException.
 Am I missing something in my tomcat setup. Everything seemed to work fine
 before trying the pooling.
 Many thanks
 JS
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
-- 
p niemandt [EMAIL PROTECTED]


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



Re: Help with Servlets

2003-03-23 Thread p niemandt
At least you didn't say you've tried everything: I hate that, if you
have tried everything, something would have worked ;-),
but anyways, I'm going of on a tangent ...

Firstly, your web.xml looks kinda screwed: You have nothing mapped
int the wep app.

Then, quite likely your major problem is that you have not
mapped any requests to your servlet.

You need to map your web application to it's implementation. It's not
enough to just state your web descriptor {Like your post shows}, you
will also need something like

!-- Map requests to servlet --
servlet-mapping
servlet-nameServletName/servlet-name
url-pattern/*/url-pattern
/servlet-mapping

after ALL the servlet / definitions.

So something like ...

?xml version=1.0 encoding=ISO-8859-1?
!DOCTYPE web-app
 PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN
http://java.sun.com/dtd/web-app_2_3.dtd;
web-app
!-- Publish the servlet to the container --
servlet
servlet-nameYourServletName/servlet-name
servlet-classJavaPackage.ServletClass/servlet-class

/servlet

!-- Map requests to servlet --
servlet-mapping
servlet-nameYourServletName/servlet-name
url-pattern/*/url-pattern
/servlet-mapping

/web-app

That's of course, assuming a few things ...
1. Your servlet is compiled, and a proper extension of HttpServlet
2. You want everything under
http://yourservername.domain/YourServletName to go to your servlet.
3. And probably another few things,

Hopefully this will help you in the right direction ...

Paul

On Sun, 2003-03-23 at 18:53, Jeff Brewer wrote:
 I've spent DAYS and DAYS and DAYS trying to get tomcat to run servlets. Nothing I 
 try works. I have followed the instructions in three books, several online tutorials 
 and attempted to decipher tomcat documentation on the apache site. I've installed 
 and reinstalled two versions to Tomcat (currently on 4.1.24). I've modified 
 server.xml and web.xml files until my fingers are sore from typing. Any help would 
 be GREATLY appreciated. Nothing helps; nothing works except the tomcat examples 
 which mock me!
 
 Here is my problem:
 
 From a clean install of tomcat, create a new directory under webapps called 
 dumfries. Create subdirectories dumfries/WEB-INF/classes.
 
 Copy the file HelloWorldExample.class from webapps/examples/WEB-INF/classes and 
 paste it into webapps/dumfries/WEB-INF/classes
 
 Create the following file and save as web.xml in the webapps/dumfries/WEB-INF 
 directory:
 
 ?xml version=1.0 encoding=ISO-8859-1?
 
 !DOCTYPE web-app
 PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN
 http://java.sun.com/j2ee/dtds/web-app_2_3.dtd;
 servlet
 servlet-nameHelloWorldExample/servlet-name
 servlet-classHelloWorldExample/servlet-class
 /servlet
 web-app
 /web-app
 
 Add the following tag to the server.xml file:
 
 Context path=/dumfries docBase=dumfries debug=0 reloadable=true /
 
 Start the server and browse to 
 http://localhost:8080/examples/servlet/HelloWorldExample;
 Note that the page displays.
 
 Now browse to http://localhost:8080/dumfries/servlet/HelloWorldExample; and behold 
 the error message.
 
 What am I doing wrong How can I make this work??? I'm supposed to be half way 
 done with my project and I can't get my first servlet to work!!! Help!
-- 
p niemandt [EMAIL PROTECTED]


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



Re: Help with Servlets

2003-03-23 Thread p niemandt
First, as a suggestion, you will need to understand XML and DTD's: This
will explain what the web.xml file can and can not do.

Then: There are multiple ways of doing servlet mappings: I tend to stay
away from war files, for no particular reason at all, so, in that case,
I need to map all my servlets and their requests in the web.xml file. I
have no experience with war files, but understand you do / can do it
differently using that.

web.xml
You need to publish every and all servlets, FIRST.
You need to map all the servlets to their requests, after publishing all
the servlets ...

web-app
!-- Publish the servlet to the container --
servlet
servlet-nameServlet1/servlet-name
servlet-classJavaPackage.ServletClass/servlet-class
/servlet

servlet
servlet-nameServlet2/servlet-name
servlet-classJavaPackage.ServletClass/servlet-class
/servlet


servlet
servlet-nameServlet3/servlet-name
servlet-classJavaPackage.ServletClass/servlet-class
/servlet


 !-- Map requests to servlet --
 servlet-mapping
 servlet-nameServlet1/servlet-name
 url-pattern/Servlet1/*/url-pattern
 /servlet-mapping

 servlet-mapping
 servlet-nameServlet2/servlet-name
 url-pattern/Servlet2/*/url-pattern
 /servlet-mapping

 servlet-mapping
 servlet-nameServlet3/servlet-name
 url-pattern/Servlet3/*/url-pattern
 /servlet-mapping


 /web-app

etc, ad infinitum ...

hth,
Paul




On Sun, 2003-03-23 at 19:46, Jeff Brewer wrote:
 Thank you. I am seeing some success with this!
 
 If I have multiple servlets, do I need to publish all to the container
 individually and map each request to the servlet individually and does the
 order matter?
 
 Thanks again...
 Jeff
 - Original Message -
 From: p niemandt [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Sunday, March 23, 2003 2:22 PM
 Subject: Re: Help with Servlets
 
 
  At least you didn't say you've tried everything: I hate that, if you
  have tried everything, something would have worked ;-),
  but anyways, I'm going of on a tangent ...
 
  Firstly, your web.xml looks kinda screwed: You have nothing mapped
  int the wep app.
 
  Then, quite likely your major problem is that you have not
  mapped any requests to your servlet.
 
  You need to map your web application to it's implementation. It's not
  enough to just state your web descriptor {Like your post shows}, you
  will also need something like
 
  !-- Map requests to servlet --
  servlet-mapping
  servlet-nameServletName/servlet-name
  url-pattern/*/url-pattern
  /servlet-mapping
 
  after ALL the servlet / definitions.
 
  So something like ...
 
  ?xml version=1.0 encoding=ISO-8859-1?
  !DOCTYPE web-app
   PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN
  http://java.sun.com/dtd/web-app_2_3.dtd;
  web-app
  !-- Publish the servlet to the container --
  servlet
  servlet-nameYourServletName/servlet-name
  servlet-classJavaPackage.ServletClass/servlet-class
 
  /servlet
 
  !-- Map requests to servlet --
  servlet-mapping
  servlet-nameYourServletName/servlet-name
  url-pattern/*/url-pattern
  /servlet-mapping
 
  /web-app
 
  That's of course, assuming a few things ...
  1. Your servlet is compiled, and a proper extension of HttpServlet
  2. You want everything under
  http://yourservername.domain/YourServletName to go to your servlet.
  3. And probably another few things,
 
  Hopefully this will help you in the right direction ...
 
  Paul
 
  On Sun, 2003-03-23 at 18:53, Jeff Brewer wrote:
   I've spent DAYS and DAYS and DAYS trying to get tomcat to run servlets.
 Nothing I try works. I have followed the instructions in three books,
 several online tutorials and attempted to decipher tomcat documentation on
 the apache site. I've installed and reinstalled two versions to Tomcat
 (currently on 4.1.24). I've modified server.xml and web.xml files until my
 fingers are sore from typing. Any help would be GREATLY appreciated. Nothing
 helps; nothing works except the tomcat examples which mock me!
  
   Here is my problem:
  
   From a clean install of tomcat, create a new directory under webapps
 called dumfries. Create subdirectories dumfries/WEB-INF/classes.
  
   Copy the file HelloWorldExample.class from
 webapps/examples/WEB-INF/classes and paste it into
 webapps/dumfries/WEB-INF/classes
  
   Create the following file and save as web.xml in the
 webapps/dumfries/WEB-INF directory:
  
   ?xml version=1.0 encoding=ISO-8859-1?
  
   !DOCTYPE web-app
   PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN
   http://java.sun.com/j2ee/dtds/web-app_2_3.dtd;
   servlet
   servlet-nameHelloWorldExample/servlet-name
   servlet-classHelloWorldExample/servlet-class
   /servlet
   web-app
   /web-app
  
   Add the following tag to the server.xml file:
  
   Context path=/dumfries docBase=dumfries debug=0 reloadable=true
 /
  
   Start the server and browse to
 http

RE: custom JDBCRealm

2003-03-22 Thread p niemandt
Have you tried $CATALINA_HOME/webapps/YourWebApp/WEB-INF/classes ?

On Sat, 2003-03-22 at 17:40, Carl Maib wrote:
 bill,
 i have tried placing my source in common/classes, common/lib, shared/lib and 
 shared/classes with no luck. depending on where i put my class, it was either in a 
 Jar as part of a package, or just a stand-alone class.
 
 i am really baffled here, it seems like one of those solutions should have worked. 
 yet, i continue to get the NoClassDefFound error for the catalina class i am 
 overriding (FormAuthenticator).
 
 i know i am a newbie to tomcat, so perhaps i am missing something simple. if anyone 
 has had any luck overriding any of the catalina classes in their webapp and has had 
 some success actually running it, please lend a hand!
 
 thanks!
 
 Bill Barker [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED]
  
  Carl Maib [EMAIL PROTECTED] wrote in message
  news:[EMAIL PROTECTED]
   i am attempting the exact same thing, but have been advised it would be
   better to override the FormAuthenticator. this gives you direct access to
   the session.
  
   the solution seems perfect, however, i i can't seem to get past
   classNotFound exceptions. i am not familiar with how to link catalina
   classes and the Class Loader docs are not giving me the answer.
  
   i have configured server.xml to contain my custom valve, the class which
   overrides FormAuthenticator. i have placed this class in common/classes. i
   get class not found exceptions on FormAuthenticator bcz my webapp is not
   able to reference the necessary objects in catalina.jar.
  
  It needs to be in server/classes, so that it can see the Catalina classes.
  
  
   please let me know if you get this solution to work. thanks!
  
   - Original Message -
   From: awc [EMAIL PROTECTED]
   To: 'Tomcat Users List' [EMAIL PROTECTED]
   Sent: Friday, March 21, 2003 4:41 PM
   Subject: Custom JDBCRealm
  
  
Hi,
   
I want to add more stuff to user session while user logs in. The only
way I see to do this is to write custom JDBCRealm class which extnds
org.apache.catalina.realm.JDBCRealm or implement
org.apache.catalina.realm.RealmBase class.
   
This custom class will have more initializing parameters too. Any
thoughts on this from one who already did sort of thing??
   
I am going to use this one with securityFilere from
www.securityfilter.org.
   
Thank you in advance for any replies.
   
.anil
   
   
   
-
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]
  
-- 
p niemandt [EMAIL PROTECTED]


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



Re: custom JDBCRealm

2003-03-22 Thread p niemandt
www.securityfilter.org

OK: And I may be way of base: I just checked the source forge cvs,
haven't downloaded or installed anything, so my 2c is probably not worth
much, but ...

To me it seems that they wrote their own extension to catalina, 

package org.securityfilter.realm.catalina;
snip
public class CatalinaRealmAdapter implements SecurityRealmInterface {
snip

So, in my own private way of thinking, I would assume that you are not
actually extending any of the base Tomcat classes, but one of their
classes. This would lead me to believe that you need to publish the
security filter classes as part of your web application to be able to
successfully a. use them, b. customise the realm.

So: question: Have you tried added the securityfilter classes to 
$CATALINA_HOME/webapps/YourWebApp/WEB-INF/classes
or 
$CATALINA_HOME/common/lib
depending on what format they are?

But, like I said: I haven't installed it, nor do I understand it, it's
just my 2c.

hth
Paul





On Sat, 2003-03-22 at 17:52, Carl Maib wrote:
 the problem is not tomcat recognizing my class, it is tomcat recognizing one
 of its own classes called out from my web application.
 
 i have tried various things to put catalina.jar in common/lib or shared/lib
 with no success. besides, this doesn't seem right anyway. but, when it is
 late and you get desparate, you'll try anything!
 
 - Original Message -
 From: p niemandt [EMAIL PROTECTED]
 To: Tomcat Users List [EMAIL PROTECTED]
 Sent: Saturday, March 22, 2003 12:54 PM
 Subject: RE: custom JDBCRealm
 
 
  Have you tried $CATALINA_HOME/webapps/YourWebApp/WEB-INF/classes ?
 
  On Sat, 2003-03-22 at 17:40, Carl Maib wrote:
   bill,
   i have tried placing my source in common/classes, common/lib, shared/lib
 and shared/classes with no luck. depending on where i put my class, it was
 either in a Jar as part of a package, or just a stand-alone class.
  
   i am really baffled here, it seems like one of those solutions should
 have worked. yet, i continue to get the NoClassDefFound error for the
 catalina class i am overriding (FormAuthenticator).
  
   i know i am a newbie to tomcat, so perhaps i am missing something
 simple. if anyone has had any luck overriding any of the catalina classes in
 their webapp and has had some success actually running it, please lend a
 hand!
  
   thanks!
  
   Bill Barker [EMAIL PROTECTED] wrote in message
 news:[EMAIL PROTECTED]
   
Carl Maib [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 i am attempting the exact same thing, but have been advised it would
 be
 better to override the FormAuthenticator. this gives you direct
 access to
 the session.

 the solution seems perfect, however, i i can't seem to get past
 classNotFound exceptions. i am not familiar with how to link
 catalina
 classes and the Class Loader docs are not giving me the answer.

 i have configured server.xml to contain my custom valve, the class
 which
 overrides FormAuthenticator. i have placed this class in
 common/classes. i
 get class not found exceptions on FormAuthenticator bcz my webapp is
 not
 able to reference the necessary objects in catalina.jar.
   
It needs to be in server/classes, so that it can see the Catalina
 classes.
   

 please let me know if you get this solution to work. thanks!

 - Original Message -
 From: awc [EMAIL PROTECTED]
 To: 'Tomcat Users List' [EMAIL PROTECTED]
 Sent: Friday, March 21, 2003 4:41 PM
 Subject: Custom JDBCRealm


  Hi,
 
  I want to add more stuff to user session while user logs in. The
 only
  way I see to do this is to write custom JDBCRealm class which
 extnds
  org.apache.catalina.realm.JDBCRealm or implement
  org.apache.catalina.realm.RealmBase class.
 
  This custom class will have more initializing parameters too. Any
  thoughts on this from one who already did sort of thing??
 
  I am going to use this one with securityFilere from
  www.securityfilter.org.
 
  Thank you in advance for any replies.
 
  .anil
 
 
 

  -
  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]
   
  --
  p niemandt [EMAIL PROTECTED]
 
 
  -
  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]
-- 
p niemandt [EMAIL PROTECTED

Re: Can't get logger/debug messages

2003-03-22 Thread p niemandt
Again I have no documented basis for my claims, sadly I'm one of those
people that only RTFM after nothing else works, BUT ...

what works for me ...

Development: 
Add debug=100 wherever - I have never used verbosity=x, I didn't
even know it exists, if it does ;-), but with debug=100 I tend to get
MB of logs where-ever.

Production:
Change to debug=0

hth
Paul

On Sat, 2003-03-22 at 19:31, David Thielen wrote:
 Hi;
 
 In server.xml I changed logging to
 
 Server port=8005 shutdown=SHUTDOWN debug=4
 
 Logger className=org.apache.catalina.logger.FileLogger verbosity=4
   directory=logs  prefix=localhost_log. suffix=.txt
 timestamp=true/
 
 Yet I get no additional messages. Any ideas?
 
 Also, I am assuming with a log level of 4, when I use my browser to get a
 servlet I think should show up - and instead I get an error, it will tell me
 why in the log.
 
 thanks - dave
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
-- 
p niemandt [EMAIL PROTECTED]


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



Re: Can't connect to X11 window server using '0:0' as the value ofthe display and now java.awt.HeadlessException

2003-03-20 Thread p niemandt
ok: there is another solution to the headless thing: (I wrote a
graphical servlet that runs on a linux box without X, and had the same
problems: The headless seemed to work, well, kinda, but not to my
liking): So I went the xvfb route: This is a virtual frame buffer to can
install on a linux box that emulates an X session, which then kinda
solves all the graphical problems in one step. You set the xvfb to the
resolution required and just start and forget about it. 

Worth I shot, I'd say, and might safe you hours of frustration [It did
me ;-) ].


On Thu, 2003-03-20 at 18:34, Micael wrote:
 You using Linux?  What is your environment?  Anyway, setting the JVM is the 
 way to go if you are using Linux.
 
 At 06:09 PM 3/20/03 +0100, you wrote:
 Hi,
 
 I put System.setProperty(java.awt.headless, true);
 in my servlet init method it's ok, but now when I open a Frame,
 I get the exception HeadlessException:
 
 java.awt.HeadlessException
 at 
  java.awt.GraphicsEnvironnement.checkHeadless(GraphicsEnvironement.java:121)
 at java.awt.window.init(Window.java:226)
 at java.awt.Frame.init(Frame.java:398)
 ...
 
 What can I do?
 
 Georges
 
 
 
 Chad Johnson wrote:
 
 If I had to wager a guess you'll need to run tomcat in a 'headless' JVM.
 To do that add :
 
 -Djava.awt.headless=true
 
 To the :
 
 CATALINA_OPTS
 
 environment variable.
 
 -Chad Johnson
 
 -Original Message-
 From: Georges Roux [mailto:[EMAIL PROTECTED] Sent: Tuesday, 
 March 18, 2003 5:32 PM
 To: [EMAIL PROTECTED]
 Subject: Can't connect to X11 window server using '0:0' as the value of
 the display
 
 
 Hello everybody,
 
 Hi run Tomcat 4.1.18 Standalone on Linux debian(sid)and use
 J2sdk1.4.1_01.
 
 I have a servlet which manipulate exif informations in jpg images. it
 works well but when I try to run it on tomcat it fails (error 500)
 
 I have the following error:
 Can't connect to X11 window server using '0:0' as the value of the
 display
 
 What can I do?
 
 Georges
 
 
 -
 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]
 
 
 
 --
 
 18:54 18:54 connard
 18:55 18:54 t'as que ca a faire? ;)
 18:56 18:55 je m'ennuies ferme ouais ! encore 5mn avant la fin du taf,
   donc j'en profite pour passer dans les fortunes :)
 
 
 +==+
 |  |
 |  Georges Roux|
 |  URL : georgesroux.pacageek.org  |
 |  email : [EMAIL PROTECTED]|
 |  mobile : +33 (0) 613977573  |
 +==+
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 LEGAL NOTICE
 
 This electronic mail  transmission and any accompanying documents contain 
 information belonging to the sender which may be confidential and legally 
 privileged.  This information is intended only for the use of the 
 individual or entity to whom this electronic mail transmission was sent as 
 indicated above. If you are not the intended recipient, any disclosure, 
 copying, distribution, or action taken in reliance on the contents of the 
 information contained in this transmission is strictly prohibited.  If you 
 have received this transmission in error, please delete the message.  Thank 
 you  
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
-- 
p niemandt [EMAIL PROTECTED]


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



Re: Can't connect to X11 window server using '0:0' as the value ofthe display and now java.awt.HeadlessException

2003-03-20 Thread p niemandt
Difficult to say: What kind of problems?

I start mine using

Xvfb :0 -screen 0 1600x1200x32 

{I just added it to rc.local }




On Thu, 2003-03-20 at 19:27, Glenn Parsons wrote:
 At 07:18 PM 3/20/2003 +, you wrote:
 ok: there is another solution to the headless thing: (I wrote a
 graphical servlet that runs on a linux box without X, and had the same
 problems: The headless seemed to work, well, kinda, but not to my
 liking): So I went the xvfb route: This is a virtual frame buffer to can
 install on a linux box that emulates an X session, which then kinda
 solves all the graphical problems in one step. You set the xvfb to the
 resolution required and just start and forget about it.
 
 Worth I shot, I'd say, and might safe you hours of frustration [It did
 me ;-) ].
 
   I had tried xvfb and had some difficulties. Any pointers? suggestions?
 
 Thanks,
 Glenn
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
-- 
p niemandt [EMAIL PROTECTED]


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



Re: Can't connect to X11 window server using '0:0' as the value ofthe display and now java.awt.HeadlessException

2003-03-20 Thread p niemandt
Yep: Done correctly, this is probably the more 'correct' solution, but,
and I'm probably opening myself to a lot of flamebait, but I do suspect
that using something like Xvfb might give some advantages that using
headless won't. For example, and I'm just guessing, but I think that
'headless' is purely a software solution, while Xvfb might be connected
to your display adaptor, and therefor might be faster or less of a drain
on your system resources.

{
But, like I said, I have no documentation to back up this statement,
this is purely a guess and based on my personal findings: If anybody
else knows differently, I would be very interested to know more, as I'm
doing a lot more graphics orientated servlets, that usually run on
headless boxes }



On Thu, 2003-03-20 at 20:36, Micael wrote:
 For me the easiest thing was just to provide the right command line options 
 (java.awt.headless=true) when I started up Tomcat.
 
 At 02:27 PM 3/20/03 -0500, you wrote:
 At 07:18 PM 3/20/2003 +, you wrote:
 ok: there is another solution to the headless thing: (I wrote a
 graphical servlet that runs on a linux box without X, and had the same
 problems: The headless seemed to work, well, kinda, but not to my
 liking): So I went the xvfb route: This is a virtual frame buffer to can
 install on a linux box that emulates an X session, which then kinda
 solves all the graphical problems in one step. You set the xvfb to the
 resolution required and just start and forget about it.
 
 Worth I shot, I'd say, and might safe you hours of frustration [It did
 me ;-) ].
   I had tried xvfb and had some difficulties. Any pointers? suggestions?
 
 Thanks,
 Glenn
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 LEGAL NOTICE
 
 This electronic mail  transmission and any accompanying documents contain 
 information belonging to the sender which may be confidential and legally 
 privileged.  This information is intended only for the use of the 
 individual or entity to whom this electronic mail transmission was sent as 
 indicated above. If you are not the intended recipient, any disclosure, 
 copying, distribution, or action taken in reliance on the contents of the 
 information contained in this transmission is strictly prohibited.  If you 
 have received this transmission in error, please delete the message.  Thank 
 you  
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
-- 
p niemandt [EMAIL PROTECTED]


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



Re: Simple servlet won't display

2003-03-19 Thread p niemandt
aah: Where to start ;-)

{list users feel free to correct ... 

1. server.xml
You need to configure your web application in the server xml. This is in
an element Context / which defines where your application resides, and
optionally any resources your web app uses.

2. web.xml
You need to map your web application to it's implementation. It's not
enough to just state your web descriptor {Like your post shows}, you
will also need something like

!-- Map requests to servlet --
servlet-mapping
servlet-nameServletName/servlet-name
url-pattern/*/url-pattern
/servlet-mapping

after ALL the servlet / definitions.

3. The implementation: You will need to compile your servlet and place
the implementation classes under your web app directory ... {which it
seems you did correctly }

something like
$CATALINA_HOME/webapps/yourwebapp/WEB-INF/classes


This all said, there are a lot of different ways of doing the above,
packaging everything in a WAR file comes to mind.

You would probably need to do quite a bit of reading up on it first,
it's not the easiest of things to come to grips with: The learning curve
is quite steep, but well worth it.

Hope this helps somewhat, good luck!
Paul



On Thu, 2003-03-20 at 01:07, David Thielen wrote:
 Hi;
 
 I am trying to get a very simple servlet to display (the example ones work fine). 
 This is my web.xml
 file:
 
 ?xml version=1.0 encoding=ISO-8859-1?
 !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application
 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd;
 
 web-app
 display-nameWindward Utilities/display-name
 servlet
 servlet-namehello/servlet-name
 servlet-classHelloWorldExample/servlet-class
 /servlet
 /web-app
 
 My directory is:
 C:\Program Files\Apache Group\Tomcat 4.1\webapps\utils\WEB-INF\web.xml
 C:\Program Files\Apache Group\Tomcat
 4.1\webapps\utils\WEB-INF\classes\HelloWorldExample.*
 C:\Program Files\Apache Group\Tomcat
 4.1\webapps\utils\WEB-INF\classes\LocalStrings*.properties
 
 When I put in the url http://localhost:8080/servlet/hello
 
 I get:
 
 HTTP Status 404 - /servlet/hello
 
 
 
 
 type Status report
 
 message /servlet/hello
 
 description The requested resource (/servlet/hello) is not available.
 
 
 
 
 
 Apache Tomcat/4.1.18
 any ideas?
 
 thanks - dave
-- 
p niemandt [EMAIL PROTECTED]


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



Re: Tomcat auth acting crazy

2003-03-17 Thread p niemandt
You have Oracle running, and Oracle has a XML Application
running on port 8080.

Change Tomcat to listen on another port, or change Oracle to 
not run the XML Application.

For a quick (though probably incorrect fix), stop Oracle (Listeners
as well), start Tomcat, start Oracle.

Regards,
Paul

On Mon, 2003-03-17 at 15:13, Christian Dechery wrote:
 I can't seem to use Tomcat 4.1.18 at all.
 
 I just installed it for the third time... it's totally crazy... right after I 
 install, WITH no changes in any configs I try to access the /admin or /manager app 
 or even the base app (the one with the welcome screen and all)... and everytime a 
 logon window (with XDB in the title) appears, and nothing works as a login/pass...
 
 what's that?
 .:| Christian Dechery
 .:| Web/Java Developer
 .:| Gaita-L Owner
 .:| [EMAIL PROTECTED] 
-- 
p niemandt [EMAIL PROTECTED]


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



RE: tomcat not releasing db connections

2003-03-17 Thread p niemandt
Not Tomcat's fault: 

Are you using dbcp? If yes, then just make sure that you explicitly
close your connection after using it, preferable in a try /  finally 

If not, then start using a database connection pool, like the one that
comes with Tomcat.

Hope this helps.
Paul



On Mon, 2003-03-17 at 15:33, apachep2 wrote:
 I start my app using a Servlet. When I shut down Tomcat, this Servlet is
 called. In fact, Servlet's detroy method is called. In Servlet's destroy
 method, I free up the db connections and do some other resource cleanup.
 
 -Original Message-
 From: Kapil Sharma [mailto:[EMAIL PROTECTED] 
 Sent: March 16, 2003 6:03 PM
 To: Tomcat Users List
 Subject: tomcat not releasing db connections
 
 Hi,
 I am using the default setting of tomcat with apache 1.3.27. Tomcat does
 not
 release the db connections. I have keepalive on in my apache settings.
 Are they related in some way to create this problem?
 
 kapil
 
 
 -
 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]
-- 
p niemandt [EMAIL PROTECTED]


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



Re: Tomcat auth acting crazy

2003-03-17 Thread p niemandt
Sadly I have no idea, I just had the same problem.

My solution was to make sure that I start Tomcat first.


On Mon, 2003-03-17 at 15:56, Christian Dechery wrote:
 yeah... I just found that out... after doing several tests I realized it was a 
 conflict with Oracle...
 
 where is that configuration where I can change Oracle's application port??
 
 thanks
 .:| Christian Dechery
 .:| Web/Java Developer
 .:| Gaita-L Owner
 .:| [EMAIL PROTECTED] 
 
   - Original Message - 
   From: p niemandt 
   To: Tomcat Users List 
   Sent: Monday, March 17, 2003 12:42 PM
   Subject: Re: Tomcat auth acting crazy
 
 
   You have Oracle running, and Oracle has a XML Application
   running on port 8080.
 
   Change Tomcat to listen on another port, or change Oracle to 
   not run the XML Application.
 
   For a quick (though probably incorrect fix), stop Oracle (Listeners
   as well), start Tomcat, start Oracle.
 
   Regards,
   Paul
 
   On Mon, 2003-03-17 at 15:13, Christian Dechery wrote:
I can't seem to use Tomcat 4.1.18 at all.

I just installed it for the third time... it's totally crazy... right after I 
 install, WITH no changes in any configs I try to access the /admin or /manager app 
 or even the base app (the one with the welcome screen and all)... and everytime a 
 logon window (with XDB in the title) appears, and nothing works as a login/pass...

what's that?
.:| Christian Dechery
.:| Web/Java Developer
.:| Gaita-L Owner
.:| [EMAIL PROTECTED] 
   -- 
   p niemandt [EMAIL PROTECTED]
 
 
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
 
-- 
p niemandt [EMAIL PROTECTED]


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



RE: HELP:: Tomcat 4.1.18 + JBuilder Foundation 8

2003-03-17 Thread p niemandt
I don't think you can: You will probably need the Enterprise or
Professional version of JBuilder to be able to do that.

On Mon, 2003-03-17 at 19:01, Shaffin Bhanji wrote:
 Sorry... I mean that I need to run/debug/stop my servlet within my
 Borland JBuilder 8 Foundation environment. I need setting to know how to
 setup JBuilder in order to do that.
 
 
 Shaffin N. Bhanji 
 Technical Manager 
 Cambridge Technology Partners, the global eServices company of Novell,
 Inc. 
 www.ctp.com
 905.946.4817 | office 
 416.524.9520 | cell 
 905.940.2688 | fax 
 [EMAIL PROTECTED] 
 [EMAIL PROTECTED]
 
  [EMAIL PROTECTED] 17/03/2003 1:55:57 pm 
 wow, don't even know where to start, your problem is so well described
 :-)
 
  -Original Message-
  From: Shaffin Bhanji [mailto:[EMAIL PROTECTED] 
  Sent: Monday, March 17, 2003 10:51 AM
  To: [EMAIL PROTECTED] 
  Subject: HELP:: Tomcat 4.1.18 + JBuilder Foundation 8
  
  
  Hi,
  
  Can anyone help out with the integration of Tomcat 4.1.18 and 
  JBuilder 
  8 Foundation
  
  Thanks,
  
  Shaffin N. Bhanji 
  Technical Manager 
  Cambridge Technology Partners, the global eServices company of
 Novell,
  Inc. 
  www.ctp.com
  905.946.4817 | office 
  416.524.9520 | cell 
  905.940.2688 | fax 
  [EMAIL PROTECTED] 
  [EMAIL PROTECTED] 
  
 
 -
  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] 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
-- 
p niemandt [EMAIL PROTECTED]


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



RE: Server.xml

2003-03-17 Thread p niemandt
Hi Sandra:

Quite likely Tomcat has not been able to start successfully. It's also
quite likely that in changing your server.xml file you might have broken
some of the xml. My best suggestion is to post your server.xml file and
let the group have a look. 

You can also try to replace your server.xml with the original one:
Replace, not change back: Try to get the original one, or download it
from Apache : You'll need to download the full version of Tomcat and
just extract to get the server.xml file.

The log extract is not really enough to say for sure: You can also post
more of the log: Especially 

catalina_log
catalina.out
localhost.log


hth,
Paul


On Mon, 2003-03-17 at 21:08, Hunter, Sandra wrote:
 Erik:
 This is what the localhost log says:
 2003-03-17 13:04:44 StandardContext[/star]: Starting
 2003-03-17 13:04:44 StandardContext[/star]: Processing start(), current
 available=false
 2003-03-17 13:04:44 StandardContext[/star]: Configuring default Resources
 
 And the apache log:
 
 2003-03-17 12:52:49 [org.apache.catalina.connector.warp.WarpConnector] Error
 accepting requests
 java.net.SocketException: socket closed
   at java.net.PlainSocketImpl.socketAccept(Native Method)
   at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:343)
   at java.net.ServerSocket.implAccept(ServerSocket.java:438)
   at java.net.ServerSocket.accept(ServerSocket.java:409)
   at
 org.apache.catalina.connector.warp.WarpConnector.run(WarpConnector.java:590)
   at java.lang.Thread.run(Thread.java:536)
 
 So does this make any sense to you? What do I do?
 
 -Original Message-
 From: Erik Price [mailto:[EMAIL PROTECTED] 
 Sent: Monday, March 17, 2003 1:03 PM
 To: Tomcat Users List
 Subject: Re: Server.xml
 
 
 
 
 Hunter, Sandra wrote:
  Frustration abounds:
  I am plodding through a tomcat tutorial and it suggests modifying the 
  Server.xml file to include a new context path line to allow for 
  playing with a sample file. Everything works tickety boo until I do 
  that, then Tomcat won't startup at all. When I enter the startup 
  command I just get a really brief flash of screen and poof! It's gone 
  again. When I take the new line out of the server.xml file the problem 
  persists: poof! Gone.
  That is the only change I make.
  Any thoughts?
 
 Check in your logs directory.  $CATALINA_HOME/logs or %CATALINA_HOME%\logs
 
 
 Erik
 
 
 -
 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]
-- 
p niemandt [EMAIL PROTECTED]


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



RE: Server.xml

2003-03-17 Thread p niemandt
I think some basic XML guidance is in order: Also consider doing some
google on it: If you know the syntax, you should never need to get
frustrated or make mistakes.

1. Every XML element needs to be closed.
This is usually in one of two formats: Either the element does not have
any embedded elements, in which case you close the element directly, or
there is some embedded elements, and you need to have a separate closing
element.

As example:
Say you only have a context element without any embedded attributes ...
Context attribute1=Blah attribute2=Bloh /

The element is closed with the / tag.

or you have embedded attributes ...
Context
Attribute value=blah /
Attribute value=bloh /
/Context

If you follow basic XML guide lines everything should be OK.
Another very common mistake is incorrect commenting ...

A XML comment is the same as a HTML comment, ie.
!--   --
Now, the mistake a lot of people make is to embed dashes in the comment
...

Stuff like

!-- -- This is a Broken Comment and any decent XML-- Parser will
complain --

A comment ends with -- , not with --, so as soon as the parser sees
another dash, it thinks that you are closing the comment, but it doesn't
get the closing tag, so chaos  evolves ...

!-- A proper comment may not contain dashes --
on the other hand is an example of a proper xml comment.

hth,
Paul




On Mon, 2003-03-17 at 22:00, Geoff Peters wrote:
 Sandra - I have had similar experiences with similar frustrating results, and it 
 always seems to be placement of the Context /Context tags - for some reason 
 sometimes you need closing /Context tags, other times you don't, I can't seem to 
 figure out when to use them and when not to, so I end up fiddling around with 
 various combinations until Tomcat starts! (that was a really dumb answer but it 
 works for me)
 
 Geoff
 
 -Original Message-
 From: Hunter, Sandra [mailto:[EMAIL PROTECTED]
 Sent: Monday, March 17, 2003 5:00 PM
 To: 'Tomcat Users List'
 Subject: Server.xml
 
 
 
 Frustration abounds:
 I am plodding through a tomcat tutorial and it suggests modifying the
 Server.xml file to include a new context path line to allow for playing with
 a sample file.
 Everything works tickety boo until I do that, then Tomcat won't startup at
 all. When I enter the startup command I just get a really brief flash of
 screen and poof! It's gone again.
 When I take the new line out of the server.xml file the problem persists:
 poof! Gone.
 That is the only change I make.
 Any thoughts?
 
 -
 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]
-- 
p niemandt [EMAIL PROTECTED]


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



RE: Server.xml

2003-03-17 Thread p niemandt
Hi Sandra:

Sorry for the push on XML syntax: I have just noticed a few incidences
where people try to comment out pieces of an xml file and mistakenly
embed some -- in a comment, or forget to close a tag.

Now: In general the logs looks fine, the only potential problem I can
see is that the web descriptor can not be found for your web
application.

You should have a web.xml file under the WEB-INF directory of your web
application. Without this, only the defaults would be used, and this is
usually not enough.

You need to have a web.xml file under
$CATALINA_HOME/webapps/star/WEB-INF/web.xml

(or windows)
$CATALINA_HOME\webapps\star\WEB-INF\web.xml

This file should describe your web application to tomcat: Mapping the
Servlet and URL's, any additional parameters and such. 

The server.xml configures Tomcat: For options have a look at the DTD:
'-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN'

*** snip ***
 2003-03-17 13:37:25 ContextConfig[/star]: Missing application web.xml, using
 defaults only
 2003-03-17 13:37:25 ContextConfig[/star]: Scanning web.xml tag libraries
 2003-03-17 13:37:25 ContextConfig[/star]: Scanning TLD files in /WEB-INF
 2003-03-17 13:37:25 ContextConfig[/star]: Scanning library JAR files
 2003-03-17 13:37:25 ContextConfig[/star]: Added certificates - request
 attribute Valve
 2003-03-17 13:37:25 ContextConfig[/star]: Pipline Configuration:
 2003-03-17 13:37:25 ContextConfig[/star]:
 org.apache.catalina.valves.CertificatesValve/1.0
 2003-03-17 13:37:25 ContextConfig[/star]:
 org.apache.catalina.core.StandardContextValve/1.0
 2003-03-17 13:37:25 ContextConfig[/star]: ==
 2003-03-17 13:37:25 StandardContext[/star]: Configuring application event
 listeners
 2003-03-17 13:37:25 StandardContext[/star]: Sending application start events
 2003-03-17 13:37:25 StandardContext[/star]: Starting filters
 2003-03-17 13:37:25 StandardContext[/star]: Posting standard context
 attributes
 2003-03-17 13:37:25 StandardWrapper[/star:default]: Loading container
 servlet default
 2003-03-17 13:37:25 StandardWrapper[/star:invoker]: Loading container

*** snip ***
 servlet invoker
 2003-03-17 13:37:25 Internal Error: File /WEB-INF/web.xml not found
 2003-03-17 13:37:26 ContextConfig[/IDCard]: Missing application web.xml,
 using defaults only
 2003-03-17 13:37:26 ContextConfig[/IDCard]: Scanning web.xml tag libraries
 2003-03-17 13:37:26 ContextConfig[/IDCard]: Scanning TLD files in /WEB-INF
 2003-03-17 13:37:26 ContextConfig[/IDCard]: Scanning library JAR files
 2003-03-17 13:37:26 ContextConfig[/IDCard]: Added certificates - request
 attribute Valve
 2003-03-17 13:37:26 ContextConfig[/IDCard]: Pipline Configuration:
 2003-03-17 13:37:26 ContextConfig[/IDCard]:
 org.apache.catalina.valves.CertificatesValve/1.0
 2003-03-17 13:37:26 ContextConfig[/IDCard]:
 org.apache.catalina.core.StandardContextValve/1.0
 2003-03-17 13:37:26 ContextConfig[/IDCard]: ==
 2003-03-17 13:37:26 StandardContext[/IDCard]: Configuring application event
 listeners
 2003-03-17 13:37:26 StandardContext[/IDCard]: Sending application start
 events
 2003-03-17 13:37:26 StandardContext[/IDCard]: Starting filters
 2003-03-17 13:37:26 StandardContext[/IDCard]: Posting standard context
 attributes
 2003-03-17 13:37:26 StandardWrapper[/IDCard:default]: Loading container
 servlet default
 2003-03-17 13:37:26 StandardWrapper[/IDCard:invoker]: Loading container
 servlet invoker
 2003-03-17 13:37:26 Internal Error: File /WEB-INF/web.xml not found



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



RE: Cannot create resource instance

2003-03-14 Thread p niemandt
No need to change the policy file.
Make sure the oracle drivers are in the correct directory ...
$TOMCAT_HOME/common/lib
and that the classes.zip file has been renamed to classes.jar

Also, maybe mail a sniplet of the code you use to do your lookup: Maybe
we can see something funny.

hth.
Paul


On Fri, 2003-03-14 at 15:06, Appel, Jeremy D wrote:
 Yes, I am doing the lookup exactly the same way.  I should not have to
 modify the catalina.policy file for security, correct?
 
 -Original Message-
 From: Ferrer, J.C. [mailto:[EMAIL PROTECTED]
 Sent: Thursday, March 13, 2003 7:18 PM
 To: 'Tomcat Users List'
 Subject: RE: Cannot create resource instance
 
 
 
 I'm using v4.1.21 and instead of using user as the parameter name, I'm
 using username.
 
 Are you doing the resource lookup using java:comp/env/jdbc/prod_d ?
 
  
 
 -Original Message-
 From: Appel, Jeremy D [mailto:[EMAIL PROTECTED]
 Sent: Thursday, March 13, 2003 1:29 PM
 To: '[EMAIL PROTECTED]'
 Subject: Cannot create resource instance
 
 
 All,
 
   I am running Tomcat 4.0.4 and I am trying to use Jakarta DBCP.  I
 have download the necessary jar files and placed them in
 %CATALINA_HOME%/common/lib.  I am receiving the following error:
 
 javax.naming.NamingException: Cannot create resource instance
 at
 org.apache.naming.factory.ResourceFactory.getObjectInstance(ResourceFactory.
 java)
 at
 javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java)
 at org.apache.naming.NamingContext.lookup(NamingContext.java)
 at org.apache.naming.NamingContext.lookup(NamingContext.java)
 at org.apache.naming.NamingContext.lookup(NamingContext.java)
 at org.apache.naming.NamingContext.lookup(NamingContext.java)
 
 When I list bindings on the resource below, It appears that the JNDI
 resource exists but when I try to look it up I receive the error above.  Any
 thoughts or advice?
 
 Snapshot from web.xml:
 
 resource-ref
   res-ref-namejdbc/prod_d/res-ref-name
   res-typejavax.sql.DataSource/res-type
   res-authContainer/res-auth
 /resource-ref
 
 Snapshot from server.xml:
 
 
  Resource name=jdbc/prod_d auth=Container
type=javax.sql.DataSource/
ResourceParams name=jdbc/prod_d
   parameter
  nameuser/name
  valuejappel/value
   /parameter
   parameter
  namepassword/name
  valuejappel/value
   /parameter
   parameter
  namedriverClassName/name
  valueoracle.jdbc.driver.OracleDriver/value
   /parameter
   parameter
  nameurl/name
  
 valuejdbc:oracle:thin:@hpcat159.qwest.net:1521:prod_d/value
   /parameter
   parameter
  namefactory/name
  
 valueora.apache.commons.dbcp.BasicDataSourceFactory/value
   /parameter
   /ResourceParams
 
 
 Thanks,
 Jeremy Appel
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 CONFIDENTIALITY NOTICE:  The information in this e-mail is privileged and
 confidential.  Any use, copying or dissemination of any portion of this
 e-mail by or to anyone other than the intended recipient(s) is unauthorized.
 If you have received this e-mail in error, please reply to sender and delete
 it from your system immediately.
 
 -
 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]
-- 
p niemandt [EMAIL PROTECTED]


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



RE: Cannot create resource instance

2003-03-14 Thread p niemandt
OK: This is basically what I do, and it has never given me any problems.
Maybe try that?

*** server.xml ***
Define a resource ...
Resource name=jdbc/chfs auth=Container
type=javax.sql.DataSource/

*** where you need the connection ***
{
String DatasourceName = java:comp/env/jdbc/chfs;

Connection conn = null; 
try {
Context ctx = new InitialContext();
DataSource ds = (DataSource)ctx.lookup(DatasourceName);
conn = ds.getConnection();
try {
PreparedStatement prep = conn.prepareStatement(SQL) ...

**

The java:comp/env needs to be prefixed.
I think the Context envCtx = (Context) initCtx.lookup(java:comp/env)
is probably causing your problems.

Hope this helps: I use the same code for Oracle8, 9, MySQL, and SAP/DB:
Works well for all of them, as long as your Resource is properly defined
(I do it in server.xml, could probably be done elsewhere, 
but If it's not broken, don't fix it? )

regards,
Paul



On Fri, 2003-03-14 at 15:24, Appel, Jeremy D wrote:
 Yes the classes.jar file is in %CATALINA_HOME/common/lib
 
 Here is snippet of code, disregard the list bindings call (debug statement
 which prints out the binding)
 
 
 Context initCtx = new InitialContext();
 Context envCtx = (Context) initCtx.lookup(java:comp/env);
 NamingEnumeration enum = initCtx.listBindings(java:comp/env/jdbc);
 while (enum.hasMoreElements()) {
   writer.print(Binding : );
   writer.println(enum.nextElement().toString());
 }
 DataSource ds = (DataSource) envCtx.lookup(jdbc/prod_d);
 Connection conn = ds.getConnection();
 
 Thanks,
 Jeremy
 
 -Original Message-
 From: p niemandt [mailto:[EMAIL PROTECTED]
 Sent: Friday, March 14, 2003 10:27 AM
 To: Tomcat Users List
 Subject: RE: Cannot create resource instance
 
 
 No need to change the policy file.
 Make sure the oracle drivers are in the correct directory ...
 $TOMCAT_HOME/common/lib
 and that the classes.zip file has been renamed to classes.jar
 
 Also, maybe mail a sniplet of the code you use to do your lookup: Maybe
 we can see something funny.
 
 hth.
 Paul
 
 
 On Fri, 2003-03-14 at 15:06, Appel, Jeremy D wrote:
  Yes, I am doing the lookup exactly the same way.  I should not have to
  modify the catalina.policy file for security, correct?
  
  -Original Message-
  From: Ferrer, J.C. [mailto:[EMAIL PROTECTED]
  Sent: Thursday, March 13, 2003 7:18 PM
  To: 'Tomcat Users List'
  Subject: RE: Cannot create resource instance
  
  
  
  I'm using v4.1.21 and instead of using user as the parameter name, I'm
  using username.
  
  Are you doing the resource lookup using java:comp/env/jdbc/prod_d ?
  
   
  
  -Original Message-
  From: Appel, Jeremy D [mailto:[EMAIL PROTECTED]
  Sent: Thursday, March 13, 2003 1:29 PM
  To: '[EMAIL PROTECTED]'
  Subject: Cannot create resource instance
  
  
  All,
  
  I am running Tomcat 4.0.4 and I am trying to use Jakarta DBCP.  I
  have download the necessary jar files and placed them in
  %CATALINA_HOME%/common/lib.  I am receiving the following error:
  
  javax.naming.NamingException: Cannot create resource instance
  at
 
 org.apache.naming.factory.ResourceFactory.getObjectInstance(ResourceFactory.
  java)
  at
  javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java)
  at org.apache.naming.NamingContext.lookup(NamingContext.java)
  at org.apache.naming.NamingContext.lookup(NamingContext.java)
  at org.apache.naming.NamingContext.lookup(NamingContext.java)
  at org.apache.naming.NamingContext.lookup(NamingContext.java)
  
  When I list bindings on the resource below, It appears that the JNDI
  resource exists but when I try to look it up I receive the error above.
 Any
  thoughts or advice?
  
  Snapshot from web.xml:
  
  resource-ref
res-ref-namejdbc/prod_d/res-ref-name
res-typejavax.sql.DataSource/res-type
res-authContainer/res-auth
  /resource-ref
  
  Snapshot from server.xml:
  
  
   Resource name=jdbc/prod_d auth=Container
 type=javax.sql.DataSource/
 ResourceParams name=jdbc/prod_d
parameter
   nameuser/name
   valuejappel/value
/parameter
parameter
   namepassword/name
   valuejappel/value
/parameter
parameter
   namedriverClassName/name
   valueoracle.jdbc.driver.OracleDriver/value
/parameter
parameter
   nameurl/name
   
  valuejdbc:oracle:thin:@hpcat159.qwest.net:1521:prod_d/value
/parameter
parameter
   namefactory/name
   
  valueora.apache.commons.dbcp.BasicDataSourceFactory/value
/parameter
/ResourceParams
  
  
  Thanks,
  Jeremy

RE: Cannot create resource instance

2003-03-14 Thread p niemandt
Aah: On the other hand, and I should have caught this earlier, but
anyways: I assume you copied your server.xml exactly in the post?
In that case a definite problem is ...

valueora.apache.commons.dbcp.BasicDataSourceFactory/value

Getting confused with Oracle?

This should surely be
org.apache.commons.dbcp.BasicDataSourceFactory ???

typo: org -- ora

On Fri, 2003-03-14 at 16:00, Appel, Jeremy D wrote:
 That still did not work.  Given the fact that I can list the binding, I have
 to think that the DBCP related class files are not getting loaded to handle
 the request.  Is there anyway to check this?
 
 -Original Message-
 From: p niemandt [mailto:[EMAIL PROTECTED]
 Sent: Friday, March 14, 2003 10:46 AM
 To: 'Tomcat Users List'
 Subject: RE: Cannot create resource instance
 
 
 OK: This is basically what I do, and it has never given me any problems.
 Maybe try that?
 
 *** server.xml ***
 Define a resource ...
 Resource name=jdbc/chfs auth=Container
 type=javax.sql.DataSource/
 
 *** where you need the connection ***
 {
 String DatasourceName = java:comp/env/jdbc/chfs;
 
 Connection conn = null;   
 try {
   Context ctx = new InitialContext();
   DataSource ds = (DataSource)ctx.lookup(DatasourceName);
   conn = ds.getConnection();
   try {
   PreparedStatement prep = conn.prepareStatement(SQL) ...
   
 **
 
 The java:comp/env needs to be prefixed.
 I think the Context envCtx = (Context) initCtx.lookup(java:comp/env)
 is probably causing your problems.
 
 Hope this helps: I use the same code for Oracle8, 9, MySQL, and SAP/DB:
 Works well for all of them, as long as your Resource is properly defined
 (I do it in server.xml, could probably be done elsewhere, 
 but If it's not broken, don't fix it? )
 
 regards,
 Paul
 
 
 
 On Fri, 2003-03-14 at 15:24, Appel, Jeremy D wrote:
  Yes the classes.jar file is in %CATALINA_HOME/common/lib
  
  Here is snippet of code, disregard the list bindings call (debug statement
  which prints out the binding)
  
  
  Context initCtx = new InitialContext();
  Context envCtx = (Context) initCtx.lookup(java:comp/env);
  NamingEnumeration enum = initCtx.listBindings(java:comp/env/jdbc);
  while (enum.hasMoreElements()) {
writer.print(Binding : );
writer.println(enum.nextElement().toString());
  }
  DataSource ds = (DataSource) envCtx.lookup(jdbc/prod_d);
  Connection conn = ds.getConnection();
  
  Thanks,
  Jeremy
  
  -Original Message-
  From: p niemandt [mailto:[EMAIL PROTECTED]
  Sent: Friday, March 14, 2003 10:27 AM
  To: Tomcat Users List
  Subject: RE: Cannot create resource instance
  
  
  No need to change the policy file.
  Make sure the oracle drivers are in the correct directory ...
  $TOMCAT_HOME/common/lib
  and that the classes.zip file has been renamed to classes.jar
  
  Also, maybe mail a sniplet of the code you use to do your lookup: Maybe
  we can see something funny.
  
  hth.
  Paul
  
  
  On Fri, 2003-03-14 at 15:06, Appel, Jeremy D wrote:
   Yes, I am doing the lookup exactly the same way.  I should not have to
   modify the catalina.policy file for security, correct?
   
   -Original Message-
   From: Ferrer, J.C. [mailto:[EMAIL PROTECTED]
   Sent: Thursday, March 13, 2003 7:18 PM
   To: 'Tomcat Users List'
   Subject: RE: Cannot create resource instance
   
   
   
   I'm using v4.1.21 and instead of using user as the parameter name, I'm
   using username.
   
   Are you doing the resource lookup using java:comp/env/jdbc/prod_d ?
   

   
   -Original Message-
   From: Appel, Jeremy D [mailto:[EMAIL PROTECTED]
   Sent: Thursday, March 13, 2003 1:29 PM
   To: '[EMAIL PROTECTED]'
   Subject: Cannot create resource instance
   
   
   All,
   
 I am running Tomcat 4.0.4 and I am trying to use Jakarta DBCP.  I
   have download the necessary jar files and placed them in
   %CATALINA_HOME%/common/lib.  I am receiving the following error:
   
   javax.naming.NamingException: Cannot create resource instance
   at
  
 
 org.apache.naming.factory.ResourceFactory.getObjectInstance(ResourceFactory.
   java)
   at
   javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java)
   at org.apache.naming.NamingContext.lookup(NamingContext.java)
   at org.apache.naming.NamingContext.lookup(NamingContext.java)
   at org.apache.naming.NamingContext.lookup(NamingContext.java)
   at org.apache.naming.NamingContext.lookup(NamingContext.java)
   
   When I list bindings on the resource below, It appears that the JNDI
   resource exists but when I try to look it up I receive the error above.
  Any
   thoughts or advice?
   
   Snapshot from web.xml:
   
   resource-ref
 res-ref-namejdbc/prod_d/res-ref-name
 res-typejavax.sql.DataSource/res-type
 res-authContainer/res-auth
   /resource-ref
   
   Snapshot from server.xml:
   
   
Resource name=jdbc/prod_d auth=Container

RE: Still trying to just get going

2003-03-14 Thread p niemandt
(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown
 Source)
 at java.lang.reflect.Method.invoke(Unknown Source)
 at
 org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:243)
 
 
 I have Oracle8i installed locally and have stopped (and started) the
 HTTP
 server with the same results.
 
 I added a manager role to the server.xml file.
 
 I think I will have to modify the server.xml file but I am unsure of
 what
 values to add or where...
 
 It's been too long since last I used this and I have never had to do it
 on
 my own, always had a more experienced user holding my hand. *sigh*
 Sandra
 
 -
 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]
-- 
p niemandt [EMAIL PROTECTED]


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



RE: Loadbuild Problem

2003-03-14 Thread p niemandt
Just as a matter of interest, why Tomcat 5? As far as I know this is
still under heavy development and far from production level.

Would you not be better of to either build Tomcat 4.1.18 Stable, or even
just using the Tomcat 4 binaries?

just wondering ...
Paul

On Fri, 2003-03-14 at 21:38, Filip Hanik wrote:
 ok, I think I got it working
 
 I did four things:
 
 1.
 and then in jakarta-tomcat-5 build.properties.default
 I set the property 
 base.path=c:/development/tomcat-base
 this can be set to anything, as long as it is a absolute directory,
 
 2.
 in jakarta-servletapi-5/jsr152 build.xml I changed the property to
 property name=servlet-api.jar  
 value=../jsr154/servlet-api-2.4/lib/servlet-api.jar/
 
 3. 
 I built jsr154
 cd \jakarta-servletapi-5\jsr154
 ant
 
 4. 
 I copied one library
 \jakarta-servletapi-5\jsr154\servlet-api-2.4\lib\servlet-api.jar to
 \jakarta-servletapi-5\jsr152\servlet-api-2.4\lib\servlet-api.jar
 
 
 based on this, I think you can figure out what went wrong, I no longer have the full 
 build error, just check out jakarta-tomcat-5 clean and you will reproduce it.
 
 Remy, setting it to /usr/local will not work :(, I'm working on windows, I'm sure I 
 get flamed for that alone LOL
 
 Filip
 
  -Original Message-
  From: Filip Hanik 
  Sent: Friday, March 14, 2003 1:24 PM
  To: Tomcat Users List
  Subject: RE: Loadbuild Problem
  
  
  and there are more problems, I will let you know if I get it working
  
  FIlip
  
   -Original Message-
   From: Filip Hanik 
   Sent: Friday, March 14, 2003 1:21 PM
   To: Tomcat Users List
   Subject: RE: Loadbuild Problem
   
   
   the error is in 
   
   jsr152/build.xml
   
   and the correct value is 
   
   property name=servlet-api.jar  
   value=../jsr154/servlet-api-2.4/lib/servlet-api.jar/
   
   
   Filip
   
-Original Message-
From: kevin carey [mailto:[EMAIL PROTECTED]
Sent: Friday, March 14, 2003 1:10 PM
To: [EMAIL PROTECTED]
Subject: Loadbuild Problem


Hi,

I'm building Tomcat from scratch using directions from
http://jakarta.apache.org/tomcat/building.html

I'm running JDK 1.4 on Linux.

After about 3 hours, build fails with message:

BUILD FAILED
file:/home/kevin/apps/tomcat/src/jakarta-tomcat-5/build.xml:465:
Basedir /home/kevin/apps/tomcat/src/jakarta-commons/el
does not exist

Any thoughts?

newbie.


__
Do you Yahoo!?
Yahoo! Web Hosting - establish your business online
http://webhosting.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]
   
   
  
  -
  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]
-- 
p niemandt [EMAIL PROTECTED]


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



Re: New user

2003-03-14 Thread p niemandt
Interesting ... Why the final exclamation mark? Sure, I do everything
manually, haven't used the web manager or admin app yet, but still, the
! mark at the end? Do you actually type that in? Why? 

Just wondering ...
Paul

On Fri, 2003-03-14 at 10:01, John B. Moore wrote:
 Jan,
 
   Thanks for the suggestion.. no joy on that one either..   The HowTo 
 suggests that if the WAR is in the webapps dir that a full path is not 
 required... it lies...??G
 
   I'll again triple check my path and spelling (which I have already 
 exhaustively done.. but...)
 
John...
 
 Jan Behrens wrote:
 
 but not:
 
   
 
 /usr/local/tomcat4/webapps/DurlingSite.war -
 jar:file://usr/local/tomcat4/webapps/DurlingSite.war!/
   
 
 
 as suggested before. you need complete path even under unix/linux. difference
 is only the missing drive letter
 
 regards jan
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
   
 
-- 
p niemandt [EMAIL PROTECTED]


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



Re: Do you run Tomcat with SSL?

2003-03-13 Thread p niemandt
My guess would be that most people only use SSL on the web front end:
Apache listens on port 443, does all the SSL layer stuff, with Tomcat
usually behind the firewall, and the Tomcat -- Web Server (Apache /
IIS) unencrypted.

just my 2c

Regards,
Paul

On Fri, 2003-03-14 at 02:43, Mark Liu wrote:
 I am able to run Tomcat SSL with the keytool-generated
 certificate, but not the certificate my little Java
 program generates.
 
 I've been asking this question for a while in this
 list.  But it seems nobody has an answer to it.  So
 you guys never run Tomcat in SSL mode?  Or you guys
 always use the keytool-generated certificate for the SSL?
 
 __
 Do you Yahoo!?
 Yahoo! Web Hosting - establish your business online
 http://webhosting.yahoo.com
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
-- 
p niemandt [EMAIL PROTECTED]


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



Re: great problem with dbcp conn pool

2003-03-12 Thread p niemandt
$StandardPipelineValveCon
   text.invok
   eNext(StandardPipeline.java:643)
   at
   org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispat
   cherValve.
   java:170)
   at
   org.apache.catalina.core.StandardPipeline$StandardPipelineValveCon
   text.invok
   eNext(StandardPipeline.java:641)
   at
   org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValv
   e.java:172
   )
   at
   org.apache.catalina.core.StandardPipeline$StandardPipelineValveCon
   text.invok
   eNext(StandardPipeline.java:641)
   at
   org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.
   java:480)
   at
   org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
   at
   org.apache.catalina.core.StandardEngineValve.invoke(StandardEngine
   Valve.java
   :174)
   at
   org.apache.catalina.core.StandardPipeline$StandardPipelineValveCon
   text.invok
   eNext(StandardPipeline.java:643)
   at
   org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.
   java:480)
   at
   org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
   at
   org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
   at
   org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:261)
   at
   org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:360)
   at
   org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:632)
   at
   org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket
   .java:590)
   at
   org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:707)
   at
   org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(Thre
   adPool.jav
   a:530)
   at java.lang.Thread.run(Thread.java:536)
  
  
  
   -
   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]
 
 
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
-- 
p niemandt [EMAIL PROTECTED]


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



Re: Starting Tomcat results in multiple Java processes

2003-03-11 Thread p niemandt
Yip: I wouldn't worry about that: It has something to do with how linux
maps the Java VM to linux processes. If you have pstree installed on
your linux box, run that: You should see one Java VM with (in your case,
15) threads under that. 

As a side note: I successfully run Tomcat with about 29 processes under
that, Apache, Oracle 9, SAP DB, Named, and some other programs, and have
not had any problems. My Tomcat is running 24/7 for the last few months
now, and I have never needed to reset or restart.

I think there was a discussion on the group about this previously, but
can not recollect when / by whom.

hth
Paul

On Tue, 2003-03-11 at 22:21, Jens Skripczynski wrote:
 Chris Dodunski:
  Just a brief question, for a Tomcat newbie. I have successfully installed
  Tomcat on our companies Linux web server. Problem is the huge number of java
  processes running as a consequent (see below). Our network administrator
  doesn't like it. Tomcat won't be doing too much work in this instance, so is
  there any way to reduce the number of these (a configuration setting
  perhaps)?
 
 The option you are looking for is located in server.xml:
 Connector className=org.apache.coyote.tomcat4.CoyoteConnector
port=8080 minProcessors=5 maxProcessors=8
enableLookups=true redirectPort=8443
acceptCount=10 debug=0 connectionTimeout=2
useURIValidationHack=false /
 
 With min/max you can control the number of threads.
 
 But still i have a lot of threads on my computer.  I _believe_ tomcat starts 
 a thread for each found webapp it deployes.
 
 So 10 webapps and 5 listeners = 15 processes ?!
 
 Ciao
 
 Jens Skripczynski
-- 
p niemandt [EMAIL PROTECTED]


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



Re: proxy and sessions problem

2003-03-06 Thread p niemandt
Don't use both proxy pass and mod_jk: use either one or the other.

To keep your sessions, you will need to use mod_jk.

Sadly this is about the extend of my advice: other people on the list
might have better advice. I know I had to change from proxy pass to
mod_jk to keep my session

On Thu, 2003-03-06 at 13:57, Gaston Escobar wrote:
 (tomcat 4.1.18 + apache 1.3 + mod_jk + Linux + Proxy via Apache ProxyPass)
 I have the following scenario.:
 A main server that runs Apache with mod_proxy:
 
 ProxyPass /tomcat http://mytomcatserver
 ProxyPassReverse /tomcat http://mytomcatserver
 
 When someone request an URL containing /tomcat then apache redirects the
 call to Tomcat server.
 
 The problem is that with above approach, I lost session id?s
 I also added proxyName=mainserver and Proxyport=80 to the HTTP connector
 under server.xml, but no luck.
 
 Can someone help me to fix this?
 
 Thanks a lot
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
-- 
p niemandt [EMAIL PROTECTED]


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



Re: proxy and sessions problem

2003-03-06 Thread p niemandt
Yip: 

As far as I understand it: using proxy pass, even though your request
will be forwarded to tomcat, it is still seen as 2 separate
applications: You will then have an Apache session and a Tomcat session,
and never the twain shall meet ...

You need to configure your web application so that is seen as only one
application, and the easiest to do this is to use something like mod_jk.


On Thu, 2003-03-06 at 14:43, Gaston Escobar wrote:
 Sorry, I've made a mistake, I'm not using mod_jk, I'm just using mod_proxy.
 So, the only possibilty I have is to change from proxy pass to mod_jk?
 
 
 
 
 
 -Mensaje original-
 De: p niemandt [mailto:[EMAIL PROTECTED]
 Enviado el: Jueves, 06 de Marzo de 2003 11:36 a.m.
 Para: Tomcat Users List
 Asunto: Re: proxy and sessions problem
 
 
 Don't use both proxy pass and mod_jk: use either one or the other.
 
 To keep your sessions, you will need to use mod_jk.
 
 Sadly this is about the extend of my advice: other people on the list
 might have better advice. I know I had to change from proxy pass to
 mod_jk to keep my session
 
 On Thu, 2003-03-06 at 13:57, Gaston Escobar wrote:
  (tomcat 4.1.18 + apache 1.3 + mod_jk + Linux + Proxy via Apache ProxyPass)
  I have the following scenario.:
  A main server that runs Apache with mod_proxy:
 
  ProxyPass /tomcat http://mytomcatserver
  ProxyPassReverse /tomcat http://mytomcatserver
 
  When someone request an URL containing /tomcat then apache redirects the
  call to Tomcat server.
 
  The problem is that with above approach, I lost session id?s
  I also added proxyName=mainserver and Proxyport=80 to the HTTP
 connector
  under server.xml, but no luck.
 
  Can someone help me to fix this?
 
  Thanks a lot
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 --
 p niemandt [EMAIL PROTECTED]
 
 
 -
 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]
-- 
p niemandt [EMAIL PROTECTED]


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



Re: A question regarding accessing parameters after the ? in aURL

2003-03-06 Thread p niemandt
As far as I know you should separate parameters with an ampersand ...

Build up your query string, end this with a question mark and append
your parameters with the ampersand ...

ie. Something like 

MyFavourite.JSP?id=2path=myprojectparam1=2param2=3

etc, etc...



MyFavourite.JSP'?id
   =2,path=/myproject



On Fri, 2003-03-07 at 00:13, Henry Tang wrote:
 try +
 - Original Message -
 From: Mufaddal Khumri [EMAIL PROTECTED]
 To: Tomcat Users List [EMAIL PROTECTED]
 Sent: Thursday, March 06, 2003 5:41 AM
 Subject: Re: A question regarding accessing parameters after the  ?  in a
 URL
 
 
  When I do a getParameterNames() . i get the id back ... but not
  the path  is my parameter seperator not correct ? i am using a
  ,  (comma) to seperate two parameters.
 
 
  On Thursday, March 6, 2003, at 04:55  PM, Mufaddal Khumri wrote:
 
   Hi,
  
   Sometimes when a user clicks on a link on one page it becomes
   necessary to send parameters to the next page
  
   lets say i have a href='MyFavourite.JSP'?id
   =2,path=/myproject/mydirectory/MyOtherJSP My Favourite JSP/a
  
   when i will click on the above link it will get transformed into :
  
   http://localhost:8080/myproject/MyJsp.jsp?id=2,path=/myproject/
   mydirectory/MyOtherJSP
  
   Within MyFavouriteJSP if i want to access the query string .. i can
   get it using
   String queryString = request.getQueryString();
  
   Now i can parse the queryString and get the individual values for id
   and path .. ie. 2 and /myproject/mydirectory/MyOtherJSP
  
   is there a method which would return the values if i specify the name
   of the parameter to them ?
  
   like someobject.getParameter(id) would give me 2  would
   request.getParameter(id) do it ? or is there some other method ?
  
   Thanks.
  
  
   -
   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]
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
-- 
p niemandt [EMAIL PROTECTED]


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



Re: is there a tag or some kind of mechanism that would do thefollowing ...

2003-02-25 Thread p niemandt
Nope: More a continuation of this one.

Basic programming principles / for principles, see laziness ;-)

Anyways: What I did was to write a few small static functions, 
some just to write some headers, some more complicated (writing IE, Moz
applet headers type of thing).

my functions usually followed the following syntax

public static void writeHeader(PrintWriter pw, String title) {
pw.write(head);
pw.write(title);
pw.write(title);
pw.write(/title);
pw.write(head);
}

etc, etc, ... ad infinitum.


I also have some overloaded functions, type of 

public static void writeHeader(PrintWriter pw, String title, int
headerLevel) {

}


The basic idea stays the same: write some static functions, do the
processing there. You could, for example, build a hierarchy for a
customized look and feel. { Which, I know, can be done better using
other techniques, but when the only tool you have is a hammer, all
problems resemble a nail ... }

{Of course, the more you use and extend it, the closer you'll get to
basically using something like struts.}

{Of course, a plain simple function like getQuotedString(String sz) {
return \ + sz + \ 
}

tends to be used all over the place.

---

At least from a develop perspective, this could make your servlet a lot
easier. You can then do stuff like 


void doPost(HttpServletRequest req, HttpServletResponse resp) {
PrintWriter pw = req.getWriter();

MyLook.writeHeader(pw, Request Header);
MyLook.writeTableHeader(pw, Request Table);

MyLook.writeTableRow(pw, Request Table, LookFeel.RowOpen);
for () {
MyLook.writeTableCell(pw, Request Table);
}
MyLook.writeTableRow(pw, Request Table, LookFeel.RowOpen);
pw.flush();
}

Anyways: Just an idea: But, it's usually better to separate the two, use
some scripting language to do your presentation layer, using something
like jsp, xslt, javascript, whatever, while your logic is contained in
the servlet. Do a google on Model View Controller.


hth,
Paul


On Tue, 2003-02-25 at 09:18, Mufaddal Khumri wrote:
 I could use a giant String being returned from some static method .. 
 but the problem is that i would have to do the following:
 
 static String getString()
 {
   String str = html
   +title
   +ding dong bells
   +/title
   +body/body/html;
   
   return str;
 }
 
 In the above code i will have to type in the quotes and + signs 
 everywhere since if the string gets too long it will all be on one line 
 and the html code from a developer stand point would not be 
 maintainable.
 
 Are there any other better ideas to do this ?
 
 Mufaddal.
 On Tuesday, February 25, 2003, at 01:57  PM, Mufaddal Khumri wrote:
 
  Hi,
 
  Many times we come across a lot of out.println( ... ) statements in 
  our servlets:
 
  public class MyServlet extends 
  {
  
  
 
  doPost( ... )
  {
  .
  .
  out.println(html);
  out.println(title);
  out.println(ding dong bells);
  out.println(/title);
  out.println(body);
  out.println(/body);
  out.println(/html);
  ..
  }
  }
 
  I do know that if your code has more html .. its better to write a 
  .jsp file instead of a servlet.java file
  There are some cases where this is unavoidable and I was wondering if 
  there was a way to do something like below in a .java file:
 
  public class MyServlet extends 
  {
  
  
 
  doPost( ... )
  {
  .
  .
 
  Some kind of tag that signals to the compiler that whatever follows 
  is to be out.println(... ) 
  
  html
  title
  ding dong bells
  /title
  body
  /body
  /html
  
  /end of the signalling tag
  ..
  }
  }
 
 
  -
  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]
-- 
p niemandt [EMAIL PROTECTED]


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



Re: Tomcat Performance Measuring

2003-02-12 Thread p niemandt
There is some stuff on filters for doing this on the web: do a google,
but the basic idea is you write a filter that filters the request, get
the current time, dispatches the request, filter the response, work out
the difference, and return to the browser ... 

hth,
paul

On Thu, 2003-02-13 at 04:39, Garrett Dangerfield wrote:
 I've looked through the documentation I could find, and I looked through 
 the source for AccessLogValve and I didn't see the option for what I'm 
 looking for.
 
 I'm looking for getting a measurement of page duration (the time, 
 preferrably in milliseconds, between when the server originally receives 
 the first byte of a request and the time it sends the last byte of the 
 response).
 
 What I'm trying to do is monitor the server load/response time back to 
 the users, particularly by time of day.
 
 I've seen lots of test clients that do this, but I want to monitor my 
 actual production system to see how it's doing.
 
 Thank you,
 Garrett.
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
-- 
p niemandt [EMAIL PROTECTED]


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




Re: find out why the loading of the driver fails

2003-01-26 Thread p niemandt
1. I would put the db driver jar under $TOMCAT/common/lib
This directory is shared by all your web applications: any libraries
under this directory should be visible to your app.

2. Set your debug to 100: There are a few places you can / should do
this (for developing / debugging): Basically, any place you see a debug
parameter / attribute: Make it 100: You should get a lot of debugging
information, including which jar files have been picked up and deployed.

hth


On Sun, 2003-01-26 at 10:25, joe udder wrote:
 Hello.
 
 Does anyone have any good hints on how to tweak tomcat to output more 
 information about errors?
 
 When I am trying to load a JDBC-driver it fails, but it doesn't give me a 
 clue on why it fails.
 
 
 I checked the web for similar errors, so I started by adding the .JAR-file 
 to the classpath, and put a copy of it in WEB-INF/lib.
 I also doublechecked that the dbengine is up and running, and that the 
 user/password/ip is OK.
 
 Finally I set the debug-attribute in the Server-tag to 1, but it didn't 
 give me any more information. :-/
 
 
 The error I got is:
 ---
 org.apache.jasper.JasperException:
 SQLException: Cannot load JDBC driver class 'org.postgresql.Driver'
 at 
 org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:248)
 at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
 at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 ...
 ---
 
 
 Any ideas are welcome.
 
 TIA
 
 // ju
 
 
 
 _
 Help STOP SPAM with the new MSN 8 and get 2 months FREE*  
 http://join.msn.com/?page=features/junkmail
 
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]
-- 
p niemandt [EMAIL PROTECTED]


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




Re: tomcat not starting after reboot or from cron

2003-01-22 Thread p niemandt
I suspect it has something to do with your environmental variables:
Quite likely the java_home  catalina_home has not been set at the time
the script executes. When doing it from the console, as you are already
logged on, it will work fine. You could try to export the variables just
before running startup, see if that makes a difference.

Sadly this is about the extend of my guess ... :-)

On Wed, 2003-01-22 at 17:13, Lott, Carey wrote:
 Has anybody had a problem with tomcat (4.0.4) starting after a reboot?  Or
 problems starting it from the root crontab?  
 I have no problems at all starting tomcat manually.  Everything works fine
 that way.  
 To automate the startup after a reboot, I am using init.d with the startup
 script in rc3.d.  However, nothing is happening.  I'm not even receiving any
 errors in the logs.  But I can immediately start it manually with out a
 problem.  
 Also I can't stop and start tomcat from a crontab.  I set up a stop and
 start script and placed them in the root crontab, but the time comes to stop
 tomcat and nothing happens then the startup script should be initiated a
 minute later but it is a mute point since tomcat didn't stop, but nothing
 shows up in the logs either way. 
 Is there a parameter or something that I am missing for this to work?
 
 I am running Tomcat 4.0.4 (as a standalone server using port 8880) on
 Solaris 2.7.  Apache 1.3.9 is running on the server as well using port 80.
 
 Thanks in advance for the help.
 
 - Carey - 
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]
-- 
p niemandt [EMAIL PROTECTED]


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




Re: ERROR IN TOMCAT 4.18 + APACHE 2.0.43 + JK2 CONNECTOR

2003-01-08 Thread p niemandt
Rather send your message as plain text: Copy and paste if you are using
word. I only run linux and do not open word documents: A suspect a lot
of other people as well. 

On Wed, 2003-01-08 at 14:59, [EMAIL PROTECTED] wrote:
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]
-- 
p niemandt [EMAIL PROTECTED]


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




Re: Java - MTS - Oracle... Good friends??

2003-01-07 Thread p niemandt
just my 2c:

1. rather try the newest jdk: 1.4.1
2. make sure that you use the newest oracle drivers: ojdbc14.jar


On Tue, 2003-01-07 at 16:50, Andoni wrote:
 Has anyone had problems with connection pooling and MTS when connecting to
 Oracle 9i?
 
 What are the pitfalls?  I am using Tomcat 4.0.4, Java 1.3 and I have been
 having a lot of problems which I have only just traced back to these.
 
 Andoni.
 
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]
-- 
p niemandt [EMAIL PROTECTED]


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




RE: HP-UX 10.20 + Oracle

2003-01-07 Thread p niemandt
As far as I know you should use ojdbc14.jar for Oracle9: Though previous
ones should work, the ojdbc14.jar is recommended / needed for Oracle9.

{The classnames are different between classes12.jar and the new
ojdbc14.jar}



On Tue, 2003-01-07 at 17:57, Wagoner, Mark wrote:
 I think classes12.jar is for JDK 1.2.  You want classes111.jar (if you can
 find it).
 
 -Original Message-
 From: John Clark [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, January 07, 2003 12:54 PM
 To: 'Tomcat Users List'
 Subject: HP-UX 10.20 + Oracle
 
 
 Hi there,
 
 The story so far: I have an intranet application that currently runs on a
 Linux server (with Oracle 9i - built-in Apache) and W2000 server (with
 Tomcat 4.x connecting to Oracle 8). It is written in JSP and Java, and works
 fine.
 
 I now want to use HP-UX 10.20 as a server, so I got the only available JDK
 from HP which is version 1.1.8 and this has forced me to use Tomcat 3.3.1.
 This is all running now (thanks for the help) and I am now testing the
 application.
 
 I have put in the Oracle classes12.jar and DriverManager.registerDriver
 seems fine, but DriverManager.getConnection gives the following error (only
 partial list):
 
 java.lang.ClassNotFoundException: java.util.Map
  at org.apache.tomcat.util.compat.SimpleClassLoader.loadClass(Compiled Code)
  at java.lang.ClassLoader.loadClassInternal(Compiled Code)
  at
 oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:358)
  at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:260)
  at java.sql.DriverManager.getConnection(DriverManager.java:83)
  at java.sql.DriverManager.getConnection(DriverManager.java:126)
  at estimating._final.loginvalidate_1._jspService(loginvalidate_1.java:123)
 
 Anyone got any ideas?
 
 Many thanks as usual.
 
 John
 
 
 
 --
 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]
-- 
p niemandt [EMAIL PROTECTED]


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




Re: Configuration help: requested resource not available??

2002-12-19 Thread p niemandt
Try changing your appBase back to webapps, and your docBase just animo.

Tomcat uses the webapps directory as the root for all it's web
applications. Specifying animo as the docBase implies webapps/animo.

You should not need to specify the full path in either.

Host name=animolocal.andoni.eurokom.ie appBase=webapps
unpackWARs=true
Context path= docBase=animo crossContext=false debug=0 reloadable=false/
/Host

You can also set the debugging to 100 to find out what's going on.

hth

On Thu, 2002-12-19 at 10:31, Andoni wrote:
 Hello:
 
 this is my server.xml
 
Host name=animolocal.andoni.eurokom.ie appBase=webapps/animo
 unpackWARs=true
 Context path= docBase=c:/tomcat40/webapps/animo
 crossContext=false debug=0 reloadable=false/
/Host
 
 
 Then I go to my URL andonilocal.andoni.eurokom.ie and I get a Tomcat screen
 (so it sees tomcat) saying
 
 type Status report
 
 message /index.jsp
 
 description The requested resource (/index.jsp) is not available.
 
 
 
 but the .war file has been expanded and the index.jsp is in the
 c:\tomcat40\webapps\animo folder.
 
 Please help.
 
 
 
 Andoni.
 
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]
-- 
p niemandt [EMAIL PROTECTED]


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




RE: Newbie Problems

2002-11-25 Thread p niemandt
Just going to take a stab at it, but it looks like you are trying to
combine the apache configuration and the tomcat configuration into one
file.

basic xml dictates ...

1. Comments are the same as html comments, meaning !-- -- and not #
2. Attributes are followed by an = sign and quotes, IfModule
mod_webapp.c does not make sense for XML. {In apache it does!!} 

So, in your apache.conf file it would be {like you have it}

IfModule ... 


/IfModule

But this will NOT work in the tomcat server.xml or web.xml.

Hope this helps.

On Mon, 2002-11-25 at 18:45, Bob Tilley wrote:
 The FreeBSD box is on an intranet in our office that does not link to the
 outside world, but I'll try to communicate the errors:
 
   PARSE error at line 55, column 23 of ... server.xml
   org.xml.sax.SAXParseException:  Attribute name IfModule must be followed 
   by the '=' character.
 
 Then more errors cascade from the one above.  Here is the relevant line from
 the server.xml file:
 
   # Tomcat 4 Webapp Warp
   IfModule mod_webapp.c
   ...
   /IfModule
 
 Any ideas?
 
 -Original Message-
 From: Andoni [mailto:[EMAIL PROTECTED]]
 Sent: Monday, November 25, 2002 1:18 PM
 To: Tomcat Users List
 Subject: Re: Newbie Problems
 
 
 What do the error messages say?
 
 I.e.: can you paste them into a message (and maybe your server.xml also)
 then we could tell you what each one means.
 
 Andoni.
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]
-- 
p niemandt [EMAIL PROTECTED]


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




Re: What the problem about tomcat 4.1 or IE? in my computer?

2002-11-23 Thread p niemandt
Uninstall win2k, install linux, see if your problem persists ... :)

naah; seriously: check the logs: see if there is anything funny. Which
JDK are you using? Maybe try reinstalling that, see if that helps. 



On Sat, 2002-11-23 at 15:41, james wrote:
 Hi, 
 
 I used Tomcat 4.1 for 2 weeks, and I practiced some samples, it was fine,  but 
today, it didn't work well anymore.
 
 I uninstalled it and installer it again and again, the Tomcat Server looks OK, for 
the info on screen was the same as before.
 but when I tried : http://localhost:8080/hello/index.jsp
 or any tested sites I used before. All will take a long long time!! even after I 
reboot the computer. It was much fast before. 
 
 The OS is Window 2000, and RAM is enough (327M), I checked and I only run 2 or 3  
IEs, nothing else.
 What might be the problem? 
 
 Any help will be appreciated.
 
 James
-- 
p niemandt [EMAIL PROTECTED]


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




Re: Newbie - configuring webapps with multiple servlets

2002-11-23 Thread p niemandt
It's not tomcat you are misunderstanding, it's xml ... ;) 

look at the error ... basically it states that servlet* definitions
needs to be defined before your servlet-mapping* definitions, so in your
case it would be ...

 servlet
 servlet-nameC2/servlet-name
 servlet-classC2/servlet-class
  /servlet
servlet
   servlet-nameC3/servlet-name
servlet-classC3/servlet-class
/servlet
servlet-mapping
servlet-nameC3/servlet-name
url-pattern/helper/url-pattern
/servlet-mapping
 servlet-mapping
servlet-nameC2/servlet-name
url-pattern/controller/url-pattern
/servlet-mapping




On Sat, 2002-11-23 at 16:07, [EMAIL PROTECTED] wrote:
 Hi Everyone,
 
 I  believe I do not understand how to configure a servlet in the  
 webapp's  web.xml hence need a hand conceptually.  I get the following  
 error when I added an additional servlet to my webapp:
 
 
 org.xml.sax.SAXParseException: The content of element type web-app  
 must match  
 (icon?,display-name?,description?,distributable?,context- 
 param*,filter*,filter-mapping*,listener*,servlet*,servlet- 
 mapping*,session-config?,mime-mapping*,welcome-file-list?,error- 
 page*,taglib*,resource-env-ref*,resource-ref*,security- 
 constraint*,login-config?,security-role*,env-entry*,ejb-ref*,ejb-local- 
 ref*).
  at  
 org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Error 
 HandlerWrapper.java:232)
 
 
 Here's a snipplet of the webapp's web.xml:
 
 ?xml version=1.0 encoding=ISO-8859-1?
 
 !DOCTYPE web-app
  PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN
  http://java.sun.com/dtd/web-app_2_3.dtd;
 
 web-app
 
  display-nameTomcat Examples/display-name
  description
Tomcat Example servlets and JSP pages.
  /description
 
  servlet
  servlet-nameC2/servlet-name
  servlet-classC2/servlet-class
  /servlet
 
  servlet-mapping
  servlet-nameC2/servlet-name
  url-pattern/controller/url-pattern
  /servlet-mapping
 
  servlet
  servlet-nameC3/servlet-name
  servlet-classC3/servlet-class
  /servlet
 
  servlet-mapping
  servlet-nameC3/servlet-name
  url-pattern/helper/url-pattern
  /servlet-mapping
 
 
 
 
 
 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]
-- 
p niemandt [EMAIL PROTECTED]


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




Re: errors pages in tomcat 4.1.12

2002-11-23 Thread p niemandt
I have not done this myself yet, but as far as I know it should be
defined like the welcome files are defined in your application web.xml

There should be documents on this: scan the web. 

hth

On Sat, 2002-11-23 at 23:07, Dionisio Ruiz de Zarate wrote:
 Hello i want to make my own error pages for the common errorsa (500, 550,
 404, 413 ...)
 how and where can i configure in tomcat this?
 thanks
 
 
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]
-- 
p niemandt [EMAIL PROTECTED]


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




Re: apache DSO installation

2002-11-22 Thread p niemandt
have a look at the apache toolbox, www.apachetoolbox.com

hth

On Fri, 2002-11-22 at 20:29, [EMAIL PROTECTED] wrote:
 Hi,
 
  I have problem in installing apache on my Origin 2000 (ver 6.5.16m).
  The following errors thrown while doing 'make'
   
  _
  I tried both these options:
 % ./configure --prefix=/usr/apache --enable-module=most -enable-shared=max 
  or
 % ./configure --prefix=/usr/apache --enable-shared=max --enable-rule=SHARED_CORE... 
  ...
  % make
  === src/modules
  === src/modules/standard
 gcc -c -I../../os/unix -I../../include -DIRIX -DUSE_HSREGEX -DUSE_EXPAT 
  -I../../lib/expat-lite `../../apaci` mod_so.c 
  rm -f libstandard.a
  ar cr libstandard.a mod_so.o
  true libstandard.a
 gcc -c -I../../os/unix -I../../include -DIRIX -DUSE_HSREGEX -DUSE_EXPAT 
 -I../../lib/expat-lite `../../apaci` -fpic -DSHARED_MODULE mod_cgi.c  
  mv mod_cgi.o mod_cgi.lo 
  ld -shared -o mod_cgi.so mod_cgi.lo
  ld32: FATAL 12: Expecting n32 objects: mod_cgi.lo is o32.
  ___
   
 This ld32 message is occuring for almost all the modules in apache, but 
  I could 
  compile it out of box for apache static installation.
   
 Can anyone help me as how to solve this problem of 'ld32: FATAL 12: Expecting 
  n32 objects: mod_cgi.lo is o32.' 
   
  The apache version I am using is apache_1.3.27. and gcc version is
   gcc - GNU project C and Ada95 Compiler (v2.8.1)
 
  thanks, 
  Ranjit.
  =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  Ranjit Kumar Gundu
  Center for DNA Finger Printing and Diagnostics (CDFD)
  Nacharam, Hyderabad - 500076
  I N D I A
  Other email:[EMAIL PROTECTED]
  Hello:+91-40-7151344 Ext1207
  FAX: +91-40-7155479
  =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  Have fun... :)
 -
 
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]
-- 
p niemandt [EMAIL PROTECTED]


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




Re: Prblm: Tomcat doesn't start on boot, JAVA_HOME not defined.Manually works fine.

2002-11-22 Thread p niemandt
Set your JAVA_HOME in /etc/profile and not profile.local 

profile.local will probably only be executed when a user logs in, as
it's local to whatever user is logging in.

On Fri, 2002-11-22 at 21:26, Ola Theander wrote:
 Dear subscribers.
 
 I have a problem that my Tomcat 4.0.4 installation doesn't start on
 boot. In the boot.msg file I get a record stating that the JAVA_HOME
 environment variable is not defined and therefore Tomcat can't start.
 The strange thing is that the JAVA_HOME is defined in the profile.local
 file. If I log on directly after the boot and run the tomcat startup
 script from /etc/rc.d manually the Tomcat server starts as expected.
 Therefore I suspect that the problem is either that profile.local is
 evaluated after the Tomcat startup script when booting or the
 profile.local environment variables aren't available during boot for
 some reason.
 
 Any help on this matter would be greatly appreciated.
 
 Kind regards, Ola Theander
 
 
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]
-- 
p niemandt [EMAIL PROTECTED]


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




RE: SSL keystore problem

2002-11-20 Thread p niemandt
Don't know if this is of help, but on linux the keystore will be stored
under the username in a file called .keystore {. means it's hidden }

So, if you log in as root, or have generated the key as root, the
keystore will be under /root/.keystore

hth


On Wed, 2002-11-20 at 13:03, brana02 wrote:
 Do you know how to specify a different location?
 Sorry to bother u so much but im just a student trying to teach all this stuff to 
myself.  
 
   -Original Message- 
   From: Roberts, Eric [mailto:[EMAIL PROTECTED]] 
   Sent: Wed 11/20/2002 8:00 AM 
   To: Tomcat Users List 
   Cc: 
   Subject: RE: SSL keystore problem
   
   
 
   By default the keystore is created in the home directory of the user that 
creates it.
   If SSL Connector is called, it looks in the home directory for the keystore.
   
   -Original Message-
   From: brana02 [mailto:[EMAIL PROTECTED]]
   Sent: Mittwoch, 20. November 2002 13:58
   To: Tomcat Users List
   Subject: RE: SSL keystore problem
   
   
   Also I would like to know where that path information to the  keystore is 
being stored-- is there some hidden system file or properties file that the 
SSLServerFactory reads from in order to attempt to initKeyStore()?
   
   -Original Message-
   From: Roberts, Eric [mailto:[EMAIL PROTECTED]]
   Sent: Wed 11/20/2002 7:53 AM
   To: Tomcat Users List
   Cc:
   Subject: RE: SSL keystore problem
  
  
   
   Have you commented out the SSL connector in server.xml?
  
   -Original Message-
   From: brana02 [mailto:[EMAIL PROTECTED]]
   Sent: Mittwoch, 20. November 2002 13:49
   To: [EMAIL PROTECTED]
   Subject: SSL keystore problem
  
  
   I had tried playing around with the SSL connector and deleted a 
keystore when i was done.  I thought Tomcat would stop trying to load it.  For some 
reason it keeps trying to find the file from the path where it previously was and 
throws a FileNotFoundException.  Where is it getting the path information from and 
how can i reset it to the default.
  
   
   
-- 
p niemandt [EMAIL PROTECTED]


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




RE: SSL keystore problem

2002-11-20 Thread p niemandt
I have a similar problem, but mine is related to Apache. It seems that
Tomcat is picking up the Apache certificate and not the Tomcat
certificate. I haven't found a solution yet, but what seems to help is
to use the keytool to delete the key ...

something in the line of 

keytool -list
lists certs on your pc

pw should be changeit or something, 

then 

keytool -delete -alias tomcat

should delete the cert aliased under tomcat.


On Wed, 2002-11-20 at 13:17, brana02 wrote:
 i completely deleted it the .keystore file in my home directory and made a new one 
with a different name, however its still searching for the .keystore file = so does 
it need to be named .keystore??
 
   -Original Message- 
   From: p niemandt [mailto:[EMAIL PROTECTED]] 
   Sent: Wed 11/20/2002 8:25 AM 
   To: Tomcat Users List 
   Cc: 
   Subject: RE: SSL keystore problem
   
   
 
   Don't know if this is of help, but on linux the keystore will be stored
   under the username in a file called .keystore {. means it's hidden }
   
   So, if you log in as root, or have generated the key as root, the
   keystore will be under /root/.keystore
   
   hth
   
   
   On Wed, 2002-11-20 at 13:03, brana02 wrote:
Do you know how to specify a different location?
Sorry to bother u so much but im just a student trying to teach all this 
stuff to myself. 
   
  -Original Message-
  From: Roberts, Eric [mailto:[EMAIL PROTECTED]]
  Sent: Wed 11/20/2002 8:00 AM
  To: Tomcat Users List
  Cc:
  Subject: RE: SSL keystore problem
 
 
   
  By default the keystore is created in the home directory of the user 
that creates it.
  If SSL Connector is called, it looks in the home directory for the 
keystore.
 
  -Original Message-
  From: brana02 [mailto:[EMAIL PROTECTED]]
  Sent: Mittwoch, 20. November 2002 13:58
  To: Tomcat Users List
  Subject: RE: SSL keystore problem
 
 
  Also I would like to know where that path information to the  keystore 
is being stored-- is there some hidden system file or properties file that the 
SSLServerFactory reads from in order to attempt to initKeyStore()?
 
  -Original Message-
  From: Roberts, Eric [mailto:[EMAIL PROTECTED]]
  Sent: Wed 11/20/2002 7:53 AM
  To: Tomcat Users List
  Cc:
  Subject: RE: SSL keystore problem


 
  Have you commented out the SSL connector in server.xml?

  -Original Message-
  From: brana02 [mailto:[EMAIL PROTECTED]]
  Sent: Mittwoch, 20. November 2002 13:49
  To: [EMAIL PROTECTED]
  Subject: SSL keystore problem


  I had tried playing around with the SSL connector and deleted 
a keystore when i was done.  I thought Tomcat would stop trying to load it.  For some 
reason it keeps trying to find the file from the path where it previously was and 
throws a FileNotFoundException.  Where is it getting the path information from and 
how can i reset it to the default.

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


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




RE: Tomcat 4 StandAlone Web Server, Static HTML and Images

2002-11-19 Thread p niemandt
Thanks Jeff, Steve: Giving me a lot of ideas: Sadly I'm still running
full speed into mud ...

I have changed the image directory to reside under my WEB-INF folder, do
I need to configure this in one of the xml files as well? ie.
application web.xml, or server.xml or something?

I have written a filter that does authentication: It serves the
index.shtml file, but for some reason I have to specify it as
WEB-INF\index.shtml to make it work ...

snip ---

if (!validated) {   
// Create the RequestDispatcher
 
Globals.utility.Log(className, 
doFilter:,
Forwarding to  + getHtmlResult, 5);   
RequestDispatcher rd = config.getServletContext().
getRequestDispatcher( getHtmlResult );
rd.forward( req, res );
return ;
}

--- snip 

where getHtmlResult is a string I read from a xml file. To make it work
I need to specify WEB-INF\index.shtml in my xml file. 

This then serves the html, but none of my stylesheets or images are
displayed ... 

snip ---

  link rel=stylesheet type=text/css href=style.css
img src=images/logo.gif alt=Home width=142 height=60 border=0
hspace=0 vspace=0

--- snip


On Mon, 2002-11-18 at 15:58, Steve Beech wrote:
 Jeff's right. You're web app is in the folder /servlet so your images should
 be in /servlet/images - of course I'm assuming you've got images on the
 index.shtml page and these are the ones you can't see.
 You only need the one web.xml file (in the WEB-INF folder for your web-app)
 - a second under images is not required.
 
 STeve
 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
 Sent: 18 November 2002 15:33
 To: Tomcat Users List
 Subject: Re: Tomcat 4 StandAlone Web Server, Static HTML and Images
 
 
 Looks like you're basically putting your images in its own web app.  You 
 may need a WEB-INF directory and trivial web.xml file under the images 
 directory in order for Tomcat to like it as a web app (not sure though). 
 Then, I think your url for the image would be /images/image.gif.
 
 Alternatively, you could move your images directory to be within your 
 servlet web app.  Then, your url (from index.shtml) would be 
 images/image.gif.
 
 HTH,
 -Jeff
  
 
 
 
 
 p niemandt [EMAIL PROTECTED]
 11/18/02 09:35 AM
 Please respond to Tomcat Users List
 
  
 To: Tomcat Users List [EMAIL PROTECTED]
 cc: 
 Subject:Tomcat 4 StandAlone Web Server, Static HTML and
 Images
 
 
 Hi Group: Please help ...
 
 I'm very new to servlets, though I do have a lot of programming
 experience. My problem is that I can't seem to get images displayed
 properly using Tomcat as the web server. 
 
 I have a very simple layout ...
 
 webapps
 /servlet
  index.shtml
  /WEB-INF- My servlets and web.xml
 /images
  contains my images
 
 I manage to serve the index.shtml quite easily, my problem is that I
 can't get the images displayed without specifying the whole url in the
 form file:///dir/to/images/image.gif, and I think this is wrong. 
 
 There is a lot of information regarding how to configure a web server to
 display the images, and this I can do fine, but I would like to only run
 Tomcat: My site is very small, and the latency in Tomcat would not
 effect it. My question is in how to specify the url for the image in the
 html,
 
 I have tried image.gif, /servlet/image.gif, ../image/image.gif,
 /servlet/../image/image.gif, etc, etc.
 
 Now I suspect I'm missing something very stupid, but sadly I have no
 idea what. I do not want to code the image display, as far as I know,
 Tomcat should be able to handle such a simple html site. 
 
 My servlets work well, database connectivity and all, and the site works
 well if I use apache as well, but how to do this without Apache is
 currently beyond me.
 
 Any information or just hints in the correct direction would be greatly
 appreciated. 
-- 
p niemandt [EMAIL PROTECTED]


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




Re: Tomcat 4 StandAlone Web Server, Static HTML and Images

2002-11-19 Thread p niemandt
Hi: This is getting closer, but somewhere I'm still doing something
extremely stupid, I think ...

Without the ../ in my url, if I check the logs, I get a 302, Moved kinda
thing, but with the ../ I get a 200 ok. The problem is that I still
can't see the image.

Can the problem be that the file served is called index.shtml, and is
not a jsp page? 

I have tried to both include the request and to forward the request,
with the same results.

TIA,


On Tue, 2002-11-19 at 13:12, Georg Hanwalter wrote:
 Hi,
 
 the problem with relative URL's when using the forward-method of a
 request-dispatcher is that the URL's have to be relative to the server-root and
 not to the destination page's actual location
 e.g. under weapps you have a images-, a JSP and the WEB-INF-directory where your
 servlet resides. Now when your servlet forwards to a JSP-page via a
 request-dispatcher an the JSP-page contains an image you have to use the URL:
 
  ../images/image-used-in-the-page
 
 Georg
 
 p niemandt schrieb:
 
  Thanks Jeff, Steve: Giving me a lot of ideas: Sadly I'm still running
  full speed into mud ...
 
  I have changed the image directory to reside under my WEB-INF folder, do
  I need to configure this in one of the xml files as well? ie.
  application web.xml, or server.xml or something?
 
  I have written a filter that does authentication: It serves the
  index.shtml file, but for some reason I have to specify it as
  WEB-INF\index.shtml to make it work ...
 
  snip ---
 
  if (!validated) {
  // Create the RequestDispatcher
  Globals.utility.Log(className,
  doFilter:,
  Forwarding to  + getHtmlResult, 5);
  RequestDispatcher rd = config.getServletContext().
  getRequestDispatcher( getHtmlResult );
  rd.forward( req, res );
  return ;
  }
 
  --- snip
 
  where getHtmlResult is a string I read from a xml file. To make it work
  I need to specify WEB-INF\index.shtml in my xml file.
 
  This then serves the html, but none of my stylesheets or images are
  displayed ...
 
  snip ---
 
link rel=stylesheet type=text/css href=style.css
  img src=images/logo.gif alt=Home width=142 height=60 border=0
  hspace=0 vspace=0
 
  --- snip
 
  On Mon, 2002-11-18 at 15:58, Steve Beech wrote:
   Jeff's right. You're web app is in the folder /servlet so your images should
   be in /servlet/images - of course I'm assuming you've got images on the
   index.shtml page and these are the ones you can't see.
   You only need the one web.xml file (in the WEB-INF folder for your web-app)
   - a second under images is not required.
  
   STeve
   -Original Message-
   From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
   Sent: 18 November 2002 15:33
   To: Tomcat Users List
   Subject: Re: Tomcat 4 StandAlone Web Server, Static HTML and Images
  
  
   Looks like you're basically putting your images in its own web app.  You
   may need a WEB-INF directory and trivial web.xml file under the images
   directory in order for Tomcat to like it as a web app (not sure though).
   Then, I think your url for the image would be /images/image.gif.
  
   Alternatively, you could move your images directory to be within your
   servlet web app.  Then, your url (from index.shtml) would be
   images/image.gif.
  
   HTH,
   -Jeff
  
  
  
  
  
   p niemandt [EMAIL PROTECTED]
   11/18/02 09:35 AM
   Please respond to Tomcat Users List
  
  
   To: Tomcat Users List [EMAIL PROTECTED]
   cc:
   Subject:Tomcat 4 StandAlone Web Server, Static HTML and
   Images
  
  
   Hi Group: Please help ...
  
   I'm very new to servlets, though I do have a lot of programming
   experience. My problem is that I can't seem to get images displayed
   properly using Tomcat as the web server.
  
   I have a very simple layout ...
  
   webapps
   /servlet
index.shtml
/WEB-INF- My servlets and web.xml
   /images
contains my images
  
   I manage to serve the index.shtml quite easily, my problem is that I
   can't get the images displayed without specifying the whole url in the
   form file:///dir/to/images/image.gif, and I think this is wrong.
  
   There is a lot of information regarding how to configure a web server to
   display the images, and this I can do fine, but I would like to only run
   Tomcat: My site is very small, and the latency in Tomcat would not
   effect it. My question is in how to specify the url for the image in the
   html,
  
   I have tried image.gif, /servlet/image.gif, ../image/image.gif,
   /servlet/../image/image.gif, etc, etc.
  
   Now I suspect I'm missing something very stupid, but sadly I have no
   idea what. I do not want to code the image display, as far as I know,
   Tomcat should be able to handle such a simple html site.
  
   My servlets work well

Re: Tomcat 4 StandAlone Web Server, Static HTML and Images

2002-11-19 Thread p niemandt
Yeah: I'm trying to use tomcat as a standalone web server: I managed to
do this fine using apache to host the images: but we don't want to run
both Apache and Tomcat for our web app. { The app is not complex enough
to warrant the extra overhead }

On Tue, 2002-11-19 at 14:46, Georg Hanwalter wrote:
 Do you use tomcat as standalone serving also all static files or do you use tomcat
 together with a webserver like apache or iis. In this take care that your webserver
 knows your webapp-directory for serving the static-files like your images
 
 Georg
 
 p niemandt schrieb:
 
  Hi: This is getting closer, but somewhere I'm still doing something
  extremely stupid, I think ...
 
  Without the ../ in my url, if I check the logs, I get a 302, Moved kinda
  thing, but with the ../ I get a 200 ok. The problem is that I still
  can't see the image.
 
  Can the problem be that the file served is called index.shtml, and is
  not a jsp page?
 
  I have tried to both include the request and to forward the request,
  with the same results.
 
  TIA,
 
  On Tue, 2002-11-19 at 13:12, Georg Hanwalter wrote:
   Hi,
  
   the problem with relative URL's when using the forward-method of a
   request-dispatcher is that the URL's have to be relative to the server-root and
   not to the destination page's actual location
   e.g. under weapps you have a images-, a JSP and the WEB-INF-directory where your
   servlet resides. Now when your servlet forwards to a JSP-page via a
   request-dispatcher an the JSP-page contains an image you have to use the URL:
  
../images/image-used-in-the-page
  
   Georg
  
   p niemandt schrieb:
  
Thanks Jeff, Steve: Giving me a lot of ideas: Sadly I'm still running
full speed into mud ...
   
I have changed the image directory to reside under my WEB-INF folder, do
I need to configure this in one of the xml files as well? ie.
application web.xml, or server.xml or something?
   
I have written a filter that does authentication: It serves the
index.shtml file, but for some reason I have to specify it as
WEB-INF\index.shtml to make it work ...
   
snip ---
   
if (!validated) {
// Create the RequestDispatcher
Globals.utility.Log(className,
doFilter:,
Forwarding to  + getHtmlResult, 5);
RequestDispatcher rd = config.getServletContext().
getRequestDispatcher( getHtmlResult );
rd.forward( req, res );
return ;
}
   
--- snip
   
where getHtmlResult is a string I read from a xml file. To make it work
I need to specify WEB-INF\index.shtml in my xml file.
   
This then serves the html, but none of my stylesheets or images are
displayed ...
   
snip ---
   
  link rel=stylesheet type=text/css href=style.css
img src=images/logo.gif alt=Home width=142 height=60 border=0
hspace=0 vspace=0
   
--- snip
   
On Mon, 2002-11-18 at 15:58, Steve Beech wrote:
 Jeff's right. You're web app is in the folder /servlet so your images should
 be in /servlet/images - of course I'm assuming you've got images on the
 index.shtml page and these are the ones you can't see.
 You only need the one web.xml file (in the WEB-INF folder for your web-app)
 - a second under images is not required.

 STeve
 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
 Sent: 18 November 2002 15:33
 To: Tomcat Users List
 Subject: Re: Tomcat 4 StandAlone Web Server, Static HTML and Images


 Looks like you're basically putting your images in its own web app.  You
 may need a WEB-INF directory and trivial web.xml file under the images
 directory in order for Tomcat to like it as a web app (not sure though).
 Then, I think your url for the image would be /images/image.gif.

 Alternatively, you could move your images directory to be within your
 servlet web app.  Then, your url (from index.shtml) would be
 images/image.gif.

 HTH,
 -Jeff





 p niemandt [EMAIL PROTECTED]
 11/18/02 09:35 AM
 Please respond to Tomcat Users List


 To: Tomcat Users List [EMAIL PROTECTED]
 cc:
 Subject:Tomcat 4 StandAlone Web Server, Static HTML and
 Images


 Hi Group: Please help ...

 I'm very new to servlets, though I do have a lot of programming
 experience. My problem is that I can't seem to get images displayed
 properly using Tomcat as the web server.

 I have a very simple layout ...

 webapps
 /servlet
  index.shtml
  /WEB-INF- My servlets and web.xml
 /images
  contains my images

 I manage to serve the index.shtml quite easily, my

SOLVED: Tomcat 4 StandAlone Web Server, Static HTML and Images

2002-11-19 Thread p niemandt
Hi Group: Thanks for all the help ...

All I can say is stupidity kills ... 

It turned out to be a simple configuration issue: Reinstalling Tomcat,
and reconfiguring it helped. It does not work if I use a ../ prefix,
but does if I just use images/xxx.gif

Regards.



On Tue, 2002-11-19 at 15:05, p niemandt wrote:
 Yeah: I'm trying to use tomcat as a standalone web server: I managed to
 do this fine using apache to host the images: but we don't want to run
 both Apache and Tomcat for our web app. { The app is not complex enough
 to warrant the extra overhead }
 
 On Tue, 2002-11-19 at 14:46, Georg Hanwalter wrote:
  Do you use tomcat as standalone serving also all static files or do you use tomcat
  together with a webserver like apache or iis. In this take care that your webserver
  knows your webapp-directory for serving the static-files like your images
  
  Georg
  
  p niemandt schrieb:
  
   Hi: This is getting closer, but somewhere I'm still doing something
   extremely stupid, I think ...
  
   Without the ../ in my url, if I check the logs, I get a 302, Moved kinda
   thing, but with the ../ I get a 200 ok. The problem is that I still
   can't see the image.
  
   Can the problem be that the file served is called index.shtml, and is
   not a jsp page?
  
   I have tried to both include the request and to forward the request,
   with the same results.
  
   TIA,
  
   On Tue, 2002-11-19 at 13:12, Georg Hanwalter wrote:
Hi,
   
the problem with relative URL's when using the forward-method of a
request-dispatcher is that the URL's have to be relative to the server-root and
not to the destination page's actual location
e.g. under weapps you have a images-, a JSP and the WEB-INF-directory where 
your
servlet resides. Now when your servlet forwards to a JSP-page via a
request-dispatcher an the JSP-page contains an image you have to use the URL:
   
 ../images/image-used-in-the-page
   
Georg
   
p niemandt schrieb:
   
 Thanks Jeff, Steve: Giving me a lot of ideas: Sadly I'm still running
 full speed into mud ...

 I have changed the image directory to reside under my WEB-INF folder, do
 I need to configure this in one of the xml files as well? ie.
 application web.xml, or server.xml or something?

 I have written a filter that does authentication: It serves the
 index.shtml file, but for some reason I have to specify it as
 WEB-INF\index.shtml to make it work ...

 snip ---

 if (!validated) {
 // Create the RequestDispatcher
 Globals.utility.Log(className,
 doFilter:,
 Forwarding to  + getHtmlResult, 5);
 RequestDispatcher rd = config.getServletContext().
 getRequestDispatcher( getHtmlResult );
 rd.forward( req, res );
 return ;
 }

 --- snip

 where getHtmlResult is a string I read from a xml file. To make it work
 I need to specify WEB-INF\index.shtml in my xml file.

 This then serves the html, but none of my stylesheets or images are
 displayed ...

 snip ---

   link rel=stylesheet type=text/css href=style.css
 img src=images/logo.gif alt=Home width=142 height=60 border=0
 hspace=0 vspace=0

 --- snip

 On Mon, 2002-11-18 at 15:58, Steve Beech wrote:
  Jeff's right. You're web app is in the folder /servlet so your images 
should
  be in /servlet/images - of course I'm assuming you've got images on the
  index.shtml page and these are the ones you can't see.
  You only need the one web.xml file (in the WEB-INF folder for your web-app)
  - a second under images is not required.
 
  STeve
  -Original Message-
  From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
  Sent: 18 November 2002 15:33
  To: Tomcat Users List
  Subject: Re: Tomcat 4 StandAlone Web Server, Static HTML and Images
 
 
  Looks like you're basically putting your images in its own web app.  You
  may need a WEB-INF directory and trivial web.xml file under the images
  directory in order for Tomcat to like it as a web app (not sure though).
  Then, I think your url for the image would be /images/image.gif.
 
  Alternatively, you could move your images directory to be within your
  servlet web app.  Then, your url (from index.shtml) would be
  images/image.gif.
 
  HTH,
  -Jeff
 
 
 
 
 
  p niemandt [EMAIL PROTECTED]
  11/18/02 09:35 AM
  Please respond to Tomcat Users List
 
 
  To: Tomcat Users List [EMAIL PROTECTED]
  cc:
  Subject:Tomcat 4 StandAlone Web Server, Static HTML and
  Images
 
 
  Hi Group: Please help ...
 
  I'm very new to servlets

Tomcat 4 StandAlone Web Server, Static HTML and Images

2002-11-18 Thread p niemandt
Hi Group: Please help ...

I'm very new to servlets, though I do have a lot of programming
experience. My problem is that I can't seem to get images displayed
properly using Tomcat as the web server. 

I have a very simple layout ...

webapps
/servlet
index.shtml
/WEB-INF- My servlets and web.xml
/images
contains my images

I manage to serve the index.shtml quite easily, my problem is that I
can't get the images displayed without specifying the whole url in the
form file:///dir/to/images/image.gif, and I think this is wrong. 

There is a lot of information regarding how to configure a web server to
display the images, and this I can do fine, but I would like to only run
Tomcat: My site is very small, and the latency in Tomcat would not
effect it. My question is in how to specify the url for the image in the
html,

I have tried image.gif, /servlet/image.gif, ../image/image.gif,
/servlet/../image/image.gif, etc, etc.

Now I suspect I'm missing something very stupid, but sadly I have no
idea what. I do not want to code the image display, as far as I know,
Tomcat should be able to handle such a simple html site. 

My servlets work well, database connectivity and all, and the site works
well if I use apache as well, but how to do this without Apache is
currently beyond me.

Any information or just hints in the correct direction would be greatly
appreciated. 


-- 
p niemandt [EMAIL PROTECTED]


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