Can AccessLogValve Cause Tomcat Performance Hit?

2004-04-07 Thread Dan Barron
Hello,

We are seeing a performance hit to our server whenever we turn on 
AccessLogValve for a virtual host in tomcat. Is this common or has anyone 
else experienced this?  Any suggestions on how to configure for optimal 
performance?

Below is the virtual host entry in server.xml - tomcat is running stand 
alone on a Red Hat 9 Linux box - the box is dedicated to running tomcat - 
there are two virtual hosts configured for the server, and only one has any 
real traffic.

 Host name=www.mysite.net debug=0 appBase=webapps
unpackWARs=true autoDeploy=true
xmlValidation=false xmlNamespaceAware=false
 !-- Aliaswww.mysite.net/Alias --
  Logger className=org.apache.catalina.logger.FileLogger
  directory=logs  prefix=mysite.net. suffix=.txt
  timestamp=true/
  Valve className=org.apache.catalina.valves.AccessLogValve
 directory=logs/mysite.net-acesslogs
 pattern=%t %a %A %h %m %p %U
 prefix=access_log. suffix=.txt
timestamp=true/
  Context path= docBase=mysite.net/production debug=0/
  /Host
Thanks in advance!

Dan Barron
[EMAIL PROTECTED] 

Multiple Paths in one Context

2004-04-07 Thread Ben Janes




Hi,

I would like one webapp to serve multiple paths

so
www.mywebapp.com/fred
and
www.mywebapp.com/fred2

go to the same webapp, I can do this with two contexts I know, however I don't want 
the webapp to
load twice...

Is it possible to do:

Context path=/fred;/fred2 docBase=myFredApp debug=5 
reloadable=true
crossContext=true /

Or is it something else?

Mvh
Benjamin A. Janes

Maersk Data Sverige

M. +46 (0)40-630 04 88
Drottninggatan 18,
S-211 49 Malmö,
Sweden


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



Re: Issues in tomcat 5.0.19

2004-04-07 Thread David Rees
Carl Olivier wrote, On 4/6/2004 10:30 AM:
Could the problem be that too many high processor-requirement threads are
being started, and as such each gets less time on the processor - thus
taking longer to process..and thus, should we not set the AJP worker
maxThreads DOWN thus allowing the processor to finish each processor
intensive task quicker?  Maybe set the acceptCount up.hmmm  - thoughts?
I think you've found the problem.  If you have a page which takes 10s to 
process (and you say that it's CPU bound, not IO bound), once you have 
as many threads running as you have CPUs on your server, that 10s is 
goint to start taking a longer.  You said your server was a single CPU 
machine, so if you're running 2 concurrent threads, now it will take 20s 
per request to process.

There isn't much you can do.  You need to limit the number of concurrent 
requests so that at maximum load, your slow page takes a reasonable time 
to complete.  Once you hit that limit you either need to start queueing 
requests or rejecting them.  If you don't, the server will just bog 
further and further down.  Once you get more than 10 or so CPU hogging 
threads going at a time, performance will really start to degrade and 
requests will take longer than 10x to complete than usual due to context 
switching overhead.

You can limit the number of concurrent requests at the connector level 
and then you might want increase the accept count as you suggested.

The next thing you'll want to do is figure out how to turn those 10s 
page requests into 1s or less.  ;-)

-Dave

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


setting codebase for rmi in servlet running in tomcat does not work

2004-04-07 Thread Markus Reis
dear all,

