Is it possible to log IP Address of requestor with custom AccessLogValve pattern?

2006-10-30 Thread Rashmi Rubdi
Hello,

My site is hosted on Tomcat 5.5 and I'm trying to log the IP Address of search 
engine bots that crawl the site.

After reading the following documentation here, which is written very nicely 
btw 
http://tomcat.apache.org/tomcat-5.5-doc/config/valve.html
http://tomcat.apache.org/tomcat-5.5-doc/catalina/docs/api/org/apache/catalina/valves/AccessLogValve.html

I configured the pattern attribute of AccessLogValve as follows:

Valve className=org.apache.catalina.valves.AccessLogValve directory=logs 
pattern=%a %A %h %H %u %t quot;%rquot; %s %b quot;%{Referer}iquot; 
quot;%{User-Agent}iquot; 
prefix=localhost_access_log. resolveHosts=false suffix=.txt /

The following is a sample of what gets logged with the above configuration in 
server.xml .

127.0.0.1 68.120.115.43 127.0.0.1 HTTP/1.1 - [29/Oct/2006:23:50:13 -0800] GET 
/web/_stylesheet/table.css HTTP/1.1 304 - 
http://www.website.com/c/a_page.jsp; Mozilla/5.0 (Windows; U; Windows NT 5.1; 
en-US; rv:1.8.0.7) Gecko/20060909 Firefox/1.5.0.7 

The documentation says that %a is Remote IP Address, however 127.0.0.1 is being 
logged instead of the IP Address of the requestor.

Is this correct?

IMO %a should be the IP Address of the agent that's making the request - (i.e. 
the IP Address of a browser or a bot etc).

Please let me know if there's a way to log IP Address of the agent that's 
making the request.

Any help is appreciated.

-Thank you
Rashmi



-
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: Is it possible to log IP Address of requestor with custom AccessLogValve pattern?

2006-10-30 Thread Li

what you defined is correct ...  a simpler way is using default setting
Valve
 className=org.apache.catalina.valves.AccessLogValve
 directory=logs
 prefix=your-site-access-log-
 suffix=.log
 pattern=common
 resolveHosts=false/

the result should be
(if you are testing from same host)
127.0.0.1 - - [18/Oct/2006:18:54:48 +0800] GET /site/ HTTP/1.1 200 306
127.0.0.1 - - [18/Oct/2006:18:54:48 +0800] GET /site/Welcome.do HTTP/1.1
200 1775
(if your user testing from remote host)
202.110.6.23 - - [18/Oct/2006:19:03:44 +0800] GET /site/Welcome.do
HTTP/1.1 200 8893
...

On 10/30/06, Rashmi Rubdi [EMAIL PROTECTED] wrote:


Hello,

My site is hosted on Tomcat 5.5 and I'm trying to log the IP Address of
search engine bots that crawl the site.

After reading the following documentation here, which is written very
nicely btw
http://tomcat.apache.org/tomcat-5.5-doc/config/valve.html

http://tomcat.apache.org/tomcat-5.5-doc/catalina/docs/api/org/apache/catalina/valves/AccessLogValve.html

I configured the pattern attribute of AccessLogValve as follows:

Valve className=org.apache.catalina.valves.AccessLogValve
directory=logs
pattern=%a %A %h %H %u %t %r %s %b %{Referer}i %{User-Agent}i
prefix=localhost_access_log. resolveHosts=false suffix=.txt /

The following is a sample of what gets logged with the above configuration
in server.xml .

127.0.0.1 68.120.115.43 127.0.0.1 HTTP/1.1 - [29/Oct/2006:23:50:13 -0800]
GET /web/_stylesheet/table.css HTTP/1.1 304 - 
http://www.website.com/c/a_page.jsp; Mozilla/5.0 (Windows; U; Windows NT
5.1; en-US; rv:1.8.0.7) Gecko/20060909 Firefox/1.5.0.7

The documentation says that %a is Remote IP Address, however 127.0.0.1 is
being logged instead of the IP Address of the requestor.

Is this correct?

IMO %a should be the IP Address of the agent that's making the request - (
i.e. the IP Address of a browser or a bot etc).

Please let me know if there's a way to log IP Address of the agent that's
making the request.

Any help is appreciated.

-Thank you
Rashmi



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





--
When we invent time, we invent death.


RE: [Isapi filter] jsessionid filtering

2006-10-30 Thread Remy.Coqueugniot

Anyone got some ideas ? 

Thanks,

RC

 -Message d'origine-
 De : [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] 
 Envoyé : vendredi 27 octobre 2006 09:48
 À : users@tomcat.apache.org
 Objet : [Isapi filter] jsessionid filtering
 
 Hi everyone,
 
 My environment: win2003 / Tomcat 5.5.17 / IIS / isapi filter 
 1.2.19.0 I've 3 instances of Tomcat running simultanously IIS 
 is configured to serve those 3 websites with a different 
 isapi filter configuration for each one.
 When a client opens a newly httpSession jsessionid is 
 inserted in the first URI . Next navigations doesn't include this.
 The problem is about what isapi really filters.
 See how the Uriworkmap is configured at the end of this mail.
 For example in the first session openning, every css file 
 acces fall in 404 beacause of the jssesionid presence in the 
 URI, and are correctly mapped in next operations.
 
 Indeed looking in the trace shows that isapi filter try to 
 remove this jsessionid from the URI, but apparently not use 
 the newly jsessionid-less URI :
 
 [Wed Oct 25 11:30:24 2006] [5564:0488] [debug] 
 jk_isapi_plugin.c (762): Filter started [Wed Oct 25 11:30:24 
 2006] [5564:0488] [debug] jk_isapi_plugin.c (828): Virtual 
 Host redirection of 
 /server1:83/application1/styles/appli.css;jsessionid=D31FF5301
 A1974701F9FE1837A18427B
 [Wed Oct 25 11:30:24 2006] [5564:0488] [trace] 
 jk_uri_worker_map.c (422): enter [Wed Oct 25 11:30:24 2006] 
 [5564:5240] [debug] jk_isapi_plugin.c (762): Filter started 
 [Wed Oct 25 11:30:24 2006] [5564:0488] [debug] 
 jk_uri_worker_map.c (443): Removing Session path 
 ';jsessionid=D31FF5301A1974701F9FE1837A18427B' URI 
 '/server1:83/application1/styles/appli.css'
 [Wed Oct 25 11:30:24 2006] [5564:0488] [debug] 
 jk_uri_worker_map.c (449): Attempting to map URI 
 '/server1:83/application1/styles/appli.css;jsessionid=D31FF530
 1A1974701F9FE1837A18427B' from 14 maps
 
 
 How can I make sure isapi filter really do its 
 jsessionid-filtering job ? Or how can say to tomcat not 
 include this jsessionid parameter, even in the first session access ?
 
 
 Thanks for your answers !
 
 
 Rémy C.
 
 
 
 
 
 -isapi_redirect.properties
 extension_uri=/jakarta/isapi_redirect.dll
 log_file=c:\Intranet\IISLog\jk_std1.log
 log_level=trace
 worker_file=c:\Intranet\IIS_jk\std1\workers.properties
 worker_mount_file=c:\Intranet\IIS_jk\std1\uriworkermap.properties
 
 
 -workers.properties
 worker.list=wlb_std
 worker.ajp13_std1.type=ajp13
 worker.ajp13_std1.host=localhost
 worker.ajp13_std1.port=8209
 worker.wlb_std.type=lb
 worker.wlb_std.balance_workers=ajp13_std1
 worker.jkstatus.type=status
 
 
 -uriworkermap.properties
 /jkmanager=jkstatus
 # applications mappings
 /application1/*=wlb_std
 # static elements served by IIS
 !/*.jpg=wlb_std
 !/*.gif=wlb_std
 !/*.png=wlb_std
 !/*.txt=wlb_std
 !/*.js=wlb_std
 !/*.xml=wlb_std
 !/*.xsl=wlb_std
 !/*.xslt=wlb_std
 !/*.htm=wlb_std
 !/*.html=wlb_std
 !/*.css=wlb_std
 !/*.swf=wlb_std
 --
 -
 Cette communication (y compris les pieces jointes) est 
 reservee a l'usage exclusif du destinataire (des 
 destinataires) et peut contenir des informations 
 privilegiees, confidentielles, exemptees de divulgation selon 
 la loi ou protegees par les droits d'auteur. Si vous n'etes 
 pas un destinataire, toute utilisation, divulgation, 
 distribution, reproduction, examen ou copie (totale ou 
 partielle) est non-autorisee et peut etre illegale. Tout 
 message electronique est susceptible d'alteration et son 
 integrite ne peut etre assuree. Sanofi Pasteur decline toute 
 responsabilite au titre de ce message s'il a ete modifie ou 
 falsifie. Si vous n'etes pas destinataire de ce message, 
 merci de le detruire immediatement et d'avertir l'expediteur 
 de l'erreur de distribution et de la destruction du message. Merci.
 This transmission (including any attachments) is intended 
 solely for the use of the addressee(s) and may contain 
 confidential information including trade secrets which are 
 privileged, confidential, exempt from disclosure under 
 applicable law and/or subject to copyright. If you are not an 
 intended recipient, any use, disclosure, distribution, 
 reproduction, review or copying (either whole or partial) is 
 unauthorized and may be unlawful. E-mails are susceptible to 
 alteration and their integrity cannot be guaranteed.Sanofi 
 Pasteur shall not be liable for this e-mail if modified or 
 falsified. If you are not the intended recipient of this 
 e-mail, please delete it immediately from your system and 
 notify the sender of the wrong delivery and the mail 
 deletion. Thank you.
 **
 
 
 -
 To start a new topic, e-mail: 

Re: Tomcat unable to find the apr library

2006-10-30 Thread Rolf Herzog
I have exactly the same problem on RHEL 4:

I compiled tomcat-native.tar.gz from tomcat 5.5.20 and installed the
resulting dynamic library into /usr/local/apr/lib.

Then I added 
CATALINA_OPTS=-Djava.library.path=/usr/local/apr/lib
to my tomcat start script. I still get the message:

The Apache Tomcat Native library which allows optimal performance in
production environments was not found on the
java.library.path: /usr/local/apr/lib

doing ldd /usr/local/apr/lib/libtcnative-1.so.0.1.3 revealed that all
dependencies are found. 

I am using jsvc for starting tomcat. 
Any ideas what is wrong here?



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



Two apps with different hosts?

2006-10-30 Thread Per Johnsson
We have two different applications running on tomcat 5 today with
different hosts, one is inside the webapps directory and one did we put
outside. Before we had both the applications in webapps but that made
tomcat run several instances of the apps due to we declared the host
... appbase=webapps ... several times.
 
So if we want to have more applications inside webapps and with
different hosts we get several instances, so our only solution was to
use a dummy appBase for one of the applications and point out the off
the apps directly (which if I'm not misinformed can have behavior on the
libs in the shared directory).
 
Is there a smother way of doing this? It does feel a little bit
awkward to do as below.
 
Host name=www.mysite.com http://www.mysite.com 
appBase=emptywebapps unpackWARs=false autoDeploy=false
xmlValidation=false xmlNamespaceAware=false
Context path= docBase=C:\Java\Tomcat 5.5\mysiteapps\mysite
debug=0 crossContext=true/
/Host
 
Host name=preview.mysite.com appBase=webapps unpackWARs=false
autoDeploy=false xmlValidation=false xmlNamespaceAware=false
/Host
 
Regards Per Jonsson


This e-mail and the information it contains may be privileged and/or
confidential.  It is for the intended addressee(s) only.
The unauthorised use, disclosure or copying of this e-mail, or any information 
it contains, is prohibited. 
If you are not an intended recipient, please contact the sender and delete the 
material from your computer.





Re: Tomcat Security

2006-10-30 Thread Maurice Yarrow

Hi Chuck

Yes, you are perfectly correct.  Security-constraint via
web.xml allows fine grain definition of the URI path: agreed.
And also, yes, because paths/URI's are fully specified in
the security-constraint...url-pattern..., their is an
inherent static nature to this.
As such, this is not suitable to the particular requirement
I had. 
Which, in part, is why I built the mechanism that I

described.

I guess, had I my druthers, I would want to send to
DefaultServlet, along with the requested path, a
permission object or a permission-lookup-protocol
object so that DefaultServlet could serve or deny
the request for the give session based on this
accompanying object.  Because this was not within
the responsibilities or capabilities of the DefaultServlet,
I had to resort to filtering the incoming request and only
then passing the modified request to DefaultServlet when
the request qualified.

Thanks again for helping me consider the options for
dealing with this kind of behavior.

Maurice Yarrow


Caldarale, Charles R wrote:

From: Maurice Yarrow [mailto:[EMAIL PROTECTED] 
Subject: Re: Tomcat Security


BUT:  the finest granularity for what can be accessed in this
mechanism is by servlet, not by the path info (getPathInfo())
of the URI.
   



Not true - security constraints apply to paths, not servlets.  If you
want to see an example of multi-path constraints, download Lambda Probe
and look at its web.xml file.

 


(Remember, realm based authentic. allows access control
based on the enclosing Engine, Host, Context, or Wrapper,
a Wrapper being a servlet.)
   



A realm is merely an authentication credential repository, not an access
control mechanism.  The servlet spec allows one to use the
security-constraint settings to define access controls.

However, the real mismatch here is the dynamic nature of your
environment.  Since the accessiblity of a given path can change at any
moment, this doesn't fit with the essentially static nature of standard
servlet security.

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

 





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



Monitor Tomcat

2006-10-30 Thread Thomas Nowotny
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi everyone,

I use a lot of tomcat in differnt systems with different jobs. Now I
like to monitor them. I'm realy intressted in values like hit per s/m/h
or something like that. I can not parse the logfiles and I don't want to
use jmeter so I need another way of monitoring / graphing it. One of the
best ways would be to get the data via snmp but also any other output
(script, xml whatever) would be great.

Has anyone an idea?


Thomas
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.5 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iD4DBQFFRdI4eD5ZxkjPkXoRAqNcAJUTIdhsi0zi5mFRUGdsJ8h5ALL8AJ47QYU2
uKbjtfdJY/R1+JhP62oYqQ==
=ydAd
-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]



Servlet Mappings

2006-10-30 Thread ben short

Hi I am having some trouble with setting up my servlet mappings. I am
replacing a legacy webapp but need to keep the same urls. The current
webapp uses cocoon.

Here is my web.xml

web-app xmlns=http://java.sun.com/xml/ns/j2ee;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd;
version=2.4

 display-nameWebapp/display-name

   !--
  - Location of the Log4J config file, for initialization and refresh 
checks.
  - Applied by Log4jConfigListener.
  --
context-param
param-namelog4jConfigLocation/param-name
param-value/WEB-INF/log4j.properties/param-value
/context-param

   listener

listener-classorg.springframework.web.util.Log4jConfigListener/listener-class
/listener


   context-param
param-namecontextConfigLocation/param-name
param-value
   /WEB-INF/formats.xml
/WEB-INF/controllers.xml
/WEB-INF/conf/global_conf.xml
/WEB-INF/conf/customer1_conf.xml
   /param-value
/context-param

   listener
   
listener-classorg.springframework.web.context.ContextLoaderListener/listener-class
   /listener

   servlet
   servlet-nametest/servlet-name
   
servlet-classorg.springframework.web.servlet.DispatcherServlet/servlet-class
   load-on-startup1/load-on-startup
   /servlet

   servlet
   servlet-nametesterror/servlet-name
   
servlet-classorg.springframework.web.servlet.DispatcherServlet/servlet-class
   load-on-startup1/load-on-startup
   /servlet

   servlet-mapping
   servlet-nametesterror/servlet-name
   url-pattern/error/*/url-pattern
   /servlet-mapping

servlet-mapping
   servlet-nametest/servlet-name
   url-pattern//url-pattern
   /servlet-mapping

   servlet-mapping
 servlet-namedefault/servlet-name
 url-pattern/images/url-pattern
   /servlet-mapping

   servlet-mapping
 servlet-namedefault/servlet-name
 url-pattern/css/url-pattern
   /servlet-mapping

   servlet-mapping
 servlet-namedefault/servlet-name
 url-pattern/js/url-pattern
   /servlet-mapping

/web-app

With this setup requests that start with /error go to the testerror
servlet, all other requests go to the test servlet.

Can anyone give me some pointers?

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: Monitor Tomcat

2006-10-30 Thread Dan Baumann

On 30.10.2006, at 11:21, Thomas Nowotny wrote:

I use a lot of tomcat in differnt systems with different jobs. Now I
like to monitor them. I'm realy intressted in values like hit per s/ 
m/h
or something like that. I can not parse the logfiles and I don't  
want to
use jmeter so I need another way of monitoring / graphing it. One  
of the

best ways would be to get the data via snmp but also any other output
(script, xml whatever) would be great.

Has anyone an idea?


If you want to access the data provided by Tomcat via JMX, have a  
look at these links (going from simplest to most advanced):


Tomcat JMX Proxy Servlet
http://tomcat.apache.org/tomcat-5.5-doc/manager-howto.html#What%20is% 
20JMX%20Proxy%20Servlet


Jmx-console webapp for Tomcat
http://marc.theaimsgroup.com/?l=tomcat-userm=116162965621141w=2

Tomcat Probe
http://www.lambdaprobe.org/

MX4J HttpAdaptor
http://mx4j.sf.net/

JManage
http://www.jmanage.org/

Hyperic
http://www.hyperic.com/

The first 3 projects are Tomcat-specific, the latter 3 are generic  
JMX clients.


Cheers,
Dan



-
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: Is it possible to log IP Address of requestor with custom AccessLogValve pattern?

2006-10-30 Thread Rashmi Rubdi
Li, 

Thanks for the reply. 

As indicated in your illustration,  in your case the remote IP address (IP of 
the client browser) is correctly displaying.

