Re: directory issues using Tomcat 4.0.2 and Apache 1.3.23 with mod_webapp

2002-03-06 Thread Peter Johnson

I followed the site below and all works ok. Basically it describes some simple changes 
to
be made in server.xml

http://dcb.sun.com/practices/howtos/tomcat_apache.jsp

Peter

> Set up these as per this URL, JSP will be functional but no gifs in  examples:
> http://www.webmasterbase.com/article.php?pid=44&aid=305
>
> Then go to
>
> http:///examples/jsp/index.html
>
> Images don't serve from Apache nor from Tomcat.
>
> Apache thinks it should serve them from DocumentRoot/examples.
>
> Using Apache "Alias" and "Redirect" also fails.
>
> Oddly enough, you can successfully browse
> http:///examples/images, manually select each image  file, it
> displays properly, then go back to the jsp with the gifs and all is  well for the
> moment.
>
> I've spent a lot of time digging and
> trying things with no success.  Any help would be appreciated.
>
> Is Tomcat and Apache incompatible (if someone wants to step out, get crazy  and
> actually have graphics in a web page)?
>
> Thanks
>
> _
> MSN Photos is the easiest way to share and print your photos:
> http://photos.msn.com/support/worldwide.aspx
>
>
> --
> To unsubscribe:    For additional
> commands:  Troubles with the list:
> 



-
This email was sent using SquirrelMail.
   "Webmail for nuts!"
http://squirrelmail.org/



--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




Re: jar's include ...

2002-03-08 Thread Peter Johnson

I just downloaded the .tar.gz binary and copied them across  works fine 
although I understand that SendMailServlet must be downloaded and compiled 
separately due to some problem with the build scripts.

Peter

On 00:01 09-03-2002 Julien OIX wrote:
> 
> 
>  hi everyone,
> 
>  I'm using these RPM's on a Linux RedHat 7.1
> 
>  apache-1.3.22-1.7.1 (with mod_throttle-3.1.2-3 mod_put-1.3-2
>  mod_bandwidth-2.0.3-2)
> 
>  tomcat4-4.0.2-3
>  servletapi4-4.0.2-1
>  xerces-j-1.4.4-2
>  regexp-1.2-5
> 
>  Before, I used a tomcat4-4.0.1.x RPM's, which included mail.jar and
>  activation.jar
>  in /var/tomcat4/common/lib ;
>  but with tomcat4-4.0.2.x, they are not included anymore.
> 
>  which RPM gives them now ? neither servletapi4-4.0.2-1,
> xerces-j-1.4.4-2 nor regexp-1.2-5, which are required to install
> tomcat4-4.à.2.x ...
> 
> So, I didn't find any RPm which coud provide me mail.jar,
> activation.jar, ...
> 
> any ideas ?
> 
>  thanks in advance.
>  --
>  Julien OIX
>  Service Informatique de Gestion
>  Tél: 02 40 99 83 65
>  mail: [EMAIL PROTECTED]
> 
> --
> To unsubscribe:   
> For additional commands: 
> Troubles with the list: 
> 
> 

--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




Re: directory issues using Tomcat 4.0.2 and Apache 1.3.23 with mod_webapp

2002-03-08 Thread Peter Johnson

Below is what I did, I hope that it helps. I am new to Tomcat and Java in 
general although I have had to deploy and configure ServletExec.

Peter

httpd.conf
---
# Make sure that you have provided a ServerName and ServerPort

WebAppConnection conn warp localhost:8008
WebAppDeploy ROOT conn /tomcat/
WebAppDeploy examples conn /examples/
WebAppDeploy tomcat-docs conn /tomcat-docs/
WebAppDeploy webdav conn /webdav/
WebAppInfo /webapp-info



server.xml
---


   



change to your appropriate value  ^^^

   

   

   
 change value  ^^^

 

 

 
 

 
 

 
 
   
   
   
   
   
   
 usersa
 password
 driverClassName
   org.hsql.jdbcDriver
 driverName
   jdbc:HypersonicSQL:database
   

   
   
 
   mail.smtp.host
   localhost
 
   
 

   

 

   



On 13:03 07-03-2002 Buck Woodson wrote:
> Thanks, Peter.  I too tried this Sun article route without success on 
> WIN2K.  Win2K doesn't like the virtual host business at all.  The other 
> article I quoted works in Win2K except for the serving gifs etc. problem.  
> Its not strictly a directory problem either, having the gif in the same path 
> as the jsp you have the same problem.  With Tomcat by itself, no problem.
> 
> You can't even hang the gif directory off of Apache's DocumentRoot and see 
> it work like you'd want it to.
> 
> Here is the Apache access log to the typical failed service:
>  - - [06/Mar/2002:16:27:14 -0600] "GET /examples/images/code.gif 
> HTTP/1.1" 500 305
> 
> Here is the access log to the kluge direct navigate and back-navigate:
>  - - [06/Mar/2002:16:27:14 -0600] "GET 
> /examples/images/execute.gif HTTP/1.1" 304 0
> 
> Sorry I failed to mention the Windows 2000.
> 
> 
>> From: "Peter Johnson" <[EMAIL PROTECTED]>
>> Reply-To: "Tomcat Users List" <[EMAIL PROTECTED]>
>> To: [EMAIL PROTECTED]
>> Subject: Re: directory issues using Tomcat 4.0.2 and Apache 1.3.23 with 
>> mod_webapp
>> Date: Thu, 7 Mar 2002 09:24:01 +1100 (EST)
>> 
>> I followed the site below and all works ok. Basically it describes some 
>> simple changes to
>> be made in server.xml
>> 
>> http://dcb.sun.com/practices/howtos/tomcat_apache.jsp
>> 
>> Peter
>> 
>> > Set up these as per this URL, JSP will be functional but no gifs in  
>> examples:
>> > http://www.webmasterbase.com/article.php?pid=44&aid=305
>> >
>> > Then go to
>> >
>> > http:///examples/jsp/index.html
>> >
>> > Images don't serve from Apache nor from Tomcat.
>> >
>> > Apache thinks it should serve them from DocumentRoot/examples.
>> >
>> > Using Apache "Alias" and "Redirect" also fails.
>> >
>> > Oddly enough, you can successfully browse
>> > http:///examples/images, manually select each 
>> image  file, it
>> > displays properly, then go back to the jsp with the gifs and all is  well 
>> for the
>> > moment.
>> >
>> > I've spent a lot of time digging and
>> > trying things with no success.  Any help would be appreciated.
>> >
>> > Is Tomcat and Apache incompatible (if someone wants to step out, get 
>> crazy  and
>> > actually have graphics in a web page)?
>> >
>> > Thanks
>> >
>> > _
>> > MSN Photos is the easiest way to share and print your photos:
>> > http://photos.msn.com/support/worldwide.aspx
>> >
>> >
>> > --
>> > To unsubscribe:   <mailto:[EMAIL PROTECTED]> For 
>> additional
>> > commands: <mailto:[EMAIL PROTECTED]> Troubles with the 
>> list:
>> > <mailto:[EMAIL PROTECTED]>
>> 
>> 
>> 
>> -
>> This email was sent using SquirrelMail.
>>"Webmail for nuts!"
>> http://squirrelmail.org/
>> 
>> 
>> 
>> --
>> To unsubscribe:   <mailto:[EMAIL PROTECTED]>
>> For additional commands: <mailto:[EMAIL PROTECTED]>
>> Troubles with the list: <mailto:[EMAIL PROTECTED]>
>> 
> 
> 
> 
> 
> _
> Chat with friends online, try MSN Messenger: http://messenger.msn.com
> 
> 
> --
> To unsubscribe:   <mailto:[EMAIL PROTECTED]>
> For additional commands: <mailto:[EMAIL PROTECTED]>
> Troubles with the list: <mailto:[EMAIL PROTECTED]>
> 

--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>




Re: file uploading

2004-04-01 Thread Peter Johnson
Kay,

I would have thought that you could use commons-fileupload to do this
with a little form preprocessing to determine location.

PJ

On Fri, 2004-04-02 at 14:49, Kayley Ma wrote:
> Hi,
> 
> Is it possible to copy/move uploaded files in Tomcat5 to different
> directories on the machine outside of the Tomcat folder?  ie rather than a
> static transfer of uploaded file from tomcat to another directory, copy/move
> file to its proper subdirectory depending on the uploaded file names/type?
> Where would I place this code or is there an xml file that I would need to
> configure/modify?
> 
> Thanks!
> Kay
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


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



Re: file uploading

2004-04-01 Thread Peter Johnson
Always the way, you think of something else just as you hit send.

The other option would be to have a background process which checks the
upload directory and then moves the files as appropriate.

PJ

On Fri, 2004-04-02 at 15:06, Peter Johnson wrote:
> Kay,
> 
> I would have thought that you could use commons-fileupload to do this
> with a little form preprocessing to determine location.
> 
> PJ
> 
> On Fri, 2004-04-02 at 14:49, Kayley Ma wrote:
> > Hi,
> > 
> > Is it possible to copy/move uploaded files in Tomcat5 to different
> > directories on the machine outside of the Tomcat folder?  ie rather than a
> > static transfer of uploaded file from tomcat to another directory, copy/move
> > file to its proper subdirectory depending on the uploaded file names/type?
> > Where would I place this code or is there an xml file that I would need to
> > configure/modify?
> > 
> > Thanks!
> > Kay
> > 
> > 
> > 
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


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



JK2 Connections from Apache2 URL Rewriting

2004-03-23 Thread Peter Johnson

I have been reading through
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/ and other sources
via google trying to work out the best way of mapping live URLs to
specific webapps. e.g.

Map www.mydomain.com/myshortcut -> www.domain.com/mywebapp/subpath/url

My environment is Apache2 mod_jk2 and Tomcat 5.

So far I have implemented it using mod_proxy in apache as
RewriteRule ^/myshortcut(.*)
http://www.domain.com/mywebapp/subpath/url$1 [P]

However I don't feel that this a clean solution. Does Tomcat5 or JK2
support some form of URI mapping / aliasing? e.g. Resin has an alias
directive.

Thanks in advance,
Peter


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



RE: JK2 Connections from Apache2 URL Rewriting

2004-03-23 Thread Peter Johnson
Thanks for the reply but they are referring to a Host Name Alias not a
URI alias. i.e. www.company.com == company.com (to steal their example)
I require /bar == /foo/bar.
I don't believe that mod_alias will work because it operates in a
similar fashion to symlinks in *nix. It creates a virtual path to
something outside the standard directory structure.

-PJ

On Wed, 2004-03-24 at 10:19, Yansheng Lin wrote:
> Hey, Tomcat does support alias! take a look at the Host element:).
> http://jakarta.apache.org/tomcat/tomcat-5.0-doc/config/host.html
> 
> Can you use apache mod_alias directive instead of the mod_proxy directive? 
> 
> -Yan
> 
> -Original Message-
> From: Peter Johnson [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, March 23, 2004 2:41 PM
> To: [EMAIL PROTECTED]
> Subject: JK2 Connections from Apache2 URL Rewriting
> 
> 
> 
> I have been reading through
> http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/ and other sources
> via google trying to work out the best way of mapping live URLs to
> specific webapps. e.g.
> 
> Map www.mydomain.com/myshortcut -> www.domain.com/mywebapp/subpath/url
> 
> My environment is Apache2 mod_jk2 and Tomcat 5.
> 
> So far I have implemented it using mod_proxy in apache as
> RewriteRule ^/myshortcut(.*)
> http://www.domain.com/mywebapp/subpath/url$1 [P]
> 
> However I don't feel that this a clean solution. Does Tomcat5 or JK2
> support some form of URI mapping / aliasing? e.g. Resin has an alias
> directive.
> 
> Thanks in advance,
> Peter
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


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



"SEVERE: Error in dependencyCheck" Problem

2004-03-29 Thread Peter Johnson
Has anyone else experienced this issue when adding DBCP functionality?

My research has only returned the following
http://www.mail-archive.com/[EMAIL PROTECTED]/msg11276.html

Any help is appreciated.

Thanks in advance,
PJ

INFO: Processing Context configuration file URL
file:/home/pjohnson/apache.org/tomcat-5.0.19/conf/Catalina/localhost/kidszone.xml
Mar 30, 2004 10:23:23 AM org.apache.catalina.core.StandardContext start
SEVERE: Error in dependencyCheck
java.util.zip.ZipException: invalid entry CRC (expected 0xf1e4e34c but
got 0x998df119)
at java.util.zip.ZipInputStream.readEnd(ZipInputStream.java:377)
at java.util.zip.ZipInputStream.read(ZipInputStream.java:141)
at java.util.jar.JarInputStream.read(JarInputStream.java:159)
at
java.io.BufferedInputStream.read1(BufferedInputStream.java:220)
at
java.io.BufferedInputStream.read(BufferedInputStream.java:280)
at java.util.jar.JarInputStream.getBytes(JarInputStream.java:88)
at java.util.jar.JarInputStream.(JarInputStream.java:65)
at java.util.jar.JarInputStream.(JarInputStream.java:43)
at
org.apache.catalina.util.ExtensionValidator.getManifest(ExtensionValidator.java:420)
at
org.apache.catalina.util.ExtensionValidator.validateApplication(ExtensionValidator.java:248)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4133)
at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:866)
at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:850)
at
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:638)
at
org.apache.catalina.core.StandardHostDeployer.addChild(StandardHostDeployer.java:839)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at
org.apache.commons.beanutils.MethodUtils.invokeMethod(MethodUtils.java:252)
at
org.apache.commons.digester.SetNextRule.end(SetNextRule.java:256)
at org.apache.commons.digester.Rule.end(Rule.java:276)
at
org.apache.commons.digester.Digester.endElement(Digester.java:1058)
at
org.apache.catalina.util.CatalinaDigester.endElement(CatalinaDigester.java:123)
at
org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
 Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown
Source)
at
org.apache.commons.digester.Digester.parse(Digester.java:1567)
at
org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:519)
at
org.apache.catalina.core.StandardHost.install(StandardHost.java:906)
at
org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:527)
at
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:472)
at
org.apache.catalina.startup.HostConfig.start(HostConfig.java:1008)
at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:394)
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:166)
at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1134)
at
org.apache.catalina.core.StandardHost.start(StandardHost.java:832)
at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1126)
at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:521)
at
org.apache.catalina.core.StandardService.start(StandardService.java:519)
at
org.apache.catalina.core.StandardServer.start(StandardServer.java:2345)
at org.apache.catalina.startup.Catalina.start(Catalina.java:594)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at
org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:297)
at
org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:398)
Mar 30, 2004 10:23:23 AM org.apache.catalina.core.StandardContext start
SEVERE: Error getConfigured
Mar 30, 2004 10:23:23 AM org.apa

Re: Tomcat4 performance issue when manually removing compiled jsps in work folder

2004-03-30 Thread Peter Johnson
Duncan,

I believe (and could be wrong) that this is intended behaviour. The work
directory is like Tomcat's cache of all the webapps it is currently
serving. When a request comes in for a page it tries to serve from this
directory, if the class file does not exist it generates the .java files
from /webapp and then compiles them so that it can serve them. 

So, the 3s delay and 100% utilisation is expected because Tomcat is
recompiling the files so that it can serve them.

PJ

On Fri, 2004-03-26 at 18:39, Duncan Krebs wrote:
> Hi, 
> I have had this snag for some time now and its starting to get the best of me. I'm 
> running tomcat 4.1 and when I manually remove the .java and .class files in the 
> /work/standalone folder even after the initial request of recompiling the jsp's 
> tomcat hits 100% on my CPU and the overall response time is delayed by about 3 
> seconds on each request.
> 
> As I deleted different sub folders in the work folder (all within the same web 
> application) the degraded performance was consistent with the different sub folders 
> that I was deleting even after the pages were recompiled. Has anyone experienced 
> this before? 
> 
> All of my requests are going through a Servlet controller and I have a lot of 
> classes in my WEB-INF folder that are part of the framework but I don't think that 
> would have anything to do with this. I've also tried rebuilding my entire project 
> from scratch and I'm still having the same issue of a slowed response time of about 
> 3 seconds and tomcat taking all my CPU.
> 
> Regards, 
> dkrebs
> 


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



Re: Tomcat4 performance issue when manually removing compiled jspsin work folder

2004-03-30 Thread Peter Johnson
Duncan,

Restarting is like wiping the slate clean in terms of Tomcat's caching
in the work directory. So, it is expected that it would take a little
while, even just to load the classes in to memory to serve. If you are
using JSP I believe that these are always recompiled at start with the
class files from the your webapp/WEB-INF/classes and lib directories
being loaded in to memory.

PJ

