More JDBCRealm Questions

2002-07-24 Thread Soefara Redzuan


I have set up a JDBCRealm and am using it with form-based login to
secure/protect my webapp.  However, I have a few questions which I
hope somebody could help me with,

1. The JDBCRealm is set up with the following in server.xml.

Realm className=org.apache.catalina.realm.JDBCRealm debug=99
 driverName=org.gjt.mm.mysql.Driver
 connectionURL=jdbc:mysql://localhost/authentication
 userTable=users userNameCol=user_name userCredCol=user_pass
 userRoleTable=user_roles roleNameCol=role_name/

However, I have noticed that this requires the password (stored in
the user_pass column) to be clear text, which I really don't like doing.
Is there any way to have store the passwords as hashes (ie. using the
password() function in MySQL) ?

2. I read that a call to j_security_check will be made by every attempt
   access your secured pages.  Since I am protecting every page in my
   webapp, I'm wondering how efficient is j_security_check ?
   Does it simply look at the session, or does it make a database call on
   each and every request ?

3. How do you specify a page for authenticated users who do not have
   the correct permissions/roles ?  At the moment, I have this in web.xml,

login-config
auth-methodFORM/auth-method
form-login-config
form-login-pagelogin.jsp/form-login-page
   form-error-pagelogin-error.jsp/form-error-page
/form-login-config
/login-config

login.jsp is the form that shows when an authenticated user tries to 
access the site.
login-error.jsp is displayed when an incorrect username/password is 
submitted.

However, when a correct username/password is submitted but the user does 
not
possess an adequate role, I see a default You are not authorized 
message.
How can I customize the page that is shown in such circumstances ?


4. Is there a formal method to logging out, rather than calling
   invalidate() on the session ?

5. If your webapp's authentication works fine on Tomcat, would it then
   work on say BEAWeblogic or IBMWebsphere ?

Sorry for so many questions but I can't find a comprehensive description
of this anywhere. I've only found setup/configuration guides which deal
with the simple issues.

Soefara.

_
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: More flexible JDBCRealm implementation ? (for ASP-style webapp)

2002-07-24 Thread Soefara Redzuan


