RE: accessing ejbs deployed in jboss from tomcat/apache

2002-09-22 Thread Nani Jon


Ray:
Thanks for the reply. I actually solved the problem. I needed to make an entry in 
tomcat4-services.xml located in jboss_tomcat/server/default/deploy directory:
!-- Define an AJP 1.3 Connector on port 8009 --
Connector className=org.apache.ajp.tomcat4.Ajp13Connector
   port=8009 minProcessors=5 maxProcessors=75
   acceptCount=10 debug=0/

BTW: This is the same entry in the server.xml file which is used by embeded tomcat, 
located at jboss_tomcat/catalina level. Everything is working fine. I can access all 
of my EJBs deployed to the /server/default/deploy directoy. There are not really any 
good HOW-TOs in this area. I hope someone with a better level of knowledge than me 
will do this. I will try one and post it, time permitting.
Cheers,
Nanijon
 Ray Madigan wrote:are you connecting to your beans through RMI or some other 
mechanism. I am
implementing a simular situation using apache2 - mod_jk2 - tomcat -
jonas. I have to tell java through setProperties where to locate the rmi
registry. if this doesn't help you will have to send more information
- like what error messages do you get?

Thanks

-Original Message-
From: Nani Jon [mailto:[EMAIL PROTECTED]]
Sent: Saturday, September 21, 2002 1:44 AM
To: tomcat users
Subject: accessing ejbs deployed in jboss from tomcat/apache



Hi all:

I have been able to integrate jboss-3.0.0_tomcat-4.0.3 with apache 2,
mod_jk2.dll (on a win2k box). The static content is getting displayed
correctly. The problem is that I am not able to access my EJBs using apache
which talks to the jboss embeded tomcat. I can access my EJBs on port 8080
(the embeded tomcat) without any problems. Am I supposed to make a reference
to my EJBs somewhere else as well? And where? There should be a way for the
embeded tomcat when it receives a request from apache to talk to jboss.
After all they are running in the same VM. Any help will be appreciated.

Regards,

Nanijon.



-
Do You Yahoo!?
Yahoo! Finance - Get real-time stock quotes


--
To unsubscribe, e-mail: 
For additional commands, e-mail: 



-
Do You Yahoo!?
Yahoo! Finance - Get real-time stock quotes


Re: Postgresql DataSource Tomcat 4.1 SQLException

2002-09-22 Thread Ben Walding

The JNDI namespace you want is
java:comp/env

and not java:/comp/env

But I'm not sure if is the cause of the problem.




Alfonso Martinez wrote:

Hi Paul,

I am a newbie too, but trying to help. I had a problem like yours recently and found 
an error in my server.xml. I know you checked that file already, but can you send 
those (also web.xml) files to me please to see what I can do? Thanks

Jose 

On Fri, Sep 20, 2002 at 11:10:41AM -0500, Paul Salazar wrote:
  

Hi,

I am trying to setup a postgresql datasource on tomcat 4.1 with much
frustration.
I have read all the threads out there concerning this matter and I can't
see to
find anyone who has a working example. What I have is this:

Redhat 7.2 server running:
Postgresql 7.2
Tomcat 4.1

I have a working Tomcat app that can connect to the Db and perform
queries when manually loading the driver
'Class.forName(org.postgresql.Driver);
and then doing a getConnection using the URL, Name, Password.

But when trying to get a connection using a Datasource, as in,

Context ctx = new InitialContext();
Context envctx = (Context)ctx.lookup(java:/comp/env);
DataSource ds = (DataSource)envctx.lookup(jdbc/postgres); //jndi name
of the datasource
Connection conn = ds.getConnection();

the getConnection() statement throws an SQLException: Cannot load JDBC
driver class 'null'

I have gone over all the server.xml and web.xml files with a fine tooth
comb and assure
you that is not the problem. I have also tried using the jxDBCon drivers
with the same
results. I have come to the conclusion that it must be a tomcat problem.
Has anyone
gotten this to work with this config??

Paul Salazar




  

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



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


  





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




Re: How to use Port 80?

2002-09-22 Thread Ben Walding

You don't want to change /etc/services as it is simply a directory of 
mappings between well known service names and ports.

Tomcat runs as the user tomcat4 on RedHat 7.x.  This user is unable to 
bind to port 80.  People have had success with changing the user to 
root, but this is generally considered a bad way of doing things. 
 You'll want to check the mail archives as this has been discussed quite 
a bit.

[EMAIL PROTECTED] wrote:

I looked in /etc/services and found 
...
ttp80/tcp  www www-http# WorldWideWeb HTTP
http   80/udp  www www-http# HyperText Transfer Protocol
...

I'm not sure how got there unless it was just part of RedHat 7.3.  Im not
running Apache or any other web server.  Im trying to use Tomcat4 as my
Web server.  Should I change /etc/services and if so how?

thanks again

  

