Re: getAttribute(null)?

2008-06-16 Thread Leon Rosenberg
On Thu, Jun 12, 2008 at 5:36 PM, Leffingwell, Jonathan R CTR FRCSE,
JAX 7.2.2 <[EMAIL PROTECTED]> wrote:
> It's not the "why is formName null?" that I'm worried about.  In this
> case, it's supposed to be null.
>
> What I want to know is this: Is a NullPointerException supposed to be
> thrown if the argument "name" in session.getAttribute(name) is NULL?  If
> such an exception IS supposed to be thrown, was this a change put into
> Tomcat 5.5.x that wasn't in 5.0.x?

I assume that it was the Hashtable -> Hashmap -> ConcurrentHashMap change.
Unlike the Hashtable and the ConcurrentHashMap the Hashmap allows
get(null) calls.
So in tomcat  50.19 - 5.0.30 & >5.5.9 is was hashmap and  worked,
changed that to hashtable (5.5.16?) and stoped working, changed to
concurrenthasmap in 6.x and remained not working. My versioning might
be inaccurate, but the timeline should be approx. right

regards
Leon


P.S. probably it would be good if StandartSession would check for it
   return name==null ? null : (attributes.get(name));
instead of
   return (attributes.get(name));

but they probably won't do it anyway:-)

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: getAttribute(null)?

2008-06-16 Thread Mark Thomas


Leon Rosenberg wrote:

P.S. probably it would be good if StandartSession would check for it
   return name==null ? null : (attributes.get(name));
instead of
   return (attributes.get(name));

but they probably won't do it anyway:-)

Oh yea of little faith.

http://svn.apache.org/viewvc?rev=667604&view=rev
and proposed for 5.5.x and 6.0.x

Of course it needs 3 +1s to get in to the release branches...

Mark


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: getAttribute(null)?

2008-06-16 Thread Leon Rosenberg
may I suggest that you add the same check also to that method :

