how to fire up the tomcat server?!

2005-03-25 Thread Tamer Higazi
Hi people! 
I have installed on a Gentoo Linux System the ANT and builded from the
source (in the root directory where the build.xml file is located) the
tomcat server. Now...  what do I do now? How can I start the Tomcat
server? 

For any help to make my stupid brain smarter, thank you


Tamer Higazi


Re: how to fire up the tomcat server?!

2005-03-25 Thread Angel Cervera Claudio
catalina.sh start

Tamer Higazi wrote:

Hi people! 
I have installed on a Gentoo Linux System the ANT and builded from the
source (in the root directory where the build.xml file is located) the
tomcat server. Now...  what do I do now? How can I start the Tomcat
server? 

For any help to make my stupid brain smarter, thank you


Tamer Higazi

  



-- 
Ángel Cervera Claudio
Freelance / desarrollos j2ee
web: http://www.acervera.com
tlf: 670819234 / 916058546
email: [EMAIL PROTECTED]
msn: [EMAIL PROTECTED]
yahoo: angelcervera
aol: angelcervera
jabber: angelcervera en jabber.org


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



RE: webappclassloader

2005-03-25 Thread Richard Mixon (qwest)
Its hard to tell - you need to tell us more - e.g. what version of
Tomcat are you using.

I have gotten similar messages when I used the deployer app to undeploy
a webapp, but due to a lock on a file (i.e. a JSP file was open in a
text editor) all of the files were not deleted by the deployer app.

- Richard

FRANCOIS Dufour wrote:
 hi to all finaly working realy nice on a .org
 but i got this comming out  resource
 `/web-inf/classes/listeners/contextlistener.class`is missing?
 any idee of what it is?



 [EMAIL PROTECTED]
 administrateur http://monteregiechat.org



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


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



Re: how to fire up the tomcat server?!

2005-03-25 Thread Tamer Higazi
Thank you

It works!

On Fri, 2005-03-25 at 11:00 +0100, Angel Cervera Claudio wrote:

 catalina.sh start
 
 Tamer Higazi wrote:
 
 Hi people! 
 I have installed on a Gentoo Linux System the ANT and builded from the
 source (in the root directory where the build.xml file is located) the
 tomcat server. Now...  what do I do now? How can I start the Tomcat
 server? 
 
 For any help to make my stupid brain smarter, thank you
 
 
 Tamer Higazi
 
   
 
 
 


Problem with Tomcat Upgrade 4.0 to 5.5

2005-03-25 Thread Beau Hebert
Hello -

I am in the processs of upgrading from Tomcat 4.0 to Tomcat 5.5. I have an 
application that runs on Linux-Java-Tomcat-MySQL. Before I think about 
upgrading the production environment, I am configuring the development 
environment first, which runs on Windows XP and not Linux. I've installed 
Apache Tomcat 5.5.5 using JDK 1.4.2_06 along with the compat classes for JDK 
1.4. (BTW, I still have Tomcat 4.0.1 installed, but as a different service and 
it is not running). I've updated my CATALINA_HOME  TOMCAT_HOME variables to 
reflect the new Tomcat install (c:\tomcat5). The Tomcat homepage runs nicely 
along with the examples and the manager console. The application that I am 
trying to get up and running works flawlessly on Tomcat 4. However, when I 
build the application to the Tomcat5 directrory, and configure the new context 
and whatnot, I receive the follwing error upon browsing to the index page:

exception:
javax.servlet.ServletException: javax/mail/Message

root cause:
java.lang.NoClassDefFoundError: javax/mail/Message

I'm not sure, but it seems that the compiler (or is it the container?) can't 
find the class. My CLASSPATH is the following:

.;C:\tomcat5\common\lib\servlet-api.jar;C:\tomcat5\common\lib\jsp-api.jar;c:\jdk\bin;c:\jdk\lib\tools.jar;

There should not be a problem with the code as I am using the same jdk and the 
app runs on Tomcat4. I have the full stack trace available if necessary.

Any help or suggestions is appreciated.
Thanks,
Beau 

Pragma: No-cache being added on one server but not another

2005-03-25 Thread Jason Bainbridge
This isn't the usual problem of trying to force a browser to not cache
an object but actually the opposite, on one of our servers every
request for a particular image is coming back everytime with:

HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Pragma: No-cache
Cache-Control: no-cache
Expires: Wed, 31 Dec 1969 18:00:00 CST
ETag: W/177-104881299
Last-Modified: Fri, 28 Mar 2003 00:56:30 GMT
Content-Type: image/gif
Content-Length: 1083
Date: Fri, 25 Mar 2005 14:55:08 GMT

and on another server the first request for the same image:

HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
ETag: W/1083-104881299
Last-Modified: Fri, 28 Mar 2003 00:56:30 GMT
Content-Type: image/gif
Content-Length: 1083
Date: Fri, 25 Mar 2005 14:57:08 GMT

With subsequent requests returning the expected:

HTTP/1.1 304 Not Modified
Server: Apache-Coyote/1.1
Date: Fri, 25 Mar 2005 14:57:20 GMT

On the server with the no-cache headers being returned I have been
tasked with locking it down so I have removed all of the example
applications, the manager application and everything else we don't use
plus I am running the Windows Service under an account that started
with no permissions that I added the required permissions to by
various means like using filemon and regmon while tomcat was running.

Have I inadvertently removed or disabled something that would force
the adding of all the no-cache headers?  Where ere they coming from? 
There are three there that I believe shouldn't be there:

Pragma: No-cache
Cache-Control: no-cache
Expires: Wed, 31 Dec 1969 18:00:00 CST

Any insight would be much appreciated!

Cheers,
-- 
Jason Bainbridge
http://kde.org - [EMAIL PROTECTED]
Personal Site - http://jasonbainbridge.com

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



Re: Problem with Tomcat Upgrade 4.0 to 5.5

2005-03-25 Thread Jason Bainbridge
On Fri, 25 Mar 2005 09:08:15 -0500, Beau Hebert
[EMAIL PROTECTED] wrote:
 Hello -

 exception:
 javax.servlet.ServletException: javax/mail/Message
 
 root cause:
 java.lang.NoClassDefFoundError: javax/mail/Message
 
 I'm not sure, but it seems that the compiler (or is it the container?) can't 
 find the class. My CLASSPATH is the following:
 
 .;C:\tomcat5\common\lib\servlet-api.jar;C:\tomcat5\common\lib\jsp-api.jar;c:\jdk\bin;c:\jdk\lib\tools.jar;

Let Tomcat take care of setting the classpath don't set it yourself,
it is finding your class but more than one and getting confused as a
result.

Regards,
-- 
Jason Bainbridge
http://kde.org - [EMAIL PROTECTED]
Personal Site - http://jasonbainbridge.com

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



Re: Redirect from one SSL port to another

2005-03-25 Thread Jason Bainbridge
On Thu, 24 Mar 2005 23:54:21 -0500, Parsons Technical Services
[EMAIL PROTECTED] wrote:
 Jason,
 
 To get the port redirect to work requires a constraint on your transport for
 the requested material.
 
 See:
 http://jakarta.apache.org/tomcat/tomcat-5.5-doc/config/http.html

Thanks, but I've already set that up fine for the port 80 to 443
redirect, I was just trying to see if there was a way to do something
similar to redirect from one https port (8443) to the one on 443 but
it doesn't look like there is a way to do that easily in Tomcat.

Regards,
-- 
Jason Bainbridge
http://kde.org - [EMAIL PROTECTED]
Personal Site - http://jasonbainbridge.com

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



Tomcat 3x to 5-5.7

2005-03-25 Thread Scott Purcell
I just installed Tomcat 5-5.7 and used the installer on a PC. It installed and 
all is good. I went to the manager and poked around.
 
I need to create a new web application (it is not a war). So I have a directory 
that I am ready to drop into the /webapps directory.
 
Before I do this, I have a few questions. 
a) Can I just drop this in and restart? Or what procedure do I need here? Do I 
need to restart?
 
 
b) I need to edit the server.xml for this application and add some DBCP stuff, 
where does this live now?
 
 
c) What is the best way to start and stop this, using the interface?
 
 
d) I read that the application can live elsewhere on the disks? Was this a 
mis-read? It would be cool if I could configure my webapp to work with my CVS/
 
 
Any advice upon getting rolling would be appreciated.
 
Thanks you

Scott K Purcell | Developer | VERTIS | 
555 Washington Ave. 4th Floor | St. Louis, MO 63101 | 
314.588.0720 Ext:1320 | [EMAIL PROTECTED] | http://www.vertisinc.com 
http://www.vertisinc.com/  

Vertis is the premier provider of targeted advertising, media, and 
marketing services that drive consumers to marketers more effectively. 
 

 


Re: Problem with Tomcat Upgrade 4.0 to 5.5

2005-03-25 Thread Beau Hebert
Thanks for the response Jason. I've removed my classpath, but still getting 
the same error. Any other suggestions?

Rgds,
Beau
- Original Message - 
From: Jason Bainbridge [EMAIL PROTECTED]
To: Tomcat Users List tomcat-user@jakarta.apache.org
Sent: Friday, March 25, 2005 10:23 AM
Subject: Re: Problem with Tomcat Upgrade 4.0 to 5.5


On Fri, 25 Mar 2005 09:08:15 -0500, Beau Hebert
[EMAIL PROTECTED] wrote:
Hello -

exception:
javax.servlet.ServletException: javax/mail/Message
root cause:
java.lang.NoClassDefFoundError: javax/mail/Message
I'm not sure, but it seems that the compiler (or is it the container?) 
can't find the class. My CLASSPATH is the following:

.;C:\tomcat5\common\lib\servlet-api.jar;C:\tomcat5\common\lib\jsp-api.jar;c:\jdk\bin;c:\jdk\lib\tools.jar;
Let Tomcat take care of setting the classpath don't set it yourself,
it is finding your class but more than one and getting confused as a
result.
Regards,
--
Jason Bainbridge
http://kde.org - [EMAIL PROTECTED]
Personal Site - http://jasonbainbridge.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]


Tomcat rookie needs help updating project

2005-03-25 Thread Barry Kimelman






My system is a PC run by Windows XP.
I am running version 5.5.8 of Tomcat
I am running version 1.6.2 of Ant

I can successfully compile andinstall a new project with no problems. I can then successfully run theproject by visiting the appropriate URL in my browser.

However when I make a change to my project either by recompiling some of my Java source code or by modifying some of JSP and/or HTML files, how do I get Tomcat to "recognize" these changes ? If I run the command "ant reload" from the DOS command line, when Irerun my application I do not see my changes. What do I need to do to install project changes ?


*

Barry KimelmanToronto, Ontario, Canadaemail :[EMAIL PROTECTED] , [EMAIL PROTECTED]









Re: Pragma: No-cache being added on one server but not another

2005-03-25 Thread Jason Bainbridge
Got a little bit further to this after discovering Tomcat adds those
Headers whenever the resources are within a Security constriant, which
they are in this case to force SSL with the below:

security-constraint
web-resource-collection
   url-pattern/*/url-pattern
/web-resource-collection
user-data-constraint
   transport-guaranteeCONFIDENTIAL/transport-guarantee
/user-data-constraint
/security-constraint

Now is there anyway to disable the adding of the no-cache headers in
this situation?


On Fri, 25 Mar 2005 09:04:10 -0600, Jason Bainbridge
[EMAIL PROTECTED] wrote:
 This isn't the usual problem of trying to force a browser to not cache
 an object but actually the opposite, on one of our servers every
 request for a particular image is coming back everytime with:
 
 HTTP/1.1 200 OK
 Server: Apache-Coyote/1.1
 Pragma: No-cache
 Cache-Control: no-cache
 Expires: Wed, 31 Dec 1969 18:00:00 CST
 ETag: W/177-104881299
 Last-Modified: Fri, 28 Mar 2003 00:56:30 GMT
 Content-Type: image/gif
 Content-Length: 1083
 Date: Fri, 25 Mar 2005 14:55:08 GMT
 
 and on another server the first request for the same image:
 
 HTTP/1.1 200 OK
 Server: Apache-Coyote/1.1
 ETag: W/1083-104881299
 Last-Modified: Fri, 28 Mar 2003 00:56:30 GMT
 Content-Type: image/gif
 Content-Length: 1083
 Date: Fri, 25 Mar 2005 14:57:08 GMT
 
 With subsequent requests returning the expected:
 
 HTTP/1.1 304 Not Modified
 Server: Apache-Coyote/1.1
 Date: Fri, 25 Mar 2005 14:57:20 GMT
 
 On the server with the no-cache headers being returned I have been
 tasked with locking it down so I have removed all of the example
 applications, the manager application and everything else we don't use
 plus I am running the Windows Service under an account that started
 with no permissions that I added the required permissions to by
 various means like using filemon and regmon while tomcat was running.
 
 Have I inadvertently removed or disabled something that would force
 the adding of all the no-cache headers?  Where ere they coming from?
 There are three there that I believe shouldn't be there:
 
 Pragma: No-cache
 Cache-Control: no-cache
 Expires: Wed, 31 Dec 1969 18:00:00 CST
 
 Any insight would be much appreciated!
 
 Cheers,
 --
 Jason Bainbridge
 http://kde.org - [EMAIL PROTECTED]
 Personal Site - http://jasonbainbridge.com
 


-- 
Jason Bainbridge
http://kde.org - [EMAIL PROTECTED]
Personal Site - http://jasonbainbridge.com

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



Re: Tomcat rookie needs help updating project

2005-03-25 Thread t.n.a.
Barry Kimelman wrote:
My system is a PC run by Windows XP.
I am running version 5.5.8 of Tomcat
I am running version 1.6.2 of Ant
 
I can successfully compile and install a new project with no problems. 
I can then successfully run the project by visiting the appropriate 
URL in my browser.
 
However when I make a change to my project either by recompiling some 
of my Java source code or by modifying some of JSP and/or HTML files, 
how do I get Tomcat to recognize these changes ? If I run the 
command ant reload from the DOS command line, when I rerun my 
application I do not see my changes. What do I need to do to install 
project changes ?

Well, one obvious thing you could do is restart tomcat: it takes about 
10 s, but it works.
If you use eclipse with the sysdeo plugin as your IDE (which I highly 
recommend), you can relead the project without a tomcat restart using a 
command from a project pop-up menu.
If you don't use eclipse, I suggest you read up on the manager 
application that comes with tomcat as loading and unloading projects is 
it's responsibility.

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


Re: Tomcat 3x to 5-5.7

2005-03-25 Thread Steve Lianoglou
To setup a webapp outside the tomcat webapp dir, you can drop in a 
context.xml file in the:
/path/to/tomcat/conf/Catalina/localhost/ directory

so, in that dir, if I have a servlet whose path is /myproject
a minimal file (named myproject.xml) looks like this:
Context
path=myproject reloadable=true
docBase=/path/to/your/weapp/context
/Context
maybe you'll have a workdDir in their if you need one.
Again, just drop that xml file in that folder 
/../../conf/Catlina/localhost.

Tomcat will see it when it loads up (I think  you'll have to restart 
tomcat) .. and that's it.

You'll see it listed in the manager app.
b) I need to edit the server.xml for this application and add some 
DBCP stuff, where does this live now?
/path/to/tomcat/conf/server.xml
-steve
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Tomcat rookie needs help updating project

2005-03-25 Thread Steve Lianoglou
However when I make a change to my project either by recompiling some 
of my Java source code or by modifying some of JSP and/or HTML files, 
how do I get Tomcat to recognize these changes ? If I run the 
command ant reload from the DOS command line, when I rerun my 
application I do not see my changes. What do I need to do to install 
project changes ?
If you set reloadable=true in your web-app context (see my previous 
post), tomcat should also recognize any changes to the WEB-INF folder 
and reload the webapp context automatically w/o taking down the whole 
server.

Or, if you don't set reloadable=true .. just click reload for the 
webapp in the tomcat manager app.

hope that helps,
-steve
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


How to update webapp on many Tomcats ???

2005-03-25 Thread Neil Upfalow
How can I best update a webapp that is running on tomcat instances
running on many different linux servers ?

I made a JSP that downloads a file from a central server and extracts
it. Problem is permissions don't get set as I want for those files. Java
has no permission ability. I suppose I could use a runtime exec() to
untar with permissions.

2nd problem is how to best restart the tomcat webapp? Modify the web.xml
? is there a simple example to restart it? My hosting company uses
tanuki wrapper on the JVM. Tomcat has it's programmatic API manager. 

Any ideas ?

Sincerely,
Neil Upfalow
 
ail: [EMAIL PROTECTED]


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



RE: Tomcat rookie needs help updating project

2005-03-25 Thread Neil Upfalow
I thought Reloadable set to true will only work for JSPs? Will that
allow classes to be reloaded as well ?
What would trigger that?
I'm trying to produce an inhouse solution to keep a large number of
hosted linux server's tomcat web apps on the same code base. 
I figured I had to find a way to programmatically make tomcat restart
the web app. No idea how yet, other than writing to web.xml to modify it
or looking into tomcat API .

Any ideas?

Sincerely,
Neil Upfalow
 

-Original Message-
From: Steve Lianoglou [mailto:[EMAIL PROTECTED] 
Sent: Friday, March 25, 2005 11:43 AM
To: Tomcat Users List
Subject: Re: Tomcat rookie needs help updating project

 However when I make a change to my project either by recompiling some 
 of my Java source code or by modifying some of JSP and/or HTML files, 
 how do I get Tomcat to recognize these changes ? If I run the 
 command ant reload from the DOS command line, when I rerun my 
 application I do not see my changes. What do I need to do to install 
 project changes ?

If you set reloadable=true in your web-app context (see my previous 
post), tomcat should also recognize any changes to the WEB-INF folder 
and reload the webapp context automatically w/o taking down the whole 
server.

Or, if you don't set reloadable=true .. just click reload for the 
webapp in the tomcat manager app.

hope that helps,

-steve


-
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]



How to prioritize WEB-INF\lib jar files loading order

2005-03-25 Thread Etienne Klajnerman
Hi all,

Is there a possibility to assign to Tomcat class loader priority in the way
it loads the jar in WEB-INF\lib?

My application uses axis.jar in WEB-INF\lib.

However, some classes from axis.jar had had to be rewritten (i.e. Calendar
serializer and deserializer).

I'd like to include them in my application specific jar file, which is also
in WEB-INF\lib.

It appears that Tomcat (4.1) class loader load the jars in an undocumented
and not guaranteed alphabetic order.
Though, I don't want to rely on this hypothetical behaviour. 

Thanks for your help

I found a similar thread in the mailing list archive, but it has been closed
3 years ago. I hope someone got a solution in the meantime.

Regards,
ATN.



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



Re: How to prioritize WEB-INF\lib jar files loading order

2005-03-25 Thread Jason Bainbridge
On Fri, 25 Mar 2005 18:02:49 +0100, Etienne Klajnerman
[EMAIL PROTECTED] wrote:
 Hi all,
 
 Is there a possibility to assign to Tomcat class loader priority in the way
 it loads the jar in WEB-INF\lib?
 
 My application uses axis.jar in WEB-INF\lib.
 
 However, some classes from axis.jar had had to be rewritten (i.e. Calendar
 serializer and deserializer).

Wouldn't it be a lot easier just to replace the calsses in axis.jar
that were rewritten? Afterall a .jar is just an archive.

Regards,
-- 
Jason Bainbridge
http://kde.org - [EMAIL PROTECTED]
Personal Site - http://jasonbainbridge.com

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



Re: Pragma: No-cache being added on one server but not another

2005-03-25 Thread Jason Bainbridge
On Fri, 25 Mar 2005 10:24:25 -0600, Jason Bainbridge
[EMAIL PROTECTED] wrote:
 Got a little bit further to this after discovering Tomcat adds those
 Headers whenever the resources are within a Security constriant, which
 they are in this case to force SSL with the below:
 
 security-constraint
 web-resource-collection
url-pattern/*/url-pattern
 /web-resource-collection
 user-data-constraint
transport-guaranteeCONFIDENTIAL/transport-guarantee
 /user-data-constraint
 /security-constraint
 
 Now is there anyway to disable the adding of the no-cache headers in
 this situation?

I ended up working around this defining multiple security constraints
just for the servlets that are called so if a user tries to go in
through any of the normal entry points with http it will stil redirect
to https but the static content isn't within the security-constraint
and hence Tomcat will allow it to be cached on the client side. This
means they can request the static content without it being redirected
to https but that isn't a concern as none of the statis stuff is
confidential.

This was one big gotcha for me and we only detected it jsut before
going live next week so I was under a bit of pressure to fix it so
hopefully if anyone has a similar problem in the future they can find
this in the archives to explain what is happening.

Regards,
-- 
Jason Bainbridge
http://kde.org - [EMAIL PROTECTED]
Personal Site - http://jasonbainbridge.com

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



Re: No bug with Delegate !

2005-03-25 Thread Lionel Farbos
Hi,

Sorry but my preceding analysis was false : I have a problem but NOT with the 
delegate.
So, I reexplain the case :

1- I have 
$CATALINA_HOME/common/lib/mysql-connector-java-2.0.14-bin.jar
$CATALINA_HOME/common/lib/naming-factory-dbcp.jar
2- I have a war with
WEB-INF/lib/mysql-connector-java-3.0.15-ga-bin.jar
WEB-INF/lib/naming-factory-dbcp.jar

in my test, I do :
Class driver = Class.forName(org.gjt.mm.mysql.Driver);
URL ressource = 
driver.getClassLoader().getResource(org/gjt/mm/mysql/Driver.class);
out.println( ClassForname==+ressource );

If, in my Context element, I put a Loader with delegate=false (the default), it 
prints : 
ClassForname==jar:file:/usr/local/tomcat/webapps/myContext/WEB-INF/lib/mysql-connector-java-3.0.15-ga-bin.jar!/org/gjt/mm/mysql/Driver.class

If I put delegate=true, it prints :
ClassForname==jar:file:/usr/local/tomcat/common/lib/mysql-connector-java-2.0.14-bin.jar!/org/gjt/mm/mysql/Driver.class

So delegate works as it is expected.

My problem is that, in my first test, I did :
Context ctx = new InitialContext();
DataSource dataSource = (DataSource)ctx.lookup(java:/comp/env/jdbc/myDB);
URL ressource = 
dataSource.getClass().getClassLoader().getResource(org/gjt/mm/mysql/Driver.class);
out.println( JndiForname==+ressource );

and, in this case, I always have :
ClassForname==jar:file:/usr/local/tomcat/common/lib/mysql-connector-java-2.0.14-bin.jar!/org/gjt/mm/mysql/Driver.class

