RE: RewriteRules and Standalone Tomcat

2003-01-09 Thread neal
Actually,

I always thought this was a requirement anyway.  I mean it makes perfect
sense that you have an index.html or index.jsp as a default page for any
given directory ... including the root directory.  So, I would actually
expect that sort of behavior.  I think you're right - this is how most other
web servers currently work.

As for breaking existing applications, i see your point but at least there's
a solution there ... to place the welcome file into the correct directory
position.  Otherwise, there is no solution to the redirect problem.


-Original Message-
From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 08, 2003 11:52 PM
To: Tomcat Users List
Subject: RE: RewriteRules and Standalone Tomcat




On Wed, 8 Jan 2003, neal wrote:

 Date: Wed, 8 Jan 2003 23:38:13 -0800
 From: neal [EMAIL PROTECTED]
 Reply-To: Tomcat Users List [EMAIL PROTECTED]
 To: Tomcat Users List [EMAIL PROTECTED]
 Subject: RE: RewriteRules and Standalone Tomcat

 In you previous email you say:

 This still screws up relative references for people that use wierd
welcome
 file paths like 'foo/bar.html', but will work for the majority.

 What do you mean by wierd  welcome file paths.

Consider the following entry in a web.xml file:

  welcome-file-list
welcome-filefoo/bar.html/welcome-file
  /welcome-file-list

If we change Tomcat to forwarding to the welcome file, relative references
in the bar.html page will still be broken (because they are resolved by
the browser, not the server).

For the typical case:

  welcome-file-list
welcome-fileindex.html/welcome-file
  /welcome-file-list

The proposed solution (if there's no trailing slash, redirect to the
original URL + /, otherwise forward) will work, and this is by far the
most common case -- but the change is still going to break existing
applications for some existing users.

 Will most relative paths
 still work?   Is this the same sort of relative file path issues I would
see
 if I forwarded (rather than redirect) from one JSP to another?  If so,
 wouldn't this only be an issue if the welcome file was located somewhere
 other than the root of the application?


Nothing in this discussion about welcome files has *any* impact on the way
that relative URLs work in non-welcome pages.  Even if we change the
behavior of welcome files, they will continue to work the way they work
today.

The key to understanding what's going on is the following:

* It is the *browser* that resolves relative URIs, not the server.

* The *browser* resolves relative URIs against the URL showing
  in the location bar (unless you use a base element, which is
  pretty unusual).

* A redirect changes the URL showing in the location bar,
  but a forward does not.

The current behavior (redirect always) was done because, for Tomcat 3.0
and 3.1 (which did forwarding instead), a very FAQ question on TOMCAT-USER
was why can't I use a relative URI in my welcome pages.  This problem,
of course, went away when we switched to redirect always, and has been
the way that Tomcat has worked for the last several years.

Given that users are going to complain no matter what the behavior is, the
right answer is to find a balance that works the best for the most.  The
proposed solution (redirect to a URL with a trailing slash, or forward if
there already is one) seems like a good candidate to meet that goal.

By the way, Tomcat gets 80,000-120,000 downloads every single month
(bigger numbers in the months when there are big new releases).  I guess
there are at least a few people in the world who think Tomcat is still
commercially viable, in spite of what you consider a fatal flaw :-).

Guess I won't be trusting *your* judgement on which server to use for my
next application.  :-)


 Neal


Craig



 -Original Message-
 From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, January 08, 2003 11:24 PM
 To: Tomcat Users List
 Subject: RE: RewriteRules and Standalone Tomcat




 On Wed, 8 Jan 2003, neal wrote:

  Date: Wed, 8 Jan 2003 23:11:44 -0800
  From: neal [EMAIL PROTECTED]
  Reply-To: Tomcat Users List [EMAIL PROTECTED]
  To: Tomcat Users List [EMAIL PROTECTED]
  Subject: RE: RewriteRules and Standalone Tomcat
 
  So, in this scenario .. if a url without a directory is given and
without
 a
  trailign slash, the redirect would not occur?   That would fix this
issue.
  I could certainly get behind that.  :)
 

 You will change that opinion as soon as you realize that relative URIs in
 your welcome pages do not work any more :-).

 
  if the final element of the path is a directory (or a context)
without
 a
  trailing
  slash, redirect to the same path with a trailing slash.  But if the path
  is given with a trailing slash, forward to the welcome file.
 

 This is the right answer, IMHO.

 It also includes the use case where you just say:

   http://www.mycompany.com

 which is (essentially) a request for the welcome file of the top-level
 directory of the 

RE: RewriteRules and Standalone Tomcat

2003-01-09 Thread Noel J. Bergman
 I've deployed an app using Tomcat Standalone (www.hotel.us) and while
there
 have been several issues that were a little less than obvious, I have
found
 a solution to every single one of them and am overall pretty satisfied
with
 tomcat.  but this one little thing would force me to have to go to apache.

As has been said, try Matt Parker's patch.  It should work the way that
Craig mentioned, and Tomcat 5 should also work that way from what I read.

 1. A comparison was made - using tomcat as a web server is like racing a
mac
 truck.

Yeah, that'd be my stated opinion, and I'm sure that someone will disagree
with it.  As far as I'm concerned, for many applications Tomcat Standalone
is like flying cotton canvas sails on a beautiful ACC sloop.  Yeah, you'll
get somewhere, but I'll take Kevlar any time.  Note that in this metaphor,
Tomcat is a beautiful ACC sloop (nicer imagery than a Mack truck), but the
built-in web server (cotton canvas) still isn't the equal of Apache
(Kevlar).  If you want the most out of your boat, you equip it properly.

 If this sort of issue is defended by the community (302s etc)
 then there should be a blatant disclaimer when downloading
 the standalone that it is not intended for production use.

I have no idea whether the Tomcat developers actually consider the built-in
web server to be production quality or not.  It really would depend upon
what you demanded of it.  Personally, I'd never use it except for
prototyping.  Even for a Web service server, I might want the load balancing
option provided by a front-end server.  But, again, that's my personal
opinion.  YMMV.  And, once again, since you have a published fix for the
problem, I can't see that this is redirect v forward issue should continue
to be viewed as an issue.

--- Noel


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




Re: Solaris Authentication

2003-01-09 Thread John Holman
If the Solaris usernames and passwords are held in an LDAP directory you 
should be able to use the JNDI Realm. You would need to supplement the 
Solaris user info with role information in the same directory.

