Re: JSP pre-compile and Apache

2005-06-17 Thread Charl Gerber
I have the precompiled JSP's working with Apache now.
Thanks.

Apart from the first-time-hit compilation penalty on
a normal jsp (as apposed to a precompiled one), why
would you choose one option above the other?

Standard jsp is easier to do updates if you work in an
unpacked war setup - you just change the file and it
is updated. Precompiled you have to acctually
precompile the file.

But how about performance and other issues? I guess it
depends on your application, but is there somewhere a
good checklist to determine when to choose the one
option over the other?



--- Terence M. Bandoian [EMAIL PROTECTED] wrote:

 Have you granted the site accessClassInPackage
 runtime permission?
 
 -Terence M. Bandoian
  [EMAIL PROTECTED]
 
  I used to precompile my JSP's (which worked great
 and
  was a big time saver in testing), but since
 running
  Tomcat 4.1.31 together with Apache, all sorts of
 weird
  errors occurred. I remember reading somewhere that
  Apache expected the actual jsp file, not the
 compiled
  version. So I reverted back to *not* precompiling
  JSP's and everything worked as expected.
 
  Question now, obviously there is a
 first-time-compile
  penalty per jsp, but once compiled, should
 performance
  be the same? How about the overhead to check if
 the
  .jsp file indeed matches the compiled version?
 
  Has someone managed to get precompiled JSP's
 running
  in combination with Apache?
 
 

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


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



AW: JSP pre-compile and Apache

2005-06-17 Thread Bernhard Slominski
Well there is one big advantage when using precompiled JSPs:
You're sure that all JSPs are compilable, so you don't get any compile
errors on your live site.
That gives your application more stability.

Bernhard

 -Ursprngliche Nachricht-
 Von: Charl Gerber [mailto:[EMAIL PROTECTED]
 Gesendet: Freitag, 17. Juni 2005 08:07
 An: Tomcat Users List
 Betreff: Re: JSP pre-compile and Apache
 
 
 I have the precompiled JSP's working with Apache now.
 Thanks.
 
 Apart from the first-time-hit compilation penalty on
 a normal jsp (as apposed to a precompiled one), why
 would you choose one option above the other?
 
 Standard jsp is easier to do updates if you work in an
 unpacked war setup - you just change the file and it
 is updated. Precompiled you have to acctually
 precompile the file.
 
 But how about performance and other issues? I guess it
 depends on your application, but is there somewhere a
 good checklist to determine when to choose the one
 option over the other?
 
 
 
 --- Terence M. Bandoian [EMAIL PROTECTED] wrote:
 
  Have you granted the site accessClassInPackage
  runtime permission?
  
  -Terence M. Bandoian
   [EMAIL PROTECTED]
  
   I used to precompile my JSP's (which worked great
  and
   was a big time saver in testing), but since
  running
   Tomcat 4.1.31 together with Apache, all sorts of
  weird
   errors occurred. I remember reading somewhere that
   Apache expected the actual jsp file, not the
  compiled
   version. So I reverted back to *not* precompiling
   JSP's and everything worked as expected.
  
   Question now, obviously there is a
  first-time-compile
   penalty per jsp, but once compiled, should
  performance
   be the same? How about the overhead to check if
  the
   .jsp file indeed matches the compiled version?
  
   Has someone managed to get precompiled JSP's
  running
   in combination with Apache?
  
  
 
 -
  To unsubscribe, e-mail:
  [EMAIL PROTECTED]
  For additional commands, e-mail:
  [EMAIL PROTECTED]
  
  
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 

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



RE: mod_jk works as localhost only

2005-06-17 Thread Randall Svancara
Have you turned off iptables.  

/etc/init.d/iptables stop

That will kill the firewall rules that is built in to Fedora Core3. 

Randall 

-Original Message-
From: naidim [mailto:[EMAIL PROTECTED] 
Sent: Thursday, June 16, 2005 12:41 PM
To: Tomcat Users List
Subject: mod_jk works as localhost only

I'm running Apache2.0.52 and Tomcat 5.5.9 on FC3.  Both work fine
locally and remotely.

mod_jk is configured but it only works as localhost.  Browsing by name
or IP fails to find the files in the webapp directory.  What do I need
to change so it finds them when browseing remotely?

Thanks

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


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



Re: Admin Package

2005-06-17 Thread Oskar Eyb
Caldarale, Charles R wrote:

 Not to be too facetious, but:
 1) Download.
 2) Unzip.
 
 That's really all there is to it.  Just make sure you use the same base
 directory for the admin unzip that you did for the main Tomcat download.
 The admin unzip will attempt to overwrite a couple of text files as it
 goes; the contents are identical, so it doesn't matter.

I've still problems and getting the following error:


HTTP Status 503 - Servlet admin.login_jsp is currently unavailable
type Status report

message Servlet admin.login_jsp is currently unavailable

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




Apache Tomcat/5.5.9

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



Re: AW: JSP pre-compile and Apache

2005-06-17 Thread Charl Gerber
With all due respect, I find that a weak argument. Its
pretty dangerous to deploy anything to production
without testing it on another (local) environment
first. I would never change a jsp on production
without checking it on another environment first.


 Well there is one big advantage when using
 precompiled JSPs:
 You're sure that all JSPs are compilable, so you
 don't get any compile
 errors on your live site.
 That gives your application more stability.
 
 Bernhard
 
  -Ursprngliche Nachricht-
  Von: Charl Gerber [mailto:[EMAIL PROTECTED]
  Gesendet: Freitag, 17. Juni 2005 08:07
  An: Tomcat Users List
  Betreff: Re: JSP pre-compile and Apache
  
  
  I have the precompiled JSP's working with Apache
 now.
  Thanks.
  
  Apart from the first-time-hit compilation
 penalty on
  a normal jsp (as apposed to a precompiled one),
 why
  would you choose one option above the other?
  
  Standard jsp is easier to do updates if you work
 in an
  unpacked war setup - you just change the file and
 it
  is updated. Precompiled you have to acctually
  precompile the file.
  
  But how about performance and other issues? I
 guess it
  depends on your application, but is there
 somewhere a
  good checklist to determine when to choose the one
  option over the other?
  
  
  
  --- Terence M. Bandoian [EMAIL PROTECTED]
 wrote:
  
   Have you granted the site accessClassInPackage
   runtime permission?
   
   -Terence M. Bandoian
[EMAIL PROTECTED]
   
I used to precompile my JSP's (which worked
 great
   and
was a big time saver in testing), but since
   running
