[Coyote] Coyote 1.0 Beta 2 available

2002-03-16 Thread Remy Maucherat

Coyote 1.0 Beta 3 is now available, and includes:
- A high performance HTTP/1.1 processor
- An adapter for Tomcat 3.3.x
- An adapter for Tomcat 4.0.x
- URL normalization in the Tomcat 4 adapter, to prevent URL based security
attacks
- Support HTTP/1.1 expectations (requires Tomcat 4 nightly builds)

Binaries can be downloaded at:
http://jakarta.apache.org/builds/jakarta-tomcat-connectors/coyote/release/v1
.0-b3/

Installation instructions for both 3.3.x and 4.0.x are given on the download
page. The Tomcat 4 nighly builds already include this new connector.

Remy


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




RE: help Error Catalina

2002-03-16 Thread Jarecsni János

Hi,

it seems that tomcat doesn't shut down fully, ie. the port remains used.
Maybe removing the configuration entry you cited helps.

Cheers,
János

|-Original Message-
|From: Giuseppe De Vincenzi [mailto:[EMAIL PROTECTED]]
|Sent: Saturday, March 16, 2002 9:11 AM
|To: Tomcat Users List
|Subject: help Error Catalina
|
|
|Hi all,
|
|My system win2000, TOMCAT 4.0 Cocoon2 , with following
|JDK version ...
|Java(TM) 2 Runtime Environment, Standard Edition 1.3.1
|
|** Initially when i start TOMCAT, it start without any problem
|and i can access it from http://localhost:8080/. Below is the start up
|message shown **
|
|** Once again, i start the TOMCAT again . the result shown
|from command prompt is same as above ... no problem show . But when i check
|the catalina.out ... i seen these message **
|
|Catalina.start: LifecycleException:  Error creating server socket:
|java.net.BindException: Address already in use
|LifecycleException:  Error creating server socket:  java.net.BindException:
|Address already in use
|at
|org.apache.catalina.connector.warp.WarpConnector.initialize(WarpCon
|nector.ja
|va:483)
|at
|org.apache.catalina.core.StandardService.initialize(StandardService
|.java:454
|)
|at
|org.apache.catalina.core.StandardServer.initialize(StandardServer.java:552)
|at org.apache.catalina.startup.Catalina.start(Catalina.java:775)
|at org.apache.catalina.startup.Catalina.execute(Catalina.java:681)
|at org.apache.catalina.startup.Catalina.process(Catalina.java:179)
|at java.lang.reflect.Method.invoke(Native Method)
|at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:243)
|- Root Cause -
|java.net.BindException: Address already in use
|at java.net.PlainSocketImpl.socketBind(Native Method)
|at java.net.PlainSocketImpl.bind(Unknown Source)
|at java.net.ServerSocket.init(Unknown Source)
|at java.net.ServerSocket.init(Unknown Source)
|at
|org.apache.catalina.net.DefaultServerSocketFactory.createSocket(Def
|aultServe
|rSocketFactory.java:118)
|at
|org.apache.catalina.connector.warp.WarpConnector.initialize(WarpCon
|nector.ja
|va:477)
|at
|org.apache.catalina.core.StandardService.initialize(StandardService
|.java:454
|)
|at
|org.apache.catalina.core.StandardServer.initialize(StandardServer.java:552)
|at org.apache.catalina.startup.Catalina.start(Catalina.java:775)
|at org.apache.catalina.startup.Catalina.execute(Catalina.java:681)
|at org.apache.catalina.startup.Catalina.process(Catalina.java:179)
|at java.lang.reflect.Method.invoke(Native Method)
|at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:243)
|
|?
|add these lines to the catalina.sh script as appropriate
|if [ -z $CATALINA_OPTS ] ; then
|  CATALINA_OPTS=-XdoCloseWithReadPending
|fi
|. But when i check
|the catalina.out ... i seen ERROR
|?
|Bye  Thank's
|  Giuseppe.
|
|
|
|
|
|
|
|--
|To unsubscribe:   mailto:[EMAIL PROTECTED]
|For additional commands: mailto:[EMAIL PROTECTED]
|Troubles with the list: mailto:[EMAIL PROTECTED]
|
|


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




RE: [Coyote] Coyote 1.0 Beta 2 available

2002-03-16 Thread Reynir Hübner

Hey guys ..

what is coyote ?
Does coyote have a project website ?

thanx.


 -Original Message-
 From: Remy Maucherat [mailto:[EMAIL PROTECTED]]
 Sent: 16. mars 2002 08:50
 To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Subject: [Coyote] Coyote 1.0 Beta 2 available
 
 
 Coyote 1.0 Beta 3 is now available, and includes:
 - A high performance HTTP/1.1 processor
 - An adapter for Tomcat 3.3.x
 - An adapter for Tomcat 4.0.x
 - URL normalization in the Tomcat 4 adapter, to prevent URL 
 based security
 attacks
 - Support HTTP/1.1 expectations (requires Tomcat 4 nightly builds)
 
 Binaries can be downloaded at:
 http://jakarta.apache.org/builds/jakarta-tomcat-connectors/coy
