Re: logging of "response time"

2008-07-17 Thread Tony Anecito
I have asked on this group but have never gotten an answer. My guess is it 
means socket connect time. What that means is the real question. Again, I have 
a theory that the amount of time is not just the response time (taking into 
account the chatter of the signaling) of the app but how long it takes before 
the client responds to close the socket and the signal to propagate.

My 2cents worth. When I look at my logs on Windows the response time as 
measured at Apache for requests that gets passed to Tomcat (embedded in JBoss 
4.2.2) is typically 0msec. Sometimes I see 15msec even with -D or microsecond 
resolution (windows OS timer issue).

Regards,
Tony Anecito
Founder,
MyUniPortal
http://www.myuniportal.com
"The fastest Portal on the planet that uses inexpensive hardware and open 
source web (Apache) and App Server or JBoss (Tomcat embedded)"

For http SOAP requests I get from all over the world from my RIA I typically 
see 0msec in Apache and I am curious what is measured elsewhere.


--- On Thu, 7/17/08, ywtsang <[EMAIL PROTECTED]> wrote:

> From: ywtsang <[EMAIL PROTECTED]>
> Subject: logging of "response time"
> To: users@tomcat.apache.org
> Date: Thursday, July 17, 2008, 9:33 PM
> i log the response time by the following option:
> 
> %D - Time taken to process the request, in millis
> 
> does this mean that the time includes the sum of:
> 
> - start of request
> - application logic
> - streaming the whole response (html text) back to client
> 
> ?
> 
> -- 
> View this message in context:
> http://www.nabble.com/logging-of-%22response-time%22-tp18522011p18522011.html
> Sent from the Tomcat - User mailing list archive at
> Nabble.com.
> 
> 
> -
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]


  

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



Re: mod_jk: docBase and appBase -- 'ROOT' taken out

2008-07-17 Thread Charles Caldarale

On Jul 17, 2008, at 23:30, Robert Koberg <[EMAIL PROTECTED]> wrote:


unless I am doing something
terrible wrong with nested contexts...




Nested contexts are not permitted by the servlet spec. If another  
container supports such a violation, it just goes to show how far some  
will go to tie you to a proprietary environment.


 - Chuck
 


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



Re: mod_jk: docBase and appBase -- 'ROOT' taken out

2008-07-17 Thread Robert Koberg
On Thu, 2008-07-17 at 22:47 -0500, Charles Caldarale wrote:
> On Jul 17, 2008, at 21:56, Robert Koberg <[EMAIL PROTECTED]> wrote:
> >
> 
> > The problem: even though I specifiy
> > 'docBase="/home/app/wwwapps/ROOT/members"'
> 
> Which is completely illegal; 

buzzwrecker. why? Is there a technical problem or conformance? I am
migrating an old app from Resin 2.1.16.

> webapps may not be nested - each must be  
> in a separate directory (or war file), usually under the   
> appBase directory. Move members up one level, and remove the path and  
> docBase attributes from your  element - they're not allowed  
> in this situation.

Well, it worked when I tried it with out SSL. It works on TC standalone.

It also will work if you remove the
conf/Catalina/vhost/nested-context.xml

and place the Context element from that file in your server.xml Host.

So, now it is apparently working fine, unless I am doing something
terrible wrong with nested contexts...

thanks,
-Rob

> 
>   - Chuck



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



Re: mod_jk: docBase and appBase -- 'ROOT' taken out

2008-07-17 Thread Charles Caldarale

On Jul 17, 2008, at 21:56, Robert Koberg <[EMAIL PROTECTED]> wrote:





The problem: even though I specifiy
'docBase="/home/app/wwwapps/ROOT/members"'


Which is completely illegal; webapps may not be nested - each must be  
in a separate directory (or war file), usually under the   
appBase directory. Move members up one level, and remove the path and  
docBase attributes from your  element - they're not allowed  
in this situation.


 - Chuck


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



logging of "response time"

2008-07-17 Thread ywtsang

i log the response time by the following option:

%D - Time taken to process the request, in millis

does this mean that the time includes the sum of:

- start of request
- application logic
- streaming the whole response (html text) back to client

?

-- 
View this message in context: 
http://www.nabble.com/logging-of-%22response-time%22-tp18522011p18522011.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



mod_jk: docBase and appBase -- 'ROOT' taken out

2008-07-17 Thread Robert Koberg
Hi,

Redhat ES 5
jdk1.6.0_07
tomcat 6.0.16
tomcat-connectors-1.2.26-src (built on the machine)
tomcat-native-1.1.14-src (built on the machine)

After getting the connector working for httpd without SSL I am trying to
get it working with SSL. A strange warning occurs followed by the severe
error. Other than SSL, I changed the Connector/@protocol to
the Http11AprProtocol. Other than that and using SSL thru httpd
eveything is the same. 

The problem: even though I specifiy
'docBase="/home/app/wwwapps/ROOT/members"' the context startup sees it
as '/home/app/wwwapps/members' -- ROOT get lost somehow (see
catalina.out snippet below)

I noticed the faq at the bottom here (which comes close to my problem):
http://tomcat.apache.org/tomcat-6.0-doc/ssl-howto.html
"When Tomcat starts up, I get an exception like
"java.io.FileNotFoundException: {some-directory}/{some-file} not
found". 
A likely explanation is that Tomcat cannot find the keystore
file where it is looking. By default, Tomcat expects the
keystore file to be named .keystore in the user home directory
under which Tomcat is running (which may or may not be the same
as yours :-). If the keystore file is anywhere else, you will
need to add a keystoreFile attribute to the  element in
the Tomcat configuration file."

My .keystore is in the user home of the user that starts tomcat. Even
so, I placed the keystoreFile attribute on the SSL connector (below) in
the server.xml (is that the Factory??)

I also used a different password, but I added the keystorePass
attribute to the SSL connector (below) in the server.xml

Also, I first created the keystore (in the user home dir) with:
$JAVA_HOME/bin/keytool -genkey -alias tomcat -keyalg RSA


Then I used openssl to successfully generate a pkcs12 file from the my
verisign cert and key. First, I chained the verisign intermediate cert
with the root cert to use as the -CAfile.

Below is a relevant part from catalina.out followed by the parts of the
server.xml and finall the context associated with the error message

WARNING: A docBase /home/app/wwwapps/ROOT/members inside the host
appBase has been specified, and will be ignored
Jul 17, 2008 10:13:19 PM org.apache.catalina.core.StandardContext
resourcesStart
SEVERE: Error starting static Resources
java.lang.IllegalArgumentException: Document
base /home/app/wwwapps/members does not exist or is not a readable
directory
at
org.apache.naming.resources.FileDirContext.setDocBase(FileDirContext.java:141)
at
org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java:3957)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4126)

Here is the SSL Connector from server.xml:


Here is the Host from server.xml

 www.domain.org
  

Here is the conf/Catalina/www.domain.com/members.xml (there is also a
ROOT.xml):



  
  








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



Changing content type on reload

2008-07-17 Thread Dola Woolfe
Hi,

I'm going to attempt asking a question by giving incomplete information but I 
am still hoping to get an answer. The complete story would be too cumbersome to 
describe.

Basically here's a snippet of my code:

<[EMAIL PROTECTED] errorPage="ErrorPage.jsp" 
contentType="application/x-java-jnlp-file"%>
<[EMAIL PROTECTED] file="InitializePage.jsp"%>
<%
   if (user == null) 
 throw new servlets.Authentication.Exception("User is null");
   else if (!user.belongsTo(1L)) {
 throw new servlets.Authentication.Exception("Insufficient access");
   }
 %>
  



   
Info Flow System Application


// ETC

WHen the exception is fielded by the error page, the user is presented with a 
login form and when he/she logs in, the page is reloaded (with javascript). The 
problem is that the xml code, rather than invoking jnlp, is displayed as if it 
were HTML and jnlp kicks in only when the user reloads. This is with IExplorer.

Anything I can do about this from the tomcat point of view?

Thanks much in advance!

Dola



  

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



Re: Tomcat 5.0.27 multiple instances in Solaris

2008-07-17 Thread Charles Caldarale

> Somewhere in forums I read that
> there is way to work with single
> binary and multiple tomcat
> instances.

Read the RUNNING.txt file that's in the Tomcat home directory.

> Actually, my current tomcat server
> serving for 10 different sites,

Why don't you use Tomcat's virtual host capability (multiple   
elements) and only run one copy of Tomcat?


BTW, 5.0.27 is no longer supported; you might want to consider moving  
up.


 - Chuck


























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



Re: Tomcat 5.0.27 multiple instances in Solaris

2008-07-17 Thread sridharmnj

Hi Steve,

Thanks for your guidence.

Yes, I can do that. But copying the entire tomcat folder means, it needs
multiple binarys (bin folder). Somewhere in forums I read that there is way
to work with single binary and multiple tomcat instances.

Actually, my current tomcat server serving for 10 different sites, If I
chose to copy tomcat binary 10 times, it may consume resources.

Do you suggest to use individual binary for each site or is it better to
have a single binary with multiple tomcat instances.

If yes, Could you please point me, what are advantages to use multiple
binaries insted of single binary with multiple instances.

Thanks,
Sridhar


Steve Ochani wrote:
> 
> Date sent:Thu, 17 Jul 2008 15:30:33 -0700 (PDT)
> From: sridharmnj <[EMAIL PROTECTED]>
> Subject:  Tomcat 5.0.27 multiple instances in Solaris
> To:   users@tomcat.apache.org
> Send reply to:Tomcat Users List 
> 
>> 
>> Hi,
>> 
>> I have a working tomcat5.0.27 in /export/ae/tomcat5.027 folder. (os is
>> solaris) Now I am creating one more tomcat instance. So, I created one
>> directory "Instance1" in /export/ae/tomcat5.0.27 folder and copied
>> conf, logs, temp, webapps, work folders. I also modified port nubmers
>> 8080, 8005, 8009 to 9080, 9005, 9009. I tried to start Instance1 using
>> the following command. /export/ae/tomcat5.0.27/bin> startup.sh
>> "-Dcatalina.base=/export/ae/tomcat5.0.27/Instance1".
>> 
> 
> Copy the entire /export/ae/tomcat5.027 dir. to another separate dir, not a
> subdir. and then 
> change the ports and use its startup.sh.
> 
> 
> -Steve O.
> 
> 
> 
> 
>  
> 
>> But, its starting the old server (8080) only. Could any one please
>> guide me in right direction, how to start and stop the new instance. I
>> appreciate your help.
>> 
>> Thanks,
>> Sridhar
>> 
>> -- 
>> View this message in context:
>> http://www.nabble.com/Tomcat-5.0.27-multiple-instances-in-Solaris-tp18
>> 519218p18519218.html Sent from the Tomcat - User mailing list archive
>> at Nabble.com.
>> 
>> 
>> -
>> To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe,
>> e-mail: [EMAIL PROTECTED] For additional commands,
>> e-mail: [EMAIL PROTECTED]
>> 
> 
> 
> 
> -
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Tomcat-5.0.27-multiple-instances-in-Solaris-tp18519218p18521254.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



Re: Tomcat 5.0.27 multiple instances in Solaris

2008-07-17 Thread Steve Ochani
Date sent:  Thu, 17 Jul 2008 15:30:33 -0700 (PDT)
From:   sridharmnj <[EMAIL PROTECTED]>
Subject:Tomcat 5.0.27 multiple instances in Solaris
To: users@tomcat.apache.org
Send reply to:  Tomcat Users List 

> 
> Hi,
> 
> I have a working tomcat5.0.27 in /export/ae/tomcat5.027 folder. (os is
> solaris) Now I am creating one more tomcat instance. So, I created one
> directory "Instance1" in /export/ae/tomcat5.0.27 folder and copied
> conf, logs, temp, webapps, work folders. I also modified port nubmers
> 8080, 8005, 8009 to 9080, 9005, 9009. I tried to start Instance1 using
> the following command. /export/ae/tomcat5.0.27/bin> startup.sh
> "-Dcatalina.base=/export/ae/tomcat5.0.27/Instance1".
> 

Copy the entire /export/ae/tomcat5.027 dir. to another separate dir, not a 
subdir. and then 
change the ports and use its startup.sh.


-Steve O.




 

> But, its starting the old server (8080) only. Could any one please
> guide me in right direction, how to start and stop the new instance. I
> appreciate your help.
> 
> Thanks,
> Sridhar
> 
> -- 
> View this message in context:
> http://www.nabble.com/Tomcat-5.0.27-multiple-instances-in-Solaris-tp18
> 519218p18519218.html Sent from the Tomcat - User mailing list archive
> at Nabble.com.
> 
> 
> -
> To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe,
> e-mail: [EMAIL PROTECTED] For additional commands,
> e-mail: [EMAIL PROTECTED]
> 



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



Tomcat 5.0.27 multiple instances in Solaris

2008-07-17 Thread sridharmnj

Hi,

I have a working tomcat5.0.27 in /export/ae/tomcat5.027 folder. (os is
solaris)
Now I am creating one more tomcat instance. So, I created one directory
"Instance1" in /export/ae/tomcat5.0.27 folder and copied conf, logs, temp,
webapps, work folders.
I also modified port nubmers 8080, 8005, 8009 to 9080, 9005, 9009.
I tried to start Instance1 using the following command.
/export/ae/tomcat5.0.27/bin> startup.sh
"-Dcatalina.base=/export/ae/tomcat5.0.27/Instance1".

But, its starting the old server (8080) only. Could any one please guide me
in right direction, how to start and stop the new instance. I appreciate
your help.

Thanks,
Sridhar

-- 
View this message in context: 
http://www.nabble.com/Tomcat-5.0.27-multiple-instances-in-Solaris-tp18519218p18519218.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



Re: mod_jk not connecting

2008-07-17 Thread Robert Koberg
On Thu, 2008-07-17 at 17:49 -0400, David Smith wrote:
> What does your workers.properties file look like?
> 
> In my environment, all but the JkMount/JkUnmount directives went into 
> the global httpd.conf.  Then I put the mount/unmount directives in the 
> virtual hosts.  Also I don't do anything with SetHandler.


I should have responded earlier. It turns out I needed:

NameVirtualHost *:80

and then adding directives to virtual hosts worked fine. And I could use
JkMount and did not need SetHandler, etc. Now on to SSL for one of
them...

thanks,
-Rob


