Re: Does tomcat 4.1.24 come with conf files?

2003-08-01 Thread Thomas Kellerer
The LE edition does contain the conf files as well (I have downloaded several 
versions, and all of them contain the conf files).

The light in Light Edition refers to the included XML parsers, as they are 
not necessary when running Tomcat with JDK 1.4.x

Thomas

John Turner schrieb:
No.  Not sure what file you got, but a full distribution of Tomcat (not 
LE) has a number of files in the conf directory.  Remember to use GNU tar.

John

[EMAIL PROTECTED] wrote:

Hey,
I have decided to start over so I went to the Jakarta website and 
downloaded
tomcat 4.1.24 and the conf directory is empty - is it suppose to be 
this way?

Thanks,
Bobbie
Bobbie Atristain
Internet Systems Administrator
Media General, INC.
804.649.6156
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


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


RE: Checking for invalidated session

2003-08-01 Thread Tim Davidson
But surely theres a better way?
 Whould I be better off replacing session.invalidate() with session = null?

-Original Message-
From: Justin Ruthenbeck [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 31, 2003 6:44 PM
To: Tomcat Users List
Subject: Re: Checking for invalidated session


At 08:31 AM 7/31/2003, you wrote:
How can you check to see if a session has already been validated?
i.e.
  if( !session.isInvalidated()) -- what should go here?
{
 session.invalidate();
}

to prevent the following exception:
org.apache.jasper.JasperException: invalidate: Session already invalidated

If you don't want to just catch and ignore the JasperException, then use 
something like this:

try
{
 session.getAttributeNames();
}
catch (java.lang.IllegalStateException isse)
{
 // Session is already invalid
}

justin


Justin Ruthenbeck
Software Engineer, NextEngine Inc.
justinr - AT - nextengine DOT com
Confidential
See http://www.nextengine.com/confidentiality.php



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



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



Re: Checking for invalidated session

2003-08-01 Thread Kwok Peng Tuck
How about:

if(session.getAttribute(myattrib)==null) {

}

Tim Davidson wrote:

But surely theres a better way?
Whould I be better off replacing session.invalidate() with session = null?
-Original Message-
From: Justin Ruthenbeck [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 31, 2003 6:44 PM
To: Tomcat Users List
Subject: Re: Checking for invalidated session
At 08:31 AM 7/31/2003, you wrote:
 

How can you check to see if a session has already been validated?
i.e.
if( !session.isInvalidated()) -- what should go here?
{
   session.invalidate();
}
to prevent the following exception:
org.apache.jasper.JasperException: invalidate: Session already invalidated
   

If you don't want to just catch and ignore the JasperException, then use 
something like this:

try
{
session.getAttributeNames();
}
catch (java.lang.IllegalStateException isse)
{
// Session is already invalid
}
justin


Justin Ruthenbeck
Software Engineer, NextEngine Inc.
justinr - AT - nextengine DOT com
Confidential
   See http://www.nextengine.com/confidentiality.php

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


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


 



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


Problem with text box and submit button

2003-08-01 Thread Antony
Hello,
Servlet is not getting the value of submit button from HTML form. I have
a form with one text box ,one submit button and a reset button. When I click
the submit button the servlet gets both text box and submit button values.
But when the user types in data in text box and press Enter key the servlet
is not getting the submit button(the focus is on text box). I am using IE
6.0 SP1,Tomcat 4.1.18. I tested this with mozilla. Mozilla works fine.  I
enabled the RequestDumperValve and tested. Interestingly the form is not
passing the submit button. Is it a bug ?. if required I shall send the file
as attachment .

Antony Paul

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



Connecting Two PC using internet connection ??

2003-08-01 Thread Bikash Paul
Hi,

I want to develop one software so that I can connect
two PC using internet connection means one is host and
another is remote.So that I can access remote PC's
Hard drive using internet connection.Can any one plz
give me some guideline how I can start.Eagerly waiting
for someone reply.

Thanks  Regards
Bikash

__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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



RE: Connecting Two PC using internet connection ??

2003-08-01 Thread Reynir Hübner
You might want to take a look at webdav... That might solve some of your problems.

-reynir


 -Original Message-
 From: Bikash Paul [mailto:[EMAIL PROTECTED] 
 Sent: 1. ágúst 2003 08:32
 To: Tomcat Users List
 Subject: Connecting Two PC using internet connection ??
 
 
 Hi,
 
 I want to develop one software so that I can connect
 two PC using internet connection means one is host and
 another is remote.So that I can access remote PC's
 Hard drive using internet connection.Can any one plz
 give me some guideline how I can start.Eagerly waiting
 for someone reply.
 
 Thanks  Regards
 Bikash
 
 __
 Do you Yahoo!?
 Yahoo! SiteBuilder - Free, easy-to-use web site design 
 software http://sitebuilder.yahoo.com
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 

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



RE: Address Resolving

2003-08-01 Thread Reynir Hübner

If You have one tomcat server, serving for multiple dns names, but only one IP for 
this computer, you can set up several virtual hosts, one for each dns name, or if you 
want all to go into the same application you can set up one virtual host with many 
Aliasdnsname/Alias properties.


So you would setup something like this in your tomcathome/conf/server.xml 

Host name=www..com debug=0 appBase=/somewhere/on/your/harddrive/ 
   Aliaswww..com/Alias
   Context path= docBase=/somewhere/on/your/harddrive/ debug=0 
reloadable=true autoDeploy=true/
/Host


Hope it helps
-reynir






 -Original Message-
 From: Sekhmet [mailto:[EMAIL PROTECTED] 
 Sent: 31. júlí 2003 22:09
 To: [EMAIL PROTECTED]
 Subject: Address Resolving
 
 
 Hi there...
 I recently installed Tomcat 4.0 and I'm still new to this 
 server, but I already read all the documentation that came 
 with the server and still have a question:
  
 How can I make tomcat resolve different addresses to the same 
 IP? I mean, if I enter www..com  http://www..com/  
 and this points to my static IP, and 
 I also have www..com http://www..com/ pointing to 
 the same IP, how can Tomcat redirect the request to the 
 appropriate page?
  
 Anyone? Please forgive me if this is a dumb question...
 

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



Re: Possible to start Tomcat but not deploy webapp?

2003-08-01 Thread Tim Funk
AFAIK, there is no ability to do this.

-Tim

MooBob42 wrote:
Say I have three webapps - the manager webapp, webapp A and webapp B. Is it
possible for me to configure Tomcat such that when I start it up, only the
manager and webapp A come online? Webapp B should either be in an undeployed
state or in the stopped state, as if I had stopped it with the manager.


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


Building mod_jk.so

2003-08-01 Thread Johnson, David
Right, I am trying to build mod_jk 1.2.4 on Solaris 9. It seems to build
okay but I get an error when apache tries to start up.

I'll detail the steps I've taken and the error I get.

1. Installed the following GNU packages: make, automake, autoconf, m4,
libtools (they came as Solaris packages, which I have simply run pkgadd
-d on. I haven't set an environment variables for them, not sure if I
should have done?)
2. Set TOMCAT_HOME and CATALINA_HOME to point to my tomcat directory
(which was installed from a binary)
3. Set JAVA_HOME to point to the jdk
4. Unpacked the jakarta-tomcat-connectors-jk-1.2.4-src.tar.
5. Changed into the jk/native directory
6. ./buildconf.sh (no errors)
7. ./configure --with-apxs=/software/web/apache/bin/apxs (no errors)
8. make (no errors)

This leaves me with a mod_jk.so file in the apache-1.3 directory, which
I copy into my APACHE_HOME/libexec directory.

When I try to start apache I get the following error (I've replaced the
full path with APACHE_HOME to make it easier to read):

Syntax error on line 206 of APACHE_HOME/conf/httpd.conf
Cannot load APACHE_HOME/libexec/mod_jk.so into server: ld.so.1:
APACHE_HOME/bin/httpd: fatal: libgcc_s.so.1: open failed: No such file
or directory

Can anyone offer any advice?

Many Thanks
David Johnson


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



Client Authentication in combination with a realm

2003-08-01 Thread Ivo Matheis
Hi,

I'm using Tomcat 4.0.6 and configured it for client authentication. This works fine. 
Then I tried to add a realm to a certain webapp in order to control access. As I have 
read in several sources either the client certificates Common Name or the complete 
Distinguished name are used to identify the user (i.e. CN or DN must be identical to 
username in Tomcat's users.xml-file in order to identify the user.).
I tried both the CN or DN string as username in users.xml, but when accessing the 
secured webapp I get a 401 - Cannot authenticate with the provided credentials...
What is wrong? Does that kind of authentication not work with users.xml?

Thanks, Ivo

PS: this is a snippet of my secured webapp's web.xml:
security-constraint
   web-resource-collection
  web-resource-namefoo client auth/web-resource-name
  url-pattern/*/url-pattern
  http-methodGET/http-method
  http-methodPOST/http-method
   /web-resource-collection
   auth-constraint
  role-namefoo/role-name
   /auth-constraint
   user-data-constraint
  transport-guaranteeCONFIDENTIAL/transport-guarantee
   /user-data-constraint
/security-constraint
login-config
   auth-methodCLIENT-CERT/auth-method
   realm-namefoobar/realm-name
/login-config
security-role
   role-namefoo/role-name 
/security-role

!-- my client certificate's CNis Ivo Matheis --
tomcat-users
  user name=tomcat password=tomcat roles=tomcat /
  user name=Ivo Matheis password=null roles=foo /
/tomcat-users



__
Spam-Filter fuer alle - bester Spam-Schutz laut ComputerBild 15-03
WEB.DE FreeMail - Deutschlands beste E-Mail - http://s.web.de/?mc=021120


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



[ERR] Re: Installation problem

2003-08-01 Thread postmaster
Transmit Report:

 To: [EMAIL PROTECTED], 402 Local User Inbox Full ([EMAIL PROTECTED])
---BeginMessage---
Just curious, you are welcome to build from source, but did you know 
that there are binaries available that work out of the box?

John

[EMAIL PROTECTED] wrote:

Folks,

I am installing tomcat for the first time in Solaris 7.  I am having the following problems in tomcat 4.1.24 as well as 5.  I am wondering if anyone come across this and give me some pointers.

# ant
Buildfile: build.xml
check.source:

get.source:

build:

BUILD FAILED
file:/tmp/TOMCAT/jakarta-tomcat-4.1.24/build.xml:51: Target `download' does not exist in this project. 

Total time: 3 seconds
# cd ../jakarta-tomcat-5
# ant
Buildfile: build.xml
check.source:

get.source:

build:

BUILD FAILED
file:/tmp/TOMCAT/jakarta-tomcat-5/build.xml:51: Target `download' does not exist in this project. 

Total time: 3 seconds

TIA,
Dan
__
McAfee VirusScan Online from the Netscape Network.
Comprehensive protection for your entire computer. Get your free trial today!
http://channels.netscape.com/ns/computing/mcafee/index.jsp?promo=393397
Get AOL Instant Messenger 5.1 free of charge.  Download Now!
http://aim.aol.com/aimnew/Aim/register.adp?promo=380455
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


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


RE: Problem confinguring MySQL JNDI Datasource RH Linux 7.2

2003-08-01 Thread Scott Stewart
Well, at first glance it appears that you are using an incorrectly named
parameter for the DataSource implementation that you are now using.  The
link you provided states that you need to provide a parameter named user;
however, you are still using the username parameter that I provided in my
example.  Try changing this to user.

Thanks,

Scott Stewart
[Manager, Software Development]
[EMAIL PROTECTED]

ClearSky Mobile Media, Inc.
56 E. Pine Street  Suite 200
Orlando, FL  32801
USA





-Original Message-
From: Don Ross [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 31, 2003 4:59 PM
To: Tomcat Users List
Subject: RE: Problem confinguring MySQL JNDI Datasource RH Linux 7.2


Scott,

I tried your suggestion and I am still getting the same error.

Below is the log from the context DBTest, which I setup to use the
datasource.

I tried another suggestion from following URL:

http://www.java-internals.com/code/resourcefactory/readme.html

which also defined the datasource GlobalNamingResources section and got a
little further.

The java-internals suggestion uses a different resource type and added a
factory parameter that references a jar file that I had to install in
$CATALINA_HOME/common/lib/

After tryig their suggestion I following error:

java.sql.SQLException: Invalid authorization specification: Access denied
for user: '[EMAIL PROTECTED]' (Using password: YES) error
at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:659)
at com.mysql.jdbc.Connection.createNewIO(Connection.java:1562)
at com.mysql.jdbc.Connection.init(Connection.java:491)
at
com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:346)
at
com.mysql.jdbc.jdbc2.optional.MysqlDataSource.getConnection(MysqlDataSource.
java:199)
at
com.mysql.jdbc.jdbc2.optional.MysqlDataSource.getConnection(MysqlDataSource.
java:163)
at
com.mysql.jdbc.jdbc2.optional.MysqlDataSource.getConnection(MysqlDataSource.
java:134)
at foo.DBTest.init(DBTest.java:23)

Doesn't look like my user and password parameters are getting processed

Here are the sections I updated:

ResourceLink name=jdbc/MySQLConnectPool
  global=jdbc/MySQLConnectPool
 
type=com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource /

Resource name=jdbc/MySQLConnectPool 
  auth=Container 
 
type=com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource /

ResourceParams name=jdbc/MySQLConnectPool 

parameter
 namefactory/name

valuecom.java_internals.resourcefactory.MyResourceFactory/value
/parameter
parameter
  nameserverName/name
  valuelocalhost/value
/parameter
parameter
  namedatabaseName/name
  valuejavatest/value
   /parameter
parameter
nameusername/name
valuejavauser/value
/parameter

parameter
namepassword/name
valuejavadude/value
/parameter
/ResourceParams


DBTest log file after I implemented your changes

2003-07-31 17:10:14 StandardContext[/DBTest]: Starting
2003-07-31 17:10:14 StandardContext[/DBTest]: Processing start(), current
available=false
2003-07-31 17:10:14 StandardContext[/DBTest]: Configuring default Resources
2003-07-31 17:10:14 StandardContext[/DBTest]: Configuring non-privileged
default Loader
2003-07-31 17:10:14 StandardContext[/DBTest]: Configuring default Manager
2003-07-31 17:10:14 StandardContext[/DBTest]: Processing standard container
startup
2003-07-31 17:10:14 WebappLoader[/DBTest]: Deploying class repositories to
work directory
/usr/local/jakarta-tomcat-4.1.24/work/Standalone/localhost/DBTest
2003-07-31 17:10:14 WebappLoader[/DBTest]: Deploy class files
/WEB-INF/classes to
/usr/local/jakarta-tomcat-4.1.24/webapps/DBTest/WEB-INF/classes
2003-07-31 17:10:14 WebappLoader[/DBTest]: Reloading checks are enabled for
this Context
2003-07-31 17:10:14 ContextConfig[/DBTest]: ContextConfig: Processing START
2003-07-31 17:10:14 StandardContext[/DBTest]: Setting deployment descriptor
public ID to '-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN'
2003-07-31 17:10:14 StandardContext[/DBTest]: Setting deployment descriptor
public ID to '-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN'
2003-07-31 17:10:14 ContextConfig[/DBTest]:  Accumulating TLD resource paths
2003-07-31 17:10:14 ContextConfig[/DBTest]:   Scanning taglib elements in
web.xml
2003-07-31 17:10:14 ContextConfig[/DBTest]:   Scanning TLDs in /WEB-INF
subdirectory
2003-07-31 17:10:14 ContextConfig[/DBTest]:   Scanning JARs in /WEB-INF/lib
subdirectory
2003-07-31 17:10:14 

[ERR] Internal Servlet Error

2003-08-01 Thread postmaster
Transmit Report:

 To: [EMAIL PROTECTED], 402 Local User Inbox Full ([EMAIL PROTECTED])
---BeginMessage---
Hi there,

I'm currently running Tomcat 3.2.4 in Redhat 7.3 . The problem only occurs
in Linux, if I zip the Tomcat directory and run it in Windows, everything
works fine. My frontend system craches with the following exception. Has
anyone experienced this before? Thanks in advance,

Error: 500
Location: /adsl/layouts/mainLayout.jsp
Internal Servlet Error:
javax.servlet.ServletException:
javax.servlet.jsp.tagext.TagAttributeInfo.(Ljava/lang/String;ZLjava/lang/Str
ing;Z)V
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:399)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
at
org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
at org.apache.tomcat.core.Handler.service(Handler.java:286)
at
org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at
org.apache.tomcat.facade.RequestDispatcherImpl.forward(RequestDispatcherImpl
.java:194)
at
org.apache.struts.tiles.ActionComponentServlet.doForward(ActionComponentServ
let.java:453)
at
org.apache.struts.tiles.ActionComponentServlet.processActionForward(ActionCo
mponentServlet.java:180)
at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1596)
at
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:492)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
at
org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
at org.apache.tomcat.core.Handler.service(Handler.java:286)
at
org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:79
7)
at
org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC
onnectionHandler.java:210)
at
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
at java.lang.Thread.run(Thread.java:534)
Root cause: 
java.lang.NoSuchMethodError:
javax.servlet.jsp.tagext.TagAttributeInfo.(Ljava/lang/String;ZLjava/lang/Str
ing;Z)V
at
org.apache.jasper.compiler.TagLibraryInfoImpl.createAttribute(TagLibraryInfo
Impl.java:524)
at
org.apache.jasper.compiler.TagLibraryInfoImpl.createTagInfo(TagLibraryInfoIm
pl.java:432)
at
org.apache.jasper.compiler.TagLibraryInfoImpl.parseTLD(TagLibraryInfoImpl.ja
va:385)
at
org.apache.jasper.compiler.TagLibraryInfoImpl.(TagLibraryInfoImpl.java:233)
at
org.apache.jasper.compiler.JspParseEventListener.handleDirective(JspParseEve
ntListener.java:706)
at
org.apache.jasper.compiler.DelegatingListener.handleDirective(DelegatingList
ener.java:116)
at
org.apache.jasper.compiler.Parser$Directive.accept(Parser.java:215)
at org.apache.jasper.compiler.Parser.parse(Parser.java:1077)
at org.apache.jasper.compiler.Parser.parse(Parser.java:1042)
at org.apache.jasper.compiler.Parser.parse(Parser.java:1038)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:182)
at
org.apache.jasper.servlet.JspServlet.doLoadJSP(JspServlet.java:462)
at
org.apache.jasper.servlet.JasperLoader12.loadJSP(JasperLoader12.java:146)
at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:433)
at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspSe
rvlet.java:152)
at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja
va:164)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:318)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:391)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
at
org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
at org.apache.tomcat.core.Handler.service(Handler.java:286)
at
org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at
org.apache.tomcat.facade.RequestDispatcherImpl.forward(RequestDispatcherImpl
.java:194)
at
org.apache.struts.tiles.ActionComponentServlet.doForward(ActionComponentServ
let.java:453)
at
org.apache.struts.tiles.ActionComponentServlet.processActionForward(ActionCo
mponentServlet.java:180)
at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1596)
at
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:492)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
at

RE: Unable to find a javac compiler

2003-08-01 Thread Bradberry, Rick


I have the env variables set and have tried it as a services and as a
inprocess with the same results with mod_jk2. I found a HOWTO on mod_jk and
it seems to work ok using Tomcat as a service. The only problem now is that
the auto gen conf files have a problem with blanks in the paths of the
webapps. I can fix this manually until I can get all the paths changed.

Question:
What am I giving up using jk instead of jk2

Rick

-Original Message-
From: shyam [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 31, 2003 3:50 PM
To: Tomcat Users List
Subject: Re: Unable to find a javac compiler


I also had the same problem. If you have installed tomcat as a service this
problem comes. You need to have the JAVA_HOME variable set to your
j2sdk1.4.1 directory in the environmental variables . Hope this helps you.
- Original Message - 
From: Bradberry, Rick [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, July 31, 2003 3:42 PM
Subject: Unable to find a javac compiler


 Hi,

 Got a problem with Apache 2.0.47, Tomcat 4.1.18 and  j2sdk 1.4.1.01. I've
 read through the archive and
 found some close to my problem, but not quit.

 My problem:

 I've installed Apache and Tomcat as standalone servers and they both work
 great. Now I'm trying to
 get them to talk to each other.

 I read through a HOWTO on setting it up on win2K as a inprocess server for
 jk2 and it almost works.
 Apache passes the request to Tomcat and Tomcat will process them unless it
 comes across
 a jsp page that has not been complied. Then I get
 Unable to find a javac compiler in the Tomcat logs. However, If I start
 Tomcat as a stand alone and
 go to the same page it compiles it and then I can go back to Apache and it
 will work.

 I've tried everything I can find, but get the same results.

 any help would be greatly appreciated.

 Some setup

 JAVA_HOME=C:\Program Files\eclipse\j2sdk1.4.1_01
 CATALINA_HOME=C:\Program Files\Apache Group\jakarta-tomcat-4.1.18
 TOMCAT_HOME=C:\Program Files\Apache Group\jakarta-tomcat-4.1.18

 JK2.properties from HOWTO

 ## THIS FILE MAY BE OVERRIDEN AT RUNTIME. MAKE SURE TOMCAT IS STOPED
 ## WHEN YOU EDIT THE FILE.
 ## COMMENTS WILL BE _LOST_

 ## DOCUMENTATION OF THE FORMAT IN JkMain javadoc.

 # Override the default port for the socketChannel
 # channelSocket.port=8019
 # Default:
 # channelUnix.file=${jkHome}/work/jk2.socket
 # Just to check if the the config  is working
 shm.file=C:\Program Files\Apache Group\Apache2/logs/jk2.shm

 # In order to enable jni use any channelJni directive
 channelJni.disabled = 0
 # And one of the following directives:

 # apr.jniModeSo=/opt/apache2/modules/mod_jk2.so

 # If set to inprocess the mod_jk2 will Register natives itself
 # This will enable the starting of the Tomcat from mod_jk2
 apr.jniModeSo=inprocess


 worker.properties from the HOWTO.

 [logger]
 level=DEBUG

 [config:]
 #file=${serverRoot}/conf/workers2.properties
 file=C:/Program Files/Apache Group/Apache2/conf/workers2.properties
 debug=0
 debugEnv=0

 [uriMap:]
 info=Maps the requests. Options: debug
 debug=0

 # Alternate file logger
 #[logger.file:0]
 #level=DEBUG
 #file=${serverRoot}/logs/jk2.log

 [shm:]
 info=Scoreboard. Required for reconfiguration and status with multiprocess
 servers
 file=C:/Program Files/Apache Group/Apache2/logs/jk2.shm
 size=100
 debug=0
 disabled=0

 [workerEnv:]
 info=Global server options
 timing=1
 debug=0
 # Default Native Logger (apache2 or win32 )
 # can be overriden to a file logger, useful
 # when tracing win32 related issues
 #logger=logger.file:0

 [lb:lb]
 info=Default load balancer.
 debug=0

 #[lb:lb_1]
 #info=A second load balancer.
 #debug=0

 [channel.socket:localhost:8009]
 info=Ajp13 forwarding over socket
 debug=0
 tomcatId=localhost:8009

 #[channel.socket:localhost:8019]
 #info=A second tomcat instance.
 #debug=0
 #tomcatId=localhost:8019
 #lb_factor=1
 #group=lb
 #group=lb_1
 #disabled=0

 #[channel.un:/opt/33/work/jk2.socket]
 #info=A second channel connecting to localhost:8019 via unix socket
 #tomcatId=localhost:8019
 #lb_factor=1
 #debug=0

 [channel.jni:jni]
 info=The jni channel, used if tomcat is started inprocess

 [status:]
 info=Status worker, displays runtime informations

 [vm:]
 info=Parameters used to load a JVM in the server process
 #JVM=C:\jdk\jre\bin\hotspot\jvm.dll
 OPT=-Djava.class.path=C:/Program Files/Apache
 Group/jakarta-tomcat-4.1.18/bin/tomcat-jni.jar;C:/Program Files/Apache
 Group/jakarta-tomcat-4.1.18/server/lib/commons-logging.jar;C:/Program
 Files/eclipse/j2sdk1.4.1_01/bin;C:/Program Files/Apache
 Group/jakarta-tomcat-4.1.18/jre/lib/rt.jar;C:/Program Files/Apache
 Group/jakarta-tomcat-4.1.18/lib/tools.jar
 OPT=-Dtomcat.home=C:/Program Files/Apache Group/jakarta-tomcat-4.1.18
 OPT=-Dcatalina.home=C:/Program Files/Apache Group/jakarta-tomcat-4.1.18
 OPT=-Djava.home=C:/Program Files/eclipse/j2sdk1.4.1_01
 OPT=-Xmx128M
 #OPT=-Djava.compiler=NONE
 OPT=-Djava.compiler=C:/Program Files/eclipse/j2sdk1.4.1_01/bin/javac
 

Re: Hello Sir, Madam,Miss

2003-08-01 Thread Ben Souther
Move your Book folder up one directory to the webapps folder.
Make sure you have a directory named WEB-INF in your Book folder.
Restart Tomcat.

 http://localhost:8080/Book/AdminBook.jsp should work for you.








On Thursday 31 July 2003 02:57 pm, Felix gt wrote:
 Hello Sir, Madam, Miss
 Sorry because Disturb your time to reading my Email

 i have the Question About Setting the tomcat.
 my Question is
 i have Open new Folder in ROOT Folder call Book, in
 this Book Folder i have Copy all the JSP File in to
 this Folder. after i Finish Copy, i Type
 http://localhost:8080/Book/AdminBook.jsp, my Browser
 come out this Error :
 The server encountered an internal error () that
 prevented it from fulfilling this request. What is
 This Means for?
 how to solve this Problem?? can u teach me how to
 Solve it? Please.

 Thanks for Reading my Email

 Wait for Reply.



 __
 Do you Yahoo!?
 Yahoo! SiteBuilder - Free, easy-to-use web site design software
 http://sitebuilder.yahoo.com

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

-- 
Ben Souther
F.W. Davison  Company, Inc.



REGISTER NOW FOR THE SCORPEO USER CONFERENCE!
September 18-19, 2003 in Boston/Brookline, MA
Additional Training Sessions held September 17, 2003
More info  http://www.fwdco.com/services/Uconf03/default.shtm


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



RE: minProcessor = maxProcessor value (are threads released if not used for some time ?)

2003-08-01 Thread Shapira, Yoav

Howdy,
Processor thread creation is lazy.  You can subclass if you want greedy.

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: Rau NF [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 31, 2003 6:47 PM
To: [EMAIL PROTECTED]
Subject: minProcessor = maxProcessor value (are threads released if not
used for some time ?)

Hi - I have set both these values to 100. When I run
Tomcat 4.1.24/Linux/JDK 1.4.2, I see that Tomcat does
not create all the 100 threads. It is usually in the
40-70 range.

Does this mean that Tomcat releases the thread
(resources) if not used for some time ? How can I make
it create all the 100 threads and keep them available
in the pool ?

Thanks
S Rau

__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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




This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


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



RES: Cookie problem max age problem - Best practice to solve it

2003-08-01 Thread Jose Euclides da Silva Junior - DATAPREVRJ
Thanks for your attention! The question stays alive because this plugin runs
fine on OC4J(Oracle) environment, but its always a failure on Tomcat env.
Any other help would be appreciated.
Euclides.

-Mensagem original-
De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Enviada em: quinta-feira, 31 de julho de 2003 09:32
Para: '[EMAIL PROTECTED]'
Assunto: Re: Cookie problem max age problem - Best practice to solve it


 From: Jose Euclides da Silva Junior - DATAPREVRJ
 Subject: Cookie problem max age problem - Best practice to solve it

 this question is very important to me. My application works with an
external
 authentication app ( like a plugin).When the user is logged, a browser
 cookie is created. The problem stays whenever the user asks for a logout
 process and the external app tries to kill its cookie (created before by
 the app), probably setting cookie's max age to 0, i guess. But TomCat
doesnt
 know that this cookie is already killed, because it just fetch the name
and
 value.  So, i would like any tips about best practice on solving this kind
 of problem.

Cookie exchanges fall into one of two categories:

 - what the server sends to the client
 - what the client sends back to the server

Tomcat wouldn't fetch the value; the client's browser sends it.

Setting the max age of a cookie to zero is the proper way to delete a
cookie.  When doing the deletion, are you sure that the name, domain,
and path values are identical to the ones used when the cookie was
initially set?

-- 
Steve

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

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



[ERR] Post-authentication tasks

2003-08-01 Thread postmaster
Transmit Report:

 To: [EMAIL PROTECTED], 402 Local User Inbox Full ([EMAIL PROTECTED])
---BeginMessage---
I'd like to get some suggestions for performing post-authentication tasks
while using Container Managed Authentication.

Craig Berry suggested a filter that checks the session for necessary
attributes, and creates them if they're missing.  This check would be
performed on every request however.

Has anyone implemented a different approach to this problem?  I'd like to
find a solution in which the extra tasks are performed just ONCE, somehow
triggered by the container authentication.  Please reference my previous
post on a filter vs. session attribute listener approach.

Thanks for any suggestions.

-Sasha Borodin


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

---End Message---


Re: RES: Cookie problem max age problem - Best practice to solve it

2003-08-01 Thread srevilak
srevilak Setting the max age of a cookie to zero is the proper way to
srevilak delete a cookie.  When doing the deletion, are you sure that
srevilak the name, domain, and path values are identical to the ones
srevilak used when the cookie was initially set?

jose Thanks for your attention! The question stays alive because this
jose plugin runs fine on OC4J(Oracle) environment, but its always a
jose failure on Tomcat env.  Any other help would be appreciated.
jose Euclides.

It's perfectly okay for a cookie to be set by one application, then
removed by another.

What are the values used for domain, path, and name when the cookie is
set?  Most useragents provide a way to have the user prompted for each
cookie.  That would be a helpful thing to do in this case.

What are the values used for domain, path, and name when the cookie is
deleted?

While domain and path are set when sending a cookie, the client only
sends back the name and value pair (domain and path are used by the
client in determining what cookies to send).  As a result, something
like this won't work

  deleteCookie.setDomain(cookieFromClient.getDomain());

hth.

-- 
Steve

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



RE: Checking for invalidated session

2003-08-01 Thread Murray
I'm trying to ensure that a session is newly created when I reach my index
page.  The logic is reversed from your question but I believe the principle
is the same inasmuchas I want to know whether or not a valid session exists.

  if (! session.isNew() )
  {
   session.invalidate();
   %
   rsp:sendRedirect
rsp:encodeRedirectUrl/scoutgroup/index.jsp/rsp:encodeRedirectUrl
   /rsp:sendRedirect
   %
  }

The redirect is to cause the page to be reloaded after the invalidate()
since JSP, by default, creates a new session when the page is loaded.

In the body of the page I had a line
  pYou are in session.  The session id is %=session.getId()%.
which produces The session id is null prior to inserting the redirect.
After the redirect was inserted the html was not sent to the browser until a
valid session was established at which time each visit to or browser refresh
of the page produced a new session id.

Someone with more than three months of playing with this as a spare time
hobby feel free to critique the solution please.

Murray

-Original Message-
From: Tim Davidson [mailto:[EMAIL PROTECTED]
Sent: Friday, 1 August 2003 18:10
To: Tomcat Users List
Subject: RE: Checking for invalidated session


But surely theres a better way?
 Whould I be better off replacing session.invalidate() with session =
null?

-Original Message-
From: Justin Ruthenbeck [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 31, 2003 6:44 PM
To: Tomcat Users List
Subject: Re: Checking for invalidated session


At 08:31 AM 7/31/2003, you wrote:
How can you check to see if a session has already been validated?
i.e.
  if( !session.isInvalidated()) -- what should go here?
{
 session.invalidate();
}

to prevent the following exception:
org.apache.jasper.JasperException: invalidate: Session already
invalidated

If you don't want to just catch and ignore the JasperException, then use
something like this:

try
{
 session.getAttributeNames();
}
catch (java.lang.IllegalStateException isse)
{
 // Session is already invalid
}

justin


Justin Ruthenbeck
Software Engineer, NextEngine Inc.
justinr - AT - nextengine DOT com
Confidential
See http://www.nextengine.com/confidentiality.php



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



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




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



Problem with port 8443

2003-08-01 Thread batristain
Greetings,
I have a website that uses ssl - I want to know if I have the ssl working with
apache how can I just send the request to Tomcat - or does tomcat have to do the
ssl request itself?
The site works at http://placeanad.classifiedmarketplace.net:8080/AdWebster

However if I uncomment out the lines pertaining to 8443 in the server.xml file I
can't get https://placeanad.classifiedmarketplace.net:8443/AdWebster to work.  I
have tried to install mod_jk.so but I can't get the buildconf.sh to install
properly - is there another alternative?

Thanks,
Bobbie

Bobbie Atristain
Internet Systems Administrator
Media General, INC.
804.649.6156

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



Re: Building mod_jk.so

2003-08-01 Thread Jørgen Nørgaard
Look like a library is missing, so just a thought: has apache been 
built with gcc so it uses gnu libraries?



Right, I am trying to build mod_jk 1.2.4 on Solaris 9. It seems to build
okay but I get an error when apache tries to start up.
I'll detail the steps I've taken and the error I get.

1. Installed the following GNU packages: make, automake, autoconf, m4,
libtools (they came as Solaris packages, which I have simply run pkgadd
-d on. I haven't set an environment variables for them, not sure if I
should have done?)
2. Set TOMCAT_HOME and CATALINA_HOME to point to my tomcat directory
(which was installed from a binary)
3. Set JAVA_HOME to point to the jdk
4. Unpacked the jakarta-tomcat-connectors-jk-1.2.4-src.tar.
5. Changed into the jk/native directory
6. ./buildconf.sh (no errors)
7. ./configure --with-apxs=/software/web/apache/bin/apxs (no errors)
8. make (no errors)
This leaves me with a mod_jk.so file in the apache-1.3 directory, which
I copy into my APACHE_HOME/libexec directory.
When I try to start apache I get the following error (I've replaced the
full path with APACHE_HOME to make it easier to read):
Syntax error on line 206 of APACHE_HOME/conf/httpd.conf
Cannot load APACHE_HOME/libexec/mod_jk.so into server: ld.so.1:
APACHE_HOME/bin/httpd: fatal: libgcc_s.so.1: open failed: No such file
or directory
Can anyone offer any advice?

--
/jørgen nørgaard
SmartTV A/S
[EMAIL PROTECTED]
Phone: +45 3332 5770
http://smarttv.dk/
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: Checking for invalidated session

2003-08-01 Thread Tim Davidson
thanks.
the other option which I dont like was:
try
{
 session.invalidate();
}
catch (Throwable t)
{
 // Session is already invalid
}

-Original Message-
From: Murray [mailto:[EMAIL PROTECTED]
Sent: Friday, August 01, 2003 2:14 PM
To: Tomcat Users List
Subject: RE: Checking for invalidated session


I'm trying to ensure that a session is newly created when I reach my index
page.  The logic is reversed from your question but I believe the principle
is the same inasmuchas I want to know whether or not a valid session exists.

  if (! session.isNew() )
  {
   session.invalidate();
   %
   rsp:sendRedirect
rsp:encodeRedirectUrl/scoutgroup/index.jsp/rsp:encodeRedirectUrl
   /rsp:sendRedirect
   %
  }

The redirect is to cause the page to be reloaded after the invalidate()
since JSP, by default, creates a new session when the page is loaded.

In the body of the page I had a line
  pYou are in session.  The session id is %=session.getId()%.
which produces The session id is null prior to inserting the redirect.
After the redirect was inserted the html was not sent to the browser until a
valid session was established at which time each visit to or browser refresh
of the page produced a new session id.

Someone with more than three months of playing with this as a spare time
hobby feel free to critique the solution please.

Murray

-Original Message-
From: Tim Davidson [mailto:[EMAIL PROTECTED]
Sent: Friday, 1 August 2003 18:10
To: Tomcat Users List
Subject: RE: Checking for invalidated session


But surely theres a better way?
 Whould I be better off replacing session.invalidate() with session =
null?

-Original Message-
From: Justin Ruthenbeck [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 31, 2003 6:44 PM
To: Tomcat Users List
Subject: Re: Checking for invalidated session


At 08:31 AM 7/31/2003, you wrote:
How can you check to see if a session has already been validated?
i.e.
  if( !session.isInvalidated()) -- what should go here?
{
 session.invalidate();
}

to prevent the following exception:
org.apache.jasper.JasperException: invalidate: Session already
invalidated

If you don't want to just catch and ignore the JasperException, then use
something like this:

try
{
 session.getAttributeNames();
}
catch (java.lang.IllegalStateException isse)
{
 // Session is already invalid
}

justin


Justin Ruthenbeck
Software Engineer, NextEngine Inc.
justinr - AT - nextengine DOT com
Confidential
See http://www.nextengine.com/confidentiality.php



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



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




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



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



Can't find apxs

2003-08-01 Thread batristain
When trying to run buildconf.sh I get this error message
could not find /usr/local/apache/bin/apxs
configure: error: You must specify a valid --with-apxs path
But that is the correct path

Any Suggestions?

Bobbie Atristain
Internet Systems Administrator
Media General, INC.
804.649.6156

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



Re: Problem with text box and submit button

2003-08-01 Thread G. Wade Johnson
That's actually a browser feature.

Since you did not click the submit button, it's value would not be sent.
The browser is being helpful by allowing an Enter to submit the form.

The downside of this convenience for the user is more ambiguity for the
developer.shrug/

G. Wade

Antony wrote:
 
 Hello,
 Servlet is not getting the value of submit button from HTML form. I have
 a form with one text box ,one submit button and a reset button. When I click
 the submit button the servlet gets both text box and submit button values.
 But when the user types in data in text box and press Enter key the servlet
 is not getting the submit button(the focus is on text box). I am using IE
 6.0 SP1,Tomcat 4.1.18. I tested this with mozilla. Mozilla works fine.  I
 enabled the RequestDumperValve and tested. Interestingly the form is not
 passing the submit button. Is it a bug ?. if required I shall send the file
 as attachment .
 
 Antony Paul
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]

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



RE: Building mod_jk.so

2003-08-01 Thread Johnson, David
I've managed to solve it. I needed to set an environment variable as follows:

LD_LIBRARY_PATH=/usr/local/lib

Dave

 -Original Message-
 From: Jørgen Nørgaard [mailto:[EMAIL PROTECTED] 
 Sent: Friday, August 01, 2003 2:28 PM
 To: Tomcat Users List
 Subject: Re: Building mod_jk.so
 
 
 
 Look like a library is missing, so just a thought: has apache been 
 built with gcc so it uses gnu libraries?
 
 
 
 Right, I am trying to build mod_jk 1.2.4 on Solaris 9. It seems to 
 build okay but I get an error when apache tries to start up.
 
 I'll detail the steps I've taken and the error I get.
 
 1. Installed the following GNU packages: make, automake, 
 autoconf, m4, 
 libtools (they came as Solaris packages, which I have simply run 
 pkgadd -d on. I haven't set an environment variables for them, not 
 sure if I should have done?) 2. Set TOMCAT_HOME and CATALINA_HOME to 
 point to my tomcat directory (which was installed from a binary)
 3. Set JAVA_HOME to point to the jdk
 4. Unpacked the jakarta-tomcat-connectors-jk-1.2.4-src.tar.
 5. Changed into the jk/native directory
 6. ./buildconf.sh (no errors)
 7. ./configure --with-apxs=/software/web/apache/bin/apxs (no errors)
 8. make (no errors)
 
 This leaves me with a mod_jk.so file in the apache-1.3 
 directory, which 
 I copy into my APACHE_HOME/libexec directory.
 
 When I try to start apache I get the following error (I've 
 replaced the 
 full path with APACHE_HOME to make it easier to read):
 
 Syntax error on line 206 of APACHE_HOME/conf/httpd.conf
 Cannot load APACHE_HOME/libexec/mod_jk.so into server: ld.so.1:
 APACHE_HOME/bin/httpd: fatal: libgcc_s.so.1: open failed: No 
 such file 
 or directory
 
 Can anyone offer any advice?
 
 
 -- 
 /jørgen nørgaard
 SmartTV A/S
 [EMAIL PROTECTED]
 Phone: +45 3332 5770
 http://smarttv.dk/
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 

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



running a servlet

2003-08-01 Thread Jason Jesso
Hi:

I am having trouble executing a servlet under jakarta-tomcat-4.1.18. 
The examples web app that comes with Tomcat works fine.

I created a webapp in conf/server.xml as

Context path=/jasonTest
   docBase=jasonTest
   debug=0
   reloadable=true 
   Logger className=org.apache.catalina.logger.FileLogger
prefix=jasonTest suffix=.out
 /
   /Context
Under webapps/jasonTest the directory structure looks like:

neptune:root ls -lR *
WEB-INF:
total 16
drwxr-xr-x   2 root software   1024 Aug 01 09:52 classes
drwxr-xr-x   2 root software512 Aug 01 09:52 jsp
WEB-INF/classes:
total 8
-rw-r--r--   1 root software   2102 Aug 01 09:51 
HelloWorldExample.class

WEB-INF/jsp:
total 0
images:
total 0
jsp:
total 0
servlets:
total 0
neptune:root
In my browser I go to  
http://neptune/jasonTest/servlet/HelloWorldExample; and get a page not 
found (404).

I am running it on port 80.  The only difference between my webapp and 
the examples webapp is that I have no web.xml.

My friend has no problem on his Tomcat server with no web.xml (running 
the same version of Tomcat).  He runs servlets without web.xml just fine.

Any help would be great!

Thanks.

--
jason/


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


RE: running a servlet

2003-08-01 Thread Shapira, Yoav

Howdy,

In my browser I go to 
http://neptune/jasonTest/servlet/HelloWorldExample; and get a page not
found (404).

I am running it on port 80.  The only difference between my webapp and
the examples webapp is that I have no web.xml.

My friend has no problem on his Tomcat server with no web.xml (running
the same version of Tomcat).  He runs servlets without web.xml just
fine.

Either your friend or your observation is wrong: add web.xml, and in it
add a definition (servlet tag) and mapping (servlet-mapping tag) for
your servlet.  Then you'll be able to access it.

For a better overall structure, move JSP out of WEB-INF, add a lib
directory under WEB-INF for 3rd party jars your app may need, and put
your servlet in a package.  But all those are optional.

Yoav Shapira



This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


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



JDBCRealm

2003-08-01 Thread Gregg Bolinger
I have been struggling trying to get this to work and I can't tell if I
am doing something wrong, or leaving something out, or what. Below is
all my code, then I will say what is happening: 
server.xml (relivant snippit) 
code: 
  _  


Realm  className=org.apache.catalina.realm.JDBCRealm debug=99
driverName=com.mysql.jdbc.Driver
connectionURL=jdbc:mysql://localhost/holocron
connectionName=gdboling connectionPassword=bolinger
userTable=users 
userNameCol=Username 
userCredCol=Password
userRoleTable=user_roles 
roleNameCol=Role /
  _  

web.xml (relivant snippit) 
code: 
  _  


security-constraint
web-resource-collection
  web-resource-nameSecurePages/web-resource-name
  descriptionSecurity constraint /secure/description
  url-pattern/secure/*/url-pattern
  http-methodGET/http-method
http-methodPOST/http-method
http-methodPUT/http-method
/web-resource-collection
auth-constraint 
  role-nameadmin/role-name 
  /auth-constraint
  user-data-constrainttransport-guarantee
NONE/transport-guarantee/user-data-constraint
/security-constraint
  
login-config
  auth-methodFORM/auth-method
  form-login-config
form-login-page/login.jsp/form-login-page
form-error-page/loginerror.jsp/form-error-page
  /form-login-config
/login-config
security-role
role-nameadmin/role-name
/security-role
  _  

login.jsp 
code: 
  _  


[EMAIL PROTECTED] contentType=text/html%
html
headtitleJSP Page/title/head
body
form action='j_security_check' method=POST
TABLE
TR
TD
UserName
/TD
TD
INPUT type='text' name='j_username' value=''
/TD
/TR
TR
TD
Password
/TD
TD
INPUT type='password' name='j_password' value=''
INPUT type='submit' name='submit' value='submit'
/TD
/TR
/TABLE
/body
/html
  _  

And my database has 2 tables 
users
Username
Password 
user_roles
Username
Role 
-
Now, I have a page in a folder called secure called AddReference.jsp.
When I try and access this page, I do get redirected to login.jsp. I
enter my username and password that I have stored in the database and
after clicking submit, I am taken to my loginerror.jsp page. I should be
redirected back to AddReference.jsp. I am entering the correct username
and password as I only have one entry. I get no compilation errors or
Tomcat errors when loading or stopping. 
If anyone has some insight to my problem, I would be greatly
appreciated. 
Thanks
Gregg Bolinger
 


RES: RES: Cookie problem max age problem - Best practice to solve it

2003-08-01 Thread Jose Euclides da Silva Junior - DATAPREVRJ
Steve,
the authentication app's plugin wasnt created by me, its only stored on
TomCat to be used by my Java app. This plugin runs together with another app
server, which completes the authentication process. After this process is
completed ok, a cookie is created. So, when the user asks for logout, the
plugin tries to delete the cookie, probably setting 0 to max age. If i work
with OC4J, this steps runs fine and the user becomes abled to make another
login request on the same browser instance, without needing to close it.
But, if i work with TomCat, i need to close the browser instance and open
another one to be sucessful.
Needing help still.
Regards, Euclides.   

-Mensagem original-
De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Enviada em: sexta-feira, 1 de agosto de 2003 10:11
Para: 'Tomcat Users List'
Assunto: Re: RES: Cookie problem max age problem - Best practice to
solve it


srevilak Setting the max age of a cookie to zero is the proper way to
srevilak delete a cookie.  When doing the deletion, are you sure that
srevilak the name, domain, and path values are identical to the ones
srevilak used when the cookie was initially set?

jose Thanks for your attention! The question stays alive because this
jose plugin runs fine on OC4J(Oracle) environment, but its always a
jose failure on Tomcat env.  Any other help would be appreciated.
jose Euclides.

It's perfectly okay for a cookie to be set by one application, then
removed by another.

What are the values used for domain, path, and name when the cookie is
set?  Most useragents provide a way to have the user prompted for each
cookie.  That would be a helpful thing to do in this case.

What are the values used for domain, path, and name when the cookie is
deleted?

While domain and path are set when sending a cookie, the client only
sends back the name and value pair (domain and path are used by the
client in determining what cookies to send).  As a result, something
like this won't work

  deleteCookie.setDomain(cookieFromClient.getDomain());

hth.

-- 
Steve

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

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



The same servlet through 2 different URL

2003-08-01 Thread Moraes, Fabio

SCENE: I'm using Tomcat 4.1.

I want my servlet Principal.class to be called when someone access
http://localhost/projname/ OR http://localhost/projname/index

I put this in webapps/projname/web.xml:

   servlet
   servlet-namePrincipal/servlet-name
   servlet-classservlets.Principal/servlet-class
   /servlet

and this:

   servlet-mapping
  servlet-namePrincipal/servlet-name
  url-pattern//url-pattern
   /servlet-mapping

Everything works for http://localhost/projname/, but not for
http://localhost/projname/index.

Then, I tried:

   servlet-mapping
  servlet-namePrincipal/servlet-name
  url-pattern//url-pattern
  url-pattern/index/url-pattern
   /servlet-mapping

Everything works for http://localhost/projname/index, but not for
http://localhost/projname/.

It seems the last URL-PATTERN tag overwrites the others ...

How could I make it work fine ?

Thanks,

---
 Fabio Moraes
 [EMAIL PROTECTED]
 System Engineer
 Work Force Management System
 +55 21 3088 9548


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



JSP Parser

2003-08-01 Thread Tim Lee
Hello,

I'm interested in finding just a jsp parser and not an entire applicaiton
server.  Is there anyway to user Jasper outside of Tomcat without the web
and app servers?

Thanks,
Tim
***
The information contained in this message is intended only for the
confidential use of the recipient(s) named above. This message is privileged
and confidential. If the reader of this message is not the intended
recipient or any agent responsible for delivering it to the intended
recipient, you are hereby notified that you have received this document in
error and that any review, dissemination, distribution, or copying of this
message is strictly prohibited. If you have received this communication in
error, please notify us immediately. SMG reserves the right to monitor and
review all content sent to and from this email address. Messages sent to and
from this address may be stored on the SMG email system.

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



RE: The same servlet through 2 different URL

2003-08-01 Thread Shapira, Yoav

Howdy,
You can have two servlet-mapping tags for your servlet.

As an aside, IMHO Principal is not that good a name for a servlet as one
might confuse it with java.security.Principal.

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: Moraes, Fabio [mailto:[EMAIL PROTECTED]
Sent: Friday, August 01, 2003 10:53 AM
To: Tomcat Users
Subject: The same servlet through 2 different URL
Importance: High


SCENE: I'm using Tomcat 4.1.

I want my servlet Principal.class to be called when someone access
http://localhost/projname/ OR http://localhost/projname/index

I put this in webapps/projname/web.xml:

   servlet
   servlet-namePrincipal/servlet-name
   servlet-classservlets.Principal/servlet-class
   /servlet

and this:

   servlet-mapping
  servlet-namePrincipal/servlet-name
  url-pattern//url-pattern
   /servlet-mapping

Everything works for http://localhost/projname/, but not for
http://localhost/projname/index.

Then, I tried:

   servlet-mapping
  servlet-namePrincipal/servlet-name
  url-pattern//url-pattern
  url-pattern/index/url-pattern
   /servlet-mapping

Everything works for http://localhost/projname/index, but not for
http://localhost/projname/.

It seems the last URL-PATTERN tag overwrites the others ...

How could I make it work fine ?

Thanks,

---
 Fabio Moraes
 [EMAIL PROTECTED]
 System Engineer
 Work Force Management System
 +55 21 3088 9548


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




This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


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



RES: Cookie problem max age problem - Best practice to solve it

2003-08-01 Thread srevilak
 Assunto: Re: RES: Cookie problem max age problem - Best practice to solve it

 the authentication app's plugin wasnt created by me, its only stored on
 TomCat to be used by my Java app. This plugin runs together with another app
 server, which completes the authentication process. After this process is
 completed ok, a cookie is created. So, when the user asks for logout, the
 plugin tries to delete the cookie, probably setting 0 to max age. If i work
 with OC4J, this steps runs fine and the user becomes abled to make another
 login request on the same browser instance, without needing to close it.
 But, if i work with TomCat, i need to close the browser instance and open
 another one to be sucessful.
 Needing help still.
 Regards, Euclides.


This does not change any of the previous discussion.  The problem
hinges on the answers to two questions:

 What are the values used for domain, path, and name when the cookie
 is set?

 What are the values used for domain, path, and name when the cookie
 is deleted?

If you can demonstrate that the same set of values are used in both
cases, then this sounds like it would be a tomcat problem.  You can
examine the Set-Cookie headers sent by the server to see whether this
is the case.

Otherwise, this is an issue that should be raised with the vendor who
provided the authentication plugin.

-- 
Steve

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



Re: Problem confinguring MySQL JNDI Datasource RH Linux 7.2

2003-08-01 Thread Geralyn M Hollerman
Scott Stewart wrote:
 Well, at first glance it appears that you are using an incorrectly named
 parameter for the DataSource implementation that you are now using.  The
 link you provided states that you need to provide a parameter named user;
 however, you are still using the username parameter that I provided in my
 example.  Try changing this to user.

I had a question about this very thing - I noticed the same difference
and was about to ask if it mattered, since this is a parameter and not
an element itself. I went to the on-line Tomcat JNDI Datasource HOW-T),
and it was given as username there, and in a message from someone
saying that he'd verified that his server.xml was doing connection
pooling, it was also username. I don't have the source code, and I'm
no XML guru - but does it matter?

Thanks!
 

-- 
Lynn Hollerman.

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



Re: connection pooling and server.xml

2003-08-01 Thread Geralyn M Hollerman
Bill2 wrote:

 I am using Tomcat 4.0.4, MySQL Max 3.23.51 on Linux 7.2 and
 mysql-connector-java-3.0.8-stable-bin.jar.  I got it to work in my
 development environment NetBeans 3.5, but when I put it on the
 production server by changing the server.xml file as instructed at:
 
 http://jakarta.apache.org/tomcat/tomcat-4.1-doc/printer/jndi-datasource-examples-howto.html#MySQL%20DBCP%20Example
 
 Tomcat doesn't  even start.
 
 I have looked in the log files for startup errors, server.xml parsing
 errors, etc. but can't find any.  Any ideas on what is going wrong or
 how to figure out what it doesn't like about the server.xml file?

I'm not familiar with NetBeans, but can you verify that Tomcat is indeed
running in both environments - say without pooling? When you try to
start it in production, is anything happening to your catalina.out file?

-- 
Lynn Hollerman.

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



RE: Threading Question

2003-08-01 Thread Extance, Paul
We have had similar issues with wanting some objects to be accessible by any
classes executing in a thread that is processing the response. Our solution
was to use ThreadLocal to create a thread variable, if you are using either
a FrontController (like Struts) or a Filter that each request must pass
through, you can create the thread variable on entry, and unset it in the
'finally' block of your controller...

For an example of this here is...

a) a modified version of Struts controller that sets the variable via our
SecurityManager
http://jaffa.sourceforge.net/javadoc/1_2_0/src-html/org/jaffa/presentation/p
ortlet/PortletServlet.html#line.205

b) The class that actually manages the variable and uses it.
http://jaffa.sourceforge.net/javadoc/1_2_0/src-html/org/jaffa/security/Secur
ityManager.html#line.358

The core of this is simply...
364// Attach the security context to the thread
365bindToThread(ctx);
366try {
367// Now invoke the method
368return method.invoke(obj, args);
369} finally {
370// As the last thing to do before returning either an
object or an exception
371// Remove the current context from the thread
372unbindFromThread();
373}

If you want to use a filter, just replace the above 'return' with a
chain.doFilter( request, response ) inside your doFilter() method.

I think the concern with a static Map, it that it could give one thread
access to another threads data. I guess this is why things like
java.servlet.http.HttpSessionContext were deprecated in v2.2 because of
cross request access.

Paul Extance

-Original Message-
From: Bill Barker [mailto:[EMAIL PROTECTED] 
Sent: Thursday, July 31, 2003 9:54 PM
To: [EMAIL PROTECTED]
Subject: Re: Threading Question


Roggeveen, Brian P [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Hello,

 I was wondering if it is safe to assume that when using the multithreaded
 model, a single unique thread will handle each incoming request? In other
 words, does the servlet container implement a thread per connection model
or
 is there a way to specify this configuration?

The thread-per-connection model is mandated in the Servlet spec, so Tomcat
(and any other compliant Servlet-Container) will behave this way.


 The reason I ask is that at any given point within my servlets' supporting
 code/beans, I would like to have access to the HttpSession instance that
 corresponds to the client for whom the current line of code is being
 executed. Another way of looking at the situation would be at any given
 point within my servlets' supporting code/beans, I would like to have
access
 to the HttpRequest that caused this particular line of code to be
executed.
 In order to accomplish this, I envisioned using a Map that contained
thread
 keys and HttpSession values. As requests came in, the Map would be updated
 appropriately such that supporting code need only look up an HttpSession
 using the current thread. Maybe I'm making this more complex than it needs
 to be.

You are most definitely making this more complex than it needs to be ;-).


 Thanks!
 Brian Roggeveen
 EDS - Work Force Management
 Voice: (314) 264-8991
 Fax:(314) 264-8901
 Email: [EMAIL PROTECTED]




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

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



Suggestions ?

2003-08-01 Thread Mufaddal Khumri
Yes, thats a helpful function ... I was looking at :
http://jakarta.apache.org/taglibs/doc/string-doc/string-1.0.1/ 
index.html
to see if i can find a good tag library to use ... havent found one  
that i could use yet. Am hoping that someone on the list has pointers  
to some standard function or taglib.

Thanks.

On Friday, August 1, 2003, at 02:57  AM, Steph Richardson wrote:

I assume any html type tags that may be included in the text, you  
would want rendered as visible HTML tags in the browser. So use a
HTML encoding method. There doesn't seem to be a JRE standard for  
this, so something like this will do it :

	public static String HTMLEncode( String unenc )
	{
		final String[] tokens = new String[] {, , \, '};
		final String[] replacement = new String[] {lt;, gt;,  
quot;, #39;};

StringBuffer sb = new StringBuffer(unenc);
for(int i = 0; itokens.length; i++)
{
int idx = 0;
while((idx = sb.indexOf(tokens[i], idx)) != -1)
sb.replace(idx, idx + tokens[i].length(), 
replacement[i]);
}
return sb.toString();
}
-Original Message-
From: Mufaddal Khumri [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 31, 2003 4:51 AM
To: Tomcat Users List
Subject: Suggestions ?
Hi,

Am using tomcat 4.1.24.

Have a XYZ.jsp with a form on it take data from the user. Once the  
user
clicks submit the data is stored in the  database and the data that  
the
user entered is shown to him on  ABC.jsp.

The problem is that the user can enter anything in the text field and
text area of the form on XYZ.jsp. For example in the description text
area he or she might enter - text, an http url, maybe html tags etc.
Now when i grab this data from the form and store it to the databse  
it
works fine, but when i grab the data from the database and render it  
on
ABC.jsp it gets messed up because the html tags in the data interfere
with the html of the page. Is there a way in tomcat escape such
characters or are there java methods that i could use to pass this
string through that would do the escaping for me ?

Thanks.

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




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


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


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


FORM Login Bypassed

2003-08-01 Thread Ronnie
Hi!

I have this web application using FORM login access but I am having problem directing 
the navigation to the defined login page when user clicks on a secure link.

You see, I am using a DispatcherServlet as a navigation controller to direct users to 
the correct page and the URL is coded as:

a href=dispatcher?action=adminadmin/a

Where dispatcher is the URL name of the DispatcherServlet. In the servlet, admin 
is translated to /computers/admin/index.jsp from values coded in web.xml.

Now when I declare the  protected url-pattern as /computers/admin/* as below, when I 
click on the above link the login page is bypassed and I can access the admin index 
page without logging in.

security-constraint
 web-resource-collection
web-resource-nameAdministration functions/web-resource-name
!--url-patterndispatcher?action=admin/url-patternDoes not work! --
url-pattern/computers/admin/*/url-pattern
 /web-resource-collection
 auth-constraint
!-- Anyone with one of the listed roles may access this area --
role-nameadmin/role-name
 /auth-constraint

  !-- HTTPS/SSL--
 user-data-constraint
transport-guaranteeCONFIDENTIAL/transport-guarantee
 /user-data-constraint
  /security-constraint

login-config
 auth-methodFORM/auth-method
   form-login-config
form-login-pagedispatcher?action=adminLogin/form-login-page
   form-error-pagedispatcher?action=adminLoginFail/form-error-page
  /form-login-config
/login-config

To overcome this I had to hardcode the link in my webpage as: a 
href=/Computers/computers/admin/index.jspadmin/a

I wish to keep my navigation based on logical names. Is there a work-around or 
solution to this problem?



Regards,
Ronnie Choo
Singapore




RE: FORM Login Bypassed

2003-08-01 Thread Mike Curwen
When your dispatcher does the translation, does it forward or include
the 'actual' resource ?  Meaning it takes place entirely server-side ?
If you did a sendRedirect, that would then make the browser request the
protected resource directly, which would invoke the AUTH, if the AUTH is
configured correctly. And it looks right to me.
 
What it sounds like is that once you are on the server-side (by
requesting the un-protected /dispatcher resource) that any server-side
forwards or includes are not being authenticated.  I wasn't aware that
was the case.
 
It works this way for filters though, but in the next servlet spec (2.4)
we'll have filter mappings being honoured for forwards and includes as
well (configurable).  


 -Original Message-
 From: Ronnie [mailto:[EMAIL PROTECTED] 
 Sent: Friday, August 01, 2003 11:35 AM
 To: [EMAIL PROTECTED]
 Subject: FORM Login Bypassed
 
 
 Hi!
 
 I have this web application using FORM login access but I am 
 having problem directing the navigation to the defined login 
 page when user clicks on a secure link.
 
 You see, I am using a DispatcherServlet as a navigation 
 controller to direct users to the correct page and the URL is 
 coded as:
 
 a href=dispatcher?action=adminadmin/a
 
 Where dispatcher is the URL name of the DispatcherServlet. 
 In the servlet, admin is translated to 
 /computers/admin/index.jsp from values coded in web.xml.
 
 Now when I declare the  protected url-pattern as 
 /computers/admin/* as below, when I click on the above link 
 the login page is bypassed and I can access the admin index 
 page without logging in.
 
 security-constraint
  web-resource-collection
 web-resource-nameAdministration 
 functions/web-resource-name
 !--
 url-patterndispatcher?action=admin/url-patternDoes 
 not work! --
 url-pattern/computers/admin/*/url-pattern
  /web-resource-collection
  auth-constraint
 !-- Anyone with one of the listed roles may access 
 this area --
 role-nameadmin/role-name
  /auth-constraint
 
   !-- HTTPS/SSL--
  user-data-constraint
 transport-guaranteeCONFIDENTIAL/transport-guarantee
  /user-data-constraint
   /security-constraint
 
 login-config
  auth-methodFORM/auth-method
form-login-config
 form-login-pagedispatcher?action=adminLogin/form-login-page
form-error-pagedispatcher?action=adminLoginFail/form-error-page
   /form-login-config
 /login-config
 
 To overcome this I had to hardcode the link in my webpage as: 
 a href=/Computers/computers/admin/index.jspadmin/a
 
 I wish to keep my navigation based on logical names. Is there 
 a work-around or solution to this problem?
 
 
 
 Regards,
 Ronnie Choo
 Singapore
 
 
 


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



Re: FORM Login Bypassed

2003-08-01 Thread Tim Funk
Security constraints are imposed on the incoming url.

Query strings are not used in servlet mapping declarations.

-Tim

Ronnie wrote:
Hi!

I have this web application using FORM login access but I am having problem directing the navigation to the defined login page when user clicks on a secure link.

You see, I am using a DispatcherServlet as a navigation controller to direct users to the correct page and the URL is coded as:

a href=dispatcher?action=adminadmin/a

Where dispatcher is the URL name of the DispatcherServlet. In the servlet, admin is translated to /computers/admin/index.jsp from values coded in web.xml.

Now when I declare the  protected url-pattern as /computers/admin/* as below, when I click on the above link the login page is bypassed and I can access the admin index page without logging in.

security-constraint
 web-resource-collection
web-resource-nameAdministration functions/web-resource-name
!--url-patterndispatcher?action=admin/url-patternDoes not work! --
url-pattern/computers/admin/*/url-pattern
 /web-resource-collection
 auth-constraint
!-- Anyone with one of the listed roles may access this area --
role-nameadmin/role-name
 /auth-constraint
  !-- HTTPS/SSL--
 user-data-constraint
transport-guaranteeCONFIDENTIAL/transport-guarantee
 /user-data-constraint
  /security-constraint
login-config
 auth-methodFORM/auth-method
   form-login-config
form-login-pagedispatcher?action=adminLogin/form-login-page
   form-error-pagedispatcher?action=adminLoginFail/form-error-page
  /form-login-config
/login-config
To overcome this I had to hardcode the link in my webpage as: a href=/Computers/computers/admin/index.jspadmin/a

I wish to keep my navigation based on logical names. Is there a work-around or solution to this problem?



Regards,
Ronnie Choo
Singapore




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


Servlets JSPs log to different files

2003-08-01 Thread Rick Roberts
What is standard/recomended approach to getting my servlets and JSPs to log to 
the same file.

I am currently using the context logger in server.xml as follows:

!-- ActionItems Context --
Context path=/ai docBase=ai debug=0 reloadable=true crossContext=true
Logger className=org.apache.catalina.logger.FileLogger prefix=ai_log. 
suffix=.txt timestamp=true/
/Context

My JSP logs into /var/log/tomcat/ai_log.2003-08-01.txt
But my servlets log into /var/log/tomcat/catalina.out
Thanks,

--
***
* Rick Roberts*
* Advanced Information Technologies, Inc. *
***
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: Servlets JSPs log to different files

2003-08-01 Thread Shapira, Yoav

Howdy,

What is standard/recomended approach to getting my servlets and JSPs to
log
to
the same file.

I am currently using the context logger in server.xml as follows:

!-- ActionItems Context --
Context path=/ai docBase=ai debug=0 reloadable=true
crossContext=true
Logger className=org.apache.catalina.logger.FileLogger
prefix=ai_log.
suffix=.txt timestamp=true/
/Context

My JSP logs into /var/log/tomcat/ai_log.2003-08-01.txt
But my servlets log into /var/log/tomcat/catalina.out

How are you logging in your servlets?  Are you using
System.out/System.err?  If so, don't use them, and instead use the
ServletContext#log(..) methods.  Output from the servlet context log
methods will end up in your context logger, ai_log... above.

Alternatively, use a logging kit like log4j and have both your JSPs and
servlets use it.

Yoav Shapira



This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


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



Re: FORM Login Bypassed

2003-08-01 Thread Ronnie

- Original Message -
From: Mike Curwen [EMAIL PROTECTED]
To: 'Tomcat Users List' [EMAIL PROTECTED]
Sent: Saturday, August 02, 2003 12:45 AM
Subject: RE: FORM Login Bypassed


 When your dispatcher does the translation, does it forward or include
 the 'actual' resource ?  Meaning it takes place entirely server-side ?

This is how I dispatched it:

  RequestDispatcher rd = request.getRequestDispatcher(resource);

  // Forward resource, resource is the URL. IE:
/computers/admin/index.jsp
  try {
 rd.forward(request, response);
  } catch (ServletException e) {...}

 If you did a sendRedirect, that would then make the browser request the
 protected resource directly, which would invoke the AUTH, if the AUTH is
 configured correctly. And it looks right to me.

How do you do a sendRedirect? Sorry, I'm still quite green in servlet
programming...

 What it sounds like is that once you are on the server-side (by
 requesting the un-protected /dispatcher resource) that any server-side
 forwards or includes are not being authenticated.  I wasn't aware that
 was the case.

 It works this way for filters though, but in the next servlet spec (2.4)
 we'll have filter mappings being honoured for forwards and includes as
 well (configurable).

Thanks alot for the help and info!


  -Original Message-
  From: Ronnie [mailto:[EMAIL PROTECTED]
  Sent: Friday, August 01, 2003 11:35 AM
  To: [EMAIL PROTECTED]
  Subject: FORM Login Bypassed
 
 
  Hi!
 
  I have this web application using FORM login access but I am
  having problem directing the navigation to the defined login
  page when user clicks on a secure link.
 
  You see, I am using a DispatcherServlet as a navigation
  controller to direct users to the correct page and the URL is
  coded as:
 
  a href=dispatcher?action=adminadmin/a
 
  Where dispatcher is the URL name of the DispatcherServlet.
  In the servlet, admin is translated to
  /computers/admin/index.jsp from values coded in web.xml.
 
  Now when I declare the  protected url-pattern as
  /computers/admin/* as below, when I click on the above link
  the login page is bypassed and I can access the admin index
  page without logging in.
 
  security-constraint
   web-resource-collection
  web-resource-nameAdministration
  functions/web-resource-name
  !--
  url-patterndispatcher?action=admin/url-patternDoes
  not work! --
  url-pattern/computers/admin/*/url-pattern
   /web-resource-collection
   auth-constraint
  !-- Anyone with one of the listed roles may access
  this area --
  role-nameadmin/role-name
   /auth-constraint
 
!-- HTTPS/SSL--
   user-data-constraint
  transport-guaranteeCONFIDENTIAL/transport-guarantee
   /user-data-constraint
/security-constraint
 
  login-config
   auth-methodFORM/auth-method
 form-login-config
  form-login-pagedispatcher?action=adminLogin/form-login-page
 form-error-pagedispatcher?action=adminLoginFail/form-error-page
/form-login-config
  /login-config
 
  To overcome this I had to hardcode the link in my webpage as:
  a href=/Computers/computers/admin/index.jspadmin/a
 
  I wish to keep my navigation based on logical names. Is there
  a work-around or solution to this problem?
 
 
 
  Regards,
  Ronnie Choo
  Singapore
 
 
 


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



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



Possible configuration error in JK2-Environment (Apache 2.0.46, Tomcat 4.1.18/24)

2003-08-01 Thread nospam
Hi,
i get the order  to  configure  a  new  webhost  with  apache  as  the
exclusive  connection.  Behind the apache should be in furher future a
tomcat farm on serveral servers. Therefor, i install (a) an blank ger-
man  linux-distribution (SuSE 8.2) with binaries for Apache 2.0.46 and
Tomcat 4.1.18; read (b) a lot of Documentation and change (c)  several
config-files.

The first goal, two running standalone  servers  with  one  donain,  i
reached  very  quickly. The second goal, standalone servers with named
virtual hosts(!), are a bit more complex, but reached too.

Now should hide tomcat behind the apache. I create the workers2.prop-
erties and the jk2.properties, set JkUri Statements in apaches vir-
tual host  section,  change  tomcats  server.xml  to  use  an  other
connector  and so one. In worst case, it happens nothing. In best case
i get an lot of errors if i ask the apache for  an  index.jsp.  This
implied  for  me,  that  the basic communication are existing, but the
speak suaheli and esperanto and don't understanding each other. It
was irrelevant what i do, as install the binaries of tomcat 4.1.24, or
tries other possibilities in the  config-files,  i  was  not  able  to
change  the  situation. In the best case (they talk together, or tries
at least) i get messages like following in apaches error log:

..[error] msgAjp.receive(): Bad signature 00
..[notice] BAD MESSAGE:  pos=4 len=4 max=8192
..[notice] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
..[error] channelSocket.receive(): Bad header
..[error] workerEnv.processCallbacks() Error reading reply
..[error] ajp13.service() ajpGetReply recoverable error 12

On tomcat side it look like:

.. PM org.apache.tomcat.util.log.CommonLogHandler log
SEVERE: Caught exception executing
[EMAIL PROTECTED], terminating thread
java.lang.NullPointerException
at org.apache.jk.common.ChannelSocket
  .processConnection  (ChannelSocket.java:597)
at org.apache.jk.common.SocketConnection
  .runIt  (ChannelSocket.java:707)
at org.apache.tomcat.util.threads
  .ThreadPool$ControlRunnable.run(ThreadPool.java:530)
at java.lang.Thread.run  (Thread.java:536)

I think i have do all what i can. The next (and last)  step  are  take
the source-code and begin with debugging.

In the appendix i add more or less my config-files. I  build  an  hole
*.tar.bz2  with  the  complete  relevant  files (i think), but this is
with 38KB to big for the list. Therfor i add short snipplets from  the
right config-files.

Maybe had someone a running minimal configuration, or  know  where  is
one available.

Thanks for help.
Christian.

PS.:

The apache-error.log has for every apache-thread one line like follow:

..[error] jk2_init() Can't find child 12957 in scoreboard

Over this i readed a little bit in the mailing list, but the change of
the  start-sequence  don't kill this messages. Had it an effect of the
hole system?

 /etc/apache2/httpd.conf: ---

:
IfModule mod_jk2.c
  JkSet  config.file /etc/apache2/workers2.properties
/IfModule
:
NameVirtualHost *
VirtualHost*
  DocumentRoot  /opt/jakarta/tomcat/current/webapps/
  ServerNamebotanix-vhost00.muthpartners.de
  ServerAlias   botanix-vhost00.muthpartners
  ServerAlias   botanix-vhost00
  ErrorLog  /var/log/apache2/vhost00-error.log
  CustomLog /var/log/apache2/vhost00-access.log common

  JkSet  uri:botanix-vhost00/*.jsp.group  ajp13:localhost:9000

#  DirectoryIndex index.jsp

  Directory/opt/jakarta/tomcat/current/webapps
AllowOverride None
Options +Indexes +FollowSymLinks
Order   deny,allow
deny from   all
allow from  localhost
allow from  172.16.0
  /Directory
/VirtualHost
:

 /etc/apache2/workers2.properties ---

:
[logger.apache2]
level=DEBUG

[status:status]
info=Status Worker
debug=10

[shm]
debug=10
file=/opt/jakarta/tomcat/current/work/jk2.shm
size=1048576

[channel.socket:localhost:9000]
port=9000
host=127.0.0.1

[ajp13:localhost:9000]
channel=channel.socket:localhost:9000
:

/opt/jakarta/tomcat/node0/conf/server.xml ---

Server className=org.apache.catalina.core.StandardServer
debug=99 port=9099 shutdown=SHUTDOWN
 Service debug=99 name=Service00
  Connector className=org.apache.coyote.tomcat4.CoyoteConnector
 acceptCount=10 bufferSize=2048 connectionTimeout=
 2 debug=99 disableUploadTimeout=true
 enableLookups=true maxProcessors=15 minProcessors=5
 port=9000 protocolHandlerClassName=
 org.apache.jk.server.JkCoyoteHandler proxyPort=0
 redirectPort=9043 scheme=http secure=false
 tcpNoDelay=true useURIValidationHack=false/
  Engine defaultHost=botanix-vhost00.muthpartners.de debug=99
  name=Engine00
   Host 

Re: Servlets JSPs log to different files

2003-08-01 Thread Rick Roberts


How are you logging in your servlets?  Are you using
System.out/System.err?  If so, don't use them, and instead use the
ServletContext#log(..) methods.
Actually, they are mostly beans with no ServletContext :(

--
***
* Rick Roberts*
* Advanced Information Technologies, Inc. *
***
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Administration Tool Does Not Display Group Roles etc. so I can't use the tool

2003-08-01 Thread David Chugg
Hi,

This may be a problem with my Browser, but both Netscape and Internet 
Explorer have the same problem. I simply log into the Tomcat Web Server 
Administration Tool and try to add a user with roles. I can add the user but 
the table of roles does not display. The same is true if I try to add a new 
group, I can add the group name but the list of roles with checkboxes does 
not display. I've gone into Internet Options and tried to make is so that 
everything will work but this doesn't solve the problem. I'm using Internet 
Explorer Version 6 on a Windows 98 machine  Netscape Version 4.

Any suggestions?

Thank you!

Dave

_
Protect your PC - get McAfee.com VirusScan Online  
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963

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


Sorry in resending (Possible configuration error...)

2003-08-01 Thread nospam
My email-client (M$-OE) is currently breaked down, and repeat the last
message.


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



RE: Threading Question

2003-08-01 Thread Roggeveen, Brian P
You are right about the Map. The ThreadLocal class is exactly what I am
looking for. Thanks for your help!

-Original Message-
From: Extance, Paul [mailto:[EMAIL PROTECTED] 
Sent: Friday, August 01, 2003 10:40 AM
To: 'Tomcat Users List'
Subject: RE: Threading Question


We have had similar issues with wanting some objects to be accessible by any
classes executing in a thread that is processing the response. Our solution
was to use ThreadLocal to create a thread variable, if you are using either
a FrontController (like Struts) or a Filter that each request must pass
through, you can create the thread variable on entry, and unset it in the
'finally' block of your controller...

For an example of this here is...

a) a modified version of Struts controller that sets the variable via our
SecurityManager
http://jaffa.sourceforge.net/javadoc/1_2_0/src-html/org/jaffa/presentation/p
ortlet/PortletServlet.html#line.205

b) The class that actually manages the variable and uses it.
http://jaffa.sourceforge.net/javadoc/1_2_0/src-html/org/jaffa/security/Secur
ityManager.html#line.358

The core of this is simply...
364// Attach the security context to the thread
365bindToThread(ctx);
366try {
367// Now invoke the method
368return method.invoke(obj, args);
369} finally {
370// As the last thing to do before returning either an
object or an exception
371// Remove the current context from the thread
372unbindFromThread();
373}

If you want to use a filter, just replace the above 'return' with a
chain.doFilter( request, response ) inside your doFilter() method.

I think the concern with a static Map, it that it could give one thread
access to another threads data. I guess this is why things like
java.servlet.http.HttpSessionContext were deprecated in v2.2 because of
cross request access.

Paul Extance

-Original Message-
From: Bill Barker [mailto:[EMAIL PROTECTED] 
Sent: Thursday, July 31, 2003 9:54 PM
To: [EMAIL PROTECTED]
Subject: Re: Threading Question


Roggeveen, Brian P [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Hello,

 I was wondering if it is safe to assume that when using the 
 multithreaded model, a single unique thread will handle each incoming 
 request? In other words, does the servlet container implement a thread 
 per connection model
or
 is there a way to specify this configuration?

The thread-per-connection model is mandated in the Servlet spec, so Tomcat
(and any other compliant Servlet-Container) will behave this way.


 The reason I ask is that at any given point within my servlets' 
 supporting code/beans, I would like to have access to the HttpSession 
 instance that corresponds to the client for whom the current line of 
 code is being executed. Another way of looking at the situation would 
 be at any given point within my servlets' supporting code/beans, I 
 would like to have
access
 to the HttpRequest that caused this particular line of code to be
executed.
 In order to accomplish this, I envisioned using a Map that contained
thread
 keys and HttpSession values. As requests came in, the Map would be 
 updated appropriately such that supporting code need only look up an 
 HttpSession using the current thread. Maybe I'm making this more 
 complex than it needs to be.

You are most definitely making this more complex than it needs to be ;-).


 Thanks!
 Brian Roggeveen
 EDS - Work Force Management
 Voice: (314) 264-8991
 Fax:(314) 264-8901
 Email: [EMAIL PROTECTED]




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

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

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



RE: Servlets JSPs log to different files

2003-08-01 Thread Shapira, Yoav

Howdy,
Then use log4j.

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: Rick Roberts [mailto:[EMAIL PROTECTED]
Sent: Friday, August 01, 2003 1:18 PM
To: Tomcat Users List
Subject: Re: Servlets  JSPs log to different files



 How are you logging in your servlets?  Are you using
 System.out/System.err?  If so, don't use them, and instead use the
 ServletContext#log(..) methods.

Actually, they are mostly beans with no ServletContext :(

--
***
* Rick Roberts*
* Advanced Information Technologies, Inc. *
***


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




This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


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



RE: Checking for invalidated session

2003-08-01 Thread Justin Ruthenbeck
At 01:10 AM 8/1/2003, you wrote:
But surely theres a better way?
 Whould I be better off replacing session.invalidate() with session = 
null?
No, you wouldn't be better off -- it won't work.  :)  There's no reason not 
to like this solution, IMHO.  If it makes your code look ugly, put it in a 
static method and make it look like this:

if (SessionUtil.isInvalid(session))

justin


At 08:31 AM 7/31/2003, you wrote:
How can you check to see if a session has already been validated?
i.e.
  if( !session.isInvalidated()) -- what should go here?
{
 session.invalidate();
}

to prevent the following exception:
org.apache.jasper.JasperException: invalidate: Session already invalidated
If you don't want to just catch and ignore the JasperException, then use
something like this:
try
{
 session.getAttributeNames();
}
catch (java.lang.IllegalStateException isse)
{
 // Session is already invalid
}
justin


Justin Ruthenbeck
Software Engineer, NextEngine Inc.
justinr - AT - nextengine DOT com
Confidential
See http://www.nextengine.com/confidentiality.php

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


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



Justin Ruthenbeck
Software Engineer, NextEngine Inc.
justinr - AT - nextengine DOT com
Confidential
   See http://www.nextengine.com/confidentiality.php

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


Problems with Tomcat in a high load environment

2003-08-01 Thread pete . storey
Hi,
we are running Tomcat 4.1.18 on Windows 2000 under JDK1.4.1_01.  We are 
using IIS as a web server connecting using the ISAPI JK 2 connector.  We 
are currently experiencing 2 seperate problems when under high load (ie  
30 requests per second):

1.  A huge number of log events (~30 sets per minute) are generated in the 
NT event log which show problems with the ISAPI connector.  Each time 
there is a problem, 7 lines are created:

Error: [jk_worker_ajp13.c (512)]: ajp13.service() Error  forwarding 
ajp13:localhost:8029 1 0
Error: [jk_worker_ajp13.c (416)]: ajp13.service() ajpGetReply recoverable 
error 3
Error: [jk_handler_response.c (178)]: handler.response() Error sending 
response 
Error: [jk_service_iis.c (157)]: jk_ws_service_t::head, 
ServerSupportFunction failed
Error: [jk_worker_ajp13.c (416)]: ajp13.service() ajpGetReply recoverable 
error 3
Error: [jk_handler_response.c (200)]: Error ajp_process_callback - write 
failed
Error: [jk_service_iis.c (247)]: jk_ws_service_t::write, WriteClient 
failed

These I think lead to the eventual crash of IIS however I also suspect 
that they may cause user errors though I havent actually seen any evidence 
of this.  Does anyone know anything about these errors or what I can do to 
reduce them?  Could it be a tuning of Tomcat issue?

2. The server is set up currently with -Xms512m and the same for Xmx. 
This, I would have thought, was OK for this application, though of course 
I could be wrong, but is in any case irrelevant to the problem as if I 
increase memory to 1Gb it makes no odds.
The server will run fine for a few minutes at about 128m of memory usage. 
At some (slightly random point with no obvious trigger), it will in a 
matter of seconds use up all available memory, thus triggering a huge rise 
in the processor usage which sits at roughly 50-60% (across 2 processors) 
constantly.  It is worth noting that 1 processor is not maxed out - the 
load is relatively evenly distributed.
After a further while, the young generation space runs out of memory and a 
process ensues of the processor load bouncing up to 100% and back to 60% 
over and over again as it GCs, reduces the momery used to ~ 15m less than 
it was, then it is used up again and so on.  This obviously seriously 
impacts the usage of the application.  I cant see why it is doing it; this 
is an ecommerce application and the loads are not that high - clearly a 
leak of some description is occuring somewhere but the speed with which 
these changes happen baffle me, and I dont thik there is much setup work I 
can do to change it.  I could install a profiler to find out whats going 
on but it is a live system and I am loath to do so.
Finally it is worth noting that I have only just made this system live and 
a functionally identical although architecturally simpler version ran 
quite happily under the same loads using no more than 256m of ram under 
JRun 3.1.

Any ideas?!

cheers
Pete

Kiss Technologies

http://www.kisstechnologies.co.uk/

4, Percy Street
London
W1T 1DF

Phone numbers:

Phone 020 7692 9922
Fax 020 7692 9923

RE: Problems with Tomcat in a high load environment

2003-08-01 Thread Shapira, Yoav

Howdy,
Even if your loathe to do it, a profiler is invaluable as long as the
profiled environment (your dev/test env) is close enough to production
to be meaningful.  You should profile, and run stress tests, on hardware
and software that's as similar as possible to production, before going
live.

FWIW, 30 requests/sec is not an extremely high load: most of our apps
routinely handle several times that load on standalone tomcat 4.1.24
(and starting at 12:01 tonight, 4.1.27 ;))

Have you tried running without the IIS front-end?  It could be worth a
shot.  Tomcat can handle the static files as well.

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
Sent: Friday, August 01, 2003 1:29 PM
To: [EMAIL PROTECTED]
Subject: Problems with Tomcat in a high load environment

Hi,
we are running Tomcat 4.1.18 on Windows 2000 under JDK1.4.1_01.  We are
using IIS as a web server connecting using the ISAPI JK 2 connector.
We
are currently experiencing 2 seperate problems when under high load (ie

30 requests per second):

1.  A huge number of log events (~30 sets per minute) are generated in
the
NT event log which show problems with the ISAPI connector.  Each time
there is a problem, 7 lines are created:

Error: [jk_worker_ajp13.c (512)]: ajp13.service() Error  forwarding
ajp13:localhost:8029 1 0
Error: [jk_worker_ajp13.c (416)]: ajp13.service() ajpGetReply
recoverable
error 3
Error: [jk_handler_response.c (178)]: handler.response() Error sending
response
Error: [jk_service_iis.c (157)]: jk_ws_service_t::head,
ServerSupportFunction failed
Error: [jk_worker_ajp13.c (416)]: ajp13.service() ajpGetReply
recoverable
error 3
Error: [jk_handler_response.c (200)]: Error ajp_process_callback -
write
failed
Error: [jk_service_iis.c (247)]: jk_ws_service_t::write, WriteClient
failed

These I think lead to the eventual crash of IIS however I also suspect
that they may cause user errors though I havent actually seen any
evidence
of this.  Does anyone know anything about these errors or what I can do
to
reduce them?  Could it be a tuning of Tomcat issue?

2. The server is set up currently with -Xms512m and the same for Xmx.
This, I would have thought, was OK for this application, though of
course
I could be wrong, but is in any case irrelevant to the problem as if I
increase memory to 1Gb it makes no odds.
The server will run fine for a few minutes at about 128m of memory
usage.
At some (slightly random point with no obvious trigger), it will in a
matter of seconds use up all available memory, thus triggering a huge
rise
in the processor usage which sits at roughly 50-60% (across 2
processors)
constantly.  It is worth noting that 1 processor is not maxed out - the
load is relatively evenly distributed.
After a further while, the young generation space runs out of memory
and a
process ensues of the processor load bouncing up to 100% and back to
60%
over and over again as it GCs, reduces the momery used to ~ 15m less
than
it was, then it is used up again and so on.  This obviously seriously
impacts the usage of the application.  I cant see why it is doing it;
this
is an ecommerce application and the loads are not that high - clearly a
leak of some description is occuring somewhere but the speed with which
these changes happen baffle me, and I dont thik there is much setup
work I
can do to change it.  I could install a profiler to find out whats
going
on but it is a live system and I am loath to do so.
Finally it is worth noting that I have only just made this system live
and
a functionally identical although architecturally simpler version ran
quite happily under the same loads using no more than 256m of ram under
JRun 3.1.

Any ideas?!

cheers
Pete

Kiss Technologies

http://www.kisstechnologies.co.uk/

4, Percy Street
London
W1T 1DF

Phone numbers:

Phone 020 7692 9922
Fax 020 7692 9923



This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


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



Problem with applet in jar file accessed from JSP page in area protected with a security constraint.

2003-08-01 Thread Jim Solderitsch
The problem occurs under my test environment which is a Mac Powerbook  
G4 running OS X 10.2.6 with Java Plug-in 1.4.1_01. I am running tomcat  
on this machine.

I am trying to first install and then extend a web application that is  
deployed under tomcat 4.1.24.

There is a login based configuration for most of the pages of the site  
-- I have security-contstraint tags and a login-config section in  
my applications web.xml file.

My problem is this:

One of the protected pages is a jsp (map.jsp) page that has an applet  
tag. This tag references a jar file that is also contained in the same  
protected folder (called /protected) as the jsp page.

When I login and access the page with the applet, in my java console I  
see the exception:

java.lang.ClassFormatError: com/gestalt/sgs/client/MapAsset (Bad magic  
number)
	at java.lang.ClassLoader.defineClass0(Native Method)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:502)
	at  
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
	at sun.applet.AppletClassLoader.findClass(AppletClassLoader.java:148)
	at  
sun.plugin.security.PluginClassLoader.findClass(PluginClassLoader.java:1 
68)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
	at sun.applet.AppletClassLoader.loadClass(AppletClassLoader.java:114)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:255)
	at sun.applet.AppletClassLoader.loadCode(AppletClassLoader.java:501)
	at sun.applet.AppletPanel.createApplet(AppletPanel.java:574)
	at sun.plugin.AppletViewer.createApplet(AppletViewer.java:1828)
	at sun.applet.AppletPanel.runLoader(AppletPanel.java:503)
	at sun.applet.AppletPanel.run(AppletPanel.java:292)
	at java.lang.Thread.run(Thread.java:554)

The applet apparently is never retrieved from the server. I am using  
Apple's Safari browser for this test, but the applet also fails to load  
using Mozilla 1.4 which uses the 1.4.1 plug-in.

Interesting point 1:

If I access my application from a Windows machine (running XP  
Professional with IE and Sun's Java plug-in 1.4.1), the applet DOES  
load and the application works.

Interesting point 2:

If I move the applet's jar file and the JSP page containing the applet  
tag to another part of application's folder hierarchy, NOT inside the  
protected area, and then change the pages that refer to this page to  
use the new location, the applet can be invoked from the enclosing page  
on my test Powerbook with Safari.

I asked on the Mac Java dev mailing list about this and got some ideas  
but no definitive answers.

Anyone with more tomcat experience than I (I have dabbled over the  
years but have not done anything recently) care to interpret this  
phenomenon.

My applet tag inside of map.jsp looks like:

   applet
  archive=client.jar
  code=com.gestalt.sgs.client.MapAsset
  height=1 width=1
  param name=MAP_SET_NAME
 value=%= mappingSetName %
  param name=SOURCE
 value=%= endPoints [0] %
  param name=DEST
 value=%= endPoints [1] %
   /applet
As I said above, the jar file is located in the same folder as the jsp.  
All of the pages are part of the folder pattern defined in the tag:

   security-constraint
  web-resource-collection
 web-resource-nameSGS Authorized Pages/web-resource-name
 !--URL pattern should be relative to the application:--
 !--i.e., /*, not /HSP/*--
 url-pattern/protected/*/url-pattern
  /web-resource-collection
  auth-constraint
 role-nameuser/role-name
  /auth-constraint
   /security-constraint
inside the application's web.xml file.

I would rather not move the problem page and applet to a non-protected  
area of my folder hierarchy. But the only way I can get the applet to  
load in my development and test environment is to make this re-location.

Any thoughts/advice appreciated.

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


Almost there Apache+Tomcat

2003-08-01 Thread Bradberry, Rick
Ok I'm almost there, I have Apache talking to Tomcat using mod_jk.
Everything seems to work great.
The only problem is when Tomcat starts up it gives the following message.
I've tried everything. 
The jar file
(C:\ApacheGroup\jakarta-tomcat-4.1.18\server\lib\commons-logging.jar) is in
the CLASSPATH.
 
SEVERE: Can't create apr
Java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
 
Thanks for any help
 
Rick


Re: Way to cleanup *before* session terminates ?

2003-08-01 Thread Charlie Toohey
Just tried implementing HttpSessionActivationListener, and the 
sessionWillPassivate method does not get called when the session is 
invalidated. I'm using Tomcat 4.1.24.  Maybe its not suppposed to ? Per the 
docs, this is called when the session is migrating between VMs and when 
persisting sessions, but all I've got going is a session in a single VM being 
created and being invalidated.


On Thursday 31 July 2003 06:33 am, Shapira, Yoav wrote:
 Howdy,
 What about the HttpSessionActivationListener's sessionWillPassivate()
 event?

 Yoav Shapira
 Millennium ChemInformatics

 -Original Message-

 From: Bill Barker [mailto:[EMAIL PROTECTED]

 Sent: Thursday, July 31, 2003 4:18 AM
 To: [EMAIL PROTECTED]
 Subject: Re: Way to cleanup *before* session terminates ?
 
 Sorry Charlie (ok, I couldn't resist :), but there isn't a way to do

 this

 in
 Tomcat 4.x and lower.  However, the (current draft of the)  2.4

 Servlet-

 Spec
 has changed the behavior, and so in Tomcat 5.x you can define a
 HttpSessionListener that will get called before the session is

 invalidated.

 Charlie Toohey [EMAIL PROTECTED] wrote in message
 news:[EMAIL PROTECTED]
 
  I have been looking for a way to execute some code when a session is
  terminating due to invalidation or expiration, but before the session

 has

  actually been terminated.
 
  I know that implementing HttpSessionBindingListener and binding my

 object

  into the session will allow me to execute code in my valueUnbound

 method,

 but
 
  the notifcation is sent after the session has been invalidatd or

 expired.

  But is there any way to be notified that the session is about to
 
 terminate
 
  before it actually has been invalidated or expired ?
 
  - Charlie
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]

 This e-mail, including any attachments, is a confidential business
 communication, and may contain information that is confidential,
 proprietary and/or privileged.  This e-mail is intended only for the
 individual(s) to whom it is addressed, and may not be saved, copied,
 printed, disclosed or used by anyone else.  If you are not the(an) intended
 recipient, please immediately delete this e-mail from your computer system
 and notify the sender.  Thank you.


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

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



RE: Almost there Apache+Tomcat

2003-08-01 Thread Bradberry, Rick

Well, to answer my own question - comment out everything in jk2.properties.
I found the 
post I needed right after I sent this email out. 

Thanks and sorry for posting too quickly.
 
Rick

-Original Message-
From: Bradberry, Rick 
Sent: Friday, August 01, 2003 1:49 PM
To: 'Tomcat Users List'
Subject: Almost there Apache+Tomcat


Ok I'm almost there, I have Apache talking to Tomcat using mod_jk.
Everything seems to work great.
The only problem is when Tomcat starts up it gives the following message.
I've tried everything. 
The jar file
(C:\ApacheGroup\jakarta-tomcat-4.1.18\server\lib\commons-logging.jar) is in
the CLASSPATH.
 
SEVERE: Can't create apr
Java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
 
Thanks for any help
 
Rick

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



Re: minProcessor = maxProcessor value (are threads released if not used for some time ?)

2003-08-01 Thread Rau NF
Hi - So no config parameters to do this ? I guess we
will direct more load to it then. 

Thanks for the info.

S Rau


==
Howdy,
Processor thread creation is lazy.  You can subclass
if you want greedy.

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: Rau NF [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 31, 2003 6:47 PM
To: [EMAIL PROTECTED]
Subject: minProcessor = maxProcessor value (are
threads released if not
used for some time ?)

Hi - I have set both these values to 100. When I run
Tomcat 4.1.24/Linux/JDK 1.4.2, I see that Tomcat does
not create all the 100 threads. It is usually in the
40-70 range.

Does this mean that Tomcat releases the thread
(resources) if not used for some time ? How can I
make
it create all the 100 threads and keep them available
in the pool ?

Thanks
S Rau

__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site
design software
http://sitebuilder.yahoo.com

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



__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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



RE: FORM Login Bypassed

2003-08-01 Thread Mike Curwen
Thanks Tim, your first sentence I think answers my question about does
it indeed only work on client requests.

But that's not quite the situation here...
 
It's still a request for a resource

1.  request /dispatcher?page=fookey
2.  dispatcher translates fookey to /somepage/somewhere.jsp
3.  a request for /somepage/somewhere.jsp is made
4.  somepage/somewhere.jsp has a security constraint not being honoured.
 
And this is because security constraints are only checked for
client-side requests, and not through forwarded or included requests
(serverside). Filters currently act this way (the filter mappings are
not honoured when server-side requests are made).  
 
Do you (or anyone else) think that AUTH mappings should be 'enhanced' as
well, so that forwards/includes will be checked? (like Filters have
changed for 2.4) 




 -Original Message-
 From: Tim Funk [mailto:[EMAIL PROTECTED] 
 Sent: Friday, August 01, 2003 11:52 AM
 To: Tomcat Users List
 Subject: Re: FORM Login Bypassed
 
 
 Security constraints are imposed on the incoming url.
 
 Query strings are not used in servlet mapping declarations.
 
 -Tim
 
 
 Ronnie wrote:
  Hi!
  
  I have this web application using FORM login access but I am having 
  problem directing the navigation to the defined login page 
 when user 
  clicks on a secure link.
  
  You see, I am using a DispatcherServlet as a navigation 
 controller to 
  direct users to the correct page and the URL is coded as:
  
  a href=dispatcher?action=adminadmin/a
  
  Where dispatcher is the URL name of the DispatcherServlet. In the 
  servlet, admin is translated to /computers/admin/index.jsp from 
  values coded in web.xml.
  
  Now when I declare the  protected url-pattern as 
 /computers/admin/* 
  as below, when I click on the above link the login page is bypassed 
  and I can access the admin index page without logging in.
  
  security-constraint
   web-resource-collection
  web-resource-nameAdministration 
 functions/web-resource-name
  !--
 url-patterndispatcher?action=admin/url-patternDoes 
 not work! --
  url-pattern/computers/admin/*/url-pattern
   /web-resource-collection
   auth-constraint
  !-- Anyone with one of the listed roles may access 
 this area --
  role-nameadmin/role-name
   /auth-constraint
  
!-- HTTPS/SSL--
   user-data-constraint
  transport-guaranteeCONFIDENTIAL/transport-guarantee
   /user-data-constraint
/security-constraint
  
  login-config
   auth-methodFORM/auth-method
 form-login-config
  form-login-pagedispatcher?action=adminLogin/form-login-page
 
 form-error-pagedispatcher?action=adminLoginFail/form-error-page
/form-login-config
  /login-config
  
  To overcome this I had to hardcode the link in my webpage as: a 
  href=/Computers/computers/admin/index.jspadmin/a
  
  I wish to keep my navigation based on logical names. Is there a 
  work-around or solution to this problem?
  
  
  
  Regards,
  Ronnie Choo
  Singapore
  
  
  
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


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



RE: Way to cleanup *before* session terminates ?

2003-08-01 Thread Shapira, Yoav

Howdy,
You're right, and the behavior is right: the will passivate method is
not supposed to be called when the session is going to be invalidated.
You'll have to wait for tomcat 5.

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: Charlie Toohey [mailto:[EMAIL PROTECTED]
Sent: Friday, August 01, 2003 1:49 PM
To: Tomcat Users List
Subject: Re: Way to cleanup *before* session terminates ?

Just tried implementing HttpSessionActivationListener, and the
sessionWillPassivate method does not get called when the session is
invalidated. I'm using Tomcat 4.1.24.  Maybe its not suppposed to ? Per
the
docs, this is called when the session is migrating between VMs and when
persisting sessions, but all I've got going is a session in a single VM
being
created and being invalidated.


On Thursday 31 July 2003 06:33 am, Shapira, Yoav wrote:
 Howdy,
 What about the HttpSessionActivationListener's sessionWillPassivate()
 event?

 Yoav Shapira
 Millennium ChemInformatics

 -Original Message-

 From: Bill Barker [mailto:[EMAIL PROTECTED]

 Sent: Thursday, July 31, 2003 4:18 AM
 To: [EMAIL PROTECTED]
 Subject: Re: Way to cleanup *before* session terminates ?
 
 Sorry Charlie (ok, I couldn't resist :), but there isn't a way to do

 this

 in
 Tomcat 4.x and lower.  However, the (current draft of the)  2.4

 Servlet-

 Spec
 has changed the behavior, and so in Tomcat 5.x you can define a
 HttpSessionListener that will get called before the session is

 invalidated.

 Charlie Toohey [EMAIL PROTECTED] wrote in message
 news:[EMAIL PROTECTED]
 
  I have been looking for a way to execute some code when a session
is
  terminating due to invalidation or expiration, but before the
session

 has

  actually been terminated.
 
  I know that implementing HttpSessionBindingListener and binding my

 object

  into the session will allow me to execute code in my valueUnbound

 method,

 but
 
  the notifcation is sent after the session has been invalidatd or

 expired.

  But is there any way to be notified that the session is about to
 
 terminate
 
  before it actually has been invalidated or expired ?
 
  - Charlie
 

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

 This e-mail, including any attachments, is a confidential business
 communication, and may contain information that is confidential,
 proprietary and/or privileged.  This e-mail is intended only for the
 individual(s) to whom it is addressed, and may not be saved, copied,
 printed, disclosed or used by anyone else.  If you are not the(an)
intended
 recipient, please immediately delete this e-mail from your computer
system
 and notify the sender.  Thank you.


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

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




This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


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



RE: FORM Login Bypassed

2003-08-01 Thread Mike Curwen
the sendRedirect() method is on the response object. Another method of
interest will be the encodeRedirectURL() so that non-cookie users can
still use your site.
 
Something like:

resource = somepage/somewhere.jsp;
response.sendRedirect(response.encodeRedirectURL(resource));




 -Original Message-
 From: Ronnie [mailto:[EMAIL PROTECTED] 
 Sent: Friday, August 01, 2003 11:59 AM
 To: Tomcat Users List
 Subject: Re: FORM Login Bypassed
 
 
 
 - Original Message -
 From: Mike Curwen [EMAIL PROTECTED]
 To: 'Tomcat Users List' [EMAIL PROTECTED]
 Sent: Saturday, August 02, 2003 12:45 AM
 Subject: RE: FORM Login Bypassed
 
 
  When your dispatcher does the translation, does it forward 
 or include 
  the 'actual' resource ?  Meaning it takes place entirely 
 server-side ?
 
 This is how I dispatched it:
 
   RequestDispatcher rd = request.getRequestDispatcher(resource);
 
   // Forward resource, resource is the URL. IE: 
 /computers/admin/index.jsp
   try {
  rd.forward(request, response);
   } catch (ServletException e) {...}
 
  If you did a sendRedirect, that would then make the browser request 
  the protected resource directly, which would invoke the 
 AUTH, if the 
  AUTH is configured correctly. And it looks right to me.
 
 How do you do a sendRedirect? Sorry, I'm still quite green in 
 servlet programming...
 
  What it sounds like is that once you are on the server-side (by 
  requesting the un-protected /dispatcher resource) that any 
 server-side 
  forwards or includes are not being authenticated.  I wasn't 
 aware that 
  was the case.
 
  It works this way for filters though, but in the next servlet spec 
  (2.4) we'll have filter mappings being honoured for forwards and 
  includes as well (configurable).
 
 Thanks alot for the help and info!
 
 
   -Original Message-
   From: Ronnie [mailto:[EMAIL PROTECTED]
   Sent: Friday, August 01, 2003 11:35 AM
   To: [EMAIL PROTECTED]
   Subject: FORM Login Bypassed
  
  
   Hi!
  
   I have this web application using FORM login access but I 
 am having 
   problem directing the navigation to the defined login 
 page when user 
   clicks on a secure link.
  
   You see, I am using a DispatcherServlet as a navigation 
 controller 
   to direct users to the correct page and the URL is coded as:
  
   a href=dispatcher?action=adminadmin/a
  
   Where dispatcher is the URL name of the 
 DispatcherServlet. In the 
   servlet, admin is translated to 
 /computers/admin/index.jsp from 
   values coded in web.xml.
  
   Now when I declare the  protected url-pattern as 
   /computers/admin/* as below, when I click on the above link the 
   login page is bypassed and I can access the admin index 
 page without 
   logging in.
  
   security-constraint
web-resource-collection
   web-resource-nameAdministration 
   functions/web-resource-name
   !--
   url-patterndispatcher?action=admin/url-patternDoes
   not work! --
   url-pattern/computers/admin/*/url-pattern
/web-resource-collection
auth-constraint
   !-- Anyone with one of the listed roles may access this 
   area --
   role-nameadmin/role-name
/auth-constraint
  
 !-- HTTPS/SSL--
user-data-constraint
   transport-guaranteeCONFIDENTIAL/transport-guarantee
/user-data-constraint
 /security-constraint
  
   login-config
auth-methodFORM/auth-method
  form-login-config
   
 form-login-pagedispatcher?action=adminLogin/form-login-page
  
 form-error-pagedispatcher?action=adminLoginFail/form-error-page
 /form-login-config
   /login-config
  
   To overcome this I had to hardcode the link in my webpage as: a 
   href=/Computers/computers/admin/index.jspadmin/a
  
   I wish to keep my navigation based on logical names. Is there a 
   work-around or solution to this problem?
  
  
  
   Regards,
   Ronnie Choo
   Singapore
  
  
  
 
 
  
 -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


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



RE: Problems with Tomcat in a high load environment

2003-08-01 Thread pete . storey
I do agree and whilst our dev environments are pretty close to the live 
ones, I dont have a particularly useful set of use cases which I can test 
with (well I do but they dont cause the problem to occur on our dev 
systems!).  Thus the only meaningful profiling would have to be done on 
the live system which clearly is less than desirable.

I also agree that 30 r/s isnt a huge load however when the site is running 
at about 12 as say it is at the moment, then this doesnt happen.  It is 
thus a problem associated with the high loads.  Also notable is a very 
large number of the following 3 types of error which occur in Tomcat and I 
believe are related to the JK2 connector (I have also tried the JK 
connector with similar results):

01-Aug-2003 17:48:01 org.apache.jk.common.ChannelSocket processConnection
INFO: Server has been restarted or reset this connection
01-Aug-2003 17:48:21 org.apache.jk.server.JkCoyoteHandler action
INFO: RESET 
01-Aug-2003 17:59:12 org.apache.jk.server.JkCoyoteHandler action
SEVERE: Error in action code 
java.net.SocketException: Connection reset by peer: socket write error
at java.net.SocketOutputStream.socketWrite0(Native Method)
at 
java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
at org.apache.jk.common.ChannelSocket.send(ChannelSocket.java:435)
at 
org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:627)
at 
org.apache.jk.server.JkCoyoteHandler.action(JkCoyoteHandler.java:372)
at org.apache.coyote.Response.action(Response.java:222)
at org.apache.coyote.Response.finish(Response.java:343)
at 
org.apache.coyote.tomcat4.OutputBuffer.close(OutputBuffer.java:326)
at 
org.apache.coyote.tomcat4.CoyoteResponse.finishResponse(CoyoteResponse.java:500)
at 
org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:224)
at 
org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:261)
at 
org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:360)
at 
org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:632)
at 
org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:590)
at 
org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:707)
at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:530)
at java.lang.Thread.run(Thread.java:536)

Perhaps it is these which cause the problem?  I cant believe that there is 
some intrinsic problem with Tomcat as clearly lots of people use it 
successfully though not, perhaps, when mated to IIS.  I am currently 
considering switching to Jetty for a bit better performance which in this 
app is crucial.  Anyone done this successfully?

cheers
Pete





Shapira, Yoav [EMAIL PROTECTED]
01/08/2003 18:45
Please respond to Tomcat Users List
 
To: Tomcat Users List [EMAIL PROTECTED]
cc: 
Subject:RE: Problems with Tomcat in a high load 
environment



Howdy,
Even if your loathe to do it, a profiler is invaluable as long as the
profiled environment (your dev/test env) is close enough to production
to be meaningful.  You should profile, and run stress tests, on hardware
and software that's as similar as possible to production, before going
live.

FWIW, 30 requests/sec is not an extremely high load: most of our apps
routinely handle several times that load on standalone tomcat 4.1.24
(and starting at 12:01 tonight, 4.1.27 ;))

Have you tried running without the IIS front-end?  It could be worth a
shot.  Tomcat can handle the static files as well.

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
Sent: Friday, August 01, 2003 1:29 PM
To: [EMAIL PROTECTED]
Subject: Problems with Tomcat in a high load environment

Hi,
we are running Tomcat 4.1.18 on Windows 2000 under JDK1.4.1_01.  We are
using IIS as a web server connecting using the ISAPI JK 2 connector.
We
are currently experiencing 2 seperate problems when under high load (ie

30 requests per second):

1.  A huge number of log events (~30 sets per minute) are generated in
the
NT event log which show problems with the ISAPI connector.  Each time
there is a problem, 7 lines are created:

Error: [jk_worker_ajp13.c (512)]: ajp13.service() Error  forwarding
ajp13:localhost:8029 1 0
Error: [jk_worker_ajp13.c (416)]: ajp13.service() ajpGetReply
recoverable
error 3
Error: [jk_handler_response.c (178)]: handler.response() Error sending
response
Error: [jk_service_iis.c (157)]: jk_ws_service_t::head,
ServerSupportFunction failed
Error: [jk_worker_ajp13.c (416)]: ajp13.service() ajpGetReply
recoverable
error 3
Error: [jk_handler_response.c (200)]: Error ajp_process_callback -
write
failed
Error: [jk_service_iis.c (247)]: jk_ws_service_t::write, WriteClient
failed

These I think lead to the eventual crash 

Re: FORM Login Bypassed

2003-08-01 Thread Tim Funk
Security constraints are imposed on the incoming *client* request and does 
not apply for forwards and includes. This is true for 2.3 and 2.4 is stated 
in SRV.12.2 Declarative Security
===
The security model does not apply when a servlet uses the RequestDispatcher 
to invoke a static resource or servlet using a forward or an include.
===

I don't think its possible to impose auth constraints for includes, it would 
contradict the spec. Since includes cannot set headers and host of other 
things, allowing this for authentication would be a PITA for implementors and 
break in many circumstances.

Adding constraints on forwards could be feasible but I don't like it (IMO, 
YMMV) since in an MVC style, your controller could go through a lot of work 
to set up the model only have the view deny access. This could cause a lot of 
confusion for developers.

Adding a constraint to the incoming URL is not a big deal if one knows this 
constraint before coding a webapp. But discovering this constraint after the 
webapp was created can make life miserable.

-Tim

Mike Curwen wrote:
But that's not quite the situation here...
 
It's still a request for a resource

1.  request /dispatcher?page=fookey
2.  dispatcher translates fookey to /somepage/somewhere.jsp
3.  a request for /somepage/somewhere.jsp is made
4.  somepage/somewhere.jsp has a security constraint not being honoured.
 
And this is because security constraints are only checked for
client-side requests, and not through forwarded or included requests
(serverside). Filters currently act this way (the filter mappings are
not honoured when server-side requests are made).  
 
Do you (or anyone else) think that AUTH mappings should be 'enhanced' as
well, so that forwards/includes will be checked? (like Filters have
changed for 2.4) 



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


Tomcat 1.4.24/Apache 1.3.26 integration with mod_jk2

2003-08-01 Thread Skyler . Bingham
I am having a hard time integrating tomcat 1.4.24 with apache 1.3.26 using
the mod_jk2 connector.  Everything appears to be configured correctly and I
can access tomcat examples via the stand-alone service but I get the
following error (it's actually a notice) in apache's error_log when trying
to access a servlet and page cannot be displayed:

[Thu Jul 31 15:57:10 2003] [notice] child pid 21866 exit signal
Segmentation fault (11)

This is the only thing that leads me to believe that something is amiss
(this and the fact that I can't access servlets!).  The following are tails
from log files and the important configuration files.

error_log (apache):

[Thu Jul 31 17:44:45 2003]  ( info) [mod_jk2.c (290)]: mod_jk child init
[Thu Jul 31 17:44:45 2003]  ( info) [mod_jk2.c (298)]: mod_jk.post_config()
init worker env
[Thu Jul 31 17:44:45 2003]  ( info) [mod_jk2.c (208)]: Set serverRoot
/etc/httpd
Create config for main host
[Thu Jul 31 17:44:45 2003]  ( info) [mod_jk2.c (290)]: mod_jk child init
[Thu Jul 31 17:44:45 2003]  ( info) [mod_jk2.c (298)]: mod_jk.post_config()
init worker env
[Thu Jul 31 12:44:46 2003] [notice] Apache/1.3.26 (Unix)  (Red-Hat/Linux)
mod_ssl/2.8.9 OpenSSL/0.9.6 PHP/4.1.1 mod_per
l/1.24_01 mod_jk2/2.0.0 FrontPage/5.0.2.2510 configured -- resuming normal
operations
[Thu Jul 31 12:44:46 2003] [notice] suEXEC mechanism enabled (wrapper:
/usr/sbin/suexec)
[Thu Jul 31 12:44:46 2003] [notice] Accept mutex: sysvsem (Default:
sysvsem)
[Thu Jul 31 12:45:13 2003] [notice] child pid 21865 exit signal
Segmentation fault (11) -- each time I tried to access a servlet, I got
one of these
[Thu Jul 31 15:49:16 2003] [notice] child pid 21870 exit signal
Segmentation fault (11)
[Thu Jul 31 15:57:10 2003] [notice] child pid 21866 exit signal
Segmentation fault (11)


catalina.out:
--
Stopping service Tomcat-Standalone
Stopping service Tomcat-Apache
Starting service Tomcat-Standalone
Apache Tomcat/4.1.24
Starting service Tomcat-Apache
Apache Tomcat/4.1.24
Jul 31, 2003 12:55:16 PM org.apache.jk.common.ChannelSocket init
INFO: JK2: ajp13 listening on /0.0.0.0:8019
Jul 31, 2003 12:55:16 PM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=2/159
config=/var/jakarta-tomcat-4.1.24/conf/jk2.properties

workers2.properties:
--
[shm]
file=/etc/httpd/logs/shm.file --this file is empty
size=1048576

# Example socket channel, override port and host.
[channel.socket:localhost:8019]
tomcatId=localhost:8019
port=8019
host=127.0.0.1

# define the worker
[ajp13:localhost:8019]
channel=channel.socket:localhost:8019

# Uri mapping
[uri:/examples/*]
worker=ajp13:localhost:8019

jk2.properties (this is the default file that came with tomcat 4.1.24):
--
## THIS FILE MAY BE OVERRIDEN AT RUNTIME. MAKE SURE TOMCAT IS STOPED
## WHEN YOU EDIT THE FILE.

## COMMENTS WILL BE _LOST_

## DOCUMENTATION OF THE FORMAT IN JkMain javadoc.

# Set the desired handler list
#  handler.list=apr,request,channelJni
#
# Override the default port for the socketChannel
  channelSocket.port=8019
# Default:
# channelUnix.file=${jkHome}/work/jk2.socket
# Just to check if the the config  is working
# shm.file=${jkHome}/work/jk2.shm

# In order to enable jni use any channelJni directive
# channelJni.disabled = 0
# And one of the following directives:

# apr.jniModeSo=/opt/apache2/modules/mod_jk2.so

# If set to inprocess the mod_jk2 will Register natives itself
# This will enable the starting of the Tomcat from mod_jk2
# apr.jniModeSo=inprocess

server.xml (just the tomcat-apache service):

Service name=Tomcat-Apache

!-- Define a Coyote/JK2 AJP 1.3 Connector on port 8019 --
Connector className=org.apache.coyote.tomcat4.CoyoteConnector
port=8019 minProcessors=5 maxProcessors=75
enableLookups=false redirectPort=8443 acceptCount=10 debug
=0
connectionTimeout=2 useURIValidationHack=false
protocolHandlerClassName=org.apache.jk.server.JkCoyoteHandler/


!-- Replace localhost with what your Apache ServerName is set to
--
Engine name=Apache defaultHost=localhost debug=0

  !-- Global logger unless overridden at lower levels --
  Logger className=org.apache.catalina.logger.FileLogger
  prefix=apache_log. suffix=.txt
  timestamp=true/
  Valve className=org.apache.catalina.valves.AccessLogValve
  directory=logs  prefix=localhost_access_log. suffix
=.txt
  pattern=common resolveHosts=false/

  !-- Because this Realm is here, an instance will be shared globally
--
  Realm className=org.apache.catalina.realm.MemoryRealm /

/Engine

  /Service

Any help would be greatly appreciated.

Thanks,

Skyler Bingham
[EMAIL PROTECTED]
1(602)957-1650 x1139



RE: How does RMI operation differ when inside Tomcat as opposed to ou tside?

2003-08-01 Thread Jeff Lowery
Is an application launched via Webstart affected by the java policies?
Since webstart applications have to be in signed jars, I tried setting up a
policy for software with that particular signature.  Yet still no luck. 


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



RE: Problems with Tomcat in a high load environment

2003-08-01 Thread Shapira, Yoav

Howdy,

01-Aug-2003 17:48:01 org.apache.jk.common.ChannelSocket
processConnection
INFO: Server has been restarted or reset this connection

This were mostly fixed in 4.1.24.  Try moving to it (or better yet,
4.1.27), as there are several potentially relevant fixes from 4.1.18.

Yoav Shapira



This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


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



RE: JDBCRealm

2003-08-01 Thread Gregg Bolinger
FYI - I removed the REALM entry for the Database user lookup and used
the tomcat-users.xml file and it works fine.  It only fails when I have
the REALM entry.  But I still don't know why it is not working right.

Gregg

-Original Message-
From: Gregg Bolinger [mailto:[EMAIL PROTECTED] 
Sent: Friday, August 01, 2003 9:52 AM
To: [EMAIL PROTECTED]
Subject: JDBCRealm

I have been struggling trying to get this to work and I can't tell if I
am doing something wrong, or leaving something out, or what. Below is
all my code, then I will say what is happening: 
server.xml (relivant snippit) 
code: 
  _  


Realm  className=org.apache.catalina.realm.JDBCRealm debug=99
driverName=com.mysql.jdbc.Driver
connectionURL=jdbc:mysql://localhost/holocron
connectionName=gdboling connectionPassword=bolinger
userTable=users 
userNameCol=Username 
userCredCol=Password
userRoleTable=user_roles 
roleNameCol=Role /
  _  

web.xml (relivant snippit) 
code: 
  _  


security-constraint
web-resource-collection
  web-resource-nameSecurePages/web-resource-name
  descriptionSecurity constraint /secure/description
  url-pattern/secure/*/url-pattern
  http-methodGET/http-method
http-methodPOST/http-method
http-methodPUT/http-method
/web-resource-collection
auth-constraint 
  role-nameadmin/role-name 
  /auth-constraint
  user-data-constrainttransport-guarantee
NONE/transport-guarantee/user-data-constraint
/security-constraint
  
login-config
  auth-methodFORM/auth-method
  form-login-config
form-login-page/login.jsp/form-login-page
form-error-page/loginerror.jsp/form-error-page
  /form-login-config
/login-config
security-role
role-nameadmin/role-name
/security-role
  _  

login.jsp 
code: 
  _  


[EMAIL PROTECTED] contentType=text/html%
html
headtitleJSP Page/title/head
body
form action='j_security_check' method=POST
TABLE
TR
TD
UserName
/TD
TD
INPUT type='text' name='j_username' value=''
/TD
/TR
TR
TD
Password
/TD
TD
INPUT type='password' name='j_password' value=''
INPUT type='submit' name='submit' value='submit'
/TD
/TR
/TABLE
/body
/html
  _  

And my database has 2 tables 
users
Username
Password 
user_roles
Username
Role 
-
Now, I have a page in a folder called secure called AddReference.jsp.
When I try and access this page, I do get redirected to login.jsp. I
enter my username and password that I have stored in the database and
after clicking submit, I am taken to my loginerror.jsp page. I should be
redirected back to AddReference.jsp. I am entering the correct username
and password as I only have one entry. I get no compilation errors or
Tomcat errors when loading or stopping. 
If anyone has some insight to my problem, I would be greatly
appreciated. 
Thanks
Gregg Bolinger
 


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



RE: FORM Login Bypassed

2003-08-01 Thread Mike Curwen
comments inline.

 -Original Message-
 From: Tim Funk [mailto:[EMAIL PROTECTED] 
 Sent: Friday, August 01, 2003 1:32 PM
 To: Tomcat Users List
 Subject: Re: FORM Login Bypassed
 
 
 Security constraints are imposed on the incoming *client* 
 request and does 
 not apply for forwards and includes. This is true for 2.3 and 
 2.4 is stated 
 in SRV.12.2 Declarative Security
 ===
 The security model does not apply when a servlet uses the 
 RequestDispatcher 
 to invoke a static resource or servlet using a forward or an 
 include. ===

Thanks Tim, for covering my laziness today. I'd normally look through
the spec, but thought I'd leave it for someone else. ;)



 Adding constraints on forwards could be feasible but I don't 
 like it (IMO, 
 YMMV) since in an MVC style, your controller could go through 
 a lot of work 
 to set up the model only have the view deny access. This 

But what if you have a confederation (hmm... $20 word for the day) of
components that all together act as your controller.  One main traffic
cop controller out front that will invoke appropriate business logic in
other controllers... those *other* controllers having the security
constraints. More on that in my next comment.


 
 Adding a constraint to the incoming URL is not a big deal if 
 one knows this constraint before coding a webapp. 

But what about the case where the incoming URL is facading any number of
requests for resources?  It's almost as though you shouldn't ever
consider doing what Ronnie is doing (one monolithic traffic cop out
front) because you can't protect access to a subset of resources, or
have different users set up for different resources, etc, etc.  Is it an
acceptable work-around to use sendRedirect() or is there a better
pattern or 'best practice' recommendation? 


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



Re: What is that maximum file size tomcat can serve?

2003-08-01 Thread Tim Funk
Can you post the stack trace, versions used, and your config? Standalone vs 
jk ...

I tried tomcat5 with its standalone http connector with a 2,349,092,191 byte 
file and all was ok for me.

-Tim

Lee Peik Feng wrote:
Hi,
I have some mpeg file larger than 2GB and tomcat fail to serve these
file.
What is that maximum file size tomcat can serve? Is there any other
limitation beside OS issue?
Where can I find more info regarding this issue?
Thanks.

Regards,
Peik Feng


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


RE: JDBCRealm

2003-08-01 Thread Stuart MacPherson
You don't have a 'roles' table in your database.  'User_roles' is a link
entity between 'user' and 'roles'...  In this tables you should specify all
possible roles.  Check the unofficial FAQ, or the apache site.



-Original Message-
From: Gregg Bolinger [mailto:[EMAIL PROTECTED] 
Sent: 01 August 2003 19:36
To: 'Tomcat Users List'
Subject: RE: JDBCRealm

FYI - I removed the REALM entry for the Database user lookup and used
the tomcat-users.xml file and it works fine.  It only fails when I have
the REALM entry.  But I still don't know why it is not working right.

Gregg

-Original Message-
From: Gregg Bolinger [mailto:[EMAIL PROTECTED] 
Sent: Friday, August 01, 2003 9:52 AM
To: [EMAIL PROTECTED]
Subject: JDBCRealm

I have been struggling trying to get this to work and I can't tell if I
am doing something wrong, or leaving something out, or what. Below is
all my code, then I will say what is happening: 
server.xml (relivant snippit) 
code: 
  _  


Realm  className=org.apache.catalina.realm.JDBCRealm debug=99
driverName=com.mysql.jdbc.Driver
connectionURL=jdbc:mysql://localhost/holocron
connectionName=gdboling connectionPassword=bolinger
userTable=users 
userNameCol=Username 
userCredCol=Password
userRoleTable=user_roles 
roleNameCol=Role /
  _  

web.xml (relivant snippit) 
code: 
  _  


security-constraint
web-resource-collection
  web-resource-nameSecurePages/web-resource-name
  descriptionSecurity constraint /secure/description
  url-pattern/secure/*/url-pattern
  http-methodGET/http-method
http-methodPOST/http-method
http-methodPUT/http-method
/web-resource-collection
auth-constraint 
  role-nameadmin/role-name 
  /auth-constraint
  user-data-constrainttransport-guarantee
NONE/transport-guarantee/user-data-constraint
/security-constraint
  
login-config
  auth-methodFORM/auth-method
  form-login-config
form-login-page/login.jsp/form-login-page
form-error-page/loginerror.jsp/form-error-page
  /form-login-config
/login-config
security-role
role-nameadmin/role-name
/security-role
  _  

login.jsp 
code: 
  _  


[EMAIL PROTECTED] contentType=text/html%
html
headtitleJSP Page/title/head
body
form action='j_security_check' method=POST
TABLE
TR
TD
UserName
/TD
TD
INPUT type='text' name='j_username' value=''
/TD
/TR
TR
TD
Password
/TD
TD
INPUT type='password' name='j_password' value=''
INPUT type='submit' name='submit' value='submit'
/TD
/TR
/TABLE
/body
/html
  _  

And my database has 2 tables 
users
Username
Password 
user_roles
Username
Role 
-
Now, I have a page in a folder called secure called AddReference.jsp.
When I try and access this page, I do get redirected to login.jsp. I
enter my username and password that I have stored in the database and
after clicking submit, I am taken to my loginerror.jsp page. I should be
redirected back to AddReference.jsp. I am entering the correct username
and password as I only have one entry. I get no compilation errors or
Tomcat errors when loading or stopping. 
If anyone has some insight to my problem, I would be greatly
appreciated. 
Thanks
Gregg Bolinger
 


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




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



[ERR] RE: (Symbolic) Links in Windows

2003-08-01 Thread postmaster
Transmit Report:

 To: [EMAIL PROTECTED], 402 Local User Inbox Full ([EMAIL PROTECTED])
---BeginMessage---
Hi,
the example I sent you originally came from 4.0.1...
Make sure you use forward separators, do not run tomcat as a service and 
have no spaces in the pathname, maybe that helps.
greetz
Hans

At 03:08 PM 7/29/2003 -0400, Jay Garala wrote:
This only works on 4.1.24 not 4.0.6

-Original Message-
From: John Turner [mailto:[EMAIL PROTECTED]
Sent: Tuesday, July 29, 2003 2:45 PM
To: Tomcat Users List
Subject: Re: (Symbolic) Links in Windows


There are no such things as symbolic links on Windows.

The solution for you is to simply change your docBase:

Context path=/software docBase=some_other_drive:/some_other_dir
/Context
Jay Garala wrote:

 Good Afternoon,

 I am using Win2k with Tomcat 4.0.6.  How can I make the contextPath
 '/software' point to a folder on a different drive (and/or directory).
How
 would i go by doing this?

 I got this so far in my server.xml

 Context path=/software docBase=c:/software debug=1
   Resources
className=org.apache.naming.resources.FileDirContext
 caseSensitive=false allowLinking=true  /
  /Context

 Thanks


 Jay





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


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


RE: JDBCRealm

2003-08-01 Thread Gregg Bolinger
Actually, I do have a roles table with a column named Role and I have my
roles listed there.  Is there anywhere in the realm config I need to
specify this table.  Because in the docs it only specifies the user
table and the user roles table both of wich have 2 columns in each.

Thanks.

-Original Message-
From: Stuart MacPherson [mailto:[EMAIL PROTECTED] 
Sent: Friday, August 01, 2003 1:48 PM
To: 'Tomcat Users List'
Subject: RE: JDBCRealm

You don't have a 'roles' table in your database.  'User_roles' is a link
entity between 'user' and 'roles'...  In this tables you should specify
all
possible roles.  Check the unofficial FAQ, or the apache site.



-Original Message-
From: Gregg Bolinger [mailto:[EMAIL PROTECTED] 
Sent: 01 August 2003 19:36
To: 'Tomcat Users List'
Subject: RE: JDBCRealm

FYI - I removed the REALM entry for the Database user lookup and used
the tomcat-users.xml file and it works fine.  It only fails when I have
the REALM entry.  But I still don't know why it is not working right.

Gregg

-Original Message-
From: Gregg Bolinger [mailto:[EMAIL PROTECTED] 
Sent: Friday, August 01, 2003 9:52 AM
To: [EMAIL PROTECTED]
Subject: JDBCRealm

I have been struggling trying to get this to work and I can't tell if I
am doing something wrong, or leaving something out, or what. Below is
all my code, then I will say what is happening: 
server.xml (relivant snippit) 
code: 
  _  


Realm  className=org.apache.catalina.realm.JDBCRealm debug=99
driverName=com.mysql.jdbc.Driver
connectionURL=jdbc:mysql://localhost/holocron
connectionName=gdboling connectionPassword=bolinger
userTable=users 
userNameCol=Username 
userCredCol=Password
userRoleTable=user_roles 
roleNameCol=Role /
  _  

web.xml (relivant snippit) 
code: 
  _  


security-constraint
web-resource-collection
  web-resource-nameSecurePages/web-resource-name
  descriptionSecurity constraint /secure/description
  url-pattern/secure/*/url-pattern
  http-methodGET/http-method
http-methodPOST/http-method
http-methodPUT/http-method
/web-resource-collection
auth-constraint 
  role-nameadmin/role-name 
  /auth-constraint
  user-data-constrainttransport-guarantee
NONE/transport-guarantee/user-data-constraint
/security-constraint
  
login-config
  auth-methodFORM/auth-method
  form-login-config
form-login-page/login.jsp/form-login-page
form-error-page/loginerror.jsp/form-error-page
  /form-login-config
/login-config
security-role
role-nameadmin/role-name
/security-role
  _  

login.jsp 
code: 
  _  


[EMAIL PROTECTED] contentType=text/html%
html
headtitleJSP Page/title/head
body
form action='j_security_check' method=POST
TABLE
TR
TD
UserName
/TD
TD
INPUT type='text' name='j_username' value=''
/TD
/TR
TR
TD
Password
/TD
TD
INPUT type='password' name='j_password' value=''
INPUT type='submit' name='submit' value='submit'
/TD
/TR
/TABLE
/body
/html
  _  

And my database has 2 tables 
users
Username
Password 
user_roles
Username
Role 
-
Now, I have a page in a folder called secure called AddReference.jsp.
When I try and access this page, I do get redirected to login.jsp. I
enter my username and password that I have stored in the database and
after clicking submit, I am taken to my loginerror.jsp page. I should be
redirected back to AddReference.jsp. I am entering the correct username
and password as I only have one entry. I get no compilation errors or
Tomcat errors when loading or stopping. 
If anyone has some insight to my problem, I would be greatly
appreciated. 
Thanks
Gregg Bolinger
 


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




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




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



Tomcat and LDAP Issues

2003-08-01 Thread Jon Wynacht
Hi,

I have Tomcat 4.1.24 installed on a server that hosts a web  
application. I have set up the container to do authentication via LDAP  
and it works for a bit then just stops working. The only way to get  
things working again is to restart Tomcat.

I've included the error message below and am wondering if anybody on  
this list has had a similar experience? If so, how did you solve it?

Thanks in advance,

Jon

2003-08-01 10:37:29 JNDIRealm[Standalone]: lookupUser(jwynacht)
2003-08-01 10:37:29 JNDIRealm[Standalone]:   dn=uid=jwynacht,  
ou=active, ou=employees, ou=people, o=cisco.com
2003-08-01 10:37:29 JNDIRealm[Standalone]:   validating credentials by  
binding as the user
2003-08-01 10:37:29 JNDIRealm[Standalone]:   binding as uid=jwynacht,  
ou=active, ou=employees, ou=people, o=cisco.com
2003-08-01 10:37:29 CoyoteAdapter An exception or error occurred in the  
container during the request processing
java.lang.NullPointerException
	at org.apache.catalina.realm.JNDIRealm.authenticate(JNDIRealm.java:793)
	at  
org.apache.catalina.authenticator.BasicAuthenticator.authenticate(BasicA 
uthenticator.java:161)
	at  
org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authenticator 
Base.java:526)
	at  
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i 
nvokeNext(StandardPipeline.java:641)
	at  
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4 
80)
	at  
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
	at  
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:241 
5)
	at  
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java 
:180)
	at  
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i 
nvokeNext(StandardPipeline.java:643)
	at  
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherVa 
lve.java:171)
	at  
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i 
nvokeNext(StandardPipeline.java:641)
	at  
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java 
:172)
	at  
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i 
nvokeNext(StandardPipeline.java:641)
	at  
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4 
80)
	at  
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
	at  
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve. 
java:174)
	at  
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i 
nvokeNext(StandardPipeline.java:643)
	at  
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4 
80)
	at  
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
	at  
org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
	at  
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:59 
4)
	at  
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processC 
onnection(Http11Protocol.java:392)
	at  
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:56 
5)
	at  
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool 
.java:619)
	at java.lang.Thread.run(Thread.java:536)

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


RE: JDBCRealm

2003-08-01 Thread Gregg Bolinger
Ok, I figured out my STUPID problem.  I was giving the wrong table name
to the REALM element for my user_roles table.  Please, everyone bash me
on the head.  I deserve  it. LOL

Thanks for the help anyway.

Gregg

-Original Message-
From: Gregg Bolinger [mailto:[EMAIL PROTECTED] 
Sent: Friday, August 01, 2003 1:55 PM
To: 'Tomcat Users List'
Subject: RE: JDBCRealm

Actually, I do have a roles table with a column named Role and I have my
roles listed there.  Is there anywhere in the realm config I need to
specify this table.  Because in the docs it only specifies the user
table and the user roles table both of wich have 2 columns in each.

Thanks.

-Original Message-
From: Stuart MacPherson [mailto:[EMAIL PROTECTED] 
Sent: Friday, August 01, 2003 1:48 PM
To: 'Tomcat Users List'
Subject: RE: JDBCRealm

You don't have a 'roles' table in your database.  'User_roles' is a link
entity between 'user' and 'roles'...  In this tables you should specify
all
possible roles.  Check the unofficial FAQ, or the apache site.



-Original Message-
From: Gregg Bolinger [mailto:[EMAIL PROTECTED] 
Sent: 01 August 2003 19:36
To: 'Tomcat Users List'
Subject: RE: JDBCRealm

FYI - I removed the REALM entry for the Database user lookup and used
the tomcat-users.xml file and it works fine.  It only fails when I have
the REALM entry.  But I still don't know why it is not working right.

Gregg

-Original Message-
From: Gregg Bolinger [mailto:[EMAIL PROTECTED] 
Sent: Friday, August 01, 2003 9:52 AM
To: [EMAIL PROTECTED]
Subject: JDBCRealm

I have been struggling trying to get this to work and I can't tell if I
am doing something wrong, or leaving something out, or what. Below is
all my code, then I will say what is happening: 
server.xml (relivant snippit) 
code: 
  _  


Realm  className=org.apache.catalina.realm.JDBCRealm debug=99
driverName=com.mysql.jdbc.Driver
connectionURL=jdbc:mysql://localhost/holocron
connectionName=gdboling connectionPassword=bolinger
userTable=users 
userNameCol=Username 
userCredCol=Password
userRoleTable=user_roles 
roleNameCol=Role /
  _  

web.xml (relivant snippit) 
code: 
  _  


security-constraint
web-resource-collection
  web-resource-nameSecurePages/web-resource-name
  descriptionSecurity constraint /secure/description
  url-pattern/secure/*/url-pattern
  http-methodGET/http-method
http-methodPOST/http-method
http-methodPUT/http-method
/web-resource-collection
auth-constraint 
  role-nameadmin/role-name 
  /auth-constraint
  user-data-constrainttransport-guarantee
NONE/transport-guarantee/user-data-constraint
/security-constraint
  
login-config
  auth-methodFORM/auth-method
  form-login-config
form-login-page/login.jsp/form-login-page
form-error-page/loginerror.jsp/form-error-page
  /form-login-config
/login-config
security-role
role-nameadmin/role-name
/security-role
  _  

login.jsp 
code: 
  _  


[EMAIL PROTECTED] contentType=text/html%
html
headtitleJSP Page/title/head
body
form action='j_security_check' method=POST
TABLE
TR
TD
UserName
/TD
TD
INPUT type='text' name='j_username' value=''
/TD
/TR
TR
TD
Password
/TD
TD
INPUT type='password' name='j_password' value=''
INPUT type='submit' name='submit' value='submit'
/TD
/TR
/TABLE
/body
/html
  _  

And my database has 2 tables 
users
Username
Password 
user_roles
Username
Role 
-
Now, I have a page in a folder called secure called AddReference.jsp.
When I try and access this page, I do get redirected to login.jsp. I
enter my username and password that I have stored in the database and
after clicking submit, I am taken to my loginerror.jsp page. I should be
redirected back to AddReference.jsp. I am entering the correct username
and password as I only have one entry. I get no compilation errors or
Tomcat errors when loading or stopping. 
If anyone has some insight to my problem, I would be greatly
appreciated. 
Thanks
Gregg Bolinger
 


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




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




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




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



RE: Problems with Tomcat in a high load environment

2003-08-01 Thread Mike Curwen
FYI, we're running 4.1.24 and our server is NOT busy, and we still get
quite a lot of this chatter in the logs.
 
Our catalina.out log currently has about 60k lines, 15k of which are
'connection timeout reached'.
Other lines (all together, maybe 500 of these):
INFO common.ChannelSocket  - server has been restarted or reset this
connection
INFO server.JkCoyoteHandler  - RESET 
 - or -
01-Aug-2003 17:59:12 org.apache.jk.server.JkCoyoteHandler action
SEVERE: Error in action code 
java.net.SocketException: Connection reset by peer: socket write error

Ok, that last one might actually be 'severe' and not just 'info', but no
one has reported any problems, and it's by far the least common.

This is potentially off-topic for this list, since it's a connector
thing, but I hope some connector people hang out here  Has any
thought been put into demoting these messages to DEBUG, if they are
indeed harmless?  Like in this bug report:
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16357



 -Original Message-
 From: Shapira, Yoav [mailto:[EMAIL PROTECTED] 
 Sent: Friday, August 01, 2003 1:35 PM
 To: Tomcat Users List
 Subject: RE: Problems with Tomcat in a high load environment
 
 
 
 Howdy,
 
 01-Aug-2003 17:48:01 org.apache.jk.common.ChannelSocket
 processConnection
 INFO: Server has been restarted or reset this connection
 
 This were mostly fixed in 4.1.24.  Try moving to it (or 
 better yet, 4.1.27), as there are several potentially 
 relevant fixes from 4.1.18.
 
 Yoav Shapira
 
 
 
 This e-mail, including any attachments, is a confidential 
 business communication, and may contain information that is 
 confidential, proprietary and/or privileged.  This e-mail is 
 intended only for the individual(s) to whom it is addressed, 
 and may not be saved, copied, printed, disclosed or used by 
 anyone else.  If you are not the(an) intended recipient, 
 please immediately delete this e-mail from your computer 
 system and notify the sender.  Thank you.
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


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



Overriding server.xml

2003-08-01 Thread Gregg Bolinger
I am going to be deploying my web app at cgiserver.com.  When I do so, I
don't believe I have access to the server.xml file.  So what file do I
need to include with my web app that will override default elements in
the server.xml file?
 
Thanks.
 
Gregg


RE: Overriding server.xml

2003-08-01 Thread Shapira, Yoav

Howdy,
Depends on the version of tomcat they run and on what elements you wish
to override.  Some, e.g. anything not under Context, you can't
override.  You can include a context.xml with your war file to specify
anything that would normally go inside the Context block of server.xml
for your context.

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: Gregg Bolinger [mailto:[EMAIL PROTECTED]
Sent: Friday, August 01, 2003 3:10 PM
To: [EMAIL PROTECTED]
Subject: Overriding server.xml

I am going to be deploying my web app at cgiserver.com.  When I do so,
I
don't believe I have access to the server.xml file.  So what file do I
need to include with my web app that will override default elements in
the server.xml file?

Thanks.

Gregg



This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


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



RE: JDBCRealm

2003-08-01 Thread Mike Curwen
*bash*   ;)

Gonna go back to the 'ranch now Gregg ?  hehe.

 -Original Message-
 From: Gregg Bolinger [mailto:[EMAIL PROTECTED] 
 Sent: Friday, August 01, 2003 2:08 PM
 To: 'Tomcat Users List'
 Subject: RE: JDBCRealm
 
 
 Ok, I figured out my STUPID problem.  I was giving the wrong 
 table name to the REALM element for my user_roles table.  
 Please, everyone bash me on the head.  I deserve  it. LOL
 
 Thanks for the help anyway.
 
 Gregg
 
 -Original Message-
 From: Gregg Bolinger [mailto:[EMAIL PROTECTED] 
 Sent: Friday, August 01, 2003 1:55 PM
 To: 'Tomcat Users List'
 Subject: RE: JDBCRealm
 
 Actually, I do have a roles table with a column named Role 
 and I have my roles listed there.  Is there anywhere in the 
 realm config I need to specify this table.  Because in the 
 docs it only specifies the user table and the user roles 
 table both of wich have 2 columns in each.
 
 Thanks.
 
 -Original Message-
 From: Stuart MacPherson [mailto:[EMAIL PROTECTED] 
 Sent: Friday, August 01, 2003 1:48 PM
 To: 'Tomcat Users List'
 Subject: RE: JDBCRealm
 
 You don't have a 'roles' table in your database.  
 'User_roles' is a link entity between 'user' and 'roles'...  
 In this tables you should specify all possible roles.  Check 
 the unofficial FAQ, or the apache site.
 
 
 
 -Original Message-
 From: Gregg Bolinger [mailto:[EMAIL PROTECTED] 
 Sent: 01 August 2003 19:36
 To: 'Tomcat Users List'
 Subject: RE: JDBCRealm
 
 FYI - I removed the REALM entry for the Database user lookup 
 and used the tomcat-users.xml file and it works fine.  It 
 only fails when I have the REALM entry.  But I still don't 
 know why it is not working right.
 
 Gregg
 
 -Original Message-
 From: Gregg Bolinger [mailto:[EMAIL PROTECTED] 
 Sent: Friday, August 01, 2003 9:52 AM
 To: [EMAIL PROTECTED]
 Subject: JDBCRealm
 
 I have been struggling trying to get this to work and I can't 
 tell if I am doing something wrong, or leaving something out, 
 or what. Below is all my code, then I will say what is happening: 
 server.xml (relivant snippit) 
 code: 
   _  
 
 
 Realm  className=org.apache.catalina.realm.JDBCRealm debug=99
 driverName=com.mysql.jdbc.Driver
 connectionURL=jdbc:mysql://localhost/holocron
 connectionName=gdboling connectionPassword=bolinger
 userTable=users 
 userNameCol=Username 
 userCredCol=Password
 userRoleTable=user_roles 
 roleNameCol=Role /
   _  
 
 web.xml (relivant snippit) 
 code: 
   _  
 
 
 security-constraint
 web-resource-collection
   web-resource-nameSecurePages/web-resource-name
   descriptionSecurity constraint /secure/description
   url-pattern/secure/*/url-pattern
   http-methodGET/http-method 
 http-methodPOST/http-method 
 http-methodPUT/http-method /web-resource-collection 
 auth-constraint 
   role-nameadmin/role-name 
   /auth-constraint
   user-data-constrainttransport-guarantee
 NONE/transport-guarantee/user-data-constraint
 /security-constraint
   
 login-config
   auth-methodFORM/auth-method
   form-login-config
 form-login-page/login.jsp/form-login-page
 form-error-page/loginerror.jsp/form-error-page
   /form-login-config
 /login-config
 security-role
 role-nameadmin/role-name
 /security-role
   _  
 
 login.jsp 
 code: 
   _  
 
 
 [EMAIL PROTECTED] contentType=text/html%
 html
 headtitleJSP Page/title/head
 body
 form action='j_security_check' method=POST
 TABLE
 TR
 TD
 UserName
 /TD
 TD
 INPUT type='text' name='j_username' value=''
 /TD
 /TR
 TR
 TD
 Password
 /TD
 TD
 INPUT type='password' name='j_password' value=''
 INPUT type='submit' name='submit' value='submit'
 /TD
 /TR
 /TABLE
 /body
 /html
   _  
 
 And my database has 2 tables 
 users
 Username
 Password 
 user_roles
 Username
 Role 
 -
 Now, I have a page in a folder called secure called 
 AddReference.jsp. When I try and access this page, I do get 
 redirected to login.jsp. I enter my username and password 
 that I have stored in the database and after clicking submit, 
 I am taken to my loginerror.jsp page. I should be redirected 
 back to AddReference.jsp. I am entering the correct username 
 and password as I only have one entry. I get no compilation 
 errors or Tomcat errors when loading or stopping. 
 If anyone has some insight to my problem, I would be greatly 
 appreciated. 
 Thanks
 Gregg Bolinger
  
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 

RE: Overriding server.xml

2003-08-01 Thread Gregg Bolinger
Thanks Yoav.  With that being said, is there anything I need to do in my
web.xml file to tell it to use context.xml instead of the server
context?  And also, is this information in the online tomcat docs
anywhere?  Cause I can't find it.

Gregg 

-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED] 
Sent: Friday, August 01, 2003 2:18 PM
To: Tomcat Users List
Subject: RE: Overriding server.xml


Howdy,
Depends on the version of tomcat they run and on what elements you wish
to override.  Some, e.g. anything not under Context, you can't
override.  You can include a context.xml with your war file to specify
anything that would normally go inside the Context block of server.xml
for your context.

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: Gregg Bolinger [mailto:[EMAIL PROTECTED]
Sent: Friday, August 01, 2003 3:10 PM
To: [EMAIL PROTECTED]
Subject: Overriding server.xml

I am going to be deploying my web app at cgiserver.com.  When I do so,
I
don't believe I have access to the server.xml file.  So what file do I
need to include with my web app that will override default elements in
the server.xml file?

Thanks.

Gregg



This e-mail, including any attachments, is a confidential business
communication, and may contain information that is confidential,
proprietary and/or privileged.  This e-mail is intended only for the
individual(s) to whom it is addressed, and may not be saved, copied,
printed, disclosed or used by anyone else.  If you are not the(an)
intended recipient, please immediately delete this e-mail from your
computer system and notify the sender.  Thank you.


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




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



RE: JDBCRealm

2003-08-01 Thread Gregg Bolinger
I would if the damn thing wasn't so busy.  All I get are 503's!  We
need to hurry up and get that hardware upgraded. :)

Gregg

-Original Message-
From: Mike Curwen [mailto:[EMAIL PROTECTED] 
Sent: Friday, August 01, 2003 2:20 PM
To: 'Tomcat Users List'
Subject: RE: JDBCRealm

*bash*   ;)

Gonna go back to the 'ranch now Gregg ?  hehe.

 -Original Message-
 From: Gregg Bolinger [mailto:[EMAIL PROTECTED] 
 Sent: Friday, August 01, 2003 2:08 PM
 To: 'Tomcat Users List'
 Subject: RE: JDBCRealm
 
 
 Ok, I figured out my STUPID problem.  I was giving the wrong 
 table name to the REALM element for my user_roles table.  
 Please, everyone bash me on the head.  I deserve  it. LOL
 
 Thanks for the help anyway.
 
 Gregg
 
 -Original Message-
 From: Gregg Bolinger [mailto:[EMAIL PROTECTED] 
 Sent: Friday, August 01, 2003 1:55 PM
 To: 'Tomcat Users List'
 Subject: RE: JDBCRealm
 
 Actually, I do have a roles table with a column named Role 
 and I have my roles listed there.  Is there anywhere in the 
 realm config I need to specify this table.  Because in the 
 docs it only specifies the user table and the user roles 
 table both of wich have 2 columns in each.
 
 Thanks.
 
 -Original Message-
 From: Stuart MacPherson [mailto:[EMAIL PROTECTED] 
 Sent: Friday, August 01, 2003 1:48 PM
 To: 'Tomcat Users List'
 Subject: RE: JDBCRealm
 
 You don't have a 'roles' table in your database.  
 'User_roles' is a link entity between 'user' and 'roles'...  
 In this tables you should specify all possible roles.  Check 
 the unofficial FAQ, or the apache site.
 
 
 
 -Original Message-
 From: Gregg Bolinger [mailto:[EMAIL PROTECTED] 
 Sent: 01 August 2003 19:36
 To: 'Tomcat Users List'
 Subject: RE: JDBCRealm
 
 FYI - I removed the REALM entry for the Database user lookup 
 and used the tomcat-users.xml file and it works fine.  It 
 only fails when I have the REALM entry.  But I still don't 
 know why it is not working right.
 
 Gregg
 
 -Original Message-
 From: Gregg Bolinger [mailto:[EMAIL PROTECTED] 
 Sent: Friday, August 01, 2003 9:52 AM
 To: [EMAIL PROTECTED]
 Subject: JDBCRealm
 
 I have been struggling trying to get this to work and I can't 
 tell if I am doing something wrong, or leaving something out, 
 or what. Below is all my code, then I will say what is happening: 
 server.xml (relivant snippit) 
 code: 
   _  
 
 
 Realm  className=org.apache.catalina.realm.JDBCRealm debug=99
 driverName=com.mysql.jdbc.Driver
 connectionURL=jdbc:mysql://localhost/holocron
 connectionName=gdboling connectionPassword=bolinger
 userTable=users 
 userNameCol=Username 
 userCredCol=Password
 userRoleTable=user_roles 
 roleNameCol=Role /
   _  
 
 web.xml (relivant snippit) 
 code: 
   _  
 
 
 security-constraint
 web-resource-collection
   web-resource-nameSecurePages/web-resource-name
   descriptionSecurity constraint /secure/description
   url-pattern/secure/*/url-pattern
   http-methodGET/http-method 
 http-methodPOST/http-method 
 http-methodPUT/http-method /web-resource-collection 
 auth-constraint 
   role-nameadmin/role-name 
   /auth-constraint
   user-data-constrainttransport-guarantee
 NONE/transport-guarantee/user-data-constraint
 /security-constraint
   
 login-config
   auth-methodFORM/auth-method
   form-login-config
 form-login-page/login.jsp/form-login-page
 form-error-page/loginerror.jsp/form-error-page
   /form-login-config
 /login-config
 security-role
 role-nameadmin/role-name
 /security-role
   _  
 
 login.jsp 
 code: 
   _  
 
 
 [EMAIL PROTECTED] contentType=text/html%
 html
 headtitleJSP Page/title/head
 body
 form action='j_security_check' method=POST
 TABLE
 TR
 TD
 UserName
 /TD
 TD
 INPUT type='text' name='j_username' value=''
 /TD
 /TR
 TR
 TD
 Password
 /TD
 TD
 INPUT type='password' name='j_password' value=''
 INPUT type='submit' name='submit' value='submit'
 /TD
 /TR
 /TABLE
 /body
 /html
   _  
 
 And my database has 2 tables 
 users
 Username
 Password 
 user_roles
 Username
 Role 
 -
 Now, I have a page in a folder called secure called 
 AddReference.jsp. When I try and access this page, I do get 
 redirected to login.jsp. I enter my username and password 
 that I have stored in the database and after clicking submit, 
 I am taken to my loginerror.jsp page. I should be redirected 
 back to AddReference.jsp. I am entering the correct username 
 and password as I only have one entry. I get no compilation 
 errors or Tomcat errors when loading or stopping. 
 If anyone has some insight to my problem, I would be greatly 
 appreciated. 
 Thanks
 Gregg Bolinger
  
 
 
 -
 To unsubscribe, e-mail: 

Re: Tomcat and LDAP Issues

2003-08-01 Thread Jon Wynacht
Well, I understand this is now a bug:

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=19864

Was this fixed in the 4.1.27 version? Can't seem to determine if it was  
based on the README in the download.

Jon

On Friday, August 1, 2003, at 12:07  PM, Jon Wynacht wrote:

Hi,

I have Tomcat 4.1.24 installed on a server that hosts a web  
application. I have set up the container to do authentication via LDAP  
and it works for a bit then just stops working. The only way to get  
things working again is to restart Tomcat.

I've included the error message below and am wondering if anybody on  
this list has had a similar experience? If so, how did you solve it?

Thanks in advance,

Jon

2003-08-01 10:37:29 JNDIRealm[Standalone]: lookupUser(jwynacht)
2003-08-01 10:37:29 JNDIRealm[Standalone]:   dn=uid=jwynacht,  
ou=active, ou=employees, ou=people, o=cisco.com
2003-08-01 10:37:29 JNDIRealm[Standalone]:   validating credentials by  
binding as the user
2003-08-01 10:37:29 JNDIRealm[Standalone]:   binding as uid=jwynacht,  
ou=active, ou=employees, ou=people, o=cisco.com
2003-08-01 10:37:29 CoyoteAdapter An exception or error occurred in  
the container during the request processing
java.lang.NullPointerException
	at  
org.apache.catalina.realm.JNDIRealm.authenticate(JNDIRealm.java:793)
	at  
org.apache.catalina.authenticator.BasicAuthenticator.authenticate(Basic 
Authenticator.java:161)
	at  
org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authenticato 
rBase.java:526)
	at  
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext. 
invokeNext(StandardPipeline.java:641)
	at  
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java: 
480)
	at  
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
	at  
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:24 
15)
	at  
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.jav 
a:180)
	at  
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext. 
invokeNext(StandardPipeline.java:643)
	at  
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherV 
alve.java:171)
	at  
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext. 
invokeNext(StandardPipeline.java:641)
	at  
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.jav 
a:172)
	at  
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext. 
invokeNext(StandardPipeline.java:641)
	at  
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java: 
480)
	at  
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
	at  
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve 
.java:174)
	at  
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext. 
invokeNext(StandardPipeline.java:643)
	at  
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java: 
480)
	at  
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
	at  
org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
	at  
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:5 
94)
	at  
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process 
Connection(Http11Protocol.java:392)
	at  
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:5 
65)
	at  
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPoo 
l.java:619)
	at java.lang.Thread.run(Thread.java:536)

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


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


RE: Overriding server.xml

2003-08-01 Thread Shapira, Yoav

Howdy,

Thanks Yoav.  With that being said, is there anything I need to do in
my
web.xml file to tell it to use context.xml instead of the server
context?

No, tomcat reads that as if it were in server.xml.  The in-memory
representation is identical.

And also, is this information in the online tomcat docs
anywhere?  Cause I can't find it.

Automatic Application Deployment is described here:
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/host.html#Automat
ic%20Application%20Deployment

I think the ability to put context.xml in the WAR file is described in
the release notes of 4.1.24 and later, but I'm not sure.  I should
probably add this information to the above page anyhow.

Yoav Shapira



This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


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



Re: FORM Login Bypassed

2003-08-01 Thread Tim Funk
In your cases there is nothing preventing you from programmatic security.

I look at security the same way some db verndors do. I might not have access 
to any table, but I might be granted access to a table or view which may 
access those tables I am not allowed to directly see.

In the case of a monolithic traffic cop, that can still be fine depending on 
your architecture. In fact, I hope to do something similar where I have one 
apache instance with jk or mod_proxy installed and it farms out *all* 
requests to different tomcats depending on the URL namespace(directory). Then 
apache can handle SSL and any other decorators and each tomcat can perform 
additional constraints (container or programmatic) as needed.

If you are rewriting URL's on the fly - this usually is a recipe for pain in 
dev vs test vs production.

-Tim

Mike Curwen wrote:
But what if you have a confederation (hmm... $20 word for the day) of
components that all together act as your controller.  One main traffic
cop controller out front that will invoke appropriate business logic in
other controllers... those *other* controllers having the security
constraints. More on that in my next comment.


Adding a constraint to the incoming URL is not a big deal if 
one knows this constraint before coding a webapp. 


But what about the case where the incoming URL is facading any number of
requests for resources?  It's almost as though you shouldn't ever
consider doing what Ronnie is doing (one monolithic traffic cop out
front) because you can't protect access to a subset of resources, or
have different users set up for different resources, etc, etc.  Is it an
acceptable work-around to use sendRedirect() or is there a better
pattern or 'best practice' recommendation? 


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


Re: Tomcat and LDAP Issues

2003-08-01 Thread Jeff Tulley
This is something to move over to the tomcat-dev list, I think.  This
code seems to have more than one thing wrong with it, and different
behavior than what is promised in the comments (and than what it had in
4.1.18).

Jeff Tulley  ([EMAIL PROTECTED])
(801)861-5322
Novell, Inc., The Leading Provider of Net Business Solutions
http://www.novell.com

 [EMAIL PROTECTED] 8/1/03 2:00:46 PM 
Well, I understand this is now a bug:

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=19864 

Was this fixed in the 4.1.27 version? Can't seem to determine if it was
 
based on the README in the download.

Jon

On Friday, August 1, 2003, at 12:07  PM, Jon Wynacht wrote:

 Hi,

 I have Tomcat 4.1.24 installed on a server that hosts a web  
 application. I have set up the container to do authentication via
LDAP  
 and it works for a bit then just stops working. The only way to get 

 things working again is to restart Tomcat.

 I've included the error message below and am wondering if anybody on 

 this list has had a similar experience? If so, how did you solve it?

 Thanks in advance,

 Jon

 2003-08-01 10:37:29 JNDIRealm[Standalone]: lookupUser(jwynacht)
 2003-08-01 10:37:29 JNDIRealm[Standalone]:   dn=uid=jwynacht,  
 ou=active, ou=employees, ou=people, o=cisco.com
 2003-08-01 10:37:29 JNDIRealm[Standalone]:   validating credentials
by  
 binding as the user
 2003-08-01 10:37:29 JNDIRealm[Standalone]:   binding as uid=jwynacht,
 
 ou=active, ou=employees, ou=people, o=cisco.com
 2003-08-01 10:37:29 CoyoteAdapter An exception or error occurred in 

 the container during the request processing
 java.lang.NullPointerException
   at  
 org.apache.catalina.realm.JNDIRealm.authenticate(JNDIRealm.java:793)
   at  

org.apache.catalina.authenticator.BasicAuthenticator.authenticate(Basic

 Authenticator.java:161)
   at  

org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authenticato

 rBase.java:526)
   at  

org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.

 invokeNext(StandardPipeline.java:641)
   at  

org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:

 480)
   at  

org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
   at  

org.apache.catalina.core.StandardContext.invoke(StandardContext.java:24

 15)
   at  

org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.jav

 a:180)
   at  

org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.

 invokeNext(StandardPipeline.java:643)
   at  

org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherV

 alve.java:171)
   at  

org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.

 invokeNext(StandardPipeline.java:641)
   at  

org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.jav

 a:172)
   at  

org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.

 invokeNext(StandardPipeline.java:641)
   at  

org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:

 480)
   at  

org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
   at  

org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve

 .java:174)
   at  

org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.

 invokeNext(StandardPipeline.java:643)
   at  

org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:

 480)
   at  

org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
   at  

org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
   at  

org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:5

 94)
   at  

org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process

 Connection(Http11Protocol.java:392)
   at  

org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:5

 65)
   at  

org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPoo

 l.java:619)
   at java.lang.Thread.run(Thread.java:536)



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




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


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



Re: Tomcat and LDAP Issues

2003-08-01 Thread Jeff Tulley
Oh, I was a little harsh on the method, I was missing one try catch
block that would be in effect when the authenticate method is retried. 
So, the comments are accurate, but you are still right that Socket
closed shouldn't be the only type of close failure dealt with.

Jeff Tulley  ([EMAIL PROTECTED])
(801)861-5322
Novell, Inc., The Leading Provider of Net Business Solutions
http://www.novell.com

 [EMAIL PROTECTED] 8/1/03 2:15:20 PM 
This is something to move over to the tomcat-dev list, I think.  This
code seems to have more than one thing wrong with it, and different
behavior than what is promised in the comments (and than what it had
in
4.1.18).

Jeff Tulley  ([EMAIL PROTECTED])
(801)861-5322
Novell, Inc., The Leading Provider of Net Business Solutions
http://www.novell.com 

 [EMAIL PROTECTED] 8/1/03 2:00:46 PM 
Well, I understand this is now a bug:

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=19864 

Was this fixed in the 4.1.27 version? Can't seem to determine if it
was
 
based on the README in the download.

Jon

On Friday, August 1, 2003, at 12:07  PM, Jon Wynacht wrote:

 Hi,

 I have Tomcat 4.1.24 installed on a server that hosts a web  
 application. I have set up the container to do authentication via
LDAP  
 and it works for a bit then just stops working. The only way to get 

 things working again is to restart Tomcat.

 I've included the error message below and am wondering if anybody on


 this list has had a similar experience? If so, how did you solve it?

 Thanks in advance,

 Jon

 2003-08-01 10:37:29 JNDIRealm[Standalone]: lookupUser(jwynacht)
 2003-08-01 10:37:29 JNDIRealm[Standalone]:   dn=uid=jwynacht,  
 ou=active, ou=employees, ou=people, o=cisco.com
 2003-08-01 10:37:29 JNDIRealm[Standalone]:   validating credentials
by  
 binding as the user
 2003-08-01 10:37:29 JNDIRealm[Standalone]:   binding as
uid=jwynacht,
 
 ou=active, ou=employees, ou=people, o=cisco.com
 2003-08-01 10:37:29 CoyoteAdapter An exception or error occurred in 

 the container during the request processing
 java.lang.NullPointerException
   at  
 org.apache.catalina.realm.JNDIRealm.authenticate(JNDIRealm.java:793)
   at  

org.apache.catalina.authenticator.BasicAuthenticator.authenticate(Basic

 Authenticator.java:161)
   at  

org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authenticato

 rBase.java:526)
   at  

org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.

 invokeNext(StandardPipeline.java:641)
   at  

org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:

 480)
   at  

org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
   at  

org.apache.catalina.core.StandardContext.invoke(StandardContext.java:24

 15)
   at  

org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.jav

 a:180)
   at  

org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.

 invokeNext(StandardPipeline.java:643)
   at  

org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherV

 alve.java:171)
   at  

org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.

 invokeNext(StandardPipeline.java:641)
   at  

org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.jav

 a:172)
   at  

org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.

 invokeNext(StandardPipeline.java:641)
   at  

org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:

 480)
   at  

org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
   at  

org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve

 .java:174)
   at  

org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.

 invokeNext(StandardPipeline.java:643)
   at  

org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:

 480)
   at  

org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
   at  

org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
   at  

org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:5

 94)
   at  

org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process

 Connection(Http11Protocol.java:392)
   at  

org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:5

 65)
   at  

org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPoo

 l.java:619)
   at java.lang.Thread.run(Thread.java:536)



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





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


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

Re: Tomcat and LDAP Issues

2003-08-01 Thread Jon Wynacht
Thanks Jeff, I saw that you posted it thereshall I look to the list 
for an answer or troll both?

Thanks,

Jon

On Friday, August 1, 2003, at 01:21  PM, Jeff Tulley wrote:

Oh, I was a little harsh on the method, I was missing one try catch
block that would be in effect when the authenticate method is retried.
So, the comments are accurate, but you are still right that Socket
closed shouldn't be the only type of close failure dealt with.
Jeff Tulley  ([EMAIL PROTECTED])
(801)861-5322
Novell, Inc., The Leading Provider of Net Business Solutions
http://www.novell.com
[EMAIL PROTECTED] 8/1/03 2:15:20 PM 
This is something to move over to the tomcat-dev list, I think.  This
code seems to have more than one thing wrong with it, and different
behavior than what is promised in the comments (and than what it had
in
4.1.18).
Jeff Tulley  ([EMAIL PROTECTED])
(801)861-5322
Novell, Inc., The Leading Provider of Net Business Solutions
http://www.novell.com
[EMAIL PROTECTED] 8/1/03 2:00:46 PM 
Well, I understand this is now a bug:

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=19864

Was this fixed in the 4.1.27 version? Can't seem to determine if it
was
based on the README in the download.

Jon

On Friday, August 1, 2003, at 12:07  PM, Jon Wynacht wrote:

Hi,

I have Tomcat 4.1.24 installed on a server that hosts a web
application. I have set up the container to do authentication via
LDAP
and it works for a bit then just stops working. The only way to get

things working again is to restart Tomcat.

I've included the error message below and am wondering if anybody on


this list has had a similar experience? If so, how did you solve it?

Thanks in advance,

Jon

2003-08-01 10:37:29 JNDIRealm[Standalone]: lookupUser(jwynacht)
2003-08-01 10:37:29 JNDIRealm[Standalone]:   dn=uid=jwynacht,
ou=active, ou=employees, ou=people, o=cisco.com
2003-08-01 10:37:29 JNDIRealm[Standalone]:   validating credentials
by
binding as the user
2003-08-01 10:37:29 JNDIRealm[Standalone]:   binding as
uid=jwynacht,

ou=active, ou=employees, ou=people, o=cisco.com
2003-08-01 10:37:29 CoyoteAdapter An exception or error occurred in

the container during the request processing
java.lang.NullPointerException
at
org.apache.catalina.realm.JNDIRealm.authenticate(JNDIRealm.java:793)
at
org.apache.catalina.authenticator.BasicAuthenticator.authenticate(Basic

Authenticator.java:161)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authenticato

rBase.java:526)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.

invokeNext(StandardPipeline.java:641)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:

480)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
	at

org.apache.catalina.core.StandardContext.invoke(StandardContext.java:24

15)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.jav

a:180)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.

invokeNext(StandardPipeline.java:643)
at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherV

alve.java:171)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.

invokeNext(StandardPipeline.java:641)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.jav

a:172)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.

invokeNext(StandardPipeline.java:641)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:

480)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
	at

org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve

.java:174)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.

invokeNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:

480)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
	at

org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
	at

org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:5

94)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process

Connection(Http11Protocol.java:392)
at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:5

65)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPoo

l.java:619)
at java.lang.Thread.run(Thread.java:536)


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





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

Jasper, JSPC, Ant and Precompiling JSP's

2003-08-01 Thread Mark R. Diggory
Hello,

I've done my best to review the archives to resolve my problem, but I've 
not found a solution there so I'm posting it.

I'm stuck back on Tomcat 4.1.24 (LE) and I'm encountering some issues 
with JSP Precompilation using Ant and JSPC. First let me outline my problem.

Most messages I've read to date focus on using JSP recompiling to turn 
the JSP into Servlets stored in a WAR file and require generating a 
fragment web.xml file and including it into your web.xml, I AM NOT 
trying to do this. I want my JSP's to get precompiled into the work 
directory of Tomcat and used from there, the exact same way that Tomcat 
does it. This way afterward, if the jsp is modified, tomcat can still 
recompile it.

I have the following jspc and javac tasks coded in my build.xml:

mkdir dir=/var/tomcat4/work/Standalone/localhost/Foo/

jspc srcdir=${deploy.home}
  destdir=/var/tomcat4/work/Standalone/localhost/Foo
  failonerror=false
  compiler=jasper41
classpath
!-- snip --
/classpath
exclude name=**/WEB-INF/**/
/jspc
javac destdir=/var/tomcat4/work/Standalone/localhost/Foo
   optimize=off
   debug=on failonerror=false
   srcdir=/var/tomcat4/work/Standalone/localhost/Foo
   excludes=**/*.smap
 classpath
!-- snip --
 /classpath
/javac
Both tasks get completed successfully. I observe problems in the package 
names of the JSPC generated java files where the following is the case.

/var/tomcat/webapps/Foo/Bar/Bam.jsp results in the package name

package Bar;
...
which becomes a problem when I try to access this JSP included into 
another, I get the following error

java.lang.NoClassDefFoundError: org/apache/jsp/Bam_jsp (wrong name: 
Bar/Bam_jsp)
	at java.lang.ClassLoader.defineClass0(Native Method)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:502)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:431)
	at org.apache.jasper.servlet.JasperLoader.loadClass(Unknown Source)
	at org.apache.jasper.servlet.JasperLoader.loadClass(Unknown Source)
	at org.apache.jasper.JspCompilationContext.load(Unknown Source)
	at org.apache.jasper.servlet.JspServletWrapper.getServlet(Unknown Source)
	at org.apache.jasper.compiler.Compiler.isOutDated(Unknown Source)
	at org.apache.jasper.compiler.Compiler.isOutDated(Unknown Source)
	...

I read somewhere that work had been done on my version (4.1.24) to 
eliminate a naming conflict problem. I assume this is why there are now 
package names on my _jsp.java files.  I find that when I let 
Tomcat/Jasper compile all my jsp's the java files *all* have the package 
name org.apache.jsp no matter what their directory. I assume that my 
compilation is conflicting with Tomcats because of the package naming 
differences.

So, I've tried adding the following attribute package=org.apache.jsp 
to the jspc task, but this results in even more problems because all the 
package names now look like:

package org.apache.jsp.Bar;

and when they are compiled, they end up in a separate directory

/var/tomcat4/work/Foo/org/apache/jsp/Bar/Bam_jsp.java

Any ideas or solutions out there would be really helpful for me. I just 
want to have Tomcat start out using my precompiled jsp's instead of 
initially compiling them itself.

thanks
Mark Diggory
HMDC
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Tomcat5: running embedded with JMX

2003-08-01 Thread Jeremy Crosbie
Hello, all. I am attempting to run the embedded distribution of Tomcat 5.0.5
on Linux using J2SDK 1.4.2 and running into problems. After tweaking the
tomcat.webapps property to point to the right place and copying the
management application over I am seeing the following stack trace:

[jmx-service] 2109 [main] INFO core.StandardEngine  - Starting Servlet
Engine: Apache Tomcat/5.0.5
[jmx-service] 3055 [main] ERROR modeler.BaseModelMBean  - Exception invoking
method start
[jmx-service] java.lang.NullPointerException
[jmx-service]   at
org.apache.commons.collections.ArrayStack.push(ArrayStack.java)
[jmx-service]   at
org.apache.commons.digester.Digester.push(Digester.java:2364)
[jmx-service]   at
org.apache.catalina.startup.ContextConfig.applicationConfig(ContextConfig.ja
va:340)
[jmx-service]   at
org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:720)
[jmx-service]   at
org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:
271)
...

I am not seeing any errors during MBean deployment. I have started browsing
the code to attempt to figure out what is going on but I was hoping someone
on this list may have encountered the same problem. I tried searching the
mail archives, Google groups, and the Tomcat site for more documentation on
running embedded but have come up empty.

Thanks in advance for your help.

Jeremy Michael Crosbie



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



RE: Jasper, JSPC, Ant and Precompiling JSP's

2003-08-01 Thread Steph Richardson

That is EXACTLY what I am trying to do today. I've tooled around in the ant code, and 
it seems this is more of a jasper issue than
an ant one, because ant passes a long list of files to jasper, with the unwanted 
pathnames that end up as part of your package name.

I'm pretty sure if you used something like foreach to iterate through the same 
fileset that is being created in the jspc task, and
called jspc for each directory individually, and used the package=org.apache.jsp 
attribute, then this would work - because then
jasper wouldn't know about you're own subdirectory. But this seems ugly so I haven't 
actually done it yet.

You can use the webapp element inside jspc, but then jasper doesn't know about your 
exclude and so tries to compile some
fragment.jsp type include files, that are not really full jsp files, and so it crashes 
on those ( this is my current problem ). But
if all your included files are called .inc rather than .jsp then this may work.
jspc
   destdir=${webapp.workdir}
   failonerror=false
   classpathref=jspPreCompile.classpath
   package=org.apache.jsp
   compiler=jasper41
 webapp basedir=${webapp.path}/
 exclude name=**/WEB-INF/**/
 exclude name=include/**/
/jspc


So now I'm trying to make an ant step or task to replace the first line of every 
generated _jsp.java file with the correct package
name, between generating them and compiling them.
Plz met me know if you have something better.


Regards,

Steph


PS - if you're from the same HMDC i know, I suspect the site you are trying to 
pre-compile, is one I wrote last summer.



 -Original Message-
 From: Mark R. Diggory [mailto:[EMAIL PROTECTED]
 Sent: Friday, August 01, 2003 5:19 PM
 To: Tomcat Users List
 Subject: Jasper, JSPC, Ant and Precompiling JSP's


 Hello,

 I've done my best to review the archives to resolve my problem, but I've
 not found a solution there so I'm posting it.

 I'm stuck back on Tomcat 4.1.24 (LE) and I'm encountering some issues
 with JSP Precompilation using Ant and JSPC. First let me outline my problem.

 Most messages I've read to date focus on using JSP recompiling to turn
 the JSP into Servlets stored in a WAR file and require generating a
 fragment web.xml file and including it into your web.xml, I AM NOT
 trying to do this. I want my JSP's to get precompiled into the work
 directory of Tomcat and used from there, the exact same way that Tomcat
 does it. This way afterward, if the jsp is modified, tomcat can still
 recompile it.


 I have the following jspc and javac tasks coded in my build.xml:

 mkdir dir=/var/tomcat4/work/Standalone/localhost/Foo/

 jspc srcdir=${deploy.home}
destdir=/var/tomcat4/work/Standalone/localhost/Foo
failonerror=false
compiler=jasper41
  classpath
  !-- snip --
  /classpath
  exclude name=**/WEB-INF/**/
 /jspc

 javac destdir=/var/tomcat4/work/Standalone/localhost/Foo
 optimize=off
 debug=on failonerror=false
 srcdir=/var/tomcat4/work/Standalone/localhost/Foo
 excludes=**/*.smap
   classpath
  !-- snip --
   /classpath
 /javac


 Both tasks get completed successfully. I observe problems in the package
 names of the JSPC generated java files where the following is the case.

 /var/tomcat/webapps/Foo/Bar/Bam.jsp results in the package name

 package Bar;
 ...

 which becomes a problem when I try to access this JSP included into
 another, I get the following error

 java.lang.NoClassDefFoundError: org/apache/jsp/Bam_jsp (wrong name:
 Bar/Bam_jsp)
   at java.lang.ClassLoader.defineClass0(Native Method)
   at java.lang.ClassLoader.defineClass(ClassLoader.java:502)
   at java.lang.ClassLoader.defineClass(ClassLoader.java:431)
   at org.apache.jasper.servlet.JasperLoader.loadClass(Unknown Source)
   at org.apache.jasper.servlet.JasperLoader.loadClass(Unknown Source)
   at org.apache.jasper.JspCompilationContext.load(Unknown Source)
   at org.apache.jasper.servlet.JspServletWrapper.getServlet(Unknown Source)
   at org.apache.jasper.compiler.Compiler.isOutDated(Unknown Source)
   at org.apache.jasper.compiler.Compiler.isOutDated(Unknown Source)
   ...


 I read somewhere that work had been done on my version (4.1.24) to
 eliminate a naming conflict problem. I assume this is why there are now
 package names on my _jsp.java files.  I find that when I let
 Tomcat/Jasper compile all my jsp's the java files *all* have the package
 name org.apache.jsp no matter what their directory. I assume that my
 compilation is conflicting with Tomcats because of the package naming
 differences.

 So, I've tried adding the following attribute package=org.apache.jsp
 to the jspc task, but this results in even more problems because all the
 package names now look like:

 package org.apache.jsp.Bar;

 and when they are compiled, they end up in a separate directory

 /var/tomcat4/work/Foo/org/apache/jsp/Bar/Bam_jsp.java

 

RE: Servlets JSPs log to different files

2003-08-01 Thread Adrian Beech
G'day,

Can anyone expand on this further and explain how to use a Log4j logger
reference in beans that do not have a notion of what the underlying servlet
context is?  The only way I can see how to get this to work is to pass the
logger reference as an argument in the bean's constructor.  

My query does seem to be out of context for this list so my apologies in
advance.

AB

-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED] 
Sent: Saturday, 2 August 2003 3:24 AM
To: Tomcat Users List
Subject: RE: Servlets  JSPs log to different files



Howdy,
Then use log4j.

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: Rick Roberts [mailto:[EMAIL PROTECTED]
Sent: Friday, August 01, 2003 1:18 PM
To: Tomcat Users List
Subject: Re: Servlets  JSPs log to different files



 How are you logging in your servlets?  Are you using 
 System.out/System.err?  If so, don't use them, and instead use the
 ServletContext#log(..) methods.

Actually, they are mostly beans with no ServletContext :(

--
***
* Rick Roberts*
* Advanced Information Technologies, Inc. *
***


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




This e-mail, including any attachments, is a confidential business
communication, and may contain information that is confidential, proprietary
and/or privileged.  This e-mail is intended only for the individual(s) to
whom it is addressed, and may not be saved, copied, printed, disclosed or
used by anyone else.  If you are not the(an) intended recipient, please
immediately delete this e-mail from your computer system and notify the
sender.  Thank you.


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




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



Re[2]: Servlets JSPs log to different files

2003-08-01 Thread Kenneth Brooks
I currently do the following.
See the 3 or 4 sections of code below.

I have a servlet that is loaded at the time tomcat starts.
Pay no attention to the crap coding in this file, but you get the idea

 BEGIN EimplementLogger.java ///
package whateverpackage.log;

import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;

import org.apache.log4j.xml.*;

import javax.naming.NamingException;
import javax.naming.Context;
import javax.naming.InitialContext;

public class EimplementLogger extends HttpServlet {
   DOMConfigurator domConfig;

  public void init() throws ServletException {
 // init code here
 domConfig = new DOMConfigurator();

 // point to log4j configuration file
 Context ctx = null;
 String log4jxmlfilepath = null;

 try {
ctx = new InitialContext();
 } catch (NamingException e) {
//   System.out.println(Couldn't build an initial context :  + e);
   return;
 }

 try {
log4jxmlfilepath = (String)(ctx.lookup(java:/comp/env/log4jxmlfilepath));
 } catch (NamingException e) {
   System.out.println(JNDI lookup failed :  + e);
 }

 domConfig.configure(log4jxmlfilepath + log4j.xml);
   }

}
/ END EimplementLogger.java 

In my web.xml i have the following to start this servlet up.
servlet
servlet-name
EimplementLogger
/servlet-name

servlet-class
whateverpackage.log.EimplementLogger
/servlet-class
load-on-startup5/load-on-startup
/servlet

then in the class (bean) that has no idea about the context i have the
following:
   protected org.apache.log4j.Logger logWriter =
   org.apache.log4j.Logger.getLogger(nameoffiletoappearinlog);

and i use it like so
logWriter.debug(here is a debug statement);

hope that helps

-ken






Friday, August 1, 2003, 8:51:28 PM -\][/

AB G'day,

AB Can anyone expand on this further and explain how to use a Log4j logger
AB reference in beans that do not have a notion of what the underlying servlet
AB context is?  The only way I can see how to get this to work is to pass the
AB logger reference as an argument in the bean's constructor.  

AB My query does seem to be out of context for this list so my apologies in
AB advance.

AB AB

AB -Original Message-
AB From: Shapira, Yoav [mailto:[EMAIL PROTECTED] 
AB Sent: Saturday, 2 August 2003 3:24 AM
AB To: Tomcat Users List
AB Subject: RE: Servlets  JSPs log to different files



AB Howdy,
AB Then use log4j.

AB Yoav Shapira
AB Millennium ChemInformatics


-Original Message-
From: Rick Roberts [mailto:[EMAIL PROTECTED]
Sent: Friday, August 01, 2003 1:18 PM
To: Tomcat Users List
Subject: Re: Servlets  JSPs log to different files



 How are you logging in your servlets?  Are you using 
 System.out/System.err?  If so, don't use them, and instead use the
 ServletContext#log(..) methods.

Actually, they are mostly beans with no ServletContext :(

--
***
* Rick Roberts*
* Advanced Information Technologies, Inc. *
***


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




AB This e-mail, including any attachments, is a confidential business
AB communication, and may contain information that is confidential, proprietary
AB and/or privileged.  This e-mail is intended only for the individual(s) to
AB whom it is addressed, and may not be saved, copied, printed, disclosed or
AB used by anyone else.  If you are not the(an) intended recipient, please
AB immediately delete this e-mail from your computer system and notify the
AB sender.  Thank you.


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




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




/][/-\][\


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



Re: JSP Parser

2003-08-01 Thread Bill Barker
Jasper doesn't depend on Tomcat internals.  It can be used on it's own, or
even as the JSP Parser for another Servlet-Container.

Tim Lee [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Hello,

 I'm interested in finding just a jsp parser and not an entire applicaiton
 server.  Is there anyway to user Jasper outside of Tomcat without the web
 and app servers?

 Thanks,
 Tim

***
 The information contained in this message is intended only for the
 confidential use of the recipient(s) named above. This message is
privileged
 and confidential. If the reader of this message is not the intended
 recipient or any agent responsible for delivering it to the intended
 recipient, you are hereby notified that you have received this document in
 error and that any review, dissemination, distribution, or copying of this
 message is strictly prohibited. If you have received this communication in
 error, please notify us immediately. SMG reserves the right to monitor and
 review all content sent to and from this email address. Messages sent to
and
 from this address may be stored on the SMG email system.




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