-- Original Message --
Reply-To: Tomcat Users List [EMAIL PROTECTED]
From: Arthur Chan [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Subject: Re: How to use Port 80?
Date: Sat, 21 Sep 2002 23:50:41 -0400


Normally that's the default - Apache  (not Tomcat) uses it.
Look at httpd.conf , the Listen directive, should read something like
192.168.4.5:80 ie the ip-addr:port
In default RH  u will find that under /etc/httpd/conf
To look at a static list of port assignments : /etc/services
I am not sure what u r tyring to do , but I hope that's helpful.

- Original Message -
From: [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Saturday, September 21, 2002 11:36 PM
Subject: Re: How to use Port 80?




not intentionally, how would I know if I did that?

  

-- Original Message --
Reply-To: Tomcat Users List [EMAIL PROTECTED]
From: Arthur Chan [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Subject: Re: How to use Port 80?
Date: Sat, 21 Sep 2002 23:34:53 -0400


Could you have assigned 80 to HTTP requests already ???

- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, September 21, 2002 11:03 PM
Subject: How to use Port 80?




Hi

Im running Tomcat 4.1.10 on Red Hat 7.3.

Im trying to change the port to 80 from 8080.

I made the following change in my server.xml

From:

Connector className=org.apache.coyote.tomcat4.CoyoteConnector
   port=8080 minProcessors=5 maxProcessors=75
   enableLookups=true redirectPort=8443
   acceptCount=10 debug=0 connectionTimeout=2
   useURIValidationHack=false /

to:

Connector className=org.apache.coyote.tomcat4.CoyoteConnector
   port=80 minProcessors=5 maxProcessors=75
   enableLookups=true redirectPort=8443
   acceptCount=10 debug=0 connectionTimeout=2
   useURIValidationHack=false /

then I restart Tomcat4 with the Service Configuration utility and
  

I
  

get


the following message in the browser when I go to http://localhost

An error occured while loading http://localhost/:

Could not connect to host localhost

Thanks in advance for any help
Hal Haig






--
To unsubscribe, e-mail:
  

mailto:[EMAIL PROTECTED]


For additional commands, e-mail:
  

mailto:[EMAIL PROTECTED]


--
To unsubscribe, e-mail:


mailto:[EMAIL PROTECTED]


For additional commands, e-mail:


mailto:[EMAIL PROTECTED]


--
To unsubscribe, e-mail:
  

mailto:[EMAIL PROTECTED]


For additional commands, e-mail:
  

mailto:[EMAIL PROTECTED]


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





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


  





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




Question about connecting Apache (2.0.40), tomcat (4.1.10) on Windows2000

2002-09-22 Thread ric

I have installed and configured apache (2.0.40)(it's currently hosting 
two  URLs) and tomcat 4.1.10 on a windows 2000 advance server machine. 
Each, by themselves, are up and running. I am trying to integrate tomcat 
into the apache server and have failed. Has anyone done this and could 
you share the procedure (and configuration files).

I am new to these servers and most of the documentation assumes Unix and 
I don't know how to convert what I am reading into what is necessary for 
  a windows machine.

Thanks for any help.
ric ( ric @ garlic.com)

PS I am currently not prepared to compile either server and am using 
straight binaries.


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




RE: mod_jk2, virtual hosts, JkUriSet

2002-09-22 Thread Mladen Turk


Could you guys thest against the current CVS.

 -Original Message-
 From: Dom [mailto:[EMAIL PROTECTED]] 
 
 [uri:/host1.net/*.jsp]
 info=host1.net default context.
 group=lb
 debug=0
 
 [uri:/host2.net/*.jsp]
 info=host2.net default context.
 group=lb
 debug=0
 

This is wrong!!!
All the host definition _must_ not start with the forward slash.
So... HOSTNAME/URI (this is how we figure out what is the host and what
is the uri).

Correct one would be:

[uri:host1.net]
info=host1.net hostname definition.

[uri:host2.net]
info=host2.net hostname definition.

#Now you can make all the mappings

[uri:host1.net/*.jsp]
info=host1.net extension mapping.

[uri:host2.net/*.jsp]
info=host2.net extension mapping.



MT.


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




Re: mod_jk2, virtual hosts, JkUriSet

2002-09-22 Thread Dom

You're right, it was a typo error as I had changed the real virtual hosts
name !

Dom
- Original Message -
From: Mladen Turk [EMAIL PROTECTED]
To: 'Tomcat Users List' [EMAIL PROTECTED]
Cc: Dom [EMAIL PROTECTED]; Dmitry Letin [EMAIL PROTECTED]
Sent: Sunday, September 22, 2002 12:05 PM
Subject: RE: mod_jk2, virtual hosts, JkUriSet



 Could you guys thest against the current CVS.

  -Original Message-
  From: Dom [mailto:[EMAIL PROTECTED]]
 
  [uri:/host1.net/*.jsp]
  info=host1.net default context.
  group=lb
  debug=0
 
  [uri:/host2.net/*.jsp]
  info=host2.net default context.
  group=lb
  debug=0
 

 This is wrong!!!
 All the host definition _must_ not start with the forward slash.
 So... HOSTNAME/URI (this is how we figure out what is the host and what
 is the uri).

 Correct one would be:

 [uri:host1.net]
 info=host1.net hostname definition.

 [uri:host2.net]
 info=host2.net hostname definition.

 #Now you can make all the mappings

 [uri:host1.net/*.jsp]
 info=host1.net extension mapping.

 [uri:host2.net/*.jsp]
 info=host2.net extension mapping.



 MT.





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




Re: How to use Port 80?

2002-09-22 Thread hal

thanks

I looked back at the archieves and found out how to change the user to Root.
 I did that and it worked.  I did find some other messages indicating what
you said, which was running as ROOT might be bad idea from a system adminstration
perspective.  Unfortunately, I found no other way to run on Port 80.  Is
there another way?


-- Original Message --
Reply-To: Tomcat Users List [EMAIL PROTECTED]
Date: Sun, 22 Sep 2002 18:38:01 +1000
From: Ben Walding [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Subject: Re: How to use Port 80?


You don't want to change /etc/services as it is simply a directory of
mappings between well known service names and ports.

Tomcat runs as the user tomcat4 on RedHat 7.x.  This user is unable to

bind to port 80.  People have had success with changing the user to
root, but this is generally considered a bad way of doing things.
 You'll want to check the mail archives as this has been discussed quite

a bit.

[EMAIL PROTECTED] wrote:

I looked in /etc/services and found
...
ttp80/tcp  www www-http# WorldWideWeb HTTP
http   80/udp  www www-http# HyperText Transfer Protocol
...

I'm not sure how got there unless it was just part of RedHat 7.3.  Im
not
running Apache or any other web server.  Im trying to use Tomcat4 as my
Web server.  Should I change /etc/services and if so how?

thanks again



-- Original Message --
Reply-To: Tomcat Users List [EMAIL PROTECTED]
From: Arthur Chan [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Subject: Re: How to use Port 80?
Date: Sat, 21 Sep 2002 23:50:41 -0400


Normally that's the default - Apache  (not Tomcat) uses it.
Look at httpd.conf , the Listen directive, should read something like
192.168.4.5:80 ie the ip-addr:port
In default RH  u will find that under /etc/httpd/conf
To look at a static list of port assignments : /etc/services
I am not sure what u r tyring to do , but I hope that's helpful.

- Original Message -
From: [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Saturday, September 21, 2002 11:36 PM
Subject: Re: How to use Port 80?




not intentionally, how would I know if I did that?



-- Original Message --
Reply-To: Tomcat Users List [EMAIL PROTECTED]
From: Arthur Chan [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Subject: Re: How to use Port 80?
Date: Sat, 21 Sep 2002 23:34:53 -0400


Could you have assigned 80 to HTTP requests already ???

- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, September 21, 2002 11:03 PM
Subject: How to use Port 80?




Hi

Im running Tomcat 4.1.10 on Red Hat 7.3.

Im trying to change the port to 80 from 8080.

I made the following change in my server.xml

From:

Connector className=org.apache.coyote.tomcat4.CoyoteConnector
   port=8080 minProcessors=5 maxProcessors=75
   enableLookups=true redirectPort=8443
   acceptCount=10 debug=0 connectionTimeout=2
   useURIValidationHack=false /

to:

Connector className=org.apache.coyote.tomcat4.CoyoteConnector
   port=80 minProcessors=5 maxProcessors=75
   enableLookups=true redirectPort=8443
   acceptCount=10 debug=0 connectionTimeout=2
   useURIValidationHack=false /

then I restart Tomcat4 with the Service Configuration utility and


I


get


the following message in the browser when I go to http://localhost

An error occured while loading http://localhost/:

Could not connect to host localhost

Thanks in advance for any help
Hal Haig






--
To unsubscribe, e-mail:


mailto:[EMAIL PROTECTED]


For additional commands, e-mail:


mailto:[EMAIL PROTECTED]


--
To unsubscribe, e-mail:


mailto:[EMAIL PROTECTED]


For additional commands, e-mail:


mailto:[EMAIL PROTECTED]


--
To unsubscribe, e-mail:


mailto:[EMAIL PROTECTED]


For additional commands, e-mail:


mailto:[EMAIL PROTECTED]


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





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








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



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




Re: How to use Port 80?

2002-09-22 Thread Ben Walding

You can set up a port forward / filter such that traffic that comes in 
on port 80 gets filtered through to port 8080

The other options is to use Apache out the front on port 80 and then 
mod_jk / jk2 / mod_webapp to connect tomcat into apache.

I can't recommend one or the other for these as I don't run in either 
configuration.


It's all a big game!

Ben


[EMAIL PROTECTED] wrote:

thanks

I looked back at the archieves and found out how to change the user to Root.
 I did that and it worked.  I did find some other messages indicating what
you said, which was running as ROOT might be bad idea from a system adminstration
perspective.  Unfortunately, I found no other way to run on Port 80.  Is
there another way?


  

-- Original Message --
Reply-To: Tomcat Users List [EMAIL PROTECTED]
Date: Sun, 22 Sep 2002 18:38:01 +1000
From: Ben Walding [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Subject: Re: How to use Port 80?


You don't want to change /etc/services as it is simply a directory of 
mappings between well known service names and ports.

Tomcat runs as the user tomcat4 on RedHat 7.x.  This user is unable to



  

bind to port 80.  People have had success with changing the user to 
root, but this is generally considered a bad way of doing things. 
You'll want to check the mail archives as this has been discussed quite

a bit.

[EMAIL PROTECTED] wrote:



I looked in /etc/services and found 
...
ttp80/tcp  www www-http# WorldWideWeb HTTP
http   80/udp  www www-http# HyperText Transfer Protocol
...

I'm not sure how got there unless it was just part of RedHat 7.3.  Im
  

not
  

running Apache or any other web server.  Im trying to use Tomcat4 as my
Web server.  Should I change /etc/services and if so how?

thanks again

 

  

-- Original Message --
Reply-To: Tomcat Users List [EMAIL PROTECTED]
From: Arthur Chan [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Subject: Re: How to use Port 80?
Date: Sat, 21 Sep 2002 23:50:41 -0400


Normally that's the default - Apache  (not Tomcat) uses it.
Look at httpd.conf , the Listen directive, should read something like
192.168.4.5:80 ie the ip-addr:port
In default RH  u will find that under /etc/httpd/conf
To look at a static list of port assignments : /etc/services
I am not sure what u r tyring to do , but I hope that's helpful.

- Original Message -
From: [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Saturday, September 21, 2002 11:36 PM
Subject: Re: How to use Port 80?


   



not intentionally, how would I know if I did that?

 

  

-- Original Message --
Reply-To: Tomcat Users List [EMAIL PROTECTED]
From: Arthur Chan [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Subject: Re: How to use Port 80?
Date: Sat, 21 Sep 2002 23:34:53 -0400


Could you have assigned 80 to HTTP requests already ???

- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, September 21, 2002 11:03 PM
Subject: How to use Port 80?


   



Hi

Im running Tomcat 4.1.10 on Red Hat 7.3.

Im trying to change the port to 80 from 8080.

I made the following change in my server.xml

From:

Connector className=org.apache.coyote.tomcat4.CoyoteConnector
  port=8080 minProcessors=5 maxProcessors=75
  enableLookups=true redirectPort=8443
  acceptCount=10 debug=0 connectionTimeout=2
  useURIValidationHack=false /

to:

Connector className=org.apache.coyote.tomcat4.CoyoteConnector
  port=80 minProcessors=5 maxProcessors=75
  enableLookups=true redirectPort=8443
  acceptCount=10 debug=0 connectionTimeout=2
  useURIValidationHack=false /

then I restart Tomcat4 with the Service Configuration utility and
 

  

I
 

  

get
   



the following message in the browser when I go to http://localhost

An error occured while loading http://localhost/:

Could not connect to host localhost

Thanks in advance for any help
Hal Haig






--
To unsubscribe, e-mail:
 

  

mailto:[EMAIL PROTECTED]
   



For additional commands, e-mail:
 

  

mailto:[EMAIL PROTECTED]
   

--
To unsubscribe, e-mail:
   



mailto:[EMAIL PROTECTED]
   



For additional commands, e-mail:
   



mailto:[EMAIL PROTECTED]
   



--
To unsubscribe, e-mail:
 

  

mailto:[EMAIL PROTECTED]
   



For additional commands, e-mail:
 

  

mailto:[EMAIL PROTECTED]
   

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

   



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


 

  



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

which proxy (mod_jk,jk2,webapp etc. (was Re: How to use Port 80?)

2002-09-22 Thread Matthew Hannigan


You can also use Apache's standard mod_proxy, but this
forward all traffic to tomcat.

Does anyone have an overview of what the pros and cons
of each of these possibilties?

I'm looking for ease of setup, features, stability,
is it currently being maintained, improved etc.

Regards,



Ben Walding wrote:
 You can set up a port forward / filter such that traffic that comes in 
 on port 80 gets filtered through to port 8080
 
 The other options is to use Apache out the front on port 80 and then 
 mod_jk / jk2 / mod_webapp to connect tomcat into apache.
 
 I can't recommend one or the other for these as I don't run in either 
 configuration.
 
 
 It's all a big game!
 
 Ben
 


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




Re: How to block listings on a SPECIFIC directory

2002-09-22 Thread Tim Funk

The filter will run as fast as the code you put in it.

adi wrote:
 Thanks for that one.
 Just one more question:
 I assume there is some kind of overhead doing this
 all the requests will be streamed through the filter etc.
 It a serious problem?
 
 Adi
 
 -Original Message-
 From: Tim Funk [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, September 19, 2002 2:10 PM
 To: Tomcat Users List
 Subject: Re: How to block listings on a SPECIFIC directory
 
 
 More info:
 http://www.google.com/search?hl=enlr=ie=UTF-8oe=UTF-8q=servlet+filter
 
 The definitive reference:
 Java Servlet Specification 2.3 (at java.sun.com)
 Chapter 6: Filters
 
 
 adi wrote:
 
what do you mean by writing a filter?
In java?
Entry in web.xml ?

can you please reference me to some reading on 'filters' ?

Thanks,
Adi


-Original Message-
From: Tim Funk [mailto:[EMAIL PROTECTED]]
Sent: Thursday, September 19, 2002 1:53 PM
To: Tomcat Users List
Subject: Re: How to block listings on a SPECIFIC directory


Nope  - but you can write a filter to detect that condition and deny
access as desired.

adi wrote:


Hello,

I am trying to enable listing on one directory ( and its children)
only.
the listings parameter set to false or true will affect everything.
is it possible in any way to define listings to individual directories

in


my webapp?

Adi





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


---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.372 / Virus Database: 207 - Release Date: 6/20/2002

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.372 / Virus Database: 207 - Release Date: 6/20/2002


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


 
 
 --
 To unsubscribe, e-mail:
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 
 
 ---
 Incoming mail is certified Virus Free.
 Checked by AVG anti-virus system (http://www.grisoft.com).
 Version: 6.0.372 / Virus Database: 207 - Release Date: 6/20/2002
 
 ---
 Outgoing mail is certified Virus Free.
 Checked by AVG anti-virus system (http://www.grisoft.com).
 Version: 6.0.372 / Virus Database: 207 - Release Date: 6/20/2002
 
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]
 
 
 


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




Re: Filters in Tomcat

2002-09-22 Thread Tim Funk

Nope - but you can make your filter smart enough to know how to 
disable/enable itself.

Samuel Cheung wrote:
 Hi,
 
 Could someone please tell me if I can activate/deactivate filters in Tomcat
 dynamically after the servlet is running?
 
 Thank you.
 Sam


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




Re: TC 4.1.10 - Administration App

2002-09-22 Thread Randy Secrist

I am attempting to access the admin app from tomcat standalone - 8080.


- Original Message -
From: Robert L Sowders [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Monday, September 16, 2002 9:49 PM
Subject: Re: TC 4.1.10 - Administration App


 How are you accessing the administration app?  From tomcat stand alone
 page at 8080?  It works for me.

 rls





 Randy Secrist [EMAIL PROTECTED]
 09/16/2002 07:58 PM
 Please respond to Tomcat Users List


 To: [EMAIL PROTECTED]
 cc:
 Subject:TC 4.1.10 - Administration App

 I am getting the following JSP error message when I log into the
 administration application.  (While it is loading the left TreeControl
 frame:

 package org.apache.webapp.admin does not exist

 Does anyone know which jar file this is in so I can confirm it's
 existance?

 Randy





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



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




Getting Login name and password

2002-09-22 Thread Andreas Probst

Hi all,

I know there is a way to get the user name by calling 
HttpServletRequest.getUserPrincipal().getName(). I also need the 
password. How can this be achieved?

Thanks in advance.

Andreas


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




Application .xml context and multiple virtual hosts

2002-09-22 Thread Raj Saini

Hi,

I am using Tomcat 4.1.10. I integrated with Apache 1.3.x. I have
multiple virtual hosts configured on tomcat.

Tomcat 4.1.10 have a feature where we can deploy an application 
by
coping a .xml file in with webapps directory. There are examples
of admin and maanger applications.

I want to deploy the applications with the .xml file with 
multiple
virtual hosts and integrate with apache. In the server.xml file
contexts related to a virtual host are created under that
particular virtual host. How this can be achieved with .xml
file.

I feel, by default the applications deployed from .xml files are
assocaited with the defaulthost. Is there a way to associate 
these
applications to a virtual host other then default virtual hosts?

Thanks

Raj Saini


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




RE: Tomcat4.0 with SSL on windows2000

2002-09-22 Thread John Hughes

The way we got client auth to work is to import the trusted root cert into
the cacerts truststore contained in {JAVA_HOME}/jre/lib/security.

Use keytool and a password of changeit.

John



 -Original Message-
 From: Shubha Somayaji [mailto:[EMAIL PROTECTED]]
 Sent: 21 September 2002 06:38
 To: [EMAIL PROTECTED]
 Subject: Tomcat4.0 with SSL on windows2000


 Hello,
 I am trying to integrate tomcat4.0 will SSL on windows2000. I did the
 following steps.

 1. Downloaded jsse and set the classpath for the jars
 2. keytool -genkey -alias tomcat -keyalg RSA
 3. keytool -certreq -keyalg RSA -alias tomcat -file certreq.csr
 4. Submited the certreq.csr to verisign for 14days trial server ID
 5. I got a file getcacert.cer and a certificate as a text by email.
 6 Copied the text and save it as xxx.crt
 7. Imported the getcacert.cer on to the IE5 Trusted root authoroities
 8. Imported both getcacert.cer and xxx.crt to .keystore created in my
 home directory.
 9. Uncommented the https part of connector in server.xml and made
 clientAuth=true
 10.Started the tomcat

 Now the problem is when I enter the url https://localhost:8443 it is
 showing me the empty 'Client Authentication' dialog box.
 I do not understand where I have gone wrong. I tried another approch of
 creating the certificate using openssl and importing it to the
 .keystore. But while importing it gives me error public key and
 keystore doesn't match.
 Can anyone of you please help me as soon as possible with the steps to
 follow in achieving this.

 Thanking you,
 Regards
 Shubha




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




Re: loadbalancer in workers.properties

2002-09-22 Thread achana

David Cassidy wrote:
 
 it's part of mod_jk
Thanks
I've an unusual problem : I got Apache collaborating with Tomcat on the
same box. Then I seperated the two and it worked. I rebooted the
machines, now Apache won't talk with Tomcat. I looked in log/error_log ,
it seems the Apache machine keeps trying to look for the examples in the
same box rather than in the Tomcat box. Apache won't find it there
because I haev renamed that directory...

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




Re: loadbalancer in workers.properties

2002-09-22 Thread achana

David Cassidy wrote:
 
 it's part of mod_jk
I am totally flabbergasted...
Bounce the servers and it works again. 
I must have had some parameters not set correctly ???

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




Loadbalancing : MS NLB vs mod_jk

2002-09-22 Thread achana

Hi All.
Please forgive me for bringing up a topic like this.
I believe I have Apache collaborating with Tomcat using mod_jk. Also I
will be experimenting with load-balancing using both symmetric and
assymetric (different CPU and configuration ) setups.
Can this setup be compared with MS NLB ??? 
Going thru MS's doco I got the impression that if the server dies, the
processes are lost, I assume with our setup, the dead-box is
continuously polled until all its processes are inherited by other's ???
How is this accomplished, are here some parameters I need to set ???
If some guru out there has this experience, could you please share it
with us ???

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




JNDI Realm on Tomcat 4 does not work

2002-09-22 Thread Stephan Schwab

Hi,

I want to secure a webapp with the JNDI realm. But the LDAP query is
sent
wrong to my OpenLDAP server.

Here is a snippet from server.xml:

Realm className=org.apache.catalina.realm.JNDIRealm debug=99
connectionURL=ldap://localhost;
userPattern=uid=(0),ou=people,dc=yikester,dc=net
roleBase=ou=groups,dc=yikester,dc=net
roleName=cn
roleSearch=(uniqueMember=(0))
userPassword=userPassword /

On the OpenLDAP server I see in the logfile:

SRCH base=uid=(0),ou=people,dc=yikester,dc=net scope=0
filter=(objectClass=*)

So, the problem is that something prevents the exchange of uid=(0) with
the
username in question.

I've tried with Tomcat 4.0.4 included in Netbeans 3.4 IDE and with
Tomcat
4.1.10. ldap.jar is from java.sun.com. I've tried with ldap.jar from
Novell
Too, but the result is the same.

Any hints?

Stephan

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




JSP working but Servlets not working

2002-09-22 Thread Manoj Kithany

Hi Experts,

Greetings!

I am using Apache 1.3.26 + (Jboss 3.0.3, Tomcat 4.0.4 bundle)

I treid to creat a small Web Application. My JSP files are WORKING properly 
BUT when Servlet is called (from JSP Page),
I get No Context COnfigured Error

My Directory structure is as follows:
/kithany (root)
/kithany/register.htm
/kithany/WEB-INF/web.xml
/kithany/WEB-INF/classes/HelloWorldExample.java
/kithany/WEB-INF/classes/HelloWorldExample.class
/kithany/META-INF/application.xml


I have my APPLICATION.XML file as follows:
-
?xml version=1.0 encoding=ISO-8859-1?
application
display-nameKITHANY/display-name
module
web
web-urikithany.war/web-uri
context-root/kithany/context-root
/web
/module
/application
-

And, my WEB.XML file is as:
-
?xml version=1.0 encoding=UTF-8?
!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
servlet
servlet-nameHelloWorldExample/servlet-name
servlet-classHelloWorldExample/servlet-class
/servlet
welcome-file-list
  welcome-file index.jsp /welcome-file
/welcome-file-list
/web-app
-

My JSP file register.htm is shown below. This file calls a SERVLET 
HelloWorldExample.class when user clicks.
-
html
body
form action=/HelloWorldExample method=post
center
table cellpadding=4 cellspacing=2 border=0
th bgcolor=#FF colspan=2
font size=5USER REGISTRATION/font
br
font size=1sup*/sup Required Fields/font
/th
tr bgcolor=#c8d8f8
td valign=top
bFirst Namesup*/sup/b
...rest of the file is not shown.
-

I then create WAR file as follows:
-
#pwd
#/kithany
#jar -cvfM kithany.war .
-

Which I then, put it into /jboss/server/default/deploy and then start my
JBOSS(Tomcat/Catalina) Server and then on browser, I type following:
http://MY_IP_ADDR_ESS:8080/kithany/register.html which displays the file 
correctly. When the user clicks SUBMIT, the file should call 
HelloWorldExample.class file BUT it displays Error like:

Apache Tomcat/4.0.3 - HTTP Status 500 - No Context configured to process 
this request

Experts, could you please guide me on to this.

THANKS!

Manoj G. Kithany
[EMAIL PROTECTED]

_
Send and receive Hotmail on your mobile device: http://mobile.msn.com


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




JSP working but Servlets not working

2002-09-22 Thread Manoj Kithany

Hi Experts,

Greetings!

I am using Apache 1.3.26 + (Jboss 3.0.3, Tomcat 4.0.4 bundle)
I treid to creat a small Web Application. My JSP files are WORKING properly 
BUT when Servlet is called (from JSP Page),
I get No Context COnfigured Error

My Directory structure is as follows:
/kithany (root)
/kithany/register.htm
/kithany/WEB-INF/web.xml
/kithany/WEB-INF/classes/HelloWorldExample.java
/kithany/WEB-INF/classes/HelloWorldExample.class
/kithany/META-INF/application.xml


I have my APPLICATION.XML file as follows:
-
?xml version=1.0 encoding=ISO-8859-1?
application
display-nameKITHANY/display-name
module
web
web-urikithany.war/web-uri
context-root/kithany/context-root
/web
/module
/application
-

And, my WEB.XML file is as:
-
?xml version=1.0 encoding=UTF-8?
!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
   servlet
   servlet-nameHelloWorldExample/servlet-name
   servlet-classHelloWorldExample/servlet-class
   /servlet
   welcome-file-list
 welcome-file
 index.jsp
 /welcome-file
/welcome-file-list
/web-app
-

My JSP file register.jsp is shown below. This file calls a SERVLET 
HelloWorldExample.class when user clicks.
-

form action=/HelloWorldExample method=post

...rest of the file is not shown.

-


I then create WAR file as follows:
-
#pwd
#/kithany
#jar -cvfM kithany.war .
-

Which I then, put it into /jboss/server/default/deploy and then start my
JBOSS(Tomcat/Catalina) Server and then on browser, I type following:
http://MY_IP_ADDR_ESS:8080/kithany/register.html which displays the file 
correctly. When the user clicks SUBMIT, the file should call 
HelloWorldExample.class file BUT it displays Error like:

Apache Tomcat/4.0.3 - HTTP Status 500 - No Context configured to process 
this request

Experts, could you please guide me on to this.

THANKS!

Manoj G. Kithany
[EMAIL PROTECTED]



_
Send and receive Hotmail on your mobile device: http://mobile.msn.com


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




Re: JNDI Realm on Tomcat 4 does not work

2002-09-22 Thread John Holman

You need to use curly brackets {} for the substitions, not parentheses ()

e.g.

  userPattern=uid={0},ou=people,dc=yikester,dc=net

not

  userPattern=uid=(0),ou=people,dc=yikester,dc=net

John.





Stephan Schwab wrote:
 Hi,
 
 I want to secure a webapp with the JNDI realm. But the LDAP query is
 sent
 wrong to my OpenLDAP server.
 
 Here is a snippet from server.xml:
 
 Realm className=org.apache.catalina.realm.JNDIRealm debug=99
 connectionURL=ldap://localhost;
 userPattern=uid=(0),ou=people,dc=yikester,dc=net
 roleBase=ou=groups,dc=yikester,dc=net
 roleName=cn
 roleSearch=(uniqueMember=(0))
 userPassword=userPassword /
 
 On the OpenLDAP server I see in the logfile:
 
 SRCH base=uid=(0),ou=people,dc=yikester,dc=net scope=0
 filter=(objectClass=*)
 
 So, the problem is that something prevents the exchange of uid=(0) with
 the
 username in question.
 
 I've tried with Tomcat 4.0.4 included in Netbeans 3.4 IDE and with
 Tomcat
 4.1.10. ldap.jar is from java.sun.com. I've tried with ldap.jar from
 Novell
 Too, but the result is the same.
 
 Any hints?
 
 Stephan
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]
 



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




how to handle requests to www.domain.com (no context path) w/ISAPI redirector and IIS?

2002-09-22 Thread Jeff

I've gotten to the point where I can have requests sent to IIS at
http://anysiteonwin2kmachine.mydomain.com/specific_context_path handled by
the webapp whose context path is /specific_context_path , but I'm at a loss
as to how requests to a site's default page (index.jsp) should be set up
among multiple different virtual IIS hosts. In other words, how to handle
requests to http://specificvirtualsiteonwin2kmachine.mydomain.com or
http://differentvirtualsiteonwin2kmachine.anotherdomain.com that implicitly
map to index.jsp in the site's root directory and get IIS to let Tomcat
handle them.

The main problem I'm seeing is that the whole ISAPI redirector mechanism
seems to have no concept of virtual hosts, nor does it seem to have any
mechanism for handling requests that don't involve a recognizable context
path as part of the request sent to IIS.

in other words, I can set up uriworkermap.properties with:

/context1=$(default_worker)
/context1/*=$(default_worker)
/context2=$(default_worker)
/context2/*=$(default_worker)

and have requests sent to
http://irrelevant_hostname.resolving_to_server_ip.net/context1 handled by
the webapp whose context path is /context1, and have requests sent to
http://irrelevant_hostname.resolving_to_server_ip.net/context2 handled by
the webapp whose context path is /context2, but I see no straightforward way
to have requests made to http://specific_site.hosted_on_myserver.com return
one default jsp file associated with /context1 and have requests made to
http://different_site.hosted_on_myserver.net return a (different) jsp file
associated with /context2.

even if adding

/*.jsp=$(default_worker)

to uriworkermap.properties worked (it didn't), there is still no apparent
mechanism to associate *.jsp for one site with /context1/*.jsp and *.jsp for
another site with /context2/*.jsp

What seems to be missing is a mechanism to tell the ISAPI redirector,
requests made to http://firsthost/*.jsp should be proxied over to Tomcat as
though they were really made to http://firsthost/context1/*.jsp;, requests
made to http://secondhost/*.jsp should be proxied over to Tomcat as though
they were really made to http://secondhost/context2/*.jsp; (with each
handled by a separate Tomcat virtual host), with the existing uriworkermap
scheme simply ADDING context paths to specific IIS virtual sites indicating
requests that should simply be proxied over to Tomcat unchanged, like in
this hypothetical properties file I'm envisioning:

http://iis.virtual.host/*.jsp=http://tomcat.virtual.host/firstcontextpath
http://www.iis.virtual.host/*.jsp=http://tomcat.virtual.host/firstcontextpat
h
http://iis.virtual.host/servlet/*=http://tomcat.virtual.host/servlet
http://www.iis.virtual.host/servlet/*=http://tomcat.virtual.host/servlet
http://iis.virtual.host/somecontext/*=http://tomcat.virtual.host/differentco
ntext
http://www.iis.virtual.host/somecontext/*=http://tomcat.virtual.host/differe
ntcontext

with other IIS virtual hosts corresponding to different tomcat virtual
hosts:
http://another.virtual.host/*.jsp=http://different.tomcat.virtualhost/its_co
ntextpath
http://another.virtual.host/struts/*=http://different.tomcat.virtualhost/str
uts

etc.

In other words, providing a mechanism to identify requests that IIS needs to
let Tomcat handle, but give Tomcat (or the redirector) enough information to
intelligently handle requests that make sense to IIS, but not to Tomcat
(without a little rewriting first).

Actually, such a scheme is more or less how I kludged Apache to handle a
similar situation a few months ago (when mod_jk was missing a feature I
needed, and mod_webapp wasn't quite ready for real use) using mod_rewrite to
proxy requests from Apache to Tomcat at port 8080 (dispensing with ajp
altogether). It was ugly and inefficient, but it made the sites work and
kept my boss happy...

Am I overlooking an obvious solution, or is there really no good way to have
Tomcat handle requests to a specific IIS virtual site's default index.jsp
file, or to differentiate among virtual hosts at the Tomcat level as well as
at the IIS level. Actually, if the scheme I mentioned above permitted
context path substitution (so the Tomcat context path had no necessary path
similarity to the request made to IIS), virtual hosts at the Tomcat level
would be nice, but not necessary (http://first.com/servlet could be sent to
Tomcat as http://localhost/first, http://second.com/servlet could be sent to
Tomcat as http://localhost/second, etc.)



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




Re: JSP working but Servlets not working

2002-09-22 Thread Lindomar

What Dave said is ok, but try:

form action=/kithany/HelloWorldExample method=post

Because your context /HelloWorldExample was configurate in your web.xml.

It was work too.

- Original Message - 
From: Dave Ford [EMAIL PROTECTED]

 form action=/kithany/servlet/HelloWorldExample method=post



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




Re: JSP working but Servlets not working

2002-09-22 Thread Dave Ford

Your action should be:

form action=/kithany/servlet/HelloWorldExample method=post


Dave Ford
Smart Soft - The Developer Training Company
http://www.smart-soft.com


- Original Message -
From: Manoj Kithany [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Sunday, September 22, 2002 2:53 PM
Subject: JSP working but Servlets not working


 Hi Experts,

 Greetings!

 I am using Apache 1.3.26 + (Jboss 3.0.3, Tomcat 4.0.4 bundle)
 I treid to creat a small Web Application. My JSP files are WORKING
properly
 BUT when Servlet is called (from JSP Page),
 I get No Context COnfigured Error

 My Directory structure is as follows:
 /kithany (root)
 /kithany/register.htm
 /kithany/WEB-INF/web.xml
 /kithany/WEB-INF/classes/HelloWorldExample.java
 /kithany/WEB-INF/classes/HelloWorldExample.class
 /kithany/META-INF/application.xml


 I have my APPLICATION.XML file as follows:
 -
 ?xml version=1.0 encoding=ISO-8859-1?
 application
 display-nameKITHANY/display-name
 module
 web
 web-urikithany.war/web-uri
 context-root/kithany/context-root
 /web
 /module
 /application
 -

 And, my WEB.XML file is as:
 -
 ?xml version=1.0 encoding=UTF-8?
 !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
servlet
servlet-nameHelloWorldExample/servlet-name
servlet-classHelloWorldExample/servlet-class
/servlet
welcome-file-list
  welcome-file
  index.jsp
  /welcome-file
 /welcome-file-list
 /web-app
 -

 My JSP file register.jsp is shown below. This file calls a SERVLET
 HelloWorldExample.class when user clicks.
 -

 form action=/HelloWorldExample method=post

 ...rest of the file is not shown.

 -


 I then create WAR file as follows:
 -
 #pwd
 #/kithany
 #jar -cvfM kithany.war .
 -

 Which I then, put it into /jboss/server/default/deploy and then start my
 JBOSS(Tomcat/Catalina) Server and then on browser, I type following:
 http://MY_IP_ADDR_ESS:8080/kithany/register.html which displays the file
 correctly. When the user clicks SUBMIT, the file should call
 HelloWorldExample.class file BUT it displays Error like:

 Apache Tomcat/4.0.3 - HTTP Status 500 - No Context configured to process
 this request

 Experts, could you please guide me on to this.

 THANKS!

 Manoj G. Kithany
 [EMAIL PROTECTED]



 _
 Send and receive Hotmail on your mobile device: http://mobile.msn.com


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



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




Re: JSP working but Servlets not working

2002-09-22 Thread Manoj Kithany

Hi Mr Dave and Lindomar,

THANKS for your reply.

I tried to give actin as /kithany/servlet/HelloWorldExample but now it is 
giving me following error - wonder why:
-
Apache Tomcat/4.0.3 - HTTP Status 500 - Internal Server Error
The server encountered an internal error (Internal Server Error) that 
prevented it from fulfilling this request.

java.util.MissingResourceException: Can't find bundle for base name 
LocalStrings, locale en_US
at 
java.util.ResourceBundle.throwMissingResourceException(ResourceBundle.java(Compiled 
Code))
at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java(Compiled 
Code))
at java.util.ResourceBundle.getBundle(ResourceBundle.java:547)
at HelloWorldExample.doPost(HelloWorldExample.java:61)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at 
org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943
-

THANKS again Experts!

Mano


From: Lindomar [EMAIL PROTECTED]
Reply-To: Tomcat Users List [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Subject: Re: JSP working but Servlets not working
Date: Sun, 22 Sep 2002 16:26:10 -0300

What Dave said is ok, but try:

form action=/kithany/HelloWorldExample method=post

Because your context /HelloWorldExample was configurate in your web.xml.

It was work too.

- Original Message -
From: Dave Ford [EMAIL PROTECTED]

  form action=/kithany/servlet/HelloWorldExample method=post





_
Chat with friends online, try MSN Messenger: http://messenger.msn.com


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




Re: JSP working but Servlets not working

2002-09-22 Thread Lindomar

Hi Mano!

The problem is in your servlet.
See line:ResourceBundle rb =
ResourceBundle.getBundle(LocalStrings,request.getLocale());
The method getLocale() because is a ploblem getting Locale.
But only you see fast that yours servlets works...
Comments
// ResourceBundle rb =
ResourceBundle.getBundle(LocalStrings,request.getLocale());
Change this line
String title = rb.getString(helloworld.title);
to
String title = this is only a test;

Compile and test!

Good luck.





- Original Message -
From: Manoj Kithany [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Sunday, September 22, 2002 4:31 PM
Subject: Re: JSP working but Servlets not working


 Quer ter seu próprio endereço na Internet?
 Garanta já o seu e ainda ganhe cinco e-mails personalizados.
 DomíniosBOL - http://dominios.bol.com.br

 Hi Mr Dave and Lindomar,

 THANKS for your reply.

 I tried to give actin as /kithany/servlet/HelloWorldExample but now it
is
 giving me following error - wonder why:
 -
 Apache Tomcat/4.0.3 - HTTP Status 500 - Internal Server Error
 The server encountered an internal error (Internal Server Error) that
 prevented it from fulfilling this request.

 java.util.MissingResourceException: Can't find bundle for base name
 LocalStrings, locale en_US
 at

java.util.ResourceBundle.throwMissingResourceException(ResourceBundle.java(C
ompiled
 Code))
 at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java(Compiled
 Code))
 at java.util.ResourceBundle.getBundle(ResourceBundle.java:547)
 at HelloWorldExample.doPost(HelloWorldExample.java:61)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at

org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:247)
 at

org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:193)
 at

org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:243)
 at

org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
 at

org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
 at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
 at

org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:190)
 at

org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
 at

org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:2
46)
 at

org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
 at

org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
 at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943
 -

 THANKS again Experts!

 Mano


 From: Lindomar [EMAIL PROTECTED]
 Reply-To: Tomcat Users List [EMAIL PROTECTED]
 To: Tomcat Users List [EMAIL PROTECTED]
 Subject: Re: JSP working but Servlets not working
 Date: Sun, 22 Sep 2002 16:26:10 -0300
 
 What Dave said is ok, but try:
 
 form action=/kithany/HelloWorldExample method=post
 
 Because your context /HelloWorldExample was configurate in your web.xml.
 
 It was work too.
 
 - Original Message -
 From: Dave Ford [EMAIL PROTECTED]
 
   form action=/kithany/servlet/HelloWorldExample method=post
 




 _
 Chat with friends online, try MSN Messenger: http://messenger.msn.com


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




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




Simple Bean not working but Servlet/JSP Working

2002-09-22 Thread Manoj Kithany

Hi Experts,

I tried a simple JSP/Servlet applications and it worked. I am using Apache 
1.3.26 + (Jboss 3.0.3, Tomcat 4.0.4 bundle)

Now, I am trying for simple Bean Application with JSP/Servlets and Html 
pages. My directory structure is :

/kithany (root)
/kithany/register.html
/kithany/success.jsp
/kithany/retry.jsp
/kithany/process.jsp (bean)
/kithany/WEB-INF/web.xml
/kithany/WEB-INF/classes/FormBean.java
/kithany/WEB-INF/classes/FormBean.class
/kithany/META-INF/application.xml

Then, I create the kithany.war file as shown below:

#cd /kithany
#jar -cvfM kithany.war .

I then put the kithany.war file in /jboss/server/default/deploy directory 
and  In your browser type:

http://IP_ADDR_ESS:8080/kithany/register.html

which works fine. In my register.html file my action is form 
action=/kithany/process.jsp method=post
When I click the SUBMIT button in register.html form (which then calls 
bean and servelte), I get following Error - wonder why.


Apache Tomcat/4.0.3 - HTTP Status 500 - Internal Server Error - that 
prevented it from fulfilling this request

org.apache.jasper.JasperException: Unable to compile class for JSP
An error occurred at line: 10 in the jsp file: /process.jsp

Generated servlet error:
/jboss-3.0.0_tomcat-4.0.3/catalina/work/localhost/kithany/process$jsp.java:72: 
Class org.apache.jsp.FormBean not found.
FormBean formHandler = null;
^

An error occurred at line: 10 in the jsp file: /process.jsp

Generated servlet error:
/jboss-3.0.0_tomcat-4.0.3/catalina/work/localhost/kithany/process$jsp.java:75: 
Class org.apache.jsp.FormBean not found.
  formHandler= (FormBean)
^
An error occurred at line: 10 in the jsp file: /process.jsp

Generated servlet error:
/jboss-3.0.0_tomcat-4.0.3/catalina/work/localhost/kithany/process$jsp.java:80: 
Class org.apache.jsp.FormBean not found.
  formHandler = (FormBean) 
java.beans.Beans.instantiate(this.getClass().getClassLoader(), FormBean);



My process.jsp file is:

%@ page import=java.util.* %

%!
ResourceBundle bundle =null;
public void jspInit() {
  bundle = ResourceBundle.getBundle(forms);
  }
%

jsp:useBean id=formHandler class=FormBean scope=request  ** THIS 
IS MY LINE 10
jsp:setProperty name=formHandler property=*/
/jsp:useBean

%
   if (formHandler.validate()) {
%
jsp:forward page=%=bundle.getString(\/kithany/process.success\)%/
%
   }  else {
%
jsp:forward page=%=bundle.getString(\/kithany/process.retry\)%/
%
   }
%


My web.xml file is as shown below:
---
web-app
servlet
servlet-nameFormBean/servlet-name
servlet-classFormBean/servlet-class
/servlet
servlet
servlet-nameHelloWorldExample/servlet-name
servlet-classHelloWorldExample/servlet-class
/servlet
servlet-mapping
servlet-nameHelloWorldExample/servlet-name
url-pattern/HelloWorldExample/*/url-pattern
/servlet-mapping
servlet-mapping
servlet-nameFormBean/servlet-name
url-pattern/FormBean/*/url-pattern
/servlet-mapping
web-app
---

I would really appreciate if any of you Experts could put some light onto 
this error.

THANKS!

Manoj G. Kithany
[EMAIL PROTECTED]


_
Send and receive Hotmail on your mobile device: http://mobile.msn.com


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




RE: how to handle requests to www.domain.com (no context path) w/ISAPI redirector and IIS?

2002-09-22 Thread Reynir Hübner

hi, 
you will have to create a virtual host in IIS, and install the ISAPI redirector in 
that host to redirect to a host installed in tomcat.
in other words, if you have a virtual host configured in tomcat with by the name 
host.domain.com you must have a virtual host with the same hostmark in IIS, with the 
isapi_redirect filter installed.

To enable the default.jsp or index.jsp you must have a default.asp page in the folder 
that makes a serverside redirect to index.jsp, as to be able to map the IISredirect 
url (in uriworkermap.properties) you must have a file ending .jsp, if you set 
index.jsp as a default document in IIs the ending does not get resolved in the URL and 
the request is not redirected.


hope it helps,
[EMAIL PROTECTED]


 -Original Message-
 From: Jeff [mailto:[EMAIL PROTECTED]]
 Sent: 22. september 2002 19:13
 To: [EMAIL PROTECTED]
 Subject: how to handle requests to www.domain.com (no context path)
 w/ISAPI redirector and IIS?
 
 
 I've gotten to the point where I can have requests sent to IIS at
 http://anysiteonwin2kmachine.mydomain.com/specific_context_pat
 h handled by
 the webapp whose context path is /specific_context_path , but 
 I'm at a loss
 as to how requests to a site's default page (index.jsp) 
 should be set up
 among multiple different virtual IIS hosts. In other words, 
 how to handle
 requests to http://specificvirtualsiteonwin2kmachine.mydomain.com or
 http://differentvirtualsiteonwin2kmachine.anotherdomain.com 
 that implicitly
 map to index.jsp in the site's root directory and get IIS to 
 let Tomcat
 handle them.
 
 The main problem I'm seeing is that the whole ISAPI 
 redirector mechanism
 seems to have no concept of virtual hosts, nor does it seem 
 to have any
 mechanism for handling requests that don't involve a 
 recognizable context
 path as part of the request sent to IIS.
 
 in other words, I can set up uriworkermap.properties with:
 
 /context1=$(default_worker)
 /context1/*=$(default_worker)
 /context2=$(default_worker)
 /context2/*=$(default_worker)
 
 and have requests sent to
 http://irrelevant_hostname.resolving_to_server_ip.net/context1
  handled by
 the webapp whose context path is /context1, and have requests sent to
 http://irrelevant_hostname.resolving_to_server_ip.net/context2
  handled by
 the webapp whose context path is /context2, but I see no 
 straightforward way
 to have requests made to 
 http://specific_site.hosted_on_myserver.com return
 one default jsp file associated with /context1 and have 
 requests made to
 http://different_site.hosted_on_myserver.net return a 
 (different) jsp file
 associated with /context2.
 
 even if adding
 
 /*.jsp=$(default_worker)
 
 to uriworkermap.properties worked (it didn't), there is still 
 no apparent
 mechanism to associate *.jsp for one site with 
 /context1/*.jsp and *.jsp for
 another site with /context2/*.jsp
 
 What seems to be missing is a mechanism to tell the ISAPI redirector,
 requests made to http://firsthost/*.jsp should be proxied 
 over to Tomcat as
 though they were really made to 
 http://firsthost/context1/*.jsp;, requests
 made to http://secondhost/*.jsp should be proxied over to 
 Tomcat as though
 they were really made to http://secondhost/context2/*.jsp; (with each
 handled by a separate Tomcat virtual host), with the existing 
 uriworkermap
 scheme simply ADDING context paths to specific IIS virtual 
 sites indicating
 requests that should simply be proxied over to Tomcat 
 unchanged, like in
 this hypothetical properties file I'm envisioning:
 
 http://iis.virtual.host/*.jsp=http://tomcat.virtual.host/first
 contextpath
 http://www.iis.virtual.host/*.jsp=http://tomcat.virtual.host/f
 irstcontextpat
 h
 http://iis.virtual.host/servlet/*=http://tomcat.virtual.host/servlet
 http://www.iis.virtual.host/servlet/*=http://tomcat.virtual.ho
 st/servlet
 http://iis.virtual.host/somecontext/*=http://tomcat.virtual.ho
 st/differentco
 ntext
 http://www.iis.virtual.host/somecontext/*=http://tomcat.virtua
 l.host/differe
 ntcontext
 
 with other IIS virtual hosts corresponding to different tomcat virtual
 hosts:
 http://another.virtual.host/*.jsp=http://different.tomcat.virt
ualhost/its_co
ntextpath
http://another.virtual.host/struts/*=http://different.tomcat.virtualhost/str
uts

etc.

In other words, providing a mechanism to identify requests that IIS needs to
let Tomcat handle, but give Tomcat (or the redirector) enough information to
intelligently handle requests that make sense to IIS, but not to Tomcat
(without a little rewriting first).

Actually, such a scheme is more or less how I kludged Apache to handle a
similar situation a few months ago (when mod_jk was missing a feature I
needed, and mod_webapp wasn't quite ready for real use) using mod_rewrite to
proxy requests from Apache to Tomcat at port 8080 (dispensing with ajp
altogether). It was ugly and inefficient, but it made the sites work and
kept my boss happy...

Am I overlooking an obvious solution, or is there 

RE: Simple Bean not working but Servlet/JSP Working

2002-09-22 Thread Reynir Hübner

do you have the bean specified in a package ?
either put it into a package (and the correct folder) as 
/classes/com/domain/packagename/FormBean.class
and then use this (with import line), or remove the package com.domain.packagename; 
from the file, and it should work.

hope it helps
[EMAIL PROTECTED]





 -Original Message-
 From: Manoj Kithany [mailto:[EMAIL PROTECTED]]
 Sent: 22. september 2002 20:47
 To: [EMAIL PROTECTED]
 Subject: Simple Bean not working but Servlet/JSP Working
 
 
 Hi Experts,
 
 I tried a simple JSP/Servlet applications and it worked. I am 
 using Apache 
 1.3.26 + (Jboss 3.0.3, Tomcat 4.0.4 bundle)
 
 Now, I am trying for simple Bean Application with 
 JSP/Servlets and Html 
 pages. My directory structure is :
 
 /kithany (root)
 /kithany/register.html
 /kithany/success.jsp
 /kithany/retry.jsp
 /kithany/process.jsp (bean)
 /kithany/WEB-INF/web.xml
 /kithany/WEB-INF/classes/FormBean.java
 /kithany/WEB-INF/classes/FormBean.class
 /kithany/META-INF/application.xml
 
 Then, I create the kithany.war file as shown below:
 
 #cd /kithany
 #jar -cvfM kithany.war .
 
 I then put the kithany.war file in 
 /jboss/server/default/deploy directory 
 and  In your browser type:
 
 http://IP_ADDR_ESS:8080/kithany/register.html
 
 which works fine. In my register.html file my action is form 
 action=/kithany/process.jsp method=post
 When I click the SUBMIT button in register.html form (which 
 then calls 
 bean and servelte), I get following Error - wonder why.
 
 --
 --
 Apache Tomcat/4.0.3 - HTTP Status 500 - Internal Server Error - that 
 prevented it from fulfilling this request
 
 org.apache.jasper.JasperException: Unable to compile class for JSP
 An error occurred at line: 10 in the jsp file: /process.jsp
 
 Generated servlet error:
 /jboss-3.0.0_tomcat-4.0.3/catalina/work/localhost/kithany/proc
 ess$jsp.java:72: 
 Class org.apache.jsp.FormBean not found.
 FormBean formHandler = null;
 ^
 
 An error occurred at line: 10 in the jsp file: /process.jsp
 
 Generated servlet error:
 /jboss-3.0.0_tomcat-4.0.3/catalina/work/localhost/kithany/proc
 ess$jsp.java:75: 
 Class org.apache.jsp.FormBean not found.
   formHandler= (FormBean)
 ^
 An error occurred at line: 10 in the jsp file: /process.jsp
 
 Generated servlet error:
 /jboss-3.0.0_tomcat-4.0.3/catalina/work/localhost/kithany/proc
 ess$jsp.java:80: 
 Class org.apache.jsp.FormBean not found.
   formHandler = (FormBean) 
 java.beans.Beans.instantiate(this.getClass().getClassLoader(),
  FormBean);
 
 --
 --
 
 My process.jsp file is:
 --
 --
 %@ page import=java.util.* %
 
 %!
 ResourceBundle bundle =null;
 public void jspInit() {
   bundle = ResourceBundle.getBundle(forms);
   }
 %
 
 jsp:useBean id=formHandler class=FormBean 
 scope=request  ** THIS 
 IS MY LINE 10
 jsp:setProperty name=formHandler property=*/
 /jsp:useBean
 
 %
if (formHandler.validate()) {
 %
 jsp:forward 
 page=%=bundle.getString(\/kithany/process.success\)%/
 %
}  else {
 %
 jsp:forward 
 page=%=bundle.getString(\/kithany/process.retry\)%/
 %
}
 %
 --
 --
 
 My web.xml file is as shown below:
 --
 -
 web-app
 servlet
 servlet-nameFormBean/servlet-name
 servlet-classFormBean/servlet-class
 /servlet
 servlet
 servlet-nameHelloWorldExample/servlet-name
 servlet-classHelloWorldExample/servlet-class
 /servlet
 servlet-mapping
 servlet-nameHelloWorldExample/servlet-name
 url-pattern/HelloWorldExample/*/url-pattern
 /servlet-mapping
 servlet-mapping
 servlet-nameFormBean/servlet-name
 url-pattern/FormBean/*/url-pattern
 /servlet-mapping
 web-app
 --
 -
 
 I would really appreciate if any of you Experts could put 
 some light onto 
 this error.
 
 THANKS!
 
 Manoj G. Kithany
 [EMAIL PROTECTED]
 
 
 _
 Send and receive Hotmail on your mobile device: http://mobile.msn.com
 
 
 --
 To unsubscribe, e-mail:   
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: 
 mailto:[EMAIL PROTECTED]
 
 

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




RE: Simple Bean not working but Servlet/JSP Working

2002-09-22 Thread Manoj Kithany

Hi Mr. Reynir,

THANKS for reply. I have already removed the package name from the 
FormBean.java file.

Please help.

Thanks!

Manoj G. Kithany


From: Reynir Hübner [EMAIL PROTECTED]
Reply-To: Tomcat Users List [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Subject: RE: Simple Bean not working but Servlet/JSP Working
Date: Sun, 22 Sep 2002 20:47:21 -

do you have the bean specified in a package ?
either put it into a package (and the correct folder) as 
/classes/com/domain/packagename/FormBean.class
and then use this (with import line), or remove the package 
com.domain.packagename; from the file, and it should work.

hope it helps
[EMAIL PROTECTED]





  -Original Message-
  From: Manoj Kithany [mailto:[EMAIL PROTECTED]]
  Sent: 22. september 2002 20:47
  To: [EMAIL PROTECTED]
  Subject: Simple Bean not working but Servlet/JSP Working
 
 
  Hi Experts,
 
  I tried a simple JSP/Servlet applications and it worked. I am
  using Apache
  1.3.26 + (Jboss 3.0.3, Tomcat 4.0.4 bundle)
 
  Now, I am trying for simple Bean Application with
  JSP/Servlets and Html
  pages. My directory structure is :
 
  /kithany (root)
  /kithany/register.html
  /kithany/success.jsp
  /kithany/retry.jsp
  /kithany/process.jsp (bean)
  /kithany/WEB-INF/web.xml
  /kithany/WEB-INF/classes/FormBean.java
  /kithany/WEB-INF/classes/FormBean.class
  /kithany/META-INF/application.xml
 
  Then, I create the kithany.war file as shown below:
 
  #cd /kithany
  #jar -cvfM kithany.war .
 
  I then put the kithany.war file in
  /jboss/server/default/deploy directory
  and  In your browser type:
 
  http://IP_ADDR_ESS:8080/kithany/register.html
 
  which works fine. In my register.html file my action is form
  action=/kithany/process.jsp method=post
  When I click the SUBMIT button in register.html form (which
  then calls
  bean and servelte), I get following Error - wonder why.
 
  --
  --
  Apache Tomcat/4.0.3 - HTTP Status 500 - Internal Server Error - that
  prevented it from fulfilling this request
 
  org.apache.jasper.JasperException: Unable to compile class for JSP
  An error occurred at line: 10 in the jsp file: /process.jsp
 
  Generated servlet error:
  /jboss-3.0.0_tomcat-4.0.3/catalina/work/localhost/kithany/proc
  ess$jsp.java:72:
  Class org.apache.jsp.FormBean not found.
  FormBean formHandler = null;
  ^
 
  An error occurred at line: 10 in the jsp file: /process.jsp
 
  Generated servlet error:
  /jboss-3.0.0_tomcat-4.0.3/catalina/work/localhost/kithany/proc
  ess$jsp.java:75:
  Class org.apache.jsp.FormBean not found.
formHandler= (FormBean)
  ^
  An error occurred at line: 10 in the jsp file: /process.jsp
 
  Generated servlet error:
  /jboss-3.0.0_tomcat-4.0.3/catalina/work/localhost/kithany/proc
  ess$jsp.java:80:
  Class org.apache.jsp.FormBean not found.
formHandler = (FormBean)
  java.beans.Beans.instantiate(this.getClass().getClassLoader(),
   FormBean);
 
  --
  --
 
  My process.jsp file is:
  --
  --
  %@ page import=java.util.* %
 
  %!
  ResourceBundle bundle =null;
  public void jspInit() {
bundle = ResourceBundle.getBundle(forms);
}
  %
 
  jsp:useBean id=formHandler class=FormBean
  scope=request  ** THIS
  IS MY LINE 10
  jsp:setProperty name=formHandler property=*/
  /jsp:useBean
 
  %
 if (formHandler.validate()) {
  %
  jsp:forward
  page=%=bundle.getString(\/kithany/process.success\)%/
  %
 }  else {
  %
  jsp:forward
  page=%=bundle.getString(\/kithany/process.retry\)%/
  %
 }
  %
  --
  --
 
  My web.xml file is as shown below:
  --
  -
  web-app
  servlet
  servlet-nameFormBean/servlet-name
  servlet-classFormBean/servlet-class
  /servlet
  servlet
  servlet-nameHelloWorldExample/servlet-name
  servlet-classHelloWorldExample/servlet-class
  /servlet
  servlet-mapping
  servlet-nameHelloWorldExample/servlet-name
  url-pattern/HelloWorldExample/*/url-pattern
  /servlet-mapping
  servlet-mapping
  servlet-nameFormBean/servlet-name
  url-pattern/FormBean/*/url-pattern
  /servlet-mapping
  web-app
  --
  -
 
  I would really appreciate if any of you Experts could put
  some light onto
  this error.
 
  THANKS!
 
  Manoj G. Kithany
  [EMAIL PROTECTED]


_
Join the world’s largest e-mail service with MSN Hotmail. 
http://www.hotmail.com


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

jmx and context management

2002-09-22 Thread Jakob Praher

hi all,

I'd like to use the JMX in Catalina and to be able to do Context
administration with the JMX Api.

After successfully building catalina from source with jmx support I
think it can be done within a priviledged servlet, which should have
access to the MBeanServer via the Context.getAttribute Method like this:

MBeanServer server = (MBeanServer )getServletContext( ).getAttribute(
org.apache.catalina.MBeanServer );

Though I have some background in JMX - I had a project, which used 
standard mbeans to extend an application server - I find it quite
cumbersome to get working with the Catalina Mbeans. ( pretty much
indirection - commons-modeler and so on)

Perhaps some of you can help me with one of my questions:

- Is there a context MBean I can use out of the box?
- Which MBean, if available, should I use to add a context through JMX?
- Which MBean, if available, should I use to stop/start a context
through JMX?

- Can I update the server.xml from within JMX?
I mean is it possible to persist the settings changed through JMX?

- Has anybody used a JMX Connector/Adaptor for remote administration of
Catalina?

thank you in advance

-- Jakob





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




DESPAIR : Apache NOT talking with Tomcat now...

2002-09-22 Thread achana

Hi All.
Apache talked with Tomcat on the same box on Thu-Fri. 
Then I put Apache on one box and Tomcat on another. One slight
difference : the Tomcat box has RH7.1/Apache1.3.16 (I cannot change
that) whereas the box where I got them working has RH7.1/Apache2.
I read thru all docos from various web sites :
www.moreservlets.com ;
jakarta.apache.org ;
www.johnturner.com;
www.galatea.com ;
www.ubeans.com ;
I tried as recommended - nope, web page cannot be displayed !
Got inventive - nope. 
Started from scratch 3 times - nope. 
Got assurances the instructions work  - nope !
Got rid of all the Context/docBase for existing servlets to Oracle,
started from a virgin servlet.xml - nope !
Lowered all the ipchains and all the boxes are as one, can telnet, ftp,
ping , sqlplus to all, no holds barred - nope , web page cannot be
displayed.
But I did manage to attach to Tomcat serving as a webserver to display a
page. I commented out that option in server.xml afterward.
Nope !
Nope !
NOTHING seems to get Apache to talk with Tomcat on different boxes.
I undersatnd people have done this before : so can u please give me the
instructions again without leaving anything out ? 
The whole weekend : NOTHING !
I guess it is just me !

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




RE: tomcat start up errors

2002-09-22 Thread Sexton, George

Look around for files named hs_err_pidN.log. This is the crash log the
JVM will write when it falls over.

-Original Message-
From: Kathleen Flores [mailto:[EMAIL PROTECTED]]
Sent: 20 September, 2002 1:29 PM
To: Tomcat Users List
Subject: RE: tomcat start up errors



Thank you for your reply...

When this happens, the java process is not running tomcat.  And I just
verified that the only connector in server.xml is the AJPconnector.


Thanks again,

Kat



:::
Ahh, but you didn't say what JVM...

Seriously, the more complete the initial message is the more likely you are
to get a quick, accurate answer.

It looks to me like these errors are coming from mod_jk trying to connect
to
Tomcat, so they appear to be a symptom of another problem. Is the Java
process still running Tomcat when this happens? Does Tomcat accept
connections on another connector like the HTTP 1.0 connector?

If the JVM is crashing, you need to find the crash logs and troubleshoot
it.




 ERG Group --
 The contents of this email and any attachments are confidential
 and may only be read by the intended recipient.
-


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


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




RE: Simple Bean not working but Servlet/JSP Working

2002-09-22 Thread Ron Day

You have to put your java classes in a package. If you do not, and put 
the class files in WEB-INF/classes then Tomcat cannot find them because 
this is not the default package location for Tomcat.

Bottom line: always use pacjages for your classes !

ron


-Original Message-
From: Manoj Kithany [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Date: Sun, 22 Sep 2002 20:59:03 +
Subject: RE: Simple Bean not working but Servlet/JSP Working

 Hi Mr. Reynir,
 
 THANKS for reply. I have already removed the package name from the 
 FormBean.java file.
 
 Please help.
 
 Thanks!
 
 Manoj G. Kithany
 
 
 From: Reynir Hübner [EMAIL PROTECTED]
 Reply-To: Tomcat Users List [EMAIL PROTECTED]
 To: Tomcat Users List [EMAIL PROTECTED]
 Subject: RE: Simple Bean not working but Servlet/JSP Working
 Date: Sun, 22 Sep 2002 20:47:21 -
 
 do you have the bean specified in a package ?
 either put it into a package (and the correct folder) as 
 /classes/com/domain/packagename/FormBean.class
 and then use this (with import line), or remove the package 
 com.domain.packagename; from the file, and it should work.
 
 hope it helps
 [EMAIL PROTECTED]
 
 
 
 
 
   -Original Message-
   From: Manoj Kithany [mailto:[EMAIL PROTECTED]]
   Sent: 22. september 2002 20:47
   To: [EMAIL PROTECTED]
   Subject: Simple Bean not working but Servlet/JSP Working
  
  
   Hi Experts,
  
   I tried a simple JSP/Servlet applications and it worked. I am
   using Apache
   1.3.26 + (Jboss 3.0.3, Tomcat 4.0.4 bundle)
  
   Now, I am trying for simple Bean Application with
   JSP/Servlets and Html
   pages. My directory structure is :
  
   /kithany (root)
   /kithany/register.html
   /kithany/success.jsp
   /kithany/retry.jsp
   /kithany/process.jsp (bean)
   /kithany/WEB-INF/web.xml
   /kithany/WEB-INF/classes/FormBean.java
   /kithany/WEB-INF/classes/FormBean.class
   /kithany/META-INF/application.xml
  
   Then, I create the kithany.war file as shown below:
  
   #cd /kithany
   #jar -cvfM kithany.war .
  
   I then put the kithany.war file in
   /jboss/server/default/deploy directory
   and  In your browser type:
  
   http://IP_ADDR_ESS:8080/kithany/register.html
  
   which works fine. In my register.html file my action is form
   action=/kithany/process.jsp method=post
   When I click the SUBMIT button in register.html form (which
   then calls
   bean and servelte), I get following Error - wonder why.
  
   --
   --
   Apache Tomcat/4.0.3 - HTTP Status 500 - Internal Server Error -
 that
   prevented it from fulfilling this request
  
   org.apache.jasper.JasperException: Unable to compile class for
 JSP
   An error occurred at line: 10 in the jsp file: /process.jsp
  
   Generated servlet error:
   /jboss-3.0.0_tomcat-4.0.3/catalina/work/localhost/kithany/proc
   ess$jsp.java:72:
   Class org.apache.jsp.FormBean not found.
   FormBean formHandler = null;
   ^
  
   An error occurred at line: 10 in the jsp file: /process.jsp
  
   Generated servlet error:
   /jboss-3.0.0_tomcat-4.0.3/catalina/work/localhost/kithany/proc
   ess$jsp.java:75:
   Class org.apache.jsp.FormBean not found.
 formHandler= (FormBean)
   ^
   An error occurred at line: 10 in the jsp file: /process.jsp
  
   Generated servlet error:
   /jboss-3.0.0_tomcat-4.0.3/catalina/work/localhost/kithany/proc
   ess$jsp.java:80:
   Class org.apache.jsp.FormBean not found.
 formHandler = (FormBean)
   java.beans.Beans.instantiate(this.getClass().getClassLoader(),
FormBean);
  
   --
   --
  
   My process.jsp file is:
   --
   --
   %@ page import=java.util.* %
  
   %!
   ResourceBundle bundle =null;
   public void jspInit() {
 bundle = ResourceBundle.getBundle(forms);
 }
   %
  
   jsp:useBean id=formHandler class=FormBean
   scope=request  ** THIS
   IS MY LINE 10
   jsp:setProperty name=formHandler property=*/
   /jsp:useBean
  
   %
  if (formHandler.validate()) {
   %
   jsp:forward
   page=%=bundle.getString(\/kithany/process.success\)%/
   %
  }  else {
   %
   jsp:forward
   page=%=bundle.getString(\/kithany/process.retry\)%/
   %
  }
   %
   --
   --
  
   My web.xml file is as shown below:
   --
   -
   web-app
   servlet
   servlet-nameFormBean/servlet-name
   servlet-classFormBean/servlet-class
   /servlet
   servlet
   servlet-nameHelloWorldExample/servlet-name
   servlet-classHelloWorldExample/servlet-class
   /servlet
   servlet-mapping
   servlet-nameHelloWorldExample/servlet-name
   

Cannot setup tomcat

2002-09-22 Thread Marc Vila Pérez

Hi!!!
I cannot setup Tomcat 4.1.10, on Redhat 7.2 with Apache 1.3.22 and
jdk1.4.1. I've followed all the instructions to install it, and seems
all it's ok, but when I start tomcat:
bash-2.05$$CATALINA_HOME/bin/startup.sh
Using CATALINA_BASE: /usr/local/jakarta-tomcat-4.0.10
Using CATALINA_HOME: /usr/local/jakarta-tomcat-4.0.10
Using JAVA_HOME: /usr/local/j2sdk1.4.1
bash-2.05$ (no errors returned)

If I look the catalina.out file, no chars has been written, If I try to
connect to my server http://myserver:8080, the browser gives the
standard invalid URL error.

Then if I try to shutdown tomcat...
bash-2.05$$CATALINA_HOME/bin/shutdown.sh
Using CATALINA_BASE: /usr/local/jakarta-tomcat-4.0.10
Using CATALINA_HOME: /usr/local/jakarta-tomcat-4.0.10
Using JAVA_HOME: /usr/local/j2sdk1.4.1

no error returned, but the command not finalizes... after waiting a long
time, I must abort the operation (Ctrl + c) and kill the tomcat process
manually.

Anybody knows what I'm doing wrong? Could it be a OS problem? jdk?
tomcat? I've tried with different tomcat versions (3.3.1 and 4.0.4),
and continue having the same problem.


If  I try to shutdown tomcat with the next sentence:

bash-2.05$sh -x catalina.sh stop  shutdown.txt

I obtain:

+ cygwin=false
++ uname
+ PRG=catalina.sh
+ '[' -h catalina.sh ']'
++ dirname catalina.sh
+ PRGDIR=.
++ cd ./..
++ pwd
+ CATALINA_HOME=/usr/local/jakarta-tomcat-4.1.10
+ '[' -r /usr/local/jakarta-tomcat-4.1.10/bin/setenv.sh ']'
+ false
+ '[' -r /usr/local/jakarta-tomcat-4.1.10/bin/setclasspath.sh ']'
+ BASEDIR=/usr/local/jakarta-tomcat-4.1.10
+ . /usr/local/jakarta-tomcat-4.1.10/bin/setclasspath.sh
++ '[' -z /usr/local/j2sdk1.4.1/ ']'
++ '[' '!' -r /usr/local/j2sdk1.4.1//bin/java -o '!' -r
/usr/local/j2sdk1.4.1//bin/jdb -o '!' -r
/usr/local/j2sdk1.4.1//bin/javac ']
'
++ '[' -z /usr/local/jakarta-tomcat-4.1.10 ']'
++ '[' '!' -r /usr/local/jakarta-tomcat-4.1.10/bin/setclasspath.sh ']'
++
JAVA_ENDORSED_DIRS=/usr/local/jakarta-tomcat-4.1.10/bin:/usr/local/jakarta-tomcat-4.1.10/common/endorsed

++ CLASSPATH=/usr/local/j2sdk1.4.1//lib/tools.jar
++ JIKESPATH=
+++ uname -s
++ '[' Linux = Darwin ']'
++ _RUNJAVA=/usr/local/j2sdk1.4.1//bin/java
++ _RUNJDB=/usr/local/j2sdk1.4.1//bin/jdb
++ _RUNJAVAC=/usr/local/j2sdk1.4.1//bin/javac
+ '[' -n '' ']'
+
CLASSPATH=/usr/local/j2sdk1.4.1//lib/tools.jar:/usr/local/jakarta-tomcat-4.1.10/bin/bootstrap.jar

+ '[' -z '' ']'
+ CATALINA_BASE=/usr/local/jakarta-tomcat-4.1.10
+ '[' -z '' ']'
+ CATALINA_TMPDIR=/usr/local/jakarta-tomcat-4.1.10/temp
+ false
+ echo 'Using CATALINA_BASE:   /usr/local/jakarta-tomcat-4.1.10'
Using CATALINA_BASE:   /usr/local/jakarta-tomcat-4.1.10
+ echo 'Using CATALINA_HOME:   /usr/local/jakarta-tomcat-4.1.10'
Using CATALINA_HOME:   /usr/local/jakarta-tomcat-4.1.10
+ echo 'Using CATALINA_TMPDIR: /usr/local/jakarta-tomcat-4.1.10/temp'
Using CATALINA_TMPDIR: /usr/local/jakarta-tomcat-4.1.10/temp
+ echo 'Using JAVA_HOME:   /usr/local/j2sdk1.4.1/'
Using JAVA_HOME:   /usr/local/j2sdk1.4.1/
+ '[' stop = jpda ']'
+ '[' stop = debug ']'
+ '[' stop = embedded ']'
+ '[' stop = run ']'
+ '[' stop = start ']'
+ '[' stop = stop ']'
+ shift
+ exec /usr/local/j2sdk1.4.1//bin/java
-Djava.endorsed.dirs=/usr/local/jakarta-tomcat-4.1.10/bin:/usr/local/jakarta-tomcat-4.1.10/co

mmon/endorsed -classpath
/usr/local/j2sdk1.4.1//lib/tools.jar:/usr/local/jakarta-tomcat-4.1.10/bin/bootstrap.jar
-Dcatalina.base=/us
r/local/jakarta-tomcat-4.1.10
-Dcatalina.home=/usr/local/jakarta-tomcat-4.1.10
-Djava.io.tmpdir=/usr/local/jakarta-tomcat-4.1.10/tem
p org.apache.catalina.startup.Bootstrap stop
Catalina.stop: java.net.ConnectException: Connection timed out
java.net.ConnectException: Connection timed out
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:305)
at
java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:171)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:158)
at java.net.Socket.connect(Socket.java:426)
at java.net.Socket.connect(Socket.java:376)
at java.net.Socket.init(Socket.java:291)
at java.net.Socket.init(Socket.java:119)
at org.apache.catalina.startup.Catalina.stop(Catalina.java:579)
at
org.apache.catalina.startup.Catalina.execute(Catalina.java:402)
at
org.apache.catalina.startup.Catalina.process(Catalina.java:180)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:324)
at
org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203)