> 
> --David
> 
> Robert Koberg wrote:
> > Hi,
> >
> > I am trying to get httpd and tomcat to work together and not having much
> > luck.
> >
> > Redhat ES 5
> > jdk1.6.0_07
> > tomcat 6.0.16
> > tomcat-connectors-1.2.26-src (built on the machine)
> > tomcat-native-1.1.14-src (built on the machine)
> >
> > If I put mod_jk directives inside a (httpd.conf) virtual host I can't
> > seem to get a connection to tomcat from httpd (get an apache 404 when
> > trying the webapp).  The only way I have been able to get something to
> > work is have global httpd.conf directives like below. Basically, with
> > the setup below, I do get tomcat to serve the 'qa' site's *.vm pages but
> > it seems to be looking at the virtual host above for its static files. I
> > could only get 'SetHandler' to work, not the JkMount (in a vhost or
> > globally). I have also left in some directives that did not work for me
> > (commented out).
> >
> > Any ideas or pointers?
> >
> > #see below
> > Include 
> > /home/app/tomcat/conf/jk/mod_jk.confhttp://thegreatsmokeymountainsparkway.com/_attracti/gatlappl.htm
> >
> > 
> > AllowOverride None
> > deny from all
> > 
> >
> >
> > 
> > DocumentRoot "/home/someuser/wwwapps/ROOT"
> > ServerName www.domain.org
> > ServerAlias domain.org
> > 
> > allow from all
> > Options +Indexes
> > 
> > #SetEnvIf Request_URI "/*" no-jk
> > 
> >
> > 
> > DocumentRoot /home/someuser/qaapps/ROOT
> > ServerName qa.domain.org
> > 
> > allow from all
> > Options +Indexes
> > 
> > 
> >
> > JkAutoAlias /home/someuser/qaapps
> > #JkAutoAlias /home/someuser/wwwapps
> >
> > #JkMount /* ajp13
> > #JkMount /members/* ajp13
> > #JkMount /*.vm ajp13
> > #JkMount /*.jsp ajp13
> > #JkMount /members/*.vm ajp13
> > #JkMount /members/admin/*.jsp ajp13
> > 
> >   SetHandler jakarta-servlet
> >   SetEnv JK_WORKER_NAME ajp13
> > #  SetEnvIf REQUEST_URI ^/members/([^/]*)/ JK_WORKER_NAME=ajp13
> > #  SetEnvIf REQUEST_URI ^/members/([^/]*\.vm)/ JK_WORKER_NAME=ajp13
> > #  SetEnvIf REQUEST_URI ^/members/([^/]*\.jsp)/ JK_WORKER_NAME=ajp13
> > 
> >
> > JkUnMount /*.html ajp13
> > JkUnMount /*.php ajp13
> > JkUnMount /*.gif ajp13
> > JkUnMount /*.jpg ajp13
> > JkUnMount /*.jpeg ajp13
> > JkUnMount /*.css ajp13
> > JkUnMount /*.ico ajp13
> > JkUnMount /*.pdf ajp13
> > JkUnMount /*.swf ajp13
> > JkUnMount /*.png ajp13
> > JkUnMount /*.txt ajp13
> >
> > ---
> >
> > #mod_jk.conf
> >
> > LoadModule jk_module "/usr/lib/httpd/modules/mod_jk.so"
> >
> > JkWorkersFile "/home/someuser/tomcat/conf/jk/workers.properties"
> > JkLogFile "/home/someuser/tomcat/logs/qa_mod_jk.log"
> >
> > JkLogLevel debug
> >
> >
> >
> > -
> > To start a new topic, e-mail: users@tomcat.apache.org
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >   
> 
> 
> -
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


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



Re: mod_jk not connecting

2008-07-17 Thread David Smith

What does your workers.properties file look like?

In my environment, all but the JkMount/JkUnmount directives went into 
the global httpd.conf.  Then I put the mount/unmount directives in the 
virtual hosts.  Also I don't do anything with SetHandler.


--David

Robert Koberg wrote:

Hi,

I am trying to get httpd and tomcat to work together and not having much
luck.

Redhat ES 5
jdk1.6.0_07
tomcat 6.0.16
tomcat-connectors-1.2.26-src (built on the machine)
tomcat-native-1.1.14-src (built on the machine)

If I put mod_jk directives inside a (httpd.conf) virtual host I can't
seem to get a connection to tomcat from httpd (get an apache 404 when
trying the webapp).  The only way I have been able to get something to
work is have global httpd.conf directives like below. Basically, with
the setup below, I do get tomcat to serve the 'qa' site's *.vm pages but
it seems to be looking at the virtual host above for its static files. I
could only get 'SetHandler' to work, not the JkMount (in a vhost or
globally). I have also left in some directives that did not work for me
(commented out).

Any ideas or pointers?

#see below
Include 
/home/app/tomcat/conf/jk/mod_jk.confhttp://thegreatsmokeymountainsparkway.com/_attracti/gatlappl.htm


AllowOverride None
deny from all




DocumentRoot "/home/someuser/wwwapps/ROOT"
ServerName www.domain.org
ServerAlias domain.org

allow from all
Options +Indexes

#SetEnvIf Request_URI "/*" no-jk



DocumentRoot /home/someuser/qaapps/ROOT
ServerName qa.domain.org

allow from all
Options +Indexes



JkAutoAlias /home/someuser/qaapps
#JkAutoAlias /home/someuser/wwwapps

#JkMount /* ajp13
#JkMount /members/* ajp13
#JkMount /*.vm ajp13
#JkMount /*.jsp ajp13
#JkMount /members/*.vm ajp13
#JkMount /members/admin/*.jsp ajp13

  SetHandler jakarta-servlet
  SetEnv JK_WORKER_NAME ajp13
#  SetEnvIf REQUEST_URI ^/members/([^/]*)/ JK_WORKER_NAME=ajp13
#  SetEnvIf REQUEST_URI ^/members/([^/]*\.vm)/ JK_WORKER_NAME=ajp13
#  SetEnvIf REQUEST_URI ^/members/([^/]*\.jsp)/ JK_WORKER_NAME=ajp13


JkUnMount /*.html ajp13
JkUnMount /*.php ajp13
JkUnMount /*.gif ajp13
JkUnMount /*.jpg ajp13
JkUnMount /*.jpeg ajp13
JkUnMount /*.css ajp13
JkUnMount /*.ico ajp13
JkUnMount /*.pdf ajp13
JkUnMount /*.swf ajp13
JkUnMount /*.png ajp13
JkUnMount /*.txt ajp13

---

#mod_jk.conf

LoadModule jk_module "/usr/lib/httpd/modules/mod_jk.so"

JkWorkersFile "/home/someuser/tomcat/conf/jk/workers.properties"
JkLogFile "/home/someuser/tomcat/logs/qa_mod_jk.log"

JkLogLevel debug



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

  



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



mod_jk not connecting

2008-07-17 Thread Robert Koberg
Hi,

I am trying to get httpd and tomcat to work together and not having much
luck.

Redhat ES 5
jdk1.6.0_07
tomcat 6.0.16
tomcat-connectors-1.2.26-src (built on the machine)
tomcat-native-1.1.14-src (built on the machine)

If I put mod_jk directives inside a (httpd.conf) virtual host I can't
seem to get a connection to tomcat from httpd (get an apache 404 when
trying the webapp).  The only way I have been able to get something to
work is have global httpd.conf directives like below. Basically, with
the setup below, I do get tomcat to serve the 'qa' site's *.vm pages but
it seems to be looking at the virtual host above for its static files. I
could only get 'SetHandler' to work, not the JkMount (in a vhost or
globally). I have also left in some directives that did not work for me
(commented out).

Any ideas or pointers?

#see below
Include /home/app/tomcat/conf/jk/mod_jk.conf


AllowOverride None
deny from all




DocumentRoot "/home/someuser/wwwapps/ROOT"
ServerName www.domain.org
ServerAlias domain.org

allow from all
Options +Indexes

#SetEnvIf Request_URI "/*" no-jk



DocumentRoot /home/someuser/qaapps/ROOT
ServerName qa.domain.org

allow from all
Options +Indexes



JkAutoAlias /home/someuser/qaapps
#JkAutoAlias /home/someuser/wwwapps

#JkMount /* ajp13
#JkMount /members/* ajp13
#JkMount /*.vm ajp13
#JkMount /*.jsp ajp13
#JkMount /members/*.vm ajp13
#JkMount /members/admin/*.jsp ajp13

  SetHandler jakarta-servlet
  SetEnv JK_WORKER_NAME ajp13
#  SetEnvIf REQUEST_URI ^/members/([^/]*)/ JK_WORKER_NAME=ajp13
#  SetEnvIf REQUEST_URI ^/members/([^/]*\.vm)/ JK_WORKER_NAME=ajp13
#  SetEnvIf REQUEST_URI ^/members/([^/]*\.jsp)/ JK_WORKER_NAME=ajp13


JkUnMount /*.html ajp13
JkUnMount /*.php ajp13
JkUnMount /*.gif ajp13
JkUnMount /*.jpg ajp13
JkUnMount /*.jpeg ajp13
JkUnMount /*.css ajp13
JkUnMount /*.ico ajp13
JkUnMount /*.pdf ajp13
JkUnMount /*.swf ajp13
JkUnMount /*.png ajp13
JkUnMount /*.txt ajp13

---

#mod_jk.conf

LoadModule jk_module "/usr/lib/httpd/modules/mod_jk.so"

JkWorkersFile "/home/someuser/tomcat/conf/jk/workers.properties"
JkLogFile "/home/someuser/tomcat/logs/qa_mod_jk.log"

JkLogLevel debug



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



Re: Both www.apache.org and tomcat.apache.org are down

2008-07-17 Thread Len Popp
... and now my DNS has caught up and it's working again.

For those of you who are still stuck with incorrect DNS info, the IP
address for both www.apache.org and tomcat.apache.org is
140.211.11.130.
-- 
Len


On Thu, Jul 17, 2008 at 14:54, Len Popp <[EMAIL PROTECTED]> wrote:
> Huh? If www.apache.org is resolving to the wrong address, then it *is*
> a DNS problem. From here I can't tell for certain which is "bad", the
> DNS result or the IP address. But in my experience, when some people
> can reach an internet host by name and others cannot, it's almost
> always due to a DNS issue.
> --
> Len
>
>
> On Thu, Jul 17, 2008 at 14:47, Youssef Mohammed
> <[EMAIL PROTECTED]> wrote:
>> if you can't access 192.87.106.226 from firefox, then it has nothing to do
>> with DNS.
>>
>>
>> On Thu, Jul 17, 2008 at 9:36 PM, Len Popp <[EMAIL PROTECTED]> wrote:
>>
>>> www.apache.org is not currently working here.
>>> ping www.apache.org gets a response from 192.87.106.226, but Firefox
>>> doesn't get a response from either www.apache.org or 192.87.106.226.
>>>
>>> tomcat.apache.org is working.
>>>
>>> Maybe there was a DNS change that hasn't propagated everywhere yet?
>>> --
>>> Len
>>>
>>>
>>> On Thu, Jul 17, 2008 at 14:14, Steve Ochani <[EMAIL PROTECTED]> wrote:
>>> > On 17 Jul 2008 at 14:05, Bajbutovic, Zoran wrote:
>>> >
>>> > Date sent:  Thu, 17 Jul 2008 14:05:38 -0400
>>> > From:   "Bajbutovic, Zoran" <[EMAIL PROTECTED]>
>>> > Subject:Both www.apache.org and tomcat.apache.org are
>>> down
>>> > To: Tomcat Users List 
>>> > Send reply to:  Tomcat Users List 
>>> >
>>> >> Hi all,
>>> >>
>>> >> Both www.apache.org and tomcat.apache.org have been down for some
>>> >> time.
>>> >> Is anyone there to fix this? This is not particularly encouraging
>>> >> for us
>>> >
>>> >
>>> > Works fine for me.
>>> >
>>> >
>>> >
>>> > -Steve O.
>>> >
>>> >
>>> >
>>> >
>>> > -
>>> > To start a new topic, e-mail: users@tomcat.apache.org
>>> > To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> > For additional commands, e-mail: [EMAIL PROTECTED]
>>> >
>>> >
>>>
>>> -
>>> To start a new topic, e-mail: users@tomcat.apache.org
>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>
>>>
>>
>>
>> --
>> Regards, Youssef
>>
>

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



RE: Mod_proxy_ajp and App Returing Generic Files For Download

2008-07-17 Thread Plana, Richard
Further to this, it seems that it only happens when IE6 is the browser.
Firefox downloads the file properly and allows one to save it. IE6,
OTOH, prompts to save and when it actually tries to download, I guess
the connection has been closed.

Help greatly appreciated.
--

Richi Plana 

> -Original Message-
> From: Plana, Richard [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, July 17, 2008 10:30 AM
> To: Tomcat Users List
> Subject: Mod_proxy_ajp and App Returing Generic Files For Download
> 
> Hi,
> 
> We're wanting a servlet request to return a generic file for download.
> In Java, we use the following code:
> 
> public ActionForward myAction(ActionMapping mapping,
>   ActionForm form,
>   HttpServletRequest request,
>   HttpServletResponse response) 
> throws Exception { ...
>   response.setContentType("application/download");
>   response.setHeader("Content-Disposition",
> "attachment;filename=\"" + "myfilename" + "\"");
>   response.setContentLength(ret.length());
> 
>   PrintWriter writer = response.getWriter();
>   writer.write(ret);
>   writer.flush();
> ...
>   return null;
> }
> 
> This would work with Tomcat's HTTP interface as well as 
> mod_jk, but with mod_proxy_ajp, we get an "Error downloading 
> page" from the browser and the following in the logs:
> 
> [Tue Jul 15 16:47:35 2008] [debug] mod_proxy_ajp.c(239): proxy:
> APR_BUCKET_IS_EOS
> [Tue Jul 15 16:47:35 2008] [debug] mod_proxy_ajp.c(244): 
> proxy: data to read (max 8186 at 4) [Tue Jul 15 16:47:35 
> 2008] [debug] mod_proxy_ajp.c(259): proxy: got 0 bytes of 
> data [Tue Jul 15 16:47:35 2008] [debug] ajp_header.c(652): 
> ajp_read_header:
> ajp_ilink_received 04
> [Tue Jul 15 16:47:35 2008] [debug] ajp_header.c(662): ajp_parse_type:
> got 04
> [Tue Jul 15 16:47:35 2008] [debug] ajp_header.c(491):
> ajp_unmarshal_response: status = 200
> [Tue Jul 15 16:47:35 2008] [debug] ajp_header.c(502):
> ajp_unmarshal_response: Number of headers is = 6 [Tue Jul 15 
> 16:47:35 2008] [debug] ajp_header.c(564):
> ajp_unmarshal_response: Header[0] [Pragma] = [No-cache] [Tue 
> Jul 15 16:47:35 2008] [debug] ajp_header.c(564):
> ajp_unmarshal_response: Header[1] [Cache-Control] = 
> [no-cache] [Tue Jul 15 16:47:35 2008] [debug] ajp_header.c(564):
> ajp_unmarshal_response: Header[2] [Expires] = [Thu, 01 Jan 
> 1970 00:00:00 GMT] [Tue Jul 15 16:47:35 2008] [debug] 
> ajp_header.c(564):
> ajp_unmarshal_response: Header[3] [Content-Disposition] = 
> [attachment;filename="myfilename"]
> [Tue Jul 15 16:47:35 2008] [debug] ajp_header.c(564):
> ajp_unmarshal_response: Header[4] [Content-Type] = 
> [application/download;charset=ISO-8859-1]
> [Tue Jul 15 16:47:35 2008] [debug] ajp_header.c(574):
> ajp_unmarshal_response: ap_set_content_type done [Tue Jul 15 
> 16:47:35 2008] [debug] ajp_header.c(564):
> ajp_unmarshal_response: Header[5] [Content-Length] = [67] 
> [Tue Jul 15 16:47:35 2008] [debug] ajp_header.c(652): ajp_read_header:
> ajp_ilink_received 03
> [Tue Jul 15 16:47:35 2008] [debug] ajp_header.c(662): ajp_parse_type:
> got 03
> [Tue Jul 15 16:47:35 2008] [debug] ajp_header.c(652): ajp_read_header:
> ajp_ilink_received 05
> [Tue Jul 15 16:47:35 2008] [debug] ajp_header.c(662): ajp_parse_type:
> got 05
> [Tue Jul 15 16:47:35 2008] [debug] mod_proxy_ajp.c(498): 
> proxy: got response from 10.0.0.1:8009 (server1) [Tue Jul 15 
> 16:47:35 2008] [debug] proxy_util.c(2062): proxy: AJP: has 
> released connection for (server1)
> 
> Bug? We doing something mod_ajp doesn't like?
> --
> 
> Richi Plana
> 
> -
> To start a new topic, e-mail: users@tomcat.apache.org To 
> unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

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



Re: Both www.apache.org and tomcat.apache.org are down

2008-07-17 Thread Len Popp
Huh? If www.apache.org is resolving to the wrong address, then it *is*
a DNS problem. From here I can't tell for certain which is "bad", the
DNS result or the IP address. But in my experience, when some people
can reach an internet host by name and others cannot, it's almost
always due to a DNS issue.
-- 
Len


On Thu, Jul 17, 2008 at 14:47, Youssef Mohammed
<[EMAIL PROTECTED]> wrote:
> if you can't access 192.87.106.226 from firefox, then it has nothing to do
> with DNS.
>
>
> On Thu, Jul 17, 2008 at 9:36 PM, Len Popp <[EMAIL PROTECTED]> wrote:
>
>> www.apache.org is not currently working here.
>> ping www.apache.org gets a response from 192.87.106.226, but Firefox
>> doesn't get a response from either www.apache.org or 192.87.106.226.
>>
>> tomcat.apache.org is working.
>>
>> Maybe there was a DNS change that hasn't propagated everywhere yet?
>> --
>> Len
>>
>>
>> On Thu, Jul 17, 2008 at 14:14, Steve Ochani <[EMAIL PROTECTED]> wrote:
>> > On 17 Jul 2008 at 14:05, Bajbutovic, Zoran wrote:
>> >
>> > Date sent:  Thu, 17 Jul 2008 14:05:38 -0400
>> > From:   "Bajbutovic, Zoran" <[EMAIL PROTECTED]>
>> > Subject:Both www.apache.org and tomcat.apache.org are
>> down
>> > To: Tomcat Users List 
>> > Send reply to:  Tomcat Users List 
>> >
>> >> Hi all,
>> >>
>> >> Both www.apache.org and tomcat.apache.org have been down for some
>> >> time.
>> >> Is anyone there to fix this? This is not particularly encouraging
>> >> for us
>> >
>> >
>> > Works fine for me.
>> >
>> >
>> >
>> > -Steve O.
>> >
>> >
>> >
>> >
>> > -
>> > To start a new topic, e-mail: users@tomcat.apache.org
>> > To unsubscribe, e-mail: [EMAIL PROTECTED]
>> > For additional commands, e-mail: [EMAIL PROTECTED]
>> >
>> >
>>
>> -
>> To start a new topic, e-mail: users@tomcat.apache.org
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>
>
> --
> Regards, Youssef
>

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



Re: Both www.apache.org and tomcat.apache.org are down

2008-07-17 Thread Youssef Mohammed
if you can't access 192.87.106.226 from firefox, then it has nothing to do
with DNS.


On Thu, Jul 17, 2008 at 9:36 PM, Len Popp <[EMAIL PROTECTED]> wrote:

> www.apache.org is not currently working here.
> ping www.apache.org gets a response from 192.87.106.226, but Firefox
> doesn't get a response from either www.apache.org or 192.87.106.226.
>
> tomcat.apache.org is working.
>
> Maybe there was a DNS change that hasn't propagated everywhere yet?
> --
> Len
>
>
> On Thu, Jul 17, 2008 at 14:14, Steve Ochani <[EMAIL PROTECTED]> wrote:
> > On 17 Jul 2008 at 14:05, Bajbutovic, Zoran wrote:
> >
> > Date sent:  Thu, 17 Jul 2008 14:05:38 -0400
> > From:   "Bajbutovic, Zoran" <[EMAIL PROTECTED]>
> > Subject:Both www.apache.org and tomcat.apache.org are
> down
> > To: Tomcat Users List 
> > Send reply to:  Tomcat Users List 
> >
> >> Hi all,
> >>
> >> Both www.apache.org and tomcat.apache.org have been down for some
> >> time.
> >> Is anyone there to fix this? This is not particularly encouraging
> >> for us
> >
> >
> > Works fine for me.
> >
> >
> >
> > -Steve O.
> >
> >
> >
> >
> > -
> > To start a new topic, e-mail: users@tomcat.apache.org
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
> -
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Regards, Youssef


Re: Both www.apache.org and tomcat.apache.org are down

2008-07-17 Thread Len Popp
www.apache.org is not currently working here.
ping www.apache.org gets a response from 192.87.106.226, but Firefox
doesn't get a response from either www.apache.org or 192.87.106.226.

tomcat.apache.org is working.

Maybe there was a DNS change that hasn't propagated everywhere yet?
-- 
Len


On Thu, Jul 17, 2008 at 14:14, Steve Ochani <[EMAIL PROTECTED]> wrote:
> On 17 Jul 2008 at 14:05, Bajbutovic, Zoran wrote:
>
> Date sent:  Thu, 17 Jul 2008 14:05:38 -0400
> From:   "Bajbutovic, Zoran" <[EMAIL PROTECTED]>
> Subject:Both www.apache.org and tomcat.apache.org are down
> To: Tomcat Users List 
> Send reply to:  Tomcat Users List 
>
>> Hi all,
>>
>> Both www.apache.org and tomcat.apache.org have been down for some
>> time.
>> Is anyone there to fix this? This is not particularly encouraging
>> for us
>
>
> Works fine for me.
>
>
>
> -Steve O.
>
>
>
>
> -
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

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



Re: Apache/mod_jk serves random files from tomcat

2008-07-17 Thread dave.smith

Hi Rainer,

I just use mod_jk to connect apache to tomcat.  I don't do anything special
with the configurations:  i just have a few virtual hosts that contain a few
JkMounts and some apache rewrites.  Do you think switching to mod_proxy_ajp
would make the problem go away?

Thanks,
Dave


Rainer Jung-3 wrote:
> 
> dave.smith schrieb:
>> Yesterday, I upgraded our dev environment to mod_jk 1.2.26, which
>> couldn't
>> have been easier.  It will probably take me a couple of days before I can
>> get this done in production, though.
>> 
>> I terminate all HTTPS requests before they get to the web server, so from
>> what you have described, it is probably safe to disable the APR
>> connector. 
>> How do I disable it, though?  I will look into disabling this after I
>> have
>> updated mod_jk in production.
> 
> Locate the tcnative shared object file (tcnative.so or tcnative-1.so) 
> and renme it, so that the linker loader does not find it (e.g. add an 
> underscore at the end of the file name).
> 
> Then during the next startup, Tomcat should emit an info level log 
> message telling you, that it couldn't find the lib.
> 
>> Here's the full stack trace for that exception, displayed in my Tomcat
>> logs:
>> 
>> Jul 10, 2008 10:06:50 PM org.apache.catalina.connector.Request
>> parseParameters
>> WARNING: Exception thrown whilst processing POSTed parameters
>> java.io.IOException: Socket read failed
>> at
>> org.apache.coyote.ajp.AjpAprProcessor.read(AjpAprProcessor.java:1037)
>> at
>> org.apache.coyote.ajp.AjpAprProcessor.readMessage(AjpAprProcessor.java:1158)
>> at
>> org.apache.coyote.ajp.AjpAprProcessor.receive(AjpAprProcessor.java:1090)
>> at
>> org.apache.coyote.ajp.AjpAprProcessor$SocketInputBuffer.doRead(AjpAprProcessor.java:1228)
>> at org.apache.coyote.Request.doRead(Request.java:419)
>> at
>> org.apache.catalina.connector.InputBuffer.realReadBytes(InputBuffer.java:265)
>> at
>> org.apache.tomcat.util.buf.ByteChunk.substract(ByteChunk.java:403)
>> at
>> org.apache.catalina.connector.InputBuffer.read(InputBuffer.java:280)
>> at
>> org.apache.catalina.connector.CoyoteInputStream.read(CoyoteInputStream.java:193)
>> at
>> org.apache.catalina.connector.Request.readPostBody(Request.java:2400)
>> at
>> org.apache.catalina.connector.Request.parseParameters(Request.java:2379)
>> at
>> org.apache.catalina.connector.Request.getParameterNames(Request.java:1047)
>> at
>> org.apache.catalina.connector.RequestFacade.getParameterNames(RequestFacade.java:369)
>> at
>> org.apache.struts.util.RequestUtils.populate(RequestUtils.java:1225)
>> at
>> org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.java:821)
>> at
>> org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:254)
>> at
>> org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
>> at
>> org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
>> at
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
>> at
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
>> at
>> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
>> at
>> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
>> at
>> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
>> at
>> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
>> at
>> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
>> at
>> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
>> at
>> org.apache.coyote.ajp.AjpAprProcessor.process(AjpAprProcessor.java:444)
>> at
>> org.apache.coyote.ajp.AjpAprProtocol$AjpConnectionHandler.process(AjpAprProtocol.java:472)
>> at
>> org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1286)
>> at java.lang.Thread.run(Thread.java:595)
> 
> OK, thanks. You are sure it is not 5.5.26?
> 
> Regards,
> 
> Rainer
> 
>> Rainer Jung-3 wrote:
>>> Hi David,
>>>
>>> dave.smith schrieb:
 Hi Rainer,

 Thanks a lot for the reply.

 I am using Tomcat 5.5.25 (rpm from jpackage.org).  CentOS Linux 2.6.18.

 httpd was compiled in prefork mode. The prefork settings are:

 StartServers   8
 MinSpareServers5
 MaxSpareServers   20
 ServerLimit  256
 MaxClients   256
 MaxRequestsPerChild  4000

 I have setup JMeter to run against a test environment, but was unable
 to
 reproduce.  These random responses occur in p

Re: Both www.apache.org and tomcat.apache.org are down

2008-07-17 Thread Steve Ochani
On 17 Jul 2008 at 14:05, Bajbutovic, Zoran wrote:

Date sent:  Thu, 17 Jul 2008 14:05:38 -0400
From:   "Bajbutovic, Zoran" <[EMAIL PROTECTED]>
Subject:Both www.apache.org and tomcat.apache.org are down
To: Tomcat Users List 
Send reply to:  Tomcat Users List 

> Hi all, 
> 
> Both www.apache.org and tomcat.apache.org have been down for some
> time. 
> Is anyone there to fix this? This is not particularly encouraging
> for us


Works fine for me.



-Steve O.




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



RE: Both www.apache.org and tomcat.apache.org are down

2008-07-17 Thread Bajbutovic, Zoran
Thanks for checking. Than could be network specific...

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of
Raymond Kroeker
Sent: Thursday, July 17, 2008 2:09 PM
To: Tomcat Users List
Subject: Re: Both www.apache.org and tomcat.apache.org are down

I have no issues hitting either site.

Raymond

On Thu, Jul 17, 2008 at 11:05, Bajbutovic, Zoran
<[EMAIL PROTECTED]> wrote:
> Hi all,
>
> Both www.apache.org and tomcat.apache.org have been down for some
time.
> Is anyone there to fix this? This is not particularly encouraging for
us
> -Apache and Tomcat users.
>
> Zoran
>
>
> -
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>



-- 
-
Raymond Kroeker

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


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



Re: Both www.apache.org and tomcat.apache.org are down

2008-07-17 Thread Raymond Kroeker
I have no issues hitting either site.

Raymond

On Thu, Jul 17, 2008 at 11:05, Bajbutovic, Zoran <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> Both www.apache.org and tomcat.apache.org have been down for some time.
> Is anyone there to fix this? This is not particularly encouraging for us
> -Apache and Tomcat users.
>
> Zoran
>
>
> -
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>



-- 
-
Raymond Kroeker

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



Both www.apache.org and tomcat.apache.org are down

2008-07-17 Thread Bajbutovic, Zoran
Hi all, 

Both www.apache.org and tomcat.apache.org have been down for some time. 
Is anyone there to fix this? This is not particularly encouraging for us
-Apache and Tomcat users.

Zoran


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



Mod_proxy_ajp and App Returing Generic Files For Download

2008-07-17 Thread Plana, Richard
Hi,

We're wanting a servlet request to return a generic file for download.
In Java, we use the following code:

public ActionForward myAction(ActionMapping mapping,
  ActionForm form,
  HttpServletRequest request,
  HttpServletResponse response) throws
Exception {
...
response.setContentType("application/download");
response.setHeader("Content-Disposition",
"attachment;filename=\"" + "myfilename" + "\"");
response.setContentLength(ret.length());

PrintWriter writer = response.getWriter();
writer.write(ret);
writer.flush();
...
return null;
}

This would work with Tomcat's HTTP interface as well as mod_jk, but with
mod_proxy_ajp, we get an "Error downloading page" from the browser and
the following in the logs:

[Tue Jul 15 16:47:35 2008] [debug] mod_proxy_ajp.c(239): proxy:
APR_BUCKET_IS_EOS
[Tue Jul 15 16:47:35 2008] [debug] mod_proxy_ajp.c(244): proxy: data to
read (max 8186 at 4)
[Tue Jul 15 16:47:35 2008] [debug] mod_proxy_ajp.c(259): proxy: got 0
bytes of data
[Tue Jul 15 16:47:35 2008] [debug] ajp_header.c(652): ajp_read_header:
ajp_ilink_received 04
[Tue Jul 15 16:47:35 2008] [debug] ajp_header.c(662): ajp_parse_type:
got 04
[Tue Jul 15 16:47:35 2008] [debug] ajp_header.c(491):
ajp_unmarshal_response: status = 200
[Tue Jul 15 16:47:35 2008] [debug] ajp_header.c(502):
ajp_unmarshal_response: Number of headers is = 6
[Tue Jul 15 16:47:35 2008] [debug] ajp_header.c(564):
ajp_unmarshal_response: Header[0] [Pragma] = [No-cache]
[Tue Jul 15 16:47:35 2008] [debug] ajp_header.c(564):
ajp_unmarshal_response: Header[1] [Cache-Control] = [no-cache]
[Tue Jul 15 16:47:35 2008] [debug] ajp_header.c(564):
ajp_unmarshal_response: Header[2] [Expires] = [Thu, 01 Jan 1970 00:00:00
GMT]
[Tue Jul 15 16:47:35 2008] [debug] ajp_header.c(564):
ajp_unmarshal_response: Header[3] [Content-Disposition] =
[attachment;filename="myfilename"]
[Tue Jul 15 16:47:35 2008] [debug] ajp_header.c(564):
ajp_unmarshal_response: Header[4] [Content-Type] =
[application/download;charset=ISO-8859-1]
[Tue Jul 15 16:47:35 2008] [debug] ajp_header.c(574):
ajp_unmarshal_response: ap_set_content_type done
[Tue Jul 15 16:47:35 2008] [debug] ajp_header.c(564):
ajp_unmarshal_response: Header[5] [Content-Length] = [67]
[Tue Jul 15 16:47:35 2008] [debug] ajp_header.c(652): ajp_read_header:
ajp_ilink_received 03
[Tue Jul 15 16:47:35 2008] [debug] ajp_header.c(662): ajp_parse_type:
got 03
[Tue Jul 15 16:47:35 2008] [debug] ajp_header.c(652): ajp_read_header:
ajp_ilink_received 05
[Tue Jul 15 16:47:35 2008] [debug] ajp_header.c(662): ajp_parse_type:
got 05
[Tue Jul 15 16:47:35 2008] [debug] mod_proxy_ajp.c(498): proxy: got
response from 10.0.0.1:8009 (server1)
[Tue Jul 15 16:47:35 2008] [debug] proxy_util.c(2062): proxy: AJP: has
released connection for (server1)

Bug? We doing something mod_ajp doesn't like?
--

Richi Plana

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



Clustering - serial replication

2008-07-17 Thread Mike Whittaker
I am using tomcat 5.5 and have a clustering / replication problem.
I have a WAR file that i wish to deploy replicate and deploy across the
cluster, however because of the way this application conducts its own
upgrades, then the war files must be deployed serially.
That is to say that the primary node, where the new war is first
deployed, must complete before the next node is presented with (or
deploys) the new war. However for subsequent nodes it does not matter if
they are replicated concurrently.
I have been investigating the Cluster attributes in server.xml and in
particular the Sender attribute.  After much STFW I have tried changing
waitForAck, replicationMode and timing parameters.  However it seems
random when dropping war files in to the watched directory, whether the
replication is serial or not. Usually it is not. Is there any more
documentation other than the tomcat sites and FAQ linked from there?

 





NOTICE - This e-mail and its attachments are strictly confidential. If you are 
not the intended recipient please delete the e-mail (including attachments) 
from your system without printing copying disclosing or otherwise using its 
contents. If you have received this e-mail in error please notify the sender 
immediately by e-mail or telephone (01623) 885000. 
WARNING - Data conveyed by e-mail could be deliberately or accidentally 
intercepted or corrupted. Homeserve Property Repairs do not accept any 
responsibility for any changes or breaches of confidence which may arise 
through use of this medium. The content of e-mails sent and received by company 
employees may be intercepted or monitored by the company. It is the 
responsibility of the recipient to ensure that this e-mail has not been 
tampered with and that any attachments are virus-free. Whilst we make every 
effort to ensure that this e-mail is free from viruses this cannot be 
guaranteed. We recommend that you scan all e-mail for viruses with appropriate 
and frequently updated virus checking software.

Homeserve Property Repairs Limited  Registered Office: Cable Drive Walsall 
WS2 7BN. VAT Registration No: 559669669 Registered in England No: 3907989

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



Re: load balancing and sticky sessions

2008-07-17 Thread nch

If, for instance, I have 3 tomcats and one apache/mod_jk on the front end. Two 
of them balanced and the other one not balanced. Would session replication work 
for the tree of them or just for the balanced ones?


Thanks in advance.


- Original Message 
From: Pavan Singaraju <[EMAIL PROTECTED]>
To: Tomcat Users List 
Sent: Thursday, July 17, 2008 1:51:43 PM
Subject: Re: load balancing and sticky sessions

Set your session stickiness attribute to false.
e.g.: worker..sticky_session=false

On Thu, Jul 17, 2008 at 4:24 PM, nch <[EMAIL PROTECTED]> wrote:

> Hi, there.
> I'm reading http://tomcat.apache.org/tomcat-6.0-doc/cluster-howto.html
> It says "Make sure that your loadbalancer is configured for sticky session
> mode".
> I have the requirement of an apache/mod_jk load balanced tomcat cluster
> using session replication without session stickyness. Is this possible?
> I'm running tomcat 6.0.13 and apache 1.3.37.
>
> Regards.
>
>
>
>



  

Re: Apache/mod_jk serves random files from tomcat

2008-07-17 Thread Tim Redding

Just checked the the mod_jk log file.  

2 other files were requested at 12:31:42 in addition to the /css/global.css
file.  One was index.html which just happened to be 2352 bytes in size. 
Exactly the same as the mysterious global.css file we got served.

I have full debug level log files for mod_jk if interested.


Tim..




Tim Redding wrote:
> 
> I now have logs from both the Apache server and Tomcat.   I'm a little
> unsure how to interpret these log files. It shows that Tomcat does serve
> the file correctly and it is Apache that appears to do something odd when
> Tomcat returns a 304 response code.  
> 
> Apache Access Log
> 
> xx.xx.4.58 - - [17/Jul/2008:12:31:38 +0100] "GET /css/global.css HTTP/1.1"
> 304 -
> xx.xx.4.58 - - [17/Jul/2008:12:31:42 +0100] "GET /css/global.css HTTP/1.1"
> 200 2352
> xx.xx.4.58 - - [17/Jul/2008:12:31:48 +0100] "GET /css/global.css HTTP/1.1"
> 200 7323
> xx.xx.4.58 - - [17/Jul/2008:12:31:51 +0100] "GET /css/global.css HTTP/1.1"
> 304 -
> xx.xx.4.58 - - [17/Jul/2008:12:33:01 +0100] "GET /css/global.css HTTP/1.1"
> 200 7248
> xx.xx.4.58 - - [17/Jul/2008:13:42:14 +0100] "GET /css/global.css HTTP/1.1"
> 200 7323
> 
> Tomcat Access Log
> 
> xx.xx.4.58 - - [17/Jul/2008:12:31:38 +0100] "GET /css/global.css HTTP/1.1"
> 304 -
> xx.xx.4.58 - - [17/Jul/2008:12:31:42 +0100] "GET /css/global.css HTTP/1.1"
> 304 -
> xx.xx.4.58 - - [17/Jul/2008:12:31:48 +0100] "GET /css/global.css HTTP/1.1"
> 200 7323
> xx.xx.4.58 - - [17/Jul/2008:12:31:50 +0100] "GET /css/global.css HTTP/1.1"
> 304 -
> xx.xx.4.58 - - [17/Jul/2008:12:33:01 +0100] "GET /css/global.css HTTP/1.1"
> 304 -
> xx.xx.4.58 - - [17/Jul/2008:13:42:14 +0100] "GET /css/global.css HTTP/1.1"
> 200 7323
> 
> Little unsure about how the 4th request at 12:31:51 on Apache was served
> by Tomcat at 12:31:50.  I've double checked this and it is correct.
> 
> 
> Tim..
> 
> 
> 
> 
> Tim Redding wrote:
>> 
>> 
>> Thanks for the quick reply.  I've enabled the AccessLogValve.  I've just
>> gotta wait for it to start playing up again.  Could be 2 hours or 2
>> weeks.  I'll reply when I have more info.
>> 
>> Tim.
>> 
>> 
>> Len Popp wrote:
>>> 
>>> That log file is from the httpd server, right? What does the Tomcat
>>> log file say? (Turn on AccessLogValve if you haven't already.) Is
>>> Tomcat always getting requests for the correct file, or is mod_jk
>>> requesting the wrong file sometimes?
>>> -- 
>>> Len
>>> 
>>> 
>>> On Thu, Jul 10, 2008 at 11:44, Tim Redding <[EMAIL PROTECTED]> wrote:

 Hi,

 We are experiencing intermittent problems with a particular site that
 is not
 returning the correct file that is requested.  For instance if we
 request
 the index.html file we actually get a css file or even an image.  From
 the
 apache access log you can see that the size of the index.html file
 grows on
 the second request. This is because a gif was actually returned.

 XXX.XXX.XXX.130 - - [10/Jul/2008:15:10:39 +0100] "GET /index.html
 HTTP/1.1"
 200 1068
 XXX.XXX.XXX.130 - - [10/Jul/2008:15:13:10 +0100] "GET /index.html
 HTTP/1.1"
 200 9526
 XXX.XXX.XXX.130 - - [10/Jul/2008:15:13:48 +0100] "GET /index.html
 HTTP/1.1"
 200 1086

 No error messages are logged in the mode_jk.log file.

 We have Apache/2.2.3 on the front on a Tomcat 6.0.16 server with mod_jk
 (version unknown but fairly recent).  We have all assets in our war
 file.
 When we hit Tomcat directly on port 8080 it serves the correct file.
 And to
 fix the problem an apache restart seems to sort things out.

 On this server with have 2 vhosts.  One is a simple nothing fancy
 static
 site and the other forwards everything to our Tomcat server.  Below
 I've
 included our mod_jk config and a snippet of our httpd.conf.

 Any ideas or things to try would be most appreciated.


 Tim.



 = mod_jk.conf ==

 # Load mod_jk module
 # Specify the filename of the mod_jk lib
 LoadModule jk_module modules/mod_jk.so

 # Where to find workers.properties
 JkWorkersFile conf/workers.properties

 # Where to put jk logs
 JkLogFile logs/mod_jk.log

 # Set the jk log level [debug/error/info]
 JkLogLevel debug

 # Select the log format
 JkLogStampFormat "[%a %b %d %H:%M:%S %Y]"

 # JkOptions indicates to send SSK KEY SIZE
 JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories

 # JkRequestLogFormat
 JkRequestLogFormat "%w %V %T"

 # Add shared memory.
 # This directive is present with 1.2.10 and
 # later versions of mod_jk, and is needed for
 # for load balancing to work properly
 JkShmFile logs/jk.shm

 # original URL pass through
 JkEnvVarORIGINAL_URIw00t

 # Add jkstatus for managing runtime data
 
 JkMount status
 Order deny,allow
 Deny from 

RE: Configure JNDI resources in a separate file from server.xml

2008-07-17 Thread Radcliffe, William H.
Brantley Hobbs wrote:

>My question is this:  Is it possible to pull in an "include" file in
>server.xml?  I'd like to place all the database connection information
>in a separate file.

You are referring to placing a file called context.xml in the /META-INF
folder of your web app.  This file can be moved to the
$CATALINA_HOME/conf/[enginename]/[hostname]/ folder.  Rename context.xml to
[contextname].xml, or ROOT.xml if your application is the root web
application.  See
http://tomcat.apache.org/tomcat-6.0-doc/deployer-howto.html.


Bill

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



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



Re: Configure JNDI resources in a separate file from server.xml

2008-07-17 Thread Mikolaj Rydzewski

Brantley Hobbs wrote:
My question is this:  Is it possible to pull in an "include" file in 
server.xml?  I'd like to place all the database connection information 
in a separate file.

I don't think it's possible.

You can:

  1. use conf/Catalina/.../.xml instead of application's context.xml
  2. write your own factory implementation which will suck in
 configuration data from elsewhere


--
Mikolaj Rydzewski <[EMAIL PROTECTED]>


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



Configure JNDI resources in a separate file from server.xml

2008-07-17 Thread Brantley Hobbs

All,

We're trying to lock down our infrastructure here.  We want to avoid 
having production database credentials in the web application's 
context.xml, so we're going to move them to tomcat's server.xml.  (We 
have read the JNDI How-To and have noted the recommendation to place 
resources in the app's context.xml.)


My question is this:  Is it possible to pull in an "include" file in 
server.xml?  I'd like to place all the database connection information 
in a separate file.


Thanks,
Brantley Hobbs

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



Re: Apache/mod_jk serves random files from tomcat

2008-07-17 Thread Tim Redding

I now have logs from both the Apache server and Tomcat.   I'm a little unsure
how to interpret these log files. It shows that Tomcat does serve the file
correctly and it is Apache that appears to do something odd when Tomcat
returns a 304 response code.  

Apache Access Log

xx.xx.4.58 - - [17/Jul/2008:12:31:38 +0100] "GET /css/global.css HTTP/1.1"
304 -
xx.xx.4.58 - - [17/Jul/2008:12:31:42 +0100] "GET /css/global.css HTTP/1.1"
200 2352
xx.xx.4.58 - - [17/Jul/2008:12:31:48 +0100] "GET /css/global.css HTTP/1.1"
200 7323
xx.xx.4.58 - - [17/Jul/2008:12:31:51 +0100] "GET /css/global.css HTTP/1.1"
304 -
xx.xx.4.58 - - [17/Jul/2008:12:33:01 +0100] "GET /css/global.css HTTP/1.1"
200 7248
xx.xx.4.58 - - [17/Jul/2008:13:42:14 +0100] "GET /css/global.css HTTP/1.1"
200 7323

Tomcat Access Log

xx.xx.4.58 - - [17/Jul/2008:12:31:38 +0100] "GET /css/global.css HTTP/1.1"
304 -
xx.xx.4.58 - - [17/Jul/2008:12:31:42 +0100] "GET /css/global.css HTTP/1.1"
304 -
xx.xx.4.58 - - [17/Jul/2008:12:31:48 +0100] "GET /css/global.css HTTP/1.1"
200 7323
xx.xx.4.58 - - [17/Jul/2008:12:31:50 +0100] "GET /css/global.css HTTP/1.1"
304 -
xx.xx.4.58 - - [17/Jul/2008:12:33:01 +0100] "GET /css/global.css HTTP/1.1"
304 -
xx.xx.4.58 - - [17/Jul/2008:13:42:14 +0100] "GET /css/global.css HTTP/1.1"
200 7323

Little unsure about how the 4th request at 12:31:51 on Apache was served by
Tomcat at 12:31:50.  I've double checked this and it is correct.


Tim..




Tim Redding wrote:
> 
> 
> Thanks for the quick reply.  I've enabled the AccessLogValve.  I've just
> gotta wait for it to start playing up again.  Could be 2 hours or 2 weeks. 
> I'll reply when I have more info.
> 
> Tim.
> 
> 
> Len Popp wrote:
>> 
>> That log file is from the httpd server, right? What does the Tomcat
>> log file say? (Turn on AccessLogValve if you haven't already.) Is
>> Tomcat always getting requests for the correct file, or is mod_jk
>> requesting the wrong file sometimes?
>> -- 
>> Len
>> 
>> 
>> On Thu, Jul 10, 2008 at 11:44, Tim Redding <[EMAIL PROTECTED]> wrote:
>>>
>>> Hi,
>>>
>>> We are experiencing intermittent problems with a particular site that is
>>> not
>>> returning the correct file that is requested.  For instance if we
>>> request
>>> the index.html file we actually get a css file or even an image.  From
>>> the
>>> apache access log you can see that the size of the index.html file grows
>>> on
>>> the second request. This is because a gif was actually returned.
>>>
>>> XXX.XXX.XXX.130 - - [10/Jul/2008:15:10:39 +0100] "GET /index.html
>>> HTTP/1.1"
>>> 200 1068
>>> XXX.XXX.XXX.130 - - [10/Jul/2008:15:13:10 +0100] "GET /index.html
>>> HTTP/1.1"
>>> 200 9526
>>> XXX.XXX.XXX.130 - - [10/Jul/2008:15:13:48 +0100] "GET /index.html
>>> HTTP/1.1"
>>> 200 1086
>>>
>>> No error messages are logged in the mode_jk.log file.
>>>
>>> We have Apache/2.2.3 on the front on a Tomcat 6.0.16 server with mod_jk
>>> (version unknown but fairly recent).  We have all assets in our war
>>> file.
>>> When we hit Tomcat directly on port 8080 it serves the correct file. And
>>> to
>>> fix the problem an apache restart seems to sort things out.
>>>
>>> On this server with have 2 vhosts.  One is a simple nothing fancy static
>>> site and the other forwards everything to our Tomcat server.  Below I've
>>> included our mod_jk config and a snippet of our httpd.conf.
>>>
>>> Any ideas or things to try would be most appreciated.
>>>
>>>
>>> Tim.
>>>
>>>
>>>
>>> = mod_jk.conf ==
>>>
>>> # Load mod_jk module
>>> # Specify the filename of the mod_jk lib
>>> LoadModule jk_module modules/mod_jk.so
>>>
>>> # Where to find workers.properties
>>> JkWorkersFile conf/workers.properties
>>>
>>> # Where to put jk logs
>>> JkLogFile logs/mod_jk.log
>>>
>>> # Set the jk log level [debug/error/info]
>>> JkLogLevel debug
>>>
>>> # Select the log format
>>> JkLogStampFormat "[%a %b %d %H:%M:%S %Y]"
>>>
>>> # JkOptions indicates to send SSK KEY SIZE
>>> JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
>>>
>>> # JkRequestLogFormat
>>> JkRequestLogFormat "%w %V %T"
>>>
>>> # Add shared memory.
>>> # This directive is present with 1.2.10 and
>>> # later versions of mod_jk, and is needed for
>>> # for load balancing to work properly
>>> JkShmFile logs/jk.shm
>>>
>>> # original URL pass through
>>> JkEnvVarORIGINAL_URIw00t
>>>
>>> # Add jkstatus for managing runtime data
>>> 
>>> JkMount status
>>> Order deny,allow
>>> Deny from all
>>> Allow from 127.0.0.1
>>> 
>>>
>>>
>>> === httpd.conf (our additions to the default file) ==
>>>
>>> # mod_jk include
>>> Include conf/mod_jk.conf
>>>
>>> 
>>>DocumentRoot /var/www/html/
>>>ServerName example.co.uk
>>>ErrorLog logs/default-error.log
>>>CustomLog logs/default-access.log common
>>>alias /logs /var/widgets
>>>
>>>AuthUserFile /var/widgets/.htpasswd
>>>AuthName "Widgets"
>>>AuthType Basic
>>>Require valid-user
>>>
>>>
>>>Rewriteengine on
>>>RewriteRule

Re: CometProcessor and DWR

2008-07-17 Thread Filip Hanik - Dev Lists

yes, you got it right,

if you call event.close() inside the BEGIN event, you will not receive 
an END event, since the request never became async, it was basically, 
like a regular servlet.


Filip


Joe Walker wrote:

I guess I misread the docs. From:
http://tomcat.apache.org/tomcat-6.0-doc/aio.html
While talking about EventType.READ: "It is not allowed to attempt reading
data from the request object outside of the execution of this method."

Would it be correct to say - Use EventType.READ if you're worried about
blocking. EventType.BEGIN generally acts in the same way as the
Servlet.service method in the way it blocks.

Pseudo code for what we're doing now:

public void event(CometEvent event) {
if (event.getEventType() == BEGIN) {
// stash the event as a request attribute

// act like nothing is different
service(request, response);

// sleep is set by the guts of DWR
if (!sleep) {
event.close();
}
}
else if (event.getEventType() == ERROR || event.getEventType() == END) {
event.close();
}
}

And then we set sleep == true in the guts of DWR when we want to sleep,
having set sleep, we call event.close() when we're done.

Everything appears to be working OK now.
Many thanks,

Joe.


On Thu, Jul 17, 2008 at 2:34 PM, Filip Hanik - Dev Lists <[EMAIL PROTECTED]>
wrote:

  

what does your HTTP request look like, it would need to have a body for the
READ event to be called.
currently READ doesn't get invoked when you are using a
x-www-form-urlencoded
this was fixed in trunk yesterday,

http://svn.apache.org/viewvc?rev=677473&view=rev

also, in your begin event, you can call event.setTimeout if you need a
custom timeout

Filip



Joe Walker wrote:



Thanks for the help Philip.

So I was hoping to use the normal Servlet processing for all requests, and
then do something special to drop a thread when doing comet.
My event method looks like this:

public void event(CometEvent event) throws IOException, ServletException {
   if (event.getEventType() == CometEvent.EventType.BEGIN) {
   event.getHttpServletRequest().setAttribute(ATTRIBUTE_EVENT, event);
   }
   else if (event.getEventType() == CometEvent.EventType.ERROR) {
   event.close();
   }
   else if (event.getEventType() == CometEvent.EventType.END) {
   event.close();
   }
   else if (event.getEventType() == CometEvent.EventType.READ) {
   // Does this handle blocking reads if we just carry on reading?
   service(event.getHttpServletRequest(),
event.getHttpServletResponse());
   }
}

The effect that I'm seeing is a call to event() with event.getEventType()
==
CometEvent.EventType.BEGIN as expected, but I'm expecting some READ
events,
but nothing until an ERROR(TIMEOUT) event a bit later.

When Tomcat starts it says:
Jul 17, 2008 10:35:31 AM org.apache.catalina.core.AprLifecycleListener
init
INFO: The Apache Tomcat Native library which allows optimal performance in
production environments was not found on the java.library.path:
.:/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java
Jul 17, 2008 10:35:35 AM org.apache.coyote.http11.Http11NioProtocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
Jul 17, 2008 10:35:35 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 8828 ms
Jul 17, 2008 10:35:35 AM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Jul 17, 2008 10:35:35 AM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.14

Do I need to fire up a C compiler to get this to work?

Joe.


On Thu, Jul 17, 2008 at 4:04 AM, Filip Hanik - Dev Lists <
[EMAIL PROTECTED]>
wrote:



  

for your connector element you must have

protocol="org.apache.coyote.http11.Http11NioProtocol"
or
protocol="org.apache.coyote.http11.Http11AprProtocol"  (and the APR and
tcnative libraries in your PATH/LD_LIBRARY_PATH)

Filip
Joe Walker wrote:





Hi,

It looks like servlet spec 3 is wy off. So I'm creating a
implementation
of CometProcessor in DWR.
I've created a new CometProcessor like this:

public class DwrCometProcessor extends DwrServlet implements
CometProcessor

But the event() method is not called. It just leaps straight to
service().
Is there anything else I need to be doing (clearly I've changed web.xml
to
point at the new 'servlet' using 
org.directwebremoting.servers.tomcat.DwrCometProcessor)?

Joe.


 

No virus found in this incoming message.
Checked by AVG. Version: 7.5.526 / Virus Database: 270.4.11/1554 -
Release
Date: 7/15/2008 6:03 PM




  

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






 ---

Re: changing extension of a jsp

2008-07-17 Thread Mikolaj Rydzewski

Deepak Mishra wrote:

so i thought, if there is a way to tweak tomcat, so that i can use change
the extensions of my jsp to "show" asp.
  

Look for JspServlet declaration in conf/web.xml

--
Mikolaj Rydzewski <[EMAIL PROTECTED]>


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



changing extension of a jsp

2008-07-17 Thread Deepak Mishra
hello.

i am using apache-tomcat6.

i was looking to play a prank over my friends , by publishing their results
on a lookalike site of my university. the problem is that the university is
using asp , and i know only jsp.

so i thought, if there is a way to tweak tomcat, so that i can use change
the extensions of my jsp to "show" asp.

thank you.

deepak mishra.


Re: CometProcessor and DWR

2008-07-17 Thread Joe Walker
I guess I misread the docs. From:
http://tomcat.apache.org/tomcat-6.0-doc/aio.html
While talking about EventType.READ: "It is not allowed to attempt reading
data from the request object outside of the execution of this method."

Would it be correct to say - Use EventType.READ if you're worried about
blocking. EventType.BEGIN generally acts in the same way as the
Servlet.service method in the way it blocks.

Pseudo code for what we're doing now:

public void event(CometEvent event) {
if (event.getEventType() == BEGIN) {
// stash the event as a request attribute

// act like nothing is different
service(request, response);

// sleep is set by the guts of DWR
if (!sleep) {
event.close();
}
}
else if (event.getEventType() == ERROR || event.getEventType() == END) {
event.close();
}
}

And then we set sleep == true in the guts of DWR when we want to sleep,
having set sleep, we call event.close() when we're done.

Everything appears to be working OK now.
Many thanks,

Joe.


On Thu, Jul 17, 2008 at 2:34 PM, Filip Hanik - Dev Lists <[EMAIL PROTECTED]>
wrote:

>
> what does your HTTP request look like, it would need to have a body for the
> READ event to be called.
> currently READ doesn't get invoked when you are using a
> x-www-form-urlencoded
> this was fixed in trunk yesterday,
>
> http://svn.apache.org/viewvc?rev=677473&view=rev
>
> also, in your begin event, you can call event.setTimeout if you need a
> custom timeout
>
> Filip
>
>
>
> Joe Walker wrote:
>
>> Thanks for the help Philip.
>>
>> So I was hoping to use the normal Servlet processing for all requests, and
>> then do something special to drop a thread when doing comet.
>> My event method looks like this:
>>
>> public void event(CometEvent event) throws IOException, ServletException {
>>if (event.getEventType() == CometEvent.EventType.BEGIN) {
>>event.getHttpServletRequest().setAttribute(ATTRIBUTE_EVENT, event);
>>}
>>else if (event.getEventType() == CometEvent.EventType.ERROR) {
>>event.close();
>>}
>>else if (event.getEventType() == CometEvent.EventType.END) {
>>event.close();
>>}
>>else if (event.getEventType() == CometEvent.EventType.READ) {
>>// Does this handle blocking reads if we just carry on reading?
>>service(event.getHttpServletRequest(),
>> event.getHttpServletResponse());
>>}
>> }
>>
>> The effect that I'm seeing is a call to event() with event.getEventType()
>> ==
>> CometEvent.EventType.BEGIN as expected, but I'm expecting some READ
>> events,
>> but nothing until an ERROR(TIMEOUT) event a bit later.
>>
>> When Tomcat starts it says:
>> Jul 17, 2008 10:35:31 AM org.apache.catalina.core.AprLifecycleListener
>> init
>> INFO: The Apache Tomcat Native library which allows optimal performance in
>> production environments was not found on the java.library.path:
>> .:/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java
>> Jul 17, 2008 10:35:35 AM org.apache.coyote.http11.Http11NioProtocol init
>> INFO: Initializing Coyote HTTP/1.1 on http-8080
>> Jul 17, 2008 10:35:35 AM org.apache.catalina.startup.Catalina load
>> INFO: Initialization processed in 8828 ms
>> Jul 17, 2008 10:35:35 AM org.apache.catalina.core.StandardService start
>> INFO: Starting service Catalina
>> Jul 17, 2008 10:35:35 AM org.apache.catalina.core.StandardEngine start
>> INFO: Starting Servlet Engine: Apache Tomcat/6.0.14
>>
>> Do I need to fire up a C compiler to get this to work?
>>
>> Joe.
>>
>>
>> On Thu, Jul 17, 2008 at 4:04 AM, Filip Hanik - Dev Lists <
>> [EMAIL PROTECTED]>
>> wrote:
>>
>>
>>
>>> for your connector element you must have
>>>
>>> protocol="org.apache.coyote.http11.Http11NioProtocol"
>>> or
>>> protocol="org.apache.coyote.http11.Http11AprProtocol"  (and the APR and
>>> tcnative libraries in your PATH/LD_LIBRARY_PATH)
>>>
>>> Filip
>>> Joe Walker wrote:
>>>
>>>
>>>
 Hi,

 It looks like servlet spec 3 is wy off. So I'm creating a
 implementation
 of CometProcessor in DWR.
 I've created a new CometProcessor like this:

 public class DwrCometProcessor extends DwrServlet implements
 CometProcessor

 But the event() method is not called. It just leaps straight to
 service().
 Is there anything else I need to be doing (clearly I've changed web.xml
 to
 point at the new 'servlet' using 
 org.directwebremoting.servers.tomcat.DwrCometProcessor)?

 Joe.


  

 No virus found in this incoming message.
 Checked by AVG. Version: 7.5.526 / Virus Database: 270.4.11/1554 -
 Release
 Date: 7/15/2008 6:03 PM




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

Re: Apache/mod_jk serves random files from tomcat

2008-07-17 Thread Eric Dalquist



Rainer Jung-3 wrote:
> 
> Do you get any info or above log messages in the JK log file close to 
> this events?
> 
I don't believe there was anything interesting in the JK log file near that
time period.


Rainer Jung-3 wrote:
> 
> What is the last column in the log formats? Is it both %D? Then there is 
> also something else strange, namely execution times of 4, 28 and 99 
> milliseconds in the Tomcat log, and 14.8, 9 and 8.9 milliseconds on the 
> httpd side. So the first request takes much longer on the httpd side, 
> the next two seem to be quicker for httpd than for the backend, which is 
> impossible unless httpd/mod_jk terminate the request/response cycle 
> prematurely. In this case I would expect a message either in the JK log 
> or the httpd error log.
> 
They are timestamps as you guessed and yes they are a bit strange when
correlating the two sets of log entries. I also forgot to mention that we
have app-side logging and we do know that userB's request to /portal/Login
was received and processed correctly by the application. Knowing that
requests make it through to the application it appears to be an issue on the
response side of the cycle.


Rainer Jung-3 wrote:
> 
> Do you have some efficient way to detect those errors (scripts comparing 
> the log files), or do you only detect them on user feedback? If you've 
> got scripts, you could also add %P and %{tid}P to the access log format, 
> which will provide process id and thread id, so we get an idea, if the 
> switch happens on a single thread.
> 

We don't have a script to detect these errors and have, to date, relied on
user reports. I may look into figuring out a script to compare the two sets
of logs and see if we can find these that way. I'll also look into adding
the pid and tid info to the logs.

-Eric

-- 
View this message in context: 
http://www.nabble.com/Apache-mod_jk-serves-random-files-from-tomcat-tp18385568p18509694.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



RE: Doubt on lifecycle of a class in "shared" folder

2008-07-17 Thread Caldarale, Charles R
> From: Edward Song [mailto:[EMAIL PROTECTED]
> Subject: RE: Doubt on lifecycle of a class in "shared" folder
>
> I believe it is because you are sharing the class definition,
> not instances, even if they are static instances.
>
> So webapp1 will create a static instance of Sharer, so will
> webapp2 off of the same class definition, but each will have
> its own instance.

What, pray tell, is a "static instance" in Java terminology?

If the class file of interest is being loaded by separate classloaders, then 
there will be separate java.lang.Class instances for each, despite originating 
from the same .class file.  However, the OP claims that the class is in the 
shared library, and should therefore be loaded by Tomcat's shared class loader 
- once.

Since independent testing verifies the proper operation of a normally 
configured Tomcat, the OP's environment is either non-standard (e.g., someone's 
been mucking around with conf/catalina.properties), or the framework is using 
its own classloader, or the OP doesn't really know where his classes are.

 - Chuck


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

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



count of web traffic

2008-07-17 Thread tony . chamberlain
Is there anyway to run tomcat and have it keep track of number of bytes
received and transmitted, for later review?



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



RE: Doubt on lifecycle of a class in "shared" folder

2008-07-17 Thread Edward Song
I believe it is because you are sharing the class definition, not instances,
even if they are static instances.

So webapp1 will create a static instance of Sharer, so will webapp2 off of
the same class definition, but each will have its own instance.


-Original Message-
From: java_is_everything [mailto:[EMAIL PROTECTED] 
Sent: Thursday, July 17, 2008 6:39 AM
To: users@tomcat.apache.org
Subject: Re: Doubt on lifecycle of a class in "shared" folder


Shared Class :


///
package client;

import java.util.ArrayList;

public class Sharer
{
public static ArrayList listForOthers  = null;  

static
{
System.out.println("STATIC ON WORK ");  
}

public static ArrayList getListForOthers()
  {
  if(listForOthers != null)
  {
  System.out.println("Returned is NOT NULL.");
  }
  else
  {
  System.out.println("Returned is NULL");
  }
  return listForOthers;
  }
  
  public static void setListForOthers(ArrayList list)
  {
  listForOthers = new ArrayList();
  
  for(int i = 0; i < list.size(); i++)
  {   
  ClientSideEvent ce = new ClientSideEvent();
  ClientSideEvent ce2 = (ClientSideEvent)
list.get(i);
  ce.setTimestamp(ce2.getTimestamp());
  ce.setId(ce2.getId());
  ce.setType(ce2.getType());
  ce.setDescription(ce2.getDescription());
  listForOthers.add(ce);
  } 
  
  }
}

//





webapp2 :



package client;

import java.util.ArrayList;

import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.RootPanel;


/**
 * Entry point classes define onModuleLoad().
 */