protected void removeAttributeInternal(String name, boolean notify) {

// Remove this attribute from our collection
Object value = attributes.remove(name);

?
Thanx
Leon.


On Mon, Jun 16, 2008 at 9:25 AM, Mark Thomas <[EMAIL PROTECTED]> wrote:
>
> Leon Rosenberg wrote:
>>
>> P.S. probably it would be good if StandartSession would check for it
>>   return name==null ? null : (attributes.get(name));
>> instead of
>>   return (attributes.get(name));
>>
>> but they probably won't do it anyway:-)
>
> Oh yea of little faith.
>
> http://svn.apache.org/viewvc?rev=667604&view=rev
> and proposed for 5.5.x and 6.0.x
>
> Of course it needs 3 +1s to get in to the release branches...
>
> Mark
>
>
> -
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



AW: Tomcat will not create session cookie

2008-06-16 Thread Mario Killmer
Hello Christopher,
you are right. It was a Firewall problem. Thanks for your help.

Mario

-Ursprüngliche Nachricht-
Von: Christopher Schultz [mailto:[EMAIL PROTECTED] 
Gesendet: Freitag, 13. Juni 2008 18:59
An: Tomcat Users List
Betreff: Re: Tomcat will not create session cookie

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Mario,

mkweb wrote:
| Hello,
| I'm new to the forum. I have a strange problem with my tomcat
installation.
| I'm using tomcat5.5.26 and struts for my web projekt.
|
| I configured the project in a context file, like this :
| 

Remove the path and docbase attributes, then try again and let us know
if you are still having problems.

Where does your context.xml file live?

| I set the attribute cookies to 'true' because I want to have session
| cookies.

cookies="true" is the default, but it doesn't hurt to specify it.

| My problem is now when I open the webapp with the url
| http://localhost everything is fine. The session cookie wil be
| created and the output of the script above is like :
| Cookies : JSESSIONID=05E932958950B69BE03874B8FCE26C3E

That doesn't sound like a problem.

| But when I open the webapp over the internet with an URL like
| www.myprojekt.com tomcat will not create an session cookie. Tomcat
adds the
| jsessionid to the URL's and teh output of the script above is :
| Cookies : No cookies

Are you operating over a proxy or firewall that strips cookies from
requests and responses? Try using a tool like LiveHTTPHeaders (for
Firefox) or a similar tool for whatever browser you are using to see
what the client requests and server responses look like.

| What is the problem ? Why can't tomcat create session cookie for
| www.myprojekt.com ?

Is your code ever actually creating a cookie? Or, are you expecting to
see the JSESSIONID cookie only? If so, are you sure you have a session?
You mentioned that your URL contains ;jsessionid=[the session id], so I
would guess that's the case. Is the session working and consistent? If
so, then the implication is that the cookie itself is being suppressed
somewhere -- probably /not/ in Tomcat's code.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkhSp2sACgkQ9CaO5/Lv0PBUTACeKMzbgAZLZPiOrPe+vICX6YAi
Qk4AnRdHn8sKhu3uaqPlzfh4kS8LEJjc
=/Iw+
-END PGP SIGNATURE-

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat, iis connector and case sensitivity

2008-06-16 Thread Luis Villa
Hello all,

I'm trying to add redirect rules to the tomcat connector. I've been reading
Tomcat connector documentation, and what I've done till the moment is this:

1.- I've created a rewrite_rules.properties with this content:

  /myapplication/=/MyApplication/
  /MYAPPLICATION/=/MyApplication/
  /MYAP/=/MyApplication/

2.- I've added this to isapi_redirect.properties:

   # Full path to the rewrite_rules.properties file

rewrite_rule_file=c:\apache-tomcat-6.0.14\conf\rewrite_rules.properties

... but it only works with /MyApplication/ (the name in webapps in tomcat).
Any other form (myapplication, MYAPPLICATION or MYAP) returns a 404 error.

Does somebody what I'm doing wrong?

Thank you all

Regards


Re: Tomcat, iis connector and case sensitivity

2008-06-16 Thread André Warnier



Luis Villa wrote:

Hello all,

I'm trying to add redirect rules to the tomcat connector. I've been reading
Tomcat connector documentation, and what I've done till the moment is this:

1.- I've created a rewrite_rules.properties with this content:

  /myapplication/=/MyApplication/
  /MYAPPLICATION/=/MyApplication/
  /MYAP/=/MyApplication/

2.- I've added this to isapi_redirect.properties:

   # Full path to the rewrite_rules.properties file

rewrite_rule_file=c:\apache-tomcat-6.0.14\conf\rewrite_rules.properties

... but it only works with /MyApplication/ (the name in webapps in tomcat).
Any other form (myapplication, MYAPPLICATION or MYAP) returns a 404 error.


Hi.
It might be a good idea to provide a bit of detail about your 
configuration, it would help the people trying to help you.
One can kind of guess from the above that you are running under Windows, 
with Tomcat 6.0.14, and are using an isapi connector, thus from IIS or 
the like, but it requires some effort.


I don't really know that precise environment, but I'll take a pot-shot 
anyway : is it not that your rewrite rules are being run too late, and 
they never see requests with /myapplication/, /MYAPPLICATION/ or /MYAP/ ?
Presumably, before they get to the isapi connector, requests go to the 
front-end HTTPD server.  If that one does not know that it should 
redirect /myapplication/, /MYAPPLICATION/ or /MYAP/ to the connector, 
then the connector never gets to see them.
Instead, the HTTPD server will try to serve those requests itself, and 
since it doesn't have those documents, respond with 404.

Does the 404 error page look like a Tomcat page, or else ?

André


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



httpRequest TimeOut

2008-06-16 Thread Raj
 

HI, 

I have a httpServlet running on apache-tomcat-4.1.36 .  My httpServlet
receives HTTP request from a .net application and process it. Sometimes my
httpServlet takes more than 5 min to process this request but,  .net
application is timing out the transaction in 110 Sec. I wonder is there any
way to stop my httpServlet to stop processing the request if it takes more
than 1 min and reply TIMEOUT.

 

Regards

Raj

 



Re: jk manager: what means CE (client errors) ?

2008-06-16 Thread Rainer Jung

Stephanie Wullbieter wrote:

Hi,

in jk manager there is

CE  Number of client errors

shown.

What means "client error" ? When happens this?


Client = http client in front of web server (e.g. browser)

Typically: when we either try to read a part of the request from the 
client or - more often - when we want to write back part of the response 
to the client and the connection to the client is dead.


E.g. a response took to long and the client (user in front of the 
browser) already clicked retry or on another link. Then the browser 
sresets the connection, and we can only realize, when we try to use it 
in order to either get more data or write back data.


Those events correlate 1:1 to client error messages in the JK log file.


Thank You,

Stephanie


Regards,

Rainer

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat, iis connector and case sensitivity

2008-06-16 Thread Luis Villa
Hello André, thanks for your answer,

My configuration is:


   - tomcat 6
   - IIS 6
   - Windows 2003 server SP1
   - tomcat connector 1.2.26

When I ask for MYAP, it doesn't appear a IIS screen, but a Tomcat error. So,
I assumed the connector was correctly deriving the requests from IIS to
Tomcat.



2008/6/16 André Warnier <[EMAIL PROTECTED]>:

>
>
> Luis Villa wrote:
>
>> Hello all,
>>
>> I'm trying to add redirect rules to the tomcat connector. I've been
>> reading
>> Tomcat connector documentation, and what I've done till the moment is
>> this:
>>
>> 1.- I've created a rewrite_rules.properties with this content:
>>
>>  /myapplication/=/MyApplication/
>>  /MYAPPLICATION/=/MyApplication/
>>  /MYAP/=/MyApplication/
>>
>> 2.- I've added this to isapi_redirect.properties:
>>
>>   # Full path to the rewrite_rules.properties file
>>
>> rewrite_rule_file=c:\apache-tomcat-6.0.14\conf\rewrite_rules.properties
>>
>> ... but it only works with /MyApplication/ (the name in webapps in
>> tomcat).
>> Any other form (myapplication, MYAPPLICATION or MYAP) returns a 404 error.
>>
>>  Hi.
> It might be a good idea to provide a bit of detail about your
> configuration, it would help the people trying to help you.
> One can kind of guess from the above that you are running under Windows,
> with Tomcat 6.0.14, and are using an isapi connector, thus from IIS or the
> like, but it requires some effort.
>
> I don't really know that precise environment, but I'll take a pot-shot
> anyway : is it not that your rewrite rules are being run too late, and they
> never see requests with /myapplication/, /MYAPPLICATION/ or /MYAP/ ?
> Presumably, before they get to the isapi connector, requests go to the
> front-end HTTPD server.  If that one does not know that it should redirect
> /myapplication/, /MYAPPLICATION/ or /MYAP/ to the connector, then the
> connector never gets to see them.
> Instead, the HTTPD server will try to serve those requests itself, and
> since it doesn't have those documents, respond with 404.
> Does the 404 error page look like a Tomcat page, or else ?
>
> André
>
>
>
> -
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: Tomcat, iis connector and case sensitivity

2008-06-16 Thread Rainer Jung

Luis Villa wrote:

Hello all,

I'm trying to add redirect rules to the tomcat connector. I've been reading
Tomcat connector documentation, and what I've done till the moment is this:

1.- I've created a rewrite_rules.properties with this content:

  /myapplication/=/MyApplication/
  /MYAPPLICATION/=/MyApplication/
  /MYAP/=/MyApplication/

2.- I've added this to isapi_redirect.properties:

   # Full path to the rewrite_rules.properties file

rewrite_rule_file=c:\apache-tomcat-6.0.14\conf\rewrite_rules.properties

... but it only works with /MyApplication/ (the name in webapps in tomcat).
Any other form (myapplication, MYAPPLICATION or MYAP) returns a 404 error.

Does somebody what I'm doing wrong?


Set you redirector log level to debug and try once.

During startup, you should see

Using rewrite rule file YOURRULESFILE

in the log file, and later

Loaded rewrite rule file YOURRULESFILE

Between those two, you should also see lines indicating, that the 
contents of the file got parsed.


If a rule matches a request, you should also see a log line in the 
redirector log file of the form:


rewriten URI [OLDURL]->[NEWURL]

(the typo "rewriten" instead of "rewritten" has only been corrected in 
the latest release 1.2.26, before it is written as above).


Regards,

Rainer

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat, iis connector and case sensitivity

2008-06-16 Thread André Warnier



Luis Villa wrote:

Hello André, thanks for your answer,

My configuration is:


   - tomcat 6
   - IIS 6
   - Windows 2003 server SP1
   - tomcat connector 1.2.26

When I ask for MYAP, it doesn't appear a IIS screen, but a Tomcat error. So,
I assumed the connector was correctly deriving the requests from IIS to
Tomcat.



And you probably then assume correctly.
In the Tomcat error page, do you see anything that shows which URL it is 
trying to handle, and is it the "untranslated" one ?
If not in the Tomcat error page, then some Tomcat log should show which 
URL it is trying to process.  You may have to enable the "Access Log 
Valve" for that.
(In one Tomcat 5.5 config I have, the following is defined in the 
server.xml, inside the respective  container :


)

Of course, a quick and dirty fix would probably be to modify the web.xml 
of your application, to match the various URIs you can get, like :

instead of
MyApplication
make it
MyApplication
MYAPP
MYAPPLICATION
myapplication
etc..
(you have to verify, but I think the  can be repeated.)
Maybe also (since it's called "url-pattern"), this is a regexp, in which 
case there might be a more elegant way to specify this.


André









2008/6/16 André Warnier <[EMAIL PROTECTED]>:



Luis Villa wrote:


Hello all,

I'm trying to add redirect rules to the tomcat connector. I've been
reading
Tomcat connector documentation, and what I've done till the moment is
this:

1.- I've created a rewrite_rules.properties with this content:

 /myapplication/=/MyApplication/
 /MYAPPLICATION/=/MyApplication/
 /MYAP/=/MyApplication/

2.- I've added this to isapi_redirect.properties:

  # Full path to the rewrite_rules.properties file

rewrite_rule_file=c:\apache-tomcat-6.0.14\conf\rewrite_rules.properties

... but it only works with /MyApplication/ (the name in webapps in
tomcat).
Any other form (myapplication, MYAPPLICATION or MYAP) returns a 404 error.

 Hi.

It might be a good idea to provide a bit of detail about your
configuration, it would help the people trying to help you.
One can kind of guess from the above that you are running under Windows,
with Tomcat 6.0.14, and are using an isapi connector, thus from IIS or the
like, but it requires some effort.

I don't really know that precise environment, but I'll take a pot-shot
anyway : is it not that your rewrite rules are being run too late, and they
never see requests with /myapplication/, /MYAPPLICATION/ or /MYAP/ ?
Presumably, before they get to the isapi connector, requests go to the
front-end HTTPD server.  If that one does not know that it should redirect
/myapplication/, /MYAPPLICATION/ or /MYAP/ to the connector, then the
connector never gets to see them.
Instead, the HTTPD server will try to serve those requests itself, and
since it doesn't have those documents, respond with 404.
Does the 404 error page look like a Tomcat page, or else ?

André



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat, iis connector and case sensitivity

2008-06-16 Thread André Warnier



Rainer Jung wrote:

Luis Villa wrote:

[...]


Set you redirector log level to debug and try once.


Woa ! That's cheating !
:-)


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat, iis connector and case sensitivity

2008-06-16 Thread Rainer Jung

André Warnier wrote:

Set you redirector log level to debug and try once.


Woa ! That's cheating !
:-)


It depends on the rules of the game ;)

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat, iis connector and case sensitivity

2008-06-16 Thread Luis Villa
Ok, I found the problem :)

What was misconfigured was the virtual directory in IIS. There was a mess of
configuration files and the one I was changing was not the one the previous
system admin configured :S

The thing is, there was configuration in the registry, and 3 folders with
the isapi redirector. I catched it when, setting log_level to debug did
nothing.

Now it works perfectly.

Thank you all :)

Regards


Re: Tomcat, iis connector and case sensitivity

2008-06-16 Thread Rainer Jung

Luis Villa wrote:

I catched it when, setting log_level to debug did nothing.


That was a desired side effect of the exercise :)

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Multiple Java processes when using Tomcat

2008-06-16 Thread Ben Stringer
On Mon, 2008-06-16 at 06:59 +0100, John Gardner wrote:
> Caldarale, Charles R wrote:
> >> -Original Message-
> >> From: John Gardner [mailto:[EMAIL PROTECTED]
> >> Subject: Multiple Java processes when using Tomcat
> >>
> >> Normally, I only expect to see 2,3,4 or 5 java processes
> >> associated with the Tomcat user, not all of the above!
> > 
> > http://wiki.apache.org/tomcat/FAQ/Linux_Unix#Q1
> > 
> >  - Chuck
> > 
> > 
> 
> Thanks Chuck...
> 
> This entry is for ps, will this be the same situation for top?

On linux systems, they are part of the same package (procps), and both
top and ps will behave the same way. Your RHEL3 system will likely be
running a 2.4 series kernel. From the procps FAQ:

Why do ps and top show threads individually?

The 2.4.xx kernel does not provide proper support for grouping threads
by
process. Hacks exist to group them anyway, but such hacks will falsely
group
similar tasks and will fail to group tasks due to race conditions. The
hacks
are also slow. As none of this is acceptable in a critical system tool,
task
grouping is not currently available for the 2.4.xx kernel. The 2.6.xx
kernel
allows for proper thread grouping and reporting. To take advantage of
this,
your programs must use a threading library that features the
CLONE_THREAD flag.
The NPTL pthreads provided by recent glibc releases use CLONE_THREAD.

Cheers, Ben


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat, iis connector and case sensitivity

2008-06-16 Thread André Warnier



Rainer Jung wrote:

Luis Villa wrote:

I catched it when, setting log_level to debug did nothing.


That was a desired side effect of the exercise :)