On Fri, 2004-03-26 at 19:11, Duncan Krebs wrote:
> Peter,
> Thanks for the reply. It would make sense that on the request immediately
> after I delete the .java and .class files in the work folder it would take
> longer because tomcat has to recompile the jsp's. However even after they
> are recompiled (not deleted again)and  tomcat is restarted subsequent
> requests continue to take longer and the CPU continues to hit 100%. I wonder
> if there is a way to analyze the request and see what code is taking so long
> to execute.
> - Duncan
> 
> - Original Message -
> From: "Peter Johnson" <[EMAIL PROTECTED]>
> To: "Tomcat Users List" <[EMAIL PROTECTED]>
> Sent: Tuesday, March 30, 2004 2:00 AM
> Subject: Re: Tomcat4 performance issue when manually removing compiled
> jspsin work folder
> 
> 
> > Duncan,
> >
> > I believe (and could be wrong) that this is intended behaviour. The work
> > directory is like Tomcat's cache of all the webapps it is currently
> > serving. When a request comes in for a page it tries to serve from this
> > directory, if the class file does not exist it generates the .java files
> > from /webapp and then compiles them so that it can serve them.
> >
> > So, the 3s delay and 100% utilisation is expected because Tomcat is
> > recompiling the files so that it can serve them.
> >
> > PJ
> >
> > On Fri, 2004-03-26 at 18:39, Duncan Krebs wrote:
> > > Hi,
> > > I have had this snag for some time now and its starting to get the best
> of me. I'm running tomcat 4.1 and when I manually remove the .java and
> .class files in the /work/standalone folder even after the initial request
> of recompiling the jsp's tomcat hits 100% on my CPU and the overall response
> time is delayed by about 3 seconds on each request.
> > >
> > > As I deleted different sub folders in the work folder (all within the
> same web application) the degraded performance was consistent with the
> different sub folders that I was deleting even after the pages were
> recompiled. Has anyone experienced this before?
> > >
> > > All of my requests are going through a Servlet controller and I have a
> lot of classes in my WEB-INF folder that are part of the framework but I
> don't think that would have anything to do with this. I've also tried
> rebuilding my entire project from scratch and I'm still having the same
> issue of a slowed response time of about 3 seconds and tomcat taking all my
> CPU.
> > >
> > > Regards,
> > > dkrebs
> > >
> >
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


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



is out by factor of 100?

2004-09-19 Thread Peter Johnson
Hi,

Is anyone successfully using the web.xml session timeout configuration
with Tomcat 5.0.25? Testing seems to indicate that this setting is out
by a factor of 100 however using session.setMaxInactiveInterval seems to
yield the desired result.

E.g. Printing the time remaining (in ms) in a session when using:
session.setMaxInactiveInterval(180) // 3 min in seconds
  ---> presents 179226 == ~3 min
however, setting

  5
 
  ---> presents 29992101 == ~500min

Thanks,
PJ


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



RE: is out by factor of 100?

2004-09-20 Thread Peter Johnson
Yoav, 

Thanks for replying,

long timeLeft = session.getLastAccessedTime() +
session.getMaxInactiveInterval() * 1000 - System.currentTimeMillis();

PJ

