Re: trouble to run servlet

2003-02-09 Thread Sean Dockery
I would suspect it is because you are running Apache on port 80 and not
Tomcat.  You will need to set up a mod_jk (or mod_jk2) connector to have
Apache forward specific URL requests to Tomcat.

Why are you putting a HelloServlet inside the admin application anyway?

- Original Message -
From: Jianping Zhu [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Saturday, February 08, 2003 20:29
Subject: trouble to run servlet


 I have redhat 7.3 with apach tomcat running on it
 I put HelloServlet on following directoy:

usr/local/jwsdp-1_0_01/server/webapps/admin/WEB-INF/classes/HelloServlet.cl
ass

 Then i try http://mango.ctegd.uga.edu/servlet/HelloServlet; to invoke the
 servlet. but failed
 in error_log i got:
 [Sat Feb  8 22:19:07 2003] [error] [client 128.193.47.116] File does not
 exist: /var/www/mango.ctegd.uga.edu/html/servlet/HelloServlet
 

 Why? how can i fix this problem?

 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]




Re: Need help w. another jsp!

2003-02-09 Thread Sean Dockery
Hello, Steve.

Before JSP files can be compiled by javac, they have to be translated to
Java source files by a JSP compiler.  I doubt you really need to compile the
JSP yourself as Tomcat will automatically compile JSP files when they are
requested by a browser.  Move your calendar.jsp into the webapps\ROOT.  Then
access it as http://localhost:8080/calendar.jsp using your web browser when
Tomcat is running.

The only reason why you would want to compile JSP files before they are
served is to eliminate the compiler hit when the JSP file is first
requested, or to perform some automated tests (by confirming that all of
your JSP files are legal).  When you are casually building a web
application, pre-compiling JSP files unnecessary complicates the process.

Sean Dockery
[EMAIL PROTECTED]
Certified Java Web Component Developer
Certified Delphi Programmer
SBD Consultants
http://www.sbdconsultants.com