So, for now, I don't find the solution to use the Driver inside the war :-(
But this is another problem...

Sorry Remy for the bad bug report.

On Wed, 23 Mar 2005 17:26:34 +0100
Lionel Farbos [EMAIL PROTECTED] wrote:

 Hi Simon,
 
 I wanted to use this flag because, in my $CATALINA_HOME/common/lib,
 I have mysql-connector-java-2.0.14-bin.jar
 but, 
 in some wars, I have 
 WEB-INF/lib/mysql-connector-java-3.0.15-ga-bin.jar
 WEB-INF/lib/naming-factory-dbcp.jar
 and in other wars, I don't have any Driver Mysql
 
 So, I'd want the war_WEB-INF/lib/Mysql_jar to be taken BEFORE the 
 common/lib/Mysql_jar one when it is possible
 and
 the common/lib/Mysql_jar to be taken in other cases.
 
 So I tried to put 
 Loader className=org.apache.catalina.loader.WebappLoader delegate=false 
 /
 or 
 Loader className=org.apache.catalina.loader.WebappLoader delegate=true /
 in my Context.xml
 But it is always the common/lib/jar one which is taken :-((
 
 I don't know if it is a bug or a bad config from me 
 
 If a Tomcat Developer can say to me what I am wrong ...
 
 Note : To confirm the Driver version, I print :
 dataSource.getClass().getClassLoader().getResource(org/gjt/mm/mysql/Driver.class);
 
 Cheers
 On Sat, 19 Mar 2005 17:44:40 +1300
 Simon Kitching [EMAIL PROTECTED] wrote:
 
  Hi,
  
  I see here that there is an option for the webapp-specific classloader
  to use parent-first classloading instead of the (default) child-first
  classloading.
  
  Can someone suggest why this might be useful? Clearly someone thought
  so, but I can't see any point in it. It is in catalina since version 1.1
  (committer: Remy Maucherat).
  
  See delegate option in this page:
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/config/loader.html
  
  Using this option makes life exceedingly complicated for some libs like
  commons-beanutils and commons-logging, so I would like to know under
  what conditions someone might enable this feature.
  
  Regards,
  
  Simon
  
  
  -
  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]



Re: HELP: How the DBCP works ? (and the JMXProxy)

2005-03-25 Thread Lionel Farbos
On Wed, 23 Mar 2005 17:40:05 +0100
Lionel Farbos [EMAIL PROTECTED] wrote:

 Hi all (tomcat 5.5 developers),
 
 In my context.xml, I use a DataSource like this :
 Resource auth=Container name=myDB type=javax.sql.DataSource .../
 So, I suppose the dataSource.getConnection() is taken from DataBase 
 Connection Pool...
 
 1- But How do this works ?
 
 2- If all my contexts have their own DataSource, each context have their own 
 Pool ?
 
No response but I suppose there is one pool for each DataSource...

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



Re: unpackWARs incomplete when deployed with context.xml

2005-03-25 Thread Lionel Farbos
On Wed, 16 Mar 2005 18:01:47 +0100
Lionel Farbos [EMAIL PROTECTED] wrote:

 Hi all,
 
 After some tests on TC4.1.31,
 deployment with context.xml and war unpacked,
 my unpacked tree is incomplete : static files, JSPs files and properties 
 files (including web.xml) are missing :-(
 (but the Context is working fine)
 
 Is it the normal behaviour or I miss something ?
I don't know

 This is the same with TC5.5 ?
NO : it works well on TC5.5.7 :

the war is copied in Host.appBase,
then completely unpacked

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



Re: Tomcat rookie needs help updating project

2005-03-25 Thread Jon Cline - Enthusiast, Inc.
Hey Neil,

I believe you can also send a url string to the manager application
which will cause the webapp to reload:
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/manager-howto.html

jc


On Fri, 25 Mar 2005 11:52:05 -0500, Neil Upfalow [EMAIL PROTECTED] wrote:
 I thought Reloadable set to true will only work for JSPs? Will that
 allow classes to be reloaded as well ?
 What would trigger that?
 I'm trying to produce an inhouse solution to keep a large number of
 hosted linux server's tomcat web apps on the same code base.
 I figured I had to find a way to programmatically make tomcat restart
 the web app. No idea how yet, other than writing to web.xml to modify it
 or looking into tomcat API .
 
 Any ideas?
 
 Sincerely,
 Neil Upfalow
 
 
 -Original Message-
 From: Steve Lianoglou [mailto:[EMAIL PROTECTED]
 Sent: Friday, March 25, 2005 11:43 AM
 To: Tomcat Users List
 Subject: Re: Tomcat rookie needs help updating project
 
  However when I make a change to my project either by recompiling some
  of my Java source code or by modifying some of JSP and/or HTML files,
  how do I get Tomcat to recognize these changes ? If I run the
  command ant reload from the DOS command line, when I rerun my
  application I do not see my changes. What do I need to do to install
  project changes ?
 
 If you set reloadable=true in your web-app context (see my previous
 post), tomcat should also recognize any changes to the WEB-INF folder
 and reload the webapp context automatically w/o taking down the whole
 server.
 
 Or, if you don't set reloadable=true .. just click reload for the
 webapp in the tomcat manager app.
 
 hope that helps,
 
 -steve
 
 -
 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]
 
 


-- 
|

Jon Cline
Chief Product Evangelist
Enthusiast, Inc
www.enthusiastinc.com
[EMAIL PROTECTED]
626.256.3505

|

*Need help?  Email [EMAIL PROTECTED]

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



launching windowed program with Runtime#exec() under Tomcat 5.0

2005-03-25 Thread Steve-O
I've been looking through the archives and reading the posts regarding 
Tomcat and Runtime#exec(). Almost everything I've read about 
Runtime#exec() points to the javaworld article on the pitfalls of 
Runtime#exec(). However, most of the examples seem to be for commands 
or shell scripts where some kind of interaction with the command line 
is desired.

The problem I'm having is with launching a windowed program, VLC, 
(http://www.videolan.org/)

I'm running Tomcat 5.0 (NOT as a service), JDK 1.4.2_07, W2KPro, VLC 
0.8.1

On the command line, the following works fine (VLC launches and the 
stream plays).

 C:\Program Files\VideoLAN\VLC\vlc.exe --extraintf=rc 
--rc-host=127.0.0.1:9066 --rc-quiet rtsp://192.168.0.66/; 
:sout=#duplicate{dst=display}

basically, the command line options tell VLC to open a simple interface 
for remote control, open an input stream over rtsp and send the output 
to the display. More complicated outputs (files, transcodings, streams) 
can be constructed.

Then I build that into a class:
 public class Launcher {
      public static main( String[] args) throws Exception {
           new Launcher().play();
      }
      public void play() throws Exception {
           String command = \C:\\Program 
Files\\VideoLAN\\VLC\\vlc.exe\ --extraintf=rc --rc-host=127.0.0.1:9066 
--rc-quiet \rtsp://192.168.0.66/\; :sout=#duplicate{dst=display};
           Runtime.getRuntime().exec( command);
      }
 }

and invoked it from the command line:
java Launcher
and *that* works fine (VLC launches and the stream plays) which leads 
me to believe that there is nothing wrong with using Runtime#exec() in 
this particular instance AND the command is fine.

HOWEVER, if I call the very same code in main() above from a JSP:
%
new Launcher().play();
%
VLC launches but hangs with an End Program dialog.
IF I replace the command string with:
command = notepad.exe;
Notepad launches just fine, directly from the code AND from a JSP which 
leads me to believe it is not a permission problem under Tomcat.

I've even gone so far as to create a BAT file with the same command and 
launch it using:

command = cmd.exe /C C:\\path\\to\\file\\vlc;
and that works on the command line, directly in the code but NOT via 
JSP.

I'm nearing my wits ends so if someone out there ever figured out a 
similar problem or has a suggestion, I'd appreciate it.

Thanks in advance,
Steve


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


Re: Tomcat rookie needs help updating project

2005-03-25 Thread Steve Lianoglou
I thought Reloadable set to true will only work for JSPs? Will that
allow classes to be reloaded as well ?
What would trigger that?
Hmm .. I may be delerious, but I feel like when reloadable=true, the 
context gets reloaded whenever something 'changes' in the WEB-INF dir .. let's see ...
got this from the docs:
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/context.html
(Tomcat 4, but I'm a bit lazy to go to tommcat 5, and I can't imagine it 
changing too much)
reloadable:
Set to true if you want Catalina to monitor classes in /WEB-INF/classes/ and 
/WEB-INF/lib for changes, and automatically reload the web application if a 
change is detected. This feature is very useful during application development, 
but it requires significant runtime overhead and is not recommended for use on 
deployed production applications. You can use the Manager web application, 
however, to trigger reloads of deployed applications on demand.
I figured I had to find a way to programmatically make tomcat restart
the web app. No idea how yet, other than writing to web.xml to modify it
or looking into tomcat API .
Hmm .. nothing ingenious .. what if use some lo-tech style of a shell 
script that justs request the correct url to reload a particular webapp context 
...
The Eclipse sysdeo plugin has a way of telling a context to reload ... might be 
something to look into.
-steve
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: launching windowed program with Runtime#exec() under Tomcat 5.0

2005-03-25 Thread Jason Bainbridge
How are you running Tomcat? As a service?  Try running it via
startup.bat so it uses your credentials and then trying.

Also try checking Allow service to interact with desktop if you are
running the service as Localsystem (although I wouldn't recommend
doing that for Production use, I'd create an account with the
permissions you need and use that instead)

Regards,
Jason


On Fri, 25 Mar 2005 12:51:22 -0500, Steve-O Steve Butcher
[EMAIL PROTECTED] wrote:
 I've been looking through the archives and reading the posts regarding
 Tomcat and Runtime#exec(). Almost everything I've read about
 Runtime#exec() points to the javaworld article on the pitfalls of
 Runtime#exec(). However, most of the examples seem to be for commands
 or shell scripts where some kind of interaction with the command line
 is desired.
 
 The problem I'm having is with launching a windowed program, VLC,
 (http://www.videolan.org/)
 
 I'm running Tomcat 5.0 (NOT as a service), JDK 1.4.2_07, W2KPro, VLC
 0.8.1
 
 On the command line, the following works fine (VLC launches and the
 stream plays).
 
   C:\Program Files\VideoLAN\VLC\vlc.exe --extraintf=rc
 --rc-host=127.0.0.1:9066 --rc-quiet rtsp://192.168.0.66/;
 :sout=#duplicate{dst=display}
 
 basically, the command line options tell VLC to open a simple interface
 for remote control, open an input stream over rtsp and send the output
 to the display. More complicated outputs (files, transcodings, streams)
 can be constructed.
 
 Then I build that into a class:
 
   public class Launcher {
public static main( String[] args) throws Exception {
 new Launcher().play();
}
 
public void play() throws Exception {
 String command = \C:\\Program
 Files\\VideoLAN\\VLC\\vlc.exe\ --extraintf=rc --rc-host=127.0.0.1:9066
 --rc-quiet \rtsp://192.168.0.66/\; :sout=#duplicate{dst=display};
 Runtime.getRuntime().exec( command);
}
   }
 
 and invoked it from the command line:
 
  java Launcher
 
 and *that* works fine (VLC launches and the stream plays) which leads
 me to believe that there is nothing wrong with using Runtime#exec() in
 this particular instance AND the command is fine.
 
 HOWEVER, if I call the very same code in main() above from a JSP:
 
 %
 new Launcher().play();
 %
 
 VLC launches but hangs with an End Program dialog.
 
 IF I replace the command string with:
 
 command = notepad.exe;
 
 Notepad launches just fine, directly from the code AND from a JSP which
 leads me to believe it is not a permission problem under Tomcat.
 
 I've even gone so far as to create a BAT file with the same command and
 launch it using:
 
 command = cmd.exe /C C:\\path\\to\\file\\vlc;
 
 and that works on the command line, directly in the code but NOT via
 JSP.
 
 I'm nearing my wits ends so if someone out there ever figured out a
 similar problem or has a suggestion, I'd appreciate it.
 
 Thanks in advance,
 Steve
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


-- 
Jason Bainbridge
http://kde.org - [EMAIL PROTECTED]
Personal Site - http://jasonbainbridge.com

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



Re: No bug with Delegate !

2005-03-25 Thread David Smith
If you want to use the .jar in WEB-INF/lib, you'll also have to 
implement your own DBCP pool for the app.  That can be done in a 
ServletContextListener in servlet spec 2.4.  When the container 
instantiates the pool, it's always going to use the jar in common/lib 
(or possibly shared/lib) because it's instantiated at the container 
level.  At that level there is no awareness of you apps classloader.

--David
Lionel Farbos wrote:
Hi,
Sorry but my preceding analysis was false : I have a problem but NOT with the 
delegate.
So, I reexplain the case :
1- I have 
$CATALINA_HOME/common/lib/mysql-connector-java-2.0.14-bin.jar
$CATALINA_HOME/common/lib/naming-factory-dbcp.jar
2- I have a war with
WEB-INF/lib/mysql-connector-java-3.0.15-ga-bin.jar
WEB-INF/lib/naming-factory-dbcp.jar

in my test, I do :
Class driver = Class.forName(org.gjt.mm.mysql.Driver);
URL ressource = 
driver.getClassLoader().getResource(org/gjt/mm/mysql/Driver.class);
out.println( ClassForname==+ressource );
If, in my Context element, I put a Loader with delegate=false (the default), it prints : 
ClassForname==jar:file:/usr/local/tomcat/webapps/myContext/WEB-INF/lib/mysql-connector-java-3.0.15-ga-bin.jar!/org/gjt/mm/mysql/Driver.class

If I put delegate=true, it prints :
ClassForname==jar:file:/usr/local/tomcat/common/lib/mysql-connector-java-2.0.14-bin.jar!/org/gjt/mm/mysql/Driver.class
So delegate works as it is expected.
My problem is that, in my first test, I did :
Context ctx = new InitialContext();
DataSource dataSource = (DataSource)ctx.lookup(java:/comp/env/jdbc/myDB);
URL ressource = 
dataSource.getClass().getClassLoader().getResource(org/gjt/mm/mysql/Driver.class);
out.println( JndiForname==+ressource );
and, in this case, I always have :
ClassForname==jar:file:/usr/local/tomcat/common/lib/mysql-connector-java-2.0.14-bin.jar!/org/gjt/mm/mysql/Driver.class
So, for now, I don't find the solution to use the Driver inside the war :-(
But this is another problem...
Sorry Remy for the bad bug report.
On Wed, 23 Mar 2005 17:26:34 +0100
Lionel Farbos [EMAIL PROTECTED] wrote:
 

Hi Simon,
I wanted to use this flag because, in my $CATALINA_HOME/common/lib,
I have mysql-connector-java-2.0.14-bin.jar
but, 
in some wars, I have 
WEB-INF/lib/mysql-connector-java-3.0.15-ga-bin.jar
WEB-INF/lib/naming-factory-dbcp.jar
and in other wars, I don't have any Driver Mysql

So, I'd want the war_WEB-INF/lib/Mysql_jar to be taken BEFORE the 
common/lib/Mysql_jar one when it is possible
and
the common/lib/Mysql_jar to be taken in other cases.
So I tried to put 
Loader className=org.apache.catalina.loader.WebappLoader delegate=false /
or 
Loader className=org.apache.catalina.loader.WebappLoader delegate=true /
in my Context.xml
But it is always the common/lib/jar one which is taken :-((

I don't know if it is a bug or a bad config from me 
If a Tomcat Developer can say to me what I am wrong ...
Note : To confirm the Driver version, I print :
dataSource.getClass().getClassLoader().getResource(org/gjt/mm/mysql/Driver.class);
Cheers
On Sat, 19 Mar 2005 17:44:40 +1300
Simon Kitching [EMAIL PROTECTED] wrote:
   

Hi,
I see here that there is an option for the webapp-specific classloader
to use parent-first classloading instead of the (default) child-first
classloading.
Can someone suggest why this might be useful? Clearly someone thought
so, but I can't see any point in it. It is in catalina since version 1.1
(committer: Remy Maucherat).
See delegate option in this page:
 http://jakarta.apache.org/tomcat/tomcat-5.0-doc/config/loader.html
Using this option makes life exceedingly complicated for some libs like
commons-beanutils and commons-logging, so I would like to know under
what conditions someone might enable this feature.
Regards,
Simon
-
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]


Re: How to prioritize WEB-INF\lib jar files loading order

2005-03-25 Thread Tim Funk
The classes directory has a higher precendence than the jar files.
-Tim
Etienne Klajnerman wrote:
Hi all,
Is there a possibility to assign to Tomcat class loader priority in the way
it loads the jar in WEB-INF\lib?
My application uses axis.jar in WEB-INF\lib.
However, some classes from axis.jar had had to be rewritten (i.e. Calendar
serializer and deserializer).
I'd like to include them in my application specific jar file, which is also
in WEB-INF\lib.
It appears that Tomcat (4.1) class loader load the jars in an undocumented
and not guaranteed alphabetic order.
Though, I don't want to rely on this hypothetical behaviour. 

Thanks for your help
I found a similar thread in the mailing list archive, but it has been closed
3 years ago. I hope someone got a solution in the meantime.
Regards,
ATN.

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

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


Re: launching windowed program with Runtime#exec() under Tomcat 5.0

2005-03-25 Thread Steve-O
Dear Jason,
Thank you for the reply.
I'm not running Tomcat as a service. Originally, I was running it as a 
service and I even checked Allow service to interact with desktop. 
After that failed, I tried running it simply using start.bat.

Cheers,
Steve
On Mar 25, 2005, at 12:56 PM, Jason Bainbridge wrote:
How are you running Tomcat? As a service?  Try running it via
startup.bat so it uses your credentials and then trying.
Also try checking Allow service to interact with desktop if you are
running the service as Localsystem (although I wouldn't recommend
doing that for Production use, I'd create an account with the
permissions you need and use that instead)
Regards,
Jason

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


Re: launching windowed program with Runtime#exec() under Tomcat 5.0

2005-03-25 Thread Markus Schönhaber
Am Freitag, 25. März 2005 18:51 schrieb Steve Butcher:

 Then I build that into a class:

   public class Launcher {
        public static main( String[] args) throws Exception {
             new Launcher().play();
        }

        public void play() throws Exception {
             String command = \C:\\Program
 Files\\VideoLAN\\VLC\\vlc.exe\ --extraintf=rc --rc-host=127.0.0.1:9066
 --rc-quiet \rtsp://192.168.0.66/\; :sout=#duplicate{dst=display};
             Runtime.getRuntime().exec( command);
        }
   }

 and invoked it from the command line:
  java Launcher

 and *that* works fine (VLC launches and the stream plays) which leads
 me to believe that there is nothing wrong with using Runtime#exec() in
 this particular instance AND the command is fine.

 HOWEVER, if I call the very same code in main() above from a JSP:

 %
   new Launcher().play();
 %

 VLC launches but hangs with an End Program dialog.

 IF I replace the command string with:

 command = notepad.exe;

 Notepad launches just fine, directly from the code AND from a JSP which
 leads me to believe it is not a permission problem under Tomcat.

Does vlc produce any output on stdout/stderr? If it does, it may stop when the 
output-buffer fills up. So you have to read Process#getOutputStream() to make 
it continue.

Regards
mks

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



Re: launching windowed program with Runtime#exec() under Tomcat 5.0

2005-03-25 Thread Jason Bainbridge
On Fri, 25 Mar 2005 13:14:45 -0500, Steve-O Steve Butcher
[EMAIL PROTECTED] wrote:
 Dear Jason,
 
 Thank you for the reply.
 
 I'm not running Tomcat as a service. Originally, I was running it as a
 service and I even checked Allow service to interact with desktop.
 After that failed, I tried running it simply using start.bat.

Would help if I learned to read... Just for curiosity try downloading
filemon from sysinternals.com to see if you do have some weird sort of
pernisions problem.

-- 
Jason Bainbridge
http://kde.org - [EMAIL PROTECTED]
Personal Site - http://jasonbainbridge.com

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



Re: launching windowed program with Runtime#exec() under Tomcat 5.0

2005-03-25 Thread Jason Bainbridge
On Fri, 25 Mar 2005 19:31:48 +0100, Markus Schönhaber
[EMAIL PROTECTED] wrote:
 Am Freitag, 25. März 2005 18:51 schrieb Steve Butcher:

 Does vlc produce any output on stdout/stderr? If it does, it may stop when the
 output-buffer fills up. So you have to read Process#getOutputStream() to make
 it continue.

that makes more sense! It's been a while since I've played with this
stuff... Below is a snippet of code I used in a spellchecker
application that you can look at for ideas:

try

{   



String osName = System.getProperty(os.name );

//System.out.println(OS Name:  + osName);

String[] cmd = new String[3];

 

if( osName.equals( Windows NT ) | osName.equals( Windows 2000 ))

{

cmd[0] = cmd.exe ;

cmd[1] = /C ;

cmd[2] = aspell -a;

}

else if( osName.equals( Windows 95 ) )

{

cmd[0] = command.com ;

cmd[1] = /C ;

cmd[2] =aspell -a;

}



Runtime rt = Runtime.getRuntime();

System.out.println(Execing  + cmd[0] +   + cmd[1]

   +   + cmd[2]);

Process proc = rt.exec(cmd);

 

PrintWriter stdin = new
PrintWriter(proc.getOutputStream(), true);

stdin.write(spellCheck);

//System.out.println(spellCheck);

//stdin.write(26);

stdin.close();



InputStreamReader isr = new
InputStreamReader(proc.getInputStream());

BufferedReader br = new BufferedReader(isr);

String line=null;

int i = 0;

try {

while ( (line = br.readLine()) != null) {

if (line.equals(*)){

aSuggWords[i] = correct;

}else{

aSuggWords[i] = line;

}

//out.println(line + br);

returnString = returnString + br + line;

i++;

}

} catch (IOException ioe)

  {

ioe.printStackTrace();  

  }

proc.destroy();

Regards,


-- 
Jason Bainbridge
http://kde.org - [EMAIL PROTECTED]
Personal Site - http://jasonbainbridge.com

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



Help with SSL Cert config

2005-03-25 Thread joelsherriff
I'm resending this message because a) for some reason I didn't see it on the 
list after I sent it and b) I never got any responses (maybe because of _a_).  
So, if my original post did actually make it to the list, please forgive the 
re-post.

Hope someone can help.  I've searched through the archives and this seems to be 
a common problem, but even detailed instructions
have left me stumped.  I'm trying to get client certificates to be required by 
tomcat by setting clientAuth=true but I can't seem to figure out how
to get the client certificate to be accepted once I do that.  Here's what I've 
done to generate all the appropriate files (parts coped from
other posts to this list):

Further elaboration of what we're trying to do:  We want to require client 
authentication from our customers.  So, IIUC, we'll have to send them a signed 
client cert (p12) to install in their browser and java keystores.  Again, IIUC, 
importing the CA certificate, that was used to sign the client cert, into the 
server keystore is what tells the server to accept the client certificate 
presented, because it will be signed by that CA (us).  Is my understanding 
correct?  If so, these steps appear to be correct, unless I've hosed something 
up along the way.

# Create a private key and certificate request
openssl req -new -subj /C=US/ST=North Carolina/L=Raleigh/CN=akuma-c -newkey 
rsa:1024 -nodes -out ca.csr -keyout ca.key

# Create CA's self-signed certificate
openssl x509 -trustout -signkey ca.key -days 365 -req -in ca.csr -out ca.pem

# Copy ca.pem to ca.crt, edit and change TRUSTED CERTIFICATE to CERTIFICATE
# import ca.crt into the Trusted Root Certificates Store in IE

#Import the CA certificate into the JDK certificate authorities keystore:
keytool -import -keystore %JAVA_HOME%/jre/lib/security/cacerts -file ca.pem 
-alias my_ca_alias -keypass changeit -storepass changeit

# Create a file to hold CA's serial numbers.
echo 02  ca.srl

# Create a keystore for the web server.
keytool -genkey -alias tomcat-sv -dname CN=akuma-c, OU=RD, O=MyOrganization, 
L=Raleigh, S=North Carolina, C=US -keyalg RSA -keypass changeit -storepass 
changeit -keysize 1024 -keystore server.keystore -storetype JKS

# Create a certificate request for the web server:
keytool -certreq -keyalg RSA -alias tomcat-sv -file server.csr -keystore 
server.keystore -storepass changeit

# Sign the certificate request:
openssl x509 -CA ca.pem -CAkey ca.key -CAserial ca.srl -req -in server.csr -out 
server.crt -days 365

# Import the signed server certificate into the server keystore:
keytool -import -alias tomcat-sv -keystore server.keystore -trustcacerts -file 
server.crt -storepass changeit

# Import the CA certificate into the server keystore:
keytool -import -alias my_ca_alias -keystore server.keystore -trustcacerts 
-file ca.pem -keypass changeit

# Create a client certificate request:
openssl req -new -newkey rsa:512 -nodes -out client1.req -keyout client1.key

# Sign the client certificate.
openssl x509 -CA ca.pem -CAkey ca.key -CAserial ca.srl -req -in client1.req 
-out client1.pem -days 365

# Generate a PKCS12 file containing client key and client certificate.
openssl pkcs12 -export -clcerts -in client1.pem -inkey client1.key -out 
client1.p12 -name Client

# Import the PKCS12 file into the web browser under Personal Certificates

# edit the server.xml file and set clientAuth=true and keystoreFile to point to 
my server.keystore file.

Once all this is done, neither IE nor my web app can talk to tomcat on the ssl 
port (8443)

Re: launching windowed program with Runtime#exec() under Tomcat 5.0

2005-03-25 Thread Steve-O
On Mar 25, 2005, at 1:31 PM, Markus Schönhaber wrote:
Am Freitag, 25. März 2005 18:51 schrieb Steve Butcher:
Does vlc produce any output on stdout/stderr? If it does, it may stop 
when the
output-buffer fills up. So you have to read Process#getOutputStream() 
to make
it continue.

Regards
mks

I thought about this as well and originally dismissed the idea because:
1) when I run it at the command line (DOS prompt), there is no output.
2) when I run java Launcher, it runs fine. It was not immediately 
apparent to me why the buffer might fill up when it was called via 
Tomcat v. directly (#1 notwithstanding).

However, I have since attempted a few things with the original code 
that lead me to believe that there is definitely *something* going. If 
I change the previous play() method to:

      public void play() throws Exception {
           String command = \C:\\Program 
Files\\VideoLAN\\VLC\\vlc.exe\ --extraintf=rc --rc-host=127.0.0.1:9066 
--rc-quiet \rtsp://192.168.0.66/\; :sout=#duplicate{dst=display};
           Process child = Runtime.getRuntime().exec( command);
	  int exit = child.waitFor();
      }

I can get the direct version (java Launcher) to exhibit the same 
behavior (VLC launches but hangs with End Program dialog).

In any case, because you don't want your page to wait on a windowed 
application, you shouldn't call Process#waitFor() anyway which doesn't 
return until the windowed application is quit; however, it is an 
interesting clue.

Cheers,
Steve

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


connection pooling confusion help needed

2005-03-25 Thread Krishnakant Mane
hello all,
im going to put a web application in java servlets
with tomcat 5 on a production ready server for real
time use.
I am thinking of using connection pooling but I am a
bit confused.  I have initialised all my connections
in the servlet's init method and closed them in
distroy method.
so these connections are not closed untill the server
is turned off.  now how will the connection pooling
track these un closed connections?
and I will like some one to make me understand with an
example of how to implement connection pooling using
mysql jdbc.  I will be happy if some one gives a
complete example including how to define context and
where.  and how to link it to a web application and
how to call the connection from a pool.  I have some
rough idea but the tomcat docs really confused me.
so please help me understand this connection pooling
concept
thanks
Krishnakant.

Send instant messages to your online friends http://uk.messenger.yahoo.com 

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



RE: connection pooling confusion help needed

2005-03-25 Thread pandu yelamanchili
Hi
All the connection pool properties should be configured in server.xml. You 
dont have to initialize connections etc. in your init method. you just have 
to make sure you close your resultset and connection after you are done. 
Closing it will return it back to the pool.

Here is one link from tomcat. Not sure if you took a look at it already
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jndi-datasource-examples-howto.html#Database%20Connection%20Pool%20(DBCP)%20Configurations
Pandu
From: Krishnakant Mane [EMAIL PROTECTED]
Reply-To: Tomcat Users List tomcat-user@jakarta.apache.org
To: tomcat-user@jakarta.apache.org
Subject: connection pooling confusion help needed
Date: Fri, 25 Mar 2005 19:11:15 + (GMT)
hello all,
im going to put a web application in java servlets
with tomcat 5 on a production ready server for real
time use.
I am thinking of using connection pooling but I am a
bit confused.  I have initialised all my connections
in the servlet's init method and closed them in
distroy method.
so these connections are not closed untill the server
is turned off.  now how will the connection pooling
track these un closed connections?
and I will like some one to make me understand with an
example of how to implement connection pooling using
mysql jdbc.  I will be happy if some one gives a
complete example including how to define context and
where.  and how to link it to a web application and
how to call the connection from a pool.  I have some
rough idea but the tomcat docs really confused me.
so please help me understand this connection pooling
concept
thanks
Krishnakant.
Send instant messages to your online friends http://uk.messenger.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]


Re: launching windowed program with Runtime#exec() under Tomcat 5.0

2005-03-25 Thread Steve-O
w00t!
I got it to work.
It turns out that VLC *is* sending output to both stderr and stdout. 
From the oft-mentioned JavaWorld article, 
http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps_p.html, I 
added the StreamGobblers to play();

public void play() throws Exception {
	String command = \C:\\Program Files\\VideoLAN\\VLC\\vlc.exe\ 
--extraintf=rc --rc-host=127.0.0.1:9066 --rc-quiet 
\rtsp://192.168.0.66/\; :sout=#duplicate{dst=display};
	Process child = Runtime.getRuntime().exec( command);
	StreamGobbler err = new StreamGobbler( child.getErrorStream(), err);
	StreamGobbler out = new StreamGobble( child.getInputStream(), out);
	err.start();
	out.start();
}

and now Launcher works both when called directly and when called from a 
JSP.

Now, as a result of this wild ride, it is not readily apparent:
1) where stderr gets piped to in DOS...when I ran the command directly 
at the DOS prompt, where was all of this output?
2) why it was running fine as java Launcher but not when called from a 
JSP...the buffer of Runtime#exec() changes? It doesn't seem likely.

all of which would have given clues as to why and how everything was 
working and how it needed to be dealt with.

I guess the moral of the story isALWAYS gobble err and out even if 
you don't think they're being used.

Thanks to everyone for their help.
Cheers,
Steve
On Mar 25, 2005, at 1:48 PM, Steve Butcher (Steve-O) wrote:
I thought about this as well and originally dismissed the idea because:
1) when I run it at the command line (DOS prompt), there is no output.
2) when I run java Launcher, it runs fine. It was not immediately 
apparent to me why the buffer might fill up when it was called via 
Tomcat v. directly (#1 notwithstanding).

However, I have since attempted a few things with the original code 
that lead me to believe that there is definitely *something* going. If 
I change the previous play() method to:

      public void play() throws Exception {
           String command = \C:\\Program 
Files\\VideoLAN\\VLC\\vlc.exe\ --extraintf=rc 
--rc-host=127.0.0.1:9066 --rc-quiet \rtsp://192.168.0.66/\; 
:sout=#duplicate{dst=display};
           Process child = Runtime.getRuntime().exec( command);
	  int exit = child.waitFor();
      }

I can get the direct version (java Launcher) to exhibit the same 
behavior (VLC launches but hangs with End Program dialog).

In any case, because you don't want your page to wait on a windowed 
application, you shouldn't call Process#waitFor() anyway which doesn't 
return until the windowed application is quit; however, it is an 
interesting clue.

Cheers,
Steve

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


Tomcat 5-5.7 make reload classes?

2005-03-25 Thread Scott Purcell
First time using the manager application. I deployed a war file into my 
webapps, and all is good. Problem is, if I update class file in newly created 
webapp, it does not recompile automatically like my old 4x did. I had to do a 
reload from the manager to see the changes.
 
If my new webapp is called lesson1 where do I set the reload=true?
 
Thanks,

Scott K Purcell | Developer | VERTIS | 
555 Washington Ave. 4th Floor | St. Louis, MO 63101 | 
314.588.0720 Ext:1320 | [EMAIL PROTECTED] | http://www.vertisinc.com 
http://www.vertisinc.com/  

Vertis is the premier provider of targeted advertising, media, and 
marketing services that drive consumers to marketers more effectively. 
 

 


RE: Wild Card Hosting

2005-03-25 Thread Drew Jorgenson
OK, so you will eventually want to have wild card domains for more than
one domain, correct?

Drew

On Thu, 2005-03-24 at 17:46, George Sexton wrote:
 Oh, I see where you are headed. 
 
 One way to go would be to have a new service, with a new IP address, and
 make that the default host.
 
 That's out of the question since I host for so many people.
 
 George Sexton
 MH Software, Inc.
 http://www.mhsoftware.com/
 Voice: 303 438 9585
   
 
  -Original Message-
  From: Drew Jorgenson [mailto:[EMAIL PROTECTED] 
  Sent: Thursday, March 24, 2005 4:14 PM
  To: Tomcat Users List
  Subject: Re: Wild Card Hosting
  
  Are you able to assign a static IP address to your virtual 
  host, meaning
  do you have a static IP available?
  
  Drew.
  
  
  On Wed, 2005-03-23 at 10:42, George Sexton wrote:
   Does anyone know if Tomcat supports Wild card hosting? Can 
  I specify a
   pattern say
   
   *.domain.com
   
   And have all requests get forwarded to a specific host?
   
   Making the host the default host is not an option, because 
  there is already
   another default host that is used.
   
   
   
   George Sexton
   MH Software, Inc.
   http://www.mhsoftware.com/
   Voice: 303 438 9585

   
   
   
  -
   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]



RE: Wild Card Hosting

2005-03-25 Thread Drew Jorgenson
I think that would still be up to your dns settings. You could have
something like

* IN CNAME mydomain.com

correct me if I'm wrong ;-)

Drew.



On Thu, 2005-03-24 at 17:46, George Sexton wrote:
 Oh, I see where you are headed. 
 
 One way to go would be to have a new service, with a new IP address, and
 make that the default host.
 
 That's out of the question since I host for so many people.
 
 George Sexton
 MH Software, Inc.
 http://www.mhsoftware.com/
 Voice: 303 438 9585
   
 
  -Original Message-
  From: Drew Jorgenson [mailto:[EMAIL PROTECTED] 
  Sent: Thursday, March 24, 2005 4:14 PM
  To: Tomcat Users List
  Subject: Re: Wild Card Hosting
  
  Are you able to assign a static IP address to your virtual 
  host, meaning
  do you have a static IP available?
  
  Drew.
  
  
  On Wed, 2005-03-23 at 10:42, George Sexton wrote:
   Does anyone know if Tomcat supports Wild card hosting? Can 
  I specify a
   pattern say
   
   *.domain.com
   
   And have all requests get forwarded to a specific host?
   
   Making the host the default host is not an option, because 
  there is already
   another default host that is used.
   
   
   
   George Sexton
   MH Software, Inc.
   http://www.mhsoftware.com/
   Voice: 303 438 9585

   
   
   
  -
   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]



RE: Wild Card Hosting

2005-03-25 Thread Drew Jorgenson
Woops, I don't think that will work with Tomcat since the
subdomain.mydomain.com would be passed to it and Tomcat won't know which
container it goes to.

The way I normally do this, is assign a static IP to a virtual host and
set the IP as one of its aliases. That way all wild card domains point
to the same container.

Drew
P.S. I will think about this a bit more since it is valid point, I
wouldn't want to give out all my static IPs just for the wild cards to
work.

On Fri, 2005-03-25 at 12:36, Drew Jorgenson wrote:
 I think that would still be up to your dns settings. You could have
 something like
 
 * IN CNAME mydomain.com
 
 correct me if I'm wrong ;-)
 
 Drew.
 
 
 
 On Thu, 2005-03-24 at 17:46, George Sexton wrote:
  Oh, I see where you are headed. 
  
  One way to go would be to have a new service, with a new IP address, and
  make that the default host.
  
  That's out of the question since I host for so many people.
  
  George Sexton
  MH Software, Inc.
  http://www.mhsoftware.com/
  Voice: 303 438 9585

  
   -Original Message-
   From: Drew Jorgenson [mailto:[EMAIL PROTECTED] 
   Sent: Thursday, March 24, 2005 4:14 PM
   To: Tomcat Users List
   Subject: Re: Wild Card Hosting
   
   Are you able to assign a static IP address to your virtual 
   host, meaning
   do you have a static IP available?
   
   Drew.
   
   
   On Wed, 2005-03-23 at 10:42, George Sexton wrote:
Does anyone know if Tomcat supports Wild card hosting? Can 
   I specify a
pattern say

*.domain.com

And have all requests get forwarded to a specific host?

Making the host the default host is not an option, because 
   there is already
another default host that is used.



George Sexton
MH Software, Inc.
http://www.mhsoftware.com/
Voice: 303 438 9585
 



   -
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]


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



Re: Wild Card Hosting

2005-03-25 Thread Robert r. Sanders
I have a sort of similar setup; we have shell script that simple adds an 
Aliashostname/Alias to Tomcat's server.xml file; not the optimal 
solution, but it works for us for now.

Drew Jorgenson wrote:
Woops, I don't think that will work with Tomcat since the
subdomain.mydomain.com would be passed to it and Tomcat won't know which
container it goes to.
The way I normally do this, is assign a static IP to a virtual host and
set the IP as one of its aliases. That way all wild card domains point
to the same container.
Drew
P.S. I will think about this a bit more since it is valid point, I
wouldn't want to give out all my static IPs just for the wild cards to
work.
On Fri, 2005-03-25 at 12:36, Drew Jorgenson wrote:
 

I think that would still be up to your dns settings. You could have
something like
* IN CNAME mydomain.com
correct me if I'm wrong ;-)
Drew.

On Thu, 2005-03-24 at 17:46, George Sexton wrote:
   

Oh, I see where you are headed. 

One way to go would be to have a new service, with a new IP address, and
make that the default host.
That's out of the question since I host for so many people.
George Sexton
MH Software, Inc.
http://www.mhsoftware.com/
Voice: 303 438 9585
 

 

-Original Message-
From: Drew Jorgenson [mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 24, 2005 4:14 PM
To: Tomcat Users List
Subject: Re: Wild Card Hosting

Are you able to assign a static IP address to your virtual 
host, meaning
do you have a static IP available?

Drew.
On Wed, 2005-03-23 at 10:42, George Sexton wrote:
   

Does anyone know if Tomcat supports Wild card hosting? Can 
 

I specify a
   

pattern say
*.domain.com
And have all requests get forwarded to a specific host?
Making the host the default host is not an option, because 
 

there is already
   

another default host that is used.

George Sexton
MH Software, Inc.
http://www.mhsoftware.com/
Voice: 303 438 9585

 

-
   

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]
   


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

--
   Robert r. Sanders
   Chief Technologist
   iPOV
   (334) 821-5412
   www.ipov.net
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Wild Card Hosting

2005-03-25 Thread Drew Jorgenson
That set-up would only work for specific subdomains, what George is
trying to accomplish I think is point any (wild card) subdomain to a
specific virtual host without the use of static IPs for each virtual
host.

Although George, if you only need this done for a few virtual hosts and
you have a few static IPs available, use them if you can.

This is what I do:

1. Set this in my DNS:

mydomain.comIN A 1.2.3.4
www.mydomain.comIN A 1.2.3.4
*IN A 1.2.3.4

2. Assign the static IP as an alias in my virtual host

Host name=www.mydomain.com 
Aliasmydomain.com/Alias
Alias1.2.3.4/Alias
.


I hope this helps solve your problem somewhat.


Drew.


On Fri, 2005-03-25 at 12:47, Robert r. Sanders wrote:
 I have a sort of similar setup; we have shell script that simple adds an 
 Aliashostname/Alias to Tomcat's server.xml file; not the optimal 
 solution, but it works for us for now.
 
 Drew Jorgenson wrote:
 
 Woops, I don't think that will work with Tomcat since the
 subdomain.mydomain.com would be passed to it and Tomcat won't know which
 container it goes to.
 
 The way I normally do this, is assign a static IP to a virtual host and
 set the IP as one of its aliases. That way all wild card domains point
 to the same container.
 
 Drew
 P.S. I will think about this a bit more since it is valid point, I
 wouldn't want to give out all my static IPs just for the wild cards to
 work.
 
 On Fri, 2005-03-25 at 12:36, Drew Jorgenson wrote:
   
 
 I think that would still be up to your dns settings. You could have
 something like
 
 * IN CNAME mydomain.com
 
 correct me if I'm wrong ;-)
 
 Drew.
 
 
 
 On Thu, 2005-03-24 at 17:46, George Sexton wrote:
 
 
 Oh, I see where you are headed. 
 
 One way to go would be to have a new service, with a new IP address, and
 make that the default host.
 
 That's out of the question since I host for so many people.
 
 George Sexton
 MH Software, Inc.
 http://www.mhsoftware.com/
 Voice: 303 438 9585
   
 
   
 
 -Original Message-
 From: Drew Jorgenson [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, March 24, 2005 4:14 PM
 To: Tomcat Users List
 Subject: Re: Wild Card Hosting
 
 Are you able to assign a static IP address to your virtual 
 host, meaning
 do you have a static IP available?
 
 Drew.
 
 
 On Wed, 2005-03-23 at 10:42, George Sexton wrote:
 
 
 Does anyone know if Tomcat supports Wild card hosting? Can 
   
 
 I specify a
 
 
 pattern say
 
 *.domain.com
 
 And have all requests get forwarded to a specific host?
 
 Making the host the default host is not an option, because 
   
 
 there is already
 
 
 another default host that is used.
 
 
 
 George Sexton
 MH Software, Inc.
 http://www.mhsoftware.com/
 Voice: 303 438 9585
  
 
 
 
   
 
 -
 
 
 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]
 
 
 
 
 -
 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]