public class AnotherWelcomePage implements EntryPoint {

  /**
   * This is the entry point method.
   */
  public void onModuleLoad() {
  final Button button = new Button("Doosra Search");
  
  RootPanel.get("slot2").add(button); 
  
  ArrayList list = Sharer.getListForOthers();
  if(list != null)
  {
  button.setText("Returning OK with " + list.size());
  }
  else
  {
  button.setText("Problem !!");
  }
   }
}

///




webapp1 :



package client;

import java.util.ArrayList;

import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.ClickListener;
import com.google.gwt.user.client.ui.RootPanel;
import com.google.gwt.user.client.ui.Widget;

//import com.google.gwt.user.client.ui.;

/**
 * Entry point classes define onModuleLoad().
 */
public class EntryPointClass implements EntryPoint {

  /**
   * This is the entry point method.
   */
  public void onModuleLoad() {

  ArrayList list = new ArrayList();
  ClientSideEvent event = new ClientSideEvent();
  
  final Button b = new Button("Initial Display");
  b.addClickListener(new ClickListener()
  {

public void onClick(Widget sender) 
{

ArrayList nowlist = Sharer.getListForOthers();
if(nowlist == null)
{
b.setText("Null returned");
}   
else
{
b.setText("Size is " +
Integer.toString(nowlist.size()));
}

}   
  });
  
  RootPanel.get("slot1").add(b);  
  event.setTimestamp(" time is money "); // It's ok, needs a string
  event.setId(222);
  event.setType("type");
  event.setDescription("description");
  list.add(event);
  Sharer.setListForOthers(list);
  

  //button.setText(Integer.toString(list.size()));
  }
}
//