ote/release/v1
.0-b3/

Installation instructions for both 3.3.x and 4.0.x are given on the
download
page. The Tomcat 4 nighly builds already include this new connector.

Remy


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




RE: [Coyote] Coyote 1.0 Beta 2 available

2002-03-16 Thread Reynir Hübner

sorry I can read it.. found the page (the link you gave).



 -Original Message-
 From: Reynir Hübner 
 Sent: 16. mars 2002 10:45
 To: Tomcat Users List
 Subject: RE: [Coyote] Coyote 1.0 Beta 2 available
 
 
 Hey guys ..
 
 what is coyote ?
 Does coyote have a project website ?
 
 thanx.
 
 
  -Original Message-
  From: Remy Maucherat [mailto:[EMAIL PROTECTED]]
  Sent: 16. mars 2002 08:50
  To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
  Subject: [Coyote] Coyote 1.0 Beta 2 available
  
  
  Coyote 1.0 Beta 3 is now available, and includes:
  - A high performance HTTP/1.1 processor
  - An adapter for Tomcat 3.3.x
  - An adapter for Tomcat 4.0.x
  - URL normalization in the Tomcat 4 adapter, to prevent URL 
  based security
  attacks
  - Support HTTP/1.1 expectations (requires Tomcat 4 nightly builds)
  
  Binaries can be downloaded at:
  http://jakarta.apache.org/builds/jakarta-tomcat-connectors/coy
 ote/release/v1
 .0-b3/
 
 Installation instructions for both 3.3.x and 4.0.x are given on the
 download
 page. The Tomcat 4 nighly builds already include this new connector.
 
 Remy
 
 
 --
 To unsubscribe:   mailto:[EMAIL PROTECTED]
 For additional commands: mailto:[EMAIL PROTECTED]
 Troubles with the list: mailto:[EMAIL PROTECTED]
 
 
 --
 To unsubscribe:   mailto:[EMAIL PROTECTED]
 For additional commands: mailto:[EMAIL PROTECTED]
 Troubles with the list: mailto:[EMAIL PROTECTED]
 
 

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




mod_webapp.so problem

2002-03-16 Thread Xue-Feng Yang

OS: RedHat 7.1
Apache: RedHat default installation, apache-1.3.20-16
Tomcat: 4.01

[warn] Loaded DSO modules/mod_webapp.so uses plain
Apache 1.3 API, this module might crash under EAPI!
(please recompile it with -DEAPI)

Any suggestion?


__ 
Find, Connect, Date! http://personals.yahoo.ca

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




loading images through JSP with mod_webapp

2002-03-16 Thread Rajeshwari Ramamurthi


Hi
My jsp page load all images if I use Tomcat  directly. If I call the page 
through apache-tomcat connector  mod_webapp , my jsp page loading is very 
slow and not fully loading

Is it a common problem?
Am I the only one who is having this problem?
Can I solve this problem through mod_jk connector?

Raji



_
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp.


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Managing Tomcat(4.0.x) JNDI JDBC pool resources - Craig?

2002-03-16 Thread Steven Elliott

Apologies in advance if this has already been answered in another thread but
my searches have turned up numerous references to JNDI  pooling  JDBC -
etc. but only one post mentioned managing container (Tomcat) pool resources
and that question went unanswered as far as I could tell.  Nor did I find
anything particullarly illuminating in the Tomcat documentation.  At least I
haven't found the 

After reading the JDBC2.0 stdext documentation it seems that the container
does not use the driver's ConnectionPoolDataSource interface as a factory
for PooledConnection objects but instead (at least what I can tell from
Tomcat) uses its own pooling resource?

What I don't see provided for is any kind of management methods to set Min
or Max Pool size, or setting the initial Pool size, etc.  Nor do I see any
default values?  Although I can set parameters for the DataSource object
supported by my driver (like dataBaseName, etc. I think) I don't see any way
to get to the setter, getter methods supported by my driver's
ConnectionPoolDataSource factory (beyond the methods declared in the javax
API)?

Is there any way to configure these parameters for Tomcat?  If not is there
any way to register a third party connection pool from within server.xml or
will this have to be done in a separate package.

Thanks for any ideas/help.

Steven