webappclassloader2

2005-03-25 Thread FRANCOIS Dufour
4.0.6 i like the no web admin for security reason i add no problem whith it
since a changed the server from 1.3 fsb 266 to2.5g fsb400
i ad first
unable to connect to any hosts due to 
exeption:java.net.connectexeption:conection refused:connectthe site went 
down after ive replaced some file one after the other
ran shutdown.bat than rerun startup.bat
this time java.exe started
this wen out  `/web-inf/classes/listeners/contextlistener.class`is missing?
but its up and running?
will i looked at mysql it was frozen could it bee that? noting strange in 
the localhost log at all


[EMAIL PROTECTED]
administrateur http://entre-nous.qc.tc


From: Richard Mixon (qwest) [EMAIL PROTECTED]
Reply-To: Tomcat Users List tomcat-user@jakarta.apache.org
To: Tomcat Users List tomcat-user@jakarta.apache.org
Subject: RE: webappclassloader
Date: Fri, 25 Mar 2005 03:50:24 -0700
Its hard to tell - you need to tell us more - e.g. what version of
Tomcat are you using.
I have gotten similar messages when I used the deployer app to undeploy
a webapp, but due to a lock on a file (i.e. a JSP file was open in a
text editor) all of the files were not deleted by the deployer app.
- Richard
FRANCOIS Dufour wrote:
 hi to all finaly working realy nice on a .org
 but i got this comming out  resource
 `/web-inf/classes/listeners/contextlistener.class`is missing?
 any idee of what it is?



 [EMAIL PROTECTED]
 administrateur http://monteregiechat.org



 -
 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]