Re: CometProcessor and DWR

2008-07-17 Thread Filip Hanik - Dev Lists


what does your HTTP request look like, it would need to have a body for 
the READ event to be called.
currently READ doesn't get invoked when you are using a 
x-www-form-urlencoded

this was fixed in trunk yesterday,

http://svn.apache.org/viewvc?rev=677473&view=rev

also, in your begin event, you can call event.setTimeout if you need a custom 
timeout

Filip



Joe Walker wrote:

Thanks for the help Philip.

So I was hoping to use the normal Servlet processing for all requests, and
then do something special to drop a thread when doing comet.
My event method looks like this:

public void event(CometEvent event) throws IOException, ServletException {
if (event.getEventType() == CometEvent.EventType.BEGIN) {
event.getHttpServletRequest().setAttribute(ATTRIBUTE_EVENT, event);
}
else if (event.getEventType() == CometEvent.EventType.ERROR) {
event.close();
}
else if (event.getEventType() == CometEvent.EventType.END) {
event.close();
}
else if (event.getEventType() == CometEvent.EventType.READ) {
// Does this handle blocking reads if we just carry on reading?
service(event.getHttpServletRequest(),
event.getHttpServletResponse());
}
}

The effect that I'm seeing is a call to event() with event.getEventType() ==
CometEvent.EventType.BEGIN as expected, but I'm expecting some READ events,
but nothing until an ERROR(TIMEOUT) event a bit later.