//* 
* VTV Learning Corporation
*Los Angeles  -  Boston  -  Lisbon
* (http://www.vtvLearning.com/)
*/


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Tomcat and Unicode parameters in URLs ???

2002-03-16 Thread Mete Kural

Hello all,

I tried a million ways of making Tomcat 4.0.3 work
with Unicode URL parameters, but nothing seems to
work. It always corrupts the parameters. Does anybody
know a workaround to make Unicode request parameters
work with Tomcat?

For instance, I changed the SnoopServlet example given
with Tomcat 4 to output the response in the unicode
with setContentType(text/html;charset=utf-8). But
when I write unicode parameters in the URL text area
of Internet Explorer as parameters to SnoopServlet, it
always corrupts my parameters. Instead of printing
them a two-bye unicode characters, it prints every
unicode character as two one-byte garbage or otherwise
ASCII characters. I also tried making a URL request
using the URL class in JAVA SDK 1.4. That didn't work
as well. The URLEncode and URLDecode classes in the
SDK don't seem to do their job right also. Has anyone
been able to make use of these classes? Any
workarounds and bug reports will be greatly
appreciated.

Thanks,
Mete


__
Do You Yahoo!?
Yahoo! Sports - live college hoops coverage
http://sports.yahoo.com/

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: jndi versus database connection pooling

2002-03-16 Thread Nikola Milutinovic

[EMAIL PROTECTED] wrote:

 I think all servlet tags should be defined prior to defining the
 servlet-mapping tags.

You could be right. I added both ResourceRef and the second Servlet definition 
at the same time, thinking that itæs OK.

I'll test it on Monday.

Nix.


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: loading images through JSP with mod_webapp

2002-03-16 Thread rsequeira


see intermixed




Rajeshwari Ramamurthi [EMAIL PROTECTED] on 03/16/2002 09:06:07 AM

Please respond to Tomcat Users List [EMAIL PROTECTED]

To:   [EMAIL PROTECTED]
cc:

Subject:  loading images through JSP with mod_webapp


Hi
My jsp page load all images if I use Tomcat  directly. If I call the page
through apache-tomcat connector  mod_webapp , my jsp page loading is very
slow and not fully loading

Is it a common problem?
Well as far as I've seen, the performance while using mod_webapp as a
connector, as opposed to standalone Tomcat, is poor. It would be a good
idea to use mod_jk. I  use mod_webapp since it is touted as the connector
that should and will replace mod_jk (maybe this isn't a correct statement
I'm making here) in the future.

Am I the only one who is having this problem?
No, you aren't the only one.

Can I solve this problem through mod_jk connector?
IMHO, mod_jk is more stable than mod_webapp.


Raji



_
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp.


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]









--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




File upload error

2002-03-16 Thread Jason Webber

When I try and use an html form to upload a file I get the flowing error in
jk.log file:

[Sat Mar 16 10:30:32 2002]  [jk_ajp12_worker.c (503)]:
ajpv12_handle_response, error reading header line

The webserver then gives me a 500 Internal Server Error

I don't get this error if I dont use browse to locate a file and I just hit
the submit button to call my servlet.

html
body
FORM ENCTYPE=multipart/form-data method=POST
action=/prod/servlet/UploadTest
 INPUT TYPE=file NAME=filename
 INPUT TYPE=submit VALUE=upload  name=upload
 /FORM
/body
/html

Any one know what is going wrong?

Tomcat 3.3
mod_jk
Apache 1.3.20
Windows 2000


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: Tomcat and Unicode parameters in URLs ???

2002-03-16 Thread Craig R. McClanahan



On Sat, 16 Mar 2002, Mete Kural wrote:

 Date: Sat, 16 Mar 2002 11:05:08 -0800 (PST)
 From: Mete Kural [EMAIL PROTECTED]
 Reply-To: Tomcat Users List [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Subject: Tomcat and Unicode parameters in URLs ???

 Hello all,

 I tried a million ways of making Tomcat 4.0.3 work
 with Unicode URL parameters, but nothing seems to
 work. It always corrupts the parameters. Does anybody
 know a workaround to make Unicode request parameters
 work with Tomcat?

 For instance, I changed the SnoopServlet example given
 with Tomcat 4 to output the response in the unicode
 with setContentType(text/html;charset=utf-8). But
 when I write unicode parameters in the URL text area
 of Internet Explorer as parameters to SnoopServlet, it
 always corrupts my parameters. Instead of printing
 them a two-bye unicode characters, it prints every
 unicode character as two one-byte garbage or otherwise
 ASCII characters. I also tried making a URL request
 using the URL class in JAVA SDK 1.4. That didn't work
 as well. The URLEncode and URLDecode classes in the
 SDK don't seem to do their job right also. Has anyone
 been able to make use of these classes? Any
 workarounds and bug reports will be greatly
 appreciated.


Setting the content type, as you did above, only affects the *output* of
that particular response -- it has nothing to do with how the next *input*
request from that browser will be handled.

In order to deal with request parameters in an incoming request, you must
tell Tomcat what encoding to use, *before* processing the parameters.
This is done by calling the request.setCharacterEncoding() method that was
added in Servlet 2.3.  As long as you call this before calling methods
like request.getParameter(), the proper encoding will be applied.

One way to do this without modifying your application itself is to use a
Filter that looks at incoming requests and decides what encoding should be
used -- perhaps by looking at the codeAccept-Language/code header, or
based on attributes you have stored in the current session that indicate
what the user will be supplying.  A very simple example of such a filter
is included in the /examples webapp shipped with Tomcat 4 -- the source
code for this filter is in file SetCharacterEncodingFilter.java in the
$CATALINA_HOME/webapps/examples/WEB-INF/classes/filters subdirectory.
This example is fairly simpleminded -- you just configure a filter
initialization parameter that is used to set the encoding for all requests
-- but you can use it as a starting point for more sophisticated
processing by subclassing it and overriding the selectEncoding() method.

This filter can be enabled by copying the appropriate class file to your
own WEB-INF/classes directory, and adding a filter definition to your
web.xml file:

  filter
filter-nameCharacter Encoding Filter/filter-name
filter-classfilters.SetCharacterEncodingFilter/filter-class
init-param
  param-nameencoding/param-name
  param-valueUTF-8/param-value
/init-param
  /filter

Then, you select which requests this filter applies to with a filter
mapping -- the /* pattern says apply it to *all* requests:

  filter-mapping
filter-nameCharacter Encoding Filter/filter-name
url-pattern/*/url-pattern
  /filter-mapping

With filter mappings like this, you can be more selective about which URLs
it applies to by using a more precise URL pattern, or apply different
filters to different URLs -- all without affecting your servlets or JSP
apges at all.  The syntax for the url-pattern element in a filter
mapping is the same as that used for a servlet mapping.

Be sure to put these elements in the correct places in your web.xml file
to maintain the element order that is required by the DTD.

 Thanks,
 Mete


Craig


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




RE: question about tomcat configuration

2002-03-16 Thread JavaJosh

Cheng,

I am just learning too, but the following links speak to your problem:

http://localhost:8080/tomcat-docs/appdev/deployment.html
http://localhost:8080/tomcat-docs/config/index.html
and in particular
http://localhost:8080/tomcat-docs/config/context.html
and if you are hosting others, check out
http://localhost:8080/tomcat-docs/config/host.html#User%20Web%20Applicat
ions


(Of course, you have to have tomcat running to get to these URLs.
Alternatively, you can get them from the filesystem. I assume you know
how.)

As you noticed, there is an implicit context created for each subdir of
$catalinahome/webapps.

HTH
Josh

 -Original Message-
 From: Cheng Yan [mailto:[EMAIL PROTECTED]]
 Sent: Friday, March 15, 2002 8:28 PM
 To: Tomcat Users List
 Subject: question about tomcat configuration
 
 Hi, all,
 
 I just installed tomcat 4.0 binary on my Solaris 8 box at home. This
 Solaris
 machine is connected to my w2k pc through a linksys router, which is
 connected to a cable modem.
 
 After I started tomcat, I can visit http://localhost:8080/index.html
 only
 from the same workstation, but not from my pc. I understand this is
 because
 the settings in $CATALINA_HOME/conf/server.xml. Could someone tell me
 how to
 reconfigure this baby so that TOMCAT will point to a different
 location? The
 different means that it does not point to the default page:
 $CATALINA_HOME/webapps/ROOT/index.html. Or better yet, can I
 reconfigure it
 to point to $HOME/public_html, where apache server has already pointed
 to?
 
 I know I must set up somethings in $CATALINA_HOME/conf/server.xml. But
 I am
 not sure how. Could someone show me step by step?
 
 BTW, I have configured apache on this station. I can already visit
 http://192.168.1.100/~myUnixID.
 
 Thanks.
 
 
 --
 To unsubscribe:   mailto:[EMAIL PROTECTED]
 For additional commands: mailto:[EMAIL PROTECTED]
 Troubles with the list: mailto:[EMAIL PROTECTED]


_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: Managing Tomcat(4.0.x) JNDI JDBC pool resources - Craig?

2002-03-16 Thread Craig R. McClanahan



On Sat, 16 Mar 2002, Steven Elliott wrote:

 Date: Sat, 16 Mar 2002 17:46:01 +
 From: Steven Elliott [EMAIL PROTECTED]
 Reply-To: Tomcat Users List [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Subject: Managing Tomcat(4.0.x) JNDI JDBC pool resources - Craig?

 Apologies in advance if this has already been answered in another thread but
 my searches have turned up numerous references to JNDI  pooling  JDBC -
 etc. but only one post mentioned managing container (Tomcat) pool resources
 and that question went unanswered as far as I could tell.  Nor did I find
 anything particullarly illuminating in the Tomcat documentation.  At least I
 haven't found the

 After reading the JDBC2.0 stdext documentation it seems that the container
 does not use the driver's ConnectionPoolDataSource interface as a factory
 for PooledConnection objects but instead (at least what I can tell from
 Tomcat) uses its own pooling resource?


The container exposes a javax.sql.DataSource implementation to
applications.  Internally, the factory is currently based on Tyrex
(http://tyrex.exolab.org) for 4.0.x, but has switched to the DBCP package
from Jakarta Commons (http://jakarta.apache.org/commons) in the nightly
builds.

 What I don't see provided for is any kind of management methods to set Min
 or Max Pool size, or setting the initial Pool size, etc.  Nor do I see any
 default values?  Although I can set parameters for the DataSource object
 supported by my driver (like dataBaseName, etc. I think) I don't see any way
 to get to the setter, getter methods supported by my driver's
 ConnectionPoolDataSource factory (beyond the methods declared in the javax
 API)?


Tyrex, and the DBCP pool, both do their own pool management of
java.sql.Connection instances provided by your driver, so they can be used
with any JDBC driver -- even those that do not support
ConnectionPoolDataSource themselves.  The DBCP based pool does have
configuration management properties for pool size and so on.

 Is there any way to configure these parameters for Tomcat?  If not is there
 any way to register a third party connection pool from within server.xml or
 will this have to be done in a separate package.


It should be possible to use the DBCP based pool even with Tomcat 4.0.x by
overriding the default JNDI factory for javax.sql.DataSource objects (I
haven't tested this, but in theory it should all work).
This requires the following steps:

* Download recent nightly builds of the Collections, Pool, and DBCP
  packages from Jakarta Commons
  (http://jakarta.apache.org/builds/jakarta-commons/nightly/) and put
  the JAR files into $CATALINA_HOME/common/lib along with your JDBC
  driver.

* Configure the factory parameter in the ResourceParams element
  to set the JNDI ObjectFactory class for this resource:

ResourceParams name=jdbc/EmployeeDB
  parameter
namefactory/name
valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
  /parameter
  ... other configuration parameters ...
/ResourceParams

* Configure the other parameter values of the ResourceParams element
  from the list of supported properties below:
  - driverClassName - Fully qualified Java class name of the JDBC driver
  - maxActive   - Maximum number of active connections at one time
  - maxIdle - Maximum number of idle connections at one time
  (if more are returned to the pool, they will be
  closed to release database resources)
  - maxWait - Number of milliseconds the pool will wait when there
  are no available connections before causing
  getConnection() to throw an exception
  - password- Database password
  - url - Connection URL (also accepts driverName for
  backwards compatibility)
  - user- Database username
  - validationQuery - Optional SQL SELECT statement used to validate a
  connection before returning it to the application
  (must return at least one row).  This is helpful
  in catching stale connections because of timeouts
  or recycling of the database without stopping
  Tomcat.

Alternatively, you can use any other connection pool you like, if you
create your own javax.naming.spi.ObjectFactory implementation class (the
JNDI object factory interface) and registering its name with the factory
parameter.  Documentation is in the JNDI Specification and the
corresponding Service Provider Interface document, at:

  http://java.sun.com/products/jndi/docs.html

You can use the BasicDataSourceFactory class from the Commons DBCP package
as a model.

 Thanks for any ideas/help.

 Steven


Craig


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: security-constraint and error-page

2002-03-16 Thread rsequeira


HAFAIK, when the webserver responds with a 401 Unauthorized error,
the browser shows up an authentication dialog box. But since you have
configured an 401 error page directive in the web.xml, I think Tomcat
generates a 401 UnAuthorized response but then like a 404 custom error page
redirect,  it redirects to the notauthorized.jsp instead of sending a 401
response to the client.
I think what you desire is something like this (correct me if I'm wrong):
Tomcat should send a 401 response atleast 3 times (or more) and then
display a You are Unauthorized page back.
I don't know how to do this in web.xml. Maybe writing a wrapper or filter
would help. Need to check the code that does Basic Authentication. I think
it should have some clues. Craig McClanahan is the author of the code.
Hopefully he throws some light on this topic. I know he's online :-)

Thanks.
RS





[EMAIL PROTECTED] on 03/12/2002 09:33:47 PM

Please respond to Tomcat Users List [EMAIL PROTECTED]

To:   [EMAIL PROTECTED]
cc:

Subject:  security-constraint and error-page

I've setup a security constraint, with basic authentication, in a memory
realm.  It works as expected until I add an error page for the 401 error
code (unauthorized). Then, when I request the page, I get the 401 error
page automatically and am never prompted to login.  I was expecting to get
the 401 error page only if I supplied an incorrect login.

What am I doing wrong?  (Win2000pro, Tomcat 4.0.3, jdk 1.4)   Here is a
portion of my web.xml:

  error-page
error-code401/error-code
location/notauthorized.jsp/location
  /error-page

  security-constraint
web-resource-collection
  web-resource-nameBrawnerLau Website/web-resource-name
  url-pattern/adminentry.jsp/url-pattern
/web-resource-collection
auth-constraint
  role-namebrawnerlau/role-name
/auth-constraint
  /security-constraint

  login-config
auth-methodBASIC/auth-method
realm-nameBrawnerLau Website/realm-name
  /login-config


Thanks,

Jason E. Brawner
Silenus Group
(248) 735-8077


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]









--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




SecurityManager - pulling my hair out

2002-03-16 Thread Kim Altintop

Hi,

I'm trying to set up Tomcat (4.0.3-LE / Sun JDK 1.4 both win2k and RedHat
7.2) to run under a SecurityManager. However, it seems that I'm unable to
grant enough permissions... Weird things happen: although all Tomcat code
is granted java.security.AllPermission, the following message appears in
the localhost_log after my webapp has been deployed:

2002-03-16 22:06:48 Exception initializing TldLocationsCache: XML parsing
error on file /WEB-INF/web.xml: Internal Error: File
/javax/servlet/resources/web-app_2_3.dtd not found

Strange enough, I can't see any 'permission denied' but my webapp is not
working because it has not been properly initialized (apparently). If I
turn off the -security switch, everything works fine. I suspect that
something's going wrong with codeBases, but can't tell what exactly...

Can anybody send me an example catalina.policy file of a running
installation? (Although I guess it won't differ much from the default :( )


Any help would be greatly appreciated.

Kim

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Finding the name of the included page from the request object

2002-03-16 Thread Alex Muc

Hi,

I've got the following setup:

pageA.jsp
  jsp:include page=pageB.jsp
  /jsp:include

pageB.jsp
   @ include file=Header.jsp

Header.jsp
   !-- print out a common page header --

In the Header page, which is STATICALLY, included in pageB, which means 
we're really only dealing with pageA and pageB, I want to determine the 
name of pageB from the request (or response) object so that I can 
customize the page header that I'm displaying.  I hope this makes sense.

I've looked through the mailing list and the javadocs for a method that 
will return me the information.  That is I'm looking for some method 
which will return pageB.jsp (or something similar) when called from 
pageB.jsp and pageA.jsp when called from pageA.jsp but will return 
pageB.jsp when called within pageB.jsp regardless of whether it is 
invoked directly by the browser or it is included in pageA.jsp. 
 Unfortunately all the methods that I've tried all return info about 
pageA.jsp, presumably because that is the one that is actually requested 
from the client.  I've tried the following methods:
request.getContextPath()
request.getPathInfo()
request.getPathTranslated()
request.getRequestURI()
request.getServletPath()
getServletContext().getRealPath(.)
These methods all return Strings related to pageA, regardless of whether 
the methods are called from pageB.jsp which is dynamically included in 
pageA.

So, my question is how can I find out the name of the current page being 
processed.  If I'm in pageB.jsp it should return pageB.jsp (or 
something similar) regardless of whether pageB.jsp is invoked directly 
from the client or indirectly through an include in pageA.jsp.

Thank you for your help.
Alex.



--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: security-constraint and error-page

2002-03-16 Thread Craig R. McClanahan



On Sat, 16 Mar 2002 [EMAIL PROTECTED] wrote:

 Date: Sat, 16 Mar 2002 15:18:34 -0600
 From: [EMAIL PROTECTED]
 Reply-To: Tomcat Users List [EMAIL PROTECTED]
 To: Tomcat Users List [EMAIL PROTECTED]
 Subject: Re: security-constraint and error-page


 HAFAIK, when the webserver responds with a 401 Unauthorized error,
 the browser shows up an authentication dialog box. But since you have
 configured an 401 error page directive in the web.xml, I think Tomcat
 generates a 401 UnAuthorized response but then like a 404 custom error page
 redirect,  it redirects to the notauthorized.jsp instead of sending a 401
 response to the client.
 I think what you desire is something like this (correct me if I'm wrong):
 Tomcat should send a 401 response atleast 3 times (or more) and then
 display a You are Unauthorized page back.
 I don't know how to do this in web.xml. Maybe writing a wrapper or filter
 would help. Need to check the code that does Basic Authentication. I think
 it should have some clues. Craig McClanahan is the author of the code.
 Hopefully he throws some light on this topic. I know he's online :-)


:-)

Tomcat 4.0.1 had a problem with creating a custom error page for
container-generated status messages like a 401.  This was fixed in 4.0.2
and 4.0.3.

However, it's not going to do you any good if you are using BASIC
authentication -- browsers generally just pop up the login dialog box and
don't show the page that came along with it -- and there's nothing Tomcat
can do about that.  If you really want to control the look and feel of the
login page, you should use form-based authentication instead of BASIC.

 Thanks.
 RS

Craig






 [EMAIL PROTECTED] on 03/12/2002 09:33:47 PM

 Please respond to Tomcat Users List [EMAIL PROTECTED]

 To:   [EMAIL PROTECTED]
 cc:

 Subject:  security-constraint and error-page

 I've setup a security constraint, with basic authentication, in a memory
 realm.  It works as expected until I add an error page for the 401 error
 code (unauthorized). Then, when I request the page, I get the 401 error
 page automatically and am never prompted to login.  I was expecting to get
 the 401 error page only if I supplied an incorrect login.

 What am I doing wrong?  (Win2000pro, Tomcat 4.0.3, jdk 1.4)   Here is a
 portion of my web.xml:

   error-page
 error-code401/error-code
 location/notauthorized.jsp/location
   /error-page

   security-constraint
 web-resource-collection
   web-resource-nameBrawnerLau Website/web-resource-name
   url-pattern/adminentry.jsp/url-pattern
 /web-resource-collection
 auth-constraint
   role-namebrawnerlau/role-name
 /auth-constraint
   /security-constraint

   login-config
 auth-methodBASIC/auth-method
 realm-nameBrawnerLau Website/realm-name
   /login-config


 Thanks,

 Jason E. Brawner
 Silenus Group
 (248) 735-8077


 --
 To unsubscribe:   mailto:[EMAIL PROTECTED]
 For additional commands: mailto:[EMAIL PROTECTED]
 Troubles with the list: mailto:[EMAIL PROTECTED]









 --
 To unsubscribe:   mailto:[EMAIL PROTECTED]
 For additional commands: mailto:[EMAIL PROTECTED]
 Troubles with the list: mailto:[EMAIL PROTECTED]




--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: Finding the name of the included page from the request object

2002-03-16 Thread Craig R. McClanahan

On Sat, 16 Mar 2002, Alex Muc wrote:

 Date: Sat, 16 Mar 2002 17:12:02 -0500
 From: Alex Muc [EMAIL PROTECTED]
 Reply-To: Tomcat Users List [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Subject: Finding the name of the included page from the request object

 Hi,

 I've got the following setup:

 pageA.jsp
   jsp:include page=pageB.jsp
   /jsp:include

 pageB.jsp
@ include file=Header.jsp

 Header.jsp
!-- print out a common page header --

 In the Header page, which is STATICALLY, included in pageB, which means
 we're really only dealing with pageA and pageB, I want to determine the
 name of pageB from the request (or response) object so that I can
 customize the page header that I'm displaying.  I hope this makes sense.

 I've looked through the mailing list and the javadocs for a method that
 will return me the information.  That is I'm looking for some method
 which will return pageB.jsp (or something similar) when called from
 pageB.jsp and pageA.jsp when called from pageA.jsp but will return
 pageB.jsp when called within pageB.jsp regardless of whether it is
 invoked directly by the browser or it is included in pageA.jsp.
  Unfortunately all the methods that I've tried all return info about
 pageA.jsp, presumably because that is the one that is actually requested
 from the client.  I've tried the following methods:
 request.getContextPath()
 request.getPathInfo()
 request.getPathTranslated()
 request.getRequestURI()
 request.getServletPath()
 getServletContext().getRealPath(.)
 These methods all return Strings related to pageA, regardless of whether
 the methods are called from pageB.jsp which is dynamically included in
 pageA.

 So, my question is how can I find out the name of the current page being
 processed.  If I'm in pageB.jsp it should return pageB.jsp (or
 something similar) regardless of whether pageB.jsp is invoked directly
 from the client or indirectly through an include in pageA.jsp.


The jsp:include action is implemented in terms of
RequestDispatcher.include() in the servlet API.  If you grab the Servlet
2.3 spec http://java.sun.com/products/servlet/download, and read Section
8.3, you'll see that the container creates some request attributes that
define the request to the included page (pageB in your case) rather than
the including page.  They work for included JSP pages as well.

To make it possible to grab the right path no matter whether a page is
requested directly or included, you'd use logic like this:

  String servletPath =
   request.getAttribute(javax.servlet.include.servlet_path);
  if (servletPath == null) {
servletPath = request.getServletPath();
  }

 Thank you for your help.
 Alex.


Craig


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Problem Compiling A JSP file

2002-03-16 Thread Bahman Kalali

I am running Tomcat 4.0.2

Here is the header of my jsp file

% page import=com.web_tomorrow.jspcd.JspCdBrowse%

jsp:useBean id=jspCdBrowse class=com.web_tomorrow.jspcd.JspCdBrowse 
   type=JspCdBrowse scope=session/
jsp:setProperty name=jspCdBrowse property=*/



I have my JspCdBrowse.class file in jspcd dircetoty (E:\Tomcat 
4.0\webapps\jspcd\WEB-INF\classes\com\web_tomorrow\jspcd)


Here is the error I get.

org.apache.jasper.JasperException: Unable to compile class for JSPerror: File 
E:\Tomcat 4.0\webapps\jspcd\WEB-INF\classes\com\web_tomorrow\jspcd\JspCdBrowse.class 
does not contain type com.web_tomorrow.jspcd.JspCdBrowse as expected, but type 
JspCdBrowse. Please remove the file, or make sure it appears in the correct 
subdirectory of the class path.

E:\Tomcat 4.0\work\localhost\jspcd\browse$jsp.java:3: Class 
com.web_tomorrow.jspcd.JspCdBrowse not found in import.
import com.web_tomorrow.jspcd.JspCdBrowse;
   ^
2 errors


Any Idea why I am geeting this error?

Cheers,

--Bahman







RE: jndi versus database connection pooling

2002-03-16 Thread Bing Zhang

I asked this before, but got no answear. Since we are talking about docs,
here we go again.

I installed tomcat-4.0.1, 4.0.1-manuls and 4.0.1-webapps, all from rpms on
RedHat 6.2. However some of key docs under webapps/tomcat-docs are empty,
such as jndi-resources-howto.html, class-loader-howto.html, ssl-howto.html,
index.html, introduction.html and ..

Am I missing something here?

Thanks

Bing Zhang

-Original Message-
From: Craig R. McClanahan
To: Tomcat Users List
Sent: 3/15/02 11:26 PM
Subject: Re: jndi versus database connection pooling



On Sat, 16 Mar 2002, Soefara Redzuan wrote:

 Date: Sat, 16 Mar 2002 15:03:10 +0800
 From: Soefara Redzuan [EMAIL PROTECTED]
 Reply-To: Tomcat Users List [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Subject: Re: jndi versus database connection pooling

 Oh dear, Craig, I'm fairly embarassed. Sorry.

 You're going to kick yourself ... the required element name is
 res-ref-name, not resource-ref-name :-).

 I should have noticed that when I copied my web.xml right next to the
 previous person's. What is it they say about being so close to a
problem to
 be blinded.

 But may I suggest that the JNDI docs are updated because it's
 resource-ref-name in many cases there, for Mail as well as JDBC.

 http://127.0.0.1:8080/tomcat-docs/jndi-resources-howto.html


Well, now I'm somewhat embarrassed, because I wrote the original
document
that had the wrong element name :-(.

However, this was fixed in the Tomcat source code on October 10, 2001,
and
therefore the correct version was included from release 4.0.1 onwards
(current production release is 4.0.3).  Which version are you running?
Is
there anyplace that the wrong version of this document still exists
online
that we need to fix?

Craig


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: Where do I have to put classes?

2002-03-16 Thread Daniel Hinojosa


Ryuji Yokoyama wrote:

 Hello All!  I am a new to Tomcat and have a question.  I downloaded 
 and installed Tomcat 4.  I think it is working correctly.  I can see 
 the welcome page and I can execute the sample Servlets.  However, I 
 can't figure out where I should put my Servlet classes.  I tired 
 $CATALINA_HOME/web-apps, but I just got an error.  Where do I have to 
 put classes?  And how can I change the directory?

 Thanks in advance.




 -- 
 To unsubscribe:   mailto:[EMAIL PROTECTED]
 For additional commands: mailto:[EMAIL PROTECTED]
 Troubles with the list: mailto:[EMAIL PROTECTED]



Take a look at the sample files that your Tomcat comes with.  You will 
find them in the /WEB-INF/classes directory .



--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




RE: jndi versus database connection pooling

2002-03-16 Thread Soefara Redzuan


Maybe but if it's just the docs that you're missing, why not get them from 
the Apache site ?

http://jakarta.apache.org/tomcat/tomcat-4.0-doc/index.html

Soefara

From: Bing Zhang [EMAIL PROTECTED]
Reply-To: Tomcat Users List [EMAIL PROTECTED]
To: '[EMAIL PROTECTED]' [EMAIL PROTECTED]
Subject: RE: jndi versus database connection pooling
Date: Sat, 16 Mar 2002 18:19:13 -0800

I asked this before, but got no answear. Since we are talking about docs,
here we go again.

I installed tomcat-4.0.1, 4.0.1-manuls and 4.0.1-webapps, all from rpms on
RedHat 6.2. However some of key docs under webapps/tomcat-docs are empty,
such as jndi-resources-howto.html, class-loader-howto.html, ssl-howto.html,
index.html, introduction.html and ..

Am I missing something here?

Thanks

Bing Zhang

-Original Message-
From: Craig R. McClanahan
To: Tomcat Users List
Sent: 3/15/02 11:26 PM
Subject: Re: jndi versus database connection pooling



On Sat, 16 Mar 2002, Soefara Redzuan wrote:

  Date: Sat, 16 Mar 2002 15:03:10 +0800
  From: Soefara Redzuan [EMAIL PROTECTED]
  Reply-To: Tomcat Users List [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Subject: Re: jndi versus database connection pooling
 
  Oh dear, Craig, I'm fairly embarassed. Sorry.
 
  You're going to kick yourself ... the required element name is
  res-ref-name, not resource-ref-name :-).
 
  I should have noticed that when I copied my web.xml right next to the
  previous person's. What is it they say about being so close to a
problem to
  be blinded.
 
  But may I suggest that the JNDI docs are updated because it's
  resource-ref-name in many cases there, for Mail as well as JDBC.
 
  http://127.0.0.1:8080/tomcat-docs/jndi-resources-howto.html
 

Well, now I'm somewhat embarrassed, because I wrote the original
document
that had the wrong element name :-(.

However, this was fixed in the Tomcat source code on October 10, 2001,
and
therefore the correct version was included from release 4.0.1 onwards
(current production release is 4.0.3).  Which version are you running?
Is
there anyplace that the wrong version of this document still exists
online
that we need to fix?

Craig


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]



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


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]