- Original Message -
From: Steve Burrus [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, February 08, 2003 23:35
Subject: Need help w. another jsp!



 Hello all, I am having yet more trouble with executing a jsp in the right
way! The jsp in question this time is a calendar.jsp, which as the name of
it suggests, displays a calendar. I placed/put it into the right folder, the
C:\jakarta-tomcat\webapps\ROOT\WEB-INF\classes, but alas, when I go to
compiling it in DOS, all that I seem to get for my efforts is this:

 C:\jakarta-tomcat-4.1.18\webapps\ROOT\WEB-INF\classesjavac calendar.jsp
 javac: invalid flag: calendar.jsp
 Usage: javac options source files
 where possible options include:
   -gGenerate all debugging info
   -g:none   Generate no debugging info
   -g:{lines,vars,source}Generate only some debugging info
   -nowarn   Generate no warnings
   -verbose  Output messages about what the compiler is
doing
   -deprecation  Output source locations where deprecated APIs
are us
 ed
   -classpath path Specify where to find user class files
   -sourcepath pathSpecify where to find input source files
   -bootclasspath path Override location of bootstrap class files
   -extdirs dirs   Override location of installed extensions
   -d directorySpecify where to place generated class files
   -encoding encoding  Specify character encoding used by source
files
   -source release Provide source compatibility with specified
release
   -target release Generate class files for specific VM version
   -help Print a synopsis of standard options

 FYI: I had just gotten thru with editing my System applet in the env.
variables section for the classpath specifying the lib folder, but that
didn't seem to help! Can someone please help me? Thank you




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




Re: Tomcat complains: java.security.NoSuchProviderException: no such provider: BC

2003-02-09 Thread Sean Dockery
Remember that your classpath in your environment which is used by the java
compiler when you issue a compile command from the command line is not the
same classpath that Tomcat uses when it is running.

Move the JAR into $CATALINA_HOME/common/lib.  I don't believe that Tomcat
supports loading JAR files from $JRE_HOME/jre/lib/ext.

- Original Message -
From: Mark Liu [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Sunday, February 09, 2003 00:42
Subject: Tomcat complains: java.security.NoSuchProviderException: no such
provider: BC


 I run Tomcat 4.1.18 on my Win2K box.

 Because my project will use bouncycastle cryptographic
 bundle (known as BC version 1.18), I have this package
 properly installed on my system.  If you don't believe
 it, look at the following output:

 C:\Javajava ListCryptoProviders
 SUN version 1.2
 SunJSSE version 1.4
 SunRsaSign version 1.0
 SunJCE version 1.4
 SunJGSS version 1.0
 BC version 1.18

 C:\Java

 You see, BC version 1.18 is nicely shown there.

 It is the output from the following short code:

 /* This class lists the cryptographic
  * providers available on current system.
  */

 import java.security.*;

 class ListCryptoProviders
 {  public static void main(String []args)
{  Provider [] providers = Security.getProviders();
   for(int i=0; iproviders.length; i++)
   { System.out.println(providers[i]);
   }
 }
 }

 However, the Servlet I write which uses the BC bundle
 does not work with Tomcat.

 When I try to invoke that servlet from the browser,
 the Tomcat console says:

 java.security.NoSuchProviderException: no such
 provider: BC

 It's weird!

 I have put the BC bundle jar file under both
 JDK_HOME\jre\lib\ext and Program
 Files\Java\j2re1.4.0\lib\ext.

 Needless to say that I have also added the following
 line

 security.provider.6=org.bouncycastle.jce.provider.BouncyCastleProvider

 in file java.security in its due paths (one under
 JDK_HOME\jre\lib\security and one under C:\Program
 Files\Java\j2re1.4.0\lib\security).

 I even copied the BC bundle jar file to C:\Program
 Files\Apache Group\Tomcat 4.1\common\lib, but Tomcat
 still keeps complaining:

 java.security.NoSuchProviderException: no such
 provider: BC

 I have no clue how I should handle this.

 Any idea please?

 Mark




 __
 Do you Yahoo!?
 Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
 http://mailplus.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: War files / codeBase and security permissions (v4.0.4)

2003-02-09 Thread Sean Dockery
You should not have to make any changes to policy files for this to work.
It is Tomcat itself that is unpacking the WAR files--so assigning
permissions to the WAR file itself won't do anything.  What does your
server.xml file look like?  How did you determine that WAR files weren't
automatically being unpacked?  What error did you see?

Sean Dockery
[EMAIL PROTECTED]
Certified Java Web Component Developer
Certified Delphi Programmer
SBD Consultants
http://www.sbdconsultants.com

- Original Message -
From: Kenneth J Baker [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Saturday, February 08, 2003 21:13
Subject: War files / codeBase and security permissions (v4.0.4)



 I'm deploying a war file with unpackWARs=false.  I am trying to grant
 permissions to this war in 04webapps.policy.

 Here is what I've tried...

 Given the examples this is what I would expect to work but doesn't:
 grant codeBase file:${catalina.home}/webapps/iface.war!/- {
 permission java.security.AllPermission;
 };


 This doesn't work (but works if unpackWARs=true):
 grant codeBase file:${catalina.home}/webapps/iface/- {
 permission java.security.AllPermission;
 };


 This works because this is where tomcat extracts the war to (with
unpackWARs set to false)
 grant codeBase file:${catalina.home}/work/Standalone/localhost/iface/- {
 permission java.security.AllPermission;
 };


 What is the correct way to specify permissions to give to a war file?

 Thanks,
 Ken


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




mod_jk config

2003-02-09 Thread Carlos Godoy

Hello, I'm new in Tomcat.

I'm using Apache+Tomcat:
Apache/1.3.22
jakarta-tomcat-4.1.18-LE-jdk14
mod_jk

I have configured Tomcat and it's working.
I can view and execute servlets in the /examples folder.

Now I want to execute servlets under the url: http://www.myurl.com/servlets/

I've tried to add this code lines to mod_jk.conf:

Alias /servlets /usr/local/jakarta-tomcat/webapps/servlets
Directory /usr/local/jakarta-tomcat/webapps/servlets
Options Indexes FollowSymLinks
/Directory
JkMount /servlets/* ajp13

In directory $CATALINA/webapps/servlets/ I have created folder
WEB-INF/classes/ and I have added a test servlet.

URL: http://www.myurl.com/servlets/Hello it can't be found.

Anybody can help me?
If this is not the place where search this solution, anybody can tell me
where to find it?

Thanks
Carlos Godoy





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




Re: Help: JNI, mod_jk2 , Apache 2 not working

2003-02-09 Thread Rahul Bhargava
Found my problem after building a debug build of mod_jk2 and going thru the
debugger. It
was failing to create a shm slot b'cos I didn't have a shm config block!!
Even though I was not
running a multi-proc server, just a single proc yet ...#4%^
documentation...

[shm:]
info=Scoreboard. Required for reconfiguration and status with multiprocess
servers
file=${serverRoot}/logs/jk2.shm
size=100
debug=99
disabled=0

_
Rahul Bhargava
- Original Message -
From: Robo code [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Saturday, February 08, 2003 10:45 PM
Subject: RE: Help: JNI, mod_jk2 , Apache 2 not working


|
| Hi Jimmy,
|
| I have solved some of the problems you are facing. I can get Apache
| to startTomcat via JNI cleanly. The TomcatStarter problem was solved
| by putting $TOMCAT/bin/tomcat-jni.jar on the path. I have couple
| of startup servlets which were correctly loaded. I use Cactus so had
| to put the log4j*.jar on $TOMCAT/server/lib, once I did that all
| my startup servlets came up fine.
|
| But when I hit Apache with a request meant for a Tomcat hosted
JSP/Servlet,
| I get the error below. I tried Apache 2.0.43 since the
| pre-built mod_jk2.dll on Tomcat site was compiled with 2.0.43 and I
| get the same error. Attached are the jk2 and worker2 files.
|
| Note standalone Tomcat works fine with the web.xml etc. So the culprit
| must be worker2 or jk2 properties file. Can't seem to find any docs
| on the syntax of these two files. Can you send your files. Mine
| are attached.
|
| No matter what I do, always the same msg in Apache errors.log. Close
| to giving up on jk2 and planning on trying jk or mod_webapps. It
| seems most people are not running Apache2+TC4 in-process. I would hate
| to loose performance by going out of process, but if none of the JNI
| modes work that I guess will be the last resort
|
| [rahul@PC653933 ~/1Apache2/logs]$ tail -f error.log
| [Sat Feb 08 22:33:14 2003] [notice] Parent: Created child process 3380
| [Sat Feb 08 22:33:14 2003] [error] shm.init(): No file
| [Sat Feb 08 22:33:14 2003] [notice] Child 3380: Child process is running
| [Sat Feb 08 22:33:17 2003] [error] shm.init(): No file
| [Sat Feb 08 22:33:17 2003] [error] mod_jk child init 1 0
| [Sat Feb 08 22:33:17 2003] [notice] Child 3380: Acquired the start mutex.
| [Sat Feb 08 22:33:17 2003] [notice] Child 3380: Starting 250 worker
threads.
| 0 [Thread-1] INFO modeler.Registry  - Loading registry information
| 30 [Thread-1] INFO modeler.Registry  - Creating new Registry instance
| 812 [Thread-1] INFO modeler.Registry  - Creating MBeanServer
| [Sat Feb 08 22:34:33 2003] [error] workerEnv.init() create slot epStat.0
| failed
| [Sat Feb 08 22:34:34 2003] [error] lb.service() worker failed 12 for
| ajp13:j
| ni
| [Sat Feb 08 22:34:34 2003] [error] lb.service() unrecoverable error...
| [Sat Feb 08 22:34:34 2003] [error] mod_jk.handler() Error connecting to
| tomcat 1
| 2
|
| Thanks,
| Rahul.
|
| From: jcubic [EMAIL PROTECTED]
| Reply-To: Tomcat Users List [EMAIL PROTECTED]
| To: Tomcat Users List [EMAIL PROTECTED]
| Subject: RE: Help: JNI, mod_jk2 , Apache 2 not working
| Date: Sat, 8 Feb 2003 10:59:23 -0800
| 
| I just got Apache 2.0.44 and Tomat 4.1 working with a little twist. I
think
| we are trying to accomplish the same thing. I think server.xml is not the
| culprit. jk2.properties and worker2.properties are. Also web.xml in
Tomcat
| home as well as the webapp could affect servlet and jps execution. What
do
| your jk2.properties and worker2.propeties look like?
| 
| My problem is that I cannot get Tomcat fired up properly from Apache
| without
| first running Tomcat manually. I keep on getting 'HTTP Status 503 -
Servlet
| invoker is currently unavailable' error if I don't run Tomcat first. Of
| course this would defeat the purpose of using Tomcat as worker from
Apache.
| 
| My other problem is that I cannot get org/apache/jk/apr/TomcatStarter
| started properly unless I specify whole bunch of jar files using
classpath
| in [vm:] directory. It looks like jvm that Apache runs have trouble with
| class path in my environment. But I don't know how to set it. I am
| interested in knowing how you get TomcatStarter working.
| 
| Other than those 2 problems, my Apache can serve up html, jsp, as well as
| servlet in my webapp fine.
| 
| Jimmy
| Redmond, Washington
| 
| 
| [jcubic]  -Original Message-
| From: Rahul Bhargava [mailto:[EMAIL PROTECTED]]
| Sent: Saturday, February 08, 2003 8:59 AM
| To: [EMAIL PROTECTED]
| Subject: Help: JNI, mod_jk2 , Apache 2 not working
| 
| 
|Re-posting with the relevant files attached.
| 
|Keep getting the error  from mod_jk2 about Error connecting to tomcat
| 12.
| 
|Using Apache 2.0.44 with Tomcat 4.1.18 on Win2K. Checked my config
1000
| times everything looks
|good. Is this a know issue ? Is there ant doc/reference on
| workers2.properties ?
| 
|Attached are my config files.
| 
|

Security manager, velocity and logging - access denied

2003-02-09 Thread Fredrik Jonson
Hello, 

I'm a tomcat newbie running debian and trying to use tomcat 4.0.3-3woody2 
and velocity-1.3.1-rc2. So far I haven't managed all that well. =)

If I disable the java security manager everything works fine. But I 
kinda figure that the security manager is there to serve a purpose.
I would really like to have it activaded and not less strict than
necessary.

When I enable it I get the following error, probably caused by the
combination of some automatic(?) logging in velocity that haven't got
the correct access rights in catalina.policy:

  Apache Tomcat/4.0.3 - HTTP Status 500 - Internal Server Error
exception
javax.servlet.ServletException: Error initializing Velocity: 
  java.lang.Exception: Unable to configure AvalonLogSystem: 
java.security.AccessControlException: access denied
(java.io.FilePermission /var/lib/tomcat4/webapps/ROOT read)
at org.apache.velocity.servlet.VelocityServlet.initVelocity(
 VelocityServlet.java:236)
[snippage]  

I have tried random (doh!) changes in the policy, but without much luck. 
I'll be greatful to get some hints... What are good default grants for 
webapps using velocity?

TIA  regards, 
-- 
Fredrik Jonson
[EMAIL PROTECTED]


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




Re: Apache vhost + Tomcat sharing the same document root

2003-02-09 Thread Chris Davies

Hi,

Ah, thanks. That worked. Actually, this was the first thing I tried, but I
realised I was defining the Host tags inside the localhost one. (Oops :)

Unfortunatly, it still leaves me with a problem. I really don't want to have to
shut down tomcat and restart everytime I add a new user to the system. Tomcat
takes a while to warm up, which is a period when every customer request for a
java application returns 500. mod_webapp allows me to define the context in
httpd.conf, which is pretty handy.

Is there any way I can use mod_jk to have tomcat take it's cue from Apache as to
what context it ought to be in? Alternatively, is there a port I can signal
Tomcat on to reread it's configuration?

Thanks,
C.Davies

Quoting Lajos [EMAIL PROTECTED]:

 Hi Chris -
 
 Oops - I realize my mistake. I was thinking something entirely 
 different. You should have two Host blocks, one for each vhost, one 
 with appBase of /www/cust1 and one with appBase of /www/cust2. Sorry for
 
 leading you the wrong way.
 
 If that still doesn't work, email me your server.xml and httpd.conf
 offline.
 
 Regards,
 
 
 Lajos




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




Re: Problem making Tomcat 4.1 invoke servlet from Apache 2.0.44

2003-02-09 Thread fred
Hello,
you must have in the 'web-inf' directoty of your servlet a mapping like this
one:
web-app

servlet-mapping

servlet-nameinvoker/servlet-name

url-pattern/servlet/*/url-pattern

/servlet-mapping

/web-app

and you can invoke all servlets in the directory: WEB-INF/classes by the
request:

http://localhost/YourDirectory/servlet/TheServlet

Fred

- Original Message -
From: jcubic [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Saturday, February 08, 2003 7:03 AM
Subject: RE: Problem making Tomcat 4.1 invoke servlet from Apache 2.0.44


 No, I did not. The strange thing is that if I run Tomcat manually along
with
 Apache and let jni startup in Apache fail by not giving correct classpath,
I
 actually can run servlet as well as jsp.

 I can't see servlet invoker is obviously disabled in web.xml in Tomcat
conf
 directory. But I think I am going to look into web.xml a little more to
see
 if that is the culprit.

 Jimmy

 -Original Message-
 From: Turner, John [mailto:[EMAIL PROTECTED]]
 Sent: Friday, February 07, 2003 9:20 PM
 To: 'Tomcat Users List'
 Subject: RE: Problem making Tomcat 4.1 invoke servlet from Apache 2.0.44




 Did you change anything in Tomcat's web.xml?  Sounds like the Invoker
 servlet is disabled, but it is enabled by default for the examples, but
 disabled for everything else.

 John


 -Original Message-
 From: jcubic [mailto:[EMAIL PROTECTED]]
 Sent: Friday, February 07, 2003 10:45 PM
 To: Tomcat Users List
 Subject: RE: Problem making Tomcat 4.1 invoke servlet from Apache 2.0.44


 I did. I am getting the HTTP error I described : 'HTTP Status 503 -
Servlet
 invoker is currently unavailable'. - jimmy

 -Original Message-
 From: Mark Eggers [mailto:[EMAIL PROTECTED]]
 Sent: Friday, February 07, 2003 7:38 PM
 To: Tomcat Users List
 Subject: Re: Problem making Tomcat 4.1 invoke servlet from Apache 2.0.44



 Jimmy,

 Try the following:

 [uri:/examples/servlet/*]

 HTH

 /mde/
 just my two cents . . . .

 __
 Do you Yahoo!?
 Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
 http://mailplus.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]

 ---

 Checked by AVG anti-virus system (http://www.grisoft.com).
 Version: 6.0.449 / Virus Database: 251 - Release Date: 1/27/2003


 ---

 Checked by AVG anti-virus system (http://www.grisoft.com).
 Version: 6.0.449 / Virus Database: 251 - Release Date: 1/27/2003


 -
 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: setting CATALINA_HOME

2003-02-09 Thread Turner, John

Thanks for the tip.

John


-Original Message-
From: Bill Barker [mailto:[EMAIL PROTECTED]] 
Sent: Saturday, February 08, 2003 4:35 AM
To: [EMAIL PROTECTED]
Subject: Re: setting CATALINA_HOME


Actually, the recommended way to go is to create
$CATALINA_HOME/bin/setenv.sh (or %CATALINA_HOME%\bin\setenv.bat on Windows).

In that file, you should set things like CATALINA_HOME,  and JAVA_HOME if
they are not already set at the O/S level.

Turner, John [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...

 Edit the startup files in CATALINA_HOME/bin, like startup.bat or 
 catalina.bat.  Not sure which one would be best.

 John


 -Original Message-
 From: whlee [mailto:[EMAIL PROTECTED]]
 Sent: Friday, February 07, 2003 1:58 AM
 To: [EMAIL PROTECTED]
 Subject: setting CATALINA_HOME


 Dear Sir,

 Provided that i dun want to set environmental variable in my windows
system,

 but setting the environmental variable such as JAVA_HOME and 
 CATALINA_HOME inside tomcat configuration, how can i achieve it? Also, 
 if the value for the environmental variable is supposed an absolute 
 path of certain foder, let say e:\tomcat2 , how can i set it in tomcat
 configuration file?

 Regards,
 Jason



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

 ---

 Checked by AVG anti-virus system (http://www.grisoft.com).
 Version: 6.0.449 / Virus Database: 251 - Release Date: 1/27/2003


 ---

 Checked by AVG anti-virus system (http://www.grisoft.com).
 Version: 6.0.449 / Virus Database: 251 - Release Date: 1/27/2003




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

---

Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.449 / Virus Database: 251 - Release Date: 1/27/2003
 

---

Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.449 / Virus Database: 251 - Release Date: 1/27/2003
 

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




Re: Problems with mod_jk

2003-02-09 Thread fred
Hello,
you must download the mod_jk2.0.43.dll.
Install your Apache 2.0.43 not in program Files !!
For me, i have an ApacheGroup with Apache2 and Tomcat4.  Without
spaces !!
Install Tomcat4 not in service NT !!

Load this module in your httpd.conf...

You must create in your Apache/logs 3 files: stdout.log, stderr.log
and jk2.shm.

Create in your Apache/conf a file: workers2.properties with this text:
[logger]

level=DEBUG



[config:]

#file=${serverRoot}/conf/workers2.properties

file=c:/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=${serverRoot}/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:/Tomcat/bin/tomcat-jni.jar;c:/Tomcat/server/lib/comm
ons-logging.jar

OPT=-Dtomcat.home=${TOMCAT_HOME}

OPT=-Dcatalina.home=${TOMCAT_HOME}

OPT=-Xmx128M

#OPT=-Djava.compiler=NONE

disabled=0



[worker.jni:onStartup]

info=Command to be executed by the VM on startup. This one will start
tomcat.

class=org/apache/jk/apr/TomcatStarter

ARG=start

disabled=0

stdout=c:/Apache2/logs/stdout.log

stderr=c:/Apache2/logs/stderr.log



[worker.jni:onShutdown]

info=Command to be executed by the VM on shutdown. This one will stop
tomcat.

class=org/apache/jk/apr/TomcatStarter

ARG=stop

disabled=0



[uri:/jkstatus/*]

info=Display status information and checks the config file for changes.

group=status:



#[uri:127.0.0.1:8003]

#info=Example virtual host. Make sure myVirtualHost is in /etc/hosts to test
it

#alias=myVirtualHost:8003



#[uri:127.0.0.1:8003/ex]

#info=Example webapp in the virtual host. It'll go to lb_1 ( i.e.
localhost:8019 )

#context=/ex

#group=lb_1



[uri:/examples]

info=Example webapp in the default context.

context=/examples

debug=0



#[uri:/examples1/*]

#info=A second webapp, this time going to the second tomcat only.

#group=lb_1

#debug=0



[uri:/examples/servlets/*]

info=Prefix mapping



[uri:/examples/*.jsp]

info=Extension mapping

[uri:/examples/*]

info=Map the whole webapp



[uri:/examples/servlets/HelloW]

info=Exampel with debug enabled.

debug=10





After create in your Tomcat/conf a file: jk2.properties with this text:

## 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:/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


Finally, add to your PATH variable the path for JAVA_HOME and
JAVA_HOME/bin.
Set 2 news environnement variables like this: TOMCAT_HOME=C:\the directory
of Tomcat and CATALINA_HOME=C:\the directory of Tomcat.
Reestart and go to http://localhost/examples.
Normally it's OK for all the examples servlets and jsp.

Fred
- Original Message -
From: Mark Baumann [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Friday, February 07, 2003 1:20 PM
Subject: Problems with mod_jk


 Hello!

 I have a problem getting Tomcat+Apache connected with mod_jk
 I installed Apache 2.0.43 and Tomcat 4.1.18 each works fine, alone.
 When I try to use the specific mod_jk-2.0.43 or mod_jk2, or mod_webapp
 for windows NT4, each time I get the same error.

 -snip-
 Cannot load c:\Programme\Apache_Group\Apache\modules\mod_jk-2.0.42.dll
into
 server
 /*translated from German:)*/
  the requested procedure could 

RE: mod_jk config

2003-02-09 Thread Turner, John

The Invoker servlet is disabled by default.  Assuming your request is
getting to Tomcat, you must either enable the Invoker servlet or explicitly
map your servlet in your webapp's web.xml file.

Check the docs and archives.

John

-Original Message-
From: Carlos Godoy [mailto:[EMAIL PROTECTED]] 
Sent: Sunday, February 09, 2003 5:22 AM
To: [EMAIL PROTECTED]
Subject: mod_jk config



Hello, I'm new in Tomcat.

I'm using Apache+Tomcat:
Apache/1.3.22
jakarta-tomcat-4.1.18-LE-jdk14
mod_jk

I have configured Tomcat and it's working.
I can view and execute servlets in the /examples folder.

Now I want to execute servlets under the url: http://www.myurl.com/servlets/

I've tried to add this code lines to mod_jk.conf:

Alias /servlets /usr/local/jakarta-tomcat/webapps/servlets
Directory /usr/local/jakarta-tomcat/webapps/servlets
Options Indexes FollowSymLinks
/Directory
JkMount /servlets/* ajp13

In directory $CATALINA/webapps/servlets/ I have created folder
WEB-INF/classes/ and I have added a test servlet.

URL: http://www.myurl.com/servlets/Hello it can't be found.

Anybody can help me?
If this is not the place where search this solution, anybody can tell me
where to find it?

Thanks
Carlos Godoy





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

---

Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.449 / Virus Database: 251 - Release Date: 1/27/2003
 

---

Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.449 / Virus Database: 251 - Release Date: 1/27/2003
 

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




RE: How to configure Tomcat to follow symbolic links.

2003-02-09 Thread Turner, John

That won't work.  You need something like this within your Context:

Resources className=org.apache.naming.resources.FileDirContext
   caseSensitive=true
   allowLinking=true
   docBase=myApp / 

John

-Original Message-
From: Mike Johnson [mailto:[EMAIL PROTECTED]] 
Sent: Saturday, February 08, 2003 11:02 AM
To: Tomcat Users List
Subject: Re: How to configure Tomcat to follow symbolic links.


hi,

just add allowLinks=true to your context config, like:

Context path=/dealernet docBase=dealernet debug=0 reloadable=true
allowLinking=true /


On Sat, 2003-02-08 at 06:58, Hans Deragon wrote:
 Greetings.
 
 
Simple question:  How to configure Tomcat to follow symbolic links?  
 I have
 Tomcat 4.1.18.
 
 
 Sincerely,
 Hans Deragon
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
-- 
Mike Johnson [EMAIL PROTECTED]


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

---

Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.449 / Virus Database: 251 - Release Date: 1/27/2003
 

---

Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.449 / Virus Database: 251 - Release Date: 1/27/2003
 

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




Compile my .java directly in the Webapps directory....

2003-02-09 Thread fred
Hello,
can somebody tell me if i can compile the .java drectly in the directory of my 
webapps.
Is it an option in the sever.xml ?
It's Apache 2.0.43 with Tomcat 4.1.18 with the JK2 but i think that is the same with 
Tomcat standalone...
Thank you.
Fred


RE: How to configure Tomcat to follow symbolic links.

2003-02-09 Thread Turner, John

Tomcat does not follow symlinks as a rule, by default, for security reasons.

Creating a filesystem symlink with recent versions (4.1.12+, I believe) of
Tomcat will have no effect, you need to declare an additional Resource in
server.xml with the correct attributes if you want Tomcat to follow
symlinks.

John


-Original Message-
From: Vy Ho [mailto:[EMAIL PROTECTED]] 
Sent: Saturday, February 08, 2003 10:31 AM
To: Tomcat Users List
Subject: Re: How to configure Tomcat to follow symbolic links.


I am not sure what you mean, but under Unix, I created a symbolic link 
for a directory and it works just like a real directory.  I haven't test 
with symbolic link for file.


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

---

Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.449 / Virus Database: 251 - Release Date: 1/27/2003
 

---

Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.449 / Virus Database: 251 - Release Date: 1/27/2003
 

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




RE: RH 8.0 Tomcat 4.1.18 and Apache 2.0.43

2003-02-09 Thread Turner, John

You can do this in Linux.

RH 8 runs a munged version of Apache 2.0.40.  Instead of following the
Apache versions (latest of which is 2.0.44), RH has decided to continue to
ship 2.0.40, but with all of the .41, .42, .43 and .44 fixes backported to
their 2.0.40 PROVIDED you have ALL of the latest Apache updates applied from
RH (most of which were just announced in the last couple of days).

From the email updates I got from RH, it seems like they are still going to
call the Apache that ships with RH 8 2.0.40, which doesn't make a lot of
sense to me.  In any case, I ignore their's and install from source, but its
up to you.

John

-Original Message-
From: Tom Holmes Jr. [mailto:[EMAIL PROTECTED]] 
Sent: Saturday, February 08, 2003 5:27 PM
To: Tomcat Users List
Subject: RH 8.0 Tomcat 4.1.18 and Apache 2.0.43


I got Apache 2.0.43 and Tomcat 4.1.18 working with jk2 on my Windows 2K
Advanced Server, and I got all the virtual hosts working.  I am now trying
to get SSI (server-side includes) to work though I followed all the
directions, but that is a minor issue for me right now.

I also have RH Linux 8.0 and it works great (I am a Linux newbie).   RH 8.0
already has Apache 2.0 installed, but I am not sure which version it is,
though I could find out.  It looks like the HTML files reside in
/var/www/html although thr server itself lives under /etc/httpd and not in
/usr/local/apache2

Now I installed tomcat 4.1.18 and with the startup script it works fine by
itself, and all the examples work.  I copied over my config files for
Apache2 and Tomcat and I just had this one question.

On my Windows 2000 box, Apache runs as an NT Service and the Jk2 properties
file is setup to run in-process ... hence all I have to do is restart
Apache2 with the Apache monitor and Tomcat starts as well running in the
background.

So, should I do this in Linux?  Should I run Tomcat first and then run
Apache afterwards?  If you can help me, or lead me to a helpful How-To or
web-site or web-page, please let me know.

Thanks.

 Tom


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

---

Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.449 / Virus Database: 251 - Release Date: 1/27/2003
 

---

Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.449 / Virus Database: 251 - Release Date: 1/27/2003
 

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




Re: Tomcat - Apache install document

2003-02-09 Thread Thijs Thiessens
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


Op vrijdag 7 februari 2003 19:40, schreef Kenny G. Dubuisson, Jr.:
 Jonathan:

 Here are two links (one to a Word and one to a PDF version of the
 document): http://myweb.cableone.net/kdubuisson/Install.doc
 http://myweb.cableone.net/kdubuisson/Install.PDF

Hey! 

Thank you very much for the documents, they helped me a lot! I finally got it 
all working. However, as always a minor thing occured while trying to make 
the autostart script for tomcat. Perhaps you or someone else could help me 
out. As I exactly wrote down the things you said, I get an answer from the 
SuSe runlevel editor telling me: 

returned 126
sh: line 3: /etc/init.d/tomcat: access denied

which is as I guess this line
export CATALINA_OPTS=-Djava.awt.headless=true

I don't know what it means, or what it does. But if the program starts line 
counting with 0 than that is the line which causes some troubles.

Thijs
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE+RnwXdLZ6G+ySMXERAjFNAKCiOwuqBePdAneXngYJu4wgwaMdXACfW5Mk
rNAcFSiL2U4MVvIW3x1e3J8=
=vhet
-END PGP SIGNATURE-


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




Re: Tomcat complains: java.security.NoSuchProviderException: no such provider: BC

2003-02-09 Thread Mark Liu
Thank you, Sean,

But you did not finish reading my message, in which I
said

 I even copied the BC bundle jar file to C:\Program
 Files\Apache Group\Tomcat 4.1\common\lib, but
 Tomcat still keeps complaining:
 
 java.security.NoSuchProviderException: no such
 provider: BC

Mark.


--- Sean Dockery [EMAIL PROTECTED] wrote:
 Remember that your classpath in your environment
 which is used by the java
 compiler when you issue a compile command from the
 command line is not the
 same classpath that Tomcat uses when it is running.
 
 Move the JAR into $CATALINA_HOME/common/lib.  I
 don't believe that Tomcat
 supports loading JAR files from
 $JRE_HOME/jre/lib/ext.
 
 - Original Message -
 From: Mark Liu [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Sunday, February 09, 2003 00:42
 Subject: Tomcat complains:
 java.security.NoSuchProviderException: no such
 provider: BC
 
 
  I run Tomcat 4.1.18 on my Win2K box.
 
  Because my project will use bouncycastle
 cryptographic
  bundle (known as BC version 1.18), I have this
 package
  properly installed on my system.  If you don't
 believe
  it, look at the following output:
 
  C:\Javajava ListCryptoProviders
  SUN version 1.2
  SunJSSE version 1.4
  SunRsaSign version 1.0
  SunJCE version 1.4
  SunJGSS version 1.0
  BC version 1.18
 
  C:\Java
 
  You see, BC version 1.18 is nicely shown there.
 
  It is the output from the following short code:
 
  /* This class lists the cryptographic
   * providers available on current system.
   */
 
  import java.security.*;
 
  class ListCryptoProviders
  {  public static void main(String []args)
 {  Provider [] providers =
 Security.getProviders();
for(int i=0; iproviders.length; i++)
{ System.out.println(providers[i]);
}
  }
  }
 
  However, the Servlet I write which uses the BC
 bundle
  does not work with Tomcat.
 
  When I try to invoke that servlet from the
 browser,
  the Tomcat console says:
 
  java.security.NoSuchProviderException: no such
  provider: BC
 
  It's weird!
 
  I have put the BC bundle jar file under both
  JDK_HOME\jre\lib\ext and Program
  Files\Java\j2re1.4.0\lib\ext.
 
  Needless to say that I have also added the
 following
  line
 
 

security.provider.6=org.bouncycastle.jce.provider.BouncyCastleProvider
 
  in file java.security in its due paths (one under
  JDK_HOME\jre\lib\security and one under C:\Program
  Files\Java\j2re1.4.0\lib\security).
 
  I even copied the BC bundle jar file to C:\Program
  Files\Apache Group\Tomcat 4.1\common\lib, but
 Tomcat
  still keeps complaining:
 
  java.security.NoSuchProviderException: no such
  provider: BC
 
  I have no clue how I should handle this.
 
  Any idea please?
 
  Mark
 
 
 
 
  __
  Do you Yahoo!?
  Yahoo! Mail Plus - Powerful. Affordable. Sign up
 now.
  http://mailplus.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]
 


__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

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




Re: Compile my .java directly in the Webapps directory....

2003-02-09 Thread David Garamond
ok


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




Sorry, please ignore previous post (Re: Compile my .java directlyin the Webapps directory....)

2003-02-09 Thread David Garamond
please forgive me previous post. i was replying to the wrong message.

fred wrote:

Hello,
can somebody tell me if i can compile the .java drectly in the directory of my webapps.
Is it an option in the sever.xml ?
It's Apache 2.0.43 with Tomcat 4.1.18 with the JK2 but i think that is the same with Tomcat standalone...
Thank you.
Fred


--
dave



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




how can i make sure tomcat is running?

2003-02-09 Thread Jianping Zhu
os: redhat 7.3
how can i make sure that tomcat is running in my server?




Jianping Zhu
Department of Computer Science
Univerity of Georgia 
Athens, GA 30602
Tel 706 5423900



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




Re: how can i make sure tomcat is running?

2003-02-09 Thread Tim Funk
Use a command line program like wget, cURL, JMeter, ... to get a page back.

You can also look for a java process running.

-Tim

Jianping Zhu wrote:

os: redhat 7.3
how can i make sure that tomcat is running in my server?







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




exception after several hours idle

2003-02-09 Thread Vladimir Kirillov
Hi, all

Could anyone tell me what to change in default Tomcat 4.1.18 configuration
to avoid exception after several hours (night) of running idle?
My web application uses database connection, but database driver connection
timeout is set to Integer.MAX, so it should not be the reason.

Here is the sample of exception:

2003-02-07 02:59:14 StandardWrapperValve[default]: Servlet.service() for
servlet default threw exception
java.lang.NullPointerException
 at java.io.File.init(File.java:263)
 at org.apache.naming.resources.FileDirContext.file(FileDirContext.java:880)
 at
org.apache.naming.resources.FileDirContext.getAttributes(FileDirContext.java
:487)
 at
org.apache.naming.resources.BaseDirContext.getAttributes(BaseDirContext.java
:797)
 at
org.apache.naming.resources.ProxyDirContext.cacheLoad(ProxyDirContext.java:1
473)
 at
org.apache.naming.resources.ProxyDirContext.cacheLookup(ProxyDirContext.java
:1394)
 at
org.apache.naming.resources.ProxyDirContext.lookup(ProxyDirContext.java:300)
 at
org.apache.catalina.servlets.DefaultServlet$ResourceInfo.set(DefaultServlet.
java:2267)
 at
org.apache.catalina.servlets.DefaultServlet$ResourceInfo.init(DefaultServl
et.java:2219)
 at
org.apache.catalina.servlets.DefaultServlet.serveResource(DefaultServlet.jav
a:921)
 at
org.apache.catalina.servlets.DefaultServlet.doGet(DefaultServlet.java:506)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:247)
 at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:193)
 at com.ewao.filters.LocaleFilter.doFilter(LocaleFilter.java:133)
 at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:213)
 at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:193)
 at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:260)