Thanxs and bye!

Marc



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




JDBC realm on 4.1.10

2002-09-22 Thread Paul Phillips

I have a server running 4.0.3.  On this server, I implemented a webapp that 
uses a JDBC realm for form based authentication.  The database is mysql. 
It works fine.

The lines in the 4.0.3 server.xml file relative to the JDBC realm look like 
this:

Realm  className=org.apache.catalina.realm.JDBCRealm debug=99
driverName=org.gjt.mm.mysql.Driver
connectionURL=jdbc:mysql://localhost/xyz?user=meamp;password=mypassword
userTable=userTableName userNameCol=login userCredCol=password
userRoleTable=roles roleNameCol=role /



So, I decided to give 4.1.10 a try.  I used the admin app included in 
4.1.10 to setup the realm for my context.  When setting up the realm, I did 
not put anything in the digest field in the admin app, since I am sending 
clear text.  However, Tomcat would not restart.  I found that, if this line 
is left blank, the admin app puts:
digest=
into the server.xml.  This won't parse, so it won't start.  I had to remove 
it by hand.

When I got it to start, the authentication on my webapp won't work.  The 
login screen shows up, then I enter my username and password.  When I 
submit it, the page starts to process, but never goes anywhere.  It doesn't 
time out, doesn't give an error, nothing.  It just sits and tries something 
(I don't know what...).

The relevant lines in the 4.1.10 server.xml (generated by the admin app) 
are:

Realm className=org.apache.catalina.realm.JDBCRealm connectionName=me 
connectionPassword=mypassword connectionURL=jdbc:mysql://localhost/xyz 
debug=9  driverName=com.mysql.jdbc.Driver roleNameCol=role 
userCredCol=password userNameCol=login userRoleTable=roles 
userTable=userTableName validate=true/

I have tried a number of variants of the above, all to no avail.  I have 
tried the older mysql driver - no change.

If anybody has any ideas, I would be grateful for the help.

Regards,
Paul Phillips

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




Re: Cannot setup tomcat

2002-09-22 Thread Kwok Peng Tuck

The problem with the shutdown probably has something to do with the fact 
that it didn't start up in the first place. I think we should 
concentrate on why it won't start first. After starting up, do a ps to 
see if java is listed as a process. Then we'll know if tomcat started up 
in the first place.

Marc Vila Pérez wrote:

Hi!!!
I cannot setup Tomcat 4.1.10, on Redhat 7.2 with Apache 1.3.22 and
jdk1.4.1. I've followed all the instructions to install it, and seems
all it's ok, but when I start tomcat:
bash-2.05$$CATALINA_HOME/bin/startup.sh
Using CATALINA_BASE: /usr/local/jakarta-tomcat-4.0.10
Using CATALINA_HOME: /usr/local/jakarta-tomcat-4.0.10
Using JAVA_HOME: /usr/local/j2sdk1.4.1
bash-2.05$ (no errors returned)

If I look the catalina.out file, no chars has been written, If I try to
connect to my server http://myserver:8080, the browser gives the
standard invalid URL error.

Then if I try to shutdown tomcat...
bash-2.05$$CATALINA_HOME/bin/shutdown.sh
Using CATALINA_BASE: /usr/local/jakarta-tomcat-4.0.10
Using CATALINA_HOME: /usr/local/jakarta-tomcat-4.0.10
Using JAVA_HOME: /usr/local/j2sdk1.4.1

no error returned, but the command not finalizes... after waiting a long
time, I must abort the operation (Ctrl + c) and kill the tomcat process
manually.

Anybody knows what I'm doing wrong? Could it be a OS problem? jdk?
tomcat? I've tried with different tomcat versions (3.3.1 and 4.0.4),
and continue having the same problem.


If  I try to shutdown tomcat with the next sentence:

bash-2.05$sh -x catalina.sh stop  shutdown.txt

I obtain:

+ cygwin=false
++ uname
+ PRG=catalina.sh
+ '[' -h catalina.sh ']'
++ dirname catalina.sh
+ PRGDIR=.
++ cd ./..
++ pwd
+ CATALINA_HOME=/usr/local/jakarta-tomcat-4.1.10
+ '[' -r /usr/local/jakarta-tomcat-4.1.10/bin/setenv.sh ']'
+ false
+ '[' -r /usr/local/jakarta-tomcat-4.1.10/bin/setclasspath.sh ']'
+ BASEDIR=/usr/local/jakarta-tomcat-4.1.10
+ . /usr/local/jakarta-tomcat-4.1.10/bin/setclasspath.sh
++ '[' -z /usr/local/j2sdk1.4.1/ ']'
++ '[' '!' -r /usr/local/j2sdk1.4.1//bin/java -o '!' -r
/usr/local/j2sdk1.4.1//bin/jdb -o '!' -r
/usr/local/j2sdk1.4.1//bin/javac ']
'
++ '[' -z /usr/local/jakarta-tomcat-4.1.10 ']'
++ '[' '!' -r /usr/local/jakarta-tomcat-4.1.10/bin/setclasspath.sh ']'
++
JAVA_ENDORSED_DIRS=/usr/local/jakarta-tomcat-4.1.10/bin:/usr/local/jakarta-tomcat-4.1.10/common/endorsed

++ CLASSPATH=/usr/local/j2sdk1.4.1//lib/tools.jar
++ JIKESPATH=
+++ uname -s
++ '[' Linux = Darwin ']'
++ _RUNJAVA=/usr/local/j2sdk1.4.1//bin/java
++ _RUNJDB=/usr/local/j2sdk1.4.1//bin/jdb
++ _RUNJAVAC=/usr/local/j2sdk1.4.1//bin/javac
+ '[' -n '' ']'
+
CLASSPATH=/usr/local/j2sdk1.4.1//lib/tools.jar:/usr/local/jakarta-tomcat-4.1.10/bin/bootstrap.jar

+ '[' -z '' ']'
+ CATALINA_BASE=/usr/local/jakarta-tomcat-4.1.10
+ '[' -z '' ']'
+ CATALINA_TMPDIR=/usr/local/jakarta-tomcat-4.1.10/temp
+ false
+ echo 'Using CATALINA_BASE:   /usr/local/jakarta-tomcat-4.1.10'
Using CATALINA_BASE:   /usr/local/jakarta-tomcat-4.1.10
+ echo 'Using CATALINA_HOME:   /usr/local/jakarta-tomcat-4.1.10'
Using CATALINA_HOME:   /usr/local/jakarta-tomcat-4.1.10
+ echo 'Using CATALINA_TMPDIR: /usr/local/jakarta-tomcat-4.1.10/temp'
Using CATALINA_TMPDIR: /usr/local/jakarta-tomcat-4.1.10/temp
+ echo 'Using JAVA_HOME:   /usr/local/j2sdk1.4.1/'
Using JAVA_HOME:   /usr/local/j2sdk1.4.1/
+ '[' stop = jpda ']'
+ '[' stop = debug ']'
+ '[' stop = embedded ']'
+ '[' stop = run ']'
+ '[' stop = start ']'
+ '[' stop = stop ']'
+ shift
+ exec /usr/local/j2sdk1.4.1//bin/java
-Djava.endorsed.dirs=/usr/local/jakarta-tomcat-4.1.10/bin:/usr/local/jakarta-tomcat-4.1.10/co

mmon/endorsed -classpath
/usr/local/j2sdk1.4.1//lib/tools.jar:/usr/local/jakarta-tomcat-4.1.10/bin/bootstrap.jar
-Dcatalina.base=/us
r/local/jakarta-tomcat-4.1.10
-Dcatalina.home=/usr/local/jakarta-tomcat-4.1.10
-Djava.io.tmpdir=/usr/local/jakarta-tomcat-4.1.10/tem
p org.apache.catalina.startup.Bootstrap stop
Catalina.stop: java.net.ConnectException: Connection timed out
java.net.ConnectException: Connection timed out
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:305)
at
java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:171)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:158)
at java.net.Socket.connect(Socket.java:426)
at java.net.Socket.connect(Socket.java:376)
at java.net.Socket.init(Socket.java:291)
at java.net.Socket.init(Socket.java:119)
at org.apache.catalina.startup.Catalina.stop(Catalina.java:579)
at
org.apache.catalina.startup.Catalina.execute(Catalina.java:402)
at
org.apache.catalina.startup.Catalina.process(Catalina.java:180)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