Using SSL with IIS and Tomcat 4.1

2005-03-25 Thread Anderson, Rick A
Hi.
I have successfully set up IIS 5.0 as the web server in a DMZ servicing
Tomcat 4.1 as the application server in a secure zone.

Now I am trying to enable SSL from the client's browser through to the
application server. I cannot get this to work.

I don't know if I need to activate SSL in Tomcat, in IIS, or in both.
I've found conflicting articles on this. I have successfully enabled SSL
in Tomcat, but IIS can't access the application server when I do. I
tried to enable SSL in IIS, but had no luck at all there, even with a
little test web site.

Any help would be appreciated.

Richard A. Anderson, NCR Corporation
(519) 884-1710 X5543
(519) 884-0610 (fax)




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



Re: Help with SSL Cert config

2005-03-25 Thread Bill Barker
You need to put your CA cert into your Tomcat truststoreFile.  Otherwise, 
you client's cert won't be trusted.

joelsherriff [EMAIL PROTECTED] wrote in message 
news:[EMAIL PROTECTED]
I'm resending this message because a) for some reason I didn't see it on the 
list after I sent it and b) I never got any responses (maybe because of 
_a_).  So, if my original post did actually make it to the list, please 
forgive the re-post.

Hope someone can help.  I've searched through the archives and this seems to 
be a common problem, but even detailed instructions
have left me stumped.  I'm trying to get client certificates to be required 
by tomcat by setting clientAuth=true but I can't seem to figure out how
to get the client certificate to be accepted once I do that.  Here's what 
I've done to generate all the appropriate files (parts coped from
other posts to this list):