Thank you in advance,

Vladimir Kirillov.


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




Re: how can i make sure tomcat is running?

2003-02-09 Thread Jianping Zhu

Thanks,
can you give me more detailed instruction?




On Sun, 9 Feb 2003, Tim Funk wrote:

 Use a command line program like wget, cURL, JMeter, ... to get a page back.
 
 You can also look for a java process running.
 
 -Tim
 
 Jianping Zhu wrote:
  os: redhat 7.3
  how can i make sure that tomcat is running in my server?
  
  
  
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 



Jianping Zhu
Department of Computer Science
Univerity of Georgia 
Athens, GA 30602
Tel 706 5423900



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




Re: how can i make sure tomcat is running?

2003-02-09 Thread Mark Liu
I am not sure about linux, but why don't you just try
http://localhost:8080 or http://localhost and see?

--- Jianping Zhu [EMAIL PROTECTED] wrote:
 
 Thanks,
 can you give me more detailed instruction?
 
 
 
 
 On Sun, 9 Feb 2003, Tim Funk wrote:
 
  Use a command line program like wget, cURL,
 JMeter, ... to get a page back.
  
  You can also look for a java process running.
  
  -Tim
  
  Jianping Zhu wrote:
   os: redhat 7.3
   how can i make sure that tomcat is running in my
 server?
   
   
   
  
  
  
 

-
  To unsubscribe, e-mail:
 [EMAIL PROTECTED]
  For additional commands, e-mail:
 [EMAIL PROTECTED]
  
 
 
 
 Jianping Zhu
 Department of Computer Science
 Univerity of Georgia 
 Athens, GA 30602
 Tel 706 5423900
 
 
 

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


__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

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




Re: Tomcat complains: java.security.NoSuchProviderException: no such provider: BC

2003-02-09 Thread Mark Liu
The same thing works on my Win2K box with Tomcat
4.1.12 and J2SDK1.4.1 at my home.

But it does not work on my Win2K box with Tomcat
4.1.18 and J2SDK1.4.1 in my school lab.

I get the exception from the tomcat console:

java.security.NoSuchProviderException: no such
provider: BC

Does this mean that some environmental setting for the
Win2K system in my lab is not set right?

Please.

Mark.


--- Sean Dockery [EMAIL PROTECTED] wrote:
 Remember that your classpath in your environment
 which is used by the java
 compiler when you issue a compile command from the
 command line is not the
 same classpath that Tomcat uses when it is running.
 
 Move the JAR into $CATALINA_HOME/common/lib.  I
 don't believe that Tomcat
 supports loading JAR files from
 $JRE_HOME/jre/lib/ext.
 
 - Original Message -
 From: Mark Liu [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Sunday, February 09, 2003 00:42
 Subject: Tomcat complains:
 java.security.NoSuchProviderException: no such
 provider: BC
 
 
  I run Tomcat 4.1.18 on my Win2K box.
 
  Because my project will use bouncycastle
 cryptographic
  bundle (known as BC version 1.18), I have this
 package
  properly installed on my system.  If you don't
 believe
  it, look at the following output:
 
  C:\Javajava ListCryptoProviders
  SUN version 1.2
  SunJSSE version 1.4
  SunRsaSign version 1.0
  SunJCE version 1.4
  SunJGSS version 1.0
  BC version 1.18
 
  C:\Java
 
  You see, BC version 1.18 is nicely shown there.
 
  It is the output from the following short code:
 
  /* This class lists the cryptographic
   * providers available on current system.
   */
 
  import java.security.*;
 
  class ListCryptoProviders
  {  public static void main(String []args)
 {  Provider [] providers =
 Security.getProviders();
for(int i=0; iproviders.length; i++)
{ System.out.println(providers[i]);
}
  }
  }
 
  However, the Servlet I write which uses the BC
 bundle
  does not work with Tomcat.
 
  When I try to invoke that servlet from the
 browser,
  the Tomcat console says:
 
  java.security.NoSuchProviderException: no such
  provider: BC
 
  It's weird!
 
  I have put the BC bundle jar file under both
  JDK_HOME\jre\lib\ext and Program
  Files\Java\j2re1.4.0\lib\ext.
 
  Needless to say that I have also added the
 following
  line
 
 

security.provider.6=org.bouncycastle.jce.provider.BouncyCastleProvider
 
  in file java.security in its due paths (one under
  JDK_HOME\jre\lib\security and one under C:\Program
  Files\Java\j2re1.4.0\lib\security).
 
  I even copied the BC bundle jar file to C:\Program
  Files\Apache Group\Tomcat 4.1\common\lib, but
 Tomcat
  still keeps complaining:
 
  java.security.NoSuchProviderException: no such
  provider: BC
 
  I have no clue how I should handle this.
 
  Any idea please?
 
  Mark
 
 
 
 
  __
  Do you Yahoo!?
  Yahoo! Mail Plus - Powerful. Affordable. Sign up
 now.
  http://mailplus.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]
 


__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

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




Re: how can i make sure tomcat is running?

2003-02-09 Thread Brian Baxter
Alternatively on *nix (including Cygwin) you can type the following:

ps -ef | grep java

Of course if you have other java procs running they will show up too.

If you wanted to see if it was bind to a port you can check netstat -a for 
the port # (likely 8080 in default config), but in reality, hitting the 
port with a browser would be the easiest solution.



At 12:57 PM 2/9/2003, you wrote:
I am not sure about linux, but why don't you just try
http://localhost:8080 or http://localhost and see?

--- Jianping Zhu [EMAIL PROTECTED] wrote:

 Thanks,
 can you give me more detailed instruction?




 On Sun, 9 Feb 2003, Tim Funk wrote:

  Use a command line program like wget, cURL,
 JMeter, ... to get a page back.
 
  You can also look for a java process running.
 
  -Tim
 
  Jianping Zhu wrote:
   os: redhat 7.3
   how can i make sure that tomcat is running in my
 server?
  
  
  
 
 
 
 

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


 
 Jianping Zhu
 Department of Computer Science
 Univerity of Georgia
 Athens, GA 30602
 Tel 706 5423900
 



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



__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.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: how can i make sure tomcat is running?

2003-02-09 Thread Oscar Carrillo
This is conceptually very easy, but a little tricky because the process 
identification typically gets cut off for processes that are lengthy. 
Which is what happens with all the classpath addition, etc.

Try this:

ps auxw --width=1000 | grep org.apache.catalina.startup.Bootstrap start

I tried that briefly and that seems to do it. You could put a line like 
that in your /etc/rc.d/init.d/tomcatd script and add this line for status.

Then you can do this to get the info:
service tomcatd status

Oscar

On Sun, 9 Feb 2003, Mark Liu wrote:

 I am not sure about linux, but why don't you just try
 http://localhost:8080 or http://localhost and see?
 
 --- Jianping Zhu [EMAIL PROTECTED] wrote:
  
  Thanks,
  can you give me more detailed instruction?
  
  
  
  
  On Sun, 9 Feb 2003, Tim Funk wrote:
  
   Use a command line program like wget, cURL,
  JMeter, ... to get a page back.
   
   You can also look for a java process running.
   
   -Tim
   
   Jianping Zhu wrote:
os: redhat 7.3
how can i make sure that tomcat is running in my
  server?



   
   
   
  
 
 -
   To unsubscribe, e-mail:
  [EMAIL PROTECTED]
   For additional commands, e-mail:
  [EMAIL PROTECTED]
   
  
  
  
  Jianping Zhu
  Department of Computer Science
  Univerity of Georgia 
  Athens, GA 30602
  Tel 706 5423900
  
  
  
 
 -
  To unsubscribe, e-mail:
  [EMAIL PROTECTED]
  For additional commands, e-mail:
  [EMAIL PROTECTED]
  
 
 
 __
 Do you Yahoo!?
 Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
 http://mailplus.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: exception after several hours idle

2003-02-09 Thread mech


 -Original Message-
 From: Vladimir Kirillov [mailto:[EMAIL PROTECTED]] 
 Sent: Sonntag, 9. Februar 2003 18:58
 To: [EMAIL PROTECTED]
 Subject: exception after several hours idle
 
 
 Hi, all
 
 Could anyone tell me what to change in default Tomcat 4.1.18 
 configuration to avoid exception after several hours (night) 
 of running idle? My web application uses database connection, 
 but database driver connection timeout is set to Integer.MAX, 
 so it should not be the reason.
Even if you set the timeout to Integer.MAX, maybe try to set
autoReconnect=true in your connection url. I had problems with my
webapp when idle overnight because my MySQL J/Connector cut the
connections of my connection pool after 8 hours inactivity by default. I
guess using autoReconnect and related parameters couldn't hurt, although
i didn't yet try to avoid disconnecting by increasing the timeout. I
would prefer a reconnect over a high timeout because you never know for
sure if something else is killing your connection and with
autoreconnect you should be on the safe side for every possibility of a
(temporarily) dead connection.
 
 Here is the sample of exception:
I can't figure out so much from this exception... FileIO?


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




RE: How to configure Tomcat to follow symbolic links.

2003-02-09 Thread Mike Johnson
Ah... Thanks for the correction. :-)

But, I'm now getting an exception during load if I set it like you
wrote:

java.lang.reflect.InvocationTargetException:
java.lang.IllegalArgumentException: Document base dealernet does not
exist or is not a readable directory
at
org.apache.naming.resources.FileDirContext.setDocBase(FileDirContext.java:193)
at java.lang.reflect.Method.invoke(Native Method)
at
org.apache.commons.beanutils.PropertyUtils.setSimpleProperty(PropertyUtils.java:1650)
at
org.apache.commons.beanutils.PropertyUtils.setNestedProperty(PropertyUtils.java:1545)
at
org.apache.commons.beanutils.PropertyUtils.setProperty(PropertyUtils.java:1574)
at
org.apache.commons.beanutils.BeanUtils.setProperty(BeanUtils.java:919)
at org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:726)
at
org.apache.commons.digester.SetPropertiesRule.begin(SetPropertiesRule.java:259)
at
org.apache.commons.digester.Digester.startElement(Digester.java:1237)
at
org.apache.xerces.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:459)
at
org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:221)
at
org.apache.xerces.impl.XMLNamespaceBinder.emptyElement(XMLNamespaceBinder.java:595)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.java:747)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1477)
  at 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:329)
at
org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:525)
at
org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:581)
at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:152)
at
org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1175)
at org.apache.commons.digester.Digester.parse(Digester.java:1495)
at org.apache.catalina.startup.Catalina.start(Catalina.java:449)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:400)
at org.apache.catalina.startup.Catalina.process(Catalina.java:180)
at java.lang.reflect.Method.invoke(Native Method)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203)
[ERROR] Digester - -Begin event threw exception
java.lang.reflect.InvocationTargetException
Catalina.start: java.lang.reflect.InvocationTargetException
java.lang.reflect.InvocationTargetException
at
org.apache.commons.digester.Digester.createSAXException(Digester.java:2312)
at
org.apache.commons.digester.Digester.createSAXException(Digester.java:2332)
at
org.apache.commons.digester.Digester.startElement(Digester.java:1240)
at
org.apache.xerces.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:459)
at
org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:221)
at
org.apache.xerces.impl.XMLNamespaceBinder.emptyElement(XMLNamespaceBinder.java:595)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.java:747)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1477)
  at 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:329)
at
org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:525)
at
org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:581)
at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:152)
at
org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1175)
at org.apache.commons.digester.Digester.parse(Digester.java:1495)
at org.apache.catalina.startup.Catalina.start(Catalina.java:449)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:400)
at org.apache.catalina.startup.Catalina.process(Catalina.java:180)
at java.lang.reflect.Method.invoke(Native Method)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203)


-
where 'dealernet' is defined as:

Context path=/dealernet docBase=dealernet debug=0
reloadable=true
Resources className=org.apache.naming.resources.FileDirContext
caseSensitive=true
allowLinking=true
docBase=dealernet /
/Context

The directory is there, all lower-case...


*sigh*

It'd be wonderful if there was a place where the upgrade breakage is
documented... Is there a RTMF I missed somewhere?

The docs, for instance, mention nothing about linking:
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/appdev/index.html

A note that the default linking 

Re: exception after several hours idle

2003-02-09 Thread Vladimir Kirillov

  Could anyone tell me what to change in default Tomcat 4.1.18
  configuration to avoid exception after several hours (night)
  of running idle? My web application uses database connection,
  but database driver connection timeout is set to Integer.MAX,
  so it should not be the reason.
 Even if you set the timeout to Integer.MAX, maybe try to set
 autoReconnect=true in your connection url. I had problems with my
 webapp when idle overnight because my MySQL J/Connector cut the
 connections of my connection pool after 8 hours inactivity by default. I
 guess using autoReconnect and related parameters couldn't hurt, although
 i didn't yet try to avoid disconnecting by increasing the timeout. I
 would prefer a reconnect over a high timeout because you never know for
 sure if something else is killing your connection and with
 autoreconnect you should be on the safe side for every possibility of a
 (temporarily) dead connection.
Thank you fro the tip, I'll try it.

  Here is the sample of exception:
 I can't figure out so much from this exception... FileIO?
Yes, it looks like file IO problem. And exception comes from inner Tomcat
classes
that handle request processing, not from the driver classes. Strange thing.



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




Re: how can i make sure tomcat is running?

2003-02-09 Thread Oscar Carrillo
I played around with this a little bit more and this outputs a complete
list of all tomcat processes on a single line. It also avoids listing the
ps command as a found process.

ps ax --width=1000 | grep [o]rg.apache.catalina.startup.Bootstrap start 
| awk '{print $1  }'

Oscar


On Sat, 8 Feb 2003, Oscar Carrillo wrote:

 This is conceptually very easy, but a little tricky because the process 
 identification typically gets cut off for processes that are lengthy. 
 Which is what happens with all the classpath addition, etc.
 
 Try this:
 
 ps auxw --width=1000 | grep org.apache.catalina.startup.Bootstrap start
 
 I tried that briefly and that seems to do it. You could put a line like 
 that in your /etc/rc.d/init.d/tomcatd script and add this line for status.
 
 Then you can do this to get the info:
 service tomcatd status
 
 Oscar
 
 On Sun, 9 Feb 2003, Mark Liu wrote:
 
  I am not sure about linux, but why don't you just try
  http://localhost:8080 or http://localhost and see?
  
  --- Jianping Zhu [EMAIL PROTECTED] wrote:
   
   Thanks,
   can you give me more detailed instruction?
   
   
   
   
   On Sun, 9 Feb 2003, Tim Funk wrote:
   
Use a command line program like wget, cURL,
   JMeter, ... to get a page back.

You can also look for a java process running.

-Tim

Jianping Zhu wrote:
 os: redhat 7.3
 how can i make sure that tomcat is running in my
   server?
 
 
 



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

   
   
   
   Jianping Zhu
   Department of Computer Science
   Univerity of Georgia 
   Athens, GA 30602
   Tel 706 5423900
   
   
   
  
  -
   To unsubscribe, e-mail:
   [EMAIL PROTECTED]
   For additional commands, e-mail:
   [EMAIL PROTECTED]
   
  
  
  __
  Do you Yahoo!?
  Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
  http://mailplus.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]
 


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




Re: how can i make sure tomcat is running?

2003-02-09 Thread Oscar Carrillo
I made a slight mistake. It's printf instead of print for getting it one 
line.

ps ax --width=1000 | grep [o]rg.apache.catalina.startup.Bootstrap start | awk 
'{printf $1  }'

Oscar

On Sun, 9 Feb 2003, Oscar Carrillo wrote:

 I played around with this a little bit more and this outputs a complete
 list of all tomcat processes on a single line. It also avoids listing the
 ps command as a found process.
 
 ps ax --width=1000 | grep [o]rg.apache.catalina.startup.Bootstrap start 
 | awk '{print $1  }'
 
 Oscar
 
 
 On Sat, 8 Feb 2003, Oscar Carrillo wrote:
 
  This is conceptually very easy, but a little tricky because the process 
  identification typically gets cut off for processes that are lengthy. 
  Which is what happens with all the classpath addition, etc.
  
  Try this:
  
  ps auxw --width=1000 | grep org.apache.catalina.startup.Bootstrap start
  
  I tried that briefly and that seems to do it. You could put a line like 
  that in your /etc/rc.d/init.d/tomcatd script and add this line for status.
  
  Then you can do this to get the info:
  service tomcatd status
  
  Oscar
  
  On Sun, 9 Feb 2003, Mark Liu wrote:
  
   I am not sure about linux, but why don't you just try
   http://localhost:8080 or http://localhost and see?
   
   --- Jianping Zhu [EMAIL PROTECTED] wrote:

Thanks,
can you give me more detailed instruction?




On Sun, 9 Feb 2003, Tim Funk wrote:

 Use a command line program like wget, cURL,