You see, cheating will get you nowhere !
:-)


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Tomcat started but is not available!

2008-06-16 Thread Larry Isaacs
Assuming you are using the Eclipse Web Tools Platform, or Java EE package 
version of Eclipse for you Tomcat support, see this FAQ entry:

http://wiki.eclipse.org/WTP_Tomcat_FAQ#If_I_start_my_Tomcat_server_and_try_to_display_Tomcat.27s_default_page.2C_why_do_I_see_a_directory_listing_or_404_error_page.3F

Cheers,
Larry

> -Original Message-
> From: henry human [mailto:[EMAIL PROTECTED]
> Sent: Saturday, June 14, 2008 3:55 PM
> To: Tomcat Users List
> Subject: Re: Tomcat started but is not available!
>
> > it is just because under eclipse you don't have the
> > the ROOT application .
>
> What do you mean with a ROOT application?
> Where should i deploy my web applications? they are
> already in tomcat/webapps but as i said when i start
> tomcat
> from eclipse, although the tomcat is started, but the
> tomcat is not available from the browser and and
> consequently my web applications too
>
>
> > just deploy your web app and it will work fine.
> Whre
> >
> > On Sat, Jun 14, 2008 at 10:14 PM, henry human
> > <[EMAIL PROTECTED]> wrote:
> >
> > > Hello
> > > I have Tomcat 6.0.4, JRE 1.6 on my PC. I embed
> > tomcat
> > > in eclipse IDE.
> > > When i run  tomcat with the startup.bat from the
> > > console i have access to tomcat at the web browser
> > via
> > > http://localhost:8080 and I see in the console
> > output
> > > of the tomcat that my web applications in
> > > tomcat/webapps are deployed.
> > > In contrast to that, when i start it inside
> > eclipse,
> > > although i see that the tomcat is successfully
> > > started, but the tomcat output does not show that
> > my
> > > web applications are deployed and at the browser i
> > > have no access to server typing
> > http://localhost:8080!
> > >
> > > I get the HTTP Status 404 - / ERROR:
> > > 
> > > HTTP Status 404 - /
> > > type Status report
> > > description The requested resource (/) is not
> > > available.
> > > Apache Tomcat/6.0.14
> > > ++
> > >
> > >
> > > Thanks for you hints
> > > henry
> > >
> > >
> > >
> > >
> >
> __
> > > Gesendet von Yahoo! Mail.
> > > Dem pfiffigeren Posteingang.
> > > http://de.overview.mail.yahoo.com
> > >
> > >
> >
> -
> > > To start a new topic, e-mail:
> > users@tomcat.apache.org
> > > To unsubscribe, e-mail:
> > [EMAIL PROTECTED]
> > > For additional commands, e-mail:
> > [EMAIL PROTECTED]
> > >
> > >
> >
> >
> > --
> > Regards, Youssef
> >
>
>
>
>   __
> Gesendet von Yahoo! Mail.
> Dem pfiffigeren Posteingang.
> http://de.overview.mail.yahoo.com
>
> -
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: allow access without auth to app from several ip ranges , but leave auth from any other hosts

2008-06-16 Thread Alex Mestiashvili

Johnny Kewl wrote:


- Original Message - From: "Alex Mestiashvili" 
<[EMAIL PROTECTED]>

To: 
Sent: Friday, June 13, 2008 9:56 PM
Subject: allow access without auth to app from several ip ranges , but 
leave auth from any other hosts




HI ALL .
I have basic authentication for my tomcat application .
Now I want , allow access without authentication to this app from 
several ip ranges , but leave auth from any other hosts .

I did not find any solution  in google
Is it possible ?

tomcat version is 6.0.16

Thanks in advance .


Would have to be different pages...
/webapp/servlet
/webapp/servletip

TC security checks everything before you can get at it if the page 
is protected, its protected ;)


Another way is with "programmatic authentication"... ie do the BASIC 
auth in a servlet yourself... then you can do anything.


Have fun..

--- 


HARBOR : http://www.kewlstuff.co.za/index.htm
The most powerful application server on earth.
The only real POJO Application Server.
See it in Action : http://www.kewlstuff.co.za/cd_tut_swf/whatisejb1.htm
--- 



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Great thanks  to  everyone   , but I've found another way .
I've  created to directories myapp1 and myapp with appropriate web.xml s
I've put reverse proxy with rewrite engine between clients and tomcat

NameVirtualHost *

   ProxyRequests Off
   
   AddDefaultCharset off
   Order allow,deny
   Allow from all
   
   ProxyPass / http://localhost:8080/
   CustomLog /var/log/apache2/proxy_log common
   ProxyPassReverse / http://localhost:8080/
   RewriteEngine   on
   RewriteCond %{REMOTE_ADDR} 
!((192\.168\.194\..*$)|(14\.5\..*$)|(14\.30\..*$))

   RewriteRule ^(.*)$ - [C]
   RewriteRule ^/myapp1(.*)$ /$1 [F,L]
#forbidden for people who tries use directly /myapp1
 # this rules are important because otherwise any host can 
connect to myapp1 , because request goes through proxy and tomcat gets 
connections from localhost .

   RewriteCond %{REMOTE_ADDR} ^((192\.168\.194\..*$)|(14\.5\..*$))
   RewriteRule ^/myapp(.*)$ /myapp1$1 [R,L]  
   RewriteRule "^/(.*)" "http://localhost:8080/$1"; [P]  # main rule 
everything goes via PROXY

   RewriteLog /var/log/apache2/rewrite.log
   RewriteLogLevel 9





-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



WEB application with JNI Object for LB

2008-06-16 Thread karthikn

Hi

Using the APACHE HTTP 2.X server + Modjk  + TOMCAT6.1.14 ( 2 nos) +
JDK1.6  + HP UNIX11 i

Question : Would this work  for LB / Sticky Session across Tomcats in
cluster ?

Have a  web application with JNI Object ( Java  to  c++  by Os HP-Unix )
on Socket  ( Tcp/ Ip ) for  accessing  some Data for validation over the
WEB.



with regards
KARTHIK


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat producing (near) duplicate Catalina logs

2008-06-16 Thread Mark H. Wood
You are not the only one frustrated by the state of log4j
documentation.

If you persevere, the Introduction section "Configuration" does sort
of explain things, although as noted it does so mainly from the
programmer's point of view.  The section "Default Initialization"
discusses how the configuration is found.

Digging in a little, there is somewhat more complete configuration
documentation in the Javadoc:

  http://logging.apache.org/log4j/1.2/apidocs/index.html

Scroll down (and down and down) through
org.apache.log4j.PropertyConfigurator to the method
doConfigure(String,LoggerRepository) and you will find a bit of
discussion of configuration syntax and semantics.  Apparently, if you
fetch the source kit and unpack it, there are further examples included.

"Read The Fine Manuals" is certainly good advice, but log4j is a poor
example.  It's a shame that the package is in such a poor state,
because it has a number of clever and useful features which are rarely
mentioned.

-- 
Mark H. Wood, Lead System Programmer   [EMAIL PROTECTED]
Typically when a software vendor says that a product is "intuitive" he
means the exact opposite.



pgp1UL7EgEQWH.pgp
Description: PGP signature


problem gzipping dynamic content with apache+jk+tomcat configuration

2008-06-16 Thread Kirti Teja
Hi,


I use apache 2, tomcat 6.0.13 with modjk2.  When I added

 AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css
application/x-javascript text/javascript text/x-js

 in my httpd conf file, I see only static resources which are served by
apache getting gzipped.

Dynamic response (text/html)  which are served by tomcat through AJP
connector are not zipped.

I tried googling and found that there are more people who have this problem
but with no answers.


Can any one help me on this?



With Regards,

teja


Re: problem gzipping dynamic content with apache+jk+tomcat configuration

2008-06-16 Thread Rainer Jung

Kirti Teja wrote:

Hi,


I use apache 2, tomcat 6.0.13 with modjk2.  When I added

 AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css