Tomcat 4.1.31 together with Apache, all sorts
 of
   weird
errors occurred. I remember reading somewhere
 that
Apache expected the actual jsp file, not the
   compiled
version. So I reverted back to *not*
 precompiling
JSP's and everything worked as expected.
   
Question now, obviously there is a
   first-time-compile
penalty per jsp, but once compiled, should
   performance
be the same? How about the overhead to check
 if
   the
.jsp file indeed matches the compiled version?
   
Has someone managed to get precompiled JSP's
   running
in combination with Apache?
   
   
  
 

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

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

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


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



Re: Uploading files to another server

2005-06-17 Thread Nikola Milutinovic

Anna Bikkina wrote:


Hi,

We have an application which uploads files to a machine where tomcat is
running. Now we want to change it to upload files to a central server in
the network. We were using multipart request to upload the files till
now. How can we upload files to a different server than where the tomcat
is running. 


Any suggestions are appreciated. Can you please point me to some
examples.
 



Hi Anna.

You didn't say if you wanted to change anything besides the final file 
location, so I'll assume you don't want to change it. Well, it is just a 
question of how can your Tomcat server reach that new destination. It 
would be best if it could be done seamlessly, like through a mounted 
file system. Again, you didn't provide us with details, which OS is 
running  on both of those machines.


Anyway, you can use combinations of NFS mounts and SMB mounts, where 
servers can run Linux or Windows.


Nix.

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



Japanese characters in content-disposition filenames

2005-06-17 Thread Aron Gombas
I have this problem for a while, and drives me crazy.
It's very simple: I just want to use Japanese characters (kana and kanji)
in the content-disposition HTTP header:

response.setHeader(Content-Disposition, inline; filename= +
fileName); // filename is a String object

