plaint text version of question: hello world w3schools (tomcat)

2023-07-04 Thread Jim McNamara


Hi-

I am resending my msg. in plain text wondering how to get tomcat to render my 
servlet for hellworld from code I got at w3schools.

I am trying to follow the guidelines:
TOMCAT 10.1.10 + plain text email!
THANKS 

code and configuration files:

import java.io.IOException;
import java.io.PrintWriter;
import javax.servlet.Servlet;
import javax.servlet.ServletConfig;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
 
/**
 * This servlet program is used to print "Hello World" on 
 * client browser by implementing servlet interface.
 * @author w3spoint
 */
 
public class HelloWorld implements Servlet {
private static final long serialVersionUID = 1L;
 
//no-argument constructor.
public HelloWorld() {
 
}
 
ServletConfig config=null;
 
@Override
public void init(ServletConfig config) throws ServletException {
this.config = config;
System.out.println("Do initialization here.");  
}
 
@Override
public void destroy() {
System.out.println("Do clean-up process here.");
}
 
@Override
public ServletConfig getServletConfig() {
return config;
}
 
@Override
public String getServletInfo() {
return "w3spoint.com";
}
 
@Override
public void service(ServletRequest request, ServletResponse response)
throws ServletException, IOException {
response.setContentType("text/html");
PrintWriter out = response.getWriter();
 
out.println("Hello World example using " +
"servlet interface.");
out.close();
}
}


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

HelloWorld

  HelloWorld


 

HelloWorld
/HelloWorld

 



url:

http://localhost:8080/examples/HelloWorld

 


error msg:

Root Cause

java.lang.ClassCastException: class HelloWorld cannot be cast to class 
jakarta.servlet.Servlet 


Sent with Proton Mail secure email.

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: [OT] Unable to run "Hello World" in Eclipse JEE on Mac 10.11.3

2017-07-24 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Mark,