application/x-javascript text/javascript text/x-js

 in my httpd conf file, I see only static resources which are served by
apache getting gzipped.

Dynamic response (text/html)  which are served by tomcat through AJP
connector are not zipped.

I tried googling and found that there are more people who have this problem
but with no answers.


Can any one help me on this?


Not before you are telling us your version of httpd and mod_jk ;)

It works for me with httpd 2.2.8 and mod_jk 1.2.26. I also added

AddOutputFilter DEFLATE html txt xml css js jsp do

in addition to the AddOutputFilterByType.

If you use Firefox as a browser and install Firebug. What does it show 
you as Content-Type and Content-Encoding of the response? What does it 
show as Accept-Encoding for the request?



With Regards,

teja


Regards,

Rainer

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: problem gzipping dynamic content with apache+jk+tomcat configuration

2008-06-16 Thread Kirti Teja
 AddOutputFilter DEFLATE html txt xml css js jsp do

did the trick.

Thankyou very much. Your help is just great thanks once again.

With Regards,
Teja R




On Mon, Jun 16, 2008 at 9:18 PM, Rainer Jung <[EMAIL PROTECTED]>
wrote:

> Kirti Teja wrote:
>
>> Hi,
>>
>>
>> I use apache 2, tomcat 6.0.13 with modjk2.  When I added
>>
>>  AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css
>> application/x-javascript text/javascript text/x-js
>>
>>  in my httpd conf file, I see only static resources which are served by
>> apache getting gzipped.
>>
>> Dynamic response (text/html)  which are served by tomcat through AJP
>> connector are not zipped.
>>
>> I tried googling and found that there are more people who have this
>> problem
>> but with no answers.
>>
>>
>> Can any one help me on this?
>>
>
> Not before you are telling us your version of httpd and mod_jk ;)
>
> It works for me with httpd 2.2.8 and mod_jk 1.2.26. I also added
>
>AddOutputFilter DEFLATE html txt xml css js jsp do
>
> in addition to the AddOutputFilterByType.
>
> If you use Firefox as a browser and install Firebug. What does it show you
> as Content-Type and Content-Encoding of the response? What does it show as
> Accept-Encoding for the request?
>
>  With Regards,
>>
>> teja
>>
>
> Regards,
>
> Rainer
>
> -
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: problem gzipping dynamic content with apache+jk+tomcat configuration

2008-06-16 Thread Len Popp
Did you put AddOutputFilterByType in *all* the  and
 sections? In particular, in the  associated with
the Tomcat connector?
-- 
Len


On Mon, Jun 16, 2008 at 11:26, Kirti Teja <[EMAIL PROTECTED]> wrote:
> Hi,
>
>
> I use apache 2, tomcat 6.0.13 with modjk2.  When I added
>
>  AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css
> application/x-javascript text/javascript text/x-js
>
>  in my httpd conf file, I see only static resources which are served by
> apache getting gzipped.
>
> Dynamic response (text/html)  which are served by tomcat through AJP
> connector are not zipped.
>
> I tried googling and found that there are more people who have this problem
> but with no answers.
>
>
> Can any one help me on this?
>
>
>
> With Regards,
>
> teja
>

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Fwd: problem gzipping dynamic content with apache+jk+tomcat configuration

2008-06-16 Thread Kirti Teja
   AddOutputFilter DEFLATE html txt xml css js jsp do

adding this in httpd.conf did the trick. now i see even my dynamic reponses
gzipped.

thanks,
teja
-- Forwarded message --
From: Rainer Jung <[EMAIL PROTECTED]>
Date: Mon, Jun 16, 2008 at 9:18 PM
Subject: Re: problem gzipping dynamic content with apache+jk+tomcat
configuration
To: Tomcat Users List 


Kirti Teja wrote:

> Hi,
>
>
> I use apache 2, tomcat 6.0.13 with modjk2.  When I added
>
>  AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css
> application/x-javascript text/javascript text/x-js
>
>  in my httpd conf file, I see only static resources which are served by
> apache getting gzipped.
>
> Dynamic response (text/html)  which are served by tomcat through AJP
> connector are not zipped.
>
> I tried googling and found that there are more people who have this problem
> but with no answers.
>
>
> Can any one help me on this?
>

Not before you are telling us your version of httpd and mod_jk ;)

It works for me with httpd 2.2.8 and mod_jk 1.2.26. I also added

   AddOutputFilter DEFLATE html txt xml css js jsp do

in addition to the AddOutputFilterByType.

If you use Firefox as a browser and install Firebug. What does it show you
as Content-Type and Content-Encoding of the response? What does it show as
Accept-Encoding for the request?

 With Regards,
>
> teja
>

Regards,

Rainer

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Memory usage in Tomcat 6

2008-06-16 Thread Tuan Quan
Hi all, how do I adjust Memory allocation Tomcat 6, running as service in 
Windows? I ran into "out of memory" error.
thanks.

RE: Memory usage in Tomcat 6