Further elaboration of what we're trying to do:  We want to require client 
authentication from our customers.  So, IIUC, we'll have to send them a 
signed client cert (p12) to install in their browser and java keystores. 
Again, IIUC, importing the CA certificate, that was used to sign the client 
cert, into the server keystore is what tells the server to accept the client 
certificate presented, because it will be signed by that CA (us).  Is my 
understanding correct?  If so, these steps appear to be correct, unless I've 
hosed something up along the way.

# Create a private key and certificate request
openssl req -new -subj /C=US/ST=North 
Carolina/L=Raleigh/CN=akuma-c -newkey rsa:1024 -nodes -out ca.csr -keyout 
ca.key

# Create CA's self-signed certificate
openssl x509 -trustout -signkey ca.key -days 365 -req -in ca.csr -out ca.pem

# Copy ca.pem to ca.crt, edit and change TRUSTED CERTIFICATE to 
CERTIFICATE
# import ca.crt into the Trusted Root Certificates Store in IE

#Import the CA certificate into the JDK certificate authorities keystore:
keytool -import -keystore %JAVA_HOME%/jre/lib/security/cacerts -file 
ca.pem -alias my_ca_alias -keypass changeit -storepass changeit

# Create a file to hold CA's serial numbers.
echo 02  ca.srl