over the last days i have tried to set up an rmi server in a cocoon 
servlet running in tomcat (4.1.27, started via maven goal appserver:start);
all i want/need to do starting my rmi server is:
(1) start the rmiregistry (via 
LocateRegistry.createRegistry(regPort);  //therefore the classpath 
should be unset
(2) set the java.rmi.server.codebase property to the specific 
webaccessible tomcat folder where my class files reside
(3) create a (remote) object and bind it under a specific servicename to 
the registry

(2) seems to work (if i use 
System.getProperty(java.rmi.server.codebase) the right value is 
displayed), BUT it does NOT
- when a rmiClient tries to get the remote object a 
ClassNotFoundException is thrown (due to not finding the stub class of 
the remote object, which results from the obviously wrong codebase 
property)

if i run the same code ((1)-(3)) outside the cocoon servlet (running in 
tomcat) everything works fine (although i use the same running tomcat 
for dynamically downloading the stub files) !

WHAT am i doing wrong ???
does anybody know if properties can not be set if tomcat is running  or 
if im running a cocoon servlet (running in tomcat) ???

i would greatly appreciate your help
thanks
markus
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: Issues in tomcat 5.0.19

2004-04-07 Thread Carl Olivier
Hi David.

Ok, well I am trying our stress testing out with a LOWER maxThread count and
a higher acceptCount.  Nice to have some confirmation about the theory!
Thanks for your feedback.

Yes - those 10 second pages need to be optimised - the problem is that those
pages are dependant upon data retrieval - with the AMOUNT of data being
variable.  Also the implementation of our tag library by a web developer
could be done in a number of different ways - so we will need to get the
subroutines optimised as much as possible!

Anyway - thanks for your reply - appreciated.

Regards,

Carl

-Original Message-
From: David Rees [mailto:[EMAIL PROTECTED] 
Sent: 07 April 2004 08:59 AM
To: Tomcat Users List
Subject: Re: Issues in tomcat 5.0.19


Carl Olivier wrote, On 4/6/2004 10:30 AM:
 
 Could the problem be that too many high processor-requirement threads 
 are being started, and as such each gets less time on the processor - 
 thus taking longer to process..and thus, should we not set the AJP 
 worker maxThreads DOWN thus allowing the processor to finish each 
 processor intensive task quicker?  Maybe set the acceptCount 
 up.hmmm  - thoughts?

I think you've found the problem.  If you have a page which takes 10s to 
process (and you say that it's CPU bound, not IO bound), once you have 
as many threads running as you have CPUs on your server, that 10s is 
goint to start taking a longer.  You said your server was a single CPU 
machine, so if you're running 2 concurrent threads, now it will take 20s 
per request to process.

There isn't much you can do.  You need to limit the number of concurrent 
requests so that at maximum load, your slow page takes a reasonable time 
to complete.  Once you hit that limit you either need to start queueing 
requests or rejecting them.  If you don't, the server will just bog 
further and further down.  Once you get more than 10 or so CPU hogging 
threads going at a time, performance will really start to degrade and 
requests will take longer than 10x to complete than usual due to context 
switching overhead.

You can limit the number of concurrent requests at the connector level 
and then you might want increase the accept count as you suggested.

The next thing you'll want to do is figure out how to turn those 10s 
page requests into 1s or less.  ;-)

-Dave

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

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



[NON DELIVERY NOTIFICATION]

2004-04-07 Thread postmaster


Din motive de securitate,  serverul de mail nu permite decat
attachment-uri de tip .txt, .doc, .pdf, .xls, .ppt.
VA RUGAM ARHIVATI ORICE ALT TIP DE ATTACHMENT !
(Puteti folosi orice program de arhivare : rar, zip, ace, etc)
 
For security reasons our mail server allows only attached files with
The following extensions : .txt, .doc, .pdf, .xls, .ppt.
PLEASE DO ARCHIVE ALL THE OTHER ATTACHED FILES !

Original message was replaced by this one by the following
reason :

*** A suspicious file (executable code) was found in the message !

Original message had the following attached files :

   (X-FILE ??? ) : message.scr
TYPE : audio/x-wav

   SUSPECT FILES : 1

Original message was sent by

   From : [EMAIL PROTECTED]

If you think this is an error and the message should not
be rejected by the filtering system, you may contact you
system administrator for instructions.

If you have any questions, you can contact us :

  [EMAIL PROTECTED]

Sincerely,

  [EMAIL PROTECTED]



 j-chkmail - (c) Ecole des Mines de Paris 2002


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



secure installation

2004-04-07 Thread Gianni Pucciani
Hi all,
I'm about to install Tomcat under RH9 and I'm not sure about the best 
path installation and way to start, as regards the security.
It is advisable create a new user tomcat and install in /home/tomcat?
And about the way to start automatically? A simple script in init.d 
directory could work well?
Thanks

Gianni

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


RE: JK2 connector built and installed but is there something wrong?

2004-04-07 Thread kwilding
Hi,
   This is a minimalistic workers2.properties. Remember to change  to
your ip address. It works for me on SuSE.
Kevan

# comment these lines out in production
[logger.apache2]
level=DEBUG


[shm]
file=/usr/local/apache2/logs/shm.file
size=1048576

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

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

# Uri mapping
# Add your ip address instead of 
[uri:/*.jsp]
worker=ajp13:localhost:8009


# Define the communication channel 
[channel.socket:localhost:8009]
info=Ajp13 forwarding over socket
tomcatId=localhost:8009
host=127.0.0.1



#This maps to a context test
# in the webapps folder
[uri:/test/*]
worker=ajp13:localhost:8009
info=Map the test system


-Original Message-
From: Kevin Struckhoff [mailto:[EMAIL PROTECTED] 
Sent: 07 April 2004 00:22
To: [EMAIL PROTECTED]
Subject: JK2 connector built and installed but is there something wrong?


After downloading the source and building it, I
finally have mod_jk2 at least loaded into Apache Web
Server 2.0.48.

However, in the docs, it says to add these 2
directives to workers2.properties:

[uri:/examples/*]
worker=ajp13:localhost:8009

When I send the browser to http://localhost/examples/,
I get a -404 error (not found).

What am I missing? Apache starts up just fine.

TIA.

=
Thanks.

Kevin

-- Enjoy Life, Drink and Code Java!

__
Do you Yahoo!?
Yahoo! Small Business $15K Web Design Giveaway 
http://promotions.yahoo.com/design_giveaway/

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


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



Re: providing .png images - CGIServlet

2004-04-07 Thread Alex

No one has come across problems similar to this?  My brain is starting to
hurt.

On Mon, 5 Apr 2004, Alex wrote:

 Date: Mon, 5 Apr 2004 10:39:50 -0400 (EDT)
 From: Alex [EMAIL PROTECTED]
 Reply-To: Tomcat Users List [EMAIL PROTECTED]
 To: Tomcat Users List [EMAIL PROTECTED]
 Subject: providing .png images - CGIServlet


 [system info]
 2 Windows 2000 IIS 5.0 sitting under alteon load balancers providing sticky sessions
 2 Tomcat 5.0.19 application servers connected to the above noted iis servers using 
 the older jk2 isapi dll.
 -- tomcat application servers are using the pooled replication

 The entire application that is running is working perfectly.  No problems
 with exception to providing .png images from a freely available cgi on the
 net called '14all.cgi' --

 I've set the debug level to 99 for the
 org.apache.catalina.servlets.CGIServlet

 I watch the output in localhost_log---.txt and see the .png being created
 and everything happening proper.  headers are set, etc.  in the browser,
 nothing is being displayed.

 in the non clustered application server setup, this all works properly.
 anyone have any ideas?


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



Re: JK2 connector built and installed but is there something wrong?

2004-04-07 Thread Nikola Milutinovic
kwilding wrote:

Hi,
   This is a minimalistic workers2.properties. Remember to change  to
your ip address. It works for me on SuSE.
Kevan
# comment these lines out in production
[logger.apache2]
level=DEBUG
[shm]
file=/usr/local/apache2/logs/shm.file
size=1048576
Is this neccessary?

# Example socket channel, override port and host.
[channel.socket:localhost:8009]
port=8009
host=127.0.0.1
# define the worker
[ajp13:localhost:8009]
channel=channel.socket:localhost:8009
# Uri mapping
# Add your ip address instead of 
[uri:/*.jsp]
worker=ajp13:localhost:8009
# Define the communication channel 
[channel.socket:localhost:8009]
info=Ajp13 forwarding over socket
tomcatId=localhost:8009
host=127.0.0.1
Why the double definition of comm socket? Or is it appended together? Anyway, it 
should be in one section, IMHO.

#This maps to a context test
# in the webapps folder
[uri:/test/*]
worker=ajp13:localhost:8009
info=Map the test system


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


Hi, it's me

2004-04-07 Thread tomcat-user


Norton AntiVirus eliminato1.txt
Description: plain/text
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Re: Where to set JAVA_OPTS

2004-04-07 Thread Giorgio Ponza
[EMAIL PROTECTED] ha scritto:
Hi,
Where do I need to set JAVA_OPTS (Should I edit catalina.bat file?). I am
using Win 2k Pro and Tomcat 5.
Thank you,
Best Regards,
Uma
Hi
usually i put my JAVA_OPTS in catalina.sh (in windows is catalina.bat) 
like this

REM set JAVA_OPTS=-server -Xms128m -Xmx128m -verbose:gc 
-Xrunhprof:cpu=times,depth=6,thread=y,file=C:\log.txt
set JAVA_OPTS=-server -Xms64m -Xmx64m

echo Using CATALINA_BASE:   %CATALINA_BASE%
echo Using CATALINA_HOME:   %CATALINA_HOME%
echo Using CATALINA_TMPDIR: %CATALINA_TMPDIR%
echo Using JAVA_HOME:   %JAVA_HOME%
echo using JAVA_OPTS:   %JAVA_OPTS%
it is used later in lines like
%_EXECJAVA% %JAVA_OPTS% %CATALINA_OPTS% 
Hope i helped u
bye
Giorgio

--
---
Giorgio Ponza
Web Developer
Opla.com Ltd
Tel. +39 011 7506233
Fax. +39 011 746179
http://www.opla.it
---
Ci sono persone che hanno soldi e persone che sono ricche (Coco Chanel)
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: mod_jk leaks file handles on apache graceful restart?

2004-04-07 Thread Paul Mansfield
On Wed, 2004-04-07 at 01:41, David Rees wrote:
 Run strings on your binary and grep for 1.2 `strings mod_jk.so | grep
 1.2`.  The other way is to look at the output of mod_status (commonly
 accessible at http://example.com/server-status)

not forgetting to modify apache.conf (or httpd.conf depending) and
enable server-status and server-info functions, and put your IP address
into the allow.

Paul


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



Bad Class Version while compiling JSP Files on Tomcat

2004-04-07 Thread JavaNetIn
I have j2sdk1.4.2. Exact version information as follows.

java version 1.4.2
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28)
Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed mode)
On Tomcat 4.0-b7, Tomcat 5.0.7  Tomcat 5.0.19 JSP pages couldn't
compile while servlets works fine. Iknow by shifting to jdk1.3.1 this
problem will solve. But I can not do that. Tomcat 5.0.19 is the latest
release build.
Is the same problem everywhere?

To get rid of this should I download whole source code  other huge
libraries  compile it for j2sdk1.4.2.
Or downloading jikes will solve problem?

Error :

J:\Java\Downloads\Tomcat\jakarta-tomcat-5.0.19\work\Catalina\localhost\OnlineExam\org\apache\jsp\AvailableContext_jsp.java:8: 

cannot access java.lang.Object
bad class file: D:\j2sdk1.4.2\jre\lib\rt.jar(java/lang/Object.class)
class file has wrong version 48.0, should be 47.0
Please remove or make sure it appears in the correct subdirectory of the
classpath.
implements org.apache.jasper.runtime.JspSourceDependent {
   ^
1 error


./Nikhil





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


Re: Tomcat configuration

2004-04-07 Thread Harry Mantheakis
Hello Syed Taj


 yeah thats what even i thought, but my web pages are not visible if i put
 myappl directory directly under webapps, only if i put it under ROOT doed
 the server even display the web pages.


You are mistaken. 

Placing your 'myapp' directory under the ROOT context simply means that your
web pages are *nested* in a ROOT context sub-directory.

In other words your web pages are assumed to belong to the ROOT context, and
your 'myapp' folder is treated as a sub-directory and *not* as a separate
context.

By the way, in servlet containers such as Tomcat the word 'context' is
synonymous with the word 'application'. (They mean the same thing.)

If you want to create your *own* separate application (context) then you
must place it under the $CATALINA_HOME/webapps directory - not under ROOT.

One thing you must *not* do is have a ROOT sub-directory that is the same
name as a directory (folder) that represents a context (application) in the
'webapps' directory.

So if your application (context) is called 'banana' then you must not have
this:


$CATALINA_HOME/
|
 webapps/
   |
    ROOT/
   |  |
   |   banana/
   |
    banana/


You should delete the $CATALINA_HOME/webapps/ROOT/banana sub-directory.

Odd as it may seem, you could place a web page called (say) 'yellow.jsp'
under either of the two 'banana' directories shown above and you would call
that page with the same (!) URL:


http://localhost:8080/banana/yellow.jsp


If the 'yellow.jsp' sits under the $CATALINA_HOME/webapps/ROOT/banana
directory then it is treated as belonging to the ROOT context (application).

If 'yellow.jsp' sits under the $CATALINA_HOME/banana directory then it is
treated as belonging to the 'banana' context (application).

The difference is important!

Finally, you say that 'my web pages are not visible if i put myappl
directory directly under webapps'.

All I can suggest is that you are doing something wrong, because this aspect
of Tomcat is rock-solid and works 100%.

So try again, and make sure you do not have a ROOT sub-directory that
conflicts with the name of your 'myapp' context, whatever that is.

If you are still having problems, start a new thread on this forum, giving
all the relevant details, and I'm sure you will be helped.

I'm off on holiday now, so I cannot follow up on this I'm afraid.

Good luck!

Harry


 From: Harry Mantheakis [EMAIL PROTECTED]
 Reply-To: Tomcat Users List [EMAIL PROTECTED]
 To: Tomcat Users List [EMAIL PROTECTED]
 Subject: Re: Tomcat configuration
 Date: Sun, 04 Apr 2004 20:08:19 +0100
 
 Hello
 
 ROOT is the default context (application). By default, ROOT handles
 requests
 that do not specify an application. Hence this URL:
 
 
  http://localhost:8080/
 
 
 Would be handled by the 'ROOT' application, which displays the Tomcat
 welcome page. You can re-configure this, of course, but that is how it is
 set up by default.
 
 Your 'myapplication' directory (and everything it contains) should not be
 located within the ROOT directory. It should be located within the
 'webapps'
 directory.
 
 HTH
 
 Harry


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



Re: UTF-8 encoding

2004-04-07 Thread Harry Mantheakis
Hello Nikki

 Just send UTF8 encoded data and everything will be allright.

Yes, that seems to work for me at the moment, though I am relying on default
settings because I do not even specify UTF-8. (Java defaults to Unicode
anyway.)

I'm only using LATIN-1 characters at the moment, so I cannot comment on what
would happen if I was working with (say) Chinese characters.

I have to leave it at that because this is something I shall be looking into
later.

All the best!

Harry

 Simply I don't get it. You send data over HTTP. You can send data as you
 wish. What about servlet serving images?
 Just send UTF8 encoded data and everything will be allright.
 No way Tomcat knows do you want to send cyrrilic letter or french accent
 letter. It's up to you.
 Niki
 Harry Mantheakis wrote:


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



Re: Can AccessLogValve Cause Tomcat Performance Hit?

2004-04-07 Thread Tim Funk
Yes I can believe there is a performance hit. The valve reparses the string 
on every request. Since the Valve also uses a SimpleDateFormtatter - I think 
it is also restricted by the sync block imposed by that class.

-Tim

Dan Barron wrote:

Hello,

We are seeing a performance hit to our server whenever we turn on 
AccessLogValve for a virtual host in tomcat. Is this common or has 
anyone else experienced this?  Any suggestions on how to configure for 
optimal performance?

Below is the virtual host entry in server.xml - tomcat is running stand 
alone on a Red Hat 9 Linux box - the box is dedicated to running tomcat 
- there are two virtual hosts configured for the server, and only one 
has any real traffic.

 Host name=www.mysite.net debug=0 appBase=webapps
unpackWARs=true autoDeploy=true
xmlValidation=false xmlNamespaceAware=false
 !-- Aliaswww.mysite.net/Alias --
  Logger className=org.apache.catalina.logger.FileLogger
  directory=logs  prefix=mysite.net. suffix=.txt
  timestamp=true/
  Valve className=org.apache.catalina.valves.AccessLogValve
 directory=logs/mysite.net-acesslogs
 pattern=%t %a %A %h %m %p %U
 prefix=access_log. suffix=.txt
timestamp=true/
  Context path= docBase=mysite.net/production debug=0/
  /Host
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Problem with configuing Tomcat

2004-04-07 Thread Michael Forster
I am trying to get Tomcat talking to JBoss through JNDI

How do I do this?

I have looked at the server config and the web.xml files

all to no luck,

In the old config (openejb) there is a definition configured on the Tomcat
for a factory
declaring

parameter
   namefactory/name
valueorg.openejb.client.TomcatEjbFactory/value
/parameter
parameter
nameopenejb.naming.factory.initial/name
valueorg.jnp.interfaces.RemoteInitialContextFactory/value
/parameter

is there a similar one for JBoss?

What else do I need to change to get it working with JBOss?

(I have to use Tomcat 5 rather than the emnbedded tomcat with JBoss as the
embedded version doesnt support SSL properly and crashes.)

Mike.

-BEGIN GEEK CODE BLOCK-
Version: 3.12
GCM d- s:+ a C UL P+ L+++ E--- W+++ N+++ o+ K w
O-- M- V- PS+ PE+ Y+ PGP t+++ 5+++ X- R+++ tv++ h++ DI D++
G e+ h++ r+++ y+++
--END GEEK CODE BLOCK--
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.643 / Virus Database: 411 - Release Date: 25/03/2004


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



Re: Re: Re: Your document

2004-04-07 Thread tomcat-user
Here is the file.

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

Re: Problem with configuing Tomcat

2004-04-07 Thread Adam Hardy
Hi Mike, I'm not familiar with openejb but I assume that you are talking 
about fetching the initial context for JBoss?

Try this in your code:

Hashtable env = new java.util.Hashtable();
env.put(java.naming.factory.initial,
org.jnp.interfaces.NamingContextFactory);
env.put(java.naming.factory.url.pkgs, org.jboss.naming;);
env.put(java.naming.provider.url, jnp://localhost:1099);
InitialContext ic = new InitialContext(env);
Object ref = ic.lookup(ejb/HelloWorld);
Adam

On 04/07/2004 01:28 PM Michael Forster wrote:
I am trying to get Tomcat talking to JBoss through JNDI

How do I do this?

I have looked at the server config and the web.xml files

all to no luck,

In the old config (openejb) there is a definition configured on the Tomcat
for a factory
declaring
parameter
   namefactory/name
valueorg.openejb.client.TomcatEjbFactory/value
/parameter
parameter
nameopenejb.naming.factory.initial/name
valueorg.jnp.interfaces.RemoteInitialContextFactory/value
/parameter
is there a similar one for JBoss?

What else do I need to change to get it working with JBOss?

(I have to use Tomcat 5 rather than the emnbedded tomcat with JBoss as the
embedded version doesnt support SSL properly and crashes.)


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


Re: secure installation

2004-04-07 Thread Parsons Technical Services
Gianni,

From my experience:

User tomcat is created for you.

Place it in whatever directory makes sense to you.(Keep it simple)

Keep the permissions on the tomcat directories tight. Make them only
readable by tomcat etc.

If you need port 80 and 443 start tomcat as a daemon. For details:
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/setup.html

If not, you can use the startup.sh script in the /bin directory. For
details:
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/introduction.html

If you are going to connect to Apache then build Apache yourself or at
minimum add the development rpm, as you will need some components of it
(APR) to build the jk2 connector (not included in the standard Apache
install on RedHat). Advice: read about connector first, then do installs.
For details:
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/index.html

Have fun!

Doug
www.parsonstechnical.com


- Original Message - 
From: Gianni Pucciani [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Wednesday, April 07, 2004 3:43 AM
Subject: secure installation


 Hi all,
 I'm about to install Tomcat under RH9 and I'm not sure about the best
 path installation and way to start, as regards the security.
 It is advisable create a new user tomcat and install in /home/tomcat?
 And about the way to start automatically? A simple script in init.d
 directory could work well?
 Thanks

 Gianni


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





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



Re: Can AccessLogValve Cause Tomcat Performance Hit?

2004-04-07 Thread Remy Maucherat
Tim Funk wrote:
Yes I can believe there is a performance hit. The valve reparses the 
string on every request. Since the Valve also uses a 
SimpleDateFormtatter - I think it is also restricted by the sync block 
imposed by that class.
Another thing: If you enabled host lookup on the connector, it can also 
cause big problems with the access log.

--
x
Rémy Maucherat
Developer  Consultant
JBoss Group (Europe) SàRL
x
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: JK2 connector built and installed but is there something wron g?

2004-04-07 Thread Hamilton, Andrew
try doing this

[uri:/jsp-examples/*]
worker=ajp13:localhost:8009

There is no examples structure.  You can also try servlets-examples.

Drew

-Original Message-
From: Kevin Struckhoff [mailto:[EMAIL PROTECTED]
Sent: Tuesday, April 06, 2004 7:22 PM
To: [EMAIL PROTECTED]
Subject: JK2 connector built and installed but is there something wrong?


After downloading the source and building it, I
finally have mod_jk2 at least loaded into Apache Web
Server 2.0.48.

However, in the docs, it says to add these 2
directives to workers2.properties:

[uri:/examples/*]
worker=ajp13:localhost:8009

When I send the browser to http://localhost/examples/,
I get a -404 error (not found).

What am I missing? Apache starts up just fine.

TIA.

=
Thanks.

Kevin

-- Enjoy Life, Drink and Code Java!

__
Do you Yahoo!?
Yahoo! Small Business $15K Web Design Giveaway 
http://promotions.yahoo.com/design_giveaway/

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


Re: Bad Class Version while compiling JSP Files on Tomcat

2004-04-07 Thread David Smith
Hi.

Sounds to me like your jar files are compiled under different JDKs.  Be 
sure when you install j2sdk1.4.2 to completely replace all files in the 
JDK directory.  I'd actually go so far as to clean install in a separate 
directory (ie /usr/java/j2sdk1.4.2_04) and then symlink j2sdk to it.  
Set JAVA_HOME to j2sdk and it'll find the jdk.  Also be sure all your 
webapp files are compiled under the 1.4.2 JDK.

--David

JavaNetIn wrote:

I have j2sdk1.4.2. Exact version information as follows.

java version 1.4.2
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28)
Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed mode)
On Tomcat 4.0-b7, Tomcat 5.0.7  Tomcat 5.0.19 JSP pages couldn't
compile while servlets works fine. Iknow by shifting to jdk1.3.1 this
problem will solve. But I can not do that. Tomcat 5.0.19 is the latest
release build.
Is the same problem everywhere?

To get rid of this should I download whole source code  other huge
libraries  compile it for j2sdk1.4.2.
Or downloading jikes will solve problem?

Error :

J:\Java\Downloads\Tomcat\jakarta-tomcat-5.0.19\work\Catalina\localhost\OnlineExam\org\apache\jsp\AvailableContext_jsp.java:8: 

cannot access java.lang.Object
bad class file: D:\j2sdk1.4.2\jre\lib\rt.jar(java/lang/Object.class)
class file has wrong version 48.0, should be 47.0
Please remove or make sure it appears in the correct subdirectory of the
classpath.
implements org.apache.jasper.runtime.JspSourceDependent {
   ^
1 error


./Nikhil





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


measure memory

2004-04-07 Thread Salvatierra, Mauricio h \(M.H.\)
  Hi people. I need measure the memory use for my application in the tomcat 4.1.12. 
Some body know how do.
  Thanks and sorry mi inglish

Saludos !!
SALVATIERRA, Mauricio Hugo
Information Technology 
Ford Argentina S.C.A.  
Phono/Fax: 54-11-4756-8750 
mailto: [EMAIL PROTECTED]
Visit our page: http//www.ford.com.ar/


STRICTLY CONFIDENTIAL. The contents of this e-mail and any attachments are strictly 
confidential and property of Ford Argentina S.C.A. They may not be used or disclosed 
by someone who is not a named recipient. If you have received this e-mail in error 
please notify the sender by replying to this email inserting the word Misdirected as 
the message and delete the present message.


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



RE: JK2 connector built and installed but is there something wrong?

2004-04-07 Thread Mark Nye
Hi,
  I had a similar problem.  The line for the uri has to have a directory
that is under $TOMCAT_HOME/webapps.  

[uri:/jsp-examples/*] would require the directory
$TOMCAT_HOME/webapps/jsp-examples.  As Drew said you can try
servlets-examples instead of jsp-examples.  Those directories are under the
webapps folder by default.

Mark

-Original Message-
From: Hamilton, Andrew [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, April 07, 2004 8:28 AM
To: Tomcat Users List
Subject: RE: JK2 connector built and installed but is there something wrong?

try doing this

[uri:/jsp-examples/*]
worker=ajp13:localhost:8009

There is no examples structure.  You can also try servlets-examples.

Drew

-Original Message-
From: Kevin Struckhoff [mailto:[EMAIL PROTECTED]
Sent: Tuesday, April 06, 2004 7:22 PM
To: [EMAIL PROTECTED]
Subject: JK2 connector built and installed but is there something wrong?


After downloading the source and building it, I
finally have mod_jk2 at least loaded into Apache Web
Server 2.0.48.

However, in the docs, it says to add these 2
directives to workers2.properties:

[uri:/examples/*]
worker=ajp13:localhost:8009

When I send the browser to http://localhost/examples/,
I get a -404 error (not found).

What am I missing? Apache starts up just fine.

TIA.

=
Thanks.

Kevin

-- Enjoy Life, Drink and Code Java!

__
Do you Yahoo!?
Yahoo! Small Business $15K Web Design Giveaway 
http://promotions.yahoo.com/design_giveaway/

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


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



Re: secure installation

2004-04-07 Thread Gianni Pucciani
Parsons Technical Services wrote:

Gianni,

From my experience:
User tomcat is created for you.

Place it in whatever directory makes sense to you.(Keep it simple)

Keep the permissions on the tomcat directories tight. Make them only
readable by tomcat etc.
 

Ok, thanks!

Gianni

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


measure memory

2004-04-07 Thread Salvatierra, Mauricio h \(M.H.\)
Hi people. I need measure the memory use for my application in the tomcat 4.1.12. Some 
body know how do.
  Thanks and sorry mi inglish

Saludos !!
SALVATIERRA, Mauricio Hugo
Information Technology 
Ford Argentina S.C.A.  
Phono/Fax: 54-11-4756-8750 
mailto: [EMAIL PROTECTED]
Visit our page: http//www.ford.com.ar/


STRICTLY CONFIDENTIAL. The contents of this e-mail and any attachments are strictly 
confidential and property of Ford Argentina S.C.A. They may not be used or disclosed 
by someone who is not a named recipient. If you have received this e-mail in error 
please notify the sender by replying to this email inserting the word Misdirected as 
the message and delete the present message.




-Original Message-
From: Mark Nye [mailto:[EMAIL PROTECTED]
Sent: Wednesday, April 07, 2004 09:53
To: 'Tomcat Users List'
Subject: RE: JK2 connector built and installed but is there something
wrong?


Hi,
  I had a similar problem.  The line for the uri has to have a directory
that is under $TOMCAT_HOME/webapps.  

[uri:/jsp-examples/*] would require the directory
$TOMCAT_HOME/webapps/jsp-examples.  As Drew said you can try
servlets-examples instead of jsp-examples.  Those directories are under the
webapps folder by default.

Mark

-Original Message-
From: Hamilton, Andrew [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, April 07, 2004 8:28 AM
To: Tomcat Users List
Subject: RE: JK2 connector built and installed but is there something wrong?

try doing this

[uri:/jsp-examples/*]
worker=ajp13:localhost:8009

There is no examples structure.  You can also try servlets-examples.

Drew

-Original Message-
From: Kevin Struckhoff [mailto:[EMAIL PROTECTED]
Sent: Tuesday, April 06, 2004 7:22 PM
To: [EMAIL PROTECTED]
Subject: JK2 connector built and installed but is there something wrong?


After downloading the source and building it, I
finally have mod_jk2 at least loaded into Apache Web
Server 2.0.48.

However, in the docs, it says to add these 2
directives to workers2.properties:

[uri:/examples/*]
worker=ajp13:localhost:8009

When I send the browser to http://localhost/examples/,
I get a -404 error (not found).

What am I missing? Apache starts up just fine.

TIA.

=
Thanks.

Kevin

-- Enjoy Life, Drink and Code Java!

__
Do you Yahoo!?
Yahoo! Small Business $15K Web Design Giveaway 
http://promotions.yahoo.com/design_giveaway/

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


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


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



RE: measure memory

2004-04-07 Thread Carl Olivier
Try:

Runtime runtime = Runtime.getRuntime();
long totalMemory = runtime.totalMemory();
long freeMemory = runtime.freeMemory();

Also Thread counting:

ThreadGroup group = Thread.currentThread().getThreadGroup();
while (group.getParent() != null)
group = group.getParent();

int activeCount = group.activeCount();

Regards,

Carl

-Original Message-
From: Salvatierra, Mauricio h (M.H.) [mailto:[EMAIL PROTECTED] 
Sent: 07 April 2004 02:58 PM
To: Tomcat Users List
Subject: measure memory


Hi people. I need measure the memory use for my application in the tomcat
4.1.12. Some body know how do.
  Thanks and sorry mi inglish

Saludos !!
SALVATIERRA, Mauricio Hugo
Information Technology 
Ford Argentina S.C.A.  
Phono/Fax: 54-11-4756-8750 
mailto: [EMAIL PROTECTED]
Visit our page: http//www.ford.com.ar/



STRICTLY CONFIDENTIAL. The contents of this e-mail and any attachments are
strictly confidential and property of Ford Argentina S.C.A. They may not be
used or disclosed by someone who is not a named recipient. If you have
received this e-mail in error please notify the sender by replying to this
email inserting the word Misdirected as the message and delete the present
message.





-Original Message-
From: Mark Nye [mailto:[EMAIL PROTECTED]
Sent: Wednesday, April 07, 2004 09:53
To: 'Tomcat Users List'
Subject: RE: JK2 connector built and installed but is there something wrong?


Hi,
  I had a similar problem.  The line for the uri has to have a directory
that is under $TOMCAT_HOME/webapps.  

[uri:/jsp-examples/*] would require the directory
$TOMCAT_HOME/webapps/jsp-examples.  As Drew said you can try
servlets-examples instead of jsp-examples.  Those directories are under the
webapps folder by default.

Mark

-Original Message-
From: Hamilton, Andrew [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, April 07, 2004 8:28 AM
To: Tomcat Users List
Subject: RE: JK2 connector built and installed but is there something wrong?

try doing this

[uri:/jsp-examples/*]
worker=ajp13:localhost:8009

There is no examples structure.  You can also try servlets-examples.

Drew

-Original Message-
From: Kevin Struckhoff [mailto:[EMAIL PROTECTED]
Sent: Tuesday, April 06, 2004 7:22 PM
To: [EMAIL PROTECTED]
Subject: JK2 connector built and installed but is there something wrong?


After downloading the source and building it, I
finally have mod_jk2 at least loaded into Apache Web
Server 2.0.48.

However, in the docs, it says to add these 2
directives to workers2.properties:

[uri:/examples/*]
worker=ajp13:localhost:8009

When I send the browser to http://localhost/examples/,
I get a -404 error (not found).

What am I missing? Apache starts up just fine.

TIA.

=
Thanks.

Kevin

-- Enjoy Life, Drink and Code Java!

__
Do you Yahoo!?
Yahoo! Small Business $15K Web Design Giveaway 
http://promotions.yahoo.com/design_giveaway/

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


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


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

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



RE: Can AccessLogValve Cause Tomcat Performance Hit?

2004-04-07 Thread Shapira, Yoav

Hi,
How can you expect the addition of ANY component to the processing
pipeline NOT to cause a performance hit?  Of course AccessLogValve adds
something, nothing comes for free.  You can control the hit by modifying
what you're logging and disabling DNS lookups, as others have suggested.

Yoav Shapira
Millennium Research Informatics


-Original Message-
From: Dan Barron [mailto:[EMAIL PROTECTED]
Sent: Wednesday, April 07, 2004 2:09 AM
To: Tomcat Users List
Cc: Dan Anderson
Subject: Can AccessLogValve Cause Tomcat Performance Hit?

Hello,

We are seeing a performance hit to our server whenever we turn on
AccessLogValve for a virtual host in tomcat. Is this common or has
anyone
else experienced this?  Any suggestions on how to configure for optimal
performance?

Below is the virtual host entry in server.xml - tomcat is running stand
alone on a Red Hat 9 Linux box - the box is dedicated to running tomcat
-
there are two virtual hosts configured for the server, and only one has
any
real traffic.

  Host name=www.mysite.net debug=0 appBase=webapps
 unpackWARs=true autoDeploy=true
 xmlValidation=false xmlNamespaceAware=false
  !-- Aliaswww.mysite.net/Alias --
   Logger className=org.apache.catalina.logger.FileLogger
   directory=logs  prefix=mysite.net. suffix=.txt
   timestamp=true/
   Valve className=org.apache.catalina.valves.AccessLogValve
  directory=logs/mysite.net-acesslogs
  pattern=%t %a %A %h %m %p %U
  prefix=access_log. suffix=.txt
 timestamp=true/
   Context path= docBase=mysite.net/production debug=0/
   /Host

Thanks in advance!

Dan Barron
[EMAIL PROTECTED]



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


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



RE: Is there a tomcat weblog anywhere?

2004-04-07 Thread Shapira, Yoav

Hi,
We have that in the wiki.  A blog would add nothing IMHO, and since it
has a nonzero maintenance cost, why do it?

Yoav Shapira
Millennium Research Informatics


-Original Message-
From: Emerson Cargnin [mailto:[EMAIL PROTECTED]
Sent: Tuesday, April 06, 2004 2:40 PM
To: Tomcat Users List
Subject: Re: Is there a tomcat weblog anywhere?

A tomcat blog would contain a more compact kind of data, as links to
any
tomcat article, news about tomcat, tips about configuration (an unified
jk/jk2 how-to would be great!!), and whatever kind of information that
would be useful to all tomcat users.

LILES, DAVID (CONTRACTOR) wrote:
 How would a blog be any different then this forum? I'm not very
familiar with blogs, but from what I've read, they appear to be
basically a
message board

 -Original Message-
 From: Peter Lin [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, April 06, 2004 12:46 PM
 To: Tomcat Users List; tomcatuser
 Subject: Re: Is there a tomcat weblog anywhere?


 some of the tomcat developers have blogs, but they don't necessarily
talk
about tomcat in their blogs. some do.

 there is not unified tomcat blog site, unless you are proposing to
create
one and let everyone use it :)


 peter


 tomcatuser [EMAIL PROTECTED] wrote:
 I am talking about a weblog about tomcat.



 ---Original Message---

From: Emerson Cargnin
Subject: Re: Is there a tomcat weblog anywhere?
Sent: 06 Apr 2004 16:05:48

you can try a countless of them, i can suggest you personalblog, the
one
I develop and use:

www.sf.net/projects/personalblog

http://echofloripa.sytes.net/

Or you mean a weblog about tomcat?

:)

Shapira, Yoav wrote:

Hi,
Why would we have one?

Yoav Shapira
Millennium Research Informatics




-Original Message-
From: tomcatuser [mailto:[EMAIL PROTECTED]
Sent: Tuesday, April 06, 2004 11:14 AM
To: [EMAIL PROTECTED]
Subject: Is there a tomcat weblog anywhere?

I was wondering if there is any official tomcat weblogs on the
net.

I


have searched and found some peoples individual weblogs, but was

wondering


if there is a more official site.






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



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




--
Emerson Cargnin
Analista de Sistemas
Setor de Desenvolvimento de Sistemas - TRE-SC
tel : (048) - 251-3700 - Ramal 3181

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

 ---Original Message---




 -
 Do you Yahoo!?
 Yahoo! Small Business $15K Web Design Giveaway - Enter today

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




--
Emerson Cargnin
Analista de Sistemas
Setor de Desenvolvimento de Sistemas - TRE-SC
tel : (048) - 251-3700 - Ramal 3181

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




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


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



Hi

2004-04-07 Thread werner S. Teunissen
Hi, 

I  need to setup a tomcat environmet manually,

I run Redhat 7.3 and I want toinstall from scratch not using the rpm's
but use the src's build them and install.

How do I do that?

 

Any suggestions will be very welcome :-)

Thanks in advance

 

 

Wernert 

http://www.de-rommelmarkt.nl http://www.de-rommelmarkt.nl/ 

 

 



RE: measure memory

2004-04-07 Thread Shapira, Yoav

Hi,
Don't apologize for your English ;)

Use java.lang.Runtime#freeMemory/maxMemory/totalMemory methods.

Yoav Shapira
Millennium Research Informatics


-Original Message-
From: Salvatierra, Mauricio h (M.H.) [mailto:[EMAIL PROTECTED]
Sent: Wednesday, April 07, 2004 8:47 AM
To: Tomcat Users List
Subject: measure memory

  Hi people. I need measure the memory use for my application in the
tomcat
4.1.12. Some body know how do.
  Thanks and sorry mi inglish

   Saludos !!
   SALVATIERRA, Mauricio Hugo
   Information Technology
   Ford Argentina S.C.A.
   Phono/Fax: 54-11-4756-8750
   mailto: [EMAIL PROTECTED]
Visit our page: http//www.ford.com.ar/

***

*
STRICTLY CONFIDENTIAL. The contents of this e-mail and any attachments
are
strictly confidential and property of Ford Argentina S.C.A. They may
not be
used or disclosed by someone who is not a named recipient. If you have
received this e-mail in error please notify the sender by replying to
this
email inserting the word Misdirected as the message and delete the
present message.
***

*

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




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


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



RE: Multiple Paths in one Context

2004-04-07 Thread Shapira, Yoav

Hi,

Is it possible to do:

Context path=/fred;/fred2 docBase=myFredApp debug=5
reloadable=true
crossContext=true /

No.  You will need to have one of the contexts simply forward to
another, via methods explained many times on this list including
yesterday.

Yoav Shapira




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


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



Bad Gateway

2004-04-07 Thread tomcat-user


Norton AntiVirus eliminato1.txt
Description: plain/text
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

build from scratch - was Re: Hi

2004-04-07 Thread Paul Mansfield
On Wed, 2004-04-07 at 14:04, werner S. Teunissen wrote:
 Hi, 
 
 I  need to setup a tomcat environmet manually,
 
 I run Redhat 7.3 and I want toinstall from scratch not using the rpm's
 but use the src's build them and install.
 
 How do I do that?
 
there were recent postings on this list only yesterday


top tip: make the subject of emails relevant to the topic

next top tip: check the archives before asking the same old question



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



RE: Bad Class Version while compiling JSP Files on Tomcat

2004-04-07 Thread Caldarale, Charles R
 From: JavaNetIn [mailto:[EMAIL PROTECTED]
 Subject: Bad Class Version while compiling JSP Files on Tomcat
 
 bad class file: D:\j2sdk1.4.2\jre\lib\rt.jar(java/lang/Object.class)
 class file has wrong version 48.0, should be 47.0

This error message is one generated by the javac compiler, and usually indicates that 
you have an old version of tools.jar in the classpath used in starting Tomcat.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and 
is thus for use only by the intended recipient. If you received this in error, please 
contact the sender and delete the e-mail and its attachments from all computers.


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



Tomcat Configuration: help sun.misc.ServiceConfigurationError

2004-04-07 Thread Farid C
Good Morning

I have an application allowing the export of a canvas
as a image png file.

The application can run in standalone mode or as an
applet.

In standalone mode: export drawing as a png file works
fine.

In applet mode (application server tomcat 5.0.18, java
1.4.1)

When I try to use the applet feature export drawing
as a png file: it failed

In the Tomcat log:
I noticed the following line written when I tried to
use to export image applet feature :
199.99.99.9 - - [06/Apr/2004:13:50:38 +0100] HEAD
/webApplication/META-INF/services/javax.imageio.spi.ImageTranscoderSpi
HTTP/1.1 302 -


I have in the java console the following message:
sun.misc.ServiceConfigurationError
javax.imageio.spi.ImageInputStreamSpi:
http://localhost:8080/webApplication/META-INF/services/javax.imageio.spi.ImageInputStreamSpi:4:
Illegal configuration-file syntax
 
at sun.misc.Service.fail(Service.java:129)
 at sun.misc.Service.fail(Service.java:135)
 at sun.misc.Service.parseLine(Service.java:157)
 at sun.misc.Service.parse(Service.java:206)
 at sun.misc.Service.access$100(Service.java:111)
 at
sun.misc.Service$LazyIterator.hasNext(Service.java:257)
 at 
javax.imageio.spi.IIORegistry.registerApplicationClasspathSpis(IIORegistry.java:173)
 at
javax.imageio.spi.IIORegistry.init(IIORegistry.java:113)
 at 
javax.imageio.spi.IIORegistry.getDefaultInstance(IIORegistry.java:134)
 at javax.imageio.ImageIO.clinit(ImageIO.java:46)

any help would be appreciated
thank you 
F








Yahoo! Mail : votre e-mail personnel et gratuit qui vous suit partout ! 
Créez votre Yahoo! Mail sur http://fr.benefits.yahoo.com/

Dialoguez en direct avec vos amis grâce à Yahoo! Messenger !Téléchargez Yahoo! 
Messenger sur http://fr.messenger.yahoo.com

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



CoyoteConnector startup errors

2004-04-07 Thread Randy Paries
 
hello
 
I have rh9, apache 2.0.49 , tomcat 4.1.30 and  j2 connector,  jk2-2.0.4
 
this is a brand new install.
 
I appears to be working but i am getting errors when it starts
 
CoyoteConnector Coyote can't register jmx for protocol
 
I have seen a couple of references to this in the list archives, but have
not seen any solutions.

Has any one rectified this problem?

Thanks
 
randy



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



Re: Where to set JAVA_OPTS

2004-04-07 Thread Jon Wingfield
No need to change the script. I normally set an Environment variable in 
the same place I define JAVA_HOME

Go to Control Panel \ System \ Advanced tab \ Environment variables...
Well, that's where it is on XP, which i'm currently running.
HTH,

Jon

Giorgio Ponza wrote:

[EMAIL PROTECTED] ha scritto:

Hi,
Where do I need to set JAVA_OPTS (Should I edit catalina.bat file?). I am
using Win 2k Pro and Tomcat 5.
Thank you,
Best Regards,
Uma


Hi
usually i put my JAVA_OPTS in catalina.sh (in windows is catalina.bat) 
like this

REM set JAVA_OPTS=-server -Xms128m -Xmx128m -verbose:gc 
-Xrunhprof:cpu=times,depth=6,thread=y,file=C:\log.txt
set JAVA_OPTS=-server -Xms64m -Xmx64m

echo Using CATALINA_BASE:   %CATALINA_BASE%
echo Using CATALINA_HOME:   %CATALINA_HOME%
echo Using CATALINA_TMPDIR: %CATALINA_TMPDIR%
echo Using JAVA_HOME:   %JAVA_HOME%
echo using JAVA_OPTS:   %JAVA_OPTS%
it is used later in lines like
%_EXECJAVA% %JAVA_OPTS% %CATALINA_OPTS% 
Hope i helped u
bye
Giorgio




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


[OT] how to save a form field to client

2004-04-07 Thread Longley, Andrew
Hi all,

Not really a Tomcat question but I'm hoping someone has a good
suggestion.  I have a Tomcat app with a chat client talking to a jabber
chat server.  A business requirement is to be able to click a button to
save the chat transcript to the client hard drive.  The only solution
I've come up with so far is basically submitting the text area as an
input to a servlet, that then saves the file to a temporary directory on
the server and redirects the client request to that file, which would
(hopefully) initiate the save or open dialog we all know and love.

Can this work?  Other ideas?

Thanks!

Andrew Longley
Senior Developer
MindFlow Technologies, Inc.
(972) 930-9988 x139
http://www.mindflow.com



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



request.getUserPrincipal();

2004-04-07 Thread Winter, G (Graeme)
Hi All,

I am trying to perform client authentication using certificates, and I have
made some progress - the certificates are now accepted as OK, which is nice.
Obviously I am using https too...

However, the sting is that the methods

request.getAuthType();
request.getRemoteUser();
request.getUserPrincipal();

All return NULL, which is contrary to the documentation, since I know the
user (i.e. me) has authenticated. clientAuth=true in server.xml.

Anyone else out there had this problem, and more to the point found a
solution?

Cheers,

Graeme

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



Re: Where to set JAVA_OPTS

2004-04-07 Thread Paul Mansfield
On Wed, 2004-04-07 at 14:43, Jon Wingfield wrote:
 No need to change the script. I normally set an Environment variable in 
 the same place I define JAVA_HOME
 
 Go to Control Panel \ System \ Advanced tab \ Environment variables...
 Well, that's where it is on XP, which i'm currently running.

same on Windows 2000




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



Re: Where to set JAVA_OPTS

2004-04-07 Thread Giorgio Ponza
Jon Wingfield ha scritto:
No need to change the script. I normally set an Environment variable in 
the same place I define JAVA_HOME
Go to Control Panel \ System \ Advanced tab \ Environment variables...
Well, that's where it is on XP, which i'm currently running.
HTH,
Jon
I don't think is a good approach, at least for me. An environment 
variable is accessible to all java programs. Modifying the script 
affects only tomcat.
Bye

Giorgio


Giorgio Ponza wrote:

Hi
usually i put my JAVA_OPTS in catalina.sh (in windows is catalina.bat) 
like this

REM set JAVA_OPTS=-server -Xms128m -Xmx128m -verbose:gc 
-Xrunhprof:cpu=times,depth=6,thread=y,file=C:\log.txt
set JAVA_OPTS=-server -Xms64m -Xmx64m

echo Using CATALINA_BASE:   %CATALINA_BASE%
echo Using CATALINA_HOME:   %CATALINA_HOME%
echo Using CATALINA_TMPDIR: %CATALINA_TMPDIR%
echo Using JAVA_HOME:   %JAVA_HOME%
echo using JAVA_OPTS:   %JAVA_OPTS%
it is used later in lines like
%_EXECJAVA% %JAVA_OPTS% %CATALINA_OPTS% 
Hope i helped u
bye
Giorgio




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




--
---
Giorgio Ponza
Web Developer
Opla.com Ltd
Tel. +39 011 7506233
Fax. +39 011 746179
http://www.opla.it
---
Ci sono persone che hanno soldi e persone che sono ricche (Coco Chanel)
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Filter.init and JNDI resources

2004-04-07 Thread Sandy McArthur
I just wrote a Filter that uses a JNDI provided datasource. When I try  
to access that datasource from the Filter.init(...) I get a exception:

Caused by: javax.naming.NamingException: Cannot create resource instance
at  
org.apache.naming.factory.ResourceEnvFactory.getObjectInstance(ResourceE 
nvFactory.java:146)
at  
javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java: 
301)
at  
org.apache.naming.NamingContext.lookup(NamingContext.java:838)
at  
org.apache.naming.NamingContext.lookup(NamingContext.java:185)
at  
org.apache.naming.NamingContext.lookup(NamingContext.java:826)
at  
org.apache.naming.NamingContext.lookup(NamingContext.java:185)
at  
org.apache.naming.NamingContext.lookup(NamingContext.java:826)
at  
org.apache.naming.NamingContext.lookup(NamingContext.java:185)
at  
org.apache.naming.NamingContext.lookup(NamingContext.java:826)
at  
org.apache.naming.NamingContext.lookup(NamingContext.java:198)
at  
org.apache.naming.SelectorContext.lookup(SelectorContext.java:183)
at javax.naming.InitialContext.lookup(InitialContext.java:347)
at  
net.sf.hibernate.connection.DatasourceConnectionProvider.configure(Datas 
ourceConnectionProvider.java:44)
... 23 more

But when I put the same init code in the Filter.doFilter(...) method  
such that it only executes once, but delayed until the webapp has been  
made available I have no problems.

I skimmed the servlet 2.4 spec and found nothing stating the  
availability of JNDI resources at the time a filter is instantiated.

I tried reordering my web.xml so that the resource-env-ref came before  
the problematic filter to no avail.

Does this sound like a bug, an ambiguous part of the Servlet spec,  or  
am I missing something?

Sandy McArthur

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


RE: Where to set JAVA_OPTS

2004-04-07 Thread Shapira, Yoav

Hi,
Yup, same here.  I don't like to rely on the environment.

Yoav Shapira
Millennium Research Informatics


-Original Message-
From: Giorgio Ponza [mailto:[EMAIL PROTECTED]
Sent: Wednesday, April 07, 2004 9:56 AM
To: Tomcat Users List
Subject: Re: Where to set JAVA_OPTS

Jon Wingfield ha scritto:
 No need to change the script. I normally set an Environment variable
in
 the same place I define JAVA_HOME
 Go to Control Panel \ System \ Advanced tab \ Environment
variables...
 Well, that's where it is on XP, which i'm currently running.
 HTH,
 Jon

I don't think is a good approach, at least for me. An environment
variable is accessible to all java programs. Modifying the script
affects only tomcat.
Bye

Giorgio



 Giorgio Ponza wrote:

 Hi
 usually i put my JAVA_OPTS in catalina.sh (in windows is
catalina.bat)
 like this

 REM set JAVA_OPTS=-server -Xms128m -Xmx128m -verbose:gc
 -Xrunhprof:cpu=times,depth=6,thread=y,file=C:\log.txt
 set JAVA_OPTS=-server -Xms64m -Xmx64m

 echo Using CATALINA_BASE:   %CATALINA_BASE%
 echo Using CATALINA_HOME:   %CATALINA_HOME%
 echo Using CATALINA_TMPDIR: %CATALINA_TMPDIR%
 echo Using JAVA_HOME:   %JAVA_HOME%
 echo using JAVA_OPTS:   %JAVA_OPTS%

 it is used later in lines like
 %_EXECJAVA% %JAVA_OPTS% %CATALINA_OPTS% 

 Hope i helped u
 bye

 Giorgio





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





--
---
Giorgio Ponza
Web Developer
Opla.com Ltd
Tel. +39 011 7506233
Fax. +39 011 746179
http://www.opla.it
---
Ci sono persone che hanno soldi e persone che sono ricche (Coco Chanel)

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




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


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



RE: Wrapping Requests and jsp:include

2004-04-07 Thread Mike Curwen
I know that works. My main concern was does tomcat internally construct
a new request. Because then I wouldn't be getting my wrapped request in
the included page.  But it appears to pass along the original request
object (whatever it is).

 -Original Message-
 From: Yan Lin [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, April 07, 2004 12:10 AM
 To: Tomcat Users List
 Subject: Re: Wrapping Requests and jsp:include
 
 
 Hi, I think that's the correct behaviour for
 jsp:include action. The request is shared among all
 the included pages.  If you are still in doubt, you
 can do a simple test by setting a param in your
 request for you main jsp file, then try to retrieve it
 in your included jsp file.  
 
 Hope this helps:).
 
 -Yan
 
 --- Mike Curwen [EMAIL PROTECTED] wrote:
  Hello,
  
  I'm just wanting to check if something is
  consistent with Spec.  I've
  tested code that performs the following, in tomcat
  4.1.29, and it 'works
  as expected'. So I'm curious if this is a
  'guaranteed' behaviour across
  all containers, or if this is one of those fuzzy
  areas, and it just
  happily works in Tomcat.
   
  I am using com.oreilly.servlet to upload files and
  I'm using them
  through a file upload filter and
  MultipartRequestWrapper class
  (borrowing heavily from those available in cos).
   
  in process.jsp:
  --
  %
MultipartRequestWrapper multi =
  (MultipartRequestWrapper) request;
filename = multi.getFilesystemName(image_1);
logger.debug(filename:  + filename);
  %
  
  jsp:include page=someOtherJsp.jsp /
  --
  
  in someOtherJsp.jsp:
  --
  %
MultipartRequestWrapper multi =
  (MultipartRequestWrapper) request;
filename = multi.getFilesystemName(image_1);
logger.debug(filename:  + filename);
  %
  
  
  In my log4j logs:
  DEBUG com.gbim.web.FileUploadFilter - [wrapping
  request]
  DEBUG booster/process.jsp - [filename:
  separator.gif]
  DEBUG booster/someOtherJsp.jsp - [filename:
  separator.gif] 
  
  
  So: I can access the request again, in the included
  file, as a
  MultiPartRequestWrapper.  So when Tomcat, the
  container, makes its
  internal jsp:include request, it passes along the
  *existing* request,
  wrapped and everything, as is. I seemed to recall
  some conversation
  about facades getting in the way, but this has been
  taken care of since
  ? Or was I dreaming? I've googled for this (probably
  imagined)
  conversation, and can't find it.
  
  
  ---
  mike curwen
  intermediate programmer
  globally boundless
  
  204 885-7733  ext 229
  www.globallyboundless.com
  
  
 
 -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail:
  [EMAIL PROTECTED]
  
 
 
 __
 Do you Yahoo!?
 Yahoo! Small Business $15K Web Design Giveaway 
 http://promotions.yahoo.com/design_giveaway/
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


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



RE: Where to set JAVA_OPTS

2004-04-07 Thread ldrobertson

We use the setenv.sh. (tomcat 4.1xxx) for all custom environment variables
as well as java options.  catalina.sh references this script:

# Get standard environment variables
PRGDIR=`dirname $PRG`
CATALINA_HOME=`cd $PRGDIR/.. ; pwd`
if [ -r $CATALINA_HOME/bin/setenv.sh ]; then
  . $CATALINA_HOME/bin/setenv.sh
fi

catalina.bat has a similar reference.



We create a setenv.sh in the bin directory and place ALL environment
variables in it, including CATALINA_OPTS.  Example contents:

export CATALINA_HOME=/usr/local/tomcat

# jvm command line options for tomcat
export CATALINA_OPTS=-mx128m


# db/2 env
export PATH=$PATH:/home/db2inst1/sqllib/bin
export LIBPATH=$LIBPATH:/home/db2inst1/sqllib/lib
export LD_LIBRARY_PATH=/home/db2inst1/sqllib/lib




david




   

  Shapira, Yoav  

  [EMAIL PROTECTED]To:   Tomcat Users List [EMAIL 
PROTECTED]  
  .comcc: 

   Subject:  RE: Where to set JAVA_OPTS

  04/07/2004 09:57 

  AM   

  Please respond to

  Tomcat Users

  List

   

   






Hi,
Yup, same here.  I don't like to rely on the environment.

Yoav Shapira
Millennium Research Informatics


-Original Message-
From: Giorgio Ponza [mailto:[EMAIL PROTECTED]
Sent: Wednesday, April 07, 2004 9:56 AM
To: Tomcat Users List
Subject: Re: Where to set JAVA_OPTS

Jon Wingfield ha scritto:
 No need to change the script. I normally set an Environment variable
in
 the same place I define JAVA_HOME
 Go to Control Panel \ System \ Advanced tab \ Environment
variables...
 Well, that's where it is on XP, which i'm currently running.
 HTH,
 Jon

I don't think is a good approach, at least for me. An environment
variable is accessible to all java programs. Modifying the script
affects only tomcat.
Bye

Giorgio



 Giorgio Ponza wrote:

 Hi
 usually i put my JAVA_OPTS in catalina.sh (in windows is
catalina.bat)
 like this

 REM set JAVA_OPTS=-server -Xms128m -Xmx128m -verbose:gc
 -Xrunhprof:cpu=times,depth=6,thread=y,file=C:\log.txt
 set JAVA_OPTS=-server -Xms64m -Xmx64m

 echo Using CATALINA_BASE:   %CATALINA_BASE%
 echo Using CATALINA_HOME:   %CATALINA_HOME%
 echo Using CATALINA_TMPDIR: %CATALINA_TMPDIR%
 echo Using JAVA_HOME:   %JAVA_HOME%
 echo using JAVA_OPTS:   %JAVA_OPTS%

 it is used later in lines like
 %_EXECJAVA% %JAVA_OPTS% %CATALINA_OPTS% 

 Hope i helped u
 bye

 Giorgio








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



RE: Filter.init and JNDI resources

2004-04-07 Thread Mike Curwen
I've been successful looking up a JNDI datasource from filter init().  I
use Tomcat 4.1.29 on slackware9.  


 -Original Message-
 From: Sandy McArthur [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, April 07, 2004 8:57 AM
 To: [EMAIL PROTECTED]
 Subject: Filter.init and JNDI resources
 
 
 I just wrote a Filter that uses a JNDI provided datasource. 
 When I try  
 to access that datasource from the Filter.init(...) I get a exception:
 
 Caused by: javax.naming.NamingException: Cannot create 
 resource instance
  at  
 org.apache.naming.factory.ResourceEnvFactory.getObjectInstance
 (ResourceE 
 nvFactory.java:146)
  at  
 javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java: 
 301)
  at  
 org.apache.naming.NamingContext.lookup(NamingContext.java:838)
  at  
 org.apache.naming.NamingContext.lookup(NamingContext.java:185)
  at  
 org.apache.naming.NamingContext.lookup(NamingContext.java:826)
  at  
 org.apache.naming.NamingContext.lookup(NamingContext.java:185)
  at  
 org.apache.naming.NamingContext.lookup(NamingContext.java:826)
  at  
 org.apache.naming.NamingContext.lookup(NamingContext.java:185)
  at  
 org.apache.naming.NamingContext.lookup(NamingContext.java:826)
  at  
 org.apache.naming.NamingContext.lookup(NamingContext.java:198)
  at  
 org.apache.naming.SelectorContext.lookup(SelectorContext.java:183)
  at 
 javax.naming.InitialContext.lookup(InitialContext.java:347)
  at  
 net.sf.hibernate.connection.DatasourceConnectionProvider.confi
 gure(Datas 
 ourceConnectionProvider.java:44)
  ... 23 more
 
 But when I put the same init code in the Filter.doFilter(...) method  
 such that it only executes once, but delayed until the webapp 
 has been  
 made available I have no problems.
 
 I skimmed the servlet 2.4 spec and found nothing stating the  
 availability of JNDI resources at the time a filter is instantiated.
 
 I tried reordering my web.xml so that the resource-env-ref 
 came before  
 the problematic filter to no avail.
 
 Does this sound like a bug, an ambiguous part of the Servlet 
 spec,  or  
 am I missing something?
 
 Sandy McArthur
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


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



handling page redirects

2004-04-07 Thread Luc Foisy

I have the following in a jsp file

%@ include file=applicationimports.inc %
%@ include file=connection.inc %
%@ include file=sessioncheck.inc %

%
CustomerHTTPManagementScreen customerHTTPManagementScreen = 
(CustomerHTTPManagementScreen)session.getAttribute(customerHTTPManagementScreen);
if( customerHTTPManagementScreen == null )
{

response.sendRedirect(tmWebApp.getTMTokenizedPageProcessor().tokenizeLink(main.jsp));
return;
}
if( request.getParameter(submit) != null )
{
if( request.getParameter(submit).equals(Modify Order) )
{

response.sendRedirect(tmWebApp.getTMTokenizedPageProcessor().tokenizeLink(orderentry.jsp?OpenOrder=
 + customerHTTPManagementScreen.getOrderHeaderID()));
return;
}
String key;
Hashtable parameters = new Hashtable();
for( Enumeration e = request.getParameterNames(); e.hasMoreElements() 
;)
{
key = (String)e.nextElement();
parameters.put(key, request.getParameter(key));
}
customerHTTPManagementScreen.processPerformed( new 
ProcessEvent(request.getParameter(submit), parameters) );
}

response.sendRedirect(tmWebApp.getTMTokenizedPageProcessor().tokenizeLink(customer.jsp));
%

This file handles the processing for its connected jsp page (it is directed here to do 
the processing).
As you can see near the end is calls processPerformed, that sends the submit to the 
parent class. The parent class then does most of the process, then it is redirected 
back to the connected parent jsp (in this case custoner.jsp)
What I want to do here is get the submit of Modify Order to be handled by my web 
application. My web application main class is tmWebApp, it already has response and 
request available to it, so I could call the redirect from there.

The problem is, this jsp file will then try to redirect the page again on the last 
call. How do I determine if the application already redirected this?

Is my only option to catch an IllegalStateException or check isCommited()? Not as if 
that is a bad idea, but would there be anything else here that would get in my way, 
like is there anything else that would set that response to be commited?

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



RE: Filter.init and JNDI resources

2004-04-07 Thread Shapira, Yoav

Hi,
Me too, though I haven't done it in a while.  What tomcat version are
you using?

 I just wrote a Filter that uses a JNDI provided datasource.
 When I try
 to access that datasource from the Filter.init(...) I get a
exception:

 Caused by: javax.naming.NamingException: Cannot create
 resource instance

Please post the server.xml segment that defines this JNDI resource.

 I tried reordering my web.xml so that the resource-env-ref
 came before the problematic filter to no avail.

This wouldn't make a difference: if your web.xml is valid, it's valid.
If your web.xml is invalid, you would've gotten an error on startup and
not gotten this far.

Yoav Shapira



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


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



catalina.out log

2004-04-07 Thread Rob Wichterman
I am getting these odd logs in the Catalina.out.  

 

67928 7830 1

67928 7830 1

 

I am not sure what they are but I get them often and they always come in
groups of three numbers.

 

Thanks,



Re: Custom session tracking method?

2004-04-07 Thread Sandy McArthur
Since you're rewriting your CGI scripts as servlets, why not modify 
them
to not expect the session-num parameter, and instead get the session ID
via normal java code (request.getSession().getId())?  It's simpler,
standard, less code for you to write and test...
My problem is the client, which is a desktop app, doesn't support 
cookies and uses hardcoded URIs for the cgi's. The app is what uses the 
query parameter session-num for session tracking, otherwise I would 
prefer to use the normal session tracking semantics.

Sandy

For those who didn't see the original post on tomcat-dev:

On Apr 7, 2004, at 8:54 AM, Shapira, Yoav wrote:

Hi,
The reason your approach feels ugly and fragile to you is because it IS
;)  Session-tracking is mandated by a couple of specs (J2EE, Servlet),
and tomcat implements it per the spec.  If you do something different,
you will very likely have misbehaving 3rd party libraries that rely on
proper session tracking behavior.
Since you're rewriting your CGI scripts as servlets, why not modify 
them
to not expect the session-num parameter, and instead get the session ID
via normal java code (request.getSession().getId())?  It's simpler,
standard, less code for you to write and test...

Please continue this discussion on the tomcat-user list, not 
tomcat-dev.

Yoav Shapira
Millennium Research Informatics

-Original Message-
From: Sandy McArthur [mailto:[EMAIL PROTECTED]
Sent: Tuesday, April 06, 2004 5:05 PM
To: [EMAIL PROTECTED]
Subject: Custom session tracking method?
Hi all,

Is there a way to implement custom session tracking at the container
level?
I'm trying to figure out how to implement a custom session tracking
method. I have a legacy client that interacts with a set of cgi 
scripts
and I'd like to port those scripts to servlets. I'm running into a
problem because the client passes session ids as a query parameter
named 'session-num' (e.g.: /update?session-num=TOKEN). The client does
not support cookies and there is no way to tell it use a JSESSIONID
encoded in the path.

I've followed the code as best as I can starting at
org.apache.coyote.tomcat5.CoyoteAdapter parses the JSESSIONID from the
request/cookies to where the org.apache.catalina.Manager fetches the
org.apache.catalina.Session and I don't see anyway to directly 
override
the session tracking behavior.

The best idea I currently have is to use a Valve and a custom Manager
and hope none of the Manager.{create,find}Session() methods are called
before my Valve can parse the request and stuff the session-num in a
ThreadLocal that Manager can use when returning a Session.
That feels ugly and fragile to me. Does anyone have a better solution?

Sandy McArthur


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

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



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


Wiki page on tomcat and PHP

2004-04-07 Thread Shapira, Yoav

Hi,
I've just created a wiki page for integrating tomcat with PHP (without
Apache): http://wiki.apache.org/jakarta-tomcat/UsingPhp.  If you're
interesting in this area, please try it out and report your findings.

Yoav Shapira
Millennium Research Informatics





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


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



TEI Classloading

2004-04-07 Thread Carl Olivier
Hi.
 
With regards the TEI classloading issue I mentioned in my previous mail
(Issues on Tomcat5.0.19) - I *think* that the engine reports this error -
but in previous versions of Tomcat the exception was not thrown (bubbled to
the top) - blocking the running of ANY JSP page referencing the taglib in
question.  Maybe in Tomcat 5.0.19 this exception should be caught and logged
but not thrown all the way to the top?
 
Yoav:  To replicate it is easy of course:
 
Create a custom tag-lib - the tld file and some classes for the tags -
however one or more of your tags MUST have a TEI class in the Tag definition
in the TLD file - but the class file this TEI class entry reference must NOT
exist in the classpath.
 
This *should* cause ANY page that includes/reference the tag library to
throw an exception about not being able to find the TEI class - running in
Tomcat 5.0.19.
 
With regards my reasoning - I deployed a site of ours to JBoss (embedding
Tomcat 4.1.29) today - and noticed that the ENGINE component was reporting
the exception about not finding certain TEI classes - however the webapp
deployment worked fine.
 
Now - I know this is not the error I reported in ym last mail - but it is
related I think.  In my mail I mentioned that on the first request to a site
running on Tomcat 5.0.19 after a restart I SOMETIMES (I would say 30% of the
time) get the same exception - except that the TEI class the exception was
being reported on ACTUALLY DOES exist in the webapp's /WEB-INF/classes path.
 
It seems that the classloader has not finished loading (is that possible?)
at the time that tomcat tries to compile the JSP (which involves parsing any
custom taglibs the page references).
 
Unfortunately I have not got an EASY SMALL replication the the instance
where the the class does exists and the exception is thrown - working on it!
 
Any thoughts will be appreciated.
 
Carl Olivier
Director
tel  +27 21 7955197
fax +27 21 7955212
cell +27 82 7729753
 
[EMAIL PROTECTED]
www.zero-one.co.za
 
developers of the future

01 zero one
-
Confidentiality agreement:  This email contains information which is the
property of Zero One. The information contained herein is confidential and
may not be disclosed to any parties other than the intended recipient
without the express written consent of Zero One.
 


RE: Custom session tracking method?

2004-04-07 Thread Mike Curwen
How does your legacy client *first* get the session id ?

 the client passes session ids as a query 
 parameter named 'session-num'


From whence does the session-num query parameter come?  Does the
legacy client create a random number and use it?  Do the cgi scripts
pass it back on a login of some sort, and then from that point, the
legacy app appends it to any further queries?



 -Original Message-
 From: Sandy McArthur [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, April 07, 2004 10:21 AM
 To: Tomcat Users List
 Subject: Re: Custom session tracking method?
 
 
  Since you're rewriting your CGI scripts as servlets, why not modify
  them
  to not expect the session-num parameter, and instead get 
 the session ID
  via normal java code (request.getSession().getId())?  It's simpler,
  standard, less code for you to write and test...
 
 My problem is the client, which is a desktop app, doesn't support 
 cookies and uses hardcoded URIs for the cgi's. The app is 
 what uses the 
 query parameter session-num for session tracking, otherwise I would 
 prefer to use the normal session tracking semantics.
 
 Sandy
 
 For those who didn't see the original post on tomcat-dev:
 
 On Apr 7, 2004, at 8:54 AM, Shapira, Yoav wrote:
 
  Hi,
  The reason your approach feels ugly and fragile to you is 
 because it 
  IS
  ;)  Session-tracking is mandated by a couple of specs 
 (J2EE, Servlet),
  and tomcat implements it per the spec.  If you do something 
 different,
  you will very likely have misbehaving 3rd party libraries 
 that rely on
  proper session tracking behavior.
 
  Since you're rewriting your CGI scripts as servlets, why not modify
  them
  to not expect the session-num parameter, and instead get 
 the session ID
  via normal java code (request.getSession().getId())?  It's simpler,
  standard, less code for you to write and test...
 
  Please continue this discussion on the tomcat-user list, not
  tomcat-dev.
 
 
  Yoav Shapira
  Millennium Research Informatics
 
 
  -Original Message-
  From: Sandy McArthur [mailto:[EMAIL PROTECTED]
  Sent: Tuesday, April 06, 2004 5:05 PM
  To: [EMAIL PROTECTED]
  Subject: Custom session tracking method?
 
  Hi all,
 
  Is there a way to implement custom session tracking at the 
 container 
  level?
 
  I'm trying to figure out how to implement a custom session 
 tracking 
  method. I have a legacy client that interacts with a set of cgi 
  scripts and I'd like to port those scripts to servlets. 
 I'm running 
  into a problem because the client passes session ids as a query 
  parameter named 'session-num' (e.g.: 
 /update?session-num=TOKEN). The 
  client does not support cookies and there is no way to 
 tell it use a 
  JSESSIONID encoded in the path.
 
  I've followed the code as best as I can starting at 
  org.apache.coyote.tomcat5.CoyoteAdapter parses the JSESSIONID from 
  the request/cookies to where the 
 org.apache.catalina.Manager fetches 
  the org.apache.catalina.Session and I don't see anyway to directly 
  override the session tracking behavior.
 
  The best idea I currently have is to use a Valve and a 
 custom Manager 
  and hope none of the Manager.{create,find}Session() methods are 
  called before my Valve can parse the request and stuff the 
  session-num in a ThreadLocal that Manager can use when 
 returning a 
  Session.
 
  That feels ugly and fragile to me. Does anyone have a better 
  solution?
 
  Sandy McArthur
 
 
 
  This e-mail, including any attachments, is a confidential business
  communication, and may contain information that is confidential, 
  proprietary and/or privileged.  This e-mail is intended 
 only for the 
  individual(s) to whom it is addressed, and may not be 
 saved, copied, 
  printed, disclosed or used by anyone else.  If you are not the(an) 
  intended recipient, please immediately delete this e-mail from your 
  computer system and notify the sender.  Thank you.
 
 
  
 -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


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



RE: TEI Classloading

2004-04-07 Thread Shapira, Yoav

Hi,

Unfortunately I have not got an EASY SMALL replication the the instance
where the the class does exists and the exception is thrown - working
on
it!

Any thoughts will be appreciated.

Thank you for the detailed description.  Make sure you save the message
you sent.  Once you come up with a small WAR that shows the problem,
create a bugzilla issue for it (http://issues.apache.org/bugzilla/),
attach your WAR and the email you just sent.  We will attempt to
reproduce the problem and come up with a solution ;)

Yoav Shapira



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


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



RE: Wrapping Requests and jsp:include

2004-04-07 Thread Yansheng Lin
Hey, you may want to try the question on the dev list.  But IMHO if tomcat does
not follow the spec, then it would be a bug.  um, can you think of any other
ways of retrieving the image without using a wrapper?  if you are simply viewing
the image, there may be a easier way. But I am not sure what you are doing
exactly

-Yan

-Original Message-
From: Mike Curwen [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, April 07, 2004 8:19 AM
To: 'Tomcat Users List'
Subject: RE: Wrapping Requests and jsp:include


I know that works. My main concern was does tomcat internally construct
a new request. Because then I wouldn't be getting my wrapped request in
the included page.  But it appears to pass along the original request
object (whatever it is).

 -Original Message-
 From: Yan Lin [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, April 07, 2004 12:10 AM
 To: Tomcat Users List
 Subject: Re: Wrapping Requests and jsp:include
 
 
 Hi, I think that's the correct behaviour for
 jsp:include action. The request is shared among all
 the included pages.  If you are still in doubt, you
 can do a simple test by setting a param in your
 request for you main jsp file, then try to retrieve it
 in your included jsp file.  
 
 Hope this helps:).
 
 -Yan
 
 --- Mike Curwen [EMAIL PROTECTED] wrote:
  Hello,
  
  I'm just wanting to check if something is
  consistent with Spec.  I've
  tested code that performs the following, in tomcat
  4.1.29, and it 'works
  as expected'. So I'm curious if this is a
  'guaranteed' behaviour across
  all containers, or if this is one of those fuzzy
  areas, and it just
  happily works in Tomcat.
   
  I am using com.oreilly.servlet to upload files and
  I'm using them
  through a file upload filter and
  MultipartRequestWrapper class
  (borrowing heavily from those available in cos).
   
  in process.jsp:
  --
  %
MultipartRequestWrapper multi =
  (MultipartRequestWrapper) request;
filename = multi.getFilesystemName(image_1);
logger.debug(filename:  + filename);
  %
  
  jsp:include page=someOtherJsp.jsp /
  --
  
  in someOtherJsp.jsp:
  --
  %
MultipartRequestWrapper multi =
  (MultipartRequestWrapper) request;
filename = multi.getFilesystemName(image_1);
logger.debug(filename:  + filename);
  %
  
  
  In my log4j logs:
  DEBUG com.gbim.web.FileUploadFilter - [wrapping
  request]
  DEBUG booster/process.jsp - [filename:
  separator.gif]
  DEBUG booster/someOtherJsp.jsp - [filename:
  separator.gif] 
  
  
  So: I can access the request again, in the included
  file, as a
  MultiPartRequestWrapper.  So when Tomcat, the
  container, makes its
  internal jsp:include request, it passes along the
  *existing* request,
  wrapped and everything, as is. I seemed to recall
  some conversation
  about facades getting in the way, but this has been
  taken care of since
  ? Or was I dreaming? I've googled for this (probably
  imagined)
  conversation, and can't find it.
  
  
  ---
  mike curwen
  intermediate programmer
  globally boundless
  
  204 885-7733  ext 229
  www.globallyboundless.com
  
  
 
 -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail:
  [EMAIL PROTECTED]
  
 
 
 __
 Do you Yahoo!?
 Yahoo! Small Business $15K Web Design Giveaway 
 http://promotions.yahoo.com/design_giveaway/
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


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


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



Re: Filter.init and JNDI resources

2004-04-07 Thread Sandy McArthur
On Apr 7, 2004, at 10:40 AM, Shapira, Yoav wrote:

Me too, though I haven't done it in a while.  What tomcat version are
you using?
Tomcat 5.0.19 on Mac OS X.

I just wrote a Filter that uses a JNDI provided datasource.
When I try
to access that datasource from the Filter.init(...) I get a
exception:
Caused by: javax.naming.NamingException: Cannot create
resource instance
Please post the server.xml segment that defines this JNDI resource.
server.xml:

 GlobalNamingResources

Resource name=jdbc/test2
  auth=Container
 scope=Shareable
  type=javax.sql.DataSource
   description=JDBC Connection to the DAAP database/
ResourceParams name=jdbc/test2
parameter
namefactory/name

valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
!-- Validation: 
http://jakarta.apache.org/commons/dbcp/configuration.html --
/parameter

!-- DBCP database connection settings --
parameter
nameurl/name
valuejdbc:postgresql://localhost/test2/value
/parameter
parameter
namedriverClassName/name
valueorg.postgresql.Driver/value
/parameter
parameter
nameusername/name
value[removed]/value
/parameter
parameter
namepassword/name
value[removed]/value
/parameter
!-- DBCP connection pooling options --
parameter
 !-- How long (millis) to wait for a free connection.  
Deafult: indefinatly, current: 5 seconds --
namemaxWait/name
value5000/value
/parameter

parameter
!-- The query that verifies a connection. --
namevalidationQuery/name
valueSELECT version();/value
/parameter
/ResourceParams
  /GlobalNamingResources

[...trimmed...]

DefaultContext
  ResourceLink name=jdbc/test2 global=jdbc/test2 
type=javax.sql.DataSource/
/DefaultContext

web.xml:

  resource-env-ref
descriptionDataSource for the test2 database./description
resource-env-ref-namejdbc/test2/resource-env-ref-name

resource-env-ref-typejavax.sql.DataSource/resource-env-ref-type
/resource-env-ref

I don't think there is a problem with this datasource. I use it both in 
a DataSourceRealm and it works in my webapp except when I try to access 
it in my latest Filter.init(...). I can use it fine in 
Filter.doFilter(...).

I tried reordering my web.xml so that the resource-env-ref
came before the problematic filter to no avail.
This wouldn't make a difference: if your web.xml is valid, it's valid.
If your web.xml is invalid, you would've gotten an error on startup and
not gotten this far.
Yoav Shapira


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


Re: Tomcat and SSL: problem with expiration of VeriSign Global Server ID Intermediate Root

2004-04-07 Thread Jörn Böckenkamp
Hi again,

 Now that the VeriSign Global Server ID Intermediate Root cert
 has expired I have to replace the Intermediate Root cert on the
 server. There is an example on how to replace the cert on an apache
 server on their website (and that works fine), but no instructions
 how to replace it on an standalone tomcat server.

It seems that the only way to solve this problem is to get a new
cert from VeriSign. The german support-team had no problem to give
me a new one for free because they think that the expiration is their
problem, so they do anything to help the customer! To get a new
cert just follow the instructions written down in the tomcat 
documentation (generate key, csr, get csr-response, import response).

Thx again for your replies!

Joern

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



RE: Wrapping Requests and jsp:include

2004-04-07 Thread Mike Curwen
I only wanted to know if Tomcat wrapped the request object in a façade
of some sort, when it does a jsp:include.
 
Maybe I should have just asked that much simpler question. ;)  (Or
looked at the source of a compiled jsp page?)  But well... there's still
the question of that's the way Tomcat does it vs. this is how Resin
does the same thing and whether or not there is a spec mandate to do it
one way or another.

What I'm trying (and succeeding) to do is access a multipart upload from
included jsp files. I just want to make sure this same code would work
'everywhere'.

 -Original Message-
 From: Yansheng Lin [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, April 07, 2004 10:39 AM
 To: 'Tomcat Users List'
 Subject: RE: Wrapping Requests and jsp:include
 
 
 Hey, you may want to try the question on the dev list.  But 
 IMHO if tomcat does not follow the spec, then it would be a 
 bug.  um, can you think of any other ways of retrieving the 
 image without using a wrapper?  if you are simply viewing the 
 image, there may be a easier way. But I am not sure what you 
 are doing exactly
 
 -Yan
 
 -Original Message-
 From: Mike Curwen [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, April 07, 2004 8:19 AM
 To: 'Tomcat Users List'
 Subject: RE: Wrapping Requests and jsp:include
 
 
 I know that works. My main concern was does tomcat 
 internally construct a new request. Because then I wouldn't 
 be getting my wrapped request in the included page.  But it 
 appears to pass along the original request object (whatever it is).
 
  -Original Message-
  From: Yan Lin [mailto:[EMAIL PROTECTED]
  Sent: Wednesday, April 07, 2004 12:10 AM
  To: Tomcat Users List
  Subject: Re: Wrapping Requests and jsp:include
  
  
  Hi, I think that's the correct behaviour for
  jsp:include action. The request is shared among all
  the included pages.  If you are still in doubt, you
  can do a simple test by setting a param in your
  request for you main jsp file, then try to retrieve it
  in your included jsp file.
  
  Hope this helps:).
  
  -Yan
  
  --- Mike Curwen [EMAIL PROTECTED] wrote:
   Hello,
   
   I'm just wanting to check if something is
   consistent with Spec.  I've
   tested code that performs the following, in tomcat
   4.1.29, and it 'works
   as expected'. So I'm curious if this is a
   'guaranteed' behaviour across
   all containers, or if this is one of those fuzzy
   areas, and it just
   happily works in Tomcat.

   I am using com.oreilly.servlet to upload files and
   I'm using them
   through a file upload filter and
   MultipartRequestWrapper class
   (borrowing heavily from those available in cos).

   in process.jsp:
   --
   %
 MultipartRequestWrapper multi =
   (MultipartRequestWrapper) request;
 filename = multi.getFilesystemName(image_1);
 logger.debug(filename:  + filename);
   %
   
   jsp:include page=someOtherJsp.jsp /
   --
   
   in someOtherJsp.jsp:
   --
   %
 MultipartRequestWrapper multi =
   (MultipartRequestWrapper) request;
 filename = multi.getFilesystemName(image_1);
 logger.debug(filename:  + filename);
   %
   
   
   In my log4j logs:
   DEBUG com.gbim.web.FileUploadFilter - [wrapping
   request]
   DEBUG booster/process.jsp - [filename:
   separator.gif]
   DEBUG booster/someOtherJsp.jsp - [filename:
   separator.gif]
   
   
   So: I can access the request again, in the included
   file, as a
   MultiPartRequestWrapper.  So when Tomcat, the
   container, makes its
   internal jsp:include request, it passes along the
   *existing* request,
   wrapped and everything, as is. I seemed to recall
   some conversation
   about facades getting in the way, but this has been
   taken care of since
   ? Or was I dreaming? I've googled for this (probably
   imagined)
   conversation, and can't find it.
   
   
   ---
   mike curwen
   intermediate programmer
   globally boundless
   
   204 885-7733  ext 229
   www.globallyboundless.com
   
   
  
  
 -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: 
 [EMAIL PROTECTED]
   
  
  
  __
  Do you Yahoo!?
  Yahoo! Small Business $15K Web Design Giveaway
  http://promotions.yahoo.com/design_giveaway/
  
  
 -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: 

Re: Custom session tracking method?

2004-04-07 Thread Sandy McArthur
The first request the legacy app makes is to /login which it uses your 
normal Basic authentication which is nice because I can use a standard 
Realm. In the response to /login is a session number the client should 
use along with some data about the user's account. Unfortunately the 
session number must fit in a 4 byte integer in the app. :( After that 
the session is passed around via the session-num query param.

Sandy McArthur

On Apr 7, 2004, at 11:33 AM, Mike Curwen wrote:

How does your legacy client *first* get the session id ?

the client passes session ids as a query
parameter named 'session-num'


From whence does the session-num query parameter come?  Does the
legacy client create a random number and use it?  Do the cgi scripts
pass it back on a login of some sort, and then from that point, the
legacy app appends it to any further queries?


-Original Message-
From: Sandy McArthur [mailto:[EMAIL PROTECTED]
Sent: Wednesday, April 07, 2004 10:21 AM
To: Tomcat Users List
Subject: Re: Custom session tracking method?

Since you're rewriting your CGI scripts as servlets, why not modify
them
to not expect the session-num parameter, and instead get
the session ID
via normal java code (request.getSession().getId())?  It's simpler,
standard, less code for you to write and test...
My problem is the client, which is a desktop app, doesn't support
cookies and uses hardcoded URIs for the cgi's. The app is
what uses the
query parameter session-num for session tracking, otherwise I would
prefer to use the normal session tracking semantics.
Sandy

For those who didn't see the original post on tomcat-dev:

On Apr 7, 2004, at 8:54 AM, Shapira, Yoav wrote:

Hi,
The reason your approach feels ugly and fragile to you is
because it
IS
;)  Session-tracking is mandated by a couple of specs
(J2EE, Servlet),
and tomcat implements it per the spec.  If you do something
different,
you will very likely have misbehaving 3rd party libraries
that rely on
proper session tracking behavior.

Since you're rewriting your CGI scripts as servlets, why not modify
them
to not expect the session-num parameter, and instead get
the session ID
via normal java code (request.getSession().getId())?  It's simpler,
standard, less code for you to write and test...
Please continue this discussion on the tomcat-user list, not
tomcat-dev.
Yoav Shapira
Millennium Research Informatics

-Original Message-
From: Sandy McArthur [mailto:[EMAIL PROTECTED]
Sent: Tuesday, April 06, 2004 5:05 PM
To: [EMAIL PROTECTED]
Subject: Custom session tracking method?
Hi all,

Is there a way to implement custom session tracking at the
container
level?

I'm trying to figure out how to implement a custom session
tracking
method. I have a legacy client that interacts with a set of cgi
scripts and I'd like to port those scripts to servlets.
I'm running
into a problem because the client passes session ids as a query
parameter named 'session-num' (e.g.:
/update?session-num=TOKEN). The
client does not support cookies and there is no way to
tell it use a
JSESSIONID encoded in the path.

I've followed the code as best as I can starting at
org.apache.coyote.tomcat5.CoyoteAdapter parses the JSESSIONID from
the request/cookies to where the
org.apache.catalina.Manager fetches
the org.apache.catalina.Session and I don't see anyway to directly
override the session tracking behavior.
The best idea I currently have is to use a Valve and a
custom Manager
and hope none of the Manager.{create,find}Session() methods are
called before my Valve can parse the request and stuff the
session-num in a ThreadLocal that Manager can use when
returning a
Session.

That feels ugly and fragile to me. Does anyone have a better
solution?
Sandy McArthur


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


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



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


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



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


RE: JK2 connector built and installed but is there something wrong?

2004-04-07 Thread Kevin Struckhoff
OK, well now I know why. I had added an examples
directory and 1 html page under the htdocs dir of my
Apache Webserver. That's because the port number is
8080, not 80. 

Thanks.

--- Mark Nye [EMAIL PROTECTED] wrote:
 Hi,
   I had a similar problem.  The line for the uri has
 to have a directory
 that is under $TOMCAT_HOME/webapps.  
 
 [uri:/jsp-examples/*] would require the directory
 $TOMCAT_HOME/webapps/jsp-examples.  As Drew said you
 can try
 servlets-examples instead of jsp-examples.  Those
 directories are under the
 webapps folder by default.
 
 Mark
 
 -Original Message-
 From: Hamilton, Andrew
 [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, April 07, 2004 8:28 AM
 To: Tomcat Users List
 Subject: RE: JK2 connector built and installed but
 is there something wrong?
 
 try doing this
 
 [uri:/jsp-examples/*]
 worker=ajp13:localhost:8009
 
 There is no examples structure.  You can also try
 servlets-examples.
 
 Drew
 
 -Original Message-
 From: Kevin Struckhoff
 [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, April 06, 2004 7:22 PM
 To: [EMAIL PROTECTED]
 Subject: JK2 connector built and installed but is
 there something wrong?
 
 
 After downloading the source and building it, I
 finally have mod_jk2 at least loaded into Apache Web
 Server 2.0.48.
 
 However, in the docs, it says to add these 2
 directives to workers2.properties:
 
 [uri:/examples/*]
 worker=ajp13:localhost:8009
 
 When I send the browser to
 http://localhost/examples/,
 I get a -404 error (not found).
 
 What am I missing? Apache starts up just fine.
 
 TIA.
 
 =
 Thanks.
 
 Kevin
 
 -- Enjoy Life, Drink and Code Java!
 
 __
 Do you Yahoo!?
 Yahoo! Small Business $15K Web Design Giveaway 
 http://promotions.yahoo.com/design_giveaway/
 

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

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


=
Thanks.

Kevin

-- Enjoy Life, Drink and Code Java!

__
Do you Yahoo!?
Yahoo! Small Business $15K Web Design Giveaway 
http://promotions.yahoo.com/design_giveaway/

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



RE: Connecting the HTTP Server and Tomcat

2004-04-07 Thread Wilson, Allen
Okay...that looks similar to the tomcat 4 information I haveis your
connector working correctly?

-Original Message-
From: Emerson Cargnin [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, April 06, 2004 6:06 PM
To: Tomcat Users List
Subject: Re: Connecting the HTTP Server and Tomcat


My configuration is for tomcat 5:

Service name=Catalina
 Connector acceptCount=100 connectionTimeout=2 
disableUploadTimeout=true port=8080 redirectPort=8443
 /Connector

 Connector port=8009
enableLookups=false redirectPort=8443 debug=0
protocol=AJP/1.3 /

 Engine defaultHost=localhost name=Catalina
   Host appBase=webapps name=localhost
 Logger className=org.apache.catalina.logger.FileLogger 
prefix=localhost_log. suffix=.txt timestamp=true/
...
...

Wilson, Allen wrote:
 Here are the lines.
 
 Connector
 className=org.apache.catalina.connector.http.HttpConnector
port=8080 minProcessors=5
maxProcessors=75
enableLookups=true redirectPort=8443
acceptCount=100 debug=0
 connectionTimeout=2 / 
 
 !-- Define an AJP 1.3 Connector on port 8009 --
 Connector
 className=org.apache.ajp.tomcat4.Ajp13Connector port=8009
 minProcessors=5 maxProcessors=75 acceptCount=10 debug=0/
 
 Let me know if there is something that is incorrect.
 
 -Original Message-
 From: Emerson Cargnin [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, April 06, 2004 4:28 PM
 To: Tomcat Users List
 Subject: Re: Connecting the HTTP Server and Tomcat
 
 
 You said you can connect through port 8009 through the browser???
 The jk protocol is not http, so if the configuration was allright you 
 can't connect through 8009 as http. Maybe the error is at your
 server.xml...
 
 Wilson, Allen wrote:
 
Thanks but this is on a Windows system and will not help...I am on a
Solaris and I have looked at documents like this before and they still
do not give me a definitive way of setting everything and testing
 
 it...
 
Right now I have the HTTP server (port 80), Tomcat (port 8080), and
 
 the
 
connector (8009) running. I even looked at the netstat to see if each
port was available...and they were.

When a do the home page request (http://myserver.com) it works
fine...but if I request the page for the Jetspeed Portal
(http://myserver.com/portal), I get an error. If I request the portal
page through port 8080 it works fine. If I request the same page on
 
 8009
 
it works fine.

In all cases there were no entries in my mod_jk.log.

I am looking for something that will outline the steps for me on a
Solaris machine or at least give me a better way to diagnose what I am
doing wrong



-Original Message-
From: kwilding [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, April 06, 2004 10:55 AM
To: 'Tomcat Users List'
Subject: RE: Connecting the HTTP Server and Tomcat


http://www.greenfieldresearch.ca/technical/jk2_config.html
 
This was a really good starting point. Ignore the fact it talks abut
windows, I imstaled on SuSE8.2 using apache2.0.48 and both tomcat 4
 
 and
 
5
Kevan

-Original Message-
From: Wilson, Allen [mailto:[EMAIL PROTECTED] 
Sent: 06 April 2004 16:42
To: Tomcat Users List
Subject: Connecting the HTTP Server and Tomcat


Good morning
 
Can any provide some assistance on connecting the HTTP server and
 
 Tomcat
 
together. I am using HTTP Server 2.0.48 and Tomcat-4.1.18 on a Sun
Solaris
machine. I think I have everything in place but when the only way I
 
 can
 
reach the Tomcat stuff is my specifying the port number in the URL.
 
Can someone point me in the direction of some How to connect Apache
 
 and
 
Tomcat for Dummies instructions that will provide me some clear steps
and
methods for checking everything out.
 
Thanks...and any help is appreciated.
 
Allen




 


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





 


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


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


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


-- 
Emerson Cargnin
Analista de Sistemas
Setor de Desenvolvimento de Sistemas - TRE-SC
tel : (048) - 251-3700 - Ramal 3181


RE: Custom session tracking method?

2004-04-07 Thread Mike Curwen
So I'd have a servlet mapped to /login.

Protect it with Basic Auth, so that takes care of the Auth, and then
you're passed on to the /login servlet.  This login servlet creates a
new session, and then does one extra step.
It maps in the ServletContext ('application') the custom session-num
you've just created , to the jsessionid.  


your client does not have cookies. It does not have a jsessionid in the
URL either.  So to Tomcat, any subsequent requests would appear to have
no session.  So...

Construct a filter, mapped to '/*' (everything).  In the filter,
retrieve the session-num from the request parameters, lookup the actual
jsessionid from the application context, and then  
This is where it gets fuzzy for me...

1) 'append' the jsessionid as a parameter and doChain() ? (that probably
won't work, jsessionid in the URL is more special than just 'another
parameter').

2) 'rewrite' the URL yourself, placing the jsessionid where it ought to
be
http://www.foo.com/originalURI;jsessionid=56D49A19C332F095C79CABFC621B50
B1.tomcat2?originalParam1=AoriginalParam2=Betc
And then .forwad() this request, but don't doChain().



Is any of that craziness ??




 -Original Message-
 From: Sandy McArthur [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, April 07, 2004 10:45 AM
 To: Tomcat Users List
 Subject: Re: Custom session tracking method?
 
 
 The first request the legacy app makes is to /login which it 
 uses your 
 normal Basic authentication which is nice because I can use a 
 standard 
 Realm. In the response to /login is a session number the 
 client should 
 use along with some data about the user's account. Unfortunately the 
 session number must fit in a 4 byte integer in the app. :( After that 
 the session is passed around via the session-num query param.
 
 Sandy McArthur
 
 On Apr 7, 2004, at 11:33 AM, Mike Curwen wrote:
 
  How does your legacy client *first* get the session id ?
 
  the client passes session ids as a query
  parameter named 'session-num'
 
 
  From whence does the session-num query parameter come?  Does the 
  legacy client create a random number and use it?  Do the 
 cgi scripts 
  pass it back on a login of some sort, and then from that point, the 
  legacy app appends it to any further queries?
 
 
 


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



RE: catalina.out log

2004-04-07 Thread Shapira, Yoav

Hi,
Did you grep your code for System.out/System.err print/println
statements?

Yoav Shapira
Millennium Research Informatics


-Original Message-
From: Rob Wichterman [mailto:[EMAIL PROTECTED]
Sent: Wednesday, April 07, 2004 11:19 AM
To: 'Tomcat Users List'
Subject: catalina.out log

I am getting these odd logs in the Catalina.out.



67928 7830 1

67928 7830 1



I am not sure what they are but I get them often and they always come
in
groups of three numbers.



Thanks,




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


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



RE: hostage to this list

2004-04-07 Thread Yansheng Lin
Hi, This happened to me once when I changed my email address.  But it's wierd
that you didn't get a reply... Maybe tomcat mail server demon doesn't want to
let you go:).

Oh, the address you use to unsubscribe from the list has to be the same as the
one you used to subscribe.

-Yan

-Original Message-
From: Tracy Bost [mailto:[EMAIL PROTECTED] 
Sent: Monday, April 05, 2004 8:16 PM
To: Tomcat Users List
Subject: hostage to this list


I really enjoy this list, but have been trying to unsubscribe several
times today and never receive  a reply back when sending to
[EMAIL PROTECTED] 
  What's the deal here ? Is there no way out ?


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


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



Re: Your document

2004-04-07 Thread craigmcc
Please read the attached file.

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

MX4J 2.0 JRMP on Tomcat 4.1.29

2004-04-07 Thread Boulay Arnaud
I have this exception :

ERROR app MX4j RMI adapter not loaded: javax.management.ReflectionException: null 
nested exception is java.lang.ClassNotFoundException: mx4j.adaptor.rmi.jrmp.JRMPAdaptor

I think it's due to the JSR 160 implementation of MX4 J2.0 that have dropped the 
RMPAdaptor. I can't get an older version of MX4J and I think that RMI adapter for 
using a JMX console like MC4J is a requirement.

I need some help !

Thanks, Regards ,

Arnaud



reload jk2-settings?

2004-04-07 Thread Stefan Burkard
hi tomcat-users

i set up jk2 with apache and tomcat and it works just fine. but now i 
have changed the uri-definitions in workers2.properties. after this i 
restarted apache and tomcat - and nothing changed!

is there any way to explicitly reload the workers2.properties file?

i can remove an entire uri-mapping in the file, restart both apache and 
tomcat - and the removed uri just works fine. like the module uses an 
old version of the file

thanks and greetings
stefan
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


session tracking using uri not cookies (was How can I maintain state with Axis

2004-04-07 Thread Paul Mansfield
With recent discussions about session management, I recalled long time
ago reading about URI rewriting for when the client doesn't handle
cookies properly, and found a useful article about it

http://access1.sun.com/techarticles/sessions.iws.html

URL rewriting is the ability to use sessions and session information if
cookies have been disallowed or are not available on the client.  URL
rewriting can also be useful when, for example, proxy or firewall
servers change or disallow cookies.  Cookies are small bits of data
stored by the client; for example by a Web browser.  

OK, this is for sun's iplanet, but the information might still be
relevant to tomcat.

Paul


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



RE: Connecting the HTTP Server and Tomcat

2004-04-07 Thread Bill Bruns
Allen,

do you have the web server configured to throw the requests over to Tomcat?
In other words, have either Proxy support or else URL Rewriting turned on in
the web server?
Otherwise your HTTP requests default to port 80, so they will be eaten by
the web server and never reach Tomcat,
since Tomcat is listening on ports that the HTTP requests do not come to by
default.

Have you looked at
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/proxy-howto.html
- Bill

-Original Message-
From: Wilson, Allen [mailto:[EMAIL PROTECTED]
Sent: Wednesday, April 07, 2004 8:54 AM
To: Tomcat Users List
Subject: RE: Connecting the HTTP Server and Tomcat


Okay...that looks similar to the tomcat 4 information I haveis your
connector working correctly?

-Original Message-
From: Emerson Cargnin [mailto:[EMAIL PROTECTED]
Sent: Tuesday, April 06, 2004 6:06 PM
To: Tomcat Users List
Subject: Re: Connecting the HTTP Server and Tomcat


My configuration is for tomcat 5:

Service name=Catalina
 Connector acceptCount=100 connectionTimeout=2
disableUploadTimeout=true port=8080 redirectPort=8443
 /Connector

 Connector port=8009
enableLookups=false redirectPort=8443 debug=0
protocol=AJP/1.3 /

 Engine defaultHost=localhost name=Catalina
   Host appBase=webapps name=localhost
 Logger className=org.apache.catalina.logger.FileLogger
prefix=localhost_log. suffix=.txt timestamp=true/
...
...

Wilson, Allen wrote:
 Here are the lines.

 Connector
 className=org.apache.catalina.connector.http.HttpConnector
port=8080 minProcessors=5
maxProcessors=75
enableLookups=true redirectPort=8443
acceptCount=100 debug=0
 connectionTimeout=2 /

 !-- Define an AJP 1.3 Connector on port 8009 --
 Connector
 className=org.apache.ajp.tomcat4.Ajp13Connector port=8009
 minProcessors=5 maxProcessors=75 acceptCount=10 debug=0/

 Let me know if there is something that is incorrect.

 -Original Message-
 From: Emerson Cargnin [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, April 06, 2004 4:28 PM
 To: Tomcat Users List
 Subject: Re: Connecting the HTTP Server and Tomcat


 You said you can connect through port 8009 through the browser???
 The jk protocol is not http, so if the configuration was allright you
 can't connect through 8009 as http. Maybe the error is at your
 server.xml...

 Wilson, Allen wrote:

Thanks but this is on a Windows system and will not help...I am on a
Solaris and I have looked at documents like this before and they still
do not give me a definitive way of setting everything and testing

 it...

Right now I have the HTTP server (port 80), Tomcat (port 8080), and

 the

connector (8009) running. I even looked at the netstat to see if each
port was available...and they were.

When a do the home page request (http://myserver.com) it works
fine...but if I request the page for the Jetspeed Portal
(http://myserver.com/portal), I get an error. If I request the portal
page through port 8080 it works fine. If I request the same page on

 8009

it works fine.

In all cases there were no entries in my mod_jk.log.

I am looking for something that will outline the steps for me on a
Solaris machine or at least give me a better way to diagnose what I am
doing wrong



-Original Message-
From: kwilding [mailto:[EMAIL PROTECTED]
Sent: Tuesday, April 06, 2004 10:55 AM
To: 'Tomcat Users List'
Subject: RE: Connecting the HTTP Server and Tomcat


http://www.greenfieldresearch.ca/technical/jk2_config.html

This was a really good starting point. Ignore the fact it talks abut
windows, I imstaled on SuSE8.2 using apache2.0.48 and both tomcat 4

 and

5
Kevan

-Original Message-
From: Wilson, Allen [mailto:[EMAIL PROTECTED]
Sent: 06 April 2004 16:42
To: Tomcat Users List
Subject: Connecting the HTTP Server and Tomcat


Good morning

Can any provide some assistance on connecting the HTTP server and

 Tomcat

together. I am using HTTP Server 2.0.48 and Tomcat-4.1.18 on a Sun
Solaris
machine. I think I have everything in place but when the only way I

 can

reach the Tomcat stuff is my specifying the port number in the URL.

Can someone point me in the direction of some How to connect Apache

 and

Tomcat for Dummies instructions that will provide me some clear steps
and
methods for checking everything out.

Thanks...and any help is appreciated.

Allen








This message may contain proprietary or confidential company

 information.

Any unauthorized use or disclosure is prohibited.









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






Re: [OT] how to save a form field to client

2004-04-07 Thread Justin Ruthenbeck
Yes, that can work.  A small applet with proper permissions granted would 
do the trick as well.

justin

At 06:45 AM 4/7/2004, you wrote:
Hi all,

Not really a Tomcat question but I'm hoping someone has a good
suggestion.  I have a Tomcat app with a chat client talking to a jabber
chat server.  A business requirement is to be able to click a button to
save the chat transcript to the client hard drive.  The only solution
I've come up with so far is basically submitting the text area as an
input to a servlet, that then saves the file to a temporary directory on
the server and redirects the client request to that file, which would
(hopefully) initiate the save or open dialog we all know and love.
Can this work?  Other ideas?

Thanks!

Andrew Longley
Senior Developer
MindFlow Technologies, Inc.
(972) 930-9988 x139
http://www.mindflow.com


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


__
Justin Ruthenbeck
Software Engineer, NextEngine Inc.
justinr - AT - nextengine DOT com
Confidential. See:
http://www.nextengine.com/confidentiality.php
__
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


JK2 Load Balancing Algorithms.

2004-04-07 Thread Angus Mezick

Is the only available JK2 load balancing algorithm a weighted round
robin?  I would like to switch to one that has a primary server and then
switches to round robin to reach the secondary server when an error is
thrown.  The reason I would like to do this is because we have 5 web
servers each with a apache/tomcat pair fronted by a Cisco Local
Director.  I would like the request to stay on the machine that cisco
sent the request to as long as the local tomcat is accepting requests.
I currely have annecdotal evidence that the current weight round robin
approach is a little flakey and is sending WebServer01 more requests
then are the server's fair share.  I wrote a logging filter and some
RequestHeader statements in the http.conf to try to get hard evidence
that this is happening.

Thanks,
--Angus

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



soft linking of directory in tomcat 4.1.27 is not working for me

2004-04-07 Thread Kam Lung Leung
Hi,

I recently upgraded to tomcat 4.1.27. Some how the soft linking of directory
within my web application directory is no longer accessible from a browser. It
must be configuration issue. Can some please let me know how to configure tomcat
4.1.27 so that it will follow the soft linked directory.

Thank you in advance,
  

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



RE: Connecting the HTTP Server and Tomcat

2004-04-07 Thread Wilson, Allen
Bill..thanks for the reply...

I will read through the link you provide but isn't that what the
connector is supposed to do.

My understanding what that the Apache HTTP server would detect what the
request was (Java or not) and pass it on to Tomcat.
Is this not what the specification of /portal/* ajp13 in the
configuration does.

This is what I got from the document at:

http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/jk.quickhowto.html

Here is a little from one of the pages in that area... (
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/jk/aphowto.html )

In a nutshell a web server is waiting for client HTTP requests. When
these requests arrive the server does whatever is needed to serve the
requests by providing the necessary content. 

Adding a servlet container may somewhat change this behavior. Now the
web server needs also to perform the following: 

Load the servlet container adapter library and initialize it (prior to
serving requests). 
When a request arrives, it needs to check and see if a certain request
belongs to a servlet, if so it needs to let the adapter take the request
and handle it. 
The adapter on the other hand needs to know what requests it is going to
serve, usually based on some pattern in the request URL, and to where to
direct these requests. 


Is this not correct...or am I misunderstanding it



-Original Message-
From: Bill Bruns [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, April 07, 2004 12:26 PM
To: Tomcat Users List
Subject: RE: Connecting the HTTP Server and Tomcat


Allen,

do you have the web server configured to throw the requests over to
Tomcat?
In other words, have either Proxy support or else URL Rewriting turned
on in
the web server?
Otherwise your HTTP requests default to port 80, so they will be eaten
by
the web server and never reach Tomcat,
since Tomcat is listening on ports that the HTTP requests do not come to
by
default.

Have you looked at
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/proxy-howto.html
- Bill

-Original Message-
From: Wilson, Allen [mailto:[EMAIL PROTECTED]
Sent: Wednesday, April 07, 2004 8:54 AM
To: Tomcat Users List
Subject: RE: Connecting the HTTP Server and Tomcat


Okay...that looks similar to the tomcat 4 information I haveis your
connector working correctly?

-Original Message-
From: Emerson Cargnin [mailto:[EMAIL PROTECTED]
Sent: Tuesday, April 06, 2004 6:06 PM
To: Tomcat Users List
Subject: Re: Connecting the HTTP Server and Tomcat


My configuration is for tomcat 5:

Service name=Catalina
 Connector acceptCount=100 connectionTimeout=2
disableUploadTimeout=true port=8080 redirectPort=8443
 /Connector

 Connector port=8009
enableLookups=false redirectPort=8443 debug=0
protocol=AJP/1.3 /

 Engine defaultHost=localhost name=Catalina
   Host appBase=webapps name=localhost
 Logger className=org.apache.catalina.logger.FileLogger
prefix=localhost_log. suffix=.txt timestamp=true/
...
...

Wilson, Allen wrote:
 Here are the lines.

 Connector
 className=org.apache.catalina.connector.http.HttpConnector
port=8080 minProcessors=5
maxProcessors=75
enableLookups=true redirectPort=8443
acceptCount=100 debug=0
 connectionTimeout=2 /

 !-- Define an AJP 1.3 Connector on port 8009 --
 Connector
 className=org.apache.ajp.tomcat4.Ajp13Connector port=8009
 minProcessors=5 maxProcessors=75 acceptCount=10 debug=0/

 Let me know if there is something that is incorrect.

 -Original Message-
 From: Emerson Cargnin [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, April 06, 2004 4:28 PM
 To: Tomcat Users List
 Subject: Re: Connecting the HTTP Server and Tomcat


 You said you can connect through port 8009 through the browser???
 The jk protocol is not http, so if the configuration was allright you
 can't connect through 8009 as http. Maybe the error is at your
 server.xml...

 Wilson, Allen wrote:

Thanks but this is on a Windows system and will not help...I am on a
Solaris and I have looked at documents like this before and they still
do not give me a definitive way of setting everything and testing

 it...

Right now I have the HTTP server (port 80), Tomcat (port 8080), and

 the

connector (8009) running. I even looked at the netstat to see if each
port was available...and they were.

When a do the home page request (http://myserver.com) it works
fine...but if I request the page for the Jetspeed Portal
(http://myserver.com/portal), I get an error. If I request the portal
page through port 8080 it works fine. If I request the same page on

 8009

it works fine.

In all cases there were no entries in my mod_jk.log.

I am looking for something that will outline the steps for me on a
Solaris machine or at least give me a better way to diagnose what I am
doing wrong



-Original Message-
From: kwilding [mailto:[EMAIL 

Hello

2004-04-07 Thread tomcat-user
I hope the patch works.



Se eliminó Norton AntiVirus1.txt
Description: plain/text
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

RE: Connecting the HTTP Server and Tomcat

2004-04-07 Thread Bill Bruns
Allen,

you ask isn't that what the connector is supposed to do,
but the connector is in Tomcat, not in your web server.
It is the web server software that is monitoring port 80,
and that is where your browser sends requests to by default,
so the request must get past the web server first.
To do that you need to tell the web server where to send them, namely to
your Tomcat port.
I think this accounts for the behaviour you told about, namely that
Tomcat responds fine when you specify the port number in your URL.

-Bill

-Original Message-
From: Wilson, Allen [mailto:[EMAIL PROTECTED]
Sent: Wednesday, April 07, 2004 11:32 AM
To: Tomcat Users List; [EMAIL PROTECTED]
Subject: RE: Connecting the HTTP Server and Tomcat


Bill..thanks for the reply...

I will read through the link you provide but isn't that what the
connector is supposed to do.

My understanding what that the Apache HTTP server would detect what the
request was (Java or not) and pass it on to Tomcat.
Is this not what the specification of /portal/* ajp13 in the
configuration does.

This is what I got from the document at:

http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/jk.quickhowto.html

Here is a little from one of the pages in that area... (
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/jk/aphowto.html )

In a nutshell a web server is waiting for client HTTP requests. When
these requests arrive the server does whatever is needed to serve the
requests by providing the necessary content.

Adding a servlet container may somewhat change this behavior. Now the
web server needs also to perform the following:

Load the servlet container adapter library and initialize it (prior to
serving requests).
When a request arrives, it needs to check and see if a certain request
belongs to a servlet, if so it needs to let the adapter take the request
and handle it.
The adapter on the other hand needs to know what requests it is going to
serve, usually based on some pattern in the request URL, and to where to
direct these requests.


Is this not correct...or am I misunderstanding it



-Original Message-
From: Bill Bruns [mailto:[EMAIL PROTECTED]
Sent: Wednesday, April 07, 2004 12:26 PM
To: Tomcat Users List
Subject: RE: Connecting the HTTP Server and Tomcat


Allen,

do you have the web server configured to throw the requests over to
Tomcat?
In other words, have either Proxy support or else URL Rewriting turned
on in
the web server?
Otherwise your HTTP requests default to port 80, so they will be eaten
by
the web server and never reach Tomcat,
since Tomcat is listening on ports that the HTTP requests do not come to
by
default.

Have you looked at
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/proxy-howto.html
- Bill

-Original Message-
From: Wilson, Allen [mailto:[EMAIL PROTECTED]
Sent: Wednesday, April 07, 2004 8:54 AM
To: Tomcat Users List
Subject: RE: Connecting the HTTP Server and Tomcat


Okay...that looks similar to the tomcat 4 information I haveis your
connector working correctly?

-Original Message-
From: Emerson Cargnin [mailto:[EMAIL PROTECTED]
Sent: Tuesday, April 06, 2004 6:06 PM
To: Tomcat Users List
Subject: Re: Connecting the HTTP Server and Tomcat


My configuration is for tomcat 5:

Service name=Catalina
 Connector acceptCount=100 connectionTimeout=2
disableUploadTimeout=true port=8080 redirectPort=8443
 /Connector

 Connector port=8009
enableLookups=false redirectPort=8443 debug=0
protocol=AJP/1.3 /

 Engine defaultHost=localhost name=Catalina
   Host appBase=webapps name=localhost
 Logger className=org.apache.catalina.logger.FileLogger
prefix=localhost_log. suffix=.txt timestamp=true/
...
...

Wilson, Allen wrote:
 Here are the lines.

 Connector
 className=org.apache.catalina.connector.http.HttpConnector
port=8080 minProcessors=5
maxProcessors=75
enableLookups=true redirectPort=8443
acceptCount=100 debug=0
 connectionTimeout=2 /

 !-- Define an AJP 1.3 Connector on port 8009 --
 Connector
 className=org.apache.ajp.tomcat4.Ajp13Connector port=8009
 minProcessors=5 maxProcessors=75 acceptCount=10 debug=0/

 Let me know if there is something that is incorrect.

 -Original Message-
 From: Emerson Cargnin [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, April 06, 2004 4:28 PM
 To: Tomcat Users List
 Subject: Re: Connecting the HTTP Server and Tomcat


 You said you can connect through port 8009 through the browser???
 The jk protocol is not http, so if the configuration was allright you
 can't connect through 8009 as http. Maybe the error is at your
 server.xml...

 Wilson, Allen wrote:

Thanks but this is on a Windows system and will not help...I am on a
Solaris and I have looked at documents like this before and they still
do not give me a definitive way of setting everything and testing

 it...

Right 

Re: Connecting the HTTP Server and Tomcat

2004-04-07 Thread Jon Wingfield
I may be way off but...
I don't think
http://myserver.com/portal
maps to
/portal/* ajp13
http://myserver.com/portal/
or
http://myserver.com/portal/whatever.jsp
probably will, though.
Give it a go, may work,

Jon

Wilson, Allen wrote:

Bill..thanks for the reply...

I will read through the link you provide but isn't that what the
connector is supposed to do.
My understanding what that the Apache HTTP server would detect what the
request was (Java or not) and pass it on to Tomcat.
Is this not what the specification of /portal/* ajp13 in the
configuration does.
This is what I got from the document at:

http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/jk.quickhowto.html

Here is a little from one of the pages in that area... (
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/jk/aphowto.html )
In a nutshell a web server is waiting for client HTTP requests. When
these requests arrive the server does whatever is needed to serve the
requests by providing the necessary content. 

Adding a servlet container may somewhat change this behavior. Now the
web server needs also to perform the following: 

Load the servlet container adapter library and initialize it (prior to
serving requests). 
When a request arrives, it needs to check and see if a certain request
belongs to a servlet, if so it needs to let the adapter take the request
and handle it. 
The adapter on the other hand needs to know what requests it is going to
serve, usually based on some pattern in the request URL, and to where to
direct these requests. 

Is this not correct...or am I misunderstanding it



-Original Message-
From: Bill Bruns [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, April 07, 2004 12:26 PM
To: Tomcat Users List
Subject: RE: Connecting the HTTP Server and Tomcat

Allen,

do you have the web server configured to throw the requests over to
Tomcat?
In other words, have either Proxy support or else URL Rewriting turned
on in
the web server?
Otherwise your HTTP requests default to port 80, so they will be eaten
by
the web server and never reach Tomcat,
since Tomcat is listening on ports that the HTTP requests do not come to
by
default.
Have you looked at
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/proxy-howto.html
- Bill
-Original Message-
From: Wilson, Allen [mailto:[EMAIL PROTECTED]
Sent: Wednesday, April 07, 2004 8:54 AM
To: Tomcat Users List
Subject: RE: Connecting the HTTP Server and Tomcat
Okay...that looks similar to the tomcat 4 information I haveis your
connector working correctly?
-Original Message-
From: Emerson Cargnin [mailto:[EMAIL PROTECTED]
Sent: Tuesday, April 06, 2004 6:06 PM
To: Tomcat Users List
Subject: Re: Connecting the HTTP Server and Tomcat
My configuration is for tomcat 5:

Service name=Catalina
 Connector acceptCount=100 connectionTimeout=2
disableUploadTimeout=true port=8080 redirectPort=8443
 /Connector
 Connector port=8009
enableLookups=false redirectPort=8443 debug=0
protocol=AJP/1.3 /
 Engine defaultHost=localhost name=Catalina
   Host appBase=webapps name=localhost
 Logger className=org.apache.catalina.logger.FileLogger
prefix=localhost_log. suffix=.txt timestamp=true/
...
...
Wilson, Allen wrote:

Here are the lines.

   Connector
className=org.apache.catalina.connector.http.HttpConnector
  port=8080 minProcessors=5
maxProcessors=75

  enableLookups=true redirectPort=8443
  acceptCount=100 debug=0
connectionTimeout=2 /
   !-- Define an AJP 1.3 Connector on port 8009 --
   Connector
className=org.apache.ajp.tomcat4.Ajp13Connector port=8009
minProcessors=5 maxProcessors=75 acceptCount=10 debug=0/
Let me know if there is something that is incorrect.

-Original Message-
From: Emerson Cargnin [mailto:[EMAIL PROTECTED]
Sent: Tuesday, April 06, 2004 4:28 PM
To: Tomcat Users List
Subject: Re: Connecting the HTTP Server and Tomcat
You said you can connect through port 8009 through the browser???
The jk protocol is not http, so if the configuration was allright you
can't connect through 8009 as http. Maybe the error is at your
server.xml...
Wilson, Allen wrote:


Thanks but this is on a Windows system and will not help...I am on a
Solaris and I have looked at documents like this before and they still
do not give me a definitive way of setting everything and testing
it...


Right now I have the HTTP server (port 80), Tomcat (port 8080), and
the


connector (8009) running. I even looked at the netstat to see if each
port was available...and they were.
When a do the home page request (http://myserver.com) it works
fine...but if I request the page for the Jetspeed Portal
(http://myserver.com/portal), I get an error. If I request the portal
page through port 8080 it works fine. If I request the same page on
8009


it works fine.

In all cases there were no entries in my mod_jk.log.

I am looking for something 

RE: Connecting the HTTP Server and Tomcat

2004-04-07 Thread Wilson, Allen
No you are not way off...at least not from my point of view because that
is what I thought would work. But unless I specify the port 
(http://myserver.com:8080/portal) it will not get there...

It makes me think that the connector is not function correctly but I do
not know how to tell..when I check the running ports I see the 8009 port
running but it does not hand to Tomcat

-Original Message-
From: Jon Wingfield [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, April 07, 2004 2:09 PM
To: Tomcat Users List
Subject: Re: Connecting the HTTP Server and Tomcat


I may be way off but...
I don't think
http://myserver.com/portal
maps to
/portal/* ajp13

http://myserver.com/portal/
or
http://myserver.com/portal/whatever.jsp
probably will, though.

Give it a go, may work,

Jon

Wilson, Allen wrote:

 Bill..thanks for the reply...
 
 I will read through the link you provide but isn't that what the
 connector is supposed to do.
 
 My understanding what that the Apache HTTP server would detect what
the
 request was (Java or not) and pass it on to Tomcat.
 Is this not what the specification of /portal/* ajp13 in the
 configuration does.
 
 This is what I got from the document at:
 
 http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/jk.quickhowto.html
 
 Here is a little from one of the pages in that area... (
 http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/jk/aphowto.html )
 
 In a nutshell a web server is waiting for client HTTP requests. When
 these requests arrive the server does whatever is needed to serve the
 requests by providing the necessary content. 
 
 Adding a servlet container may somewhat change this behavior. Now the
 web server needs also to perform the following: 
 
 Load the servlet container adapter library and initialize it (prior to
 serving requests). 
 When a request arrives, it needs to check and see if a certain request
 belongs to a servlet, if so it needs to let the adapter take the
request
 and handle it. 
 The adapter on the other hand needs to know what requests it is going
to
 serve, usually based on some pattern in the request URL, and to where
to
 direct these requests. 
 
 
 Is this not correct...or am I misunderstanding it
 
 
 
 -Original Message-
 From: Bill Bruns [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, April 07, 2004 12:26 PM
 To: Tomcat Users List
 Subject: RE: Connecting the HTTP Server and Tomcat
 
 
 Allen,
 
 do you have the web server configured to throw the requests over to
 Tomcat?
 In other words, have either Proxy support or else URL Rewriting turned
 on in
 the web server?
 Otherwise your HTTP requests default to port 80, so they will be eaten
 by
 the web server and never reach Tomcat,
 since Tomcat is listening on ports that the HTTP requests do not come
to
 by
 default.
 
 Have you looked at
 http://jakarta.apache.org/tomcat/tomcat-4.1-doc/proxy-howto.html
 - Bill
 
 -Original Message-
 From: Wilson, Allen [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, April 07, 2004 8:54 AM
 To: Tomcat Users List
 Subject: RE: Connecting the HTTP Server and Tomcat
 
 
 Okay...that looks similar to the tomcat 4 information I haveis
your
 connector working correctly?
 
 -Original Message-
 From: Emerson Cargnin [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, April 06, 2004 6:06 PM
 To: Tomcat Users List
 Subject: Re: Connecting the HTTP Server and Tomcat
 
 
 My configuration is for tomcat 5:
 
 Service name=Catalina
  Connector acceptCount=100 connectionTimeout=2
 disableUploadTimeout=true port=8080 redirectPort=8443
  /Connector
 
  Connector port=8009
 enableLookups=false redirectPort=8443 debug=0
 protocol=AJP/1.3 /
 
  Engine defaultHost=localhost name=Catalina
Host appBase=webapps name=localhost
  Logger className=org.apache.catalina.logger.FileLogger
 prefix=localhost_log. suffix=.txt timestamp=true/
 ...
 ...
 
 Wilson, Allen wrote:
 
Here are the lines.

Connector
className=org.apache.catalina.connector.http.HttpConnector
   port=8080 minProcessors=5
 
 maxProcessors=75
 
   enableLookups=true redirectPort=8443
   acceptCount=100 debug=0
connectionTimeout=2 /

!-- Define an AJP 1.3 Connector on port 8009 --
Connector
className=org.apache.ajp.tomcat4.Ajp13Connector port=8009
minProcessors=5 maxProcessors=75 acceptCount=10 debug=0/

Let me know if there is something that is incorrect.

-Original Message-
From: Emerson Cargnin [mailto:[EMAIL PROTECTED]
Sent: Tuesday, April 06, 2004 4:28 PM
To: Tomcat Users List
Subject: Re: Connecting the HTTP Server and Tomcat


You said you can connect through port 8009 through the browser???
The jk protocol is not http, so if the configuration was allright you
can't connect through 8009 as http. Maybe the error is at your
server.xml...

Wilson, Allen wrote:


Thanks but this is on a Windows system and will not 

Apache http / mod_rewrite / mod_jk

2004-04-07 Thread Christopher Schultz
All,
The archives show this questions being asked all the time, but with no 
useful responses. Please let me know if this is a known unresolved or 
unresolvable issue.

All solutions posted anywhere for jsessionid makes Apache go beaindead 
apparently use a mod_rewrite incantation similar to the following:

  IfModule mod_rewrite.c
  RewriteEngine on
  # Force URLs with a jsessionid to go to Tomcat. Necessary because
  # Apache doesn't recognise that the semi-colon is special.
  RewriteRule   ^(/.*;jsessionid=.*)$   $1 [T=jserv-servlet]
  /IfModule
While I'm sure this worked out great the people using mod_jserv back in 
1997, it does not work for mod_jk. For one thing, it does not even let 
you specify which worker to use :(

Back in the day, Craig responded by pointing to a Tomcat FAQ entry which 
no longer exists, but presumably had something to do with Apache's 
mod_rewrite.

On the other hand, a solution was posted (and confirmed by some readers) 
that the following works:

JkMount /test/*;jsessionid=* ajp13

This seems very obvious, and there's a caveat about how it might not 
work on older versions of mod_jk. It apparently does not work for me. 
I'm using mod_jk (not mod_jk2), version 1.2.5 (current release) on 
Apache 2.0.48 as a dynamic module on Linux -- everything compiled myself 
with nothing out of the ordinary.

Can anyone offer any advice? I've just been sucking it up and ignoring 
this problem for a while, now (years). Is there actually a solution out 
there for this? Am I just mistyping the JkMount configuration?

Anyone, please help.

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


Howto run tomcat 4.06 as windows service

2004-04-07 Thread baldyeti
Hello,

I have an existing tc4 installation (copied in a hurry from
another system ;-) which works fine when launched via the
startup.bat script. Is there a way to turn it into a proper
windows (XP) service? I know tc5 has service.bat, but short
of upgrading, what would be the equivalent here?
Tia,

--bald



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


RE: Connecting the HTTP Server and Tomcat

2004-04-07 Thread Wilson, Allen
Okay...I've read the article and the way it look is that you are doing
the connection without using a connector like mod_jk. You are doing it
with the proxy module...mod_proxy.so

Is that correct

If so, then it provides me another method to go but before I start back
tracking to do something new..I would like to see if I could get the
mod_jk connector working...

-Original Message-
From: Bill Bruns [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, April 07, 2004 2:04 PM
To: Wilson, Allen; Tomcat Users List
Subject: RE: Connecting the HTTP Server and Tomcat


Allen,

you ask isn't that what the connector is supposed to do,
but the connector is in Tomcat, not in your web server.
It is the web server software that is monitoring port 80,
and that is where your browser sends requests to by default,
so the request must get past the web server first.
To do that you need to tell the web server where to send them, namely to
your Tomcat port.
I think this accounts for the behaviour you told about, namely that
Tomcat responds fine when you specify the port number in your URL.

-Bill

-Original Message-
From: Wilson, Allen [mailto:[EMAIL PROTECTED]
Sent: Wednesday, April 07, 2004 11:32 AM
To: Tomcat Users List; [EMAIL PROTECTED]
Subject: RE: Connecting the HTTP Server and Tomcat


Bill..thanks for the reply...

I will read through the link you provide but isn't that what the
connector is supposed to do.

My understanding what that the Apache HTTP server would detect what the
request was (Java or not) and pass it on to Tomcat.
Is this not what the specification of /portal/* ajp13 in the
configuration does.

This is what I got from the document at:

http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/jk.quickhowto.html

Here is a little from one of the pages in that area... (
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/jk/aphowto.html )

In a nutshell a web server is waiting for client HTTP requests. When
these requests arrive the server does whatever is needed to serve the
requests by providing the necessary content.

Adding a servlet container may somewhat change this behavior. Now the
web server needs also to perform the following:

Load the servlet container adapter library and initialize it (prior to
serving requests).
When a request arrives, it needs to check and see if a certain request
belongs to a servlet, if so it needs to let the adapter take the request
and handle it.
The adapter on the other hand needs to know what requests it is going to
serve, usually based on some pattern in the request URL, and to where to
direct these requests.


Is this not correct...or am I misunderstanding it



-Original Message-
From: Bill Bruns [mailto:[EMAIL PROTECTED]
Sent: Wednesday, April 07, 2004 12:26 PM
To: Tomcat Users List
Subject: RE: Connecting the HTTP Server and Tomcat


Allen,

do you have the web server configured to throw the requests over to
Tomcat?
In other words, have either Proxy support or else URL Rewriting turned
on in
the web server?
Otherwise your HTTP requests default to port 80, so they will be eaten
by
the web server and never reach Tomcat,
since Tomcat is listening on ports that the HTTP requests do not come to
by
default.

Have you looked at
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/proxy-howto.html
- Bill

-Original Message-
From: Wilson, Allen [mailto:[EMAIL PROTECTED]
Sent: Wednesday, April 07, 2004 8:54 AM
To: Tomcat Users List
Subject: RE: Connecting the HTTP Server and Tomcat


Okay...that looks similar to the tomcat 4 information I haveis your
connector working correctly?

-Original Message-
From: Emerson Cargnin [mailto:[EMAIL PROTECTED]
Sent: Tuesday, April 06, 2004 6:06 PM
To: Tomcat Users List
Subject: Re: Connecting the HTTP Server and Tomcat


My configuration is for tomcat 5:

Service name=Catalina
 Connector acceptCount=100 connectionTimeout=2
disableUploadTimeout=true port=8080 redirectPort=8443
 /Connector

 Connector port=8009
enableLookups=false redirectPort=8443 debug=0
protocol=AJP/1.3 /

 Engine defaultHost=localhost name=Catalina
   Host appBase=webapps name=localhost
 Logger className=org.apache.catalina.logger.FileLogger
prefix=localhost_log. suffix=.txt timestamp=true/
...
...

Wilson, Allen wrote:
 Here are the lines.

 Connector
 className=org.apache.catalina.connector.http.HttpConnector
port=8080 minProcessors=5
maxProcessors=75
enableLookups=true redirectPort=8443
acceptCount=100 debug=0
 connectionTimeout=2 /

 !-- Define an AJP 1.3 Connector on port 8009 --
 Connector
 className=org.apache.ajp.tomcat4.Ajp13Connector port=8009
 minProcessors=5 maxProcessors=75 acceptCount=10 debug=0/

 Let me know if there is something that is incorrect.

 -Original Message-
 From: Emerson Cargnin [mailto:[EMAIL PROTECTED]
 Sent: 

Re: Connecting the HTTP Server and Tomcat

2004-04-07 Thread Jon Wingfield
Assuming the connector is working, what effect does adding an additional 
mapping of

/portal	ajp13

to your existing

/portal/*	ajp13

mapping have?

I just double-checked on our dev box where jk is definitely up. I got a 
404 from apache for /mapping but /mapping/stuff got routed through 
to tomcat.

Jon

Wilson, Allen wrote:

No you are not way off...at least not from my point of view because that
is what I thought would work. But unless I specify the port 
(http://myserver.com:8080/portal) it will not get there...

It makes me think that the connector is not function correctly but I do
not know how to tell..when I check the running ports I see the 8009 port
running but it does not hand to Tomcat
-Original Message-
From: Jon Wingfield [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, April 07, 2004 2:09 PM
To: Tomcat Users List
Subject: Re: Connecting the HTTP Server and Tomcat

I may be way off but...
I don't think
http://myserver.com/portal
maps to
/portal/* ajp13
http://myserver.com/portal/
or
http://myserver.com/portal/whatever.jsp
probably will, though.
Give it a go, may work,

Jon

Wilson, Allen wrote:


Bill..thanks for the reply...

I will read through the link you provide but isn't that what the
connector is supposed to do.
My understanding what that the Apache HTTP server would detect what
the

request was (Java or not) and pass it on to Tomcat.
Is this not what the specification of /portal/* ajp13 in the
configuration does.
This is what I got from the document at:

http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/jk.quickhowto.html

Here is a little from one of the pages in that area... (
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/jk/aphowto.html )
In a nutshell a web server is waiting for client HTTP requests. When
these requests arrive the server does whatever is needed to serve the
requests by providing the necessary content. 

Adding a servlet container may somewhat change this behavior. Now the
web server needs also to perform the following: 

Load the servlet container adapter library and initialize it (prior to
serving requests). 
When a request arrives, it needs to check and see if a certain request
belongs to a servlet, if so it needs to let the adapter take the
request

and handle it. 
The adapter on the other hand needs to know what requests it is going
to

serve, usually based on some pattern in the request URL, and to where
to

direct these requests. 

Is this not correct...or am I misunderstanding it



-Original Message-
From: Bill Bruns [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, April 07, 2004 12:26 PM
To: Tomcat Users List
Subject: RE: Connecting the HTTP Server and Tomcat

Allen,

do you have the web server configured to throw the requests over to
Tomcat?
In other words, have either Proxy support or else URL Rewriting turned
on in
the web server?
Otherwise your HTTP requests default to port 80, so they will be eaten
by
the web server and never reach Tomcat,
since Tomcat is listening on ports that the HTTP requests do not come
to

by
default.
Have you looked at
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/proxy-howto.html
- Bill
-Original Message-
From: Wilson, Allen [mailto:[EMAIL PROTECTED]
Sent: Wednesday, April 07, 2004 8:54 AM
To: Tomcat Users List
Subject: RE: Connecting the HTTP Server and Tomcat
Okay...that looks similar to the tomcat 4 information I haveis
your

connector working correctly?

-Original Message-
From: Emerson Cargnin [mailto:[EMAIL PROTECTED]
Sent: Tuesday, April 06, 2004 6:06 PM
To: Tomcat Users List
Subject: Re: Connecting the HTTP Server and Tomcat
My configuration is for tomcat 5:

Service name=Catalina
Connector acceptCount=100 connectionTimeout=2
disableUploadTimeout=true port=8080 redirectPort=8443
/Connector
Connector port=8009
   enableLookups=false redirectPort=8443 debug=0
   protocol=AJP/1.3 /
Engine defaultHost=localhost name=Catalina
  Host appBase=webapps name=localhost
Logger className=org.apache.catalina.logger.FileLogger
prefix=localhost_log. suffix=.txt timestamp=true/
...
...
Wilson, Allen wrote:


Here are the lines.

  Connector
className=org.apache.catalina.connector.http.HttpConnector
 port=8080 minProcessors=5
maxProcessors=75


 enableLookups=true redirectPort=8443
 acceptCount=100 debug=0
connectionTimeout=2 /
  !-- Define an AJP 1.3 Connector on port 8009 --
  Connector
className=org.apache.ajp.tomcat4.Ajp13Connector port=8009
minProcessors=5 maxProcessors=75 acceptCount=10 debug=0/
Let me know if there is something that is incorrect.

-Original Message-
From: Emerson Cargnin [mailto:[EMAIL PROTECTED]
Sent: Tuesday, April 06, 2004 4:28 PM
To: Tomcat Users List
Subject: Re: Connecting the HTTP Server and Tomcat
You said you can connect through port 8009 through the browser???
The jk protocol is not http, so if 

tools.jar classpath

2004-04-07 Thread Matthias Lindner
hi everyone,

dumb question time.

here's winXP and tomcat 5.0.19.
after setting up Tomcat as a service it didn't find the tools.jar
and couldn't compile my .jsp's.  the error page told me to copy
tools.jar over from JAVA_HOME/lib/ to TOMCAT_HOME/common/lib and that
works.

but i don't like it.  isn't there a way of telling tomcat or at least
this one context the classpath for tools.jar e.g. via web.xml ?

thanks,
Matthias


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



RE: Connecting the HTTP Server and Tomcat

2004-04-07 Thread Wilson, Allen
I think I may have found the problem

I tried to add the line AddModule mod_jk.c in the HTTP server config and
it gave an error. I could not locate the file within my HTTP or Tomcat
installation.even though I have the mod_jk.so file in the libexec
directory.



-Original Message-
From: Jon Wingfield [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, April 07, 2004 2:35 PM
To: Tomcat Users List
Subject: Re: Connecting the HTTP Server and Tomcat


Assuming the connector is working, what effect does adding an additional

mapping of

/portal ajp13

to your existing

/portal/*   ajp13

mapping have?

I just double-checked on our dev box where jk is definitely up. I got a 
404 from apache for /mapping but /mapping/stuff got routed through 
to tomcat.

Jon

Wilson, Allen wrote:

 No you are not way off...at least not from my point of view because
that
 is what I thought would work. But unless I specify the port 
 (http://myserver.com:8080/portal) it will not get there...
 
 It makes me think that the connector is not function correctly but I
do
 not know how to tell..when I check the running ports I see the 8009
port
 running but it does not hand to Tomcat
 
 -Original Message-
 From: Jon Wingfield [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, April 07, 2004 2:09 PM
 To: Tomcat Users List
 Subject: Re: Connecting the HTTP Server and Tomcat
 
 
 I may be way off but...
 I don't think
 http://myserver.com/portal
 maps to
 /portal/* ajp13
 
 http://myserver.com/portal/
 or
 http://myserver.com/portal/whatever.jsp
 probably will, though.
 
 Give it a go, may work,
 
 Jon
 
 Wilson, Allen wrote:
 
 
Bill..thanks for the reply...

I will read through the link you provide but isn't that what the
connector is supposed to do.

My understanding what that the Apache HTTP server would detect what
 
 the
 
request was (Java or not) and pass it on to Tomcat.
Is this not what the specification of /portal/* ajp13 in the
configuration does.

This is what I got from the document at:

http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/jk.quickhowto.html

Here is a little from one of the pages in that area... (
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/jk/aphowto.html )

In a nutshell a web server is waiting for client HTTP requests. When
these requests arrive the server does whatever is needed to serve the
requests by providing the necessary content. 

Adding a servlet container may somewhat change this behavior. Now the
web server needs also to perform the following: 

Load the servlet container adapter library and initialize it (prior to
serving requests). 
When a request arrives, it needs to check and see if a certain request
belongs to a servlet, if so it needs to let the adapter take the
 
 request
 
and handle it. 
The adapter on the other hand needs to know what requests it is going
 
 to
 
serve, usually based on some pattern in the request URL, and to where
 
 to
 
direct these requests. 


Is this not correct...or am I misunderstanding it



-Original Message-
From: Bill Bruns [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, April 07, 2004 12:26 PM
To: Tomcat Users List
Subject: RE: Connecting the HTTP Server and Tomcat


Allen,

do you have the web server configured to throw the requests over to
Tomcat?
In other words, have either Proxy support or else URL Rewriting turned
on in
the web server?
Otherwise your HTTP requests default to port 80, so they will be eaten
by
the web server and never reach Tomcat,
since Tomcat is listening on ports that the HTTP requests do not come
 
 to
 
by
default.

Have you looked at
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/proxy-howto.html
- Bill

-Original Message-
From: Wilson, Allen [mailto:[EMAIL PROTECTED]
Sent: Wednesday, April 07, 2004 8:54 AM
To: Tomcat Users List
Subject: RE: Connecting the HTTP Server and Tomcat


Okay...that looks similar to the tomcat 4 information I haveis
 
 your
 
connector working correctly?

-Original Message-
From: Emerson Cargnin [mailto:[EMAIL PROTECTED]
Sent: Tuesday, April 06, 2004 6:06 PM
To: Tomcat Users List
Subject: Re: Connecting the HTTP Server and Tomcat


My configuration is for tomcat 5:

Service name=Catalina
 Connector acceptCount=100 connectionTimeout=2
disableUploadTimeout=true port=8080 redirectPort=8443
 /Connector

 Connector port=8009
enableLookups=false redirectPort=8443 debug=0
protocol=AJP/1.3 /

 Engine defaultHost=localhost name=Catalina
   Host appBase=webapps name=localhost
 Logger className=org.apache.catalina.logger.FileLogger
prefix=localhost_log. suffix=.txt timestamp=true/
...
...

Wilson, Allen wrote:


Here are the lines.

   Connector
className=org.apache.catalina.connector.http.HttpConnector
  port=8080 minProcessors=5

maxProcessors=75


  enableLookups=true redirectPort=8443
  acceptCount=100 debug=0

RE: Connecting the HTTP Server and Tomcat

2004-04-07 Thread Shapira, Yoav

Hi,
The rest of this thread aside, are you sure you even need Apache?  Do
you particular CGI/SSI/PHP scripts you need to serve in a high
concurrency environment?  What's your expected load?  Tomcat standalone
might be good enough for your needs, in which case you could drop all
this connector stuff.

Yoav Shapira
Millennium Research Informatics


-Original Message-
From: Bill Bruns [mailto:[EMAIL PROTECTED]
Sent: Wednesday, April 07, 2004 3:04 PM
To: Wilson, Allen; Tomcat Users List
Subject: RE: Connecting the HTTP Server and Tomcat

Allen,

you ask isn't that what the connector is supposed to do,
but the connector is in Tomcat, not in your web server.
It is the web server software that is monitoring port 80,
and that is where your browser sends requests to by default,
so the request must get past the web server first.
To do that you need to tell the web server where to send them, namely
to
your Tomcat port.
I think this accounts for the behaviour you told about, namely that
Tomcat responds fine when you specify the port number in your URL.

-Bill

-Original Message-
From: Wilson, Allen [mailto:[EMAIL PROTECTED]
Sent: Wednesday, April 07, 2004 11:32 AM
To: Tomcat Users List; [EMAIL PROTECTED]
Subject: RE: Connecting the HTTP Server and Tomcat


Bill..thanks for the reply...

I will read through the link you provide but isn't that what the
connector is supposed to do.

My understanding what that the Apache HTTP server would detect what the
request was (Java or not) and pass it on to Tomcat.
Is this not what the specification of /portal/* ajp13 in the
configuration does.

This is what I got from the document at:

http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/jk.quickhowto.html

Here is a little from one of the pages in that area... (
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/jk/aphowto.html )

In a nutshell a web server is waiting for client HTTP requests. When
these requests arrive the server does whatever is needed to serve the
requests by providing the necessary content.

Adding a servlet container may somewhat change this behavior. Now the
web server needs also to perform the following:

Load the servlet container adapter library and initialize it (prior to
serving requests).
When a request arrives, it needs to check and see if a certain request
belongs to a servlet, if so it needs to let the adapter take the
request
and handle it.
The adapter on the other hand needs to know what requests it is going
to
serve, usually based on some pattern in the request URL, and to where
to
direct these requests.


Is this not correct...or am I misunderstanding it



-Original Message-
From: Bill Bruns [mailto:[EMAIL PROTECTED]
Sent: Wednesday, April 07, 2004 12:26 PM
To: Tomcat Users List
Subject: RE: Connecting the HTTP Server and Tomcat


Allen,

do you have the web server configured to throw the requests over to
Tomcat?
In other words, have either Proxy support or else URL Rewriting turned
on in
the web server?
Otherwise your HTTP requests default to port 80, so they will be eaten
by
the web server and never reach Tomcat,
since Tomcat is listening on ports that the HTTP requests do not come
to
by
default.

Have you looked at
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/proxy-howto.html
- Bill

-Original Message-
From: Wilson, Allen [mailto:[EMAIL PROTECTED]
Sent: Wednesday, April 07, 2004 8:54 AM
To: Tomcat Users List
Subject: RE: Connecting the HTTP Server and Tomcat


Okay...that looks similar to the tomcat 4 information I haveis your
connector working correctly?

-Original Message-
From: Emerson Cargnin [mailto:[EMAIL PROTECTED]
Sent: Tuesday, April 06, 2004 6:06 PM
To: Tomcat Users List
Subject: Re: Connecting the HTTP Server and Tomcat


My configuration is for tomcat 5:

Service name=Catalina
 Connector acceptCount=100 connectionTimeout=2
disableUploadTimeout=true port=8080 redirectPort=8443
 /Connector

 Connector port=8009
enableLookups=false redirectPort=8443 debug=0
protocol=AJP/1.3 /

 Engine defaultHost=localhost name=Catalina
   Host appBase=webapps name=localhost
 Logger className=org.apache.catalina.logger.FileLogger
prefix=localhost_log. suffix=.txt timestamp=true/
...
...

Wilson, Allen wrote:
 Here are the lines.

 Connector
 className=org.apache.catalina.connector.http.HttpConnector
port=8080 minProcessors=5
maxProcessors=75
enableLookups=true redirectPort=8443
acceptCount=100 debug=0
 connectionTimeout=2 /

 !-- Define an AJP 1.3 Connector on port 8009 --
 Connector
 className=org.apache.ajp.tomcat4.Ajp13Connector port=8009
 minProcessors=5 maxProcessors=75 acceptCount=10 debug=0/

 Let me know if there is something that is incorrect.

 -Original Message-
 From: Emerson Cargnin [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, April 06, 

RE: Apache http / mod_rewrite / mod_jk

2004-04-07 Thread Shapira, Yoav

Howdy,
I have no clue as to your actual question, but I'm curious:

The archives show this questions being asked all the time, but with no

How do you define all the time in the statement above?

Yoav Shapira



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


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



RE: Connecting the HTTP Server and Tomcat

2004-04-07 Thread Wilson, Allen
My reason for the Apache..is that I do not want root to run the Tomcat
process once I put the server into production and I saw no other way for
Tomcat to run on port 80 without using root..

-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, April 07, 2004 2:44 PM
To: Tomcat Users List
Subject: RE: Connecting the HTTP Server and Tomcat



Hi,
The rest of this thread aside, are you sure you even need Apache?  Do
you particular CGI/SSI/PHP scripts you need to serve in a high
concurrency environment?  What's your expected load?  Tomcat standalone
might be good enough for your needs, in which case you could drop all
this connector stuff.

Yoav Shapira
Millennium Research Informatics


-Original Message-
From: Bill Bruns [mailto:[EMAIL PROTECTED]
Sent: Wednesday, April 07, 2004 3:04 PM
To: Wilson, Allen; Tomcat Users List
Subject: RE: Connecting the HTTP Server and Tomcat

Allen,

you ask isn't that what the connector is supposed to do,
but the connector is in Tomcat, not in your web server.
It is the web server software that is monitoring port 80,
and that is where your browser sends requests to by default,
so the request must get past the web server first.
To do that you need to tell the web server where to send them, namely
to
your Tomcat port.
I think this accounts for the behaviour you told about, namely that
Tomcat responds fine when you specify the port number in your URL.

-Bill

-Original Message-
From: Wilson, Allen [mailto:[EMAIL PROTECTED]
Sent: Wednesday, April 07, 2004 11:32 AM
To: Tomcat Users List; [EMAIL PROTECTED]
Subject: RE: Connecting the HTTP Server and Tomcat


Bill..thanks for the reply...

I will read through the link you provide but isn't that what the
connector is supposed to do.

My understanding what that the Apache HTTP server would detect what the
request was (Java or not) and pass it on to Tomcat.
Is this not what the specification of /portal/* ajp13 in the
configuration does.

This is what I got from the document at:

http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/jk.quickhowto.html

Here is a little from one of the pages in that area... (
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/jk/aphowto.html )

In a nutshell a web server is waiting for client HTTP requests. When
these requests arrive the server does whatever is needed to serve the
requests by providing the necessary content.

Adding a servlet container may somewhat change this behavior. Now the
web server needs also to perform the following:

Load the servlet container adapter library and initialize it (prior to
serving requests).
When a request arrives, it needs to check and see if a certain request
belongs to a servlet, if so it needs to let the adapter take the
request
and handle it.
The adapter on the other hand needs to know what requests it is going
to
serve, usually based on some pattern in the request URL, and to where
to
direct these requests.


Is this not correct...or am I misunderstanding it



-Original Message-
From: Bill Bruns [mailto:[EMAIL PROTECTED]
Sent: Wednesday, April 07, 2004 12:26 PM
To: Tomcat Users List
Subject: RE: Connecting the HTTP Server and Tomcat


Allen,

do you have the web server configured to throw the requests over to
Tomcat?
In other words, have either Proxy support or else URL Rewriting turned
on in
the web server?
Otherwise your HTTP requests default to port 80, so they will be eaten
by
the web server and never reach Tomcat,
since Tomcat is listening on ports that the HTTP requests do not come
to
by
default.

Have you looked at
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/proxy-howto.html
- Bill

-Original Message-
From: Wilson, Allen [mailto:[EMAIL PROTECTED]
Sent: Wednesday, April 07, 2004 8:54 AM
To: Tomcat Users List
Subject: RE: Connecting the HTTP Server and Tomcat


Okay...that looks similar to the tomcat 4 information I haveis your
connector working correctly?

-Original Message-
From: Emerson Cargnin [mailto:[EMAIL PROTECTED]
Sent: Tuesday, April 06, 2004 6:06 PM
To: Tomcat Users List
Subject: Re: Connecting the HTTP Server and Tomcat


My configuration is for tomcat 5:

Service name=Catalina
 Connector acceptCount=100 connectionTimeout=2
disableUploadTimeout=true port=8080 redirectPort=8443
 /Connector

 Connector port=8009
enableLookups=false redirectPort=8443 debug=0
protocol=AJP/1.3 /

 Engine defaultHost=localhost name=Catalina
   Host appBase=webapps name=localhost
 Logger className=org.apache.catalina.logger.FileLogger
prefix=localhost_log. suffix=.txt timestamp=true/
...
...

Wilson, Allen wrote:
 Here are the lines.

 Connector
 className=org.apache.catalina.connector.http.HttpConnector
port=8080 minProcessors=5
maxProcessors=75
enableLookups=true redirectPort=8443
acceptCount=100 debug=0
 

Re: Filter.init and DefaultContext JNDI resources

2004-04-07 Thread Sandy McArthur
After further testing on my using a JNDI resource in the 
Filter.init(...) method I found that if I use a DefaultContext to link 
a resource it fails. eg:

DefaultContext
  ResourceLink name=jdbc/test global=jdbc/db 
type=javax.sql.DataSource/
/DefaultContext

But if I link the resource in a Context I can load a JNDI resource in 
my Filter's init(...) method. eg:

Context path=/JNDI docBase=JNDI.war
  ResourceLink name=jdbc/test global=jdbc/db 
type=javax.sql.DataSource/
/Context

In both forms of resource linking above the Filter can load the JNDI 
resource from the doFilter(...) method.

Any reasons that there should be a difference in behavior for a 
ResourceLink depending on if you link it in a DefaultContext or a 
Context?

Sandy


PGP.sig
Description: This is a digitally signed message part


Re: Connecting the HTTP Server and Tomcat

2004-04-07 Thread David Smith
Hi.

Can you post the relevant parts of your httpd.conf file?  Also, I missed 
this in the thread if it was mentioned, but what version of Apache are 
you working with?  I ask, because it looks like from my setup that 
Apache ditched the AddModule directive in Apache 2.0.xx.

LoadModule needs to be in your httpd.conf file before the AddModule 
directive under Apache 1.3.x as in:

# All the other LoadModule directive here.
LoadModule jk_module  modules/mod_jk.so
# Further down, all the AddModule directives here
AddModule mod_jk.c
It'd be helpful to see the JkWorkersFile directive, JkMount directive, 
and the contents of the jk workers file.

--David

Just tack it on to the end of the list of LoadModule directives.  Then 
use AddModule at the end of the list of AddModule directives.

Wilson, Allen wrote:

I think I may have found the problem

I tried to add the line AddModule mod_jk.c in the HTTP server config and
it gave an error. I could not locate the file within my HTTP or Tomcat
installation.even though I have the mod_jk.so file in the libexec
directory.


-Original Message-
From: Jon Wingfield [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, April 07, 2004 2:35 PM
To: Tomcat Users List
Subject: Re: Connecting the HTTP Server and Tomcat

Assuming the connector is working, what effect does adding an additional

mapping of

/portal	ajp13

to your existing

/portal/*	ajp13

mapping have?

I just double-checked on our dev box where jk is definitely up. I got a 
404 from apache for /mapping but /mapping/stuff got routed through 
to tomcat.

Jon

Wilson, Allen wrote:

 

No you are not way off...at least not from my point of view because
   

that
 

is what I thought would work. But unless I specify the port 
(http://myserver.com:8080/portal) it will not get there...

It makes me think that the connector is not function correctly but I
   

do
 

not know how to tell..when I check the running ports I see the 8009
   

port
 

running but it does not hand to Tomcat

-Original Message-
From: Jon Wingfield [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, April 07, 2004 2:09 PM
To: Tomcat Users List
Subject: Re: Connecting the HTTP Server and Tomcat

I may be way off but...
I don't think
http://myserver.com/portal
maps to
/portal/* ajp13
http://myserver.com/portal/
or
http://myserver.com/portal/whatever.jsp
probably will, though.
Give it a go, may work,

Jon

Wilson, Allen wrote:

   

Bill..thanks for the reply...

I will read through the link you provide but isn't that what the
connector is supposed to do.
My understanding what that the Apache HTTP server would detect what
 

the

   

request was (Java or not) and pass it on to Tomcat.
Is this not what the specification of /portal/* ajp13 in the
configuration does.
This is what I got from the document at:

http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/jk.quickhowto.html

Here is a little from one of the pages in that area... (
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/jk/aphowto.html )
In a nutshell a web server is waiting for client HTTP requests. When
these requests arrive the server does whatever is needed to serve the
requests by providing the necessary content. 

Adding a servlet container may somewhat change this behavior. Now the
web server needs also to perform the following: 

Load the servlet container adapter library and initialize it (prior to
serving requests). 
When a request arrives, it needs to check and see if a certain request
belongs to a servlet, if so it needs to let the adapter take the
 

request

   

and handle it. 
The adapter on the other hand needs to know what requests it is going
 

to

   

serve, usually based on some pattern in the request URL, and to where
 

to

   

direct these requests. 

Is this not correct...or am I misunderstanding it



-Original Message-
From: Bill Bruns [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, April 07, 2004 12:26 PM
To: Tomcat Users List
Subject: RE: Connecting the HTTP Server and Tomcat

Allen,

do you have the web server configured to throw the requests over to
Tomcat?
In other words, have either Proxy support or else URL Rewriting turned
on in
the web server?
Otherwise your HTTP requests default to port 80, so they will be eaten
by
the web server and never reach Tomcat,
since Tomcat is listening on ports that the HTTP requests do not come
 

to

   

by
default.
Have you looked at
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/proxy-howto.html
- Bill
-Original Message-
From: Wilson, Allen [mailto:[EMAIL PROTECTED]
Sent: Wednesday, April 07, 2004 8:54 AM
To: Tomcat Users List
Subject: RE: Connecting the HTTP Server and Tomcat
Okay...that looks similar to the tomcat 4 information I haveis
 

your

   

connector working correctly?

-Original Message-
From: Emerson Cargnin [mailto:[EMAIL PROTECTED]
Sent: Tuesday, April 06, 2004 6:06 PM
To: Tomcat Users List
Subject: Re: Connecting the HTTP Server and 

RE: request.getUserPrincipal();

2004-04-07 Thread Yansheng Lin
Hi, how often do you invalidate your sessions?  It's hard to imagine your
application would expire a user's session right after he logs in.  But take a
look at the request header to see if the subsequent session ids are the same as
the first one.  Other than that, without more specific info on how you
implemented the authentication, it's hard to figure out what's going on:).

-Yan


-Original Message-
From: Winter, G (Graeme) [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, April 07, 2004 7:46 AM
To: 'Tomcat Users List'
Subject: request.getUserPrincipal();


Hi All,

I am trying to perform client authentication using certificates, and I have
made some progress - the certificates are now accepted as OK, which is nice.
Obviously I am using https too...

However, the sting is that the methods

request.getAuthType();
request.getRemoteUser();
request.getUserPrincipal();

All return NULL, which is contrary to the documentation, since I know the
user (i.e. me) has authenticated. clientAuth=true in server.xml.

Anyone else out there had this problem, and more to the point found a
solution?

Cheers,

Graeme

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


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



nativeDispatch SEVERE error with apache ErrorDocument on 404 to a servlet

2004-04-07 Thread Daniel Gibby
Hey all, I just discovered some things that I googled around and 
debugged a bit and couldn't find any help on, so I'm posting it to the 
list so that when I have the problem again, I'll find my own posting via 
google! Maybe it will help someone else as well.

Using: Apache, mod_jk2 tomcat4.1.27
In apache I have ErrorDocument directives that send 404 errors to a servlet.
This was supposed to be setup so that I could forward people who make 
invalid requests to a valid page.
Also I could send errors to a log, and give people a nice looking page 
rather than apache's default.

Here's the tricky part:
I have mod_jk2 setup to forward *.jsp and certain servlets to tomcat, 
but graphics and such come through apache.
If I have a valid request come in to a jsp page or to a servlet... but 
there is a gif/png/jpg missing on that page, then strange things begin 
to happen.
Here's some output:

Normal output complete from jsp page.
Apr 7, 2004 12:53:00 PM org.apache.jk.common.JniHandler nativeDispatch
SEVERE: nativeDispatch: error 21000
Apr 7, 2004 12:53:01 PM org.apache.jk.common.ChannelUn receive
SEVERE: receive error:   21000
Apr 7, 2004 12:53:00 PM org.apache.jk.common.JniHandler nativeDispatch
SEVERE: nativeDispatch: error 21000
Apr 7, 2004 12:53:01 PM org.apache.jk.common.ChannelUn receive
SEVERE: receive error:   21000
CoyoteAdapter  Requested cookie session id is 
6480375D001AF672794CA5AEFFAAAF92
ErrorDocument servlet output. That's  bad!
Apr 7, 2004 12:53:01 PM org.apache.jk.common.JniHandler nativeDispatch
SEVERE: nativeDispatch: error -3
Apr 7, 2004 12:53:01 PM org.apache.jk.common.JniHandler nativeDispatch
SEVERE: nativeDispatch: error -3
Apr 7, 2004 12:53:01 PM org.apache.jk.common.JniHandler nativeDispatch

If you have seen errors such as these in your logs, it may be that you 
are using an apache ErrorDocument forwarding to tomcat, and really you 
just have some missing graphics or other files!

So now that I figured out what is going on... does anyone have an idea 
of how to handle this?
I really want to send just jsp and servlet type 404 errors to a servlet 
/ JSP, not missing graphic 404 errors. But there is no way to 
distinguish them on the apache side that I know of... and no way to 
distinguish them on the tomcat side either.
If you look at some of the apache docs they say that they now set some 
additional CGI variables for this purpose, but I don't think they are 
accessible from jsp.
The variables all start with REDIRECT_
ServletConfig / ServletRequest don't provide a way to get at those 
variables, right? This is kind of going off topic, but help!

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


RE: Connecting the HTTP Server and Tomcat

2004-04-07 Thread Wilson, Allen
No a problem...I am using 2.0.48..

I have the LoadModule line and the other directives here...they are 


LoadModule jk_module /usr/WWW/libexec/mod_jk.so


 JkWorkersFile /usr/tomcat-4.1.18/conf/jk/workers.properties
 JkLogFile /usr/tomcat-4.1.18/logs/mod_jk.log
 JkLogLeveldebug
 JkMount  /portal/* ajp13

I was unable to put in the AddModule line because I did not see it (the
mod_jk.c file) loaded when I did the apachectl -l. I am working on
getting that loaded now

-Original Message-
From: David Smith [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, April 07, 2004 3:19 PM
To: Tomcat Users List
Subject: Re: Connecting the HTTP Server and Tomcat


Hi.

Can you post the relevant parts of your httpd.conf file?  Also, I missed

this in the thread if it was mentioned, but what version of Apache are 
you working with?  I ask, because it looks like from my setup that 
Apache ditched the AddModule directive in Apache 2.0.xx.

LoadModule needs to be in your httpd.conf file before the AddModule 
directive under Apache 1.3.x as in:

# All the other LoadModule directive here.
LoadModule jk_module  modules/mod_jk.so

# Further down, all the AddModule directives here
AddModule mod_jk.c

It'd be helpful to see the JkWorkersFile directive, JkMount directive, 
and the contents of the jk workers file.

--David

Just tack it on to the end of the list of LoadModule directives.  Then 
use AddModule at the end of the list of AddModule directives.

Wilson, Allen wrote:

I think I may have found the problem

I tried to add the line AddModule mod_jk.c in the HTTP server config
and
it gave an error. I could not locate the file within my HTTP or Tomcat
installation.even though I have the mod_jk.so file in the libexec
directory.



-Original Message-
From: Jon Wingfield [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, April 07, 2004 2:35 PM
To: Tomcat Users List
Subject: Re: Connecting the HTTP Server and Tomcat


Assuming the connector is working, what effect does adding an
additional

mapping of

/portalajp13

to your existing

/portal/*  ajp13

mapping have?

I just double-checked on our dev box where jk is definitely up. I got a

404 from apache for /mapping but /mapping/stuff got routed through 
to tomcat.

Jon

Wilson, Allen wrote:

  

No you are not way off...at least not from my point of view because


that
  

is what I thought would work. But unless I specify the port 
(http://myserver.com:8080/portal) it will not get there...

It makes me think that the connector is not function correctly but I


do
  

not know how to tell..when I check the running ports I see the 8009


port
  

running but it does not hand to Tomcat

-Original Message-
From: Jon Wingfield [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, April 07, 2004 2:09 PM
To: Tomcat Users List
Subject: Re: Connecting the HTTP Server and Tomcat


I may be way off but...
I don't think
http://myserver.com/portal
maps to
/portal/* ajp13

http://myserver.com/portal/
or
http://myserver.com/portal/whatever.jsp
probably will, though.

Give it a go, may work,

Jon

Wilson, Allen wrote:




Bill..thanks for the reply...

I will read through the link you provide but isn't that what the
connector is supposed to do.

My understanding what that the Apache HTTP server would detect what
  

the



request was (Java or not) and pass it on to Tomcat.
Is this not what the specification of /portal/* ajp13 in the
configuration does.

This is what I got from the document at:

http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/jk.quickhowto.htm
l

Here is a little from one of the pages in that area... (
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/jk/aphowto.html )

In a nutshell a web server is waiting for client HTTP requests. When
these requests arrive the server does whatever is needed to serve the
requests by providing the necessary content. 

Adding a servlet container may somewhat change this behavior. Now the
web server needs also to perform the following: 

Load the servlet container adapter library and initialize it (prior
to
serving requests). 
When a request arrives, it needs to check and see if a certain
request
belongs to a servlet, if so it needs to let the adapter take the
  

request



and handle it. 
The adapter on the other hand needs to know what requests it is going
  

to



serve, usually based on some pattern in the request URL, and to where
  

to



direct these requests. 


Is this not correct...or am I misunderstanding it



-Original Message-
From: Bill Bruns [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, April 07, 2004 12:26 PM
To: Tomcat Users List
Subject: RE: Connecting the HTTP Server and Tomcat


Allen,

do you have the web server configured to throw the requests over to
Tomcat?
In other words, have either Proxy support or else URL Rewriting
turned
on in
the web server?
Otherwise your HTTP requests default to port 80, so they will be
eaten
by

Re: Apache http / mod_rewrite / mod_jk

2004-04-07 Thread Christopher Schultz
Yoav,

I have no clue as to your actual question, but I'm curious:

The archives show this questions being asked all the time, but with no
How do you define all the time in the statement above?
Like this:

Dubious responses:
http://www.mail-archive.com/[EMAIL PROTECTED]/msg84808.html
http://www.mail-archive.com/[EMAIL PROTECTED]/msg74207.html
http://www.mail-archive.com/[EMAIL PROTECTED]/msg84936.html
   (references a URL @ Google Groups with a simple solution that does 
not appear to work for me)

References Craig's pointers:
http://www.mail-archive.com/[EMAIL PROTECTED]/msg78826.html
No responses:
http://www.mail-archive.com/[EMAIL PROTECTED]/msg75615.html
That's just in the tomcat-user archives. Similar discussions occur in 
other forums (fora?), like jGuru.

Do you know if this is supposed to work?

JkMount /myapp/*;jsessionid=* workerX

It has allegedly worked for some other people.

-chris


signature.asc
Description: OpenPGP digital signature


RE: Connecting the HTTP Server and Tomcat

2004-04-07 Thread Shapira, Yoav

Hi,

My reason for the Apache..is that I do not want root to run the Tomcat
process once I put the server into production and I saw no other way
for
Tomcat to run on port 80 without using root..

Use commons-daemon for this.  It ships with tomcat5 and works with
tomcat4 as well: http://jakarta.apache.org/commons/daemon/index.html.

Yoav Shapira




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


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



RE: Filter.init and DefaultContext JNDI resources

2004-04-07 Thread Shapira, Yoav

Hi,
I think JNDI resources have to be associated with an actual context
explicitly, to avoid creating multiple copies.  I'm not a big fan of
DefaultContext anyways.

Yoav Shapira
Millennium Research Informatics


-Original Message-
From: Sandy McArthur [mailto:[EMAIL PROTECTED]
Sent: Wednesday, April 07, 2004 4:19 PM
To: Tomcat Users List
Subject: Re: Filter.init and DefaultContext JNDI resources

After further testing on my using a JNDI resource in the
Filter.init(...) method I found that if I use a DefaultContext to link
a resource it fails. eg:

DefaultContext
   ResourceLink name=jdbc/test global=jdbc/db
type=javax.sql.DataSource/
/DefaultContext

But if I link the resource in a Context I can load a JNDI resource in
my Filter's init(...) method. eg:

Context path=/JNDI docBase=JNDI.war
   ResourceLink name=jdbc/test global=jdbc/db
type=javax.sql.DataSource/
/Context


In both forms of resource linking above the Filter can load the JNDI
resource from the doFilter(...) method.

Any reasons that there should be a difference in behavior for a
ResourceLink depending on if you link it in a DefaultContext or a
Context?

Sandy



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


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



RE: Apache http / mod_rewrite / mod_jk

2004-04-07 Thread Shapira, Yoav

Hi,

Like this:
snip of links /
OK, that's what I figured.  I wouldn't call once or twice a year all
the time but that's besides the point, as the issue undoubtedly exists
;)

Do you know if this is supposed to work?

JkMount /myapp/*;jsessionid=* workerX

It has allegedly worked for some other people.

I don't know if it's supposed to work.  Is it difficult to test?

Yoav Shapira



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


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



RE: Connecting the HTTP Server and Tomcat

2004-04-07 Thread Wilson, Allen
Yes...I think this is a better route to go...I will try it...thanks

-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, April 07, 2004 3:43 PM
To: Tomcat Users List
Subject: RE: Connecting the HTTP Server and Tomcat



Hi,

My reason for the Apache..is that I do not want root to run the Tomcat
process once I put the server into production and I saw no other way
for
Tomcat to run on port 80 without using root..

Use commons-daemon for this.  It ships with tomcat5 and works with
tomcat4 as well: http://jakarta.apache.org/commons/daemon/index.html.

Yoav Shapira




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


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

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


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

access ENV variables

2004-04-07 Thread Daniel Gibby
Is it possible to access environment variables in tomcat that were set 
by apache?

Specifically the REDIRECT_ * variables that are set by ErrorDocument 
directives?

Then I can have a servlet return the correct content type.
i.e. if it is a gif that has a 404 I can redirect to a graphic that says 
not found
But if a jsp page is missing or won't compile, I can redirect to a 
different jsp.

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


  1   2   >