2008-06-16 Thread Caldarale, Charles R
> From: Tuan Quan [mailto:[EMAIL PROTECTED]
> Subject: Memory usage in Tomcat 6
>
> Hi all, how do I adjust Memory allocation Tomcat 6, running
> as service in Windows?

Use the tomcat6w.exe program in Tomcat's bin directory.

Read the FAQ for memory usage information:
http://wiki.apache.org/tomcat/FAQ/Memory

JConsole (part of the HotSpot JVM SDK) is a good tool for monitoring memory 
usage on the fly.

 - 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 start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



mod_jk load balancing and cluster node health

2008-06-16 Thread Nathan E. Pilling
Is it possible to configure mod_jk to check node status by requesting a 
specific web application path to see if a cluster node is healthy (and should 
be included or excluded from the cluster)?

I have a web application that runs across multiple tomcat instances and any 
request be processed by any tomcat node. If an instance of the web app on one 
of the tomcat servers is not configured properly, I want the connector to 
exclude it from the cluster.

I have written a servlet that returns a status of 503 if something is wrong or 
200 if everything is okay.

Thanks,
Nathan Pilling


Re: Using PHP4 with Tomcat5.5

2008-06-16 Thread Jonathan Mast
Thanks, but I've tried them both and no luck.  The Tomcat wiki tells me how
to compile php for tomcat, which i have no intention of doing.  The second
one tells me i must unjar the phpservlet.jar file and fiddle with some
properties.  But I know I don't have to do this.  My work computer has been
set up to use PHP and Tomcat and it works fine.  But I (and everyone else at
work) can't find whatever magic was performed to get it to function.

BTW: does Tomcat have an equivalent to phpinfo(); ?  I would like some way
to exam the internals of Tomcat.

How difficult is it to set up apache on windows?  It doesn't come as a
binary as i recall, and i'm loath to go about compiling C/C++ on a windoze
contraption :-[


On Sun, Jun 15, 2008 at 9:37 PM, Steve Ochani <[EMAIL PROTECTED]> wrote:

> Date sent:  Sun, 15 Jun 2008 23:12:42 -0100
> From:   Jonathan Mast <[EMAIL PROTECTED]>
> Subject:Using PHP4 with Tomcat5.5
> To: Tomcat Users List 
> Send reply to:  Tomcat Users List 
>
> > I can't figure out how to use php4 with tomcat 5.5 on my windows
> > system.  I searched the internet and I can't find a straight forward
> > guide to using these 2 programs.  If anyone could point me to a
> > step-by-step guide it would be great.
> >
> > thanks
> >
>
> Here are the first two links from google search of "php tomcat"
>
> http://wiki.apache.org/tomcat/UsingPhp
>
>
> http://blog.taragana.com/index.php/archive/running-php-5x-on-windows-using-tomcat-4x-or-
> 5x/
>
>
> I personally use apache httpd for php and cgi and Tomcat for servlets with
> mod_jk on Linux
> and Solaris and I'd recommend it for Windows as well.
>
>
>
> -Steve O.
>
>
>
> -
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: Using PHP4 with Tomcat5.5

2008-06-16 Thread André Warnier



Jonathan Mast wrote:



[...]


How difficult is it to set up apache on windows?

Not difficult at all.

  It doesn't come as a

binary as i recall,
Wrong, it does. Download the appropriate msi installer from the Apache 
website, save it, double-click on it, and there you go.


http://mirror.serversupportforum.de/apache/httpd/binaries/win32/apache_2.2.9-win32-x86-openssl-0.9.8h-r2.msi



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Multiple Java processes when using Tomcat

2008-06-16 Thread John Gardner

Ben Stringer wrote:


This entry is for ps, will this be the same situation for top?


On linux systems, they are part of the same package (procps), and both
top and ps will behave the same way. Your RHEL3 system will likely be
running a 2.4 series kernel. From the procps FAQ:

Why do ps and top show threads individually?

The 2.4.xx kernel does not provide proper support for grouping threads
by
process. Hacks exist to group them anyway, but such hacks will falsely
group
similar tasks and will fail to group tasks due to race conditions. The
hacks
are also slow. As none of this is acceptable in a critical system tool,
task
grouping is not currently available for the 2.4.xx kernel. The 2.6.xx
kernel
allows for proper thread grouping and reporting. To take advantage of
this,
your programs must use a threading library that features the
CLONE_THREAD flag.
The NPTL pthreads provided by recent glibc releases use CLONE_THREAD.

Cheers, Ben



Thanks Ben.

This is what I needed.

Cheers

John



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: URL is "null" and HTTP 404 error when using FROM authentication

2008-06-16 Thread Christopher Schultz

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Assaf,

exkor wrote:
| The problem im having right now (which i believe is relatively simple)
| is that my app doesn't connect to the DB. I configured server.xml back
| to use MemoryRealm because i want only the app to use the DB. Then
| I've changed my apps context.xml to this:
|
| 
|
|  is being
correctly placed within META-INF/context.xml in your web application.

| 

Don't use 'autoReconnect=true'... use validationQuery='SELECT 1'.

|   username="root"
|   password="skywalker"
| digest="MD5"
| userTable="users"
| userNameCol="uid"
|   userCredCol="password"
|   userRoleTable="users"
| roleNameCol="role"
|   logAbandoned="true"
|   removeAbandoned="true"
|   removeAbandonedTimeout="10"
|   maxActive="20"
|   maxIdle="10"
|   maxWait="-1"/>

I think you have some stuff confused...  sets up a database
connection (JNDI DataSource), while a  should include the
information about userCredCol and all that stuff. You seem to be missing
the  element in your .

Note that s using local s need to have
localDataSource="true" in your  element.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkhWufgACgkQ9CaO5/Lv0PDWEgCgqyXDPirLcgFYGpfAzmm6NtkN
kpkAnRTCNgeq8dYpT7HxM6cFIEVTOVSf
=CvDU
-END PGP SIGNATURE-

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: AW: Tomcat will not create session cookie

2008-06-16 Thread Christopher Schultz

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Mario,

Mario Killmer wrote:
| Hello Christopher,
| you are right. It was a Firewall problem. Thanks for your help.

For the good of the list (and the archives), could you explain:

1. How you determined that the problem was your firewall

2. What type of firewall you have

3. How you were able to solve the problem (including any references)

Thanks,
- -chris

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkhWumcACgkQ9CaO5/Lv0PBw2gCdGnb/QjNYnqJG97VQYF2ho7bT
Z2EAoMPMVfJeChj7siB9UAgWNk11Zamj
=0kI4
-END PGP SIGNATURE-

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat producing (near) duplicate Catalina logs

2008-06-16 Thread Christopher Schultz

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

André,

André Warnier wrote:
| Ok, then where about in my Tomcat configuration would I find which
| logging system it uses, or a pointer to something that tells me which
| system is used ?

Without going further down the rabbit hole, your question is answered
right here, in Tomcat's "Logging" section of the user's guide:
http://tomcat.apache.org/tomcat-6.0-doc/logging.html

It says right up front, "Tomcat 6.0 uses Commons Logging  throughout its
internal code allowing the developer to choose a logging configuration
that suits their needs, e.g java.util.logging or Log4J. Commons Logging
provides Tomcat the ability to log hierarchially across various log
levels without needing to rely on a particular logging implementation."

So, the answer is "Tomcat always uses commons-logging".

If you choose to configure commons-logging in some way other than the
default, then you are taking responsibility for providing your own
3rd-party library.

The docs do include light information about using log4j and juli (Java
1.4's logging interfaces).

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkhWu1IACgkQ9CaO5/Lv0PBsWACgnBGkbbRhOYcEM7WXHASEFl0l
VjQAn1VU75Eg/AeBK3uJnLaSzdM6mQhu
=kxS2
-END PGP SIGNATURE-

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat producing (near) duplicate Catalina logs

2008-06-16 Thread Christopher Schultz

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

http://logging.apache.org/log4j/1.2/manual.html

André Warnier wrote:
| So I started with the log4j menu item, basically because it seems to be
| the only one mentioned there with relevance to Tomcat.
| Logically (I thought), I started with the 2.0 version.  Wrong choice.
| I downgraded my choice to 1.3.  Wrong choice also apparently.
| 1.2 is the thing, I guess.
| Nice starting page.

:( Agreed. Go yell at the log4j guys ;)

| Then I chose Documentation...Introduction in the menu at the left.
| Nice general introduction.
| Scrolling down and reading however, it gets into material that I believe
| might be appropriate to a Java programmer wanting to know how to insert
| logging statements in his code, but not exactly useful for someone
| looking for where log4j would hold the configuration smippets that tell
| one if it is going to create a monthly or daily logfile.

You didn't read far enough, then.
http://logging.apache.org/log4j/1.2/manual.html contains sample
log4j.properties files. Just look for the "Configuration" section.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkhWvIcACgkQ9CaO5/Lv0PDfBgCgiMK6lLWGjNQG0ZFsj5z5bsL/
UFYAoLbi38TRiwrSDDOuh4iL3C82pIrt
=CfIS
-END PGP SIGNATURE-

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Using PHP4 with Tomcat5.5

2008-06-16 Thread Steve Ochani
On 16 Jun 2008 at 14:37, Jonathan Mast wrote:

Date sent:  Mon, 16 Jun 2008 14:37:55 -0400
From:   Jonathan Mast <[EMAIL PROTECTED]>
Subject:Re: Using PHP4 with Tomcat5.5
To: Tomcat Users List , 
[EMAIL PROTECTED]
Send reply to:  Tomcat Users List 

> Thanks, but I've tried them both and no luck.  The Tomcat wiki tells
> me how
> to compile php for tomcat, which i have no intention of doing.  The
> second
> one tells me i must unjar the phpservlet.jar file and fiddle with
> some
> properties.  But I know I don't have to do this.  My work computer
> has been
> set up to use PHP and Tomcat and it works fine. 

If it works fine then what is the problem?


> But I (and everyone
> else at
> work) can't find whatever magic was performed to get it to
> function.
> 

Get what to function? PHP? Just make a php file in a webapp dir. For example

TOMCAT_DIR/webapps/webappname/test.php

If you mean you are trying to recreate the already existing setup that you have 
then you will 
have to ask the person who did the setups. Noone on this list will be able to 
tell you how that 
person did the setup with 100% certainity.

> BTW: does Tomcat have an equivalent to phpinfo(); ?  I would like

No.

> some way
> to exam the internals of Tomcat.

Not sure what you mean by that. Tomcat is written in Java and is primarily a 
Java servlet 
container.

If you run a php app in tomcat with phpinfo() you will get details about the 
php install not 
Tomcat

> 
> How difficult is it to set up apache on windows? 


By apache I'm guessing you mean apache webserver whic is very easy to install, 
IMO.



> It doesn't come as
> a
> binary as i recall, and i'm loath to go about compiling C/C++ on a
> windoze
> contraption :-[

It comes as a binary install.


BTW please configure your e-mail client to follow reply-to headers.




-Steve O.




> 
> 
> On Sun, Jun 15, 2008 at 9:37 PM, Steve Ochani <[EMAIL PROTECTED]>
> wrote:
> 
> > Date sent:  Sun, 15 Jun 2008 23:12:42 -0100
> > From:   Jonathan Mast <[EMAIL PROTECTED]>
> > Subject:Using PHP4 with Tomcat5.5
> > To: Tomcat Users List 
> > Send reply to:  Tomcat Users List 
> >
> > > I can't figure out how to use php4 with tomcat 5.5 on my
> windows
> > > system.  I searched the internet and I can't find a straight
> forward
> > > guide to using these 2 programs.  If anyone could point me to
> a
> > > step-by-step guide it would be great.
> > >
> > > thanks
> > >
> >
> > Here are the first two links from google search of "php tomcat"
> >
> > http://wiki.apache.org/tomcat/UsingPhp
> >
> >
> >
> http://blog.taragana.com/index.php/archive/running-php-5x-on-windows
> -using-tomcat-4x-or-
> >
> 5x/ dows-using-tomcat-4x-or-5x/>
> >
> >
> > I personally use apache httpd for php and cgi and Tomcat for
> servlets with
> > mod_jk on Linux
> > and Solaris and I'd recommend it for Windows as well.
> >
> >
> >
> > -Steve O.
> >
> >
> >
> >
> 
> -
> > To start a new topic, e-mail: users@tomcat.apache.org
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> 



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat producing (near) duplicate Catalina logs

2008-06-16 Thread Christopher Schultz

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

David,

David Fisher wrote:
| All
| my contexts logs are hijacked by Roller, and that is a roller question
| that I can't ask due to my weird configuration. But if I understood
| better how logging and tomcat interact I could understand.

All of the logs are hijacked by roller, or only the one in which Roller
is actually deployed? If you moved Roller libraries (or the whole thing)
into Tomcat's lib directory, then you are probably making a mistake
(your other memory issues notwithstanding).

Tell me how you want your logs to act, and I'll try to give you a
configuration you can start with, and hopefully improve upon.

| My host context on Tomcat 4.1.31 looks like:
|
| 
| 
| 
| 
|
| In Tomcat 5.5.26:
|
| 
| 
| 

I don't believe that these two configurations do the same thing. Are you
asserting that they do, or that this was the best you could do? The
4.1.31 configuration does both access logging (like Apache httpd common
log formatting) plus a general logger for interesting things that happen
within the  itself. Your 5.5 config only logs accesses.

| How do I translate my 4.1.31 Logger to log4j in Tomcat 5.5.25? How do I
| do the same for JULI logging? How do I combine the two?

I'm no expert in JULI, but I can tell you that my experience was log4j
was a bit confusing. I've been using log4j forever in my own
applications, so I figured that configuring commons-logging within
Tomcat to use log4j would be a breeze. It wasn't, unfortunately. I was
also trying to introduce commons-logging in my own applications for
whatever reason ;)

My first problem was that the commons-logging documentation seems to
indicate that the "best" logging system available would be chosen, and
gives a load order in which log4j is detected before using the juli
fallback. That appears to be true in the general sense, except that
commons-logging is set up /before/ any contexts are loaded. That means
that log4j needs to be in the server/shared/common lib directory in
order for it to be detected. I'm not a big fan of that, since I like to
use a clean Tomcat install so that upgrading isn't such a PITA.

So, the first thing I learned was that I needed the following:
1. log4j.jar in my webapp's WEB-INF/lib directory (duh)
2. log4j.properties (or XML or however you indend to init log4j) needs
~   to be in my webapp's WEB-INF/classes directory (duh)
3. commons-logging.jar
4. commons-logging.properties in my webapp's WEB-INF/classes directory
~   Mine looks like this:
org.apache.commons.logging.Log=org.apache.commons.logging.impl.Log4JLogger
5. Use a ServletContextListener to shutdown commons-logging cleanly when
~   the context gets cleaned-up (details elsewhere for brevity).

This last point seems counter-intuitive given that a) commons-logging
says that it will look for log4j before falling-back on juli and b)
commons-logging has already been initialized, so why does it
automagically re-configure itself to work within the webapp? See below.

At this point, commons-logging should start emitting log messages to
your configured log4j log files. As indicated in another post, I'm using
DailyRollingFilAppender which will roll depending on the pattern you use
for the date in the filename, rather than strictly "daily", as the name
of the class might suggest.

| How does the classloader come into play? I know it has some affect
| because there is mention in the docs of tomcat/common/ vs. tomcat/shared/?

Yup. ClassLoaders are important because of the way they (duh) load
classes. Most ClassLoaders are implemented like this:

public Class loadClass(String className)
{
~Class clazz = parentClassLoader.loadClass(className);

~if(null == clazz)
~clazz = this.actuallyLoadTheClass(className);

~   return clazz;
}

That is, the parent class loader is consulted first when loading
classes. The WebappClassLoader, in contrast (and specified in the
servlet spec) does this:

public Class loadClass(String className)
{
~Class clazz = this.actuallyLoadTheClass(className);

~if(null =-= clazz)
~parentClassLoader.loadClass(className);

~   return clazz;
}

Note that it's behavior is exactly the opposite: libraries found in both
your webapp AND the Tomcat shared or common lib directories (which are
unified in TC 6, btw) will be loaded FROM YORU WEBAPP, not from the
parent classloader. This is actually to your advantage, since it allows
you to trump libraries loaded (directly) by Tomcat in your own webapp,
thus having much more control over your own application.

Now, back to logging. Since commons-logging.jar is in your own webapp, a
re-configuration occurs when your webapp is initialized (actually, it's
not re-configuration... the TC commons-logging instance has already been
configured it's just that your webapp's instance of commons-logging
is now being loaded and configured for the first time).

When you configure com

Re: disable directory indexing in tomcat?

2008-06-16 Thread Christopher Schultz

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Dave,

Dave Girardin wrote:
| Thanks so much Mark. As you suspected it was disabled so I suspect the
| security scan is in error. I'll check the web page to be sure though.

The scan probably just determines the version of TC running and then
spits out all the known vulnerabilities of that server, rather than
actually attempting to demonstrate the vulnerability.

You can prove to yourself that directory indexes are turned off by
visiting a directory that has no welcome-file, and verify that you get a
404 or 403 error.

- -chris

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkhWxQ4ACgkQ9CaO5/Lv0PA9dwCgrm06k+vYKzfby5hgvk0yIIPe
/PwAn0mCVl90iq7Dbkr3c5mwoBqCvO1j
=FdhT
-END PGP SIGNATURE-

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: 3 fiels form based login authentication in Tomcat

2008-06-16 Thread Christopher Schultz

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Chetan,

Chetan Bob wrote:
| I want Tomcat authentication like company id / username / Password so it
| looks i should go for Form based authentication 

Tomcat cannot do this at all, unfortunately. Securityfilter
(http://securityfilter.sourceforge.net), if you get the development
version, will give you access to the raw HttpServletRequest and you can
grab whatever information you want (including additional fields).

| Should we need to write our own Realm if so then how to any example?


You can't even write your own realm, because Realm only includes methods
like:

authenticate(String username, String password)

so you're out of luck.

Check out sf. You'll be happy.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkhWxZoACgkQ9CaO5/Lv0PAplQCfZ7pm0mh3mzSfFFD07pCsLshz
gvsAoKAXdxQfB9j2iSexUCrlWblBWGqK
=nxqg
-END PGP SIGNATURE-

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: problem gzipping dynamic content with apache+jk+tomcat configuration

2008-06-16 Thread Christopher Schultz

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Rainer,

Rainer Jung wrote:
| Kirti Teja wrote:
|> I use apache 2, tomcat 6.0.13 with modjk2.  When I added

[snip]

| Not before you are telling us your version of httpd and mod_jk ;)

She said she was using  mod_jk2, all versions of which should be
considered broken ;)