JMeter, ... to get a page back.
 
 You can also look for a java process running.
 
 -Tim
 
 Jianping Zhu wrote:
  os: redhat 7.3
  how can i make sure that tomcat is running in my
server?
  
  
  
 
 
 

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



Jianping Zhu
Department of Computer Science
Univerity of Georgia 
Athens, GA 30602
Tel 706 5423900



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

   
   
   __
   Do you Yahoo!?
   Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
   http://mailplus.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]
  
 
 
 -
 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: Compile my .java directly in the Webapps directory....

2003-02-09 Thread Sean Dockery
No.  Tomcat will automatically compile JSP files to servlets for you, but
not .java source files.

Sean Dockery
[EMAIL PROTECTED]
Certified Java Web Component Developer
Certified Delphi Programmer
SBD Consultants
http://www.sbdconsultants.com

- Original Message -
From: fred [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Sunday, February 09, 2003 08:02
Subject: Compile my .java directly in the Webapps directory


Hello,
can somebody tell me if i can compile the .java drectly in the directory
of my webapps.
Is it an option in the sever.xml ?
It's Apache 2.0.43 with Tomcat 4.1.18 with the JK2 but i think that is the
same with Tomcat standalone...
Thank you.
Fred



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




Re: exception after several hours idle

2003-02-09 Thread Sean Dockery
Why do you suspect that it is a problem with the database connection?

Can you determine if you are running out of disk space somewhere?  Or
perhaps you are trying to safe a file to a location where you don't have
sufficient permissions to do so.  Or perhaps you are trying to load a file
that does not exist?

Sean Dockery
[EMAIL PROTECTED]
Certified Java Web Component Developer
Certified Delphi Programmer
SBD Consultants
http://www.sbdconsultants.com

- Original Message -
From: Vladimir Kirillov [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED];
[EMAIL PROTECTED]
Sent: Sunday, February 09, 2003 12:47
Subject: Re: exception after several hours idle



   Could anyone tell me what to change in default Tomcat 4.1.18
   configuration to avoid exception after several hours (night)
   of running idle? My web application uses database connection,
   but database driver connection timeout is set to Integer.MAX,
   so it should not be the reason.
  Even if you set the timeout to Integer.MAX, maybe try to set
  autoReconnect=true in your connection url. I had problems with my
  webapp when idle overnight because my MySQL J/Connector cut the
  connections of my connection pool after 8 hours inactivity by default. I
  guess using autoReconnect and related parameters couldn't hurt, although
  i didn't yet try to avoid disconnecting by increasing the timeout. I
  would prefer a reconnect over a high timeout because you never know for
  sure if something else is killing your connection and with
  autoreconnect you should be on the safe side for every possibility of a
  (temporarily) dead connection.
 Thank you fro the tip, I'll try it.

   Here is the sample of exception:
  I can't figure out so much from this exception... FileIO?
 Yes, it looks like file IO problem. And exception comes from inner Tomcat
 classes
 that handle request processing, not from the driver classes. Strange
thing.



 -
 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 complains: java.security.NoSuchProviderException: no such provider: BC

2003-02-09 Thread Sean Dockery
Sorry about that.  It was about 3 AM local time when I posted that message.

Have you tried consulting this document:

http://jakarta.apache.org/tomcat/tomcat-4.0-doc/security-manager-howto.html

I found an interesting excerpt from that document...

The security policies implemented by the Java SecurityManager are
configured in the $CATALINA_HOME/conf/catalina.policy file. This file
completely replaces the java.policy file present in your JDK system
directories.

Maybe it can give you some clues as to what you need to do.

Sean Dockery
[EMAIL PROTECTED]
Certified Java Web Component Developer
Certified Delphi Programmer
SBD Consultants
http://www.sbdconsultants.com


- Original Message -
From: Mark Liu [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Sunday, February 09, 2003 09:19
Subject: Re: Tomcat complains: java.security.NoSuchProviderException: no
such provider: BC


 Thank you, Sean,

 But you did not finish reading my message, in which I
 said

  I even copied the BC bundle jar file to C:\Program
  Files\Apache Group\Tomcat 4.1\common\lib, but
  Tomcat still keeps complaining:
 
  java.security.NoSuchProviderException: no such
  provider: BC

 Mark.


 --- Sean Dockery [EMAIL PROTECTED] wrote:
  Remember that your classpath in your environment
  which is used by the java
  compiler when you issue a compile command from the
  command line is not the
  same classpath that Tomcat uses when it is running.
 
  Move the JAR into $CATALINA_HOME/common/lib.  I
  don't believe that Tomcat
  supports loading JAR files from
  $JRE_HOME/jre/lib/ext.
 
  - Original Message -
  From: Mark Liu [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Sunday, February 09, 2003 00:42
  Subject: Tomcat complains:
  java.security.NoSuchProviderException: no such
  provider: BC
 
 
   I run Tomcat 4.1.18 on my Win2K box.
  
   Because my project will use bouncycastle
  cryptographic
   bundle (known as BC version 1.18), I have this
  package
   properly installed on my system.  If you don't
  believe
   it, look at the following output:
  
   C:\Javajava ListCryptoProviders
   SUN version 1.2
   SunJSSE version 1.4
   SunRsaSign version 1.0
   SunJCE version 1.4
   SunJGSS version 1.0
   BC version 1.18
  
   C:\Java
  
   You see, BC version 1.18 is nicely shown there.
  
   It is the output from the following short code:
  
   /* This class lists the cryptographic
* providers available on current system.
*/
  
   import java.security.*;
  
   class ListCryptoProviders
   {  public static void main(String []args)
  {  Provider [] providers =
  Security.getProviders();
 for(int i=0; iproviders.length; i++)
 { System.out.println(providers[i]);
 }
   }
   }
  
   However, the Servlet I write which uses the BC
  bundle
   does not work with Tomcat.
  
   When I try to invoke that servlet from the
  browser,
   the Tomcat console says:
  
   java.security.NoSuchProviderException: no such
   provider: BC
  
   It's weird!
  
   I have put the BC bundle jar file under both
   JDK_HOME\jre\lib\ext and Program
   Files\Java\j2re1.4.0\lib\ext.
  
   Needless to say that I have also added the
  following
   line
  
  
 
 security.provider.6=org.bouncycastle.jce.provider.BouncyCastleProvider
  
   in file java.security in its due paths (one under
   JDK_HOME\jre\lib\security and one under C:\Program
   Files\Java\j2re1.4.0\lib\security).
  
   I even copied the BC bundle jar file to C:\Program
   Files\Apache Group\Tomcat 4.1\common\lib, but
  Tomcat
   still keeps complaining:
  
   java.security.NoSuchProviderException: no such
   provider: BC
  
   I have no clue how I should handle this.
  
   Any idea please?
  
   Mark
  
  
  
  
   __
   Do you Yahoo!?
   Yahoo! Mail Plus - Powerful. Affordable. Sign up
  now.
   http://mailplus.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]
 


 __
 Do you Yahoo!?
 Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
 http://mailplus.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: How to configure Tomcat to follow symbolic links.

2003-02-09 Thread Sean Dockery
Not sure why that would be happening.  The documentation for Resources
states that the Resources.docBase attribute is handled in the same manner as
the Context.docBase attribute in that it is relative to the Host.appBase.

Does using an absolute path for the Resources docBase work?  That is...

Context path=/dealernet docBase=dealernet ...
  Resources docBase=/usr/lib/tomcat/webapps/dealernet
allowLinking=true
/Context

Sean Dockery
[EMAIL PROTECTED]
Certified Java Web Component Developer
Certified Delphi Programmer
SBD Consultants
http://www.sbdconsultants.com

- Original Message -
From: Mike Johnson [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Sunday, February 09, 2003 12:26
Subject: RE: How to configure Tomcat to follow symbolic links.


 Ah... Thanks for the correction. :-)

 But, I'm now getting an exception during load if I set it like you
 wrote:

 java.lang.reflect.InvocationTargetException:
 java.lang.IllegalArgumentException: Document base dealernet does not
 exist or is not a readable directory
 at

org.apache.naming.resources.FileDirContext.setDocBase(FileDirContext.java:19
3)
 at java.lang.reflect.Method.invoke(Native Method)
 at

org.apache.commons.beanutils.PropertyUtils.setSimpleProperty(PropertyUtils.j
ava:1650)
 at

org.apache.commons.beanutils.PropertyUtils.setNestedProperty(PropertyUtils.j
ava:1545)
 at

org.apache.commons.beanutils.PropertyUtils.setProperty(PropertyUtils.java:15
74)
 at
 org.apache.commons.beanutils.BeanUtils.setProperty(BeanUtils.java:919)
 at org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:726)
 at

org.apache.commons.digester.SetPropertiesRule.begin(SetPropertiesRule.java:2
59)
 at
 org.apache.commons.digester.Digester.startElement(Digester.java:1237)
 at

org.apache.xerces.parsers.AbstractSAXParser.startElement(AbstractSAXParser.j
ava:459)
 at

org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXML
DocumentParser.java:221)
 at

org.apache.xerces.impl.XMLNamespaceBinder.emptyElement(XMLNamespaceBinder.ja
va:595)
 at

org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDo
cumentFragmentScannerImpl.java:747)
 at

org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatc
her.dispatch(XMLDocumentFragmentScannerImpl.java:1477) at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocume
ntFragmentScannerImpl.java:329)
 at

org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:525)
 at

org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:581)
 at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:152)
 at

org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:117
5)
 at org.apache.commons.digester.Digester.parse(Digester.java:1495)
 at org.apache.catalina.startup.Catalina.start(Catalina.java:449)
 at org.apache.catalina.startup.Catalina.execute(Catalina.java:400)
 at org.apache.catalina.startup.Catalina.process(Catalina.java:180)
 at java.lang.reflect.Method.invoke(Native Method)
 at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203)
 [ERROR] Digester - -Begin event threw exception
 java.lang.reflect.InvocationTargetException
 Catalina.start: java.lang.reflect.InvocationTargetException
 java.lang.reflect.InvocationTargetException
 at

org.apache.commons.digester.Digester.createSAXException(Digester.java:2312)
 at

org.apache.commons.digester.Digester.createSAXException(Digester.java:2332)
 at
 org.apache.commons.digester.Digester.startElement(Digester.java:1240)
 at

org.apache.xerces.parsers.AbstractSAXParser.startElement(AbstractSAXParser.j
ava:459)
 at

org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXML
DocumentParser.java:221)
 at

org.apache.xerces.impl.XMLNamespaceBinder.emptyElement(XMLNamespaceBinder.ja
va:595)
 at

org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDo
cumentFragmentScannerImpl.java:747)
 at

org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatc
her.dispatch(XMLDocumentFragmentScannerImpl.java:1477) at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocume
ntFragmentScannerImpl.java:329)
 at

org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:525)
 at

org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:581)
 at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:152)
 at

org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:117
5)
 at org.apache.commons.digester.Digester.parse(Digester.java:1495)
 at org.apache.catalina.startup.Catalina.start(Catalina.java:449)
 at org.apache.catalina.startup.Catalina.execute(Catalina.java:400)
 at org.apache.catalina.startup.Catalina.process(Catalina.java:180)
 at java.lang.reflect.Method.invoke(Native Method)
 at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203)


 -
 where 'dealernet' is defined as:

 Context path=/dealernet 

Re: How to configure Tomcat to follow symbolic links.

2003-02-09 Thread Mike Johnson
Hey, now. The full path does work. Good one. :-)

Thanks,

Mike Johnson

On Sun, 2003-02-09 at 13:47, Sean Dockery wrote:
 Not sure why that would be happening.  The documentation for Resources
 states that the Resources.docBase attribute is handled in the same manner as
 the Context.docBase attribute in that it is relative to the Host.appBase.
 
 Does using an absolute path for the Resources docBase work?  That is...
 
 Context path=/dealernet docBase=dealernet ...
   Resources docBase=/usr/lib/tomcat/webapps/dealernet
 allowLinking=true
 /Context
 
 Sean Dockery
 [EMAIL PROTECTED]
 Certified Java Web Component Developer
 Certified Delphi Programmer
 SBD Consultants
 http://www.sbdconsultants.com
 
 - Original Message -
 From: Mike Johnson [EMAIL PROTECTED]
 To: Tomcat Users List [EMAIL PROTECTED]
 Sent: Sunday, February 09, 2003 12:26
 Subject: RE: How to configure Tomcat to follow symbolic links.
 
 
  Ah... Thanks for the correction. :-)
 
  But, I'm now getting an exception during load if I set it like you
  wrote:
 
  java.lang.reflect.InvocationTargetException:
  java.lang.IllegalArgumentException: Document base dealernet does not
  exist or is not a readable directory
  at
 
 org.apache.naming.resources.FileDirContext.setDocBase(FileDirContext.java:19
 3)
  at java.lang.reflect.Method.invoke(Native Method)
  at
 
 org.apache.commons.beanutils.PropertyUtils.setSimpleProperty(PropertyUtils.j
 ava:1650)
  at
 
 org.apache.commons.beanutils.PropertyUtils.setNestedProperty(PropertyUtils.j
 ava:1545)
  at
 
 org.apache.commons.beanutils.PropertyUtils.setProperty(PropertyUtils.java:15
 74)
  at
  org.apache.commons.beanutils.BeanUtils.setProperty(BeanUtils.java:919)
  at org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:726)
  at
 
 org.apache.commons.digester.SetPropertiesRule.begin(SetPropertiesRule.java:2
 59)
  at
  org.apache.commons.digester.Digester.startElement(Digester.java:1237)
  at
 
 org.apache.xerces.parsers.AbstractSAXParser.startElement(AbstractSAXParser.j
 ava:459)
  at
 
 org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXML
 DocumentParser.java:221)
  at
 
 org.apache.xerces.impl.XMLNamespaceBinder.emptyElement(XMLNamespaceBinder.ja
 va:595)
  at
 
 org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDo
 cumentFragmentScannerImpl.java:747)
  at
 
 org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatc
 her.dispatch(XMLDocumentFragmentScannerImpl.java:1477) at
 org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocume
 ntFragmentScannerImpl.java:329)
  at
 
 org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:525)
  at
 
 org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:581)
  at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:152)
  at
 
 org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:117
 5)
  at org.apache.commons.digester.Digester.parse(Digester.java:1495)
  at org.apache.catalina.startup.Catalina.start(Catalina.java:449)
  at org.apache.catalina.startup.Catalina.execute(Catalina.java:400)
  at org.apache.catalina.startup.Catalina.process(Catalina.java:180)
  at java.lang.reflect.Method.invoke(Native Method)
  at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203)
  [ERROR] Digester - -Begin event threw exception
  java.lang.reflect.InvocationTargetException
  Catalina.start: java.lang.reflect.InvocationTargetException
  java.lang.reflect.InvocationTargetException
  at
 
 org.apache.commons.digester.Digester.createSAXException(Digester.java:2312)
  at
 
 org.apache.commons.digester.Digester.createSAXException(Digester.java:2332)
  at
  org.apache.commons.digester.Digester.startElement(Digester.java:1240)
  at
 
 org.apache.xerces.parsers.AbstractSAXParser.startElement(AbstractSAXParser.j
 ava:459)
  at
 
 org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXML
 DocumentParser.java:221)
  at
 
 org.apache.xerces.impl.XMLNamespaceBinder.emptyElement(XMLNamespaceBinder.ja
 va:595)
  at
 
 org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDo
 cumentFragmentScannerImpl.java:747)
  at
 
 org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatc
 her.dispatch(XMLDocumentFragmentScannerImpl.java:1477) at
 org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocume
 ntFragmentScannerImpl.java:329)
  at
 
 org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:525)
  at
 
 org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:581)
  at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:152)
  at
 
 org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:117
 5)
  at org.apache.commons.digester.Digester.parse(Digester.java:1495)
  at org.apache.catalina.startup.Catalina.start(Catalina.java:449)
  at org.apache.catalina.startup.Catalina.execute(Catalina.java:400)
  at 

Re: How to configure Tomcat to follow symbolic links.

2003-02-09 Thread Sean Dockery
Maybe try Resource.docBase= to see what that does...  Just out of
curiousity.  :-)

- Original Message -
From: Mike Johnson [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Sunday, February 09, 2003 14:56
Subject: Re: How to configure Tomcat to follow symbolic links.


 Hey, now. The full path does work. Good one. :-)

 Thanks,

 Mike Johnson

 On Sun, 2003-02-09 at 13:47, Sean Dockery wrote:
  Not sure why that would be happening.  The documentation for Resources
  states that the Resources.docBase attribute is handled in the same
manner as
  the Context.docBase attribute in that it is relative to the
Host.appBase.
 
  Does using an absolute path for the Resources docBase work?  That is...
 
  Context path=/dealernet docBase=dealernet ...
Resources docBase=/usr/lib/tomcat/webapps/dealernet
  allowLinking=true
  /Context
 
  Sean Dockery
  [EMAIL PROTECTED]
  Certified Java Web Component Developer
  Certified Delphi Programmer
  SBD Consultants
  http://www.sbdconsultants.com
 
  - Original Message -
  From: Mike Johnson [EMAIL PROTECTED]
  To: Tomcat Users List [EMAIL PROTECTED]
  Sent: Sunday, February 09, 2003 12:26
  Subject: RE: How to configure Tomcat to follow symbolic links.
 
 
   Ah... Thanks for the correction. :-)
  
   But, I'm now getting an exception during load if I set it like you
   wrote:
  
   java.lang.reflect.InvocationTargetException:
   java.lang.IllegalArgumentException: Document base dealernet does not
   exist or is not a readable directory
   at
  
 
org.apache.naming.resources.FileDirContext.setDocBase(FileDirContext.java:19
  3)
   at java.lang.reflect.Method.invoke(Native Method)
   at
  
 
org.apache.commons.beanutils.PropertyUtils.setSimpleProperty(PropertyUtils.j
  ava:1650)
   at
  
 
org.apache.commons.beanutils.PropertyUtils.setNestedProperty(PropertyUtils.j
  ava:1545)
   at
  
 