I don't know of a documented method for connecting to other approaches 
(e.g. local files (/etc/password + /etc/shadow, NIS, etc). In some cases 
it *might* be possible to use the JAAS realm with a suitable security 
provider, or you could write your own Tomcat realm. Using local files is 
likely to be difficult because Tomcat should not be run as root for 
security reasons, yet you need to be root to access /etc/shadow.

John


Khadbai, Abdul (ANTS) wrote:

Hi

Is there any way that tomcat can hook into the solaris user names and
passwords rather than creating a new database with
passwords and usernames i.e in a way which weblogic can use NT
authentication ?

Please let me know.

Many Thanks

Abdul Khadbai







***
This communication (including any attachments) contains confidential information.  If you are not the intended recipient and you have received this communication in error, you should destroy it without copying, disclosing or otherwise using its contents.  Please notify the sender immediately of the error.

Internet communications are not necessarily secure and may be intercepted or changed after they are sent.  Abbey National Treasury Services plc does not accept liability for any loss you may suffer as a result of interception or any liability for such changes.  If you wish to confirm the origin or content of this communication, please contact the sender by using an alternative means of communication.

This communication does not create or modify any contract and, unless otherwise stated, is not intended to be contractually binding.

Abbey National Treasury Services plc. Registered Office:  Abbey National House, 2 Triton Square, Regents Place, London NW1 3AN.  Registered in England under Company Registration Number: 2338548.  Regulated by the Financial Services Authority (FSA).
***


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

 



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




Evaluating jsp inside java

2003-01-09 Thread Rami Ojares
Hi

I am building tag reevaluate which takes it's
bodycontent and evaluates it as jsp.

Ex.
reevaluate
getSomeDataThatHappensToBeArbitratyJSPWithTagsAndAll /
/reevaluate

So in doEndTag() I get the body content and would like to have a method
like this

String Jasper.evaluate(String arbitraryJsp, ServletContext sameContext)

Because I could not decipher Jasper's logic well enough I tried also
writing body content to temporary file and then including that jsp file
with RequestDispatcher. But that also gives me error that getOutputStream has already 
been
called.

I even tried to implement my own HttpServletResponse that just stores in StringBuffer
everything that is written to it but that gives some obscure errors too.

Any ideas/knowledge?

- rami


Not retrieving home made trusted certificates

2003-01-09 Thread Christophe Sebille
Hi,

  The aim is to use a server ( Tomcat ) to authenticate web users thanks to
their certificate.

  I've imported with keytool trusted certificates made by OpenSsl when
Iuse -list option I have for each certificate a 'trustedCertEntry'
indication ( the CA certificate have been imported with -trustcacerts
option ). It seems Ok.

  So I run Tomcat with -Djavax.net.debug=all option. No certificate is
prompted. I tried the -genkey method, the key is seen at jvm starting but at
handshake with the client I have a 'Could not find trusted certificate'
fatal, description = certificate_unknown ( I understand that because client
certificate and generated key don't match ).

  I don't know where I'm wrong, maybe it's in Tomcat's configuration. I'd
like to know what's prompted where everythiing runs well.

Thanks in advance,

Christophe


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




RE: RewriteRules and Standalone Tomcat

2003-01-09 Thread Turner, John

I would disagree 100%.  You're assuming that priority one for any commercial
use of Tomcat is maximizing search engine placement for a given URL.  I
would be surprised if, out of all the people using Tomcat in a commercial
situation, that was priority one for more than .1% or so.

We're selling our applications like crazy, which use Tomcat, but then again,
we use Apache as a rule for things on port 80.  As far as we're concerned,
Tomcat is perfect.

John

-Original Message-
From: neal [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, January 09, 2003 2:18 AM
To: Tomcat Users List
Subject: RE: RewriteRules and Standalone Tomcat


Well, a few things come to mind.

1. A comparison was made - using tomcat as a web server is like racing a mac
truck.  Well, for someone new to tomcat and apache (I just arrived from
microsoft/iis land) the correct usage pattern was less than obvious ... I
just knew that most people used tomcat/apache.  I could have never
anticipated this sort of issue.  If this sort of issue is defended by the
community (302s etc) then there should be a blatant disclaimer when
downloading the standalone that it is not intended for production use.

2. As to teh chicken and egg analogy - that's a good point - does theory or
an unfortunate reality dictate the direction of the product? I guess I
would defer to point #1.  If the product is not going to address the very
real issues of production use, it should make it clear to users that it is
not indended for production use.  Granted the ideal is to sluff off such
petty and rediculous issues put forth by the search engine defenses, but at
the end of that argument the issue still exists as does the sobering fact
that this will be a significant problem for anyone who chooses to deploy a
commercial application using the product.

neal


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.434 / Virus Database: 243 - Release Date: 12/25/2002
 

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




Virtual hosting and mod_jk

2003-01-09 Thread Andreas Hirner
Hello,

I have successfully integrated tomcat (4.0.6) with apache (1.3.26) on linux
and I am able to access a single virtual host (e.g. myapplication) located
in the tomcat/webapps/myapplication directory using a url like that:

http://www.mydomain.com/myapplication/index.jsp

However I would like to be able to access the files in that directory
without using the path /myapplication, i.e.

http://www.mydomain.com/index.jsp

I have been playing around with the configuration files but I have not been
able to alter the configuration according to my needs. Does anybody know if
this is possible?

Thanks in advance.

Andreas

PS: The relevant sections of httpd.conf and server.xml are listed below.


http.conf
#
VirtualHost *:80
   ServerName meinfotoalbum.com
   ServerAlias www.meinfotoalbum.com

   DocumentRoot /usr/local/tomcat/mywebapps/meinfoto
   Directory /usr/local/tomcat/mywebapps/meinfoto
 DirectoryIndex index.htm index.html
Options Indexes FollowSymLinks
   /Directory

#mod_jk link to tomcat
   JkMount / ajp13
   JkMount /*jsp ajp13

   #prohibit access of WEB-INF
Location /WEB-INF/
AllowOverride None
deny from all
   /Location

#prohibit access of META-INF
   Location /META-INF/
  AllowOverride None
   deny from all
   /Location

   /VirtualHost

server.xml

  Host name=meinfotoalbum.com debug=0 appBase=mywebapps
unpackWARs=true
Aliaswww.meinfotoalbum.com/Alias
Logger className=org.apache.catalina.logger.FileLogger
directory=logs prefix=meinfotoalbum_log. suffix=.txt
timestamp=true /
Context path= docBase=meinfoto debug=0 reloadable=false/
Listener className=org.apache.ajp.tomcat4.config.ApacheConfig
append=true  /
   /Host




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




RE: RewriteRules and Standalone Tomcat

2003-01-09 Thread Ralph Einfeldt
Me too.

Especially if the solution is sooo simple:

Just submit the url with the path to the 
welcome file to the searchenengines and 
most of them will be happy with that.

 -Original Message-
 From: Turner, John [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, January 09, 2003 11:32 AM
 To: 'Tomcat Users List'
 Subject: RE: RewriteRules and Standalone Tomcat
 
 I would disagree 100%.  You're assuming that 
 priority one for any commercial use of Tomcat 
 is maximizing search engine placement for a 
 given URL.


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




RE: Help with Tomcat 4.1 installation please?

2003-01-09 Thread Turner, John

Looks like you have something else on that port, probably Tomcat itself.

Perhaps my Windows XP HOWTO can help (you can ignore the sections on
Installing Apache and Installing JK) and just use the section on installing
Tomcat.

http://www.johnturner.com/howto

John


-Original Message-
From: Mark [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, January 09, 2003 1:48 AM
To: [EMAIL PROTECTED]
Subject: Help with Tomcat 4.1 installation please?


Hi, I am attempting to install and run Tomcat 4.1 on my Windows XP system.
I have followed the instructions as far as:
  1. Downloading and installing J2SDK 1.4.1_01
  2. Setting the CATALINA_HOME variable to c:\Program Files\Apache
Group\Tomcat 4.1
  3. Setting the JAVA_HOME variable to c:\j2sdk1.4.1_01
  4. Including %JAVA_HOME%\bin in the PATH variable.
  5. Restarting the computer.

Problem: When I click on the Start Tomcat icon, a window appears, a listing
appears briefly in the window and then the window quickly disappears.

At the command prompt, I get the following listing for the startup command
and the shutdown commands:

C:\Program Files\Apache Group\Tomcat 4.1\binstartup
Using CATALINA_BASE:   c:\Program Files\Apache Group\Tomcat 4.1
Using CATALINA_HOME:   c:\Program Files\Apache Group\Tomcat 4.1
Using CATALINA_TMPDIR: c:\Program Files\Apache Group\Tomcat 4.1\temp
Using JAVA_HOME:   c:\j2sdk1.4.1_01

C:\Program Files\Apache Group\Tomcat 4.1\binshutdown
Using CATALINA_BASE:   c:\Program Files\Apache Group\Tomcat 4.1
Using CATALINA_HOME:   c:\Program Files\Apache Group\Tomcat 4.1
Using CATALINA_TMPDIR: c:\Program Files\Apache Group\Tomcat 4.1\temp
Using JAVA_HOME:   c:\j2sdk1.4.1_01
Catalina.stop: java.net.ConnectException: Connection refused: connect
java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:305)
at
java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:171)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:158)
at java.net.Socket.connect(Socket.java:426)
at java.net.Socket.connect(Socket.java:376)
at java.net.Socket.init(Socket.java:291)
at java.net.Socket.init(Socket.java:119)
at org.apache.catalina.startup.Catalina.stop(Catalina.java:581)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:402)
at org.apache.catalina.startup.Catalina.process(Catalina.java:180)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203)
C:\Program Files\Apache Group\Tomcat 4.1\bin

I'm not sure what's really supposed to happen at this point, but something
doesn't seem right.  Any help would be greatly appreciated. Thanks in
advance.

Mark Steere
[EMAIL PROTECTED]

---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.434 / Virus Database: 243 - Release Date: 12/25/2002
 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.434 / Virus Database: 243 - Release Date: 12/25/2002
 

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




Re: HTTPS to HTTP

2003-01-09 Thread John Holman


Ralph Einfeldt wrote:


Anybody who can listen to your traffic, can hijack 
a session. He just has to create a request with the 
same sessionid (either as cookie or in the url).

So after you go back from https to http you open 
the session to an attacker.

The risks that are involved with that, depends on the 
application.

I think it would be useful to be able to configure Tomcat to use the 
same session id when downgrading from https to http. This caters for the 
case where an application really does not have significant security 
requirements - the login is needed only to identify the user so that e.g 
their non-confidential preferences can be applied and it does not matter 
that others might masquerade as that user. In that case the session may 
as well be conducted in http (e.g. for performance reasons). However the 
password itself should always be hidden using https, because it is 
likely that the user will employ that same password for other 
applications where security *is* important.

Note that when there are risks with the application there should be no 
http access at all - that's easy enough to arrange.

John


 

-Original Message-
From: David Hemingway [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 09, 2003 7:59 AM
To: Tomcat Users List
Subject: HTTPS to HTTP


2 Does this open up a huge security hole that I am 
   

not seeing. I have heard things about session hijacking?

Many thanks
regards,

Dave

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

 



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




Resource issues

2003-01-09 Thread David Durst
I am going through the JNDI Datasource example and attempting to apply it
to my situation.

here is the following config in my server.xml

Resource name=jdbc/mydb auth=Container type=javax.sql.Datasource/
ResourceParams name=jdbc/mydb

parameternamefactory/namevalueorg.apache.commons.dbcp.BasicDataSourceFactory/value/parameter
parameternamemaxActive/namevalue100/value/parameter
parameternamemaxIdle/namevalue5/value/parameter
parameternamemaxWait/namevalue-1/value/parameter
parameternameusername/namevalueYEAHRIGHT/value/parameter
parameternamepassword/namevalueNOSORRY/value/parameter

parameternamedriverClassName/namevalueorg.postgresql.Driver/value/parameter

parameternameurl/namevaluejdbc:postgresql://127.0.0.1:5432/larco/value/parameter
/ResourceParams

I add the following to my web.xml:

resource-ref
  descriptionpostgreSQL Datasource example/description
  res-ref-namejdbc/mydb/res-ref-name
  res-typejavax.sql.DataSource/res-type
  res-authContainer/res-auth
/resource-ref


When attempting to load the Datasource as follows:

if((cntx = new InitialContext()) == null)
  return;
if((ectx = (Context)cntx.lookup(java:comp/env)) == null ){
  return;
if((ds = (DataSource)ectx.lookup(jdbc/mydb)) != null)
  return;

I get a null on the DataSource.

Can anyone help me out with this???

Thanks,
David Durst



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




Re: Repost: Can't connect to a running network-enabled mysql serveron localhost

2003-01-09 Thread John
On Thu, 2003-01-09 at 11:58, Mark Eggers wrote:
 
 If memory serves my correctly, 4.0.3 was a problem
 child for a number of reasons.  Can you move up to
 4.0.6 and see if that helps with the problem?
 
 Sorry to be not of much help.  I was going to say
 check your host and user tables in mysql, but if you
 can connect with the same URL, then that's obviously
 not the problem.
 

actually mark, you've been a great help.

debian stable (woody) includes tomcat 4.0.3
testing(sarge) includes 4.0.4
unstable (sid) includes 4.1.16

now, without going to unstable/testing status packages, which is an
undesirable thing to do, i have installed 4.1.18 from a tarball and
started it up, and everything goes fine.

thanks a bunch dude!


-- 
Regards,

John Breen

+-+-+
|     pp      n       ww   ww     |
|
| aa   pp   p aa   nn  nn aa  ww   ww aa  | John Breen 
|
|  a   pp   p aa   nn  nn aa  ww w ww  a  | Coordinator
|
| a   aa   p  a   aa   nn  nn a   aa  ww w ww a   aa  | APANA, Inc.
|
|   a  pp   a nnn nnn   a  w    a | WA Region  
|
| |
|
+-+-+
  email: [EMAIL PROTECTED]


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




Re: HTTPS to HTTP

2003-01-09 Thread David Hemingway
Thats is my exact situation. The sysadmin section of teh site is 100% https.
but the on the user side there is nothing that sensitive and little harm
they could be cause stealing someones session. It would not be worth going
to the trouble of stealing the session for the benefit you would get.

Thanks for the comments

regards,
Dave


- Original Message -
From: John Holman [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Thursday, January 09, 2003 9:44 PM
Subject: Re: HTTPS to HTTP




 Ralph Einfeldt wrote:

 Anybody who can listen to your traffic, can hijack
 a session. He just has to create a request with the
 same sessionid (either as cookie or in the url).
 
 So after you go back from https to http you open
 the session to an attacker.
 
 The risks that are involved with that, depends on the
 application.
 
 I think it would be useful to be able to configure Tomcat to use the
 same session id when downgrading from https to http. This caters for the
 case where an application really does not have significant security
 requirements - the login is needed only to identify the user so that e.g
 their non-confidential preferences can be applied and it does not matter
 that others might masquerade as that user. In that case the session may
 as well be conducted in http (e.g. for performance reasons). However the
 password itself should always be hidden using https, because it is
 likely that the user will employ that same password for other
 applications where security *is* important.

 Note that when there are risks with the application there should be no
 http access at all - that's easy enough to arrange.

 John

 
 
 
 -Original Message-
 From: David Hemingway [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, January 09, 2003 7:59 AM
 To: Tomcat Users List
 Subject: HTTPS to HTTP
 
 
 2 Does this open up a huge security hole that I am
 
 
 not seeing. I have heard things about session hijacking?
 
 Many thanks
 regards,
 
 Dave
 
 --
 To unsubscribe, e-mail:
mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
mailto:[EMAIL PROTECTED]
 
 
 


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



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




RE: HTTPS to HTTP

2003-01-09 Thread Ralph Einfeldt
I don't think that performance is a reason to keep 
the session after a switch because in the most
applications the amount of protocol switches is 
quite small when compared to the total number of 
requests within one protocol.

 -Original Message-
 From: John Holman [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, January 09, 2003 11:44 AM
 To: Tomcat Users List
 Subject: Re: HTTPS to HTTP
 
 
 In that case the session may as well be conducted 
 in http (e.g. for performance reasons). 

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




RE: HTTPS to HTTP

2003-01-09 Thread Ralph Einfeldt
But be aware that quite simple changes in the 
configuration of tomcat can lead to big security holes. 
Guess what happens if you or somebody else someday 
decides to switch from basic authentification to form 
authentifcation and the sysadmin visits the user side 
and somebody steals the sysadmins session ...)

 -Original Message-
 From: David Hemingway [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, January 09, 2003 12:08 PM
 To: Tomcat Users List
 Subject: Re: HTTPS to HTTP
 
 Thats is my exact situation. The sysadmin section of teh site 
 is 100% https.
 but the on the user side there is nothing that sensitive and 
 little harm they could be cause stealing someones session. 
 It would not be worth going to the trouble of stealing the 
 session for the benefit you would get.
 

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




Minumum jk2 configuration

2003-01-09 Thread Steve Slatcher
More of an attempt to be helpful to others rather than a request for help,
but I'd be interested in hearing any comments

Despite what you can read in
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/jk2/confighowto.html
my experience with jk2 (v2.043) was that I needed these lines in my
workers2.properties file:

[shm]
file=${serverRoot}/logs/shm.file
size=1048576

Without them I get [error] mod_jk child init 1 0 in my Apache error.log.

(I'm using Win2k)

--
Steve Slatcher


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




RE: RewriteRules and Standalone Tomcat

2003-01-09 Thread neal
Its *not* that simple.  Pagerank (guaging inbound links from other sites)
would need to all be coordinated to point to that specifc file. This would
be very difficult.  PR is the most significant factor in SERPs on most
modern engines and if a good inbound link was to point to your base URL
(which most will do) its not going to count when the engine realizes it is a
302.

:(




-Original Message-
From: Ralph Einfeldt [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 09, 2003 2:42 AM
To: Tomcat Users List
Subject: RE: RewriteRules and Standalone Tomcat


Me too.

Especially if the solution is sooo simple:

Just submit the url with the path to the
welcome file to the searchenengines and
most of them will be happy with that.

 -Original Message-
 From: Turner, John [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, January 09, 2003 11:32 AM
 To: 'Tomcat Users List'
 Subject: RE: RewriteRules and Standalone Tomcat

 I would disagree 100%.  You're assuming that
 priority one for any commercial use of Tomcat
 is maximizing search engine placement for a
 given URL.


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


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




RE: RewriteRules and Standalone Tomcat

2003-01-09 Thread neal
I'm not presuming its priority #1 always, but yes I am presuming it is a
very high priority ... but ... 80% of web traffic comes from search engines.
Unless you're one you've got a major print and media advertising budget how
else do you drive traffic?  I suppose there are other possible scenarios
such as Intranets or B2B apps, but I would suspect SEO is a significant
factor for most who would deploy a commercial web application.


-Original Message-
From: Turner, John [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 09, 2003 2:32 AM
To: 'Tomcat Users List'
Subject: RE: RewriteRules and Standalone Tomcat



I would disagree 100%.  You're assuming that priority one for any commercial
use of Tomcat is maximizing search engine placement for a given URL.  I
would be surprised if, out of all the people using Tomcat in a commercial
situation, that was priority one for more than .1% or so.

We're selling our applications like crazy, which use Tomcat, but then again,
we use Apache as a rule for things on port 80.  As far as we're concerned,
Tomcat is perfect.

John

-Original Message-
From: neal [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 09, 2003 2:18 AM
To: Tomcat Users List
Subject: RE: RewriteRules and Standalone Tomcat


Well, a few things come to mind.

1. A comparison was made - using tomcat as a web server is like racing a mac
truck.  Well, for someone new to tomcat and apache (I just arrived from
microsoft/iis land) the correct usage pattern was less than obvious ... I
just knew that most people used tomcat/apache.  I could have never
anticipated this sort of issue.  If this sort of issue is defended by the
community (302s etc) then there should be a blatant disclaimer when
downloading the standalone that it is not intended for production use.

2. As to teh chicken and egg analogy - that's a good point - does theory or
an unfortunate reality dictate the direction of the product? I guess I
would defer to point #1.  If the product is not going to address the very
real issues of production use, it should make it clear to users that it is
not indended for production use.  Granted the ideal is to sluff off such
petty and rediculous issues put forth by the search engine defenses, but at
the end of that argument the issue still exists as does the sobering fact
that this will be a significant problem for anyone who chooses to deploy a
commercial application using the product.

neal


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.434 / Virus Database: 243 - Release Date: 12/25/2002


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


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




bug with tomcat 4.1.18

2003-01-09 Thread Ben Jessel
I've noticed a bug when setting up tomcat 4.1.18 via the administration console.
It creates XML in server.xml which includes the parameter digest= ( if no digest is 
specified ). Tomcat actually tries to create a digester class with the zero length'd 
string. Delete this parameter out of you server.xml!

Oh yeah, and has anyone clicked on datasources and got a parse error, something like 
invalid parameter driverClassName ( even if none exists in server.xml, or in web.xml 
)?

Tomcat is a fantastic product, and I'm thankful that the development process has such 
a huge amount of impetus behind it, however the strife I've had with tomcat rpms /  
finding accurate documentation, and dealing with the bugs has been very frustrating...



RE: Resource issues

2003-01-09 Thread Roberts, Eric
Hi,

Question 1: Is your jar containing org.prostgresql.Driver in common/lib?

Question 2: Is your resource defined in a Context or as a GlobalNaming Resource?

Question 3: Version of Tomcat?

Attached is a small servlet which you can use to find out what is happening.

Regards

Eric

-Original Message-
From: David Durst [mailto:[EMAIL PROTECTED]]
Sent: Donnerstag, 09. Jänner 2003 12:26
To: [EMAIL PROTECTED]
Subject: Resource issues


I am going through the JNDI Datasource example and attempting to apply it
to my situation.

here is the following config in my server.xml

Resource name=jdbc/mydb auth=Container type=javax.sql.Datasource/
ResourceParams name=jdbc/mydb

parameternamefactory/namevalueorg.apache.commons.dbcp.BasicDataSourceFactory/value/parameter
parameternamemaxActive/namevalue100/value/parameter
parameternamemaxIdle/namevalue5/value/parameter
parameternamemaxWait/namevalue-1/value/parameter
parameternameusername/namevalueYEAHRIGHT/value/parameter
parameternamepassword/namevalueNOSORRY/value/parameter

parameternamedriverClassName/namevalueorg.postgresql.Driver/value/parameter

parameternameurl/namevaluejdbc:postgresql://127.0.0.1:5432/larco/value/parameter
/ResourceParams

I add the following to my web.xml:

resource-ref
  descriptionpostgreSQL Datasource example/description
  res-ref-namejdbc/mydb/res-ref-name
  res-typejavax.sql.DataSource/res-type
  res-authContainer/res-auth
/resource-ref


When attempting to load the Datasource as follows:

if((cntx = new InitialContext()) == null)
  return;
if((ectx = (Context)cntx.lookup(java:comp/env)) == null ){
  return;
if((ds = (DataSource)ectx.lookup(jdbc/mydb)) != null)
  return;

I get a null on the DataSource.

Can anyone help me out with this???

Thanks,
David Durst



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




DBTest.java
Description: DBTest.java
--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]


Problem with oracle CLOB and connection pooling

2003-01-09 Thread Andrea . Ferrando
Hi all
I've got a problem reading oracle.sql.CLOB with connection pooling of
tomcat.
The Connection c is given by tomcat connectio pooling and work well with
everything, but if I try to read a CLOB  field  it gives me a cast
exception.
Here it is java code of reading table class :
  ...
Statement st = c.createStatement();
ResultSet rs = st.executeQuery(select  str, clob from table);
rs.next();
System.out.println(str= +rs.getString(str));
System.out.println(clob= +rs.getObject(clob));
oracle.sql.CLOB cl = (oracle.sql.CLOB) rs.getObject(clob);
...
Here  it is the catalina.out:

str= ciao
clob= oracle.sql.CLOB@caea19
java.lang.reflect.InvocationTargetException
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
  at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  at java.lang.reflect.Method.invoke(Method.java:324)
  at
it.marconimobile.businessapplication.portale.servlet.ControlMotion.start(MainServlet.java:112)
  at
it.marconimobile.businessapplication.portale.servlet.ControlMotion.init(MainServlet.java:50)
  at
it.marconimobile.businessapplication.portale.servlet.MainServlet.generalResponse(MainServlet.java:39)
  at
it.marconimobile.businessapplication.portale.servlet.MainServlet.doPost(MainServlet.java:32)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
  at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
  at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
  at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java: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:2396)
  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:405)
  at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:380)
  at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:508)
  at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:533)
  at java.lang.Thread.run(Thread.java:536)
Caused by: java.lang.ClassCastException: oracle.sql.CLOB
  at
it.marconimobile.businessapplication.portale.application.macaddress.ado.NoteADO.getAllRecordFromId(NoteADO.java:68)
  at
it.marconimobile.businessapplication.portale.application.macaddress.InserisciNota.start(InserisciNota.java:59)
  at
it.marconimobile.businessapplication.portale.application.macaddress.pjb.MainPortalClass.start(MainPortalClass.java:69)
  ... 39 more

What is the problem?

Thans in advance for the collaboration
Andrea



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




RE: WEBL Deployment

2003-01-09 Thread Reynir Hübner
Try posting to tomcat-user (not tomcat-dev)
Try reading the manual at http://jakarta.apache.org/tomcat/



 -Original Message-
 From: kamlesh thakur [mailto:[EMAIL PROTECTED]] 
 Sent: 9. janúar 2003 11:19
 To: [EMAIL PROTECTED]
 Subject: WEBL Deployment
 
 
 Sir,
  I am using your product Tomcat4.0 for a web application 
 having the
 
 files like html's,JSP's,Servlets,webl. I have successfully 
 deployed the
 
 files html's,JSP's and Servlets but got stuck with webl files used 
 for
 
 extration from the web, as there is no documentation for the
 
 same.Please give me guidelines for deploying the webl files along 
 with
 
 additional information like setting classpath for webl, files 
 required
 
 by tomcat for running webls, modifications in web.xml file etc.
   Thanking you,
 sincerely,
 kamlesh
 
 
 --
 To unsubscribe, e-mail:   
 mailto:tomcat-user- [EMAIL PROTECTED]
 For 
 additional commands, 
 e-mail: mailto:[EMAIL PROTECTED]
 
 

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




Re: why doesn't tomcat see my correct keystore?

2003-01-09 Thread Rasputin
* Rob Lagana [EMAIL PROTECTED] [0108 23:08]:
 
 
 I found out that tomcat was looking at the .keystore default...
 However I specified in the server.xml file the below and tomcat just 
 ignores it.

  Parameter Name=keystore Value=C:/keystore/newstore /

I'd try putting the path relative to $CATALINA_BASE - maybe there's a
bug with the C:\ part?

keystoreFile:
Add this attribute if the keystore file you created is not in the default
place that Tomcat expects (a file named .keystore in the user home
directory under which Tomcat is running). You can specify an absolute
pathname, or a relative pathname that is resolved against the
$CATALINA_BASE environment variable.
-- 
Rasputin :: Jack of All Trades - Master of Nuns

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




Re: HTTPS to HTTP

2003-01-09 Thread John Holman
Yes, that is clearly a risk. The *whole* web application needs have no 
risks in order to allow http access to any of it - any sensitive link 
and it must all be https. (And of course if SSO is enabled *all* web 
applications for the virtual host must be considered safe).
Otherwise I'm not convinced that session stealing is really a problem - 
though open to counter-arguements.

John

Ralph Einfeldt wrote:

But be aware that quite simple changes in the 
configuration of tomcat can lead to big security holes. 
Guess what happens if you or somebody else someday 
decides to switch from basic authentification to form 
authentifcation and the sysadmin visits the user side 
and somebody steals the sysadmins session ...)

 

-Original Message-
From: David Hemingway [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 09, 2003 12:08 PM
To: Tomcat Users List
Subject: Re: HTTPS to HTTP

Thats is my exact situation. The sysadmin section of teh site 
is 100% https.
but the on the user side there is nothing that sensitive and 
little harm they could be cause stealing someones session. 
It would not be worth going to the trouble of stealing the 
session for the benefit you would get.

   


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

 



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




Re: Log on Tomcat

2003-01-09 Thread Lindomar
Ok, thanks!!
I'll try this.


- Original Message -
From: John Bullock [EMAIL PROTECTED]
To: 'Tomcat Users List' [EMAIL PROTECTED]
Sent: Wednesday, January 08, 2003 16:14
Subject: RE: Log on Tomcat


 Ohhh... I see what the question was now... *doh*  I thought he was asking
 how to System.out.println into a class. :)

 [ j o h n ]

 -Original Message-
 From: Shrotriya, Sumit [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, January 08, 2003 12:03 PM
 To: 'Tomcat Users List'
 Subject: RE: Log on Tomcat



 Yes add these loggers
 Logger className=org.apache.catalina.logger.SystemErrLogger /
 Logger className=org.apache.catalina.logger.SystemOutLogger /

 ~Sumit
 -Original Message-
 From: Lindomar [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, January 08, 2003 11:44 AM
 To: Tomcat Users List
 Subject: Log on Tomcat


 Hi everybody!
 Is it possible put on log what i write with System.out.println in my
 classes?
 Thanks in advanced.


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


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




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




RE: RewriteRules and Standalone Tomcat

2003-01-09 Thread Turner, John

Bascially, this all goes away with about 60 minutes of work with Apache and
a connector, assuming, based on what you've posted before, one site/domain
name, and a relatively simple Tomcat Context/webapp configuration.

Frankly, you are asking (begging?) for trouble if you are going to run
Tomcat on port 80 (it has to run as root unlike Apache) to serve a site
where public availability is such a priority.  All due respect to Tomcat and
the efforts of the dev team (I do feel Tomcat rocks), but that's like a deer
running around in deer season with a bullseye painted on it's fur.

If you told me: Design a solution that will be used by a company to get as
much public exposure as possible, with public exposure being top priority
and by the way it has to be secure and we don't want any trouble from
crackers the FIRST thing I would do would be install Apache.  Bar none.
THEN I would consider which engine to use for dynamic resolution, out of all
the alternatives available, Tomcat only being one of them.

You've got a classic trade-off situation going.  Tomcat Stand-alone is easy
and convenient to use as a web server (port 80), but doing so has its
drawbacks.  Adding Apache as a head for Tomcat is less easy and not as
convenient (drawbacks) but it also has its advantages (solves your 302
issue).  The only person who can make the call is you.

John

 -Original Message-
 From: neal [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, January 09, 2003 6:52 AM
 To: Tomcat Users List
 Subject: RE: RewriteRules and Standalone Tomcat
 
 
 Its *not* that simple.  Pagerank (guaging inbound links from 
 other sites)
 would need to all be coordinated to point to that specifc 
 file. This would
 be very difficult.  PR is the most significant factor in SERPs on most
 modern engines and if a good inbound link was to point to 
 your base URL
 (which most will do) its not going to count when the engine 
 realizes it is a
 302.
 
 :(
 
 
 
 
 -Original Message-
 From: Ralph Einfeldt [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, January 09, 2003 2:42 AM
 To: Tomcat Users List
 Subject: RE: RewriteRules and Standalone Tomcat
 
 
 Me too.
 
 Especially if the solution is sooo simple:
 
 Just submit the url with the path to the
 welcome file to the searchenengines and
 most of them will be happy with that.
 
  -Original Message-
  From: Turner, John [mailto:[EMAIL PROTECTED]]
  Sent: Thursday, January 09, 2003 11:32 AM
  To: 'Tomcat Users List'
  Subject: RE: RewriteRules and Standalone Tomcat
 
  I would disagree 100%.  You're assuming that
  priority one for any commercial use of Tomcat
  is maximizing search engine placement for a
  given URL.
 
 
 --
 To unsubscribe, e-mail:
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 
 
 --
 To unsubscribe, e-mail:   
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: 
 mailto:[EMAIL PROTECTED]
 

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




Re: Installation woes

2003-01-09 Thread Nathan McMinn
Unfortunately, when you run the bat file, it opens another terminal window,
that closes when tomcat exits.  And since it doesn't start up all the way,
there aren't even any log files to check.

- Original Message -
From: [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Wednesday, January 08, 2003 4:32 PM
Subject: Re: Installation woes


 Open a terminal window yourself first, then run
 %CATALINA_HOME%/bin/startup.bat.  Now you should be able to see the error
 message without the window disappearing on you.  Also, make sure the
 JAVA_HOME points to the top level directory of your JDK (C:\jdk1.3
 instead of C:\jdk1.3\bin for instance).

 Also, I don't know if things have changed with the more recent versions,
 but I seem to remember there being problems with the installations in
 previous versions, and it was generally recommended to just download the
 binary release (sufficient unless you want to take a look at and/or tweak
 the source code), unzip, and set the environment variables.  You could
 always give that a try to see if things work better.

 HTH,
 -Jeff





 Nathan McMinn [EMAIL PROTECTED]
 01/08/03 04:22 PM
 Please respond to Tomcat Users List


 To: Tomcat Users List [EMAIL PROTECTED]
 cc:
 Subject:Re: Installation woes


 I added it, and it appears to be using the correct jdk.  However, now the
 damn thing won't start.  And it closes the terminal window before I can
 retreive the error message.

 - Original Message -
 From: Tam, Michael [EMAIL PROTECTED]
 To: 'Tomcat Users List' [EMAIL PROTECTED]
 Sent: Wednesday, January 08, 2003 4:13 PM
 Subject: RE: Installation woes


  Nathan,
 
 Adding JAVA_HOME as environment variable under Sys. Properties should
  work.  Where did you add your JAVA_HOME variable i.e. as User variable
 or
  System variable??  It should be under System Variable.  I am running XP
 Home
  on my notebook and it works for me.
 
  Hope this help.
 
  Michael
 
  -Original Message-
  From: Nathan McMinn [mailto:[EMAIL PROTECTED]]
  Sent: Wednesday, January 08, 2003 1:50 PM
  To: Tomcat Users List
  Subject: Re: Installation woes
 
 
  John,
 
  Here's the kicker, running SET from the command line (win xp)
 doesn't
  list JAVA_HOME as an existing env var, neither does sys properties -
  advanced - environment variables.  Is there somewhere else to look for
 it?
 
  - Original Message -
  From: Turner, John [EMAIL PROTECTED]
  To: 'Tomcat Users List' [EMAIL PROTECTED]
  Sent: Wednesday, January 08, 2003 3:41 PM
  Subject: RE: Installation woes
 
 
  
   Change the JAVA_HOME environment variable to point to the JDK you want
 to
   use.
  
   John
  
  
-Original Message-
From: Nathan McMinn [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 08, 2003 4:39 PM
To: Tomcat Users List
Subject: Installation woes
   
   
When installing Tomcat 4.1.18, during the installation, it
autodetects the
jdk install location.  Is there any way to override this?  If
not, how do
you change the jdk that tomcat uses?  It is automatically
using an older jdk
that Jbuilder installed, and I don't want it to use this one.
   
--Nathan McMinn
   
   
   
--
To unsubscribe, e-mail:
mailto:[EMAIL PROTECTED]
For additional commands, e-mail:
mailto:[EMAIL PROTECTED]
   
  
   --
   To unsubscribe, e-mail:
  mailto:[EMAIL PROTECTED]
   For additional commands, e-mail:
  mailto:[EMAIL PROTECTED]
  
  
 
 
 
  --
  To unsubscribe, e-mail:
  mailto:[EMAIL PROTECTED]
  For additional commands, e-mail:
  mailto:[EMAIL PROTECTED]
 
  --
  To unsubscribe, e-mail:
 mailto:[EMAIL PROTECTED]
  For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 
 



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







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




[OFF-TOPIC] RE: RewriteRules and Standalone Tomcat

2003-01-09 Thread Turner, John

I'd love to see a cite for 80% of web traffic comes from search engines.
I've worked on plenty of high-traffic public websites in my day, and have
never, ever found that to be the case.  If anything, more traffic comes from
portals such as Yahoo, AOL, and MSN than anywhere else, and by that I mean
direct links from the main page, which cost money.

People don't get to nike.com by typing shoes in a search engine.  Shoes
on Google gets Vegetarian Shoes as the first link.  Yeah, that's relevant.


In my experience, search engine placement as a priority is the technique
used by sites that don't have any money and want traffic for free. Keep in
mind that traffic != sales, and traffic != revenue.  They're not even
directly proportional.

How you drive traffic depends on the target audience. Sometimes its a search
engine, I would say search engines are the last place people look when they
want to spend money.  Search engines are used, in my opinion, by people
looking for information or anything else that's free, not for someplace to
spend money.

CDs at Google doesn't get me Amazon, yet that's the first place I go when
I want to buy a CD from a major artist.  Even a specific artist like Eminem
CD doesn't get me Amazon anywhere near the top of the results.  

For us, our Tomcat-based commercial applications are sold face-to-face by
salespeople.

John

 -Original Message-
 From: neal [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, January 09, 2003 6:54 AM
 To: Tomcat Users List
 Subject: RE: RewriteRules and Standalone Tomcat
 
 
 I'm not presuming its priority #1 always, but yes I am 
 presuming it is a
 very high priority ... but ... 80% of web traffic comes from 
 search engines.
 Unless you're one you've got a major print and media 
 advertising budget how
 else do you drive traffic?  I suppose there are other 
 possible scenarios
 such as Intranets or B2B apps, but I would suspect SEO is a 
 significant
 factor for most who would deploy a commercial web application.
 
 

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




Re: Installation woes

2003-01-09 Thread Nathan McMinn
Thanks!

- Original Message -
From: Larry Meadors [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, January 08, 2003 4:27 PM
Subject: Re: Installation woes


 Go to the $CATALINA_HOME/bin directory and run

   catalina run

 The terminal will stay after it dies.

 Larry

  [EMAIL PROTECTED] 01/08/03 15:23 PM 
 I added it, and it appears to be using the correct jdk.  However, now
 the
 damn thing won't start.  And it closes the terminal window before I can
 retreive the error message.

 - Original Message -
 From: Tam, Michael [EMAIL PROTECTED]
 To: 'Tomcat Users List' [EMAIL PROTECTED]
 Sent: Wednesday, January 08, 2003 4:13 PM
 Subject: RE: Installation woes


  Nathan,
 
 Adding JAVA_HOME as environment variable under Sys. Properties
 should
  work.  Where did you add your JAVA_HOME variable i.e. as User variable
 or
  System variable??  It should be under System Variable.  I am running
 XP
 Home
  on my notebook and it works for me.
 
  Hope this help.
 
  Michael
 
  -Original Message-
  From: Nathan McMinn [mailto:[EMAIL PROTECTED]]
  Sent: Wednesday, January 08, 2003 1:50 PM
  To: Tomcat Users List
  Subject: Re: Installation woes
 
 
  John,
 
  Here's the kicker, running SET from the command line (win xp)
 doesn't
  list JAVA_HOME as an existing env var, neither does sys properties -
  advanced - environment variables.  Is there somewhere else to look
 for
 it?
 
  - Original Message -
  From: Turner, John [EMAIL PROTECTED]
  To: 'Tomcat Users List' [EMAIL PROTECTED]
  Sent: Wednesday, January 08, 2003 3:41 PM
  Subject: RE: Installation woes
 
 
  
   Change the JAVA_HOME environment variable to point to the JDK you
 want
 to
   use.
  
   John
  
  
-Original Message-
From: Nathan McMinn [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 08, 2003 4:39 PM
To: Tomcat Users List
Subject: Installation woes
   
   
When installing Tomcat 4.1.18, during the installation, it
autodetects the
jdk install location.  Is there any way to override this?  If
not, how do
you change the jdk that tomcat uses?  It is automatically
using an older jdk
that Jbuilder installed, and I don't want it to use this one.
   
--Nathan McMinn
   
   
   
--
To unsubscribe, e-mail:
mailto:[EMAIL PROTECTED]
For additional commands, e-mail:
mailto:[EMAIL PROTECTED]
   
  
   --
   To unsubscribe, e-mail:
  mailto:[EMAIL PROTECTED]
   For additional commands, e-mail:
  mailto:[EMAIL PROTECTED]
  
  
 
 
 
  --
  To unsubscribe, e-mail:
  mailto:[EMAIL PROTECTED]
  For additional commands, e-mail:
  mailto:[EMAIL PROTECTED]
 
  --
  To unsubscribe, e-mail:
 mailto:[EMAIL PROTECTED]
  For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 
 



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



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




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




Error redirecting

2003-01-09 Thread Felipe Schnack
  Anyone has problems under tomcat 4.1.18?
  I just downloaded its RPMs, but something strange is happening. I have
a taglib that at some point do a response.sendRedirect() and then
returns SKIP_PAGE... for some reason the page still gets processed, and
because of this I get IllegalStateExceptions...
  This was working with version 4.1.12...
-- 

Felipe Schnack
Analista de Sistemas
[EMAIL PROTECTED]
Cel.: (51)91287530
Linux Counter #281893

Centro Universitário Ritter dos Reis
http://www.ritterdosreis.br
[EMAIL PROTECTED]
Fone/Fax.: (51)32303341


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




Startup Error

2003-01-09 Thread Nathan McMinn
First, thanks to everyone for all the help.  I just have one more question.
When starting tomcat (4.1.18 on win xp, jdk 1.4.1_01).  I receive this error
message:

WebappClassLoader:
validateJarFile(C:\TomcatTest\webapps\wwxchange\WEB-INF\lib\s
ervlet.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending
class: javax/servlet/Servlet.class

Has anyone ever seen this before?

-Nathan McMinn



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




RE: why doesn't tomcat see my correct keystore?

2003-01-09 Thread Donie Kelly
In Tomcat 4.0.4 I have the following

Connector className=org.apache.catalina.connector.http.HttpConnector
address=192.168.1.4 port=443
   enableLookups=true scheme=https
secure=true
  Factory
className=org.apache.catalina.net.SSLServerSocketFactory
clientAuth=false protocol=TLS
   keystoreFile=c:\tomcat4.0\conf\sslstore 
   keystorePass=tecnomen /
/Connector

What version of tomcat are you using? The reason I ask is the fact that you
are using the name, value attributes?

Donie


-Original Message-
From: Rasputin [mailto:[EMAIL PROTECTED]]
Sent: 09 January 2003 12:49
To: Tomcat Users List; [EMAIL PROTECTED]
Subject: Re: why doesn't tomcat see my correct keystore?

* Rob Lagana [EMAIL PROTECTED] [0108 23:08]:


 I found out that tomcat was looking at the .keystore default...
 However I specified in the server.xml file the below and tomcat just
 ignores it.

  Parameter Name=keystore Value=C:/keystore/newstore /

I'd try putting the path relative to $CATALINA_BASE - maybe there's a
bug with the C:\ part?

keystoreFile:
Add this attribute if the keystore file you created is not in the default
place that Tomcat expects (a file named .keystore in the user home
directory under which Tomcat is running). You can specify an absolute
pathname, or a relative pathname that is resolved against the
$CATALINA_BASE environment variable.
--
Rasputin :: Jack of All Trades - Master of Nuns

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

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




RE: Startup Error

2003-01-09 Thread Donie Kelly
Try removing the servlet.jar from you WEB-INF/lib directory as it's already
in the tomcat/common/lib directory

Donie

-Original Message-
From: Nathan McMinn [mailto:[EMAIL PROTECTED]]
Sent: 09 January 2003 13:47
To: Tomcat Users List
Subject: Startup Error

First, thanks to everyone for all the help.  I just have one more question.
When starting tomcat (4.1.18 on win xp, jdk 1.4.1_01).  I receive this error
message:

WebappClassLoader:
validateJarFile(C:\TomcatTest\webapps\wwxchange\WEB-INF\lib\s
ervlet.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending
class: javax/servlet/Servlet.class

Has anyone ever seen this before?

-Nathan McMinn



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

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




iPlanet 6.0 / Tomcat 4.1.18 / W2k

2003-01-09 Thread Pipho Matt
We are trying to run Tomcat 4.1.18 as our servlet runner with iPlanet 6.0 as
the web server on a Windows 2000 server.  We have iPlanet and Tomcat running
successfully independently of each other.  We now would like to have iPlanet
forward the servlet requests to Tomcat.

The problem we are having is that we can't find the nsapi_redirect.dll
referenced in all of the installation documentation we have read.  We are
also unable to create one on our own.  The main documentation we have
referenced is the JK documentation on the apache site.  
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/jk/neshowto.html 

We have tried to take the nsapi_redirect.dll from the Tomcat version 3.3 and
edited our obj.conf file to reference this .dll and it still did not
correctly redirect.

Has anyone done this or could provide us with some more documentation.

Thanks,
Matt Pipho
319 292-5566


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




Re: Servlet Mapping Strategy w/ user-specific URLs

2003-01-09 Thread Jeffrey Winter

 At 01:48 PM 1/8/2003, you wrote:
 So you're talking about using the sorts of Filters available as of the
 Servlet 2.3 spec?  That actually sounds promising, I'll take a look at
it.

 Yep.

Okay, one question about this: in the Filter, I'd parse the url and
determine
which servlet should be the target, either the UserServlet or
ResourceServlet
and then create an apporpriate RequestDispatcher.  Then call,

dispather.forward(...);

This would happen instead of calling, say,

chain.doFilter(...);

So basically, this would need to be the last Filter in any FilterChain that
I may create, because the chain would be broken since I wouldn't be calling
doFilter() in that Filter.

Does this sound about right or is there something I'm missing?

Thanks.


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




Re: Servlet Mapping Strategy w/ user-specific URLs

2003-01-09 Thread Jeffrey Winter

 Depends upon your point of view.  Mine is different from those I've seen
in
 reply to your inquiry so far.  If I can do something declaratively in
 Apache, I do it.  If I am going to write code, I put do it in Tomcat.

 Apache is a world-class web server.  Tomcat is an application
(Servlet/JSP)
 engine.  Tomcat has a relatively weak but effective web server.  Using
 Tomcat as a web server is like street racing with a Mack truck.  On the
 other hand, try towing a motor home with a Lamborghini.

I'm going to try the mod_rewrite approach also and see how far that takes
me.  I like
the idea of declarative rewriting as opposed to compiled code, so I'm just
going to
have to see what feels right.


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




Re: Virtual hosting and mod_jk

2003-01-09 Thread Eric Ricker
Alias myapplications /your/path/here/tomcat/webapps/myapplications

slap that in your httpd.conf and you should be happy.
--
Eric Ricker
[EMAIL PROTECTED]
- Original Message -
From: Andreas Hirner [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Thursday, January 09, 2003 5:43 AM
Subject: Virtual hosting and mod_jk


 Hello,

 I have successfully integrated tomcat (4.0.6) with apache (1.3.26) on
linux
 and I am able to access a single virtual host (e.g. myapplication) located
 in the tomcat/webapps/myapplication directory using a url like that:

 http://www.mydomain.com/myapplication/index.jsp

 However I would like to be able to access the files in that directory
 without using the path /myapplication, i.e.

 http://www.mydomain.com/index.jsp

 I have been playing around with the configuration files but I have not
been
 able to alter the configuration according to my needs. Does anybody know
if
 this is possible?

 Thanks in advance.

 Andreas

 PS: The relevant sections of httpd.conf and server.xml are listed below.


 http.conf
 #
 VirtualHost *:80
ServerName meinfotoalbum.com
ServerAlias www.meinfotoalbum.com

DocumentRoot /usr/local/tomcat/mywebapps/meinfoto
Directory /usr/local/tomcat/mywebapps/meinfoto
  DirectoryIndex index.htm index.html
 Options Indexes FollowSymLinks
/Directory

 #mod_jk link to tomcat
JkMount / ajp13
JkMount /*jsp ajp13

#prohibit access of WEB-INF
 Location /WEB-INF/
 AllowOverride None
 deny from all
/Location

 #prohibit access of META-INF
Location /META-INF/
   AllowOverride None
deny from all
/Location

/VirtualHost
 
 server.xml
 
   Host name=meinfotoalbum.com debug=0 appBase=mywebapps
 unpackWARs=true
 Aliaswww.meinfotoalbum.com/Alias
 Logger className=org.apache.catalina.logger.FileLogger
 directory=logs prefix=meinfotoalbum_log. suffix=.txt
 timestamp=true /
 Context path= docBase=meinfoto debug=0 reloadable=false/
 Listener className=org.apache.ajp.tomcat4.config.ApacheConfig
 append=true  /
/Host




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



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




Connection Pool problem with virtual hosts

2003-01-09 Thread Nate Drake
Hi,

I'm having trouble when attempting to access a JDBC connection pool when
using a virtual host.  I have a servlet that is set to load on startup (ie.
load-on-startup1/load-on-startup in web.xml), this servlet attempts to
get a pool connection to read some configuration options from the database.
This works fine when the web app is deploy without using virtual hosts.
When attempting to run with virtual hosts I get the following error: Could
not load JDBC driver 'null'.  I've seen this error reported many times on
the list, with no definite solution that has worked.

Here is information about my setup:

Tomcat Standalone, version 4.1.12

Oracle database

Solaris 8 and 9

web.xml for pool:

resource-ref
  descriptionOracle Datasource/description
  res-ref-namejdbc/orapool/res-ref-name
  res-typejavax.sql.DataSource/res-type
  res-authContainer/res-auth
/resource-ref

server.xml for virtual host:

  Host name=blah.blah.com debug=0 appBase=blah
   unpackWARs=true autoDeploy=true

!-- Logger shared by all Contexts related to this virtual host.  By
 default (when using FileLogger), log files are created in the
logs
 directory relative to $CATALINA_HOME.  If you wish, you can
specify
 a different directory with the directory attribute.  Specify
either a
 relative (to $CATALINA_HOME) or absolute path to the desired
 directory.--
Logger className=org.apache.catalina.logger.FileLogger
 directory=logs  prefix=blah_log. suffix=.txt
timestamp=true/

!-- Define properties for each web application.  This is only
needed
 if you want to set non-default properties, or have web
application
 document roots in places other than the virtual host's appBase
 directory.  --

!-- Tomcat Root Context --
  Context path= docBase=blahweb debug=4

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

ResourceParams name=jdbc/orapool
parameter
namefactory/name

valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
/parameter
parameter
namedriverClassName/name
valueoracle.jdbc.driver.OracleDriver/value
/parameter
parameter
namevalidationQuery/name
valueselect sysdate from dual/value
/parameter
parameter
nameremoveAbandoned/name
valuetrue/value
/parameter
parameter
nameremoveAbandonedTimeout/name
value60/value
/parameter
parameter
namelogAbandoned/name
valuetrue/value
/parameter
parameter
namemaxWait/name
value3/value
/parameter
parameter
namemaxActive/name
value20/value
/parameter
parameter
namemaxIdle/name
value10/value
/parameter
parameter
namepassword/name
valuemypassword/value
/parameter
parameter
nameurl/name

valuejdbc:oracle:thin:@192.168.0.100:1521:mysid/value
/parameter
parameter
nameusername/name
valuemyusername/value
/parameter
/ResourceParams
 /Context
  /Host

Code to get connection from pool:

Context envContext  = (Context)initContext.lookup(java:/comp/env);
DataSource ds = (DataSource)envContext.lookup(jdbc/orapool);
return ds.getConnection();


Again, the above configuration works fine when used in a Context under the
localhost Host element.  It seems to only be when I define another
Host element that I get the error.


Any ideas?

Thanks,

Nate


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




RE: Tomcat oddities

2003-01-09 Thread Korneyev,Alex
Hello Subir Sengupta ,

 If you are suspecting GC problem, you can always run the app thru any
number of analyze tools, ( OptimizeIt ) for example.

 If the reason for freeze up is GC, then you have a much bigger issue on
your hands. B/c that is a lot of objects :)

 You might want to consider using loadbalancer for distributed type app.

 Issue Two:

 That sounds like a programmer error. I don't know how you have implemented
object concurancy, but 99% of the type stale data is due to programmer
error.

 I personally don't think that it is an i.e. issue since I.E. would not mix
and match the data, it would display old data;

 Best Regards,

 Alex K.

-Original Message-
From: Subir Sengupta [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, January 08, 2003 5:51 PM
To: 'Tomcat Users List'
Subject: RE: Tomcat oddities


Issue One:
If Tomcat used up all your memory, you would see OutOfMemory exceptions
being thrown, not a freeze.  Do you see these?  Everything will stop *while*
GC is occurring (not until GC occurs).  

Have you tried increasing the amount of memory allocated to Java?  Use the
-Xms and -Xmx flags to set memory allocations.  However, if you do have a
memory leak, increasing the memory will simply increase the intervals
between freezes.

-Original Message-
From: Michael Molloy [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 08, 2003 1:55 PM
To: Tomcat Users List
Subject: Tomcat oddities


My company is in the deployment stage of a project that uses tomcat to 
serve information from an oracle database to about 25 people. When the 
app goes live, there will be about 150 people connected at any one 
time. Tomcat 4.1.12 is running behind Apache on Windows 2000 on a 
single cpu box, and Oracle is running on a separate Windows 2000 2-way 
box. (Windows was the client decision, not ours.)

Issue One
We're seeing two serious issues, the first of which happens about once 
a day, sometimes more. When there are several users on the system, 
maybe up to 15, there is a freeze during which no one can get any 
responses back from Tomcat. This period usually lasts from 5 to 15 
minutes, after which the system returns to normal and everything zips 
along.

We've tuned queries, so we don't think that is the problem. There may 
still be a rogue query out there causing problems, but we think it's 
unlikely. Besides, I don't know why that would stop everyone, which is 
what's happening.

Another possibility that we've discussed is that tomcat is simply using 
all of the memory and everything basically stops until GC occurs. This 
seems the most likely to me, but I wanted to ask the group. I don't 
know what the page file size is, nor do we have access to the server so 
we can't check task manager.

Can anyone think of any other possibilities?

Issue Two
We've had two reports where a user has had data from an old session 
show up in his/her current session. For example, I wrote a class that 
stores information from 14 different JSPs. The object is put into the 
user's session. In these two occasions, the user entered a new record 
using these screens  saved the data to the database. The user took an 
hour lunch break, which would have been long enough to timeout (set at 
20 minutes), returned, and queried a different record. Some of the data 
from the previous record showed up in the holder class in his/her 
current session and was saved to the database.

Any idea what that could be? The only thing I can think of is that IE 
is doing some data caching  mixing things up a bit.

Any suggestions will be greatly appreciated. We really need to get this 
figured out quickly.

Thanks
--Michael Molloy


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

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

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




JSP source

2003-01-09 Thread Deepa Raja
Hi 
 
I want to do some reporting that is to be called by a cron job.
 
I do not want to use a reporting tool. Can use JSP 
 

*   to talk to the database 
*   fetch the relevant details
*   format the details as a report
*   fetch the HTML  source of the generated report
*   and email it to intended recipients

My doubt is 
 
is it possible to fetch the HTML source of a  JSP?
 
I know I could use java mail to email if I could manage to get the source.
 
Please pour in your suggestions
 
Thanks
deepa






RE: HELP, PLEASE! Tomcat creates too many threads!

2003-01-09 Thread Joao Filipe Placido
Hi,

When using SingleThreadModel in the servlets, old tomcat threads never die,
and new threads are created for each request, so I have to restart tomcat
once in a while. I'm using linux and JDK 1.4.1 with Tomcat 4.1.12.

Anyone knows how to make old threads get killed?

Thank you.

Joao Filipe Placido

 -Original Message-
 From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
 Sent: terça-feira, 7 de Janeiro de 2003 20:28
 To: Tomcat Users List
 Subject: RE: HELP, PLEASE! Tomcat creates too many threads!
 
 
 
 On Tue, 7 Jan 2003, Denise Mangano wrote:
 
  Date: Tue, 7 Jan 2003 09:31:01 -0500
  From: Denise Mangano [EMAIL PROTECTED]
  Reply-To: Tomcat Users List [EMAIL PROTECTED]
  To: 'Tomcat Users List' [EMAIL PROTECTED]
  Subject: RE: HELP, PLEASE! Tomcat creates too many threads!
 
  I am curious about the same thing.  My app isn't fully up and
 operational
  yet so I do not know for sure if I suffer from the same problem, but I
 have
  noticed that while doing some testing new threads are getting started,
 and
  it usually takes a restart to get rid of them.
 
  I've seen this question posted a few times, but haven't noticed any
  'resolution' or possible solutions.  Can anyone recommend things to
 check
  for, settings to make, or perhaps any documentation on the issue?
 
  Is it possible that this could be a JSDK 1.4 issue?  It's the only
 common
  link I've noticed between my set up and other posters with this problem.
 
 
 Tomcat creates threads as follows:
 
 * One thread per Host element if you turn on autoDeploy -- should
   not have this on a production system.
 
 * One thread per Context element if you use reloading -- should
   not have this on a production system.
 
 * One thread per Context element for session expiration -- required.
 
 * One thread per processor in your Connector elements.
   At startup it will create the number of threads you configure
   for minProcessors.  The number will increase (up to the
   configured maxProcessors value) but never decrease.
 
 For most people, tuning maxProcessors is the easiest way to control the
 number of threads Tomcat creates, since that is where most of them come
 from.  Be aware, though, that reducing this number also limits the number
 of simultaneous requests your app will handle, since each simultaneous
 request requires a processor thread.
 
 If you're running behind Apache (via JK or JK2), you probably also want to
 comment out the stand-alone connector on port 8080.  Likewise, if you're
 running Tomcat standalone, you don't need the JK connector on 8009.
 
  Thanks :)
 
  Denise Mangano
  Help Desk Analyst
  Complus Data Innovations, Inc.
 
 
 Craig
 


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




RE: JSP source

2003-01-09 Thread Turner, John

If you combine #3 and #4, your problem is solved.  Format the details as a
report...how would you format them if not HTML?  All you have to do is
stream the HTML into a buffer, then send that out as the body of a message.
You'll want to set the ContentType on your message to HTML.

You could do all of this from a JSP, but why would you want to?  A cron job
can call java and execute a class.

If, on the other hand, you are saying that you already have a JSP that
generates the report to a browser, and you want to sent that output to
someone as an email message, that's different. 

John

 -Original Message-
 From: Deepa Raja [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, January 09, 2003 8:30 AM
 To: [EMAIL PROTECTED]
 Subject: JSP source
 
 
 Hi 
  
 I want to do some reporting that is to be called by a cron job.
  
 I do not want to use a reporting tool. Can use JSP 
  
 
 * to talk to the database 
 * fetch the relevant details
 * format the details as a report
 * fetch the HTML  source of the generated report
 * and email it to intended recipients
 
 My doubt is 
  
 is it possible to fetch the HTML source of a  JSP?
  
 I know I could use java mail to email if I could manage to 
 get the source.
  
 Please pour in your suggestions
  
 Thanks
 deepa
 
 
 
 

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




Unexpected reload of MainServlet

2003-01-09 Thread Matt Jackson
In the middle of a fairly busy day in terms of site activity, our
MainServlet was destroyed and reinitialised unexpectedly.  We have not
experienced any other strange Tomcat behaviour almost a year of continuous
use and this is our first 'glitch'.  We are using Tomcat 3.2.4 on Suse 7.1.

Does anyone have any pointers as to why this may happen?

TIA

Matt

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




RE: Unexpected reload of MainServlet

2003-01-09 Thread Shapira, Yoav
Hi,
The servlet container is free to destroy and reinitialize servlets,
including load-on-startup servlets.  Tomcat doesn't normally do this,
however.

Could it be you had enough usage to run our of memory, thereby forcing
an aggressive GC?  If you're running with verbose:gc, you'd see an
Unloading [class name of your servlet] message in your console log.

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: Matt Jackson [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 09, 2003 10:07 AM
To: 'Tomcat Users List'
Subject: Unexpected reload of MainServlet

In the middle of a fairly busy day in terms of site activity, our
MainServlet was destroyed and reinitialised unexpectedly.  We have not
experienced any other strange Tomcat behaviour almost a year of
continuous
use and this is our first 'glitch'.  We are using Tomcat 3.2.4 on Suse
7.1.

Does anyone have any pointers as to why this may happen?

TIA

Matt

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


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




Re: DTD for server.xml??

2003-01-09 Thread Martin Jacobson
Craig R. McClanahan wrote:


On Wed, 8 Jan 2003, Turner, John wrote:



Date: Wed, 8 Jan 2003 11:31:16 -0500
From: Turner, John [EMAIL PROTECTED]
Reply-To: Tomcat Users List [EMAIL PROTECTED]
To: '[EMAIL PROTECTED]' [EMAIL PROTECTED]
Subject: DTD for server.xml??


Hello -

I notice that the top of web.xml has:

?xml version=1.0 encoding=ISO-8859-1?
!DOCTYPE web-app
PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN
http://java.sun.com/dtd/web-app_2_3.dtd;

yet the top of server.xml has nothing.

I'm very new to XML, so forgive me if this is a lame or FA question, but is
there a DTD for server.xml?  If so, why isn't it specified in server.xml,
and what is the URL?  Is server.xml real, official XML or just
convenience XML?




There is no DTD for server.xml because there cannot be.

The problem is that server.xml is extensible -- for example, the set of
attributes recognized by a Valve or Context element depends on the
implementation class of the internal component that corresponds to it.
The startup process uses Java reflection to match them up to property
setters on the corresponding beans.  There is no way to express this kind
of thing in a DTD.

Your server.xml is (and must be) well formed XML.  It just cannot be
validated.



There may be other good reasons, but this isn't one of them :-)
Here is an extract from my server.xml...
Logger className=org.apache.catalina.logger.FileLogger
 prefix=catalina_log. suffix=.txt
 timestamp=true
/

This could be equally well expressed as
Logger className=org.apache.catalina.logger.FileLogger
  property
property-nameprefix/property-name
property-valuecatalina_log./property-value
  /property
  property
property-namesuffix/property-name
property-value.txt/property-value
  /property
  property
property-nametimestamp/property-name
property-valuetrue/property-value
  /property
/Logger

or, more concisely as

Logger className=org.apache.catalina.logger.FileLogger
  property name=prefix value=catalina_log./
  property name=suffix value=.txt/
  property name=timestamp value=true/
/Logger

In both cases, the abstraction of property names allows a DTD to be 
defined that is inherently extensible, and thus would allow an XML 
parser to validate server.xml even if extended by an admin.

Or am I missing something?

Martin


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



RE: JSP source

2003-01-09 Thread Deepa Raja
Hi John

With JSP it is like a template and I need not worry about placing the
content 
within the template. that is the only reason for me to use a JSP.

We have some applications already running Apache - Tomcat
and adding a JSP is not going to be difficult

Also with JSP I can alter the format very easily 

Please feel free to point out if I'm wrong.

how could I get the html source? Could you please explain it for me.

Thanks
Deepa


-Original Message-
From: Turner, John [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 09, 2003 3:02 PM
To: 'Tomcat Users List'
Subject: RE: JSP source



If you combine #3 and #4, your problem is solved.  Format the details as a
report...how would you format them if not HTML?  All you have to do is
stream the HTML into a buffer, then send that out as the body of a message.
You'll want to set the ContentType on your message to HTML.

You could do all of this from a JSP, but why would you want to?  A cron job
can call java and execute a class.

If, on the other hand, you are saying that you already have a JSP that
generates the report to a browser, and you want to sent that output to
someone as an email message, that's different. 

John

 -Original Message-
 From: Deepa Raja [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, January 09, 2003 8:30 AM
 To: [EMAIL PROTECTED]
 Subject: JSP source
 
 
 Hi 
  
 I want to do some reporting that is to be called by a cron job.
  
 I do not want to use a reporting tool. Can use JSP 
  
 
 * to talk to the database 
 * fetch the relevant details
 * format the details as a report
 * fetch the HTML  source of the generated report
 * and email it to intended recipients
 
 My doubt is 
  
 is it possible to fetch the HTML source of a  JSP?
  
 I know I could use java mail to email if I could manage to 
 get the source.
  
 Please pour in your suggestions
  
 Thanks
 deepa
 
 
 
 

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




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




RE: JSP source

2003-01-09 Thread Bodycombe, Andrew
Fetching the HTML is straightforward. Just create a URL connection and read
the data from the stream.

You could try the following:

1. Implement your report as a JSP or Servlet

2. Write an email component that acts as a client to this servlet which
a) opens a URL connection to your servlet
b) reads the HTML
c) mails it to the intended recipients.

3. Write a cron job to run your email component

Andy

-Original Message-
From: Deepa Raja [mailto:[EMAIL PROTECTED]]
Sent: 09 January 2003 15:43
To: Tomcat Users List
Subject: RE: JSP source


Hi John

With JSP it is like a template and I need not worry about placing the
content 
within the template. that is the only reason for me to use a JSP.

We have some applications already running Apache - Tomcat
and adding a JSP is not going to be difficult

Also with JSP I can alter the format very easily 

Please feel free to point out if I'm wrong.

how could I get the html source? Could you please explain it for me.

Thanks
Deepa


-Original Message-
From: Turner, John [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 09, 2003 3:02 PM
To: 'Tomcat Users List'
Subject: RE: JSP source



If you combine #3 and #4, your problem is solved.  Format the details as a
report...how would you format them if not HTML?  All you have to do is
stream the HTML into a buffer, then send that out as the body of a message.
You'll want to set the ContentType on your message to HTML.

You could do all of this from a JSP, but why would you want to?  A cron job
can call java and execute a class.

If, on the other hand, you are saying that you already have a JSP that
generates the report to a browser, and you want to sent that output to
someone as an email message, that's different. 

John

 -Original Message-
 From: Deepa Raja [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, January 09, 2003 8:30 AM
 To: [EMAIL PROTECTED]
 Subject: JSP source
 
 
 Hi 
  
 I want to do some reporting that is to be called by a cron job.
  
 I do not want to use a reporting tool. Can use JSP 
  
 
 * to talk to the database 
 * fetch the relevant details
 * format the details as a report
 * fetch the HTML  source of the generated report
 * and email it to intended recipients
 
 My doubt is 
  
 is it possible to fetch the HTML source of a  JSP?
  
 I know I could use java mail to email if I could manage to 
 get the source.
  
 Please pour in your suggestions
  
 Thanks
 deepa
 
 
 
 

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




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

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




RE: Tomcat 4.1.18 jsp import and include error

2003-01-09 Thread Hongsong Zhou
I can not use TestData without an import even it is in the default
package.

 [EMAIL PROTECTED] 01/09/03 01:08AM 
 with package : %@ page import=testPackage.TestData % is ok
 but without package : %@ page import=TestData % you get
exception.

See http://forum.java.sun.com/thread.jsp?forum=31thread=231550.

You ought to be able to use TestData without an import, since it is in
the
default package, but according to the above, you cannot import a class
without a package name because the generated java import statement
would be
considered invalid.  Mind you that isn't clear from JLS 7.5.1:
http://java.sun.com/docs/books/jls/second_edition/html/packages.doc.html#266

99.

--- Noel


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


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




Re: Help with Tomcat 4.1 installation please?

2003-01-09 Thread Mark
Thank you Peng.  You were correct.  Tomcat was already running, having
started automatically upon bootup.  Now I will be unsubscribing from the
list.  Thanks again.

Mark Steere
[EMAIL PROTECTED]


 Are you installing tomcat from a exe ?
 If so you may have already started tomcat from the service, in this case
   it is already started, you can test by going to port 8080 on your own
 machine using the web browser.
 If you prefer to run from a batch file, either stop the current service
 and disable it from running.

 It's also possible you might be running something else on that port.


 Mark wrote:
  Hi, I am attempting to install and run Tomcat 4.1 on my Windows XP
system.  I have followed the instructions as far as:
1. Downloading and installing J2SDK 1.4.1_01
2. Setting the CATALINA_HOME variable to c:\Program Files\Apache
Group\Tomcat 4.1
3. Setting the JAVA_HOME variable to c:\j2sdk1.4.1_01
4. Including %JAVA_HOME%\bin in the PATH variable.
5. Restarting the computer.
 
  Problem: When I click on the Start Tomcat icon, a window appears, a
listing appears briefly in the window and then the window quickly
disappears.
 
  At the command prompt, I get the following listing for the startup
command and the shutdown commands:
 
  C:\Program Files\Apache Group\Tomcat 4.1\binstartup
  Using CATALINA_BASE:   c:\Program Files\Apache Group\Tomcat 4.1
  Using CATALINA_HOME:   c:\Program Files\Apache Group\Tomcat 4.1
  Using CATALINA_TMPDIR: c:\Program Files\Apache Group\Tomcat 4.1\temp
  Using JAVA_HOME:   c:\j2sdk1.4.1_01
 
  C:\Program Files\Apache Group\Tomcat 4.1\binshutdown
  Using CATALINA_BASE:   c:\Program Files\Apache Group\Tomcat 4.1
  Using CATALINA_HOME:   c:\Program Files\Apache Group\Tomcat 4.1
  Using CATALINA_TMPDIR: c:\Program Files\Apache Group\Tomcat 4.1\temp
  Using JAVA_HOME:   c:\j2sdk1.4.1_01
  Catalina.stop: java.net.ConnectException: Connection refused: connect
  java.net.ConnectException: Connection refused: connect
  at java.net.PlainSocketImpl.socketConnect(Native Method)
  at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:305)
  at
java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:171)
  at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:158)
  at java.net.Socket.connect(Socket.java:426)
  at java.net.Socket.connect(Socket.java:376)
  at java.net.Socket.init(Socket.java:291)
  at java.net.Socket.init(Socket.java:119)
  at org.apache.catalina.startup.Catalina.stop(Catalina.java:581)
  at
org.apache.catalina.startup.Catalina.execute(Catalina.java:402)
  at
org.apache.catalina.startup.Catalina.process(Catalina.java:180)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
  java:39)
  at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
  sorImpl.java:25)
  at java.lang.reflect.Method.invoke(Method.java:324)
  at
org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203)
  C:\Program Files\Apache Group\Tomcat 4.1\bin
 
  I'm not sure what's really supposed to happen at this point, but
something doesn't seem right.  Any help would be greatly appreciated. Thanks
in advance.
 
  Mark Steere
  [EMAIL PROTECTED]
 



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





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




RE: JSP source

2003-01-09 Thread Turner, John

Exactly.

Something like java.net.URLConnection.getContent(), I believe.

John


 -Original Message-
 From: Bodycombe, Andrew [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, January 09, 2003 10:48 AM
 To: 'Tomcat Users List'
 Subject: RE: JSP source
 
 
 Fetching the HTML is straightforward. Just create a URL 
 connection and read
 the data from the stream.
 
 You could try the following:
 
 1. Implement your report as a JSP or Servlet
 
 2. Write an email component that acts as a client to this 
 servlet which
 a) opens a URL connection to your servlet
 b) reads the HTML
 c) mails it to the intended recipients.
 
 3. Write a cron job to run your email component
 
 Andy
 
 -Original Message-
 From: Deepa Raja [mailto:[EMAIL PROTECTED]]
 Sent: 09 January 2003 15:43
 To: Tomcat Users List
 Subject: RE: JSP source
 
 
 Hi John
 
 With JSP it is like a template and I need not worry about placing the
 content 
 within the template. that is the only reason for me to use a JSP.
 
 We have some applications already running Apache - Tomcat
 and adding a JSP is not going to be difficult
 
 Also with JSP I can alter the format very easily 
 
 Please feel free to point out if I'm wrong.
 
 how could I get the html source? Could you please explain it for me.
 
 Thanks
 Deepa
 
 
 -Original Message-
 From: Turner, John [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, January 09, 2003 3:02 PM
 To: 'Tomcat Users List'
 Subject: RE: JSP source
 
 
 
 If you combine #3 and #4, your problem is solved.  Format 
 the details as a
 report...how would you format them if not HTML?  All you 
 have to do is
 stream the HTML into a buffer, then send that out as the body 
 of a message.
 You'll want to set the ContentType on your message to HTML.
 
 You could do all of this from a JSP, but why would you want 
 to?  A cron job
 can call java and execute a class.
 
 If, on the other hand, you are saying that you already have a JSP that
 generates the report to a browser, and you want to sent that output to
 someone as an email message, that's different. 
 
 John
 
  -Original Message-
  From: Deepa Raja [mailto:[EMAIL PROTECTED]]
  Sent: Thursday, January 09, 2003 8:30 AM
  To: [EMAIL PROTECTED]
  Subject: JSP source
  
  
  Hi 
   
  I want to do some reporting that is to be called by a cron job.
   
  I do not want to use a reporting tool. Can use JSP 
   
  
  *   to talk to the database 
  *   fetch the relevant details
  *   format the details as a report
  *   fetch the HTML  source of the generated report
  *   and email it to intended recipients
  
  My doubt is 
   
  is it possible to fetch the HTML source of a  JSP?
   
  I know I could use java mail to email if I could manage to 
  get the source.
   
  Please pour in your suggestions
   
  Thanks
  deepa
  
  
  
  
 
 --
 To unsubscribe, e-mail:
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 
 
 
 
 --
 To unsubscribe, e-mail:
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 
 --
 To unsubscribe, e-mail:   
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: 
 mailto:[EMAIL PROTECTED]
 

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




[ Resolved ] Not retrieving home made trusted certificates

2003-01-09 Thread Christophe Sebille
  To add the home-made CaCertificate I used keytool without specifying the
cacerts file from %JRE%\lid\security directory so keytool added it to
%USER_PROFILE%\.keystore and Tomcat use this file to retrieve keys and not
cacerts.

  Adding explicitly the filename to cacerts, it works 

Christophe


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




RE: Connection Pool problem with virtual hosts

2003-01-09 Thread Roberts, Eric
Hi,

Try using the GlobalNamingResource element instead of the Context element, then put a 
ResourceLink to that resource in each Host element.

If the resource is defined in either Context or GlobalNamingResource in server.xml , 
there is no need to include any reference to it in web.xml as a lookup to the 
InitialContext will resolve the resource.

Regards

Eric

-Original Message-
From: Nate Drake [mailto:[EMAIL PROTECTED]]
Sent: Donnerstag, 09. Jänner 2003 15:48
To: [EMAIL PROTECTED]
Subject: Connection Pool problem with virtual hosts


Hi,

I'm having trouble when attempting to access a JDBC connection pool when
using a virtual host.  I have a servlet that is set to load on startup (ie.
load-on-startup1/load-on-startup in web.xml), this servlet attempts to
get a pool connection to read some configuration options from the database.
This works fine when the web app is deploy without using virtual hosts.
When attempting to run with virtual hosts I get the following error: Could
not load JDBC driver 'null'.  I've seen this error reported many times on
the list, with no definite solution that has worked.

Here is information about my setup:

Tomcat Standalone, version 4.1.12

Oracle database

Solaris 8 and 9

web.xml for pool:

resource-ref
  descriptionOracle Datasource/description
  res-ref-namejdbc/orapool/res-ref-name
  res-typejavax.sql.DataSource/res-type
  res-authContainer/res-auth
/resource-ref

server.xml for virtual host:

  Host name=blah.blah.com debug=0 appBase=blah
   unpackWARs=true autoDeploy=true

!-- Logger shared by all Contexts related to this virtual host.  By
 default (when using FileLogger), log files are created in the
logs
 directory relative to $CATALINA_HOME.  If you wish, you can
specify
 a different directory with the directory attribute.  Specify
either a
 relative (to $CATALINA_HOME) or absolute path to the desired
 directory.--
Logger className=org.apache.catalina.logger.FileLogger
 directory=logs  prefix=blah_log. suffix=.txt
timestamp=true/

!-- Define properties for each web application.  This is only
needed
 if you want to set non-default properties, or have web
application
 document roots in places other than the virtual host's appBase
 directory.  --

!-- Tomcat Root Context --
  Context path= docBase=blahweb debug=4

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

ResourceParams name=jdbc/orapool
parameter
namefactory/name

valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
/parameter
parameter
namedriverClassName/name
valueoracle.jdbc.driver.OracleDriver/value
/parameter
parameter
namevalidationQuery/name
valueselect sysdate from dual/value
/parameter
parameter
nameremoveAbandoned/name
valuetrue/value
/parameter
parameter
nameremoveAbandonedTimeout/name
value60/value
/parameter
parameter
namelogAbandoned/name
valuetrue/value
/parameter
parameter
namemaxWait/name
value3/value
/parameter
parameter
namemaxActive/name
value20/value
/parameter
parameter
namemaxIdle/name
value10/value
/parameter
parameter
namepassword/name
valuemypassword/value
/parameter
parameter
nameurl/name

valuejdbc:oracle:thin:@192.168.0.100:1521:mysid/value
/parameter
parameter
nameusername/name
valuemyusername/value
/parameter
/ResourceParams
 /Context
  /Host

Code to get connection from pool:

Context envContext  = (Context)initContext.lookup(java:/comp/env);
DataSource ds = (DataSource)envContext.lookup(jdbc/orapool);
return ds.getConnection();


Again, the above configuration works fine when used in a Context under the
localhost Host element.  It seems to only be when I define another
Host element that I get the error.


Any ideas?

Thanks,

Nate


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


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

RE: Java Bean Scope questions (a lengthy one)

2003-01-09 Thread Denise Mangano
Bill,

Let me see if I understand this correctly.  

You are correct.  I use formBean throughout various pages, so I understand
the need for session scope.  However, when I call CCSubmit.jsp, this is the
last page of my webapp so I think request scope for transaction is
appropriate(?).  It is not until I call CCSubmit.jsp that I want to
instantiate transaction and set some of the properties equal to properties
of formBean.  At that point the transaction bean is used to submit to my
payment processor and return information to CCSubmit.jsp.  Once CCSubmit.jsp
displays the returned information and the user has completed the
transaction, I no longer need the data stored in transaction...  The user
can either exit or go back to the home page to pay more fees if they decide
to.  

Question #1: Correct me if I am wrong, but the way I understand it is that
even if the user decides to enter the app again and pay more fees, at this
point when the user reaches CCSubmit.jsp again, this is a new request so
transaction would be instantiated again even it is the same session.

You wrote:
What I was pointing out is that any jsp:setProperty ... that is nested
within a jsp:useBean ... ... /jsp:useBean acts as a first-time
initialization (sort of like a constructor).  If the bean has already
been constructed, then it won't be called again.  To set the property every
time, you need to place the jsp:setProperty ... tag outside of the
jsp:useBean ... tag.

I understand what you are saying about using your suggested code to set the
properties every time, and its making me think that this may be what I need
for formBean, not transaction.  When my user submits the form for the first
time, it calls CCProcess.jsp where formBean is instantiated (setProperty
tags are nested within the useBean tag and there is no existing instance).
Then if the data is not valid, they are brought to Retry.jsp which displays
the errors for the offending fields.  Once that form is resubmitted, again
there is a call to CCProcess.jsp.  

Question #2:  Are you saying that since my scope is now session,  in
CCProcess.jsp I should have the formBean setProperty tags outside of the
useBean tag? This way each time the form is submitted, the new (and
supposedly corrected) data gets written to the bean? (Which if I understand
this right this was happening previously and working correct but that was
because each time I call CCProcess.jsp it was a new request so the bean was
always getting instantiated.)  I could see how this could be the cause of my
current snag (which is a never ending Retry.jsp loop and select lists not
maintaining state), but I would like to hear back of whether or not I am
understanding this correctly.

Thank you!!!

Denise 


-Original Message-
From: Bill Barker [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, January 09, 2003 1:56 AM
To: [EMAIL PROTECTED]
Subject: Re: Java Bean Scope questions (a lengthy one)



Denise Mangano [EMAIL PROTECTED] wrote in message
5D83C44941AFD4118B6F0002B302984F43863C@EXCHANGE_SERVER">news:5D83C44941AFD4118B6F0002B302984F43863C@EXCHANGE_SERVER...
 Bill,

 I'm not sure what you mean.  The transaction Bean gets instantiated 
 when I call CCSubmit.jsp.  That is the first time it is mentioned 
 and CCSubmit
is
 only called once from Verify.jsp.  Is what you are saying effectively 
 the same as:

Taking a wild guess, I'm thinking that you want 'formBean' to have
scope=session, and 'transaction' to have scope=request.  This way,
'formBean' stays around between pages, but 'transaction' only stays around
for the one request that it is needed.

What I was pointing out is that any jsp:setProperty ... that is nested
within a jsp:useBean ... ... /jsp:useBean acts as a first-time
initialization (sort of like a constructor).  If the bean has already been
constructed, then it won't be called again.  To set the property every time,
you need to place the jsp:setProperty ... tag outside of the jsp:useBean
... tag.


 jsp:useBean id=transaction class = 
 com.complusdata.beans.Transaction
 scope=session 

This code will only be executed if there is *no* transaction in the
session (and the JSP page needs to create a new one.  If you have previously
called CCSubmit.jsp (or if you had any other page that used transaction)
at any point with this session, it will be skipped.

   jsp:setProperty name=transaction property=email 
 value=%=formHandler.getEmail()%/

 /jsp:useBean

 Thanks.

 Denise Mangano
 Help Desk Analyst
 Complus Data Innovations, Inc.


 -Original Message-
 From: Bill Barker [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, January 08, 2003 1:42 AM
 To: [EMAIL PROTECTED]
 Subject: Re: Java Bean Scope questions (a lengthy one)



 Denise Mangano [EMAIL PROTECTED] wrote in message 
 5D83C44941AFD4118B6F0002B302984F438636@EXCHANGE_SERVER">news:5D83C44941AFD4118B6F0002B302984F438636@EXCHANGE_SERVER...
  Wow someone read all of that!! ;)
 
  For Question #1:  I should have mentioned this before... I tried to 

Handle Page Exceptions (Bug?) with Tomcat 4.1.x

2003-01-09 Thread Brandon Cruz
When we get an error with a jsp file, in many instances, a completely
useless message is returned.  The message returned is ...

javax.servlet.ServletException
at
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp
l.java:533)
at org.apache.jsp.doRegister_jsp._jspService(doRegister_jsp.java:142)

When looking at the generated java code for this doRegister.jsp, I see that
line 142 contains this code...

 if (pageContext != null) pageContext.handlePageException(t);

So, I am assuming there is some bug in the way Tomcat is handling
exceptions.  Has this been fixed in any recent versions?  I checked the
release notes, but it seems that there isn't any information specific to
tomcat 4.1.18.  I am currently using a combination of jar files from tomcat
4.1.17 and 4.1.18.

Thanks!

Brandon


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




How to specify a name for a content beeing served by s servlet

2003-01-09 Thread Cédric Viaud
Hi,

i would like to know if it is possible to indicate in the HTTP header of a response a 
name for a ressource.

Let be a little clearer.

I got a controler servlet wich map all request with *.do. I check the URL use the 
name before the .do to know the command.
For exemple, if the request is getRequest.do, my servlet look for what to do with 
getRequest.

My problem is that i use this servlet to serve native contents (such as images, video, 
etc ...). On request like getNativeContent.do?id=42135125, my servlet look for the 
native content of id=42135125, and send it back to the client. I set the correct 
content-type and use a ServletOutputStream to send binary content.

It works fine, but i've got a light problem. It seem's that the content type is not 
always used by the client to know wich application must be run, but the file name is 
used (the extension of this filename). Or, the filename that the client see is 
getNativeContent.do and so the extension is do. In this case, the user is prompted 
for which application must be associated with the .do extension. More that this, if 
the user want to save it to disk, the defaut name is getNativeContent.do.

Is there a way to indicate a name for the ressource beeing served to the client ? I've 
spent much time on the HTTP RFC, be i can't manage to find what i'm looking for.

Sorry for my awfull English.

Regards,

Cédric




RE: How to specify a name for a content beeing served by s servlet

2003-01-09 Thread Ralph Einfeldt
You are looking at the wrong spec :}

It part of the mime standard:

http://www.nacs.uci.edu/indiv/ehood/MIME/rfc2183.txt

You need to set a header Content-Disposition
with the value of filename=somefile.ext;

 -Original Message-
 From: Cédric Viaud [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, January 09, 2003 5:24 PM
 To: Tomcat users
 Subject: How to specify a name for a content beeing served by 
 s servlet
 
 i would like to know if it is possible to indicate in the 
 HTTP header of a response a name for a ressource.
snip/ 
 Is there a way to indicate a name for the ressource beeing 
 served to the client ? I've spent much time on the HTTP RFC, 
 be i can't manage to find what i'm looking for.
 

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




Re: How to specify a name for a content beeing served by s servlet

2003-01-09 Thread Jason Pyeron
Cédric,

You could write something like this, as we have done.

 /some-path/getbyidservice/93847572934/foo-filename.jpg

We have done this in Perl, and will be attacking this in servlets 1st week 
February.

This allows the browser to cache (if allowed by headers) and to have the 
extension/filename set as intended.

If you want to encode more details in the request, i don't see why you 
cannot introduce delimiters into the id path element.

-jason pyeron

-- 
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-   -
- Jason Pyeron   http://www.pyerotechnics.com   -
- Owner  Lead  Pyerotechnics Development, Inc. -
- +1 410 808 6646 (c)   500 West University Parkway #1S -
- +1 410 467 2266 (f)   Baltimore, Maryland  21210-3253 -
-   -
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

This message is for the designated recipient only and may contain 
privileged, proprietary, or otherwise private information. If you
have received it in error, purge the message from your system and 
notify the sender immediately.  Any other use of the email by you 
is prohibited.


On Thu, 9 Jan 2003, Cédric Viaud wrote:

Hi,

i would like to know if it is possible to indicate in the HTTP header of a response a 
name for a ressource.

Let be a little clearer.

I got a controler servlet wich map all request with *.do. I check the URL use the 
name before the .do to know the command.
For exemple, if the request is getRequest.do, my servlet look for what to do with 
getRequest.

My problem is that i use this servlet to serve native contents (such as images, video, 
etc ...). On request like getNativeContent.do?id=42135125, my servlet look for the 
native content of id=42135125, and send it back to the client. I set the correct 
content-type and use a ServletOutputStream to send binary content.

It works fine, but i've got a light problem. It seem's that the content type is not 
always used by the client to know wich application must be run, but the file name is 
used (the extension of this filename). Or, the filename that the client see is 
getNativeContent.do and so the extension is do. In this case, the user is prompted 
for which application must be associated with the .do extension. More that this, if 
the user want to save it to disk, the defaut name is getNativeContent.do.

Is there a way to indicate a name for the ressource beeing served to the client ? I've 
spent much time on the HTTP RFC, be i can't manage to find what i'm looking for.

Sorry for my awfull English.

Regards,

Cédric





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




How do I set a default servlet?

2003-01-09 Thread JStanczak
I would like to setup my servlet server to point anyone that accesses the
default url to be sent to a certain servlet. For example if someone typed
http://localhost/ then it would take them right to
http://localhost/servlet/myservlet . I'm guessing this is done through the
web.xml in the conf directory, but is there a better way, like in the
applications web.xml. Either way hows the best way to accomplish this?
Thanks.


Thank You,

Justin A. Stanczak
Web Manager
Shake Learning Resource Center
Vincennes University
(812)888-5813



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




Re: iPlanet 6.0 / Tomcat 4.1.18 / W2k

2003-01-09 Thread John P. Dodge
You are probably going need to compile it yourself from the source. I have
compiled it on Solaris and it is pretty simple, but I don't know about
Win32.


On Thu, 9 Jan 2003, Pipho Matt wrote:

 We are trying to run Tomcat 4.1.18 as our servlet runner with iPlanet 6.0 as
 the web server on a Windows 2000 server.  We have iPlanet and Tomcat running
 successfully independently of each other.  We now would like to have iPlanet
 forward the servlet requests to Tomcat.

 The problem we are having is that we can't find the nsapi_redirect.dll
 referenced in all of the installation documentation we have read.  We are
 also unable to create one on our own.  The main documentation we have
 referenced is the JK documentation on the apache site.
 http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/jk/neshowto.html

 We have tried to take the nsapi_redirect.dll from the Tomcat version 3.3 and
 edited our obj.conf file to reference this .dll and it still did not
 correctly redirect.

 Has anyone done this or could provide us with some more documentation.

 Thanks,
 Matt Pipho
 319 292-5566


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



Mon aéroglisseur est plein d'anguilles
John P. Dodge
Boeing Shared Services


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




RE: How to specify a name for a content beeing served by s servlet[off-toppic]

2003-01-09 Thread Jason Pyeron
yea, i agree but not all [dumb?] browsers respect it.

-jason pyeron

On Thu, 9 Jan 2003, Ralph Einfeldt wrote:

You are looking at the wrong spec :}

It part of the mime standard:

http://www.nacs.uci.edu/indiv/ehood/MIME/rfc2183.txt

You need to set a header Content-Disposition
with the value of filename=somefile.ext;

 -Original Message-
 From: Cédric Viaud [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, January 09, 2003 5:24 PM
 To: Tomcat users
 Subject: How to specify a name for a content beeing served by 
 s servlet
 
 i would like to know if it is possible to indicate in the 
 HTTP header of a response a name for a ressource.
snip/ 
 Is there a way to indicate a name for the ressource beeing 
 served to the client ? I've spent much time on the HTTP RFC, 
 be i can't manage to find what i'm looking for.
 

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


-- 
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-   -
- Jason Pyeron   http://www.pyerotechnics.com   -
- Owner  Lead  Pyerotechnics Development, Inc. -
- +1 410 808 6646 (c)   500 West University Parkway #1S -
- +1 410 467 2266 (f)   Baltimore, Maryland  21210-3253 -
-   -
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

This message is for the designated recipient only and may contain 
privileged, proprietary, or otherwise private information. If you
have received it in error, purge the message from your system and 
notify the sender immediately.  Any other use of the email by you 
is prohibited.




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




reading forms

2003-01-09 Thread Peter Choe
is there a way to specify the order of the parameters are read from a form 
in a servlet?

it seems that if i do request.getParameterNames() there is no logic to 
which parameters are read first.

Peter Choe



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



JSP Scripting variables null

2003-01-09 Thread Ted Haynes
Tomcat 4.1.10
Red Hat Linux Advanced Server release 2.1AS/i686 (Pensacola)

I am using TagExtraInfo with my JSP Custom tags to make scripting variables
available within my jsp pages. I have the variables defined as
VariableInfo.AT_BEGIN in the class that extends TagExtraInfo. But within my
custom tags, the scripting variables are all null, but they are available
after my custom tag.

I recently moved from the below setup where my custom tags worked.

Red Hat Linux release 7.1 (Seawolf)
Tomcat 4.0.2-3


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




RE: reading forms

2003-01-09 Thread Ricardo_Bosch
the logic probably has to do with what order the browser decides to send.

rickb

-Original Message-
From: Peter Choe [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 09, 2003 11:40 AM
To: [EMAIL PROTECTED]
Subject: reading forms


is there a way to specify the order of the parameters are read from a form 
in a servlet?

it seems that if i do request.getParameterNames() there is no logic to 
which parameters are read first.

Peter Choe



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

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




Re: reading forms

2003-01-09 Thread Jason Pyeron

for lack of a better description the names are radmonized. This is because 
they are in a hash.

if you need them in a given order, you may want to number them.


ex:

 form
  input name=field_00_id/
  input name=field_01_fname/
  input name=field_99_memo/
  input name=field_50_authnum/
 /form

 then you can take request.getParameterNames() and sort it. if you still 
have trouble using it, then you can make a translation hash

for all in (request.getParameterNames())
 xlatehash.put(val.substring(10),val);

now you can access them in order or by unprefixed name.

does this help?

IMHO: if you need the names in order there is a problem with you logic, 
cause there is no gaurentee that the browser will send them in any give fasion.

-jason pyeron

-- 
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-   -
- Jason Pyeron   http://www.pyerotechnics.com   -
- Owner  Lead  Pyerotechnics Development, Inc. -
- +1 410 808 6646 (c)   500 West University Parkway #1S -
- +1 410 467 2266 (f)   Baltimore, Maryland  21210-3253 -
-   -
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

This message is for the designated recipient only and may contain 
privileged, proprietary, or otherwise private information. If you
have received it in error, purge the message from your system and 
notify the sender immediately.  Any other use of the email by you 
is prohibited.




On Thu, 9 Jan 2003, Peter Choe wrote:

is there a way to specify the order of the parameters are read from a form 
in a servlet?

it seems that if i do request.getParameterNames() there is no logic to 
which parameters are read first.

Peter Choe



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




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




Reverse logic in uriworkermap...

2003-01-09 Thread Evans, Michael


  -Original Message-
 From: Evans, Michael  
 Sent: 09 January 2003 16:57
 To:   '[EMAIL PROTECTED]'
 Subject:  
 
 
 I'm trying to use the (infamous) isapi_redirect.dll and I'm a bit stuck
 with a customised uriworkermap.properties
 
 My goal is to have:
   everything processed by Tomcat
   *except* any asp file in any folder - /*.asp
 
 Problem is uriworkermap doesn't appear to be able to support this kind of
 URI description?  Any ideas if I'm wrong?  If I'm right where do I need to
 change the code - in isapi_redirect.dll ?
 
 Should I approach this from the other direction and associate asp files on
 tomcat with something that will bounce to IIS ?
 
 Thanks,
 
 
 Michael Evans
 Visa International EU
 Tel: 020 7995 5438
 

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




Ftp Using Tomcat 4

2003-01-09 Thread Shah, Sanjay


 Hello:
 Does somebody know how to use Tomcat as a FTP server?
 I am trying to have some jsp/servlet program to be used by clients to
 download files from our site.
 Is there any utility already out there?
 
 Sanjay Shah
 Manager, Web Production Engineering
 Banking  Brokerage
 Thomson Financial
 Phone: (212) 510 3917
 Fax: (212) 720 1050
 Email: [EMAIL PROTECTED]
 111 Fulton Street, 2nd Floor,
 New York, NY 10038
 

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




Re: reading forms

2003-01-09 Thread Peter Choe
thanks for the information.

i was just trying to write a generic servlet to read in any forms and email 
or print the results to the users.

Peter Choe

At 11:54 AM 1/9/2003, Jason Pyeron wrote:

for lack of a better description the names are radmonized. This is because
they are in a hash.

if you need them in a given order, you may want to number them.


ex:

 form
  input name=field_00_id/
  input name=field_01_fname/
  input name=field_99_memo/
  input name=field_50_authnum/
 /form

 then you can take request.getParameterNames() and sort it. if you still
have trouble using it, then you can make a translation hash

for all in (request.getParameterNames())
 xlatehash.put(val.substring(10),val);

now you can access them in order or by unprefixed name.

does this help?

IMHO: if you need the names in order there is a problem with you logic,
cause there is no gaurentee that the browser will send them in any give 
fasion.

-jason pyeron

--
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-   -
- Jason Pyeron   http://www.pyerotechnics.com   -
- Owner  Lead  Pyerotechnics Development, Inc. -
- +1 410 808 6646 (c)   500 West University Parkway #1S -
- +1 410 467 2266 (f)   Baltimore, Maryland  21210-3253 -
-   -
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

This message is for the designated recipient only and may contain
privileged, proprietary, or otherwise private information. If you
have received it in error, purge the message from your system and
notify the sender immediately.  Any other use of the email by you
is prohibited.




On Thu, 9 Jan 2003, Peter Choe wrote:

is there a way to specify the order of the parameters are read from a form
in a servlet?

it seems that if i do request.getParameterNames() there is no logic to
which parameters are read first.

Peter Choe



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




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



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




Re: Startup Error

2003-01-09 Thread Nathan McMinn
DOH! thanks

- Original Message -
From: Donie Kelly [EMAIL PROTECTED]
To: 'Tomcat Users List' [EMAIL PROTECTED]
Sent: Thursday, January 09, 2003 7:41 AM
Subject: RE: Startup Error


 Try removing the servlet.jar from you WEB-INF/lib directory as it's
already
 in the tomcat/common/lib directory

 Donie

 -Original Message-
 From: Nathan McMinn [mailto:[EMAIL PROTECTED]]
 Sent: 09 January 2003 13:47
 To: Tomcat Users List
 Subject: Startup Error

 First, thanks to everyone for all the help.  I just have one more
question.
 When starting tomcat (4.1.18 on win xp, jdk 1.4.1_01).  I receive this
error
 message:

 WebappClassLoader:
 validateJarFile(C:\TomcatTest\webapps\wwxchange\WEB-INF\lib\s
 ervlet.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2.
Offending
 class: javax/servlet/Servlet.class

 Has anyone ever seen this before?

 -Nathan McMinn



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

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





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




Problem accessing user ID if Apache used to auithenticate

2003-01-09 Thread Steve Slatcher
So I have Apache 2 passing on requests to Tomcat 4.1 using jk2.  I can get
Apache to authenicate URLs that are forwarded to Tomcat, but the user ID
seems to get lost in the process so I cannot access it from my JSPs.  I
have noticed a few references to this in various forums but no resolution.
I am not sure if I need some addtional configuration steps (what I am using
is pretty minimal), or is there nothing to be done about it short of diving
into Apache or Tomcat code?

Cheers

Steve Slatcher


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




RE: Tomcat 4.1.18 jsp import and include error

2003-01-09 Thread Noel J. Bergman
 I can not use TestData without an import even it is in
 the default package.

OK, let me be clearer.  Consider the following trivial code:

-

nopackage.java:

//package inpackage;

public class nopackage
{
public String s;

public nopackage(String s)
{
this.s = s;
}
}

packagetest.java:

package inpackage;

public class packagetest
{
static public void main(String[] args)
{
nopackage np = new nopackage(args[0]);
System.out.println(np.s);
}
}

-

Try compiling without the package statement.  Then uncomment the package
statement.  See the problem?  Because the test program is in a package, it
cannot access the packageless class.

The same is true of compiled JSP pages.  Because Tomcat puts them in a
package, org.apache.jsp, they cannot access classes that aren't in a
package.

--- Noel


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




Re: JDBCRealm

2003-01-09 Thread Rob Abernethy IV
Clear-text password: tomcat

java org.apache.catalina.RealmBase -a MD5 tomcat
1b359d8753858b55befa0441067aaed3

select passwd from pg_shadow where usename='tomcat'
md5efcc1c51a80be13b59cdb96d758a0184

md5sum -t  tomcat
042d39e062dd4bf342e088dc832526f9

String password = tomcat;
byte[] md_password = password.getBytes();
MessageDigest md = MessageDigest.getInstance(MD5);
byte[] md_hash = md.digest(md_password);
System.out.println(md_hash);
[B@15f5897

So obviously the authentication is failing because the MD5'd passwords don't
match.  Tomcat is calculating the digest using the RealmBase and the digest
stored in the table was created by Postgres.  Is there a reason why these are
all different?

--
Robert Abernethy IV
Dynamic Edge, Inc.
734.975.0460

 - Original Message -
 
  The MD5'd password *is* in the pg_shadow.passwd column.  I don't see what
  I'm doing wrong.
 
 Is Postgres (or anything other than Java) generating the MD5'd 
 passwords for the pg_shadow table?  If so, have you manually 
 generated the MD5's to see if they are the same?
 
 Even if they are you can run into problems with storage formats.  If
 Postgres is using a different char set than the Java JVM for manipulating
 the strings, you can have mismatches.
 
 Also, if you use CHAR instead of  VARCHAR you may have extra spaces 
 stuck on the end of the returned string to pad it out.
 
 The MD5 is longer than the string it is generated from so you need 
 to make sure you have plenty of room for it.
 
 For example if Java is using UTF-8 and Postgres is using Win1251,
  the same character can be represented by different numbers.  You 
 usually see this with special or non-english characters.  Your web 
 app stores a string in the database, then you look at it with a 
 database with a browsing tool and some characters are different or 
 get returned as ???.
 
 This can play hell with MD5 calculations.
 
  And, as far as confusing postgres users with tomcat users,
  is there a problem with using the same user for both?  I kind of thought
  that was the point.  When I create a user, they can use the same username
  and password to access tomcat web apps that they use to connect to the
  database.
 
 That only works if you wait to define connections inside your web 
 app.  This severely limits the effectiveness of connection pools.
 
 That chews up huge amounts of resources in a web app used by lots of 
 users because building and tearing down connections uses a lot of 
 cycles and memory.
 
 Even if you pool in your web app each user will have their own pool 
 and at least one real connection will have to be opened for each user.
 
 You can get around this on some databases if they let you set the 
 role or the user on an open connection.  That is very non-standard 
 and could cause problems if you switch databases.
 
 All users of a web app usually share the same database 
 username/password in a connection pooled environment where you are 
 using a dataSource.  It gets locked in at the time the dataSource is 
 set up.  So all users of the web app have the same read, update, 
 select privleges.  If you want to restrict that on a per user basis 
 you have to enforce that in your web app, usually using Tomcat Roles.
 
 A Tomcat Role differs from a database Role, so you have to be 
 careful there. You may or may not have access to the databases user 
 Role table depending on the database.  The problem is that if your 
 dataSource belongs to user tomcat and user Joe logs into the web 
 app the database may not let tomcat look at Joe's database Roles for 
 security reasons.
 
 
  Thanks for the pointers on security.  Both Tomcat and Postgres are on the
  same server.  I'm also planning on using HTTPS, but apache will handle
 that
  part.  I think it will work something like this:
 
  1. user types username and password (clear-text) into form
  2. web browser encrypts everything and sends it to web server (https)
  3. apache decrypts everything and passes it onto tomcat
  4. tomcat makes a MD5 form of the given password
  5. tomcat compares this with the MD5 password taken from the database
 
  Does that sound right?
 
 Yes, with the caveats above.  Good Luck!
 
 Rick
 
 
  --
  Robert Abernethy IV
  Dynamic Edge, Inc.
  734.975.0460
 
   Yeah, looks like you almost have it.  The MD5'd password should be in
   pg_shadow in the userCredCol, passwd in this case.
  
   Be advised that you should either use only HTTPS for this, or run
   Tomcat on the same server as Postgres, or run them both on a secure
   net behind a firewall on separate machines to prevent your Postgres
   database from being compromised.
  
   MD5 really only prevents snoops on your server from being able to easily
   read the passwords in pg_shadow.
  
   Rick
  
   - Original Message -
  
* Rob Abernethy IV [EMAIL PROTECTED] [0154 21:54]:
 OK. I was able to get clear-text passwords to work, but I still
 can't
   get
 encrypted passwords to work.  Using 

Re: reading forms

2003-01-09 Thread Dan Lipofsky
 for lack of a better description the names are radmonized. This is because
 they are in a hash.

 if you need them in a given order, you may want to number them.

If it is a GET request you can do request.getQueryString()
and parse the query string by hand.  A bit painful and it
doesn't work for POST requests.

 IMHO: if you need the names in order there is a problem with you logic,
 cause there is no gaurentee that the browser will send them in any give
fasion.

unless it is a GET request and the URL is static or constructed
by javascript with the parameters in the URL.  Then you have a
gaurenteed order.
- Dan

 On Thu, 9 Jan 2003, Peter Choe wrote:

 is there a way to specify the order of the parameters are read from a form
 in a servlet?

 it seems that if i do request.getParameterNames() there is no logic to
 which parameters are read first.



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




RE: Virtual hosting and mod_jk

2003-01-09 Thread Noel J. Bergman
 and I am able to access a single virtual host (e.g. myapplication) located
 in the tomcat/webapps/myapplication directory using a url like that:
 http://www.mydomain.com/myapplication/index.jsp

 However I would like to be able to access the files in that directory
 without using the path /myapplication, i.e.

 http://www.mydomain.com/index.jsp

Have you tried to rename myapplication/ to ROOT/, or adjust your Context
path= ... / element?

--- Noel


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




Re: Virtual hosting and mod_jk

2003-01-09 Thread Andoni
It is definitely not necessary to rename the .war file to ROOT.  There is no
special significance in that name.

Andoni.
- Original Message -
From: Noel J. Bergman [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Thursday, January 09, 2003 5:32 PM
Subject: RE: Virtual hosting and mod_jk


  and I am able to access a single virtual host (e.g. myapplication)
located
  in the tomcat/webapps/myapplication directory using a url like that:
  http://www.mydomain.com/myapplication/index.jsp

  However I would like to be able to access the files in that directory
  without using the path /myapplication, i.e.
 
  http://www.mydomain.com/index.jsp

 Have you tried to rename myapplication/ to ROOT/, or adjust your Context
 path= ... / element?

 --- Noel


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




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




Tomcat4.1.x under JDK1.3 vs JDK1.4

2003-01-09 Thread Shrotriya, Sumit
Hi All,

  Are there any differences in using Tomcat4.1.x running under JDK1.3 and
under JDK1.4. If any please do let me know.

Thanks,
~Sumit

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




Re: HTTPS to HTTP

2003-01-09 Thread Craig R. McClanahan


On Thu, 9 Jan 2003, John Holman wrote:

 Date: Thu, 09 Jan 2003 12:56:16 +
 From: John Holman [EMAIL PROTECTED]
 Reply-To: Tomcat Users List [EMAIL PROTECTED]
 To: Tomcat Users List [EMAIL PROTECTED]
 Subject: Re: HTTPS to HTTP

 Yes, that is clearly a risk. The *whole* web application needs have no
 risks in order to allow http access to any of it - any sensitive link
 and it must all be https. (And of course if SSO is enabled *all* web
 applications for the virtual host must be considered safe).
 Otherwise I'm not convinced that session stealing is really a problem -
 though open to counter-arguements.


Consider a scenario where you have admin pages that require SSL, and
normal pages that can run on either.  Assume Tomcat were modified to
migrate your session back.

Consider the following course of events:

* User A logs on, selects link for an admin function,
  and is switched to SSL for that part.

* User A then switches back to non-SSL.  Among other things,
  this means that the session id is now visible in plaintext
  on the wire.

* User B snoops the network, acquires the session id,
  and submits an SSL request (with the stolen session id)
  to an admin function.

* Server blithely executes the forged request, because login
  identity is attached to the session id (which is now
  plaintext -- it wouldn't be if the session had been
  created under SSL and never allowed to switch back).

Once an application has switched from HTTP to HTTPS for a session, it
should be programmed to never go back again.

 John


Craig


 Ralph Einfeldt wrote:

 But be aware that quite simple changes in the
 configuration of tomcat can lead to big security holes.
 Guess what happens if you or somebody else someday
 decides to switch from basic authentification to form
 authentifcation and the sysadmin visits the user side
 and somebody steals the sysadmins session ...)
 
 
 
 -Original Message-
 From: David Hemingway [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, January 09, 2003 12:08 PM
 To: Tomcat Users List
 Subject: Re: HTTPS to HTTP
 
 Thats is my exact situation. The sysadmin section of teh site
 is 100% https.
 but the on the user side there is nothing that sensitive and
 little harm they could be cause stealing someones session.
 It would not be worth going to the trouble of stealing the
 session for the benefit you would get.
 
 
 
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]
 
 
 


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




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




Re: HTTPS to HTTP

2003-01-09 Thread Craig R. McClanahan


On Thu, 9 Jan 2003, John Holman wrote:

 Date: Thu, 09 Jan 2003 12:58:19 +
 From: John Holman [EMAIL PROTECTED]
 Reply-To: Tomcat Users List [EMAIL PROTECTED]
 To: Tomcat Users List [EMAIL PROTECTED]
 Subject: Re: HTTPS to HTTP



 Ralph Einfeldt wrote:

 I don't think that performance is a reason to keep
 the session after a switch because in the most
 applications the amount of protocol switches is
 quite small when compared to the total number of
 requests within one protocol.
 
 Just thinking that the overhead of encrypting data when https is used
 might be a cost that sites with a lot of traffic might prefer to avoid
 by using http for all but the authentication exchange.


The problem with your theory is that its a waste of time to bother doing
the encrypted authentication at all -- it adds zero to the security of the
overall transaction.  In fact, it's worse than that, because it gives you
a *false* sense of security.  :-).

If you're going to support HTTPS-HTTP anyway, you might as well just do
the whole appolication non-SSL.

 John.

Craig



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




RE: Tomcat4.1.x under JDK1.3 vs JDK1.4

2003-01-09 Thread Shah, Sanjay
If you are using SSL than JDK1.4 has required jsse classes within the
package, for jdk-1.3.1 you will require to install it saparately.  Also,
JDK1.4 do not support green threads in case you need it.

-Original Message-
From: Shrotriya, Sumit [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 09, 2003 12:54 PM
To: '[EMAIL PROTECTED]'
Subject: Tomcat4.1.x under JDK1.3 vs JDK1.4


Hi All,

  Are there any differences in using Tomcat4.1.x running under JDK1.3 and
under JDK1.4. If any please do let me know.

Thanks,
~Sumit

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

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




RE: Virtual hosting and mod_jk

2003-01-09 Thread Noel J. Bergman
The default docBase for  is webapps/ROOT/, which is why this:

!--
  Context path= docBase=ROOT debug=0/
--

still happens even though it is commented out.  One can either replace the
contents of ROOT/, or uncomment and modify that Context element.

Did he mention that he was running from a .war?

--- Noel


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




RE: RewriteRules and Standalone Tomcat

2003-01-09 Thread Craig R. McClanahan


On Thu, 9 Jan 2003, neal wrote:

 Date: Thu, 9 Jan 2003 03:54:05 -0800
 From: neal [EMAIL PROTECTED]
 Reply-To: Tomcat Users List [EMAIL PROTECTED]
 To: Tomcat Users List [EMAIL PROTECTED]
 Subject: RE: RewriteRules and Standalone Tomcat

 I'm not presuming its priority #1 always, but yes I am presuming it is a
 very high priority ... but ... 80% of web traffic comes from search engines.

There's no way to back this up with facts, but I would bet you that around
the entire world Tomcat gets 1000s of times more requests from intranet
applications than from Internet apps -- and of course search engines are
totally irrelevant to that environment :-).

Craig


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




RE: HTTPS to HTTP

2003-01-09 Thread Shah, Sanjay

Hello Craig:  

I was reading one of your post in tomcat user archive regarding
implementation of FTP protocol under Catalina.
One of my requirement is exactly the same.

In my case the FTP security and processing needs to be managed on a per
customer basis, however this tends to be closely coupled to the web-app
side. Infect my FTP processing would re-use underlying classes contained in
the client's existing web-app. Hence I would prefer to have a logical
mapping between host-customer. Your mapping approach seems like the way to
go. 

Could you please let me know if you were successful in your effort and if
so, can you give me some details about settings FtpConnector, FtpRequest,
FtpResponse etc.?

Your response is greatly appreciated.

Thanks

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




RE: [OFF-TOPIC] RE: RewriteRules and Standalone Tomcat

2003-01-09 Thread neal
You're comparing apples and oranges .. and pears (staying with the analogies
;-)).  A high profile site of course does not need the engines to the same
extent as a small site.  Additionally, a small site with a mature link base
(100s or 1000s of grade A links) will not recieve as much traffic from them
either.  For a new site (first year or so) its just the opposite.  Besides,
I was including places like Yahoo!, AOL, when I refer to search engine.
Granted these are CPCs (fake search engines) but nonetheless google probably
has 80% of the search engine market ... as for the 80% of traffic coming
from search engines - its a statistic I recently read in a book.  I can look
it up for you if interested.  If sounds though like the truth of this
statistic has a lot to do with whether you're comparing apples ... oranges
... or pears.

As for switching to Apache with 1hr work ... I'm also bucking that just
because (a) my ISP will want to get involved and charge me hourly for the
setup of an addt'l app and (b) I will have to get another $300 SSL cert from
Trawte if I go that road.  Sigh.

Neal

-Original Message-
From: Turner, John [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 09, 2003 5:34 AM
To: 'Tomcat Users List'
Subject: [OFF-TOPIC] RE: RewriteRules and Standalone Tomcat



I'd love to see a cite for 80% of web traffic comes from search engines.
I've worked on plenty of high-traffic public websites in my day, and have
never, ever found that to be the case.  If anything, more traffic comes from
portals such as Yahoo, AOL, and MSN than anywhere else, and by that I mean
direct links from the main page, which cost money.

People don't get to nike.com by typing shoes in a search engine.  Shoes
on Google gets Vegetarian Shoes as the first link.  Yeah, that's relevant.


In my experience, search engine placement as a priority is the technique
used by sites that don't have any money and want traffic for free. Keep in
mind that traffic != sales, and traffic != revenue.  They're not even
directly proportional.

How you drive traffic depends on the target audience. Sometimes its a search
engine, I would say search engines are the last place people look when they
want to spend money.  Search engines are used, in my opinion, by people
looking for information or anything else that's free, not for someplace to
spend money.

CDs at Google doesn't get me Amazon, yet that's the first place I go when
I want to buy a CD from a major artist.  Even a specific artist like Eminem
CD doesn't get me Amazon anywhere near the top of the results.

For us, our Tomcat-based commercial applications are sold face-to-face by
salespeople.

John

 -Original Message-
 From: neal [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, January 09, 2003 6:54 AM
 To: Tomcat Users List
 Subject: RE: RewriteRules and Standalone Tomcat


 I'm not presuming its priority #1 always, but yes I am
 presuming it is a
 very high priority ... but ... 80% of web traffic comes from
 search engines.
 Unless you're one you've got a major print and media
 advertising budget how
 else do you drive traffic?  I suppose there are other
 possible scenarios
 such as Intranets or B2B apps, but I would suspect SEO is a
 significant
 factor for most who would deploy a commercial web application.



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


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




Re: Evaluating jsp inside java

2003-01-09 Thread Craig R. McClanahan


On Thu, 9 Jan 2003, Rami Ojares wrote:

 Date: Thu, 9 Jan 2003 12:06:16 +0200
 From: Rami Ojares [EMAIL PROTECTED]
 Reply-To: Tomcat Users List [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Subject: Evaluating jsp inside java

 Hi

 I am building tag reevaluate which takes it's
 bodycontent and evaluates it as jsp.

 Ex.
 reevaluate
 getSomeDataThatHappensToBeArbitratyJSPWithTagsAndAll /
 /reevaluate

 So in doEndTag() I get the body content and would like to have a method
 like this

 String Jasper.evaluate(String arbitraryJsp, ServletContext sameContext)

 Because I could not decipher Jasper's logic well enough I tried also
 writing body content to temporary file and then including that jsp file
 with RequestDispatcher. But that also gives me error that getOutputStream has 
already been
 called.

 I even tried to implement my own HttpServletResponse that just stores in StringBuffer
 everything that is written to it but that gives some obscure errors too.

 Any ideas/knowledge?


Just a suggestion ... give up on this approach.

If you're going to all the effort to generate something, you might as well
just generate the final HTML directly.  Trying to generate JSP code on the
fly, then compile and execute it, is just going to eat performance for no
good reason.

 - rami

Craig




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




Re: Servlet Mapping Strategy w/ user-specific URLs

2003-01-09 Thread Craig R. McClanahan


On Thu, 9 Jan 2003, Jeffrey Winter wrote:

 Date: Thu, 9 Jan 2003 09:35:09 -0500
 From: Jeffrey Winter [EMAIL PROTECTED]
 Reply-To: Tomcat Users List [EMAIL PROTECTED]
 To: Tomcat Users List [EMAIL PROTECTED]
 Subject: Re: Servlet Mapping Strategy w/ user-specific URLs


  At 01:48 PM 1/8/2003, you wrote:
  So you're talking about using the sorts of Filters available as of the
  Servlet 2.3 spec?  That actually sounds promising, I'll take a look at
 it.
 
  Yep.

 Okay, one question about this: in the Filter, I'd parse the url and
 determine
 which servlet should be the target, either the UserServlet or
 ResourceServlet
 and then create an apporpriate RequestDispatcher.  Then call,

 dispather.forward(...);

 This would happen instead of calling, say,

 chain.doFilter(...);

 So basically, this would need to be the last Filter in any FilterChain that
 I may create, because the chain would be broken since I wouldn't be calling
 doFilter() in that Filter.

 Does this sound about right or is there something I'm missing?

It's perfectly legal for your Filter to return instead of calling
chain.doFilter(), if you know that the response has already been created.
It sounds like you are on a reasonable path.

Regarding how to create the appropriate RequsetDispatcher, there are two
different ways to do that:

  ServletContext.getRequstDispatcher() matches a servlet by path

  ServletContext.getNamedDispatcher() matches a servlet by
  servlet name

You might find the latter one more useful for your use case, since you are
deliberately *not* using request URI mapping to select which servlet to
run.

Craig


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




RE: HELP, PLEASE! Tomcat creates too many threads!

2003-01-09 Thread Craig R. McClanahan


On Thu, 9 Jan 2003, Joao Filipe Placido wrote:

 Date: Thu, 9 Jan 2003 14:58:02 -
 From: Joao Filipe Placido [EMAIL PROTECTED]
 To: 'Craig R. McClanahan' [EMAIL PROTECTED],
  'Tomcat Users List' [EMAIL PROTECTED]
 Subject: RE: HELP, PLEASE! Tomcat creates too many threads!

 Hi,

 When using SingleThreadModel in the servlets, old tomcat threads never die,
 and new threads are created for each request, so I have to restart tomcat
 once in a while. I'm using linux and JDK 1.4.1 with Tomcat 4.1.12.

 Anyone knows how to make old threads get killed?


Using SingleThreadModel (by itself) has no impact on how many threads get
created -- it only affects how many instances of your servlet get created.
(Of course, I think using STM is a bad idea anyway, because it only gives
you a false sense of security about thread safety, but that's a different
issue.)

The only reasonable way to debug this kind of situation is to trigger a
thread dump after you've tried to shut Tomcat down, to see what the
remaining threads are actually doing.  If you're running Tomcat directly
from a console window on Unix, for example, you should be able to press
CTRL+\ (backslash) to trigger the dump.

 Thank you.

 Joao Filipe Placido

Craig


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




Re: DTD for server.xml??

2003-01-09 Thread Craig R. McClanahan


On Thu, 9 Jan 2003, Martin Jacobson wrote:

 Date: Thu, 09 Jan 2003 16:06:27 +0100
 From: Martin Jacobson [EMAIL PROTECTED]
 Reply-To: Tomcat Users List [EMAIL PROTECTED]
 To: Tomcat Users List [EMAIL PROTECTED]
 Subject: Re: DTD for server.xml??

 Craig R. McClanahan wrote:
 
  On Wed, 8 Jan 2003, Turner, John wrote:
 
 
 Date: Wed, 8 Jan 2003 11:31:16 -0500
 From: Turner, John [EMAIL PROTECTED]
 Reply-To: Tomcat Users List [EMAIL PROTECTED]
 To: '[EMAIL PROTECTED]' [EMAIL PROTECTED]
 Subject: DTD for server.xml??
 
 
 Hello -
 
 I notice that the top of web.xml has:
 
 ?xml version=1.0 encoding=ISO-8859-1?
 !DOCTYPE web-app
  PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN
  http://java.sun.com/dtd/web-app_2_3.dtd;
 
 yet the top of server.xml has nothing.
 
 I'm very new to XML, so forgive me if this is a lame or FA question, but is
 there a DTD for server.xml?  If so, why isn't it specified in server.xml,
 and what is the URL?  Is server.xml real, official XML or just
 convenience XML?
 
 
 
  There is no DTD for server.xml because there cannot be.
 
  The problem is that server.xml is extensible -- for example, the set of
  attributes recognized by a Valve or Context element depends on the
  implementation class of the internal component that corresponds to it.
  The startup process uses Java reflection to match them up to property
  setters on the corresponding beans.  There is no way to express this kind
  of thing in a DTD.
 
  Your server.xml is (and must be) well formed XML.  It just cannot be
  validated.
 

 There may be other good reasons, but this isn't one of them :-)
 Here is an extract from my server.xml...
 Logger className=org.apache.catalina.logger.FileLogger
   prefix=catalina_log. suffix=.txt
   timestamp=true
 /

 This could be equally well expressed as
 Logger className=org.apache.catalina.logger.FileLogger
property
  property-nameprefix/property-name
  property-valuecatalina_log./property-value
/property
property
  property-namesuffix/property-name
  property-value.txt/property-value
/property
property
  property-nametimestamp/property-name
  property-valuetrue/property-value
/property
 /Logger

 or, more concisely as

 Logger className=org.apache.catalina.logger.FileLogger
property name=prefix value=catalina_log./
property name=suffix value=.txt/
property name=timestamp value=true/
 /Logger

 In both cases, the abstraction of property names allows a DTD to be
 defined that is inherently extensible, and thus would allow an XML
 parser to validate server.xml even if extended by an admin.

 Or am I missing something?


Well, most people edit server.xml by hand, and even your more concise
version is a lot of extra typing :-).  It also doesn't cover the case
where a Listener element that you might have dynamically creates some
new digester rules (commons-digester is what Tomcat uses to read
server.xml and web.xml files) to recognize additional elements on the fly.

The right answer to editing server.xml files is to not do it -- let a tool
do it for you.  That way, the syntax is irrelevant to the user.

 Martin

Craig



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




Re: iPlanet 6.0 / Tomcat 4.1.18 / W2k

2003-01-09 Thread Charles Baker

--- John P. Dodge [EMAIL PROTECTED]
wrote:
 You are probably going need to compile it yourself
 from the source. I have
 compiled it on Solaris and it is pretty simple, but
 I don't know about
 Win32.
 
 
 On Thu, 9 Jan 2003, Pipho Matt wrote:
 
  We are trying to run Tomcat 4.1.18 as our servlet
 runner with iPlanet 6.0 as
  the web server on a Windows 2000 server.  We have
 iPlanet and Tomcat running
  successfully independently of each other.  We now
 would like to have iPlanet
  forward the servlet requests to Tomcat.
 

I just did an install of iPlanet 6.0 and it includes a
Servlet/JSP container. I'm curious as to why you need
tomcat? I use tomcat with apache in other places, but
this particular job is anti-freesoftware so they
shelled out the bucks for iPlanet.


=
[EMAIL PROTECTED]
http://www.charleshbaker.com/~chb/
If you cannot in the long run tell everyone what you have been doing,
your doing was worthless. -- Edwim Schrodinger

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

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




Re: How to specify a name for a content beeing served by s servlet

2003-01-09 Thread Craig R. McClanahan


On Thu, 9 Jan 2003, Cédric Viaud wrote:

 Date: Thu, 9 Jan 2003 17:24:24 +0100
 From: Cédric Viaud [EMAIL PROTECTED]
 Reply-To: Tomcat Users List [EMAIL PROTECTED]
 To: Tomcat users [EMAIL PROTECTED]
 Subject: How to specify a name for a content beeing served by s servlet

 Hi,

 i would like to know if it is possible to indicate in the HTTP header of
 a response a name for a ressource.

 Let be a little clearer.

 I got a controler servlet wich map all request with *.do. I check the
 URL use the name before the .do to know the command. For exemple, if
 the request is getRequest.do, my servlet look for what to do with
 getRequest.

 My problem is that i use this servlet to serve native contents (such as
 images, video, etc ...). On request like
 getNativeContent.do?id=42135125, my servlet look for the native
 content of id=42135125, and send it back to the client. I set the
 correct content-type and use a ServletOutputStream to send binary
 content.

 It works fine, but i've got a light problem. It seem's that the content
 type is not always used by the client to know wich application must be
 run, but the file name is used (the extension of this filename). Or, the
 filename that the client see is getNativeContent.do and so the
 extension is do. In this case, the user is prompted for which
 application must be associated with the .do extension. More that this,
 if the user want to save it to disk, the defaut name is
 getNativeContent.do.

 Is there a way to indicate a name for the ressource beeing served to the
 client ? I've spent much time on the HTTP RFC, be i can't manage to find
 what i'm looking for.

 Sorry for my awfull English.


Various versions of Internet Explorer are particularly awful about
ignoring the Content-Type header.  However, you might want to look at the
Content-Disposition header in addition, so you can suggest a filename (and
let IE do it's assumptions based on the filename extension):

  Content-Type: image/gif
  Content-Disposition: attachment; filename=foo.gif

There are some security issues surrounding the use of Content-Disposition
-- for more info, see the HTTP/1.1 specification:

  http://www.rfc-editor.org/rfc/rfc2616.txt


 Regards,

 Cédric


Craig



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




Re: reading forms

2003-01-09 Thread Craig R. McClanahan


On Thu, 9 Jan 2003, Peter Choe wrote:

 Date: Thu, 09 Jan 2003 11:40:19 -0500
 From: Peter Choe [EMAIL PROTECTED]
 Reply-To: Tomcat Users List [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Subject: reading forms

 is there a way to specify the order of the parameters are read from a form
 in a servlet?

 it seems that if i do request.getParameterNames() there is no logic to
 which parameters are read first.


There is no guaranteed order.  In fact, there's no guaranteed order for
the client to send request parameters to the server either.

 Peter Choe


Craig


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




RE: Unexpected reload of MainServlet

2003-01-09 Thread Matt Jackson
Thanks,

This seems to be the only option, although I am puzzled why the Tomcat
container would release the reference to the servlet.  Surely the point of
being loaded on Tomcat startup is that servlet object is kept in continuous
reference for the life cycle of the Tomcat instance - thereby never being
garbage collected.

Matt

-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED]]
Sent: 09 January 2003 15:13
To: Tomcat Users List
Subject: RE: Unexpected reload of MainServlet

Hi,
The servlet container is free to destroy and reinitialize servlets,
including load-on-startup servlets.  Tomcat doesn't normally do this,
however.

Could it be you had enough usage to run our of memory, thereby forcing
an aggressive GC?  If you're running with verbose:gc, you'd see an
Unloading [class name of your servlet] message in your console log.

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: Matt Jackson [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 09, 2003 10:07 AM
To: 'Tomcat Users List'
Subject: Unexpected reload of MainServlet

In the middle of a fairly busy day in terms of site activity, our
MainServlet was destroyed and reinitialised unexpectedly.  We have not
experienced any other strange Tomcat behaviour almost a year of
continuous
use and this is our first 'glitch'.  We are using Tomcat 3.2.4 on Suse
7.1.

Does anyone have any pointers as to why this may happen?

TIA

Matt

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


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

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




RE: HTTPS to HTTP

2003-01-09 Thread Craig R. McClanahan
On Thu, 9 Jan 2003, Shah, Sanjay wrote:

 Date: Thu, 9 Jan 2003 13:02:32 -0500
 From: Shah, Sanjay [EMAIL PROTECTED]
 To: 'Tomcat Users List' [EMAIL PROTECTED]
 Cc: 'Craig R. McClanahan' [EMAIL PROTECTED]
 Subject: RE: HTTPS to HTTP


 Hello Craig:

 I was reading one of your post in tomcat user archive regarding
 implementation of FTP protocol under Catalina.
 One of my requirement is exactly the same.

 In my case the FTP security and processing needs to be managed on a per
 customer basis, however this tends to be closely coupled to the web-app
 side. Infect my FTP processing would re-use underlying classes contained in
 the client's existing web-app. Hence I would prefer to have a logical
 mapping between host-customer. Your mapping approach seems like the way to
 go.

 Could you please let me know if you were successful in your effort and if
 so, can you give me some details about settings FtpConnector, FtpRequest,
 FtpResponse etc.?

 Your response is greatly appreciated.

 Thanks


I never went any further than a thought experiment to see if it could be
done.  It also became a much less interesting problem when I remembered
that I could just set up a standard FTP server pointed at the same
directories, giving me FTP access to the files with zero effort modifying
Tomcat.

Craig



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




RE: HTTPS to HTTP

2003-01-09 Thread Shrotriya, Sumit
Craig, 

  I agree with you 100% but there can be a simple solution to the problem
that you just raised..and that is that a new session id is created and
mapped in some table when moving from https--http this way user B can not
get access to the admin page. 

~Sumit 


On Thu, 9 Jan 2003, John Holman wrote:

 Date: Thu, 09 Jan 2003 12:56:16 +
 From: John Holman [EMAIL PROTECTED]
 Reply-To: Tomcat Users List [EMAIL PROTECTED]
 To: Tomcat Users List [EMAIL PROTECTED]
 Subject: Re: HTTPS to HTTP

 Yes, that is clearly a risk. The *whole* web application needs have no
 risks in order to allow http access to any of it - any sensitive link
 and it must all be https. (And of course if SSO is enabled *all* web
 applications for the virtual host must be considered safe).
 Otherwise I'm not convinced that session stealing is really a problem -
 though open to counter-arguements.


Consider a scenario where you have admin pages that require SSL, and
normal pages that can run on either.  Assume Tomcat were modified to
migrate your session back.

Consider the following course of events:

* User A logs on, selects link for an admin function,
  and is switched to SSL for that part.

* User A then switches back to non-SSL.  Among other things,
  this means that the session id is now visible in plaintext
  on the wire.

* User B snoops the network, acquires the session id,
  and submits an SSL request (with the stolen session id)
  to an admin function.

* Server blithely executes the forged request, because login
  identity is attached to the session id (which is now
  plaintext -- it wouldn't be if the session had been
  created under SSL and never allowed to switch back).

Once an application has switched from HTTP to HTTPS for a session, it
should be programmed to never go back again.

 John


Craig


 Ralph Einfeldt wrote:

 But be aware that quite simple changes in the
 configuration of tomcat can lead to big security holes.
 Guess what happens if you or somebody else someday
 decides to switch from basic authentification to form
 authentifcation and the sysadmin visits the user side
 and somebody steals the sysadmins session ...)
 
 
 
 -Original Message-
 From: David Hemingway [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, January 09, 2003 12:08 PM
 To: Tomcat Users List
 Subject: Re: HTTPS to HTTP
 
 Thats is my exact situation. The sysadmin section of teh site
 is 100% https.
 but the on the user side there is nothing that sensitive and
 little harm they could be cause stealing someones session.
 It would not be worth going to the trouble of stealing the
 session for the benefit you would get.
 
 
 
 
 --
 To unsubscribe, e-mail:
mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
mailto:[EMAIL PROTECTED]
 
 
 


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




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

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




RE: HTTPS to HTTP

2003-01-09 Thread Craig R. McClanahan


On Thu, 9 Jan 2003, Shrotriya, Sumit wrote:

 Date: Thu, 9 Jan 2003 12:45:20 -0600
 From: Shrotriya, Sumit [EMAIL PROTECTED]
 Reply-To: Tomcat Users List [EMAIL PROTECTED]
 To: 'Tomcat Users List' [EMAIL PROTECTED]
 Subject: RE: HTTPS to HTTP

 Craig,

   I agree with you 100% but there can be a simple solution to the problem
 that you just raised..and that is that a new session id is created and
 mapped in some table when moving from https--http this way user B can not
 get access to the admin page.


How would this stop B?

After the switch back to HTTP, if a session id works for A it will also
work for B.  It doesn't matter whether it's a real session id or a
mapped session id -- the problem is that B can snoop it in cleartext.

 ~Sumit

Craig




 On Thu, 9 Jan 2003, John Holman wrote:

  Date: Thu, 09 Jan 2003 12:56:16 +
  From: John Holman [EMAIL PROTECTED]
  Reply-To: Tomcat Users List [EMAIL PROTECTED]
  To: Tomcat Users List [EMAIL PROTECTED]
  Subject: Re: HTTPS to HTTP
 
  Yes, that is clearly a risk. The *whole* web application needs have no
  risks in order to allow http access to any of it - any sensitive link
  and it must all be https. (And of course if SSO is enabled *all* web
  applications for the virtual host must be considered safe).
  Otherwise I'm not convinced that session stealing is really a problem -
  though open to counter-arguements.
 

 Consider a scenario where you have admin pages that require SSL, and
 normal pages that can run on either.  Assume Tomcat were modified to
 migrate your session back.

 Consider the following course of events:

 * User A logs on, selects link for an admin function,
   and is switched to SSL for that part.

 * User A then switches back to non-SSL.  Among other things,
   this means that the session id is now visible in plaintext
   on the wire.

 * User B snoops the network, acquires the session id,
   and submits an SSL request (with the stolen session id)
   to an admin function.

 * Server blithely executes the forged request, because login
   identity is attached to the session id (which is now
   plaintext -- it wouldn't be if the session had been
   created under SSL and never allowed to switch back).

 Once an application has switched from HTTP to HTTPS for a session, it
 should be programmed to never go back again.

  John
 

 Craig


  Ralph Einfeldt wrote:
 
  But be aware that quite simple changes in the
  configuration of tomcat can lead to big security holes.
  Guess what happens if you or somebody else someday
  decides to switch from basic authentification to form
  authentifcation and the sysadmin visits the user side
  and somebody steals the sysadmins session ...)
  
  
  
  -Original Message-
  From: David Hemingway [mailto:[EMAIL PROTECTED]]
  Sent: Thursday, January 09, 2003 12:08 PM
  To: Tomcat Users List
  Subject: Re: HTTPS to HTTP
  
  Thats is my exact situation. The sysadmin section of teh site
  is 100% https.
  but the on the user side there is nothing that sensitive and
  little harm they could be cause stealing someones session.
  It would not be worth going to the trouble of stealing the
  session for the benefit you would get.
  
  
  
  
  --
  To unsubscribe, e-mail:
 mailto:[EMAIL PROTECTED]
  For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
  
  
  
 
 
  --
  To unsubscribe, e-mail:
 mailto:[EMAIL PROTECTED]
  For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 
 


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

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




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




RE: Unexpected reload of MainServlet

2003-01-09 Thread Shapira, Yoav
Hi,

Surely the point of
being loaded on Tomcat startup is that servlet object is kept in
continuous
reference for the life cycle of the Tomcat instance - thereby never
being
garbage collected.

Absolutely not.  That's neither the letter nor the spirit of the spec.
It is, however, a fairly common misconception.

If you want something that's loaded on startup of your context and then
stays there until the context is destroyed, use a listener (possibly
one that implements ServletContextListener).

Servlets, including load-on-startup servlets, should not assume they
will be in memory for the lifetime of the server.

Yoav Shapira
Millennium ChemInformatics

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




FTP and Tomcat

2003-01-09 Thread Shah, Sanjay
Craig,

Thanks. What do you mean by standard FTP server?  Is that a separate from
Tomcat?
If so, which FTP server did you use?  Is it possible to integrate that ftp
server to tomcat?
I am trying to give secure ftp access to clients after their authentication.
And I am trying to use tomcat as Request handler server providing
authentication.

Thanks
  

-Original Message-
From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 09, 2003 1:45 PM
To: Shah, Sanjay
Cc: 'Tomcat Users List'
Subject: RE: HTTPS to HTTP


On Thu, 9 Jan 2003, Shah, Sanjay wrote:

 Date: Thu, 9 Jan 2003 13:02:32 -0500
 From: Shah, Sanjay [EMAIL PROTECTED]
 To: 'Tomcat Users List' [EMAIL PROTECTED]
 Cc: 'Craig R. McClanahan' [EMAIL PROTECTED]
 Subject: RE: HTTPS to HTTP


 Hello Craig:

 I was reading one of your post in tomcat user archive regarding
 implementation of FTP protocol under Catalina.
 One of my requirement is exactly the same.

 In my case the FTP security and processing needs to be managed on a per
 customer basis, however this tends to be closely coupled to the web-app
 side. Infect my FTP processing would re-use underlying classes contained
in
 the client's existing web-app. Hence I would prefer to have a logical
 mapping between host-customer. Your mapping approach seems like the way
to
 go.

 Could you please let me know if you were successful in your effort and if
 so, can you give me some details about settings FtpConnector, FtpRequest,
 FtpResponse etc.?

 Your response is greatly appreciated.

 Thanks


I never went any further than a thought experiment to see if it could be
done.  It also became a much less interesting problem when I remembered
that I could just set up a standard FTP server pointed at the same
directories, giving me FTP access to the files with zero effort modifying
Tomcat.

Craig


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




RE: Unexpected reload of MainServlet

2003-01-09 Thread Matt Jackson
Thanks for the clarification.

Matt

-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED]]
Sent: 09 January 2003 18:50
To: Tomcat Users List
Subject: RE: Unexpected reload of MainServlet


Hi,

Surely the point of
being loaded on Tomcat startup is that servlet object is kept in
continuous
reference for the life cycle of the Tomcat instance - thereby never
being
garbage collected.

Absolutely not.  That's neither the letter nor the spirit of the spec.
It is, however, a fairly common misconception.

If you want something that's loaded on startup of your context and then
stays there until the context is destroyed, use a listener (possibly
one that implements ServletContextListener).

Servlets, including load-on-startup servlets, should not assume they
will be in memory for the lifetime of the server.

Yoav Shapira
Millennium ChemInformatics

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

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




Tomcat w/Apache Question

2003-01-09 Thread Wilson, Allen
Has anyone successfully configured Tomcat to with with Apache using the AJP connector.

I am presently trying to set up the connectors with Apache 1.3.20 and everything was
going find until I tried to do the portion for configuring mod_jk.so with the Apache
version.

I received several errors in reference to a C header file socketvar.h.

If someone could provide some insight on what the problem is or information on 
successful
configuring Apache and Tomcat to work together (I am presently using information out of
the Wrox Professional Apache Tomcat book). It would be appreciated

Thank you
Allen

This message may contain proprietary or confidential company information.
Any unauthorized use or disclosure is prohibited.



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


Re: Tomcat w/Apache Question

2003-01-09 Thread Lajos Moczar
Allen -

I have some guides on my site, http://www.galatea.com/flashguides, the 
describe the details of Apache-Tomcat integration. Let me know if they help.

Regards,

Lajos


Wilson, Allen wrote:
Has anyone successfully configured Tomcat to with with Apache using the AJP connector.

I am presently trying to set up the connectors with Apache 1.3.20 and everything was
going find until I tried to do the portion for configuring mod_jk.so with the Apache
version.

I received several errors in reference to a C header file socketvar.h.

If someone could provide some insight on what the problem is or information on successful
configuring Apache and Tomcat to work together (I am presently using information out of
the Wrox Professional Apache Tomcat book). It would be appreciated

Thank you
Allen




This message may contain proprietary or confidential company information.
Any unauthorized use or disclosure is prohibited.






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



--
galatea.com
Cocoon training, consulting  support


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




tomcat 4.1.12 :: connection refused :: missing ContextManager ...

2003-01-09 Thread João Luiz de Brito Macaíba
Hi,

I'm running tomcat 4.1.12 in FreeBSD 4.7. Looking inside
server.xml I cannot find ContextManager neither a explicit bind to 8080.

Since I installed I am not able to get http://localhost:8080. All
I get is a connection refused message.

Does anyone have any idea ?

Thanks in advance,
Macaíba.


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




Problems Starting Server

2003-01-09 Thread Scott Purcell
Hello,

I have a new box that I am configuring.

I installed java jdk1.3.1_06 and set JAVA_HOME to C:\jdk1.3.1_06. and set the path to 
its existance. I can call java or javac and all is happy.

Then I downloaded jakarta-tomcat-4.0.6 on D:\

I unzipped the application and set my path to its lib. When I tried to startup.bat it 
begins to run, then falters. I can see that it found the java_home, etc, but then the 
console just quits.

I then added a CATALINA_HOME which points to the jakarta-tomcat/bin (according to the 
docs) and tried to launch the product. At that point the black cmd window does not 
show up.

I am administrator of the win 2000 box. I looked in all the logs, but I see no errors. 
I tried to  startup and write the STDERR to a file, but it failed also.
startup.bat  C:/dead.log 21

I looked at the conf file, and it is set up to 8080 and there are no other servers on 
this box.?

Any ideas of what road I can try to resolve this?

Thanks,
Scott



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




  1   2   >