- -chris

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkhWxr8ACgkQ9CaO5/Lv0PBuKwCfbPSR/IXXMS612PJdkfHqsAQ5
CsIAoIYLNsYb33P3K14cU3iTW92Sod/o
=RGzH
-END PGP SIGNATURE-

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: allow access without auth to app from several ip ranges , but leave auth from any other hosts

2008-06-16 Thread Johnny Kewl


- Original Message - 
From: "Alex Mestiashvili" <[EMAIL PROTECTED]>

To: "Tomcat Users List" 
Sent: Monday, June 16, 2008 1:36 PM
Subject: Re: allow access without auth to app from several ip ranges , but 
leave auth from any other hosts




Johnny Kewl wrote:


- Original Message - From: "Alex Mestiashvili" 
<[EMAIL PROTECTED]>

To: 
Sent: Friday, June 13, 2008 9:56 PM
Subject: allow access without auth to app from several ip ranges , but 
leave auth from any other hosts




HI ALL .
I have basic authentication for my tomcat application .
Now I want , allow access without authentication to this app from 
several ip ranges , but leave auth from any other hosts .

I did not find any solution  in google
Is it possible ?

tomcat version is 6.0.16

Thanks in advance .


Would have to be different pages...
/webapp/servlet
/webapp/servletip

TC security checks everything before you can get at it if the page is 
protected, its protected ;)


Another way is with "programmatic authentication"... ie do the BASIC auth 
in a servlet yourself... then you can do anything.


Have fun..

---

HARBOR : http://www.kewlstuff.co.za/index.htm
The most powerful application server on earth.
The only real POJO Application Server.
See it in Action : http://www.kewlstuff.co.za/cd_tut_swf/whatisejb1.htm
---


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Great thanks  to  everyone   , but I've found another way .
I've  created to directories myapp1 and myapp with appropriate web.xml s
I've put reverse proxy with rewrite engine between clients and tomcat

NameVirtualHost *

   ProxyRequests Off
   
   AddDefaultCharset off
   Order allow,deny
   Allow from all
   
   ProxyPass / http://localhost:8080/
   CustomLog /var/log/apache2/proxy_log common
   ProxyPassReverse / http://localhost:8080/
   RewriteEngine   on
   RewriteCond %{REMOTE_ADDR} 