But in my case, for some reason even when my website is accessed remotely it 
always shows local IP Address (the website's IP address) and not the remote IP 
address. 

In other words 
%a %A %h  is translating *always* to 
127.0.0.1 
68.120.115.43 
127.0.0.1

Where 68.120.115.43  is the IP address of the website host and not the client 
(remote host). 

The website is hosted on a Tomcat 5.5 which is configured as a virtual host. I 
wonder if the virtual host setting might be the cause for not logging the 
actual remote IP address.

If I can't get Access Log Valve to log the remote IP address then I might have 
to try it with Log4J with Commons Logging to log the remote IP address I guess.

-Regards
Rashmi

- Original Message 
From: Li [EMAIL PROTECTED]
To: Tomcat Users List users@tomcat.apache.org
Sent: Monday, October 30, 2006 3:25:38 AM
Subject: Re: Is it possible to log IP Address of requestor with custom 
AccessLogValve pattern?


what you defined is correct ...  a simpler way is using default setting
Valve
  className=org.apache.catalina.valves.AccessLogValve
  directory=logs
  prefix=your-site-access-log-
  suffix=.log
  pattern=common
  resolveHosts=false/

the result should be
(if you are testing from same host)
127.0.0.1 - - [18/Oct/2006:18:54:48 +0800] GET /site/ HTTP/1.1 200 306
127.0.0.1 - - [18/Oct/2006:18:54:48 +0800] GET /site/Welcome.do HTTP/1.1
200 1775
(if your user testing from remote host)
202.110.6.23 - - [18/Oct/2006:19:03:44 +0800] GET /site/Welcome.do
HTTP/1.1 200 8893
...

On 10/30/06, Rashmi Rubdi [EMAIL PROTECTED] wrote:

 Hello,

 My site is hosted on Tomcat 5.5 and I'm trying to log the IP Address of
 search engine bots that crawl the site.

 After reading the following documentation here, which is written very
 nicely btw
 http://tomcat.apache.org/tomcat-5.5-doc/config/valve.html

 http://tomcat.apache.org/tomcat-5.5-doc/catalina/docs/api/org/apache/catalina/valves/AccessLogValve.html

 I configured the pattern attribute of AccessLogValve as follows:

 Valve className=org.apache.catalina.valves.AccessLogValve
 directory=logs
 pattern=%a %A %h %H %u %t %r %s %b %{Referer}i %{User-Agent}i
 prefix=localhost_access_log. resolveHosts=false suffix=.txt /

 The following is a sample of what gets logged with the above configuration
 in server.xml .

 127.0.0.1 68.120.115.43 127.0.0.1 HTTP/1.1 - [29/Oct/2006:23:50:13 -0800]
 GET /web/_stylesheet/table.css HTTP/1.1 304 - 
 http://www.website.com/c/a_page.jsp;; Mozilla/5.0 (Windows; U; Windows NT
 5.1; en-US; rv:1.8.0.7) Gecko/20060909 Firefox/1.5.0.7

 The documentation says that %a is Remote IP Address, however 127.0.0.1 is
 being logged instead of the IP Address of the requestor.

 Is this correct?

 IMO %a should be the IP Address of the agent that's making the request - (
 i.e. the IP Address of a browser or a bot etc).

 Please let me know if there's a way to log IP Address of the agent that's
 making the request.

 Any help is appreciated.

 -Thank you
 Rashmi



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




-- 
When we invent time, we invent death.



-
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: Is it possible to log IP Address of requestor with custom AccessLogValve pattern?

2006-10-30 Thread Pid
Do you have a local proxy between the tomcat instance and the requestor?



Rashmi Rubdi wrote:
 Li, 
 
 Thanks for the reply. 
 
 As indicated in your illustration,  in your case the remote IP address (IP of 
 the client browser) is correctly displaying.
 
 But in my case, for some reason even when my website is accessed remotely it 
 always shows local IP Address (the website's IP address) and not the remote 
 IP address. 
 
 In other words 
 %a %A %h  is translating *always* to 
 127.0.0.1 
 68.120.115.43 
 127.0.0.1
 
 Where 68.120.115.43  is the IP address of the website host and not the client 
 (remote host). 
 
 The website is hosted on a Tomcat 5.5 which is configured as a virtual host. 
 I wonder if the virtual host setting might be the cause for not logging the 
 actual remote IP address.
 
 If I can't get Access Log Valve to log the remote IP address then I might 
 have to try it with Log4J with Commons Logging to log the remote IP address I 
 guess.
 
 -Regards
 Rashmi
 
 - Original Message 
 From: Li [EMAIL PROTECTED]
 To: Tomcat Users List users@tomcat.apache.org
 Sent: Monday, October 30, 2006 3:25:38 AM
 Subject: Re: Is it possible to log IP Address of requestor with custom 
 AccessLogValve pattern?
 
 
 what you defined is correct ...  a simpler way is using default setting
 Valve
   className=org.apache.catalina.valves.AccessLogValve
   directory=logs
   prefix=your-site-access-log-
   suffix=.log
   pattern=common
   resolveHosts=false/
 
 the result should be
 (if you are testing from same host)
 127.0.0.1 - - [18/Oct/2006:18:54:48 +0800] GET /site/ HTTP/1.1 200 306
 127.0.0.1 - - [18/Oct/2006:18:54:48 +0800] GET /site/Welcome.do HTTP/1.1
 200 1775
 (if your user testing from remote host)
 202.110.6.23 - - [18/Oct/2006:19:03:44 +0800] GET /site/Welcome.do
 HTTP/1.1 200 8893
 ...
 
 On 10/30/06, Rashmi Rubdi [EMAIL PROTECTED] wrote:
 Hello,

 My site is hosted on Tomcat 5.5 and I'm trying to log the IP Address of
 search engine bots that crawl the site.

 After reading the following documentation here, which is written very
 nicely btw
 http://tomcat.apache.org/tomcat-5.5-doc/config/valve.html

 http://tomcat.apache.org/tomcat-5.5-doc/catalina/docs/api/org/apache/catalina/valves/AccessLogValve.html

 I configured the pattern attribute of AccessLogValve as follows:

 Valve className=org.apache.catalina.valves.AccessLogValve
 directory=logs
 pattern=%a %A %h %H %u %t %r %s %b %{Referer}i %{User-Agent}i
 prefix=localhost_access_log. resolveHosts=false suffix=.txt /

 The following is a sample of what gets logged with the above configuration
 in server.xml .

 127.0.0.1 68.120.115.43 127.0.0.1 HTTP/1.1 - [29/Oct/2006:23:50:13 -0800]
 GET /web/_stylesheet/table.css HTTP/1.1 304 - 
 http://www.website.com/c/a_page.jsp;; Mozilla/5.0 (Windows; U; Windows NT
 5.1; en-US; rv:1.8.0.7) Gecko/20060909 Firefox/1.5.0.7

 The documentation says that %a is Remote IP Address, however 127.0.0.1 is
 being logged instead of the IP Address of the requestor.

 Is this correct?

 IMO %a should be the IP Address of the agent that's making the request - (
 i.e. the IP Address of a browser or a bot etc).

 Please let me know if there's a way to log IP Address of the agent that's
 making the request.

 Any help is appreciated.

 -Thank you
 Rashmi



 -
 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: Is it possible to log IP Address of requestor with custom AccessLogValve pattern?

2006-10-30 Thread Li

Hi Rashmi,

if there is problem with retrieving correct remote IP address, log4j will
not solve problem ...

it seems like this:

remote user ---(send request) --- your proxy (or maybe you use some
connector or forwardor)  tomcat

if 127.0.0.1, seems your connector or forwardoer is located in the same host
as your tomcat sharing same IP address or hostname

if not 127.0.0.1, seems the request comes from proxy



On 10/30/06, Pid [EMAIL PROTECTED] wrote:


Do you have a local proxy between the tomcat instance and the requestor?



Rashmi Rubdi wrote:
 Li,

 Thanks for the reply.

 As indicated in your illustration,  in your case the remote IP address
(IP of the client browser) is correctly displaying.

 But in my case, for some reason even when my website is accessed
remotely it always shows local IP Address (the website's IP address) and not
the remote IP address.

 In other words
 %a %A %h  is translating *always* to
 127.0.0.1
 68.120.115.43
 127.0.0.1

 Where 68.120.115.43  is the IP address of the website host and not the
client (remote host).

 The website is hosted on a Tomcat 5.5 which is configured as a virtual
host. I wonder if the virtual host setting might be the cause for not
logging the actual remote IP address.

 If I can't get Access Log Valve to log the remote IP address then I
might have to try it with Log4J with Commons Logging to log the remote IP
address I guess.

 -Regards
 Rashmi

 - Original Message 
 From: Li [EMAIL PROTECTED]
 To: Tomcat Users List users@tomcat.apache.org
 Sent: Monday, October 30, 2006 3:25:38 AM
 Subject: Re: Is it possible to log IP Address of requestor with custom
AccessLogValve pattern?


 what you defined is correct ...  a simpler way is using default setting
 Valve
   className=org.apache.catalina.valves.AccessLogValve
   directory=logs
   prefix=your-site-access-log-
   suffix=.log
   pattern=common
   resolveHosts=false/

 the result should be
 (if you are testing from same host)
 127.0.0.1 - - [18/Oct/2006:18:54:48 +0800] GET /site/ HTTP/1.1 200 306
 127.0.0.1 - - [18/Oct/2006:18:54:48 +0800] GET /site/Welcome.do
HTTP/1.1
 200 1775
 (if your user testing from remote host)
 202.110.6.23 - - [18/Oct/2006:19:03:44 +0800] GET /site/Welcome.do
 HTTP/1.1 200 8893
 ...

 On 10/30/06, Rashmi Rubdi [EMAIL PROTECTED] wrote:
 Hello,

 My site is hosted on Tomcat 5.5 and I'm trying to log the IP Address of
 search engine bots that crawl the site.

 After reading the following documentation here, which is written very
 nicely btw
 http://tomcat.apache.org/tomcat-5.5-doc/config/valve.html


http://tomcat.apache.org/tomcat-5.5-doc/catalina/docs/api/org/apache/catalina/valves/AccessLogValve.html

 I configured the pattern attribute of AccessLogValve as follows:

 Valve className=org.apache.catalina.valves.AccessLogValve
 directory=logs
 pattern=%a %A %h %H %u %t %r %s %b %{Referer}i %{User-Agent}i
 prefix=localhost_access_log. resolveHosts=false suffix=.txt /

 The following is a sample of what gets logged with the above
configuration
 in server.xml .

 127.0.0.1 68.120.115.43 127.0.0.1 HTTP/1.1 - [29/Oct/2006:23:50:13
-0800]
 GET /web/_stylesheet/table.css HTTP/1.1 304 - 
 http://www.website.com/c/a_page.jsp;; Mozilla/5.0 (Windows; U; Windows
NT
 5.1; en-US; rv:1.8.0.7) Gecko/20060909 Firefox/1.5.0.7

 The documentation says that %a is Remote IP Address, however 127.0.0.1is
 being logged instead of the IP Address of the requestor.

 Is this correct?

 IMO %a should be the IP Address of the agent that's making the request
- (
 i.e. the IP Address of a browser or a bot etc).

 Please let me know if there's a way to log IP Address of the agent
that's
 making the request.

 Any help is appreciated.

 -Thank you
 Rashmi



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





--
When we invent time, we invent death.


mod_jk configuration

2006-10-30 Thread bcochofel

I'm new to tomcat and mod_jk and I have a question abou the configuration...
I can access  http://localhost:8080/jsp-examples
http://localhost:8080/jsp-examples  and  http://localhost/jsp-examples/
http://localhost/jsp-examples/  but when I try 
http://localhost/jsp-examples http://localhost/jsp-examples  (without the /)
I get this error:

Forbidden
You don't have permission to access /jsp-examples on this server.
Additionally, a 403 Forbidden error was encountered while trying to use an
ErrorDocument to handle the request.

Here's my jk.conf (/etc/apache2/conf.d/jk.conf):

http://www.nabble.com/file/3907/jk.conf jk.conf 

Can someone help me on this?
Thanks,
Bruno
-- 
View this message in context: 
http://www.nabble.com/mod_jk-configuration-tf2539505.html#a7074844
Sent from the Tomcat - User mailing list archive at Nabble.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]



Re: Two apps with different hosts?

2006-10-30 Thread Christopher Schultz
Per,

 So if we want to have more applications inside webapps and with
 different hosts we get several instances, so our only solution was to
 use a dummy appBase for one of the applications and point out the off
 the apps directly (which if I'm not misinformed can have behavior on the
 libs in the shared directory).
  
 Is there a smother way of doing this? It does feel a little bit
 awkward to do as below.

Why not simply keep your webapps for one host in one directory, and
those for the other in a separate directory. Then, set the appBase
attribute as appropriate for each host (note changes):

 Host name=www.mysite.com
 appBase=webapps unpackWARs=false autoDeploy=false
 xmlValidation=false xmlNamespaceAware=false
 /Host
  
 Host name=preview.mysite.com appBase=webapps-preview unpackWARs=false
 autoDeploy=false xmlValidation=false xmlNamespaceAware=false
 /Host

-chris



signature.asc
Description: OpenPGP digital signature


Re: mod_jk configuration

2006-10-30 Thread Christopher Schultz
Bruno,

 when I try
 http://localhost/jsp-examples http://localhost/jsp-examples  (without the /)
 I get this error:
 
 Forbidden
 You don't have permission to access /jsp-examples on this server.
 Additionally, a 403 Forbidden error was encountered while trying to use an
 ErrorDocument to handle the request.

It looks like you have Indexes turned off for this directory/location in
httpd.conf, or you don't have an index.html (or whatever) file there to
display.