When Tomcat starts it says:
Jul 17, 2008 10:35:31 AM org.apache.catalina.core.AprLifecycleListener init
INFO: The Apache Tomcat Native library which allows optimal performance in
production environments was not found on the java.library.path:
.:/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java
Jul 17, 2008 10:35:35 AM org.apache.coyote.http11.Http11NioProtocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
Jul 17, 2008 10:35:35 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 8828 ms
Jul 17, 2008 10:35:35 AM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Jul 17, 2008 10:35:35 AM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.14

Do I need to fire up a C compiler to get this to work?

Joe.


On Thu, Jul 17, 2008 at 4:04 AM, Filip Hanik - Dev Lists <[EMAIL PROTECTED]>
wrote:

  

for your connector element you must have

protocol="org.apache.coyote.http11.Http11NioProtocol"
or
protocol="org.apache.coyote.http11.Http11AprProtocol"  (and the APR and
tcnative libraries in your PATH/LD_LIBRARY_PATH)

Filip
Joe Walker wrote:



Hi,

It looks like servlet spec 3 is wy off. So I'm creating a
implementation
of CometProcessor in DWR.
I've created a new CometProcessor like this:

public class DwrCometProcessor extends DwrServlet implements
CometProcessor

But the event() method is not called. It just leaps straight to service().
Is there anything else I need to be doing (clearly I've changed web.xml to
point at the new 'servlet' using 
org.directwebremoting.servers.tomcat.DwrCometProcessor)?