# Create a keystore for the web server.
keytool -genkey -alias tomcat-sv -dname CN=akuma-c, OU=RD, 
O=MyOrganization, L=Raleigh, S=North Carolina, C=US -keyalg RSA -keypass 
changeit -storepass changeit -keysize 1024 -keystore 
server.keystore -storetype JKS

# Create a certificate request for the web server:
keytool -certreq -keyalg RSA -alias tomcat-sv -file server.csr -keystore 
server.keystore -storepass changeit

# Sign the certificate request:
openssl x509 -CA ca.pem -CAkey ca.key -CAserial ca.srl -req -in 
server.csr -out server.crt -days 365

# Import the signed server certificate into the server keystore:
keytool -import -alias tomcat-sv -keystore 
server.keystore -trustcacerts -file server.crt -storepass changeit

# Import the CA certificate into the server keystore:
keytool -import -alias my_ca_alias -keystore 
server.keystore -trustcacerts -file ca.pem -keypass changeit

# Create a client certificate request:
openssl req -new -newkey rsa:512 -nodes -out client1.req -keyout client1.key

# Sign the client certificate.
openssl x509 -CA ca.pem -CAkey ca.key -CAserial ca.srl -req -in 
client1.req -out client1.pem -days 365

# Generate a PKCS12 file containing client key and client certificate.
openssl pkcs12 -export -clcerts -in client1.pem -inkey client1.key -out 
client1.p12 -name Client

# Import the PKCS12 file into the web browser under Personal Certificates

# edit the server.xml file and set clientAuth=true and keystoreFile to point 
to my server.keystore file.

Once all this is done, neither IE nor my web app can talk to tomcat on the 
ssl port (8443) 




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



Re: Help with SSL Cert config

2005-03-25 Thread joelsherriff
I thought that's what this step:

# Import the CA certificate into the server keystore:
keytool -import -alias my_ca_alias -keystore
server.keystore -trustcacerts -file ca.pem -keypass changeit

was doing.  No?

- Original Message - 
From: Bill Barker [EMAIL PROTECTED]
To: tomcat-user@jakarta.apache.org
Sent: Friday, March 25, 2005 8:51 PM
Subject: Re: Help with SSL  Cert config


 You need to put your CA cert into your Tomcat truststoreFile.  Otherwise,
 you client's cert won't be trusted.

 joelsherriff [EMAIL PROTECTED] wrote in message
 news:[EMAIL PROTECTED]
 I'm resending this message because a) for some reason I didn't see it on
the
 list after I sent it and b) I never got any responses (maybe because of
 _a_).  So, if my original post did actually make it to the list, please
 forgive the re-post.

 Hope someone can help.  I've searched through the archives and this seems
to
 be a common problem, but even detailed instructions
 have left me stumped.  I'm trying to get client certificates to be
required
 by tomcat by setting clientAuth=true but I can't seem to figure out how
 to get the client certificate to be accepted once I do that.  Here's what
 I've done to generate all the appropriate files (parts coped from
 other posts to this list):

 Further elaboration of what we're trying to do:  We want to require client
 authentication from our customers.  So, IIUC, we'll have to send them a
 signed client cert (p12) to install in their browser and java keystores.
 Again, IIUC, importing the CA certificate, that was used to sign the
client
 cert, into the server keystore is what tells the server to accept the
client
 certificate presented, because it will be signed by that CA (us).  Is my
 understanding correct?  If so, these steps appear to be correct, unless
I've
 hosed something up along the way.

 # Create a private key and certificate request
 openssl req -new -subj /C=US/ST=North
 Carolina/L=Raleigh/CN=akuma-c -newkey rsa:1024 -nodes -out ca.csr -keyout
 ca.key

 # Create CA's self-signed certificate
 openssl x509 -trustout -signkey ca.key -days 365 -req -in ca.csr -out
ca.pem

 # Copy ca.pem to ca.crt, edit and change TRUSTED CERTIFICATE to
 CERTIFICATE
 # import ca.crt into the Trusted Root Certificates Store in IE

 #Import the CA certificate into the JDK certificate authorities keystore:
 keytool -import -keystore %JAVA_HOME%/jre/lib/security/cacerts -file
 ca.pem -alias my_ca_alias -keypass changeit -storepass changeit

 # Create a file to hold CA's serial numbers.
 echo 02  ca.srl

 # Create a keystore for the web server.
 keytool -genkey -alias tomcat-sv -dname CN=akuma-c, OU=RD,
 O=MyOrganization, L=Raleigh, S=North Carolina, C=US -keyalg RSA -keypass
 changeit -storepass changeit -keysize 1024 -keystore
 server.keystore -storetype JKS

 # Create a certificate request for the web server:
 keytool -certreq -keyalg RSA -alias tomcat-sv -file server.csr -keystore
 server.keystore -storepass changeit

 # Sign the certificate request:
 openssl x509 -CA ca.pem -CAkey ca.key -CAserial ca.srl -req -in
 server.csr -out server.crt -days 365

 # Import the signed server certificate into the server keystore:
 keytool -import -alias tomcat-sv -keystore
 server.keystore -trustcacerts -file server.crt -storepass changeit

 # Import the CA certificate into the server keystore:
 keytool -import -alias my_ca_alias -keystore
 server.keystore -trustcacerts -file ca.pem -keypass changeit

 # Create a client certificate request:
 openssl req -new -newkey rsa:512 -nodes -out client1.req -keyout
client1.key

 # Sign the client certificate.
 openssl x509 -CA ca.pem -CAkey ca.key -CAserial ca.srl -req -in
 client1.req -out client1.pem -days 365

 # Generate a PKCS12 file containing client key and client certificate.
 openssl pkcs12 -export -clcerts -in client1.pem -inkey client1.key -out
 client1.p12 -name Client

 # Import the PKCS12 file into the web browser under Personal Certificates

 # edit the server.xml file and set clientAuth=true and keystoreFile to
point
 to my server.keystore file.

 Once all this is done, neither IE nor my web app can talk to tomcat on the
 ssl port (8443)




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





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



Re: Installing Tomcat service: Unable to manually insert values for JvmMx and JvmMs in registry

2005-03-25 Thread Lakshmi Narayanan K.
Hello All,

I am currently using Tomcat 5.0.28 coupled with JK2 connector to talk
to Apache 2.0.48.

I am encountering a problem similar to as reported in the following link:
 http://issues.apache.org/bugzilla/show_bug.cgi?id=32063 

I am in a position where I *CANNOT* access the GUI based Tomcat
configurator for setting the values of JvmMx and JvmMx. So my only
way out is to use the tomcat command line utility to modify the Tomcat
parameters.

However, on the same lines as both Sigal and Ilona have
faced (in the above mentioned bugzilla link), the values of JvmMs and
JvmMx that get set (as shown in the registry under
HKEY_LOCAL_MACHINE\SOFTWARE\Apache Software Foundation\Procrun
2.0\OvTomcatA\Parameters\Java) are always set to 0 irrespective of whatever
value i set.

I even tried to manually execute the following but to no avail (I am
installing Tomcat service as OvTomcatA):
tomcat5.exe //US//OvTomcatA --JvmMs 256 --JvmMx 512

I desperately need to fix this problem. Is there any way out for me to
set these values manually using the tomcat5 command line tool??

I must say here that when trying to set via the GUI based Tomcat
configurator, the values of JvmMs and JvmMx get set as expected.

Eagerly awaiting your reply,

Warm Regards,

- Lakshmi Narayanan K.

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



Re: Problem with Tomcat Upgrade 4.0 to 5.5

2005-03-25 Thread QM
On Fri, Mar 25, 2005 at 09:08:15AM -0500, Beau Hebert wrote:
: I am in the processs of upgrading from Tomcat 4.0 to Tomcat 5.5. I have an
: application that runs on Linux-Java-Tomcat-MySQL.
: [snip]
: javax.servlet.ServletException: javax/mail/Message

As someone else already pointed out, you no longer have to (nor should)
set your own classpath.

Second, Tomcat no longer ships with the JavaMail JARs; either copy those
from your old install or just download new ones from java.sun.com.

Third, I have a brief Tomcat 4.x - 5.x upgrade guide on my website:

http://www.brandxdev.net/misc/index.site

Feel free to give that a skim.

-QM


-- 

software   -- http://www.brandxdev.net/
tech news  -- http://www.RoarNetworX.com/
code scan  -- http://www.JxRef.org/

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



Re: Installing Tomcat service: Unable to manually insert values for JvmMx and JvmMs in registry

2005-03-25 Thread Jason Bainbridge
On Sat, 26 Mar 2005 07:30:23 +0530, Lakshmi Narayanan K.
[EMAIL PROTECTED] wrote:
 Hello All,
 
 I am currently using Tomcat 5.0.28 coupled with JK2 connector to talk
 to Apache 2.0.48.
 
 I am encountering a problem similar to as reported in the following link:
  http://issues.apache.org/bugzilla/show_bug.cgi?id=32063 
 
 I am in a position where I *CANNOT* access the GUI based Tomcat
 configurator for setting the values of JvmMx and JvmMx. So my only
 way out is to use the tomcat command line utility to modify the Tomcat
 parameters.
 
 However, on the same lines as both Sigal and Ilona have
 faced (in the above mentioned bugzilla link), the values of JvmMs and
 JvmMx that get set (as shown in the registry under
 HKEY_LOCAL_MACHINE\SOFTWARE\Apache Software Foundation\Procrun
 2.0\OvTomcatA\Parameters\Java) are always set to 0 irrespective of whatever
 value i set.

Why don't you just set them via regedit? I'm not in front of any of my
wrk boxes right now and I can't be bothered remoting in to get the
entries you need to edit but it is pretty straight forward.

-- 
Jason Bainbridge
http://kde.org - [EMAIL PROTECTED]
Personal Site - http://jasonbainbridge.com

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



Re: Help with SSL Cert config

2005-03-25 Thread Bill Barker