On Mon, 2004-09-20 at 22:54, Shapira, Yoav wrote:
> Hi,
> How are you checking the time remaining for a session?
> 
> Yoav Shapira
> Millennium Research Informatics
> 
> 
> >-Original Message-
> >From: Peter Johnson [mailto:[EMAIL PROTECTED]
> >Sent: Monday, September 20, 2004 12:24 AM
> >To: Tomcat Users List
> >Subject:  is out by factor of 100?
> >
> >Hi,
> >
> >Is anyone successfully using the web.xml session timeout configuration
> >with Tomcat 5.0.25? Testing seems to indicate that this setting is out
> >by a factor of 100 however using session.setMaxInactiveInterval seems
> to
> >yield the desired result.
> >
> >E.g. Printing the time remaining (in ms) in a session when using:
> >session.setMaxInactiveInterval(180) // 3 min in seconds
> >  ---> presents 179226 == ~3 min
> >however, setting
> >
> >  5
> >
> >  ---> presents 29992101 == ~500min
> >
> >Thanks,
> >PJ
> >
> >
> >-
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 
> 
> This e-mail, including any attachments, is a confidential business communication, 
> and may contain information that is confidential, proprietary and/or privileged.  
> This e-mail is intended only for the individual(s) to whom it is addressed, and may 
> not be saved, copied, printed, disclosed or used by anyone else.  If you are not 
> the(an) intended recipient, please immediately delete this e-mail from your computer 
> system and notify the sender.  Thank you.
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


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



RE: is out by factor of 100?

2004-09-20 Thread Peter Johnson
Found the issue ... my apologies for wasting ppls time. A colleague had
added a setMaxInactiveInterval statement in another section of the code
which was overriding the web.xml value. Worse was that he'd set it for
3 thinking it was supposed to be in ms. 

My apologies all and thanks Yoav for looking into it.

PJ

On Tue, 2004-09-21 at 08:00, Peter Johnson wrote:
> Yoav, 
> 
> Thanks for replying,
> 
> long timeLeft = session.getLastAccessedTime() +
> session.getMaxInactiveInterval() * 1000 - System.currentTimeMillis();
> 
> PJ
> 
> On Mon, 2004-09-20 at 22:54, Shapira, Yoav wrote:
> > Hi,
> > How are you checking the time remaining for a session?
> > 
> > Yoav Shapira
> > Millennium Research Informatics
> > 
> > 
> > >-Original Message-
> > >From: Peter Johnson [mailto:[EMAIL PROTECTED]
> > >Sent: Monday, September 20, 2004 12:24 AM
> > >To: Tomcat Users List
> > >Subject:  is out by factor of 100?
> > >
> > >Hi,
> > >
> > >Is anyone successfully using the web.xml session timeout configuration
> > >with Tomcat 5.0.25? Testing seems to indicate that this setting is out
> > >by a factor of 100 however using session.setMaxInactiveInterval seems
> > to
> > >yield the desired result.
> > >
> > >E.g. Printing the time remaining (in ms) in a session when using:
> > >session.setMaxInactiveInterval(180) // 3 min in seconds
> > >  ---> presents 179226 == ~3 min
> > >however, setting
> > >
> > >  5
> > >
> > >  ---> presents 29992101 == ~500min
> > >
> > >Thanks,
> > >PJ
> > >
> > >
> > >-
> > >To unsubscribe, e-mail: [EMAIL PROTECTED]
> > >For additional commands, e-mail: [EMAIL PROTECTED]
> > 
> > 
> > 
> > 
> > This e-mail, including any attachments, is a confidential business communication, 
> > and may contain information that is confidential, proprietary and/or privileged.  
> > This e-mail is intended only for the individual(s) to whom it is addressed, and 
> > may not be saved, copied, printed, disclosed or used by anyone else.  If you are 
> > not the(an) intended recipient, please immediately delete this e-mail from your 
> > computer system and notify the sender.  Thank you.
> > 
> > 
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


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



Re: Allowing users of web app to upload files

2004-09-21 Thread Peter Johnson
Justin,

Client Side:

 
 


This will present a broswe button and text box for the user to select
the file.

Server Side:
Look at FileUpload http://jakarta.apache.org/commons/fileupload/. If
using Struts (http://struts.apache.org/) then you already have access to
FileUpload so look at the JavaDocs for it to find how to use it.

Hope this has helped.

PJ

On Wed, 2004-09-22 at 09:36, Justin Jaynes wrote:
> Well,
> 
> As Yaov said this list was ok for JSP development,
> here I go.
> 
> I am having a great time using Tomcat on SuSE 9.1 with
> SSL and all is working fine.
> 
> I would like users of my web applications to be able
> to upload image files to directories that Tomcat is
> serving files out of.  This must happen THROUGH the
> web application.
> 
> Therefore I have two questions:
> 
> 1.  How would I get a file off a remote users hard
> drive (which they specify by typing the file name and
> location into a text box in a form) to move to my
> server and be renamed (using my own file naming
> convention)?
> 
> 2.  How do you open a Browse File dialog box in a web
> browser (I would guess this would be easily done using
> Java Script.  may not be an appropriate question here,
> so only answer if you happen to have the answer on
> hand)  If possible, pointing me to a location on the
> web where this is done and the script is readily
> apparent, would be a fine answer.
> 
> 
> 
> 
>   
> __
> Do you Yahoo!?
> New and Improved Yahoo! Mail - Send 10MB messages!
> http://promotions.yahoo.com/new_mail
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


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



Re: Integrating Tomcat 5 and Apache 2

2004-09-28 Thread Peter Johnson
Stewart,

Try enabling the RequestDumperValve in server.xml. I think you'll find
it has something to do with the difference between
"com.datatel.server.servlets.webadvisor.WebAdvisor" and
"datatel/openweb" ... well that is my first thought anyway.

PJ

On Wed, 2004-09-29 at 08:28, Stewart Walker wrote:
> Redhat Linux Enterprise
> httpd-2.0.46-40.ent
> j2sdk1.4.2_05
> tomcat-5.0.27
> jakarta-tomcat-connectors-jk2-2.0.4-src
> 
> For the record.. If I run the servlets 
> 
> http://server.edu:8080/servlet/com.datatel.server.servlets.webadvis
> or.WebAdvisor?ACTION=Login
> they work fine.
> 
> 
> Going over the 
> Chapter 8. Integrating Tomcat 5 and Apache 2 at
> http://cymulacrum.net/writings/tomcat5/c875.html
> Everthing (./confgure, make & ldd ) went fine.
> Found that the
> $CATALINA/logs/jk2.shm and the jk2.socket files.
> For some reason arn't being created when tomcat starts.
> 
> Tomcat isn't complaining about anything as far as I can tell.
> 
> 2004-09-28 15:53:34 StandardContext[]WebAdvisor: Initializing 
> WebAdvisorContext
> 2004-09-28 15:53:34 StandardContext[]WebAdvisor: No cache 
> found, creating new session cache.
> 2004-09-28 15:57:09 StandardContext[/servlets-
> examples]InvokerFilter(ApplicationFilterConfig[name=Path Mapped 
> Filter, filterClass=filters.ExampleFilter]): 4 milliseconds
> 
> Tomcat starts and stops and serves the pages when directed as 
> above.
> 
> Went back thru 
> Chapter 8. Integrating Tomcat 5 and Apache 2
> Appendix A. mod_jk2 404 Error Problem 
> Appendix C. Building mod_jk2 on Red Hat Enterprise Linux 3 
> (RHEL) 
> double checked everything.
> 
> Went ahead and started httpd and tried the uri setting 
> 
> # Uri mapping for datatel
> [uri:/datatel/openweb/*]
> 
> in workers2.properties and 
> got the 404 error. 
> 
> Commented out the uri settings there and put
> 
> 
> JkUriSet worker ajp13
> 
> 
> in etc/httpd/conf/httpd.conf 
> 
> Gave it a shot and recieved
> 
> 500 Internal Server Error
> (httpd error log logged )
> [Tue Sep 28 15:45:36 2004] [error] uriEnv.init() map to invalid 
> worker /datatel/openweb/*-0 ajp13
> and
> [Tue Sep 28 15:57:32 2004] [error] mod_jk2.handle() No worker for 
> /datatel/openweb/index.html
> When I tried index.html
> 
> I'm almost there was hoping some one would have an idea on what
> is going on
> 
> Thanks
> 
>  \\|//
>   -(@ @)-
> ===oOO==(_)==OOo==
> 
> Stewart Walker
> [EMAIL PROTECTED]
> 


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



Re: Integrating Tomcat 5 and Apache 2

2004-09-28 Thread Peter Johnson
Stewart,

I think it will be in catalina.2004-09-28.log by default. You'll need to
try the request again as this valve dumps the request details.

PJ

On Wed, 2004-09-29 at 09:45, Stewart Walker wrote:
> Here is a snip of the catalina.out after enabling 
> RequestDumperValve
> 
> catalina.out
> 
> Sep 28, 2004 5:30:59 PM 
> org.apache.catalina.core.StandardHostDeployer install
> INFO: Installing web application at context path /webdav from URL 
> file:/usr/java
> /tomcat-5.0.27/webapps/webdav
> Sep 28, 2004 5:30:59 PM org.apache.coyote.http11.Http11Protocol 
> start
> INFO: Starting Coyote HTTP/1.1 on http-8080
> Sep 28, 2004 5:30:59 PM org.apache.jk.server.JkMain start
> INFO: APR not loaded, disabling jni components: 
> java.io.IOException: java.lang.UnsatisfiedLinkError: 
> /usr/lib/httpd/modules/jkjni.so: /usr/lib/httpd/modules/jkjni.so: 
> undefined symbol: apr_md5_final
> Sep 28, 2004 5:30:59 PM org.apache.jk.common.ChannelSocket 
> init
> INFO: JK2: ajp13 listening on /0.0.0.0:8009
> Sep 28, 2004 5:30:59 PM org.apache.jk.server.JkMain start
> INFO: Jk running ID=0 time=1/50  config=/usr/java/tomcat-
> 5.0.27/conf/jk2.propert
> ies
> Sep 28, 2004 5:30:59 PM org.apache.catalina.startup.Catalina start
> INFO: Server startup in 3464 ms
> Sep 28, 2004 5:32:22 PM org.apache.coyote.http11.Http11Protocol 
> pause
> INFO: Pausing Coyote HTTP/1.1 on http-8080
> Sep 28, 2004 5:32:23 PM 
> org.apache.catalina.core.StandardService stop
> INFO: Stopping service Catalina
> Sep 28, 2004 5:32:23 PM 
> org.apache.catalina.core.StandardHostDeployer remove
> INFO: Removing web application at context path /admin
> Sep 28, 2004 5:32:23 PM org.apache.catalina.logger.LoggerBase 
> stop
> INFO: unregistering logger 
> Catalina:type=Logger,path=/admin,host=localhost
> 
> 
> On 29 Sep 2004 at 9:16, Peter Johnson wrote:
> 
> > Stewart,
> > 
> > Try enabling the RequestDumperValve in server.xml. I think you'll find
> > it has something to do with the difference between
> > "com.datatel.server.servlets.webadvisor.WebAdvisor" and
> > "datatel/openweb" ... well that is my first thought anyway.
> > 
> > PJ
> > 
> > On Wed, 2004-09-29 at 08:28, Stewart Walker wrote:
> > > Redhat Linux Enterprise
> > > httpd-2.0.46-40.ent
> > > j2sdk1.4.2_05
> > > tomcat-5.0.27
> > > jakarta-tomcat-connectors-jk2-2.0.4-src
> > > 
> > > For the record.. If I run the servlets 
> > > 
> > > http://server.edu:8080/servlet/com.datatel.server.servlets.webadvis
> > > or.WebAdvisor?ACTION=Login they work fine.
> > > 
> > > 
> > > Going over the 
> > > Chapter 8. Integrating Tomcat 5 and Apache 2 at
> > > http://cymulacrum.net/writings/tomcat5/c875.html
> > > Everthing (./confgure, make & ldd ) went fine.
> > > Found that the
> > > $CATALINA/logs/jk2.shm and the jk2.socket files.
> > > For some reason arn't being created when tomcat starts.
> > > 
> > > Tomcat isn't complaining about anything as far as I can tell.
> > > 
> > > 2004-09-28 15:53:34 StandardContext[]WebAdvisor: Initializing 
> > > WebAdvisorContext
> > > 2004-09-28 15:53:34 StandardContext[]WebAdvisor: No cache 
> > > found, creating new session cache.
> > > 2004-09-28 15:57:09 StandardContext[/servlets-
> > > examples]InvokerFilter(ApplicationFilterConfig[name=Path Mapped
> > > Filter, filterClass=filters.ExampleFilter]): 4 milliseconds
> > > 
> > > Tomcat starts and stops and serves the pages when directed as 
> > > above.
> > > 
> > > Went back thru 
> > > Chapter 8. Integrating Tomcat 5 and Apache 2
> > > Appendix A. mod_jk2 404 Error Problem 
> > > Appendix C. Building mod_jk2 on Red Hat Enterprise Linux 3 
> > > (RHEL) 
> > > double checked everything.
> > > 
> > > Went ahead and started httpd and tried the uri setting 
> > > 
> > > # Uri mapping for datatel
> > > [uri:/datatel/openweb/*]
> > > 
> > > in workers2.properties and 
> > > got the 404 error. 
> > > 
> > > Commented out the uri settings there and put
> > > 
> > > 
> > > JkUriSet worker ajp13
> > > 
> > > 
> > > in etc/httpd/conf/httpd.conf 
> > > 
> > > Gave it a shot and recieved
> > > 
> > > 500 Internal Server Error
> > > (httpd error log logged )
> > > [Tue Sep 28 15:45:36 2004] [error] uriEnv.init() map to inva

Re: /*.jsp

2004-10-06 Thread Peter Johnson
*.jsp

But I think that you'll find that this is defined in the core web.xml to
go to the JSP servlet.

What are you trying to achieve?


On Thu, 2004-10-07 at 15:22, Fred Blaise wrote:
> any possible way i can achieve this in my web.xml ? Bc it wont the app
> won't start with this... (tomcat 5.0.28)
> 
> /*.jsp
> 
> thanks
> 
> fb.
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


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



Re: [OT] Webapp upgrades and browser caching

2004-10-07 Thread Peter Johnson
Justin,

Have a read of http://www.mnot.net/cache_docs/

If you have access to the apache config then you should be able to add a
header like the ones below using mod_headers

Cache-Control: max-age=60, must-revalidate 

to expire content after 60 seconds or use 

Cache-Control: no-cache 

to force revalidation of the content on each request.

PJ

On Fri, 2004-10-08 at 04:53, Justin Ruthenbeck wrote:
> Wade,
> 
> Thanks for your comments.
> 
> By adding the  expires tag, it sounds like you setting the system 
> up to schedule the upgrade.  By this, I mean that you know you're gonna 
> upgrade a week from today, so you configure Apache to suggest that all 
> content should expire at that time.  Sounds reasonable.
> 
> In our situation, we have our webapps installed offsite in clients' 
> facilities, so all/most of the upgrade process needs to be fool-proof... 
> reconfiguring Apache 1 week (or whatever) before the upgrade isn't really 
> an option.  Aside from this, any more idea about how to handle this?
> 
> Thanks,
> justin
> 
> 
> >For static web pages you can use a tag like this:
> >
> >
> >If the browsers still have a problem you might be able to configure 
> >Apache to output a header will all content called EXPIRES.  I think you 
> >can if I remember right from some docs I read.  You will have to look at 
> >Apache for that.  I'm not sure about tomcat being able to handle that or 
> >not, but the apache bit should prepend the header I believe.  The only 
> >other way would be to output all images and static pages from a servlet 
> >of some kind and add the header yourself to the request.  Browsers 
> >should honor that tag or header for all images down the line from your 
> >html or jsp pages, but may not.
> >
> >Some browsers may be able to be set to ignore this all together 
> >though.  Sometimes it is even worse than that.  I have seen ISP's who 
> >think they are slick who install a cache in their systems, and they 
> >basically become a proxy for the users.  If they are ignoring such 
> >things your users would have to contact them.  I have seen some who do 
> >this for different protocols even http and https differently.  That one 
> >irked me pretty good.
> >
> >Anyways, I use expires in all my jsp and html files.  I haven't ever 
> >tried the other stuff for the headers from Apache, but think I remember 
> >reading about it in the Apache docs.  I have output that header from 
> >servlets and ISAPI dlls before.
> >
> >Someone else may be able to offer more help.
> >
> >Wade
> 
> 
> At 11:21 AM 10/7/2004, you wrote:
> >Justin Ruthenbeck wrote:
> >
> >>I'm looking for some advice about how to handle the following situation.
> >>(1) Apache 2.x in front of Tomcat 5.x
> >>(2) Deploy new web application.  Bunch of servlets, bunch of jsps, 
> >>bunch of static content (mainly js, css).
> >>(3) Many users use the application, during which time their browsers 
> >>cache lots of static content
> >>(4) We do a major version upgrade of the webapp, including (almost) all 
> >>new static content, but URLs stay the same (to alleviate 
> >>bookmark-maintenance requirements).
> >>The problem arises when the browsers continue to use their cached 
> >>version of the static content.  Now, the browsers eventually get 
> >>updated, but immediately after deployment there are huge numbers of 
> >>graphical and functional (js files) problems.  It seems like behavior 
> >>in this area is widely different amongst browsers and/or their settings.
> >>I have only come up with the following option:
> >>(1) Play with URLs.  New deployments can be deployed under
> >> a different url domain like:
> >> http://www.server.com/myapp/v1/main.css
> >> http://www.server.com/myapp/v2/main.css
> >> This would force browsers to get new content since the
> >> content appears as totally new content to the browser.
> >>Aside from disabling static content caching, are there any other 
> >>options out there?
> >>Much thanks for the help!
> >>justin
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


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



Re: Error messages on Apache2 with load balancing jk2 and Tomcat

2004-10-26 Thread Peter Johnson
Try
It has been a while since I touched jk2 but try
group=lb:balanced
PJ
Stephan Müller wrote:
Hallo!
My Enviroment:
Suse Linux 9.1
Tomcat 5.0.28
JK2 Connector 2.0.4
Apache2 2.0.50
I've configured the jk2-connctor to load balance. Here my
worker2.properties:
# Set a Logger
[logger.apache2]
file=/usr/local/apache2/logs/error.log
level=DEBUG
#debug=1
# config settings
[config]
file=/usr/local/apache2/conf/workers2.properties
debug=0
# Shared Memory file settings
[shm]
file=/usr/local/apache2/conf/jk2.shm
size=10
# communication channel settings for our "HDTTomcat1"
[channel.socket:192.168.120.148:8009]
port=8009
host=192.168.120.148
tomcatId=myTomcat
group=balanced
lb_factor=1
route=jvm1
# communication channel settings for our "HDTTomcat2"
[channel.socket:192.168.120.147:8009]
port=8009
host=192.168.120.147
tomcatId=yourTomcat
group=balanced
lb_factor=1
route=jvm2
# Declare a Tomcat worker
[ajp13:192.168.120.148:8009]
channel=channel.socket:myTomcat
[ajp13:192.168.120.147:8009]
channel=channel.socket:yourTomcat
#Load balanced worker
[lb:balanced]
worker=ajp13:192.168.120.148:8009
worker=ajp13:192.168.120.147:8009
timeout=30
attempts=2
recovery=90
StickySession=1
noWorkersMsg=Server Busy please retry after some time.
noWorkerCodeMsg=503
[uri:/jsp-examples/*]
info= Mapping for examples of tomcat
context=/jsp-examples
group=balanced
[uri:/manager/*]
#uri:/HDTHTTPService/*]
#nfo=HDT MZS.net
[status:]
[uri:/jkstatus/*]
group=status 

After start apache2 I'll get these error messages in th error_log of
apache2:
:
:
[Mon Oct 25 16:41:35 2004] [notice] config.update(): done
ajp13:192.168.120.148:8009
[Mon Oct 25 16:41:35 2004] [notice] config.update(): done
ajp13:192.168.120.147:8009
[Mon Oct 25 16:41:35 2004] [notice] config.setAttribute() Error setting
lb:balanced timeout 30
[Mon Oct 25 16:41:35 2004] [notice] config.setAttribute() Error setting
lb:balanced attempts 2
[Mon Oct 25 16:41:35 2004] [notice] config.setAttribute() Error setting
lb:balanced recovery 90
[Mon Oct 25 16:41:35 2004] [notice] config.setAttribute() Error setting
lb:balanced stickySession 1
[Mon Oct 25 16:41:35 2004] [notice] config.setAttribute() Error setting
lb:balanced noWorkersMsg Server Busy please retry after some time.
[Mon Oct 25 16:41:35 2004] [notice] config.setAttribute() Error setting
lb:balanced noWorkerCodeMsg 503
[Mon Oct 25 16:41:35 2004] [notice] config.update(): done lb:balanced 
:
:

Why cannot set apache2 these attributes? What is my mistake? Need I another
module?
Stephan Müller
 


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


Re: Apache, Tomcat and mod_jk2 - question about layout

2004-10-26 Thread Peter Johnson
I am using Apache2, jk2 and Tomcat5 but I do so because I want to 
offload the SSL and compression onto a first tier leaving the second 
just to generate the content. I also use the first tier for uri 
rewriting using mod_rewrite.

If you don't need uri rewriting I would consider using Tomcat standalone 
as the performance is likely to be comparable but the reduced admin by 
removing Apache and jk would be a big benefit. Why have more steps that 
can go wrong? More to debug when it does?

To answer the questions from your first email. The images will be being 
returned from Apache, remember that an image is a separate request. I 
will qualify this by stating that any dynamically generated images will 
be returned by Tomcat.

Regarding the directory setup ... it is whatever works best for you. I 
personally do the following:
Apache Content -> /sites/static//...
Tomcat Content -> /sites/webapps//

This means that all of the Tomcat content is outside the realm of Apache 
and thus security concerns are reduced.

my 2c,
PJ
footh wrote:
I've read the FAQ on the topic of whether to go
through Apache or just use Tomcat stand-alone and
frankly, it seemed inconclusive.  Then I did a search
and it seemed the general consensus was to use Tomcat
stand-alone for development enviroments and Apache for
production.
Really, that's all I went by.  I figured using Apache,
Tomcat and mod_jk was the more robust solution and
better suited for the long haul.  More and more
features will likely be added to this site so I need
to be forward thinking.
--- Parsons Technical Services
<[EMAIL PROTECTED]> wrote:
 

Unless you have a reason, why not let Tomcat do it
all?
Doug
- Original Message - 
From: "footh" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, October 26, 2004 5:13 PM
Subject: Apache, Tomcat and mod_jk2 - question about
layout

   

After going through all the documentation, I have
gotten mod_jk2 to forward jsp requests to Tomcat. 
However, I have a question about the layout...

Essentially, my site will be .html pages with some
occasional .jsp pages (it will likely change in
 

the
   

future to all .jsp/servlets, but for now that's
 

the
   

way it is).  Right now, I have the Apache
 

DocumentRoot
   

pointing to the directory containing the site and
 

also
   

I have a Tomcat Context with a blank path property
 

and
   

docBase property pointing to the same site
 

directory. 
   

So, basically, I can browse the site by going to
http://localhost:8080 using Tomcat in addition to
 

the
   

standard http://localhost address (through
 

Apache). 
   

And, with mod_jk2 working, I can also hit
http://localhost/xyz.jsp and have a .jsp page
 

execute
   

correctly.
So, my question is, is this the correct way to
configure this kind of web site?  When .jsp pages
 

are
   

hit, are the images actually being loaded by
 

Apache or
   

by Tomcat?
A problem I've discovered is that if I need to use
 

a
   

web.xml file in the WEB-INF directory, I can
 

actually
   

browse to the WEB-INF directory when hitting the
 

site
   

through port 80 (Apache).  Obviously, this is not
 

a
   

good idea so I am thinking there is probably a
 

better
   

way to set this site up.  Any ideas?
Thanks,
JF


__
Do you Yahoo!?
Yahoo! Mail Address AutoComplete - You start. We
 

finish.
   

http://promotions.yahoo.com/new_mail 

 

-
 

To unsubscribe, e-mail:
 

[EMAIL PROTECTED]
   

For additional commands, e-mail:
 

[EMAIL PROTECTED]
   

 

   

-
 

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



__
Do you Yahoo!?
Yahoo! Mail - Helps protect you from nasty viruses.
http://promotions.yahoo.com/new_mail
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 


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


Re: tomcat staic content expiration

2004-10-26 Thread Peter Johnson
Use a filter ... I believe there was a discussion regarding it last week.
PJ
Jaynika Barot wrote:
I'm using tomcat 5.x. And after some research we decided to let tomcat
serve the static content as well, as there were many issues with the
IIS connector and Apache connector.
I can make tomcat server static content, but can not figure out how to
set expiration date on this static conents.
any pointers??
Thx
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 


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


Re: Error messages on Apache2 with load balancing jk2 and Tomcat

2004-10-26 Thread Peter Johnson
Well here is what works for me (both Tomcat instances are running locally)
[workerEnv]
logger=logger.apache2
sslEnable=0
timing=1
#forwardURICompat
forwardURICompatUnparsed
#forwardURIEscaped
noRecoveryIfRequestSent
noRecoveryIfHeaderSent
disabled=0
debug=5
version=1
# Comment out in production
[logger.apache2]
level=DEBUG
[shm]
file=/var/log/apache2/jk2.shm
size=1048576
disabled=0
debug=5
version=1
[channel.socket:localhost:8009]
#port=8009
#host=localhost
#graceful=1
keepalive=0
timeout=0
ndelay=0
disabled=0
debug=5
version=1
#---LB---
lb_factor=1
[channel.socket:localhost:8019]
#port=8019
#host=localhost
#graceful=1
keepalive=0
timeout=0
ndelay=0
disabled=0
debug=5
version=1
#---LB---
lb_factor=1
#
# Define the workers
#
[ajp13:localhost:8009]
channel=channel.socket:localhost:8009
max_connections=0
connectTimeout=0
replyTimeout=0
prepostTimeout=0
disabled=0
debug=5
version=1
#---LB---
level=1
[ajp13:localhost:8019]
channel=channel.socket:localhost:8019
max_connections=0
connectTimeout=0
replyTimeout=0
prepostTimeout=0
disabled=0
debug=5
version=1
#---LB---
level=1
#
# Announce a "status" worker
#
[status:status]
info=Status worker.  Displays runtime information.
#
# Set URIs to forward
#
[uri:/jkstatus/*]
group=status:status
[uri://*]
group=lb:lb
#---LB---
[lb:lb]
stickySession=0
Stephan Müller wrote:
Sorry, but it has the same effect.
Thanks
Stephan
 

Try
It has been a while since I touched jk2 but try
group=lb:balanced
PJ
Stephan Müller wrote:
   

Hallo!
My Enviroment:
Suse Linux 9.1
Tomcat 5.0.28
JK2 Connector 2.0.4
Apache2 2.0.50
I've configured the jk2-connctor to load balance. Here my
worker2.properties:
# Set a Logger
[logger.apache2]
file=/usr/local/apache2/logs/error.log
level=DEBUG
#debug=1
# config settings
[config]
file=/usr/local/apache2/conf/workers2.properties
debug=0
# Shared Memory file settings
[shm]
file=/usr/local/apache2/conf/jk2.shm
size=10
# communication channel settings for our "HDTTomcat1"
[channel.socket:192.168.120.148:8009]
port=8009
host=192.168.120.148
tomcatId=myTomcat
group=balanced
lb_factor=1
route=jvm1
# communication channel settings for our "HDTTomcat2"
[channel.socket:192.168.120.147:8009]
port=8009
host=192.168.120.147
tomcatId=yourTomcat
group=balanced
lb_factor=1
route=jvm2
# Declare a Tomcat worker
[ajp13:192.168.120.148:8009]
channel=channel.socket:myTomcat
[ajp13:192.168.120.147:8009]
channel=channel.socket:yourTomcat
#Load balanced worker
[lb:balanced]
worker=ajp13:192.168.120.148:8009
worker=ajp13:192.168.120.147:8009
timeout=30
attempts=2
recovery=90
StickySession=1
noWorkersMsg=Server Busy please retry after some time.
noWorkerCodeMsg=503
[uri:/jsp-examples/*]
info= Mapping for examples of tomcat
context=/jsp-examples
group=balanced
[uri:/manager/*]
#uri:/HDTHTTPService/*]
#nfo=HDT MZS.net
[status:]
[uri:/jkstatus/*]
group=status 

After start apache2 I'll get these error messages in th error_log of
apache2:
:
:
[Mon Oct 25 16:41:35 2004] [notice] config.update(): done
ajp13:192.168.120.148:8009
[Mon Oct 25 16:41:35 2004] [notice] config.update(): done
ajp13:192.168.120.147:8009
[Mon Oct 25 16:41:35 2004] [notice] config.setAttribute() Error setting
lb:balanced timeout 30
[Mon Oct 25 16:41:35 2004] [notice] config.setAttribute() Error setting
lb:balanced attempts 2
[Mon Oct 25 16:41:35 2004] [notice] config.setAttribute() Error setting
lb:balanced recovery 90
[Mon Oct 25 16:41:35 2004] [notice] config.setAttribute() Error setting
lb:balanced stickySession 1
[Mon Oct 25 16:41:35 2004] [notice] config.setAttribute() Error setting
lb:balanced noWorkersMsg Server Busy please retry after some time.
[Mon Oct 25 16:41:35 2004] [notice] config.setAttribute() Error setting
lb:balanced noWorkerCodeMsg 503
[Mon Oct 25 16:41:35 2004] [notice] config.update(): done lb:balanced 
:
:

Why cannot set apache2 these attributes? What is my mistake? Need I
 

another
   

module?
Stephan Müller

 

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

 


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


Re: yoav, can u suggest something?

2004-11-07 Thread Peter Johnson
Hi Vaneet,
Rather than reiterate Yoav's comments I will simply suggest that you 
learn a little about HTML and HTTP or even better RTFM.

Your site is operating within a frameset thus the URL in the browser 
stays the same whilst the underlying URL for each page changes within a 
frame. When someone refreshes the browser re-requests the the URL 
displayed in the "Address Bar", thus your homepage reappears. It is 
correct and expected behaviour.

PJ
[EMAIL PROTECTED] wrote:
Hello everyone,
yoav, i have been reading many posts on this user list and i see that u have 
been solving many problems for people. thats why i put subject is on you :) to 
ask suggestion / hint on this.
I have a domain name and i am using no-ip software to bind my IP address (my 
ISP provides dynamic IP ) so, i have redirected my domain name: 
http://www.export4u.co.uk to micsexport.servepics.com
now problem is:
when u visit http://www.export4u.co.uk
u click on contact us section.
If a user refreshes a page, it takes back the user to the home page which is 
index page.
I think it has to do with redirection as i am redirected
i researched and found something below:  

Can this be a problem ( can framesets be a problem in getting the home page 
again and again )
When I tried the URL the content
was served. This is what I got.
HTTP/1.1 200 OK
Date: Mon, 27 Sep 2004 13:33:15 GMT
Server: Apache/1.3.29 (Unix)
Transfer-Encoding: chunked
Content-Type: text/html



www. Export4U.co.uk


http://micsexport.servepics.com/";; SCROLLING="AUTO" 
NAME="bannerframe
" NORESIZE>


www. Export4U.co.uk

http://micsexport.servepics.com/";>http://export4u.c
o.uk/


any help or suggestion will be appreciated.
Thankx again.
Vaneet
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 


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


Re: Configuration Management, JSP Recompiles, War Files

2004-11-08 Thread Peter Johnson
Hi Steven,
We run 5 Tomcat servers (still on 4.1.x so not clustered) and use CVS 
with two tags: 'stage' and 'prod'. When a push script is executed the 
server pulls the appropriate version from cvs and then performs an ant 
task to deploy the app, compiling any changed classes. We find that this 
works just fine and haven't really had any issues.

Check that you are using  (include on execute) rather 
than <@ include ...> (include on compile) as this *may* be causing the 
issue.

Just out of curiousity why are you are deploying individual apps if they 
are so similar? Why don't you just implement a "branding" infrastructure 
and run a single app with multiple brandings? 

Just a thought ...
PJ
Steven J. Owens wrote:
Hi folks,
I'm interested in hearing how people are dealing with
configuration management issues.
We've been running into some problems with JSP recompiles,
particularly when the changed JSP is an included JSP.  Tomcat seems to
sort of get stuck on the old version, even if we restart tomcat it
doesn't reload.  Manually deleting the foo_jsp.java and foo_jsp.class
files from the tomcat/working/etc directory and *then* restarting
seems to do the trick.
Somebody I talked to suggested that using a WAR file and
redeploying would make tomcat more reliably recompile the JSPs.
I've been meaning to move to using WAR files sooner or later, but
one question has always bugged me - how do you save your
deployment-specific configuration info?  

If I understand correctly, WAR file is just a glorified JAR file,
which in turn is just a glorified tar file.  So unless you're
unjarring it, editing the config file and rejarring it, you can't
really muck with the config settings inside it.  How/where do people
normally keep the configuration variables for the webapp?
We have a single tomcat installation with a dozen
almost-identical webapps, one webapp for each customer.  When we do
our jobs right, each app is in fact identical, except for:
- two colors in the app-wide CSS stylesheet
- the customer's logo image
- the  tags in server.xml
- a few details of the web.xml file (webapp name, database resource name)
- a properties file with a couple dozen configuration properties
- a separate database in the mysql server
We extend and refine the application constantly, so we're
changing the code every month or two.  So far we've been using cvs to
manage this.  Each webapp is a cvs checkout ; the specific files
mentioned above exist in template form in the checkout
(e.g. web_template.xml, styles_template.css) that we copy into the
right name for deployment and then edit, so they don't get overwritten
by cvs.
Using cvs worked pretty well for a while, but it's gotten
unwieldly, especially when we run into the JSP recompiling problem,
because then we have to restart the entire server to try to get it to
recompile the jsp.
This reminds me of another question; I'm beginning to wonder if
we wouldn't be wiser to use a dozen separate tomcat installations.  I
know that in theory using the same tomcat installation for multiple
webapps is supposed to be "standard", but any time we have to tweak
the server.xml-level configuration of a single webapp, we have to
restart all of them.  How do people normally deal with this?  Is it
at all common to run multiple tomcat servers behind apache for this
sort of purpose?
 


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


Re: resource defined in web.xml has null attributes but server.xml is ok

2004-11-08 Thread Peter Johnson
Hi,
You need both. You define the resource in the context of the app and 
then link to the resource from the app.

http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jndi-datasource-examples-howto.html
PJ
Nishant Deshpande wrote:
When I set up a db resource in web.xml and create it, for some reasons
it has null's in its attributes (such as username, url, driverClass,
..).
But when I set up the same resource in server.xml, it works fine.
From the documentation it wasn't clear to me if both need to be set up
the same way. i.e. I use


 . 

in server.xml or web.xml, and then create a reference to it using
 in web.xml.
Is this the correct way of doing this and if so any ideas on why a
resource defined in web.xml should have null attributes when i get the
object?
Thanks
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 


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


Re: How to fix: Tomcat responce time gets to 10-200 seconds once a day

2004-11-08 Thread Peter Johnson
Is that 3-4 connections or 3-4 queries? If it isn't a DNS resolution 
issue or another task running on a server (both as mentioned in another 
response) I would suggest you review you DB connection strategy.

Does the slowdown occur at the same time as a higher than normal volume 
of hits?

Consider getting all of the data and dumping to variables *before* 
formatting. If using multiple connections to the DB try reducing to a 
single connection. If using a single connection try implementing a DB 
connection pool.

Other than those things not much comes to mind at the moment.
PJ
Roman Zhovtulya wrote:
Dear Sirs,
I wonder if anyone had anything similar before.
I'm running some JSP/Java Bean websites under Tomcat (on one PC as a
stand-alone server, on another in connection with Apache).
The website is a dynamic (3-tier architechture) connects to MySQL
database to get the content to display any page (around 3-4 connections
per page). 

Normally the performance is really good, but about once a day it gets
really slow (around 1-5 minutes to display the page). It also recovers
autocatically to normal response time when you simply wait 5-10 minutes.
Any ideas?
I'm running Tomcat 4.05 with Apache on RedHat 8.0 (one PC) as well as
Tomcat 4.127 on SuSE 9.0 with MySQL 4.015.
I'm closing all db-connections in JSP/JavaBeans, so I don't think it's a
db-issue.
I'd highly appreciate any help on the topic.
Thank you very much,
Roman Zhovtulya
---
Roman Y. Zhovtulya
Manager
InternetServiceCenter
Fachbereich Medien und Informationswesen
FH Offenburg
InternetServiceCenter bietet In-House Beratung,
professionelle und preiswerte Entwicklung von individueller Software
Lösungen in Bereich Internet, WWW, Datenbanken, etc

Kostenlose vor-Ort Istanalyse und "Sparpotenzialanalyse" für potenzielle
Kunden.
Sprechen Sie uns an:
InternetServiceCenter
Offenburg University of Applied Sciences
Room B205a
Badstr. 24, Offenburg
D-77652 Germany
VoIP ID (Skype): romanlutsk (mehr unter www.skype.com)
Tel.: +49 781 205 137 / Fax: 290
www.fh-offenburg.de/isc
--- 

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


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


Re: resource defined in web.xml has null attributes but server.xml is ok

2004-11-08 Thread Peter Johnson
Almost, you must define it in a context usually app specific rather than 
DefaultContext. The bit that makes it almost is that a context (if not 
DefaultContext) can be defined in the server.xml *or* 
conf///.xml e.g. /conf/Catalina/localhost/test.xml

If deploying as a WAR to Tomcat you would have
WEB-INF/web.xml  *and*
META-INF/context.xml   <--- app specific context definition
PJ
Nishant Deshpande wrote:
So - I cannot *not* define a resource at the server level (i.e. not
touch the server.xml or any  other server configuration file) and only
define it in the app configuration files - i.e. web.xml ?
It seems like thats what you are saying below - just want to be sure I
understand clearly.
Thanks

On Tue, 09 Nov 2004 10:11:27 +1100, Peter Johnson <[EMAIL PROTECTED]> wrote:
 

Hi,
You need both. You define the resource in the context of the app and
then link to the resource from the app.
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jndi-datasource-examples-howto.html
PJ

Nishant Deshpande wrote:
   

When I set up a db resource in web.xml and create it, for some reasons
it has null's in its attributes (such as username, url, driverClass,
..).
But when I set up the same resource in server.xml, it works fine.
 

From the documentation it wasn't clear to me if both need to be set up
   

the same way. i.e. I use


 . 

in server.xml or web.xml, and then create a reference to it using
 in web.xml.
Is this the correct way of doing this and if so any ideas on why a
resource defined in web.xml should have null attributes when i get the
object?
Thanks
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

 

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

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


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


Re: hide source of a page

2004-11-08 Thread Peter Johnson
But ActiveX is an IE only element is it not?
For that case why not just use an applet and serialise the data from 
Tomcat to the applet then either have JavaScript construct the page by 
querying the applet or have the applet be the interface.

Sunitha --- in short don't try.
PJ
Frank W. Zammetti wrote:
I had such a requirement at work one time, although fortunately I 
talked some sense into the higher-ups and they forgot about it, but 
not before I worked up an entire proof-of-concept document.  IN 
THEORY, this could make it very difficult for would-be hackers, 
although I wouldn't say fullproof.

The idea was to set up a frameset with one invisible frame and one 
full-screen frame.  Into the invisible frame would go an ActiveX 
control that was encrypted with a custom binary encrypter program 
(could be an applet too, but obfuscation isn't as good as encoding a 
binary). Basically, every form submission to the server would go 
through the control, and every response from the server would go 
through it, both encrypted.  On the response from the server, HTML is 
generated out of the control and placed into the frame in an 
obfuscated form.  Javascript it used to guard against right-clicks and 
keyboard shortcuts, and since the app starts up in it's own chromless 
window, it's relatively secure from most clientside exploits.  There 
is a handshake between the control and the server at startup that 
basically sets up a temporary public/private key pair, the point being 
to make it impossible to just issue commands via Telnet.  You'd have 
to fake considerably more than just some URLs or header variables.

So, the idea is that you could probably still get at the source, but 
it wouldn't be in cache so you'd probably have to use a memory 
scanner, but even if you did that it would be in an obfuscated form.  
Not impossible to decypher, but probably hard enough that most people 
wouldn't both. Getting at the server is going to be difficult.  You 
could still decompile the control, but that's not going to be at all 
easy either considering the obfuscation and encryption (think a PE 
compactor approach).

I think making it tough is about as good as you can hope to do, but as 
Steven said, it's ALWAYS going to be defeatable one way or another.


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


Re: hide source of a page

2004-11-08 Thread Peter Johnson
So are you saying that I could run ActiveX on my Linux FireFox browser?
A java serialised object should be secure enough, the next step would be 
to add some sort of encryption.

Frank W. Zammetti wrote:
No, there are actually plug-ins for other browsers to run ActiveX 
controls.  I don't know if they are particularly stable, but they do 
exist.

As I stated previously, you could use an applet, but obfuscating byte 
code is a futile task at best, whereas encrypting a binary executable 
is a little bit easier and gives a bit more security.  Not a lot mind 
you, but enough to matter.


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


Re: Configuration Management, JSP Recompiles, War Files

2004-11-09 Thread Peter Johnson
Steven J. Owens wrote:
Peter,
On Tue, Nov 09, 2004 at 08:42:34AM +1100, Peter Johnson wrote:
 

We run 5 Tomcat servers (still on 4.1.x so not clustered) and use
CVS with two tags: 'stage' and 'prod'.
   

I'm a little unclear on what this means - do you mean branches?  

Or do you mean that you effectively do some sort of script to
"get the latest stage tag" vs "get the latest prod tag"?  That's
something I hadn't considered, but it sounds like it might be easier
than branches (which I haven't really messed with, but seem to be
notoriously tricky).
 

Nope, no branches just tags
 

When a push script is executed the server pulls the appropriate
version from cvs and then performs an ant task to deploy the app,
compiling any changed classes. We find that this works just fine and
haven't really had any issues.
   

Okay, so ant task to build war file and push it to the tomcat
server.  Sounds fairly standard (though still unexplored territory for
me).
 

No WAR just straight file copy for the JSPs, compile and copy for 
classes. (This process was developed prior to good admin / deployment 
interfaces)

Check that you are using  (include on execute) rather 
than <@ include ...> (include on compile) as this *may* be causing the 
issue.
   

Yup, we're using .
 

Just out of curiousity why are you are deploying individual apps if they 
are so similar? Why don't you just implement a "branding" infrastructure 
and run a single app with multiple brandings?
   

Honestly, I've considered it several times.  We're really, really
close to that point already.  All it would take would be to switch the
various logo.gif and CSS imports to use a property instead of copying
a template file.  Then I'd set up the property singleton to use a
different property file & database depending on which URL mapping the
user requested.
The real reason I haven't is that it just doesn't buy me anything
significant to run them all off the same webapp, while it increases
(instead of decreases) the interdependency, and makes testing much
more white-knuckle.  I keep thinking, "well, it wouldn't be that
hard...", but there's no real concrete advantage to do this, except to
save a little bit of disk and memory.  And if I ever *do* have a
serious need do something custom for one instance or another, I'm
screwed.
Our  app http://www.optusnet.com.au currently runs 4 brands with varying 
content requirements. The complexity really isn't that great as most of 
the work is performed by a custom include tag which searches a 
pre-defined path tree for the specified module. The first one found is 
the one it uses. Each brand has slightly differing content.

To me it is a no-brainer to go the branding path but YMMV.
PJ
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Disbale cache at apache

2004-11-11 Thread Peter Johnson
This is really a question for the Apache mailing list.
but to disable caching remove (or comment out) all directives relating 
to it.

The CacheEnable and CacheDisable work together so that if you did the 
following
CacheEnable /
CacheDisable /foobar

The the caching would be performed on all URIs *except* /foobar.
Are you sure it is Apache and not your browser?
Are you using any servlet caching like OSCache?
How have you configured your clustering? it sounds like you are using 
DNS Round Robin (multiple A entries for a name). How is it getting from 
Apache -> Tomcat (mod_proxy, mod_jk, mod_webapp, mod_jk2, other)?

If you are using DNS RR you will probably find that Apache is caching 
the first lookup and reusing it. So proxying to a DNS RR will give you 
nothing. If this is your setup I would suggest that you use mod_jk2 and 
it's load balancing capabilities but please read through previous posts 
to this list *before* asking a question regarding the config as most 
questions have already been answered numerous times.

Hope that this helps.
PJ
Srinivas Rao Ch wrote:
Hi,

I am running a clustering setup with 2 tomcats and apache WS. My requests
are not going to the proper cluster member( I configured for round robin
behaviour). What's happening is apache is serving me the caching content of
the other Tomcat. This is what I understood from the undesired behaviour.

What all I want to do is I want to disable caching at Apache end. How can I
do it. I don't want any type of caching happening at Apache. I tried using 

CacheDisable /
CacheMaxExpire 0

directives in httpd.conf.

Still I am getting the cached content. How can I stop apache caching the
content.

I appreciate any help.

Regards,
Srinivas

 


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


Re: question

2004-11-11 Thread Peter Johnson
Hi Peter,
Your *application* is "LearningTree" so all class files go into 
LearningTree/WEB-INF/classes

HWS is just a directory. If you want HelloWorldServlet to display there 
as well you'll need to configure a

 in web.xml with /HWS/
PJ
Peter Fogg wrote:
Trying to learn how to develop applications in JSP and servlets. Using 
Tomcat 5.0.28 on Mac OS X v10.3.5.

In web-apps directory created subdirectory LearningTree.
Created and compiled a servlet HelloWorldServlet.class in the 
LearningTree directory.
Moved the class to the LearningTree/WEB-INF/classes directory.
Created the web.xml file with  and  sections.
Set the  to "/".
Started Tomcat
http://8080/LearningTree/HelloWorldServlet works.
Stopped Tomcat.

Created a subdirectory, HWS, of LearningTree directory.
Moved the HelloWorldServlet.fava file into the HWS directory.
Moved the above WEB-INF directory into the HWS directory.
Started Tomcat.
http://8080/LearningTree/HWS/HelloWorldServlet does not work - 
resource not available.
??

Also, can someone point me to a clear and concise explanation of the 
 issue?

Thanks in advance for any help offered.
Peter-
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

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


Re: How to configure jk2 property files...

2004-11-16 Thread Peter Johnson
Troy,
When they are running does 
/global/lunadg/d01/app/tomcat/5.5.4/work/jk2.socket  exist?

Why not just use a TCP socket as it allows for easier separation later 
(i.e. just change IP address).

PJ
Troy Simpson wrote:
This appears to be a common problem in the mail archives.
I have having this same problem and I have not found my answer yet.
I have installed the following:
1. Apache 2.0.52
2. TomCat 5.5.4
3. jk2 Connector.
Apache and Tomcat runs very well independently, but I can not get them 
to work together.

Here is what my workers.properties file looks like:
-
# workers2.properties
# Shared memory handling. Needs to be set.
[shm]
info=Scoreboard. Required for reconfiguration and status with 
multiprocess servers
file=/global/lunadg/d01/app/apache2/2.0.52/logs/shm.file
size=1048576
debug=0
disabled=0

# UNIX domain socket
[channel.un:unixsocket]
file=/global/lunadg/d01/tomcat/5.5.4/work/jk2.socket
debug=0
# define the worker
[ajp13:unixsocket]
channel=channel.un:unixsocket
# Announce a "status" worker
[status:status]
info=Status worker. Displays runtime information.
[uri:/jkstatus/*]
group=status:status
# Uri mapping
[uri:/jsp-examples/*]
worker=ajp13:unixsocket
# Uri mapping for MyFirst
[uri:/MyFirst/*]

Here is what my jk2.properties file looks like:
---
handler.list=apr,request,channelUnix
channelSocket.port=8009
channelUnix.file=/global/lunadg/d01/app/tomcat/5.5.4/work/jk2.socket
serverRoot=/global/lunadg/d01/app/apache2/2.0.52
apr.NativeSo=/global/lunadg/d01/app/apache2/2.0.52/modules/jkjni.so
---
This is what I get in my Apache error_log file:
-
[Tue Nov 16 16:08:11 2004] [notice] Digest: generating secret for 
digest authentication ...
[Tue Nov 16 16:08:11 2004] [notice] Digest: done
[Tue Nov 16 16:08:12 2004] [error] mod_jk child init 1 0
[Tue Nov 16 16:08:12 2004] [notice] Apache/2.0.52 (Unix) mod_jk2/2.0.2 
configured -- resuming normal operations
[Tue Nov 16 16:08:34 2004] [error] channelUn.connect() connect failed 
2 No such file or directory
[Tue Nov 16 16:08:34 2004] [error] ajp13.connect() failed 
ajp13:unixsocket
[Tue Nov 16 16:08:34 2004] [error] ajp13.service() failed to connect 
endpoint errno=2 No such file or directory
[Tue Nov 16 16:08:34 2004] [error] ajp13.service() Error  forwarding 
ajp13:unixsocket 1 1
[Tue Nov 16 16:08:34 2004] [error] mod_jk.handler() Error connecting 
to tomcat 12
[Tue Nov 16 16:08:37 2004] [error] channelUn.connect() connect failed 
2 No such file or directory
[Tue Nov 16 16:08:37 2004] [error] ajp13.connect() failed 
ajp13:unixsocket
[Tue Nov 16 16:08:37 2004] [error] ajp13.service() failed to connect 
endpoint errno=2 No such file or directory
[Tue Nov 16 16:08:37 2004] [error] ajp13.service() Error  forwarding 
ajp13:unixsocket 1 1
[Tue Nov 16 16:08:37 2004] [error] mod_jk.handler() Error connecting 
to tomcat 12
-

And this is what I get my Tomcat catalina.out log:
---
Nov 16, 2004 4:06:18 PM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8666
Nov 16, 2004 4:06:18 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 2932 ms
Nov 16, 2004 4:06:19 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Nov 16, 2004 4:06:19 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.5.4
Nov 16, 2004 4:06:19 PM org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
Nov 16, 2004 4:06:23 PM org.apache.catalina.core.ApplicationContext log
INFO: org.apache.webapp.balancer.BalancerFilter: init(): ruleChain: 
[org.apache.webapp.balancer.RuleChain: 
[org.apache.webapp.balancer.rules.URLStringMatchRule: Target string: 
News / Redirect URL: http://www.cnn.com], 
[org.apache.webapp.balancer.rules.RequestParameterRule: Target param 
name: paramName / Target param value: paramValue / Redirect URL: 
http://www.yahoo.com], 
[org.apache.webapp.balancer.rules.AcceptEverythingRule: Redirect URL: 
http://jakarta.apache.org]]
Nov 16, 2004 4:06:24 PM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
Nov 16, 2004 4:06:24 PM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
Nov 16, 2004 4:06:24 PM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
Nov 16, 2004 4:06:24 PM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
Nov 16, 2004 4:06:25 PM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8666
Nov 16, 2004 4:06:26 PM org.apache.jk.common.ChannelSocket init
INFO: JK2: ajp13 listenin

Re: How to configure jk2 property files...

2004-11-16 Thread Peter Johnson
Troy,
Comments inline ...
Troy Simpson wrote:
PJ,
>>When they are running does 
/global/lunadg/d01/app/tomcat/5.5.4/work/jk2.socket  exist?
I does NOT apear that 
/global/lunadg/d01/app/tomcat/5.5.4/work/jk2.socket does exist.
That's the issue
>>Why not just use a TCP socket as it allows for easier separation 
later (i.e. just change IP address).
At this point, it really does not matter to me.  I just want to figure 
out how to make it work.  I would just presume that a UnixSocket would 
be faster.
In theory it *may* be marginally faster but if you were to use the 
loopback address 127.0.0.1 then the socket is just within the kernel ... 
so should be fast enough for most needs.

Additionally, I wish I could understand the configuration and property 
files.
Have you looked at 
http://jakarta.apache.org/tomcat/connectors-doc/jk2/jk2/confighowto.html
Try the channelSocket option at the top.

Thanks,
Troy
Peter Johnson wrote:
Troy,
When they are running does 
/global/lunadg/d01/app/tomcat/5.5.4/work/jk2.socket  exist?

Why not just use a TCP socket as it allows for easier separation 
later (i.e. just change IP address).

PJ
Troy Simpson wrote:
This appears to be a common problem in the mail archives.
I have having this same problem and I have not found my answer yet.
I have installed the following:
1. Apache 2.0.52
2. TomCat 5.5.4
3. jk2 Connector.
Apache and Tomcat runs very well independently, but I can not get 
them to work together.

Here is what my workers.properties file looks like:
-
# workers2.properties
# Shared memory handling. Needs to be set.
[shm]
info=Scoreboard. Required for reconfiguration and status with 
multiprocess servers
file=/global/lunadg/d01/app/apache2/2.0.52/logs/shm.file
size=1048576
debug=0
disabled=0

# UNIX domain socket
[channel.un:unixsocket]
file=/global/lunadg/d01/tomcat/5.5.4/work/jk2.socket
debug=0
# define the worker
[ajp13:unixsocket]
channel=channel.un:unixsocket
# Announce a "status" worker
[status:status]
info=Status worker. Displays runtime information.
[uri:/jkstatus/*]
group=status:status
# Uri mapping
[uri:/jsp-examples/*]
worker=ajp13:unixsocket
# Uri mapping for MyFirst
[uri:/MyFirst/*]

Here is what my jk2.properties file looks like:
---
handler.list=apr,request,channelUnix
channelSocket.port=8009
channelUnix.file=/global/lunadg/d01/app/tomcat/5.5.4/work/jk2.socket
serverRoot=/global/lunadg/d01/app/apache2/2.0.52
apr.NativeSo=/global/lunadg/d01/app/apache2/2.0.52/modules/jkjni.so
---
This is what I get in my Apache error_log file:
-
[Tue Nov 16 16:08:11 2004] [notice] Digest: generating secret for 
digest authentication ...
[Tue Nov 16 16:08:11 2004] [notice] Digest: done
[Tue Nov 16 16:08:12 2004] [error] mod_jk child init 1 0
[Tue Nov 16 16:08:12 2004] [notice] Apache/2.0.52 (Unix) 
mod_jk2/2.0.2 configured -- resuming normal operations
[Tue Nov 16 16:08:34 2004] [error] channelUn.connect() connect 
failed 2 No such file or directory
[Tue Nov 16 16:08:34 2004] [error] ajp13.connect() failed 
ajp13:unixsocket
[Tue Nov 16 16:08:34 2004] [error] ajp13.service() failed to connect 
endpoint errno=2 No such file or directory
[Tue Nov 16 16:08:34 2004] [error] ajp13.service() Error  forwarding 
ajp13:unixsocket 1 1
[Tue Nov 16 16:08:34 2004] [error] mod_jk.handler() Error connecting 
to tomcat 12
[Tue Nov 16 16:08:37 2004] [error] channelUn.connect() connect 
failed 2 No such file or directory
[Tue Nov 16 16:08:37 2004] [error] ajp13.connect() failed 
ajp13:unixsocket
[Tue Nov 16 16:08:37 2004] [error] ajp13.service() failed to connect 
endpoint errno=2 No such file or directory
[Tue Nov 16 16:08:37 2004] [error] ajp13.service() Error  forwarding 
ajp13:unixsocket 1 1
[Tue Nov 16 16:08:37 2004] [error] mod_jk.handler() Error connecting 
to tomcat 12
-

And this is what I get my Tomcat catalina.out log:
---
Nov 16, 2004 4:06:18 PM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8666
Nov 16, 2004 4:06:18 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 2932 ms
Nov 16, 2004 4:06:19 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Nov 16, 2004 4:06:19 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.5.4
Nov 16, 2004 4:06:19 PM org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
Nov 16, 2004 4:06:23 PM org.apache.catalina.core.ApplicationContext log
INFO: org.apache.webapp.balancer.BalancerFilter: init(): ruleChain: 
[org.apache.webapp.balancer.RuleChain: 
[org.apache.webapp.balancer.rules.URLStringMatchRule: Target string:

Re: high traffic Tomcat sites out there?

2004-11-22 Thread Peter Johnson
Joseph,
Our site runs using Apache (1.3.x) and Tomcat (4.1.x) on 5 servers using 
LVS (www.linuxvirtualserver.org) for load balancing. This setup performs 
over 20M page impressions per month although we do cheat slightly by 
caching the front page every 60s and letting Apache serve it as a static 
page.

In reality you can make a small app run like a mammoth one if the coding 
is poor. On the other hand, with the right planning and coding a mammoth 
app could run like a small one (just consuming more RAM).

The only way to know for you app / environment is to perform some sort 
of testing e.g. httperf.

PJ
LAM Kwun Wa Joseph wrote:
For my Tomcat cluster I'm looking for an upper limit on the estimation of
how much traffic it may face. Say, would thousands of HTTP req/s be too
'astronomical' for a 4-node Dual P4 Xeon cluster to achieve? (I'm talking
about dynamic pages such as stock quotes and news)
Does anyone know of any high traffic JSP/servlet sites(running Tomcat or
similar servlet container)? I'm mostly interested to know what's the
typical "magnitude" of their HTTP throughput (e.g. hundreds or thousands
of HTTP/s) and what kinds of apps are they running.
Joseph Lam
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 

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


Re: How to validate a session created on one server

2004-11-22 Thread Peter Johnson
Use clustering.
Lee Chin Khiong wrote:
How to validate a session created on one server ?
Means if I have an apps running on 1st server then another apps runnning on
the other server, of course I don't want them to re-login.
Any idea ?
 

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


Re: common image practice?

2004-12-02 Thread Peter Johnson
Depending on how many you are talking about you could have a dedicated 
image host (or virtual host) which solely serves images.

PJ
D. Stimits wrote:
I'm looking for a "good" or "best" practice to deal with site-wide 
logo type files...things that will never change, and that every app 
will want access to. This is on linux, but enabling sym links just 
seems to be an admin/backup complexity, and duplicating logos in every 
project also seems wrong. I see the shared directory looks ideal, but 
apparently this is only for classes or libraries. Perhaps a simple 
logo loader class in the shared folder would be most convenient, but I 
have to wonder if loading something as simple as a small logo should 
have to use the overhead of going through a class.

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


Re: Apache locks up

2004-12-06 Thread Peter Johnson
Sounds like a DoS vulnerability and given the age of the software in 
question the best suggestion that can be offered would be to upgrade to 
a minimum of Tomcat 4.1.x and Apache 1.3.x, However, you would be better 
off going to Tomcat 5.0.28 and Apache 2.0.52.

If you are going to need to do some rework to your servlets to get them 
running under Tomcat 5 I would suggest that you focus on getting them 
working under Tomcat 5.5.x and Java 1.5

PJ
Dola Woolfe wrote:
Hi
I'm using Tomcat 3.4 (I think) with Apache 1.2x (I
think) and a mod_jk.dll.
When someone bombards my servlet from a WXP machine
then my Apache server stops responding to that machine
for about 5 minutes. During that span of time, going
to myserver:8080/mywebapp still works!
This does not happen when the bombardment takes place
from a W2K machine.
By bombardment I mean about 1000 sequential requests.
Any ideas on what is going on?
Thank you very much!
Dola Chin
		
__ 
Do you Yahoo!? 
Yahoo! Mail - now with 250MB free storage. Learn more.
http://info.mail.yahoo.com/mail_250

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

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


Re: tomcat 5 and UTF-8 encoding

2004-12-06 Thread Peter Johnson
Sarah,
I recall a post a week or so ago regarding the contentType string losing 
the space after the ;

This may be causing the issue.
PJ
Sarah wrote:
Hi,
  I need to use jsp to display some data in Japanese character from MS SQL 
server database.  I have already set the encoding in jsp to be:
<%@ page language="java" contentType="text/html; charset=UTF-8" %> 

If I use tomcat version 5.0.18, then the japanese character is displayed correctly.  However, if I 
use 5.0.28 or 5.5.4, the characters are something like "???".  If I right click the html 
page generated from jsp on the above versions, I can see the encoding to be Western instead of 
"UTF-8" like what happened with 5.0.18.  Does anyone know what cause this problem and if 
any configuration of Tomcat needs to be made.  Thank you very much for your help.
Sarah
		
-
Do you Yahoo!?
Read only the mail you want - Yahoo! Mail SpamGuard.
 

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


Re: simplest way to cache jsp pages into built "static" files?

2004-12-07 Thread Peter Johnson
I was looking into this option as well but one must be careful about 
session IDs if they are used as the cached page will contain the cookie 
header.

We use a background process on the server to generate files every 60s 
and use a "-s" rewrite condition and then rewrite rule to serve.

PJ
Tim Funk wrote:
Have your JSP provide some expiration data headers and then mod_cache 
might do the trick ...

http://httpd.apache.org/docs-2.1/mod/mod_cache.html
-Tim
Mieke Banderas wrote:
What's the simplest way of caching jsp-generated pages, built by Tomcat
4, so that Apache 2 serves most of these (except a few) as static (but
rebuildable) pages even as the address ends in ".jsp"? The exception
being when the dynamic portion of a page needs to be built just right
after the page is requested. A typical Blogpage could work better with
this scenario, I suppose many Blogs work like that.
What technologies and/or methods would be a good idea to look at? I 
don't want to spend money for licenses at this stage as there is none
or at least close to that. Also, it should be as simple and non
demanding, concerning setup and hardware, as can be without compromising
basic functionality.

If you know a good article, online resource or book on the subject or if
you otherwise can advice, I'd be very interested to know. Deployment 
will
probably be on Mac OS X Server 10.2.6 and Apache 2.0.48 with Tomcat 
4.1.24.

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


Re: simplest way to cache jsp pages into built "static" files?

2004-12-07 Thread Peter Johnson
Thought of that as well but wasn't sure how to accomodate "built" pages 
i.e. with includes etc so I ended up with an output filter to store and 
an input filter to serve. Now what if you don't want Tomcat to serve but 
rather Apache. Well the output filter would simply need to write to disk 
where Apache can serve. Ahhh but then how do future requests come 
through to Tomcat to trigger the regeneration?  ... In the end I decided 
that all requests from logged in users would be dynamic and any content 
updates would perform the fs writing as part of the update process.

This is a tough one that could be solved by mod_cache at the Apache 
level iff header exclusions could be specified.

Parsons Technical Services wrote:
Warning, I am going to twist things around a bit here.
What if you wrote the pages that were to be cached as servlets.
These would run in the background and regenerate the page at a set 
interval. The page is stored in a servlet as a string and served out 
whenever the servlet receives a matching request.

For stored pages the path would be www.xxx.com/store/somepage.jsp
The servlet located in the store path would use the name of the 
requested page minus the .jsp to select the proper stored string and 
serve it back as the page.

So servlet named Junk in place of junk.jsp would create the page on an 
interval and put it in the servlet called Store as a string named 
junk, located in the /store path. When a request comes in for 
www.xxx.com/store/junk.jsp the request is sent to Store as is all 
/store/jsp request via the mappings. Store then strips the .jsp and 
uses the name to retrieve the string in the field named junk. In my 
case it is only the body of the page but could be as much or little of 
the page as desired.

Hope I didn't confuse things too much.
Doug
www.parsonstechnical.com
- Original Message - From: "Peter Johnson" 
<[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Tuesday, December 07, 2004 5:18 PM
Subject: Re: simplest way to cache jsp pages into built "static" files?


I was looking into this option as well but one must be careful about 
session IDs if they are used as the cached page will contain the 
cookie header.

We use a background process on the server to generate files every 60s 
and use a "-s" rewrite condition and then rewrite rule to serve.

PJ
Tim Funk wrote:
Have your JSP provide some expiration data headers and then 
mod_cache might do the trick ...

http://httpd.apache.org/docs-2.1/mod/mod_cache.html
-Tim
Mieke Banderas wrote:
What's the simplest way of caching jsp-generated pages, built by 
Tomcat
4, so that Apache 2 serves most of these (except a few) as static (but
rebuildable) pages even as the address ends in ".jsp"? The exception
being when the dynamic portion of a page needs to be built just right
after the page is requested. A typical Blogpage could work better with
this scenario, I suppose many Blogs work like that.

What technologies and/or methods would be a good idea to look at? I 
don't want to spend money for licenses at this stage as there is none
or at least close to that. Also, it should be as simple and non
demanding, concerning setup and hardware, as can be without 
compromising
basic functionality.

If you know a good article, online resource or book on the subject 
or if
you otherwise can advice, I'd be very interested to know. 
Deployment will
probably be on Mac OS X Server 10.2.6 and Apache 2.0.48 with Tomcat 
4.1.24.

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


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


Re: Tomcat Administration Application

2004-12-13 Thread Peter Johnson
I have 5.5.4 and the admin apps tree navigation appears unusable. Could 
it have something to do with the following

DEBUG http-8080-Processor25 org.apache.struts.util.ModuleUtils - Get 
module name for path /setUpTree.do
DEBUG http-8080-Processor25 org.apache.struts.util.ModuleUtils - Module 
name found: default
DEBUG http-8080-Processor25 org.apache.struts.action.RequestProcessor - 
Processing a 'GET' for path '/setUpTree'
DEBUG http-8080-Processor25 org.apache.struts.action.RequestProcessor 
-  Looking for Action instance for class 
org.apache.webapp.admin.SetUpTreeAction
DEBUG http-8080-Processor25 org.apache.struts.action.RequestProcessor 
-   Returning existing Action instance

DEBUG http-8080-Processor25 org.apache.struts.action.RequestProcessor - 
processForwardConfig(ForwardConfig[name=Tree Control 
Test,path=/tree-control-test.jsp,redirect=false,contextRelative=false,module=null])
DEBUG http-8080-Processor25 
org.apache.catalina.core.ApplicationDispatcher - 
servletPath=/tree-control-test.jsp, pathInfo=null, queryString=null, 
name=null

The tree link is also http://localhost:8080/admin/treeControlTest.do?tree=
It is the "Test" bit that has me wondering. Clicking the above link 
generates

DEBUG http-8080-Processor23 org.apache.struts.util.ModuleUtils - Get 
module name for path /treeControlTest.do
DEBUG http-8080-Processor23 org.apache.struts.util.ModuleUtils - Module 
name found: default
DEBUG http-8080-Processor23 org.apache.struts.action.RequestProcessor - 
Processing a 'GET' for path '/treeControlTest'
DEBUG http-8080-Processor23 org.apache.struts.action.RequestProcessor 
-  Looking for Action instance for class 
org.apache.webapp.admin.TreeControlTestAction
DEBUG http-8080-Processor23 org.apache.struts.action.RequestProcessor 
-   Returning existing Action instance
INFO http-8080-Processor23 
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/admin] - 
action: Entered TreeControlTestAction:perform()
INFO http-8080-Processor23 
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/admin] - 
action: Entered TreeControlTestAction:perform()
INFO http-8080-Processor23 
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/admin] - 
action: Tree expand/contract on
INFO http-8080-Processor23 
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/admin] - 
action: Tree expand/contract on
DEBUG http-8080-Processor23 org.apache.struts.action.RequestProcessor - 
processForwardConfig(ForwardConfig[name=Tree Control 
Test,path=/tree-control-test.jsp,redirect=false,contextRelative=false,module=null])
DEBUG http-8080-Processor23 
org.apache.catalina.core.ApplicationDispatcher - 
servletPath=/tree-control-test.jsp, pathInfo=null, queryString=null, 
name=null
DEBUG http-8080-Processor23 
org.apache.catalina.core.ApplicationDispatcher - 
servletPath=/tree-control-test.jsp, pathInfo=null, queryString=null, 
name=null

Has someone been playing / trying something and checked in the "testing" 
version somewhere?

PJ
Kelly, Steve wrote:
James,
Thanks for that. That's done the trick. Dunno why there was not a valid
admin.xml file as there is on the Windows install.
However, I still have a problem. I'd expect to see a tree a bit like
this when I get into the admin application:
Tomcat Server
   Service (Catalina)
   Host (localhost)
   Context (/)
   Context (/admin)
   Context (/manager) 
   Etc

But I just see as far down as Service(Catalina).
Any clues.
TIA
Steve. 

-Original Message-
From: Montz, James C. (James Tower) [mailto:[EMAIL PROTECTED] 
Sent: 13 December 2004 15:54
To: Tomcat Users List
Subject: RE: Tomcat Administration Application

Bare with me, I usually work with Tomcat 4.5 on Linux. My first stab at
Tomcat 5.5 is on Windows.
Anyway, was looking at the files for the tar.gz release of the admin
tools.
Verify that you do indeed have a conf\Catalina\localhost\admin.xml
(double check file permissions as well) This is what re-maps requests
for /admin to \server\webapps\admin.
To me, it does not appear to have a  proper context path specified?
Is the context mapping assumed?  Based on the name of the file?
If required? Modify conf\Catalina\localhost\admin.xml with a path, like
so;

antiJARLocking="false">


This should override the generic page in \webapps\ROOT\admin\
-Original Message-
From: Kelly, Steve [mailto:[EMAIL PROTECTED] 
Sent: Friday, December 10, 2004 2:52 PM
To: Tomcat Users List
Subject: RE: Tomcat Administration Application

James,
I'm on RedHat Linux V9. Everything (tomcat and the admin package) is
installed in the jakarta-tomcat-5.5.4 directory. 

Even if I undeploy the admin application and then deploy it specifying
the $CATALINA_HOME/server/webapps/admin directory I still get the same
same message telling me to download and install the separate admin
application.
There must be something (can anyone tell me what?) pointing /admin to
the web page that displays this message.
Steve.
-Origi

Re: Tomcat Administration Application

2004-12-13 Thread Peter Johnson
Ok so it looks like it has always been called test
PJ
Peter Johnson wrote:
I have 5.5.4 and the admin apps tree navigation appears unusable. 
Could it have something to do with the following

DEBUG http-8080-Processor25 org.apache.struts.util.ModuleUtils - Get 
module name for path /setUpTree.do
DEBUG http-8080-Processor25 org.apache.struts.util.ModuleUtils - 
Module name found: default
DEBUG http-8080-Processor25 org.apache.struts.action.RequestProcessor 
- Processing a 'GET' for path '/setUpTree'
DEBUG http-8080-Processor25 org.apache.struts.action.RequestProcessor 
-  Looking for Action instance for class 
org.apache.webapp.admin.SetUpTreeAction
DEBUG http-8080-Processor25 org.apache.struts.action.RequestProcessor 
-   Returning existing Action instance

DEBUG http-8080-Processor25 org.apache.struts.action.RequestProcessor 
- processForwardConfig(ForwardConfig[name=Tree Control 
Test,path=/tree-control-test.jsp,redirect=false,contextRelative=false,module=null]) 

DEBUG http-8080-Processor25 
org.apache.catalina.core.ApplicationDispatcher - 
servletPath=/tree-control-test.jsp, pathInfo=null, queryString=null, 
name=null

The tree link is also 
http://localhost:8080/admin/treeControlTest.do?tree=

It is the "Test" bit that has me wondering. Clicking the above link 
generates

DEBUG http-8080-Processor23 org.apache.struts.util.ModuleUtils - Get 
module name for path /treeControlTest.do
DEBUG http-8080-Processor23 org.apache.struts.util.ModuleUtils - 
Module name found: default
DEBUG http-8080-Processor23 org.apache.struts.action.RequestProcessor 
- Processing a 'GET' for path '/treeControlTest'
DEBUG http-8080-Processor23 org.apache.struts.action.RequestProcessor 
-  Looking for Action instance for class 
org.apache.webapp.admin.TreeControlTestAction
DEBUG http-8080-Processor23 org.apache.struts.action.RequestProcessor 
-   Returning existing Action instance
INFO http-8080-Processor23 
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/admin] 
- action: Entered TreeControlTestAction:perform()
INFO http-8080-Processor23 
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/admin] 
- action: Entered TreeControlTestAction:perform()
INFO http-8080-Processor23 
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/admin] 
- action: Tree expand/contract on
INFO http-8080-Processor23 
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/admin] 
- action: Tree expand/contract on
DEBUG http-8080-Processor23 org.apache.struts.action.RequestProcessor 
- processForwardConfig(ForwardConfig[name=Tree Control 
Test,path=/tree-control-test.jsp,redirect=false,contextRelative=false,module=null]) 

DEBUG http-8080-Processor23 
org.apache.catalina.core.ApplicationDispatcher - 
servletPath=/tree-control-test.jsp, pathInfo=null, queryString=null, 
name=null
DEBUG http-8080-Processor23 
org.apache.catalina.core.ApplicationDispatcher - 
servletPath=/tree-control-test.jsp, pathInfo=null, queryString=null, 
name=null

Has someone been playing / trying something and checked in the 
"testing" version somewhere?

PJ
Kelly, Steve wrote:
James,
Thanks for that. That's done the trick. Dunno why there was not a valid
admin.xml file as there is on the Windows install.
However, I still have a problem. I'd expect to see a tree a bit like
this when I get into the admin application:
Tomcat Server
   Service (Catalina)
   Host (localhost)
   Context (/)
   Context (/admin)
   Context (/manager)Etc
But I just see as far down as Service(Catalina).
Any clues.
TIA
Steve.
-Original Message-
From: Montz, James C. (James Tower) [mailto:[EMAIL PROTECTED] 
Sent: 13 December 2004 15:54
To: Tomcat Users List
Subject: RE: Tomcat Administration Application

Bare with me, I usually work with Tomcat 4.5 on Linux. My first stab at
Tomcat 5.5 is on Windows.
Anyway, was looking at the files for the tar.gz release of the admin
tools.
Verify that you do indeed have a conf\Catalina\localhost\admin.xml
(double check file permissions as well) This is what re-maps requests
for /admin to \server\webapps\admin.
To me, it does not appear to have a  proper context path specified?
Is the context mapping assumed?  Based on the name of the file?
If required? Modify conf\Catalina\localhost\admin.xml with a path, like
so;

antiJARLocking="false">


This should override the generic page in \webapps\ROOT\admin\
-Original Message-
From: Kelly, Steve [mailto:[EMAIL PROTECTED] Sent: 
Friday, December 10, 2004 2:52 PM
To: Tomcat Users List
Subject: RE: Tomcat Administration Application

James,
I'm on RedHat Linux V9. Everything (tomcat and the admin package) is
installed in the jakarta-tomcat-5.5.4 directory.
Even if I undeploy the admin application and then deploy it specifying
the $CATALINA_HOME/server/webapps/admin directory I still get the same
same message telling me to download and 

Re: Tomcat Administration Application

2004-12-13 Thread Peter Johnson
Ok so it looks like it has always been called test
PJ
Peter Johnson wrote:
I have 5.5.4 and the admin apps tree navigation appears unusable. 
Could it have something to do with the following

DEBUG http-8080-Processor25 org.apache.struts.util.ModuleUtils - Get 
module name for path /setUpTree.do
DEBUG http-8080-Processor25 org.apache.struts.util.ModuleUtils - 
Module name found: default
DEBUG http-8080-Processor25 org.apache.struts.action.RequestProcessor 
- Processing a 'GET' for path '/setUpTree'
DEBUG http-8080-Processor25 org.apache.struts.action.RequestProcessor 
-  Looking for Action instance for class 
org.apache.webapp.admin.SetUpTreeAction
DEBUG http-8080-Processor25 org.apache.struts.action.RequestProcessor 
-   Returning existing Action instance

DEBUG http-8080-Processor25 org.apache.struts.action.RequestProcessor 
- processForwardConfig(ForwardConfig[name=Tree Control 
Test,path=/tree-control-test.jsp,redirect=false,contextRelative=false,module=null]) 

DEBUG http-8080-Processor25 
org.apache.catalina.core.ApplicationDispatcher - 
servletPath=/tree-control-test.jsp, pathInfo=null, queryString=null, 
name=null

The tree link is also 
http://localhost:8080/admin/treeControlTest.do?tree=

It is the "Test" bit that has me wondering. Clicking the above link 
generates

DEBUG http-8080-Processor23 org.apache.struts.util.ModuleUtils - Get 
module name for path /treeControlTest.do
DEBUG http-8080-Processor23 org.apache.struts.util.ModuleUtils - 
Module name found: default
DEBUG http-8080-Processor23 org.apache.struts.action.RequestProcessor 
- Processing a 'GET' for path '/treeControlTest'
DEBUG http-8080-Processor23 org.apache.struts.action.RequestProcessor 
-  Looking for Action instance for class 
org.apache.webapp.admin.TreeControlTestAction
DEBUG http-8080-Processor23 org.apache.struts.action.RequestProcessor 
-   Returning existing Action instance
INFO http-8080-Processor23 
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/admin] 
- action: Entered TreeControlTestAction:perform()
INFO http-8080-Processor23 
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/admin] 
- action: Entered TreeControlTestAction:perform()
INFO http-8080-Processor23 
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/admin] 
- action: Tree expand/contract on
INFO http-8080-Processor23 
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/admin] 
- action: Tree expand/contract on
DEBUG http-8080-Processor23 org.apache.struts.action.RequestProcessor 
- processForwardConfig(ForwardConfig[name=Tree Control 
Test,path=/tree-control-test.jsp,redirect=false,contextRelative=false,module=null]) 

DEBUG http-8080-Processor23 
org.apache.catalina.core.ApplicationDispatcher - 
servletPath=/tree-control-test.jsp, pathInfo=null, queryString=null, 
name=null
DEBUG http-8080-Processor23 
org.apache.catalina.core.ApplicationDispatcher - 
servletPath=/tree-control-test.jsp, pathInfo=null, queryString=null, 
name=null

Has someone been playing / trying something and checked in the 
"testing" version somewhere?

PJ
Kelly, Steve wrote:
James,
Thanks for that. That's done the trick. Dunno why there was not a valid
admin.xml file as there is on the Windows install.
However, I still have a problem. I'd expect to see a tree a bit like
this when I get into the admin application:
Tomcat Server
   Service (Catalina)
   Host (localhost)
   Context (/)
   Context (/admin)
   Context (/manager)Etc
But I just see as far down as Service(Catalina).
Any clues.
TIA
Steve.
-Original Message-
From: Montz, James C. (James Tower) [mailto:[EMAIL PROTECTED] 
Sent: 13 December 2004 15:54
To: Tomcat Users List
Subject: RE: Tomcat Administration Application

Bare with me, I usually work with Tomcat 4.5 on Linux. My first stab at
Tomcat 5.5 is on Windows.
Anyway, was looking at the files for the tar.gz release of the admin
tools.
Verify that you do indeed have a conf\Catalina\localhost\admin.xml
(double check file permissions as well) This is what re-maps requests
for /admin to \server\webapps\admin.
To me, it does not appear to have a  proper context path specified?
Is the context mapping assumed?  Based on the name of the file?
If required? Modify conf\Catalina\localhost\admin.xml with a path, like
so;

antiJARLocking="false">


This should override the generic page in \webapps\ROOT\admin\
-Original Message-
From: Kelly, Steve [mailto:[EMAIL PROTECTED] Sent: 
Friday, December 10, 2004 2:52 PM
To: Tomcat Users List
Subject: RE: Tomcat Administration Application

James,
I'm on RedHat Linux V9. Everything (tomcat and the admin package) is
installed in the jakarta-tomcat-5.5.4 directory.
Even if I undeploy the admin application and then deploy it specifying
the $CATALINA_HOME/server/webapps/admin directory I still get the same
same message telling me to download and 

Re: Load Balancing ..

2005-04-28 Thread Peter Johnson
Not exactly. Apache itself can't do load balancing. You could use a 
dedicated Tomcat instance to loadbalance to backend Tomcats in the same 
way as you described using Apache however either way you are still left 
with a single point of failure. Neither Tomcat nor Apache can 
loadbalance by themselves for various reasons including issues with IP 
address sharing a MAC address caching.

David Whitehurst wrote:
Am I correct that Tomcat is not setup to do load balancing without the 
use of an Apache fronting?  The mod_jk module is the best way to 
load-balance requests on multiple servers using the Tomcat container, 
either standalone or embedded in JBoss?

David L. Whitehurst
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


JDBC Persisted Sessions

2005-06-22 Thread Peter Johnson

Hi All,

Does anyone have a working config for JDBC persisted sessions that I 
could look at as the information in the docs seems a little disjointed.


Also, for those that have it working, what has been their experience 
with it?


Thanks,
Peter Johnson

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



Re: JDBC Persisted Sessions

2005-06-22 Thread Peter Johnson
I can get a session to persist but there is a delay. Is there a way of 
forcing Tomcat to flush the session to the DB on every change? The goal 
is use the DB for session replication rather than multicasting.


Thanks,
Peter Johnson

Peter Johnson wrote:


Hi All,

Does anyone have a working config for JDBC persisted sessions that I 
could look at as the information in the docs seems a little disjointed.


Also, for those that have it working, what has been their experience 
with it?


Thanks,
Peter Johnson

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



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



NPE on cluster start

2005-07-10 Thread Peter Johnson

Hi All,

I am getting an NPE on cluster start with 5.0.30-beta  any ideas?

ERROR main org.apache.catalina.cluster.tcp.SimpleTcpCluster - Unable to 
start cluster.

java.lang.NullPointerException
   at 
org.apache.commons.beanutils.MethodUtils.invokeMethod(MethodUtils.java:160)
   at 
org.apache.commons.beanutils.MethodUtils.invokeMethod(MethodUtils.java:114)
   at 
org.apache.catalina.cluster.tcp.SimpleTcpCluster.start(SimpleTcpCluster.java:406)
   at 
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1073)
   at 
org.apache.catalina.core.StandardHost.start(StandardHost.java:789)
   at 
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083)
   at 
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:478)
   at 
org.apache.catalina.core.StandardService.start(StandardService.java:480)
   at 
org.apache.catalina.core.StandardServer.start(StandardServer.java:2313)

   at org.apache.catalina.startup.Catalina.start(Catalina.java:556)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

   at java.lang.reflect.Method.invoke(Method.java:324)
   at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:287)
   at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:425)
ERROR main org.apache.catalina.startup.Catalina - Catalina.start:
LifecycleException:  java.lang.NullPointerException
   at 
org.apache.catalina.cluster.tcp.SimpleTcpCluster.start(SimpleTcpCluster.java:433)
   at 
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1073)
   at 
org.apache.catalina.core.StandardHost.start(StandardHost.java:789)
   at 
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083)
   at 
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:478)
   at 
org.apache.catalina.core.StandardService.start(StandardService.java:480)
   at 
org.apache.catalina.core.StandardServer.start(StandardServer.java:2313)

   at org.apache.catalina.startup.Catalina.start(Catalina.java:556)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

   at java.lang.reflect.Method.invoke(Method.java:324)
   at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:287)
   at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:425)


Thanks in advance,
PJ

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



Re: NPE on cluster start

2005-07-10 Thread Peter Johnson

Hi Sivaram,

I had something similar but it nolonger works in 5.0.30-beta ... it 
seems to need to be in a format like below. This at least tries to start 
even if it NPEs.



serviceclass="org.apache.catalina.cluster.mcast.McastService"

mcastAddr="239.192.42.4"
mcastPort="45564"
mcastFrequency="500"
mcastDropTime="3000"
tcpThreadCount="6"
tcpListenAddress="auto"
tcpListenPort="4001"
tcpSelectorTimeout="100"
printToScreen="false"
expireSessionsOnShutdown="false"/>

   

PJ

Sivaram Kumar wrote:


Hi peter,
 for you information this is my cluster code.it working fine for me.



   

   

   

   




- Original Message -
From: "Peter Johnson" <[EMAIL PROTECTED]>
To: "Tomcat Users List" 
Sent: Monday, July 11, 2005 3:02 PM
Subject: NPE on cluster start


 


Hi All,

I am getting an NPE on cluster start with 5.0.30-beta  any ideas?

ERROR main org.apache.catalina.cluster.tcp.SimpleTcpCluster - Unable to
start cluster.
java.lang.NullPointerException
   at

   


org.apache.commons.beanutils.MethodUtils.invokeMethod(MethodUtils.java:160)
 


   at

   


org.apache.commons.beanutils.MethodUtils.invokeMethod(MethodUtils.java:114)
 


   at

   


org.apache.catalina.cluster.tcp.SimpleTcpCluster.start(SimpleTcpCluster.java
:406)
 


   at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1073)
   at
org.apache.catalina.core.StandardHost.start(StandardHost.java:789)
   at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083)
   at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:478)
   at
org.apache.catalina.core.StandardService.start(StandardService.java:480)
   at
org.apache.catalina.core.StandardServer.start(StandardServer.java:2313)
   at org.apache.catalina.startup.Catalina.start(Catalina.java:556)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at

   


sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)
 


   at

   


sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
 


   at java.lang.reflect.Method.invoke(Method.java:324)
   at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:287)
   at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:425)
ERROR main org.apache.catalina.startup.Catalina - Catalina.start:
LifecycleException:  java.lang.NullPointerException
   at

   


org.apache.catalina.cluster.tcp.SimpleTcpCluster.start(SimpleTcpCluster.java
:433)
 


   at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1073)
   at
org.apache.catalina.core.StandardHost.start(StandardHost.java:789)
   at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083)
   at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:478)
   at
org.apache.catalina.core.StandardService.start(StandardService.java:480)
   at
org.apache.catalina.core.StandardServer.start(StandardServer.java:2313)
   at org.apache.catalina.startup.Catalina.start(Catalina.java:556)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at

   


sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)
 


   at

   


sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
 


   at java.lang.reflect.Method.invoke(Method.java:324)
   at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:287)
   at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:425)


Thanks in advance,
PJ

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

   




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

 



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



Re: Synchronizing properties in cluster setup

2004-12-21 Thread Peter Johnson
Hi Srinivas,
What you are after is a shared / networked filesystem like NFS Coda for 
*nix.

PJ
Srinivas Rao Ch wrote:
Hi,

I successfully configured my clustering setup with mod_jk2 and it is running
fine. Now the problem is I have some properties files in my tomcat web
application which gets modified when some features are accessed. If some
changes are there in one cluster member, I have to update the same in other
members also.

And, I have a folder of icons which gets changed when client uploads new
icon in to the system. I have to synchronize this folder also across all the
cluster members. Can somebody suggest me how I can do this with the setup I
have(Apache 2.0.52 + Tomcat 5.0.16 + mod_jk2).

Is there any service already available to sync the resources like these?

Regards,
Srinivas
 

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


Re: Tomcat Administration Tool

2005-01-05 Thread Peter Johnson
The admin app appears to be broken in 5.5.4. I have tried 5.5.6 but it 
also seems to be having issues commiting changes. If you are just 
starting out try using 5.0.30 which is likely to be voted stable next week.

PJ
Troy Simpson wrote:
I am using Tomcat 5.5.4 with jdk1.5.0_01.
I am currently reading a book about Tomcat 5.
Title: "Professional Apache Tomcat 5"
ISBN: 0-7645-5902-8
According to page 53 "Chapter 5, Basic Tomcat Configuration" it shows
the node "Service (Catalina)" expanded to view view and edit
Connectors, Hosts, Logger for Service, and Realm for Service.
But I am unable to expand the node beyond "Service (Catalinia) to show
the Connectors, Host, etc.  Is this a bug in the Tomcat Administration
Tool.
Here is a pic of what I see:
http://www4.ncsu.edu/~tdsimpso/tmp/admintool.gif
Although, I see an icon to allow me to expand the "Service (Catalina)
node, I am unable to.
Thanks,
Troy
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 

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


Re: Max of two connections per client?

2005-01-11 Thread Peter Johnson
I think that is HTTP/1.1 for you ... but the details are a little foggy
PJ
Hunt, Joseph (OVBU- Ft.Collins) wrote:
Ladies and Gentlemen,
I have created an html document that contains several s
that all refer to the same JSP page.  The JSP simply
waits(Thread.sleep()) 5 seconds and then returns some text.  When I open
the html document in either IE or Mozilla after 5 seconds I see the
first two iframes load, then 5 seconds later, I see the next two, etc.
I am using the default config params on tomcat 5.0.28 on Win XP
Pro.  If I understand them correctly, I should have between 25
(minSpareThreads) and 150(maxSpareTreads) threads available.  Why do the
requests wait for the previous to complete as if there are only two
threads handling the requests?
In my research, I have noticed that connecting from other
machines, I get two concurrent requests per machine.  For example, if I
open the html page on three machines simultaneously, it appears that I
have 6 threads in tomcat working.  But I am always restricted to two
concurrent requests per client.  I have also noticed that if I use both
IE and Mozilla on the same machine, I am able to get at most 4
consecutive requests.  Again 2 requests from each browser.  If I open 3
IE browsers on the same machine I see the updates happen two at a time
across all the browsers.
Is there some piece of configuration that I am missing?  Where
is this two concurrent requests coming from?
BTW it does not appear to be the browser that is dispatching only two
requests.  I can add any number of additional Iframes pointing to
non-tomcat sites and they seem to begin loading immediately.
Thanks,
Joe Hunt
HP OpenView 
(970)898-6402

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

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


Re: Max of two connections per client?

2005-01-11 Thread Peter Johnson
Joe,
What I am saying is that from memory I believe that it is a 
specification of the HTTP protocol that no more than two concurrent 
connections are opened to any one host. The purpose is to limit the 
potential load on the server and it's network socket pool.

I.e. Given a server has about 65000 free sockets at it's disposal and 
someone poorly designed a page which had 100 images and the server came 
under the Slashdot effect of >650 concurrent users then the server would 
exhaust all it's available sockets if each browser was allowed to make a 
connection per image.
(Yes: these figures are rough as no CSS or HTML content requests have 
been taken into account and a page with 100 images is quite unlikely)

However, I could be going down completely the wrong path here. You might 
want to do a little research on it yourself.

PJ
Hunt, Joseph (OVBU- Ft.Collins) wrote:
PJ,
I'm not sure what you are suggesting, but I did try turning off
HTTP 1.1 in IE and still get the same behavior.
Thanks,
Joe Hunt 

 

-Original Message-----
From: Peter Johnson [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, January 11, 2005 2:48 PM
To: Tomcat Users List
Subject: Re: Max of two connections per client?

I think that is HTTP/1.1 for you ... but the details are a 
little foggy

PJ
Hunt, Joseph (OVBU- Ft.Collins) wrote:
   

Ladies and Gentlemen,
	I have created an html document that contains several 
 

s that 
   

all refer to the same JSP page.  The JSP simply
waits(Thread.sleep()) 5 seconds and then returns some text.  When I 
open the html document in either IE or Mozilla after 5 seconds I see 
the first two iframes load, then 5 seconds later, I see the 
 

next two, etc.
   

	I am using the default config params on tomcat 5.0.28 
 

on Win XP Pro.  
   

If I understand them correctly, I should have between 25
(minSpareThreads) and 150(maxSpareTreads) threads available.  Why do 
the requests wait for the previous to complete as if there 
 

are only two 
   

threads handling the requests?
	In my research, I have noticed that connecting from 
 

other machines, I 
   

get two concurrent requests per machine.  For example, if I open the 
html page on three machines simultaneously, it appears that I have 6 
threads in tomcat working.  But I am always restricted to two 
concurrent requests per client.  I have also noticed that if 
 

I use both 
   

IE and Mozilla on the same machine, I am able to get at most 4 
consecutive requests.  Again 2 requests from each browser.  
 

If I open 3 
   

IE browsers on the same machine I see the updates happen two 
 

at a time 
   

across all the browsers.
	Is there some piece of configuration that I am missing? 
 

Where is this 
   

two concurrent requests coming from?
BTW it does not appear to be the browser that is dispatching 
 

only two 
   

requests.  I can add any number of additional Iframes pointing to 
non-tomcat sites and they seem to begin loading immediately.

Thanks,
Joe Hunt
HP OpenView
(970)898-6402
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

 

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

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

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


Re: Cluster and Connection Pooling problem

2005-02-21 Thread Peter Johnson
Define the connection pool in either META-INF/context.xml (if using a 
WAR) or ${catalina_home}/conf///.xml

And the link by the usual resource ref in the web.xml
Remember that the JDBC drivers need to be in common/lib
PJ
Sumpter, Chuck wrote:
Environment =  Tomcat 5.5.7,  Java 1.5_01, IIS (win2k) using the isapi
redirector. 


Problem:  


Using the scenario outlined by Graham King
(http://www.javaworld.com/javaworld/jw-12-2004/jw-1220-tomcat.html ), a
simple cluster is easily configured.  However, when attempting to deploy
our application, I run into a wall attempting to get things in the
proper order regarding the connection pooling needed by the application.
The application's error log indicates that the connection pooling parms
are not really being read in the server.xml. 


What is the conflict?  Anyone else encountered this?  I hesitate to
supply xml in this forum if someone else has encountered this problem 


TIA 


Chuck 

 

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


Re: ?? Does META-INF/context.xml Work ??

2005-02-21 Thread Peter Johnson
the META-INF is only valid within a WAR file.
PJ
Tony LaPaso wrote:
All,
I'm using TC 5.0.30.
I'm looking at this quote regarding META-INF/context.xml from the TC docs
(http://jakarta.apache.org/tomcat/tomcat-5.0-doc/config/context.html):
"Instead, put them in the META-INF/context.xml directory of your WAR 
file or
the conf directory as described above."

These instruction, by my interpretation, are saying we can arrange a web
application's directory structure like this:
ROOT/
  |
  |
  + WEB-INF/
  + META-INF/
   |
   |
   + context.xml
Context.xml would then contain the  element.
Has anyone gotten this to work? When I arrange my directory structure as
shown above it seems the Context.xml file is simply ignored.
I'm not using a WAR file, this is just the directory structure.
I hope someone can try this -- arrange your directory structure as shown
above and make sure your context.xml is being processed. Mine is not. 
If I
put the context.xml in "$CATALINA_BASE/conf/[enginename]/[hostname]/",
however, it is picked up just fine.



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


Re: how to harden tomcat?

2005-02-23 Thread Peter Johnson
I haven't really come across hardening documents for Tomcat or any Java 
container for that matter. That is probably because Java by design is 
relatively secure as it runs within a virtual machine so it isn't 
possible to escape code etc and breakout into the OS kernel space.

So basically run Tomcat as a specific user and tune the filesystem 
parameters to only allow access to the resources it needs (standard 
approach for every app Java or not). Now focus all your attention on the 
application code (not Tomcat but the webapp) make sure all database 
interactions are escaped properly etc etc etc

One thing to look out for would be the use of JNI i.e. native calls. I'm 
not sure if there is a way of preventing someone from packaging a .so in 
a WAR and then loading it in to the app via code to bypass the lack of 
LD_LIBRARY_PATH (on *nix).

The authentication / authorisation stuff (e.g. realms) is all to do with 
access to webapps.

If you come across anything else I would be interested to know about it, 
especially if it is to do with securing Java in general.

PJ
Patrick Lacson wrote:
Specifically authoritative articles on how to do this.. would be
greatly appreciated.

On Wed, 23 Feb 2005 11:24:12 -0800, Patrick Lacson <[EMAIL PROTECTED]> wrote:
 

Does anybody have any links/documents on how to harden tomcat?
thanks,
--
Patrick
   


 

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


Oracle DBCP in Tomcat 4

2005-03-01 Thread Peter Johnson
Hi All,
Just wondering if I could borrow ppls eyes to see if someone else can 
spot what I've missed

 common/lib/ --
activation.jar
commons-collections.jar
commons-pool-1.1.jar
jdbc2_0-stdext.jar
jta.jar   
naming-factory.jar
ant.jar
commons-dbcp-1.1.jar
jasper-compiler.jar
jdom.jar
mail.jar
naming-resources.jar
classes12.jar
commons-logging-api.jar
jasper-runtime.jar
jndi.jar
naming-common.jar
servlet.jar

--- server.xml --
 
   
   
   
   factory
   org.apache.commons.dbcp.BasicDataSourceFactory
   
   
   driverClassName
   oracle.jdbc.driver.OracleDriver
   
   
   url
   jdbc:oracle:thin:@db:1521:db
   
   
   username
   foo
   
   
   password
   bar
   
   
   maxActive
   5
   
   
   maxIdle
   1
   
   
   maxWait
   -1
   
   
 

--- web.xml --
   
   Oracle Database
   jdbc/oracle
   javax.sql.DataSource
   Container
   
--- the error 
SEVERE: Parse Error at line 80 column 11: The content of element type 
"web-app" must match 
"(icon?,display-name?,description?,distributable?,context-param*,filter*,filter-mapping*,listener*,servlet*,servlet-mapping*,session-config?,mime-mapping*,welcome-file-list?,error-page*,taglib*,resource-env-ref*,resource-ref*,security-constraint*,login-config?,security-role*,env-entry*,ejb-ref*,ejb-local-ref*)".

Line 80 is  in the web.xml. Removing the resource-ref allows 
the app to load.
I am sure it is simple, what have I missed / done wrong?

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


Include other contexts

2005-03-01 Thread Peter Johnson
Tomcat 5.5.7
Hi all,
I was just wondering if it was possible to pass a request to another 
context within the same host and capture the output. If it is, any 
suggestions on the best way to do so?

Basically, I am planning to use SiteMesh for site templating however 
would prefer to deploy many of the apps as individual apps. So somehow I 
would like to call another context and then have SiteMesh "decorate" the 
response.

Any suggestions will be appreciated, thanks in advance.
PJ
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Oracle DBCP in Tomcat 4

2005-03-01 Thread Peter Johnson
That was it ... it needed to be between the taglib and 
security-constraint elements. Now I am getting the ol'  Cannot create 
JDBC driver of class '' for connect URL 'null'   error.

classes12.jar is in common/lib so it should be able to find it
Jason Bainbridge wrote:
Does your web.xml have it's tags in the right order as per the error
message? Sometimes error messages are actually helpful, not very often
mind you but sometimes they are. :)
Regards,
 

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


Re: Include other contexts

2005-03-01 Thread Peter Johnson
Thanks for the quick reply QM ...
I'd be writing both the "parent" and "child" apps. Basically the parent 
would act as a broker to the child apps and perform the "decoration".  I 
guess SiteMesh does a form of automated "screen scraping". I would do 
this so that all "child" apps may have a common look-n-feel and there 
would be a global navigation.

I will look into RequestDispatcher#include() as it sounds similar to 
what I'd be after.

PJ
QM wrote:
On Wed, Mar 02, 2005 at 11:53:52AM +1100, Peter Johnson wrote:
: I was just wondering if it was possible to pass a request to another 
: context within the same host and capture the output. If it is, any 
: suggestions on the best way to do so?

You could make a URL call to the app (java.net.URL and other similar
implementations).  Either that, or RequestDispatcher#include()
(Though something tells me that requires an in-context URL.  Check the
docs to be sure.)
It sounds like you're "screen scraping," though, in which case you'd be
better off trying to find some common data format that app A and app B
can share.  (If, of course, you have some control or influence over App
A.)
If app A changes the format of the data (common with websites) then app
B has to play catch-up with its parsing.
: Basically, I am planning to use SiteMesh for site templating however 
: would prefer to deploy many of the apps as individual apps. So somehow I 
: would like to call another context and then have SiteMesh "decorate" the 
: response.

Are you using this setup for branding, then, or something else?  I may
have some suggestions, but knowing your end-goal may help.
-QM
 

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


Re: Include other contexts

2005-03-01 Thread Peter Johnson
it would seem to be as simple as
req.getRequestDispatcher().include(req,res);
PJ
Peter Johnson wrote:
Thanks for the quick reply QM ...
I'd be writing both the "parent" and "child" apps. Basically the 
parent would act as a broker to the child apps and perform the 
"decoration".  I guess SiteMesh does a form of automated "screen 
scraping". I would do this so that all "child" apps may have a common 
look-n-feel and there would be a global navigation.

I will look into RequestDispatcher#include() as it sounds similar to 
what I'd be after.

PJ
QM wrote:
On Wed, Mar 02, 2005 at 11:53:52AM +1100, Peter Johnson wrote:
: I was just wondering if it was possible to pass a request to 
another : context within the same host and capture the output. If it 
is, any : suggestions on the best way to do so?

You could make a URL call to the app (java.net.URL and other similar
implementations).  Either that, or RequestDispatcher#include()
(Though something tells me that requires an in-context URL.  Check the
docs to be sure.)
It sounds like you're "screen scraping," though, in which case you'd be
better off trying to find some common data format that app A and app B
can share.  (If, of course, you have some control or influence over App
A.)
If app A changes the format of the data (common with websites) then app
B has to play catch-up with its parsing.
: Basically, I am planning to use SiteMesh for site templating 
however : would prefer to deploy many of the apps as individual apps. 
So somehow I : would like to call another context and then have 
SiteMesh "decorate" the : response.

Are you using this setup for branding, then, or something else?  I may
have some suggestions, but knowing your end-goal may help.
-QM
 

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


Re: Oracle DBCP in Tomcat 4

2005-03-01 Thread Peter Johnson
4.1.30 ... I read that but it was in relation to 4.0.x
Jason Bainbridge wrote:
On Wed, 02 Mar 2005 12:31:50 +1100, Peter Johnson <[EMAIL PROTECTED]> wrote:
 

That was it ... it needed to be between the taglib and
security-constraint elements. Now I am getting the ol'  Cannot create
JDBC driver of class '' for connect URL 'null'   error.
classes12.jar is in common/lib so it should be able to find it
   

What version of tomcat is it exactly? According to
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples-howto.html
some of the early versions of 4 had a problem with classes12.zip/jar
where you needed to remove some classes.
 

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


Re: Oracle DBCP in Tomcat 4

2005-03-01 Thread Peter Johnson
I ended up moving the resource definition from the global context to the 
application context and it is now working.

Thanks for your help Jason.
PJ
Jason Bainbridge wrote:
Lots of good info here:
http://www.theserverside.com/discussions/thread.tss?thread_id=25459#119215
Try some of those and I'm sure you'll get it running. :)
On Wed, 02 Mar 2005 13:52:26 +1100, Peter Johnson <[EMAIL PROTECTED]> wrote:
 

4.1.30 ... I read that but it was in relation to 4.0.x
Jason Bainbridge wrote:
   

On Wed, 02 Mar 2005 12:31:50 +1100, Peter Johnson <[EMAIL PROTECTED]> wrote:
 

That was it ... it needed to be between the taglib and
security-constraint elements. Now I am getting the ol'  Cannot create
JDBC driver of class '' for connect URL 'null'   error.
classes12.jar is in common/lib so it should be able to find it
   

What version of tomcat is it exactly? According to
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples-howto.html
some of the early versions of 4 had a problem with classes12.zip/jar
where you needed to remove some classes.

 

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


 

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


Re: Include other contexts

2005-03-02 Thread Peter Johnson
Ok, I gave this a test run, so from app1 I called
req.getRequestDispatcher("/app2").include(req,res);
However, it seems that doing this loops i.e. re-requests app1 rather 
than passing the request to app2. It this an error with Tomcat or a 
misunderstanding by me?

PJ
Peter Johnson wrote:
it would seem to be as simple as
req.getRequestDispatcher().include(req,res);
PJ
Peter Johnson wrote:
Thanks for the quick reply QM ...
I'd be writing both the "parent" and "child" apps. Basically the 
parent would act as a broker to the child apps and perform the 
"decoration".  I guess SiteMesh does a form of automated "screen 
scraping". I would do this so that all "child" apps may have a common 
look-n-feel and there would be a global navigation.

I will look into RequestDispatcher#include() as it sounds similar to 
what I'd be after.

PJ
QM wrote:
On Wed, Mar 02, 2005 at 11:53:52AM +1100, Peter Johnson wrote:
: I was just wondering if it was possible to pass a request to 
another : context within the same host and capture the output. If it 
is, any : suggestions on the best way to do so?

You could make a URL call to the app (java.net.URL and other similar
implementations).  Either that, or RequestDispatcher#include()
(Though something tells me that requires an in-context URL.  Check the
docs to be sure.)
It sounds like you're "screen scraping," though, in which case you'd be
better off trying to find some common data format that app A and app B
can share.  (If, of course, you have some control or influence over App
A.)
If app A changes the format of the data (common with websites) then app
B has to play catch-up with its parsing.
: Basically, I am planning to use SiteMesh for site templating 
however : would prefer to deploy many of the apps as individual 
apps. So somehow I : would like to call another context and then 
have SiteMesh "decorate" the : response.

Are you using this setup for branding, then, or something else?  I may
have some suggestions, but knowing your end-goal may help.
-QM
 

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


Re: Include other contexts

2005-03-02 Thread Peter Johnson
It is me ... I wasn't calling the other context rather just a resource 
within the context

Peter Johnson wrote:
Ok, I gave this a test run, so from app1 I called
req.getRequestDispatcher("/app2").include(req,res);
However, it seems that doing this loops i.e. re-requests app1 rather 
than passing the request to app2. It this an error with Tomcat or a 
misunderstanding by me?

PJ
Peter Johnson wrote:
it would seem to be as simple as
req.getRequestDispatcher().include(req,res);
PJ
Peter Johnson wrote:
Thanks for the quick reply QM ...
I'd be writing both the "parent" and "child" apps. Basically the 
parent would act as a broker to the child apps and perform the 
"decoration".  I guess SiteMesh does a form of automated "screen 
scraping". I would do this so that all "child" apps may have a 
common look-n-feel and there would be a global navigation.

I will look into RequestDispatcher#include() as it sounds similar to 
what I'd be after.

PJ
QM wrote:
On Wed, Mar 02, 2005 at 11:53:52AM +1100, Peter Johnson wrote:
: I was just wondering if it was possible to pass a request to 
another : context within the same host and capture the output. If 
it is, any : suggestions on the best way to do so?

You could make a URL call to the app (java.net.URL and other similar
implementations).  Either that, or RequestDispatcher#include()
(Though something tells me that requires an in-context URL.  Check the
docs to be sure.)
It sounds like you're "screen scraping," though, in which case 
you'd be
better off trying to find some common data format that app A and app B
can share.  (If, of course, you have some control or influence over 
App
A.)

If app A changes the format of the data (common with websites) then 
app
B has to play catch-up with its parsing.

: Basically, I am planning to use SiteMesh for site templating 
however : would prefer to deploy many of the apps as individual 
apps. So somehow I : would like to call another context and then 
have SiteMesh "decorate" the : response.

Are you using this setup for branding, then, or something else?  I may
have some suggestions, but knowing your end-goal may help.
-QM
 

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


5.5.7 Filter Issue

2005-03-02 Thread Peter Johnson
Hi all,
I am including another context's servlet output however the filter that 
should be applied isn't.

e.g. seems to be doing
  context1 context2
  |--|   |--|
--> Filter --> Servlet --> Servlet |
<--|
rather than
  context1 context2
  |--|   |--|
--> Filter --> Servlet --> Servlet |
<---Filter <-- Servlet <|
Any ideas?
PJ


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


Re: 5.5.7 Filter Issue

2005-03-02 Thread Peter Johnson
Correction it is doing
 context1 context2
 |--|   |--|
--> Filter --> Servlet --> Servlet |
<-- Servlet <--------|
Peter Johnson wrote:
Hi all,
I am including another context's servlet output however the filter 
that should be applied isn't.

e.g. seems to be doing
  context1 context2
  |--|   |--|
--> Filter --> Servlet --> Servlet |
<--|
rather than
  context1 context2
  |--|   |--|
--> Filter --> Servlet --> Servlet |
<---Filter <-- Servlet <|
Any ideas?
PJ
   
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

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


Re: 5.5.7 Filter Issue

2005-03-02 Thread Peter Johnson
After some further logging within the filter it would appear that the 
following is happening

context1 context2
|--|   |--|
--> Filter --> Servlet --> Servlet |
 |---Filter <-- Servlet <---|
 |->Filter --> Servlet --> Servlet ---|
<--- Filter <-- Servlet <---|
However, after the response if filtered the first time it isn't applied 
again on the second round so hence it would appear not to be being applied.

Can't see why it is doing a second round though.
Peter Johnson wrote:
Correction it is doing
 context1 context2
 |--|   |--|
--> Filter --> Servlet --> Servlet |
<------ Servlet <|
Peter Johnson wrote:
Hi all,
I am including another context's servlet output however the filter 
that should be applied isn't.

e.g. seems to be doing
  context1 context2
  |--|   |--|
--> Filter --> Servlet --> Servlet |
<--|
rather than
  context1 context2
  |--|   |--|
--> Filter --> Servlet --> Servlet |
<---Filter <-- Servlet <|
Any ideas?
PJ
   
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

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


Re: Tomcat and JRockit

2005-03-03 Thread Peter Johnson
I've run Tomcat 5.0.x and 5.5.x on the 1.5 version of JRockit however it 
is worth noting that it breaks anything using CGLIB e.g. Hibernate so 
use with care. Apart from that though, I have found it to run very nicely.

PJ
Allistair Crossley wrote:
Hi,
I've run Tomcat 5.0.x without any trouble on whichever JRockit runs Java 1.4
Cheers, Ali.
 

-Original Message-
From: Michael Cornell [mailto:[EMAIL PROTECTED]
Sent: 03 March 2005 10:27
To: Tomcat Users List
Subject: Tomcat and JRockit
Hi,
Just wondering if there is some documentation w regards to what/which
virtual machines tomcat (5.0.x) has been tested on (ie does 
it work with BEA
Jrockit and if so what version) ?

Failing this, does anyone know if tomcat 5.0.25 does work (or 
there are
issues) with Jrockit SDK 1.4.2 (which appears to be the same 
as 7.0) as
featured here http://dev2dev.bea.com/products/wljrockit70/index.jsp

Thanks
Michael
--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.308 / Virus Database: 266.6.0 - Release Date: 02/03/2005
   


 
---
QAS Ltd.
Developers of QuickAddress Software
http://www.qas.com";>www.qas.com
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---


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

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


Mapping to DefaultServlet from webapp

2005-03-04 Thread Peter Johnson
Hi all,
how would one go about mapping say /images/* to the default servlet to 
override an application mapping of /*  to appServlet?

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


Re: Being lost in the mailing list

2005-03-07 Thread Peter Johnson
Klaus,
Taking a tone with people gives you less chance of a response.
Are you doing any url rewriting in Apache?
PJ
Klaus-F. Kaal wrote:
Hi,
I tired to get an answer to my serious questions for quite a while ( I 
assume, if a question is not answered within a few days, it will be 
lost ).

This mailing-list did not react to my problems. Are there no 
knowledgeable people out there? To connect Apache to Tomcat should not 
be a real problem. I just need a little hint to be successful and - I 
swear - to help other people with my knowledge. But I feel lost. Are 
alle people circeling around "exotic" themes? Maybe someone just gives 
a link where to ask for anwers.

Would be very kind and helful.
Klaus

- My previous questions
Hi,
I solved that problem. I had to implement this Listeners in server.xml:
  ^M
That did it. But still it is not working.

*SO HERE IS MY NEXT QUESTION:*
- Apache still seems to ignore my mod_jk.
_In my Tomcat log, I can see:_
INFO: JK2: ajp13 listening on /0.0.0.0:8009
06.03.2005 00:54:10 org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=5/43  config=/usr/tomcat/conf/jk2.properties
_I included my automatically created mod_jk.conf into the httpd.conf:_
Include /usr/tomcat/conf/auto/mod_jk.conf
This mod_jk.conf looks like this:

 LoadModule jk_module "/usr/lib/apache2-prefork/mod_jk.so"

JkWorkersFile "/etc/apache2/workers2.properties"
JkLogFile "/usr/tomcat/logs/mod_jk.log"
JkLogLevel emerg
_The workers2.properties is here:_
[channel.socket:localhost:8009]
port=8009
host=127.0.0.1
[ajp13:localhost:8009]
channel=channel.socket:localhost:8009
[uri:/jsp-examples/*]
worker=ajp13.localhost:8009
[uri:www.technologyserver.com/*.jsp]
worker=ajp13:localhost:8009

Apache and Tomcat are working fine, independently. But when I try to 
call a JSP on port 80, Apache states that it cannot find the file.

What am I doing wrong??
Thanks for your help.
Klaus


Klaus-F. Kaal schrieb:
Hi,
I am about to interface Apache / Tomcat. At several places it is 
recommended to use the mod_jk.auto-conf in the tomcat/conf directory.

I got Tomcat 5.0, but this version does not produce the file as 
described.

Can anybody tell me how I can persuade Tomcat to produce this file.
Thanks for your help
Klaus
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


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


Re: Being lost in the mailing list

2005-03-08 Thread Peter Johnson
Klaus,
I think I may have spotted it ... does this file exist ?
/usr/lib/apache2-prefork/mod_jk.so
I suspect that the module isn't being loaded into Apache. Now you say 
that you are using mod_jk2 (which is fine, I do too) however it looks 
like you are using mod_jk.

If the above file does exist then check for the presence of a 
"LoadModule" line in the Apache 2 config loading the above file.

PJ
Klaus-F. Kaal wrote:
Hi Peter,
I can imagine that the gurus get tons of eMails with difficult and 
silly questions. And as there is limited time, they can't answer them 
all. I believe they keep answering the freshly incoming ones. Since I 
am really in problems and did not get an answer over days, I thought, 
I was lost in the "cant do this" bin and it's better to shout out to 
get attention. Believe me: that is not my normal style.

I aquired a dedicated server and got it with Suse 9.1 preinstalled. 
Apache 2.0.48 was on it. It uses virtual hostst. Apart from that it 
seems to be not special. But it runs without problems (as far as I can 
judge from the logs)

I installed
- Java 1.4
- Tomcat  5.0.28
- mod_jk2 from the latest binary distribution
Independently, Apache and Tomcat work well. Tomcat reports in the logs 
that it listens on port 8009 for mod_jk communication. It also created 
/conf/auto/mod_jk.conf, the content of which, I show later in this text.
Apache does not shift incoming JSP calls to mod_jk. It just states 
that it could not find the document in the normal public_html space.

Can you do something with this info?
Thanks a lot for your hints.
Klaus

Peter Johnson schrieb:
Klaus,
Taking a tone with people gives you less chance of a response.
Are you doing any url rewriting in Apache?
PJ
Klaus-F. Kaal wrote:

_In my Tomcat log, I can see:_
INFO: JK2: ajp13 listening on /0.0.0.0:8009
06.03.2005 00:54:10 org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=5/43  config=/usr/tomcat/conf/jk2.properties
_I included my automatically created mod_jk.conf into the httpd.conf:_
Include /usr/tomcat/conf/auto/mod_jk.conf
This mod_jk.conf looks like this:

 LoadModule jk_module "/usr/lib/apache2-prefork/mod_jk.so"

JkWorkersFile "/etc/apache2/workers2.properties"
JkLogFile "/usr/tomcat/logs/mod_jk.log"
JkLogLevel emerg
_The workers2.properties is here:_
[channel.socket:localhost:8009]
port=8009
host=127.0.0.1
[ajp13:localhost:8009]
channel=channel.socket:localhost:8009
[uri:/jsp-examples/*]
worker=ajp13.localhost:8009
[uri:www.technologyserver.com/*.jsp]
worker=ajp13:localhost:8009

Apache and Tomcat are working fine, independently. But when I try to 
call a JSP on port 80, Apache states that it cannot find the file.

What am I doing wrong??
Thanks for your help.
Klaus



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


Re: getting datasource in a JSP?

2005-03-08 Thread Peter Johnson
As shown in the examples
   Context initContext = new InitialContext();
   Context envContext  = (Context)initContext.lookup("java:/comp/env");
   DataSource ds = (DataSource)envContext.lookup("jdbc/rofDB");
Parsons Technical Services wrote:
Try "jdbc/rofDB"

Doug
- Original Message - From: "Darryl Wagoner" 
<[EMAIL PROTECTED]>
To: "Tomcat Users List" 
Sent: Tuesday, March 08, 2005 4:15 PM
Subject: Re: getting datasource in a JSP?


Rahul Akolkar wrote:
javax.naming.Context
Thank Rahul that help, but now I have another problem.  When I use 
the tomcat example JSP tags page:

This works
*** 

<%@ taglib uri="http://java.sun.com/jsp/jstl/sql"; prefix="sql" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core"; prefix="c" %>

select id, foo, bar from testdata


 
   DB Test
 
 
 Results

   Foo ${row.foo}
   Bar ${row.bar}


The following throws:
Name rofDB is not bound in this Context.
Please Help!
thanks
** 

<%@ page
   import = "java.io.*"
   import = "java.lang.*"
   import = "java.sql.*"
   import = "javax.naming.*"
   import = "java.util.*"
%>
<%
   Context ctx = null;
   javax.sql.DataSource rofDS = null;
   try
   {
   java.util.Date now = new java.util.Date();
   ctx = new InitialContext();
   out.println("before lookup " + now + "");
   rofDS = (javax.sql.DataSource)ctx.lookup("/rofDB");
   out.println("after lookup");
   }
   catch (Exception ne)
 {
 out.println(ne.getMessage());
 }
%>
--
Darryl Wagoner - WA1GON
"Evil triumphs when good men do nothing."  - Edmund Burke [1729-1797]
Join the TrustedQSL mailing list.  An Open Source solution.
Post message: [EMAIL PROTECTED] Subscribe: 
[EMAIL PROTECTED] List owner: 
[EMAIL PROTECTED] http://www.trustedQSL.org


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


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


Re: Redirect from http:// to https://

2005-03-09 Thread Peter Johnson
Or write a valve/filter to do the same thing
PJ
Antony Paul wrote:
You use Tomcat standalone or along with Apache. 
In Tomcat stand alone you can 
1, In index.jsp or whatever be the welcome page check
response.isSecure() then redirect.
2. There is an option in web.xml in security element
transport-guarantee which can be specified for certain resources. On
accessing these resources it will automatically redirect to the https.
You need to properly configure redirectport in Connector element in
server.xml for this to work.

   In Apache use mod_rewrite.
On Tue, 8 Mar 2005 23:27:54 + (GMT), Sanjeev Srivastava
<[EMAIL PROTECTED]> wrote:
 

Hi All!,
Can anone tell me how can I redirect http://
to https:// . I want as soon as the user type
http://abc.com it will go to https://abc.com
(SSL Config).
Please help..
Regards,
Sanjeev
Send instant messages to your online friends http://uk.messenger.yahoo.com
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
   


 

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


Re: Newbie question. /manager only gives the directory listing

2005-09-18 Thread Peter Johnson

Jimi,

try /manager/html

PJ

[EMAIL PROTECTED] wrote:


Hi all,

I have been using Tomcat for some time now, but I still feel like a newbie in
most regards. At least when it comes to configuring it.
Tomcat has been working great, together with Apache 2, for several months now.
But now, I find myself wanting to use the manager webapp for the first time.
But it doesn't work. When I try to go to /manager all I get from Tomcat is the
directory listing of the manager-folder. I know this request is handled
by Tomcat, because I have the required JKMount's in the Apache httpd.conf file,
and at the bottom of the directory listing it says "Apache Tomcat/5.5.9".

I have checked the archive for this maining list, and I have checked the
documentation and searched on google, but I can't find any information on how
to set up the default manager. All they say is that it is installed by default.
And I'm sure that it worked at the beginning, but then I must have made
something that messed it up, but since I haven't used it at all I have no idea
when, how
and why it got messed up.

Is there a simply "checklist" that I can go through step by step, to check that
my configuration is as it should be? Or maybe some kind soul could take a look
at my configuration files and figure out what I'm doing wrong?


Some info on my system:
---
Windows XP
Apache 2.0.54 (as service)
Apache Tomcat 5.5.9 (as service)
docBase changed so that my only webapp (located at c:\community) is reached when
i type localhost:8080/ (se context.xml in configuration files below)
the manager webapp is untouched, in Tomcat5.5\server\webapps\manager


The configuration files can be found at:
http://www.hullegard.com/tomcat/

The community folder is located under c:\
The httpd.conf is from the apache conf folder.
All other files are from the Tomcat5.5\conf folder

Anyone who can help me with this?

Regards
/Jimi

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

 



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