From: [EMAIL PROTECTED] (Will Hartung)
  I've setup a JDBCRealm for Tomcat using MySQL. It works OK
  but the database schema is not good for an ASP (application
  service provider) model. For example, I would like several
  companies to use the same webapp (each company should not
  know of the other's existence) and each should be able to
  create a user 'admin' and a user 'david' but in the way that
  JDBCRealm is currently configured only one instance of any
  user name is possible since it is the primary key in the users
  table. Is there a better way to do this ?

I'm not familiar enough with MySQL, but I'll toss this out.

Since you can configure your Realms on a Webapp basis, that may give you 
the
flexibility you need.

For example, if you were using, say, Oracle, or most any other database 
that
has a concept of User ownership for its tables (most DBs do, MySQL may do
this, I don't know), you could set up seperate Users or Schemas in the
database for each Client Webapp. This way, each client would have access to
their own versions of the tables. You would distinguish the realms by each
having their own login to the client database with a client specific
username/password for the database.

Yes, but this adds complexity due to different table names for different
clients. I like to keep things simple. So, I can do what you suggest except
with different databases (running on the same MySQL instance) for
different customers and webapps. That's my current setup.

If you'd rather share the tables (for whatever reason), perhaps you could
make views on a master table that's limited by the client id.

I do prefer to share the tables. The reason is that you can easily set
up new clients and customers without restarting Tomcat. Better yet, users
can register and sign-up themselves, something that's not possible if I
have to set up a different database for them, with its own JNDI resource
configuration in server.xml


These views would be placed in the appropriate client schemas and shadow 
the
master table in a central schema. Something like CREATE VIEW
CLIENT1.USERS(user_name, user_pass, user_goupid) AS SELECT user_name,
user_pass, user-groupid FROM MASTER.USERS WHERE CLIENTID = 'CLIENT1'.

I'll have to investigate this use of views. It's something I'd never
considered before and looks very useful.


Finally, if you look at
$CATALINA_HOME/src/share/org/apache/cataline/realm/JDBCRealm.java, it looks
pretty darn simple to tweak that to do whatever you want, or, better, to
subclass and change the relevant methods (not many from the looks of it).
The only fear here is that the TC team can change JDBCRealm behind your 
back
in a later release.

I'd much rather avoid something this drastic. It would be better for me
to write a filter and use custom authentication I believe.

Stick the pertinent webapp specific entries into ENV-ENTRY, and you can do
all sorts of scary things I would think.

Thank you,

Soefara.

_
MSN Photos is the easiest way to share and print your photos: 
http://photos.msn.com/support/worldwide.aspx


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




Re: More flexible JDBCRealm implementation ? (for ASP-style webapp)

2002-07-24 Thread @Basebeans.com

Subject: Re: More flexible JDBCRealm implementation 1 2 3 4 5 6 7 8 9 (for ASP-style 
webapp)
From: Vic C. [EMAIL PROTECTED]
 ===
If you use MVC (I use Struts) you tend to do everything in beans and 
actions. So you can have a bean that goes against a db(and can get other 
user info) and keep in session the organization_id. Then on updates and 
retrieves append in action the organization_id.

I wish I could get more info about the virtual host in a standard way, 
not sure how.

Anyway... good luck, I might be doing something like that for my pet 
project (basicportal on sourceforge.)

Vic

Soefara Redzuan wrote:
 Thank you for the reply Vic.
 
 From: Vic C. [EMAIL PROTECTED]
 That is a frequent need.

 What is needed is the concept of organization, a 3rd field in every db
 table.
 
 
 Yes, I've done something like that too. But have therefore found that
 the Tomcat out-the-box JDBCRealm setup (using server.xml, web.xml as I
 described below) is not flexible in any way.
 
 So it looks like I too will have to use a manual authentication which
 I had hoped to avoid in the name of standardization. Oh well.
 
 I know how to manualy code (using getuserpricipal and a bean) but
 nothing automatic I can think of.
 
 
 Why use getUserPrincipal ?
 I thought we were supposed to use request.getRemoteUser() ?
 
 Also, may I ask by what you mean a bean for this ?
 I really like to design code (including Javabeans) so that they
 will run in standalone applications, as well as in the servlet
 container environment. Is it possible to design an authentication
 mechanism that is not dependent upon the servlet container (eg. Tomcat) ?
 
 Soefara.
 
 
 
 
 Vic

 Soefara Redzuan wrote:
  I've setup a JDBCRealm for Tomcat using MySQL. It works OK
  but the database schema is not good for an ASP (application
  service provider) model. For example, I would like several
  companies to use the same webapp (each company should not
  know of the other's existence) and each should be able to
  create a user 'admin' and a user 'david' but in the way that
  JDBCRealm is currently configured only one instance of any
  user name is possible since it is the primary key in the users
  table. Is there a better way to do this ?
 
  I followed instructions found on many websites for setting up
  a JDBCRealm.
 
  The table schema is
 
  create table user_groups (
 group_id int not null auto_increment,
 group_name char(24),
 parent_id int not null default -1,
 primary key(group_id)
 );
 
  create table users (
   user_name varchar(32) not null,
   user_pass varchar(32) not null,
   user_groupid  int not null default -1,
   primary key(user_name)
  );
 
  create table user_roles (
   user_name varchar(15) not null,
   role_name varchar(15) not null,
   primary key (user_name, role_name)
  );
 
  And in Tomcat's server.xml I have this in the appropriate context,
 
   Realm className=org.apache.catalina.realm.JDBCRealm debug=99
driverName=org.gjt.mm.mysql.Driver
connectionURL=jdbc:mysql://servername/databasename
userTable=users userNameCol=user_name userCredCol=user_pass
userRoleTable=user_roles roleNameCol=role_name/
 
  And finally this in the webapp's web.xml,
 
   security-constraint
  web-resource-collection
  web-resource-nameProtectedApp/web-resource-name
  url-pattern/*/url-pattern
  http-methodPOST/http-method
 http-methodGET/http-method
  /web-resource-collection
  auth-constraint
  descriptionname the security roles that are allowed to
  access/description
  role-nameadministrator/role-name
  role-nameuser/role-name
  /auth-constraint
  /security-constraint
 
  The alternative is to set up a separate webapp for each
  company that wishes to use our service but that really isn't
  scalable and doesn't allow for users to self-register and
  be up-and-running without administrator intervention.
 
  Has anybody solved this problem ?  Thank you in advance,
 
  Soefara.
 
 
 
 _
 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: More JDBCRealm Questions

2002-07-24 Thread @Basebeans.com

Subject: Re: More JDBCRealm Questions
From: Vic C. [EMAIL PROTECTED]
 ===


Soefara Redzuan wrote:
 
 I have set up a JDBCRealm and am using it with form-based login to
 secure/protect my webapp.  However, I have a few questions which I
 hope somebody could help me with,
 
 1. The JDBCRealm is set up with the following in server.xml.
 
Realm className=org.apache.catalina.realm.JDBCRealm debug=99
 driverName=org.gjt.mm.mysql.Driver
 connectionURL=jdbc:mysql://localhost/authentication
 userTable=users userNameCol=user_name userCredCol=user_pass
 userRoleTable=user_roles roleNameCol=role_name/
 
However, I have noticed that this requires the password (stored in
the user_pass column) to be clear text, which I really don't like doing.
Is there any way to have store the passwords as hashes (ie. using the
password() function in MySQL) ?


http://jakarta.apache.org/tomcat/tomcat-4.1-doc/realm-howto.html#JDBCRealm
plus ssl should work

 
 2. I read that a call to j_security_check will be made by every attempt
   access your secured pages.  Since I am protecting every page in my
   webapp, I'm wondering how efficient is j_security_check ?
   Does it simply look at the session, or does it make a database call on
   each and every request ?
 
 3. How do you specify a page for authenticated users who do not have
   the correct permissions/roles ?  At the moment, I have this in web.xml,
 
login-config
auth-methodFORM/auth-method
form-login-config
form-login-pagelogin.jsp/form-login-page
form-error-pagelogin-error.jsp/form-error-page
 /form-login-config
/login-config
 
login.jsp is the form that shows when an authenticated user tries to 
 access the site.
login-error.jsp is displayed when an incorrect username/password is 
 submitted.
 
However, when a correct username/password is submitted but the user 
 does not
possess an adequate role, I see a default You are not authorized 
 message.
How can I customize the page that is shown in such circumstances ?
 
 
 4. Is there a formal method to logging out, rather than calling
   invalidate() on the session ?
 
 5. If your webapp's authentication works fine on Tomcat, would it then
   work on say BEAWeblogic or IBMWebsphere ?
 

It should, but some of them claim to be servlet spec complaint and are 
not so you end up writing their support and asking for the complaince. 
(I find comerical support staffed by people who do not know servlet, so 
your job is realy hard)




 Sorry for so many questions but I can't find a comprehensive description
 of this anywhere. I've only found setup/configuration guides which deal
 with the simple issues.
 
 Soefara.
 
 _
 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]




AW: some questions about tomcat ......urgent!!!!!

2002-07-24 Thread Ralph Einfeldt

See below:

 -Ursprüngliche Nachricht-
 Von: Sumit Johar [mailto:[EMAIL PROTECTED]]
 Gesendet: Mittwoch, 24. Juli 2002 08:16
 An: Tomcat Users List
 Betreff: some questions about tomcat ..urgent!
 
 1) Can there be 2 instances of TomCat webserver on the same machine?

Yes
 
 b) Can the same webserver executable be run as separate process
 instances? 

Yes

 c) Do the separate process instances of the webserver share the
 same webserver configuration or different webserver 
 configuration file?

Each process instance has it's own configuration.

We have a structure like this:

/www/online/site
  /conf
web.xml
server.xml
  Files that contain the site specific setup for tomcat
...
  /bin
start.sh
  Script that calls the tomcat that we want to use for 
  this site with the environment for this site:

  JAVA_HOME=/usr/local/java/jdk/sun1.3.1
  CATALINA_HOME=/usr/local/java/tomcat-4.0.3
  CATALINA_BASE=/www/online/site


  export JAVA_HOME CATALINA_HOME CATALINA_BASE
  ${CATALINA_HOME}/bin/startup.sh

/usr/local/java/jdk/ibm1.3
/usr/local/java/jdk/sun1.3
/usr/local/java/jdk/sun1.3.1
/usr/local/java/jdk/sun1.4

/usr/local/java/tomcat-4.0.3
/usr/local/java/tomcat-4.0.4

This way we can have different versions of tomcat at the same time, 
all sites that use the same tomcat version use the same 'executable' 
and individual configuration. If we want to use an other version of 
tomcat we just have to change CATALINA_HOME in start.sh (unless the 
config files are incompatible between these versions)
 
 d) Memory footprint of the executable?

That depends on several factors. In my environment a freshly started 
tomcat has 217404KB (virtual size) and 28032 (resident size)

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




AW: More flexible JDBCRealm implementation ? (for ASP-style webapp)

2002-07-24 Thread Ralph Einfeldt


See Below:

 -Ursprüngliche Nachricht-
 Von: Soefara Redzuan [mailto:[EMAIL PROTECTED]]
 Gesendet: Mittwoch, 24. Juli 2002 08:52
 An: [EMAIL PROTECTED]
 Betreff: Re: More flexible JDBCRealm implementation ? (for ASP-style
 webapp)
 
 
 Yes, but this adds complexity due to different table names 
 for different clients. 

With a 'real' database each web application can use the same 
table name. You just must configure the web application to use a 
different schema (catalog, database, ; the terms differ from 
vendor to vendor)

 
 I do prefer to share the tables. The reason is that you can easily set
 up new clients and customers without restarting Tomcat. 
 Better yet, users can register and sign-up themselves, something
that's 
 not possible if I have to set up a different database for them, with 
 its own JNDI resource configuration in server.xml

snip/ 

 I'll have to investigate this use of views. It's something I'd never
 considered before and looks very useful.

With mysql you better forget it. 

Currently there are no views in mysql. (Altough chances have improve
that there will be views in a future version. The views have a higher
priority in the todo list than 2 years ago) 

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




Bad links for downloading release of tomcat 4.03

2002-07-24 Thread Darren Marvin

FYI

I have just tried to access the download section for tomcat 4.03 and it does not seem 
to be available, 3.X is fine though.





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




AW: More JDBCRealm Questions

2002-07-24 Thread Ralph Einfeldt

To use encrypted passwords have a look at:
http://jakarta.apache.org/tomcat/tomcat-4.0-doc/realm-howto.html#Digeste
d%20Passwords

 -Ursprüngliche Nachricht-
 Von: Soefara Redzuan [mailto:[EMAIL PROTECTED]]
 Gesendet: Mittwoch, 24. Juli 2002 08:40
 An: [EMAIL PROTECTED]
 Betreff: More JDBCRealm Questions
 
 
 However, I have noticed that this requires the password (stored in
 the user_pass column) to be clear text, which I really don't like
doing.
 Is there any way to have store the passwords as hashes 


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




RE: some questions about tomcat ......urgent!!!!!

2002-07-24 Thread Sumit Johar

Hi Ralph

thanks for a quick reply, i understood the way its being run at ur end..but i didn't 
mean running different versions at the same time
i'll try to elaborate the doubts

1. when i said 2 instances , i meant 2 instances at the same time e.g. for load 
balancing
   can u run them concurrently with only single tomcat installation.
2. will i need to do any changes in the configuration for the second process to run 
e.g. port no etc
   coz i'll have only single installation of tomcat


SUMIT JOHAR
ES-Adapter Competency Centre
Programmer Analyst
Ph:91-80-8520261 Extn:54720
Infosys ® 



-Original Message-
From: Ralph Einfeldt [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 24, 2002 12:25 PM
To: Tomcat Users List
Subject: AW: some questions about tomcat ..urgent!


See below:

 -Ursprüngliche Nachricht-
 Von: Sumit Johar [mailto:[EMAIL PROTECTED]]
 Gesendet: Mittwoch, 24. Juli 2002 08:16
 An: Tomcat Users List
 Betreff: some questions about tomcat ..urgent!
 
 1) Can there be 2 instances of TomCat webserver on the same machine?

Yes
 
 b) Can the same webserver executable be run as separate process
 instances? 

Yes

 c) Do the separate process instances of the webserver share the
 same webserver configuration or different webserver 
 configuration file?

Each process instance has it's own configuration.

We have a structure like this:

/www/online/site
  /conf
web.xml
server.xml
  Files that contain the site specific setup for tomcat
...
  /bin
start.sh
  Script that calls the tomcat that we want to use for 
  this site with the environment for this site:

  JAVA_HOME=/usr/local/java/jdk/sun1.3.1
  CATALINA_HOME=/usr/local/java/tomcat-4.0.3
  CATALINA_BASE=/www/online/site


  export JAVA_HOME CATALINA_HOME CATALINA_BASE
  ${CATALINA_HOME}/bin/startup.sh

/usr/local/java/jdk/ibm1.3
/usr/local/java/jdk/sun1.3
/usr/local/java/jdk/sun1.3.1
/usr/local/java/jdk/sun1.4

/usr/local/java/tomcat-4.0.3
/usr/local/java/tomcat-4.0.4

This way we can have different versions of tomcat at the same time, 
all sites that use the same tomcat version use the same 'executable' 
and individual configuration. If we want to use an other version of 
tomcat we just have to change CATALINA_HOME in start.sh (unless the 
config files are incompatible between these versions)
 
 d) Memory footprint of the executable?

That depends on several factors. In my environment a freshly started 
tomcat has 217404KB (virtual size) and 28032 (resident size)

--
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 compile Tomcat 4.0.3 with JBuilder?

2002-07-24 Thread Christophe Bouhier (ECM)

Hi, 

Compiling tomcat from scratch is explained in the manuals. 

You can create a tomcat launcher to run TOMCAT in Jbuilder ,this will allow you to 
debug servlets (include the sources you want to debug in your JBuilder project). It 
even works with JBuilder personal. 

Add the tomcat classes in a library and in your project. The activation.jar contains 
the Tomcat Main() method in the class below. You also have to change the catalina.base 
path to your tomcat directory.)

Here is the source for the launcher: 
**

import org.apache.catalina.startup.Catalina;

public class launcher {
  public static void main(String[] args) {
System.setProperty(org.xml.sax.parser,
   org.apache.xerces.parsers.SAXParser);

System.setProperty(javax.xml.parsers.DocumentBuilderFactory,
   org.apache.xerces.jaxp.DocumentBuilderFactoryImpl);

System.setProperty(catalina.base, c:\\jwsdp-1_0-ea2 );

String argC[] = { start };

Catalina.main( argC );

  }
}

Now, compile the Launcher application only. Set breakpoints in the sources you want to 
debug.

Bonus: Check the Catalina source to see which other options are accepted by the main 
method. 
If you decide to build a swing applican which allows you to start, stop and pause 
tomcat, send me a copy ;-)

Cheers / Christophe

-Original Message-
From: shi_hang [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 24, 2002 8:44 AM
To: Tomcat Users List
Subject: How to compile Tomcat 4.0.3 with JBuilder?


I want to monitor the running of tomcat 4.0.3. 
As we known , JBuilder provides the such powerful functions like step , break point 
and so on.
But we must compile tomcat with JBuilder at first. Is there anyone can tell me how to 
compile tomcat with JBuilder?
Any help is appreciated.

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




AW: some questions about tomcat ......urgent!!!!!

2002-07-24 Thread Ralph Einfeldt

To use loadbalancing you have to use apache+mod_jk+tomcat.

Have a look at: http://www.ubeans.com/tomcat/

 -Ursprüngliche Nachricht-
 Von: Sumit Johar [mailto:[EMAIL PROTECTED]]
 Gesendet: Mittwoch, 24. Juli 2002 10:11
 An: Tomcat Users List
 Betreff: RE: some questions about tomcat ..urgent!
 
 1. when i said 2 instances , i meant 2 instances at the same 
 time e.g. for load balancing
can u run them concurrently with only single tomcat installation.
 2. will i need to do any changes in the configuration for the 
 second process to run e.g. port no etc
coz i'll have only single installation of tomcat
 

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




mod_jk versus mod_proxy

2002-07-24 Thread Chris Ruegger


I'm confused as to what the relationship is between mod_jk and mod_proxy.
It seems that I can use both to have the Apache web server handle
SSL and static content, and forward jsp/servlets requests onto Tomcat.

Is one considered a replacement for the other? If so, which one should
I use? If not, under what circumstances should I use mod_jk versus
mod_proxy?

Thanks!




RE: some questions about tomcat ......urgent!!!!!

2002-07-24 Thread Sumit Johar

whats mod_jk?

SUMIT JOHAR
ES-Adapter Competency Centre
Programmer Analyst
Ph:91-80-8520261 Extn:54720
Infosys ® 



-Original Message-
From: Ralph Einfeldt [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 24, 2002 1:56 PM
To: Tomcat Users List
Subject: AW: some questions about tomcat ..urgent!


To use loadbalancing you have to use apache+mod_jk+tomcat.

Have a look at: http://www.ubeans.com/tomcat/

 -Ursprüngliche Nachricht-
 Von: Sumit Johar [mailto:[EMAIL PROTECTED]]
 Gesendet: Mittwoch, 24. Juli 2002 10:11
 An: Tomcat Users List
 Betreff: RE: some questions about tomcat ..urgent!
 
 1. when i said 2 instances , i meant 2 instances at the same 
 time e.g. for load balancing
can u run them concurrently with only single tomcat installation.
 2. will i need to do any changes in the configuration for the 
 second process to run e.g. port no etc
coz i'll have only single installation of tomcat
 

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




Kaffe or gcj JVM and Tomcat

2002-07-24 Thread Joe Tomcat

Has anyone had any success getting Tomcat to run in the Kaffe JVM?  Or
running a native compiled Tomcat with gcj?  I want to move at some point
to a completely open source, free web application environment, and Kaffe
or gcj look like the two most likely ways to do that.




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




AW: some questions about tomcat ......urgent!!!!!

2002-07-24 Thread Ralph Einfeldt

That is a module to connect apache with tomcat.

http://jakarta.apache.org/tomcat/tomcat-3.3-doc/mod_jk-howto.html
(That the first link if you search google for 'what is mod_jk')

 -Ursprüngliche Nachricht-
 Von: Sumit Johar [mailto:[EMAIL PROTECTED]]
 Gesendet: Mittwoch, 24. Juli 2002 10:31
 An: Tomcat Users List
 Betreff: RE: some questions about tomcat ..urgent!
 
 
 whats mod_jk?
 

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




RE: Tomcat 4.0.4 RPM Red Hat Install Problems

2002-07-24 Thread Henri Gomez

update-alternatives is present in many rpms :

http://rpmfind.net/linux/rpm2html/search.php?query=update-alternatives

For example chkconfig-1.3.5-3.i386.rpm in Redhat 7.3

But you could find it also in www.jpackage.org :

http://www.jpackage.org/rpm/free/update-alternatives/update-alternatives-1.8.3-4jpp.noarch.rpm

That's the one I use on my Redhat 7.2 and I use to make/install jpackage/jakarta
rpms.

Regards 

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




RE: Resend (again): 4.0.3: Servlets Loaded Twice?

2002-07-24 Thread Cox, Charlie

change the appbase for your host in server.xml to be something other than
webapps. This will stop the autoloading of contexts. therefore it will only
load the contexts that you have explicitly defined.

Charlie

 -Original Message-
 From: Marinko, Jeff [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, July 23, 2002 4:51 PM
 To: Tomcat Users List
 Subject: Re: Resend (again): 4.0.3: Servlets Loaded Twice?
 
 
 In reference to servlets loading twice or init() being called twice...
 
 Craig R. McClanahan [[EMAIL PROTECTED]] wrote:
 //
 If you are getting servlets loaded twice, your configuration 
 is messed up.
 The most likely way to cause this to happen is to have a 
 directory under
 webapps (so that it gets automatically deployed) plus a 
 Context element
 in server.xml that points at the same directory, but with 
 another context
 path.  What happens here is that you're initializing two 
 webapps from the
 same directory -- and the initialization happens for each of them.
 //
 
 This turns out to be my problem.  I define the context in 
 server.xml and all
 I have in my webapps web.xml file is a servlet mapping and an 
 init-param.
 I've been looking in the archives for this mailing list, but 
 I haven't found
 a solution to this problem.  Actually, I find *several* 
 references to an
 e-mail that addresses this problem, yet as far as I can tell 
 they refer to:
 http://mikal.org/interests/java/tomcat/archive/view?mesg=54195
 
 However, this does not tell me steps I need to take to 
 correct the problem.
 Thanks for helping to identify the cause of the problem, but 
 any advice on
 the steps to solve it?  A config change in web.xml?  If the 
 answer is in the
 archives, how about the search words I need to use to find it 
 (or maybe a
 link)?
 
 Thanks!
 
 Jeff
 
 
 --
 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: Best practice for virtual host configuration

2002-07-24 Thread Cox, Charlie



 -Original Message-
 From: Ryszard Lach [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, July 24, 2002 8:07 AM
 To: [EMAIL PROTECTED]
 Subject: Best practice for virtual host configuration
 
 
 Hi!
 
 How is (in your opinion) best practice for virtual host 
 configuration ?
 I see there is quite natural in tomcat configuring many applications
 under one host - one writes several Context sections with 
 appropriate
 docRoot and path attributes and that's all. When I configure several
 virtualhost I define
 
 
   Host name=aaa appBase=webapps debug=1 unpackWARs=false
 
 Context path=
 docBase=aaa/ debug=1
 reloadable=true
 /Context
 
   /Host
 
   Host name=bbb appBase=webapps debug=1 unpackWARs=false
 Context path=
 docBase=bbb debug=1
 reloadable=true
 /Context
 
   /Host
 
 but then I see in log, that for every host it is loaded every
 application installed in webapps directory. Should I define
 appBase=webapps/aaa and leave path empty instead ? (honestly I tried
 to, but there was a problem with mod_webapp then, it tried to deploy
 application webapps/aaa/aaa (one aaa was from WebAppDeploy 
 directive in
 apache).
 

if you change the appBase, then you need to change the docBase to be the
absolute path.

Charlie

 Any suggestions ?
 
 Richard.
 

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




Integrating Apache 2.0.36 and Tomcat 4.0.4 on Win32

2002-07-24 Thread Aleksandr Jones


Hi all,

My name is Aleksandr Jones.  Greetings to all Apache of the open source 
community.

I am attempting to get Apache 2.0.36 and Tomcat 4.0.4 connected, so that 
static
content is served by the former and dynamic by the latter.  I am running 
Windows
2000 SP2 on an Intel Machine.  I mainly used the galatea.com flash guide for
integrating Apache 2.0.36 and Tomcat 4.04 as a guideline for this.

I have done the following steps:




I downloaded the JDK 1.4 installation file -- 
j2sdk-1_4_0_01-windows-i586.exe
My JDK 1.4 is installed in C:\j2sdk14

My environment variables are set as follows:

%JAVA_HOME% = C:\j2sdk14\
%PATH% = %PATH%  -- append C:\j2sdk14\; C:\j2sdk14\bin

That's my Java stuff.




I downloaded and ran the windows installer (MSI) installation for Tomcat 
4.0.  I
ran the installation and put tomcat in C:\Tomcat4\

My environment variables are thusly set:

%Catalina_Home% = C:\Tomcat4\
%Tomcat_Home% = C:\Tomcat4\

Tomcat is installed as a service, so I start the sucker up and check it out:

http://localhost:8080/ -- and I immediately see the Tomcat page:

If you're seeing this page via a web browser,
it means you've setup Tomcat successfully. Congratulations!

There's my Tomcat stuff for now.



I downloaded the source code for Apache HTTP Server 2.0.36.

My environment variables are thusly set:

%Apache2_Home% = C:\Apache2\
%Apache_Home% = C:\Apache\

I built the INSTALLBIN configuration in my *ahem* Microsoft Visual Studio,
and it produced my Apache2 configuration.

I run Apache from the command line, and test http://localhost:80

For which it responds:

If you can see this, it means that the installation of the Apache web 
server
software on this system was successful etc.




Next, I downloaded Apache Ant 1.5, and extract it to C:\JakartaAnt\bin;

My environment variables are thusly set:

%PATH% = %PATH% -- append C:\JakartaAnt\bin;

There goes Ant.



Next I downloaded jakarta-tomcat-connectors-4.0.2.01-src.zip.  I extracted
to the directory C:\JKConnectors\

Here is a dump of the file C:\JKConnectors\jk\build.properties

#
# sample build.properties for ajp connector.
# edit to taste...
#
# $Id: build.properties.sample,v 1.2 2001/05/29 23:05:52 seguin Exp $
#

tomcat40.home=c:/Tomcat4
apache2.home=c:/Apache2
apr.include=${apache2.home}/include
apr.lib=${apache2.home}/lib
so.debug=true
so.optimize=false
so.profile=false

Looks good, I think.

I decided to futz with Build.xml in exactly this one way:

   property name=tomcat40.home
  location=C:/tomcat4 /





I ran ANT in the directory C:\JKConnectors\jk\.  That produces this output:

Buildfile: build.xml

detect:
[echo]  jakarta-tomcat-connectors 

guess_catalina40:

guess_catalina41:

cpath:

prepare:

report:
[echo] Tomcat33: ${tomcat33.detect} ${tomcat33.home}
[echo] Tomcat40:  true c:/Tomcat4
[echo] Tomcat41: ${tomcat41.detect} ${tomcat41.home}
[echo] Apache13: ${apache13.detect} ${apache13.home}
[echo] Apache2: true c:/Apache2
[echo] iPlanet:  ${iplanet.detect} ${iplanet.home}
[echo] IIS:  ${iis.detect} ${iis.home}
[echo] Using catalina.home:  C:\Tomcat4

jkutil:

jkjava:

jkant:

build-main:

BUILD SUCCESSFUL

Total time: 2 seconds




I ran ANT INSTALL in the directory C:\JKConnectors\jk\.
That produces this simliar output:

Buildfile: build.xml

detect:
[echo]  jakarta-tomcat-connectors 

guess_catalina40:

guess_catalina41:

cpath:

prepare:

report:
[echo] Tomcat33: ${tomcat33.detect} ${tomcat33.home}
[echo] Tomcat40:  true c:/Tomcat4
[echo] Tomcat41: ${tomcat41.detect} ${tomcat41.home}
[echo] Apache13: ${apache13.detect} ${apache13.home}
[echo] Apache2: true c:/Apache2
[echo] iPlanet:  ${iplanet.detect} ${iplanet.home}
[echo] IIS:  ${iis.detect} ${iis.home}
[echo] Using catalina.home:  C:\Tomcat4

jkutil:

jkjava:

jkant:

build-main:

install-t33:

install-t40:

install-t41:

install-a20:

install-a13:

install:

BUILD SUCCESSFUL

Total time: 2 seconds




Now, after repeatedly failing to use the
mod_jk.dll from http://www.acg-gmbh.de/mod_jk/, I went and compiled
the one in the C:\JKConnectors\JK\Native\Apache-2.0.

(Notice, these failures were marked by error messages and Apache
failing start; I excluded this data since I got past it with my
homegrown version)

So, *poof*, now I have mod_jk.dll.  I copy mod_jk.dll into
C:\Apache2\Modules\ directory.




Now, I went to my Tomcat server.xml file and modified it thusly:

1.) The log file listener:

Server port=8005 shutdown=SHUTDOWN debug=0

Listener className=org.apache.ajp.tomcat4.config.ApacheConfig
 modJk=c:/Apache2/modules/mod_jk.dll jkDebug=info
 workersConfig=c:/Tomcat4/conf/jk/workers.properties
 jkLog=c:/Tomcat4/logs/mod_jk.log/


2.) Get the AJP Connector listening on port 8009

Service name=Tomcat-Standalone

  !-- Define an AJP 1.3 Connector on port 8009 --
   Connector className=org.apache.ajp.tomcat4.Ajp13Connector
 

Re: Best practice for virtual host configuration

2002-07-24 Thread Ryszard Lach

On Wed, Jul 24, 2002 at 08:37:50AM -0400, Cox, Charlie wrote:
 
 
 
 if you change the appBase, then you need to change the docBase to be the
 absolute path.
 
 Charlie
 

Are you sure ? I tried to leave docBase empty and it worked too.

R.

-- 
** Internet Designers S.A., ul. Przedmiejska 6-10, 54-201 Wrocaw **
 tel. (071) 35 00 445 w. 25; fax (071) 37 35 946; http://www.id.pl/

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




RE: context-param for a list/array of values ?

2002-07-24 Thread Shapira, Yoav

Howdy,
There are a couple of ways.  My favorite is:

param-namejndi.resources/param-name
param-valuejndi/a,jndi/b,jndi/c/param-value

String jndiString =
getServletContext().getInitParameter(jndi.resources);
StringTokenizer st = new StringTokenizer(jndiString, ,);
ArrayList jndiResources = new ArrayList();

while(st.hasMoreTokens())
{
  jndiResources.add(st.nextToken());
}

That's it, very simple.  ;)

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: Soefara Redzuan [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 23, 2002 7:08 PM
To: [EMAIL PROTECTED]
Subject: context-param for a list/array of values ?

In web.xml, variables can be defined like this,

  context-param
 param-namegui.bgcolor/param-name
 param-value#00/param-value
  /context-param

And then in your servlet or JSP,

  String guiBgColor =
getServletContext().getInitParameter(gui.bgcolor);

But how can I assign a list or array of values to a variable
in web.xml ?  For example, I wish to configure the available
JNDI datasources available to a webapp, so that the end user
can select one. Is it something like this ?

  context-param
 param-namejndi.resources/param-name
 param-valuejdbc/users/param-value
 param-valuejdbc/accounts/param-value
 param-valuejdbc/finance/param-value
  /context-param

But then how would I extract values in my JSP or servlet ?

Soefara

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


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


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




repost of logging question

2002-07-24 Thread Peter Choe

i tried to look for documentation to see if tomcat has some logging similar 
to apache so i can see what pages on tomcat is being accessed.

my set up is apache webserver connected to tomcat3.2 by mod_jk on two 
separate freebsd machines. where i can find a log file of what pages are 
being accessed on tomcat?



Peter Choe


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




NoSuchFieldError

2002-07-24 Thread Gunter D'Hondt

Does anybody know what this error means? See the root cause
(NoSuchFieldError: jasperlog).
I've added a few classes under my web-inf 
Greetings,
Gunter.


javax.servlet.ServletException: Servlet.init() for servlet jsp threw
exception
at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:94
6)
at
org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:655)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:214)
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.authenticator.AuthenticatorBase.invoke(AuthenticatorBase
.java:475)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
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)
at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2347)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180
)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
java:170)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170
)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
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)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:174)
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.connector.http.HttpProcessor.process(HttpProcessor.java:
1027)
at
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1125
)
at java.lang.Thread.run(Thread.java:536)


root cause 

java.lang.NoSuchFieldError: jasperLog
at org.apache.jasper.servlet.JspServlet.init(JspServlet.java:297)
at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:91
8)
at
org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:655)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:214)
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.authenticator.AuthenticatorBase.invoke(AuthenticatorBase
.java:475)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
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)
at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2347)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180
)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
java:170)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
at

Tomcat 4.0.4--Doesnt have or need isapi_redirector?

2002-07-24 Thread Robert Keddie

Maybe sped read and missed something but it looks like 
Tomcat 4.0.4 doesnt have isapi_redirector in it to use or it 
doesnt need one? Is there on for this version?
Should I just stick with 4.0.3???



Robert Keddie
web development
Marion County, FL


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




tomcat 4.0.2 - 4.1.8test; problem with Realm not loading

2002-07-24 Thread @Basebeans.com

Subject: tomcat 4.0.2 - 4.1.8test; problem with Realm not loading
From: Torgeir Veimo [EMAIL PROTECTED]
 ===
I just moved to tomcat 4.1.8-LE-jdk14 on my linux development machine, 
and one Realm which worked flawlessly under tomcat 4.0.2 now gives an 
exception at startup. This Realm uses special class loading; the realm 
impl itself is in server/lib, while some classes it makes use of (which 
also need to be visible to webapps, lives in common/lib.

Any clues on where to look for errors?


ServerLifecycleListener: createMBeans: MBeanException
java.lang.Exception: ManagedBean is not found with LdapRealm
at org.apache.catalina.mbeans.MBeanUtils.createMBean(MBeanUtils.java:616)
at 
org.apache.catalina.mbeans.ServerLifecycleListener.createMBeans(ServerLifecycleListener.java:419)
at 
org.apache.catalina.mbeans.ServerLifecycleListener.createMBeans(ServerLifecycleListener.java:597)
at 
org.apache.catalina.mbeans.ServerLifecycleListener.createMBeans(ServerLifecycleListener.java:543)
at 
org.apache.catalina.mbeans.ServerLifecycleListener.createMBeans(ServerLifecycleListener.java:722)
at 
org.apache.catalina.mbeans.ServerLifecycleListener.createMBeans(ServerLifecycleListener.java:690)
at 
org.apache.catalina.mbeans.ServerLifecycleListener.createMBeans(ServerLifecycleListener.java:329)
at 
org.apache.catalina.mbeans.ServerLifecycleListener.lifecycleEvent(ServerLifecycleListener.java:206)
at 
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:166)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:2181)
at org.apache.catalina.startup.Catalina.start(Catalina.java:510)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:400)
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)
Starting service Tomcat-Standalone

-- 
-Torgeir


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




Re: tomcat 4.0.2 - 4.1.8test; problem with Realm not loading

2002-07-24 Thread Remy Maucherat

Jakarta Tomcat Newsgroup (@Basebeans.com) wrote:
 Subject: tomcat 4.0.2 - 4.1.8test; problem with Realm not loading
 From: Torgeir Veimo [EMAIL PROTECTED]
  ===
 I just moved to tomcat 4.1.8-LE-jdk14 on my linux development machine, 
 and one Realm which worked flawlessly under tomcat 4.0.2 now gives an 
 exception at startup. This Realm uses special class loading; the realm 
 impl itself is in server/lib, while some classes it makes use of (which 
 also need to be visible to webapps, lives in common/lib.
 
 Any clues on where to look for errors?

You can't use custom components along with the JMX features (at least 
how they're implemented in 5.0).
You can disable the ServerLifecycleListener to solve this.

Remy


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




RE: Best practice for virtual host configuration

2002-07-24 Thread Cox, Charlie

if your context is under the appBase, then it will autoload it. If your
context is not under the appBase(shared contexts), then you 
have to provide the path to it. 

I've never tried leaving docBase empty for a context, so I don't know what
path it would look under. I guess webapps could be  assumed as the default
directory for defined contexts even if you change the appbase.

so you changed your example to:

Context path=
docBase= debug=1
reloadable=true
/Context

This would take the ROOT context, which is fine if all your virtual hosts
use ROOT as their root context. I have different contexts that are the
default context for their virtual hosts, so I have to provide a docBase to
distinguish between them. My configuration is similar to your original
except that I have a dummy appBase(prevent autoloading) and specify a
absolute path for docBase.

Charlie

 -Original Message-
 From: Ryszard Lach [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, July 24, 2002 8:55 AM
 To: Tomcat Users List
 Subject: Re: Best practice for virtual host configuration
 
 
 On Wed, Jul 24, 2002 at 08:37:50AM -0400, Cox, Charlie wrote:
  
  
  
  if you change the appBase, then you need to change the 
 docBase to be the
  absolute path.
  
  Charlie
  
 
 Are you sure ? I tried to leave docBase empty and it worked too.
 
 R.
 
 -- 
 ** Internet Designers S.A., ul. Przedmiejska 6-10, 54-201 Wrocaw **
  tel. (071) 35 00 445 w. 25; fax (071) 37 35 946; http://www.id.pl/
 
 --
 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]




Setting up a servlet

2002-07-24 Thread Diego, Emil

I am running apache 1.23 with tomcat 3.2.3 on Redhat Linux 7.2.  My problem
is that I am trying to setup a server for a web app i am working on.  I have
reated the servelt class and have it on the server, the problem is that
everythime I submit the form that uses the servlet i get an error telling me
that the URL can not be found.

I have tomcat and apache working together to serv pages.  I setup a seperate
context for this web application.  Here is the entry from the server.xml
file:

Context path=/dev_new
 docBase=/var/www/html/dev_new
 crossContext=false
 debug=0
 reloadable=true 
/Context


What do i need to do now to get the server to recognize the servlet?



Emil
[EMAIL PROTECTED]

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




Re: JNDIRealm config

2002-07-24 Thread John Holman


Tim Funk wrote:

 To use JNDIRealm with Netscape Directory server you need the 4.1.X 
 series of tomcat and you need to bind as the user. So do not provide 
 connectionName and connection password. 


Actually it's userPassword that should not be provided if you want 
JNDIRealm to bind as the user for authentication. connectionName and 
connectionPassword will still be used if provided to retrieve role 
information and to search the directory for the user's entry if 
required, but are optional.

This is documented in some detail in the realm howto included with 4.1.8 
and later.

John.



 In the 4.0.X series the passwords are compared in an incompatible 
 manner with respect to Netscape Dir server.

 - - wrote:

 hi
 This looks long but it's actually straightforward.

 I can't get the JNDIRealm config to work Netscape Directory Server 3.1.

 I suspect the conf. of the JNDIRealm elment is wrong but don't know why.
 I have a LDIF file exported from Netscape Directory Server 3.1 which 
 define(loosely speaking)

 - an admin user that I use in JNDIRealm for initial connection

 - a sales person

 - a SalesGroup role which has sales person as a member

 Other stuff removed for clarity.

  

 dn: uid=admin,o=company.com

 objectclass: top

 objectclass: person

 objectclass: organizationalperson

 objectclass: inetorgperson

 cn: SuiteSpot Administrator

 sn: Administrator

 givenname: SuiteSpot

 uid: admin

 userpassword: {SHA}W6ph5Mm5Pz8GgiULbPgzG37mj9g=

  

  

 dn: uid=salesID,o=company.com

 objectclass: top

 objectclass: person

 objectclass: organizationalPerson

 objectclass: inetOrgPerson

 objectclass: nsLicenseUser

 givenname: salesFir

 sn: salesSur

 cn: salesFul

 uid: salesID

 userpassword: {SHA}W6ph5Mm5Pz8GgiULbPgzG37mj9g=

  

  

 dn: cn=SalesGroup,o=company.com

 objectclass: top

 objectclass: groupOfUniqueNames

 cn: SalesGroup

 uniquemember: uid=salesID,o=company.com

  

 So my JNDIRealm config is,

 Realm className=org.apache.catalina.realm.JNDIRealm debug=99

 connectionName=uid=admin,o=company.com

 connectionPassword=password

 connectionURL=ldap://localhost:390;

 roleName=cn

 roleSearch=(uniquemember={0})

 roleSubtree=true

 userPassword=userpassword

 userPattern=uid={0},o=company.com

 /

 I have tried many combinations of patterns and attributes in the 
 above configuration but none worked.

 The initial connection and authentication using admin seemed to work OK.

 But I can't get it to authenticate the sales person/salesGroup.

 I enter the salesID as the username and its password in the auth. 
 dialog box

  

 web.xml has
  

 security-constraint

 web-resource-collection

 web-resource-nameSales/web-resource-name

 url-pattern/jsp/SalesIndex.jsp/url-pattern

 /web-resource-collection

 auth-constraint

 role-nameSalesGroup/role-name

 /auth-constraint

 /security-constraint

 login-config

 auth-methodDIGEST/auth-method

 realm-nameSID/realm-name

 /login-config

 security-role

 role-nameSalesGroup/role-name

 /security-role

  

 Thanks very much



 -
 Do You Yahoo!?
 Yahoo! Health - Feel better, live better




 -- 
 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: Integrating Apache 2.0.36 and Tomcat 4.0.4 on Win32

2002-07-24 Thread Rick Reumann

I basically did the install like you did below and everything works
fine for me when I just use 'localhost' and try the stuff on the
particular machine where everything resides. However no matter what I
try I can not get apache2.0.39 to pick up any Tomcat applications when
typing in the url from another machine. I'm tyring to set up under a
different port 7000... and
http://afs.outback.com:7000/ brings up apache fine
http://afs.outback.com:8080/myApp/ brings up tomcat fine
http://afs.outback.com:7000/myApp/ no good doesn't serve up my tomcat
app

However running on the machine where the server is and use localhost
above and everything is fine.

Very frustrating that I can't find documentation on this.

If anyone has ideas let me know.

Aleksandr, double check your set up with this doc
http://mpcon.org/temp/how2install_apache_w_php_jsp_support.doc

It worked fine for mine under localhost but still having problems
above.


On Wednesday, July 24, 2002, 8:40:32 AM, Aleksandr wrote:


AJ Hi all,

AJ My name is Aleksandr Jones.  Greetings to all Apache of the open source 
AJ community.

AJ I am attempting to get Apache 2.0.36 and Tomcat 4.0.4 connected, so that 
AJ static
AJ content is served by the former and dynamic by the latter.  I am running 
AJ Windows
AJ 2000 SP2 on an Intel Machine.  I mainly used the galatea.com flash guide for
AJ integrating Apache 2.0.36 and Tomcat 4.04 as a guideline for this.

AJ I have done the following steps:




AJ I downloaded the JDK 1.4 installation file -- 
AJ j2sdk-1_4_0_01-windows-i586.exe
AJ My JDK 1.4 is installed in C:\j2sdk14

AJ My environment variables are set as follows:

AJ %JAVA_HOME% = C:\j2sdk14\
%PATH% = %PATH%  -- append C:\j2sdk14\; C:\j2sdk14\bin

AJ That's my Java stuff.




AJ I downloaded and ran the windows installer (MSI) installation for Tomcat 
AJ 4.0.  I
AJ ran the installation and put tomcat in C:\Tomcat4\

AJ My environment variables are thusly set:

AJ %Catalina_Home% = C:\Tomcat4\
AJ %Tomcat_Home% = C:\Tomcat4\

AJ Tomcat is installed as a service, so I start the sucker up and check it out:

AJ http://localhost:8080/ -- and I immediately see the Tomcat page:

AJ If you're seeing this page via a web browser,
AJ it means you've setup Tomcat successfully. Congratulations!

AJ There's my Tomcat stuff for now.



AJ I downloaded the source code for Apache HTTP Server 2.0.36.

AJ My environment variables are thusly set:

AJ %Apache2_Home% = C:\Apache2\
AJ %Apache_Home% = C:\Apache\

AJ I built the INSTALLBIN configuration in my *ahem* Microsoft Visual Studio,
AJ and it produced my Apache2 configuration.

AJ I run Apache from the command line, and test http://localhost:80

AJ For which it responds:

AJ If you can see this, it means that the installation of the Apache web 
AJ server
AJ software on this system was successful etc.




AJ Next, I downloaded Apache Ant 1.5, and extract it to C:\JakartaAnt\bin;

AJ My environment variables are thusly set:

%PATH% = %PATH% -- append C:\JakartaAnt\bin;

AJ There goes Ant.



AJ Next I downloaded jakarta-tomcat-connectors-4.0.2.01-src.zip.  I extracted
AJ to the directory C:\JKConnectors\

AJ Here is a dump of the file C:\JKConnectors\jk\build.properties

AJ #
AJ # sample build.properties for ajp connector.
AJ # edit to taste...
AJ #
AJ # $Id: build.properties.sample,v 1.2 2001/05/29 23:05:52 seguin Exp $
AJ #

AJ tomcat40.home=c:/Tomcat4
AJ apache2.home=c:/Apache2
AJ apr.include=${apache2.home}/include
AJ apr.lib=${apache2.home}/lib
AJ so.debug=true
AJ so.optimize=false
AJ so.profile=false

AJ Looks good, I think.

AJ I decided to futz with Build.xml in exactly this one way:

AJproperty name=tomcat40.home
AJ   location=C:/tomcat4 /





AJ I ran ANT in the directory C:\JKConnectors\jk\.  That produces this output:

AJ Buildfile: build.xml

AJ detect:
AJ [echo]  jakarta-tomcat-connectors 

AJ guess_catalina40:

AJ guess_catalina41:

AJ cpath:

AJ prepare:

AJ report:
AJ [echo] Tomcat33: ${tomcat33.detect} ${tomcat33.home}
AJ [echo] Tomcat40:  true c:/Tomcat4
AJ [echo] Tomcat41: ${tomcat41.detect} ${tomcat41.home}
AJ [echo] Apache13: ${apache13.detect} ${apache13.home}
AJ [echo] Apache2: true c:/Apache2
AJ [echo] iPlanet:  ${iplanet.detect} ${iplanet.home}
AJ [echo] IIS:  ${iis.detect} ${iis.home}
AJ [echo] Using catalina.home:  C:\Tomcat4

AJ jkutil:

AJ jkjava:

AJ jkant:

AJ build-main:

AJ BUILD SUCCESSFUL

AJ Total time: 2 seconds




AJ I ran ANT INSTALL in the directory C:\JKConnectors\jk\.
AJ That produces this simliar output:

AJ Buildfile: build.xml

AJ detect:
AJ [echo]  jakarta-tomcat-connectors 

AJ guess_catalina40:

AJ guess_catalina41:

AJ cpath:

AJ prepare:

AJ report:
AJ [echo] Tomcat33: ${tomcat33.detect} ${tomcat33.home}
AJ [echo] Tomcat40:  true c:/Tomcat4
AJ [echo] Tomcat41: ${tomcat41.detect} ${tomcat41.home}
AJ [echo] Apache13: ${apache13.detect} ${apache13.home}
AJ [echo] 

Re: localhost vs IP address in the URL

2002-07-24 Thread Denis Haskin

I'm not a networking guru, (and this is sort of OT for Tomcat) but I'm not
convinced by M.Schwartz's response that this is due solely to DNS name
resolution.  I don't think that would account for such a big difference in
time--once the name was resolved to the IP address, behavior should be the same,
no?

Saravanan, you say there's a 20x difference but what's the magnitude?  Are we
talking 10 ms vs. 200 ms. or 1 second vs 20 seconds?  By IP address do you mean
127.0.0.1 or the IP address of the computer?

My pet theory is that the TCP/IP stack is recognizing the IP address as being of
the local box and is shortcutting packets from transmit queues to receive
queues in memory, without actually getting the NIC involved or anything.  Or
maybe the NIC is doing this.

Many years ago when I did hardware testing, we first ran into TCP/IP stacks that
had this optimization.

The other thought is that for some reason different maximum packet sizes are
being used with these different connections?

Of course, this is just a theory.  Someone with a little more knowledge might be
able to speak more authoritatively grin.

dwh


Saravanan Bellan wrote:

 Windows 2000
 Tomcat 3.2.3

 If I try to upload a file using the regular HTML/HTTP, there is a 20x
 difference in performance
 between using localhost vs the IP address in the Web Server URL. Ofcourse
 I'm running the browser
 on the same machine where tomcat is installed. Using localhost is 20 times
 slower than using IP address.

 Doesnt make a difference if I use Apache/AJP/Tomcat or Direct to Tomcat web
 server.

 Can somebody throw some light on this.

 Thanks,

 --
 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: More flexible JDBCRealm implementation ? (for ASP-style webapp)

2002-07-24 Thread @Basebeans.com

Subject: Re: More flexible JDBCRealm implementation 1 2 3 4 5 6 7 8 9 (for ASP-style 
webapp)
From: Vic C. [EMAIL PROTECTED]
 ===
I was just thinking of a design I did for ASP model:

Create a dispatch web app with single sign on (over multiple apps)

Say you have 4 clients, that is 4 virtual hosts, plus one dispatch host.
When people login in, they go to distpach and login in via JDBC relms to 
  the dispatch web, they login with their e-mail or something.
Once autethicated, you create a bean that find out what web app they 
should go to based org_id. And then each action (retrieve or update) 
appends org_id to db tables.

It worked.
So JAAS up front, and a bean and action in the back.
I could write up an implementation. one day.

Vic

Soefara Redzuan wrote:
 Thank you for the reply Vic.
 
 From: Vic C. [EMAIL PROTECTED]
 That is a frequent need.

 What is needed is the concept of organization, a 3rd field in every db
 table.
 
 
 Yes, I've done something like that too. But have therefore found that
 the Tomcat out-the-box JDBCRealm setup (using server.xml, web.xml as I
 described below) is not flexible in any way.
 
 So it looks like I too will have to use a manual authentication which
 I had hoped to avoid in the name of standardization. Oh well.
 
 I know how to manualy code (using getuserpricipal and a bean) but
 nothing automatic I can think of.
 
 
 Why use getUserPrincipal ?
 I thought we were supposed to use request.getRemoteUser() ?
 
 Also, may I ask by what you mean a bean for this ?
 I really like to design code (including Javabeans) so that they
 will run in standalone applications, as well as in the servlet
 container environment. Is it possible to design an authentication
 mechanism that is not dependent upon the servlet container (eg. Tomcat) ?
 
 Soefara.
 
 
 
 
 Vic

 Soefara Redzuan wrote:
  I've setup a JDBCRealm for Tomcat using MySQL. It works OK
  but the database schema is not good for an ASP (application
  service provider) model. For example, I would like several
  companies to use the same webapp (each company should not
  know of the other's existence) and each should be able to
  create a user 'admin' and a user 'david' but in the way that
  JDBCRealm is currently configured only one instance of any
  user name is possible since it is the primary key in the users
  table. Is there a better way to do this ?
 
  I followed instructions found on many websites for setting up
  a JDBCRealm.
 
  The table schema is
 
  create table user_groups (
 group_id int not null auto_increment,
 group_name char(24),
 parent_id int not null default -1,
 primary key(group_id)
 );
 
  create table users (
   user_name varchar(32) not null,
   user_pass varchar(32) not null,
   user_groupid  int not null default -1,
   primary key(user_name)
  );
 
  create table user_roles (
   user_name varchar(15) not null,
   role_name varchar(15) not null,
   primary key (user_name, role_name)
  );
 
  And in Tomcat's server.xml I have this in the appropriate context,
 
   Realm className=org.apache.catalina.realm.JDBCRealm debug=99
driverName=org.gjt.mm.mysql.Driver
connectionURL=jdbc:mysql://servername/databasename
userTable=users userNameCol=user_name userCredCol=user_pass
userRoleTable=user_roles roleNameCol=role_name/
 
  And finally this in the webapp's web.xml,
 
   security-constraint
  web-resource-collection
  web-resource-nameProtectedApp/web-resource-name
  url-pattern/*/url-pattern
  http-methodPOST/http-method
 http-methodGET/http-method
  /web-resource-collection
  auth-constraint
  descriptionname the security roles that are allowed to
  access/description
  role-nameadministrator/role-name
  role-nameuser/role-name
  /auth-constraint
  /security-constraint
 
  The alternative is to set up a separate webapp for each
  company that wishes to use our service but that really isn't
  scalable and doesn't allow for users to self-register and
  be up-and-running without administrator intervention.
 
  Has anybody solved this problem ?  Thank you in advance,
 
  Soefara.
 
 
 
 _
 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: Error : Why IllegalStateException ?

2002-07-24 Thread Ricky Leung

Well, I sometimes get this error with my error page, which only gets called
by Tomcat.  This is what's in web.xml.

error-page
exception-typejava.lang.Exception/exception-type
location/error/er500.jsp/location
/error-page


If the stream has already been closed, I think then this is a Tomcat error.
I am not sure how I could fix this.

-Original Message-
From: Ralph Einfeldt [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 24, 2002 4:35 AM
To: Tomcat Users List
Subject: AW: Error : Why IllegalStateException ?


That's not a problem of web.xml.
What make you think it is? (That kind of problem wouldn't
be resolved by a restart)
The typical reason for an IllegalStateException is that
you (or any component that you use) try to write something
to a response or a stream that already has bean closed
(flushed).

 -Ursprüngliche Nachricht-
 Von: jose saloio [mailto:[EMAIL PROTECTED]]
 Gesendet: Mittwoch, 24. Juli 2002 10:21
 An: [EMAIL PROTECTED]
 Betreff: Error : Why IllegalStateException ?

 I have this error:
 Current state = FLUSHED, new state = CODING
 7-10 11:09:48 - Ctx( /test): IllegalStateException in: R(
 /test+)  Current


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




Survey question for any Tomcat or Apache users out there

2002-07-24 Thread Rick Reumann

*Question:*:

Is there ANYONE out there that has managed to get Apache2.0.39 and
Tomcat4.x working on a Windows2K/NT machine?

Don't worry I won't even bother e-mailing you for help(unless you say
I can). I've gotten to the point now that I'm just wondering if anyone
is even using the combination since I can't find anything about it.
I'm just so frustrated, people are constantly asking these questions
and yet I see no documentation anywhere on any jakarata site how to
set this stuff up. Tomcat 4.0.4 is great I love it. Shouldn't it work
with another jakarta open source project - Apache web server?

This best documentation I found was in this doc:
http://mpcon.org/temp/how2install_apache_w_php_jsp_support.doc

But even the author just realized this install isn't perfect (it only
seems to be working from localhost).

In the meantime I'm just using Tomcat as the only server. I've never
installed Apache1.3 and things are almost perfect with Apache2.0.39 so
I really don't want to uninstall it yet and try to tackle 1.3, if
someone has the above set up working correctly.

Even if you don't have the above working e-mail back bitching. Maybe I
could keep track of the e-mail addresses and when someone does provide
a solution or help I can let every else know.

If anyone is interested in my original question/post it is below:

---

I'm having trouble getting Apache(2.0.39) to recognize Tomcat(4.0.4)
applications using port 7000. In my Apache httpd.conf file I have set:

Listen 7000

and also have the servername set:
ServerName afs.obs.outback.com

Everything works fine when just dealing on the actual machine that
Apache and Tomcat is on using localhost. In other words

http://localhost:7000/ --- brings up Apache main page

http://localhost:7000/myTomcatAppName/index.jsp  --- serves up the
jsp struts application fine

However when I try to access
http://afs.obs.outback.com:7000/myTomcatAppName/index.jsp  I get an
Apache 404 url does not exist error

(going straight to Tomcat does work fine:
http://afs.obs.outback.com:8080/myTomcatAppName/index.jsp )

Please someone help..this is driving me nuts:) Thanks

-- 

Rick
mailto:[EMAIL PROTECTED]


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




Re[2]: Apache Authentication

2002-07-24 Thread Jacob Kjome

Hello Kevin,

That's a question for the developers.  I don't think it is possible,
actually.  I think if you set your BASIC auth up in the web.xml and in
Apache, then you get the case where, when you go through Apache on
port 80, you get prompted for username/password by Apache and then
again by Tomcat.  However, in this setup, if you went to port 8080,
directly to Tomcat, then it would work fine.

So, you kind of need to make a choice as to whether to disable the
authentication set in web.xml and just use Apache or just let Apache
forward the request without asking for authentication and let Tomcat
deal with that.

It sure seems like a better solution ought to be possible.

Jake

Monday, July 22, 2002, 1:11:15 PM, you wrote:

KA OK,
KA So what if I want in one application to use Tomcat Authentication and in
KA the other use Apache's Authentication. Is that possible??

KA Thanks,
KA Kevin

KA Kevin Andryc
KA Web Systems Engineer
KA MISER
KA http://www.umass.edu/miser/
KA Phone: (413)-545-3460
KA [EMAIL PROTECTED]



KA -Original Message-
KA From: Jacob Kjome [mailto:[EMAIL PROTECTED]]
KA Sent: Monday, July 22, 2002 02:07 PM
KA To: Tomcat Users List
KA Subject: Re: Apache Authentication

KA Hello Kevin,

KA You need to add tomcatAuthentication=false to your jk connector
KA definition in server.xml.

KA Connector className=org.apache.ajp.tomcat4.Ajp13Connector
KAport=8009 minProcessors=5 maxProcessors=75
KAacceptCount=10 debug=0 tomcatAuthentication=false/

KA Note that tomcatAuthentication does not seem to be implemented
KA properly in Coyote.  For instace, the analog to the above connection
KA for Coyote would be the following which currently doesn't work
KA (getRemoteUser() returns null):

KA Connector className=org.apache.coyote.tomcat4.CoyoteConnector
KAport=8009 minProcessors=5 maxProcessors=75
KAenableLookups=true redirectPort=8443
KAacceptCount=10 debug=0 connectionTimeout=2
KAuseURIValidationHack=false tomcatAuthentication=false

KA protocolHandlerClassName=org.apache.jk.server.JkCoyoteHandler/

KA Let me qualify that. It doesn't work when using mod_jk.  I haven't
KA gotten thing to work using mod_jk2, so it may work in that case, but
KA it should work in both.


KA To Tomcat Developers...

KA Is there another way that Coyote implemented to grab the auth info
KA from Apache?


KA Jake


KA Monday, July 22, 2002, 12:55:31 PM, you wrote:

KA I just converted over from Tomcat 3.2.X to Tomcat 4.0.4 on Linux using
KA Apache 1.3.26. In the Apache httpd.conf file, we have an Alias that
KA points
KA to a directory that uses Apache's authentication. In Tomcat 3.2.X, I
KA used
KA mod_jserv which integrated well and I could get the remote user and use
KA Apache to authenticate. I was wondering how I could use mod_jk to do the
KA same. Right now, when I do a getRemoteUser() it returns null.

KA Thanks,
KA Kevin

KA Kevin Andryc
KA Web Systems Engineer
KA MISER
KA http://www.umass.edu/miser/
KA Phone: (413)-545-3460
KA [EMAIL PROTECTED]





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



KA --
KA Best regards,
KA  Jacobmailto:[EMAIL PROTECTED]


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


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



-- 
Best regards,
 Jacobmailto:[EMAIL PROTECTED]


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




RE: Survey question for any Tomcat or Apache users out there

2002-07-24 Thread Short, Dave

Yesterday, I finally got Apache 2.0.39 and Tomcat 4.1.8 (mod_jk2) to work on
W2K.  Tomcat is started by the Apache service and actually works in-process
like the IIS/Tomcat redirector.  If anyone in interested, I can post the
configuration steps.

-Original Message-
From: Rick Reumann [mailto:[EMAIL PROTECTED]]
Sent: July 24, 2002 8:19 AM
To: Tomcat Users List; [EMAIL PROTECTED]
Subject: Survey question for any Tomcat or Apache users out there


*Question:*:

Is there ANYONE out there that has managed to get Apache2.0.39 and
Tomcat4.x working on a Windows2K/NT machine?

Don't worry I won't even bother e-mailing you for help(unless you say
I can). I've gotten to the point now that I'm just wondering if anyone
is even using the combination since I can't find anything about it.
I'm just so frustrated, people are constantly asking these questions
and yet I see no documentation anywhere on any jakarata site how to
set this stuff up. Tomcat 4.0.4 is great I love it. Shouldn't it work
with another jakarta open source project - Apache web server?

This best documentation I found was in this doc:
http://mpcon.org/temp/how2install_apache_w_php_jsp_support.doc

But even the author just realized this install isn't perfect (it only
seems to be working from localhost).

In the meantime I'm just using Tomcat as the only server. I've never
installed Apache1.3 and things are almost perfect with Apache2.0.39 so
I really don't want to uninstall it yet and try to tackle 1.3, if
someone has the above set up working correctly.

Even if you don't have the above working e-mail back bitching. Maybe I
could keep track of the e-mail addresses and when someone does provide
a solution or help I can let every else know.

If anyone is interested in my original question/post it is below:

---

I'm having trouble getting Apache(2.0.39) to recognize Tomcat(4.0.4)
applications using port 7000. In my Apache httpd.conf file I have set:

Listen 7000

and also have the servername set:
ServerName afs.obs.outback.com

Everything works fine when just dealing on the actual machine that
Apache and Tomcat is on using localhost. In other words

http://localhost:7000/ --- brings up Apache main page

http://localhost:7000/myTomcatAppName/index.jsp  --- serves up the
jsp struts application fine

However when I try to access
http://afs.obs.outback.com:7000/myTomcatAppName/index.jsp  I get an
Apache 404 url does not exist error

(going straight to Tomcat does work fine:
http://afs.obs.outback.com:8080/myTomcatAppName/index.jsp )

Please someone help..this is driving me nuts:) Thanks

-- 

Rick
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: Re[2]: Apache Authentication

2002-07-24 Thread rsequeira


Just a thought, might not be true (since I haven't checked this behaviour).
 When you go through Apache (and if Apache has BASIC authentication setup),
the Apache authentication will take precedence. Once you have entered the
userid/password in the authentication dialog box, the browser will from
then on keep sending the Authentication header (Base64 encoded userid/pwd)
to the webserver. So if Tomcat has a BASIC authentication setup too, then
it will not send a 401 response code since the browser has sent the
Authentication header (ofcourse the userid/pwd for both Apache and Tomcat
should be the same. Else Tomcat will send a 401 response code).

RS





Jacob Kjome [EMAIL PROTECTED] on 07/24/2002 10:41:58 AM

Please respond to Tomcat Users List [EMAIL PROTECTED]

To:Tomcat Users List [EMAIL PROTECTED]
cc:

Subject:Re[2]: Apache Authentication

Hello Kevin,

That's a question for the developers.  I don't think it is possible,
actually.  I think if you set your BASIC auth up in the web.xml and in
Apache, then you get the case where, when you go through Apache on
port 80, you get prompted for username/password by Apache and then
again by Tomcat.  However, in this setup, if you went to port 8080,
directly to Tomcat, then it would work fine.

So, you kind of need to make a choice as to whether to disable the
authentication set in web.xml and just use Apache or just let Apache
forward the request without asking for authentication and let Tomcat
deal with that.

It sure seems like a better solution ought to be possible.

Jake

Monday, July 22, 2002, 1:11:15 PM, you wrote:

KA OK,
KA So what if I want in one application to use Tomcat Authentication
and in
KA the other use Apache's Authentication. Is that possible??

KA Thanks,
KA Kevin

KA Kevin Andryc
KA Web Systems Engineer
KA MISER
KA http://www.umass.edu/miser/
KA Phone: (413)-545-3460
KA [EMAIL PROTECTED]



KA -Original Message-
KA From: Jacob Kjome [mailto:[EMAIL PROTECTED]]
KA Sent: Monday, July 22, 2002 02:07 PM
KA To: Tomcat Users List
KA Subject: Re: Apache Authentication

KA Hello Kevin,

KA You need to add tomcatAuthentication=false to your jk connector
KA definition in server.xml.

KA Connector className=org.apache.ajp.tomcat4.Ajp13Connector
KAport=8009 minProcessors=5 maxProcessors=75
KAacceptCount=10 debug=0 tomcatAuthentication
=false/

KA Note that tomcatAuthentication does not seem to be implemented
KA properly in Coyote.  For instace, the analog to the above connection
KA for Coyote would be the following which currently doesn't work
KA (getRemoteUser() returns null):

KA Connector className=org.apache.coyote.tomcat4.CoyoteConnector
KAport=8009 minProcessors=5 maxProcessors=75
KAenableLookups=true redirectPort=8443
KAacceptCount=10 debug=0 connectionTimeout=2
KAuseURIValidationHack=false tomcatAuthentication
=false

KA protocolHandlerClassName=org.apache.jk.server.JkCoyoteHandler/

KA Let me qualify that. It doesn't work when using mod_jk.  I haven't
KA gotten thing to work using mod_jk2, so it may work in that case, but
KA it should work in both.


KA To Tomcat Developers...

KA Is there another way that Coyote implemented to grab the auth info
KA from Apache?


KA Jake


KA Monday, July 22, 2002, 12:55:31 PM, you wrote:

KA I just converted over from Tomcat 3.2.X to Tomcat 4.0.4 on Linux using
KA Apache 1.3.26. In the Apache httpd.conf file, we have an Alias that
KA points
KA to a directory that uses Apache's authentication. In Tomcat 3.2.X, I
KA used
KA mod_jserv which integrated well and I could get the remote user and
use
KA Apache to authenticate. I was wondering how I could use mod_jk to do
the
KA same. Right now, when I do a getRemoteUser() it returns null.

KA Thanks,
KA Kevin

KA Kevin Andryc
KA Web Systems Engineer
KA MISER
KA http://www.umass.edu/miser/
KA Phone: (413)-545-3460
KA [EMAIL PROTECTED]





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



KA --
KA Best regards,
KA  Jacobmailto:[EMAIL PROTECTED]


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


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



--
Best regards,
 Jacobmailto:[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: Survey question for any Tomcat or Apache users out there

2002-07-24 Thread Garia, Manju

can you please do that.

Thanks

-Original Message-
From: Short, Dave [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 24, 2002 11:53 AM
To: 'Tomcat Users List'
Subject: RE: Survey question for any Tomcat or Apache users out there


Yesterday, I finally got Apache 2.0.39 and Tomcat 4.1.8 (mod_jk2) to work on
W2K.  Tomcat is started by the Apache service and actually works in-process
like the IIS/Tomcat redirector.  If anyone in interested, I can post the
configuration steps.

-Original Message-
From: Rick Reumann [mailto:[EMAIL PROTECTED]]
Sent: July 24, 2002 8:19 AM
To: Tomcat Users List; [EMAIL PROTECTED]
Subject: Survey question for any Tomcat or Apache users out there


*Question:*:

Is there ANYONE out there that has managed to get Apache2.0.39 and
Tomcat4.x working on a Windows2K/NT machine?

Don't worry I won't even bother e-mailing you for help(unless you say
I can). I've gotten to the point now that I'm just wondering if anyone
is even using the combination since I can't find anything about it.
I'm just so frustrated, people are constantly asking these questions
and yet I see no documentation anywhere on any jakarata site how to
set this stuff up. Tomcat 4.0.4 is great I love it. Shouldn't it work
with another jakarta open source project - Apache web server?

This best documentation I found was in this doc:
http://mpcon.org/temp/how2install_apache_w_php_jsp_support.doc

But even the author just realized this install isn't perfect (it only
seems to be working from localhost).

In the meantime I'm just using Tomcat as the only server. I've never
installed Apache1.3 and things are almost perfect with Apache2.0.39 so
I really don't want to uninstall it yet and try to tackle 1.3, if
someone has the above set up working correctly.

Even if you don't have the above working e-mail back bitching. Maybe I
could keep track of the e-mail addresses and when someone does provide
a solution or help I can let every else know.

If anyone is interested in my original question/post it is below:

---

I'm having trouble getting Apache(2.0.39) to recognize Tomcat(4.0.4)
applications using port 7000. In my Apache httpd.conf file I have set:

Listen 7000

and also have the servername set:
ServerName afs.obs.outback.com

Everything works fine when just dealing on the actual machine that
Apache and Tomcat is on using localhost. In other words

http://localhost:7000/ --- brings up Apache main page

http://localhost:7000/myTomcatAppName/index.jsp  --- serves up the
jsp struts application fine

However when I try to access
http://afs.obs.outback.com:7000/myTomcatAppName/index.jsp  I get an
Apache 404 url does not exist error

(going straight to Tomcat does work fine:
http://afs.obs.outback.com:8080/myTomcatAppName/index.jsp )

Please someone help..this is driving me nuts:) Thanks

-- 

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




Apache 2.0.39 and Tomcat 4.1.8 Servlet issue

2002-07-24 Thread Short, Dave

There is an issue with Apache 2.0.39 and Tomcat 4.1.8 (actually this issue
first appeared with Apache 2.0.36 and Tomcat 4.0.x).  It seems, if a servlet
returns content (dynamically built HTML for instance) which exceeds 8192 in
length, the content is truncated at 8192 and a blank page is rendered by
Apache.  Actually, Apache renders what was returned by Tomcat (8192 bytes of
the dynamically generated HTML page).  Basically, an incomplete HTML page -
hence it is displayed as blank.

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




Apache 2.0.39 + Tomcat 4.+ inprocess

2002-07-24 Thread Sullivan, Mark E

Has anyone gotten this combination (Apache 2.0.39 + Tomcat 4.+) to work with
mod_jk or mod_jk2 as an inprocess worker? Documentation especially for
mod_jk2 is very limited.

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




Re: More JDBCRealm Questions

2002-07-24 Thread Craig R. McClanahan



On Wed, 24 Jul 2002, Soefara Redzuan wrote:

 Date: Wed, 24 Jul 2002 14:39:35 +0800
 From: Soefara Redzuan [EMAIL PROTECTED]
 Reply-To: Tomcat Users List [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Subject: More JDBCRealm Questions


 I have set up a JDBCRealm and am using it with form-based login to
 secure/protect my webapp.  However, I have a few questions which I
 hope somebody could help me with,

 1. The JDBCRealm is set up with the following in server.xml.

 Realm className=org.apache.catalina.realm.JDBCRealm debug=99
  driverName=org.gjt.mm.mysql.Driver
  connectionURL=jdbc:mysql://localhost/authentication
  userTable=users userNameCol=user_name userCredCol=user_pass
  userRoleTable=user_roles roleNameCol=role_name/

 However, I have noticed that this requires the password (stored in
 the user_pass column) to be clear text, which I really don't like doing.
 Is there any way to have store the passwords as hashes (ie. using the
 password() function in MySQL) ?


The database password isn't the only sensitive piece of information in
server.xml -- you should ensure that the server.xml file as a whole is not
accessible to any OS user other than the one running Tomcat.  In addition,
you can use security manager protections to prevent webapps from being
able to access it directly.

 2. I read that a call to j_security_check will be made by every attempt
access your secured pages.  Since I am protecting every page in my
webapp, I'm wondering how efficient is j_security_check ?
Does it simply look at the session, or does it make a database call on
each and every request ?


If you are using sessions, the user identity is cached the first time, so
the database will only get hit once.

 3. How do you specify a page for authenticated users who do not have
the correct permissions/roles ?  At the moment, I have this in web.xml,

 login-config
 auth-methodFORM/auth-method
 form-login-config
 form-login-pagelogin.jsp/form-login-page
  form-error-pagelogin-error.jsp/form-error-page
   /form-login-config
 /login-config

 login.jsp is the form that shows when an authenticated user tries to
 access the site.
 login-error.jsp is displayed when an incorrect username/password is
 submitted.

 However, when a correct username/password is submitted but the user does
 not
 possess an adequate role, I see a default You are not authorized
 message.
 How can I customize the page that is shown in such circumstances ?


You can use an error-page element in your web.xml for the 403 status.


 4. Is there a formal method to logging out, rather than calling
invalidate() on the session ?


Not in Servlet 2.3.  Such things are under consideration for 2.4.  For
now, invalidating the session is the right way to do it (if you're using
form based login).

 5. If your webapp's authentication works fine on Tomcat, would it then
work on say BEAWeblogic or IBMWebsphere ?


As long as you are not relying on wierd container-specific behaviors and
using j_security_check the way it was intended to be used.

Note that the user database itself, and how you set it up, will be
specific for each app server (i.e. JDBCRealm is Tomcat specific).  But the
app won't have to change.

 Sorry for so many questions but I can't find a comprehensive description
 of this anywhere. I've only found setup/configuration guides which deal
 with the simple issues.

 Soefara.


Craig


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




Re: AW: More flexible JDBCRealm implementation ? (for ASP-stylewebapp)

2002-07-24 Thread Craig R. McClanahan



On Wed, 24 Jul 2002, Ralph Einfeldt wrote:

 Date: Wed, 24 Jul 2002 09:07:22 +0200
 From: Ralph Einfeldt [EMAIL PROTECTED]
 Reply-To: Tomcat Users List [EMAIL PROTECTED]
 To: Tomcat Users List [EMAIL PROTECTED]
 Subject: AW: More flexible JDBCRealm implementation ? (for ASP-style
 webapp)


 See Below:

  -Ursprüngliche Nachricht-
  Von: Soefara Redzuan [mailto:[EMAIL PROTECTED]]
  Gesendet: Mittwoch, 24. Juli 2002 08:52
  An: [EMAIL PROTECTED]
  Betreff: Re: More flexible JDBCRealm implementation ? (for ASP-style
  webapp)
 
 
  Yes, but this adds complexity due to different table names
  for different clients.

 With a 'real' database each web application can use the same
 table name. You just must configure the web application to use a
 different schema (catalog, database, ; the terms differ from
 vendor to vendor)

 
  I do prefer to share the tables. The reason is that you can easily set
  up new clients and customers without restarting Tomcat.
  Better yet, users can register and sign-up themselves, something
 that's
  not possible if I have to set up a different database for them, with
  its own JNDI resource configuration in server.xml

 snip/

  I'll have to investigate this use of views. It's something I'd never
  considered before and looks very useful.

 With mysql you better forget it.

 Currently there are no views in mysql. (Altough chances have improve
 that there will be views in a future version. The views have a higher
 priority in the todo list than 2 years ago)


In the open source database world, Postgres has views that are quite
effective for adapting existing table structures to what JDBCRealm
requires.

Craig


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




RequestDispatcher forward versus response.sendRedirect

2002-07-24 Thread Jason Stortz

Anyone have any hard and fast rules, good links, general info,
do and don't lists, or anything about these two?

We moved from iPlanet 4.1 where we did all redirection with
response.sendRedirect.  That didn't work with tomcat so I
started using the forward method of RequestDispatcher.  Well,
now I need to use a NON relative path to redirect the user
off our site.  While I think response.sendRedirect will work
in this instance I cannot seem to formulate a theory why it works
here and not in other parts of our site.

Does anyone have any information on this I can read, or advice?

Thanks!

Jason

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




Poolman with Tomcat

2002-07-24 Thread Sundar Chakravarthy


Hi 

I have Tomcat  4.0.4 / Apache 1.3 working with mod_jk.
I am trying  to integrate poolman 2.0 into the system.

Here is what I think I should do,

1. Place poolman.xml in WEB-INF/classes directory of the application
2. Place poolman.jar in WEB-INF/lib directory , I believe Tomcat 4x
comes with
most of the other required libs.
3. Setup JNDI based Datasource
4. Write code to invoke JNDI Datasource i.e pool for each db request.

The question is - does poolman make use of JNDI inside Tomcat
automatically or
do I have to configure one manually with Tomcat? 

Any best practises ?

Unfortunately, tomcat pooling did not work for me . Any reason why
Tomcat
does not come with DB Pooling by default ? Why would anyone not use
pooling ? Beats me.

TIA 

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




Re[4]: Apache Authentication

2002-07-24 Thread Jacob Kjome

Hello rsequeira,

Good point.

However, that means you have to keep your user authentication info in
two different places...unless you are pulling the info a single source
such as JNDI or JDBC for both Apache and Tomcat.  Also, in that case,
the structure of the JNDI and JDBC entries for both Apache and Tomcat
have to be pretty close to identical.  Notice the issues brought up by
users unhappy with how SingleSignOn work with Tomcat and how the
structure of the database forced by Tomcat's implementation doesn't
quite meet their needs.

Jake

Wednesday, July 24, 2002, 10:50:48 AM, you wrote:


rtc Just a thought, might not be true (since I haven't checked this behaviour).
rtc  When you go through Apache (and if Apache has BASIC authentication setup),
rtc the Apache authentication will take precedence. Once you have entered the
rtc userid/password in the authentication dialog box, the browser will from
rtc then on keep sending the Authentication header (Base64 encoded userid/pwd)
rtc to the webserver. So if Tomcat has a BASIC authentication setup too, then
rtc it will not send a 401 response code since the browser has sent the
rtc Authentication header (ofcourse the userid/pwd for both Apache and Tomcat
rtc should be the same. Else Tomcat will send a 401 response code).

rtc RS





rtc Jacob Kjome [EMAIL PROTECTED] on 07/24/2002 10:41:58 AM

rtc Please respond to Tomcat Users List [EMAIL PROTECTED]

rtc To:Tomcat Users List [EMAIL PROTECTED]
rtc cc:

rtc Subject:Re[2]: Apache Authentication

rtc Hello Kevin,

rtc That's a question for the developers.  I don't think it is possible,
rtc actually.  I think if you set your BASIC auth up in the web.xml and in
rtc Apache, then you get the case where, when you go through Apache on
rtc port 80, you get prompted for username/password by Apache and then
rtc again by Tomcat.  However, in this setup, if you went to port 8080,
rtc directly to Tomcat, then it would work fine.

rtc So, you kind of need to make a choice as to whether to disable the
rtc authentication set in web.xml and just use Apache or just let Apache
rtc forward the request without asking for authentication and let Tomcat
rtc deal with that.

rtc It sure seems like a better solution ought to be possible.

rtc Jake

rtc Monday, July 22, 2002, 1:11:15 PM, you wrote:

KA OK,
KA So what if I want in one application to use Tomcat Authentication
rtc and in
KA the other use Apache's Authentication. Is that possible??

KA Thanks,
KA Kevin

KA Kevin Andryc
KA Web Systems Engineer
KA MISER
KA http://www.umass.edu/miser/
KA Phone: (413)-545-3460
KA [EMAIL PROTECTED]



KA -Original Message-
KA From: Jacob Kjome [mailto:[EMAIL PROTECTED]]
KA Sent: Monday, July 22, 2002 02:07 PM
KA To: Tomcat Users List
KA Subject: Re: Apache Authentication

KA Hello Kevin,

KA You need to add tomcatAuthentication=false to your jk connector
KA definition in server.xml.

KA Connector className=org.apache.ajp.tomcat4.Ajp13Connector
KAport=8009 minProcessors=5 maxProcessors=75
KAacceptCount=10 debug=0 tomcatAuthentication
=false/

KA Note that tomcatAuthentication does not seem to be implemented
KA properly in Coyote.  For instace, the analog to the above connection
KA for Coyote would be the following which currently doesn't work
KA (getRemoteUser() returns null):

KA Connector className=org.apache.coyote.tomcat4.CoyoteConnector
KAport=8009 minProcessors=5 maxProcessors=75
KAenableLookups=true redirectPort=8443
KAacceptCount=10 debug=0 connectionTimeout=2
KAuseURIValidationHack=false tomcatAuthentication
rtc =false

KA protocolHandlerClassName=org.apache.jk.server.JkCoyoteHandler/

KA Let me qualify that. It doesn't work when using mod_jk.  I haven't
KA gotten thing to work using mod_jk2, so it may work in that case, but
KA it should work in both.


KA To Tomcat Developers...

KA Is there another way that Coyote implemented to grab the auth info
KA from Apache?


KA Jake


KA Monday, July 22, 2002, 12:55:31 PM, you wrote:

KA I just converted over from Tomcat 3.2.X to Tomcat 4.0.4 on Linux using
KA Apache 1.3.26. In the Apache httpd.conf file, we have an Alias that
KA points
KA to a directory that uses Apache's authentication. In Tomcat 3.2.X, I
KA used
KA mod_jserv which integrated well and I could get the remote user and
rtc use
KA Apache to authenticate. I was wondering how I could use mod_jk to do
rtc the
KA same. Right now, when I do a getRemoteUser() it returns null.

KA Thanks,
KA Kevin

KA Kevin Andryc
KA Web Systems Engineer
KA MISER
KA http://www.umass.edu/miser/
KA Phone: (413)-545-3460
KA [EMAIL PROTECTED]





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



KA --
KA Best regards,
KA  Jacobmailto:[EMAIL PROTECTED]


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

Re: Is there any way to stop exceptions getting logged to log file?

2002-07-24 Thread Craig R. McClanahan



On Wed, 24 Jul 2002, Mark O'Driscoll wrote:

 Date: Wed, 24 Jul 2002 09:46:18 +0100
 From: Mark O'Driscoll [EMAIL PROTECTED]
 Reply-To: Tomcat Users List [EMAIL PROTECTED]
 To: Tomcat Users List [EMAIL PROTECTED]
 Subject: Re: Is there any way to stop exceptions getting logged to log
 file?

 I don't want to get involved in a programming practice debate BUT..


Too late ... :-)

 The performance hit from exceptions occur because exceptions are thrown, not
 in how they are handled. You cannot programatically avoid exceptions with
 xhaustive checking that would itself hinder performance. Specifically
 potential SQL errors are punexceptionally/pun difficult to cater for.
 (dropped connections, network problems, constraint violations) .Exceptions
 are only thrown when something goes wrong. The point I was trying to make
 was that exceptions are not only a sign of system failure, but one of usage
 failure too.


Because SQLException is a checked exception, you can't throw it directly
from a servlet anyway, so your database accesses are already encapsulated
in try/catch blocks.  You've already paid all the cost of checking
already -- you actually have to deliberately rethrow it (wrapped in a
ServletException) to allow your filter to see it.  Why go to all that
extra work?

 Anyway, what I was trying to do was to implement a transaction  logging
 filter that determined if a particular database write operation had worked.
 The code is simple and checks if a servlet/jsp has thrown an exception to
 check for success/failure. If the servlet/jsp completes without throwing an
 exception, I commit the transaction, otherwise I roll it back.


This is not the way you should program database applications!  It is very
very dangerous to depend on external logic to commit or roll back
transactions for you.  If an exception happens, it should be logged and
dealt with when it happens.

Database access logic should always catch its own exceptions, and
commit or roll back the transaction appropriately.  In a web app, it is
considered irresponsible programming for a servlet to leave an open
database transaction after it returns from the service() method, for
whatever reason that might happen.  To say nothing of returning the
connection to the connection pool you got it from.

 Is there some recognised way to pass servet/jsp error conditions to filters?
 This would prevent me relying on exceptions (altho' exceptions would have to
 be catered for too). I suppose I could use the request.getAttribte()?

 Are exceptions that are trapped in a filter 'seen' and handled by Tomcat?


Your problem is that Tomcat sees the exception thrown by the servlet
before it is passed back to the filter.  That's where the logging is
happening.  And that's not going to change (in the standard Tomcat
release -- you're perfectly free to modify your own copy), because
handling exceptions is not what filters are for.

 TIA

 - Mark


Craig


  I'll second what Craig has said and add that if your program normally
  throws lots of exceptions, then you should look at some of your design
  decisions. Exceptions are wonderful when used for Exceptional behavior,
  but not for normal runs. They are also REALLY slow. Exceptions can kill
  your performance, and if you are getting them regularly, you should catch
  the ones you can safely ignore as early as possible and toss them away
 as
  appropriate, or even better, not throw them at all.
 
  Regards,
 
  Will Hartung
  ([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: Apache 2.0.39 and Tomcat 4.1.8 Servlet issue

2002-07-24 Thread jeff . guttadauro


Hi, Dave.

 Did you check your log files for exceptions?  I've seen behavior similar
to what you're describing with Tomcat 4.0.x running Standalone.  What I've
seen is that it gets a full buffer's (defaults to 8K, like you're seeing, but
can be set to different size) worth of content and displays it.  Then, it runs
into a NullPointerException (or probably some other exception, but, usually
for me, it's a good ole NPE) while trying to generate the next buffer's worth
of content.  At this point, the browser doesn't show an error page but just
stops with only the one buffer's worth of content displayed.  Maybe Apache
renders the page as blank, but I usually get the partially returned page, as
far as it can be rendered.  Besides the partial page, the only sign that
something went wrong is in the log.  I've been meaning to look into this to
see if it's a reported bug, but haven't yet.  Is this what you're running
into?

-Jeff



   

Short, Dave  

dave.short@pTo: 'Tomcat Users List' 
[EMAIL PROTECTED]
fizer.com   cc:   

 Subject: Apache 2.0.39 and Tomcat 4.1.8 
Servlet issue 
07/24/02   

10:59 AM   

Please 

respond to 

Tomcat Users  

List  

   

   





There is an issue with Apache 2.0.39 and Tomcat 4.1.8 (actually this issue
first appeared with Apache 2.0.36 and Tomcat 4.0.x).  It seems, if a servlet
returns content (dynamically built HTML for instance) which exceeds 8192 in
length, the content is truncated at 8192 and a blank page is rendered by
Apache.  Actually, Apache renders what was returned by Tomcat (8192 bytes of
the dynamically generated HTML page).  Basically, an incomplete HTML page -
hence it is displayed as blank.

--
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: Survey question for any Tomcat or Apache users out there

2002-07-24 Thread Turner, John


Just for grins, have you tried it with Apache on port 80?  I realize you
probably have good reason to run it on port 7000, it just helps if you can
say I did it the default way and it worked, but this other way it didn't.

I took a quick look at the doc at the link you posted.  One thing I can say
from experience: if you have any pathnames anywhere in your
apache+mod_jk+tomcat config, get rid of them.  Don't use Program
Files/Apache Group etc.  Use Apache/Apache and C:\tomcat, etc.  While
the apache installer probably lets you specify paths with spaces, and
probably even recommends them by default, and probably works with them, the
Apache HTTP developers don't co-ordinate with anyone else.  Likewise, the
various connector and tomcat projects are not co-ordinated.  There's no
guarantee that just because the apache installer lets you use spaces that
every other Jakarta project will be happy with them.

John Turner
[EMAIL PROTECTED]

-Original Message-
From: Rick Reumann [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 24, 2002 11:19 AM
To: Tomcat Users List; [EMAIL PROTECTED]
Subject: Survey question for any Tomcat or Apache users out there


*Question:*:

Is there ANYONE out there that has managed to get Apache2.0.39 and
Tomcat4.x working on a Windows2K/NT machine?

Don't worry I won't even bother e-mailing you for help(unless you say
I can). I've gotten to the point now that I'm just wondering if anyone
is even using the combination since I can't find anything about it.
I'm just so frustrated, people are constantly asking these questions
and yet I see no documentation anywhere on any jakarata site how to
set this stuff up. Tomcat 4.0.4 is great I love it. Shouldn't it work
with another jakarta open source project - Apache web server?

This best documentation I found was in this doc:
http://mpcon.org/temp/how2install_apache_w_php_jsp_support.doc

But even the author just realized this install isn't perfect (it only
seems to be working from localhost).

In the meantime I'm just using Tomcat as the only server. I've never
installed Apache1.3 and things are almost perfect with Apache2.0.39 so
I really don't want to uninstall it yet and try to tackle 1.3, if
someone has the above set up working correctly.

Even if you don't have the above working e-mail back bitching. Maybe I
could keep track of the e-mail addresses and when someone does provide
a solution or help I can let every else know.

If anyone is interested in my original question/post it is below:

---

I'm having trouble getting Apache(2.0.39) to recognize Tomcat(4.0.4)
applications using port 7000. In my Apache httpd.conf file I have set:

Listen 7000

and also have the servername set:
ServerName afs.obs.outback.com

Everything works fine when just dealing on the actual machine that
Apache and Tomcat is on using localhost. In other words

http://localhost:7000/ --- brings up Apache main page

http://localhost:7000/myTomcatAppName/index.jsp  --- serves up the
jsp struts application fine

However when I try to access
http://afs.obs.outback.com:7000/myTomcatAppName/index.jsp  I get an
Apache 404 url does not exist error

(going straight to Tomcat does work fine:
http://afs.obs.outback.com:8080/myTomcatAppName/index.jsp )

Please someone help..this is driving me nuts:) Thanks

-- 

Rick
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: Kaffe or gcj JVM and Tomcat

2002-07-24 Thread David Goodenough

On Wednesday 24 July 2002 09:29, you wrote:
 Has anyone had any success getting Tomcat to run in the Kaffe JVM?  Or
 running a native compiled Tomcat with gcj?  I want to move at some point
 to a completely open source, free web application environment, and Kaffe
 or gcj look like the two most likely ways to do that.

I doubt you will have any luck with Kaffe, its 1.1.8 with a few bits of
1.2.2 as far as I understand, I doubt Tomcat will run on it.

As to gcj, it might work.  It will run some complicated things and so
it might be worth giving it a go

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




RE: RequestDispatcher forward versus response.sendRedirect

2002-07-24 Thread Jason Stortz

302 temporarily moved error.

-Original Message-
From: Sullivan, Mark E [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 24, 2002 11:13 AM
To: 'Tomcat Users List'
Subject: RE: RequestDispatcher forward versus response.sendRedirect


when you say response.sendRedirect doesn't work, what kind of
error/unexpected behavior are you getting?

-Original Message-
From: Jason Stortz [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 24, 2002 11:12 AM
To: Tomcat Users List
Subject: RequestDispatcher forward versus response.sendRedirect


Anyone have any hard and fast rules, good links, general info,
do and don't lists, or anything about these two?

We moved from iPlanet 4.1 where we did all redirection with
response.sendRedirect.  That didn't work with tomcat so I
started using the forward method of RequestDispatcher.  Well,
now I need to use a NON relative path to redirect the user
off our site.  While I think response.sendRedirect will work
in this instance I cannot seem to formulate a theory why it works
here and not in other parts of our site.

Does anyone have any information on this I can read, or advice?

Thanks!

Jason

--
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: RequestDispatcher forward versus response.sendRedirect

2002-07-24 Thread jeff . guttadauro


Hi, Jason.

 I believe that that is precisely the intended use of the
response.sendRedirect ... when you are redirecting OFF your site (to an
absolute path).  The specs say that sendRedirect takes an absolute path, so it
is not good to use for forwarding around within your site, where relative
paths are obviously best.  Good to hear that you're using the
RequestDispatcher for this purpose now.

HTH,
-Jeff



   
  
Sullivan, Mark E 
  
Mark.Sullivan@nav-internatTo: 'Tomcat Users List' 
[EMAIL PROTECTED]
ional.com cc: 
  
   Subject: RE: 
RequestDispatcher forward versus response.sendRedirect   
07/24/02 11:13 AM  
  
Please respond to Tomcat  
  
Users List
  
   
  
   
  




when you say response.sendRedirect doesn't work, what kind of
error/unexpected behavior are you getting?

-Original Message-
From: Jason Stortz [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 24, 2002 11:12 AM
To: Tomcat Users List
Subject: RequestDispatcher forward versus response.sendRedirect


Anyone have any hard and fast rules, good links, general info,
do and don't lists, or anything about these two?

We moved from iPlanet 4.1 where we did all redirection with
response.sendRedirect.  That didn't work with tomcat so I
started using the forward method of RequestDispatcher.  Well,
now I need to use a NON relative path to redirect the user
off our site.  While I think response.sendRedirect will work
in this instance I cannot seem to formulate a theory why it works
here and not in other parts of our site.

Does anyone have any information on this I can read, or advice?

Thanks!

Jason

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




JDBCRealm: Case-sensitive usernames

2002-07-24 Thread Mete Kural

Hello,

I use JDBCRealm and for some reason the usernames are
not checked with the database in a case-sensitive
manner. The passwords are still checked case-sensitive
as they should be. Is this expected behaviour in
JDBCRealm, or do you think there's something wrong
with my webapp or database?

Thanks,
Mete

__
Do You Yahoo!?
Yahoo! Health - Feel better, live better
http://health.yahoo.com

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




RE: RequestDispatcher forward versus response.sendRedirect

2002-07-24 Thread Jason Stortz

Jeff,

Thanks for reply.  So, probably always use response.sendRedirect
with absolute url to something out of my webapp, but RequestDispatcher
for moving to other sources inside my webapp?

Does that sound right?

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 24, 2002 11:25 AM
To: Tomcat Users List
Subject: RE: RequestDispatcher forward versus response.sendRedirect



Hi, Jason.

 I believe that that is precisely the intended use of the
response.sendRedirect ... when you are redirecting OFF your site (to an
absolute path).  The specs say that sendRedirect takes an absolute path, so it
is not good to use for forwarding around within your site, where relative
paths are obviously best.  Good to hear that you're using the
RequestDispatcher for this purpose now.

HTH,
-Jeff



   
  
Sullivan, Mark E 
  
Mark.Sullivan@nav-internatTo: 'Tomcat Users List' 
[EMAIL PROTECTED]
ional.com cc: 
  
   Subject: RE: 
RequestDispatcher forward versus response.sendRedirect   
07/24/02 11:13 AM  
  
Please respond to Tomcat  
  
Users List
  
   
  
   
  




when you say response.sendRedirect doesn't work, what kind of
error/unexpected behavior are you getting?

-Original Message-
From: Jason Stortz [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 24, 2002 11:12 AM
To: Tomcat Users List
Subject: RequestDispatcher forward versus response.sendRedirect


Anyone have any hard and fast rules, good links, general info,
do and don't lists, or anything about these two?

We moved from iPlanet 4.1 where we did all redirection with
response.sendRedirect.  That didn't work with tomcat so I
started using the forward method of RequestDispatcher.  Well,
now I need to use a NON relative path to redirect the user
off our site.  While I think response.sendRedirect will work
in this instance I cannot seem to formulate a theory why it works
here and not in other parts of our site.

Does anyone have any information on this I can read, or advice?

Thanks!

Jason

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




Links on Page sometimes need webapp name, sometimes don't?

2002-07-24 Thread Jason Stortz

Hey more tomcat questions!

Why would it happen that when I print out links for
users sometimes I need to use my webapp name (auto),
and sometimes not?

Examples:

/auto/servlet/com.qs.ScreenBuilder
or
/servlet/com.qs.ScreenBuilder

Depending on which page it is, sometimes I have to
use the /auto and sometimes I cannot.  If i deviate
either way I get 404 errors like this:

type Status report
message /auto/servlet/com.qs.ScreenBuilder
description The requested resource (/auto/servlet/com.qs.ScreenBuilder) is not 
available.

All output that builds these links is made in a servlet.

Any ideas?  Thanks!

-Jason

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




Re: Re[4]: Apache Authentication

2002-07-24 Thread rsequeira


Yeah, it'd would be a good idea to store the authentication information -
userid/pwd - in one place. And then use LDAP or JNDI. If you store the info
in the database, only Tomcat would be able to access it (unless you use
LDAP - maybe Apache has a LDAP module). Also I'd suggest either Tomcat or
Apache handle the authetication, not both. This way you won't have
nightmares later :-)
Again, these are just suggestions, you make the call depending on your
requirements.

RS






Jacob Kjome [EMAIL PROTECTED] on 07/24/2002 11:19:18 AM

Please respond to Tomcat Users List [EMAIL PROTECTED]

To:Tomcat Users List [EMAIL PROTECTED]
cc:

Subject:Re[4]: Apache Authentication

Hello rsequeira,

Good point.

However, that means you have to keep your user authentication info in
two different places...unless you are pulling the info a single source
such as JNDI or JDBC for both Apache and Tomcat.  Also, in that case,
the structure of the JNDI and JDBC entries for both Apache and Tomcat
have to be pretty close to identical.  Notice the issues brought up by
users unhappy with how SingleSignOn work with Tomcat and how the
structure of the database forced by Tomcat's implementation doesn't
quite meet their needs.

Jake

Wednesday, July 24, 2002, 10:50:48 AM, you wrote:


rtc Just a thought, might not be true (since I haven't checked this
behaviour).
rtc  When you go through Apache (and if Apache has BASIC authentication
setup),
rtc the Apache authentication will take precedence. Once you have entered
the
rtc userid/password in the authentication dialog box, the browser will
from
rtc then on keep sending the Authentication header (Base64 encoded
userid/pwd)
rtc to the webserver. So if Tomcat has a BASIC authentication setup too,
then
rtc it will not send a 401 response code since the browser has sent the
rtc Authentication header (ofcourse the userid/pwd for both Apache and
Tomcat
rtc should be the same. Else Tomcat will send a 401 response code).

rtc RS





rtc Jacob Kjome [EMAIL PROTECTED] on 07/24/2002 10:41:58 AM

rtc Please respond to Tomcat Users List [EMAIL PROTECTED]

rtc To:Tomcat Users List [EMAIL PROTECTED]
rtc cc:

rtc Subject:Re[2]: Apache Authentication

rtc Hello Kevin,

rtc That's a question for the developers.  I don't think it is possible,
rtc actually.  I think if you set your BASIC auth up in the web.xml and in
rtc Apache, then you get the case where, when you go through Apache on
rtc port 80, you get prompted for username/password by Apache and then
rtc again by Tomcat.  However, in this setup, if you went to port 8080,
rtc directly to Tomcat, then it would work fine.

rtc So, you kind of need to make a choice as to whether to disable the
rtc authentication set in web.xml and just use Apache or just let Apache
rtc forward the request without asking for authentication and let Tomcat
rtc deal with that.

rtc It sure seems like a better solution ought to be possible.

rtc Jake

rtc Monday, July 22, 2002, 1:11:15 PM, you wrote:

KA OK,
KA So what if I want in one application to use Tomcat Authentication
rtc and in
KA the other use Apache's Authentication. Is that possible??

KA Thanks,
KA Kevin

KA Kevin Andryc
KA Web Systems Engineer
KA MISER
KA http://www.umass.edu/miser/
KA Phone: (413)-545-3460
KA [EMAIL PROTECTED]



KA -Original Message-
KA From: Jacob Kjome [mailto:[EMAIL PROTECTED]]
KA Sent: Monday, July 22, 2002 02:07 PM
KA To: Tomcat Users List
KA Subject: Re: Apache Authentication

KA Hello Kevin,

KA You need to add tomcatAuthentication=false to your jk connector
KA definition in server.xml.

KA Connector className=org.apache.ajp.tomcat4.Ajp13Connector
KAport=8009 minProcessors=5 maxProcessors=75
KAacceptCount=10 debug=0 tomcatAuthentication
=false/

KA Note that tomcatAuthentication does not seem to be implemented
KA properly in Coyote.  For instace, the analog to the above connection
KA for Coyote would be the following which currently doesn't work
KA (getRemoteUser() returns null):

KA Connector className=org.apache.coyote.tomcat4.CoyoteConnector
KAport=8009 minProcessors=5 maxProcessors=75
KAenableLookups=true redirectPort=8443
KAacceptCount=10 debug=0 connectionTimeout=2
KAuseURIValidationHack=false tomcatAuthentication
rtc =false

KA protocolHandlerClassName=org.apache.jk.server.JkCoyoteHandler/

KA Let me qualify that. It doesn't work when using mod_jk.  I haven't
KA gotten thing to work using mod_jk2, so it may work in that case, but
KA it should work in both.


KA To Tomcat Developers...

KA Is there another way that Coyote implemented to grab the auth info
KA from Apache?


KA Jake


KA Monday, July 22, 2002, 12:55:31 PM, you wrote:

KA I just converted over from Tomcat 3.2.X to Tomcat 4.0.4 on Linux
using
KA Apache 1.3.26. In the Apache httpd.conf file, we have an Alias that
KA points
KA to a directory that uses Apache's authentication. In Tomcat 3.2.X, I

RE: RequestDispatcher forward versus response.sendRedirect

2002-07-24 Thread jeff . guttadauro


As far as I know, it sounds right to me...



   
 
Jason Stortz 
 
jstortz@quoteTo: Tomcat Users List 
[EMAIL PROTECTED]  
smith.comcc:  
 
  Subject: RE: RequestDispatcher forward 
versus response.sendRedirect   
07/24/02 11:29 
 
AM 
 
Please respond 
 
to Tomcat 
 
Users List
 
   
 
   
 




Jeff,

   Thanks for reply.  So, probably always use response.sendRedirect
with absolute url to something out of my webapp, but RequestDispatcher
for moving to other sources inside my webapp?

Does that sound right?

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 24, 2002 11:25 AM
To: Tomcat Users List
Subject: RE: RequestDispatcher forward versus response.sendRedirect



Hi, Jason.

 I believe that that is precisely the intended use of the
response.sendRedirect ... when you are redirecting OFF your site (to an
absolute path).  The specs say that sendRedirect takes an absolute path, so it
is not good to use for forwarding around within your site, where relative
paths are obviously best.  Good to hear that you're using the
RequestDispatcher for this purpose now.

HTH,
-Jeff




Sullivan, Mark E

Mark.Sullivan@nav-internatTo: 'Tomcat Users
List' [EMAIL PROTECTED]
ional.com cc:

   Subject: RE:
RequestDispatcher forward versus response.sendRedirect
07/24/02 11:13 AM

Please respond to Tomcat

Users List







when you say response.sendRedirect doesn't work, what kind of
error/unexpected behavior are you getting?

-Original Message-
From: Jason Stortz [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 24, 2002 11:12 AM
To: Tomcat Users List
Subject: RequestDispatcher forward versus response.sendRedirect


Anyone have any hard and fast rules, good links, general info,
do and don't lists, or anything about these two?

We moved from iPlanet 4.1 where we did all redirection with
response.sendRedirect.  That didn't work with tomcat so I
started using the forward method of RequestDispatcher.  Well,
now I need to use a NON relative path to redirect the user
off our site.  While I think response.sendRedirect will work
in this instance I cannot seem to formulate a theory why it works
here and not in other parts of our site.

Does anyone have any information on this I can read, or advice?

Thanks!

Jason

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




Apache 2.0.39, Tomcat 4.1.8 (mod_jk2) on W2K

2002-07-24 Thread Short, Dave

The following steps, and attached files, were first posted by Mladen Turk.
I modified those steps slightly.  Actually, they didn't work completely
until I tried it with Tomcat 4.1.8.  I'm using JDK 1.3.1.


0. Install Java 1.3
1. Download jakarta-tomcat-4.1.8.exe from
http://jakarta.apache.org/builds/jakarta-tomcat-4.0/test/v4.1.8/bin/ and
install into c:\tomcat.
2. Set the TOMCAT_HOME (c:\tomcat) as system environment variable and
reboot.
3. Install Apache 2.0.39 into c:\apache2.
4. Download mod_jk2.dll from
http://jakarta.apache.org/builds/jakarta-tomcat-connectors/jk2/nightly/win32
/
5. Copy mod_jk2.dll to c:\apache2\modules.
6. Add the following line to the c:\apache2\conf\httpd.conf file:
LoadModule jk2_module  modules/mod_jk2.dll
7. Copy the attached workers2.proterties to c:\apache2\conf (change the
paths accordingly).
8. Copy the attached jk2.properties and to c:\tomcat\conf (change the paths
accordingly).
9. Run Apache (It will start the tomcat inprocess)
10. Report any bugs (will be appreciated)


 workers2.properties  jk2.properties 



workers2.properties
Description: Binary data


jk2.properties
Description: Binary data

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


Re: Apache 2.0.39 and Tomcat 4.1.8 Servlet issue

2002-07-24 Thread Chris McCabe

I ran into the same problem, and it appears to be related to the 
mod_webapp module.  I switched to using mod_jk and it now works.  I 
could not find any clues to what was causing the problem (exceptions, 
etc.) and searching the web only turned up others having the same 
problem with no solution.

Chris

Short, Dave wrote:

There is an issue with Apache 2.0.39 and Tomcat 4.1.8 (actually this issue
first appeared with Apache 2.0.36 and Tomcat 4.0.x).  It seems, if a servlet
returns content (dynamically built HTML for instance) which exceeds 8192 in
length, the content is truncated at 8192 and a blank page is rendered by
Apache.  Actually, Apache renders what was returned by Tomcat (8192 bytes of
the dynamically generated HTML page).  Basically, an incomplete HTML page -
hence it is displayed as blank.

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


  



-- 
Chris P. McCabe  - Senior Software Systems Architect
Choice Hotels International - Information Technology
[EMAIL PROTECTED]602-953-4416




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




RE: Apache 2.0.39 and Tomcat 4.1.8 Servlet issue

2002-07-24 Thread Short, Dave

I didn't notice exceptions in either the Apache2\logs or Tomcat\logs
directories.  How can I set the buffer to a larger size?

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: July 24, 2002 9:22 AM
To: Tomcat Users List
Subject: Re: Apache 2.0.39 and Tomcat 4.1.8 Servlet issue



Hi, Dave.

 Did you check your log files for exceptions?  I've seen behavior
similar
to what you're describing with Tomcat 4.0.x running Standalone.  What I've
seen is that it gets a full buffer's (defaults to 8K, like you're seeing,
but
can be set to different size) worth of content and displays it.  Then, it
runs
into a NullPointerException (or probably some other exception, but, usually
for me, it's a good ole NPE) while trying to generate the next buffer's
worth
of content.  At this point, the browser doesn't show an error page but just
stops with only the one buffer's worth of content displayed.  Maybe Apache
renders the page as blank, but I usually get the partially returned page, as
far as it can be rendered.  Besides the partial page, the only sign that
something went wrong is in the log.  I've been meaning to look into this to
see if it's a reported bug, but haven't yet.  Is this what you're running
into?

-Jeff



 

Short, Dave

dave.short@pTo: 'Tomcat Users List'
[EMAIL PROTECTED]
fizer.com   cc:

 Subject: Apache 2.0.39 and
Tomcat 4.1.8 Servlet issue 
07/24/02

10:59 AM

Please

respond to

Tomcat Users

List

 

 





There is an issue with Apache 2.0.39 and Tomcat 4.1.8 (actually this issue
first appeared with Apache 2.0.36 and Tomcat 4.0.x).  It seems, if a servlet
returns content (dynamically built HTML for instance) which exceeds 8192 in
length, the content is truncated at 8192 and a blank page is rendered by
Apache.  Actually, Apache renders what was returned by Tomcat (8192 bytes of
the dynamically generated HTML page).  Basically, an incomplete HTML page -
hence it is displayed as blank.

--
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[2]: Survey question for any Tomcat or Apache users out there

2002-07-24 Thread Rick Reumann



On Wednesday, July 24, 2002, 11:52:49 AM, Dave wrote:

SD Yesterday, I finally got Apache 2.0.39 and Tomcat 4.1.8 (mod_jk2)
SD to work on W2K.  Tomcat is started by the Apache service and
SD actually works in-process like the IIS/Tomcat redirector.  If
SD anyone in interested, I can post the configuration steps.

PLEASE! (I'll pay ya:)


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




Re[2]: Survey question for any Tomcat or Apache users out there

2002-07-24 Thread Rick Reumann



On Wednesday, July 24, 2002, 11:35:21 AM, John wrote:

TJ I took a quick look at the doc at the link you posted.  One thing I can say
TJ from experience: if you have any pathnames anywhere in your
TJ apache+mod_jk+tomcat config, get rid of them.  Don't use Program
TJ Files/Apache Group etc.  Use Apache/Apache and C:\tomcat, etc.  While
TJ the apache installer probably lets you specify paths with spaces, and
TJ probably even recommends them by default, and probably works with them, the
TJ Apache HTTP developers don't co-ordinate with anyone else.

I made sure none of my paths have spaces in them, but thanks for
the tip though.

--

Rick


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




RE: Apache 2.0.39 and Tomcat 4.1.8 Servlet issue

2002-07-24 Thread Short, Dave

I'm using mod_jk2...  

It seems to work somewhat consistently on IE 5.5 and VERY inconsistently on
Netscape 4.7x on my W2K professional laptop.  It works fine with IE 5.5 on
my W2K server tower, but not with Navigator 4.7x.  Strange.

-Original Message-
From: Chris McCabe [mailto:[EMAIL PROTECTED]]
Sent: July 24, 2002 10:06 AM
To: Tomcat Users List
Subject: Re: Apache 2.0.39 and Tomcat 4.1.8 Servlet issue


I ran into the same problem, and it appears to be related to the 
mod_webapp module.  I switched to using mod_jk and it now works.  I 
could not find any clues to what was causing the problem (exceptions, 
etc.) and searching the web only turned up others having the same 
problem with no solution.

Chris

Short, Dave wrote:

There is an issue with Apache 2.0.39 and Tomcat 4.1.8 (actually this issue
first appeared with Apache 2.0.36 and Tomcat 4.0.x).  It seems, if a
servlet
returns content (dynamically built HTML for instance) which exceeds 8192 in
length, the content is truncated at 8192 and a blank page is rendered by
Apache.  Actually, Apache renders what was returned by Tomcat (8192 bytes
of
the dynamically generated HTML page).  Basically, an incomplete HTML page -
hence it is displayed as blank.

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


  



-- 
Chris P. McCabe  - Senior Software Systems Architect
Choice Hotels International - Information Technology
[EMAIL PROTECTED]602-953-4416




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




Tomcat and PHP

2002-07-24 Thread Ken Sanderson

Is it possible to setup Tomcat to run PHP without using Apache, IIS, etc?

Ken

Miistakis Institute for the Rockies
c/o Faculty of Environmental Design
2500 University Drive NW
Calgary, Alberta
T2N 1N4

t 1 (403) 220-8968
  1 (403) 220-2573
w www.rockies.ca

facilitating ecosystem research  management in the Rocky Mountains

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




Bug?

2002-07-24 Thread Jean-francois Arcand

Hi Craig,

browsing the Tomcat code, I found something strange:

In org.apache.catalina.core.StandardHostDeployer, when method remove() 
get invoked, fireContainerEvent(REMOVE_EVENT) is never executed (does 
not appear in the code). I have also looked at StandardHost (but this 
class delegate the call to StandardHostDeployer). In order to implement 
JACC the way we discuss it yesterday, should 
the fireContainerEvent(REMOVE_EVENT) be invoked?

Thanks,

-- Jeanfrancois


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




Re: More flexible JDBCRealm implementation ? (for ASP-style webapp)

2002-07-24 Thread Will Hartung

From: Soefara Redzuan [EMAIL PROTECTED]
Sent: Tuesday, July 23, 2002 11:52 PM
Subject: Re: More flexible JDBCRealm implementation ? (for ASP-style webapp)


 Yes, but this adds complexity due to different table names for different
 clients. I like to keep things simple. So, I can do what you suggest
except
 with different databases (running on the same MySQL instance) for
 different customers and webapps. That's my current setup.

Yeah, that's basically what I was talking about.

 If you'd rather share the tables (for whatever reason), perhaps you could
 make views on a master table that's limited by the client id.

 I do prefer to share the tables. The reason is that you can easily set
 up new clients and customers without restarting Tomcat. Better yet, users
 can register and sign-up themselves, something that's not possible if I
 have to set up a different database for them, with its own JNDI resource
 configuration in server.xml

 These views would be placed in the appropriate client schemas and shadow
 the
 master table in a central schema. Something like CREATE VIEW
 CLIENT1.USERS(user_name, user_pass, user_goupid) AS SELECT user_name,
 user_pass, user-groupid FROM MASTER.USERS WHERE CLIENTID = 'CLIENT1'.

 I'll have to investigate this use of views. It's something I'd never
 considered before and looks very useful.

Many DBMS (again, I don't know about MySQL) will allow you to not only read
using these kinds of views, but also update the data through the view.

 Finally, if you look at
 $CATALINA_HOME/src/share/org/apache/cataline/realm/JDBCRealm.java, it
looks
 pretty darn simple to tweak that to do whatever you want, or, better, to
 subclass and change the relevant methods (not many from the looks of it).
 The only fear here is that the TC team can change JDBCRealm behind your
 back
 in a later release.

 I'd much rather avoid something this drastic. It would be better for me
 to write a filter and use custom authentication I believe.

 Stick the pertinent webapp specific entries into ENV-ENTRY, and you can
do
 all sorts of scary things I would think.

I'd really reconsider. If you look at the code for a JDBCRealm, it's APPEARS
really trivial.

Here you go. Inspired by the JDBCRealm class, it allows you to specify the
actual SQL you wish to use in the Database. Credential will return the
password, and roles will return the roles for the user. The single argument
for both SQLs will be the username.


ConfigurableJDBCRealm.java
-=-=-=-=-=-=-=-=-=-=-=-=-
package your.co.package;

import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.SQLException;
import javax.naming.InitialContext;
import javax.naming.NamingException;

public class CongigurableJDBCRealm
extends org.apache.catalina.realm.JDBCRealm {
/**
 * Return a PreparedStatement configured to perform the SELECT required
 * to retrieve user credentials for the specified username.
 *
 * @param dbConnection The database connection to be used
 * @param username Username for which credentials should be retrieved
 *
 * @exception SQLException if a database error occurs
 */

private String credentialsSQL = null;
private String rolesSQL = null;

protected PreparedStatement credentials(Connection dbConnection,
String username)
throws SQLException {

if (credentialsSQL == null) {
try {
InitialContext ctx = new InitialContext();
credentialsSQL =
(String)ctx.lookup(java:comp/env/realm.credentials);
}
catch(NamingException ne) {
// This string will come as a rude shock to the SQL
database, and
// throw and nasty SQLException.
credentialsSQL = Could not find realm.credentials;
}
}
if (preparedCredentials == null) {
preparedCredentials =
dbConnection.prepareStatement(credentialsSQL);
}

preparedCredentials.setString(1, username);
return (preparedCredentials);
}

/**
 * Return a PreparedStatement configured to perform the SELECT required
 * to retrieve user roles for the specified username.
 *
 * @param dbConnection The database connection to be used
 * @param username Username for which roles should be retrieved
 *
 * @exception SQLException if a database error occurs
 */
protected PreparedStatement roles(Connection dbConnection, String
username)
throws SQLException {


if (rolesSQL == null) {
try {
InitialContext ctx = new InitialContext();
rolesSQL = (String)ctx.lookup(java:comp/env/realm.roles);
}
catch(NamingException ne) {
// This string will come as a rude shock to the SQL
database, and
// throw a nasty SQLException.
rolesSQL = Could not find realm.roles;

Re: Is there any way to stop exceptions getting logged to log file?

2002-07-24 Thread Mark O'Driscoll

You're right. It is too late!


  I don't want to get involved in a programming practice debate BUT..
 

 Too late ... :-)

  The performance hit from exceptions occur because exceptions are thrown,
not
  in how they are handled. You cannot programatically avoid exceptions
with
  xhaustive checking that would itself hinder performance. Specifically
  potential SQL errors are punexceptionally/pun difficult to cater
for.
  (dropped connections, network problems, constraint violations)
.Exceptions
  are only thrown when something goes wrong. The point I was trying to
make
  was that exceptions are not only a sign of system failure, but one of
usage
  failure too.
 

 Because SQLException is a checked exception, you can't throw it directly
 from a servlet anyway, so your database accesses are already encapsulated
 in try/catch blocks.  You've already paid all the cost of checking
 already -- you actually have to deliberately rethrow it (wrapped in a
 ServletException) to allow your filter to see it.  Why go to all that
 extra work?

  Anyway, what I was trying to do was to implement a transaction  logging
  filter that determined if a particular database write operation had
worked.
  The code is simple and checks if a servlet/jsp has thrown an exception
to
  check for success/failure. If the servlet/jsp completes without throwing
an
  exception, I commit the transaction, otherwise I roll it back.
 

 This is not the way you should program database applications!  It is very
 very dangerous to depend on external logic to commit or roll back
 transactions for you.  If an exception happens, it should be logged and
 dealt with when it happens.
Disagree. That is just micro managing exceptions. Transactions are the
example of where a wrapper try/catch block around a series of SQL statements
is a much better way to do it than try/catching each one.

Also subsequent non database actions can cause a rollback.


 Database access logic should always catch its own exceptions, and
 commit or roll back the transaction appropriately.  In a web app, it is
 considered irresponsible programming for a servlet to leave an open
 database transaction after it returns from the service() method, for
 whatever reason that might happen.  To say nothing of returning the
 connection to the connection pool you got it from.
That is exactly what the filter will do for you. The transaction wrapup in
the filter will ALWAYS be called = less scope for errors.

  Is there some recognised way to pass servet/jsp error conditions to
filters?
  This would prevent me relying on exceptions (altho' exceptions would
have to
  be catered for too). I suppose I could use the request.getAttribte()?
 
  Are exceptions that are trapped in a filter 'seen' and handled by
Tomcat?
 

 Your problem is that Tomcat sees the exception thrown by the servlet
 before it is passed back to the filter.  That's where the logging is
 happening.  And that's not going to change (in the standard Tomcat
 release -- you're perfectly free to modify your own copy), because
 handling exceptions is not what filters are for.
Oh no it doesn't. Otherwise filters could not work. If you put doChain() in
a try catch block, you catch the exception that the jsp/servlet threw.

  TIA
 
  - Mark
 

 Craig


   I'll second what Craig has said and add that if your program
normally
   throws lots of exceptions, then you should look at some of your design
   decisions. Exceptions are wonderful when used for Exceptional
behavior,
   but not for normal runs. They are also REALLY slow. Exceptions can
kill
   your performance, and if you are getting them regularly, you should
catch
   the ones you can safely ignore as early as possible and toss them
away
  as
   appropriate, or even better, not throw them at all.
  
   Regards,
  
   Will Hartung
   ([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: Is there any way to stop exceptions getting logged to log file?

2002-07-24 Thread Will Hartung

From: Mark O'Driscoll [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Subject: Re: Is there any way to stop exceptions getting logged to log file?


 The performance hit from exceptions occur because exceptions are thrown,
not
 in how they are handled. You cannot programatically avoid exceptions with
 xhaustive checking that would itself hinder performance. Specifically
 potential SQL errors are punexceptionally/pun difficult to cater for.
 (dropped connections, network problems, constraint violations) .Exceptions
 are only thrown when something goes wrong. The point I was trying to make
 was that exceptions are not only a sign of system failure, but one of
usage
 failure too.

Yes, which means that if you can trivially check your parameters before
calling a routine that will throw an exception because of those parameters,
it is cheaper than letting the routine throw the exception and then catch
it.

 Anyway, what I was trying to do was to implement a transaction  logging
 filter that determined if a particular database write operation had
worked.
 The code is simple and checks if a servlet/jsp has thrown an exception to
 check for success/failure. If the servlet/jsp completes without throwing
an
 exception, I commit the transaction, otherwise I roll it back.

To be really blunt, this is exactly the behavior tha the J2EE servers gives
you. The EJBs can be transaction ignorant and the overall transaction will
be committed/rolledback as appropriate.

The key here, though, is most of these exceptions shouldn't be logical
exceptions (particularly if there are a lot of them), but rather physical
exceptions (database full, integrity check error). Exceptions for
circumstances that are basically out of your control.

As a simple example, we have found, at least with a J2EE environment, that
it would be cheaper to, say, check that a user didn't exist in a DB with
simple SQL rather than insert a row dependant on that user and throw the
foreign key exception back. Much better performance.

Regards,

Will Hartung
([EMAIL PROTECTED])




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




RE: Apache 2.0.39 and Tomcat 4.1.8 Servlet issue

2002-07-24 Thread jeff . guttadauro


Hmm...no exceptions - I guess this is a different problem than what I've run
into then.  Sorry I couldn't help.  Good luck with your troubleshooting.

To change buffer size, you can use the JSP directive: %@ page buffer=16kb
%
or, I believe you can set it on the response with setBufferSize( bufferSize )
...not sure what unit the parameter value represents off the top of my head
though - would have to check API.

-Jeff



   

Short, Dave  

dave.short@pTo: 'Tomcat Users List' 
[EMAIL PROTECTED]
fizer.com   cc:   

 Subject: RE: Apache 2.0.39 and Tomcat 
4.1.8 Servlet issue 
07/24/02   

12:07 PM   

Please 

respond to 

Tomcat Users  

List  

   

   





I didn't notice exceptions in either the Apache2\logs or Tomcat\logs
directories.  How can I set the buffer to a larger size?

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: July 24, 2002 9:22 AM
To: Tomcat Users List
Subject: Re: Apache 2.0.39 and Tomcat 4.1.8 Servlet issue



Hi, Dave.

 Did you check your log files for exceptions?  I've seen behavior
similar
to what you're describing with Tomcat 4.0.x running Standalone.  What I've
seen is that it gets a full buffer's (defaults to 8K, like you're seeing,
but
can be set to different size) worth of content and displays it.  Then, it
runs
into a NullPointerException (or probably some other exception, but, usually
for me, it's a good ole NPE) while trying to generate the next buffer's
worth
of content.  At this point, the browser doesn't show an error page but just
stops with only the one buffer's worth of content displayed.  Maybe Apache
renders the page as blank, but I usually get the partially returned page, as
far as it can be rendered.  Besides the partial page, the only sign that
something went wrong is in the log.  I've been meaning to look into this to
see if it's a reported bug, but haven't yet.  Is this what you're running
into?

-Jeff





Short, Dave

dave.short@pTo: 'Tomcat Users List'
[EMAIL PROTECTED]
fizer.com   cc:

 Subject: Apache 2.0.39 and
Tomcat 4.1.8 Servlet issue
07/24/02

10:59 AM

Please

respond to

Tomcat Users

List









There is an issue with Apache 2.0.39 and Tomcat 4.1.8 (actually this issue
first appeared with Apache 2.0.36 and Tomcat 4.0.x).  It seems, if a servlet
returns content (dynamically built HTML for instance) which exceeds 8192 in
length, the content is truncated at 8192 and a blank page is rendered by
Apache.  Actually, Apache renders what was returned by Tomcat (8192 bytes of
the dynamically generated HTML page).  Basically, an incomplete HTML page -
hence it is displayed as blank.

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




[Answer to]: JSPs in Tomcat 4.0.x: NoSuchMethodException in TldLocationsCache

2002-07-24 Thread Eduardo Perez-Hickman

Hi all,

After struggling a bit with Tomcat 4.0.x (It took
enough time to try w/ 4.0.1, 4.0.3 and 4.0.4), I think
I've got the ANSWER to the infamous
NoSuchMethodException thrown in TldLocationsCache when
you try to run jsps in Tomcat 4.

I'd like to apologize if this is old news, but
browsing the forums (even there are postings in the
Bugzilla list) I think people are still clueless
(either that or they find out and then shut up).

The problem has nothing to do with the SDK version or
the Tomcat installation or version. (These seem to be
the most popular hypothesis I've seen).

The problem is the version of the servlet.jar library.
If we take a look at the code for the method
processJars () at class TldLocationsCache (the
apparent culprit of the exception) we'll see the line:

 Set libSet = ctxt.getResourcePaths(/WEB-INF/lib);

Where ctxt is a reference to an object implementing
javax.servlet.ServletContext.

(The rest of lines in the method are innocent enough
to cause trouble)

The method Set getResourcePaths (String path) is new
in the servlet 2.3 spec and therefore is missing from
previous releases. This is the key!!

If you download the current servlet spec jar (or zip
file as Sun has it at java.sun.com) and place it on
your classpath BEFORE (or even better replacing) any
reference to olders servlet.jar files, that should do
the trick (At least it did it for me :)

Now, I think I've got it running nicely. (I hope it
lasts!)

I hope this helps,

Eduardo


__
Do You Yahoo!?
Yahoo! Health - Feel better, live better
http://health.yahoo.com

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




JNI header problem - Java install

2002-07-24 Thread Billingham, Walter 475

Hello,
  I receive an error when I try and compile mod_jk.so, which leads me to
need knowledge of if, a standard 130 or 131 JRE not JDK install has the JNI
libraries present, can anyone confirm or deny this fact?  Also, I installed
from Sun JDK 131 standard, I am not finding a JAVA_HOME/include directory
present, so can someone tell me what .jar file or what path the JNI,
specifically, jni_md.h or jni.h can be found?  Thanks. Walt B.  



--
CONFIDENTIALITY NOTICE: If you have received this e-mail in error, please immediately 
notify the sender by e-mail at the address shown.  This e-mail transmission may 
contain confidential information.  This information is intended only for the use of 
the individual(s) or entity to whom it is intended even if addressed incorrectly.  
Please delete it from your files if you are not the intended recipient.  Thank you for 
your compliance. Copyright (c) 2002 CIGNA




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




Unix command from jsp does not work

2002-07-24 Thread Roman Mikhailov

Hello everybody

I'm trying to execute a unix command from within the jsp page, smth like

Process p = Runtime.getRuntime().exec(new String[]{/bin/sh,-c,ls -l 
dat.foo});

.. And it doesn't work, I mean nothing happens , no error messages, nothing


However this piece of code works fine in a standalone Java program
What am I doing wrong?

My system: Linux Red Hat 7.2, Apache 1.3.22, Tomcat 4.0.3, WARP Connector

Thanks in advance

roman



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




How to abort the webapp load/deployment

2002-07-24 Thread Extance, Paul

Hello,

Is it possible to write a 'validation' servlet, that does some basic checks,
which if fail, cause the whole web application to be unavailable?

This servlet would be flagged as load-on-startup such that it was the
first one to execute.

I'm trying to achive something similar to JBoss 2.x where if the verifier
fails for an EAR, it does not deploy it at all. I want the similar concept
but for my Web Application, such that critical initialization errors make
the the whole application unavailable.

I can't find anythingin in the Java Servlet Spec to indicate that this is
possible, or anything in the tomcat documenation.

Thoughts?

Thanks 

PaulE

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




Re[2]: Apache 2.0.39 and Tomcat 4.1.8 Servlet issue

2002-07-24 Thread Jacob Kjome

Hello Dave,

Yeah, I've noticed the same thing with Mozilla (latest nightly build).
It think mod_jk2 is doing something wrong with the http headers.  IE
tends to be really lax in enforcing various specs which is why you
always hear complaints saying but it works in IE thinking it is
Netscape's fault for not doing it right when, in fact, Netscape is
doing things propery and IE is just ignoring bad syntax.

Either way, something is not quite right with mod_jk2 and http1.1

Jake

Wednesday, July 24, 2002, 12:11:59 PM, you wrote:

SD I'm using mod_jk2...  

SD It seems to work somewhat consistently on IE 5.5 and VERY inconsistently on
SD Netscape 4.7x on my W2K professional laptop.  It works fine with IE 5.5 on
SD my W2K server tower, but not with Navigator 4.7x.  Strange.

SD -Original Message-
SD From: Chris McCabe [mailto:[EMAIL PROTECTED]]
SD Sent: July 24, 2002 10:06 AM
SD To: Tomcat Users List
SD Subject: Re: Apache 2.0.39 and Tomcat 4.1.8 Servlet issue


SD I ran into the same problem, and it appears to be related to the 
SD mod_webapp module.  I switched to using mod_jk and it now works.  I 
SD could not find any clues to what was causing the problem (exceptions, 
SD etc.) and searching the web only turned up others having the same 
SD problem with no solution.

SD Chris

SD Short, Dave wrote:

There is an issue with Apache 2.0.39 and Tomcat 4.1.8 (actually this issue
first appeared with Apache 2.0.36 and Tomcat 4.0.x).  It seems, if a
SD servlet
returns content (dynamically built HTML for instance) which exceeds 8192 in
length, the content is truncated at 8192 and a blank page is rendered by
Apache.  Actually, Apache renders what was returned by Tomcat (8192 bytes
SD of
the dynamically generated HTML page).  Basically, an incomplete HTML page -
hence it is displayed as blank.

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


  






-- 
Best regards,
 Jacobmailto:[EMAIL PROTECTED]


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




RE: Re[2]: Apache 2.0.39 and Tomcat 4.1.8 Servlet issue

2002-07-24 Thread Short, Dave

Perhaps one of the mod_jk2 developers could comment?

-Original Message-
From: Jacob Kjome [mailto:[EMAIL PROTECTED]]
Sent: July 24, 2002 12:15 PM
To: Tomcat Users List
Subject: Re[2]: Apache 2.0.39 and Tomcat 4.1.8 Servlet issue


Hello Dave,

Yeah, I've noticed the same thing with Mozilla (latest nightly build).
It think mod_jk2 is doing something wrong with the http headers.  IE
tends to be really lax in enforcing various specs which is why you
always hear complaints saying but it works in IE thinking it is
Netscape's fault for not doing it right when, in fact, Netscape is
doing things propery and IE is just ignoring bad syntax.

Either way, something is not quite right with mod_jk2 and http1.1

Jake

Wednesday, July 24, 2002, 12:11:59 PM, you wrote:

SD I'm using mod_jk2...  

SD It seems to work somewhat consistently on IE 5.5 and VERY inconsistently
on
SD Netscape 4.7x on my W2K professional laptop.  It works fine with IE 5.5
on
SD my W2K server tower, but not with Navigator 4.7x.  Strange.

SD -Original Message-
SD From: Chris McCabe [mailto:[EMAIL PROTECTED]]
SD Sent: July 24, 2002 10:06 AM
SD To: Tomcat Users List
SD Subject: Re: Apache 2.0.39 and Tomcat 4.1.8 Servlet issue


SD I ran into the same problem, and it appears to be related to the 
SD mod_webapp module.  I switched to using mod_jk and it now works.  I 
SD could not find any clues to what was causing the problem (exceptions, 
SD etc.) and searching the web only turned up others having the same 
SD problem with no solution.

SD Chris

SD Short, Dave wrote:

There is an issue with Apache 2.0.39 and Tomcat 4.1.8 (actually this issue
first appeared with Apache 2.0.36 and Tomcat 4.0.x).  It seems, if a
SD servlet
returns content (dynamically built HTML for instance) which exceeds 8192
in
length, the content is truncated at 8192 and a blank page is rendered by
Apache.  Actually, Apache renders what was returned by Tomcat (8192 bytes
SD of
the dynamically generated HTML page).  Basically, an incomplete HTML page
-
hence it is displayed as blank.

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


  






-- 
Best regards,
 Jacobmailto:[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: Unix command from jsp does not work

2002-07-24 Thread Will Hartung

From: Roman Mikhailov [EMAIL PROTECTED]
Sent: Wednesday, July 24, 2002 11:34 AM
Subject: Unix command from jsp does not work


 I'm trying to execute a unix command from within the jsp page, smth like

 Process p = Runtime.getRuntime().exec(new String[]{/bin/sh,-c,ls -l 
 dat.foo});

 .. And it doesn't work, I mean nothing happens , no error messages,
nothing

Well, if the ls -l happens to not find the file foo.dat, then it's proper
result would be to, essentially, do nothing. So, perhaps it actually is
working, and the file you're running 'ls' on isn't there?

P.S. just an FYI, but you do realize that the java.io.File object does
pretty much what 'ls' will do for you, right? Plus, it's portable...

Regards,

Will Hartung
([EMAIL PROTECTED])




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




Change JDK version for tomcat4.0.4

2002-07-24 Thread Ashish Kulkarni

Hi,

I am running tomcat4.0.4 on my windows 2000 server,
I had jdk1.3.1 when i installed it and is running
fine, but now i want to use jdk1.4.1 , so how can i
upgrade tomcat to use jdk1.4 instead of jdk1.3.1
without installing it again

Ashish

__
Do You Yahoo!?
Yahoo! Health - Feel better, live better
http://health.yahoo.com

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




Re: How to abort the webapp load/deployment

2002-07-24 Thread Craig R. McClanahan



On Wed, 24 Jul 2002, Extance, Paul wrote:

 Date: Wed, 24 Jul 2002 12:12:54 -0700
 From: Extance, Paul [EMAIL PROTECTED]
 Reply-To: Tomcat Users List [EMAIL PROTECTED]
 To: '[EMAIL PROTECTED]' [EMAIL PROTECTED]
 Subject: How to abort the webapp load/deployment

 Hello,

 Is it possible to write a 'validation' servlet, that does some basic checks,
 which if fail, cause the whole web application to be unavailable?


You can accomplish this for a particular servlet by throwing an exception
from the init() method, but there is no portable mechanism to do this for
an entire webapp.

Conceptually, throwing an exception from a configured listener class (like
a ServletContextListener.contextStarted() method) would make sense.  More
formal definition of the semantics of this is under discussion for Servlet
2.4.

 This servlet would be flagged as load-on-startup such that it was the
 first one to execute.

 I'm trying to achive something similar to JBoss 2.x where if the verifier
 fails for an EAR, it does not deploy it at all. I want the similar concept
 but for my Web Application, such that critical initialization errors make
 the the whole application unavailable.

 I can't find anythingin in the Java Servlet Spec to indicate that this is
 possible, or anything in the tomcat documenation.


In Tomcat 4.0.x and 4.1.x, throwing an exception from contextStarted()
will indeed abort the deployment of that webapp, but this is Tomcat
specific.

 Thoughts?

 Thanks

 PaulE


Craig


 --
 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: Change JDK version for tomcat4.0.4

2002-07-24 Thread rsequeira


set JAVA_HOME to point to new JDK install directory.

RS




Ashish Kulkarni [EMAIL PROTECTED] on 07/24/2002 02:58:11 PM

Please respond to Tomcat Users List [EMAIL PROTECTED]

To:Tomcat Users List [EMAIL PROTECTED]
cc:

Subject:Change JDK version for tomcat4.0.4

Hi,

I am running tomcat4.0.4 on my windows 2000 server,
I had jdk1.3.1 when i installed it and is running
fine, but now i want to use jdk1.4.1 , so how can i
upgrade tomcat to use jdk1.4 instead of jdk1.3.1
without installing it again

Ashish

__
Do You Yahoo!?
Yahoo! Health - Feel better, live better
http://health.yahoo.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: Re[2]: Apache 2.0.39 and Tomcat 4.1.8 Servlet issue

2002-07-24 Thread Ignacio J. Ortega

I'm little out if this thread, could anyone give detaails about the test
case, maybe attaching it to an ad hoc bug in bugzilla, thanks

I'll take a look on this, if i can reproduce it..

Saludos ,
Ignacio J. Ortega


 -Mensaje original-
 De: Short, Dave [mailto:[EMAIL PROTECTED]]
 Enviado el: 24 de julio de 2002 21:21
 Para: 'Tomcat Users List'
 Asunto: RE: Re[2]: Apache 2.0.39 and Tomcat 4.1.8 Servlet issue
 
 
 Perhaps one of the mod_jk2 developers could comment?
 
 -Original Message-
 From: Jacob Kjome [mailto:[EMAIL PROTECTED]]
 Sent: July 24, 2002 12:15 PM
 To: Tomcat Users List
 Subject: Re[2]: Apache 2.0.39 and Tomcat 4.1.8 Servlet issue
 
 
 Hello Dave,
 
 Yeah, I've noticed the same thing with Mozilla (latest nightly build).
 It think mod_jk2 is doing something wrong with the http headers.  IE
 tends to be really lax in enforcing various specs which is why you
 always hear complaints saying but it works in IE thinking it is
 Netscape's fault for not doing it right when, in fact, Netscape is
 doing things propery and IE is just ignoring bad syntax.
 
 Either way, something is not quite right with mod_jk2 and http1.1
 
 Jake
 
 Wednesday, July 24, 2002, 12:11:59 PM, you wrote:
 
 SD I'm using mod_jk2...  
 
 SD It seems to work somewhat consistently on IE 5.5 and VERY 
 inconsistently
 on
 SD Netscape 4.7x on my W2K professional laptop.  It works 
 fine with IE 5.5
 on
 SD my W2K server tower, but not with Navigator 4.7x.  Strange.
 
 SD -Original Message-
 SD From: Chris McCabe [mailto:[EMAIL PROTECTED]]
 SD Sent: July 24, 2002 10:06 AM
 SD To: Tomcat Users List
 SD Subject: Re: Apache 2.0.39 and Tomcat 4.1.8 Servlet issue
 
 
 SD I ran into the same problem, and it appears to be related to the 
 SD mod_webapp module.  I switched to using mod_jk and it now 
 works.  I 
 SD could not find any clues to what was causing the problem 
 (exceptions, 
 SD etc.) and searching the web only turned up others having the same 
 SD problem with no solution.
 
 SD Chris
 
 SD Short, Dave wrote:
 
 There is an issue with Apache 2.0.39 and Tomcat 4.1.8 
 (actually this issue
 first appeared with Apache 2.0.36 and Tomcat 4.0.x).  It seems, if a
 SD servlet
 returns content (dynamically built HTML for instance) which 
 exceeds 8192
 in
 length, the content is truncated at 8192 and a blank page 
 is rendered by
 Apache.  Actually, Apache renders what was returned by 
 Tomcat (8192 bytes
 SD of
 the dynamically generated HTML page).  Basically, an 
 incomplete HTML page
 -
 hence it is displayed as blank.
 
 --
 To unsubscribe, e-mail:
 SD mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
 SD mailto:[EMAIL PROTECTED]
 
 
   
 
 
 
 
 
 
 -- 
 Best regards,
  Jacobmailto:[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 abort the webapp load/deployment

2002-07-24 Thread Mike Jackson

You could uild a MVC app where there are no page accesses
that don't pass through the controller (i.e. index.form and
form is mapped to a servlet which does a requestDispatcher
to index.html or index.jsp).  Have the controller only pass
people through if the validation has occured successfully.

If this is greek I can give you a better example.

--mikej
-=-
mike jackson
[EMAIL PROTECTED]

-Original Message-
From: Extance, Paul [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 24, 2002 12:13 PM
To: '[EMAIL PROTECTED]'
Subject: How to abort the webapp load/deployment


Hello,

Is it possible to write a 'validation' servlet, that does some basic checks,
which if fail, cause the whole web application to be unavailable?

This servlet would be flagged as load-on-startup such that it was the
first one to execute.

I'm trying to achive something similar to JBoss 2.x where if the verifier
fails for an EAR, it does not deploy it at all. I want the similar concept
but for my Web Application, such that critical initialization errors make
the the whole application unavailable.

I can't find anythingin in the Java Servlet Spec to indicate that this is
possible, or anything in the tomcat documenation.

Thoughts?

Thanks

PaulE

--
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: Unix command from jsp does not work

2002-07-24 Thread Roman Mikhailov

On 7/24/02 1:12 PM, Will Hartung [EMAIL PROTECTED] wrote:

 From: Roman Mikhailov [EMAIL PROTECTED]
 Sent: Wednesday, July 24, 2002 11:34 AM
 Subject: Unix command from jsp does not work
 
 
 I'm trying to execute a unix command from within the jsp page, smth like
 
 Process p = Runtime.getRuntime().exec(new String[]{/bin/sh,-c,ls -l 
 dat.foo});
 
 .. And it doesn't work, I mean nothing happens , no error messages,
 nothing
 
 Well, if the ls -l happens to not find the file foo.dat, then it's proper
 result would be to, essentially, do nothing. So, perhaps it actually is
 working, and the file you're running 'ls' on isn't there?
 
 P.S. just an FYI, but you do realize that the java.io.File object does
 pretty much what 'ls' will do for you, right? Plus, it's portable...
 
 Regards,
 
 Will Hartung
 ([EMAIL PROTECTED])
 
 
 
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]

ls -l  foo.dat was just an example
My task is to envoke a perl script from jsp which looks like this:
 Process p = Runtime.getRuntime().exec(new String[]{/bin/sh,-c,echo
[EMAIL PROTECTED] | /root/bin/bulkmakemail});
For some reason I'm not able to run ANY unix commands from jsp
Can it be because of user privileges , do I have to run tomcat as root?
I know it is dangerous
Or is there any other way  I can fix this problem?

Thank you

roman



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




JBoss_Tomcat: No Context configured to process this request

2002-07-24 Thread Josh Landin

Version: jboss-3.0.0_tomcat-4.0.3
OS: Redhat 7.2, 2.4.7-10

I'm moving my existing Apache-based web server over to a Jboss/Tomcat
combination. I need to set it up to vhost 3 domains. The JBoss/Tomcat
installation is an out-of-the-box binary. I added three entries to the
catalina/conf/server.xml (as I have done in the past for vhosting on a
Tomcat-only server) like this:
Host name=domain1 Context path= docBase=webapps/domain1//Host

But this is inside the Tomcat-standalone Service tag. Do I need to
configure a different Service tag for a JBoss/Tomcat setup? After the
install, I ran $JBOSS_HOME/bin/run.sh and it seemed to invoke all of the
JBoss and Tomcat stuff fine. I can hit the server remotely but I get HTTP
Status 500 - No Context configured to process this request. I deployed a
test servlet using ant to $JBOSS_HOME/server/default/deploy and JBoss picked
it up and hot deployed it, no problem. I have static content for two of the
domains to-be-hosted that I would like the default servlet to handle as it
would in a typical Tomcat install.

So,
(1) How can I setup Jboss/Tomcat to vhost the three domains?
(2) How can I get rid of the No Context messages?
(3) How can I setup static content (HTML files) to be delivered in a
JBoss/Tomcat scenario?

Thanks in advance,
--
Josh Landin


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




RE: Problm. building tomcat 4.0.4 jk connector for use with Apache 2.0.39. JDK 1.4.x?

2002-07-24 Thread Ola Theander

Hi Shanmugampl.

Thanks for your answer. I've had some progress since my last mail. I can
now compile the part of the mod_jk connector that ANT is responsible
for, i.e. the jar files. The problem was that servlet.jar was missing in
the CLASSPATH. But now I have a new problem, according to the
documentation I've found, after building the jar files with ant, I
should run ant install. The problem is that ant then complains Target
'install' does not exist in this projekt. Any idea why this is the
case?

Kind regards, Ola

 -Original Message-
 From: shanmugampl [mailto:[EMAIL PROTECTED]]
 Sent: den 24 juli 2002 06:10
 To: Tomcat Users List
 Subject: Re: Problm. building tomcat 4.0.4 jk connector for 
 use with Apache 2.0.39. JDK 1.4.x?
 
 
 I have integrated Apache2.0.39 and Tomcat4.0.4 using mod_jk.
 I followed 
 these steps for generating mod_jk.so
 
 1. Took the source available at
 
 http://jakarta.apache.org/builds/jakarta-tomcat-4.0/release/v4
 .0.4/src/jakarta-tomcat-connectors-4.0.4-src.tar.gz
 
 2. Move to the Install Dir/jk/native directory and run the
 buildconf.sh. This will create the configure file
 3. Run this file by specifying the -with-apxs option. Point 
 this to your 
 apache 2.0.39 apxs.
 4. execute the commands make and make install.
 5. You will find the mod_jk.so file created in the Install 
 Dir/jk/native/apache-2.0 directory.
 
 Hope this helps.
 
 Thanks
 Shanmugam.PL
 
 eric wrote:
 
 Ola,
 
 I get the same result only it's mod_jk.c not compatable with this
 version of
 Apache.
 
 I'm trying to get Apache 2.0.39 and Tomcat 4.0.4 to work.
 
 If you get it to work please post how you did it here.
 
 Good luck!
 
 Eric
 
 
 On Monday 22 July 2002 23:16, Ola Theander wrote:
   
 
 Dear subscribers.
 
 I have a problem building the 4.0.4 JK connector so I can
 integrate my
 Tomcat installation with Apache 2. I've tested the webapp connector
 with Apache 2.0.36 but since I upgraded to 2.0.39 I get the now 
 infamous message mod_dev.c not compatible with 
 Therefore I like
 to switch to the JK connector and I also hope that the JK connector
 will work with Apache 2.0.39. There are also other reasons 
 why I will
 change to the jk connector. I've learned to understand that
 it's much
 more mature and the webapp connector doesn't have any real
 advantages.
 
 The problem is that the build process chokes since it not
 able to find
 the javax.servlets.* packages. I don't know if this is
 because I use
 JDK 1.4.0 or some kind of configuration error. I've started with
 changing the build.properties file in the jk library. But 
 after trying
 to build with Ant I figured that some helper files was
 needed before
 the build could succeed. It complained about not finding some
 tomcat-coyote.jar file to copy, so I started the build from the 
 connector's source root folder and then it stopped when it 
 failed to
 find the javax.servlets.* packages mentioned above. Am I totally on
 the wrong track here? There where also a few messages after the 
 Package javax.servlets does not exist complaining about 
 deprecated
 methods in the javax.servlets package but that might perhaps be an
 inherited problem?
 
 Any help on this matter would be greatly appreciated.
 
 Kind regards, Ola Theander
 
 
 
 
 --
 To unsubscribe, e-mail:   
 mailto:tomcat-user- [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]




Inquiry on JSP Loading

2002-07-24 Thread Daniel Beng Lee Yap

** High Priority **

Hi,

  I'm from an audit department working for a local bank in Singapore. I am currently 
researching on the benefits of using JSP for developing my department website but 
encounters several problems. 

  I've been following very closely on every documentations in regards to the setting 
up of Tomcat server as well as JSDK and JRE. I've managed to get the Apache Tomcat 
server up and running at the localhost port 8080 after modifying catalina.sh. However, 
when I try to connect my sample JSP page to mySQL database to retrieve data, there is 
always a connection timeout error.

  I thought that it might be some class loading error and I downloaded mm.mysql driver 
and unjar it to /usr/local/jsdk1.4.4/lib and declare the class path in setclasspath.sh 
under the Catalina home directory. 

Are you able to advise me on how to properly configure the class path and advise on 
the timeout error ?

Thanks a million !!

Daniel Yap

Regards,
Daniel



CONFIDENTIAL NOTE: The information contained in this email is intended only
for the use of the individual or entity named above and may contain
information that is privileged, confidential and exempt from disclosure under
applicable law. If the reader of this message is not the intended recipient,
you are hereby notified that any dissemination, distribution or copying of
this communication is strictly prohibited. If you have received this message
in error, please immediately notify the sender and delete the mail. Thank you.


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




Problem in running NT service using Tomcat.

2002-07-24 Thread Arun Natesan

Hello,
I've installed Tomcat 4.0.1 in my system that runs on Windows 2000.I tried to 
use the NT services and downloaded the file tcntiis.zip and followed the instructions 
as given in the setup page.But when i run the commandjk_nt service -s tomcat from 
the command prompt I get the message that Tomcat failed to start.Please help me in 
identifying the problem soon.Thanks a lot.

M Arun Natesan
Infosys Technologies Limited
Telstra - APAC
Off : 91-80-8520261 Extn:51525
Per: 91-98452-96824


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




SOAP

2002-07-24 Thread Sudhir Kumar


I ahve a VB client server aplication running on my machine. Now i need to
communicate with a similar VB application running on a remote machine. Can i
use SOAP to achive this. if yes, is there any code change required in the
existing one??
Any other better ways of achiving this?? Any help in this regard will be
appreciated..

Thanks in advance..
Sudhir


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




Hardening Tomcat 3.2.4

2002-07-24 Thread Patel, Rajni M

I have tomcat installed and running on a Windows NT 4.0 SP6a box and need to
harden the installation.

The things that I have thought about and I can do is:

1) Change the HTTP port in server.xml file from default value of 8080.
2) Remove the TOMCAT_HOME\examples directory
3) Remove the weapp\admin directory
4) Utilise a Firewall and restrict access to the NT box to IP Domain.

Is there anything else that I could do, like modify the tomcat.policy file,
but I'm a little unsure of what else needs to be done.

Thanks in advance for your help.

Rajni





 This message contains information that may be privileged or confidential and 
is the property of the Cap Gemini Ernst  Young Group. It is intended only for 
the person to whom it is addressed. If you are not the intended recipient, you 
are not authorized to read, print, retain, copy, disseminate, distribute, or use 
this message or any part thereof. If you receive this message in error, please 
notify the sender immediately and delete all copies of this message .



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




Tomcat 4.1.7 admin appliaction problem

2002-07-24 Thread james petersen

Hi all

I have just installed Tomcat 4.1.7 on a machine running Win 2000 Profession 
ed

Everything seems to work fine except the Tomcat admin application

In other words, clicking through the Tomcat default homepage
(http://localhost:8080/admin)

I get the following 500 error:

org.apache.jasper.JasperException: Missing message for key.application.title
...

I suspect this has something to do with the struts config files associated 
with this this application

Any clues would be greatly appreciated

rgds James Petersen




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


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




Doubt

2002-07-24 Thread Dinesh Ramasamy

Hi ,

i installed the binary distribution of Tomcat  and unzipped the 
file and
put kept it in D:\jakarta-Tomcat4.0.4.However  when i start the 
startup.bat file in bin
dir  and type the the URL  http://localhost:8080   it takes  a 
very long process  and atlas
i am not able to view the home page .

If  would welcome if anybody knows how to solve this  problem and 
let me know.

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




JNDI Setup Question: Cannot create resource instance

2002-07-24 Thread Chaughtai, Atif (NHLBI)

 Hello, 
   I am having problem setting up JNDI resources with Tomcat 4.0.4 .
 I am using MS SQL Server.  I have read and followed the howTo tutorial but
 i keep on getting this exception:
 
 javax.naming.NamingException: Cannot create resource instance
 at
 org.apache.naming.factory.ResourceFactory.getObjectInstance(ResourceF
 actory.java:167)
 at
 javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:3
 11)
 at org.apache.naming.NamingContext.lookup(NamingContext.java:835)
 at org.apache.naming.NamingContext.lookup(NamingContext.java:181)
 at org.apache.naming.NamingContext.lookup(NamingContext.java:822)
 at org.apache.naming.NamingContext.lookup(NamingContext.java:194)
 at
 gov.nih.nhlbi.training.servlet.DisplayMechanism.handleRequest(Display
 Mechanism.java:44)
 
 My server.xml has following entry:
 Context path=/training docBase=training debug=0
  reloadable=true crossContext=true
   !-- JNDI SETUP --
   
   Resource name=jdbc/SQLServer auth=Container
 type=javax.sql.DataSource/ 
   
   ResourceParams name=jdbc/SQLServer
 parameter
   namefactory/name
   valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
 /parameter
 parameter
   namedriverClassName/name
   valuecom.inet.tds.TdsDriver/value
 /parameter
 parameter
   nameurl/name
   valuejdbc:inetdae7: testdatabase.somemachine.com
 ?database=training/value
 /parameter
 parameter
   nameusername/name
   value  username /value
 /parameter
 parameter
   namepassword/name
   value  password /value
 /parameter
 parameter
   namemaxActive/name
   value20/value
 /parameter
 parameter
   namemaxIdle/name
   value10/value
 /parameter
 parameter
   namemaxWait/name
   value-1/value
 /parameter
   /ResourceParams
   
   /Context
 
 
 Application web.xml has following entry:
 !--JNDI SETUP --
  resource-ref
descriptionSQLServer Datasource example/description
res-ref-namejdbc/SQLServer/res-ref-name
res-typejavax.sql.DataSource/res-type
res-authContainer/res-auth
  /resource-ref 
 
 
 And finally this is java code i am using to get the datasource
 
   javax.naming.Context initContext = new InitialContext();
 javax.naming.Context envContext  =
 (javax.naming.Context)initContext.lookup(java:comp/env);
 
 DataSource ds =
 (DataSource)envContext.lookup(jdbc/SQLServer);
 Connection connection = ds.getConnection();
 
 Do you see anything wrong with all this? Any help will be appreciated.
 Thanks in advance.

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




RE: Problem in running NT service using Tomcat.

2002-07-24 Thread Nelson, Tracy (ETW)

I just installed Tomcat 4.0.4 on a Win2K box and didn't have to do anything
to set up the service.  It was installed as part of the setup.  Check in the
services control panel for Apache Tomcat.

HTH,
-- Tracy

-Original Message-
From: Arun Natesan [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 23, 2002 02:00
To: [EMAIL PROTECTED]
Subject: Problem in running NT service using Tomcat.


Hello,
I've installed Tomcat 4.0.1 in my system that runs on Windows 2000.I
tried to use the NT services and downloaded the file tcntiis.zip and
followed the instructions as given in the setup page.But when i run the
commandjk_nt service -s tomcat from the command prompt I get the message
that Tomcat failed to start.Please help me in identifying the problem
soon.Thanks a lot.

M Arun Natesan
Infosys Technologies Limited
Telstra - APAC
Off : 91-80-8520261 Extn:51525
Per: 91-98452-96824


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




Cannot compile CoyoteServerSocketFactory - overridden method does not throw java.security.KeyManagementException

2002-07-24 Thread August Detlefsen

Has anyone ever seen this error before? I am trying to build the latest
version of the connectors and I run into this error when trying to
compile: 

[javac]
/root/dl/jakarta-tomcat-connectors-4.0.4-src/coyote/src/java/org/apache/coyote/tomcat4/CoyoteServerSocketFactory.java:102:
createSocket(int,int,java.net.InetAddress) in
org.apache.coyote.tomcat4.CoyoteServerSocketFactory cannot implement
createSocket(int,int,java.net.InetAddress) in
org.apache.catalina.net.ServerSocketFactory; overridden method does not
throw java.security.KeyManagementException

Here is the full output from ant: 

Buildfile: build.xml

coyote:

detect:

build-prepare:

build-main:
 [echo] - Java-utils -
 [echo] -- puretls.present = ${puretls.present}
 [echo] -- jsse.present = true
 [echo] -- commons-logging = true
 [echo] -- jmx = true

init:
 [echo]  Coyote 1.0-dev 

prepare:

static:

report-tc4:
 [echo] Tomcat4 detected 

report-tc33:

report:

compile.shared:

compile.tomcat4:
[javac] Compiling 2 source files to
jakarta-tomcat-connectors-4.0.4-src/coyote/build/classes
[javac]
jakarta-tomcat-connectors-4.0.4-src/coyote/src/java/org/apache/coyote/tomcat4/CoyoteServerSocketFactory.java:102:
createSocket(int,int,java.net.InetAddress) in
org.apache.coyote.tomcat4.CoyoteServerSocketFactory cannot implement
createSocket(int,int,java.net.InetAddress) in
org.apache.catalina.net.ServerSocketFactory; overridden method does not
throw java.security.KeyManagementException
[javac] public class CoyoteServerSocketFactory
[javac]^
[javac] 1 error

BUILD FAILED

jakarta-tomcat-connectors-4.0.4-src/coyote/build.xml:181: Compile
failed, messages should have been provided.

Total time: 2 seconds

__
Do You Yahoo!?
Yahoo! Health - Feel better, live better
http://health.yahoo.com

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




Multiple HttpServletRequest objects

2002-07-24 Thread Rutledge, Aaron

Is it possible to have more than one HttpServletRequest object per
session?  I am trying to store a request from one form as a session
object, process an intermediary form, and then pass the original request
to a servlet.  I have a couple clunky ways of doing this (having the
servlet write a hidden form from the request object and passing this
along).  I tried to create a session object like...

protected void doPost(HttpServletRequest request, HttpServletResponse
response)
throws ServletException, java.io.IOException {
HttpSession session = request.getSession();
session.setAttribute(form_data, request);

...and test the original value with...

protected void doGet(HttpServletRequest request, HttpServletResponse
response)
throws ServletException, java.io.IOException {
HttpSession session = request.getSession();
HttpServletRequest old_form =
(HttpServletRequest)session.getAttribute(form_data);
String a_field = old_form.getParameter(textfield);

to see if I get the original field value for the form field called
textfield, but I get a null value.  Does anyone have any clever ways
of storing a request object and then submitting later in the session?

Best regards to all!
Aaron

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




Re: Replacement of IIS

2002-07-24 Thread Rick Fincher

I believe Front Page suports WebDav and newer versions of Tomcat do as well.
So you shouldn't have too much trouble.

Rick
- Original Message -

 Hello all, we are looking for other means on replacing IIS on our servers.
 We do have a web editor called FrontPage to edit our web sites from
 Microsoft. Is it possible to use Tomcat as a replacement for IIS and still
 use FrontPage on editing our website. Is it then possible to use FrontPage
 with tomcat or do we have to also find other means for compatibility.

 Appreciate your cooperation.


 Fernando Crowley
 Mobius Management Systems
 Product Support Tech



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




Re: Replacement of IIS

2002-07-24 Thread rsequeira


Few things you need to keep in mind if you do decide to migrate from IIS to
Tomcat.
1) With Tomcat, you will not be able to serve .asp pages. You will need to
convert them to jsps.
2) Frontpage cannot connect to Tomcat as IIS does. But you will be able to
use the editing capabilities of FrontPage. You could still edit HTML pages.
3) Although Tomcat could be used standalone, it would be a good idea to use
Apache as a webserver to serve static pages (using mod_jk), and let Tomcat
handle the dynamic (jsp) pages. mod_jk has load-balancing capabilities as
well. 4) Or you could still use IIS as the webserver (this way you don't
loose the asp functionality). And let Tomcat handle the jsps (and servlet).
You could an ISAPI dll to connect IIS and Tomcat. See
http://jakarta.tomcat.org for more details


RS





Fernando Crowley [EMAIL PROTECTED] on 07/23/2002 11:53:20 AM

Please respond to Tomcat Users List [EMAIL PROTECTED]

To:'[EMAIL PROTECTED]' [EMAIL PROTECTED]
cc:'[EMAIL PROTECTED]' [EMAIL PROTECTED]

Subject:Replacement of IIS

Hello all, we are looking for other means on replacing IIS on our servers.
We do have a web editor called FrontPage to edit our web sites from
Microsoft. Is it possible to use Tomcat as a replacement for IIS and still
use FrontPage on editing our website. Is it then possible to use FrontPage
with tomcat or do we have to also find other means for compatibility.

Appreciate your cooperation.


Fernando Crowley
Mobius Management Systems
Product Support Tech


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




mod_jk target problem.

2002-07-24 Thread Austin Gonyou

In our mod_jk.conf we've only got a couple of paths used for JkMount,
but mod_jk still seems to be handing off everything from / to tomcat. 

We're using Tomcat 3.2.3 and mod_jk 3.2.3. We'll be upgrading, but
that's not for a little bit yet, unless this can be fixed by upgrading. 

We use Apache 1.3.24 on Linux. 

Any help on this problem is appreciated. TIA.

-- 
Austin Gonyou [EMAIL PROTECTED]
Coremetrics, Inc.



signature.asc
Description: This is a digitally signed message part


Re: Tomcat 4.1.7 admin appliaction problem

2002-07-24 Thread Rick Fincher

Hi James,

You have to have a security realm set up to use the manager.  Just a shot in
the dark but that may be your problem.

Rick

- Original Message -

 Hi all

 I have just installed Tomcat 4.1.7 on a machine running Win 2000
Profession
 ed

 Everything seems to work fine except the Tomcat admin application

 In other words, clicking through the Tomcat default homepage
 (http://localhost:8080/admin)

 I get the following 500 error:

 org.apache.jasper.JasperException: Missing message for
key.application.title
 ...

 I suspect this has something to do with the struts config files associated
 with this this application

 Any clues would be greatly appreciated

 rgds James Petersen




 _
 Join the world's largest e-mail service with MSN Hotmail.
 http://www.hotmail.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: mod_jk target problem.

2002-07-24 Thread Charles N. Harvey III

If you are mapping:

JkMount /myapp/* ajp13

Then it will forward all requests for http://mysite.com/myapp/...
to Tomcat.

To avoid this map:

JkMount /myapp/*.jsp ajp13

Or:
JkMount /*.jsp ajp13

This way only requests for jsp files will be forwarded to Tomcat
and everything not specified will be picked up by Apache.

Charlie

 -Original Message-
 From: Austin Gonyou [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, July 24, 2002 5:19 PM
 To: Tomcat Users List
 Subject: mod_jk target problem.
 
 
 In our mod_jk.conf we've only got a couple of paths used for JkMount,
 but mod_jk still seems to be handing off everything from / to tomcat. 
 
 We're using Tomcat 3.2.3 and mod_jk 3.2.3. We'll be upgrading, but
 that's not for a little bit yet, unless this can be fixed by upgrading. 
 
 We use Apache 1.3.24 on Linux. 
 
 Any help on this problem is appreciated. TIA.
 
 -- 
 Austin Gonyou [EMAIL PROTECTED]
 Coremetrics, Inc.
 

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




RE: Multiple HttpServletRequest objects

2002-07-24 Thread Mike Jackson

The answer about HttpServletRequest objects is probably no, but
it sounds like you need a java bean.  Use the bean to store your
form data (one bean per form might be the cleanest).  Then once
you've validated all the input from all the forms you can do
whatever it is you're attempting to do.

--mikej
-=-
mike jackson
[EMAIL PROTECTED]

-Original Message-
From: Rutledge, Aaron [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 24, 2002 2:05 PM
To: Tomcat Users List (E-mail)
Subject: Multiple HttpServletRequest objects


Is it possible to have more than one HttpServletRequest object per
session?  I am trying to store a request from one form as a session
object, process an intermediary form, and then pass the original request
to a servlet.  I have a couple clunky ways of doing this (having the
servlet write a hidden form from the request object and passing this
along).  I tried to create a session object like...

protected void doPost(HttpServletRequest request, HttpServletResponse
response)
throws ServletException, java.io.IOException {
HttpSession session = request.getSession();
session.setAttribute(form_data, request);

...and test the original value with...

protected void doGet(HttpServletRequest request, HttpServletResponse
response)
throws ServletException, java.io.IOException {
HttpSession session = request.getSession();
HttpServletRequest old_form =
(HttpServletRequest)session.getAttribute(form_data);
String a_field = old_form.getParameter(textfield);

to see if I get the original field value for the form field called
textfield, but I get a null value.  Does anyone have any clever ways
of storing a request object and then submitting later in the session?

Best regards to all!
Aaron

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




Prblm: ant install fails after building mod_jk jars for tomcat-4.0.4 connectors.

2002-07-24 Thread Ola Theander

Dear subscribers.

I have a problem regarding the ant install part after I've built the
jk (AJP13) connector for jakarta-tomcat-connectors-4.0.4. When I run
ant install I get an error message Target 'install' does not exist in
this project. Any idea why this is the case? The preceding build
process seems to work fine.

Kind regards, Ola Theander



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




  1   2   >