!((192\.168\.194\..*$)|(14\.5\..*$)|(14\.30\..*$))

   RewriteRule ^(.*)$ - [C]
   RewriteRule ^/myapp1(.*)$ /$1 [F,L]
#forbidden for people who tries use directly /myapp1
 # this rules are important because otherwise any host can connect 
to myapp1 , because request goes through proxy and tomcat gets connections 
from localhost .

   RewriteCond %{REMOTE_ADDR} ^((192\.168\.194\..*$)|(14\.5\..*$))
   RewriteRule ^/myapp(.*)$ /myapp1$1 [R,L]  RewriteRule "^/(.*)" 
"http://localhost:8080/$1"; [P]  # main rule everything goes via PROXY

   RewriteLog /var/log/apache2/rewrite.log
   RewriteLogLevel 9



Cool!
Got you in my "Apache Guru" book ;)

---
HARBOR : http://www.kewlstuff.co.za/index.htm
The most powerful application server on earth.
The only real POJO Application Server.
See it in Action : http://www.kewlstuff.co.za/cd_tut_swf/whatisejb1.htm
--- 



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Installing Apache-Tomcat 6.0.16 Problem

2008-06-16 Thread Chuck Noren
I have a PC with Fedora Core 6
I have installed jdk 1.6.0_06

I downloaded Tomcat 6.0.16, did a sucessful ant download. When I do ant, I
get a complaint from javac on the first line of Resouce.java, flagging the
comment characters "/*" and complaining about Enum (see below). Of cource,
javac compiles the single file okay when I hand enter it. What is going
wrong?

Thanks,
Chuck

[EMAIL PROTECTED] apache-tomcat-6.0.16-src]$ su
Password:
[EMAIL PROTECTED] apache-tomcat-6.0.16-src]# ant -version
Apache Ant version 1.6.5 compiled on August 30 2006
[EMAIL PROTECTED] apache-tomcat-6.0.16-src]# which javac
/usr/local/jdk1.6.0_06/bin/javac
[EMAIL PROTECTED] apache-tomcat-6.0.16-src]# ant
Buildfile: build.xml

build-prepare:
   [delete] Deleting directory
/home/noren/opennms/apache-tomcat-6.0.16-src/output/build/temp
[mkdir] Created dir:
/home/noren/opennms/apache-tomcat-6.0.16-src/output/build/temp