Joe.

 

No virus found in this incoming message.
Checked by AVG. Version: 7.5.526 / Virus Database: 270.4.11/1554 - Release
Date: 7/15/2008 6:03 PM


  

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





  



No virus found in this incoming message.
Checked by AVG. 
Version: 7.5.526 / Virus Database: 270.5.0/1556 - Release Date: 7/16/2008 4:56 PM
  



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



RE: Tomcat does not start after update

2008-07-17 Thread Caldarale, Charles R
> From: news [mailto:[EMAIL PROTECTED] On Behalf Of Oliver Hirschi
> Subject: Re: Tomcat does not start after update
>
> I also tested
> System.out.println(System.getProperty("java.class.path"));
> in a test-class and so the output was:
> .:/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/
> Classes/.compatibility/14compatibility.jar
>
> So it seems the classpath is set correct or isn't it?

The above looks rather unusual.  The classpath is being set somewhere, 
otherwise it would have only the "." entry.  Also, if that's the Tomcat 5.5 
compatibility package jar for running with a 1.4 JVM, it must not be present 
for execution on a 1.5 JVM, so get rid of it.

 - Chuck


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

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



Re: [New Behavior - Maybe]Connections timing out even with validation query??

2008-07-17 Thread Ken Bowen
So I changed the  1000*60 to 6, and this morning, the site  
responds properly.
Of course, this is kind of marginal science since a collection of  
invidious daemons could
have lined up to hit the site every hour overnight.   But assuming  
that these changes
are responsible for the correct response,  I'm unclear about what it  
is in my situation

which makes them necessary.  Thoughts?

(BTW, if the correct behavior persists, I'll let you all know after a  
week.)

--Ken

On Jul 16, 2008, at 9:50 AM, Hassan Schroeder wrote:


On Wed, Jul 16, 2008 at 5:42 AM, Ken Bowen <[EMAIL PROTECTED]> wrote:


On Jul 16, 2008, at 8:20 AM, David Smith wrote:


I don't think "1000*60" is a valid expression for
timeBetweenEvictionRunsMillis -- at least I've never tried putting  
math
expressions where an integer constant should be.  It should be set  
to 6.


+1 -- that didn't look right to me, either, but I didn't try it.


All connections are /supposed/ to be closed when the interaction if
finished, but there still could be one slipping through.


Suggestions: install LambdaProbe, which provides a nice graphical
pool monitor; makes a connection leak *very* obvious.
()

Also, change that value above, restart, and tail -f your mysql query
log and tomcat logs together, so you can confirm validation queries
are being sent, and see when they stop showing up in the log.

HTH,
--
Hassan Schroeder  [EMAIL PROTECTED]

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




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



Re: load balancing and sticky sessions

2008-07-17 Thread Pavan Singaraju
Set your session stickiness attribute to false.
e.g.: worker..sticky_session=false

On Thu, Jul 17, 2008 at 4:24 PM, nch <[EMAIL PROTECTED]> wrote:

> Hi, there.
> I'm reading http://tomcat.apache.org/tomcat-6.0-doc/cluster-howto.html
> It says "Make sure that your loadbalancer is configured for sticky session
> mode".
> I have the requirement of an apache/mod_jk load balanced tomcat cluster
> using session replication without session stickyness. Is this possible?
> I'm running tomcat 6.0.13 and apache 1.3.37.
>
> Regards.
>
>
>
>


Re: Doubt on lifecycle of a class in "shared" folder

2008-07-17 Thread Mikolaj Rydzewski

java_is_everything wrote:

Now, webapp1 sets the list size to 1. Now when Sharer.getListForOthers()
from webapp1, "Size is 1", while when Sharer.getListForOthers() from
webapp2, it shows "Problem !!".

Any light ?/
  

Maybe gwt adds some magick?

I have checked it now on 5.x and 6.x - works as designed.

--
Mikolaj Rydzewski <[EMAIL PROTECTED]>


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



load balancing and sticky sessions

2008-07-17 Thread nch
Hi, there.
I'm reading http://tomcat.apache.org/tomcat-6.0-doc/cluster-howto.html
It says "Make sure that your loadbalancer is configured for sticky session 
mode".
I have the requirement of an apache/mod_jk load balanced tomcat cluster using 
session replication without session stickyness. Is this possible?
I'm running tomcat 6.0.13 and apache 1.3.37.

Regards.



  

Re: CometProcessor and DWR

2008-07-17 Thread Joe Walker
Just noticed: s/Philip/Filip/g
;-)

Joe.


On Thu, Jul 17, 2008 at 10:39 AM, Joe Walker <[EMAIL PROTECTED]> wrote:

>
> Thanks for the help Philip.
>
> So I was hoping to use the normal Servlet processing for all requests, and
> then do something special to drop a thread when doing comet.
> My event method looks like this:
>
> public void event(CometEvent event) throws IOException, ServletException {
> if (event.getEventType() == CometEvent.EventType.BEGIN) {
> event.getHttpServletRequest().setAttribute(ATTRIBUTE_EVENT, event);
> }
> else if (event.getEventType() == CometEvent.EventType.ERROR) {
> event.close();
> }
> else if (event.getEventType() == CometEvent.EventType.END) {
> event.close();
> }
> else if (event.getEventType() == CometEvent.EventType.READ) {
> // Does this handle blocking reads if we just carry on reading?
> service(event.getHttpServletRequest(),
> event.getHttpServletResponse());
> }
> }
>
> The effect that I'm seeing is a call to event() with event.getEventType()
> == CometEvent.EventType.BEGIN as expected, but I'm expecting some READ
> events, but nothing until an ERROR(TIMEOUT) event a bit later.
>
> When Tomcat starts it says:
> Jul 17, 2008 10:35:31 AM org.apache.catalina.core.AprLifecycleListener init
> INFO: The Apache Tomcat Native library which allows optimal performance in
> production environments was not found on the java.library.path:
> .:/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java
> Jul 17, 2008 10:35:35 AM org.apache.coyote.http11.Http11NioProtocol init
> INFO: Initializing Coyote HTTP/1.1 on http-8080
> Jul 17, 2008 10:35:35 AM org.apache.catalina.startup.Catalina load
> INFO: Initialization processed in 8828 ms
> Jul 17, 2008 10:35:35 AM org.apache.catalina.core.StandardService start
> INFO: Starting service Catalina
> Jul 17, 2008 10:35:35 AM org.apache.catalina.core.StandardEngine start
> INFO: Starting Servlet Engine: Apache Tomcat/6.0.14
>
> Do I need to fire up a C compiler to get this to work?
>
> Joe.
>
>
>
> On Thu, Jul 17, 2008 at 4:04 AM, Filip Hanik - Dev Lists <
> [EMAIL PROTECTED]> wrote:
>
>> for your connector element you must have
>>
>> protocol="org.apache.coyote.http11.Http11NioProtocol"
>> or
>> protocol="org.apache.coyote.http11.Http11AprProtocol"  (and the APR and
>> tcnative libraries in your PATH/LD_LIBRARY_PATH)
>>
>> Filip
>> Joe Walker wrote:
>>
>>> Hi,
>>>
>>> It looks like servlet spec 3 is wy off. So I'm creating a
>>> implementation
>>> of CometProcessor in DWR.
>>> I've created a new CometProcessor like this:
>>>
>>> public class DwrCometProcessor extends DwrServlet implements
>>> CometProcessor
>>>
>>> But the event() method is not called. It just leaps straight to
>>> service().
>>> Is there anything else I need to be doing (clearly I've changed web.xml
>>> to
>>> point at the new 'servlet' using 
>>> org.directwebremoting.servers.tomcat.DwrCometProcessor)?
>>>
>>> Joe.
>>>
>>>  
>>>
>>> No virus found in this incoming message.
>>> Checked by AVG. Version: 7.5.526 / Virus Database: 270.4.11/1554 -
>>> Release Date: 7/15/2008 6:03 PM
>>>
>>>
>>
>>
>> -
>> To start a new topic, e-mail: users@tomcat.apache.org
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>


Re: Doubt on lifecycle of a class in "shared" folder

2008-07-17 Thread java_is_everything

Shared Class :

///
package client;

import java.util.ArrayList;

public class Sharer
{
public static ArrayList listForOthers  = null;  

static
{
System.out.println("STATIC ON WORK ");  
}

public static ArrayList getListForOthers()
  {
  if(listForOthers != null)
  {
  System.out.println("Returned is NOT NULL.");
  }
  else
  {
  System.out.println("Returned is NULL");
  }
  return listForOthers;
  }
  
  public static void setListForOthers(ArrayList list)
  {
  listForOthers = new ArrayList();
  
  for(int i = 0; i < list.size(); i++)
  {   
  ClientSideEvent ce = new ClientSideEvent();
  ClientSideEvent ce2 = (ClientSideEvent) list.get(i);
  ce.setTimestamp(ce2.getTimestamp());
  ce.setId(ce2.getId());
  ce.setType(ce2.getType());
  ce.setDescription(ce2.getDescription());
  listForOthers.add(ce);
  } 
  
  }
}
//





webapp2 :


package client;

import java.util.ArrayList;

import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.RootPanel;


/**
 * Entry point classes define onModuleLoad().
 */
public class AnotherWelcomePage implements EntryPoint {

  /**
   * This is the entry point method.
   */
  public void onModuleLoad() {
  final Button button = new Button("Doosra Search");
  
  RootPanel.get("slot2").add(button); 
  
  ArrayList list = Sharer.getListForOthers();
  if(list != null)
  {
  button.setText("Returning OK with " + list.size());
  }
  else
  {
  button.setText("Problem !!");
  }
   }
}
///




webapp1 :


package client;

import java.util.ArrayList;

import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.ClickListener;
import com.google.gwt.user.client.ui.RootPanel;
import com.google.gwt.user.client.ui.Widget;

//import com.google.gwt.user.client.ui.;

/**
 * Entry point classes define onModuleLoad().
 */
public class EntryPointClass implements EntryPoint {

  /**
   * This is the entry point method.
   */
  public void onModuleLoad() {

  ArrayList list = new ArrayList();
  ClientSideEvent event = new ClientSideEvent();
  
  final Button b = new Button("Initial Display");
  b.addClickListener(new ClickListener()
  {

public void onClick(Widget sender) 
{

ArrayList nowlist = Sharer.getListForOthers();
if(nowlist == null)
{
b.setText("Null returned");
}   
else
{
b.setText("Size is " + 
Integer.toString(nowlist.size()));
}

}   
  });
  
  RootPanel.get("slot1").add(b);  
  event.setTimestamp(" time is money "); // It's ok, needs a string
  event.setId(222);
  event.setType("type");
  event.setDescription("description");
  list.add(event);
  Sharer.setListForOthers(list);
  

  //button.setText(Integer.toString(list.size()));
  }
}
/



Now, webapp1 sets the list size to 1. Now when Sharer.getListForOthers()
from webapp1, "Size is 1", while when Sharer.getListForOthers() from
webapp2, it shows "Problem !!".

Any light ?/



Ajay Garg

Mikolaj Rydzewski-2 wrote:
> 
> java_is_everything wrote:
>> public int getA()
>>{
>>return a; 
>>}
>>   
> [...]

RE: javax.servlet.ServletException: Could not connect to SMTP host: localhost, port: 25

2008-07-17 Thread Carlos Morales Diego


Hello,



I did it and now I have this one:


org.apache.jasper.JasperException: Exception in JSP: /sendmail.jsp:22

19: message.setText("Saludo de JavaMail");
20:
21: Store store=s.getStore("pop3");
22: store.connect("pop.correo.yahoo.es","[EMAIL PROTECTED]","bezos11");
23: Transport.send(message);
24:
25: store.close();


Stacktrace:

org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:504)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:375)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)



causa raíz

javax.servlet.ServletException: [IN-USE] maildrop busy.

org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:858)

org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:791)
org.apache.jsp.sendmail_jsp._jspService(sendmail_jsp.java:91)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)



causa raíz

javax.mail.AuthenticationFailedException: [IN-USE] maildrop busy.
com.sun.mail.pop3.POP3Store.protocolConnect(POP3Store.java:146)
javax.mail.Service.connect(Service.java:275)
javax.mail.Service.connect(Service.java:156)
org.apache.jsp.sendmail_jsp._jspService(sendmail_jsp.java:67)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)



> Date: Thu, 17 Jul 2008 12:47:40 +0300
> From: [EMAIL PROTECTED]
> To: users@tomcat.apache.org
> Subject: Re: javax.servlet.ServletException: Could not connect to SMTP host: 
> localhost, port: 25
>
> try this ..
> props.put("mail.smtp.host","smtp.correo.yahoo.es");
> props.put("mail.smtp.port","25");
> props.put("mail.smtp.auth", "true");
>
>
> On Thu, Jul 17, 2008 at 12:41 PM, Carlos Morales Diego <
> [EMAIL PROTECTED]> wrote:
>
>>
>>
>> Hello Jonas,
>>
>>
>> I still have the same mistake, so I don't know, this is my code
>>
>> Properties props=new Properties();
>> props.put("mail.smtp.host","smtp.correo.yahoo.es");
>> props.put("mail.smtp.port","25");
>> props.put("mail.smtp.auth", "true");
>> Session s=Session.getInstance(props);
>>
>>
>> MimeMessage message=new MimeMessage(s);
>>
>> InternetAddress from=new InternetAddress("[EMAIL PROTECTED]");
>> message.setFrom(from);
>> InternetAddress to=new InternetAddress("[EMAIL PROTECTED]");
>> message.addRecipient(Message.RecipientType.TO,to);
>>
>> message.setSubject("Prueba de JavaMail");
>> message.setText("Saludo de JavaMail");
>>
>> Store store=s.getStore("pop3");
>> store.connect("pop.correo.yahoo.es","[EMAIL PROTECTED]
>> ","bezos11");
>> Transport.send(message);
>>
>> store.close();
>>
>> And I don't know. Any advice?
>>
>> Thanks so much
>>
>>> Subject: RE: javax.servlet.ServletException: Could not connect to SMTP
>> host: localhost, port: 25
>>> Date: Mon, 14 Jul 2008 14:14:40 +0200
>>> From: [EMAIL PROTECTED]
>>> To: users@tomcat.apache.org
>>>
>>> Hello,
>>>
>>> It looks to me as if you didn't configure any SMTP server. You need to
>>> do something like:
>>> Properties smtpProperties = new Properties();
>>> smtpProperties.put("mail.smtp.host", "smtp.example.com");
>>> smtpProperties.put("mail.smtp.auth", "true");
>>>
>>> // create the mime message
>>>
>>> Session session = Session.getDefaultInstance(smtpProperties);
>>> Transport transport = session.getTransport("smtp");
>>> transport.connect(smtpHost, smtpUser, smtpPasswd);
>>> mimeMessage.saveChanges();
>>> transport.sendMessage(mimeMessage, mimeMessage.getAllRecipients());
>>> transport.close();
>>>
>>> I don't know JavaMail that well, so I cannot tell you how it's supposed
>>> to work with the static Transport::send() method, but you can probably
>>> set the SMTP server in a property file.
>>>
 org.apache.jasper.JasperException: Exception in JSP: /sendmail.jsp:22

 19: Store store=s.getStore("pop3");
 20:
>>> store.connect("pop.correo.yahoo.es","[EMAIL PROTECTED]","bezos11");
 21:
 22: Transport.send(message);
 23:
 24: store.close();
 25: %>
>>>

Re: ReplicationListener in Tomcat 6.0

2008-07-17 Thread Mark Thomas

Pavan Singaraju wrote:

When performing the clustering, in server.xml, in many posts(e.g.,
http://marc.info/?l=tomcat-user&m=121210007222860&w=2) i saw they were
configuring the Tomcat 6.0 and have provided the  tag with this
class.
Thats why i was wondering where that class is at? In Tomcat 5.x i saw that
class in the documentation


That is Tomcat 5. Clustering has been rewritten in Tomcat 6. Why are you 
reading the Tomcat 5 clustering docs to configure clustering for Tomcat 6? 
Use the Tomcat 5 docs for Tomcat 5 and the Tomcat 6 docs for Tomcat 6.



If the class is removed in the tomcat 6.0 version, what is the replacing
class?


If you read the thread you quoted above, you'll find the answer.

Mark



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



Re: tomcat, apache with mod_jk and mod_auth_kerb

2008-07-17 Thread Nikhil
On Wed, Jul 16, 2008 at 8:06 PM, Rainer Jung <[EMAIL PROTECTED]>
wrote:

>  Thanks Rainer.  If I want to explicitly pass an environment variable from
>> the httpd to the tomcat, I am using the RequestHeader, JkEnvVar, Setenv
>> but
>> unable to have them as it is passed in the tomcat... how do I go about
>> that?
>> While I am completely convinced to use getRemoteUser() method only for
>> getting the authenticated principal...
>>
>
> If you've already set a value in some variable "xxx", then you configure
>
> JkEnvVar xxx
>
> On the Tomcat side, you retrieve the value by request.getAttribute("xxx");
>
>
> Regards,
>
> Rainer
>

Thanks Rainer.

  SetHandler jakarta-servlet
  SetEnv JK_WORKER_NAME my-tomcat
  JkEnvVar REMOTE_USER

This is working now... I am able to read the REMOTE_USER variable via
getAttribute method.
I was blindly using two arguments to JkEnvVar earlier.

Thanks a lot for all the patience and help!. :-)

Regards, Nikhil


Re: javax.servlet.ServletException: Could not connect to SMTP host: localhost, port: 25

2008-07-17 Thread Youssef Mohammed
try this ..
   props.put("mail.smtp.host","smtp.correo.yahoo.es");
   props.put("mail.smtp.port","25");
   props.put("mail.smtp.auth", "true");


On Thu, Jul 17, 2008 at 12:41 PM, Carlos Morales Diego <
[EMAIL PROTECTED]> wrote:

>
>
> Hello Jonas,
>
>
> I still have the same mistake, so I don't know, this is my code
>
> Properties props=new Properties();
>props.put("mail.smtp.host","smtp.correo.yahoo.es");
>props.put("mail.smtp.port","25");
>props.put("mail.smtp.auth", "true");
>Session s=Session.getInstance(props);
>
>
>MimeMessage message=new MimeMessage(s);
>
>InternetAddress from=new InternetAddress("[EMAIL PROTECTED]");
>message.setFrom(from);
>InternetAddress to=new InternetAddress("[EMAIL PROTECTED]");
>message.addRecipient(Message.RecipientType.TO,to);
>
>message.setSubject("Prueba de JavaMail");
>message.setText("Saludo de JavaMail");
>
>Store store=s.getStore("pop3");
> store.connect("pop.correo.yahoo.es","[EMAIL PROTECTED]
> ","bezos11");
> Transport.send(message);
>
>store.close();
>
> And I don't know. Any advice?
>
> Thanks so much
>
> > Subject: RE: javax.servlet.ServletException: Could not connect to SMTP
> host: localhost, port: 25
> > Date: Mon, 14 Jul 2008 14:14:40 +0200
> > From: [EMAIL PROTECTED]
> > To: users@tomcat.apache.org
> >
> > Hello,
> >
> > It looks to me as if you didn't configure any SMTP server. You need to
> > do something like:
> > Properties smtpProperties = new Properties();
> > smtpProperties.put("mail.smtp.host", "smtp.example.com");
> > smtpProperties.put("mail.smtp.auth", "true");
> >
> > // create the mime message
> >
> > Session session = Session.getDefaultInstance(smtpProperties);
> > Transport transport = session.getTransport("smtp");
> > transport.connect(smtpHost, smtpUser, smtpPasswd);
> > mimeMessage.saveChanges();
> > transport.sendMessage(mimeMessage, mimeMessage.getAllRecipients());
> > transport.close();
> >
> > I don't know JavaMail that well, so I cannot tell you how it's supposed
> > to work with the static Transport::send() method, but you can probably
> > set the SMTP server in a property file.
> >
> >> org.apache.jasper.JasperException: Exception in JSP: /sendmail.jsp:22
> >>
> >> 19: Store store=s.getStore("pop3");
> >> 20:
> > store.connect("pop.correo.yahoo.es","[EMAIL PROTECTED]","bezos11");
> >> 21:
> >> 22: Transport.send(message);
> >> 23:
> >> 24: store.close();
> >> 25: %>
> >
> > I don't quite see what the store does in your code. Is this some sort of
> > pop-before-smtp authentification?
> >
> > Greetings,
> > Jonas
> >
> > -
> > To start a new topic, e-mail: users@tomcat.apache.org
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
>
> _
> Herramientas para combatir la crisis. MSN Dinero
> http://dinero.es.msn.com/
> -
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Regards, Youssef


RE: javax.servlet.ServletException: Could not connect to SMTP host: localhost, port: 25

2008-07-17 Thread Carlos Morales Diego


Hello Jonas,


I still have the same mistake, so I don't know, this is my code

Properties props=new Properties();
props.put("correo.smtp.host","smtp.correo.yahoo.es");
props.put("correo.smtp.port","25");
props.put("correo.smtp.auth", "true");
Session s=Session.getInstance(props);


MimeMessage message=new MimeMessage(s);

InternetAddress from=new InternetAddress("[EMAIL PROTECTED]");
message.setFrom(from);
InternetAddress to=new InternetAddress("[EMAIL PROTECTED]");
message.addRecipient(Message.RecipientType.TO,to);

message.setSubject("Prueba de JavaMail");
message.setText("Saludo de JavaMail");

Store store=s.getStore("pop3");
store.connect("pop.correo.yahoo.es","[EMAIL PROTECTED]","bezos11");
Transport.send(message);

store.close();

And I don't know. Any advice?

Thanks so much

> Subject: RE: javax.servlet.ServletException: Could not connect to SMTP host: 
> localhost, port: 25
> Date: Mon, 14 Jul 2008 14:14:40 +0200
> From: [EMAIL PROTECTED]
> To: users@tomcat.apache.org
>
> Hello,
>
> It looks to me as if you didn't configure any SMTP server. You need to
> do something like:
> Properties smtpProperties = new Properties();
> smtpProperties.put("mail.smtp.host", "smtp.example.com");
> smtpProperties.put("mail.smtp.auth", "true");
>
> // create the mime message
>
> Session session = Session.getDefaultInstance(smtpProperties);
> Transport transport = session.getTransport("smtp");
> transport.connect(smtpHost, smtpUser, smtpPasswd);
> mimeMessage.saveChanges();
> transport.sendMessage(mimeMessage, mimeMessage.getAllRecipients());
> transport.close();
>
> I don't know JavaMail that well, so I cannot tell you how it's supposed
> to work with the static Transport::send() method, but you can probably
> set the SMTP server in a property file.
>
>> org.apache.jasper.JasperException: Exception in JSP: /sendmail.jsp:22
>>
>> 19: Store store=s.getStore("pop3");
>> 20:
> store.connect("pop.correo.yahoo.es","[EMAIL PROTECTED]","bezos11");
>> 21:
>> 22: Transport.send(message);
>> 23:
>> 24: store.close();
>> 25: %>
>
> I don't quite see what the store does in your code. Is this some sort of
> pop-before-smtp authentification?
>
> Greetings,
> Jonas
>
> -
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>

_
Herramientas para combatir la crisis. MSN Dinero
http://dinero.es.msn.com/
-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: CometProcessor and DWR

2008-07-17 Thread Joe Walker
Thanks for the help Philip.

So I was hoping to use the normal Servlet processing for all requests, and
then do something special to drop a thread when doing comet.
My event method looks like this:

public void event(CometEvent event) throws IOException, ServletException {
if (event.getEventType() == CometEvent.EventType.BEGIN) {
event.getHttpServletRequest().setAttribute(ATTRIBUTE_EVENT, event);
}
else if (event.getEventType() == CometEvent.EventType.ERROR) {
event.close();
}
else if (event.getEventType() == CometEvent.EventType.END) {
event.close();
}
else if (event.getEventType() == CometEvent.EventType.READ) {
// Does this handle blocking reads if we just carry on reading?
service(event.getHttpServletRequest(),
event.getHttpServletResponse());
}
}

The effect that I'm seeing is a call to event() with event.getEventType() ==
CometEvent.EventType.BEGIN as expected, but I'm expecting some READ events,
but nothing until an ERROR(TIMEOUT) event a bit later.

When Tomcat starts it says:
Jul 17, 2008 10:35:31 AM org.apache.catalina.core.AprLifecycleListener init
INFO: The Apache Tomcat Native library which allows optimal performance in
production environments was not found on the java.library.path:
.:/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java
Jul 17, 2008 10:35:35 AM org.apache.coyote.http11.Http11NioProtocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
Jul 17, 2008 10:35:35 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 8828 ms
Jul 17, 2008 10:35:35 AM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Jul 17, 2008 10:35:35 AM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.14

Do I need to fire up a C compiler to get this to work?

Joe.


On Thu, Jul 17, 2008 at 4:04 AM, Filip Hanik - Dev Lists <[EMAIL PROTECTED]>
wrote:

> for your connector element you must have
>
> protocol="org.apache.coyote.http11.Http11NioProtocol"
> or
> protocol="org.apache.coyote.http11.Http11AprProtocol"  (and the APR and
> tcnative libraries in your PATH/LD_LIBRARY_PATH)
>
> Filip
> Joe Walker wrote:
>
>> Hi,
>>
>> It looks like servlet spec 3 is wy off. So I'm creating a
>> implementation
>> of CometProcessor in DWR.
>> I've created a new CometProcessor like this:
>>
>> public class DwrCometProcessor extends DwrServlet implements
>> CometProcessor
>>
>> But the event() method is not called. It just leaps straight to service().
>> Is there anything else I need to be doing (clearly I've changed web.xml to
>> point at the new 'servlet' using 
>> org.directwebremoting.servers.tomcat.DwrCometProcessor)?
>>
>> Joe.
>>
>>  
>>
>> No virus found in this incoming message.
>> Checked by AVG. Version: 7.5.526 / Virus Database: 270.4.11/1554 - Release
>> Date: 7/15/2008 6:03 PM
>>
>>
>
>
> -
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: Doubt on lifecycle of a class in "shared" folder

2008-07-17 Thread java_is_everything

Thanks for the reply.

Yes, I had ensured it (even did a double-check after your mail, everything
seems in place). But the problem persists. Everytime, webapp2 calls
x.getA(), a null is returned, which shouldn't be the case, since a is a
static variable.

I have done another test. What I have done is, open both the webapps in two
different windows. Call x.setA() from webapp1, and then call x.getA() from
webapp1 as well as webapp2. It's working fine in webapp1, but not in
webapp2-returning null. This clearly tells that ::

a) Both webapps get two different instances of x.class- pretty ok.
b) Each instance has a "different" instance of variable a, which SHOULD NOT
BE THE CASE, since a is static. 