org.apache.commons.beanutils.PropertyUtils.setProperty(PropertyUtils.java:15
  74)
   at
   org.apache.commons.beanutils.BeanUtils.setProperty(BeanUtils.java:919)
   at org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:726)
   at
  
 
org.apache.commons.digester.SetPropertiesRule.begin(SetPropertiesRule.java:2
  59)
   at
   org.apache.commons.digester.Digester.startElement(Digester.java:1237)
   at
  
 
org.apache.xerces.parsers.AbstractSAXParser.startElement(AbstractSAXParser.j
  ava:459)
   at
  
 
org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXML
  DocumentParser.java:221)
   at
  
 
org.apache.xerces.impl.XMLNamespaceBinder.emptyElement(XMLNamespaceBinder.ja
  va:595)
   at
  
 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDo
  cumentFragmentScannerImpl.java:747)
   at
  
 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatc
  her.dispatch(XMLDocumentFragmentScannerImpl.java:1477) at
 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocume
  ntFragmentScannerImpl.java:329)
   at
  
 
org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:525)
   at
  
 
org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:581)
   at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:152)
   at
  
 
org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:117
  5)
   at org.apache.commons.digester.Digester.parse(Digester.java:1495)
   at org.apache.catalina.startup.Catalina.start(Catalina.java:449)
   at org.apache.catalina.startup.Catalina.execute(Catalina.java:400)
   at org.apache.catalina.startup.Catalina.process(Catalina.java:180)
   at java.lang.reflect.Method.invoke(Native Method)
   at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203)
   [ERROR] Digester - -Begin event threw exception
   java.lang.reflect.InvocationTargetException
   Catalina.start: java.lang.reflect.InvocationTargetException
   java.lang.reflect.InvocationTargetException
   at
  
 
org.apache.commons.digester.Digester.createSAXException(Digester.java:2312)
   at
  
 
org.apache.commons.digester.Digester.createSAXException(Digester.java:2332)
   at
   org.apache.commons.digester.Digester.startElement(Digester.java:1240)
   at
  
 
org.apache.xerces.parsers.AbstractSAXParser.startElement(AbstractSAXParser.j
  ava:459)
   at
  
 
org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXML
  DocumentParser.java:221)
   at
  
 
org.apache.xerces.impl.XMLNamespaceBinder.emptyElement(XMLNamespaceBinder.ja
  va:595)
   at
  
 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDo
  cumentFragmentScannerImpl.java:747)
   at
  
 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatc
  her.dispatch(XMLDocumentFragmentScannerImpl.java:1477) at
 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocume
  ntFragmentScannerImpl.java:329)
   at
  
 
org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:525)
   at
  
 

Is SSI supported in TC 4.1 ?

2003-02-09 Thread ThePrahs
Has anyone activated Server Side Include(SSI) in Tomcat 4.1 ?

I have followed the normal instructions under Apache's Tomcat 
website(http://jakarta.apache.org/tomcat/tomcat-4.1-doc/ssi-howto.html 
),
including :

1. Renaming servlets-ssi.renametojar to servlets-ssi.jar in directory
CATALINA_HOME/server/lib/ ;

2. Uncommented servletservlet-namessi/servlet-name.../servlet and
servlet-mapping
        servlet-namessi/servlet-name
        url-pattern*.shtml/url-pattern
    /servlet-mapping
in web.xml in directory CATALINA_HOME/conf/ ;

3.Created a *.shtml file with the necessary servlet code=..param name=..
value=../servlet tags.

The problem is : when I call this *.shtml file under Tomcat, it does seems to
recognise my servlet - it only output its text content - although when I
directly call the servlet, it has no problem rendering its output.

Is the servlet tag supported at all ?

Any help will be much appreciated.

Bob.




Re: Need help w. another jsp!

2003-02-09 Thread Steve Burrus

Sean Dockery, while I VERY MUCH APPRECIATE yer helpful advice which you have offered 
to me (in fact, u are the only person so far to offer any advice for this current 
problem of mine!)  it still isn't going right at all!! Here is a screen dump from the 
tomcat server error page. Note that it is quick to indicate a jsp compilation error! :

HTTP Status 500 - 

 

type Exception report

message 

description The server encountered an internal error () that prevented it from 
fulfilling this request.

exception 

org.apache.jasper.JasperException: Unable to compile class for JSP

An error occurred at line: 64 in the jsp file: /calendar.jsp

Generated servlet error:
[javac] Compiling 1 source file

C:\jakarta-tomcat-4.1.18\work\Standalone\localhost\_\calendar_jsp.java:92: cannot 
resolve symbol
symbol  : variable current 
location: class org.apache.jsp.calendar_jsp
   current-Cal.getActualMaximum(currentCal.DAY_OF_MONTH);
   ^

 

An error occurred at line: 64 in the jsp file: /calendar.jsp

Generated servlet error:
C:\jakarta-tomcat-4.1.18\work\Standalone\localhost\_\calendar_jsp.java:92: cannot 
resolve symbol
symbol  : variable Cal 
location: class org.apache.jsp.calendar_jsp
   current-Cal.getActualMaximum(currentCal.DAY_OF_MONTH);
   ^
2 errors


at 
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:130)
at 
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:293)
at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:340)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:352)
at 
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:474)
at 
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:184)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:260)
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.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
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.catalina.core.StandardContext.invoke(StandardContext.java:2415)
at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at 
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java: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:432)
at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:386)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:534)
at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:530)
at java.lang.Thread.run(Thread.java:536)

 

Apache Tomcat/4.1.18

  What do I do now to remedy this seemingly impossible situation?



Re: How to configure Tomcat to follow symbolic links.

2003-02-09 Thread Mike Johnson
That's odd, started right up no complaints. It's even following
links, too. :-)

I should have mentioned this before: Blackdown SDK 1.3.1 (b), Debian
unstable/PPC.

Thanks again,

Mike Johnson


On Sun, 2003-02-09 at 14:16, Sean Dockery wrote:
 Maybe try Resource.docBase= to see what that does...  Just out of
 curiousity.  :-)
 
 - Original Message -
 From: Mike Johnson [EMAIL PROTECTED]
 To: Tomcat Users List [EMAIL PROTECTED]
 Sent: Sunday, February 09, 2003 14:56
 Subject: Re: How to configure Tomcat to follow symbolic links.
 
 
  Hey, now. The full path does work. Good one. :-)
 
  Thanks,
 
  Mike Johnson
 
  On Sun, 2003-02-09 at 13:47, Sean Dockery wrote:
   Not sure why that would be happening.  The documentation for Resources
   states that the Resources.docBase attribute is handled in the same
 manner as
   the Context.docBase attribute in that it is relative to the
 Host.appBase.
  
   Does using an absolute path for the Resources docBase work?  That is...
  
   Context path=/dealernet docBase=dealernet ...
 Resources docBase=/usr/lib/tomcat/webapps/dealernet
   allowLinking=true
   /Context
  
   Sean Dockery
   [EMAIL PROTECTED]
   Certified Java Web Component Developer
   Certified Delphi Programmer
   SBD Consultants
   http://www.sbdconsultants.com
  
   - Original Message -
   From: Mike Johnson [EMAIL PROTECTED]
   To: Tomcat Users List [EMAIL PROTECTED]
   Sent: Sunday, February 09, 2003 12:26
   Subject: RE: How to configure Tomcat to follow symbolic links.
  
  
Ah... Thanks for the correction. :-)
   
But, I'm now getting an exception during load if I set it like you
wrote:
   
java.lang.reflect.InvocationTargetException:
java.lang.IllegalArgumentException: Document base dealernet does not
exist or is not a readable directory
at
   
  
 org.apache.naming.resources.FileDirContext.setDocBase(FileDirContext.java:19
   3)
at java.lang.reflect.Method.invoke(Native Method)
at
   
  
 org.apache.commons.beanutils.PropertyUtils.setSimpleProperty(PropertyUtils.j
   ava:1650)
at
   
  
 org.apache.commons.beanutils.PropertyUtils.setNestedProperty(PropertyUtils.j
   ava:1545)
at
   
  
 org.apache.commons.beanutils.PropertyUtils.setProperty(PropertyUtils.java:15
   74)
at
org.apache.commons.beanutils.BeanUtils.setProperty(BeanUtils.java:919)
at org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:726)
at
   
  
 org.apache.commons.digester.SetPropertiesRule.begin(SetPropertiesRule.java:2
   59)
at
org.apache.commons.digester.Digester.startElement(Digester.java:1237)
at
   
  
 org.apache.xerces.parsers.AbstractSAXParser.startElement(AbstractSAXParser.j
   ava:459)
at
   
  
 org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXML
   DocumentParser.java:221)
at
   
  
 org.apache.xerces.impl.XMLNamespaceBinder.emptyElement(XMLNamespaceBinder.ja
   va:595)
at
   
  
 org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDo
   cumentFragmentScannerImpl.java:747)
at
   
  
 org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatc
   her.dispatch(XMLDocumentFragmentScannerImpl.java:1477) at
  
 org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocume
   ntFragmentScannerImpl.java:329)
at
   
  
 org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:525)
at
   
  
 org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:581)
at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:152)
at
   
  
 org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:117
   5)
at org.apache.commons.digester.Digester.parse(Digester.java:1495)
at org.apache.catalina.startup.Catalina.start(Catalina.java:449)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:400)
at org.apache.catalina.startup.Catalina.process(Catalina.java:180)
at java.lang.reflect.Method.invoke(Native Method)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203)
[ERROR] Digester - -Begin event threw exception
java.lang.reflect.InvocationTargetException
Catalina.start: java.lang.reflect.InvocationTargetException
java.lang.reflect.InvocationTargetException
at
   
  
 org.apache.commons.digester.Digester.createSAXException(Digester.java:2312)
at
   
  
 org.apache.commons.digester.Digester.createSAXException(Digester.java:2332)
at
org.apache.commons.digester.Digester.startElement(Digester.java:1240)
at
   
  
 org.apache.xerces.parsers.AbstractSAXParser.startElement(AbstractSAXParser.j
   ava:459)
at
   
  
 org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXML
   DocumentParser.java:221)
at
   
  
 org.apache.xerces.impl.XMLNamespaceBinder.emptyElement(XMLNamespaceBinder.ja
   va:595)
at
   
  
 

JAASRealm/LoginManager questions

2003-02-09 Thread Bryan Field-Elliot
We are building out a toolkit for distributed single sign-on, using (today) standards 
such as SAML and Liberty. While the guts of this toolkit are mostly finished, we 
aren't actually populating the Subject/Principals list, and we'd like to add features 
in that direction. I'm admittedly quite new to JAAS, but I know enough to think that 
JAAS might be the right approach.

When a site is ready to request authentication, the SAML model (and our toolkit) like 
to redirect the browser to another site, where first-level authentication occurs. Upon 
return from the remote site, we get a signed login credential, which we validate, and 
ultimately hope to use to populate the Subject/Principal.

We do all of our development on Tomcat, which we consider to be our reference platform.

The basic goal is, (in a standards-compliant way, likely to work on multiple vendors' 
Servlet containers), handle authentication and populate the Subject.

My questions are:

1. Is JAAS the right way to go? I think it is. By using Catalina's JAASRealm, and 
building our own LoginManager, I think we're on the right track. 

2. Can our LoginManager (fronted by Tomcat's JAASRealm) send redirects to the browser, 
and somehow set up listeners for when the user eventually returns (could be a couple 
minutes, and is certainly going to be on a different incoming HTTP request)? Again I'm 
new to JAAS, but something in the Tomcat Javadocs alarms me that this may not be 
possible. From JAASCallbackHander:
Implementation of the JAAS CallbackHandler interface, used to negotiate delivery of 
the username and credentials that were specified to our constructor. No interaction 
with the user is required (or possible).

The last phrase (No interaction with the user is...possible) seems to indicate that 
I might be heading down a dead-end here.

3. Am I wrong that JAASRealm is the way to go? Maybe I need to drop down a layer and 
implement a Catalina Realm directly, rather than use JAASRealm and implement a 
LoginManager?

Thanks very much,

Bryan






Re: Need help w. another jsp!

2003-02-09 Thread Sergio Ocio Barriales
Hi!

I don't know if this is what you asked, but that error comes because there
are problems in the source code.

As you get:


symbol  : variable current
location: class org.apache.jsp.calendar_jsp
   current-Cal.getActualMaximum(currentCal.DAY_OF_MONTH);

and

C:\jakarta-tomcat-4.1.18\work\Standalone\localhost\_\calendar_jsp.java:92:
cannot resolve symbol
symbol  : variable Cal
location: class org.apache.jsp.calendar_jsp
   current-Cal.getActualMaximum(currentCal.DAY_OF_MONTH);

you will see an error right here current-Cal.getActualMaximum  This should
be currentCal.getActualMaximum(currentCal.DAY_OF_MONTH);

I hope I'd helped you.

Sergio Ocio
- Original Message -
From: Steve Burrus [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Sunday, February 09, 2003 11:28 PM
Subject: Re: Need help w. another jsp!



 Sean Dockery, while I VERY MUCH APPRECIATE yer helpful advice which you
have offered to me (in fact, u are the only person so far to offer any
advice for this current problem of mine!)  it still isn't going right at
all!! Here is a screen dump from the tomcat server error page. Note that it
is quick to indicate a jsp compilation error! :

 HTTP Status 500 -



 type Exception report

 message

 description The server encountered an internal error () that prevented it
from fulfilling this request.

 exception

 org.apache.jasper.JasperException: Unable to compile class for JSP

 An error occurred at line: 64 in the jsp file: /calendar.jsp

 Generated servlet error:
 [javac] Compiling 1 source file

 C:\jakarta-tomcat-4.1.18\work\Standalone\localhost\_\calendar_jsp.java:92:
cannot resolve symbol
 symbol  : variable current
 location: class org.apache.jsp.calendar_jsp
current-Cal.getActualMaximum(currentCal.DAY_OF_MONTH);
^



 An error occurred at line: 64 in the jsp file: /calendar.jsp

 Generated servlet error:
 C:\jakarta-tomcat-4.1.18\work\Standalone\localhost\_\calendar_jsp.java:92:
cannot resolve symbol
 symbol  : variable Cal
 location: class org.apache.jsp.calendar_jsp
current-Cal.getActualMaximum(currentCal.DAY_OF_MONTH);
^
 2 errors


 at
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandle
r.java:130)
 at
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:2
93)
 at
org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:340)
 at org.apache.jasper.compiler.Compiler.compile(Compiler.java:352)
 at
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:4
74)
 at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:1
84)
 at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
 at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:247)
 at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:193)
 at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:260)
 at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(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.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:191)
 at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(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.catalina.core.StandardContext.invoke(StandardContext.java:2415)
 at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180
)
 at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
 at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
java:170)
 at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)
 at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172
)
 at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(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)

Re: Need help w. another jsp!

2003-02-09 Thread Sean Dockery
Hehe.  Your situation is far from desperate.  :-)

The error that you are seeing happened when Tomcat attempted to translate
your JSP file into a Java servlet source code file that it could then
compile and run as a servlet.  Don't despair though; failures can teach you
much more than successes.  I can see what the immediately problem is from
your error message, but I want to have a better background about how to help
you go about fixing it.

If the JSP file is not too large and the JSP does not contain sensitive
material, perhaps you post it here so that other list readers and myself can
have a look to see what the problem might be.  Do not post the file as an
attachment as it may cause problems for some email programs; copy some or
all of the content of the calendar.jsp file and paste it into your message
instead.

Sean Dockery
[EMAIL PROTECTED]
Certified Java Web Component Developer
Certified Delphi Programmer
SBD Consultants
http://www.sbdconsultants.com

- Original Message -
From: Steve Burrus [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Sunday, February 09, 2003 15:28
Subject: Re: Need help w. another jsp!



 Sean Dockery, while I VERY MUCH APPRECIATE yer helpful advice which you
have offered to me (in fact, u are the only person so far to offer any
advice for this current problem of mine!)  it still isn't going right at
all!! Here is a screen dump from the tomcat server error page. Note that it
is quick to indicate a jsp compilation error! :

 HTTP Status 500 -



 type Exception report

 message

 description The server encountered an internal error () that prevented it
from fulfilling this request.

 exception

 org.apache.jasper.JasperException: Unable to compile class for JSP

 An error occurred at line: 64 in the jsp file: /calendar.jsp

 Generated servlet error:
 [javac] Compiling 1 source file

 C:\jakarta-tomcat-4.1.18\work\Standalone\localhost\_\calendar_jsp.java:92:
cannot resolve symbol
 symbol  : variable current
 location: class org.apache.jsp.calendar_jsp
current-Cal.getActualMaximum(currentCal.DAY_OF_MONTH);
^



 An error occurred at line: 64 in the jsp file: /calendar.jsp

 Generated servlet error:
 C:\jakarta-tomcat-4.1.18\work\Standalone\localhost\_\calendar_jsp.java:92:
cannot resolve symbol
 symbol  : variable Cal
 location: class org.apache.jsp.calendar_jsp
current-Cal.getActualMaximum(currentCal.DAY_OF_MONTH);
^
 2 errors


 at
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandle
r.java:130)
 at
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:2
93)
 at
org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:340)
 at org.apache.jasper.compiler.Compiler.compile(Compiler.java:352)
 at
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:4
74)
 at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:1
84)
 at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
 at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:247)
 at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:193)
 at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:260)
 at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(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.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:191)
 at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(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.catalina.core.StandardContext.invoke(StandardContext.java:2415)
 at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180
)
 at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
 at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
java:170)
 at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)
 at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172
)
 at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)
 

Re: Is SSI supported in TC 4.1 ?

2003-02-09 Thread Craig R. McClanahan