joelsherriff [EMAIL PROTECTED] wrote in message 
news:[EMAIL PROTECTED]
I thought that's what this step:

 # Import the CA certificate into the server keystore:
 keytool -import -alias my_ca_alias -keystore
 server.keystore -trustcacerts -file ca.pem -keypass changeit

 was doing.  No?


No.  That's putting it into your keystoreFile.  The keystoreFile is to 
identify you.  The truststoreFile is to identify other people.

 - Original Message - 
 From: Bill Barker [EMAIL PROTECTED]
 To: tomcat-user@jakarta.apache.org
 Sent: Friday, March 25, 2005 8:51 PM
 Subject: Re: Help with SSL  Cert config


 You need to put your CA cert into your Tomcat truststoreFile.  Otherwise,
 you client's cert won't be trusted.

 joelsherriff [EMAIL PROTECTED] wrote in message
 news:[EMAIL PROTECTED]
 I'm resending this message because a) for some reason I didn't see it on
 the
 list after I sent it and b) I never got any responses (maybe because of
 _a_).  So, if my original post did actually make it to the list, please
 forgive the re-post.

 Hope someone can help.  I've searched through the archives and this seems
 to
 be a common problem, but even detailed instructions
 have left me stumped.  I'm trying to get client certificates to be
 required
 by tomcat by setting clientAuth=true but I can't seem to figure out how
 to get the client certificate to be accepted once I do that.  Here's what
 I've done to generate all the appropriate files (parts coped from
 other posts to this list):

 Further elaboration of what we're trying to do:  We want to require 
 client
 authentication from our customers.  So, IIUC, we'll have to send them a
 signed client cert (p12) to install in their browser and java keystores.
 Again, IIUC, importing the CA certificate, that was used to sign the
 client
 cert, into the server keystore is what tells the server to accept the
 client
 certificate presented, because it will be signed by that CA (us).  Is my
 understanding correct?  If so, these steps appear to be correct, unless
 I've
 hosed something up along the way.

 # Create a private key and certificate request
 openssl req -new -subj /C=US/ST=North
 Carolina/L=Raleigh/CN=akuma-c -newkey rsa:1024 -nodes -out 
 ca.csr -keyout
 ca.key

 # Create CA's self-signed certificate
 openssl x509 -trustout -signkey ca.key -days 365 -req -in ca.csr -out
 ca.pem

 # Copy ca.pem to ca.crt, edit and change TRUSTED CERTIFICATE to
 CERTIFICATE
 # import ca.crt into the Trusted Root Certificates Store in IE

 #Import the CA certificate into the JDK certificate authorities keystore:
 keytool -import -keystore %JAVA_HOME%/jre/lib/security/cacerts -file
 ca.pem -alias my_ca_alias -keypass changeit -storepass changeit

 # Create a file to hold CA's serial numbers.
 echo 02  ca.srl

 # Create a keystore for the web server.
 keytool -genkey -alias tomcat-sv -dname CN=akuma-c, OU=RD,
 O=MyOrganization, L=Raleigh, S=North Carolina, C=US -keyalg RSA -keypass
 changeit -storepass changeit -keysize 1024 -keystore
 server.keystore -storetype JKS

 # Create a certificate request for the web server:
 keytool -certreq -keyalg RSA -alias tomcat-sv -file server.csr -keystore
 server.keystore -storepass changeit

 # Sign the certificate request:
 openssl x509 -CA ca.pem -CAkey ca.key -CAserial ca.srl -req -in
 server.csr -out server.crt -days 365

 # Import the signed server certificate into the server keystore:
 keytool -import -alias tomcat-sv -keystore
 server.keystore -trustcacerts -file server.crt -storepass changeit

 # Import the CA certificate into the server keystore:
 keytool -import -alias my_ca_alias -keystore
 server.keystore -trustcacerts -file ca.pem -keypass changeit

 # Create a client certificate request:
 openssl req -new -newkey rsa:512 -nodes -out client1.req -keyout
 client1.key

 # Sign the client certificate.
 openssl x509 -CA ca.pem -CAkey ca.key -CAserial ca.srl -req -in
 client1.req -out client1.pem -days 365

 # Generate a PKCS12 file containing client key and client certificate.
 openssl pkcs12 -export -clcerts -in client1.pem -inkey client1.key -out
 client1.p12 -name Client

 # Import the PKCS12 file into the web browser under Personal Certificates

 # edit the server.xml file and set clientAuth=true and keystoreFile to
 point
 to my server.keystore file.

 Once all this is done, neither IE nor my web app can talk to tomcat on 
 the
 ssl port (8443)




 -
 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]



JNDI Realm Issue with 5.5.7

2005-03-25 Thread Ole Ersoy
Hello Everybody,

I'm attempting to configure JNDI authentication. 

I think I must be missing something obvious in the
configuration
files, because I get the login error page when
entering non user information,
and when I type in the correct username and password,
tomcat gives me this:

HTTP Status 403 - Access to the requested resource has
been denied

I would very much appreciate any pointers on the
following application structure
to get this to work.  The protected page that I am
expecting to see is index.jsp.
I can connect to OpenLDAP fine via JXPlorer (JNDI
Client) using user + password authentication
so I know that the ldapuser (The name of the user) and
the corresponding password works.

LOCATION OF JSP PAGES WITHIN THE DEPLOYMENT DIRECTORY
/testaaa/login.jsp
/testaaa/error.jsp
/testaaa/main/index.jsp

CONTEXT DESCRIPTOR
Context path=/testaaa docBase=testaaa debug=0
reloadable=true
Realm 
  
className=org.apache.catalina.realm.JNDIRealm
   debug=99
   connectionURL=ldap://localhost:389;
  
userPattern=uid={0},ou=People,dc=example,dc=com
   roleBase=ou=roles,dc=example,dc=com
   rolename=cn
   rolesearch=(roleOccupant={0})/
/Context

DEPLOYMENT DESCRIPTOR
?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 testaaa/display-name
  description
 A test to see whether LDAP authentication works
  /description


  servlet
servlet-nameindex/servlet-name
jsp-file/main/index.jsp/jsp-file
  /servlet

  servlet-mapping
servlet-nameindex/servlet-name
url-pattern/main/*/url-pattern
  /servlet-mapping

  security-constraint
display-nametestaaa
Authentication/display-name
web-resource-collection
  web-resource-nameindex/web-resource-name
  url-pattern/*/url-pattern
/web-resource-collection
auth-constraint
  role-nameprojectmanager/role-name
/auth-constraint
  /security-constraint

  login-config
auth-methodFORM/auth-method
realm-nametestrealm/realm-name
form-login-config
  form-login-page/login.jsp/form-login-page
  form-error-page/error.jsp/form-error-page
/form-login-config
  /login-config

  security-role
   descriptionThe project manager role/description
   role-nameprojectmanager/role-name
  /security-role
/web-app

LDIF RECORDS (I Left out the top level entries)
dn: uid=ldapuser,ou=People,dc=example,dc=com
uid: ldapuser
cn: ldapuser
objectClass: account
objectClass: posixAccount
objectClass: top
objectClass: shadowAccount
userPassword:
{crypt}$1$5cgeDTOi$8QTMd3SlGy9FS563ffNHs0
shadowLastChange: 12828
shadowMax: 9
shadowWarning: 7
loginShell: /bin/bash
uidNumber: 502
gidNumber: 100
homeDirectory: /home/ldapuser

#testuser projectmanager role
dn: cn=projectmanager,ou=roles,dc=example,dc=com
objectclass: organizationalRole
cn: projectmanager
description: project manager role
roleOccupant: uid=ldapuser,ou=People,dc=example,dc=com

Can anyone see why tomcat does not return index.jsp
after the correct user name
and password is entered?

Thanks a gazillion,
- Ole



__ 
Do you Yahoo!? 
Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/ 

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



tomcat 5.5.7 / windowsXP / access database

2005-03-25 Thread edencane
Hi,

I've recently started to experiment with tomcat 5.5.7 on windows XP,
trying to access an Access (.mdb) database.
I've set up a datasource in windowsXP administration tools and used
the the tomcat administration (which had to be installed separately)
to configure a datasource in tomcat.

this gave me the following in 'server.xml' under GlobalNamingResources:
___
/
   Resource
 name=movies
 type=javax.sql.DataSource
 password=
 driverClassName=sun.jdbc.odbc.JdbcOdbcDriver
 maxIdle=2
 maxWait=5000
 username=
 url=jdbc:odbc:movies
 maxActive=4/
\___

I then got a servlet going with the following:
___
/
   Connection con = null;
   try {
   // Load the Driver class file
   Class.forName(sun.jdbc.odbc.JdbcOdbcDriver);
   out.println(Getting Connection!);
   // Make a connection to the ODBC datasource Movie Catalog
   // In this example we are opening a connection to the
   // database with every request.
   con = DriverManager.getConnection(jdbc:odbc:movies,,);
   if ( con == null ) {
   out.println(no Connection!);
   }
   else {
   out.println(we have a connection);
   }
\___

restarted tomcat and tried but get the following message after an
SqlException is thrown.
___
/
   SQLException -- [Microsoft][ODBC Driver Manager] Data source name
not found and no default
   driver specified
\___

In other words it chokes at:
___
/
   con = DriverManager.getConnection(jdbc:odbc:movies,,);
\___

any hints as to what I'm doing wrong?

thanks,
kind regards,
Luke

--
  /  /  _
 /_ /_/ / /=
 0421 276 282

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



Re: tomcat 5.5.7 / windowsXP / access database

2005-03-25 Thread Parsons Technical Services
Check to see if you have a resource link in your context.xml .
Without it your app can't see the resource.
Doug
- Original Message - 
From: [EMAIL PROTECTED]
To: tomcat-user@jakarta.apache.org
Sent: Saturday, March 26, 2005 2:15 AM
Subject: tomcat 5.5.7 / windowsXP / access database


Hi,
I've recently started to experiment with tomcat 5.5.7 on windows XP,
trying to access an Access (.mdb) database.
I've set up a datasource in windowsXP administration tools and used
the the tomcat administration (which had to be installed separately)
to configure a datasource in tomcat.
this gave me the following in 'server.xml' under GlobalNamingResources:
___
/
  Resource
name=movies
type=javax.sql.DataSource
password=
driverClassName=sun.jdbc.odbc.JdbcOdbcDriver
maxIdle=2
maxWait=5000
username=
url=jdbc:odbc:movies
maxActive=4/
\___
I then got a servlet going with the following:
___
/
  Connection con = null;
  try {
  // Load the Driver class file
  Class.forName(sun.jdbc.odbc.JdbcOdbcDriver);
  out.println(Getting Connection!);
  // Make a connection to the ODBC datasource Movie Catalog
  // In this example we are opening a connection to the
  // database with every request.
  con = DriverManager.getConnection(jdbc:odbc:movies,,);
  if ( con == null ) {
  out.println(no Connection!);
  }
  else {
  out.println(we have a connection);
  }
\___
restarted tomcat and tried but get the following message after an
SqlException is thrown.
___
/
  SQLException -- [Microsoft][ODBC Driver Manager] Data source name
not found and no default
  driver specified
\___
In other words it chokes at:
___
/
  con = DriverManager.getConnection(jdbc:odbc:movies,,);
\___
any hints as to what I'm doing wrong?
thanks,
kind regards,
Luke
--
 /  /  _
/_ /_/ / /=
0421 276 282
-
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]