In that case, it's not surprising that Apache httpd is generating this
error (note that it's httpd, not Tomcat, that is generating the error).

If you want Tomcat to respond to requests for the URI with no trailing
slash, you'll have to map that explicitly.

 Here's my jk.conf (/etc/apache2/conf.d/jk.conf):
 
 http://www.nabble.com/file/3907/jk.conf jk.conf 

I'm guessing that was a copy/paste error. Let me guess what you have in
jk.conf:

JkMount /jsp-examples/*   worker1
and/or
JkMount /jsp-examples/*.jsp   worker1

Since /jsp-examples does not match /jsp-examples/*, your mappings
are failing. You'll need to add something like:

JkMount /jsp-examples worker1

Hope that helps,
-chris



signature.asc
Description: OpenPGP digital signature


Re: Question with the Apache/Tomcat interface...

2006-10-30 Thread Kim Albee

Here's what we figured out the issue was, after MUCH research...
I'm providing it into the mailing list in case others have issues with
Apache and Tomcat connection getting the error:

Error connecting to tomcat. Tomcat is probably not started or is listening
on the wrong port. worker=p2 failed errno = 13

As it turns out errno=13 is a permissions error.

https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=161049 was found to be
the issue.

This could have been induced by an update that was put into effect when the
server lost power and rebooted.

To resolve, I disabled selinux. Details below:

Modified /etc/selinix/config to:
SELINUX=permissive
From
SELINUX=enforced

Executed /usr/sbin/setenforce 0 to put this into effect immediately. It
will persist across reboots.

Thanks for the responses...
Kim :-)

On 10/27/06, Caldarale, Charles R [EMAIL PROTECTED] wrote:


 From: Kim Albee [mailto:[EMAIL PROTECTED] ]
 Subject: Re: Question with the Apache/Tomcat interface...

  Can you connect to the ip and port specified with p2 from your
apache
  machine with telnet?

 e have telnet disabled on the server, as it is not
 secure.

That's not what he was asking.  Can a telnet client on some other
machine connect to the IP address and port your've specified?  This
doesn't require a telnet server on the target system, it just verifies
that something is listening for connection requests on that IP/port
combination.

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




RE: Servlet Mappings

2006-10-30 Thread Caldarale, Charles R
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
 Subject: Servlet Mappings
 
 servlet-mapping
 servlet-nametesterror/servlet-name
 url-pattern/error/*/url-pattern
 /servlet-mapping

The above is correct; note the trailing /*.

  servlet-mapping
 servlet-nametest/servlet-name
 url-pattern//url-pattern
 /servlet-mapping

This one says to send everything that doesn't match something else to
the test servlet.

 servlet-mapping
   servlet-namedefault/servlet-name
   url-pattern/images/url-pattern
 /servlet-mapping

This one is missing the trailing /*.

 servlet-mapping
   servlet-namedefault/servlet-name
   url-pattern/css/url-pattern
 /servlet-mapping

Is this intended to send only items from the css directory to the
default servlet?  If so, then you're missing the trailing /*.  If you
want to send all .css files to the default, use *.css, with no
slashes.

 servlet-mapping
   servlet-namedefault/servlet-name
   url-pattern/js/url-pattern
 /servlet-mapping

Similar to the css one: you need a trailing /* or it should be
*.js*.

Order of servlet mappings is not important - the spec requires that the
container honor the longest match first.

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



Auto-deploying to multi-level context paths

2006-10-30 Thread Johnson, David
Is there any way to set up an application so that the auto-deployer will
place it at a context path containing more than one level?

For example, I want my application at /hr/policies.

I can setup the context like this in server.xml, but this is bad because
I would need a server restart to change anything. 

I can also set it up in conf/Catalina/localhost as hr#policies.xml,
which seems to work okay (hurrah for mailing lists archives, as this
feature seems to be entirely absent in the docs). However this means
server admin intervention is required whenever our developers come up
with a new app.

Does anyone know of a way to make the auto-deployer deploy to a
multi-level context path, via META-INF/context.xml, or by naming the
application directory in a certain way (hash trick doesn't work there as
far as I can tell), or is it simply impossible? 

Cheers
Dave

-
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: Servlet Mappings

2006-10-30 Thread ben short

Hi,

I changed the mapping to as follows but no joy. Although the problem
seems to of changed slightly. When I try to request an images
http://myhost/images/error/logo.gif i get a 404. I have double checked
and the image is definatly in the correct location.

servlet-mapping
   servlet-nametesterror/servlet-name
   url-pattern/error/*/url-pattern
   /servlet-mapping

   servlet-mapping
 servlet-namedefault/servlet-name
 url-pattern/images/*/url-pattern
   /servlet-mapping

   servlet-mapping
   servlet-nametest/servlet-name
   url-pattern//url-pattern
   /servlet-mapping

On 10/30/06, Caldarale, Charles R [EMAIL PROTECTED] wrote:

 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
 Subject: Servlet Mappings

 servlet-mapping
 servlet-nametesterror/servlet-name
 url-pattern/error/*/url-pattern
 /servlet-mapping

The above is correct; note the trailing /*.

  servlet-mapping
 servlet-nametest/servlet-name
 url-pattern//url-pattern
 /servlet-mapping

This one says to send everything that doesn't match something else to
the test servlet.

 servlet-mapping
   servlet-namedefault/servlet-name
   url-pattern/images/url-pattern
 /servlet-mapping

This one is missing the trailing /*.

 servlet-mapping
   servlet-namedefault/servlet-name
   url-pattern/css/url-pattern
 /servlet-mapping

Is this intended to send only items from the css directory to the
default servlet?  If so, then you're missing the trailing /*.  If you
want to send all .css files to the default, use *.css, with no
slashes.

 servlet-mapping
   servlet-namedefault/servlet-name
   url-pattern/js/url-pattern
 /servlet-mapping

Similar to the css one: you need a trailing /* or it should be
*.js*.

Order of servlet mappings is not important - the spec requires that the
container honor the longest match first.

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




-
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: Servlet Mappings

2006-10-30 Thread Caldarale, Charles R
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
 Subject: Re: Servlet Mappings
 
 I changed the mapping to as follows but no joy. Although the problem
 seems to of changed slightly. When I try to request an images
 http://myhost/images/error/logo.gif i get a 404. I have double checked
 and the image is definatly in the correct location.

You really have an error subdirectory under images?  What happens if you
try to get an image that's directly in the images directory?  What is
the directory structure of your webapp?  What do the logs show?  You
might want to turn on the AccessLogValve to see what's really being
requested.

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



Re: mod_jk configuration

2006-10-30 Thread Jorge Cabrera

Hi,

Christopher Schultz wrote:

Bruno,

  

when I try
http://localhost/jsp-examples http://localhost/jsp-examples  (without the /)
I get this error:

Forbidden
You don't have permission to access /jsp-examples on this server.
Additionally, a 403 Forbidden error was encountered while trying to use an
ErrorDocument to handle the request.

That happened to me once and the problem was in Apache's configuration. 
I had to specify a directory for jsp-examples and set the correct 
permissions with AllowOverride.


It looks like you have Indexes turned off for this directory/location in
httpd.conf, or you don't have an index.html (or whatever) file there to
display.

In that case, it's not surprising that Apache httpd is generating this
error (note that it's httpd, not Tomcat, that is generating the error).

If you want Tomcat to respond to requests for the URI with no trailing
slash, you'll have to map that explicitly.

  

Here's my jk.conf (/etc/apache2/conf.d/jk.conf):

http://www.nabble.com/file/3907/jk.conf jk.conf 



I'm guessing that was a copy/paste error. Let me guess what you have in
jk.conf:

JkMount /jsp-examples/*   worker1
and/or
JkMount /jsp-examples/*.jsp   worker1

Since /jsp-examples does not match /jsp-examples/*, your mappings
are failing. You'll need to add something like:

JkMount /jsp-examples worker1

Hope that helps,
-chris

  
Hope this helps, if you need the specific lines in Apache tell me and 
I'll send them.


--

Jorge Cabrera
Consultor técnico
Ándago Ingeniería - www.andago.com

Teléfono: +34 912 732 228
Móvil: +34 637 741 034
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: mod_jk configuration

2006-10-30 Thread bcochofel

Well I've tried adding DirectoryIndex index.html index.htm index.jsp but no
good...
My Apache configuration has this and all the links work with or without the
/
Does jk.cong overrides my apache conf?


Christopher Schultz-2 wrote:
 
 Bruno,
 
 when I try
 http://localhost/jsp-examples http://localhost/jsp-examples  (without the
 /)
 I get this error:
 
 Forbidden
 You don't have permission to access /jsp-examples on this server.
 Additionally, a 403 Forbidden error was encountered while trying to use
 an
 ErrorDocument to handle the request.
 
 It looks like you have Indexes turned off for this directory/location in
 httpd.conf, or you don't have an index.html (or whatever) file there to
 display.
 
 In that case, it's not surprising that Apache httpd is generating this
 error (note that it's httpd, not Tomcat, that is generating the error).
 
 If you want Tomcat to respond to requests for the URI with no trailing
 slash, you'll have to map that explicitly.
 
 Here's my jk.conf (/etc/apache2/conf.d/jk.conf):
 
 http://www.nabble.com/file/3907/jk.conf jk.conf 
 
 I'm guessing that was a copy/paste error. Let me guess what you have in
 jk.conf:
 
 JkMount /jsp-examples/*   worker1
 and/or
 JkMount /jsp-examples/*.jsp   worker1
 
 Since /jsp-examples does not match /jsp-examples/*, your mappings
 are failing. You'll need to add something like:
 
 JkMount /jsp-examples worker1
 
 Hope that helps,
 -chris
 
 
  
 

-- 
View this message in context: 
http://www.nabble.com/mod_jk-configuration-tf2539505.html#a7076449
Sent from the Tomcat - User mailing list archive at Nabble.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]



Re: mod_jk configuration

2006-10-30 Thread bcochofel

Well I would appreciated... 


Jorge Cabrera wrote:
 
 Hi,
 
 Christopher Schultz wrote:
 Bruno,

   
 when I try
 http://localhost/jsp-examples http://localhost/jsp-examples  (without
 the /)
 I get this error:

 Forbidden
 You don't have permission to access /jsp-examples on this server.
 Additionally, a 403 Forbidden error was encountered while trying to use
 an
 ErrorDocument to handle the request.
 
 That happened to me once and the problem was in Apache's configuration. 
 I had to specify a directory for jsp-examples and set the correct 
 permissions with AllowOverride.

 It looks like you have Indexes turned off for this directory/location in
 httpd.conf, or you don't have an index.html (or whatever) file there to
 display.

 In that case, it's not surprising that Apache httpd is generating this
 error (note that it's httpd, not Tomcat, that is generating the error).

 If you want Tomcat to respond to requests for the URI with no trailing
 slash, you'll have to map that explicitly.

   
 Here's my jk.conf (/etc/apache2/conf.d/jk.conf):

 http://www.nabble.com/file/3907/jk.conf jk.conf 
 

 I'm guessing that was a copy/paste error. Let me guess what you have in
 jk.conf:

 JkMount /jsp-examples/*   worker1
 and/or
 JkMount /jsp-examples/*.jsp   worker1

 Since /jsp-examples does not match /jsp-examples/*, your mappings
 are failing. You'll need to add something like:

 JkMount /jsp-examples worker1

 Hope that helps,
 -chris

   
 Hope this helps, if you need the specific lines in Apache tell me and 
 I'll send them.
 
 -- 
 
 Jorge Cabrera
 Consultor técnico
 Ándago Ingeniería - www.andago.com
 
 Teléfono: +34 912 732 228
 Móvil: +34 637 741 034
 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]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/mod_jk-configuration-tf2539505.html#a7076457
Sent from the Tomcat - User mailing list archive at Nabble.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]



Re: mod_jk configuration

2006-10-30 Thread Martin Gainty
Bruno-

box:
login as root to the box
tomcat:
 login with tomcat-user (such as admin or manager) that already has 
admin,manager privs

M-
This e-mail communication and any attachments may contain confidential and 
privileged information for the use of the 
designated recipients named above. If you are not the intended recipient, you 
are hereby notified that you have received
this communication in error and that any review, disclosure, dissemination, 
distribution or copying of it or its 
contents
- Original Message - 
From: bcochofel [EMAIL PROTECTED]
To: users@tomcat.apache.org
Sent: Monday, October 30, 2006 10:19 AM
Subject: Re: mod_jk configuration


 
 Well I've tried adding DirectoryIndex index.html index.htm index.jsp but no
 good...
 My Apache configuration has this and all the links work with or without the
 /
 Does jk.cong overrides my apache conf?
 
 
 Christopher Schultz-2 wrote:
 
 Bruno,
 
 when I try
 http://localhost/jsp-examples http://localhost/jsp-examples  (without the
 /)
 I get this error:
 
 Forbidden
 You don't have permission to access /jsp-examples on this server.
 Additionally, a 403 Forbidden error was encountered while trying to use
 an
 ErrorDocument to handle the request.
 
 It looks like you have Indexes turned off for this directory/location in
 httpd.conf, or you don't have an index.html (or whatever) file there to
 display.
 
 In that case, it's not surprising that Apache httpd is generating this
 error (note that it's httpd, not Tomcat, that is generating the error).
 
 If you want Tomcat to respond to requests for the URI with no trailing
 slash, you'll have to map that explicitly.
 
 Here's my jk.conf (/etc/apache2/conf.d/jk.conf):
 
 http://www.nabble.com/file/3907/jk.conf jk.conf 
 
 I'm guessing that was a copy/paste error. Let me guess what you have in
 jk.conf:
 
 JkMount /jsp-examples/*   worker1
 and/or
 JkMount /jsp-examples/*.jsp   worker1
 
 Since /jsp-examples does not match /jsp-examples/*, your mappings
 are failing. You'll need to add something like:
 
 JkMount /jsp-examples worker1
 
 Hope that helps,
 -chris
 
 
  
 
 
 -- 
 View this message in context: 
 http://www.nabble.com/mod_jk-configuration-tf2539505.html#a7076449
 Sent from the Tomcat - User mailing list archive at Nabble.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]
 


RE: Servlet Mappings

2006-10-30 Thread Caldarale, Charles R
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
 Subject: Re: Servlet Mappings
 
 My webapp is deployed as ROOT.

What's the directory structure under ROOT?  Is ROOT under your Host's
appBase?  For that matter, what's the directory structure under appBase?

 If I chop all of the mappings out of the web.xml the image is 
 displayed.  With
 servlet-mapping
   servlet-namedefault/servlet-name
   url-pattern/images/url-pattern
 /servlet-mapping
 alone in the web.xml the image is dispalyed.

I suspect that's because the DefaultServlet in conf/web.xml is handling
the request in both of the above cases.

 With
 servlet-mapping
   servlet-namedefault/servlet-name
   url-pattern/images/*/url-pattern
 /servlet-mapping
 alone in the web.xml the image is not dispalyed.

Have you changed conf/web.xml at all?  Could there be any other mappings
in there getting in the way?

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



Re: mod_jk configuration

2006-10-30 Thread bcochofel

I had 
JkMount /jsp-examples worker1

and now the problem is gone... Thanks

I have one more question, let's take /jsp-examples to explain...
I want *.jsp send to tomcat for processing but all static contents processed
by apache, how can I do this?
Sorry for all the question but I'm new to all this tomcat configuration and
I don't have much time to read all the docs... I need to get this to work by
Wednesday...

So, once more, thanks for the solutions...


Christopher Schultz-2 wrote:
 
 Bruno,
 
 when I try
 http://localhost/jsp-examples http://localhost/jsp-examples  (without the
 /)
 I get this error:
 
 Forbidden
 You don't have permission to access /jsp-examples on this server.
 Additionally, a 403 Forbidden error was encountered while trying to use
 an
 ErrorDocument to handle the request.
 
 It looks like you have Indexes turned off for this directory/location in
 httpd.conf, or you don't have an index.html (or whatever) file there to
 display.
 
 In that case, it's not surprising that Apache httpd is generating this
 error (note that it's httpd, not Tomcat, that is generating the error).
 
 If you want Tomcat to respond to requests for the URI with no trailing
 slash, you'll have to map that explicitly.
 
 Here's my jk.conf (/etc/apache2/conf.d/jk.conf):
 
 http://www.nabble.com/file/3907/jk.conf jk.conf 
 
 I'm guessing that was a copy/paste error. Let me guess what you have in
 jk.conf:
 
 JkMount /jsp-examples/*   worker1
 and/or
 JkMount /jsp-examples/*.jsp   worker1
 
 Since /jsp-examples does not match /jsp-examples/*, your mappings
 are failing. You'll need to add something like:
 
 JkMount /jsp-examples worker1
 
 Hope that helps,
 -chris
 
 
  
 

-- 
View this message in context: 
http://www.nabble.com/mod_jk-configuration-tf2539505.html#a7077657
Sent from the Tomcat - User mailing list archive at Nabble.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]



RE: Servlet Mappings

2006-10-30 Thread Caldarale, Charles R
 From: Caldarale, Charles R [mailto:[EMAIL PROTECTED] 
 Subject: RE: Servlet Mappings
 
 What's the directory structure under ROOT?  Is ROOT under 
 your Host's appBase?  For that matter, what's the
 directory structure under appBase?

Should have mentioned that your images directory should be under ROOT,
not appBase.  If it's under appBase, images is being deployed as a
separate webapp, which is probably not your intent.

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



Re: mod_jk configuration

2006-10-30 Thread Christopher Schultz
Bruno,

 Well I've tried adding DirectoryIndex index.html index.htm index.jsp but no
 good...

Can you post the relevant portions of your httpd.conf?

 Does jk.cong overrides my apache conf?

jk.conf is just included in httpd.conf (right?), so it can certainly
override your httpd.conf.

-chris




signature.asc
Description: OpenPGP digital signature


Re: mod_jk configuration

2006-10-30 Thread Christopher Schultz
Bruno,

 I have one more question, let's take /jsp-examples to explain...
 I want *.jsp send to tomcat for processing but all static contents processed
 by apache, how can I do this?

This should be the default. Anything for which you do not explicitly
have a JkMount directive will be served by Apache httpd and not Tomcat.

-chris




signature.asc
Description: OpenPGP digital signature


Re: mod_jk configuration

2006-10-30 Thread bcochofel

But when I use JkMount /jsp-examples ajp13 doesn't this tell Apache that
everything inside /jsp-examples goes  to Tomcat?


Christopher Schultz-2 wrote:
 
 Bruno,
 
 I have one more question, let's take /jsp-examples to explain...
 I want *.jsp send to tomcat for processing but all static contents
 processed
 by apache, how can I do this?
 
 This should be the default. Anything for which you do not explicitly
 have a JkMount directive will be served by Apache httpd and not Tomcat.
 
 -chris
 
 
 
  
 

-- 
View this message in context: 
http://www.nabble.com/mod_jk-configuration-tf2539505.html#a7078655
Sent from the Tomcat - User mailing list archive at Nabble.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]



Re: mod_jk configuration

2006-10-30 Thread Christopher Schultz
Bruno,

 But when I use JkMount /jsp-examples ajp13 doesn't this tell Apache that
 everything inside /jsp-examples goes  to Tomcat?

No, it doesn't. JkMount does two kinds of matching: exact and wildcard.

Exact:
JkMount /jsp-examples   ajp13

This will map the URI /jsp-examples to Tomcat, and NO OTHERS AT ALL.

Wildcard:
JkMount /jsp-examples/*.jsp ajp13

This will map any URI that looks like /jsp-examples/ . .jsp.

Note that the first example and the second example are completely
separate. If you want Tomcat to handle /jsp-examples and everything
inside that URI space, you need to do this:

JkMount /jsp-examplesajp13
JkMount /jsp-examples/*  ajp13

But, since you want Apache httpd to handle all the static content,
you'll have to decide what Tomcat /should/ handle. I would usually have
something like this for each of my webapps:

JkMount /webappName/*.jsp  ajp13
JkMount /webappName/j_security_check ajp13

This covers all JSPs as well as the built-in J2EE authentication system
supported by Tomcat. If you have other URIs as well, then you should
define them. There's nothing wrong with having a lot of JkMount directives:

JkMount /webappName/servlet/* ajp13
JkMount /webappName/some/specific/servlet ajp13
JkMount /webappName/another/servlet/name  ajp13
.
.
.

Just list everything that you want Tomcat to handle, and everything else
will be served by Apache httpd.

-chris




signature.asc
Description: OpenPGP digital signature


Re: mod_jk configuration

2006-10-30 Thread bcochofel

Well I tried that but no good... I'vre tried this and still nothing:

# The following line makes apache aware of the location of
# the /jsp-examples context
Alias /jsp-examples /srv/www/tomcat5/base/webapps/jsp-examples
Directory /srv/www/tomcat5/base/webapps/jsp-examples
Options Indexes FollowSymLinks
AllowOverride AuthConfig

DirectoryIndex index.html index.htm index.jsp
Order allow,deny
Allow from all
/Directory

# Mount 'jsp-examples' directory inside webapps
#JkMount /jsp-examples/* ajp13
#JkMount /jsp-examples ajp13
JkMount /jsp-examples/*.jsp  ajp13
JkMount /jsp-examples/j_security_check ajp13 

I guess I have to tell tomcat to process all the things for now...


Christopher Schultz-2 wrote:
 
 
 But, since you want Apache httpd to handle all the static content,
 you'll have to decide what Tomcat /should/ handle. I would usually have
 something like this for each of my webapps:
 
 JkMount /webappName/*.jsp  ajp13
 JkMount /webappName/j_security_check ajp13
 
 This covers all JSPs as well as the built-in J2EE authentication system
 supported by Tomcat. If you have other URIs as well, then you should
 define them. There's nothing wrong with having a lot of JkMount
 directives:
 

-- 
View this message in context: 
http://www.nabble.com/mod_jk-configuration-tf2539505.html#a7079096
Sent from the Tomcat - User mailing list archive at Nabble.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]



Very basic web server hosting question

2006-10-30 Thread CANADAFAST INC.
Hello!
   
   
  I am a new tomcat 5.5 user. I have created some JSPs and they run perfectly 
in my PC using tomcat.
   
  I want to make my PC a webserver, so that ppl from outside can access my JSPs 
through tomcat 5.5 running on my system.
   
  My PC is connected to a router and my router is connected to a cable modem 
which has a static ip address from my cable ISP.
   
  But after that I don't know what to do further. How should I configure my 
tomcat, so that ppl from outside can access my JSP website.
   
  hOW SHOULD i access my pc from outside through my linksys router from port 
8080 in which tomcat is running on my pc.
   
   
  Thank you

 
-
Cheap Talk? Check out Yahoo! Messenger's low  PC-to-Phone call rates.

Changing port for tomcat5.5

2006-10-30 Thread CANADAFAST INC.
 
  Hello!
   
  My tomcat 5.5 is running on port 8080 on my pc(windows xp), how should I 
configure to chage it to run on port 80?
   
   
  thank you

 
-
Cheap Talk? Check out Yahoo! Messenger's low  PC-to-Phone call rates.

Re: Changing port for tomcat5.5

2006-10-30 Thread Pid
Start here:
http://tomcat.apache.org/tomcat-5.5-doc/

Then read all of:
http://tomcat.apache.org/tomcat-5.5-doc/config/index.html

Then find conf/server.xml and change the port 8080 to 80



CANADAFAST INC. wrote:
  
   Hello!

   My tomcat 5.5 is running on port 8080 on my pc(windows xp), how should I 
 configure to chage it to run on port 80?


   thank you
 
  
 -
 Cheap Talk? Check out Yahoo! Messenger's low  PC-to-Phone call rates.


-
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: Servlet Mappings

2006-10-30 Thread ben short

Charles,

Im deploying a war file. Im also using spring. I havent touched the
web.xml. I have litrally downloaded and un tared the file from the
apache tomcat website.

Here is the layout of the test app;lication i have setup to try it out.

test
- images
 - test.jpg
- WEB-INF
 - web.xml
 - test-servlet.xml
 - jsp
   - test.jsp
 - lib
   - various jars
 - tld
   - c-1.1.2.tld
   - fmt-1.1.2.tld

test.jsp

%@ page contentType=text/html;charset=UTF-8 language=java %
html
 headtitleSimple jsp page/title/head
 bodyimg src=images/test.jpg alt= //body
/html

web.xml

!DOCTYPE web-app PUBLIC
-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN
http://java.sun.com/dtd/web-app_2_3.dtd; 

web-app
 display-nameArchetype Created Web Application/display-name

   servlet
   servlet-nametest/servlet-name
   
servlet-classorg.springframework.web.servlet.DispatcherServlet/servlet-class
   load-on-startup1/load-on-startup
   /servlet

  servlet-mapping
  servlet-namedefault/servlet-name
  url-pattern/images/*/url-pattern
  /servlet-mapping

   servlet-mapping
  servlet-nametest/servlet-name
  url-pattern//url-pattern
  /servlet-mapping

/web-app

test-servlet.xml

?xml version=1.0 encoding=UTF-8?
!DOCTYPE beans PUBLIC -//SPRING//DTD BEAN//EN
http://www.springframework.org/dtd/spring-beans.dtd;
beans

   bean id=testController
class=org.springframework.web.servlet.mvc.ParameterizableViewController
   property name=viewName value=test/
   /bean

  bean id=urlMapping
class=org.springframework.web.servlet.handler.SimpleUrlHandlerMapping
  property name=mappings
  props
  prop key=/test.htmltestController/prop
   /props
  /property
  /bean

  bean id=viewResolver
class=org.springframework.web.servlet.view.InternalResourceViewResolver
  property name=prefix
  value/WEB-INF/jsp//value
  /property
  property name=suffix
  value.jsp/value
  /property
  property name=viewClass
  valueorg.springframework.web.servlet.view.JstlView/value
  /property
  /bean


/beans








On 10/30/06, Caldarale, Charles R [EMAIL PROTECTED] wrote:

 From: Caldarale, Charles R [mailto:[EMAIL PROTECTED]
 Subject: RE: Servlet Mappings

 What's the directory structure under ROOT?  Is ROOT under
 your Host's appBase?  For that matter, what's the
 directory structure under appBase?

Should have mentioned that your images directory should be under ROOT,
not appBase.  If it's under appBase, images is being deployed as a
separate webapp, which is probably not your intent.

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




-
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: Very basic web server hosting question

2006-10-30 Thread Pid
The reason no-one is finding this an interesting question is that it's
not really anything to do with Tomcat.

Your LinkSys router probably has a manual, or at least some basic
instructions for how to map external ports to the internal server.




CANADAFAST INC. wrote:
 Hello!


   I am a new tomcat 5.5 user. I have created some JSPs and they run perfectly 
 in my PC using tomcat.

   I want to make my PC a webserver, so that ppl from outside can access my 
 JSPs through tomcat 5.5 running on my system.

   My PC is connected to a router and my router is connected to a cable modem 
 which has a static ip address from my cable ISP.

   But after that I don't know what to do further. How should I configure my 
 tomcat, so that ppl from outside can access my JSP website.

   hOW SHOULD i access my pc from outside through my linksys router from port 
 8080 in which tomcat is running on my pc.


   Thank you
 
  
 -
 Cheap Talk? Check out Yahoo! Messenger's low  PC-to-Phone call rates.


-
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 not found since i replace tomcat 4.1.30 by tomcat 4.1.34

2006-10-30 Thread Philippe Couas
Hi

 

I want replace tomcat 4.1.30 by tomcat by tomcat 4.1.34

I have error 404 class not found on my servlet ??

It always in lib directory , where is my mistake

 

Regards

Philippe



RE: JDK

2006-10-30 Thread Jim Weir

From: Caldarale, Charles R [EMAIL PROTECTED]

Reply-To: Tomcat Users List users@tomcat.apache.org
To: Tomcat Users List users@tomcat.apache.org
Subject: RE: JDK
Date: Sun, 29 Oct 2006 22:57:39 -0600

 From: Jim Weir [mailto:[EMAIL PROTECTED]
 Subject: JDK

 I recently upgraded to jdk1.5.0_09, now when I start tomcat I
 get this in the error log and can't run my webapps,

You don't say what version of Tomcat you're using, but if it's 5.5.x,
you must remove the 1.4 Compatibility Package when running on a 1.5 JRE
or JDK.

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




It's 5.5.4..

How do I remove the 1.4 Compatibility Package?

Thanks,
Jim

_
Add a Yahoo! contact to Windows Live Messenger for a chance to win a free 
trip! 
http://www.imagine-windowslive.com/minisites/yahoo/default.aspx?locale=en-ushmtagline



-
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: servlet not found since i replace tomcat 4.1.30 by tomcat 4.1.34

2006-10-30 Thread Asensio, Rodrigo
Please, post your stacktrace to give you a better idea 

-Original Message-
From: Philippe Couas [mailto:[EMAIL PROTECTED] 
Sent: Monday, October 30, 2006 1:30 PM
To: tomcat-user@jakarta.apache.org
Subject: servlet not found since i replace tomcat 4.1.30 by tomcat
4.1.34 

Hi

 

I want replace tomcat 4.1.30 by tomcat by tomcat 4.1.34

I have error 404 class not found on my servlet ??

It always in lib directory , where is my mistake

 

Regards

Philippe


This message (including any attachments) contains confidential
and/or proprietary information intended only for the addressee.
Any unauthorized disclosure, copying, distribution or reliance on
the contents of this information is strictly prohibited and may
constitute a violation of law.  If you are not the intended
recipient, please notify the sender immediately by responding to
this e-mail, and delete the message from your system.  If you
have any questions about this e-mail please notify the sender
immediately.

-
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: JDK

2006-10-30 Thread Caldarale, Charles R
 From: Jim Weir [mailto:[EMAIL PROTECTED] 
 Subject: RE: JDK
 
 It's 5.5.4..

That's pretty old, and a lot of fixes have gone in since then.  I'd
suggest moving up.

 How do I remove the 1.4 Compatibility Package?

In 5.5.20, the Compatibility Package adds three jars:
bin/jmx.jar
common/endorsed/xercesImpl.jar
common/endorsed/xml-apis.jar

Simply delete them and restart Tomcat.

5.5.4 may have had only the last two - I don't remember for sure.

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



Re: Servlet Mappings

2006-10-30 Thread ben short

I just tried changing the /images/* to *.jpg and it works

On 10/30/06, ben short [EMAIL PROTECTED] wrote:

Charles,

Im deploying a war file. Im also using spring. I havent touched the
web.xml. I have litrally downloaded and un tared the file from the
apache tomcat website.

Here is the layout of the test app;lication i have setup to try it out.

test
- images
  - test.jpg
- WEB-INF
  - web.xml
  - test-servlet.xml
  - jsp
- test.jsp
  - lib
- various jars
  - tld
- c-1.1.2.tld
- fmt-1.1.2.tld

test.jsp

%@ page contentType=text/html;charset=UTF-8 language=java %
html
  headtitleSimple jsp page/title/head
  bodyimg src=images/test.jpg alt= //body
/html

web.xml

!DOCTYPE web-app PUBLIC
 -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN
 http://java.sun.com/dtd/web-app_2_3.dtd; 

web-app
  display-nameArchetype Created Web Application/display-name

servlet
servlet-nametest/servlet-name

servlet-classorg.springframework.web.servlet.DispatcherServlet/servlet-class
load-on-startup1/load-on-startup
/servlet

   servlet-mapping
   servlet-namedefault/servlet-name
   url-pattern/images/*/url-pattern
   /servlet-mapping

servlet-mapping
   servlet-nametest/servlet-name
   url-pattern//url-pattern
   /servlet-mapping

/web-app

test-servlet.xml

?xml version=1.0 encoding=UTF-8?
!DOCTYPE beans PUBLIC -//SPRING//DTD BEAN//EN
http://www.springframework.org/dtd/spring-beans.dtd;
beans

bean id=testController
class=org.springframework.web.servlet.mvc.ParameterizableViewController
property name=viewName value=test/
/bean

   bean id=urlMapping
class=org.springframework.web.servlet.handler.SimpleUrlHandlerMapping
   property name=mappings
   props
   prop key=/test.htmltestController/prop
/props
   /property
   /bean

   bean id=viewResolver
class=org.springframework.web.servlet.view.InternalResourceViewResolver
   property name=prefix
   value/WEB-INF/jsp//value
   /property
   property name=suffix
   value.jsp/value
   /property
   property name=viewClass
   valueorg.springframework.web.servlet.view.JstlView/value
   /property
   /bean


/beans








On 10/30/06, Caldarale, Charles R [EMAIL PROTECTED] wrote:
  From: Caldarale, Charles R [mailto:[EMAIL PROTECTED]
  Subject: RE: Servlet Mappings
 
  What's the directory structure under ROOT?  Is ROOT under
  your Host's appBase?  For that matter, what's the
  directory structure under appBase?

 Should have mentioned that your images directory should be under ROOT,
 not appBase.  If it's under appBase, images is being deployed as a
 separate webapp, which is probably not your intent.

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





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



Tab library question...

2006-10-30 Thread Nathan Wilhelmi
Hello - This may be a bit off topic, and if so any 
recommend pointers to the right place would be great. I 
really like the reuse aspects of tag libraries, however I 
don't like doing all the println statements to emit HTML. 
Feels like there has to be a better way. 
What I would really like, I think, is a way to embed jsp's 
in the tablib to handle the HTML output. Sort of like a 
mini jsp page solution, the difference is that I would 
like to embed the jsp widgets in the jar for the taglib, 
rather than coping files into the container directories. 
Does anyone know of a way or project that does this, or 
perhaps a better alternative? Something like velocity 
looks like it might work but I would prefer to stick with 
one view technology if possible.


Thanks!

-Nate


-
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: Very basic web server hosting question

2006-10-30 Thread CANADAFAST INC.
I don't care if anyone finds this question interesting or not. I just want a 
solution, if it were in the linksys manual then I would not have posted the 
question, I tried solving the problem by calling the linksys tech support, also 
 had a chat session with them, but they don't understand the problem itself.
  

Pid [EMAIL PROTECTED] wrote:
  The reason no-one is finding this an interesting question is that it's
not really anything to do with Tomcat.

Your LinkSys router probably has a manual, or at least some basic
instructions for how to map external ports to the internal server.




CANADAFAST INC. wrote:
 Hello!
 
 
 I am a new tomcat 5.5 user. I have created some JSPs and they run perfectly 
 in my PC using tomcat.
 
 I want to make my PC a webserver, so that ppl from outside can access my JSPs 
 through tomcat 5.5 running on my system.
 
 My PC is connected to a router and my router is connected to a cable modem 
 which has a static ip address from my cable ISP.
 
 But after that I don't know what to do further. How should I configure my 
 tomcat, so that ppl from outside can access my JSP website.
 
 hOW SHOULD i access my pc from outside through my linksys router from port 
 8080 in which tomcat is running on my pc.
 
 
 Thank you
 
 
 -
 Cheap Talk? Check out Yahoo! Messenger's low PC-to-Phone call rates.


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



 
-
We have the perfect Group for you. Check out the handy changes to Yahoo! Groups.

StandartSession.accessCount bug?

2006-10-30 Thread Michael Kantarovich
Hi,
 
I'm using version 5.5.12. I noticed that sometimes sessions doesn't
expire after a session-timeout. 
 
I started to debug my application and when I haven't found anything
useful I proceeded to Tomcat's code. It looks that there is a
synchronization bug during the update of the
StandardSession.accessCount. If I got it right, accessCount is a
reference counter which propose is to prevent session from expiring
while it's still in use. It's incremented when there is a Request which
accesses it for the first time, and decremented when the Request is
recycled. 
 
Suppose that my HTML generates several requests during the same session.
Probably, those requests will be handled by different http-proccessor
threads and those threads will try to increase/decrease the accessCount
of the same Session simultaneously. This will cause statement
++/--accessCount in StandardSession.access/endAccess sometimes to use an
old value ... 
 
What do you think?
 
Thanks!
Michael.
 


RE: Very basic web server hosting question

2006-10-30 Thread Rick Fisk
The point is, whether you were using Apache, IIS, or Tomcat, the problem
you are trying to resolve is generic and not related to tomcat itself.
Thus, this probably isn't the proper forum to direct your question.

-Original Message-
From: CANADAFAST INC. [mailto:[EMAIL PROTECTED] 
Sent: Monday, October 30, 2006 1:11 PM
To: Tomcat Users List; [EMAIL PROTECTED]
Subject: Re: Very basic web server hosting question

I don't care if anyone finds this question interesting or not. I just
want a solution, if it were in the linksys manual then I would not have
posted the question, I tried solving the problem by calling the linksys
tech support, also  had a chat session with them, but they don't
understand the problem itself.
  

Pid [EMAIL PROTECTED] wrote:
  The reason no-one is finding this an interesting question is that it's
not really anything to do with Tomcat.

Your LinkSys router probably has a manual, or at least some basic
instructions for how to map external ports to the internal server.




CANADAFAST INC. wrote:
 Hello!
 
 
 I am a new tomcat 5.5 user. I have created some JSPs and they run
perfectly in my PC using tomcat.
 
 I want to make my PC a webserver, so that ppl from outside can access
my JSPs through tomcat 5.5 running on my system.
 
 My PC is connected to a router and my router is connected to a cable
modem which has a static ip address from my cable ISP.
 
 But after that I don't know what to do further. How should I configure
my tomcat, so that ppl from outside can access my JSP website.
 
 hOW SHOULD i access my pc from outside through my linksys router from
port 8080 in which tomcat is running on my pc.
 
 
 Thank you
 
 
 -
 Cheap Talk? Check out Yahoo! Messenger's low PC-to-Phone call rates.


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



 
-
We have the perfect Group for you. Check out the handy changes to Yahoo!
Groups.

-
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: Very basic web server hosting question

2006-10-30 Thread EDMOND KEMOKAI

CANADAFAST INC. who ever you're, getting obnoxious isn't going to get your
issue resolved. As was pointed out by the previous responder, your problem
isn't a Tomcat one, this is a Tomcat mailing list. If you know what you're
doing you should no trouble accomplishing your task, I have a similar setup
(for testing) and have no trouble access my webapp from anywhere on the web
on my home PC. We had this discussion the other day.

On 10/30/06, CANADAFAST INC. [EMAIL PROTECTED] wrote:


I don't care if anyone finds this question interesting or not. I just want
a solution, if it were in the linksys manual then I would not have posted
the question, I tried solving the problem by calling the linksys tech
support, also  had a chat session with them, but they don't understand the
problem itself.


Pid [EMAIL PROTECTED] wrote:
  The reason no-one is finding this an interesting question is that it's
not really anything to do with Tomcat.

Your LinkSys router probably has a manual, or at least some basic
instructions for how to map external ports to the internal server.




CANADAFAST INC. wrote:
 Hello!


 I am a new tomcat 5.5 user. I have created some JSPs and they run
perfectly in my PC using tomcat.

 I want to make my PC a webserver, so that ppl from outside can access my
JSPs through tomcat 5.5 running on my system.

 My PC is connected to a router and my router is connected to a cable
modem which has a static ip address from my cable ISP.

 But after that I don't know what to do further. How should I configure
my tomcat, so that ppl from outside can access my JSP website.

 hOW SHOULD i access my pc from outside through my linksys router from
port 8080 in which tomcat is running on my pc.


 Thank you


 -
 Cheap Talk? Check out Yahoo! Messenger's low PC-to-Phone call rates.


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




-
We have the perfect Group for you. Check out the handy changes to Yahoo!
Groups.




talk trash and carry a small stick.
PAUL KRUGMAN (NYT)


Re: Tab library question...

2006-10-30 Thread Rahul Akolkar

On 10/30/06, Nathan Wilhelmi [EMAIL PROTECTED] wrote:

Hello - This may be a bit off topic, and if so any
recommend pointers to the right place would be great. I
really like the reuse aspects of tag libraries, however I
don't like doing all the println statements to emit HTML.
Feels like there has to be a better way.

snip/

See JSP (= 2.0) tag files [1].

-Rahul

[1] http://java.sun.com/j2ee/1.4/docs/tutorial/doc/JSPTags5.html



What I would really like, I think, is a way to embed jsp's
in the tablib to handle the HTML output. Sort of like a
mini jsp page solution, the difference is that I would
like to embed the jsp widgets in the jar for the taglib,
rather than coping files into the container directories.
Does anyone know of a way or project that does this, or
perhaps a better alternative? Something like velocity
looks like it might work but I would prefer to stick with
one view technology if possible.

Thanks!

-Nate



-
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: Servlet Mappings

2006-10-30 Thread Caldarale, Charles R
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
 Subject: Re: Servlet Mappings
 
 Im deploying a war file. Im also using spring. I havent touched the
 web.xml. I have litrally downloaded and un tared the file from the
 apache tomcat website.

I'm not familiar with configuring spring, so someone else will have to
check that.  I suspect it's muddying up the picture.

 Here is the layout of the test app;lication i have setup to 
 try it out.

That looks o.k. as far as it goes, but you didn't tell us where it's
actually deployed, nor how you think you got it to be ROOT.  Do you have
a conf/[engine]/[host]/ROOT.xml with a Context element and a docBase
attribute pointing to wherever your .war is?  If the .war is also in the
Host's appBase directory, you've deployed the app twice, which is
probably not desirable.

So again, what is your appBase set to?  What's the directory structure
underneath the appBase?

What URL do you use to trigger execution of the test.jsp file?  Can you
try this without using spring?

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



Re: Very basic web server hosting question

2006-10-30 Thread David Kerber
Use your router's instructions to set port forwarding.  You will need 
to specify the port the outside world will connect to, and what port on 
your machine those connections will be forwarded to.  The details vary 
by router manufacturer and model, so we can't give you specific 
instructions.  However, even this may not work if your cable company 
does not allow external connections to ports on their customers' 
systems, which is quite common if you have a residential (as opposed to 
a business) connection.


If all of the above work, then the outside world will connect to 
http://your.static.ip.address:port/whatever.jsp, and it will be 
forwarded to port 8080 on your machine.


Dave


CANADAFAST INC. wrote:


Hello!
  
  
 I am a new tomcat 5.5 user. I have created some JSPs and they run perfectly in my PC using tomcat.
  
 I want to make my PC a webserver, so that ppl from outside can access my JSPs through tomcat 5.5 running on my system.
  
 My PC is connected to a router and my router is connected to a cable modem which has a static ip address from my cable ISP.
  
 But after that I don't know what to do further. How should I configure my tomcat, so that ppl from outside can access my JSP website.
  
 hOW SHOULD i access my pc from outside through my linksys router from port 8080 in which tomcat is running on my pc.
  
  
 Thank you



-
Cheap Talk? Check out Yahoo! Messenger's low  PC-to-Phone call rates.
 





-
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: Tab library question...

2006-10-30 Thread David Smith

I would think there are two ways:

1) Write a jsp with the custom tag in it.  The custom tag only does the 
work and exposes result beans to the jsp for rendering.  Keep the whole 
thing in it's own jsp and then use c:import / to bring the end 
result into the main page.  Beans in this case only need be exposed to 
the pageContext as to not pollute request attributes in the main page.


2) Implement freemarker in you taglib to assemble the resulting html.

I would do number 1 if I were designing it -- decomplicates the taglib 
and makes the formatting updateable without huge efforts.


--David

Nathan Wilhelmi wrote:

Hello - This may be a bit off topic, and if so any recommend pointers 
to the right place would be great. I really like the reuse aspects of 
tag libraries, however I don't like doing all the println statements 
to emit HTML. Feels like there has to be a better way. What I would 
really like, I think, is a way to embed jsp's in the tablib to handle 
the HTML output. Sort of like a mini jsp page solution, the difference 
is that I would like to embed the jsp widgets in the jar for the 
taglib, rather than coping files into the container directories. Does 
anyone know of a way or project that does this, or perhaps a better 
alternative? Something like velocity looks like it might work but I 
would prefer to stick with one view technology if possible.


Thanks!

-Nate


-
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: Very basic web server hosting question

2006-10-30 Thread Martin Gainty
Canada-
record the dynamic IP that the Tomcat server is running on and have the other 
boxes reference that IP in browser 
e.g.
Tomcat server = 192.168.1.100
now other machines reference by going to
http://192.168.1.100:8080
if you dont want IPs then publish a hosts file somewhere e.g

/hosts
192.168.1.100 tomcatserver
127.0.0.1 tomcatserver
http://tomcatserver:8080

assuming u dont have bind/dns installed..
make sure the top entry is updated in each and every hosts file on each of the 
machine's on the network

M-
This e-mail communication and any attachments may contain confidential and 
privileged information for the use of the 
designated recipients named above. If you are not the intended recipient, you 
are hereby notified that you have received
this communication in error and that any review, disclosure, dissemination, 
distribution or copying of it or its 
conte
- Original Message - 
From: CANADAFAST INC. [EMAIL PROTECTED]
To: Tomcat Users List users@tomcat.apache.org; [EMAIL PROTECTED]
Sent: Monday, October 30, 2006 2:11 PM
Subject: Re: Very basic web server hosting question


I don't care if anyone finds this question interesting or not. I just want a 
solution, if it were in the linksys manual then I would not have posted the 
question, I tried solving the problem by calling the linksys tech support, 
also  had a chat session with them, but they don't understand the problem 
itself.
  
 
 Pid [EMAIL PROTECTED] wrote:
  The reason no-one is finding this an interesting question is that it's
 not really anything to do with Tomcat.
 
 Your LinkSys router probably has a manual, or at least some basic
 instructions for how to map external ports to the internal server.
 
 
 
 
 CANADAFAST INC. wrote:
 Hello!
 
 
 I am a new tomcat 5.5 user. I have created some JSPs and they run perfectly 
 in my PC using tomcat.
 
 I want to make my PC a webserver, so that ppl from outside can access my 
 JSPs through tomcat 5.5 running on my system.
 
 My PC is connected to a router and my router is connected to a cable modem 
 which has a static ip address from my cable ISP.
 
 But after that I don't know what to do further. How should I configure my 
 tomcat, so that ppl from outside can access my JSP website.
 
 hOW SHOULD i access my pc from outside through my linksys router from port 
 8080 in which tomcat is running on my pc.
 
 
 Thank you
 
 
 -
 Cheap Talk? Check out Yahoo! Messenger's low PC-to-Phone call rates.
 
 
 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 -
 We have the perfect Group for you. Check out the handy changes to Yahoo! 
 Groups.

Re: Servlet Mappings

2006-10-30 Thread ben short

I deploy this test webapp via the tomcat manager to http://myhost/test.

The appBase in the sever.xml is set, as default, to webapps. The
directory structure is

webapps
 - ROOT - Currently another applicaiton I have setup.
- test - The test application.

When deploying to the root, just name the war file ROOT.xml the rest
of the server is configured as default.

To url to trigger the jsp is http://myhost/test/test.html.

Im just knocking up a servlet to do the same thing to remove spring
from the picture.

Ben


On 10/30/06, Caldarale, Charles R [EMAIL PROTECTED] wrote:

 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
 Subject: Re: Servlet Mappings

 Im deploying a war file. Im also using spring. I havent touched the
 web.xml. I have litrally downloaded and un tared the file from the
 apache tomcat website.

I'm not familiar with configuring spring, so someone else will have to
check that.  I suspect it's muddying up the picture.

 Here is the layout of the test app;lication i have setup to
 try it out.

That looks o.k. as far as it goes, but you didn't tell us where it's
actually deployed, nor how you think you got it to be ROOT.  Do you have
a conf/[engine]/[host]/ROOT.xml with a Context element and a docBase
attribute pointing to wherever your .war is?  If the .war is also in the
Host's appBase directory, you've deployed the app twice, which is
probably not desirable.

So again, what is your appBase set to?  What's the directory structure
underneath the appBase?

What URL do you use to trigger execution of the test.jsp file?  Can you
try this without using spring?

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




-
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: Very basic web server hosting question

2006-10-30 Thread David Smith
I understand the frustration, but at the same time, this is a more or 
less basic web/network administration question.  You need to read your 
cable router manual for how to forward traffic to a specific port (80) 
to a specific machine on the inside of your firewall or setup your 
server system to be in the DMZ.  You'll also have to learn how to 
register a DNS domain name if you haven't already and point name servers 
to the public IP port your cable router is on.


There is one point that could be considered tomcat specific.  You may 
need to set proxyName and proxyPort on the connector in your server.xml 
receiving traffic from your cable router.  It's mostly so the outside 
people get correct redirect responses and the links are written correctly.


--David

CANADAFAST INC. wrote:


I don't care if anyone finds this question interesting or not. I just want a 
solution, if it were in the linksys manual then I would not have posted the 
question, I tried solving the problem by calling the linksys tech support, also 
 had a chat session with them, but they don't understand the problem itself.
 


Pid [EMAIL PROTECTED] wrote:
 The reason no-one is finding this an interesting question is that it's
not really anything to do with Tomcat.

Your LinkSys router probably has a manual, or at least some basic
instructions for how to map external ports to the internal server.




CANADAFAST INC. wrote:
 


Hello!


I am a new tomcat 5.5 user. I have created some JSPs and they run perfectly in 
my PC using tomcat.

I want to make my PC a webserver, so that ppl from outside can access my JSPs 
through tomcat 5.5 running on my system.

My PC is connected to a router and my router is connected to a cable modem 
which has a static ip address from my cable ISP.

But after that I don't know what to do further. How should I configure my 
tomcat, so that ppl from outside can access my JSP website.

hOW SHOULD i access my pc from outside through my linksys router from port 8080 
in which tomcat is running on my pc.


Thank you


-
Cheap Talk? Check out Yahoo! Messenger's low PC-to-Phone call rates.
   




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




-
We have the perfect Group for you. Check out the handy changes to Yahoo! Groups.
 




-
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: Servlet Mappings

2006-10-30 Thread ben short

Heres the web.xml mapping to a simple servlet..

web-app
 display-nameArchetype Created Web Application/display-name
   servlet
   servlet-nametest/servlet-name
   servlet-classTest/servlet-class
   load-on-startup1/load-on-startup
   /servlet
  servlet-mapping
  servlet-namedefault/servlet-name
  url-pattern/images/*/url-pattern
  /servlet-mapping
   servlet-mapping
  servlet-nametest/servlet-name
  url-pattern//url-pattern
  /servlet-mapping
/web-app

The Servlet

public class Test extends HttpServlet
   {
   protected void doGet(HttpServletRequest httpServletRequest,
HttpServletResponse httpServletResponse) throws ServletException,
IOException
   {
   httpServletResponse.getWriter().write(html\n +
 headtitleSimple jsp page/title/head\n +
 bodyimg src=\images/test.jpg\ alt=\\ //body\n +
   /html);
   httpServletResponse.getWriter().flush();
   }
   }

The webapp was deploed to http://myhost/test via the tomcat manger
webapp. On going to the http://myhost/test url the webpage is shown
but no image. Going to http://myhost/test/images/test.jpg give a 404.

Ben


On 10/30/06, ben short [EMAIL PROTECTED] wrote:

I deploy this test webapp via the tomcat manager to http://myhost/test.

The appBase in the sever.xml is set, as default, to webapps. The
directory structure is

webapps
  - ROOT - Currently another applicaiton I have setup.
 - test - The test application.

When deploying to the root, just name the war file ROOT.xml the rest
of the server is configured as default.

To url to trigger the jsp is http://myhost/test/test.html.

Im just knocking up a servlet to do the same thing to remove spring
from the picture.

Ben


On 10/30/06, Caldarale, Charles R [EMAIL PROTECTED] wrote:
  From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
  Subject: Re: Servlet Mappings
 
  Im deploying a war file. Im also using spring. I havent touched the
  web.xml. I have litrally downloaded and un tared the file from the
  apache tomcat website.

 I'm not familiar with configuring spring, so someone else will have to
 check that.  I suspect it's muddying up the picture.

  Here is the layout of the test app;lication i have setup to
  try it out.

 That looks o.k. as far as it goes, but you didn't tell us where it's
 actually deployed, nor how you think you got it to be ROOT.  Do you have
 a conf/[engine]/[host]/ROOT.xml with a Context element and a docBase
 attribute pointing to wherever your .war is?  If the .war is also in the
 Host's appBase directory, you've deployed the app twice, which is
 probably not desirable.

 So again, what is your appBase set to?  What's the directory structure
 underneath the appBase?

 What URL do you use to trigger execution of the test.jsp file?  Can you
 try this without using spring?

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





-
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: Very basic web server hosting question

2006-10-30 Thread Pid
I was being polite, (if a little indirect), as I'd noticed that it
wasn't the first time that you'd posted the question.

List members normally respond if the question is interesting, even if
it's not relevant - which is the case here.  It's not a Tomcat problem,
ergo the Tomcat Users List membership is largely ignoring it.


As I said, and others have pointed out, you need to configure your
*router* to send traffic from outside to the computer on the inside,
Tomcat seems to be working fine.


As you seem to be a novice on interweb related matters, I'd like to
introduce you to a concept called a search engine.  There are several
well-known types of search engine, one of which is particularly
popular and is called The Google.

You can find The Google by typing http://www.google.com; into your
web browser.

Follow the simple instructions to beseech the Oracle of the Interweb
when the page has finished loading, and may your question be answered.

Ahhmen.





CANADAFAST INC. wrote:
 I don't care if anyone finds this question interesting or not. I just want a 
 solution, if it were in the linksys manual then I would not have posted the 
 question, I tried solving the problem by calling the linksys tech support, 
 also  had a chat session with them, but they don't understand the problem 
 itself.
   
 
 Pid [EMAIL PROTECTED] wrote:
   The reason no-one is finding this an interesting question is that it's
 not really anything to do with Tomcat.
 
 Your LinkSys router probably has a manual, or at least some basic
 instructions for how to map external ports to the internal server.
 
 
 
 
 CANADAFAST INC. wrote:
 Hello!


 I am a new tomcat 5.5 user. I have created some JSPs and they run perfectly 
 in my PC using tomcat.

 I want to make my PC a webserver, so that ppl from outside can access my 
 JSPs through tomcat 5.5 running on my system.

 My PC is connected to a router and my router is connected to a cable modem 
 which has a static ip address from my cable ISP.

 But after that I don't know what to do further. How should I configure my 
 tomcat, so that ppl from outside can access my JSP website.

 hOW SHOULD i access my pc from outside through my linksys router from port 
 8080 in which tomcat is running on my pc.


 Thank you


 -
 Cheap Talk? Check out Yahoo! Messenger's low PC-to-Phone call rates.
 
 
 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
  
 -
 We have the perfect Group for you. Check out the handy changes to Yahoo! 
 Groups.


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



String cache setting - looking for documentation and cause of out of memory error

2006-10-30 Thread Ellen O'Sullivan
I'm looking for more information about the String cache configuration in the
Catalina.properties file.  I've searched through Tomcat documentation and I
can't find any details about this.

We have a servlet that processes requests that can be large, sometimes over
2MB (we have set the MaxPostSize to 0 to handle this). 
We continually were receiving out of memory messages so we ran Tomcat (5.5)
under JProbe and saw that string cache appeared to be the culprit in the
heap.
 
When we set the property tomcat.util.buf.StringCache.byte.enabled to false,
we were able to successfully run with no out of memory messages and a
healthy looking heap.
 
Any pointers to documentation or thoughts about what might be going on is
appreciated.
 
thanks
Ellen O'S.
 


Re: Is it possible to log IP Address of requestor with custom AccessLogValve pattern?

2006-10-30 Thread Rashmi Rubdi
Hi Li and Pid, 

Thanks again for your replies.

You are right, I also tried printing request.getRemoteAddr() in a JSP, and it 
always lists 127.0.0.1

As you have suggested my site could be behind a proxy, but I don't know this 
for sure. I've asked the host provider if this is the case and waiting for a 
reply.

I also use Javascript based logging but that only logs requests coming from a 
browser and correctly logs the IP address of the requestor however, it does not 
log 
search engine bots I guess because bots disable Javascript or can't work with 
Javascript.

-Regards
Rashmi

- Original Message 
From: Li [EMAIL PROTECTED]
To: Tomcat Users List users@tomcat.apache.org; [EMAIL PROTECTED]
Sent: Monday, October 30, 2006 8:39:12 AM
Subject: Re: Is it possible to log IP Address of requestor with custom 
AccessLogValve pattern?


Hi Rashmi,

if there is problem with retrieving correct remote IP address, log4j will
not solve problem ...

it seems like this:

remote user ---(send request) --- your proxy (or maybe you use some
connector or forwardor)  tomcat

if 127.0.0.1, seems your connector or forwardoer is located in the same host
as your tomcat sharing same IP address or hostname

if not 127.0.0.1, seems the request comes from proxy



On 10/30/06, Pid [EMAIL PROTECTED] wrote:

 Do you have a local proxy between the tomcat instance and the requestor?



 Rashmi Rubdi wrote:
  Li,
 
  Thanks for the reply.
 
  As indicated in your illustration,  in your case the remote IP address
 (IP of the client browser) is correctly displaying.
 
  But in my case, for some reason even when my website is accessed
 remotely it always shows local IP Address (the website's IP address) and not
 the remote IP address.
 
  In other words
  %a %A %h  is translating *always* to
  127.0.0.1
  68.120.115.43
  127.0.0.1
 
  Where 68.120.115.43  is the IP address of the website host and not the
 client (remote host).
 
  The website is hosted on a Tomcat 5.5 which is configured as a virtual
 host. I wonder if the virtual host setting might be the cause for not
 logging the actual remote IP address.
 
  If I can't get Access Log Valve to log the remote IP address then I
 might have to try it with Log4J with Commons Logging to log the remote IP
 address I guess.
 
  -Regards
  Rashmi
 
  - Original Message 
  From: Li [EMAIL PROTECTED]
  To: Tomcat Users List users@tomcat.apache.org
  Sent: Monday, October 30, 2006 3:25:38 AM
  Subject: Re: Is it possible to log IP Address of requestor with custom
 AccessLogValve pattern?
 
 
  what you defined is correct ...  a simpler way is using default setting
  Valve
className=org.apache.catalina.valves.AccessLogValve
directory=logs
prefix=your-site-access-log-
suffix=.log
pattern=common
resolveHosts=false/
 
  the result should be
  (if you are testing from same host)
  127.0.0.1 - - [18/Oct/2006:18:54:48 +0800] GET /site/ HTTP/1.1 200 306
  127.0.0.1 - - [18/Oct/2006:18:54:48 +0800] GET /site/Welcome.do
 HTTP/1.1
  200 1775
  (if your user testing from remote host)
  202.110.6.23 - - [18/Oct/2006:19:03:44 +0800] GET /site/Welcome.do
  HTTP/1.1 200 8893
  ...
 
  On 10/30/06, Rashmi Rubdi [EMAIL PROTECTED] wrote:
  Hello,
 
  My site is hosted on Tomcat 5.5 and I'm trying to log the IP Address of
  search engine bots that crawl the site.
 
  After reading the following documentation here, which is written very
  nicely btw
  http://tomcat.apache.org/tomcat-5.5-doc/config/valve.html
 
 
 http://tomcat.apache.org/tomcat-5.5-doc/catalina/docs/api/org/apache/catalina/valves/AccessLogValve.html
 
  I configured the pattern attribute of AccessLogValve as follows:
 
  Valve className=org.apache.catalina.valves.AccessLogValve
  directory=logs
  pattern=%a %A %h %H %u %t %r %s %b %{Referer}i %{User-Agent}i
  prefix=localhost_access_log. resolveHosts=false suffix=.txt /
 
  The following is a sample of what gets logged with the above
 configuration
  in server.xml .
 
  127.0.0.1 68.120.115.43 127.0.0.1 HTTP/1.1 - [29/Oct/2006:23:50:13
 -0800]
  GET /web/_stylesheet/table.css HTTP/1.1 304 - 
  http://www.website.com/c/a_page.jsp;;; Mozilla/5.0 (Windows; U; Windows
 NT
  5.1; en-US; rv:1.8.0.7) Gecko/20060909 Firefox/1.5.0.7
 
  The documentation says that %a is Remote IP Address, however 127.0.0.1is
  being logged instead of the IP Address of the requestor.
 
  Is this correct?
 
  IMO %a should be the IP Address of the agent that's making the request
 - (
  i.e. the IP Address of a browser or a bot etc).
 
  Please let me know if there's a way to log IP Address of the agent
 that's
  making the request.
 
  Any help is appreciated.
 
  -Thank you
  Rashmi
 
 
 
  -
  To start a new topic, e-mail: users@tomcat.apache.org
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, 

maxPostSize configuration in Tomcat connector?

2006-10-30 Thread toadie D

from the config guide in 5.5,
http://tomcat.apache.org/tomcat-5.5-doc/config/ajp.html,  there's a
way to configure the  size of the data handled by Tomcat when
processing request with Content-Type :
application/x-www-form-urlencoded

The default value is 2Meg. From a best practice perspective in real
life implementation, what's a reasonable value?  We have a customer
who requested that we up the limit to 10-15 or even 20 Meg range.
Are there any implication in raising this limit too high ?

Thanks

-
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 the admin on 5.5

2006-10-30 Thread Michael Hencin
I am having a bear of a time installing the admin application for 5.5. I
downloaded and unzipped the apache-tomcat-5.5.20-admin.zip, expanded the
contents. Then using the tomcat manager application deployed the files OK.
 
 
But when I try to access the admin app, I get this error.
 

HTTP Status 503 - Servlet admin.login_jsp is currently unavailable

  _  


type Status report

message Servlet admin.login_jsp is currently unavailable

description The requested service (Servlet admin.login_jsp is currently
unavailable) is not currently available.

 
Is there a war file for the admin application I could use? Rather then the
directory in the zip? I ask this not only for my own ease of use, but also
since our clients all have tomcat installed (currently 5.0.28) and I want to
be able to tell them to upgrade up to 5.5. However since the admin app is
not installed by default I will need to instruct them as to how to install
the admin app. A war file would be easier, as the many users I have are not
at all tomcat savvy.
 

 

 

 

Michael Hencin

Enginuity Development

815-505-5028

 



RE: installing the admin on 5.5

2006-10-30 Thread Caldarale, Charles R
 From: Michael Hencin [mailto:[EMAIL PROTECTED] 
 Subject: installing the admin on 5.5
 
 I am having a bear of a time installing the admin application 
 for 5.5. I downloaded and unzipped the apache-tomcat-5.5.20-admin.zip,

 expanded the contents.

That's all you need to do - if you expand it into the standard Tomcat
installation directory, like you're supposed to do.  If you're using
some 3rd-party repackaged Tomcat that scatters pieces of Tomcat all
over, I'd strongly suggest throwing that in the junk pile and
downloading and installing the real one.

 Then using the tomcat manager application deployed the files OK.

Well, that's made a mess of things.  You need to undeploy it from there,
and just unzip properly.

Don't forget to to update conf/tomcat-users.xml with an appropriate
userid, password, and the admin role.

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



RE: installing the admin on 5.5

2006-10-30 Thread Michael Hencin
I did use all the apache org tomcat distributions. Nothing third part. I
never did edit the tomcat-users.xml. During the 5.5 install I did create an
admin users and password. I can use this to access the tomcat manager
application just fine. 

But I cannot gain access to any sort of login page at all for the admin app.


And perhaps I am confused as to how to deploy an application from a
directory. I am using the manager application to enter the directory path,
admin.xml context file and the context path. Then using the deploy button.
This seemed to work fine and results in my admin application being listed in
the list of applications above that listed as running.

Are you suggesting I simply extract the contents of the zip file into my
webapps directory?

Mike


-Original Message-
From: Caldarale, Charles R [mailto:[EMAIL PROTECTED] 
Sent: Monday, October 30, 2006 5:24 PM
To: Tomcat Users List
Subject: RE: installing the admin on 5.5

 From: Michael Hencin [mailto:[EMAIL PROTECTED] 
 Subject: installing the admin on 5.5
 
 I am having a bear of a time installing the admin application 
 for 5.5. I downloaded and unzipped the apache-tomcat-5.5.20-admin.zip,

 expanded the contents.

That's all you need to do - if you expand it into the standard Tomcat
installation directory, like you're supposed to do.  If you're using
some 3rd-party repackaged Tomcat that scatters pieces of Tomcat all
over, I'd strongly suggest throwing that in the junk pile and
downloading and installing the real one.

 Then using the tomcat manager application deployed the files OK.

Well, that's made a mess of things.  You need to undeploy it from there,
and just unzip properly.

Don't forget to to update conf/tomcat-users.xml with an appropriate
userid, password, and the admin role.

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



-
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 the admin on 5.5

2006-10-30 Thread Michael Hencin
Excellent, thank you that all worked fine. I was not aware, nor was able to
find any documentation Easily available to instruct me as to where and how
to put those files. The structure in the zip did look very much like the
tomcat install, but there is no Read me in the zip to instruct as so. The
verbage about the admin being a Webapp immediately made me think of
standard deployment methods. 


Thanks 

Mike

-Original Message-
From: Caldarale, Charles R [mailto:[EMAIL PROTECTED] 
Sent: Monday, October 30, 2006 5:44 PM
To: Tomcat Users List
Subject: RE: installing the admin on 5.5

 From: Michael Hencin [mailto:[EMAIL PROTECTED] 
 Subject: RE: installing the admin on 5.5
 
 I did use all the apache org tomcat distributions. Nothing 
 third part.

Good.

 I never did edit the tomcat-users.xml. During the 5.5 install
 I did create an admin users and password. I can use this to
 access the tomcat manager application just fine. 

O.k., check the conf/tomcat-users.xml to make sure that your admin
userid has roles of admin and manager (at least the latter should
already be there).  Update as needed, while Tomcat is not running.

 But I cannot gain access to any sort of login page at all for 
 the admin app.

That's because it's not installed properly.  If you just unzip the admin
package, most of it will drop into server/webapps, where the manager and
host-manager apps are already installed.  Normal apps go into the
regular webapps directory, but these three require special handling in
5.5 and below.

 And perhaps I am confused as to how to deploy an application from a
 directory.

What you did is fine for normal apps, but not this one.

 Are you suggesting I simply extract the contents of the zip 
 file into my webapps directory?

No, the paths are already set up in the admin zip file to go right on
top of the Tomcat installation.  There are pieces that have to go into
several different directories, none of them the standard webapps.  Look
at the structure inside the admin zip file and notice how it matches up
to your already installed 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 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: Is it possible to log IP Address of requestor with custom AccessLogValve pattern?

2006-10-30 Thread Rashmi Rubdi
I think my web site is behind a proxy, I was told that
request.getHeader(x-forwarded-for) should work instead of 
request.getRemoteAddr() , and it does work when I try it.

The site correctly shows the remote client's IP Address. 

I guess there's no pattern element in Access Log Valve for capturing the 
x-forwarded-for.

I might have to log it with Log4J. 

Sincerely
-Rashmi
- Forwarded Message 
From: Rashmi Rubdi [EMAIL PROTECTED]
To: Tomcat Users List users@tomcat.apache.org
Sent: Monday, October 30, 2006 5:03:44 PM
Subject: Re: Is it possible to log IP Address of requestor with custom 
AccessLogValve pattern?


Hi Li and Pid, 

Thanks again for your replies.

You are right, I also tried printing request.getRemoteAddr() in a JSP, and it 
always lists 127.0.0.1

As you have suggested my site could be behind a proxy, but I don't know this 
for sure. I've asked the host provider if this is the case and waiting for a 
reply.

I also use Javascript based logging but that only logs requests coming from a 
browser and correctly logs the IP address of the requestor however, it does not 
log 
search engine bots I guess because bots disable Javascript or can't work with 
Javascript.

-Regards
Rashmi

- Original Message 
From: Li [EMAIL PROTECTED]
To: Tomcat Users List users@tomcat.apache.org; [EMAIL PROTECTED]
Sent: Monday, October 30, 2006 8:39:12 AM
Subject: Re: Is it possible to log IP Address of requestor with custom 
AccessLogValve pattern?


Hi Rashmi,

if there is problem with retrieving correct remote IP address, log4j will
not solve problem ...

it seems like this:

remote user ---(send request) --- your proxy (or maybe you use some
connector or forwardor)  tomcat

if 127.0.0.1, seems your connector or forwardoer is located in the same host
as your tomcat sharing same IP address or hostname

if not 127.0.0.1, seems the request comes from proxy



On 10/30/06, Pid [EMAIL PROTECTED] wrote:

 Do you have a local proxy between the tomcat instance and the requestor?



 Rashmi Rubdi wrote:
  Li,
 
  Thanks for the reply.
 
  As indicated in your illustration,  in your case the remote IP address
 (IP of the client browser) is correctly displaying.
 
  But in my case, for some reason even when my website is accessed
 remotely it always shows local IP Address (the website's IP address) and not
 the remote IP address.
 
  In other words
  %a %A %h  is translating *always* to
  127.0.0.1
  68.120.115.43
  127.0.0.1
 
  Where 68.120.115.43  is the IP address of the website host and not the
 client (remote host).
 
  The website is hosted on a Tomcat 5.5 which is configured as a virtual
 host. I wonder if the virtual host setting might be the cause for not
 logging the actual remote IP address.
 
  If I can't get Access Log Valve to log the remote IP address then I
 might have to try it with Log4J with Commons Logging to log the remote IP
 address I guess.
 
  -Regards
  Rashmi
 
  - Original Message 
  From: Li [EMAIL PROTECTED]
  To: Tomcat Users List users@tomcat.apache.org
  Sent: Monday, October 30, 2006 3:25:38 AM
  Subject: Re: Is it possible to log IP Address of requestor with custom
 AccessLogValve pattern?
 
 
  what you defined is correct ...  a simpler way is using default setting
  Valve
className=org.apache.catalina.valves.AccessLogValve
directory=logs
prefix=your-site-access-log-
suffix=.log
pattern=common
resolveHosts=false/
 
  the result should be
  (if you are testing from same host)
  127.0.0.1 - - [18/Oct/2006:18:54:48 +0800] GET /site/ HTTP/1.1 200 306
  127.0.0.1 - - [18/Oct/2006:18:54:48 +0800] GET /site/Welcome.do
 HTTP/1.1
  200 1775
  (if your user testing from remote host)
  202.110.6.23 - - [18/Oct/2006:19:03:44 +0800] GET /site/Welcome.do
  HTTP/1.1 200 8893
  ...
 
  On 10/30/06, Rashmi Rubdi [EMAIL PROTECTED] wrote:
  Hello,
 
  My site is hosted on Tomcat 5.5 and I'm trying to log the IP Address of
  search engine bots that crawl the site.
 
  After reading the following documentation here, which is written very
  nicely btw
  http://tomcat.apache.org/tomcat-5.5-doc/config/valve.html
 
 
 http://tomcat.apache.org/tomcat-5.5-doc/catalina/docs/api/org/apache/catalina/valves/AccessLogValve.html
 
  I configured the pattern attribute of AccessLogValve as follows:
 
  Valve className=org.apache.catalina.valves.AccessLogValve
  directory=logs
  pattern=%a %A %h %H %u %t %r %s %b %{Referer}i %{User-Agent}i
  prefix=localhost_access_log. resolveHosts=false suffix=.txt /
 
  The following is a sample of what gets logged with the above
 configuration
  in server.xml .
 
  127.0.0.1 68.120.115.43 127.0.0.1 HTTP/1.1 - [29/Oct/2006:23:50:13
 -0800]
  GET /web/_stylesheet/table.css HTTP/1.1 304 - 
  http://www.website.com/c/a_page.jsp Mozilla/5.0 (Windows; U; Windows
 NT
  5.1; en-US; rv:1.8.0.7) Gecko/20060909 Firefox/1.5.0.7
 
  The 

Re: installing the admin on 5.5

2006-10-30 Thread Martin Gainty
Good Evening Michael-
download admin.zip from here
http://tomcat.apache.org/download-55.cgi
be sure to put commons-modeler.jar into $TOMCAT_HOME/webapps/admin/WEB-INF/lib
HTH,
M-
This e-mail communication and any attachments may contain confidential and 
privileged information for the use of the 
designated recipients named above. If you are not the intended recipient, you 
are hereby notified that you have received
this communication in error and that any review, disclosure, dissemination, 
distribution or copying of it or its 
contents
- Original Message - 
From: Michael Hencin [EMAIL PROTECTED]
To: 'Tomcat Users List' users@tomcat.apache.org
Sent: Monday, October 30, 2006 6:02 PM
Subject: installing the admin on 5.5


I am having a bear of a time installing the admin application for 5.5. I
 downloaded and unzipped the apache-tomcat-5.5.20-admin.zip, expanded the
 contents. Then using the tomcat manager application deployed the files OK.
 
 
 But when I try to access the admin app, I get this error.
 
 
 HTTP Status 503 - Servlet admin.login_jsp is currently unavailable
 
  _  
 
 
 type Status report
 
 message Servlet admin.login_jsp is currently unavailable
 
 description The requested service (Servlet admin.login_jsp is currently
 unavailable) is not currently available.
 
 
 Is there a war file for the admin application I could use? Rather then the
 directory in the zip? I ask this not only for my own ease of use, but also
 since our clients all have tomcat installed (currently 5.0.28) and I want to
 be able to tell them to upgrade up to 5.5. However since the admin app is
 not installed by default I will need to instruct them as to how to install
 the admin app. A war file would be easier, as the many users I have are not
 at all tomcat savvy.
 
 
 
 
 
 
 
 
 Michael Hencin
 
 Enginuity Development
 
 815-505-5028
 
 
 


Re: mod_jk configuration

2006-10-30 Thread Christopher Schultz
Bruno,

 Alias /jsp-examples /srv/www/tomcat5/base/webapps/jsp-examples
 JkMount /jsp-examples/*.jsp  ajp13
 JkMount /jsp-examples/j_security_check ajp13 

These three ought to do the trick. Which files aren't being served by
Apache httpd?

Can you give an example of a URI that should map successfully to a file
on the disk, but doesn't appear to do so? Can you confirm that it is
Tomcat or httpd that can't find the file?

-chris



signature.asc
Description: OpenPGP digital signature


RE: installing the admin on 5.5

2006-10-30 Thread Caldarale, Charles R
 From: Martin Gainty [mailto:[EMAIL PROTECTED] 
 Subject: Re: installing the admin on 5.5
 
 download admin.zip from here
 http://tomcat.apache.org/download-55.cgi

Martin, please pay attention to the threads.  He already did that, and
it's successfully installed.

 be sure to put commons-modeler.jar into 
 $TOMCAT_HOME/webapps/admin/WEB-INF/lib

There is absolutely no reason to do that, and you've given the wrong
location for the admin webapp.  Please stop posting irrelevant and
erroneous information.

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



Re: StandartSession.accessCount bug?

2006-10-30 Thread Mark Thomas
Michael Kantarovich wrote:
 Hi,
  
 I'm using version 5.5.12. I noticed that sometimes sessions doesn't
 expire after a session-timeout. 
  
 What do you think?

That is http://issues.apache.org/bugzilla/show_bug.cgi?id=37356

I have some ideas for a fix. It might get in to 5.5.21 if I get the
time to look at it some more.

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: Is it possible to log IP Address of requestor with custom AccessLogValve pattern?

2006-10-30 Thread Li

Hi Rashmi,

You can creater your own log handler and pack it as jar and put it under
tomcat lib dir, modify the loggin.properties file to have your handler work.

Also, you can create your own request processor or intercepter to retrieve
source ip from header and pass to logger.

Regards


On 10/31/06, Rashmi Rubdi [EMAIL PROTECTED] wrote:


I think my web site is behind a proxy, I was told that
request.getHeader(x-forwarded-for) should work instead of
request.getRemoteAddr() , and it does work when I try it.

The site correctly shows the remote client's IP Address.

I guess there's no pattern element in Access Log Valve for capturing the
x-forwarded-for.

I might have to log it with Log4J.

Sincerely
-Rashmi
- Forwarded Message 
From: Rashmi Rubdi [EMAIL PROTECTED]
To: Tomcat Users List users@tomcat.apache.org
Sent: Monday, October 30, 2006 5:03:44 PM
Subject: Re: Is it possible to log IP Address of requestor with custom
AccessLogValve pattern?


Hi Li and Pid,

Thanks again for your replies.

You are right, I also tried printing request.getRemoteAddr() in a JSP, and
it always lists 127.0.0.1

As you have suggested my site could be behind a proxy, but I don't know
this for sure. I've asked the host provider if this is the case and waiting
for a reply.

I also use Javascript based logging but that only logs requests coming
from a browser and correctly logs the IP address of the requestor however,
it does not log
search engine bots I guess because bots disable Javascript or can't work
with Javascript.

-Regards
Rashmi

- Original Message 
From: Li [EMAIL PROTECTED]
To: Tomcat Users List users@tomcat.apache.org; [EMAIL PROTECTED]
Sent: Monday, October 30, 2006 8:39:12 AM
Subject: Re: Is it possible to log IP Address of requestor with custom
AccessLogValve pattern?


Hi Rashmi,

if there is problem with retrieving correct remote IP address, log4j will
not solve problem ...

it seems like this:

remote user ---(send request) --- your proxy (or maybe you use some
connector or forwardor)  tomcat

if 127.0.0.1, seems your connector or forwardoer is located in the same
host
as your tomcat sharing same IP address or hostname

if not 127.0.0.1, seems the request comes from proxy



On 10/30/06, Pid [EMAIL PROTECTED] wrote:

 Do you have a local proxy between the tomcat instance and the requestor?



 Rashmi Rubdi wrote:
  Li,
 
  Thanks for the reply.
 
  As indicated in your illustration,  in your case the remote IP address
 (IP of the client browser) is correctly displaying.
 
  But in my case, for some reason even when my website is accessed
 remotely it always shows local IP Address (the website's IP address) and
not
 the remote IP address.
 
  In other words
  %a %A %h  is translating *always* to
  127.0.0.1
  68.120.115.43
  127.0.0.1
 
  Where 68.120.115.43  is the IP address of the website host and not the
 client (remote host).
 
  The website is hosted on a Tomcat 5.5 which is configured as a virtual
 host. I wonder if the virtual host setting might be the cause for not
 logging the actual remote IP address.
 
  If I can't get Access Log Valve to log the remote IP address then I
 might have to try it with Log4J with Commons Logging to log the remote
IP
 address I guess.
 
  -Regards
  Rashmi
 
  - Original Message 
  From: Li [EMAIL PROTECTED]
  To: Tomcat Users List users@tomcat.apache.org
  Sent: Monday, October 30, 2006 3:25:38 AM
  Subject: Re: Is it possible to log IP Address of requestor with custom
 AccessLogValve pattern?
 
 
  what you defined is correct ...  a simpler way is using default
setting
  Valve
className=org.apache.catalina.valves.AccessLogValve

directory=logs
prefix=your-site-access-log-
suffix=.log
pattern=common
resolveHosts=false/
 
  the result should be
  (if you are testing from same host)
  127.0.0.1 - - [18/Oct/2006:18:54:48 +0800] GET /site/ HTTP/1.1 200
306
  127.0.0.1 - - [18/Oct/2006:18:54:48 +0800] GET /site/Welcome.do
 HTTP/1.1
  200 1775
  (if your user testing from remote host)
  202.110.6.23 - - [18/Oct/2006:19:03:44 +0800] GET /site/Welcome.do
  HTTP/1.1 200 8893
  ...
 
  On 10/30/06, Rashmi Rubdi [EMAIL PROTECTED] wrote:
  Hello,
 
  My site is hosted on Tomcat 5.5 and I'm trying to log the IP Address
of
  search engine bots that crawl the site.
 
  After reading the following documentation here, which is written very
  nicely btw
  http://tomcat.apache.org/tomcat-5.5-doc/config/valve.html
 
 

http://tomcat.apache.org/tomcat-5.5-doc/catalina/docs/api/org/apache/catalina/valves/AccessLogValve.html
 
  I configured the pattern attribute of AccessLogValve as follows:
 
  Valve className=org.apache.catalina.valves.AccessLogValve
  directory=logs
  pattern=%a %A %h %H %u %t %r %s %b %{Referer}i %{User-Agent}i
  prefix=localhost_access_log. resolveHosts=false suffix=.txt /
 
  The following is a sample of what gets logged 

RE: Servlet Mappings

2006-10-30 Thread Caldarale, Charles R
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
 Subject: Re: Servlet Mappings
 
servlet-mapping
servlet-namedefault/servlet-name
url-pattern/images/*/url-pattern
/servlet-mapping

Thanks for the example.  With that, turning on debugging, and looking at
the code in DefaultServlet.java, I finally figured out what's going on.
Turns out the standard DefaultServlet is designed to execute only with a
path mapping of /.  It can also use extension mappings, but only those
without any prefix - which is why your *.jpg mapping worked.

The standard DefaultServlet uses HttpServletRequest.getPathInfo(), which
is defined to return only extra path information - that which is beyond
the mapping that selected the servlet.  So, with the /images/* pattern
and a URL of /test/images/test.jpg, the DefaultServlet went looking for
/test.jpg, and returned the 404 when it couldn't be found.

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



RE: JDK

2006-10-30 Thread Jim Weir

From: Caldarale, Charles R [EMAIL PROTECTED]
Reply-To: Tomcat Users List users@tomcat.apache.org
To: Tomcat Users List users@tomcat.apache.org
Subject: RE: JDK
Date: Mon, 30 Oct 2006 12:53:47 -0600

 From: Jim Weir [mailto:[EMAIL PROTECTED]
 Subject: RE: JDK

 It's 5.5.4..

That's pretty old, and a lot of fixes have gone in since then.  I'd
suggest moving up.

 How do I remove the 1.4 Compatibility Package?

In 5.5.20, the Compatibility Package adds three jars:
bin/jmx.jar
common/endorsed/xercesImpl.jar
common/endorsed/xml-apis.jar

Simply delete them and restart Tomcat.

5.5.4 may have had only the last two - I don't remember for sure.

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




Tthe jk connector has changed and it would create a lot of work for me to 
modify each webapp.


I renamed this file, common/endorsed/xml-apis.jar.  It was the oinly one 
there..


now I get this error...

Oct 30, 2006 9:39:12 PM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
Oct 30, 2006 9:39:13 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1364 ms
Oct 30, 2006 9:39:13 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Oct 30, 2006 9:39:13 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.5.4
Oct 30, 2006 9:39:13 PM org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
Oct 30, 2006 9:39:13 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive JavaBridge.war
Oct 30, 2006 9:39:13 PM org.apache.catalina.core.ApplicationContext log
INFO: default: DefaultServlet.init:  input buffer size=2048, output buffer 
size=2048

INFO - WebAppSecurityFilter.init(25) | SecurityFilter 1
Oct 30, 2006 9:39:29 PM org.apache.catalina.core.ApplicationContext log
INFO: default: DefaultServlet.init:  input buffer size=2048, output buffer 
size=2048

ERROR - Error loading WebappClassLoader
 delegate: false
 repositories:
   /WEB-INF/classes/
-- Parent Classloader:
[EMAIL PROTECTED]
org.apache.cocoon.servlet.CocoonServlet
java.lang.ClassNotFoundException: org.apache.cocoon.servlet.CocoonServlet
	at 
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1332)
	at 
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1181)
	at 
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:988)

at 
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:886)
	at 
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3817)
	at 
org.apache.catalina.core.StandardContext.start(StandardContext.java:4079)
	at 
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:755)

at 
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
	at 
org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:886)
	at 
org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:849)

at 
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:474)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1079)
	at 
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:310)
	at 
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)

at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1011)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1003)
at 
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:437)
at 
org.apache.catalina.core.StandardService.start(StandardService.java:450)
at 
org.apache.catalina.core.StandardServer.start(StandardServer.java:2010)
at org.apache.catalina.startup.Catalina.start(Catalina.java:537)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:271)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:409)
ERROR - Servlet /ourwebsite threw load() exception

Re: Is it possible to log IP Address of requestor with custom AccessLogValve pattern?

2006-10-30 Thread Rashmi Rubdi
Hi Li, 

I'm sorry I should have re-referenced the AccessLogValve documentation earlier. 

I can still get this to work with the AccessLogValve custom pattern itself by 
adding the request header in this
pattern element %{xxx}i , where xxx is the request header.

The following also worked, as shown below:

Valve className=org.apache.catalina.valves.AccessLogValve 
directory=logs 
 pattern=%{x-forwarded-for}i; %H %u %t quot;%rquot; %s %b 
quot;%{Referer}iquot; quot;%{User-Agent}iquot; 
 prefix=localhost_access_log. resolveHosts=false suffix=.txt /

May be this kind of setup will slow down the performance of the site, but I'll 
probably disable the logging after getting an initial sample of search engine 
bots.

Thanks for your suggestions and help, I will keep those in mind. I still need 
to learn Log4J and logging in general. 

But for now, this setup is sufficient.

-Regards
Rashmi


- Original Message 
From: Li [EMAIL PROTECTED]
To: Tomcat Users List users@tomcat.apache.org
Sent: Monday, October 30, 2006 9:20:50 PM
Subject: Re: Is it possible to log IP Address of requestor with custom 
AccessLogValve pattern?


Hi Rashmi,

You can creater your own log handler and pack it as jar and put it under
tomcat lib dir, modify the loggin.properties file to have your handler work.

Also, you can create your own request processor or intercepter to retrieve
source ip from header and pass to logger.

Regards


On 10/31/06, Rashmi Rubdi [EMAIL PROTECTED] wrote:

 I think my web site is behind a proxy, I was told that
 request.getHeader(x-forwarded-for) should work instead of
 request.getRemoteAddr() , and it does work when I try it.

 The site correctly shows the remote client's IP Address.

 I guess there's no pattern element in Access Log Valve for capturing the
 x-forwarded-for.

 I might have to log it with Log4J.

 Sincerely
 -Rashmi
 - Forwarded Message 
 From: Rashmi Rubdi [EMAIL PROTECTED]
 To: Tomcat Users List users@tomcat.apache.org
 Sent: Monday, October 30, 2006 5:03:44 PM
 Subject: Re: Is it possible to log IP Address of requestor with custom
 AccessLogValve pattern?


 Hi Li and Pid,

 Thanks again for your replies.

 You are right, I also tried printing request.getRemoteAddr() in a JSP, and
 it always lists 127.0.0.1

 As you have suggested my site could be behind a proxy, but I don't know
 this for sure. I've asked the host provider if this is the case and waiting
 for a reply.

 I also use Javascript based logging but that only logs requests coming
 from a browser and correctly logs the IP address of the requestor however,
 it does not log
 search engine bots I guess because bots disable Javascript or can't work
 with Javascript.

 -Regards
 Rashmi

 - Original Message 
 From: Li [EMAIL PROTECTED]
 To: Tomcat Users List users@tomcat.apache.org; [EMAIL PROTECTED]
 Sent: Monday, October 30, 2006 8:39:12 AM
 Subject: Re: Is it possible to log IP Address of requestor with custom
 AccessLogValve pattern?


 Hi Rashmi,

 if there is problem with retrieving correct remote IP address, log4j will
 not solve problem ...

 it seems like this:

 remote user ---(send request) --- your proxy (or maybe you use some
 connector or forwardor)  tomcat

 if 127.0.0.1, seems your connector or forwardoer is located in the same
 host
 as your tomcat sharing same IP address or hostname

 if not 127.0.0.1, seems the request comes from proxy



 On 10/30/06, Pid [EMAIL PROTECTED] wrote:
 
  Do you have a local proxy between the tomcat instance and the requestor?
 
 
 
  Rashmi Rubdi wrote:
   Li,
  
   Thanks for the reply.
  
   As indicated in your illustration,  in your case the remote IP address
  (IP of the client browser) is correctly displaying.
  
   But in my case, for some reason even when my website is accessed
  remotely it always shows local IP Address (the website's IP address) and
 not
  the remote IP address.
  
   In other words
   %a %A %h  is translating *always* to
   127.0.0.1
   68.120.115.43
   127.0.0.1
  
   Where 68.120.115.43  is the IP address of the website host and not the
  client (remote host).
  
   The website is hosted on a Tomcat 5.5 which is configured as a virtual
  host. I wonder if the virtual host setting might be the cause for not
  logging the actual remote IP address.
  
   If I can't get Access Log Valve to log the remote IP address then I
  might have to try it with Log4J with Commons Logging to log the remote
 IP
  address I guess.
  
   -Regards
   Rashmi
  
   - Original Message 
   From: Li [EMAIL PROTECTED]
   To: Tomcat Users List users@tomcat.apache.org
   Sent: Monday, October 30, 2006 3:25:38 AM
   Subject: Re: Is it possible to log IP Address of requestor with custom
  AccessLogValve pattern?
  
  
   what you defined is correct ...  a simpler way is using default
 setting
   Valve
 className=org.apache.catalina.valves.AccessLogValve
 
 directory=logs
 

Re: Servlet Mappings

2006-10-30 Thread Bill Barker

ben short [EMAIL PROTECTED] wrote in message 
news:[EMAIL PROTECTED]
I just tried changing the /images/* to *.jpg and it works


Yes, Tomcat's default servlet won't work with a prefix map.  It requires 
either a suffex map, or a default map.

 On 10/30/06, ben short [EMAIL PROTECTED] wrote:
 Charles,

 Im deploying a war file. Im also using spring. I havent touched the
 web.xml. I have litrally downloaded and un tared the file from the
 apache tomcat website.

 Here is the layout of the test app;lication i have setup to try it out.

 test
 - images
   - test.jpg
 - WEB-INF
   - web.xml
   - test-servlet.xml
   - jsp
 - test.jsp
   - lib
 - various jars
   - tld
 - c-1.1.2.tld
 - fmt-1.1.2.tld

 test.jsp

 %@ page contentType=text/html;charset=UTF-8 language=java %
 html
   headtitleSimple jsp page/title/head
   bodyimg src=images/test.jpg alt= //body
 /html

 web.xml

 !DOCTYPE web-app PUBLIC
  -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN
  http://java.sun.com/dtd/web-app_2_3.dtd; 

 web-app
   display-nameArchetype Created Web Application/display-name

 servlet
 servlet-nametest/servlet-name
 
 servlet-classorg.springframework.web.servlet.DispatcherServlet/servlet-class
 load-on-startup1/load-on-startup
 /servlet

servlet-mapping
servlet-namedefault/servlet-name
url-pattern/images/*/url-pattern
/servlet-mapping

 servlet-mapping
servlet-nametest/servlet-name
url-pattern//url-pattern
/servlet-mapping

 /web-app

 test-servlet.xml

 ?xml version=1.0 encoding=UTF-8?
 !DOCTYPE beans PUBLIC -//SPRING//DTD BEAN//EN
 http://www.springframework.org/dtd/spring-beans.dtd;
 beans

 bean id=testController
 class=org.springframework.web.servlet.mvc.ParameterizableViewController
 property name=viewName value=test/
 /bean

bean id=urlMapping
 class=org.springframework.web.servlet.handler.SimpleUrlHandlerMapping
property name=mappings
props
prop key=/test.htmltestController/prop
 /props
/property
/bean

bean id=viewResolver
 class=org.springframework.web.servlet.view.InternalResourceViewResolver
property name=prefix
value/WEB-INF/jsp//value
/property
property name=suffix
value.jsp/value
/property
property name=viewClass
 
 valueorg.springframework.web.servlet.view.JstlView/value
/property
/bean


 /beans








 On 10/30/06, Caldarale, Charles R [EMAIL PROTECTED] wrote:
   From: Caldarale, Charles R [mailto:[EMAIL PROTECTED]
   Subject: RE: Servlet Mappings
  
   What's the directory structure under ROOT?  Is ROOT under
   your Host's appBase?  For that matter, what's the
   directory structure under appBase?
 
  Should have mentioned that your images directory should be under ROOT,
  not appBase.  If it's under appBase, images is being deployed as a
  separate webapp, which is probably not your intent.
 
   - 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]
 
 


 -
 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: StandartSession.accessCount bug?

2006-10-30 Thread Christopher Schultz
Mark,

Mark Thomas wrote:
 Michael Kantarovich wrote:
 Hi,
  
 I'm using version 5.5.12. I noticed that sometimes sessions doesn't
 expire after a session-timeout. 
  
 What do you think?
 
 That is http://issues.apache.org/bugzilla/show_bug.cgi?id=37356

Wow. Some real yelling and screaming going on in that bug.

Can someone explain why unsynchronized data + threaded access !=
non-threadsafe code?

It doesn't take a genius to see that the accessCount variable there is
not threadsafe. And since Tomcat ought to be implemented such that
multiple threads can run successfully... WTF??!

I'm not sure what source of the bitter animosity towards synchronization
is in this case. Synchronization isn't a dirty word, especially when it
actually makes things work properly :(

-chris



signature.asc
Description: OpenPGP digital signature


Re: Is it possible to log IP Address of requestor with custom AccessLogValve pattern?

2006-10-30 Thread Li

Hi Rashmi,

Thank you for sharing.

Have a nice day.

Li

On 10/31/06, Rashmi Rubdi [EMAIL PROTECTED] wrote:


Hi Li,

I'm sorry I should have re-referenced the AccessLogValve documentation
earlier.

I can still get this to work with the AccessLogValve custom pattern itself
by adding the request header in this
pattern element %{xxx}i , where xxx is the request header.

The following also worked, as shown below:

Valve className=org.apache.catalina.valves.AccessLogValve
directory=logs
pattern=%{x-forwarded-for}i; %H %u %t %r %s %b %{Referer}i
%{User-Agent}i
prefix=localhost_access_log. resolveHosts=false suffix=.txt /

May be this kind of setup will slow down the performance of the site, but
I'll probably disable the logging after getting an initial sample of search
engine bots.

Thanks for your suggestions and help, I will keep those in mind. I still
need to learn Log4J and logging in general.

But for now, this setup is sufficient.

-Regards
Rashmi


- Original Message 
From: Li [EMAIL PROTECTED]
To: Tomcat Users List users@tomcat.apache.org
Sent: Monday, October 30, 2006 9:20:50 PM
Subject: Re: Is it possible to log IP Address of requestor with custom
AccessLogValve pattern?


Hi Rashmi,

You can creater your own log handler and pack it as jar and put it under
tomcat lib dir, modify the loggin.properties file to have your handler
work.

Also, you can create your own request processor or intercepter to retrieve
source ip from header and pass to logger.

Regards


On 10/31/06, Rashmi Rubdi [EMAIL PROTECTED] wrote:

 I think my web site is behind a proxy, I was told that
 request.getHeader(x-forwarded-for) should work instead of
 request.getRemoteAddr() , and it does work when I try it.

 The site correctly shows the remote client's IP Address.

 I guess there's no pattern element in Access Log Valve for capturing the
 x-forwarded-for.

 I might have to log it with Log4J.

 Sincerely
 -Rashmi
 - Forwarded Message 
 From: Rashmi Rubdi [EMAIL PROTECTED]
 To: Tomcat Users List users@tomcat.apache.org
 Sent: Monday, October 30, 2006 5:03:44 PM
 Subject: Re: Is it possible to log IP Address of requestor with custom
 AccessLogValve pattern?


 Hi Li and Pid,

 Thanks again for your replies.

 You are right, I also tried printing request.getRemoteAddr() in a JSP,
and
 it always lists 127.0.0.1

 As you have suggested my site could be behind a proxy, but I don't know
 this for sure. I've asked the host provider if this is the case and
waiting
 for a reply.

 I also use Javascript based logging but that only logs requests coming
 from a browser and correctly logs the IP address of the requestor
however,
 it does not log
 search engine bots I guess because bots disable Javascript or can't work
 with Javascript.

 -Regards
 Rashmi

 - Original Message 
 From: Li [EMAIL PROTECTED]
 To: Tomcat Users List users@tomcat.apache.org; [EMAIL PROTECTED]
 Sent: Monday, October 30, 2006 8:39:12 AM
 Subject: Re: Is it possible to log IP Address of requestor with custom
 AccessLogValve pattern?


 Hi Rashmi,

 if there is problem with retrieving correct remote IP address, log4j
will
 not solve problem ...

 it seems like this:

 remote user ---(send request) --- your proxy (or maybe you use some
 connector or forwardor)  tomcat

 if 127.0.0.1, seems your connector or forwardoer is located in the same
 host
 as your tomcat sharing same IP address or hostname

 if not 127.0.0.1, seems the request comes from proxy



 On 10/30/06, Pid [EMAIL PROTECTED] wrote:
 
  Do you have a local proxy between the tomcat instance and the
requestor?
 
 
 
  Rashmi Rubdi wrote:
   Li,
  
   Thanks for the reply.
  
   As indicated in your illustration,  in your case the remote IP
address
  (IP of the client browser) is correctly displaying.
  
   But in my case, for some reason even when my website is accessed
  remotely it always shows local IP Address (the website's IP address)
and
 not
  the remote IP address.
  
   In other words
   %a %A %h  is translating *always* to
   127.0.0.1
   68.120.115.43
   127.0.0.1
  
   Where 68.120.115.43  is the IP address of the website host and not
the
  client (remote host).
  
   The website is hosted on a Tomcat 5.5 which is configured as a
virtual
  host. I wonder if the virtual host setting might be the cause for not
  logging the actual remote IP address.
  
   If I can't get Access Log Valve to log the remote IP address then I
  might have to try it with Log4J with Commons Logging to log the remote
 IP
  address I guess.
  
   -Regards
   Rashmi
  
   - Original Message 
   From: Li [EMAIL PROTECTED]
   To: Tomcat Users List users@tomcat.apache.org
   Sent: Monday, October 30, 2006 3:25:38 AM
   Subject: Re: Is it possible to log IP Address of requestor with
custom
  AccessLogValve pattern?
  
  
   what you defined is correct ...  a simpler way is using default
 setting
   Valve
 className=
org.apache.catalina.valves.AccessLogValve
 
 

Re: StandartSession.accessCount bug?

2006-10-30 Thread Mark Thomas
Christopher Schultz wrote:
 Can someone explain why unsynchronized data + threaded access !=
 non-threadsafe code?
 
 It doesn't take a genius to see that the accessCount variable there is
 not threadsafe. And since Tomcat ought to be implemented such that
 multiple threads can run successfully... WTF??!
 
 I'm not sure what source of the bitter animosity towards synchronization
 is in this case. Synchronization isn't a dirty word, especially when it
 actually makes things work properly :(

The problem is adding the sync hammers performance to the tune of
about 50ms for every request (at least in my system - YMMV). The other
part of this is that accessCount is there to support a reasonably rare
use case where a single request can last longer than the session timeout.

Currently, I am in favour of adding the syncs but making the use of
accessCount (and hence the syncs) optional with the default set to not
use accessCount. Those that need this feature but don't want the
performance hit of syncs are then free to implement their own solution
within their application specific to their circumstances.

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: Is it possible to log IP Address of requestor with custom AccessLogValve pattern?

2006-10-30 Thread Li

Hi Rashmi,

What you use is ok, but it wont work for every case, in case of no proxy
used, %{x-forwarded-for}i; may not work ...

Regards

On 10/31/06, Li [EMAIL PROTECTED] wrote:


Hi Rashmi,

Thank you for sharing.

Have a nice day.

Li

On 10/31/06, Rashmi Rubdi [EMAIL PROTECTED]  wrote:

 Hi Li,

 I'm sorry I should have re-referenced the AccessLogValve documentation
 earlier.

 I can still get this to work with the AccessLogValve custom pattern
 itself by adding the request header in this
 pattern element %{xxx}i , where xxx is the request header.

 The following also worked, as shown below:

 Valve className=org.apache.catalina.valves.AccessLogValve
 directory=logs
 pattern=%{x-forwarded-for}i; %H %u %t %r %s %b %{Referer}i
 %{User-Agent}i
 prefix=localhost_access_log. resolveHosts=false suffix=.txt /

 May be this kind of setup will slow down the performance of the site,
 but I'll probably disable the logging after getting an initial sample of
 search engine bots.

 Thanks for your suggestions and help, I will keep those in mind. I still
 need to learn Log4J and logging in general.

 But for now, this setup is sufficient.

 -Regards
 Rashmi


 - Original Message 
 From: Li [EMAIL PROTECTED]
 To: Tomcat Users List users@tomcat.apache.org
 Sent: Monday, October 30, 2006 9:20:50 PM
 Subject: Re: Is it possible to log IP Address of requestor with custom
 AccessLogValve pattern?


 Hi Rashmi,

 You can creater your own log handler and pack it as jar and put it under
 tomcat lib dir, modify the loggin.properties file to have your handler
 work.

 Also, you can create your own request processor or intercepter to
 retrieve
 source ip from header and pass to logger.

 Regards


 On 10/31/06, Rashmi Rubdi  [EMAIL PROTECTED] wrote:
 
  I think my web site is behind a proxy, I was told that
  request.getHeader(x-forwarded-for) should work instead of
  request.getRemoteAddr() , and it does work when I try it.
 
  The site correctly shows the remote client's IP Address.
 
  I guess there's no pattern element in Access Log Valve for capturing
 the
  x-forwarded-for.
 
  I might have to log it with Log4J.
 
  Sincerely
  -Rashmi
  - Forwarded Message 
  From: Rashmi Rubdi  [EMAIL PROTECTED]
  To: Tomcat Users List users@tomcat.apache.org
  Sent: Monday, October 30, 2006 5:03:44 PM
  Subject: Re: Is it possible to log IP Address of requestor with custom

  AccessLogValve pattern?
 
 
  Hi Li and Pid,
 
  Thanks again for your replies.
 
  You are right, I also tried printing request.getRemoteAddr() in a JSP,
 and
  it always lists 127.0.0.1
 
  As you have suggested my site could be behind a proxy, but I don't
 know
  this for sure. I've asked the host provider if this is the case and
 waiting
  for a reply.
 
  I also use Javascript based logging but that only logs requests coming
  from a browser and correctly logs the IP address of the requestor
 however,
  it does not log
  search engine bots I guess because bots disable Javascript or can't
 work
  with Javascript.
 
  -Regards
  Rashmi
 
  - Original Message 
  From: Li [EMAIL PROTECTED]
  To: Tomcat Users List  users@tomcat.apache.org; [EMAIL PROTECTED]
  Sent: Monday, October 30, 2006 8:39:12 AM
  Subject: Re: Is it possible to log IP Address of requestor with custom

  AccessLogValve pattern?
 
 
  Hi Rashmi,
 
  if there is problem with retrieving correct remote IP address, log4j
 will
  not solve problem ...
 
  it seems like this:
 
  remote user ---(send request) --- your proxy (or maybe you use some
  connector or forwardor)  tomcat
 
  if 127.0.0.1, seems your connector or forwardoer is located in the
 same
  host
  as your tomcat sharing same IP address or hostname
 
  if not 127.0.0.1, seems the request comes from proxy
 
 
 
  On 10/30/06, Pid  [EMAIL PROTECTED] wrote:
  
   Do you have a local proxy between the tomcat instance and the
 requestor?
  
  
  
   Rashmi Rubdi wrote:
Li,
   
Thanks for the reply.
   
As indicated in your illustration,  in your case the remote IP
 address
   (IP of the client browser) is correctly displaying.
   
But in my case, for some reason even when my website is accessed
   remotely it always shows local IP Address (the website's IP address)
 and
  not
   the remote IP address.
   
In other words
%a %A %h  is translating *always* to
127.0.0.1
68.120.115.43
127.0.0.1
   
Where 68.120.115.43  is the IP address of the website host and not
 the
   client (remote host).
   
The website is hosted on a Tomcat 5.5 which is configured as a
 virtual
   host. I wonder if the virtual host setting might be the cause for
 not
   logging the actual remote IP address.
   
If I can't get Access Log Valve to log the remote IP address then
 I
   might have to try it with Log4J with Commons Logging to log the
 remote
  IP
   address I guess.
   
-Regards
Rashmi
   
- Original Message 
From: Li [EMAIL PROTECTED] 
To: Tomcat 

Re: Is it possible to log IP Address of requestor with custom AccessLogValve pattern?

2006-10-30 Thread Rashmi Rubdi
Hi Li, 

In my case my *website* itself is behind a proxy, that's why no matter who 
(remote or local) made the request it always shows the local IP 127.0.0.1, I 
have no choice but to use 
the x-forwarded-for header. As long as the site is behind a proxy I'll have to 
settle with x-forwarded-for . If my host provider removes the proxy then only I 
can use %a and %h.

But in your case your *website* is not behind a proxy, that's why 
%{x-forwarded-for}i doesn't work for you , I think. So in your case simply 
using %a and/or %h is sufficient.

I think %{x-forwarded-for}i  could also be used to capture the IP Address of a 
*client* that's behind a proxy, but I haven't tested this.

-Regards
Rashmi

- Original Message 
From: Li [EMAIL PROTECTED]
To: Tomcat Users List users@tomcat.apache.org
Sent: Monday, October 30, 2006 11:23:34 PM
Subject: Re: Is it possible to log IP Address of requestor with custom 
AccessLogValve pattern?


Hi Rashmi,

What you use is ok, but it wont work for every case, in case of no proxy
used, %{x-forwarded-for}i; may not work ...

Regards

On 10/31/06, Li [EMAIL PROTECTED] wrote:

 Hi Rashmi,

 Thank you for sharing.

 Have a nice day.

 Li

 On 10/31/06, Rashmi Rubdi [EMAIL PROTECTED]  wrote:
 
  Hi Li,
 
  I'm sorry I should have re-referenced the AccessLogValve documentation
  earlier.
 
  I can still get this to work with the AccessLogValve custom pattern
  itself by adding the request header in this
  pattern element %{xxx}i , where xxx is the request header.
 
  The following also worked, as shown below:
 
  Valve className=org.apache.catalina.valves.AccessLogValve
  directory=logs
  pattern=%{x-forwarded-for}i; %H %u %t %r %s %b %{Referer}i
  %{User-Agent}i
  prefix=localhost_access_log. resolveHosts=false suffix=.txt /
 
  May be this kind of setup will slow down the performance of the site,
  but I'll probably disable the logging after getting an initial sample of
  search engine bots.
 
  Thanks for your suggestions and help, I will keep those in mind. I still
  need to learn Log4J and logging in general.
 
  But for now, this setup is sufficient.
 
  -Regards
  Rashmi
 
 
  - Original Message 
  From: Li [EMAIL PROTECTED]
  To: Tomcat Users List users@tomcat.apache.org
  Sent: Monday, October 30, 2006 9:20:50 PM
  Subject: Re: Is it possible to log IP Address of requestor with custom
  AccessLogValve pattern?
 
 
  Hi Rashmi,
 
  You can creater your own log handler and pack it as jar and put it under
  tomcat lib dir, modify the loggin.properties file to have your handler
  work.
 
  Also, you can create your own request processor or intercepter to
  retrieve
  source ip from header and pass to logger.
 
  Regards
 
 
  On 10/31/06, Rashmi Rubdi  [EMAIL PROTECTED] wrote:
  
   I think my web site is behind a proxy, I was told that
   request.getHeader(x-forwarded-for) should work instead of
   request.getRemoteAddr() , and it does work when I try it.
  
   The site correctly shows the remote client's IP Address.
  
   I guess there's no pattern element in Access Log Valve for capturing
  the
   x-forwarded-for.
  
   I might have to log it with Log4J.
  
   Sincerely
   -Rashmi
   - Forwarded Message 
   From: Rashmi Rubdi  [EMAIL PROTECTED]
   To: Tomcat Users List users@tomcat.apache.org
   Sent: Monday, October 30, 2006 5:03:44 PM
   Subject: Re: Is it possible to log IP Address of requestor with custom
 
   AccessLogValve pattern?
  
  
   Hi Li and Pid,
  
   Thanks again for your replies.
  
   You are right, I also tried printing request.getRemoteAddr() in a JSP,
  and
   it always lists 127.0.0.1
  
   As you have suggested my site could be behind a proxy, but I don't
  know
   this for sure. I've asked the host provider if this is the case and
  waiting
   for a reply.
  
   I also use Javascript based logging but that only logs requests coming
   from a browser and correctly logs the IP address of the requestor
  however,
   it does not log
   search engine bots I guess because bots disable Javascript or can't
  work
   with Javascript.
  
   -Regards
   Rashmi
  
   - Original Message 
   From: Li [EMAIL PROTECTED]
   To: Tomcat Users List  users@tomcat.apache.org; [EMAIL PROTECTED]
   Sent: Monday, October 30, 2006 8:39:12 AM
   Subject: Re: Is it possible to log IP Address of requestor with custom
 
   AccessLogValve pattern?
  
  
   Hi Rashmi,
  
   if there is problem with retrieving correct remote IP address, log4j
  will
   not solve problem ...
  
   it seems like this:
  
   remote user ---(send request) --- your proxy (or maybe you use some
   connector or forwardor)  tomcat
  
   if 127.0.0.1, seems your connector or forwardoer is located in the
  same
   host
   as your tomcat sharing same IP address or hostname
  
   if not 127.0.0.1, seems the request comes from proxy
  
  
  
   On 10/30/06, Pid  [EMAIL PROTECTED] wrote:
   
Do you have a local proxy between the tomcat instance and the
  requestor?

Re: Is it possible to log IP Address of requestor with custom AccessLogValve pattern?

2006-10-30 Thread Li

Hi,

I am using my own log handler which is application server independent. the
pattern you use for dealing with proxy is ok, in some case, we try to find
an approach to be adaptive for both cases that with or without proxy. It's
good to hear that you solve your problem.

Li

On 10/31/06, Rashmi Rubdi [EMAIL PROTECTED] wrote:


Hi Li,

In my case my *website* itself is behind a proxy, that's why no matter who
(remote or local) made the request it always shows the local IP 127.0.0.1,
I have no choice but to use
the x-forwarded-for header. As long as the site is behind a proxy I'll
have to settle with x-forwarded-for . If my host provider removes the proxy
then only I can use %a and %h.

But in your case your *website* is not behind a proxy, that's why
%{x-forwarded-for}i doesn't work for you , I think. So in your case simply
using %a and/or %h is sufficient.

I think %{x-forwarded-for}i  could also be used to capture the IP Address
of a *client* that's behind a proxy, but I haven't tested this.

-Regards
Rashmi

- Original Message 
From: Li [EMAIL PROTECTED]
To: Tomcat Users List users@tomcat.apache.org
Sent: Monday, October 30, 2006 11:23:34 PM
Subject: Re: Is it possible to log IP Address of requestor with custom
AccessLogValve pattern?


Hi Rashmi,

What you use is ok, but it wont work for every case, in case of no proxy
used, %{x-forwarded-for}i; may not work ...

Regards

On 10/31/06, Li [EMAIL PROTECTED] wrote:

 Hi Rashmi,

 Thank you for sharing.

 Have a nice day.

 Li

 On 10/31/06, Rashmi Rubdi [EMAIL PROTECTED]  wrote:
 
  Hi Li,
 
  I'm sorry I should have re-referenced the AccessLogValve documentation
  earlier.
 
  I can still get this to work with the AccessLogValve custom pattern
  itself by adding the request header in this
  pattern element %{xxx}i , where xxx is the request header.
 
  The following also worked, as shown below:
 
  Valve className=org.apache.catalina.valves.AccessLogValve
  directory=logs
  pattern=%{x-forwarded-for}i; %H %u %t %r %s %b %{Referer}i
  %{User-Agent}i
  prefix=localhost_access_log. resolveHosts=false suffix=.txt /
 
  May be this kind of setup will slow down the performance of the site,
  but I'll probably disable the logging after getting an initial sample
of
  search engine bots.
 
  Thanks for your suggestions and help, I will keep those in mind. I
still
  need to learn Log4J and logging in general.
 
  But for now, this setup is sufficient.
 
  -Regards
  Rashmi
 
 
  - Original Message 
  From: Li [EMAIL PROTECTED]
  To: Tomcat Users List users@tomcat.apache.org
  Sent: Monday, October 30, 2006 9:20:50 PM
  Subject: Re: Is it possible to log IP Address of requestor with custom
  AccessLogValve pattern?
 
 
  Hi Rashmi,
 
  You can creater your own log handler and pack it as jar and put it
under
  tomcat lib dir, modify the loggin.properties file to have your handler
  work.
 
  Also, you can create your own request processor or intercepter to
  retrieve
  source ip from header and pass to logger.
 
  Regards
 
 
  On 10/31/06, Rashmi Rubdi  [EMAIL PROTECTED] wrote:
  
   I think my web site is behind a proxy, I was told that
   request.getHeader(x-forwarded-for) should work instead of
   request.getRemoteAddr() , and it does work when I try it.
  
   The site correctly shows the remote client's IP Address.
  
   I guess there's no pattern element in Access Log Valve for capturing
  the
   x-forwarded-for.
  
   I might have to log it with Log4J.
  
   Sincerely
   -Rashmi
   - Forwarded Message 
   From: Rashmi Rubdi  [EMAIL PROTECTED]
   To: Tomcat Users List users@tomcat.apache.org
   Sent: Monday, October 30, 2006 5:03:44 PM
   Subject: Re: Is it possible to log IP Address of requestor with
custom
 
   AccessLogValve pattern?
  
  
   Hi Li and Pid,
  
   Thanks again for your replies.
  
   You are right, I also tried printing request.getRemoteAddr() in a
JSP,
  and
   it always lists 127.0.0.1
  
   As you have suggested my site could be behind a proxy, but I don't
  know
   this for sure. I've asked the host provider if this is the case and
  waiting
   for a reply.
  
   I also use Javascript based logging but that only logs requests
coming
   from a browser and correctly logs the IP address of the requestor
  however,
   it does not log
   search engine bots I guess because bots disable Javascript or can't
  work
   with Javascript.
  
   -Regards
   Rashmi
  
   - Original Message 
   From: Li [EMAIL PROTECTED]
   To: Tomcat Users List  users@tomcat.apache.org; [EMAIL PROTECTED]
   Sent: Monday, October 30, 2006 8:39:12 AM
   Subject: Re: Is it possible to log IP Address of requestor with
custom
 
   AccessLogValve pattern?
  
  
   Hi Rashmi,
  
   if there is problem with retrieving correct remote IP address, log4j
  will
   not solve problem ...
  
   it seems like this:
  
   remote user ---(send request) --- your proxy (or maybe you use some
   connector or forwardor)  tomcat
  
   if 

Re: StandartSession.accessCount bug?

2006-10-30 Thread Mark Thomas
Christopher Schultz wrote:
 I posted a comment on that bug that points out that you didn't provide
 context for your numbers. Was that +50ms timing taken when you were
 using a single thread, or multiple threads? Contended locks are much
 slower, so it's important to know.
It was contended. I have added the uncontended figures: 75ns and 225ns.

 If the overhead of synchronization is +50ms for busy sessions, but
 lower for mostly idle sessions, then the fix is much more acceptable. I
 just prefer that people actually do benchmarks instead of crying about
 what they think might happen.
150ns per request (on my hardware) is still probably more than we want
to add to every request.

 Are Tomcat sessions pluggable? Meaning, can you swap-out the
 implementation of the
 SessionManager/StandardSession/StandardSessionFacade classes using a
 system property or other config option? If so, then this is a
 no-brainer: ship Tomcat with the current implementation (minus the
 accessCount) as the default. Then, provide an implementation /with/
 accessCount, and with sync'd accessCount. They could all extend each
 other so there wouldn't be a bunch of duplicated code.
That would work. However (and this is just my view) making it an
optional feature of the standard implementation would be less work,
easier to maintain and less prone to user configuration error.

 For me, it's not about performance. It's about things working properly.
 I realize that performance matters when you're dealing with billions of
 requests per hour, but if you really are serving that many requests per
 hour, you're going to get fux0rd by this bug anyway. It just needs to
 get fixed.
I agree it needs to be fixed. As do the other 180 odd currently open
bugs ;) Performance is something that does get a fair amount of
attention from the Tomcat committers and the fix for this needs to
keep that in mind.  From my perspective this is a feature/performance
trade-off where we can provide a configuration option for users to
make their own decision.

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: JDK

2006-10-30 Thread Caldarale, Charles R
 From: Jim Weir [mailto:[EMAIL PROTECTED] 
 Subject: RE: JDK
 
 Tthe jk connector has changed and it would create a lot of 
 work for me to modify each webapp.

I'm confused; although I don't use the AJP connector, I wasn't aware of
any incompatible changes in it between 5.5.4 and 5.5.20, especially any
that would require modifying webapps.  If you're talking about mod_jk,
that's not part of Tomcat proper, and I thought Tomcat was compatible
with any version of JK 1.2.  What am I missing?

 I renamed this file, common/endorsed/xml-apis.jar.  It 
 was the oinly one there..

By renaming, I presume you changed the extension to something other than
.jar; if it's still .jar, it can still be found by the classloader.

 now I get this error...
 
 java.lang.ClassNotFoundException: 
 org.apache.cocoon.servlet.CocoonServlet

Cocoon is also not part of Tomcat or the JRE/JDK; any Cocoon jars needed
would normally be packaged with the webapp they were required by.

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



RE: StandartSession.accessCount bug?

2006-10-30 Thread Michael Kantarovich
Thanks!



From: Mark Thomas [mailto:[EMAIL PROTECTED]
Sent: Tue 10/31/2006 3:22 AM
To: Tomcat Users List
Subject: Re: StandartSession.accessCount bug?



Michael Kantarovich wrote:
 Hi,
 
 I'm using version 5.5.12. I noticed that sometimes sessions doesn't
 expire after a session-timeout.
 
 What do you think?

That is http://issues.apache.org/bugzilla/show_bug.cgi?id=37356

I have some ideas for a fix. It might get in to 5.5.21 if I get the
time to look at it some more.

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]

RE: StandartSession.accessCount bug?

2006-10-30 Thread Michael Kantarovich
Guys, 
 
Did you consider to use java.util.concurrent.atomic.AtomicLong ?



From: Mark Thomas [mailto:[EMAIL PROTECTED]
Sent: Tue 10/31/2006 7:13 AM
To: Tomcat Users List
Subject: Re: StandartSession.accessCount bug?



Christopher Schultz wrote:
 I posted a comment on that bug that points out that you didn't provide
 context for your numbers. Was that +50ms timing taken when you were
 using a single thread, or multiple threads? Contended locks are much
 slower, so it's important to know.
It was contended. I have added the uncontended figures: 75ns and 225ns.

 If the overhead of synchronization is +50ms for busy sessions, but
 lower for mostly idle sessions, then the fix is much more acceptable. I
 just prefer that people actually do benchmarks instead of crying about
 what they think might happen.
150ns per request (on my hardware) is still probably more than we want
to add to every request.

 Are Tomcat sessions pluggable? Meaning, can you swap-out the
 implementation of the
 SessionManager/StandardSession/StandardSessionFacade classes using a
 system property or other config option? If so, then this is a
 no-brainer: ship Tomcat with the current implementation (minus the
 accessCount) as the default. Then, provide an implementation /with/
 accessCount, and with sync'd accessCount. They could all extend each
 other so there wouldn't be a bunch of duplicated code.
That would work. However (and this is just my view) making it an
optional feature of the standard implementation would be less work,
easier to maintain and less prone to user configuration error.

 For me, it's not about performance. It's about things working properly.
 I realize that performance matters when you're dealing with billions of
 requests per hour, but if you really are serving that many requests per
 hour, you're going to get fux0rd by this bug anyway. It just needs to
 get fixed.
I agree it needs to be fixed. As do the other 180 odd currently open
bugs ;) Performance is something that does get a fair amount of
attention from the Tomcat committers and the fix for this needs to
keep that in mind.  From my perspective this is a feature/performance
trade-off where we can provide a configuration option for users to
make their own decision.

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]

RE: Two apps with different hosts?

2006-10-30 Thread Per Johnsson
Hi!

I may be missinformed but I was told there may be issues with the
loading of the shared libs if using pluto (jsr-168) if the appbase was
outside the webapps directory and there could be other issues as well.


/Per Jonsson

-Original Message-
From: Christopher Schultz [mailto:[EMAIL PROTECTED] 
Sent: den 30 oktober 2006 15:16
To: Tomcat Users List
Subject: Re: Two apps with different hosts?

Per,

 So if we want to have more applications inside webapps and with 
 different hosts we get several instances, so our only solution was to 
 use a dummy appBase for one of the applications and point out the off 
 the apps directly (which if I'm not misinformed can have behavior on 
 the libs in the shared directory).
  
 Is there a smother way of doing this? It does feel a little bit 
 awkward to do as below.

Why not simply keep your webapps for one host in one directory, and
those for the other in a separate directory. Then, set the appBase
attribute as appropriate for each host (note changes):

 Host name=www.mysite.com
 appBase=webapps unpackWARs=false autoDeploy=false
 xmlValidation=false xmlNamespaceAware=false /Host
  
 Host name=preview.mysite.com appBase=webapps-preview
unpackWARs=false
 autoDeploy=false xmlValidation=false xmlNamespaceAware=false 
 /Host

-chris



This e-mail and the information it contains may be privileged and/or
confidential.  It is for the intended addressee(s) only.
The unauthorised use, disclosure or copying of this e-mail, or any information 
it contains, is prohibited. 
If you are not an intended recipient, please contact the sender and delete the 
material from your computer.




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



Tomcat 6 and shared/lib, common/ and conf/catalina/localhost?

2006-10-30 Thread Per Johnsson
I downloaded Tomcat 6 (the alpha I presume) the zipped version and I I
noticed there was no directory for shared/lib, common/ and no
conf/Catalina. I Googled and read the doc and got no clue if there is
some changes in the lib structure which you should be aware of.
 
Is the conf/Catalina created when first run and depending on the
server.xml?
 
/Regards Per Jonsson


This e-mail and the information it contains may be privileged and/or
confidential.  It is for the intended addressee(s) only.
The unauthorised use, disclosure or copying of this e-mail, or any information 
it contains, is prohibited. 
If you are not an intended recipient, please contact the sender and delete the 
material from your computer.