at

RE: Postgresql DataSource Tomcat 4.1 SQLException

2002-09-22 Thread Ray Madigan

Paul:

Did you get this problem fixed.  I have nearly the identical situation you
are using working and will help if you need it.

Thanks

-Original Message-
From: Ben Walding [mailto:[EMAIL PROTECTED]]
Sent: Sunday, September 22, 2002 1:36 AM
To: Tomcat Users List
Subject: Re: Postgresql DataSource Tomcat 4.1 SQLException


The JNDI namespace you want is
java:comp/env

and not java:/comp/env

But I'm not sure if is the cause of the problem.




Alfonso Martinez wrote:

Hi Paul,

I am a newbie too, but trying to help. I had a problem like yours recently
and found an error in my server.xml. I know you checked that file already,
but can you send those (also web.xml) files to me please to see what I can
do? Thanks

Jose

On Fri, Sep 20, 2002 at 11:10:41AM -0500, Paul Salazar wrote:


Hi,

I am trying to setup a postgresql datasource on tomcat 4.1 with much
frustration.
I have read all the threads out there concerning this matter and I can't
see to
find anyone who has a working example. What I have is this:

Redhat 7.2 server running:
Postgresql 7.2
Tomcat 4.1

I have a working Tomcat app that can connect to the Db and perform
queries when manually loading the driver
'Class.forName(org.postgresql.Driver);
and then doing a getConnection using the URL, Name, Password.