Using this I get garbage in IE and Firefox. I checked out the related RFC
and it explains that I have to transcode it to B encoding.
I've tried this and other hints found over the web, but none of those
worked for all the 3 browsers: IE, Firefox and Opera. (The priority is on
IE, it's used by the majority of our end-users.)

E.g. I've desperately tried:

response.setHeader(Content-Disposition, inline; filename= + new
String(fileName.getBytes(UTF-8), ISO8859_1));

response.setHeader(Content-Disposition, inline; filename= +
fileName.getBytes(iso-2022-jp));

response.setHeader(Content-Disposition, inline; filename= +
MimeUtility.encodeWord(fileName, iso-2022-jp, B));

response.setHeader(Content-Disposition, inline; filename= +
MimeUtility.encodeWord(new String(fileName.getBytes()), ISO8859_1,
B));

response.setHeader(Content-Disposition, inline; filename= + new
String(fileName.getBytes(SJIS), ISO8859_1));

Does anyone know the right webcontainer-independent, browser-independent
solution? I was writing about Japanese chars, but I guess there should be
a universal solution for any (Unicode) char.

Thanks a lot in advance.
Bye, Aron

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



AW: AW: JSP pre-compile and Apache

2005-06-17 Thread Bernhard Slominski
It's not that it's not tested.
It can happen very easiliy, when you just forgot to check something in the
version control:
You added a method to a bean, change the JSP, it's working fine in you test
environment, you check in the JSP, but forget the bean, do the release and
you get the compile error on the live site.

That can't happen with precompliation.

 -Ursprngliche Nachricht-
 Von: Charl Gerber [mailto:[EMAIL PROTECTED]
 Gesendet: Freitag, 17. Juni 2005 10:28
 An: Tomcat Users List
 Betreff: Re: AW: JSP pre-compile and Apache
 
 
 With all due respect, I find that a weak argument. Its
 pretty dangerous to deploy anything to production
 without testing it on another (local) environment
 first. I would never change a jsp on production
 without checking it on another environment first.
 
 
  Well there is one big advantage when using
  precompiled JSPs:
  You're sure that all JSPs are compilable, so you
  don't get any compile
  errors on your live site.
  That gives your application more stability.
  
  Bernhard
  
   -Ursprngliche Nachricht-
   Von: Charl Gerber [mailto:[EMAIL PROTECTED]
   Gesendet: Freitag, 17. Juni 2005 08:07
   An: Tomcat Users List
   Betreff: Re: JSP pre-compile and Apache
   
   
   I have the precompiled JSP's working with Apache
  now.
   Thanks.
   
   Apart from the first-time-hit compilation
  penalty on
   a normal jsp (as apposed to a precompiled one),
  why
   would you choose one option above the other?
   
   Standard jsp is easier to do updates if you work
  in an
   unpacked war setup - you just change the file and
  it
   is updated. Precompiled you have to acctually
   precompile the file.
   
   But how about performance and other issues? I
  guess it
   depends on your application, but is there
  somewhere a
   good checklist to determine when to choose the one
   option over the other?
   
   
   
   --- Terence M. Bandoian [EMAIL PROTECTED]
  wrote:
   
Have you granted the site accessClassInPackage
runtime permission?

-Terence M. Bandoian
 [EMAIL PROTECTED]

 I used to precompile my JSP's (which worked
  great
and
 was a big time saver in testing), but since
running
 Tomcat 4.1.31 together with Apache, all sorts
  of
weird
 errors occurred. I remember reading somewhere
  that
 Apache expected the actual jsp file, not the
compiled
 version. So I reverted back to *not*
  precompiling
 JSP's and everything worked as expected.

 Question now, obviously there is a
first-time-compile
 penalty per jsp, but once compiled, should
performance
 be the same? How about the overhead to check
  if
the
 .jsp file indeed matches the compiled version?

 Has someone managed to get precompiled JSP's
running
 in combination with Apache?


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


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

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



Tomcat 5.0 + Apache 2.0 + ErrorDocument

2005-06-17 Thread Ben
Hi

I would like to have Tomcat handle all the error documents, how can I
do this? At this stage, whenever there is a page not found, I see an
Apache error page. I have already setup mod_jk.

I have this:

JKMount /*.jsp ajp13

In my web.xml, I have this:

error-page
error-code404/error-code
location/WEB-INF/errors/404.jsp/location
/error-page

My mod_jk log has the following lines:

jk_handler::mod_jk.c (1952): No body with status=404 for worker=ajp13
jk_handler::mod_jk.c (1952): No body with status=404 for worker=ajp13

Somehow I can't see my /WEB-INF/errors/404.jsp when there is a page not found.

Thanks,
Ben

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



Re: starting a binary by calling a servlet

2005-06-17 Thread Christian Stalp

 Excuse me for a moment. Now I have the trouble that I cannot restart Tomcat
 and so I had to reboot the whole system. Now tomcat start while the
 bootprocess but cannot be accessed over the browser. And I don't have a
 process called catalina nor tomcat !?!?!

 Gruss Christian

Im now back again. Now I have time to fix the tomcat-problem. But first I have 
another problem: I cannot start tomcat!!! 

I got this from my latest logfile: catalina_2005-06-17.log
This is of course only a small part of it. Is this caused by a mistaken entry 
in the catalina.policy? 

[quote]
Using Security Manager
Created MBeanServer with ID: 4aa0ce:10489ba2bdb:-8000:gandalf:1
Jun 17, 2005 11:56:17 AM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8180
Jun 17, 2005 11:56:17 AM org.apache.commons.digester.Digester fatalError
SEVERE: Parse Fatal Error at line 1 column 1: Content is not allowed in 
prolog.
org.xml.sax.SAXParseException: Content is not allowed in prolog.
at org.apache.xerces.u.
[/quote]


But the weired thing is, my own entry into the catalina.policy is gone, is 
erased!!! And this happens everytime I reboot my system. 
Each time I edit the cataline.policy I cannot restart tomcat again. So I 
choose the windows(tm) solution and reboot the whole system! But when the 
system is up and running again. Tomcat cannot start at all. AND my entry in 
the catalina.policy is gone

Gruss Christian


-- 
Christian Stalp
Institut fr Medizinische Biometrie, Epidemiologie und Informatik
Johannes-Gutenberg-Universitt Mainz
Tel.: 06131 / 17-3107
E-Mail: [EMAIL PROTECTED]

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



Re: starting a binary by calling a servlet

2005-06-17 Thread Markus Schönhaber
Am Freitag, 17. Juni 2005 14:56 schrieb Christian Stalp:

Please don't CC me. I'm reading the list and have set the Reply-To for a 
reason. Thanks.

 Im now back again. Now I have time to fix the tomcat-problem. But first I
 have another problem: I cannot start tomcat!!!

 I got this from my latest logfile: catalina_2005-06-17.log
 This is of course only a small part of it. Is this caused by a mistaken
 entry in the catalina.policy?

 [quote]
 Using Security Manager
 Created MBeanServer with ID: 4aa0ce:10489ba2bdb:-8000:gandalf:1
 Jun 17, 2005 11:56:17 AM org.apache.coyote.http11.Http11Protocol init
 INFO: Initializing Coyote HTTP/1.1 on http-8180
 Jun 17, 2005 11:56:17 AM org.apache.commons.digester.Digester fatalError
 SEVERE: Parse Fatal Error at line 1 column 1: Content is not allowed in
 prolog.
 org.xml.sax.SAXParseException: Content is not allowed in prolog.
 at org.apache.xerces.u.
 [/quote]

I doubt this has anything to do with catalina.policy. This seems to be an 
error thrown by the XML parser - but catalina.polica is plain-text file.
Check the XML config files and context descriptors. Maybe there's something 
wrong with them - for example byte order marks at the beginning of the file 
(i. e. before the ?xml version... line).


 But the weired thing is, my own entry into the catalina.policy is gone, is
 erased!!! And this happens everytime I reboot my system.
 Each time I edit the cataline.policy I cannot restart tomcat again. So I
 choose the windows(tm) solution and reboot the whole system! But when the
 system is up and running again. Tomcat cannot start at all. AND my entry in
 the catalina.policy is gone

Can't help you with that. Your system seems to behave a bit - hm - strange. I 
doubt that tomcat is removing entries from catalina.policy.

Regards
  mks

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



Tomcat on Solaris 10

2005-06-17 Thread Sunil
Hi,

Has anyone got Tomcat running on Solaris 10? Your responses will be
appreciated.

Thanks


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



Re: Uploading files to another server

2005-06-17 Thread Anna Bikkina
sorry for the incomplete information. We are using solaris OS. The
reason we want to have the files uploaded to a different box is because
the server is sometimes maxxed up on connections and so we wanted to
have a fail over server. If server1 fails over to server2 all files
uploaded on server2 will be on a different box than the once on server1.
We have a different webapp which access these files(since some files are
on server1 and server2 it is impossible to keep track) so we wanted to
have a central server and have all files from both the servers uploaded
to that server.


On Fri, 2005-06-17 at 02:35, Nikola Milutinovic wrote:
 Anna Bikkina wrote:
 
 Hi,
 
 We have an application which uploads files to a machine where tomcat is
 running. Now we want to change it to upload files to a central server in
 the network. We were using multipart request to upload the files till
 now. How can we upload files to a different server than where the tomcat
 is running. 
 
 Any suggestions are appreciated. Can you please point me to some
 examples.
   
 
 
 Hi Anna.
 
 You didn't say if you wanted to change anything besides the final file 
 location, so I'll assume you don't want to change it. Well, it is just a 
 question of how can your Tomcat server reach that new destination. It 
 would be best if it could be done seamlessly, like through a mounted 
 file system. Again, you didn't provide us with details, which OS is 
 running  on both of those machines.
 
 Anyway, you can use combinations of NFS mounts and SMB mounts, where 
 servers can run Linux or Windows.
 
 Nix.
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


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



RE: Tomcat on Solaris 10

2005-06-17 Thread Carlos Alberto Pelez Ayala
I have already running Tomcat in Solaris 10.

-Mensaje original-
De: Sunil [mailto:[EMAIL PROTECTED] 
Enviado el: viernes, 17 de junio de 2005 5:40
Para: tomcat-user@jakarta.apache.org
Asunto: Tomcat on Solaris 10

Hi,

Has anyone got Tomcat running on Solaris 10? Your responses will be
appreciated.

Thanks


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


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



Re: mod_jk works as localhost only

2005-06-17 Thread naidim
Guru suggested it was my server.xml.  I had Host name=localhost
appBase=webapps unpackWARs=true
autoDeploy=true xmlValidation=false xmlNamespaceAware=false

So I changed Host from localhost to flex.homelinux.org and it works as
flex.homelinux.org, but not as localhost now, and still not by IP.

After a default install of FC3 with httpd, here are the changes I made:

Configure Apache
   13 Jun 05
   Edit /etc/httpd/conf/httpd.conf
   Change ServerAdmin to [email]
   Uncomment #ServerName and change host to flex.homelinux.org:80
   Verify ServerRoot /etc/httpd
   Verify DocumentRoot /var/www/html
   Change UseCanonicalName from Off to On
   Restart httpd service

Configure Apache for CGI
   13 Jun 05
   Edit /etc/httpd/conf/httpd.conf
   Change Options Indexes FollowSymLings to Options Indexes Includes
FollowSymLinks SymLinksifOwnerMatch ExecCGI Multiviews
   Change Allow Override None to Allow Override Options Fileinfo
AuthConfig Limit
   Restart httpd service
   Change DirectoryIndex index.html index.html.var to DirectoryIndex
index.html index.html.var index.shtml index.cgi index.php index.php3
index.phtml index.htm
   Under AddType application/x-gzip .gz .tgz
   Add:
   AddType application/x-httpd-php .php .php3 .html .htm
.shtml .phps .fds
   Uncoment AddHandler cgi-script .cgi
   Add .pl to the end of the line
   Restart httpd service

Install Tomcat
   13 Jun 05
   Download jakarta-tomcat-5.5.9.tar.gz and
jakarta-tomcat-5.5.9-admin.tar.gz from
http://jakarta.apache.org/site/downloads/downloads_tomcat-5.cgi
   #tar xvzf jakarta-tomcat-5.5.9.tar.gz
   #tar xvzf jakarta-tomcat-5.5.9-admin.tar.gz
   #mv jakarta-tomcat-5.5.9 /usr/java
   Edit /etc/profile
   Add:
   CATALINA_HOME=/usr/java/jakarta-tomcat-5.5.9
   export CATALINA_HOME
   #/usr/java/jakarta-tomcat-5.5.9/bin/startup.sh
   Browse to localhost:8080

Open Port 8080 for Tomcat
   13 Jun 05
   Applications-System Settings-Security Level
   Add port 8080:tcp

Autostart Tomcat
   #cp /usr/java/jakarta-tomcat-5.5.9/bin/catalina.sh /etc/init.d/catalina
   Edit /etc/init.d/catalina
   Add as the last comments at the top
   # chkconfig: - 90 15
   # description: Jakarta Tomcat Java Servlets and JSP server
   Add immediately after the top comments
   CATALINA_HOME=/usr/java/jakarta-tomcat-5.5.9
   JAVA_HOME=/usr/java/jdk1.5.0_03

   status() {
   ps ax --width=1000 | grep
[o]rg.apache.catalina.startup.Bootstrap start | awk '{printf $1 
}' | wc | awk '{print $2}'  /tmp/tomcat_process_count.txt
  read line  /tmp/tomcat_process_count.txt
   if [ $line -gt 0 ]; then
   echo -n Tomcat ( pid 
   ps ax --width=1000 | grep
[o]rg.apache.catalina.startup.Bootstrap start | awk '{printf $1 
}'
   echo -n ) is running...
   echo
   else
   echo Tomcat is stopped
   fi
   }
   Comment out [ -z $CATALINA_HOME ]  CATALINA_HOME=`cd
$PROGDIR/.. ; pwd`
   Before echo Using CATALINA_BASE: $CATALINA_BASE add
   if [ $1 != status ] ; then
   After the echo block add fi
   Add immediately before else for if [ $1 = debug ] block
   elif [ $1 = status ] ; then
   status

   elif [ $1 = restart ] ; then
   $0 stop
   $0 start

Add catalina as a service and turn it on
   # chkconfig --add catalina
   # chkconfig catalina on

Install mod_jk for Apache/Tomcat connection
   Download mod_jk-ap20-1.2.10-1jpp.i386.rpm from
http://www.jpackage.org/rpm.php?id=2456
   # rpm -ivh mod_jk-ap20-1.2.10-1jpp.i386.rpm

Configure worker.properties for Apache/Tomcat connection
   Edit /usr/java/jakarta-tomcat-5.5.9/conf/worker.properties
   Change workers.tomcat_home=/var/tomcat3 to /usr/java/jakarta-tomcat-5.5.9
   Change workers.java_home=/opt/IBMJava2-13 to /usr/java/jdk1.5.0_03
   Change worker.list=ajp12, ajp13 to worker.list=ajp13
   Comment out all worker.ajp12 lines
   Uncomment worker.ajp13.cachesize and add =20
   Change worker.loadbalancer.balanced_workers=ajp12, ajp13 to just ajp13

Configure server.xml for Apache/Tomcat connection
   Edit /usr/java/jakarta-tomcat-5.5.9/conf/server.xml
   Below the line Server port=8005 add
   Listener className=org.apache.jk.config.ApacheConfig
modJk=/usr/lib/httpd/modules/mod_jk.so
workersConfig=/usr/java/jakarta-tomcat-5.5.9/conf/workers.properties
jkLog=/usr/java/jakarta-tomcat-5.5.9/logs/mod_jk.log
jkDebug=info/
   Below the line Host name=localhost appBase=webapps
unpackWARs=true autoDeploy=true xmlValidation=false
xmlNamespaceAware=false add
   Listener 

RE: Tomcat on Solaris 10

2005-06-17 Thread william
Hi

 Has anyone got Tomcat running on Solaris 10? Your responses will be
 appreciated.

Tomcat is packaged by blastwave.org and is working fine under solaris 10.

Kind regards,
William

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



SSL keystore with more than one key entry - which alias is used?

2005-06-17 Thread John Ryan-Brown
If the keystore that Tomcat uses contains more than one entry where
Entry type = keyEntry, how does Tomcat choose which one to use when
sending a certificate to the client?

It seems as though the alias name is not significant - any alias will do.

After some experimenting it seems it uses the first one found.
Is this correct?
Or is some other method used?

Thanks for your time.

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



Re: mod_jk works as localhost only

2005-06-17 Thread Gurumoorthy
Host name=localhost
appBase=webapps unpackWARs=true
autoDeploy=true xmlValidation=false xmlNamespaceAware=false 
Aliaslocalhost/Alias
Aliaswww/Alias
Alias10.0.0.10/Alias

First of all please read the documents of how to install things ...
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/jk2/vhosthowto.html

- Original Message -
From: naidim [EMAIL PROTECTED]
To: Tomcat Users List tomcat-user@jakarta.apache.org
Sent: Friday, June 17, 2005 4:59 PM
Subject: Re: mod_jk works as localhost only


Guru suggested it was my server.xml.  I had Host name=localhost
appBase=webapps unpackWARs=true
autoDeploy=true xmlValidation=false xmlNamespaceAware=false

So I changed Host from localhost to flex.homelinux.org and it works as
flex.homelinux.org, but not as localhost now, and still not by IP.

After a default install of FC3 with httpd, here are the changes I made:

Configure Apache
   13 Jun 05
   Edit /etc/httpd/conf/httpd.conf
   Change ServerAdmin to [email]
   Uncomment #ServerName and change host to flex.homelinux.org:80
   Verify ServerRoot /etc/httpd
   Verify DocumentRoot /var/www/html
   Change UseCanonicalName from Off to On
   Restart httpd service

Configure Apache for CGI
   13 Jun 05
   Edit /etc/httpd/conf/httpd.conf
   Change Options Indexes FollowSymLings to Options Indexes Includes
FollowSymLinks SymLinksifOwnerMatch ExecCGI Multiviews
   Change Allow Override None to Allow Override Options Fileinfo
AuthConfig Limit
   Restart httpd service
   Change DirectoryIndex index.html index.html.var to DirectoryIndex
index.html index.html.var index.shtml index.cgi index.php index.php3
index.phtml index.htm
   Under AddType application/x-gzip .gz .tgz
   Add:
   AddType application/x-httpd-php .php .php3 .html .htm
.shtml .phps .fds
   Uncoment AddHandler cgi-script .cgi
   Add .pl to the end of the line
   Restart httpd service

Install Tomcat
   13 Jun 05
   Download jakarta-tomcat-5.5.9.tar.gz and
jakarta-tomcat-5.5.9-admin.tar.gz from
http://jakarta.apache.org/site/downloads/downloads_tomcat-5.cgi
   #tar xvzf jakarta-tomcat-5.5.9.tar.gz
   #tar xvzf jakarta-tomcat-5.5.9-admin.tar.gz
   #mv jakarta-tomcat-5.5.9 /usr/java
   Edit /etc/profile
   Add:
   CATALINA_HOME=/usr/java/jakarta-tomcat-5.5.9
   export CATALINA_HOME
   #/usr/java/jakarta-tomcat-5.5.9/bin/startup.sh
   Browse to localhost:8080

Open Port 8080 for Tomcat
   13 Jun 05
   Applications-System Settings-Security Level
   Add port 8080:tcp

Autostart Tomcat
   #cp /usr/java/jakarta-tomcat-5.5.9/bin/catalina.sh
/etc/init.d/catalina
   Edit /etc/init.d/catalina
   Add as the last comments at the top
   # chkconfig: - 90 15
   # description: Jakarta Tomcat Java Servlets and JSP server
   Add immediately after the top comments
   CATALINA_HOME=/usr/java/jakarta-tomcat-5.5.9
   JAVA_HOME=/usr/java/jdk1.5.0_03

   status() {
   ps ax --width=1000 | grep
[o]rg.apache.catalina.startup.Bootstrap start | awk '{printf $1 
}' | wc | awk '{print $2}'  /tmp/tomcat_process_count.txt
  read line  /tmp/tomcat_process_count.txt
   if [ $line -gt 0 ]; then
   echo -n Tomcat ( pid 
   ps ax --width=1000 | grep
[o]rg.apache.catalina.startup.Bootstrap start | awk '{printf $1 
}'
   echo -n ) is running...
   echo
   else
   echo Tomcat is stopped
   fi
   }
   Comment out [ -z $CATALINA_HOME ]  CATALINA_HOME=`cd
$PROGDIR/.. ; pwd`
   Before echo Using CATALINA_BASE: $CATALINA_BASE add
   if [ $1 != status ] ; then
   After the echo block add fi
   Add immediately before else for if [ $1 = debug ] block
   elif [ $1 = status ] ; then
   status

   elif [ $1 = restart ] ; then
   $0 stop
   $0 start

Add catalina as a service and turn it on
   # chkconfig --add catalina
   # chkconfig catalina on

Install mod_jk for Apache/Tomcat connection
   Download mod_jk-ap20-1.2.10-1jpp.i386.rpm from
http://www.jpackage.org/rpm.php?id=2456
   # rpm -ivh mod_jk-ap20-1.2.10-1jpp.i386.rpm

Configure worker.properties for Apache/Tomcat connection
   Edit /usr/java/jakarta-tomcat-5.5.9/conf/worker.properties
   Change workers.tomcat_home=/var/tomcat3 to
/usr/java/jakarta-tomcat-5.5.9
   Change workers.java_home=/opt/IBMJava2-13 to /usr/java/jdk1.5.0_03
   Change worker.list=ajp12, ajp13 to worker.list=ajp13
   Comment out all worker.ajp12 lines
   Uncomment worker.ajp13.cachesize and add =20
   Change worker.loadbalancer.balanced_workers=ajp12, ajp13 to just
ajp13

Configure server.xml for 

Re: Container Managed Security and mod_jk/Static Contents

2005-06-17 Thread Gurumoorthy
how do you authenticate ? basic ? form based ?
- Original Message -
From: Torsten Rmer [EMAIL PROTECTED]
To: Tomcat Users List tomcat-user@jakarta.apache.org
Sent: Thursday, June 16, 2005 11:42 PM
Subject: Container Managed Security and mod_jk/Static Contents


 Hello!

 In order to improve performance for static contents I have setup Apache
 with mod_jk. Now only Struts' *.do requests are served by Tomcat, the
 rest is done by Apache. Works fine.

 Now I want to restrict access to some resources using using container
 managed security. That also works fine, but, and that is now my question:

 I also want to protect static contents, but that won't work with
 container managed security, because these requests are handled by Apache
 and don't even make it to Tomcat. Of course I could just mount the
 contents to be protected to Tomcat, but then I'll lose the performance
 advantage of having them served by Apache.

 Do I have to live with that or do I have a stupid setup?

 Torsten


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



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



How can I using Jasper 2 JSP Engine back-compile the java file to jsp file?

2005-06-17 Thread Kingfish (Wang Yu)
I deleted all my project files by misoperation. 
Using the FinalDate+GoogleDesktop makes all java and xml files back. But 
some jsp ... ;-(


Thanks In Advance


Re: Container Managed Security and mod_jk/Static Contents

2005-06-17 Thread Torsten Römer

Sorry, should have mentioned that. Using form based authentication.

Gurumoorthy schrieb:

how do you authenticate ? basic ? form based ?
- Original Message -
From: Torsten Rmer [EMAIL PROTECTED]
To: Tomcat Users List tomcat-user@jakarta.apache.org
Sent: Thursday, June 16, 2005 11:42 PM
Subject: Container Managed Security and mod_jk/Static Contents



Hello!

In order to improve performance for static contents I have setup Apache
with mod_jk. Now only Struts' *.do requests are served by Tomcat, the
rest is done by Apache. Works fine.

Now I want to restrict access to some resources using using container
managed security. That also works fine, but, and that is now my question:

I also want to protect static contents, but that won't work with
container managed security, because these requests are handled by Apache
and don't even make it to Tomcat. Of course I could just mount the
contents to be protected to Tomcat, but then I'll lose the performance
advantage of having them served by Apache.

Do I have to live with that or do I have a stupid setup?

Torsten


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




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



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



configuration question : the number of connections could be supported by a connector in Tomcat 5.0

2005-06-17 Thread Feng Xie \(fxie\)
I like to get some help on how to configure the maximum number of
connections could be supported by Tomcat5.0.
 
There is one config attribute called maxThreads,  according to Tomcat
doc, which isThe maximum number of request processing threads to be
created by this Connector, which therefore determines the maximum number
of simultaneous requests that can be handled. . 
 
My question comes from the fact that there might be multiple HTTP
requests pipelined in each HTTP/1.1 connections, so can we still treat
the maxThread as the maxConnections.
 
Thanks in advance,
Feng

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



Re: SSL keystore with more than one key entry - which alias is used?

2005-06-17 Thread Paul Singleton

John Ryan-Brown wrote:

If the keystore that Tomcat uses contains more than one entry where
Entry type = keyEntry, how does Tomcat choose which one to use when
sending a certificate to the client?


Dunno but there is an undocumented Connector attribute
keyAlias=myalias which works with 5.5.9 and which means
you (probably) don't need an answer to your question

Paul Singleton

PS don't believe rumours that it always offers the cert
with alias 'tomcat'


--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.323 / Virus Database: 267.7.7/20 - Release Date: 16/Jun/2005


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



Re: Tomcat 5.0 + Apache 2.0 + ErrorDocument

2005-06-17 Thread Gurumoorthy
in your Apache

PUT

ErrorDocument 400 /errors/404.jsp
ErrorDocument 500 /errors/500.jsp

And move /errors/404.jsp  and /errors/404.jsp  to the context path .. .not
in WEB-INF as apache wont be able to see the code in WeB-INF  ( UNLESS YOU
ALIAS IT WHICH I DONT THINK IS A GOOD IDEA )

Any Doubts ? Give me a shout ...
- Original Message -
From: Ben [EMAIL PROTECTED]
To: Tomcat tomcat-user@jakarta.apache.org
Sent: Friday, June 17, 2005 1:39 PM
Subject: Tomcat 5.0 + Apache 2.0 + ErrorDocument


Hi

I would like to have Tomcat handle all the error documents, how can I
do this? At this stage, whenever there is a page not found, I see an
Apache error page. I have already setup mod_jk.

I have this:

JKMount /*.jsp ajp13

In my web.xml, I have this:

error-page
error-code404/error-code
location/WEB-INF/errors/404.jsp/location
/error-page

My mod_jk log has the following lines:

jk_handler::mod_jk.c (1952): No body with status=404 for worker=ajp13
jk_handler::mod_jk.c (1952): No body with status=404 for worker=ajp13

Somehow I can't see my /WEB-INF/errors/404.jsp when there is a page not
found.

Thanks,
Ben

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


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



monitoring performance

2005-06-17 Thread Hossein S. Attar

Hi:

Is it possible to instruemnt Tomcat to collect statistics such as 
averasge response time (for each servlet), etc and then somehow get 
these statistics programatically (e.g., using an API). I'm trying to 
write a program that needs to get such statistics,  therefore monitoring 
tools that report

the statistics graphically are not suitable for me.

Thanks,
Hossein

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



Re: monitoring performance

2005-06-17 Thread Peter Lin
you can easily setup JMeter to monitor tomcat and save the results to a log. 

peter lin


On 6/17/05, Hossein S. Attar [EMAIL PROTECTED] wrote:
 Hi:
 
 Is it possible to instruemnt Tomcat to collect statistics such as
 averasge response time (for each servlet), etc and then somehow get
 these statistics programatically (e.g., using an API). I'm trying to
 write a program that needs to get such statistics,  therefore monitoring
 tools that report
 the statistics graphically are not suitable for me.
 
 Thanks,
 Hossein
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


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



JSP including servlet output

2005-06-17 Thread Frank W. Zammetti
Hey all... I have a situation where I want to use a jsp:include whos
target is actually a servlet... Problem is, in the servlet I do:

ServletOutputStream out = response.getOutputStream();
out.println(items.getItem());

...which yields:

java.lang.IllegalStateException
org.apache.jasper.runtime.ServletResponseWrapperInclude.getOutputStream(ServletResponseWrapperInclude.java:62)

Commenting out those two lines gets rid of the exception.  If I call the
servlet directly on its own I get my expected result, so I know the
servlet itself works.

I'm assuming this is some sort of limitation of the include mechanism,
question is, can it be overcome?  I added flush=true to the include tag,
which gets rid of the exception but makes the resultant page end where the
include is, so that's not the answer.

An ideas?  Is this something that can be done in the first place?  If so,
how does one overcome this problem?  TIA!

-- 
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com

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



Re: JSP including servlet output

2005-06-17 Thread Frank W. Zammetti
Never mind, got it... changed:

ServletOutputStream out = response.getOutputStream();

..to...

PrintWriter out = response.getWriter();

...and it now works.  I wouldn't mind an explanation though :)

-- 
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com

On Fri, June 17, 2005 2:02 pm, Frank W. Zammetti said:
 Hey all... I have a situation where I want to use a jsp:include whos
 target is actually a servlet... Problem is, in the servlet I do:

 ServletOutputStream out = response.getOutputStream();
 out.println(items.getItem());

 ...which yields:

 java.lang.IllegalStateException
 org.apache.jasper.runtime.ServletResponseWrapperInclude.getOutputStream(ServletResponseWrapperInclude.java:62)

 Commenting out those two lines gets rid of the exception.  If I call the
 servlet directly on its own I get my expected result, so I know the
 servlet itself works.

 I'm assuming this is some sort of limitation of the include mechanism,
 question is, can it be overcome?  I added flush=true to the include tag,
 which gets rid of the exception but makes the resultant page end where the
 include is, so that's not the answer.

 An ideas?  Is this something that can be done in the first place?  If so,
 how does one overcome this problem?  TIA!

 --
 Frank W. Zammetti
 Founder and Chief Software Architect
 Omnytex Technologies
 http://www.omnytex.com



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



RE: JSP including servlet output

2005-06-17 Thread Jay Burgess
Not a full explanation, but the Javadoc for ServletResponse.getOutputStream()
does say:

Throws:
java.lang.IllegalStateException - if the getWriter method has been called on
this response

Conversely, getWriter() says:

Throws:
java.lang.IllegalStateException - if the getOutputStream  method has already
been called for this response object

It'd seem that the Writer had already been acquired.

Jay

| Jay Burgess [Vertical Technology Group]
| Essential Technology Links via RSS
| http://www.vtgroup.com/



 

-Original Message-
From: Frank W. Zammetti [mailto:[EMAIL PROTECTED] 
Sent: Friday, June 17, 2005 1:21 PM
To: tomcat-user@jakarta.apache.org
Subject: Re: JSP including servlet output

Never mind, got it... changed:

ServletOutputStream out = response.getOutputStream();

..to...

PrintWriter out = response.getWriter();

...and it now works.  I wouldn't mind an explanation though :)

-- 
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com

On Fri, June 17, 2005 2:02 pm, Frank W. Zammetti said:
 Hey all... I have a situation where I want to use a jsp:include whos
 target is actually a servlet... Problem is, in the servlet I do:

 ServletOutputStream out = response.getOutputStream();
 out.println(items.getItem());

 ...which yields:

 java.lang.IllegalStateException

org.apache.jasper.runtime.ServletResponseWrapperInclude.getOutputStream(ServletResponseWrapperInclude.java:62)

 Commenting out those two lines gets rid of the exception.  If I call the
 servlet directly on its own I get my expected result, so I know the
 servlet itself works.

 I'm assuming this is some sort of limitation of the include mechanism,
 question is, can it be overcome?  I added flush=true to the include tag,
 which gets rid of the exception but makes the resultant page end where the
 include is, so that's not the answer.

 An ideas?  Is this something that can be done in the first place?  If so,
 how does one overcome this problem?  TIA!

 --
 Frank W. Zammetti
 Founder and Chief Software Architect
 Omnytex Technologies
 http://www.omnytex.com



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




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



Rc3.d startup scripts

2005-06-17 Thread uttam.g.dubal
I am trying to create a startup script for Solaris for both Tomcat 5.5.9
and Apache 2.0.52.

Can anyone tell me how to do that, so that when the box is rebooted it
automatically starts Tomcat and Apache.

Thank you for your help.


This message is for the designated recipient only and may contain privileged, 
proprietary, or otherwise private information.  If you have received it in 
error, please notify the sender immediately and delete the original.  Any other 
use of the email by you is prohibited.

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



RE: mod_jk works as localhost only

2005-06-17 Thread Randall Svancara
Is it possible for you to send us your mod_jk configuration along with
your workers.properties(if you have one)?

Randall 

-Original Message-
From: naidim [mailto:[EMAIL PROTECTED] 
Sent: Thursday, June 16, 2005 12:41 PM
To: Tomcat Users List
Subject: mod_jk works as localhost only

I'm running Apache2.0.52 and Tomcat 5.5.9 on FC3.  Both work fine
locally and remotely.

mod_jk is configured but it only works as localhost.  Browsing by name
or IP fails to find the files in the webapp directory.  What do I need
to change so it finds them when browseing remotely?

Thanks

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


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



tomcat is not updating changes in server folders

2005-06-17 Thread megacosmic

Hi,

I'm having this problem in netbeans tomcat 5.0 on windows 2000 running in 
local machine: server is not updating the changes in server folders when I 
upload a file or when I simply copy directly to the folder, so I can not 
access these files via web until I restart server.




thanks



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



Re: isRequestedSessionIdFromURL() returns false

2005-06-17 Thread Michael Jouravlev
I already tried it, and it did not work. Session ID is separated by
semicolon, not by question mark or ampersand. It is treated
differently and is not shown as URL parameter.

Thanks anyway.

On 6/16/05, Jon Wingfield [EMAIL PROTECTED] wrote:
 Something like this maybe:
 
 String url = request.getRequestURL().toString();
 if (url.indexOf(jsessionid)-1
   url.indexOf(request.getRequestedSessionId())-1) {
  // do redirect
 }
 
 Jon

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



Re: JSP including servlet output

2005-06-17 Thread Frank W. Zammetti

Yeah, I saw those notes too... I found them a tad confusing :)

I would have thought it was the OutputStream that was already gotten, 
contrary to what the note says... If it was the PrintWriter that was 
already gotten, then why was the solution to call getWriter() instead?


I get the feeling those notes are actually backwatds because as they are 
it doesn't make sense to me.  Or something else entirely is going on. 
That's the problem for me... if I don't really understand what was 
wrong, and why the fix is what it was, I can't be sure this code will 
work in all cases going forward, and that worries me since it is part of 
a generic package.


Frank

Jay Burgess wrote:

Not a full explanation, but the Javadoc for ServletResponse.getOutputStream()
does say:

Throws:
java.lang.IllegalStateException - if the getWriter method has been called on
this response

Conversely, getWriter() says:

Throws:
java.lang.IllegalStateException - if the getOutputStream  method has already
been called for this response object

It'd seem that the Writer had already been acquired.

Jay

| Jay Burgess [Vertical Technology Group]
| Essential Technology Links via RSS
| http://www.vtgroup.com/



 


-Original Message-
From: Frank W. Zammetti [mailto:[EMAIL PROTECTED] 
Sent: Friday, June 17, 2005 1:21 PM

To: tomcat-user@jakarta.apache.org
Subject: Re: JSP including servlet output

Never mind, got it... changed:

ServletOutputStream out = response.getOutputStream();

..to...

PrintWriter out = response.getWriter();

...and it now works.  I wouldn't mind an explanation though :)



--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com


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



RE: monitoring performance

2005-06-17 Thread Hossein S. Attar
Thanks for the reply. I set up JMeter using an example from the JMeter site
(http://jakarta.apache.org/jmeter/usermanual/build-monitor-test-plan.html) .
Apparently JMeter uses manager/status and shows only load, # of threads,
and memory used. Is it possible to make it measure average response time
(both total average response time and per-servlet average response time)?

Thanks,
Hossein

 -Original Message-
 From: Peter Lin [mailto:[EMAIL PROTECTED]
 Sent: Friday, June 17, 2005 5:18 PM
 To: Tomcat Users List
 Subject: Re: monitoring performance
 
 you can easily setup JMeter to monitor tomcat and save the results to a
 log.
 
 peter lin
 
 
 On 6/17/05, Hossein S. Attar [EMAIL PROTECTED] wrote:
  Hi:
 
  Is it possible to instruemnt Tomcat to collect statistics such as
  averasge response time (for each servlet), etc and then somehow get
  these statistics programatically (e.g., using an API). I'm trying to
  write a program that needs to get such statistics,  therefore monitoring
  tools that report
  the statistics graphically are not suitable for me.
 
  Thanks,
  Hossein
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


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



Re: tomcat is not updating changes in server folders

2005-06-17 Thread luke
Hi,

18Jun2005 @ 01:28 megacosmic thusly spake
 I'm having this problem in netbeans tomcat 5.0 on windows 2000 running in 
 local machine: server is not updating the changes in server folders when I 
 upload a file or when I simply copy directly to the folder, so I can not 
 access these files via web until I restart server.

have you modified your build.xml file in netbeans to copy the .war to tomcat
when you rebuild?

kr,
Luke

-- 
._..
.|  .| |.|/.|_ .
.|__.|_|.|\.|_ .
:61 421 276 282:

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



Re: Rc3.d startup scripts

2005-06-17 Thread Bill Barker
For Apache 2.0.52, unless you need SSL, you can do worse than:
   ln -s /usr/local/apache2/bin/apachectl S35apache

If you don't mind running as root, you can do the same thing for Tomcat:
  ln -s /path/to/tomcat/bin/catalina.sh S34tomcat

If you are using jsvc, then the Tomcat5.sh script that ships with it is 
meant to be the start of an rcx.d script.  Even if you're not using jsvc, 
you could always unpack the distro and look at the script as a pattern to 
start from.

[EMAIL PROTECTED] wrote in message 
news:[EMAIL PROTECTED]
I am trying to create a startup script for Solaris for both Tomcat 5.5.9
and Apache 2.0.52.

Can anyone tell me how to do that, so that when the box is rebooted it
automatically starts Tomcat and Apache.

Thank you for your help.


This message is for the designated recipient only and may contain 
privileged, proprietary, or otherwise private information.  If you have 
received it in error, please notify the sender immediately and delete the 
original.  Any other use of the email by you is prohibited. 




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



Re: configuration question : the number of connections could be supported by a connector in Tomcat 5.0

2005-06-17 Thread Bill Barker
If you are fronting with Apache, then the mapping between connections and 
threads is more a function of your MPM.  As a result, I'm just going to 
answer for the stand-alone Connector.

In Tomcat 5.0, there is a one-to-one mapping between socket connections and 
threads.  Pipelined HTTP/1.1 keep-alive connections will all use the same 
thread to process.  In 5.5.10+ this will no longer necessarily be the case. 
It will be possible for Tomcat to handle many (and the value of 'many' is 
heavily dependent on what your app does :) more socket connections than the 
configured maxThreads.

Feng Xie (fxie) [EMAIL PROTECTED] wrote in message 
news:[EMAIL PROTECTED]
I like to get some help on how to configure the maximum number of
connections could be supported by Tomcat5.0.

There is one config attribute called maxThreads,  according to Tomcat
doc, which isThe maximum number of request processing threads to be
created by this Connector, which therefore determines the maximum number
of simultaneous requests that can be handled. .

My question comes from the fact that there might be multiple HTTP
requests pipelined in each HTTP/1.1 connections, so can we still treat
the maxThread as the maxConnections.

Thanks in advance,
Feng 




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



Re: Tomcat 3.2.3 / JDK 1.4.2_04-b05

2005-06-17 Thread Bill Barker

Samit Paul [EMAIL PROTECTED] wrote in message 
news:[EMAIL PROTECTED]
 Hi,
 Can somebody help me find out how my tomcat is dying. As far as I know 
 it's
 not triggered by any url access or memory leak or stack overflow. It dies 
 on
 it's own( I guess). Is there any kind of hook I can provide that will tell
 me when it dies? If this subject is already covered , please atleat point 
 me
 there.

Well, as I remember, tomcat dying on 3.2.3 was one of it's major features 
;-).

This was one of the major reasons for the re-designs in both TC 3.3.x and TC 
4.x.  Unless you think that you look distinguished after pulling all of your 
hair out, I'd strongly suggest upgrading ;-).

 Thanks,
 Samit








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




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