On Sun, 9 Feb 2003 [EMAIL PROTECTED] wrote:

 Date: Sun, 9 Feb 2003 17:26:35 EST
 From: [EMAIL PROTECTED]
 Reply-To: Tomcat Users List [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Subject: Is SSI supported in TC 4.1 ?

 Has anyone activated Server Side Include(SSI) in Tomcat 4.1 ?

 I have followed the normal instructions under Apache's Tomcat
 website(http://jakarta.apache.org/tomcat/tomcat-4.1-doc/ssi-howto.html
 ),
 including :

 1. Renaming servlets-ssi.renametojar to servlets-ssi.jar in directory
 CATALINA_HOME/server/lib/ ;

 2. Uncommented servletservlet-namessi/servlet-name.../servlet and
 servlet-mapping
         servlet-namessi/servlet-name
         url-pattern*.shtml/url-pattern
     /servlet-mapping
 in web.xml in directory CATALINA_HOME/conf/ ;

 3.Created a *.shtml file with the necessary servlet code=..param name=..
 value=../servlet tags.

 The problem is : when I call this *.shtml file under Tomcat, it does seems to
 recognise my servlet - it only output its text content - although when I
 directly call the servlet, it has no problem rendering its output.

 Is the servlet tag supported at all ?


No, only the commands like those that Apache's httpd server supports are
supported here.  The closest thing to executing a servlet would be the
!--#include file=... -- directive.

Of course, if you want to embed the output of a servlet into your page,
it's pretty simple to just use a JSP page and write:

  jsp:include page=/path/to/my/servlet/

in it.

 Any help will be much appreciated.

 Bob.



Craig


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




Re: JAASRealm/LoginManager questions

2003-02-09 Thread Craig R. McClanahan
Hi Bryan,

A couple of comments interspersed below.

On Sun, 9 Feb 2003, Bryan Field-Elliot wrote:

 Date: Sun, 9 Feb 2003 15:48:11 -0700
 From: Bryan Field-Elliot [EMAIL PROTECTED]
 Reply-To: Tomcat Users List [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Subject: JAASRealm/LoginManager questions

 We are building out a toolkit for distributed single sign-on, using
 (today) standards such as SAML and Liberty. While the guts of this
 toolkit are mostly finished, we aren't actually populating the
 Subject/Principals list, and we'd like to add features in that
 direction.

Cool.

 I'm admittedly quite new to JAAS, but I know enough to think
 that JAAS might be the right approach.

 When a site is ready to request authentication, the SAML model (and our
 toolkit) like to redirect the browser to another site, where first-level
 authentication occurs. Upon return from the remote site, we get a signed
 login credential, which we validate, and ultimately hope to use to
 populate the Subject/Principal.

 We do all of our development on Tomcat, which we consider to be our
 reference platform.

 The basic goal is, (in a standards-compliant way, likely to work on
 multiple vendors' Servlet containers), handle authentication and
 populate the Subject.


The likely to work on multiple vendors' Servlet containers is likely to
be a significant challenge.

Let's consider the Tomcat 4/5 architecture to start with -- the
mechanisms and policies for authenticating users are actually split into
two fundamentally separate APIs, that answer two different questions:

* Authenticator -- HOW should authentication be performed?  There
  is a standard Authenticator implementation included for each of
  the four standard login methods (basic, digest, form-based, and
  SSL client certificate) defined in the servlet spec, but you could
  also add one of your own.

* Realm -- WHERE should the Authenticator go to see if a particular
  set of credentials identifies a valid user?  Tomcat provides
  mechanisms to look up users in an XML file (MemoryRealm), a
  JDBC-accessed database (JDBCRealm), or an LDAP directory server
  (JNDIRealm).  Oh yeah, and there's JAASRealm, but you'll see that
  replacing *only* the realm is not going to be sufficient to meet
  your requirements.

In Tomcat, a Realm doesn't have access to the request/response at all --
only the username and credentials.  Therefore, you can't implement any
sort of HTTP redirect from it.  This limits the utility of JAASRealm quite
a bit, because there's no way to create a dialog with the user who
submitted the request.

An Authenticator, on the other hand, has complete access to the request
and response.  Indeed, since an Authenticator is a specialized Valve, it's
pretty easy to do the redirection and intercept the return --
conceptually, that's pretty much what the form-based login authenticator
does, except that you'd be redirecting to an external authentication
server.

 My questions are:

 1. Is JAAS the right way to go? I think it is. By using Catalina's
 JAASRealm, and building our own LoginManager, I think we're on the right
 track.


I don't think a custom Realm of any sort is really going to help you.
What you're really doing is saying my database of users and credentials,
and the logic that validates them, is on this other server over here.
Effectively, Tomcat itself won't even *have* a Realm.

But, you *will* need to write an Authenticator that saves the current
request, does the redirect, and awaits the return.  You can use
FormAuthenticator as a basis for ideas of how to implement this.

 2. Can our LoginManager (fronted by Tomcat's JAASRealm) send redirects
 to the browser, and somehow set up listeners for when the user
 eventually returns (could be a couple minutes, and is certainly going to
 be on a different incoming HTTP request)? Again I'm new to JAAS, but
 something in the Tomcat Javadocs alarms me that this may not be
 possible. From JAASCallbackHander: Implementation of the JAAS
 CallbackHandler interface, used to negotiate delivery of the username
 and credentials that were specified to our constructor. No interaction
 with the user is required (or possible).

 The last phrase (No interaction with the user is...possible) seems to
 indicate that I might be heading down a dead-end here.

 3. Am I wrong that JAASRealm is the way to go? Maybe I need to drop down
 a layer and implement a Catalina Realm directly, rather than use
 JAASRealm and implement a LoginManager?


I was disappointed in how hard it was to craft a usable Realm
implementation for JAAS -- interacting with the underlying HTTP request
and response didn't fit in to the Catalina architecture well.

Creating a custom Authenticator, on the other hand, should be pretty
straightforward.  Of cousre, that's a very Tomcat-specific interface, but
at least it'll work here :-).

 Thanks very much,

 Bryan







Craig


-
To unsubscribe, 

Re: Need help w. another jsp!

2003-02-09 Thread Steve Burrus
SUCCESS gentlemen with the calendar.jsp!!! I got it to execute in the Tomcat app. server--probably my very 1st jsp/servlet to successfully run!!! All that I had to do was to correct a variable name (it had a "-" in it mistakenly) and then "lo and behold" it ran! I am, however, having a problem now with another jsp called "ControlFlow.jsp". Here is the 505 server error page:
HTTP Status 500 - 


type Exception report
message 
description The server encountered an internal error () that prevented it from fulfilling this request.
exception org.apache.jasper.JasperException: Unable to compile class for JSP

An error occurred at line: 49 in the jsp file: /ControlFlow.jsp

Generated servlet error:
[javac] Compiling 1 source file

C:\jakarta-tomcat-4.1.18\work\Standalone\localhost\_\ControlFlow_jsp.java:103: 'case', 'default' or '}' expected
  out.write("\r\n");
  ^



An error occurred at line: 49 in the jsp file: /ControlFlow.jsp

Generated servlet error:
C:\jakarta-tomcat-4.1.18\work\Standalone\localhost\_\ControlFlow_jsp.java:103: 'case', 'default' or '}' expected
  out.write("\r\n");
   ^



An error occurred at line: 50 in the jsp file: /ControlFlow.jsp

Generated servlet error:
C:\jakarta-tomcat-4.1.18\work\Standalone\localhost\_\ControlFlow_jsp.java:105: 'case', 'default' or '}' expected
  out.write("\r\n ");
^



An error occurred at line: 50 in the jsp file: /ControlFlow.jsp

Generated servlet error:
C:\jakarta-tomcat-4.1.18\work\Standalone\localhost\_\ControlFlow_jsp.java:106: 'case', 'default' or '}' expected
  out.write("Sunday");
  ^



An error occurred at line: 51 in the jsp file: /ControlFlow.jsp

Generated servlet error:
C:\jakarta-tomcat-4.1.18\work\Standalone\localhost\_\ControlFlow_jsp.java:107: 'case', 'default' or '}' expected
  out.write("\r\n ");
   ^



An error occurred at line: 51 in the jsp file: /ControlFlow.jsp

Generated servlet error:
C:\jakarta-tomcat-4.1.18\work\Standalone\localhost\_\ControlFlow_jsp.java:108: 'case', 'default' or '}' expected
 break; 
  ^



An error occurred at line: 52 in the jsp file: /ControlFlow.jsp

Generated servlet error:
C:\jakarta-tomcat-4.1.18\work\Standalone\localhost\_\ControlFlow_jsp.java:109: 'case', 'default' or '}' expected
  out.write("\r\n");
   ^



An error occurred at line: 53 in the jsp file: /ControlFlow.jsp

Generated servlet error:
C:\jakarta-tomcat-4.1.18\work\Standalone\localhost\_\ControlFlow_jsp.java:111: 'case', 'default' or '}' expected
  out.write("\r\n ");
^



An error occurred at line: 53 in the jsp file: /ControlFlow.jsp

Generated servlet error:
C:\jakarta-tomcat-4.1.18\work\Standalone\localhost\_\ControlFlow_jsp.java:112: 'case', 'default' or '}' expected
  out.write("Monday");
  ^



An error occurred at line: 54 in the jsp file: /ControlFlow.jsp

Generated servlet error:
C:\jakarta-tomcat-4.1.18\work\Standalone\localhost\_\ControlFlow_jsp.java:113: 'case', 'default' or '}' expected
  out.write("\r\n ");
   ^



An error occurred at line: 54 in the jsp file: /ControlFlow.jsp

Generated servlet error:
C:\jakarta-tomcat-4.1.18\work\Standalone\localhost\_\ControlFlow_jsp.java:114: 'case', 'default' or '}' expected
 break; 
  ^



An error occurred at line: 55 in the jsp file: /ControlFlow.jsp

Generated servlet error:
C:\jakarta-tomcat-4.1.18\work\Standalone\localhost\_\ControlFlow_jsp.java:115: 'case', 'default' or '}' expected
  out.write("\r\n");
   ^



An error occurred at line: 56 in the jsp file: /ControlFlow.jsp

Generated servlet error:
C:\jakarta-tomcat-4.1.18\work\Standalone\localhost\_\ControlFlow_jsp.java:117: 'case', 'default' or '}' expected
  out.write("\r\n ");
^



An error occurred at line: 56 in the jsp file: /ControlFlow.jsp

Generated servlet error:
C:\jakarta-tomcat-4.1.18\work\Standalone\localhost\_\ControlFlow_jsp.java:118: 'case', 'default' or '}' expected
  out.write("Tuesday");
   ^



An error occurred at line: 57 in the jsp file: /ControlFlow.jsp

Generated servlet error:
C:\jakarta-tomcat-4.1.18\work\Standalone\localhost\_\ControlFlow_jsp.java:119: 'case', 'default' or '}' expected
  out.write("\r\n ");
   ^



An error occurred at line: 57 in the jsp file: /ControlFlow.jsp

Generated servlet error:
C:\jakarta-tomcat-4.1.18\work\Standalone\localhost\_\ControlFlow_jsp.java:120: 'case', 'default' or '}' expected
 break; 
  ^



An error occurred at line: 58 in the jsp file: /ControlFlow.jsp

Generated servlet error:
C:\jakarta-tomcat-4.1.18\work\Standalone\localhost\_\ControlFlow_jsp.java:121: 'case', 

Re: JAASRealm/LoginManager questions

2003-02-09 Thread Bryan Field-Elliot
Thanks for all your comments Craig,

I did a little more thinking since my original post.

First, to clarify - you mentioned that in this scenario, there really
isn't a local realm at all, since there is no local user database.
Actually there is, in the SAML model, there's a remote user database and
a local one, which are synchronized (out of band). That's simplifying,
but basically, SAML tells me which of my local userID's the current user
is, without me actually having to ask the user. By all means, there
really is a local realm/local user database.

Now, with form-based authentication, the developer has total control
over the page (e.g. JSP page) displayed. My toolkit could provide a
sample (which SHOULDN'T be altered in any major way), which saves state
information, etc., and redirects to the remote server for
authentication.

When the remote server returns, it can post back to the local server (to
a local JSP page or Servlet), the SAML credentials. True, they will NOT
be in the j_username and j_password format (instead they'll be in
SAML format). However, a Filter (Servlet 2.3) could parse this SAML
response, and re-package the request parameters as a j_username and a
j_password (even though, really, the j_username isn't a true username,
YET).

THEN, (still with me?), a JAASRealm could forward this j_username and
j_password to my LoginManager, for final SAML processing and log the
bloke on.

It seems a little convoluted, but, what it buys me is, any Servlet
container which supports form-based authentication, and which supports
JAAS for realms (or equivalent), can harness this toolkit. I assume (but
have not verified) that this buys me into the major J2EE containers --
Weblogic, SunONE, Websphere, etc, in addition to my favorite (Tomcat).

Does this sound like it would work?

Thanks,
Bryan




RE: Need help w. another jsp!

2003-02-09 Thread mech
Java teacher says:

As far as I can see, you forgot to wrap your cases into brackets...

Try the following:

% switch (day) { %
% case '1': { %
 FONT COLOR=blue SIZE=+1Sunday/FONT
 % break; } %
% case '2': { %
 FONT COLOR=blue SIZE=+1Monday/FONT
 % break; } %
% case '3': { %
 FONT COLOR=blue SIZE=+1Tuesday/FONT
 % break; } %
% case '4': { %
 FONT COLOR=blue SIZE=+1Wednesday/FONT
 % break; } %
% case '5': { %
 FONT COLOR=blue SIZE=+1Thursday/FONT
 % break; } %
% case '6': { %
 FONT COLOR=blue SIZE=+1Friday/FONT
 % break; } %
% case '7': { %
 FONT COLOR=blue SIZE=+1Saturday/FONT
 % break; } %
% default: { %
 FONT COLOR=blue SIZE=+1Error! Bad day!/FONT
 % break; } %
% } %


Guess that should work.

Remember what Jasper does with your html tags while generating a servlet
from your jsp file! The generated servlet must contain valid Java. For
every html tag you'll basically have something like an:
out.write(something);

Means you have not just a single statement, you'll most likely get a
block of statements that you have to wrap into brackets {} in order to
make it work and get valid Java code. By the way: Looking in the
generated .java helps to locate such simple problems. Understanding the
way of jsp-servlet processing helps even more. And I don't even start
about using error messages...




And the following code can't work either: Since you didn't import
java.util.Calender you should, of course, also use the fully qualified
class name then for Calendar.getInstance() like you did for
java.util.Random. ;-)
That's why you get cannot resolve symbol. Try
java.util.Calendar.getInstance()... 
Or why not use %@ page import=java.util.* % instead? Well, forgot...
that requires having read at least the introductory pages of a jsp book
or docu before installing Tomcat...

%
   // A calendar object is created to get an integer value
   // of the current day of the week
  java.util.Calendar thisCal = Calendar.getInstance();
  int day   = thisCal.get(thisCal.DAY_OF_WEEK);

   // Two arrays are created for demonstrating examples
  String[] wordArray = {The, quick, brown,
fox, . . .};
  String[] colorArray = {red, green, blue,
 orange,  black};

   // Here a random number between 0 and 1 is selected
  java.util.Random rand = new java.util.Random();
  int randomNumber = rand.nextInt(2);
%


Let's see if that all reduces your error messages... 

Good luck.
Michael

P.S. I guess whenever your project is finished you should write (c) by
[EMAIL PROTECTED] below ;-) SCNR

-Original Message-
From: Steve Burrus [mailto:[EMAIL PROTECTED]] 
Sent: Montag, 10. Februar 2003 01:02
To: Tomcat Users List
Subject: Re: Need help w. another jsp!


SUCCESS gentlemen with the calendar.jsp!!! I got it to execute in the
Tomcat app. server--probably my very 1st jsp/servlet to successfully
run!!! All that I had to do was to correct a variable name (it had a -
in it mistakenly) and then lo and behold it ran! I am, however, having
a problem now with another jsp called ControlFlow.jsp. Here is the 505
server error page:
HTTP Status 500 - 



type Exception report
message 
description The server encountered an internal error () that prevented
it from fulfilling this request.
exception 
org.apache.jasper.JasperException: Unable to compile class for JSP

An error occurred at line: 49 in the jsp file: /ControlFlow.jsp

Generated servlet error:
[javac] Compiling 1 source file

C:\jakarta-tomcat-4.1.18\work\Standalone\localhost\_\ControlFlow_jsp.jav
a:103: 'case', 'default' or '}' expected
  out.write(\r\n);
  ^



An error occurred at line: 49 in the jsp file: /ControlFlow.jsp

Generated servlet error:
C:\jakarta-tomcat-4.1.18\work\Standalone\localhost\_\ControlFlow_jsp.jav
a:103: 'case', 'default' or '}' expected
  out.write(\r\n);
   ^



An error occurred at line: 50 in the jsp file: /ControlFlow.jsp

Generated servlet error:
C:\jakarta-tomcat-4.1.18\work\Standalone\localhost\_\ControlFlow_jsp.jav
a:105: 'case', 'default' or '}' expected
  out.write(\r\n );
^



An error occurred at line: 50 in the jsp file: /ControlFlow.jsp

Generated servlet error:
C:\jakarta-tomcat-4.1.18\work\Standalone\localhost\_\ControlFlow_jsp.jav
a:106: 'case', 'default' or '}' expected
  out.write(Sunday);
  ^



An error occurred at line: 51 in the jsp file: /ControlFlow.jsp

Generated servlet error:
C:\jakarta-tomcat-4.1.18\work\Standalone\localhost\_\ControlFlow_jsp.jav
a:107: 'case', 'default' or '}' expected
  out.write(\r\n );
   ^



An error occurred at line: 51 in the jsp file: /ControlFlow.jsp

Generated servlet error:
C:\jakarta-tomcat-4.1.18\work\Standalone\localhost\_\ControlFlow_jsp.jav
a:108: 'case', 'default' or '}' expected
 break; 
  ^



Re: JAASRealm/LoginManager questions

2003-02-09 Thread Craig R. McClanahan


On Sun, 9 Feb 2003, Bryan Field-Elliot wrote:

 Date: 09 Feb 2003 17:26:10 -0700
 From: Bryan Field-Elliot [EMAIL PROTECTED]
 Reply-To: Tomcat Users List [EMAIL PROTECTED]
 To: Tomcat Users List [EMAIL PROTECTED]
 Subject: Re: JAASRealm/LoginManager questions

 Thanks for all your comments Craig,

 I did a little more thinking since my original post.

 First, to clarify - you mentioned that in this scenario, there really
 isn't a local realm at all, since there is no local user database.
 Actually there is, in the SAML model, there's a remote user database and
 a local one, which are synchronized (out of band). That's simplifying,
 but basically, SAML tells me which of my local userID's the current user
 is, without me actually having to ask the user. By all means, there
 really is a local realm/local user database.


Ah, that makes sense ... SAML specs are on my stack of TODO reading that
keeps threatening to fall over :-).

 Now, with form-based authentication, the developer has total control
 over the page (e.g. JSP page) displayed. My toolkit could provide a
 sample (which SHOULDN'T be altered in any major way), which saves state
 information, etc., and redirects to the remote server for
 authentication.


That's what I was thinking when reading your requirements list.

 When the remote server returns, it can post back to the local server (to
 a local JSP page or Servlet), the SAML credentials. True, they will NOT
 be in the j_username and j_password format (instead they'll be in
 SAML format).

That's why I was thinking custom Authenticator -- it could read the SAML
credentials instead and match that up to your local Realm.  I was
suggesting FormAuthenticator as a model for your own, not as trying to use
it directly.

Note that an Authenticator doesn't care which Realm it talks to -- all it
wants is an object where it can call authenticate() and get a user back.
Likewise, a Realm doesn't care which login method was used -- it only
cares that it is called with the required username and credentials.

 However, a Filter (Servlet 2.3)

Valves are the Catalina-internal equivalent to servlet filters, but with a
very important difference ...

 could parse this SAML
 response, and re-package the request parameters as a j_username and a
 j_password (even though, really, the j_username isn't a true username,
 YET).

Filters aren't going to help ... they run *after* the security
constraints are evaluated, and *after* authentication has taken place.
That's why you need to use a Valve instead (Authenticator extends Valve),
to ensure that you run *before*.


 THEN, (still with me?), a JAASRealm could forward this j_username and
 j_password to my LoginManager, for final SAML processing and log the
 bloke on.

 It seems a little convoluted, but, what it buys me is, any Servlet
 container which supports form-based authentication, and which supports
 JAAS for realms (or equivalent), can harness this toolkit. I assume (but
 have not verified) that this buys me into the major J2EE containers --
 Weblogic, SunONE, Websphere, etc, in addition to my favorite (Tomcat).

 Does this sound like it would work?


Ah, if only it would ... it would require a change to the servlet spec to
allow filters to perform container managed security authentications.
From a container writer's point of view, I get a little uneasy thinking
about delegating this responsibility to an application -- but I can see
some use cases for it.

There's a relatively recent JSR, #196 Java Authentication Service
Provider Interface for Containers that will likely bring standardization
to this area.  You might want to keep an eye on it.  In the meantime,
though, you're going to be stuck with container specific APIs.

 Thanks,
 Bryan



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




Re: JAASRealm/LoginManager questions

2003-02-09 Thread Bryan Field-Elliot
On Sun, 2003-02-09 at 18:09, Craig R. McClanahan wrote:


Ah, if only it would ... it would require a change to the servlet
spec to
allow filters to perform container managed security
authentications.
From a container writer's point of view, I get a little uneasy
thinking
about delegating this responsibility to an application -- but I can
see
some use cases for it.


In my proposal, (contrary to what I read in your response), I wasn't
going to use the Filter to perform actual authentication. Instead, I was
going to use the filter, to re-write the SAML response
(request.getParameter(SAML...)) as standard form authentication
parameters (request.setParameter(j_username, xxx),
request.setParameter(j_password, yyy)). Then, these usernames and
passwords would be passed down to the JAAS layer where my LoginManager
can process them.

But as you say prior, the filters aren't even being run, apparently,
before the container evaluates j_username and j_password, so I guess I
have no Servlet-standard hook there. I guess it's off to the
Authenticator API I go. 

Heck, at least I can keep all the authentication logic in one place with
that strategy, as opposed to splitting it between a Filter and a
LoginModule.





Re: Re: Tomcat - Apache install document

2003-02-09 Thread Peter Christoph Alexander Bär
I can't help you with your problem, as I am also stuck with JK2 on SuSE 8.1.
However, I can give you a few hints, what the error message you get means.

The line specifies that Tomcat shall be run without an X server (headless).
Before J2SDK 1.4.x the implementation of the AWT classes required some system
libraries that were (on Linux) only to be found when an X server was running.
But a virtual X server would suffice to do. This is a software package that
does everythin a real X server would do, except displaying something on screen.
Advantage: Other than XFree86 it can run under an arbitrary user account, which
is a potential plus for server security.

From v 1.4.x of the JDK onwards this should not be necessary, as there is a new
set AWT implementation classes. So it doesn't matter if you are running a real
X server, a virtual one, or none.

Sorry, unfortunately I don't remember the exact name of the virtual name server
I used quite some time ago. You'll find information on this browsing the FAQ
for the Apache Cocoon (XML) project.

Good luck!

   Peter

 

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




Re: Need help w. another jsp!

2003-02-09 Thread Sean Dockery
Hello again, Steve.

I concur with Michael's recommendation that you should hone your Java
programming skills before you tackle JSP.

- Original Message -
From: Steve Burrus
To: Tomcat Users List
Sent: Sunday, February 09, 2003 17:01
Subject: Re: Need help w. another jsp!


SUCCESS gentlemen with the calendar.jsp!!! I got it to execute in the Tomcat
app. server--probably my very 1st jsp/servlet to successfully run!!! All
that I had to do was to correct a variable name (it had a - in it
mistakenly) and then lo and behold it ran! I am, however, having a problem
now with another jsp called ControlFlow.jsp. Here is the 505 server error
page:
HTTP Status 500 -


-
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: exception after several hours idle

2003-02-09 Thread Vladimir Kirillov
 Why do you suspect that it is a problem with the database connection?
First there was an exception from JDBC driver that I use. I set conntection
timeout.
But there is a porblem somewhere else.

 Can you determine if you are running out of disk space somewhere?  Or
 perhaps you are trying to safe a file to a location where you don't have
 sufficient permissions to do so.  Or perhaps you are trying to load a file
 that does not exist?
If I was trying to load non-existing file, I would get this exception any
time.
It appeares only after several hours of running idle.

Regards,

Vladimir Kirillov




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




Re: Valve Access to Principal

2003-02-09 Thread Peter Kelley
Thanks Craig, this sounds like a much cleaner solution than what I
eventually tried which was to copy the session grabbing code out of
AuthenticatorBase and use it to get the required principal.

The problem I am having now is that JBoss still thinks that the logged
on user is the last one that logged in from any browser rather than the
one logged in with the current session. I have run this through the
debugger and my DoAsValve is getting called with the right principals
subjects but somehow the JAAS security credentials that get to JBoss
belong to the user that last logged in. I'm suspecting that the code
that actually processes the JSP is running on another thread but I
haven't yet gone down to that level to see.

Surely someone else has come up against this problem before ?

Does anyone know how this problem is being solved for Tomcat 5 ?

On Sat, 2003-02-08 at 18:24, Craig R. McClanahan wrote:
 On Fri, 8 Feb 2003, Peter Kelley wrote:
 
  Date: 08 Feb 2003 17:29:10 +1100
  From: Peter Kelley [EMAIL PROTECTED]
  Reply-To: Tomcat Users List [EMAIL PROTECTED]
  To: Tomcat Users List [EMAIL PROTECTED]
  Subject: Valve Access to Principal
 
  I'm writing a valve to associate a request with a subject using JAAS. To
  do this I need to get access to the userPrincipal from the request or
  the session. Unfortunately the method that sets this association in
  org.apache.catalina.authenticator.AuthenticatorBase gets called AFTER my
  valve meaning that I can't get access to the principal.
 
  My valve is currently defined in a context element in server.xml and I
  can see it on the call stack when I set a breakpoint in
  AuthenticatorBase in the debugger.
 
  Any suggestions as to how I could get the valve to be executed after the
  authenticator ?
 
 
 I've got an idea, but it requires a little background first.
 
 First, let's understand why the behavior you observe actually happens.  As
 the server.xml file is parsed, each Valve element you declare is added
 to the valve pipeline for this webapp.  Among other things, this means
 that you are guaranteed that valves are invoked in the order that you
 declare them.
 
 After server.xml is processed, but before the webapp is made available,
 the start() method of an instance of
 org.apache.catalina.startup.ContextConfig is called to perform any final
 setup needed before the application is enabled.  One of the potential
 setups (see method authenticatorConfig()) is to set up an Authenticator if
 this webapp declared an auth-method in its web.xml file (SIDE NOTE - you
 don't pay any runtime overhead for container managed authentication unless
 you asked for it).  The net effect is that, if you're using container
 managed authentication, the corresponding Authenticator valve is
 automatically added to the pipeline -- but *after* any manually configured
 valves.
 
 So, to meet your requirements, we need a mechanism to ensure that the
 Authenticator is configured into the pipeline *before* your valve is.
 Currently, you can do this if you manually configure it, because
 authenticatorConfig() checks to see if an Authenticator has been
 configured already.  So, you would need to say something like this to
 configure (say) the Authenticator for form-based login ahead of your
 MySubjectValve valve:
 
   Context path=/foo ...
 
 !-- Configure an Authenticator implementation to be used --
 Valve className=org.apache.catalina.authenticator.FormAuthenticator/
 
 !-- Configure your Valve that wants to see the Principal --
 Valve className=com.mycompany.MySubjectValve .../
 
   /Context
 
 A downside of this approach is that you have to configure what login
 method to use in server.xml (the auth-method selected in web.xml
 essentially gets ignored).
 
 An upside of this approach is that you can easily implement and configure
 an Authenticator that supports a login mechanism totally different from
 any of the standard methods defined by the servlet spec.  For example,
 it's feasible to define an Authenticator that interacted with a Project
 Liberty identity server (http://www.projectliberty.org) to enable
 cross-host single sign on support.
 
  --
  Peter Kelley [EMAIL PROTECTED]
  Moveit Pty Ltd
 
 Craig McClanahan
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
-- 
Peter Kelley [EMAIL PROTECTED]
Moveit Pty Ltd


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




Re: Apache vhost + Tomcat sharing the same document root

2003-02-09 Thread Lajos
Hi Chris -

I've seen this situation before, but don't have a way to add vhosts to 
server.xml on the fly. One thing that comes to mind would be to use 
mod_rewrite to (somehow) rewrite a *.jsp URI with some vhost-specific 
info in it that Tomcat can pick up and use to direct to the right 
context. Under this scenario, you would have a single Host block, with 
appBase of /www, but any *.jsp pages would have a prefix of /cust1, 
/cust2, /cust3, etc., depending on the URI. I don't use mod_rewrite 
regularly, so I can't give you the exact syntax. If by chance you figure 
it out, I'd appreciate you letting me know what you did.

Regards,

Lajos


Chris Davies wrote:
Hi,

Ah, thanks. That worked. Actually, this was the first thing I tried, but I
realised I was defining the Host tags inside the localhost one. (Oops :)

Unfortunatly, it still leaves me with a problem. I really don't want to have to
shut down tomcat and restart everytime I add a new user to the system. Tomcat
takes a while to warm up, which is a period when every customer request for a
java application returns 500. mod_webapp allows me to define the context in
httpd.conf, which is pretty handy.

Is there any way I can use mod_jk to have tomcat take it's cue from Apache as to
what context it ought to be in? Alternatively, is there a port I can signal
Tomcat on to reread it's configuration?

Thanks,
C.Davies

Quoting Lajos [EMAIL PROTECTED]:



Hi Chris -

Oops - I realize my mistake. I was thinking something entirely 
different. You should have two Host blocks, one for each vhost, one 
with appBase of /www/cust1 and one with appBase of /www/cust2. Sorry for

leading you the wrong way.

If that still doesn't work, email me your server.xml and httpd.conf
offline.

Regards,


Lajos





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





--



   Lajos Moczar
  
Open Source Support, Consulting and Training
  
Cocoon Developer's Handbook
 (www.amazon.com/exec/obidos/tg/detail/-/0672322579)

   _  _
  / \ /
 /___\  /
/ \   /

 http://www.galatea.com -- powered by AzSSL


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




Re: Valve Access to Principal

2003-02-09 Thread Craig R. McClanahan


On Sun, 10 Feb 2003, Peter Kelley wrote:

 Date: 10 Feb 2003 14:31:23 +1100
 From: Peter Kelley [EMAIL PROTECTED]
 Reply-To: Tomcat Users List [EMAIL PROTECTED]
 To: Tomcat Users List [EMAIL PROTECTED]
 Subject: Re: Valve Access to Principal

 Thanks Craig, this sounds like a much cleaner solution than what I
 eventually tried which was to copy the session grabbing code out of
 AuthenticatorBase and use it to get the required principal.

 The problem I am having now is that JBoss still thinks that the logged
 on user is the last one that logged in from any browser rather than the
 one logged in with the current session. I have run this through the
 debugger and my DoAsValve is getting called with the right principals
 subjects but somehow the JAAS security credentials that get to JBoss
 belong to the user that last logged in. I'm suspecting that the code
 that actually processes the JSP is running on another thread but I
 haven't yet gone down to that level to see.

 Surely someone else has come up against this problem before ?


I'm afraid that I'm a total newbie in terms of understanding how JBoss
decided to integrate Tomcat.  One of the benefits of the Tomcat
architecture is that there are many different options for this.  One of
the disadvantages, though, is that those of us focused on the standalone
Tomcat server don't necessarily have a clue on how it was done in any
particular case :-).

Maybe some questions to the JBoss mailing lists would be in order?

One thing to review, though, is the order in which the valves get
authenticated -- you probably want to ensure that your valve is invoked
before any valves that the JBoss integration adds.

 Does anyone know how this problem is being solved for Tomcat 5 ?


Tomcat 5 has integrated support for JSR 115, but that's for authorization,
not authentication.  At some future point, I'm sure Tomcat will
incorporate the results of JSR 196 (Java Authentication Service Provider
Interface for Containers), but not until that JSR actually has a public
release of its spec -- it has only just gotten underway.

Craig


 On Sat, 2003-02-08 at 18:24, Craig R. McClanahan wrote:
  On Fri, 8 Feb 2003, Peter Kelley wrote:
 
   Date: 08 Feb 2003 17:29:10 +1100
   From: Peter Kelley [EMAIL PROTECTED]
   Reply-To: Tomcat Users List [EMAIL PROTECTED]
   To: Tomcat Users List [EMAIL PROTECTED]
   Subject: Valve Access to Principal
  
   I'm writing a valve to associate a request with a subject using JAAS. To
   do this I need to get access to the userPrincipal from the request or
   the session. Unfortunately the method that sets this association in
   org.apache.catalina.authenticator.AuthenticatorBase gets called AFTER my
   valve meaning that I can't get access to the principal.
  
   My valve is currently defined in a context element in server.xml and I
   can see it on the call stack when I set a breakpoint in
   AuthenticatorBase in the debugger.
  
   Any suggestions as to how I could get the valve to be executed after the
   authenticator ?
  
 
  I've got an idea, but it requires a little background first.
 
  First, let's understand why the behavior you observe actually happens.  As
  the server.xml file is parsed, each Valve element you declare is added
  to the valve pipeline for this webapp.  Among other things, this means
  that you are guaranteed that valves are invoked in the order that you
  declare them.
 
  After server.xml is processed, but before the webapp is made available,
  the start() method of an instance of
  org.apache.catalina.startup.ContextConfig is called to perform any final
  setup needed before the application is enabled.  One of the potential
  setups (see method authenticatorConfig()) is to set up an Authenticator if
  this webapp declared an auth-method in its web.xml file (SIDE NOTE - you
  don't pay any runtime overhead for container managed authentication unless
  you asked for it).  The net effect is that, if you're using container
  managed authentication, the corresponding Authenticator valve is
  automatically added to the pipeline -- but *after* any manually configured
  valves.
 
  So, to meet your requirements, we need a mechanism to ensure that the
  Authenticator is configured into the pipeline *before* your valve is.
  Currently, you can do this if you manually configure it, because
  authenticatorConfig() checks to see if an Authenticator has been
  configured already.  So, you would need to say something like this to
  configure (say) the Authenticator for form-based login ahead of your
  MySubjectValve valve:
 
Context path=/foo ...
 
  !-- Configure an Authenticator implementation to be used --
  Valve className=org.apache.catalina.authenticator.FormAuthenticator/
 
  !-- Configure your Valve that wants to see the Principal --
  Valve className=com.mycompany.MySubjectValve .../
 
/Context
 
  A downside of this approach is that you have to configure what login
  method to use in server.xml (the 

Re: exception after several hours idle

2003-02-09 Thread Peng Tuck Kwok
Could you check and see if your database terminates connections after a 
certain amount of inactivity ? If so you can try and increase the 
duration. Might be worth a shot.

Vladimir Kirillov wrote:
Why do you suspect that it is a problem with the database connection?


First there was an exception from JDBC driver that I use. I set conntection
timeout.
But there is a porblem somewhere else.



Can you determine if you are running out of disk space somewhere?  Or
perhaps you are trying to safe a file to a location where you don't have
sufficient permissions to do so.  Or perhaps you are trying to load a file
that does not exist?


If I was trying to load non-existing file, I would get this exception any
time.
It appeares only after several hours of running idle.

Regards,

Vladimir Kirillov




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




IIS+Tomcat security constraint = Unauthorized: Logon Failed

2003-02-09 Thread Felipe Crochik
I am trying to use the tomcat security constraints behind an IIS web
server. I know tomcat and the ISAPI filter are working. Also, Tomcat
authorization is working bypassing IIS using port 8080.
 
When I try to reach the exactly same application through IIS (port 80) I
get the user validation dialog box and after I try to login with a valid
user and password I get HTTP 401.1 - Unauthorized: Logon Failed.
 
TIA,
Felipe



Re: Valve Access to Principal

2003-02-09 Thread Peter Kelley
I think you misunderstand my question, I want to run Tomcat standalone.
The problem I have is that the JAAS credentials don't seem to be being
associated with the thread that is running my JSP. The fact that JBoss
is on the other end is probably irrelevant, the same problem would occur
no matter what was being called.

I'm happy to help and contribute whatever code gets written but I need
to know where would be the best place to do the security association.
Putting the association in a valve doesn't seem to be working, somehow
the association is being broken by the time the JSP code is called. Can
you provide any guidance on where the best place to do the security
association might be ?

On Mon, 2003-02-10 at 14:58, Craig R. McClanahan wrote:
 On Sun, 10 Feb 2003, Peter Kelley wrote:
 
  Date: 10 Feb 2003 14:31:23 +1100
  From: Peter Kelley [EMAIL PROTECTED]
  Reply-To: Tomcat Users List [EMAIL PROTECTED]
  To: Tomcat Users List [EMAIL PROTECTED]
  Subject: Re: Valve Access to Principal
 
  Thanks Craig, this sounds like a much cleaner solution than what I
  eventually tried which was to copy the session grabbing code out of
  AuthenticatorBase and use it to get the required principal.
 
  The problem I am having now is that JBoss still thinks that the logged
  on user is the last one that logged in from any browser rather than the
  one logged in with the current session. I have run this through the
  debugger and my DoAsValve is getting called with the right principals
  subjects but somehow the JAAS security credentials that get to JBoss
  belong to the user that last logged in. I'm suspecting that the code
  that actually processes the JSP is running on another thread but I
  haven't yet gone down to that level to see.
 
  Surely someone else has come up against this problem before ?
 
 
 I'm afraid that I'm a total newbie in terms of understanding how JBoss
 decided to integrate Tomcat.  One of the benefits of the Tomcat
 architecture is that there are many different options for this.  One of
 the disadvantages, though, is that those of us focused on the standalone
 Tomcat server don't necessarily have a clue on how it was done in any
 particular case :-).
 
 Maybe some questions to the JBoss mailing lists would be in order?
 
 One thing to review, though, is the order in which the valves get
 authenticated -- you probably want to ensure that your valve is invoked
 before any valves that the JBoss integration adds.
 
  Does anyone know how this problem is being solved for Tomcat 5 ?
 
 
 Tomcat 5 has integrated support for JSR 115, but that's for authorization,
 not authentication.  At some future point, I'm sure Tomcat will
 incorporate the results of JSR 196 (Java Authentication Service Provider
 Interface for Containers), but not until that JSR actually has a public
 release of its spec -- it has only just gotten underway.
 
 Craig
 
 
  On Sat, 2003-02-08 at 18:24, Craig R. McClanahan wrote:
   On Fri, 8 Feb 2003, Peter Kelley wrote:
  
Date: 08 Feb 2003 17:29:10 +1100
From: Peter Kelley [EMAIL PROTECTED]
Reply-To: Tomcat Users List [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Subject: Valve Access to Principal
   
I'm writing a valve to associate a request with a subject using JAAS. To
do this I need to get access to the userPrincipal from the request or
the session. Unfortunately the method that sets this association in
org.apache.catalina.authenticator.AuthenticatorBase gets called AFTER my
valve meaning that I can't get access to the principal.
   
My valve is currently defined in a context element in server.xml and I
can see it on the call stack when I set a breakpoint in
AuthenticatorBase in the debugger.
   
Any suggestions as to how I could get the valve to be executed after the
authenticator ?
   
  
   I've got an idea, but it requires a little background first.
  
   First, let's understand why the behavior you observe actually happens.  As
   the server.xml file is parsed, each Valve element you declare is added
   to the valve pipeline for this webapp.  Among other things, this means
   that you are guaranteed that valves are invoked in the order that you
   declare them.
  
   After server.xml is processed, but before the webapp is made available,
   the start() method of an instance of
   org.apache.catalina.startup.ContextConfig is called to perform any final
   setup needed before the application is enabled.  One of the potential
   setups (see method authenticatorConfig()) is to set up an Authenticator if
   this webapp declared an auth-method in its web.xml file (SIDE NOTE - you
   don't pay any runtime overhead for container managed authentication unless
   you asked for it).  The net effect is that, if you're using container
   managed authentication, the corresponding Authenticator valve is
   automatically added to the pipeline -- but *after* any manually configured
   valves.
  
   So, to meet your 

Re: Valve Access to Principal

2003-02-09 Thread Craig R. McClanahan


On Sun, 10 Feb 2003, Peter Kelley wrote:

 Date: 10 Feb 2003 16:12:36 +1100
 From: Peter Kelley [EMAIL PROTECTED]
 To: Tomcat Users List [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Subject: Re: Valve Access to Principal

 I think you misunderstand my question, I want to run Tomcat standalone.
 The problem I have is that the JAAS credentials don't seem to be being
 associated with the thread that is running my JSP. The fact that JBoss
 is on the other end is probably irrelevant, the same problem would occur
 no matter what was being called.


No, it is *absolutely* relevant, because your complaint is that *JBoss*,
not Tomcat, is not seeing the Principal you think it should.

 I'm happy to help and contribute whatever code gets written but I need
 to know where would be the best place to do the security association.
 Putting the association in a valve doesn't seem to be working, somehow
 the association is being broken by the time the JSP code is called. Can
 you provide any guidance on where the best place to do the security
 association might be ?


Show me a scenario that fails in standalone Tomcat and we can talk.  If
the problem shows up only in Tomcat+JBoss, go talk to whoever built that
integration.

Craig


 On Mon, 2003-02-10 at 14:58, Craig R. McClanahan wrote:
  On Sun, 10 Feb 2003, Peter Kelley wrote:
 
   Date: 10 Feb 2003 14:31:23 +1100
   From: Peter Kelley [EMAIL PROTECTED]
   Reply-To: Tomcat Users List [EMAIL PROTECTED]
   To: Tomcat Users List [EMAIL PROTECTED]
   Subject: Re: Valve Access to Principal
  
   Thanks Craig, this sounds like a much cleaner solution than what I
   eventually tried which was to copy the session grabbing code out of
   AuthenticatorBase and use it to get the required principal.
  
   The problem I am having now is that JBoss still thinks that the logged
   on user is the last one that logged in from any browser rather than the
   one logged in with the current session. I have run this through the
   debugger and my DoAsValve is getting called with the right principals
   subjects but somehow the JAAS security credentials that get to JBoss
   belong to the user that last logged in. I'm suspecting that the code
   that actually processes the JSP is running on another thread but I
   haven't yet gone down to that level to see.
  
   Surely someone else has come up against this problem before ?
  
 
  I'm afraid that I'm a total newbie in terms of understanding how JBoss
  decided to integrate Tomcat.  One of the benefits of the Tomcat
  architecture is that there are many different options for this.  One of
  the disadvantages, though, is that those of us focused on the standalone
  Tomcat server don't necessarily have a clue on how it was done in any
  particular case :-).
 
  Maybe some questions to the JBoss mailing lists would be in order?
 
  One thing to review, though, is the order in which the valves get
  authenticated -- you probably want to ensure that your valve is invoked
  before any valves that the JBoss integration adds.
 
   Does anyone know how this problem is being solved for Tomcat 5 ?
  
 
  Tomcat 5 has integrated support for JSR 115, but that's for authorization,
  not authentication.  At some future point, I'm sure Tomcat will
  incorporate the results of JSR 196 (Java Authentication Service Provider
  Interface for Containers), but not until that JSR actually has a public
  release of its spec -- it has only just gotten underway.
 
  Craig
 
 
   On Sat, 2003-02-08 at 18:24, Craig R. McClanahan wrote:
On Fri, 8 Feb 2003, Peter Kelley wrote:
   
 Date: 08 Feb 2003 17:29:10 +1100
 From: Peter Kelley [EMAIL PROTECTED]
 Reply-To: Tomcat Users List [EMAIL PROTECTED]
 To: Tomcat Users List [EMAIL PROTECTED]
 Subject: Valve Access to Principal

 I'm writing a valve to associate a request with a subject using JAAS. To
 do this I need to get access to the userPrincipal from the request or
 the session. Unfortunately the method that sets this association in
 org.apache.catalina.authenticator.AuthenticatorBase gets called AFTER my
 valve meaning that I can't get access to the principal.

 My valve is currently defined in a context element in server.xml and I
 can see it on the call stack when I set a breakpoint in
 AuthenticatorBase in the debugger.

 Any suggestions as to how I could get the valve to be executed after the
 authenticator ?

   
I've got an idea, but it requires a little background first.
   
First, let's understand why the behavior you observe actually happens.  As
the server.xml file is parsed, each Valve element you declare is added
to the valve pipeline for this webapp.  Among other things, this means
that you are guaranteed that valves are invoked in the order that you
declare them.
   
After server.xml is processed, but before the webapp is made available,
the start() method of an instance of

Re: Valve Access to Principal

2003-02-09 Thread Peter Kelley
OK I'm still not sure we are talking on the same page so please bear
with me whilst I attempt to restate what is happening.

Tomcat 4.1.18 running in JDK 1.4
JBoss 3.0.3 running in JDK 1.3

Tomcat is running standalone in a seperate JVM to JBoss.
Both Tomcat and JBoss are running on the same machine (although this
configuration means that they could be running on seperate machines).

Tomcat is running the JAAS login module and running a web application
that is making standard RMI calls to EJB's that are running on the JBoss
server.

The way that JBoss (and other JAAS enabled servers) determine who is
calling them is by looking at the JAAS Subject associated with the
calling thread. If Tomcat is using a pool of threads to service requests
from web clients then it stands to reason that at some point in the
invocation of the JSP code that there needs to be an association made
between the thread that is performing the work and the JAAS subject
which tells JBoss who is calling the EJB.

This is a direct parallel to the code in AuthenticatorBase that gets the
Principal out of the user's session and sets the request up so that
calls to getUserPrincipal() return the correct value.

I have modified the realm so that it caches the JAAS security
credentials when a log in is performed and indexes it by the user name.
When a request comes in the valve I have written looks up the principal
from the user's session, gets the name, looks up the cached subject then
makes a Subject.doAs() call that calls the invoke method on the valve
context so the rest of the pipeline is executed with the right JAAS
security association.

All of this seems to be working in the debugger correctly. The problem
is that the JAAS security association that I am doing seems to be with
the wrong thread or something because by the time JBoss sees it the
subject is the one of the user who most recently logged in.

I'm going to have to dig deeper into the Tomcat internals to figure this
out but some pointers on how JSP code is invoked in Tomcat would be
extremely helpful.

Sorry to labour the point but I really think that if this is an issue
with the way that Tomcat associates user sessions with JAAS credentials
then someone will have to solve this problem before Tomcat 5 ships and
since we have the problem it might as well be me. All I need is some
suggestions about where the best place to put the code would be. 

On Mon, 2003-02-10 at 16:31, Craig R. McClanahan wrote:
 On Sun, 10 Feb 2003, Peter Kelley wrote:
 
  Date: 10 Feb 2003 16:12:36 +1100
  From: Peter Kelley [EMAIL PROTECTED]
  To: Tomcat Users List [EMAIL PROTECTED]
  Cc: [EMAIL PROTECTED]
  Subject: Re: Valve Access to Principal
 
  I think you misunderstand my question, I want to run Tomcat
standalone.
  The problem I have is that the JAAS credentials don't seem to be
being
  associated with the thread that is running my JSP. The fact that
JBoss
  is on the other end is probably irrelevant, the same problem would
occur
  no matter what was being called.
 
 
 No, it is *absolutely* relevant, because your complaint is that
*JBoss*,
 not Tomcat, is not seeing the Principal you think it should.
 
  I'm happy to help and contribute whatever code gets written but I
need
  to know where would be the best place to do the security
association.
  Putting the association in a valve doesn't seem to be working,
somehow
  the association is being broken by the time the JSP code is called.
Can
  you provide any guidance on where the best place to do the security
  association might be ?
 
 
 Show me a scenario that fails in standalone Tomcat and we can talk. 
If
 the problem shows up only in Tomcat+JBoss, go talk to whoever built
that
 integration.
 
 Craig
 
-- 
Peter Kelley [EMAIL PROTECTED]
Moveit Pty Ltd


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




Re: Valve Access to Principal

2003-02-09 Thread Peter Kelley
On Mon, 2003-02-10 at 17:22, Peter Kelley wrote:

 All of this seems to be working in the debugger correctly. The problem
 is that the JAAS security association that I am doing seems to be with
 the wrong thread or something because by the time JBoss sees it the
 subject is the one of the user who most recently logged in.
 

I tell a lie, setting a breakpoint in the JSP code shows the valve on
the method call stack. Must be a bug in the JAAS association code.

-- 
Peter Kelley [EMAIL PROTECTED]
Moveit Pty Ltd


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




Re: Valve Access to Principal

2003-02-09 Thread Craig R. McClanahan


On Sun, 10 Feb 2003, Peter Kelley wrote:

 Date: 10 Feb 2003 17:22:53 +1100
 From: Peter Kelley [EMAIL PROTECTED]
 Reply-To: Tomcat Users List [EMAIL PROTECTED]
 To: Tomcat Users List [EMAIL PROTECTED]
 Subject: Re: Valve Access to Principal

 OK I'm still not sure we are talking on the same page so please bear
 with me whilst I attempt to restate what is happening.

 Tomcat 4.1.18 running in JDK 1.4
 JBoss 3.0.3 running in JDK 1.3

 Tomcat is running standalone in a seperate JVM to JBoss.
 Both Tomcat and JBoss are running on the same machine (although this
 configuration means that they could be running on seperate machines).

 Tomcat is running the JAAS login module and running a web application
 that is making standard RMI calls to EJB's that are running on the JBoss
 server.


You seem to be assuming that Tomcat knows how to propogate the security
identity.  It does not -- standalone Tomcat doesn't store Subjects or
Principals on a per-thread basis at all (it only caches them in the
session if there is one), and doesn't support propogation of security
identity across JVMs under any circumstances.  Any such features in the
JBoss+Tomcat integration were implemented by JBoss folks, so you need to
ask them for help in understanding what is going wrong in your scenario.

Craig

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




Re: mod_jk2 and apache13

2003-02-09 Thread Bill Barker

liug [EMAIL PROTECTED] wrote in message
b24kvg$7ku$[EMAIL PROTECTED]">news:b24kvg$7ku$[EMAIL PROTECTED]...
 mod_jk2 (tomcat 4.1.18) seems to compile fine with apache13,
 but only mod_jk2.so is generated. There is no libjkjni.so.
 Is that a problem? Is libjkjni.so really needed? The mod_jk2
 works fine without it in my test.

 BTW, what is this jni thing in the jk2 connector? I understand
 we already have TCP/IP Socket and Unix domain Socket. is jni
 a third connection type? What's the benefit?

With the JNI channel, Apache and Tomcat share the same memory space.  So the
cost of passing off the data between the two should be cheaper (at least in
theory).

There are people on the list that love using JNI with Apache 1.3.  I've
never understood why, so I'll let them answer.  As I understand it, the JNI
channel works best with a multi-threaded server like IIS, iPlanet, or Apache
2 (with the 'worker' MPM).  As I said before, I don't see the advantages to
using it with a 'pre-fork' server like Apache 1.3.


 Thanks!




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




Re: deploying simple servlet

2003-02-09 Thread Bill Barker

colin diggensworth [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...

 Hi, I am running Tomcat version 4.1 with JDK1.3.1 onWin98. I can run all
the Tomcat examples servlets no problem. I am trying to run a simple
servlet. I do the following:

 (1)Write a simple Servlet called HelloWorld

 (2)I compile the servlet and put it in under webapps/Root/Web-Inf/classes.

 (3)I start Tomcat. My understanding is that Tomcat finds any new servlet
classes automatically - I could be wrong here.


You are wrong here if your version is = 4.1.12.

 (4) I type the following URL in my Web browser
http://localhost:8080/servlet/HelloWorld I get the http 404 resource not
found error message.

 I would like to know

 (1) Is there anything else I have to do so that Tomcat knows that there is
a new Servlet - update some .xml file or something


You could enable the Invoker for your webapp, or, better, define the
servlet-mapping yourself in your web.xml.  See the release notes.

 (2) Is there anyway I can make check to see what Servlets Tomcat has
loaded?

With some JVMs (notibly IBM's) this is possible.  With others it is not (at
least for TC = 4.1).


 (3) Is there anything else I have to do to make sure the webbrowser can
see the servlet?

 Remember I can access all example servlet without a problem so I am
confident my references to JDK etc. which Tomcat must have are all okay.
Many Thanks CD


The 'examples' webapp enables the Invoker servlet.  Use that web.xml file as
an example if you want to go this route.



 -
 Do you Yahoo!?
 Yahoo! Mail Plus - Powerful. Affordable. Sign up now




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




Re: DEPLOY Command

2003-02-09 Thread Bill Barker
I seem to remember that there were some recent changes that may fix this,
but it is hard to know without knowing which Tomcat version you are running.

Alberto Magalhaes [EMAIL PROTECTED] wrote in message
001701c2cfc4$2a35e530$353216d5@aacm">news:001701c2cfc4$2a35e530$353216d5@aacm...
Hi,
why when i try to make:
http://127.0.0.1:8080/manager/deploy?path=/examples,
it gives an error:

FAIL - Unknown command /deploy

Thanks
AAM






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




Unsubscription not working

2003-02-09 Thread Naba Kumar
Hi,

 To unsubscribe, e-mail: [EMAIL PROTECTED]
 
I have been trying to unsubscribe from the list but it doesn't work. I
have already sent many unsubscribe emails to the above address (subject:
unsubscribe, body: unsubscribe) and none of them worked.

Please someone from the admins unsubscribe me from the list.

Thanks a lot.

-- 
Regards,
-Naba


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




Tomcat Monitoring

2003-02-09 Thread pavel
Hello,
Please could anybody tell me how to monitor whether tomcat is running. I 
am using for load testing JMeter which sends requests. Is there 
something like that which would also send requests for example each 5 
min and in case of problem, an email would be sent to the administrator. 
Or is there something on tomcat (server) side that would monitor tomcat 
and send email to the administrator?

Thank you in advance.

Pavel Kusch


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