But when trying to get a connection using a Datasource, as in,

Context ctx = new InitialContext();
Context envctx = (Context)ctx.lookup(java:/comp/env);
DataSource ds = (DataSource)envctx.lookup(jdbc/postgres); //jndi name
of the datasource
Connection conn = ds.getConnection();

the getConnection() statement throws an SQLException: Cannot load JDBC
driver class 'null'

I have gone over all the server.xml and web.xml files with a fine tooth
comb and assure
you that is not the problem. I have also tried using the jxDBCon drivers
with the same
results. I have come to the conclusion that it must be a tomcat problem.
Has anyone
gotten this to work with this config??

Paul Salazar






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



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








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


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




XML Parsing in Servlet

2002-09-22 Thread Toby Saville

Hi,

Im not sure if this is the correct place to post this type of message but
ill try anyways.

Im trying to parse an XML file in a servlet's init(Servlet config) method on
a tomcat4.1 server. I am using a xerces SAX parser. The servlet has a
load-on-startup tag in web.xml with a value of 1.

When i attempt to parse the file in the init method, the loading of the web
server stops. 
The standard output prints up to:

The log file outputs up to starting filters, but nothing else. i pass a
URI compliant string to the parser which looks like this:
file:///d:/Projects/portfolio/webapps/xml/metadata.xml