On 7/22/17 1:18 PM, Mark Eggers wrote:
> Roparzh,
> 
> On 7/22/2017 12:14 AM, Roparzh Hemon wrote:
>> On my Mac 10.11.3 I've installed the Eclipse JEE IDE (Version:
>> Neon.3 Release (4.6.3)) I also installed apache-tomcat 9 on my
>> Mac, using the following commands :
>> 
>> sudo mkdir -p /usr/local sudo mv
>> ~/Downloads/apache-tomcat-9.0.0.M21 /usr/local sudo rm-f
>> /Library/Tomcat sudo ln -s /usr/local/apache-tomcat-9.0.0.M21/
>> /Library/Tomcat sudo chown -R roparzhhemon /Library/Tomcat sudo
>> chmod +x /Library/Tomcat/bin/*.sh
>> 
> 
> Don't do this. You will have permissions problems partially due to
> the way Eclipse runs servers by default.
> 
> Also, I don't think Eclipse Neon 3 supports Tomcat 9 out of the
> box. You'll need the JBoss Tools plugins (which contain a lot of
> good stuff).
> 
>> When I try "Run as server" on a minimal html file in JEE, I get
>> the following error message :
>> 
>> Could not load the Tomcat server configuration at /Servers/Tomcat
>> v9.0 Sever at localhost-config. The configuration may be corrupt
>> or incomplete.
>> 
>> Any help appreciated.
> 
> I'm in the process of writing up a very long and detailed message
> on how I get everything running on Linux / Windows. The Linux stuff
> should be applicable to the Macintosh.
> 
> I'll post this here when I'm done. Please be aware that it's going
> to be very long and have not so much to do with Tomcat. I'll label
> it [OT] so other readers can pass on it.

Sounds like a great ApacheCon talk! ;)

- -chris
-BEGIN PGP SIGNATURE-
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJZdiKSAAoJEBzwKT+lPKRYTaAP/RFmVlNATIGp6HjDn263Punq
88TpYPKlbkVQRY8MsH+4OEkCPKJUNwX5LNgDhru3JL/6IEQJC1PhkHrM4SeVgH3Y
q9rwehlncjZiEVzZbdL00KCKrUlT1Mx1xqqXiVphRPaFLTxXcrbQAJG8dENzJ8Jc
asVduttG/JNcL6gm6W+f6NTDQ4bcEobGc9hUllHl0rbogfU+fwa7jCAiQW+kfew5
f1FqmFq4mxdHGby1OwR0lQKsMiVm8H669xbPPWIurP+y9Ke2FigwD9aus393H8mH
fcWLCp3vXJ7ANYZeZmsfcIiFoODNKZwzOn0Xk5NvV+bJ++Ocn+r9vcRYcSfei0c4
G8IDqENOYFgqgYcqmhFNfZvwhWuEiA2bVRCI6p+uDTNownVyp78KSSTSiPMeHOP9
nFcU9X44qLAl1r36YtS3CQfNQdYJXMICeBrhZfYr9SocMK9NY0FK4MiZ8EsNAXHX
gRSubs+eGH1+SxohOHuYsP9ke4VVLuTByUXnSpaN+7Klv7MCphqYGV8cCKP7cIzf
H/0EE6MXKCMSNsIakWxbYuTsUhpyQWbbxYCafz+bv0jEr8xrTMnXrzrC5+Rrp3FG
m3x19MMA6BZ4X4PcD1jNQulLVVSUOHoqFYNIwmowSjmkMNDrqIv2of4zTrs8HQoQ
m6ffF+9FeJ3/aSeWjMFv
=rk4S
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Unable to run "Hello World" in Eclipse JEE on Mac 10.11.3

2017-07-23 Thread Roparzh Hemon
tiple permissions problems, including not
> being able to start / stop Tomcat easily, read log files, modify server
> configurations, or have it controlled by the IDE.
>
> If you have a system-wide Tomcat running on the default ports (8005,
> 8009, 8080), you'll have to change your locally installed Tomcat ports.
> It's different in Eclipse, using the standard server setup.
>
> Here's how you do this in Eclipse:
>
> a. In the bottom panel, select the Servers tab
> b. Select the server you wish to work on
> c. Hit F3 to open the server configuration
> d. Make sure that you are on the Overview tab
> e. Find the server ports on the right hand side
> f. Edit them
> g. Ctrl-S to save the configuration
> h. Close the file
>
> This by default edits server metadata and DOES NOT alter your Tomcat
> installation. In other words, if you launch Tomcat from the command line
> using startup.sh, it will still use the original ports.
>
> You have the option of allowing Eclipse to take control of your Tomcat
> installation, but I've always been a bit leery about that.
>
> 2. Install Maven
>
> This step wasn't necessary, but it's nice to use the latest version of
> Maven. The installation instructions above make it easy to upgrade and
> roll back your local copy of Maven.
>
> In my development environments (RedHat - based Linux) I make the Maven
> globally available. This is done by adding some paths to
> /etc/profile.d/custom.sh. I don't know how this is accomplished on the
> Macintosh.
>
> That being said, the Eclipse lifecycle and Maven lifecycle are not
> really compatible. Progress has been made to synchronize the two, but
> you'll still run into problems. In order to get around this, there are
> some m2e-lifecycle plugins available for doing the following:
>
> 1. handling the YUI Maven compressor plugin
> 2. handling annotations
> 3. handling the Maven dependency plugin (which we use at $work)
>
> Install 'em if ya need 'em.
>
> Part C - Using this Mess
> 
>
> 1. Maven Gotchas
>
> Eclipse and Maven really don't get along very well. It's gotten better
> over the years (thanks to the fine team of m2e developers).
>
> The challenge centers around different views of the development
> lifecycle. Occasionally Eclipse doesn't register what Maven has done to
> the workspace, so you'll need to occasionally refresh the workspace.
>
> a. Select the project that seems to be out of sync
> b. Hit F5
>
> This will reread the workspace and update Eclipse. It's especially
> necessary when you run a maven commend outside of the IDE.
>
> 2. Creating a new Maven Project
>
> a. File->New-Maven Project
>1. You might not see Maven Project as an option
>2. If not, select Other
>3. Use the New Wizard and type maven in the text filter box
>4. Select Maven Project
>5. Click Next
> b. Click Next
> c. Leave the Use default  Workspace location checked for now
>1. I usually store my projects in a separate directory
>2. Makes them easier to access in multiple IDEs - a $work requirement
> d. Click the Next button
> e. You'll get a huge list of archetypes (read about those)
> f. Use the Filter and type webapp
> g. Scroll down and find the webapp-javaee7 archetype by codehaus
>1. you can also choose the webapp-javaee6 archetype
>2. or the webapp-jee5 archetype
> h. Click on the Next button
> i. Fill in the form
>1. group id - I use org.mdeggers for personal, com.$work for
>   professional
>2. artifact id - pick a name, maybe myhello
>3. version - I really hate 0.0.1-SNAPSHOT - so I use 1.0.0-SNAPSHOT
>4. SNAPSHOT is important - read about it on the Maven site
>5. leave the default package as is for now
> j. Click the Finish button
>
> The resulting project will be flagged with an error due to the fact that
> no ${endorsed} directory is available (yah Eclipse!). To fix this, you
> follow the instructions found by mousing over the red circle with the
> white "X" in it:
>
> To whit: You may need to perform a maven command line build in order to
> create it.
>
> To do that:
>
> a. cd to the project (workspace/myhello)
> b. mvn package
> c. then refresh the project (F5)
>
> Unfortunately, this uses the Maven dependency plugin, which doesn't fit
> well with the Eclipse lifecycle. Even with the m2e lifecycle plugin for
> the Maven dependency plugin installed, I still get an error.
>
> You have two choices:
>
> a. Delete the endorsed stuff - OK if you're not using it
>1. remove the dependency plugin from the plugins node
&

Re: Unable to run "Hello World" in Eclipse JEE on Mac 10.11.3

2017-07-22 Thread Mark Eggers
Close the file

This by default edits server metadata and DOES NOT alter your Tomcat
installation. In other words, if you launch Tomcat from the command line
using startup.sh, it will still use the original ports.

You have the option of allowing Eclipse to take control of your Tomcat
installation, but I've always been a bit leery about that.

2. Install Maven

This step wasn't necessary, but it's nice to use the latest version of
Maven. The installation instructions above make it easy to upgrade and
roll back your local copy of Maven.

In my development environments (RedHat - based Linux) I make the Maven
globally available. This is done by adding some paths to
/etc/profile.d/custom.sh. I don't know how this is accomplished on the
Macintosh.

That being said, the Eclipse lifecycle and Maven lifecycle are not
really compatible. Progress has been made to synchronize the two, but
you'll still run into problems. In order to get around this, there are
some m2e-lifecycle plugins available for doing the following:

1. handling the YUI Maven compressor plugin
2. handling annotations
3. handling the Maven dependency plugin (which we use at $work)

Install 'em if ya need 'em.

Part C - Using this Mess


1. Maven Gotchas

Eclipse and Maven really don't get along very well. It's gotten better
over the years (thanks to the fine team of m2e developers).

The challenge centers around different views of the development
lifecycle. Occasionally Eclipse doesn't register what Maven has done to
the workspace, so you'll need to occasionally refresh the workspace.

a. Select the project that seems to be out of sync
b. Hit F5

This will reread the workspace and update Eclipse. It's especially
necessary when you run a maven commend outside of the IDE.

2. Creating a new Maven Project

a. File->New-Maven Project
   1. You might not see Maven Project as an option
   2. If not, select Other
   3. Use the New Wizard and type maven in the text filter box
   4. Select Maven Project
   5. Click Next
b. Click Next
c. Leave the Use default  Workspace location checked for now
   1. I usually store my projects in a separate directory
   2. Makes them easier to access in multiple IDEs - a $work requirement
d. Click the Next button
e. You'll get a huge list of archetypes (read about those)
f. Use the Filter and type webapp
g. Scroll down and find the webapp-javaee7 archetype by codehaus
   1. you can also choose the webapp-javaee6 archetype
   2. or the webapp-jee5 archetype
h. Click on the Next button
i. Fill in the form
   1. group id - I use org.mdeggers for personal, com.$work for
  professional
   2. artifact id - pick a name, maybe myhello
   3. version - I really hate 0.0.1-SNAPSHOT - so I use 1.0.0-SNAPSHOT
   4. SNAPSHOT is important - read about it on the Maven site
   5. leave the default package as is for now
j. Click the Finish button

The resulting project will be flagged with an error due to the fact that
no ${endorsed} directory is available (yah Eclipse!). To fix this, you
follow the instructions found by mousing over the red circle with the
white "X" in it:

To whit: You may need to perform a maven command line build in order to
create it.

To do that:

a. cd to the project (workspace/myhello)
b. mvn package
c. then refresh the project (F5)

Unfortunately, this uses the Maven dependency plugin, which doesn't fit
well with the Eclipse lifecycle. Even with the m2e lifecycle plugin for
the Maven dependency plugin installed, I still get an error.

You have two choices:

a. Delete the endorsed stuff - OK if you're not using it
   1. remove the dependency plugin from the plugins node
   2. remove the compiler configuration from the compiler plugin
   3. remove the property from the properties node
b. Keep the endorsed stuff
  1. needed if you use the endorsed mechanism
  2. classes in the endorsed directory may not show up in the Eclipse
 IDE

BTW - this works fine with NetBeans.

Finally, we can work with the project!!

In src/main/webapp, there should be an index.html.

a. double-click on it
b. this should open in the editor

If JBoss Tools works on the Macintosh like it does on Windows, you'll
get two panes by default.

a. source pane
b. display pane

You don't even have to run the server if this occurs. If not, we can
then run it on the server by doing the following.

a. Run as -> Run on Server
b. Select Tomcat v9.0.0.M22
c. Click Next
d. Click Finish

A "Hello World!" page should pop up as a separate tab in the Eclipse IDE.

Addendum


While the Tomcat log files are displayed in the console window at the
bottom of the IDE, it won't display any application logging. Application
logging is a good thing (we use commons-logging and log4j at $work), and
you should do this for all application logging needs. It makes your
system administrators (me) happy so that they don't h

Re: Unable to run "Hello World" in Eclipse JEE on Mac 10.11.3

2017-07-22 Thread zemiandeng
Hi, If you are simply using Eclipse to run Tomcat, I don't think you have to
run "sudo" command on MacOX. Just unzip a tomcat distribution with normal
user permission. Things should work. It might be helpful if you simply test
out the Tomcat without Eclipse first to ensure it's working, then you an
configure the IDE.



--
View this message in context: 
http://tomcat.10.x6.nabble.com/Unable-to-run-Hello-World-in-Eclipse-JEE-on-Mac-10-11-3-tp5065620p5065629.html
Sent from the Tomcat - User mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Unable to run "Hello World" in Eclipse JEE on Mac 10.11.3

2017-07-22 Thread Mark Eggers
Roparzh,

On 7/22/2017 12:14 AM, Roparzh Hemon wrote:
> On my Mac 10.11.3 I've installed the Eclipse JEE IDE (Version: Neon.3
> Release (4.6.3)) I also installed apache-tomcat 9 on my Mac, using the
> following commands :
> 
> sudo mkdir -p /usr/local sudo mv ~/Downloads/apache-tomcat-9.0.0.M21
> /usr/local sudo rm-f /Library/Tomcat sudo ln -s
> /usr/local/apache-tomcat-9.0.0.M21/ /Library/Tomcat sudo chown -R
> roparzhhemon /Library/Tomcat sudo chmod +x /Library/Tomcat/bin/*.sh
> 

Don't do this. You will have permissions problems partially due to the
way Eclipse runs servers by default.

Also, I don't think Eclipse Neon 3 supports Tomcat 9 out of the box.
You'll need the JBoss Tools plugins (which contain a lot of good stuff).

> When I try "Run as server" on a minimal html file in JEE, I get the
> following error message :
> 
> Could not load the Tomcat server configuration at /Servers/Tomcat v9.0
> Sever at localhost-config. The configuration may be corrupt or
> incomplete.
> 
> Any help appreciated.

I'm in the process of writing up a very long and detailed message on how
I get everything running on Linux / Windows. The Linux stuff should be
applicable to the Macintosh.

I'll post this here when I'm done. Please be aware that it's going to be
very long and have not so much to do with Tomcat. I'll label it [OT] so
other readers can pass on it.

. . . just my two cents
/mde/




signature.asc
Description: OpenPGP digital signature


Unable to run "Hello World" in Eclipse JEE on Mac 10.11.3

2017-07-22 Thread Roparzh Hemon
On my Mac 10.11.3 I've installed the Eclipse JEE IDE (Version: Neon.3
Release (4.6.3)) I also installed apache-tomcat 9 on my Mac, using the
following commands :

sudo mkdir -p /usr/local sudo mv ~/Downloads/apache-tomcat-9.0.0.M21
/usr/local sudo rm-f /Library/Tomcat sudo ln -s
/usr/local/apache-tomcat-9.0.0.M21/ /Library/Tomcat sudo chown -R
roparzhhemon /Library/Tomcat sudo chmod +x /Library/Tomcat/bin/*.sh

When I try "Run as server" on a minimal html file in JEE, I get the
following error message :

Could not load the Tomcat server configuration at /Servers/Tomcat v9.0
Sever at localhost-config. The configuration may be corrupt or
incomplete.

Any help appreciated.

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: HTTP 404 error when trying to run a Hello World Java Servlet while using Eclipse and Tomcat

2012-11-02 Thread Albert Kam
Perhaps you would like to share :
- Whether you started the tomcat successfully (as seen from the
logs/catalina.out)
- Whether you can access the tomcat with http://localhost:8080 (assuming
you didnt change the tomcat's port)
- Whether you mapped the servlet in web.xml ?
- What URL did you use to access the servlet ?



On Sat, Nov 3, 2012 at 2:26 AM, Talia Selitsky  wrote:

> Hello,
>
> I am using Eclipse version Juno and Apache Tomcat 7.  I am trying to run a
> basic Hello World web application.
> I am following all of the basic steps but I keep getting a Http 404 error.
>  The tomcat server runs fine, so I am not sure
> what the problem is. I have done tons of research online but none of the
> solutions have worked.
>  Any help would be much appreciated.
>
> Thanks!
>



-- 
Do not pursue the past. Do not lose yourself in the future.
The past no longer is. The future has not yet come.
Looking deeply at life as it is in the very here and now,
the practitioner dwells in stability and freedom.
(Thich Nhat Hanh)


Re: Tomcat 7 Per Instance Memory Footprint in Hello World App.

2011-03-18 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Noah,

On 3/16/2011 10:47 PM, Noah Cutler wrote:
> I'll need to sort out DBCP, java singletons are nothing like php where a
> singleton exists for lifetime of the request, vs. lifetime of the
> application.

The servlet spec includes a "request" object which (as one would expect)
survives for the life of the request. HttpServletRequest (that defining
class of the request objects) objects allow "attributes" to be set that
are therefore accessible during the life of the request. You could store
temporary resources in the request attributes if you want to be able to
re-use them and discard them when the request terminates.

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

iEYEARECAAYFAk2D1EEACgkQ9CaO5/Lv0PD18QCgkXlLXa9ogZt32eTRcPbNqpwU
n7YAoJ0dhgRbxrm9iKhrEn3ScAqQYjIG
=xJlA
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Tomcat 7 Per Instance Memory Footprint in Hello World App.

2011-03-16 Thread Noah Cutler
Chris,

will likely go with mod_jk, but I did notice that Jetty folks strongly
recommend mod_proxy (may be that their container works better with
mod_proxy)

I am not using a framework per se, one that I have written, so
definitely not something like Grails with Spring + Hibernate for
example.  Groovy itself is memory hungry, dynamic language features such
as closures, duck typing and runtime MOP come with a cost for sure. In
other words, not expecting to run on 128mb as you have been
attempting ;--)

I'll need to sort out DBCP, java singletons are nothing like php where a
singleton exists for lifetime of the request, vs. lifetime of the
application.

Thanks for the clarification on these issues!

Noah

On Wed, 2011-03-16 at 21:35 -0400, Christopher Schultz wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
> 
> Noah,
> 
> On 3/16/2011 7:48 PM, Noah Cutler wrote:
> > the Tomcat Groovy app will do nothing but serve up dynamic content
> > (httpd will handle ssl as well), so whichever method (ajp or mod_proxy)
> > peforms the best/is-most-reliable, I'll go with.
> 
> I have a preference for mod_jk since it is more mature, has a separate
> release cycle, and has more configuration options than mod_proxy_ajp.
> I'm biased though since I've used mod_jk since before mod_proxy_ajp was
> available. I had never considered mod_proxy_http but given the options
> mod_jk has, I haven't re-considered it.
> 
> > Love that 128mb JVM, I am very much interested in lean & mean.  Coming
> > from LAMP stack where memory usage is minimal for non-enterprise
> > trafficked apps, the JVM seems a bit heavy handed, but power comes at a
> > cost (memory) it seems. I'll need to analyze existing apache logs and
> > see how many concurrent users we have on average, and then tweak Java -X
> > accordingly per Tomcat instance. Assume with low traffic apps that you
> > can effectively starve the JVM, giving it just enough memory to start
> > (plus a small cushion), which is probably what you are doing with the
> > 128mb JVM.
> 
> If you are using a framework like JGroovy, you are adding a somewhat
> thick layer on top of Java already... are you also using any other
> libraries that might be either caching a lot of data or building large
> object trees in memory?
> 
> > Speaking of, what are your basic -X params to pull this off?
> 
> Right now a simple "-Xms384M -Xmx384M". No special PermGen options, no
> GC options, no nuthin'.
> 
> > 1) low traffic app = non-pooled, connection per request
> >>> this is the single tomcat instance, many virtual hosts model (low
> > budget hosting)
> 
> I would always use a connection pool, even if the pool is shallow. We
> run with a mere 20 connections in production and serve hundreds of
> simultaneous users (not simultaneous requests, of course).
> 
> > 2) mid-to-high traffic app = pooled, connection per tomcat instance
> >>> application has dedicated tomcat instance; connection handle is
> > singleton, created on tomcat startup and shared by all users.
> 
> I would use a pool per webapp. That allows you to size each one
> appropriately for the load and one busy webapp won't starve the other
> webapps out of their connections.
> 
> > One thing I may not have mentioned is that each component will be
> > running in its own virtual machine; i.e. VM1 Apache/PHP; VM2 MySQL; VM3
> > Tomcat/Groovy.
> 
> Interesting, but not doesn't really change anything.
> 
> > Probably will not get same performance as a bare metal setup, but the
> > server has 2X 6-core 12mb cache CPU, 6X 146GB SCSI, and 16GB RAM, so I
> > should be able to allocate sufficient resources to each VM and get
> > decent performance -- either way, will be fun to find out ;--)
> 
> One would hope ;)
> 
> Good luck,
> - -chris
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.4.10 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
> 
> iEYEARECAAYFAk2BZWEACgkQ9CaO5/Lv0PCq0wCgnHkDm0aTMDNzvrj/Zazg5poi
> LzoAoLEa5viGxb0FbXkX41r1NIZ3tDWS
> =ES1m
> -END PGP SIGNATURE-
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
> 


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Tomcat 7 Per Instance Memory Footprint in Hello World App.

2011-03-16 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Noah,

On 3/16/2011 7:48 PM, Noah Cutler wrote:
> the Tomcat Groovy app will do nothing but serve up dynamic content
> (httpd will handle ssl as well), so whichever method (ajp or mod_proxy)
> peforms the best/is-most-reliable, I'll go with.

I have a preference for mod_jk since it is more mature, has a separate
release cycle, and has more configuration options than mod_proxy_ajp.
I'm biased though since I've used mod_jk since before mod_proxy_ajp was
available. I had never considered mod_proxy_http but given the options
mod_jk has, I haven't re-considered it.

> Love that 128mb JVM, I am very much interested in lean & mean.  Coming
> from LAMP stack where memory usage is minimal for non-enterprise
> trafficked apps, the JVM seems a bit heavy handed, but power comes at a
> cost (memory) it seems. I'll need to analyze existing apache logs and
> see how many concurrent users we have on average, and then tweak Java -X
> accordingly per Tomcat instance. Assume with low traffic apps that you
> can effectively starve the JVM, giving it just enough memory to start
> (plus a small cushion), which is probably what you are doing with the
> 128mb JVM.

If you are using a framework like JGroovy, you are adding a somewhat
thick layer on top of Java already... are you also using any other
libraries that might be either caching a lot of data or building large
object trees in memory?

> Speaking of, what are your basic -X params to pull this off?

Right now a simple "-Xms384M -Xmx384M". No special PermGen options, no
GC options, no nuthin'.

> 1) low traffic app = non-pooled, connection per request
>>> this is the single tomcat instance, many virtual hosts model (low
> budget hosting)

I would always use a connection pool, even if the pool is shallow. We
run with a mere 20 connections in production and serve hundreds of
simultaneous users (not simultaneous requests, of course).

> 2) mid-to-high traffic app = pooled, connection per tomcat instance
>>> application has dedicated tomcat instance; connection handle is
> singleton, created on tomcat startup and shared by all users.

I would use a pool per webapp. That allows you to size each one
appropriately for the load and one busy webapp won't starve the other
webapps out of their connections.

> One thing I may not have mentioned is that each component will be
> running in its own virtual machine; i.e. VM1 Apache/PHP; VM2 MySQL; VM3
> Tomcat/Groovy.

Interesting, but not doesn't really change anything.

> Probably will not get same performance as a bare metal setup, but the
> server has 2X 6-core 12mb cache CPU, 6X 146GB SCSI, and 16GB RAM, so I
> should be able to allocate sufficient resources to each VM and get
> decent performance -- either way, will be fun to find out ;--)

One would hope ;)

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

iEYEARECAAYFAk2BZWEACgkQ9CaO5/Lv0PCq0wCgnHkDm0aTMDNzvrj/Zazg5poi
LzoAoLEa5viGxb0FbXkX41r1NIZ3tDWS
=ES1m
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Tomcat 7 Per Instance Memory Footprint in Hello World App.

2011-03-16 Thread Noah Cutler
Chris, great feedback.

the Tomcat Groovy app will do nothing but serve up dynamic content
(httpd will handle ssl as well), so whichever method (ajp or mod_proxy)
peforms the best/is-most-reliable, I'll go with.

Love that 128mb JVM, I am very much interested in lean & mean.  Coming
from LAMP stack where memory usage is minimal for non-enterprise
trafficked apps, the JVM seems a bit heavy handed, but power comes at a
cost (memory) it seems. I'll need to analyze existing apache logs and
see how many concurrent users we have on average, and then tweak Java -X
accordingly per Tomcat instance. Assume with low traffic apps that you
can effectively starve the JVM, giving it just enough memory to start
(plus a small cushion), which is probably what you are doing with the
128mb JVM.  Speaking of, what are your basic -X params to pull this off?

Re: DBCP and per user per request connection handle, yes, not well
thought out, am putting the pieces together component-wise; most in the
know suggest connection pooling vs. per request connections. Correct me
if I am wrong here, but as I see it, there are 2 basic approaches for
database connectivity on the JVM:

1) low traffic app = non-pooled, connection per request
>> this is the single tomcat instance, many virtual hosts model (low
budget hosting)

2) mid-to-high traffic app = pooled, connection per tomcat instance
>> application has dedicated tomcat instance; connection handle is
singleton, created on tomcat startup and shared by all users.

One thing I may not have mentioned is that each component will be
running in its own virtual machine; i.e. VM1 Apache/PHP; VM2 MySQL; VM3
Tomcat/Groovy.

Probably will not get same performance as a bare metal setup, but the
server has 2X 6-core 12mb cache CPU, 6X 146GB SCSI, and 16GB RAM, so I
should be able to allocate sufficient resources to each VM and get
decent performance -- either way, will be fun to find out ;--)

Noah


On Wed, 2011-03-16 at 18:26 -0400, Christopher Schultz wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
> 
> Noah,
> 
> On 3/15/2011 7:02 PM, Noah Cutler wrote:
> > However, some of the LAMP stack apps will have legacy/archived
> > functionality that I have zero interest/time in porting over to
> > JVM/Groovy framework. So, the plan is to mod_rewrite archived requests
> > to php, along with static files (css,jss,html,etc.), and use Tomcat to
> > serve up non-legacy dynamic content, connecting via AJP or mod_proxy.
> 
> Sounds reasonable: you you've already got Apache httpd in the mix, so
> multiplexing between multiple backend Tomcats isn't a big deal, then.
> FYI mod_proxy will also do AJP if you want. The protocol is slightly
> more optimized than HTTP proxying, but does not (directly) include any
> options for encryption and is a tiny bit harder to debug when problems
> arise.
> 
> > Amazed that you have been able to tweak JVM memory usage down to as
> > little as 128mb, incredible.
> 
> We have a very lean and mean webapp: small transactions and very little
> stored in the session. We only have to increase the heap size as the
> number of concurrent users grows. We've had to do this twice in
> production, and the first time it was growing from a 64MiB heap up to
> 192MiB (just for good measure). Our last release had a huge problem with
> it that was bringing way too many rows back from the db and caching them
> in the user's session and we've had to temporarily grow up to 385MiB to
> keep that under control before a fix can be put in place.
> 
> We use Struts 1 as our app framework and use our own hand-written JDBC
> queries to fetch data from our RDBMS, so there's not a whole lot of junk
> laying around.
> 
> > The OOME issue is a real one given my lack
> > of experience in Java -- have @5 months Groovy under my belt and am
> > enjoying it far too much to return to php -- so "important" client sites
> > will have their own dedicated Tomcat instance; the rest, I'll virtual
> > host in a single instance.
> 
> Sounds like a plan.
> 
> If you have any more questions, definitely come back to the list.
> 
> > Am interested in Tomcat 7's new DBCP model as well.  Coupled with Groovy
> > per request singleton (unlike per instance/application lifetime), I
> > should be able create a db connection handle on request start and
> > thereafter have all queries in the request run against this cached
> > connection (could also do a true singleton, the most efficient, but as I
> > understand, singletons are specific to the entire instance, and
> > therefore will not work for a virtual hosts setup).
> 
> I don't think that's what you want to do. Typically, a connection pool
> will have a fixed number of connections for a (somewhat) unlimited
> number of users. If you assign a db connection to each user, you are
> tying-up resources on the db server for a user who may disappear and
> never explicitly log out, freezing that connection until some timeout
> occurs. Worse, you have to have potentially thousands of co

Re: Tomcat 7 Per Instance Memory Footprint in Hello World App.

2011-03-16 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Noah,

On 3/15/2011 7:02 PM, Noah Cutler wrote:
> However, some of the LAMP stack apps will have legacy/archived
> functionality that I have zero interest/time in porting over to
> JVM/Groovy framework. So, the plan is to mod_rewrite archived requests
> to php, along with static files (css,jss,html,etc.), and use Tomcat to
> serve up non-legacy dynamic content, connecting via AJP or mod_proxy.

Sounds reasonable: you you've already got Apache httpd in the mix, so
multiplexing between multiple backend Tomcats isn't a big deal, then.
FYI mod_proxy will also do AJP if you want. The protocol is slightly
more optimized than HTTP proxying, but does not (directly) include any
options for encryption and is a tiny bit harder to debug when problems
arise.

> Amazed that you have been able to tweak JVM memory usage down to as
> little as 128mb, incredible.

We have a very lean and mean webapp: small transactions and very little
stored in the session. We only have to increase the heap size as the
number of concurrent users grows. We've had to do this twice in
production, and the first time it was growing from a 64MiB heap up to
192MiB (just for good measure). Our last release had a huge problem with
it that was bringing way too many rows back from the db and caching them
in the user's session and we've had to temporarily grow up to 385MiB to
keep that under control before a fix can be put in place.

We use Struts 1 as our app framework and use our own hand-written JDBC
queries to fetch data from our RDBMS, so there's not a whole lot of junk
laying around.

> The OOME issue is a real one given my lack
> of experience in Java -- have @5 months Groovy under my belt and am
> enjoying it far too much to return to php -- so "important" client sites
> will have their own dedicated Tomcat instance; the rest, I'll virtual
> host in a single instance.

Sounds like a plan.

If you have any more questions, definitely come back to the list.

> Am interested in Tomcat 7's new DBCP model as well.  Coupled with Groovy
> per request singleton (unlike per instance/application lifetime), I
> should be able create a db connection handle on request start and
> thereafter have all queries in the request run against this cached
> connection (could also do a true singleton, the most efficient, but as I
> understand, singletons are specific to the entire instance, and
> therefore will not work for a virtual hosts setup).

I don't think that's what you want to do. Typically, a connection pool
will have a fixed number of connections for a (somewhat) unlimited
number of users. If you assign a db connection to each user, you are
tying-up resources on the db server for a user who may disappear and
never explicitly log out, freezing that connection until some timeout
occurs. Worse, you have to have potentially thousands of connections to
the back-end which may kill your db: all of those connections require a
non-trivial amount of memory to manage.

It's usually sufficient to grab a connection from the pool, use it, then
put it back. If you have a use case where some other strategy makes
sense, I'd be glad to hear it.

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

iEYEARECAAYFAk2BORUACgkQ9CaO5/Lv0PAEhQCfZkOUFQ7r80Jp/7a2q1RJeeGg
sw8An2vtc0DnZ4oj56JN+xEv39aaVi78
=bKzA
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Tomcat 7 Per Instance Memory Footprint in Hello World App.

2011-03-16 Thread Noah Cutler
Thomas,

yes, I have seen a few sample mod_jk configs, does not look difficult to
implement.

Load balanced, per instance and/or virtual host setup with new DBCP,
what more could one ask for ;--)

I am really looking forward to generating dynamic content with Groovy on
Tomcat, quite lightweight compared to say, Grails, which requires bare
minimum 512mb to run poorly, and 1024mb to run well, ouch.

Thanks for the tips...

Noah

On Wed, 2011-03-16 at 06:25 +0100, Thomas Freitag wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
> 
> Hi Noah,
> 
> On 03/15/2011 07:05 PM, Noah Cutler wrote:
> > Obviously per instance is a memory hungry solution, albeit highly
> > convenient. Placing all sites in a single instance is a possibility as
> > well (and the most resource "friendly"), but I would need to implement
> > some form of load balancing for the mid-business-day client A emergency
> > restart (since all sites would be affected by the restart). Of course, I
> > should have load balancing for the per instance solution as well to
> > ensure application uptime even on restart.
> 
> That could be done with a combination of Apache httpd and mod_jk (my
> preffered way), mod_proxy_ajp or mod_proxy_http. For mod_jk there is a
> very good documented, almost ready to start configuration in the source
> download.
> 
> Regards,
> - -- 
> Thomas Freitag
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.4.10 (GNU/Linux)
> 
> iEYEARECAAYFAk2ASbsACgkQGE5pHr3PKuXf3ACeL35NqbxT912UJmQcsLsRqeJz
> 8pQAn3sEYamqbBAceNpejbX0cJ/olWYR
> =4lmj
> -END PGP SIGNATURE-
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
> 


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Tomcat 7 Per Instance Memory Footprint in Hello World App.

2011-03-15 Thread Thomas Freitag
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi Noah,

On 03/15/2011 07:05 PM, Noah Cutler wrote:
> Obviously per instance is a memory hungry solution, albeit highly
> convenient. Placing all sites in a single instance is a possibility as
> well (and the most resource "friendly"), but I would need to implement
> some form of load balancing for the mid-business-day client A emergency
> restart (since all sites would be affected by the restart). Of course, I
> should have load balancing for the per instance solution as well to
> ensure application uptime even on restart.

That could be done with a combination of Apache httpd and mod_jk (my
preffered way), mod_proxy_ajp or mod_proxy_http. For mod_jk there is a
very good documented, almost ready to start configuration in the source
download.

Regards,
- -- 
Thomas Freitag
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (GNU/Linux)

iEYEARECAAYFAk2ASbsACgkQGE5pHr3PKuXf3ACeL35NqbxT912UJmQcsLsRqeJz
8pQAn3sEYamqbBAceNpejbX0cJ/olWYR
=4lmj
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Tomcat 7 Per Instance Memory Footprint in Hello World App.

2011-03-15 Thread Noah Cutler
Chris, thanks for the excellent feedback; thus far this list exceeds
Stackoverflow by orders of magnitude ;--)

Re: ease of implementation, yes, a single instance with multiple virtual
hosts is the way to go (similar setup to apache virtual hosts).

However, some of the LAMP stack apps will have legacy/archived
functionality that I have zero interest/time in porting over to
JVM/Groovy framework. So, the plan is to mod_rewrite archived requests
to php, along with static files (css,jss,html,etc.), and use Tomcat to
serve up non-legacy dynamic content, connecting via AJP or mod_proxy.

Amazed that you have been able to tweak JVM memory usage down to as
little as 128mb, incredible.  The OOME issue is a real one given my lack
of experience in Java -- have @5 months Groovy under my belt and am
enjoying it far too much to return to php -- so "important" client sites
will have their own dedicated Tomcat instance; the rest, I'll virtual
host in a single instance.

Am interested in Tomcat 7's new DBCP model as well.  Coupled with Groovy
per request singleton (unlike per instance/application lifetime), I
should be able create a db connection handle on request start and
thereafter have all queries in the request run against this cached
connection (could also do a true singleton, the most efficient, but as I
understand, singletons are specific to the entire instance, and
therefore will not work for a virtual hosts setup).

Lots to learn clearly, but am loving the potential here, sky is the
limit performance-wise...
-- 
--Noah

Noah Cutler
Web/Mobile Applications
New Mind Development
ad...@newminddevelopment.com
http:://newminddevelopment.com


On Tue, 2011-03-15 at 16:26 -0400, Christopher Schultz wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
> 
> Noah,
> 
> On 3/15/2011 2:05 PM, Noah Cutler wrote:
> > Obviously per instance is a memory hungry solution, albeit highly
> > convenient. Placing all sites in a single instance is a possibility as
> > well (and the most resource "friendly"), but I would need to implement
> > some form of load balancing for the mid-business-day client A emergency
> > restart (since all sites would be affected by the restart). Of course, I
> > should have load balancing for the per instance solution as well to
> > ensure application uptime even on restart.
> 
> Something else to consider is that your configuration becomes more
> complicated when you decide to go to more than 1 JVM: you'll have to use
> a fronting web server to determine which backend JVM to contact.
> 
> If you have a single JVM, you can use it directly as your web server
> with no other moving parts.
> 
> - -chris
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.4.10 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
> 
> iEYEARECAAYFAk1/y2IACgkQ9CaO5/Lv0PD4MQCgkWFA858UtCfSUmR+vlmnKI1l
> kwAAniGvFqVvLI4jfTJKzPEqXfyh4y05
> =zT2G
> -END PGP SIGNATURE-
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
> 


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Tomcat 7 Per Instance Memory Footprint in Hello World App.

2011-03-15 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Noah,

On 3/15/2011 2:05 PM, Noah Cutler wrote:
> Obviously per instance is a memory hungry solution, albeit highly
> convenient. Placing all sites in a single instance is a possibility as
> well (and the most resource "friendly"), but I would need to implement
> some form of load balancing for the mid-business-day client A emergency
> restart (since all sites would be affected by the restart). Of course, I
> should have load balancing for the per instance solution as well to
> ensure application uptime even on restart.

Something else to consider is that your configuration becomes more
complicated when you decide to go to more than 1 JVM: you'll have to use
a fronting web server to determine which backend JVM to contact.

If you have a single JVM, you can use it directly as your web server
with no other moving parts.

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

iEYEARECAAYFAk1/y2IACgkQ9CaO5/Lv0PD4MQCgkWFA858UtCfSUmR+vlmnKI1l
kwAAniGvFqVvLI4jfTJKzPEqXfyh4y05
=zT2G
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Tomcat 7 Per Instance Memory Footprint in Hello World App.

2011-03-15 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Noah,

On 3/15/2011 3:27 AM, Noah Cutler wrote:
> So, given that a running 32-bit JVM on Linux will require at least 1GB
> RAM, total memory usage will not be JVM footprint * num instances, but
> rather, JVM footprint + num instances?

Not necessarily. We also run under 32-bit Linux (happens to be Tomcat
6.0.32 but it's not that different) and have JVMs that run under 128MiB
of RAM when configured in a certain way.

Obviously, your -Xmx settings have a lot to do with how much memory will
be used, as well as the number of threads that are managed by the JVM, etc.

> The use case is transferring 20 client sites from LAMP stack to JVM +
> Tomcat 7 + MySQL + a Groovy.lang web framework I developed.
> 
> Ideally I would separate client sites into tomcat instances, so as to
> isolate them from each other (i.e. redeploy/restart without affecting
> other instances), but that hinges entirely on the memory footprint.

Ideally, you should be able to deploy/redeploy individual webapps
without interfering with each other. If you have specific concerns, let
us know and we might be able to comment.

Running under a SecurityManager can certainly help protect webapps from
each other -- things like prohibiting System.exit, etc.

> I have 16GB RAM available but was only planning on allocating 4-6GB RAM
> for this project. Only a couple of the sites in question do significant
> load (read: have been running on LAMP stack with 2GB RAM for several
> years without issue)

We run each of our webapps in a separate JVM/Tomcat process to isolate
them from resource conflicts -- we don't want one app to OOME and bring
down the others, for instance.

If you have some webapps that are particularly memory heavy or you are
worried about, you can separate them and run the others together.
Certainly running everything together in a single VM will be more memory
efficient but they might interfere in various ways.

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

iEYEARECAAYFAk1/yWQACgkQ9CaO5/Lv0PBI0gCgq+wYJic2sWUoQsmM8aB9qHap
QL8AoLwI0cphsgZDRR+T5cr6pcpGxDfz
=L/Ot
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Tomcat 7 Per Instance Memory Footprint in Hello World App.

2011-03-15 Thread Noah Cutler
Thomas, perfect, hours of searching Stackoverflow et al resolved in a
single mailing list thread ;--)

I will play around with various configs (per instance and multi-host per
instance) in my local devel to get an idea of no-load resource usage;
then, as you say, give some % more to avoid OOMEs in production.

Obviously per instance is a memory hungry solution, albeit highly
convenient. Placing all sites in a single instance is a possibility as
well (and the most resource "friendly"), but I would need to implement
some form of load balancing for the mid-business-day client A emergency
restart (since all sites would be affected by the restart). Of course, I
should have load balancing for the per instance solution as well to
ensure application uptime even on restart.

Hope the next version of Java addresses some of the issues with memory
leaks beyond what Tomcat 7 is already doing.  As a n00b to java land,
this one issue invokes the most doubt, clearly java roots are not in the
web per request model (i.e. request completes and everything, but
session data flushed).

Thanks for clarifying matters, Thomas, really helps to have an idea of
what you are getting into prior to working on an implementation.
-- 
--Noah

Noah Cutler
Web/Mobile Applications
New Mind Development
ad...@newminddevelopment.com
http:://newminddevelopment.com


On Tue, 2011-03-15 at 10:09 +0100, Thomas Freitag wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
> 
> Hi Noah,
> 
> On 14.03.11 um 21:27, Noah Cutler wrote:
> > So, given that a running 32-bit JVM on Linux will require at least 1GB
> > RAM, total memory usage will not be JVM footprint * num instances, but
> > rather, JVM footprint + num instances?
> 
> Actually, the 1GB are virtual memory usage, not everything is
> allocated in the physical memory. I'd say it is roughly: num instances * (JVM
> not shareable + JVM heap&perm) + JVM shareable. JVM not shareable
> could be around 200-300MB. What heap sizes do you expect?
> 
> The figures I gave for Tomcat were taken directly after
> startup. Because Tomcat starts additional threads for the connector
> thread pools these could increase (maybe 50MB instead of 5MB), and
> request processing needs some memory.
>  
> > The use case is transferring 20 client sites from LAMP stack to JVM +
> > Tomcat 7 + MySQL + a Groovy.lang web framework I developed.
> > 
> > Ideally I would separate client sites into tomcat instances, so as to
> > isolate them from each other (i.e. redeploy/restart without affecting
> > other instances), but that hinges entirely on the memory footprint.
> 
> You have to include the memory footprint of your applications into the
> calculation. If you configure small heap sizes the risk of getting
> OutOfMemoryErrors increases. If you deploy more than one application
> in your tomcat instances, average usage of heap memory, threads and
> database connections could be better.
>  
> > I have 16GB RAM available but was only planning on allocating 4-6GB RAM
> > for this project. Only a couple of the sites in question do significant
> > load (read: have been running on LAMP stack with 2GB RAM for several
> > years without issue)
> 
> I'd try a mixed approach: Run some tomcat instances with more than one
> application. Some restarts can be avoided by using hot deployments.
> The MemoryLeakPreventionListener [1] helps to check if your applications
> trigger some known memory leaks. That may fit your needs. 
> 
> I'm afraid it is very hard (or impossible) to start with an optimal
> configuration. You will have to make an educated guess (usually
> configure more ressources than necessary), monitor the resource usage, 
> and adapt the configuration to your needs.
> 
> [1] http://tomcat.apache.org/tomcat-7.0-doc/config/listeners.html
> 
> Regards,
> - -- 
> Thomas Freitag
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.4.10 (GNU/Linux)
> 
> iEYEARECAAYFAk1/LNAACgkQGE5pHr3PKuVkTwCeJLZkrBKq9yVkEmenQUV+ItkO
> OcUAn3sznmYn/GTpbLospwQ30Kp7Ly/g
> =+pCj
> -END PGP SIGNATURE-
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
> 


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Tomcat 7 Per Instance Memory Footprint in Hello World App.

2011-03-15 Thread Thomas Freitag
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi Noah,

On 14.03.11 um 21:27, Noah Cutler wrote:
> So, given that a running 32-bit JVM on Linux will require at least 1GB
> RAM, total memory usage will not be JVM footprint * num instances, but
> rather, JVM footprint + num instances?

Actually, the 1GB are virtual memory usage, not everything is
allocated in the physical memory. I'd say it is roughly: num instances * (JVM
not shareable + JVM heap&perm) + JVM shareable. JVM not shareable
could be around 200-300MB. What heap sizes do you expect?

The figures I gave for Tomcat were taken directly after
startup. Because Tomcat starts additional threads for the connector
thread pools these could increase (maybe 50MB instead of 5MB), and
request processing needs some memory.
 
> The use case is transferring 20 client sites from LAMP stack to JVM +
> Tomcat 7 + MySQL + a Groovy.lang web framework I developed.
> 
> Ideally I would separate client sites into tomcat instances, so as to
> isolate them from each other (i.e. redeploy/restart without affecting
> other instances), but that hinges entirely on the memory footprint.

You have to include the memory footprint of your applications into the
calculation. If you configure small heap sizes the risk of getting
OutOfMemoryErrors increases. If you deploy more than one application
in your tomcat instances, average usage of heap memory, threads and
database connections could be better.
 
> I have 16GB RAM available but was only planning on allocating 4-6GB RAM
> for this project. Only a couple of the sites in question do significant
> load (read: have been running on LAMP stack with 2GB RAM for several
> years without issue)

I'd try a mixed approach: Run some tomcat instances with more than one
application. Some restarts can be avoided by using hot deployments.
The MemoryLeakPreventionListener [1] helps to check if your applications
trigger some known memory leaks. That may fit your needs. 

I'm afraid it is very hard (or impossible) to start with an optimal
configuration. You will have to make an educated guess (usually
configure more ressources than necessary), monitor the resource usage, 
and adapt the configuration to your needs.

[1] http://tomcat.apache.org/tomcat-7.0-doc/config/listeners.html

Regards,
- -- 
Thomas Freitag
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (GNU/Linux)

iEYEARECAAYFAk1/LNAACgkQGE5pHr3PKuVkTwCeJLZkrBKq9yVkEmenQUV+ItkO
OcUAn3sznmYn/GTpbLospwQ30Kp7Ly/g
=+pCj
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Tomcat 7 Per Instance Memory Footprint in Hello World App.

2011-03-15 Thread Noah Cutler
Thomas, excellent, informative.

So, given that a running 32-bit JVM on Linux will require at least 1GB
RAM, total memory usage will not be JVM footprint * num instances, but
rather, JVM footprint + num instances?

The use case is transferring 20 client sites from LAMP stack to JVM +
Tomcat 7 + MySQL + a Groovy.lang web framework I developed.

Ideally I would separate client sites into tomcat instances, so as to
isolate them from each other (i.e. redeploy/restart without affecting
other instances), but that hinges entirely on the memory footprint.

I have 16GB RAM available but was only planning on allocating 4-6GB RAM
for this project. Only a couple of the sites in question do significant
load (read: have been running on LAMP stack with 2GB RAM for several
years without issue)
-- 
--Noah

Noah Cutler
Web/Mobile Applications
New Mind Development
ad...@newminddevelopment.com
http:://newminddevelopment.com


On Tue, 2011-03-15 at 07:43 +0100, Thomas Freitag wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
> 
> Hi Noah,
> 
> On 03/15/2011 06:25 AM, Noah Cutler wrote:
> > can find nothing on the net re: this apparently basic question.
> > 
> > Given a simple hello world "app", what is the @memory footprint per
> > instance in Tomcat 7?
> > 
> > Just trying to assess options visa vi single instance + multiple virtual
> > hosts vs. multiple instance single host (preferred option as each client
> > app is isolated from the other).
> 
> There is a simple answer from the Java Heap point of view, a stock
> Apache Tomcat 7.0.11 (running in Oracle JVM 1.6.0_24) around 3.5MB in
> Heap, 11MB in Permanent Generation after startup (see garbage collection
> log):
> 
> Heap after GC invocations=5 (full 2):
>  PSYoungGen  total 18752K, used 0K [0x9ea5, 0x9ff3, 0xb38f)
>   eden space 16128K, 0% used [0x9ea5,0x9ea5,0x9fa1)
>   from space 2624K, 0% used [0x9fa1,0x9fa1,0x9fca)
>   to   space 2624K, 0% used [0x9fca,0x9fca,0x9ff3)
>  PSOldGentotal 42880K, used 3417K [0x74cf, 0x776d,
> 0x9ea5)
>   object space 42880K, 7% used [0x74cf,0x75046520,0x776d)
>  PSPermGen   total 18176K, used 10916K [0x70cf, 0x71eb,
> 0x74cf)
>   object space 18176K, 60% used [0x70cf,0x71799068,0x71eb)
> 
> - From the system (32bit Linux in my test case) point of view, my test
> with pmap gave me a total of 1191428K (~ 1.1GB). This includes shared
> libraries, Heap, Perm, code cache and other native memory (stacks,
> buffers etc), thus some of this can be used by other JVM instances...
> 
> To cut it short: Tomcats memory footprint is very small, that shouldn't
> be a problem for you. The JVM memory footprint depends on JVM version,
> operating system and might be a problem if you run many JVM instances.
> Test it in your system...
> 
> Regards,
> - -- 
> Thomas Freitag
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.4.10 (GNU/Linux)
> 
> iEYEARECAAYFAk1/CqkACgkQGE5pHr3PKuWldQCfag8Uy0K445QX6uMhyJLjRtzL
> Et8AnjSva8LzilB3gp7Zobc1TdRr0J/S
> =/Zul
> -END PGP SIGNATURE-
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
> 


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Tomcat 7 Per Instance Memory Footprint in Hello World App.

2011-03-14 Thread Thomas Freitag
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi Noah,

On 03/15/2011 06:25 AM, Noah Cutler wrote:
> can find nothing on the net re: this apparently basic question.
> 
> Given a simple hello world "app", what is the @memory footprint per
> instance in Tomcat 7?
> 
> Just trying to assess options visa vi single instance + multiple virtual
> hosts vs. multiple instance single host (preferred option as each client
> app is isolated from the other).

There is a simple answer from the Java Heap point of view, a stock
Apache Tomcat 7.0.11 (running in Oracle JVM 1.6.0_24) around 3.5MB in
Heap, 11MB in Permanent Generation after startup (see garbage collection
log):

Heap after GC invocations=5 (full 2):
 PSYoungGen  total 18752K, used 0K [0x9ea5, 0x9ff3, 0xb38f)
  eden space 16128K, 0% used [0x9ea5,0x9ea5,0x9fa1)
  from space 2624K, 0% used [0x9fa1,0x9fa1,0x9fca)
  to   space 2624K, 0% used [0x9fca,0x9fca,0x9ff3)
 PSOldGentotal 42880K, used 3417K [0x74cf, 0x776d,
0x9ea5)
  object space 42880K, 7% used [0x74cf,0x75046520,0x776d)
 PSPermGen   total 18176K, used 10916K [0x70cf, 0x71eb,
0x74cf)
  object space 18176K, 60% used [0x70cf,0x71799068,0x71eb)

- From the system (32bit Linux in my test case) point of view, my test
with pmap gave me a total of 1191428K (~ 1.1GB). This includes shared
libraries, Heap, Perm, code cache and other native memory (stacks,
buffers etc), thus some of this can be used by other JVM instances...

To cut it short: Tomcats memory footprint is very small, that shouldn't
be a problem for you. The JVM memory footprint depends on JVM version,
operating system and might be a problem if you run many JVM instances.
Test it in your system...

Regards,
- -- 
Thomas Freitag
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (GNU/Linux)

iEYEARECAAYFAk1/CqkACgkQGE5pHr3PKuWldQCfag8Uy0K445QX6uMhyJLjRtzL
Et8AnjSva8LzilB3gp7Zobc1TdRr0J/S
=/Zul
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Tomcat 7 Per Instance Memory Footprint in Hello World App.

2011-03-14 Thread Noah Cutler
Hi,

can find nothing on the net re: this apparently basic question.

Given a simple hello world "app", what is the @memory footprint per
instance in Tomcat 7?

Just trying to assess options visa vi single instance + multiple virtual
hosts vs. multiple instance single host (preferred option as each client
app is isolated from the other).

TIA and looking forward to using Tomcat 7!





-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Hello and Tomcat issues with sticky sessions

2010-06-30 Thread Rainer Jung

On 30.06.2010 16:18, János Löbb wrote:

workers.properties
---
ps=/

worker.list=pub-app01, pub-app02, pub-app03, pub-app04, pub-app05, pub-lb

worker.pub-app01.type=ajp13
worker.pub-app01.host=app01
worker.pub-app01.port=8009
worker.pub-app01.socket_keepalive=1

worker.pub-app02.type=ajp13
worker.pub-app02.host=app02
worker.pub-app02.port=8009
worker.pub-app02.socket_keepalive=1

worker.pub-app03.type=ajp13
worker.pub-app03.host=app03
worker.pub-app03.port=8009
worker.pub-app03.socket_keepalive=1

worker.pub-app04.type=ajp13
worker.pub-app04.host=app04
worker.pub-app04.port=8009
worker.pub-app04.socket_keepalive=1

worker.pub-app05.type=ajp13
worker.pub-app05.host=app05
worker.pub-app05.port=8009
worker.pub-app05.socket_keepalive=1

worker.ajp13.lbfactor=1

worker.pub-lb.type=lb
worker.pub-lb.balance_workers=pub-app01,pub-app02,pub-app03,pub-app04,pub-app05
worker.pub-lb.sticky_session=1



- I think this is what worker.list should look like:

worker.list=pub-lb


Aaaah, right. The above won't work, the lb worker needs to be in the 
list, not the members of the lb. with recent versions of mod_jk you 
would find a message in the log, that the worker "pub-lb" used in your 
JkMount isn't known to mod_jk (because it is missing in the list attribute).



- You might also need for every balance_worker the
worker.pub-app0x.redirect=machine_name_where_the_session_from_this_machine_should_be_redirected


You can use it if you have a very special idea, which node should fail 
over to which other node, but you can omit it and the balancer will 
choose one on a per request basis, if there is a problem with a node.



- For the load balance worker you might need something like:
worker.pub-lb.sticky_session_force=False
worker.pub-lb.sticky_session=True


Those are both defaults.

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Hello and Tomcat issues with sticky sessions

2010-06-30 Thread János Löbb
> workers.properties
> ---
> ps=/
> 
> worker.list=pub-app01, pub-app02, pub-app03, pub-app04, pub-app05, pub-lb
> 
> worker.pub-app01.type=ajp13
> worker.pub-app01.host=app01
> worker.pub-app01.port=8009
> worker.pub-app01.socket_keepalive=1
> 
> worker.pub-app02.type=ajp13
> worker.pub-app02.host=app02
> worker.pub-app02.port=8009
> worker.pub-app02.socket_keepalive=1
> 
> worker.pub-app03.type=ajp13
> worker.pub-app03.host=app03
> worker.pub-app03.port=8009
> worker.pub-app03.socket_keepalive=1
> 
> worker.pub-app04.type=ajp13
> worker.pub-app04.host=app04
> worker.pub-app04.port=8009
> worker.pub-app04.socket_keepalive=1
> 
> worker.pub-app05.type=ajp13
> worker.pub-app05.host=app05
> worker.pub-app05.port=8009
> worker.pub-app05.socket_keepalive=1
> 
> worker.ajp13.lbfactor=1
> 
> worker.pub-lb.type=lb
> worker.pub-lb.balance_workers=pub-app01,pub-app02,pub-app03,pub-app04,pub-app05
> worker.pub-lb.sticky_session=1
> 

- I think this is what worker.list should look like:

worker.list=pub-lb

- You might also need for every balance_worker the 
worker.pub-app0x.redirect=machine_name_where_the_session_from_this_machine_should_be_redirected

- For the load balance worker you might need something like:
worker.pub-lb.sticky_session_force=False
worker.pub-lb.sticky_session=True

I am getting these from my 6.0.18 config, so they might be outdated.

János


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Hello and Tomcat issues with sticky sessions

2010-06-30 Thread Gabriel Tabares



I now have made the change and it seems to be working (fingers crossed).
I have a couple of people testing it out, so fingers crossed!

OK, it now works correctly. The only issue I have is that Apache is now 
adding .number to the end of each request.


If I go to myapp/forum, the first time I get myapp/forum.1, the next 
time is myapp/forum.2, etc.


Any hints about this?


It's weird because I've used mod_jk a lot and never had any domain
specified.


You won't need a domain setting for stickyness to work. There was 
something else wrong with your setup.


Since your configuration looked OK, mod_jk should have logged any 
problems when doing stickyness in its log file.


I will look into it when I get more time after we launch the product. I 
will then have time to investigate why.


Regards,

Gabriel


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Hello and Tomcat issues with sticky sessions

2010-06-30 Thread Rainer Jung

On 30.06.2010 13:10, Gabriel Tabares wrote:

have you also set de directive in de workers.properties I suggested?



in your case that should look like

worker.pub-app01.domain=pub-app01
etc



My apologies, I am doing 10 things at the time and missed that bit.

I now have made the change and it seems to be working (fingers crossed).
I have a couple of people testing it out, so fingers crossed!

It's weird because I've used mod_jk a lot and never had any domain
specified.


You won't need a domain setting for stickyness to work. There was 
something else wrong with your setup.


Since your configuration looked OK, mod_jk should have logged any 
problems when doing stickyness in its log file.


Regards,

Rainer

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Hello and Tomcat issues with sticky sessions

2010-06-30 Thread Gabriel Tabares

I'm not sure if this is what you are looking for but I just checked how

our stuff is set up here and wondered if you have the jvm route mapped
in the server xml for the tomcat instances you want loadbalanced?



Paul

 
   

Tomcats:

All of them have a jvmRoute of pub-app0X, where X goes from 1 to 5.

mod_proxy

proxy.conf
---

 
   

 ProxyPass balancer://public_web_cluster/
stickysession=JSESSIONID lbmethod=byrequests
 ProxyPassReverse balancer://public_web_cluster/



mod_ajp_proxy
===

mod_proxy_ajp.conf
--
 
   

 ProxyPass balancer://pubLB/ stickysession=JSESSIONID nofailover=on
 ProxyPassReverse balancer://pubLB/



 


This isn't likely to be the core problem, but it's worth bearing in
mind.  If you're using mod_proxy you need to put:

  stickysession=JSESSIONID|jsessionid

   
I have tried both ways and I still get no stickyness. I was trying to 
simplify it in order to check minimise the possibility of errors.



to ensure you're capturing both the URL encoded and cookie based session
ids.  Unfortunately, because RHEL/Centos insist on deploying HTTPD with
the version number set when they released the OS, it's virtually
impossible to tell whether your HTTP is actually 2.2.3, or 2.2.3 +
important fixes, additions etc from 2.2.(n>  3).

mod_proxy_ajp was first released in 2.2.3 for example, and many
improvements occurred in later releases.

   


The CentOS version is 2.2.3 + a million patches. The only way to find 
out what they have changed is to go through the changelogs.


It makes things more stable from an API point of view but it surely 
makes hard not only finding out where the issue lies, but also if 
upgrading version will fix it.


Thanks

Gabriel

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Hello and Tomcat issues with sticky sessions

2010-06-30 Thread Gabriel Tabares

have you also set de directive in de workers.properties I suggested?



in your case that should look like

worker.pub-app01.domain=pub-app01
etc



My apologies, I am doing 10 things at the time and missed that bit.

I now have made the change and it seems to be working (fingers crossed). 
I have a couple of people testing it out, so fingers crossed!


It's weird because I've used mod_jk a lot and never had any domain 
specified.


Thanks for your help.

Gabriel



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Hello and Tomcat issues with sticky sessions

2010-06-30 Thread Pid
On 30/06/2010 11:33, M.H.G. Emmerig wrote:
> you beat me to it I think
> 
> regards
> 
> Milko Emmerig

> I'm not sure if this is what you are looking for but I just checked how
> our stuff is set up here and wondered if you have the jvm route mapped
> in the server xml for the tomcat instances you want loadbalanced?
> 
> 
> 
> Paul
> 

> Tomcats:
> 
> All of them have a jvmRoute of pub-app0X, where X goes from 1 to 5.
> 
> mod_proxy
> 
> proxy.conf
> ---
> 

> 
> ProxyPass balancer://public_web_cluster/
> stickysession=JSESSIONID lbmethod=byrequests
> ProxyPassReverse balancer://public_web_cluster/
> 
> 
> 
> mod_ajp_proxy
> ===
> 
> mod_proxy_ajp.conf
> --

> ProxyPass balancer://pubLB/ stickysession=JSESSIONID nofailover=on
> ProxyPassReverse balancer://pubLB/
> 
> 
> 


This isn't likely to be the core problem, but it's worth bearing in
mind.  If you're using mod_proxy you need to put:

 stickysession=JSESSIONID|jsessionid

to ensure you're capturing both the URL encoded and cookie based session
ids.  Unfortunately, because RHEL/Centos insist on deploying HTTPD with
the version number set when they released the OS, it's virtually
impossible to tell whether your HTTP is actually 2.2.3, or 2.2.3 +
important fixes, additions etc from 2.2.(n > 3).

mod_proxy_ajp was first released in 2.2.3 for example, and many
improvements occurred in later releases.


p



signature.asc
Description: OpenPGP digital signature


Re: Hello and Tomcat issues with sticky sessions

2010-06-30 Thread M.H.G. Emmerig

Gabriel

have you also set de directive in de workers.properties I suggested?

in your case that should look like

worker.pub-app01.domain=pub-app01
etc

Milko



   
 Gabriel Tabares   
   To
   users@tomcat.apache.org 
 30-06-2010 12:41   cc
   
   Subject
 Please respond to Re: Hello and Tomcat issues with
   "Tomcat Users   sticky sessions 
   List"   
   
   
   
   




I'm not sure if this is what you are looking for but I just checked how
our stuff is set up here and wondered if you have the jvm route mapped
in the server xml for the tomcat instances you want loadbalanced?
> 
>
> Paul
>
>

Sorry if it wasn't clear on my original message, they already have the
jvmRoute set:


for the first, server

for the second, etc.


>
> -Original Message-
> From: Gabriel Tabares [mailto:gabriel.taba...@roboreus.com]
> Sent: 30 June 2010 11:17
> To: users@tomcat.apache.org
> Subject: Hello and Tomcat issues with sticky sessions
>
> Hi everybody,
>
> I have been running Tomcat on production for a few years with no problem
> but now, after moving to a new company, I am completely unable to get
> session stickyness working.
>
> The setup is as follows:
>
> Apache 2.2.3 (CentOS 5.4 version) ->  Tomcat 6.0.24.
>
> I have tried all of mod_proxy, mod_ajp_proxy and mod_jk but, no matter
> what I do, I can not get Apache to always send the requests to the
> Tomcat specified in the jsession.
>
> Firebug indicates that the JSESSIONID cookie is being set as it should
> but it still sees requests going to the other server. I have also tried
> changing the jvmRoute to exactly match the worker name for mod_jk but it
> still doesn't work.
>
> I would appreciate any help, as I am stuck.
>
> Here are the configurations I have tried. Obviously, only of them is
> active at any given time. httpd.conf is the standard one from the CentOS
> RPM.
>
> Tomcats:
>
> All of them have a jvmRoute of pub-app0X, where X goes from 1 to 5.
>
> mod_proxy
> 
> proxy.conf
> ---
>
> LoadModule proxy_module modules/mod_proxy.so
> LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
> LoadModule proxy_http_module modules/mod_proxy_http.so
>
> ProxyRequests Off
>
> 
>   Order deny,allow
>   Allow from all
>
>   BalancerMember http://app01:8080 route=pub-app01
>   BalancerMember http://app02:8080 route=pub-app02
>   BalancerMember http://app03:8080 route=pub-app03
>   BalancerMember http://app04:8080 route=pub-app04
>   BalancerMember http://app05:8080 route=pub-app05
> 
>
> virtual.conf
> 
> LogLevel Debug
>
> 
>   DocumentRoot /var/www/html
>   ServerName www.myserver.com
>   ServerAlias myserver.com
>
>   RewriteEngine On
>   RewriteRule ^/$ /appname/ [R]
>   RewriteRule ^$ /appname/ [R]
>
> 
>   AuthType Basic
>   AuthName "Please enter your details"
>   AuthUserFile /etc/httpd/conf.d/htpasswd
>   Require valid-user
>
>   ProxyPass balancer://public_web_cluster/
> stickysession=JSESSIONID lbmethod=byrequests
>   ProxyPassReverse balancer://public_web_cluster/
> 
> 
>
> mod_ajp_proxy
> ===
>
> mod_proxy_ajp.conf
> --
>
> LoadModule proxy_ajp_module modules/mod_proxy_ajp.so
>
> 
> BalancerMember ajp://app01:8009/ timeout=5 route=pub-app01
> BalancerMember ajp://app02:8009/ timeout=5 route=pub-app02
> BalancerMember ajp://app03:8009/ timeout=5 route=pub-app03
> BalancerMember ajp://app04:8009/ timeout=5 route=pub-app04
> BalancerMember ajp://app05:8009/ timeout=5 route=pub-app05
> 
>
> virtual.conf
> ---
> ProxyRequests Off
> 
>   DocumentRoot /var/www/html
>   ServerName www.myserver.com
>   ServerAlias myserver.com
>
>   RewriteEngine On
>   RewriteRule ^$ /myapp [R]
>   Rewri

Re: Hello and Tomcat issues with sticky sessions

2010-06-30 Thread Gabriel Tabares
I'm not sure if this is what you are looking for but I just checked how 
our stuff is set up here and wondered if you have the jvm route mapped 
in the server xml for the tomcat instances you want loadbalanced?



Paul

   


Sorry if it wasn't clear on my original message, they already have the 
jvmRoute set:


 
for the first, server
  
for the second, etc.





-Original Message-
From: Gabriel Tabares [mailto:gabriel.taba...@roboreus.com]
Sent: 30 June 2010 11:17
To: users@tomcat.apache.org
Subject: Hello and Tomcat issues with sticky sessions

Hi everybody,

I have been running Tomcat on production for a few years with no problem
but now, after moving to a new company, I am completely unable to get
session stickyness working.

The setup is as follows:

Apache 2.2.3 (CentOS 5.4 version) ->  Tomcat 6.0.24.

I have tried all of mod_proxy, mod_ajp_proxy and mod_jk but, no matter
what I do, I can not get Apache to always send the requests to the
Tomcat specified in the jsession.

Firebug indicates that the JSESSIONID cookie is being set as it should
but it still sees requests going to the other server. I have also tried
changing the jvmRoute to exactly match the worker name for mod_jk but it
still doesn't work.

I would appreciate any help, as I am stuck.

Here are the configurations I have tried. Obviously, only of them is
active at any given time. httpd.conf is the standard one from the CentOS
RPM.

Tomcats:

All of them have a jvmRoute of pub-app0X, where X goes from 1 to 5.

mod_proxy

proxy.conf
---

LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
LoadModule proxy_http_module modules/mod_proxy_http.so

ProxyRequests Off


  Order deny,allow
  Allow from all

  BalancerMember http://app01:8080 route=pub-app01
  BalancerMember http://app02:8080 route=pub-app02
  BalancerMember http://app03:8080 route=pub-app03
  BalancerMember http://app04:8080 route=pub-app04
  BalancerMember http://app05:8080 route=pub-app05


virtual.conf

LogLevel Debug


  DocumentRoot /var/www/html
  ServerName www.myserver.com
  ServerAlias myserver.com

  RewriteEngine On
  RewriteRule ^/$ /appname/ [R]
  RewriteRule ^$ /appname/ [R]


  AuthType Basic
  AuthName "Please enter your details"
  AuthUserFile /etc/httpd/conf.d/htpasswd
  Require valid-user

  ProxyPass balancer://public_web_cluster/
stickysession=JSESSIONID lbmethod=byrequests
  ProxyPassReverse balancer://public_web_cluster/



mod_ajp_proxy
===

mod_proxy_ajp.conf
--

LoadModule proxy_ajp_module modules/mod_proxy_ajp.so


BalancerMember ajp://app01:8009/ timeout=5 route=pub-app01
BalancerMember ajp://app02:8009/ timeout=5 route=pub-app02
BalancerMember ajp://app03:8009/ timeout=5 route=pub-app03
BalancerMember ajp://app04:8009/ timeout=5 route=pub-app04
BalancerMember ajp://app05:8009/ timeout=5 route=pub-app05


virtual.conf
---
ProxyRequests Off

  DocumentRoot /var/www/html
  ServerName www.myserver.com
  ServerAlias myserver.com

  RewriteEngine On
  RewriteRule ^$ /myapp [R]
  RewriteRule ^/$ /myapp [R]


  AuthType Basic
  AuthName "Please enter your details"
  AuthUserFile /etc/httpd/conf.d/htpasswd
  Require valid-user

  ProxyPass balancer://pubLB/ stickysession=JSESSIONID nofailover=on
  ProxyPassReverse balancer://pubLB/



mod_jk
=

mod_jk.conf
-
LoadModule jk_module modules/mod_jk.so

JkWorkersFile /etc/httpd/conf.d/workers.properties
JkLogFile /var/log/httpd/mod_jk.log
JkLogLeveldebug
JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "

workers.properties
---
ps=/

worker.list=pub-app01, pub-app02, pub-app03, pub-app04, pub-app05, pub-lb

worker.pub-app01.type=ajp13
worker.pub-app01.host=app01
worker.pub-app01.port=8009
worker.pub-app01.socket_keepalive=1

worker.pub-app02.type=ajp13
worker.pub-app02.host=app02
worker.pub-app02.port=8009
worker.pub-app02.socket_keepalive=1

worker.pub-app03.type=ajp13
worker.pub-app03.host=app03
worker.pub-app03.port=8009
worker.pub-app03.socket_keepalive=1

worker.pub-app04.type=ajp13
worker.pub-app04.host=app04
worker.pub-app04.port=8009
worker.pub-app04.socket_keepalive=1

worker.pub-app05.type=ajp13
worker.pub-app05.host=app05
worker.pub-app05.port=8009
worker.pub-app05.socket_keepalive=1

worker.ajp13.lbfactor=1

worker.pub-lb.type=lb
worker.pub-lb.balance_workers=pub-app01,pub-app02,pub-app03,pub-app04,pub-app05
worker.pub-lb.sticky_session=1

virtual.conf
---


  DocumentRoot /var/www/html
  ServerName www.myserver.com

 JkMount /myapp/* pub-lb


  AuthType Basic
  AuthName "Please enter your details"
  AuthUserFile /etc/httpd/conf.d/htpasswd
  Req

RE: Hello and Tomcat issues with sticky sessions

2010-06-30 Thread Ockleford Paul (NHS Connecting for Health)
Yes sorry! Slow morning here today.. :)

From: M.H.G. Emmerig [mailto:m.h.g.emme...@dnb.nl]
Sent: 30 June 2010 11:33
To: Tomcat Users List
Subject: RE: Hello and Tomcat issues with sticky sessions


you beat me to it I think

regards

Milko Emmerig

"Ockleford Paul (NHS Connecting for Health)" 

30-06-2010 12:31
Please respond to
"Tomcat Users List" 



To


Tomcat Users List 


cc




Subject


RE: Hello and Tomcat issues with sticky sessions








I'm not sure if this is what you are looking for but I just checked how our 
stuff is set up here and wondered if you have the jvm route mapped in the 
server xml for the tomcat instances you want loadbalanced?



Paul



-Original Message-
From: Gabriel Tabares [mailto:gabriel.taba...@roboreus.com]
Sent: 30 June 2010 11:17
To: users@tomcat.apache.org
Subject: Hello and Tomcat issues with sticky sessions

Hi everybody,

I have been running Tomcat on production for a few years with no problem
but now, after moving to a new company, I am completely unable to get
session stickyness working.

The setup is as follows:

Apache 2.2.3 (CentOS 5.4 version) -> Tomcat 6.0.24.

I have tried all of mod_proxy, mod_ajp_proxy and mod_jk but, no matter
what I do, I can not get Apache to always send the requests to the
Tomcat specified in the jsession.

Firebug indicates that the JSESSIONID cookie is being set as it should
but it still sees requests going to the other server. I have also tried
changing the jvmRoute to exactly match the worker name for mod_jk but it
still doesn't work.

I would appreciate any help, as I am stuck.

Here are the configurations I have tried. Obviously, only of them is
active at any given time. httpd.conf is the standard one from the CentOS
RPM.

Tomcats:

All of them have a jvmRoute of pub-app0X, where X goes from 1 to 5.

mod_proxy

proxy.conf
---

LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
LoadModule proxy_http_module modules/mod_proxy_http.so

ProxyRequests Off


Order deny,allow
Allow from all

BalancerMember http://app01:8080 route=pub-app01
BalancerMember http://app02:8080 route=pub-app02
BalancerMember http://app03:8080 route=pub-app03
BalancerMember http://app04:8080 route=pub-app04
BalancerMember http://app05:8080 route=pub-app05


virtual.conf

LogLevel Debug


DocumentRoot /var/www/html
ServerName www.myserver.com
ServerAlias myserver.com

RewriteEngine On
RewriteRule ^/$ /appname/ [R]
RewriteRule ^$ /appname/ [R]


AuthType Basic
AuthName "Please enter your details"
AuthUserFile /etc/httpd/conf.d/htpasswd
Require valid-user

ProxyPass balancer://public_web_cluster/
stickysession=JSESSIONID lbmethod=byrequests
ProxyPassReverse balancer://public_web_cluster/



mod_ajp_proxy
===

mod_proxy_ajp.conf
--

LoadModule proxy_ajp_module modules/mod_proxy_ajp.so


BalancerMember ajp://app01:8009/ timeout=5 route=pub-app01
BalancerMember ajp://app02:8009/ timeout=5 route=pub-app02
BalancerMember ajp://app03:8009/ timeout=5 route=pub-app03
BalancerMember ajp://app04:8009/ timeout=5 route=pub-app04
BalancerMember ajp://app05:8009/ timeout=5 route=pub-app05


virtual.conf
---
ProxyRequests Off

DocumentRoot /var/www/html
ServerName www.myserver.com
ServerAlias myserver.com

RewriteEngine On
RewriteRule ^$ /myapp [R]
RewriteRule ^/$ /myapp [R]


AuthType Basic
AuthName "Please enter your details"
AuthUserFile /etc/httpd/conf.d/htpasswd
Require valid-user

ProxyPass balancer://pubLB/ stickysession=JSESSIONID nofailover=on
ProxyPassReverse balancer://pubLB/



mod_jk
=

mod_jk.conf
-
LoadModule jk_module modules/mod_jk.so

JkWorkersFile /etc/httpd/conf.d/workers.properties
JkLogFile /var/log/httpd/mod_jk.log
JkLogLeveldebug
JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "

workers.properties
---
ps=/

worker.list=pub-app01, pub-app02, pub-app03, pub-app04, pub-app05, pub-lb

worker.pub-app01.type=ajp13
worker.pub-app01.host=app01
worker.pub-app01.port=8009
worker.pub-app01.socket_keepalive=1

worker.pub-app02.type=ajp13
worker.pub-app02.host=app02
worker.pub-app02.port=8009
worker.pub-app02.socket_keepalive=1

worker.pub-app03.type=ajp13
worker.pub-app03.host=app03
worker.pub-app03.port=8009
worker.pub-app03.socket_keepalive=1

worker.pub-app04.type=ajp13
worker.pub-app04.host=app04
worker.pub-app04.port=8009
worker.pub-app04.socket_keepalive=1

worker.pub-app05.type=ajp13
worker.pub-app05.host=app05
worker.pub-app05.port=8009
worker.pub-app05.socket_keepalive=1

worker.ajp13.lbfactor=1

worker.pub-lb.type=lb
worker.pub-lb.balance_workers=pub-app01,pub-app02,pub-app03,pub-app04,pub-app05
worker.pub-lb.sticky_session=1

virtual.c

RE: Hello and Tomcat issues with sticky sessions

2010-06-30 Thread M.H.G. Emmerig

you beat me to it I think

regards

Milko Emmerig

   
 "Ockleford Paul   
 (NHS Connecting   
 for Health)"   To
   
cc
 30-06-2010 12:31  
   Subject
   RE: Hello and Tomcat issues with
 Please respond to sticky sessions 
   "Tomcat Users   
   List"   
   
   
   




I'm not sure if this is what you are looking for but I just checked how our
stuff is set up here and wondered if you have the jvm route mapped in the
server xml for the tomcat instances you want loadbalanced?



Paul



-Original Message-
From: Gabriel Tabares [mailto:gabriel.taba...@roboreus.com]
Sent: 30 June 2010 11:17
To: users@tomcat.apache.org
Subject: Hello and Tomcat issues with sticky sessions

Hi everybody,

I have been running Tomcat on production for a few years with no problem
but now, after moving to a new company, I am completely unable to get
session stickyness working.

The setup is as follows:

Apache 2.2.3 (CentOS 5.4 version) -> Tomcat 6.0.24.

I have tried all of mod_proxy, mod_ajp_proxy and mod_jk but, no matter
what I do, I can not get Apache to always send the requests to the
Tomcat specified in the jsession.

Firebug indicates that the JSESSIONID cookie is being set as it should
but it still sees requests going to the other server. I have also tried
changing the jvmRoute to exactly match the worker name for mod_jk but it
still doesn't work.

I would appreciate any help, as I am stuck.

Here are the configurations I have tried. Obviously, only of them is
active at any given time. httpd.conf is the standard one from the CentOS
RPM.

Tomcats:

All of them have a jvmRoute of pub-app0X, where X goes from 1 to 5.

mod_proxy

proxy.conf
---

LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
LoadModule proxy_http_module modules/mod_proxy_http.so

ProxyRequests Off


 Order deny,allow
 Allow from all

 BalancerMember http://app01:8080 route=pub-app01
 BalancerMember http://app02:8080 route=pub-app02
 BalancerMember http://app03:8080 route=pub-app03
 BalancerMember http://app04:8080 route=pub-app04
 BalancerMember http://app05:8080 route=pub-app05


virtual.conf

LogLevel Debug


 DocumentRoot /var/www/html
 ServerName www.myserver.com
 ServerAlias myserver.com

 RewriteEngine On
 RewriteRule ^/$ /appname/ [R]
 RewriteRule ^$ /appname/ [R]


 AuthType Basic
 AuthName "Please enter your details"
 AuthUserFile /etc/httpd/conf.d/htpasswd
 Require valid-user

 ProxyPass balancer://public_web_cluster/
stickysession=JSESSIONID lbmethod=byrequests
 ProxyPassReverse balancer://public_web_cluster/



mod_ajp_proxy
===

mod_proxy_ajp.conf
--

LoadModule proxy_ajp_module modules/mod_proxy_ajp.so


BalancerMember ajp://app01:8009/ timeout=5 route=pub-app01
BalancerMember ajp://app02:8009/ timeout=5 route=pub-app02
BalancerMember ajp://app03:8009/ timeout=5 route=pub-app03
BalancerMember ajp://app04:8009/ timeout=5 route=pub-app04
BalancerMember ajp://app05:8009/ timeout=5 route=pub-app05


virtual.conf
---
ProxyRequests Off

 DocumentRoot /var/www/html
 ServerName www.myserver.com
 ServerAlias myserver.com

 RewriteEngine On
 RewriteRule ^$ /myapp [R]
 RewriteRule ^/$ /myapp [R]


 AuthType Basic
 AuthName "Please enter your details"
 AuthUserFile /etc/httpd/conf.d/htpasswd
 Require valid-user

 ProxyPass balancer://pubLB/ stickysession=JSESSIONID nofailover=on
 ProxyPassReverse balancer://pubLB/



mod_jk
=

mod_jk.conf
-
LoadModule jk_module modules/mod_jk.so

JkWorkersFile /etc/httpd/conf.d/workers.properties
JkLogFile /var/log/httpd/mod_jk.log
JkLogLeveldebug
JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "

workers.properties
---
ps=/

worker.list=pub-app01, pub-app02, pub-app03, pub-app04, pub-app05, pub-lb

worker.pub-app01.type=ajp13
worker.pub-app01.host=app01
worker.pub-app01.port=8009
worker.pub-a

Re: Hello and Tomcat issues with sticky sessions

2010-06-30 Thread M.H.G. Emmerig

Hello gabriel

I think you should have the following in your configuration:

in de workers definition something like

worker.pub-app01.domain=pub-app01-jvm


and in your tomcat server.xml






regards

Milko Emmerig

   
 Gabriel Tabares   
   To
   users@tomcat.apache.org 
 30-06-2010 12:16   cc
   
   Subject
 Please respond to Hello and Tomcat issues with sticky
   "Tomcat Users   sessions
   List"   
   
   
   
   




Hi everybody,

I have been running Tomcat on production for a few years with no problem
but now, after moving to a new company, I am completely unable to get
session stickyness working.

The setup is as follows:

Apache 2.2.3 (CentOS 5.4 version) -> Tomcat 6.0.24.

I have tried all of mod_proxy, mod_ajp_proxy and mod_jk but, no matter
what I do, I can not get Apache to always send the requests to the
Tomcat specified in the jsession.

Firebug indicates that the JSESSIONID cookie is being set as it should
but it still sees requests going to the other server. I have also tried
changing the jvmRoute to exactly match the worker name for mod_jk but it
still doesn't work.

I would appreciate any help, as I am stuck.

Here are the configurations I have tried. Obviously, only of them is
active at any given time. httpd.conf is the standard one from the CentOS
RPM.

Tomcats:

All of them have a jvmRoute of pub-app0X, where X goes from 1 to 5.

mod_proxy

proxy.conf
---

LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
LoadModule proxy_http_module modules/mod_proxy_http.so

ProxyRequests Off


 Order deny,allow
 Allow from all

 BalancerMember http://app01:8080 route=pub-app01
 BalancerMember http://app02:8080 route=pub-app02
 BalancerMember http://app03:8080 route=pub-app03
 BalancerMember http://app04:8080 route=pub-app04
 BalancerMember http://app05:8080 route=pub-app05


virtual.conf

LogLevel Debug


 DocumentRoot /var/www/html
 ServerName www.myserver.com
 ServerAlias myserver.com

 RewriteEngine On
 RewriteRule ^/$ /appname/ [R]
 RewriteRule ^$ /appname/ [R]


 AuthType Basic
 AuthName "Please enter your details"
 AuthUserFile /etc/httpd/conf.d/htpasswd
 Require valid-user

 ProxyPass balancer://public_web_cluster/
stickysession=JSESSIONID lbmethod=byrequests
 ProxyPassReverse balancer://public_web_cluster/



mod_ajp_proxy
===

mod_proxy_ajp.conf
--

LoadModule proxy_ajp_module modules/mod_proxy_ajp.so


BalancerMember ajp://app01:8009/ timeout=5 route=pub-app01
BalancerMember ajp://app02:8009/ timeout=5 route=pub-app02
BalancerMember ajp://app03:8009/ timeout=5 route=pub-app03
BalancerMember ajp://app04:8009/ timeout=5 route=pub-app04
BalancerMember ajp://app05:8009/ timeout=5 route=pub-app05


virtual.conf
---
ProxyRequests Off

 DocumentRoot /var/www/html
 ServerName www.myserver.com
 ServerAlias myserver.com

 RewriteEngine On
 RewriteRule ^$ /myapp [R]
 RewriteRule ^/$ /myapp [R]


 AuthType Basic
 AuthName "Please enter your details"
 AuthUserFile /etc/httpd/conf.d/htpasswd
 Require valid-user

 ProxyPass balancer://pubLB/ stickysession=JSESSIONID nofailover=on
 ProxyPassReverse balancer://pubLB/



mod_jk
=

mod_jk.conf
-
LoadModule jk_module modules/mod_jk.so

JkWorkersFile /etc/httpd/conf.d/workers.properties
JkLogFile /var/log/httpd/mod_jk.log
JkLogLeveldebug
JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "

workers.properties
---
ps=/

worker.list=pub-app01, pub-app02, pub-app03, pub-app04, pub-app05, pub-lb

worker.pub-app01.type=ajp13
worker.pub-app01.host=app01
worker.pub-app01.port=8009
worker.pub-app01.socket_keepalive=1

worker.pub-app02.type=ajp13
worker.pub-app02.host=app02
worker.pub-app02.port=8009
worker.pub-app02.socket_keepalive=1

worker.pub-app03.type=ajp13
worker.pub-app03.host=app03
worker.pub-app03.port=8009
worker.pub-app03.socket_keepalive=1

worker.pub-app04.type=ajp13
worker.pub-app04.

RE: Hello and Tomcat issues with sticky sessions

2010-06-30 Thread Ockleford Paul (NHS Connecting for Health)
I'm not sure if this is what you are looking for but I just checked how our 
stuff is set up here and wondered if you have the jvm route mapped in the 
server xml for the tomcat instances you want loadbalanced?



Paul



-Original Message-
From: Gabriel Tabares [mailto:gabriel.taba...@roboreus.com]
Sent: 30 June 2010 11:17
To: users@tomcat.apache.org
Subject: Hello and Tomcat issues with sticky sessions

Hi everybody,

I have been running Tomcat on production for a few years with no problem
but now, after moving to a new company, I am completely unable to get
session stickyness working.

The setup is as follows:

Apache 2.2.3 (CentOS 5.4 version) -> Tomcat 6.0.24.

I have tried all of mod_proxy, mod_ajp_proxy and mod_jk but, no matter
what I do, I can not get Apache to always send the requests to the
Tomcat specified in the jsession.

Firebug indicates that the JSESSIONID cookie is being set as it should
but it still sees requests going to the other server. I have also tried
changing the jvmRoute to exactly match the worker name for mod_jk but it
still doesn't work.

I would appreciate any help, as I am stuck.

Here are the configurations I have tried. Obviously, only of them is
active at any given time. httpd.conf is the standard one from the CentOS
RPM.

Tomcats:

All of them have a jvmRoute of pub-app0X, where X goes from 1 to 5.

mod_proxy

proxy.conf
---

LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
LoadModule proxy_http_module modules/mod_proxy_http.so

ProxyRequests Off


 Order deny,allow
 Allow from all

 BalancerMember http://app01:8080 route=pub-app01
 BalancerMember http://app02:8080 route=pub-app02
 BalancerMember http://app03:8080 route=pub-app03
 BalancerMember http://app04:8080 route=pub-app04
 BalancerMember http://app05:8080 route=pub-app05


virtual.conf

LogLevel Debug


 DocumentRoot /var/www/html
 ServerName www.myserver.com
 ServerAlias myserver.com

 RewriteEngine On
 RewriteRule ^/$ /appname/ [R]
 RewriteRule ^$ /appname/ [R]


 AuthType Basic
 AuthName "Please enter your details"
 AuthUserFile /etc/httpd/conf.d/htpasswd
 Require valid-user

 ProxyPass balancer://public_web_cluster/
stickysession=JSESSIONID lbmethod=byrequests
 ProxyPassReverse balancer://public_web_cluster/



mod_ajp_proxy
===

mod_proxy_ajp.conf
--

LoadModule proxy_ajp_module modules/mod_proxy_ajp.so


BalancerMember ajp://app01:8009/ timeout=5 route=pub-app01
BalancerMember ajp://app02:8009/ timeout=5 route=pub-app02
BalancerMember ajp://app03:8009/ timeout=5 route=pub-app03
BalancerMember ajp://app04:8009/ timeout=5 route=pub-app04
BalancerMember ajp://app05:8009/ timeout=5 route=pub-app05


virtual.conf
---
ProxyRequests Off

 DocumentRoot /var/www/html
 ServerName www.myserver.com
 ServerAlias myserver.com

 RewriteEngine On
 RewriteRule ^$ /myapp [R]
 RewriteRule ^/$ /myapp [R]


 AuthType Basic
 AuthName "Please enter your details"
 AuthUserFile /etc/httpd/conf.d/htpasswd
 Require valid-user

 ProxyPass balancer://pubLB/ stickysession=JSESSIONID nofailover=on
 ProxyPassReverse balancer://pubLB/



mod_jk
=

mod_jk.conf
-
LoadModule jk_module modules/mod_jk.so

JkWorkersFile /etc/httpd/conf.d/workers.properties
JkLogFile /var/log/httpd/mod_jk.log
JkLogLeveldebug
JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "

workers.properties
---
ps=/

worker.list=pub-app01, pub-app02, pub-app03, pub-app04, pub-app05, pub-lb

worker.pub-app01.type=ajp13
worker.pub-app01.host=app01
worker.pub-app01.port=8009
worker.pub-app01.socket_keepalive=1

worker.pub-app02.type=ajp13
worker.pub-app02.host=app02
worker.pub-app02.port=8009
worker.pub-app02.socket_keepalive=1

worker.pub-app03.type=ajp13
worker.pub-app03.host=app03
worker.pub-app03.port=8009
worker.pub-app03.socket_keepalive=1

worker.pub-app04.type=ajp13
worker.pub-app04.host=app04
worker.pub-app04.port=8009
worker.pub-app04.socket_keepalive=1

worker.pub-app05.type=ajp13
worker.pub-app05.host=app05
worker.pub-app05.port=8009
worker.pub-app05.socket_keepalive=1

worker.ajp13.lbfactor=1

worker.pub-lb.type=lb
worker.pub-lb.balance_workers=pub-app01,pub-app02,pub-app03,pub-app04,pub-app05
worker.pub-lb.sticky_session=1

virtual.conf
---


 DocumentRoot /var/www/html
 ServerName www.myserver.com

JkMount /myapp/* pub-lb


 AuthType Basic
 AuthName "Please enter your details"
 AuthUserFile /etc/httpd/conf.d/htpasswd
 Require valid-user




--

Thanks in advance.

Gabriel




-
To unsubscribe, e-mail: users-uns

Hello and Tomcat issues with sticky sessions

2010-06-30 Thread Gabriel Tabares

Hi everybody,

I have been running Tomcat on production for a few years with no problem 
but now, after moving to a new company, I am completely unable to get 
session stickyness working.


The setup is as follows:

Apache 2.2.3 (CentOS 5.4 version) -> Tomcat 6.0.24.

I have tried all of mod_proxy, mod_ajp_proxy and mod_jk but, no matter 
what I do, I can not get Apache to always send the requests to the 
Tomcat specified in the jsession.


Firebug indicates that the JSESSIONID cookie is being set as it should 
but it still sees requests going to the other server. I have also tried 
changing the jvmRoute to exactly match the worker name for mod_jk but it 
still doesn't work.


I would appreciate any help, as I am stuck.

Here are the configurations I have tried. Obviously, only of them is 
active at any given time. httpd.conf is the standard one from the CentOS 
RPM.


Tomcats:

All of them have a jvmRoute of pub-app0X, where X goes from 1 to 5.

mod_proxy

proxy.conf
---

LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
LoadModule proxy_http_module modules/mod_proxy_http.so

ProxyRequests Off


Order deny,allow
Allow from all

BalancerMember http://app01:8080 route=pub-app01
BalancerMember http://app02:8080 route=pub-app02
BalancerMember http://app03:8080 route=pub-app03
BalancerMember http://app04:8080 route=pub-app04
BalancerMember http://app05:8080 route=pub-app05


virtual.conf

LogLevel Debug


DocumentRoot /var/www/html
ServerName www.myserver.com
ServerAlias myserver.com

RewriteEngine On
RewriteRule ^/$ /appname/ [R]
RewriteRule ^$ /appname/ [R]


AuthType Basic
AuthName "Please enter your details"
AuthUserFile /etc/httpd/conf.d/htpasswd
Require valid-user

ProxyPass balancer://public_web_cluster/ 
stickysession=JSESSIONID lbmethod=byrequests

ProxyPassReverse balancer://public_web_cluster/



mod_ajp_proxy
===

mod_proxy_ajp.conf
--

LoadModule proxy_ajp_module modules/mod_proxy_ajp.so


BalancerMember ajp://app01:8009/ timeout=5 route=pub-app01
BalancerMember ajp://app02:8009/ timeout=5 route=pub-app02
BalancerMember ajp://app03:8009/ timeout=5 route=pub-app03
BalancerMember ajp://app04:8009/ timeout=5 route=pub-app04
BalancerMember ajp://app05:8009/ timeout=5 route=pub-app05


virtual.conf
---
ProxyRequests Off

DocumentRoot /var/www/html
ServerName www.myserver.com
ServerAlias myserver.com

RewriteEngine On
RewriteRule ^$ /myapp [R]
RewriteRule ^/$ /myapp [R]


AuthType Basic
AuthName "Please enter your details"
AuthUserFile /etc/httpd/conf.d/htpasswd
Require valid-user

ProxyPass balancer://pubLB/ stickysession=JSESSIONID nofailover=on
ProxyPassReverse balancer://pubLB/



mod_jk
=

mod_jk.conf
-
LoadModule jk_module modules/mod_jk.so

JkWorkersFile /etc/httpd/conf.d/workers.properties
JkLogFile /var/log/httpd/mod_jk.log
JkLogLeveldebug
JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "

workers.properties
---
ps=/

worker.list=pub-app01, pub-app02, pub-app03, pub-app04, pub-app05, pub-lb

worker.pub-app01.type=ajp13
worker.pub-app01.host=app01
worker.pub-app01.port=8009
worker.pub-app01.socket_keepalive=1

worker.pub-app02.type=ajp13
worker.pub-app02.host=app02
worker.pub-app02.port=8009
worker.pub-app02.socket_keepalive=1

worker.pub-app03.type=ajp13
worker.pub-app03.host=app03
worker.pub-app03.port=8009
worker.pub-app03.socket_keepalive=1

worker.pub-app04.type=ajp13
worker.pub-app04.host=app04
worker.pub-app04.port=8009
worker.pub-app04.socket_keepalive=1

worker.pub-app05.type=ajp13
worker.pub-app05.host=app05
worker.pub-app05.port=8009
worker.pub-app05.socket_keepalive=1

worker.ajp13.lbfactor=1

worker.pub-lb.type=lb
worker.pub-lb.balance_workers=pub-app01,pub-app02,pub-app03,pub-app04,pub-app05
worker.pub-lb.sticky_session=1

virtual.conf
---


DocumentRoot /var/www/html
ServerName www.myserver.com

   JkMount /myapp/* pub-lb


AuthType Basic
AuthName "Please enter your details"
AuthUserFile /etc/httpd/conf.d/htpasswd
Require valid-user




--

Thanks in advance.

Gabriel




-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: hello world

2010-01-06 Thread Mark Thomas
On 06/01/2010 11:09, Cristobal Castro wrote:
> hello
> i just installed tomcat on win xp, now how can i set my firt project ? i
> see the tomcat folder in C:, do i need to put my first program in one of
> those folders? just like i did with normal apache ? (ex htdocs folder ->
> called on browser by http://localhost/nameOfYourFile)
> thanks

http://tomcat.apache.org/tomcat-6.0-doc/appdev/index.html

Mark



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



hello world

2010-01-06 Thread Cristobal Castro

hello
i just installed tomcat on win xp, now how can i set my firt project ? i 
see the tomcat folder in C:, do i need to put my first program in one of 
those folders? just like i did with normal apache ? (ex htdocs folder -> 
called on browser by http://localhost/nameOfYourFile)

thanks
--
http://cristobal.castro.free.fr/


__ Information from ESET Smart Security, version of virus signature 
database 4747 (20100106) __

The message was checked by ESET Smart Security.

http://www.eset.com



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: hello world

2009-05-29 Thread veena pandit
I have that book;  I am studying for SWCD certification.  There are some
gaps I am trying to fill.

On Fri, May 29, 2009 at 3:03 PM, S Arvind  wrote:

> instead of reading that tutorial try reading "Head First JSP and SERVLETS".
>
> -Arvind S
>
>
> On Fri, May 29, 2009 at 7:14 PM, veena pandit  wrote:
>
> > http://www.jsptut.com/
> >
> > On Fri, May 29, 2009 at 9:39 AM, Caldarale, Charles R <
> > chuck.caldar...@unisys.com> wrote:
> >
> > > > From: veena pandit [mailto:v.kri...@gmail.com]
> > > > Subject: Re: hello world
> > > >
> > > > it was chapter 1 in a web based tutorial for JSP. :-)
> > >
> > > Can you provide a link to the tutorial?  I'd like to see what it says.
> > >
> > >  - 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 unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> > > For additional commands, e-mail: users-h...@tomcat.apache.org
> > >
> > >
> >
>


Re: hello world

2009-05-29 Thread S Arvind
instead of reading that tutorial try reading "Head First JSP and SERVLETS".

-Arvind S


On Fri, May 29, 2009 at 7:14 PM, veena pandit  wrote:

> http://www.jsptut.com/
>
> On Fri, May 29, 2009 at 9:39 AM, Caldarale, Charles R <
> chuck.caldar...@unisys.com> wrote:
>
> > > From: veena pandit [mailto:v.kri...@gmail.com]
> > > Subject: Re: hello world
> > >
> > > it was chapter 1 in a web based tutorial for JSP. :-)
> >
> > Can you provide a link to the tutorial?  I'd like to see what it says.
> >
> >  - 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 unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> > For additional commands, e-mail: users-h...@tomcat.apache.org
> >
> >
>


Re: hello world

2009-05-29 Thread veena pandit
http://www.jsptut.com/

On Fri, May 29, 2009 at 9:39 AM, Caldarale, Charles R <
chuck.caldar...@unisys.com> wrote:

> > From: veena pandit [mailto:v.kri...@gmail.com]
> > Subject: Re: hello world
> >
> > it was chapter 1 in a web based tutorial for JSP. :-)
>
> Can you provide a link to the tutorial?  I'd like to see what it says.
>
>  - 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 unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


RE: hello world

2009-05-29 Thread Caldarale, Charles R
> From: veena pandit [mailto:v.kri...@gmail.com]
> Subject: Re: hello world
> 
> it was chapter 1 in a web based tutorial for JSP. :-)

Can you provide a link to the tutorial?  I'd like to see what it says.

 - 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 unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: hello world

2009-05-29 Thread veena pandit
Well I had to know, because it was chapter 1 in a web based tutorial for
JSP. :-)

Thanks,

Veena

On Fri, May 29, 2009 at 9:15 AM, André Warnier  wrote:

> veena pandit wrote:
>
>> It was actually:
>>
>> http://localhost:8080/webapps/Hello/Hello.html.  Sorry for the misprint.
>>
>> This must be the longest-running thread about a Hello World application
> ever, in any programming language.
> :-)
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Re: hello world

2009-05-29 Thread Serge Fonville
>> http://localhost:8080/webapps/Hello/Hello.html.  Sorry for the misprint.
>>
> This must be the longest-running thread about a Hello World application
> ever, in any programming language.
> :-)

It looks to me that you should remove the webapps from the url.

What is your local path
What is the server.xml like
How did you deploy the app
How have you changed the default config...

HTH

Serge Fonville

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: hello world

2009-05-29 Thread André Warnier

veena pandit wrote:

It was actually:

http://localhost:8080/webapps/Hello/Hello.html.  Sorry for the misprint.

This must be the longest-running thread about a Hello World application 
ever, in any programming language.

:-)

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: hello world

2009-05-29 Thread veena pandit
It was actually:

http://localhost:8080/webapps/Hello/Hello.html.  Sorry for the misprint.

Veena

On Thu, May 28, 2009 at 6:07 AM, S Arvind  wrote:

> What path you gave to get that html in browser?
>
> -Arvind S
>
> *
> "Many of lifes failure are people who did not realize how close they were
> to
> success when they gave up."
> -Thomas Edison
> *
>
>  On Wed, May 27, 2009 at 5:48 AM, veena pandit  wrote:
>
> > How to configure Hello.html in Tomcat?
> >
> > Where do I place the following file?  How to access it from the server?
> >
> >
> > 
> > 
> > Hello, world
> > 
> > 
> >
> >
> >
> >
> > Thanks,
> >
> > Veena
> >
>


Re: hello world

2009-05-28 Thread veena pandit
http://localhost:8080/webapps/Hello.htm
l
-Veena

On Thu, May 28, 2009 at 6:07 AM, S Arvind  wrote:

> What path you gave to get that html in browser?
>
> -Arvind S
>
> *
> "Many of lifes failure are people who did not realize how close they were
> to
> success when they gave up."
> -Thomas Edison
> *
>
>  On Wed, May 27, 2009 at 5:48 AM, veena pandit  wrote:
>
> > How to configure Hello.html in Tomcat?
> >
> > Where do I place the following file?  How to access it from the server?
> >
> >
> > 
> > 
> > Hello, world
> > 
> > 
> >
> >
> >
> >
> > Thanks,
> >
> > Veena
> >
>


Re: hello world

2009-05-28 Thread S Arvind
What path you gave to get that html in browser?

-Arvind S

*
"Many of lifes failure are people who did not realize how close they were to
success when they gave up."
-Thomas Edison
*

On Wed, May 27, 2009 at 5:48 AM, veena pandit  wrote:

> How to configure Hello.html in Tomcat?
>
> Where do I place the following file?  How to access it from the server?
>
>
> 
> 
> Hello, world
> 
> 
>
>
>
>
> Thanks,
>
> Veena
>


RE: hello world

2009-05-27 Thread Caldarale, Charles R
> From: S Arvind [mailto:arvindw...@gmail.com]
> Subject: Re: hello world
> 
> rename the file name to index.html , or change the welcome page entry
> in web.xml to hello.html

As previously stated, that's a really bad idea.  It would overwrite Tomcat's 
default home page, obliterating the very useful links therein.

 - 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 unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: hello world

2009-05-27 Thread S Arvind
rename the file name to index.html , or change the welcome page entry in
web.xml to hello.html

-Arvind S
*
"Many of lifes failure are people who did not realize how close they were to
success when they gave up."
-Thomas Edison
*

On Wed, May 27, 2009 at 6:23 AM, veena pandit  wrote:

> I tried placing it in a webapps directory under tomcat root.  do i need to
> configure in web.xml?
>
> On Tue, May 26, 2009 at 8:25 PM, Hassan Schroeder <
> hassan.schroe...@gmail.com> wrote:
>
> > On Tue, May 26, 2009 at 5:18 PM, veena pandit 
> wrote:
> > > How to configure Hello.html in Tomcat?
> > >
> > > Where do I place the following file?  How to access it from the server?
> >
> > Where did you try placing it, and what makes you think that wasn't
> > the right place?
> >
> > --
> > Hassan Schroeder  hassan.schroe...@gmail.com
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> > For additional commands, e-mail: users-h...@tomcat.apache.org
> >
> >
>


Re: hello world

2009-05-26 Thread veena pandit
I tried placing it in a webapps directory under tomcat root.  do i need to
configure in web.xml?

On Tue, May 26, 2009 at 8:25 PM, Hassan Schroeder <
hassan.schroe...@gmail.com> wrote:

> On Tue, May 26, 2009 at 5:18 PM, veena pandit  wrote:
> > How to configure Hello.html in Tomcat?
> >
> > Where do I place the following file?  How to access it from the server?
>
> Where did you try placing it, and what makes you think that wasn't
> the right place?
>
> --
> Hassan Schroeder  hassan.schroe...@gmail.com
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Re: hello world

2009-05-26 Thread Hassan Schroeder
On Tue, May 26, 2009 at 5:18 PM, veena pandit  wrote:
> How to configure Hello.html in Tomcat?
>
> Where do I place the following file?  How to access it from the server?

Where did you try placing it, and what makes you think that wasn't
the right place?

-- 
Hassan Schroeder  hassan.schroe...@gmail.com

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



hello world

2009-05-26 Thread veena pandit
How to configure Hello.html in Tomcat?

Where do I place the following file?  How to access it from the server?




Hello, world






Thanks,

Veena


Re: Hello

2009-02-13 Thread Mark Thomas
André Warnier wrote:
> Mark Thomas wrote:
>> Caldarale, Charles R wrote:
> [...]
>>> I'm not privy to the thought processes behind the packaging of the
>>> .exe and .zip downloads, but I don't like it, whatever it was.  I
>>> think all bits and pieces should be in all the packages.  The .exe
>>> installer could be made smart enough to detect the platform and JVM
>>> it's running on, and choose the 32- or 64-bit service wrapper as
>>> appropriate.  The service.bat script would probably have to use a
>>> command line option to select 32- or 64-bit, but that's way better
>>> than the current state of affairs.
>>
>> Patches are always welcome ;)
>>
> One would have to find things first in order to patch them. ;-)
> 
> Seriously, on the same principle as eating an elephant but tiny bits at
> a time, is there something that militates against adding the various
> tomcat.exe and tomcatw.exe to the zip distribution ?

Not at all. I'm more than happy to add them to the Tomcat 7 build, get it
working and then propose a port to 6.0.x and possibly earlier versions.

Option 1: Wait for me (or another committer) to find the time to do this and
continue to complain that it isn't so until once of us does.

Option 2: Write a patch for the build script, service.bat and the windows
installer to do this.

I'll accept patching the windows installer is a little tricky but the others
should be trivial. If someone wants to take a crack at doing this I'll willingly
give them all the help they need if they pop over to the dev list.

> I'm willing to write a HowTo for Windows in the FAQ, but having in
> addition to direct people to these external links seems a bit
> extra-confusing.

Agreed. I'd rather get this fixed than document a workaround.

Mark



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Hello

2009-02-13 Thread André Warnier

Mark Thomas wrote:

Caldarale, Charles R wrote:

[...]

I'm not privy to the thought processes behind the packaging of the .exe and 
.zip downloads, but I don't like it, whatever it was.  I think all bits and 
pieces should be in all the packages.  The .exe installer could be made smart 
enough to detect the platform and JVM it's running on, and choose the 32- or 
64-bit service wrapper as appropriate.  The service.bat script would probably 
have to use a command line option to select 32- or 64-bit, but that's way 
better than the current state of affairs.


Patches are always welcome ;)


One would have to find things first in order to patch them. ;-)

Seriously, on the same principle as eating an elephant but tiny bits at 
a time, is there something that militates against adding the various 
tomcat.exe and tomcatw.exe to the zip distribution ?
I'm willing to write a HowTo for Windows in the FAQ, but having in 
addition to direct people to these external links seems a bit 
extra-confusing.



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: Hello

2009-02-13 Thread Martin Gainty

anyone coming aboard sonny crockett's boat would meet Security Chief 
Elvis..elvis was an alligator
Topic: does TC work with  or should we be invoking TC64 Bit in 
'Windows Compatibility Mode' aka32bit
?
Thanks
Martin 
__ 
Disclaimer and confidentiality note 
Everything in this e-mail and any attachments relates to the official business 
of Sender. This transmission is of a confidential nature and Sender does not 
endorse distribution to any party other than intended recipient. Sender does 
not necessarily endorse content contained within this transmission. 




> From: chuck.caldar...@unisys.com
> To: users@tomcat.apache.org
> Date: Fri, 13 Feb 2009 08:55:16 -0600
> Subject: RE: Hello
> 
> > From: André Warnier [mailto:a...@ice-sa.com]
> > Subject: Re: Hello
> >
> > I understand that, but how would a newbie understand this ?
> 
> Read the mailing list?
> 
> > I didn't know that. But who (other than an expert) would
> > know that, looking at those links alone ?
> 
> Actually, Intel seems to have deliberately added to the confusion, since they 
> recently renamed the current 64-bit architecture to "Intel 64" (even though 
> AMD invented it).  This is exceedingly close to their older, Really Bad Idea 
> architecture IA64, aka Itanium.  Other synonyms for AMD64 include x86-64 (the 
> original AMD name for it), x64, EM64T, and IA32e (the latter two names are 
> from Intel).
> 
> Who could possibly be confused?  :-(
> 
> > I posted another message a couple of days ago that
> > asked why these 64-bit versions of tomcat.exe and
> > tomcatw.exe were not just included in the zip version.
> > Any idea of the reason ?
> 
> I'm not privy to the thought processes behind the packaging of the .exe and 
> .zip downloads, but I don't like it, whatever it was.  I think all bits and 
> pieces should be in all the packages.  The .exe installer could be made smart 
> enough to detect the platform and JVM it's running on, and choose the 32- or 
> 64-bit service wrapper as appropriate.  The service.bat script would probably 
> have to use a command line option to select 32- or 64-bit, but that's way 
> better than the current state of affairs.  Finding the 64-bit versions right 
> now is a lot like Arthur Dent's run-in with the planning commission:
> 
> "It was on display on the bottom of a locked filing cabinet stuck in a 
> disused lavatory with a sign on the door saying 'Beware of the Leopard'."
> 
>  - 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 unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
> 

_
Windows Live™: Keep your life in sync. 
http://windowslive.com/howitworks?ocid=TXT_TAGLM_WL_t1_allup_howitworks_022009

Re: Hello (Dave's not here!)

2009-02-13 Thread michel

Can people please use something a little more descriptive than "Hello"?


- Original Message - 
From: "Mark Thomas" 

To: "Tomcat Users List" 
Sent: Friday, February 13, 2009 10:19 AM
Subject: Re: Hello



Caldarale, Charles R wrote:

From: André Warnier [mailto:a...@ice-sa.com]
Subject: Re: Hello

I understand that, but how would a newbie understand this ?


Read the mailing list?


I didn't know that. But who (other than an expert) would
know that, looking at those links alone ?


Actually, Intel seems to have deliberately added to the confusion, since 
they recently renamed the current 64-bit architecture to "Intel 64" (even 
though AMD invented it).  This is exceedingly close to their older, 
Really Bad Idea architecture IA64, aka Itanium.  Other synonyms for AMD64 
include x86-64 (the original AMD name for it), x64, EM64T, and IA32e (the 
latter two names are from Intel).


Who could possibly be confused?  :-(


I posted another message a couple of days ago that
asked why these 64-bit versions of tomcat.exe and
tomcatw.exe were not just included in the zip version.
Any idea of the reason ?


I'm not privy to the thought processes behind the packaging of the .exe 
and .zip downloads, but I don't like it, whatever it was.  I think all 
bits and pieces should be in all the packages.  The .exe installer could 
be made smart enough to detect the platform and JVM it's running on, and 
choose the 32- or 64-bit service wrapper as appropriate.  The service.bat 
script would probably have to use a command line option to select 32- or 
64-bit, but that's way better than the current state of affairs.


Patches are always welcome ;)

Mark



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org




-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Hello

2009-02-13 Thread Mark Thomas
Caldarale, Charles R wrote:
>> From: André Warnier [mailto:a...@ice-sa.com]
>> Subject: Re: Hello
>>
>> I understand that, but how would a newbie understand this ?
> 
> Read the mailing list?
> 
>> I didn't know that. But who (other than an expert) would
>> know that, looking at those links alone ?
> 
> Actually, Intel seems to have deliberately added to the confusion, since they 
> recently renamed the current 64-bit architecture to "Intel 64" (even though 
> AMD invented it).  This is exceedingly close to their older, Really Bad Idea 
> architecture IA64, aka Itanium.  Other synonyms for AMD64 include x86-64 (the 
> original AMD name for it), x64, EM64T, and IA32e (the latter two names are 
> from Intel).
> 
> Who could possibly be confused?  :-(
> 
>> I posted another message a couple of days ago that
>> asked why these 64-bit versions of tomcat.exe and
>> tomcatw.exe were not just included in the zip version.
>> Any idea of the reason ?
> 
> I'm not privy to the thought processes behind the packaging of the .exe and 
> .zip downloads, but I don't like it, whatever it was.  I think all bits and 
> pieces should be in all the packages.  The .exe installer could be made smart 
> enough to detect the platform and JVM it's running on, and choose the 32- or 
> 64-bit service wrapper as appropriate.  The service.bat script would probably 
> have to use a command line option to select 32- or 64-bit, but that's way 
> better than the current state of affairs.

Patches are always welcome ;)

Mark



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: Hello

2009-02-13 Thread Caldarale, Charles R
> From: André Warnier [mailto:a...@ice-sa.com]
> Subject: Re: Hello
>
> I understand that, but how would a newbie understand this ?

Read the mailing list?

> I didn't know that. But who (other than an expert) would
> know that, looking at those links alone ?

Actually, Intel seems to have deliberately added to the confusion, since they 
recently renamed the current 64-bit architecture to "Intel 64" (even though AMD 
invented it).  This is exceedingly close to their older, Really Bad Idea 
architecture IA64, aka Itanium.  Other synonyms for AMD64 include x86-64 (the 
original AMD name for it), x64, EM64T, and IA32e (the latter two names are from 
Intel).

Who could possibly be confused?  :-(

> I posted another message a couple of days ago that
> asked why these 64-bit versions of tomcat.exe and
> tomcatw.exe were not just included in the zip version.
> Any idea of the reason ?

I'm not privy to the thought processes behind the packaging of the .exe and 
.zip downloads, but I don't like it, whatever it was.  I think all bits and 
pieces should be in all the packages.  The .exe installer could be made smart 
enough to detect the platform and JVM it's running on, and choose the 32- or 
64-bit service wrapper as appropriate.  The service.bat script would probably 
have to use a command line option to select 32- or 64-bit, but that's way 
better than the current state of affairs.  Finding the 64-bit versions right 
now is a lot like Arthur Dent's run-in with the planning commission:

"It was on display on the bottom of a locked filing cabinet stuck in a disused 
lavatory with a sign on the door saying 'Beware of the Leopard'."

 - 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 unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Hello

2009-02-13 Thread André Warnier

Pieter Temmerman wrote:

Luckily I'm not a windows user, because all of this seems rather
confusing to me.


It is confusing to anyone, except the wizards themselves.
There are rumors going around that this is exactly the point.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Hello

2009-02-13 Thread Pieter Temmerman
Luckily I'm not a windows user, because all of this seems rather
confusing to me.

On Fri, 2009-02-13 at 09:25 +0100, André Warnier wrote:
> So apparently, I did end up make it more complicated than it is.
> 
> Caldarale, Charles R wrote:
> >> From: André Warnier [mailto:a...@ice-sa.com]
> >> Subject: Re: Hello
> >>
> >> Vista 32-bit -> 32-bit Java JDK or JRE
> >> Vista 64-bit -> 64-bit Java JDK or JRE
> > 
> > Not necessarily true.  I run both 32- and 64-bit versions of the JVM on my 
> > Vista 64 box, because some browsers only come in 32-bit versions and 
> > therefore need the 32-bit plugin to run applets.
> Allright, good to know.
> 
> > 
> >> For a 64-bit Vista, we first tried the Service Installer. It installed
> >> properly, but we could not get it to run.
> > 
> > That depends on the JRE/JDK installed.
>To use the tomcat6.exe program that's included with the .zip and .exe 
> downloads,
>   you must associate it with a 32-bit JVM - even on a 64-bit platform.
> I understand that, but how would a newbie understand this ?
> 
> > 
> >> So we removed the 64-bit Service Installer
> > 
> > There is no 64-bit service installer.
> Sorry, typo. Should have been "the Service Installer", tout court.
> 
> > 
> >> To make it work, we had to download 2 additional files
> >> (tomcat5.exe and tomcat5w.exe), rename them respectively
> >> to tomcat6.exe and tomcat6w.exe, and (I think) rerun the
> >> service.bat script.
> > 
> > What you downloaded was the 64-bit versions, necessary to run Tomcat as a 
> > service
>   with a 64-bit JVM.
> Same remark as the newbie one above.
> 
> It should not be necessary to rerun the service.bat script.
> Ok, just wasn't sure.
> 
> > 
> >> We downloaded them from here :
> >> http://svn.apache.org/repos/asf/tomcat/connectors/trunk/procrun/bin/
> >> Oh, and there are 2 versions of each of the above files, depending on
> >> whether your CPU is an Intel-64 or an AMD-64.
> > 
> > Not correct.  Use the AMD64 version, which applies to current 64-bit chips 
> > from both AMD and Intel; the IA64 version is for an older Intel 64-bit 
> > architecture which has pretty much been killed off (just not soon enough 
> > for those of us that had to use it).
> > 
> I didn't know that. But who (other than an expert) would know that, 
> looking at those links alone ?
> 
> I believe that this definitely needs at least a HowTo on the Tomcat 
> site.  I'll get to it.
> Unfortunately, I think that the current structure of the downloadable 
> versions does not make this really easy to explain.
> I posted another message a couple of days ago that asked why these 
> 64-bit versions of tomcat.exe and tomcatw.exe were not just included in 
> the zip version.  Any idea of the reason ?
> 
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
> 
-- 
Pieter Temmerman
email: ptemmerman@sadiel.es
skype: ptemmerman.sadiel

SADIEL TECNOLOGÍAS DE LA INFORMACIÓN, S.A. http://www.sadiel.es.




-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Hello

2009-02-13 Thread André Warnier

So apparently, I did end up make it more complicated than it is.

Caldarale, Charles R wrote:

From: André Warnier [mailto:a...@ice-sa.com]
Subject: Re: Hello

Vista 32-bit -> 32-bit Java JDK or JRE
Vista 64-bit -> 64-bit Java JDK or JRE


Not necessarily true.  I run both 32- and 64-bit versions of the JVM on my 
Vista 64 box, because some browsers only come in 32-bit versions and therefore 
need the 32-bit plugin to run applets.

Allright, good to know.




For a 64-bit Vista, we first tried the Service Installer. It installed
properly, but we could not get it to run.


That depends on the JRE/JDK installed.
  To use the tomcat6.exe program that's included with the .zip and .exe 
downloads,

 you must associate it with a 32-bit JVM - even on a 64-bit platform.
I understand that, but how would a newbie understand this ?




So we removed the 64-bit Service Installer


There is no 64-bit service installer.

Sorry, typo. Should have been "the Service Installer", tout court.




To make it work, we had to download 2 additional files
(tomcat5.exe and tomcat5w.exe), rename them respectively
to tomcat6.exe and tomcat6w.exe, and (I think) rerun the
service.bat script.


What you downloaded was the 64-bit versions, necessary to run Tomcat as a 
service

 with a 64-bit JVM.
Same remark as the newbie one above.

It should not be necessary to rerun the service.bat script.
Ok, just wasn't sure.




We downloaded them from here :
http://svn.apache.org/repos/asf/tomcat/connectors/trunk/procrun/bin/
Oh, and there are 2 versions of each of the above files, depending on
whether your CPU is an Intel-64 or an AMD-64.


Not correct.  Use the AMD64 version, which applies to current 64-bit chips from 
both AMD and Intel; the IA64 version is for an older Intel 64-bit architecture 
which has pretty much been killed off (just not soon enough for those of us 
that had to use it).

I didn't know that. But who (other than an expert) would know that, 
looking at those links alone ?


I believe that this definitely needs at least a HowTo on the Tomcat 
site.  I'll get to it.
Unfortunately, I think that the current structure of the downloadable 
versions does not make this really easy to explain.
I posted another message a couple of days ago that asked why these 
64-bit versions of tomcat.exe and tomcatw.exe were not just included in 
the zip version.  Any idea of the reason ?



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: Hello

2009-02-12 Thread Caldarale, Charles R
> From: André Warnier [mailto:a...@ice-sa.com]
> Subject: Re: Hello
>
> Vista 32-bit -> 32-bit Java JDK or JRE
> Vista 64-bit -> 64-bit Java JDK or JRE

Not necessarily true.  I run both 32- and 64-bit versions of the JVM on my 
Vista 64 box, because some browsers only come in 32-bit versions and therefore 
need the 32-bit plugin to run applets.

> For a 64-bit Vista, we first tried the Service Installer. It installed
> properly, but we could not get it to run.

That depends on the JRE/JDK installed.  To use the tomcat6.exe program that's 
included with the .zip and .exe downloads, you must associate it with a 32-bit 
JVM - even on a 64-bit platform.

> So we removed the 64-bit Service Installer

There is no 64-bit service installer.

> To make it work, we had to download 2 additional files
> (tomcat5.exe and tomcat5w.exe), rename them respectively
> to tomcat6.exe and tomcat6w.exe, and (I think) rerun the
> service.bat script.

What you downloaded was the 64-bit versions, necessary to run Tomcat as a 
service with a 64-bit JVM.  It should not be necessary to rerun the service.bat 
script.

> We downloaded them from here :
> http://svn.apache.org/repos/asf/tomcat/connectors/trunk/procrun/bin/
> Oh, and there are 2 versions of each of the above files, depending on
> whether your CPU is an Intel-64 or an AMD-64.

Not correct.  Use the AMD64 version, which applies to current 64-bit chips from 
both AMD and Intel; the IA64 version is for an older Intel 64-bit architecture 
which has pretty much been killed off (just not soon enough for those of us 
that had to use 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 unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Hello

2009-02-12 Thread André Warnier

Okey Kene wrote:


Hi, 
Am using windows vista and i wish to know what version of apache tomcat to download.



Smartass answer :
You can download any version you like, using IE or Firefox.
;-)
..

Less smartass :
If you intend to also run Tomcat under Vista :

(and as a redemption for the above)

Tomcat itself, since it runs under a Java JVM, is always the same.
The Java JVM you need however will be different depending if you run a 
32-bit or 64-bit version of Vista (or XP).

Vista 32-bit -> 32-bit Java JDK or JRE
Vista 64-bit -> 64-bit Java JDK or JRE

Then for Tomcat 6, there is a choice between 2 downloads : the "zip" and 
the "service installer".


The following may save you some time if you use a 64-bit Vista :

For a 64-bit Vista, we first tried the Service Installer. It installed 
properly, but we could not get it to run. (But Chuck earlier indicated 
that his experience was different).


So we removed the 64-bit Service Installer, and downloaded and installed 
the zip version. That one ran fine in a command window.


To make that one run as a service, you need to execute the "(tomcat 
dir)/bin/service.bat" script.  We did that, and it did not complain, but 
when we tried to run Tomcat, it did not start.
There was a message in one of the Tomcat logfiles to the effect that 
"This is not a proper 32-bit application".


To make it work, we had to download 2 additional files (tomcat5.exe and 
tomcat5w.exe), rename them respectively to tomcat6.exe and tomcat6w.exe, 
and (I think) rerun the service.bat script.


We downloaded them from here :
http://svn.apache.org/repos/asf/tomcat/connectors/trunk/procrun/bin/

Oh, and there are 2 versions of each of the above files, depending on 
whether your CPU is an Intel-64 or an AMD-64.

(I think there is only one 32-bit version).

I hope I haven't confused you beyond redemption.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Hello

2009-02-12 Thread Bill Davidson

Okey Kene wrote:
Am using windows vista and i wish to know what version of apache tomcat 
to download.


Are you planning to write webapps or are you only wishing to deploy
webapps you've acquired from other sources?

If you wish to learn to write JEE webapps, then I recommend the
latest version (currently 6.0.18).

If you wish deploy existing webapps, then I suggest you check with
the providers of those webapps as to which is the best version.

In most cases, the latest version should work fine.

You should also read the documentation.  Books don't hurt either.
I like "Tomcat The Definitive Guide" by Brittain and Darwin for
Tomcat administration and "Head First Servlets & JSP" by Bashram,
Sierra & Bates as an introduction to writing Java web apps.

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: Hello

2009-02-12 Thread Caldarale, Charles R
> From: Mehrotra, Anurag [mailto:amehro...@telebright.com]
> Subject: RE: Hello
>
> If you are using vista 64 bit, do not use the windows installer/exe.

Not true, the installer works fine on my Vista 64 box.  The tomcat6.exe program 
in the installer (and also in the .zip download) is set up for a 32-bit JVM, 
but it doesn't care if the OS is 32- or 64-bit.

> Instead unzip the tomcat zip file and then create shortcuts
> to startup and shutdown batch file found under ../bin folder.

Definitely a good idea.

> You will also have to install JRE 1.5.0. Tomcat complained
> about the JRE when I tried using the 64 bit JRE 1.6.0.11

Also wrong advice.  I've been running Tomcat on Vista 64 with both 32- and 
64-bit 1.6 JVMs without any problem.  Don't know what you messed up, but Tomcat 
6.0 works well with either 1.5 or 1.6 JVMs (but 1.6 is faster).

 - 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 unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: Hello

2009-02-12 Thread Mehrotra, Anurag
If you are using vista 64 bit, do not use the windows installer/exe.

Instead unzip the tomcat zip file and then create shortcuts to startup and 
shutdown batch file found under ../bin folder.

You will also have to install JRE 1.5.0. Tomcat complained about the JRE when I 
tried using the 64 bit JRE 1.6.0.11


Anurag  301-296-3838
*** Please note my email address has changed. Please update it to 
amehro...@telebright.com


The information contained in this message may be privileged and confidential 
and protected from disclosure.  If the reader of this message is not the 
intended recipient, or an employee or agent responsible for delivering this 
message to the intended recipient, you are hereby notified that any 
dissemination, distribution or copying of this communication is strictly 
prohibited. If you have received this communication in error, please notify us 
immediately by replying to the message and deleting it from your computer.

-Original Message-
From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com]
Sent: Thursday, February 12, 2009 1:47 PM
To: Tomcat Users List
Subject: RE: Hello

> From: Okey Kene [mailto:keneo...@yahoo.com]
> Subject: Hello
>
> Am using windows vista and i wish to know what version of
> apache tomcat to download.

Resisting the temptation to answer "42", you should be aware that Tomcat is 
pure Java, so any of the downloadable packages are acceptable for use on 
Windows (even the .tar.gz one).  However, due to its flexibility, I would 
recommend the .zip package over the .exe, since the .exe leaves out a few 
niceties.

Which version of Tomcat you want depends on the requirements of the webapps you 
wish to use under Tomcat; nearly all webapps will run properly under the latest 
version (currently 6.0.18), so that would be the usual choice.

 - 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 unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Hello

2009-02-12 Thread Steve

Caldarale, Charles R wrote:

From: Okey Kene [mailto:keneo...@yahoo.com]
Subject: Hello

Am using windows vista and i wish to know what version of
apache tomcat to download.


Resisting the temptation to answer "42", ..


i was going to say the unisex version. but i did answer more appropriately.

ok am done now.

--
eats the blues for breakfast,
does unix for rent,
plays harp for food,
will play the flute for kicks
rides for the freedom
scrapes for the challenge

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: Hello

2009-02-12 Thread Caldarale, Charles R
> From: Okey Kene [mailto:keneo...@yahoo.com]
> Subject: Hello
>
> Am using windows vista and i wish to know what version of
> apache tomcat to download.

Resisting the temptation to answer "42", you should be aware that Tomcat is 
pure Java, so any of the downloadable packages are acceptable for use on 
Windows (even the .tar.gz one).  However, due to its flexibility, I would 
recommend the .zip package over the .exe, since the .exe leaves out a few 
niceties.

Which version of Tomcat you want depends on the requirements of the webapps you 
wish to use under Tomcat; nearly all webapps will run properly under the latest 
version (currently 6.0.18), so that would be the usual choice.

 - 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 unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Hello

2009-02-12 Thread Steve

Okey Kene wrote:


Hi, 
Am using windows vista and i wish to know what version of apache tomcat 
to download.


cheers!
 
** 
** 
** 
** 
*


*
/Regards.../
/Okey Kene  /
 






either 5.x or 6.0
64bit or 32 bit depending on your os


--
eats the blues for breakfast,
does unix for rent,
plays harp for food,
will play the flute for kicks
rides for the freedom
scrapes for the challenge

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Hello

2009-02-12 Thread Kees Jan Koster

Dear Okey,

Am using windows vista and i wish to know what version of apache  
tomcat to download.



Any version you like.

--
Kees Jan

http://java-monitor.com/forum/
kjkos...@kjkoster.org
06-51838192

Rule 1 for being in a hole: stop digging.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Hello

2009-02-12 Thread Okey Kene
  Hi, Am using windows vista and i wish to know what version of apache tomcat to download.cheers! Regards...Okey Kene      

  

RE: hello world

2008-10-07 Thread sterling
hey guys, i just loaded onto a system with a old harddrive a replacement 
(different kind of motherboard) and updated/installed a new fedora 9.2 
version but cannot get a password to work and all of the user names have 
been changed.. 

any ideas how to get from the main on site console root access?

On Thu, 18 
Sep 2008, Caldarale, Charles R wrote:

> > From: news [mailto:[EMAIL PROTECTED] On Behalf Of thufir
> > Subject: hello world
> >
> > I'm running Ubuntu:
> > [EMAIL PROTECTED]:~$
> 
> I thought mentats weren't supposed to use computers...
> 
> > Do I need to install Tomcat 5.5 from Ubuntu
> 
> We've had no end of problems with 3rd-party repackaged versions of Tomcat.  
> I'd strongly recommend you throw that one away, then download and install a 
> real Tomcat from tomcat.apache.org (latest version recommended, of course).  
> Otherwise, perhaps Ubuntu support could help.
> 
>  - Chuck
> 
> 
> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
> MATERIAL and is thus for use only by the intended recipient. If you received 
> this in error, please contact the sender and delete the e-mail and its 
> attachments from all computers.
> 
> -
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

-- 


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



Re: hello world

2008-09-23 Thread thufir
On Sun, 21 Sep 2008 16:54:33 -0400, H. Hall wrote:


> When I installed Netbeans 6.1, the installer also installed Tomcat
> 6.0.14. This was on a windows pc but I would find it very amazing if the
> Linux version of NB6.1  installed a TC 5.5.  Is is possible that a
> tomcat installed with Ubuntu?


Ah, looking at:

http://download.netbeans.org/netbeans/6.1/final/

I see that some versions of NB do include Tomcat -- interesting.

So far as I can tell this isn't the case for Ubuntu, though.

Ubuntu can install Tomcat 5.5 through the package manager,
and then I may have installed the plug-in for Tomcat 6...?

I dunno.

It seems to be working with the upstream tomcat 6
and NB 6.  With Java 6, does this mean that the arrival
of the four horsemen is imminent!?

Anyhow, I expressed my frustration on the Ubuntu
mailing list and received a confirmation and then a
"works for me", along with an advisory not to run
Tomcat as root.


-Thufir


-
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: hello world

2008-09-21 Thread H. Hall

thufir wrote:

This cuts across IDE, OS and server.

I'm running Ubuntu:

[EMAIL PROTECTED]:~$ 
[EMAIL PROTECTED]:~$ cat /etc/lsb-release 
DISTRIB_ID=Ubuntu

DISTRIB_RELEASE=8.04
DISTRIB_CODENAME=hardy
DISTRIB_DESCRIPTION="Ubuntu 8.04.1"
[EMAIL PROTECTED]:~$ 
[EMAIL PROTECTED]:~$ sudo apt-get update; sudo apt-get upgrade;

sudo apt-get dist-upgrade
...

which, near as I can tell, is fully updated.  I'm also
running Netbeans 6.0.1 and Java 6, and Tomcat 5.5.  (If Ubuntu is up
to date, why isn't Netbeans and Tomcat?  anyhow.)
  


When I installed Netbeans 6.1, the installer also installed Tomcat 
6.0.14. This was on a windows pc but I would find it very amazing if the 
Linux version of NB6.1  installed a TC 5.5.  Is is possible that a 
tomcat installed with Ubuntu?




>From Netbeans I've installed the Tomcat plug-in, which
seems to have resulted in two Tomcat directories:

/usr/share/tomcat5.5
/usr/share/tomcat5.5-webapps

When I go to create a new web application from the IDE, Netbeans
prompts for the user/password for a manager and the path to
Catalina.
  

Is this the tomcat manager app?

If so, the user name is ide.  You can find and set the password by 
clicking on the 'Services' Tab in NetBeans, then expand the 'Servers' 
tab. You should see the Tomcat server and its version listed beside a 
tomcat icon.

Right click on the icon.and when the menu pops up click on 'properties'.
A window pops up, click on the 'connections' tab.

You should see a lot of information including where Catalina Home and 
Catalina Base are located. You will also see credentials for the 
manager. The username is ide, click on the "show" button to see the 
password.


You have to start tomcat manually, NB does not start it for you. Close 
the properties windown and Rt click on the tomcat icon you saw earlier 
and click start.  Make sure you don't have another tomcat already 
running and using the same port number.


cheers,
HH

Which version of Tomcat are they referencing?  Do I need to install
Tomcat 5.5 from Ubuntu, or just the plug-in from Netbeans?

Just not quite sure how to get started.  Navigating to "localhost"
just gives "it works", so I'll have to dig further into fixing
tomcat.

It just seems that the one thing depends on another, which goes in
a circle so that I'm not even sure of my question.




-Thufir


  



--
H. Hall
ReedyRiver Group LLC
http://www.reedyriver.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: hello world

2008-09-19 Thread thufir
On Fri, 19 Sep 2008 10:10:20 -0400, Steve Ochani wrote:


>> Now rather than recriminating at aeternum, does anyone know how to
>> track down said packager, so that maybe he could come here and see the
>> errors of his ways, or at least explain his logic here ? Same as for
>> Debian Tomcat5.5 itself, I haven't a clue where to start.

Wouldn't this be the starting place?  Yeah, I'm a tad bitter at wasting
my time.

> I remember a while back someone from Ubuntu posting on this list stating
> that if someone needs help getting their tomcat package working that the
> person should ask in their forums.

that kinda makes sense.

> So that might be a place to start
> looking for the packager or at least someone who can answer why the
> packages are so ... non functional.


I got tomcat working satisfactorily by following:

http://www.howtogeek.com/howto/linux/installing-tomcat-6-on-ubuntu/

I haven't fully tested it, but I did set up a manager role and so forth.

For the life of me, I can't see why the incredibly simple how-to is
*not* what synaptic does under ubuntu.  They should just remove
it from synaptic.

By the way, I thought that the JAVA_HOME environment variable
was passe?

I'm going to make a post to the ubuntu mailing list asking "why?".



-Thufir


-
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: hello world

2008-09-19 Thread Steve Ochani
Send reply to:  Tomcat Users List 
Date sent:  Fri, 19 Sep 2008 09:09:11 +0200
From:   André Warnier <[EMAIL PROTECTED]>
To: Tomcat Users List 
Subject:    Re: hello world


> Now rather than recriminating at aeternum, does anyone know how to
> track down said packager, so that maybe he could come here and see the
> errors of his ways, or at least explain his logic here ? Same as for
> Debian Tomcat5.5 itself, I haven't a clue where to start.
>

I remember a while back someone from Ubuntu posting on this list stating that 
if someone
needs help getting their tomcat package working that the person should ask in 
their forums.
So that might be a place to start looking for the packager or at least someone 
who can
answer why the packages are so ... non functional.


-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: hello world

2008-09-19 Thread Martin Gainty

once the real tomcat is installed..start logging..
http://tomcat.apache.org/tomcat-5.5-doc/logging.html

Martin 
__ 
Disclaimer and confidentiality note 
Everything in this e-mail and any attachments relates to the official business 
of Sender. This transmission is of a confidential nature and Sender does not 
endorse distribution to any party other than intended recipient. Sender does 
not necessarily endorse content contained within this transmission. 


> Date: Fri, 19 Sep 2008 09:09:11 +0200
> From: [EMAIL PROTECTED]
> To: users@tomcat.apache.org
> Subject: Re: hello world
> 
> Caldarale, Charles R wrote:
> >> From: news [mailto:[EMAIL PROTECTED] On Behalf Of thufir
> >> Subject: Re: hello world
> >>
> >> If Apache installs then why not tomcat?
> > 
> > Apache is a software organization with numerous products; if by "Apache" 
> > you mean httpd, it may be because the 3rd-party developers are more 
> > familiar with it so less likely to screw it up.  For Tomcat, they seem to 
> > take great delight in scattering its files all over, using symlinks to try 
> > to link it all back up, along with highly modified startup/shutdown scripts 
> > that add minor niceties but break anything but basic operation.
> > 
> > Use a real Tomcat, and see what happens.
> > 
> >  - Chuck
> Hi.
> I usually do not agree with Chuck on the subject of the 
> benefits/inconvenients of third-party Tomcat packages.
> 
> But I must admit that, concerning Tomcat 5.x and Debian/Ubuntu, I do 
> agree with the comment above.  The packager in that instance seems to 
> have a great imagination and a lot of fun scattering Tomcat all over the 
> place, in a way that makes it hard even to find out where to begin 
> unraveling the spaghetti-bowl of symlinks and directories.
> 
> Apparently, for Tomcat5.5, it is even so that installing the basic 
> Tomcat5.5 package (tomcat5.5) results in a Tomcat which starts up, but 
> answers with a blank page and an error 400 "no Host matches servername 
> localhost" when you try to access it via localhost:8180 (although there 
> is only one  in server.xml, named "localhost").
> 
> You need to install the additional package tomcat5.5-webapps (which 
> installs the webapps in some base directory different from Tomcat 
> itself) to start seeing something (the basic Tomcat Welcome page).
> 
> I kind of imagine that this is because if Tomcat starts, but has 
> absolutely no documents or applications to serve in its document root, 
> it answers with that cryptic error message.
> 
> Now rather than recriminating at aeternum, does anyone know how to track 
> down said packager, so that maybe he could come here and see the errors 
> of his ways, or at least explain his logic here ? Same as for Debian 
> Tomcat5.5 itself, I haven't a clue where to start.
> 
> 
> 
> -
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

_
Want to do more with Windows Live? Learn “10 hidden secrets” from Jamie.
http://windowslive.com/connect/post/jamiethomson.spaces.live.com-Blog-cns!550F681DAD532637!5295.entry?ocid=TXT_TAGLM_WL_domore_092008

Re: hello world

2008-09-19 Thread André Warnier

Caldarale, Charles R wrote:

From: news [mailto:[EMAIL PROTECTED] On Behalf Of thufir
Subject: Re: hello world

If Apache installs then why not tomcat?


Apache is a software organization with numerous products; if by "Apache" you 
mean httpd, it may be because the 3rd-party developers are more familiar with it so less 
likely to screw it up.  For Tomcat, they seem to take great delight in scattering its 
files all over, using symlinks to try to link it all back up, along with highly modified 
startup/shutdown scripts that add minor niceties but break anything but basic operation.

Use a real Tomcat, and see what happens.

 - Chuck

Hi.
I usually do not agree with Chuck on the subject of the 
benefits/inconvenients of third-party Tomcat packages.


But I must admit that, concerning Tomcat 5.x and Debian/Ubuntu, I do 
agree with the comment above.  The packager in that instance seems to 
have a great imagination and a lot of fun scattering Tomcat all over the 
place, in a way that makes it hard even to find out where to begin 
unraveling the spaghetti-bowl of symlinks and directories.


Apparently, for Tomcat5.5, it is even so that installing the basic 
Tomcat5.5 package (tomcat5.5) results in a Tomcat which starts up, but 
answers with a blank page and an error 400 "no Host matches servername 
localhost" when you try to access it via localhost:8180 (although there 
is only one  in server.xml, named "localhost").


You need to install the additional package tomcat5.5-webapps (which 
installs the webapps in some base directory different from Tomcat 
itself) to start seeing something (the basic Tomcat Welcome page).


I kind of imagine that this is because if Tomcat starts, but has 
absolutely no documents or applications to serve in its document root, 
it answers with that cryptic error message.


Now rather than recriminating at aeternum, does anyone know how to track 
down said packager, so that maybe he could come here and see the errors 
of his ways, or at least explain his logic here ? Same as for Debian 
Tomcat5.5 itself, I haven't a clue where to start.




-
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: hello world

2008-09-18 Thread Caldarale, Charles R
> From: news [mailto:[EMAIL PROTECTED] On Behalf Of thufir
> Subject: Re: hello world
>
> If Apache installs then why not tomcat?

Apache is a software organization with numerous products; if by "Apache" you 
mean httpd, it may be because the 3rd-party developers are more familiar with 
it so less likely to screw it up.  For Tomcat, they seem to take great delight 
in scattering its files all over, using symlinks to try to link it all back up, 
along with highly modified startup/shutdown scripts that add minor niceties but 
break anything but basic operation.

Use a real Tomcat, and see what happens.

 - 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: hello world

2008-09-18 Thread thufir
On Thu, 18 Sep 2008 09:50:18 -0500, Caldarale, Charles R wrote:

>> Do I need to install Tomcat 5.5 from Ubuntu
> 
> We've had no end of problems with 3rd-party repackaged versions of
> Tomcat.

Ok, yeah, I've seen mention of that, but thought that must be in error.
If Apache installs then why not tomcat?


-Thufir


-
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: hello world

2008-09-18 Thread thufir
On Thu, 18 Sep 2008 11:02:42 -0400, Brantley Hobbs wrote:

>> I thought mentats weren't supposed to use computers...
>>   

Later on they do :)

>>   
> No matter what, the spice must flow.  If it takes a computer, it takes a
> computer.


Yes :)



-Thufir


-
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: hello world

2008-09-18 Thread Brantley Hobbs



Caldarale, Charles R wrote:

From: news [mailto:[EMAIL PROTECTED] On Behalf Of thufir
Subject: hello world

I'm running Ubuntu:
[EMAIL PROTECTED]:~$



I thought mentats weren't supposed to use computers...
  


No matter what, the spice must flow.  If it takes a computer, it takes a 
computer.



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



RE: hello world

2008-09-18 Thread Caldarale, Charles R
> From: news [mailto:[EMAIL PROTECTED] On Behalf Of thufir
> Subject: hello world
>
> I'm running Ubuntu:
> [EMAIL PROTECTED]:~$

I thought mentats weren't supposed to use computers...

> Do I need to install Tomcat 5.5 from Ubuntu

We've had no end of problems with 3rd-party repackaged versions of Tomcat.  I'd 
strongly recommend you throw that one away, then download and install a real 
Tomcat from tomcat.apache.org (latest version recommended, of course).  
Otherwise, perhaps Ubuntu support could help.

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



hello world

2008-09-18 Thread thufir
This cuts across IDE, OS and server.

I'm running Ubuntu:

[EMAIL PROTECTED]:~$ 
[EMAIL PROTECTED]:~$ cat /etc/lsb-release 
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=8.04
DISTRIB_CODENAME=hardy
DISTRIB_DESCRIPTION="Ubuntu 8.04.1"
[EMAIL PROTECTED]:~$ 
[EMAIL PROTECTED]:~$ sudo apt-get update; sudo apt-get upgrade;
sudo apt-get dist-upgrade
...

which, near as I can tell, is fully updated.  I'm also
running Netbeans 6.0.1 and Java 6, and Tomcat 5.5.  (If Ubuntu is up
to date, why isn't Netbeans and Tomcat?  anyhow.)

>From Netbeans I've installed the Tomcat plug-in, which
seems to have resulted in two Tomcat directories:

/usr/share/tomcat5.5
/usr/share/tomcat5.5-webapps

When I go to create a new web application from the IDE, Netbeans
prompts for the user/password for a manager and the path to
Catalina.

Which version of Tomcat are they referencing?  Do I need to install
Tomcat 5.5 from Ubuntu, or just the plug-in from Netbeans?

Just not quite sure how to get started.  Navigating to "localhost"
just gives "it works", so I'll have to dig further into fixing
tomcat.

It just seems that the one thing depends on another, which goes in
a circle so that I'm not even sure of my question.




-Thufir


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



Re: Tomcat 5.5.23: Cannot Deploy hello-world.war

2007-06-18 Thread Mark Hawkes
Thanks very much for the troubleshooting Chuck. This completely solved 
the problem and shaved a couple dozen bytes off my war file :)


Caldarale, Charles R wrote:
From: Mark Hawkes [mailto:[EMAIL PROTECTED] 
Subject: Re: Tomcat 5.5.23: Cannot Deploy hello-world.war


$ cat META-INF/context.xml
 reloadable="true" debug="0">

 




Take out the path and docBase attributes - they're not allowed when the
 element is in META-INF/context.xml.  However, the real problem
is that there's no checkInterval attribute documented for  -
that's what's causing the error message you see; the entire 
element should just be removed.

 - Chuck


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

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





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



Re: Tomcat 5.5.23: Cannot Deploy hello-world.war

2007-06-16 Thread Martin Gainty

I would recommend..Either..

in your Application's ./META-INF/.xml
specify docBase
http://tomcat.apache.org/tomcat-5.0-doc/config/context.html
docBase is defined as
The Document Base (also known as the Context Root) directory for this web 
application, or the pathname to the web application archive file (if this 
web application is being executed directly from the WAR file). You may 
specify an absolute pathname for this directory or WAR file, or a pathname 
that is relative to the appBase directory of the owning Host.

an example should be located in $CATALINA_HOME/webapps/admin/admin.xml

OR
in $CATALINA_HOMEconf/server.xml for - Original Message - 
From: "Mark Hawkes" <[EMAIL PROTECTED]>

To: "Tomcat Users List" 
Sent: Friday, June 15, 2007 5:48 PM
Subject: Re: Tomcat 5.5.23: Cannot Deploy hello-world.war



Caldarale, Charles R wrote:
From: Mark Hawkes [mailto:[EMAIL PROTECTED] Subject: RE: Tomcat 5.5.23: 
Cannot Deploy hello-world.war


The structure looks good.


META-INF/context.xml
WEB-INF/web.xml



What's in the above two files?


$ cat META-INF/context.xml

  



$ cat WEB-INF/web.xml


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

version="2.4">
  Hello World
  
An application that outputs a text/plain response of the string
"Hello World"
  

  
HelloWorld
com.markhawkes.misc.HelloWorldServlet
  
  
HelloWorld
/HelloWorld
  



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





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



RE: Tomcat 5.5.23: Cannot Deploy hello-world.war

2007-06-15 Thread Caldarale, Charles R
> From: Mark Hawkes [mailto:[EMAIL PROTECTED] 
> Subject: Re: Tomcat 5.5.23: Cannot Deploy hello-world.war
> 
> $ cat META-INF/context.xml
>reloadable="true" debug="0">
>   
> 

Take out the path and docBase attributes - they're not allowed when the
 element is in META-INF/context.xml.  However, the real problem
is that there's no checkInterval attribute documented for  -
that's what's causing the error message you see; the entire 
element should just be removed.

 - 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: Tomcat 5.5.23: Cannot Deploy hello-world.war

2007-06-15 Thread Mark Hawkes

Caldarale, Charles R wrote:
From: Mark Hawkes [mailto:[EMAIL PROTECTED] 
Subject: RE: Tomcat 5.5.23: Cannot Deploy hello-world.war


The structure looks good.


META-INF/context.xml
WEB-INF/web.xml



What's in the above two files?


$ cat META-INF/context.xml

  



$ cat WEB-INF/web.xml


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

version="2.4">
  Hello World
  
An application that outputs a text/plain response of the string
"Hello World"
  

  
HelloWorld
com.markhawkes.misc.HelloWorldServlet
  
  
HelloWorld
/HelloWorld
  



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



RE: Tomcat 5.5.23: Cannot Deploy hello-world.war

2007-06-15 Thread Caldarale, Charles R
> From: Mark Hawkes [mailto:[EMAIL PROTECTED] 
> Subject: RE: Tomcat 5.5.23: Cannot Deploy hello-world.war

The structure looks good.

> META-INF/context.xml
> WEB-INF/web.xml

What's in the above two files?

 - 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: Tomcat 5.5.23: Cannot Deploy hello-world.war

2007-06-15 Thread Mark Hawkes
On Fri, 2007-06-15 at 11:21 -0500, Caldarale, Charles R wrote:
> > From: Mark Hawkes [mailto:[EMAIL PROTECTED] 
> > Subject: RE: Tomcat 5.5.23: Cannot Deploy hello-world.war
> > 
> > I've erased my CLASSPATH environment variable but
> > I still have the exact same error in catalina.out
> > when Tomcat starts up.
> 
> What exactly is in your hello-world.war file?  Have you made any changes
> to conf/server.xml or any of the other .xml files in the conf directory?

$ jar -tf hello-world.war
META-INF/
META-INF/MANIFEST.MF
META-INF/context.xml
WEB-INF/
WEB-INF/web.xml
WEB-INF/lib/
WEB-INF/classes/
WEB-INF/classes/com/
WEB-INF/classes/com/markhawkes/
WEB-INF/classes/com/markhawkes/misc/
WEB-INF/classes/com/markhawkes/misc/HelloWorldServlet.class
javascript/

I haven't edited any config files except
$CATALINA_HOME/conf/tomcat-users.xml so I could add myself as a user of
the Tomcat manager app. In all other respects, it's a clean, untouched
installation.

> 
>  - Chuck
> 
> 
> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
> MATERIAL and is thus for use only by the intended recipient. If you
> received this in error, please contact the sender and delete the e-mail
> and its attachments from all computers.
> 
> -
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


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



RE: Tomcat 5.5.23: Cannot Deploy hello-world.war

2007-06-15 Thread Caldarale, Charles R
> From: Mark Hawkes [mailto:[EMAIL PROTECTED] 
> Subject: RE: Tomcat 5.5.23: Cannot Deploy hello-world.war
> 
> I've erased my CLASSPATH environment variable but
> I still have the exact same error in catalina.out
> when Tomcat starts up.

What exactly is in your hello-world.war file?  Have you made any changes
to conf/server.xml or any of the other .xml files in the conf directory?

 - 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: Tomcat 5.5.23: Cannot Deploy hello-world.war

2007-06-15 Thread Mark Hawkes
Thanks for the info. I've erased my CLASSPATH environment variable but I
still have the exact same error in catalina.out when Tomcat starts up.

On Fri, 2007-06-15 at 09:49 -0500, Caldarale, Charles R wrote:
> > From: Mark Hawkes [mailto:[EMAIL PROTECTED] 
> > Subject: RE: Tomcat 5.5.23: Cannot Deploy hello-world.war
> 
> Looks like you have the same classes being loaded by multiple
> classloaders.
> 
> > CLASSPATH = 
> > .:/apache-tomcat-5.5.23/common/lib/servlet-api.jar:
> > /apache-tomcat-5.5.23/common/lib/jsp-api.jar
> 
> None of that should be in the CLASSPATH; in fact, you should not be
> using the CLASSPATH environment variable at all with Tomcat.  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]
> 


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



RE: Tomcat 5.5.23: Cannot Deploy hello-world.war

2007-06-15 Thread Caldarale, Charles R
> From: Mark Hawkes [mailto:[EMAIL PROTECTED] 
> Subject: RE: Tomcat 5.5.23: Cannot Deploy hello-world.war

Looks like you have the same classes being loaded by multiple
classloaders.

> CLASSPATH = 
> .:/apache-tomcat-5.5.23/common/lib/servlet-api.jar:
> /apache-tomcat-5.5.23/common/lib/jsp-api.jar

None of that should be in the CLASSPATH; in fact, you should not be
using the CLASSPATH environment variable at all with Tomcat.  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: Tomcat 5.5.23: Cannot Deploy hello-world.war

2007-06-15 Thread Mark Hawkes
The error's exactly the same if I deploy the war file using the manager
webapp's deploy feature. Here's what appears in catalina.out when I
undeploy and then redeploy hello-world.war:

--
Jun 15, 2007 3:28:35 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive hello-world.war
Jun 15, 2007 3:28:37 PM org.apache.commons.modeler.Registry
registerComponent
SEVERE: Null component
Catalina:type=JspMonitor,name=jsp,WebModule=//localhost/hello-world,J2EEApplication=none,J2EEServer=none
--

Btw this war file runs perfectly on another Linux box running Tomcat
5.5.17 and Java 1.5.0_06. I'm confused :-/

On Fri, 2007-06-15 at 16:10 +0200, neocollec wrote:
> Mark, i suggest you ti use the tomcat manager tool.
> 
> Connecting to your manager webapp, you will be able to send a war package and 
> deploy it successfully.
> 
> Your error sounds your mapping is wrong, because tomcat does not seem to find 
> your servlet.
> 
> Have a good day, and i recommend you to work with good tools.
> 
> Neocollec
> 
> 
> 
> 
> ----
> > Subject: Tomcat 5.5.23: Cannot Deploy hello-world.war
> > From: [EMAIL PROTECTED]
> > To: users@tomcat.apache.org
> > Date: Fri, 15 Jun 2007 14:00:16 +0100
> > 
> > Hi all,
> > 
> > I have a HelloWorld servlet. Real simple. Packaged as hello-world.war. 
> > I copy it to $CATALINA_HOME/webapps. My environment:
> > 
> > Operating System: Fedora Core 5 Linux 2.6.15-1.2054
> > Java Version: 1.6.0-b105
> > JAVA_HOME = /opt/SDK/jdk
> > CATALINA_HOME = /apache-tomcat-5.5.23
> > CLASSPATH
> > = 
> > .:/apache-tomcat-5.5.23/common/lib/servlet-api.jar:/apache-tomcat-5.5.23/common/lib/jsp-api.jar
> > 
> > When I run $CATALINA_HOME/bin/startup.sh, the following appears in 
> > catalina.out. Note the SEVERE message...
> > 
> > - BEGIN -
> > Jun 15, 2007 1:14:15 PM org.apache.catalina.core.AprLifecycleListener
> > lifecycleEvent
> > INFO: The Apache Tomcat Native library which allows optimal performance
> > in production environments was not found on the
> > java.library.path: 
> > /opt/SDK/jdk/jre/lib/i386/client:/opt/SDK/jdk/jre/lib/i386:/opt/SDK/jdk/jre/../lib/i386:/usr/java/packages/lib/i386:/lib:/usr/lib
> > Jun 15, 2007 1:14:15 PM org.apache.coyote.http11.Http11BaseProtocol init
> > INFO: Initializing Coyote HTTP/1.1 on http-8080
> > Jun 15, 2007 1:14:15 PM org.apache.catalina.startup.Catalina load
> > INFO: Initialization processed in 1349 ms
> > Jun 15, 2007 1:14:15 PM org.apache.catalina.core.StandardService start
> > INFO: Starting service Catalina
> > Jun 15, 2007 1:14:15 PM org.apache.catalina.core.StandardEngine start
> > INFO: Starting Servlet Engine: Apache Tomcat/5.5.23
> > Jun 15, 2007 1:14:15 PM org.apache.catalina.core.StandardHost start
> > INFO: XML validation disabled
> > Jun 15, 2007 1:14:16 PM org.apache.catalina.startup.HostConfig deployWAR
> > INFO: Deploying web application archive hello-world.war
> > Jun 15, 2007 1:14:16 PM org.apache.commons.modeler.Registry
> > registerComponent
> > SEVERE: Null component
> > Catalina:type=JspMonitor,name=jsp,WebModule=//localhost/hello-world,J2EEApplication=none,J2EEServer=none
> > Jun 15, 2007 1:14:17 PM org.apache.coyote.http11.Http11BaseProtocol
> > start
> > INFO: Starting Coyote HTTP/1.1 on http-8080
> > Jun 15, 2007 1:14:17 PM org.apache.jk.common.ChannelSocket init
> > INFO: JK: ajp13 listening on /0.0.0.0:8009
> > Jun 15, 2007 1:14:17 PM org.apache.jk.server.JkMain start
> > INFO: Jk running ID=0 time=0/35  config=null
> > Jun 15, 2007 1:14:17 PM org.apache.catalina.storeconfig.StoreLoader load
> > INFO: Find registry server-registry.xml at classpath resource
> > Jun 15, 2007 1:14:17 PM org.apache.catalina.startup.Catalina start
> > INFO: Server startup in 2332 ms
> > - END -
> > 
> > Any clues? Here's the application's web.xml and context.xml files:
> > 
> > $ cat $CATALINA_HOME/webapps/hello-world/WEB-INF/web.xml
> > 
> > 
> >  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
> > xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
> > web-app_2_4.xsd"
> > version="2.4">
> >   Hello World
> >   
> > An application that outputs a text/plain response of the string
> > "Hello World"
> >   
> > 
> >   
> > HelloWorld
> > com.markhawkes.misc.HelloWorldServlet
> >   
> >   
> > HelloWorld
> > /HelloWo

RE: Tomcat 5.5.23: Cannot Deploy hello-world.war

2007-06-15 Thread neocollec

Mark, i suggest you ti use the tomcat manager tool.

Connecting to your manager webapp, you will be able to send a war package and 
deploy it successfully.

Your error sounds your mapping is wrong, because tomcat does not seem to find 
your servlet.

Have a good day, and i recommend you to work with good tools.

Neocollec





> Subject: Tomcat 5.5.23: Cannot Deploy hello-world.war
> From: [EMAIL PROTECTED]
> To: users@tomcat.apache.org
> Date: Fri, 15 Jun 2007 14:00:16 +0100
> 
> Hi all,
> 
> I have a HelloWorld servlet. Real simple. Packaged as hello-world.war. 
> I copy it to $CATALINA_HOME/webapps. My environment:
> 
> Operating System: Fedora Core 5 Linux 2.6.15-1.2054
> Java Version: 1.6.0-b105
> JAVA_HOME = /opt/SDK/jdk
> CATALINA_HOME = /apache-tomcat-5.5.23
> CLASSPATH
> = 
> .:/apache-tomcat-5.5.23/common/lib/servlet-api.jar:/apache-tomcat-5.5.23/common/lib/jsp-api.jar
> 
> When I run $CATALINA_HOME/bin/startup.sh, the following appears in 
> catalina.out. Note the SEVERE message...
> 
> - BEGIN -
> Jun 15, 2007 1:14:15 PM org.apache.catalina.core.AprLifecycleListener
> lifecycleEvent
> INFO: The Apache Tomcat Native library which allows optimal performance
> in production environments was not found on the
> java.library.path: 
> /opt/SDK/jdk/jre/lib/i386/client:/opt/SDK/jdk/jre/lib/i386:/opt/SDK/jdk/jre/../lib/i386:/usr/java/packages/lib/i386:/lib:/usr/lib
> Jun 15, 2007 1:14:15 PM org.apache.coyote.http11.Http11BaseProtocol init
> INFO: Initializing Coyote HTTP/1.1 on http-8080
> Jun 15, 2007 1:14:15 PM org.apache.catalina.startup.Catalina load
> INFO: Initialization processed in 1349 ms
> Jun 15, 2007 1:14:15 PM org.apache.catalina.core.StandardService start
> INFO: Starting service Catalina
> Jun 15, 2007 1:14:15 PM org.apache.catalina.core.StandardEngine start
> INFO: Starting Servlet Engine: Apache Tomcat/5.5.23
> Jun 15, 2007 1:14:15 PM org.apache.catalina.core.StandardHost start
> INFO: XML validation disabled
> Jun 15, 2007 1:14:16 PM org.apache.catalina.startup.HostConfig deployWAR
> INFO: Deploying web application archive hello-world.war
> Jun 15, 2007 1:14:16 PM org.apache.commons.modeler.Registry
> registerComponent
> SEVERE: Null component
> Catalina:type=JspMonitor,name=jsp,WebModule=//localhost/hello-world,J2EEApplication=none,J2EEServer=none
> Jun 15, 2007 1:14:17 PM org.apache.coyote.http11.Http11BaseProtocol
> start
> INFO: Starting Coyote HTTP/1.1 on http-8080
> Jun 15, 2007 1:14:17 PM org.apache.jk.common.ChannelSocket init
> INFO: JK: ajp13 listening on /0.0.0.0:8009
> Jun 15, 2007 1:14:17 PM org.apache.jk.server.JkMain start
> INFO: Jk running ID=0 time=0/35  config=null
> Jun 15, 2007 1:14:17 PM org.apache.catalina.storeconfig.StoreLoader load
> INFO: Find registry server-registry.xml at classpath resource
> Jun 15, 2007 1:14:17 PM org.apache.catalina.startup.Catalina start
> INFO: Server startup in 2332 ms
> - END -
> 
> Any clues? Here's the application's web.xml and context.xml files:
> 
> $ cat $CATALINA_HOME/webapps/hello-world/WEB-INF/web.xml
> 
> 
>  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
> xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
> web-app_2_4.xsd"
> version="2.4">
>   Hello World
>   
> An application that outputs a text/plain response of the string
> "Hello World"
>   
> 
>   
> HelloWorld
> com.markhawkes.misc.HelloWorldServlet
>   
>   
> HelloWorld
> /HelloWorld
>   
> 
> 
> 
> 
> $ cat $CATALINA_HOME/conf/Catalina/localhost/hello-world.xml
>  debug="0">
>   
> 
> 
> 
> All the servlet examples at http://localhost:8080/servlets-examples/
> work fine. But if I request http://localhost:8080/hello-world/HelloWorld
> I get HTTP 500 with the following stack trace:
> 
> 
> javax.servlet.ServletException: Error allocating a servlet instance
> 
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
> 
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
> 
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:870)
>   org.apache.coyote.http11.Http11BaseProtocol
> $Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
> 
> org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
> 
> org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
>   org.apache.tomcat.util.threads.ThreadPool
> $ControlRunnable.run(ThreadPool.java:685)
>   java.lang.Thread.run

Tomcat 5.5.23: Cannot Deploy hello-world.war

2007-06-15 Thread Mark Hawkes
Hi all,

I have a HelloWorld servlet. Real simple. Packaged as hello-world.war. 
I copy it to $CATALINA_HOME/webapps. My environment:

Operating System: Fedora Core 5 Linux 2.6.15-1.2054
Java Version: 1.6.0-b105
JAVA_HOME = /opt/SDK/jdk
CATALINA_HOME = /apache-tomcat-5.5.23
CLASSPATH
= 
.:/apache-tomcat-5.5.23/common/lib/servlet-api.jar:/apache-tomcat-5.5.23/common/lib/jsp-api.jar

When I run $CATALINA_HOME/bin/startup.sh, the following appears in 
catalina.out. Note the SEVERE message...

- BEGIN -
Jun 15, 2007 1:14:15 PM org.apache.catalina.core.AprLifecycleListener
lifecycleEvent
INFO: The Apache Tomcat Native library which allows optimal performance
in production environments was not found on the
java.library.path: 
/opt/SDK/jdk/jre/lib/i386/client:/opt/SDK/jdk/jre/lib/i386:/opt/SDK/jdk/jre/../lib/i386:/usr/java/packages/lib/i386:/lib:/usr/lib
Jun 15, 2007 1:14:15 PM org.apache.coyote.http11.Http11BaseProtocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
Jun 15, 2007 1:14:15 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1349 ms
Jun 15, 2007 1:14:15 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Jun 15, 2007 1:14:15 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.5.23
Jun 15, 2007 1:14:15 PM org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
Jun 15, 2007 1:14:16 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive hello-world.war
Jun 15, 2007 1:14:16 PM org.apache.commons.modeler.Registry
registerComponent
SEVERE: Null component
Catalina:type=JspMonitor,name=jsp,WebModule=//localhost/hello-world,J2EEApplication=none,J2EEServer=none
Jun 15, 2007 1:14:17 PM org.apache.coyote.http11.Http11BaseProtocol
start
INFO: Starting Coyote HTTP/1.1 on http-8080
Jun 15, 2007 1:14:17 PM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
Jun 15, 2007 1:14:17 PM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/35  config=null
Jun 15, 2007 1:14:17 PM org.apache.catalina.storeconfig.StoreLoader load
INFO: Find registry server-registry.xml at classpath resource
Jun 15, 2007 1:14:17 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 2332 ms
- END -

Any clues? Here's the application's web.xml and context.xml files:

$ cat $CATALINA_HOME/webapps/hello-world/WEB-INF/web.xml


http://java.sun.com/xml/ns/j2ee";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
web-app_2_4.xsd"
version="2.4">
  Hello World
  
An application that outputs a text/plain response of the string
"Hello World"
  

  
HelloWorld
com.markhawkes.misc.HelloWorldServlet
  
  
HelloWorld
/HelloWorld
  




$ cat $CATALINA_HOME/conf/Catalina/localhost/hello-world.xml

  



All the servlet examples at http://localhost:8080/servlets-examples/
work fine. But if I request http://localhost:8080/hello-world/HelloWorld
I get HTTP 500 with the following stack trace:


javax.servlet.ServletException: Error allocating a servlet instance

org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)

org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)

org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:870)
org.apache.coyote.http11.Http11BaseProtocol
$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)

org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)

org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
org.apache.tomcat.util.threads.ThreadPool
$ControlRunnable.run(ThreadPool.java:685)
java.lang.Thread.run(Thread.java:619)

root cause

java.lang.NoClassDefFoundError: javax/servlet/http/HttpServlet
java.lang.ClassLoader.defineClass1(Native Method)
java.lang.ClassLoader.defineClass(ClassLoader.java:620)
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)

org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1847)

org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:873)

org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1326)

org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1205)

org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)

org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)

org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:870)
org.apache.coyote.http11.Http11BaseProtocol
$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)

org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)

o

hello

2006-01-04 Thread remm
The message cannot be represented in 7-bit ASCII encoding and has been sent as 
a binary attachment.


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