Any lights in a dark tunnel ??

Ajay Garg

Konstantin Kolinko wrote:
> 
> Make sure, that you do not have a copy of x.class in WEB-INF/classes
> or WEB-INF/lib/*.jar of any of your web applications. Those take
> precedence over shared or common classes.
> 
> See
> http://tomcat.apache.org/tomcat-5.5-doc/class-loader-howto.html
> for details.
> 
> 
> 2008/7/17 java_is_everything <[EMAIL PROTECTED]>:
>>
>> I am sorry. The methods setA() and getA() are static, Rest everything
>> remains
>> same.
>>
>> Regards
>> Ajay Garg
>>
>>
>>
>> java_is_everything wrote:
>>>
>>> Hi all.
>>>
>>> I have placed two applications in the webapps folder, and calling a
>>> class,
>>> say 'x.java' placed in tomcat's shared folder. x.java is of the
>>> following
>>> config :
>>>
>>>
>>> 
>>> public class x
>>> {
>>> public static int a;
>>>
>>> static
>>> {
>>> System.out.println("Static things initializing !!");
>>> }
>>>
>>> public void setA(int aa)
>>> {
>>> a = aa;
>>> }
>>>
>>> public int getA()
>>>{
>>>return a;
>>>}
>>> }
>>> 
>>>
>>>
>>> Now, when i call x.setA(123) from webapp1, an instance of x.java will be
>>> loaded (obviously, since this is the first time), and the method be
>>> called
>>> appropriately. Now, if I now call x,getA() from webapp2, I expect to get
>>> the value 123. But I don't .. :-(  Instead I get a null as returned
>>> value.
>>>
>>>
>>> Moreover, I also see that static initializer is called both times !
>>>
>>> Any ideas as to why ??? (I use Tomcat 5.5.26).
>>>
>>>
>>> Looking forward to replies.
>>> Ajay Garg
>>>
>>>
>>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Doubt-on-lifecycle-of-a-class-in-%22shared%22-folder-tp18502300p18502310.html
>> Sent from the Tomcat - User mailing list archive at Nabble.com.
>>
>>
>> -
>> To start a new topic, e-mail: users@tomcat.apache.org
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
> 
> -
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Doubt-on-lifecycle-of-a-class-in-%22shared%22-folder-tp18502300p18504589.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



Re: Doubt on lifecycle of a class in "shared" folder

2008-07-17 Thread Konstantin Kolinko
Make sure, that you do not have a copy of x.class in WEB-INF/classes
or WEB-INF/lib/*.jar of any of your web applications. Those take
precedence over shared or common classes.

See
http://tomcat.apache.org/tomcat-5.5-doc/class-loader-howto.html
for details.


2008/7/17 java_is_everything <[EMAIL PROTECTED]>:
>
> I am sorry. The methods setA() and getA() are static, Rest everything remains
> same.
>
> Regards
> Ajay Garg
>
>
>
> java_is_everything wrote:
>>
>> Hi all.
>>
>> I have placed two applications in the webapps folder, and calling a class,
>> say 'x.java' placed in tomcat's shared folder. x.java is of the following
>> config :
>>
>>
>> 
>> public class x
>> {
>> public static int a;
>>
>> static
>> {
>> System.out.println("Static things initializing !!");
>> }
>>
>> public void setA(int aa)
>> {
>> a = aa;
>> }
>>
>> public int getA()
>>{
>>return a;
>>}
>> }
>> 
>>
>>
>> Now, when i call x.setA(123) from webapp1, an instance of x.java will be
>> loaded (obviously, since this is the first time), and the method be called
>> appropriately. Now, if I now call x,getA() from webapp2, I expect to get
>> the value 123. But I don't .. :-(  Instead I get a null as returned value.
>>
>>
>> Moreover, I also see that static initializer is called both times !
>>
>> Any ideas as to why ??? (I use Tomcat 5.5.26).
>>
>>
>> Looking forward to replies.
>> Ajay Garg
>>
>>
>>
>
> --
> View this message in context: 
> http://www.nabble.com/Doubt-on-lifecycle-of-a-class-in-%22shared%22-folder-tp18502300p18502310.html
> Sent from the Tomcat - User mailing list archive at Nabble.com.
>
>
> -
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

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



Re: ReplicationListener in Tomcat 6.0

2008-07-17 Thread Pavan Singaraju
When performing the clustering, in server.xml, in many posts(e.g.,
http://marc.info/?l=tomcat-user&m=121210007222860&w=2) i saw they were
configuring the Tomcat 6.0 and have provided the  tag with this
class.
Thats why i was wondering where that class is at? In Tomcat 5.x i saw that
class in the documentation (
http://tomcat.apache.org/tomcat-5.5-doc/catalina/docs/api/org/apache/catalina/cluster/tcp/ReplicationListener.html).

If the class is removed in the tomcat 6.0 version, what is the replacing
class?
--
Pavan Kumar Singaraju

On Thu, Jul 17, 2008 at 1:00 PM, Mark Thomas <[EMAIL PROTECTED]> wrote:

> Pavan Singaraju wrote:
>
>> Hi all,
>>Is the class "org.apache.catalina.cluster.tcp.ReplicationListener"
>> present in Tomcat 6.0. When i used it, the server is throwing
>> 'ClassNotFoundException". The documentation "java doc" also is not
>> displaying it. Please help me
>>
>
> I don't see that class anywhere in the Tomcat 6 clustering documentation.
> What makes you think it exists in Tomcat 6?
>
> Mark
>
> PS This is open source. If you want to see if a file exists, just download
> the source and look for it.
>
>
> -
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: Doubt on lifecycle of a class in "shared" folder

2008-07-17 Thread Mikolaj Rydzewski

java_is_everything wrote:

public int getA()
   {
   return a; 
   }
  

[...]

value 123. But I don't .. :-(  Instead I get a null as returned value.
  

It's impossible to return null from such method.

Show us complete code (both shared class and webapps).

--
Mikolaj Rydzewski <[EMAIL PROTECTED]>


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



Re: ReplicationListener in Tomcat 6.0

2008-07-17 Thread Mark Thomas

Pavan Singaraju wrote:

Hi all,
Is the class "org.apache.catalina.cluster.tcp.ReplicationListener"
present in Tomcat 6.0. When i used it, the server is throwing
'ClassNotFoundException". The documentation "java doc" also is not
displaying it. Please help me


I don't see that class anywhere in the Tomcat 6 clustering documentation. 
What makes you think it exists in Tomcat 6?


Mark

PS This is open source. If you want to see if a file exists, just download 
the source and look for it.



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



Re: Tomcat does not start after update

2008-07-17 Thread Oliver Hirschi
"Caldarale, Charles R" <[EMAIL PROTECTED]> schrieb im 
Newsbeitrag 
news:[EMAIL PROTECTED]

> From: news [mailto:[EMAIL PROTECTED] On Behalf Of Oliver Hirschi
> Subject: Tomcat does not start after update
>
> Since a Java or a MacOSX update, my Tomcat 6.0.14 does not start on 
> my

> MacOSX Server 10.4.11. There comes always the followed message into
> catalina.out:

Make sure the CLASSPATH environment variable is not set.  Apple 
hasn't figured out yet that it should > never be set, and certain 
product installs muck with it.




Hi Chuck,

I typed into Terminal "echo $CLASSPATH", but there coms a blank line, 
so it seems no classpath is set as environment variable.


I also tested 
System.out.println(System.getProperty("java.class.path")); in a 
test-class and so the output was:

.:/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Classes/.compatibility/14compatibility.jar

So it seems the classpath is set correct or isn't it?

Thanks, Oli 




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