I can create a File object using this URI and look at its details in the
init method, but as soon as i say parser.parse(fileURI, handler); the
loading of tomcat stops. 

Any ideas why this could be?

Thanks

-Tobes


***
This message is intended for the addressee named and 
may  contain confidential information. If you are not the 
intended recipient, please delete it and notify the sender. 
Views expressed in this message are those of the 
individual sender, and are not necessarily the views of the
Department of  Information Technology  Management.

This email message has been swept by MIMEsweeper 
for the presence of computer viruses.
***




FW: XML Parsing in Servlet

2002-09-22 Thread Toby Saville

Hi,

back again, i sent my last email without writing what standard out prints.
Here it is:

Starting service Tomcat-Standalone
Apache Tomcat/4.1.10

Sorry for re posting.

-t0bes



-Original Message-
From: Toby Saville 
Sent: Monday, 23 September 2002 12:06 PM
To: 'Tomcat Users List'
Subject: XML Parsing in Servlet


Hi,

Im not sure if this is the correct place to post this type of message but
ill try anyways.

Im trying to parse an XML file in a servlet's init(Servlet config) method on
a tomcat4.1 server. I am using a xerces SAX parser. The servlet has a
load-on-startup tag in web.xml with a value of 1.

When i attempt to parse the file in the init method, the loading of the web
server stops. 
The standard output prints up to:

The log file outputs up to starting filters, but nothing else. i pass a
URI compliant string to the parser which looks like this:
file:///d:/Projects/portfolio/webapps/xml/metadata.xml

I can create a File object using this URI and look at its details in the
init method, but as soon as i say parser.parse(fileURI, handler); the
loading of tomcat stops. 

Any ideas why this could be?

Thanks

-Tobes


***
This message is intended for the addressee named and 
may  contain confidential information. If you are not the 
intended recipient, please delete it and notify the sender. 
Views expressed in this message are those of the 
individual sender, and are not necessarily the views of the
Department of  Information Technology  Management.

This email message has been swept by MIMEsweeper 
for the presence of computer viruses.
***




Re: owner.group for TomCAt

2002-09-22 Thread Kwok Peng Tuck

I put mine as a user other than root or nobody.
For testing you *could* put it as root. I guess it is safer as some user 
other than root.

[EMAIL PROTECTED] wrote:

Hi All.
Should the owner.groupd for Tomcats be nobody.nogroup rather  than
root.root ???

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


  




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




Re: JSP working but Servlets not working

2002-09-22 Thread Jacob Kjome


Notice your form action:

form action=/HelloWorldExample method=post

You prefixed it with a / meaning that it looks for your servlet from the 
root of the web.  Since your context is not the root of the web, the 
message you got is exactly what I would expect.  To be correct, here is 
what you would do:

form action=/kithany/HelloWorldExample method=post