compile:
[javac] Compiling 1045 source files to
/home/noren/opennms/apache-tomcat-6.0.16-src/output/classes
[javac] --
[javac] 1. ERROR in
/home/noren/opennms/apache-tomcat-6.0.16-src/java/javax/annotation/Resource.java
(at line 1)
[javac] /*
[javac] ^^
[javac] The type Enum is not generic; it cannot be parameterized with
arguments 
[javac] --
[javac] 1 problem (1 error)

BUILD FAILED
/home/noren/opennms/apache-tomcat-6.0.16-src/build.xml:109: Compile failed;
see the compiler error output for details.

Total time: 5 seconds
[EMAIL PROTECTED] apache-tomcat-6.0.16-src]#


Re: SSL/HTTPS forwarding under Apache + mod_jk + tomcat

2008-06-16 Thread Bill Davidson

André Warnier wrote:
By the way, the reason why I can't try it right now is that I just 
don't have the application to try it with.  So whatever I mentioned 
before (but which apprently so far seems ok) was purely by attempting 
to understand the documentation. Beware.


I tried it today.  I disabled my cookie hack and set JkExtractSSL to off.
It seems to work fine.  Obviously, I want to do a lot more testing but
initially, it seems to look good.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Installing Apache-Tomcat 6.0.16 Problem

2008-06-16 Thread Steve Ochani
On 16 Jun 2008 at 17:32, Chuck Noren wrote:

Date sent:  Mon, 16 Jun 2008 17:32:34 -0400
From:   Chuck Noren <[EMAIL PROTECTED]>
Subject:Installing Apache-Tomcat 6.0.16 Problem
To: Tomcat Users List 
Send reply to:  Tomcat Users List 

> I have a PC with Fedora Core 6
> I have installed jdk 1.6.0_06
> 
> I downloaded Tomcat 6.0.16, did a sucessful ant download. When I do
> ant, I
> get a complaint from javac on the first line of Resouce.java,
> flagging the
> comment characters "/*" and complaining about Enum (see below). Of
> cource,
> javac compiles the single file okay when I hand enter it. What is
> going
> wrong?
> 
> Thanks,
> Chuck
> 

Why not just get the binary version of Tomcat?


-Steve O.



> [EMAIL PROTECTED] apache-tomcat-6.0.16-src]$ su
> Password:
> [EMAIL PROTECTED] apache-tomcat-6.0.16-src]# ant -version
> Apache Ant version 1.6.5 compiled on August 30 2006
> [EMAIL PROTECTED] apache-tomcat-6.0.16-src]# which javac
> /usr/local/jdk1.6.0_06/bin/javac
> [EMAIL PROTECTED] apache-tomcat-6.0.16-src]# ant
> Buildfile: build.xml
> 
> build-prepare:
>[delete] Deleting directory
> /home/noren/opennms/apache-tomcat-6.0.16-src/output/build/temp
> [mkdir] Created dir:
> /home/noren/opennms/apache-tomcat-6.0.16-src/output/build/temp
> 
> compile:
> [javac] Compiling 1045 source files to
> /home/noren/opennms/apache-tomcat-6.0.16-src/output/classes
> [javac] --
> [javac] 1. ERROR in
> /home/noren/opennms/apache-tomcat-6.0.16-src/java/javax/annotation/R
> esource.java
> (at line 1)
> [javac] /*
> [javac] ^^
> [javac] The type Enum is not generic; it cannot be parameterized
> with
> arguments 
> [javac] --
> [javac] 1 problem (1 error)
> 
> BUILD FAILED
> /home/noren/opennms/apache-tomcat-6.0.16-src/build.xml:109: Compile
> failed;
> see the compiler error output for details.
> 
> Total time: 5 seconds
> [EMAIL PROTECTED] apache-tomcat-6.0.16-src]#
> 



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat-5.5 run error on red hat

2008-06-16 Thread kohanm
Thanks Juha,
The windows version was the problem.
I forgat to download the linux version.
Thanks for your help.
mk


On 6/10/08, Juha Laiho <[EMAIL PROTECTED]> wrote:
>
> kohanm wrote:
>
>> here they are:
>>
>> [EMAIL PROTECTED] usr]# cd java
>> [EMAIL PROTECTED] java]# cd jdk*
>> [EMAIL PROTECTED] jdk1.6.0_02]# cd bin
>> [EMAIL PROTECTED] bin]# ls -l
>>
>
> ...
>
>> -rwxr-xr-x  1 root root 135168 Jun 14  2007 java.exe
>>
> ...
>
> I have no way to find out how you have managed that, but whatever
> you have there is a Windows version of JDK, as opposed to Linux one.
>
> Please get a Linux JDK distribution from
> http://java.sun.com/javase
>
> --
> ..Juha
>
> -
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Massoud


Class Loader Documentation

2008-06-16 Thread Ole Ersoy

Hi,

Reading through the classloader documentation for 6.0 I noticed this:

...
However, the standard Tomcat 5 startup scripts 
...


It seems like this should be:

the standard Tomcat 6 startup scripts

But I figured I'd check before filing a ticket.

Also it seems like this section could be simplified:


System - This class loader is normally initialized from the contents of the 
CLASSPATH environment variable. All such classes are visible to both Tomcat 
internal classes, and to web applications.


So this seems to be saying that "normally" all classes that should be visible 
to both Tomcat and webapps are placed in the CLASSPATH environment variable.  The second 
sentence seems to reinforce that placing the libraries in the CLASSPATH makes them 
visible to both Tomcat and the webapps.

Then reading a little further the text seems to be saying "Forget all that 
stuff".  Tomcat does not do it this way

If I'm reading it right, would it be simpler to just replace the above 
mentioned text with,


System - The standard Tomcat 6 startup scripts ($CATALINA_HOME/bin/catalina.sh 
or %CATALINA_HOME%\bin\catalina.bat) ignore the contents of the CLASSPATH 
environment variable (Unlike most java daemons and applications), and instead
build the system classloader from the following repositories:
...


Thoughts?

Thanks,
- Ole


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Servlet mapping error

2008-06-16 Thread Amber
I write a very simple Spring HTTP invoker service, the servlet mapping
config in web.xml is :


TestServlet
TestServlet
amber.TestServlet


TestServlet
/*.invoker


The test application works well in Oracle OC4J, but when I deploy it to
Apache Tomcat6, the following exception occurs when Tomcat starts, I also
tried other patterns like /*.jss, neither works:


2008-6-14 21:36:34 org.apache.tomcat.util.digester.SetPropertiesRule begin
警告: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property
'source' to 'org.eclipse.jst.jee.server:test' did not find a matching
property.
2008-6-14 21:36:34 org.apache.catalina.core.AprLifecycleListener init
信息: The APR based Apache Tomcat Native library which allows optimal
performance in production environments was not found on the
java.library.path: D:\pentaho\java\bin;.;C:\WINDOWS\system32;C:\WINDO
WS;D:\pentaho\java\bin\client;D:\pentaho\java\bin;
E:\Amber\Perl\site\bin;E:\Amber\Perl\bin;D:\pentah
o\java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDO
WS\System32\Wbem;"D:\Program Files\Zone
Labs\ZoneAlarm\MailFrontier";d:\Program Files\Microsoft SQL
Server\90\Tools\binn\;D:\JavaTool\Ant170\bin;D:\Pr ogram
Files\gawk\bin;E:\Amber\MySQL\bin;D:\Program Files\SSH Communications
Security\SSH Secure Shell
2008-6-14 21:36:34 org.apache.coyote.http11.Http11Protocol init
信息: Initializing Coyote HTTP/1.1 on http-8080
2008-6-14 21:36:34 org.apache.catalina.startup.Catalina load
信息: Initialization processed in  ms
2008-6-14 21:36:34 org.apache.catalina.core.StandardService start
信息: Starting service Catalina
2008-6-14 21:36:34 org.apache.catalina.core.StandardEngine start
信息: Starting Servlet Engine: Apache Tomcat/6.0.16
2008-6-14 21:36:34 org.apache.tomcat.util.digester.Digester endElement
严重: End event threw exception
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Native
MethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(De
legatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.tomcat.util.IntrospectionUtils.callMeth
odN(IntrospectionUtils.java:953)
at org.apache.catalina.startup.CallMethodMultiRule.en d(WebRuleSet.java:792)
at org.apache.tomcat.util.digester.Rule.end(Rule.java :229)
at org.apache.tomcat.util.digester.Digester.endElemen t(Digester.java:1140)
at com.sun.org.apache.xerces.internal.parsers.Abstrac
tSAXParser.endElement(AbstractSAXParser.java:633)
at com.sun.org.apache.xerces.internal.impl.XMLDocumen
tFragmentScannerImpl.scanEndElement(XMLDocumentFra
gmentScannerImpl.java:1241)
at com.sun.org.apache.xerces.internal.impl.XMLDocumen
tFragmentScannerImpl$FragmentContentDispatcher.dis
patch(XMLDocumentFragmentScannerImpl.java:1685)
at com.sun.org.apache.xerces.internal.impl.XMLDocumen
tFragmentScannerImpl.scanDocument(XMLDocumentFragm entScannerImpl.java:368)
at com.sun.org.apache.xerces.internal.parsers.XML11Co
nfiguration.parse(XML11Configuration.java:834)
at com.sun.org.apache.xerces.internal.parsers.XML11Co
nfiguration.parse(XML11Configuration.java:764)
at com.sun.org.apache.xerces.internal.parsers.XMLPars
er.parse(XMLParser.java:148)
at com.sun.org.apache.xerces.internal.parsers.Abstrac
tSAXParser.parse(AbstractSAXParser.java:1242)
at org.apache.tomcat.util.digester.Digester.parse(Dig ester.java:1644)
at org.apache.catalina.startup.ContextConfig.applicat
ionWebConfig(ContextConfig.java:369)
at org.apache.catalina.startup.ContextConfig.start(Co ntextConfig.java:1062)
at org.apache.catalina.startup.ContextConfig.lifecycl
eEvent(ContextConfig.java:261)
at org.apache.catalina.util.LifecycleSupport.fireLife
cycleEvent(LifecycleSupport.java:117)
at org.apache.catalina.core.StandardContext.start(Sta
ndardContext.java:4252)
at org.apache.catalina.core.ContainerBase.start(Conta inerBase.java:1045)
at org.apache.catalina.core.StandardHost.start(Standa rdHost.java:719)
at org.apache.catalina.core.ContainerBase.start(Conta inerBase.java:1045)
at org.apache.catalina.core.StandardEngine.start(Stan dardEngine.java:443)
at org.apache.catalina.core.StandardService.start(Sta ndardService.java:516)
at org.apache.catalina.core.StandardServer.start(Stan dardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalin a.java:578)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Native
MethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(De
legatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.catalina.startup.Bootstrap.start(Bootst rap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstr ap.java:413)
Caused by: java.lang.IllegalArgumentException: Invalid 
/*.invoker in servlet mapping
at org.apache.catalina.core.StandardContext.addServle
tMapping(StandardContext.java:2397)
at org.apache.catalina.core.StandardContext.addServle
tMapping(Sta

Re: Class Loader Documentation

2008-06-16 Thread Johnny Kewl


- Original Message - 
From: "Ole Ersoy" <[EMAIL PROTECTED]>

To: 
Sent: Tuesday, June 17, 2008 4:41 AM
Subject: Class Loader Documentation



Hi,

Reading through the classloader documentation for 6.0 I noticed this:

...
However, the standard Tomcat 5 startup scripts ...

It seems like this should be:

the standard Tomcat 6 startup scripts

But I figured I'd check before filing a ticket.

Also it seems like this section could be simplified:


System - This class loader is normally initialized from the contents of 
the CLASSPATH environment variable. All such classes are visible to both 
Tomcat internal classes, and to web applications.



So this seems to be saying that "normally" all classes that should be 
visible to both Tomcat and webapps are placed in the CLASSPATH environment 
variable.  The second sentence seems to reinforce that placing the 
libraries in the CLASSPATH makes them visible to both Tomcat and the 
webapps.


Then reading a little further the text seems to be saying "Forget all that 
stuff".  Tomcat does not do it this way


If I'm reading it right, would it be simpler to just replace the above 
mentioned text with,



System - The standard Tomcat 6 startup scripts 
($CATALINA_HOME/bin/catalina.sh or %CATALINA_HOME%\bin\catalina.bat) 
ignore the contents of the CLASSPATH environment variable (Unlike most 
java daemons and applications), and instead

build the system classloader from the following repositories:
...


Thoughts?



I think its because its just hard to explain, but maybe it could be made 
clearer.

I think *ignores* is the wrong word.

Especially if someone actually looks at catalina bat and sees this line.
set CLASSPATH=%CLASSPATH%;%CATALINA_HOME%\bin\bootstrap.jar
Doesnt look like that script is ignoring CLASSPATH to me ;)


When Tomcat starts up, its internal system classes take *priority* over 
those in the normal "system" classloader CLASSPATH.
This is to prevent "Java DLL hell", making sure that external applications 
do not see the internal tomcat engine, and making sure that tomcat does not 
use an external class (eg an xml parser), that may be incompatible with 
tomcat (Its trying to save your butt).



--- add your version here --- ;)

Actually look back at TC 5.5... it is getting simpler, believe it or not ;)

---
HARBOR : http://www.kewlstuff.co.za/index.htm
The most powerful application server on earth.
The only real POJO Application Server.
See it in Action : http://www.kewlstuff.co.za/cd_tut_swf/whatisejb1.htm
---


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: mod_jk load balancing and cluster node health

2008-06-16 Thread Rainer Jung

Nathan E. Pilling wrote:

Is it possible to configure mod_jk to check node status by requesting
a specific web application path to see if a cluster node is healthy
(and should be included or excluded from the cluster)?

I have a web application that runs across multiple tomcat instances
and any request be processed by any tomcat node. If an instance of
the web app on one of the tomcat servers is not configured properly,
I want the connector to exclude it from the cluster.

I have written a servlet that returns a status of 503 if something is
wrong or 200 if everything is okay.


There's not the full story build in yet, but you can combine the various 
pieces to get the same result:


Write an external script, that refularly calls your servlet and add 
";jsessionid=.MYNODENAME" to the end of the URL (but before the query 
string). The load balancer will then send the request to it's member 
named "MYNODENAME" (stickyness).


Now you set fail_on_status to 503 for all LB members. Then the load 
balancer should put the node into ERROR, whenever it sees a 503 coming 
back for any request.


See http://tomcat.apache.org/connectors-doc/reference/workers.html for 
fail_on_status.


Does that sound plausible?


Thanks, Nathan Pilling


Regards,

Rainer

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]