Further, that will still not work because you have only defined your 
servlet in the web.xml.  You have not yet provided a mapping for it.  For 
defined servlets without mappings, Tomcat provides a default servlet 
invoker at the path /yourcontext/servlet/*.  So, to make this really work, 
you would use:

form action=/kithany/servlet/HelloWorldExample method=post

Also, you don't necessarily need to have the servlet-name be the same as 
the servlet-class.  I would provide a simpler name such as:

servlet
   servlet-namehello/servlet-name
   servlet-classHelloWorldExample/servlet-class
/servlet


Now, you can actually access your servlet in two ways.  The one above or:

form action=/kithany/servlet/hello method=post


Better yet, provide a servlet-mapping such as:

servlet-mapping
 servlet-namehello/servlet-name
 url-pattern/hi/url-pattern
/servlet-mapping

Now you can access it via:

form action=/kithany/hi method=post


This is all pretty basic stuff.  You should take a look at a book like 
Jason Hunter's Java Servlet Programming, Second Edition.  It will provide 
you with all you need to get a base understanding of servlets.  Then you 
can concentrate on the really tough questions.

Hope that helped.


Jake



At 06:53 PM 9/22/2002 +, you wrote:
Hi Experts,

Greetings!

I am using Apache 1.3.26 + (Jboss 3.0.3, Tomcat 4.0.4 bundle)
I treid to creat a small Web Application. My JSP files are WORKING 
properly BUT when Servlet is called (from JSP Page),
I get No Context COnfigured Error

My Directory structure is as follows:
/kithany (root)
/kithany/register.htm
/kithany/WEB-INF/web.xml
/kithany/WEB-INF/classes/HelloWorldExample.java
/kithany/WEB-INF/classes/HelloWorldExample.class
/kithany/META-INF/application.xml


I have my APPLICATION.XML file as follows:
-
?xml version=1.0 encoding=ISO-8859-1?
application
display-nameKITHANY/display-name
module
web
web-urikithany.war/web-uri
context-root/kithany/context-root
/web
/module
/application
-

And, my WEB.XML file is as:
-
?xml version=1.0 encoding=UTF-8?
!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
   servlet
   servlet-nameHelloWorldExample/servlet-name
   servlet-classHelloWorldExample/servlet-class
   /servlet
   welcome-file-list
 welcome-file
 index.jsp
 /welcome-file
/welcome-file-list
/web-app
-

My JSP file register.jsp is shown below. This file calls a SERVLET 
HelloWorldExample.class when user clicks.
-

form action=/HelloWorldExample method=post

...rest of the file is not shown.

-


I then create WAR file as follows:
-
#pwd
#/kithany
#jar -cvfM kithany.war .
-

Which I then, put it into /jboss/server/default/deploy and then start my
JBOSS(Tomcat/Catalina) Server and then on browser, I type following:
http://MY_IP_ADDR_ESS:8080/kithany/register.html which displays the file 
correctly. When the user clicks SUBMIT, the file should call 
HelloWorldExample.class file BUT it displays Error like:

Apache Tomcat/4.0.3 - HTTP Status 500 - No Context configured to process 
this request

Experts, could you please guide me on to this.

THANKS!

Manoj G. Kithany
[EMAIL PROTECTED]



_
Send and receive Hotmail on your mobile device: http://mobile.msn.com


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



URGENT: SQL Server and Tomct 4.1 Pooling

2002-09-22 Thread Amitabh Dubey

Hello Guys,
   I have been working on this problem for 3 days now and have not been able
to make Tomcat create a connection pool for me. This is my setup

Database - SQL Server 2000
Driver   - JDBC Driver by microsoft
Tomcat   - 4.1.2 (Packaged as part of JWSDK from SUN)

I was able to successfully create and use connections using a DataSource.
However, I want to use connection pooling and have no idea of how I can do
so. If there is anyone who has been successful in creating a DataSource
using a Connection pool with SQL Server, please could you either send me a
snippet of your server.xml or tell me how i can go about achieving pooling.

Also, do i need Tyrex if i want to use connection pooling. I have downloaded
it from their website anyways and placed in my tomcat\common\lib directory.
How do i go about using this pool manager if this i what i have to use with
tomcat to achieve pooling.

Please HELP!!

Thank you
Amitabh Dubey


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




Re: FW: XML Parsing in Servlet

2002-09-22 Thread Jacob Kjome


Stay away from File IO in webapps anyway.  Use an InputStream if at all 
possible.  You've made your app work on Windows only which defeats the 
purpose of the multi-platform and distibutability benefits of Java and 
webapps.  Also, if you run your app out of a .war file and the file you are 
trying to access is inside that .war file, your app will fail because there 
is no File IO that can be done within the archive.  Try using this instead

InputStream is = getServletContext().getResourceAsStream(/foo.txt);

That loads foo.txt from the root of your webapp, wherever that is.  This 
will work on any platform and even in the case where you serve your webapp 
directly from a .war file.

Jake



At 12:08 PM 9/23/2002 +1000, you wrote:
Hi,

back again, i sent my last email without writing what standard out prints.
Here it is:

Starting service Tomcat-Standalone
Apache Tomcat/4.1.10

Sorry for re posting.

-t0bes



-Original Message-
From: Toby Saville
Sent: Monday, 23 September 2002 12:06 PM
To: 'Tomcat Users List'
Subject: XML Parsing in Servlet


Hi,

Im not sure if this is the correct place to post this type of message but
ill try anyways.

Im trying to parse an XML file in a servlet's init(Servlet config) method on
a tomcat4.1 server. I am using a xerces SAX parser. The servlet has a
load-on-startup tag in web.xml with a value of 1.

When i attempt to parse the file in the init method, the loading of the web
server stops.
The standard output prints up to:

The log file outputs up to starting filters, but nothing else. i pass a
URI compliant string to the parser which looks like this:
file:///d:/Projects/portfolio/webapps/xml/metadata.xml

I can create a File object using this URI and look at its details in the
init method, but as soon as i say parser.parse(fileURI, handler); the
loading of tomcat stops.

Any ideas why this could be?

Thanks

-Tobes


***
This message is intended for the addressee named and
may  contain confidential information. If you are not the
intended recipient, please delete it and notify the sender.
Views expressed in this message are those of the
individual sender, and are not necessarily the views of the
Department of  Information Technology  Management.

This email message has been swept by MIMEsweeper
for the presence of computer viruses.
***



Cannot load JDBC driver class 'null'

2002-09-22 Thread John Walstra

I'm trying to set up a JNDI connection to MySQL. I'm using the binary release 
of 4.1.11 with 4.0.4's jasper-compiler.jar and jasper-runtime.jar. I'm also 
using mysql-connector-java-2.0.14.

It's very similar to this thread 
http://www.mail-archive.com/tomcat-user@jakarta.apache.org/msg64346.html , 
however I still can't get mine working after reading that thread. I've 
basically followed (cut and paste) the JNDI Datasource HOWTO, 
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples-howto.html 
.

Here is the Context section of my server.xml

Context path=/jkw 
docBase=/usr/local/web/meta-htdocs/JWALSTRA/htdocs/jsp
debug=5 useNaming=true
reloadable=true crossContext=true

Logger className=org.apache.catalina.logger.FileLogger
prefix=jkw_log. suffix=.txt
timestamp=true/

Resource name=jdbc/JKW
auth=Container
type=javax.sql.DataSource/

ResourceParams name=jdbc/JKW
parameter
namefactory/name

valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
/parameter

!-- Maximum number of dB connections in pool. Make sure you
configure your mysqld max_connections large enough to 
handle
all of your db connections. Set to 0 for no limit.
--
parameter
namemaxActive/name
value100/value
/parameter

!-- Maximum number of idle dB connections to retain in pool.
Set to 0 for no limit.
--
parameter
namemaxIdle/name
value30/value
/parameter

!-- Maximum time to wait for a dB connection to become 
available
in ms, in this example 10 seconds. An Exception is 
thrown if
this timeout is exceeded.  Set to -1 to wait 
indefinitely.
--
parameter
namemaxWait/name
value1/value
/parameter

!-- MySQL dB username and password for dB connections  --
parameter
nameusername/name
valuenobody/value
/parameter
parameter
namepassword/name
value/value
/parameter

!-- Class name for mm.mysql JDBC driver --
parameter
namedriverClassName/name
valuecom.mysql.jdbc.Driver/value
/parameter

!-- The JDBC connection url for connecting to your MySQL dB.
The autoReconnect=true argument to the url makes sure 
that the
mm.mysql JDBC Driver will automatically reconnect if 
mysqld closed the
connection.  mysqld by default closes idle connections 
after 8 hours.
--

parameter
nameurl/name

valuejdbc:mysql://localhost:3306/jkw?autoReconnect=true/value
/parameter
/ResourceParams
/Context

Here is my web.xml

?xml version=1.0 encoding=ISO-8859-1?

!DOCTYPE web-app
PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN
http://java.sun.com/dtd/web-app_2_3.dtd;

web-app

  taglib
taglib-uri
  /orataglib
/taglib-uri
taglib-location
  /WEB-INF/tlds/orataglib_1_0_3.tld
/taglib-location
  /taglib

  taglib
taglib-uri
  /jkw
/taglib-uri
taglib-location
  /WEB-INF/tlds/jkw-1.0.tld
/taglib-location
  /taglib

  resource-ref
descriptionMySQL DB Connection/description
res-ref-namejdbc/JKW/res-ref-name
res-typejavax.sql.DataSource/res-type
res-authContainer/res-auth
  /resource-ref

/web-app

My common/lib directory ... (jasper* is from 4.0.4)

-rw-r--r--1 root root45386 Sep 19 08:30 activation.jar
-rw-r--r--1 root root   716139 Sep 19 08:30 ant.jar
-rw-r--r--1 root root90503 Sep 19 08:30 
commons-collections.jar
-rw-r--r--1 root root62998 Sep 19 08:30 commons-dbcp.jar
-rw-r--r--1 root root16910 Sep 19 08:30 

RE: FW: XML Parsing in Servlet

2002-09-22 Thread Toby Saville

Thanks for your help Jake,

I created an inputstream the way you said and passed it to the XML parser
but it stopped at the same point. I realised that i had set my DOCTYPE
definition to http://127.0.0.1/xml/metadata.xml. I figured this could be a
problem as the web server isnt yet started when the validation takes place.
So i changed my doctype from:
!DOCTYPE maps SYSTEM http://127.0.0.1/xml/maps.dtd;
to:
!DOCTYPE maps SYSTEM maps.dtd
but now i get the following exception:
java.net.MalformedURLException: no protocol: maps.dtd

Is it time to post this question to an XML forum or are you able to tell me
how i should specify my doctype?

thanks again,

t0bes

-Original Message-
From: Jacob Kjome [mailto:[EMAIL PROTECTED]]
Sent: Monday, 23 September 2002 1:16 PM
To: Tomcat Users List
Subject: Re: FW: XML Parsing in Servlet



Stay away from File IO in webapps anyway.  Use an InputStream if at all 
possible.  You've made your app work on Windows only which defeats the 
purpose of the multi-platform and distibutability benefits of Java and 
webapps.  Also, if you run your app out of a .war file and the file you are 
trying to access is inside that .war file, your app will fail because there 
is no File IO that can be done within the archive.  Try using this
instead

InputStream is = getServletContext().getResourceAsStream(/foo.txt);

That loads foo.txt from the root of your webapp, wherever that is.  This 
will work on any platform and even in the case where you serve your webapp 
directly from a .war file.

Jake



At 12:08 PM 9/23/2002 +1000, you wrote:
Hi,

back again, i sent my last email without writing what standard out prints.
Here it is:

Starting service Tomcat-Standalone
Apache Tomcat/4.1.10

Sorry for re posting.

-t0bes



-Original Message-
From: Toby Saville
Sent: Monday, 23 September 2002 12:06 PM
To: 'Tomcat Users List'
Subject: XML Parsing in Servlet


Hi,

Im not sure if this is the correct place to post this type of message but
ill try anyways.

Im trying to parse an XML file in a servlet's init(Servlet config) method
on
a tomcat4.1 server. I am using a xerces SAX parser. The servlet has a
load-on-startup tag in web.xml with a value of 1.

When i attempt to parse the file in the init method, the loading of the web
server stops.
The standard output prints up to:

The log file outputs up to starting filters, but nothing else. i pass a
URI compliant string to the parser which looks like this:
file:///d:/Projects/portfolio/webapps/xml/metadata.xml

I can create a File object using this URI and look at its details in the
init method, but as soon as i say parser.parse(fileURI, handler); the
loading of tomcat stops.

Any ideas why this could be?

Thanks

-Tobes


***
This message is intended for the addressee named and
may  contain confidential information. If you are not the
intended recipient, please delete it and notify the sender.
Views expressed in this message are those of the
individual sender, and are not necessarily the views of the
Department of  Information Technology  Management.

This email message has been swept by MIMEsweeper
for the presence of computer viruses.
***


***
This message is intended for the addressee named and 
may  contain confidential information. If you are not the 
intended recipient, please delete it and notify the sender. 
Views expressed in this message are those of the 
individual sender, and are not necessarily the views of the
Department of  Information Technology  Management.

This email message has been swept by MIMEsweeper 
for the presence of computer viruses.
***




Re: Cannot load JDBC driver class 'null'

2002-09-22 Thread Kwok Peng Tuck

Are you actually using the mysql driver? Cause if it says loading driver 
null, means there isn't one.

John Walstra wrote:

I'm trying to set up a JNDI connection to MySQL. I'm using the binary release 
of 4.1.11 with 4.0.4's jasper-compiler.jar and jasper-runtime.jar. I'm also 
using mysql-connector-java-2.0.14.

It's very similar to this thread 
http://www.mail-archive.com/tomcat-user@jakarta.apache.org/msg64346.html , 
however I still can't get mine working after reading that thread. I've 
basically followed (cut and paste) the JNDI Datasource HOWTO, 
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples-howto.html 
.

Here is the Context section of my server.xml

Context path=/jkw 
   docBase=/usr/local/web/meta-htdocs/JWALSTRA/htdocs/jsp
debug=5 useNaming=true
reloadable=true crossContext=true

   Logger className=org.apache.catalina.logger.FileLogger
   prefix=jkw_log. suffix=.txt
   timestamp=true/

   Resource name=jdbc/JKW
   auth=Container
   type=javax.sql.DataSource/

   ResourceParams name=jdbc/JKW
   parameter
   namefactory/name
   
valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
   /parameter

   !-- Maximum number of dB connections in pool. Make sure you
   configure your mysqld max_connections large enough to 
handle
   all of your db connections. Set to 0 for no limit.
   --
   parameter
   namemaxActive/name
   value100/value
   /parameter

   !-- Maximum number of idle dB connections to retain in pool.
   Set to 0 for no limit.
   --
   parameter
   namemaxIdle/name
   value30/value
   /parameter

   !-- Maximum time to wait for a dB connection to become 
available
   in ms, in this example 10 seconds. An Exception is 
thrown if
   this timeout is exceeded.  Set to -1 to wait 
indefinitely.
   --
   parameter
   namemaxWait/name
   value1/value
   /parameter

   !-- MySQL dB username and password for dB connections  --
   parameter
   nameusername/name
   valuenobody/value
   /parameter
   parameter
   namepassword/name
   value/value
   /parameter

   !-- Class name for mm.mysql JDBC driver --
   parameter
   namedriverClassName/name
   valuecom.mysql.jdbc.Driver/value
   /parameter

   !-- The JDBC connection url for connecting to your MySQL dB.
   The autoReconnect=true argument to the url makes sure 
that the
   mm.mysql JDBC Driver will automatically reconnect if 
mysqld closed the
   connection.  mysqld by default closes idle connections 
after 8 hours.
   --

   parameter
   nameurl/name
   
valuejdbc:mysql://localhost:3306/jkw?autoReconnect=true/value
   /parameter
   /ResourceParams
/Context

Here is my web.xml

?xml version=1.0 encoding=ISO-8859-1?

!DOCTYPE web-app
PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN
http://java.sun.com/dtd/web-app_2_3.dtd;

web-app

  taglib
taglib-uri
  /orataglib
/taglib-uri
taglib-location
  /WEB-INF/tlds/orataglib_1_0_3.tld
/taglib-location
  /taglib

  taglib
taglib-uri
  /jkw
/taglib-uri
taglib-location
  /WEB-INF/tlds/jkw-1.0.tld
/taglib-location
  /taglib

  resource-ref
descriptionMySQL DB Connection/description
res-ref-namejdbc/JKW/res-ref-name
res-typejavax.sql.DataSource/res-type
res-authContainer/res-auth
  /resource-ref

/web-app

My common/lib directory ... (jasper* is from 4.0.4)

-rw-r--r--1 root root45386 Sep 19 08:30 activation.jar
-rw-r--r--1 root root   716139 Sep 19 08:30 ant.jar
-rw-r--r--1 root root90503 Sep 19 08:30 
commons-collections.jar
-rw-r--r--1 root root62998 Sep 19 08:30 

RE: FW: XML Parsing in Servlet

2002-09-22 Thread Toby Saville

I tried using the file protocol in the doctype, similar to my original post,
ie:
!DOCTYPE maps SYSTEM
file:///d:/Projects/portfolio/webapps/xml/metadata.xml

And this worked. But isnt this defeating the multiplatform and
distributability benefits of Java and webapps as you mentioned before? Is
there an alternative?

Thanks again.

t0bes

-Original Message-
From: Toby Saville 
Sent: Monday, 23 September 2002 1:37 PM
To: 'Tomcat Users List'
Subject: RE: FW: XML Parsing in Servlet


Thanks for your help Jake,

I created an inputstream the way you said and passed it to the XML parser
but it stopped at the same point. I realised that i had set my DOCTYPE
definition to http://127.0.0.1/xml/metadata.xml. I figured this could be a
problem as the web server isnt yet started when the validation takes place.
So i changed my doctype from:
!DOCTYPE maps SYSTEM http://127.0.0.1/xml/maps.dtd;
to:
!DOCTYPE maps SYSTEM maps.dtd
but now i get the following exception:
java.net.MalformedURLException: no protocol: maps.dtd

Is it time to post this question to an XML forum or are you able to tell me
how i should specify my doctype?

thanks again,

t0bes

-Original Message-
From: Jacob Kjome [mailto:[EMAIL PROTECTED]]
Sent: Monday, 23 September 2002 1:16 PM
To: Tomcat Users List
Subject: Re: FW: XML Parsing in Servlet



Stay away from File IO in webapps anyway.  Use an InputStream if at all 
possible.  You've made your app work on Windows only which defeats the 
purpose of the multi-platform and distibutability benefits of Java and 
webapps.  Also, if you run your app out of a .war file and the file you are 
trying to access is inside that .war file, your app will fail because there 
is no File IO that can be done within the archive.  Try using this
instead

InputStream is = getServletContext().getResourceAsStream(/foo.txt);

That loads foo.txt from the root of your webapp, wherever that is.  This 
will work on any platform and even in the case where you serve your webapp 
directly from a .war file.

Jake



At 12:08 PM 9/23/2002 +1000, you wrote:
Hi,

back again, i sent my last email without writing what standard out prints.
Here it is:

Starting service Tomcat-Standalone
Apache Tomcat/4.1.10

Sorry for re posting.

-t0bes



-Original Message-
From: Toby Saville
Sent: Monday, 23 September 2002 12:06 PM
To: 'Tomcat Users List'
Subject: XML Parsing in Servlet


Hi,

Im not sure if this is the correct place to post this type of message but
ill try anyways.

Im trying to parse an XML file in a servlet's init(Servlet config) method
on
a tomcat4.1 server. I am using a xerces SAX parser. The servlet has a
load-on-startup tag in web.xml with a value of 1.

When i attempt to parse the file in the init method, the loading of the web
server stops.
The standard output prints up to:

The log file outputs up to starting filters, but nothing else. i pass a
URI compliant string to the parser which looks like this:
file:///d:/Projects/portfolio/webapps/xml/metadata.xml

I can create a File object using this URI and look at its details in the
init method, but as soon as i say parser.parse(fileURI, handler); the
loading of tomcat stops.

Any ideas why this could be?

Thanks

-Tobes


***
This message is intended for the addressee named and
may  contain confidential information. If you are not the
intended recipient, please delete it and notify the sender.
Views expressed in this message are those of the
individual sender, and are not necessarily the views of the
Department of  Information Technology  Management.

This email message has been swept by MIMEsweeper
for the presence of computer viruses.
***


***
This message is intended for the addressee named and 
may  contain confidential information. If you are not the 
intended recipient, please delete it and notify the sender. 
Views expressed in this message are those of the 
individual sender, and are not necessarily the views of the
Department of  Information Technology  Management.

This email message has been swept by MIMEsweeper 
for the presence of computer viruses.
***




Re: Cannot load JDBC driver class 'null'

2002-09-22 Thread John Walstra

I do have mysql-connector-java-2.0.14-bin.jar in the common/lib directory. 
Shouldn't it find the correct class being there?

On Sunday 22 September 2002 10:39 pm, Kwok Peng Tuck wrote:
 Are you actually using the mysql driver? Cause if it says loading driver
 null, means there isn't one.



 John Walstra wrote:
 I'm trying to set up a JNDI connection to MySQL. I'm using the binary
  release of 4.1.11 with 4.0.4's jasper-compiler.jar and
  jasper-runtime.jar. I'm also using mysql-connector-java-2.0.14.
 
 It's very similar to this thread
 http://www.mail-archive.com/tomcat-user@jakarta.apache.org/msg64346.html ,
 however I still can't get mine working after reading that thread. I've
 basically followed (cut and paste) the JNDI Datasource HOWTO,
 http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples-h
 owto.html .
 
 Here is the Context section of my server.xml
 
 Context path=/jkw
  docBase=/usr/local/web/meta-htdocs/JWALSTRA/htdocs/jsp
 debug=5 useNaming=true
 reloadable=true crossContext=true
 
  Logger className=org.apache.catalina.logger.FileLogger
  prefix=jkw_log. suffix=.txt
  timestamp=true/
 
  Resource name=jdbc/JKW
  auth=Container
  type=javax.sql.DataSource/
 
  ResourceParams name=jdbc/JKW
  parameter
  namefactory/name
  
valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
  /parameter
 
  !-- Maximum number of dB connections in pool. Make sure you
  configure your mysqld max_connections large enough to 
handle
  all of your db connections. Set to 0 for no limit.
  --
  parameter
  namemaxActive/name
  value100/value
  /parameter
 
  !-- Maximum number of idle dB connections to retain in pool.
  Set to 0 for no limit.
  --
  parameter
  namemaxIdle/name
  value30/value
  /parameter
 
  !-- Maximum time to wait for a dB connection to become 
available
  in ms, in this example 10 seconds. An Exception is 
thrown if
  this timeout is exceeded.  Set to -1 to wait 
indefinitely.
  --
  parameter
  namemaxWait/name
  value1/value
  /parameter
 
  !-- MySQL dB username and password for dB connections  --
  parameter
  nameusername/name
  valuenobody/value
  /parameter
  parameter
  namepassword/name
  value/value
  /parameter
 
  !-- Class name for mm.mysql JDBC driver --
  parameter
  namedriverClassName/name
  valuecom.mysql.jdbc.Driver/value
  /parameter
 
  !-- The JDBC connection url for connecting to your MySQL dB.
  The autoReconnect=true argument to the url makes sure 
that the
  mm.mysql JDBC Driver will automatically reconnect if 
mysqld closed the
  connection.  mysqld by default closes idle connections 
after 8 hours.
  --
 
  parameter
  nameurl/name
  
valuejdbc:mysql://localhost:3306/jkw?autoReconnect=true/value
  /parameter
  /ResourceParams
 /Context
 
 Here is my web.xml
 
 ?xml version=1.0 encoding=ISO-8859-1?
 
 !DOCTYPE web-app
 PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN
 http://java.sun.com/dtd/web-app_2_3.dtd;
 
 web-app
 
   taglib
 taglib-uri
   /orataglib
 /taglib-uri
 taglib-location
   /WEB-INF/tlds/orataglib_1_0_3.tld
 /taglib-location
   /taglib
 
   taglib
 taglib-uri
   /jkw
 /taglib-uri
 taglib-location
   /WEB-INF/tlds/jkw-1.0.tld
 /taglib-location
   /taglib
 
   resource-ref
 descriptionMySQL DB Connection/description
 res-ref-namejdbc/JKW/res-ref-name
 res-typejavax.sql.DataSource/res-type
 res-authContainer/res-auth
   /resource-ref
 
 /web-app
 
 My common/lib directory ... (jasper* is from 4.0.4)
 
 -rw-r--r--1 root root45386 Sep 19 08:30 activation.jar
 -rw-r--r--1 

Re: Cannot load JDBC driver class 'null'

2002-09-22 Thread Kwok Peng Tuck

Well, when you listed the contents of your commons directory,
I didn't see it there, and it still isn't .But I'll take your word that 
it is :) .
In this case, I'd double check to see if

parameter
namedriverClassName/name
valuecom.mysql.jdbc.Driver/value
/parameter

is actually correct (the value attribute).

Oh yeah, is this suppose to be in the server.xml at all ? 
parameter
nameurl/name
 valuejdbc:mysql://localhost:3306/jkw?autoReconnect=true/value
/parameter

I configured a datasource for tomcat to work with postgresql and don't remember 
including the url. Plus the docs don't mention this. 




John Walstra wrote:

I do have mysql-connector-java-2.0.14-bin.jar in the common/lib directory. 
Shouldn't it find the correct class being there?

On Sunday 22 September 2002 10:39 pm, Kwok Peng Tuck wrote:
  

Are you actually using the mysql driver? Cause if it says loading driver
null, means there isn't one.





  

John Walstra wrote:


I'm trying to set up a JNDI connection to MySQL. I'm using the binary
release of 4.1.11 with 4.0.4's jasper-compiler.jar and
jasper-runtime.jar. I'm also using mysql-connector-java-2.0.14.

It's very similar to this thread
http://www.mail-archive.com/tomcat-user@jakarta.apache.org/msg64346.html ,
however I still can't get mine working after reading that thread. I've
basically followed (cut and paste) the JNDI Datasource HOWTO,
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples-h
owto.html .

Here is the Context section of my server.xml

   Context path=/jkw
 docBase=/usr/local/web/meta-htdocs/JWALSTRA/htdocs/jsp
   debug=5 useNaming=true
   reloadable=true crossContext=true

 Logger className=org.apache.catalina.logger.FileLogger
 prefix=jkw_log. suffix=.txt
 timestamp=true/

 Resource name=jdbc/JKW
 auth=Container
 type=javax.sql.DataSource/

 ResourceParams name=jdbc/JKW
 parameter
 namefactory/name
 
valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
 /parameter

 !-- Maximum number of dB connections in pool. Make sure you
 configure your mysqld max_connections large enough to 
handle
 all of your db connections. Set to 0 for no limit.
 --
 parameter
 namemaxActive/name
 value100/value
 /parameter

 !-- Maximum number of idle dB connections to retain in pool.
 Set to 0 for no limit.
 --
 parameter
 namemaxIdle/name
 value30/value
 /parameter

 !-- Maximum time to wait for a dB connection to become 
available
 in ms, in this example 10 seconds. An Exception is 
thrown if
 this timeout is exceeded.  Set to -1 to wait 
indefinitely.
 --
 parameter
 namemaxWait/name
 value1/value
 /parameter

 !-- MySQL dB username and password for dB connections  --
 parameter
 nameusername/name
 valuenobody/value
 /parameter
 parameter
 namepassword/name
 value/value
 /parameter

 !-- Class name for mm.mysql JDBC driver --
 parameter
 namedriverClassName/name
 valuecom.mysql.jdbc.Driver/value
 /parameter

 !-- The JDBC connection url for connecting to your MySQL dB.
 The autoReconnect=true argument to the url makes sure 
that the
 mm.mysql JDBC Driver will automatically reconnect if 
mysqld closed the
 connection.  mysqld by default closes idle connections 
after 8 hours.
 --

 parameter
 nameurl/name
 
valuejdbc:mysql://localhost:3306/jkw?autoReconnect=true/value
 /parameter
 /ResourceParams
   /Context

Here is my web.xml

?xml version=1.0 encoding=ISO-8859-1?

!DOCTYPE web-app
   PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN
   http://java.sun.com/dtd/web-app_2_3.dtd;

web-app

 taglib
   taglib-uri
 /orataglib
   /taglib-uri
   

Re: Cannot load JDBC driver class 'null'

2002-09-22 Thread Jacob Kjome


Yes, it should find it.  Have you verified that the class in the 
driverClassName element actually does exist in that package in the jar file 
you just mentioned?

Jake

At 10:56 PM 9/22/2002 -0500, you wrote:
I do have mysql-connector-java-2.0.14-bin.jar in the common/lib directory.
Shouldn't it find the correct class being there?

On Sunday 22 September 2002 10:39 pm, Kwok Peng Tuck wrote:
  Are you actually using the mysql driver? Cause if it says loading driver
  null, means there isn't one.
 


  John Walstra wrote:
  I'm trying to set up a JNDI connection to MySQL. I'm using the binary
   release of 4.1.11 with 4.0.4's jasper-compiler.jar and
   jasper-runtime.jar. I'm also using mysql-connector-java-2.0.14.
  
  It's very similar to this thread
  http://www.mail-archive.com/tomcat-user@jakarta.apache.org/msg64346.html ,
  however I still can't get mine working after reading that thread. I've
  basically followed (cut and paste) the JNDI Datasource HOWTO,
  http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples-h
  owto.html .
  
  Here is the Context section of my server.xml
  
  Context path=/jkw
   docBase=/usr/local/web/meta-htdocs/JWALSTRA/htdocs/jsp
  debug=5 useNaming=true
  reloadable=true crossContext=true
  
   Logger className=org.apache.catalina.logger.FileLogger
   prefix=jkw_log. suffix=.txt
   timestamp=true/
  
   Resource name=jdbc/JKW
   auth=Container
   type=javax.sql.DataSource/
  
   ResourceParams name=jdbc/JKW
   parameter
   namefactory/name
   
 valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
   /parameter
  
   !-- Maximum number of dB connections in pool. 
 Make sure you
   configure your mysqld max_connections 
 large enough to handle
   all of your db connections. Set to 0 for 
 no limit.
   --
   parameter
   namemaxActive/name
   value100/value
   /parameter
  
   !-- Maximum number of idle dB connections to 
 retain in pool.
   Set to 0 for no limit.
   --
   parameter
   namemaxIdle/name
   value30/value
   /parameter
  
   !-- Maximum time to wait for a dB connection to 
 become available
   in ms, in this example 10 seconds. An 
 Exception is thrown if
   this timeout is exceeded.  Set to -1 to 
 wait indefinitely.
   --
   parameter
   namemaxWait/name
   value1/value
   /parameter
  
   !-- MySQL dB username and password for dB 
 connections  --
   parameter
   nameusername/name
   valuenobody/value
   /parameter
   parameter
   namepassword/name
   value/value
   /parameter
  
   !-- Class name for mm.mysql JDBC driver --
   parameter
   namedriverClassName/name
   valuecom.mysql.jdbc.Driver/value
   /parameter
  
   !-- The JDBC connection url for connecting to 
 your MySQL dB.
   The autoReconnect=true argument to the 
 url makes sure that the
   mm.mysql JDBC Driver will automatically 
 reconnect if mysqld closed the
   connection.  mysqld by default closes 
 idle connections after 8 hours.
   --
  
   parameter
   nameurl/name
   
 valuejdbc:mysql://localhost:3306/jkw?autoReconnect=true/value
   /parameter
   /ResourceParams
  /Context
  
  Here is my web.xml
  
  ?xml version=1.0 encoding=ISO-8859-1?
  
  !DOCTYPE web-app
  PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN
  http://java.sun.com/dtd/web-app_2_3.dtd;
  
  web-app
  
taglib
  taglib-uri
/orataglib
  /taglib-uri
  taglib-location
/WEB-INF/tlds/orataglib_1_0_3.tld
  /taglib-location
/taglib
  
taglib
  taglib-uri
/jkw
  /taglib-uri
  taglib-location
/WEB-INF/tlds/jkw-1.0.tld
  /taglib-location
/taglib
  
resource-ref
  descriptionMySQL DB 

Re: Cannot load JDBC driver class 'null'

2002-09-22 Thread John Walstra

From the mysql-connector-java-2.0.14 README ...

--
A simple connection example looks like:

  Class.forName(com.mysql.jdbc.Driver).newInstance();

  java.sql.Connection conn;

  conn = DriverManager.getConnection(
jdbc:mysql://localhost/test?user=blahpassword=blah);
--

And if I un-jar their jar file, I can find it. There is also 
org.gjt.mm.mysql.Driver,  which also returns the same Exception. I think 
org.gjt.mm.mysql.Driver exists to be back-wards compatible. That is also 
the driver class they use in the JNDI Datasource HOWTO.

On Sunday 22 September 2002 11:14 pm, Jacob Kjome wrote:
 Yes, it should find it.  Have you verified that the class in the
 driverClassName element actually does exist in that package in the jar file
 you just mentioned?

 Jake

 At 10:56 PM 9/22/2002 -0500, you wrote:
 I do have mysql-connector-java-2.0.14-bin.jar in the common/lib directory.
 Shouldn't it find the correct class being there?
 
 On Sunday 22 September 2002 10:39 pm, Kwok Peng Tuck wrote:
   Are you actually using the mysql driver? Cause if it says loading
   driver null, means there isn't one.
  
   John Walstra wrote:
   I'm trying to set up a JNDI connection to MySQL. I'm using the binary
release of 4.1.11 with 4.0.4's jasper-compiler.jar and
jasper-runtime.jar. I'm also using mysql-connector-java-2.0.14.
   
   It's very similar to this thread
   http://www.mail-archive.com/tomcat-user@jakarta.apache.org/msg64346.ht
   ml , however I still can't get mine working after reading that thread.
I've basically followed (cut and paste) the JNDI Datasource HOWTO,
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examp
   les-h owto.html .
   
   Here is the Context section of my server.xml
   
   Context path=/jkw
docBase=/usr/local/web/meta-htdocs/JWALSTRA/htdocs/jsp
   debug=5 useNaming=true
   reloadable=true crossContext=true
   
Logger className=org.apache.catalina.logger.FileLogger
prefix=jkw_log. suffix=.txt
timestamp=true/
   
Resource name=jdbc/JKW
auth=Container
type=javax.sql.DataSource/
   
ResourceParams name=jdbc/JKW
parameter
namefactory/name
 
  valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
 
/parameter
   
!-- Maximum number of dB connections in pool.
 
  Make sure you
 
configure your mysqld max_connections
 
  large enough to handle
 
all of your db connections. Set to 0 for
 
  no limit.
 
--
parameter
namemaxActive/name
value100/value
/parameter
   
!-- Maximum number of idle dB connections to
 
  retain in pool.
 
Set to 0 for no limit.
--
parameter
namemaxIdle/name
value30/value
/parameter
   
!-- Maximum time to wait for a dB connection to
 
  become available
 
in ms, in this example 10 seconds. An
 
  Exception is thrown if
 
this timeout is exceeded.  Set to -1 to
 
  wait indefinitely.
 
--
parameter
namemaxWait/name
value1/value
/parameter
   
!-- MySQL dB username and password for dB
 
  connections  --
 
parameter
nameusername/name
valuenobody/value
/parameter
parameter
namepassword/name
value/value
/parameter
   
!-- Class name for mm.mysql JDBC driver --
parameter
namedriverClassName/name
valuecom.mysql.jdbc.Driver/value
/parameter
   
!-- The JDBC connection url for connecting to
 
  your MySQL dB.
 
The autoReconnect=true argument to the
 
  url makes sure that the
 
mm.mysql JDBC Driver will automatically
 
  reconnect if mysqld closed the
 
connection.  mysqld by default closes
 
  idle connections after 8 hours.
 
--
   
parameter
nameurl/name
 
  

Security question

2002-09-22 Thread David Jenkins

I'm trying to retrieve the userid that logged into apache and accessed 
the current JSP page.  How can I get this info?

Explanation: I'm implementing a very crude security system on my site 
for right now (mainly to just keep people from accessing the email 
addresses and photos on the site), but I need to implement a password 
change page.  So what I did (and yes I know it's a hack 8), I 
implemented a JNI interface to call htpasswd in the background.  I'm 
trying to have an html page (that's in a secured area of course) post 
the new password to a jsp page which will in turn retrieve the logged in 
userID and call the interface class.

Any help would be appreciated,
David J
-- 
If you only compete with yourself,
 you can always be a winner. - David Jenkins
Of course, you could always be a loser too. - Miles Thornton


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




AW: AW: How can I achieve thread safe for context attributes?

2002-09-22 Thread Ralph Einfeldt

That depends on how much work is done inside the synchronized block
compared to the amount of work that is done outside this block.
The more is done inside the block the more the server will slow down
when concurrent requests hit blocks that are synchronized on the same 
object.

 -Ursprüngliche Nachricht-
 Von: Vernon Wu [mailto:[EMAIL PROTECTED]]
 Gesendet: Freitag, 20. September 2002 16:42
 An: Tomcat Users List
 Betreff: Re: AW: How can I achieve thread safe for context attributes?
 
 Thanks Ralph for the solutation. I, however, wonder whether 
 the server will be slow down a lot after the servlet context 
 is synchronized for the operation. The context is the center 
 object in the servlet.
  

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