Using jasper

2009-10-21 Thread Ben Short
Hi,

I would like to use the Jasper jsp compiler to compile jsp's that I
read from a database/jackrabbit/inputstream can anyone give me any
pointers?

Regards

Ben Short

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



Re: Using jasper

2009-10-21 Thread Ben Short
Hi Mark,

Id like to store my jsp files in a database. When a request comes into
my web app I want to look up the jsp file based on the requested url,
compile it, instantiate it, cast it to a servlet and call the service
method.

My application will be spring based.

Now I come to think about it when I get the request I could save the
jsp file to WEB-INF/jsp and then let tomcat handle the compilation if
needed. I'd have to check that the lastmod time of the db version is
greater than the file version before saving it to WEB-INF/jsp.

Regards

Ben Short

2009/10/21 Mark Thomas ma...@apache.org:
 Ben Short wrote:
 Hi,

 I would like to use the Jasper jsp compiler to compile jsp's that I
 read from a database/jackrabbit/inputstream can anyone give me any
 pointers?

 Can you provide a little more context? Eg is thsi standalone or as part of a
 running Tomcat instance?

 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



Limit connections to tomcat via mod_jk

2009-02-04 Thread ben short
Hi,

We have Apache Httpd 2.4.4 in front of Tomcat 6.0.13 and are using
mod_jk to talk between them.
Apache Httpd is using prefork configured to allow 256 processes.
Tomcat also has 256 threads available.

When a user requests a page one call to the Tomcat is made followed by
many requests to get static content served up by Apache Httpd.

When under load we find that pages take a long time to load due to the
number of requests. We believe that by increasing the number of Apache
Httpd processes available the pages should load faster as the majority
of requests are for static content.

What we need to be able to do is limit the number of concurrent
requests from Apache Httpd to Tomcat. Meaning that we could have 768
Apache processes available for static content and 256 threads for
tomcat.

Is something like this possible?

Regards

Ben Short

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



Re: Memory for Multiple instances

2008-04-04 Thread ben short
If on linux you can add the following to your init script.

export JAVA_OPTS=[JVM ARGUMENTS_HERE]

then the catalinia.sh will pass them to the jvm on startup.

Regards

Ben Short

On Fri, Apr 4, 2008 at 1:59 PM, Peter Sparkes [EMAIL PROTECTED] wrote:
 Hi,

  I am running multiple instances of Tomcat5.5 on a Linux (Debian) machine.

  I want to set different heap sizes for each instance. Please is there a way
 of setting the available memory in the individual Tomcat instances startup
 scripts

  Thank you

  Peter Sparkes

  -
  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: Sending FAX in JSP

2008-03-22 Thread ben short
Have a look at this...

http://www.java4less.com/java_fax.htm

On Sat, Mar 22, 2008 at 7:07 PM, Onur Tüzüntürk [EMAIL PROTECTED] wrote:
  Hello to everyone,
  i'm studying JSP and Apache Tomcat Server for the project in my school (
  online food ordering site )
  i have to send fax including the order details to the restaurant but i don't
  know anything about fax in jsp and apache.
  my teacher adviced me to write an algorithm in the server that is used, for
  sending customers' requests to the restaurant as a fax. but i have no idea
  about writing code for apache server. Can you help me about this topic? i
  will be very glad . thanks


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



Re: Hi

2008-01-16 Thread ben short
Sounds like your code might have a memory leak.

The best thing todo is to profile the application and see where all
the memory is being used.

On Jan 16, 2008 8:52 AM, Katama Reddy [EMAIL PROTECTED] wrote:
 Hi,

 I was facing an issue in one of the web application which was deployed in
 Apache Tomcat server. The issue was getting out of memory error after 2-3
 months of deployment and happening frequently(after every 2-3 months). It
 would be great if some one suggest the reasons for occurring this issue.
 The application was build on JSF(MyFaces implementation), Spring and
 Hibernate technologies.

 Thanks
 Katama Reddy Chinnapapi Reddy Gari
 Tata Consultancy Services
 Mailto: [EMAIL PROTECTED]
 Website: http://www.tcs.com
 
 Experience certainty.   IT Services
 Business Solutions
 Outsourcing
 
 =-=-=
 Notice: The information contained in this e-mail
 message and/or attachments to it may contain
 confidential or privileged information. If you are
 not the intended recipient, any dissemination, use,
 review, distribution, printing or copying of the
 information contained in this e-mail message
 and/or attachments to it are strictly prohibited. If
 you have received this communication in error,
 please notify us by reply e-mail or telephone and
 immediately and permanently delete the message
 and any attachments. Thank you




-
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: Forwarding with jkmount

2008-01-09 Thread ben short
While I was attempting to use rewrite and jk i found that you need to
load the jk module before the rewrite module, so be warned ;)

On Jan 9, 2008 10:53 AM, Rainer Jung [EMAIL PROTECTED] wrote:
 Hi Edwin,

 Edwin Walsh wrote:
  Hi,
 
  First of all I would like to mention that this is my first post on this
  list, I hope that this question is posted in the right place. I have
  tried finding a solution for my problem, but it either doesn't exist, or
  my limited brain can't manage to figure out how to do it (I strongly
  hope it is the latter)

 In fact the solution to the problem is non-trivial :)


  The situation is the following:
  Currently we have several web applications running on a Tomcat 6 server.
  For the sake of this explanation I will call then web1 and web2.
  I have apache set up to use jkmount to forward requests from the apache
  server to the tomcat server. The problem is that I can only get apache
  to forward things like www.esat.kuleuven.be/web1 and
  www.esat.kuleuven.be/web2.
 
  I would like to be able to forward things like
  www.esat.kuleuven.be//somefancyname//web1 to the same application on the
  Tomcat server.
 
  I know this is possible with ProxyPassReverse in apache, but I would
  like to be able to do this with jkmount so that I keep the possibility
  to easily jump to a backup server if the main server goes down (Tomcat
  crashes more often for us then the http server does).
 
  To add to the problem, the web applications I am talking about are
  updates from earlier versions. We still have the older versions running
  on older versions of Tomcat and the forwarding rules of
  www.esat.kuleuven.be/web1 need to continue to point to the old server.
 
  As far as I can tell using the location tag in the apache conf file will
  not help since it seems to me that jkmount takes that location as a
  parameter to forward to Tomcat. And since my application is called web1
  and not somefancyname/web1 it cant find it in the web applications folder.
 
  Using a subdomain in a virtualhost could probably fix the problem in a
  way that I could use /somefancyname/.esat.kuleuven.be/web1 for the new
  web application, but it is very unlikely that our system administrators
  will allow us to set up this subdomain. And even if they would it isn't
  really the url I was hoping for.
 
  So in sumary, what I would like is 2 types of links:
  www.esat.kuleuven.be/web1 to point to the older web application
  www.esat.kuleuven.be//somefancyname//web1 to point to the new web
  application (both have the same name but are on a different tomcat server)

 I think the solution should have 2 ingredients:

 1) Make sure, that /web/ and /something/web match different JkMounts

 JkMount /web1|/* oldworker
 JkMount /?*/web1|/* newworker

 ? matches one character, so the second rule won't match /web1/...,
 except for /web1/.../web1/...

 The | character is a shortcut form for 2 rules in one:

 JkMount /web1|/* oldworker

 is equivalent to

 JkMount /web1 oldworker
 JkMount /web1/* oldworker

 2) Rewrite request to remove /something before forwarding

 Have a look at mod_rewrite. With mod_rewrite you can change the URL with
 a pattern based syntax. In order to forward the changed URL and not the
 original URL through mod_jk, you need to also set the pass through flag
 [PT] in mod_rewrite

 Now the only thing I'm not sure at the moment is, if in case you rewrite
 the URL via mod_rewrite, the JkMounts are handeled before the rewrite
 (then this should work) or after (then it would obvisouly not).

 Play around a bit with the ideas, set JkLogLevel to debug and use a
 RewriteLog with a high level, so you can follow the URL manipulation and
 mapping in the log.

 If rewrite is done before JkMount, we'll have another solution :)

  Any help would be welcome.
  With kind regards,
  Edwin

 Regards,

 Rainer


 -
 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: fifo queue

2008-01-04 Thread ben short
Add something like the following to your servlet

synchronized ( someObject )
   {
   do work
   }

But you'll need to be careful, as requests will block and clients
might time out if you are performing lengthy operations inside the
synchronized block.

On Jan 4, 2008 11:12 AM, Marco Caldirola [EMAIL PROTECTED] wrote:
 Hi,
 I need to create on my tomcat 6.0 server a fifo queue of my http requests.
 I want to process a single request at a time.
 Do you have an idea?
 Thanks in advance.
 Marco




   ___
 L'email della prossima generazione? Puoi averla con la nuova Yahoo! Mail: 
 http://it.docs.yahoo.com/nowyoucan.html

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



Tomcat 6.0.13 Expire sessions via manager webapp

2007-12-17 Thread ben short
Hi,

Does the 'Expire Sessions' button on the manager webapp work as
everytime I click it I just get shown a list of session counts as
shown below..

OK - Session information for application at context path /
Default maximum session inactive interval 30 minutes
1 minutes:157 sessions
1 - 2 minutes:171 sessions
2 - 3 minutes:153 sessions
3 - 4 minutes:144 sessions
4 - 5 minutes:179 sessions
5 - 6 minutes:135 sessions
6 - 7 minutes:146 sessions
7 - 8 minutes:154 sessions
8 - 9 minutes:175 sessions
9 - 10 minutes:159 sessions
10 - 11 minutes:146 sessions
11 - 12 minutes:132 sessions
12 - 13 minutes:171 sessions
13 - 14 minutes:144 sessions
14 - 15 minutes:182 sessions
15 - 16 minutes:150 sessions
16 - 17 minutes:142 sessions
17 - 18 minutes:144 sessions
18 - 19 minutes:144 sessions
19 - 20 minutes:153 sessions
20 - 21 minutes:147 sessions
21 - 22 minutes:157 sessions
22 - 23 minutes:176 sessions
23 - 24 minutes:131 sessions
24 - 25 minutes:150 sessions
25 - 26 minutes:144 sessions
26 - 27 minutes:128 sessions
27 - 28 minutes:147 sessions
28 - 29 minutes:113 sessions
=30 minutes:36264 sessions

Also shouldn't the 36K sessions that =30 Min's get expired?

Regards

Ben Short

-
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: multithreaded with taglibs

2007-11-29 Thread ben short
Do you really need to use tomcat to do this? Maybe you should take a
step back and rethink what your trying to achieve.

On Nov 29, 2007 10:14 AM, Yair Ben-Meir [EMAIL PROTECTED] wrote:
 Let me try another scenario: let say that the generated text for the out
 is not one iamge, but some number between 0 and 5. the correct number of
 images will be clear only after the execution of the thread. In this case, I
 do want to continue with the JSP and write to the out later on.
 The only think I thought of was to write something like {1} (instead of
 tag) and when the page is over it will replace {1} with the right code
 from the thread. This will require me to get the generated page from the JSP
 and manipulate it after Jasper has finished with it.
 Any better way to do it?

 -Original Message-
 From: Christopher Schultz [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, November 28, 2007 7:04 PM
 To: Tomcat Users List
 Subject: Re: multithreaded with taglibs


 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 Yair,

 Yair Ben-Meir wrote:
  This solution is good but we must write to the out of the jsp before the
  thread is running (we bypass this because the thread will write to a
  pre-decided file name). is there another way to do it, without writing to
  the out?

 I'm not sure I understand what you mean. Are you asking how to continue
 evaluating the JSP while the image is being generated? Easy. Create a
 class like this:

 public class ParallelImageGenerator
 {
 public ParallelImageGenerator() { ... }

 public String getGeneratedFilename() { ... }

 public void start() { ... }
 public void wait() { ... }
 }

 Then, from your tagStart method in your custom tag library, do something
 like this:

 pig = new ParallelImageGenerator();
 pig.start();

 jspOut.print(img src=\ + pig.getGeneratedFilename() + \ /);

 // Register the 'pig' object somewhere so you can go back and wait
 // on all of the image generators.

 - -chris

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

 iD8DBQFHTZ9n9CaO5/Lv0PARAkxKAKCP/PK410pUbBTrWxS9G5fIhE6aYgCfb6dJ
 0RnxBh6+CfToeccD3lgS/6M=
 =Iksk
 -END PGP SIGNATURE-

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



 -
 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: multithreaded with taglibs

2007-11-26 Thread ben short
Yair,

I created a eshop website that dynamically re sizes images depending
on the url. Here is a simple outline of what happens.

A new product is created by the shop admin. Images are then uploaded
and stored in a database in the uploaded size.

When a product page is viewed the controller ( im using spring ) pulls
the product object from the db and passes it to the view, a jsp page.

The jsp then generates a image tag as show below.

img width=175px name=mainImage
src=productimages/69_s_medium.jpg title=Kitchen Stove and
Utensils/

The browser then renders the page, when it finds a image tag it then
uses another thread to load the image. this is standard browser
behavior.

The productimages url is mapped to another controller, that parses the
url. The first part of the url is the image id, the next part is tells
it that the part after that is a size rather than a dimension. The
controller knows the expected dimensions for a medium image.

The controller then pulls the image from the db and resizes it before
sending it to the browser. The controller is actually smarter than
that, and does on disk caching of resized images and check the last
mod time, but i wont detail that here.

So what is happening here is the browser is rendering the html created
by the jsp page and then making another request to get the images,
which is then making tomcat use another thread to generate the image.
Sound like what your trying to achieve?

Ben

On Nov 26, 2007 10:15 AM, David Cassidy [EMAIL PROTECTED] wrote:
 Errr

 how will you allow people to access the file over the internet with a
 file:// protocol ?

 are you only running the app and the users browser on the same machine ?

 file://C:\My Documents\image.gif

 ?

 Can't see that working over the internet



 On Sun, 2007-11-25 at 13:56 +0200, Yair Ben-Meir wrote:
  Thanks, but that's not good for me, I need the page to be with a real file
  link (file://), not through a servlet.
 
 
  -Original Message-
  From: Pid [mailto:[EMAIL PROTECTED]
  Sent: Sunday, November 25, 2007 11:53 AM
  To: Tomcat Users List
  Subject: Re: multithreaded with taglibs
 
  Yair Ben-Meir wrote:
   Let say that the tag will have to generate the image with a text given as
  an
   attribute, and it takes time so I want the page to continue:
  
   my:img src=file text=first/
  
   .
  
   my:img src=file text=first/
 
  Why are you doing this with a tag, rather than sending the parameter to
  a servlet that serves an image into it's output stream?
 
  You exploit the browsers own request handling capabilities this way.
 
  img src=/img-app/generate?param1=some+text+here alt=an image /
 
 
  p
 
 
 
   -Original Message-
   From: David Cassidy [mailto:[EMAIL PROTECTED]
   Sent: Thursday, November 22, 2007 6:08 PM
   To: Tomcat Users List
   Subject: Re: multithreaded with taglibs
  
   Hi
  
   What is your tag going to produce ?
   is it an IMG SRC=. type tag ?
  
   or how are you allowing the browser to access the image ?
  
   Ta
  
   D
  
   On Thu, 2007-11-22 at 14:57 +0200, Yair Ben-Meir wrote:
   Hi
  
   Is there a way to write a taglib that will do a multithreading work?
   Meaning, that tomcatwill not wait till the first instance of the tag
   will end, and continue to the rest of the page, and maybe start with
   another instance, and than it will insert the result of each instance
   in the right place?
  
  
  
   Example:
  
   my:img name=/
  
   .
  
   my:img name=/
  
  
  
   And let say that each my:img is supposed to download the image and
   save it locally or something like that, and I don't want tomcat to
   wait till the first tag is finished.
  
  
  
  
  
   Thanks
  
  
  
  
  
   Yair Ben-Meir
  
  
  
   Office: 073-7997801
  
   Fax: 073-7997800
  
   Mob:   054-5769681
  
  
  
  
  
  
  
  
   -
   To start a new topic, e-mail: users@tomcat.apache.org
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
  
  
  
   -
   To start a new topic, e-mail: users@tomcat.apache.org
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
 
 
  -
  To start a new topic, e-mail: users@tomcat.apache.org
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 
  -
  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 

Re: Increase JAVA Heap size when Tomcat start

2007-11-26 Thread ben short
Look at the catalina.bat or catalina.sh specifically at the JAVA_OPTS
environment var

On Nov 26, 2007 3:51 PM, Jean-Pierre Astier [EMAIL PROTECTED] wrote:
 Hello all,

 I want to use a J2ee application (Magnolia), but I need to increase
 the java heap size when tomcat (5.5.25) start.

 What is the solution ?

 Thanks

 Jean-Pierre

 -
 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: speed up the server

2007-11-07 Thread ben short
So your webapp ran pretty fast before it was deployed?

Your going to need to provide much more information. Like OS and
versions of tomcat, java, database etc and maybe some metrics on how
long it takes to process the requests.

Also you will want to use a profiler to figure out what part of the
app is 'taking' so long.

With out knowing such things all we can really say is...

Buy a faster machine.
Code you app so it works faster.

;)

Ben


On Nov 7, 2007 10:21 AM, tbt [EMAIL PROTECTED] wrote:

 Hi

 I'm a newbie to tomcat and i'm using it for a web application. But currently
 the application is running a bit slow once deployed. Are there any ways to
 speed up the request/response time in tomcat.

 Thanks
 --
 View this message in context: 
 http://www.nabble.com/speed-up-the-server-tf4763782.html#a13624531
 Sent from the Tomcat - User mailing list archive at Nabble.com.


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



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



host-manager

2007-10-10 Thread ben short
Hi,

I was trying out the host-manager last night and wanted to confirm
what I was seeing is expected behaviour.

I created a new virtual host and deployed a war to it. All when OK and
when using the test.domain.com url I could access the war deployed to
the virtual host.

But after I restarted tomcat the virtual host had gone from the
host-manager. Should this happen or am I correct in thinking that the
host-manager is a work in progress and the virtual host configuration
isn't persisted currently.

Regards

Ben Short

-
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: Over 70 instances of Tomcat after startup

2007-10-08 Thread ben short
Probably worth posting the /rel/tomcat/bin/start_apps.sh script as it
sounds like it could be suspect.

On 10/8/07, Ray Statham [EMAIL PROTECTED] wrote:
 Afternoon,

 This is my first posting to this list and after breifly checking the
 archives I hope this question is not a duplicate: -

 I have an unusual problem with my previously stable container which now
 generates over 70 instance on startup. This container has been working
 correctly
 for over 12 months, and I am assured by our dev team that no discrete
 modifications have been made. On startup this output is generated: -

 start_apps MerchantAdmin
 Starting MerchantAdmin
 Using CATALINA_BASE: /rel/apps/MerchantAdmin
 Using CATALINA_HOME: /rel/tomcat
 Using CATALINA_TMPDIR: /rel/apps/MerchantAdmin/temp
 Using JAVA_HOME: /usr/lib/java
 /rel/tomcat/bin/start_apps.sh: line 36: 30725
 30727
 30728
 30729
 30730
 30731
 30732
 30733
 30734
 30735
 30736: syntax error in expression (error token is 30727
 30728
 30729
 30730
 30731
 30732
 30733
 30734
 30735
 30736)

 After a min or so, the following number of instances are running: -

   ps aux | grep -c MerchantAdmin
 71

 I would be very grateful for any assistance with this problem..

 Kind regards

 Ray Statham

 -
 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 6 on ubuntu linux(Fiesty Fawn)

2007-10-08 Thread ben short
I have tomcat 6 running on fiesty with jdk 1.6 and have the following
in my init script...

JAVA_HOME=/usr/lib/jvm/java-6-sun-1.6.0.00



On 10/8/07, Arun [EMAIL PROTECTED] wrote:
 Hi ,

 My webapp hangs on tomcat. I have struts,spring and hibernate on it.
 I was getting an OutOfMemory error initially, on clicking each of the
 links.  I thought the problem could be jvm's .
 when I did ls -alt /usr/bin/java , it pointed to
 /usr/local../alternatives/java..
 and java -version gave gij 1.4.2. What is that?
 I thought this could be the reason since my javac -version pointed to jdk1.6
 .
 I changed the symlink to point to jdk1.6 java by issuing
 ln -s /usr/local/jdk../java  /usr/bin/java

 But my webapp is now hanging? Is there any reason?






 --
 Thanks
 Arun George


-
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 6 on ubuntu linux(Fiesty Fawn)

2007-10-08 Thread ben short
Right I installed the jdk from apt as follows..

sudo apt-get install sun-java6-jdk

Much easier that messing about with a bin file..

Then set it up using the following command...

sudo update-java-alternatives -s java-6-sun

How are you starting tomcat? From a script in /etc/init.d ?

How did you install tomcat on the box? via apt-get or did you download
from http://tomcat.apache.org/download-60.cgi?

Regards

Ben


On 10/8/07, Arun [EMAIL PROTECTED] wrote:
 Ben,

 I installed jdk from jdk-6u1-linux-i586.bin.
 Still my path has not updated, I have to manually point the symlink . Is
 this not suns's jdk?
 Am I not using the correct jdk?

  grep -r -i JAVA_HOME=/usr/lib/jvm/java-6-sun-1.6.0.00 -l /usr did not
 give me a valid entry either. ?


 [EMAIL PROTECTED]:~/downloads# cd /usr/lib/jvm/
 java-1.4.2-gcj-4.1-1.4.2.0/  java-gcj/   .java-gcj.jinfo

 My jvm directory looks like this.

 On 10/8/07, ben short [EMAIL PROTECTED] wrote:
 
  I have tomcat 6 running on fiesty with jdk 1.6 and have the following
  in my init script...
 
  JAVA_HOME=/usr/lib/jvm/java-6-sun-1.6.0.00
 
 
 
  On 10/8/07, Arun [EMAIL PROTECTED] wrote:
   Hi ,
  
   My webapp hangs on tomcat. I have struts,spring and hibernate on it.
   I was getting an OutOfMemory error initially, on clicking each of the
   links.  I thought the problem could be jvm's .
   when I did ls -alt /usr/bin/java , it pointed to
   /usr/local../alternatives/java..
   and java -version gave gij 1.4.2. What is that?
   I thought this could be the reason since my javac -version pointed to
  jdk1.6
   .
   I changed the symlink to point to jdk1.6 java by issuing
   ln -s /usr/local/jdk../java  /usr/bin/java
  
   But my webapp is now hanging? Is there any reason?
  
  
  
  
  
  
   --
   Thanks
   Arun George
  
 
  -
  To start a new topic, e-mail: users@tomcat.apache.org
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 


 --
 Thanks
 Arun George


-
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 6 on ubuntu linux(Fiesty Fawn)

2007-10-08 Thread ben short
Don't worry about removing it for now

follow the steps i showed you to install jdk 1.6 and then set it as
what gets executed when you type java at the prompt

On 10/8/07, Arun [EMAIL PROTECTED] wrote:
 How to remove ?
 apt-get remove? what is the name for this?
 I dont know the name.. Am I using the right jdk?

 On 10/8/07, Caldarale, Charles R [EMAIL PROTECTED] wrote:
 
   From: Arun [mailto:[EMAIL PROTECTED]
   Subject: Re: Tomcat 6 on ubuntu linux(Fiesty Fawn)
  
   [EMAIL PROTECTED]:~/downloads# cd /usr/lib/jvm/
   java-1.4.2-gcj-4.1-1.4.2.0/  java-gcj/
   .java-gcj.jinfo
 
  That's the semi-functional GNU JVM implementation.  Strongly suggest you
  remove it, since it's known to cause problems with complex applications
  such as Tomcat.
 
  - Chuck
 
 
  THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
  MATERIAL and is thus for use only by the intended recipient. If you
  received this in error, please contact the sender and delete the e-mail
  and its attachments from all computers.
 
  -
  To start a new topic, e-mail: users@tomcat.apache.org
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 


 --
 Thanks
 Arun George


-
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 6 on ubuntu linux(Fiesty Fawn)

2007-10-08 Thread ben short
Hmm,

Well here they are again...


Right I installed the jdk from apt as follows..

sudo apt-get install sun-java6-jdk

Much easier that messing about with a bin file..

Then set it up using the following command...

sudo update-java-alternatives -s java-6-sun

How are you starting tomcat? From a script in /etc/init.d ?

How did you install tomcat on the box? via apt-get or did you download
from http://tomcat.apache.org/download-60.cgi?

Regards

Ben

On 10/8/07, Arun [EMAIL PROTECTED] wrote:
 sorry, you did not include the steps to install jdk1.6 in this conversation.

 On 10/8/07, ben short [EMAIL PROTECTED] wrote:
 
  Don't worry about removing it for now
 
  follow the steps i showed you to install jdk 1.6 and then set it as
  what gets executed when you type java at the prompt
 
  On 10/8/07, Arun [EMAIL PROTECTED] wrote:
   How to remove ?
   apt-get remove? what is the name for this?
   I dont know the name.. Am I using the right jdk?
  
   On 10/8/07, Caldarale, Charles R [EMAIL PROTECTED] wrote:
   
 From: Arun [mailto:[EMAIL PROTECTED]
 Subject: Re: Tomcat 6 on ubuntu linux(Fiesty Fawn)

 [EMAIL PROTECTED]:~/downloads# cd /usr/lib/jvm/
 java-1.4.2-gcj-4.1-1.4.2.0/  java-gcj/
 .java-gcj.jinfo
   
That's the semi-functional GNU JVM implementation.  Strongly suggest
  you
remove it, since it's known to cause problems with complex
  applications
such as Tomcat.
   
- Chuck
   
   
THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE
  PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the
  e-mail
and its attachments from all computers.
   
-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
   
   
  
  
   --
   Thanks
   Arun George
  
 
  -
  To start a new topic, e-mail: users@tomcat.apache.org
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 


 --
 Thanks
 Arun George


-
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: What new in Tomcat 6.0 ?

2007-09-05 Thread ben short
Might give you some ideas...

http://tomcat.apache.org/whichversion.html


On 9/5/07, Ashish Jain [EMAIL PROTECTED] wrote:
 Hi All!!

  I am new to Tomcat. Can someone tell me what is new in Tomcat 6.0 compared
 to the last version.

 Thanks in advance

 Regards
 Ashish


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



JK Loadbalancer not balancing fairly

2007-08-23 Thread ben short
Hi All,

We are doing some load testing on our setup and find that the cpu use
age of tomcat reported by top on the two systems is not equal.
Typically we see figures like ~400% to 800% cpu on one machine and
~50% on the other machine for the java process. We would expect that
the two cpu values to be equal.

The jkstatus page on box one shows the following after a restart.
Although before a restart the Max column was showing 250 for jcpres1
and 32 for jcpres2.

NameTypeHostAddrAct State   D   F   M   V   
Acc Err CE  RE  Wr  Rd  BusyMax Route   RR  
Cd  Rs
jcpres1 ajp13   172.16.4.11:8009172.16.4.11:8009ACT 
OK  0   1   1   869 42762   4   0   939K
286M1   11  jcpres1 
0/0
jcpres2 ajp13   172.16.4.12:8009172.16.4.12:8009ACT 
OK  0   1   1   869 42772   1   0   943K
280M2   9   jcpres2 
0/0

and box 2

NameTypeHostAddrAct State   D   F   M   V   
Acc Err CE  RE  Wr  Rd  BusyMax Route   RR  
Cd  Rs
jcpres1 ajp13   172.16.4.11:8009172.16.4.11:8009ACT 
OK  0   1   1   484 38720   4   0   850K
256M3   10  jcpres1 
0/0
jcpres2 ajp13   172.16.4.12:8009172.16.4.12:8009ACT 
OK  0   1   1   483 38710   4   0   850K
260M1   10  jcpres2 
0/0


Our system setup.

Both machines are running the the following software on RedHat 4ES

Httpd 2.2.4
Mod JK 1.2.25
Tomcat 6.0.12
Java 1.6.0_01

Box 1.

workers.properties

# JK Status worker config

worker.list=jkstatus
worker.jkstatus.type=status

# Presentaton Load Balancer Config

worker.list=preslb

worker.preslb.type=lb
worker.preslb.balance_workers=jcpres1,jcpres2
worker.preslb.sticky_session=1

worker.jcpres1.port=8009
worker.jcpres1.host=172.16.4.11
worker.jcpres1.type=ajp13
worker.jcpres1.lbfactor=1
worker.jcpres1.fail_on_status=503,400,500,909

worker.jcpres2.port=8009
worker.jcpres2.host=172.16.4.12
worker.jcpres2.type=ajp13
worker.jcpres2.lbfactor=1
worker.jcpres2.fail_on_status=503,400,500,909


Box 2.

workers.properties

# JK Status worker config

worker.list=jkstatus
worker.jkstatus.type=status

# Presentaton Load Balancer Config

worker.list=preslb

worker.preslb.type=lb
worker.preslb.balance_workers=jcpres1,jcpres2
worker.preslb.sticky_session=1

worker.jcpres1.port=8009
worker.jcpres1.host=172.16.4.11
worker.jcpres1.type=ajp13
worker.jcpres1.lbfactor=1
worker.jcpres1.fail_on_status=503,400,500,909

worker.jcpres2.port=8009
worker.jcpres2.host=172.16.4.12
worker.jcpres2.type=ajp13
worker.jcpres2.lbfactor=1
worker.jcpres2.fail_on_status=503,400,500,909

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

2007-08-21 Thread ben short
In what way do you want to manage them?

Are you aware of the manager webapp [1] ?

[1] http://tomcat.apache.org/tomcat-6.0-doc/manager-howto.html



On 8/21/07, Andrew Hole [EMAIL PROTECTED] wrote:
 Hello!

 I've lot of tomcat instances running around the world and I want an easy way
 to manager each one, using some simple manager tool.
 DO you suggest something?
 Some plugin to eclipse?

 Thanks a lot


-
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: POJO Application Server for Tomcat

2007-08-19 Thread ben short
The link to your site times out.

On 8/19/07, Johnny Kewl [EMAIL PROTECTED] wrote:
 I'd like to show you guys something that I think may blow your minds.

 Firstly let me just say that I call myself a hobbyist, dont consider myself 
 in the same league as the guru's that work on Tomcat and Apache, but I do 
 spend an enormous amount of time playing with technology. One can almost 
 measure how much I like a technology by how much time I stay in the mailing 
 lists, on Postgresql I think it was 3 months, and I really like that product, 
 on Tomcat it must be close to a year and still counting, what a fantastic 
 product.

 In our office Tomcat is now officially the delivery mechanism for everything.
  First I was impressed with Tomcats web abilities, then more and more with 
 its container ability, we discovered that it can run any code, and even if it 
 wasnt intended for the web, we started sticking applications into Tomcat 
 anywaythat idea has now come a long way.

 I call it a POJO Application server, I've mentioned before that we actually 
 popping full java applications out of browsers, but then it was very much 
 something only I could use, messy libraries etc. What I've done now is (try) 
 make a more professional package, and it would be really nice if the guru's 
 just have a little read about this unbelievable servlet, and let me know what 
 you think, if just to see how someone is using your Tomcat, in a very unusual 
 way.

 As you will see, I dont like EJB containers, but I love Tomcat, and it was 
 almost inevitable that this would happen.
 All I will say is that this is no ordinary application server... not unless I 
 missed something and you can also just drop a POJO application into the 
 others and make it remoteable.

 I think its a new way of looking at application servers, it feels like a 
 discovery to me, but then who knows maybe there is something out there like 
 this, I dont know, all I do know is that when we drop this servlet into 
 Tomcat, we run POJO applications over the wire as if they were right their on 
 the client machine, the same applications that will also run standalone on 
 the machine. Its so different that I really struggled to find the relevent 
 theory behind this technology, I think I'm close, but any pointers or 
 corrections would be much appreciated there as well.

 Anyway, would just like to thank all the Tomcat'ers that have helped me out, 
 people like Chuck, Bill, Christopher, Leon, David, Mark, Mladen... and if I 
 forgotten you, sorry, so many, it really is the best mailing list on the web.

 Oh! you'll see its only certified for Tomcat ;)
 Only thing left to do now is see if I get Tomcat to make coffee, and clean 
 the pool... and maybe get this to run on something fishy, you know, just in 
 case someone needs a real application server ;)

 Thanks  http://coolharbor.100free.com/index.htm
 Johnny

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



Re: Load Balancing

2007-08-15 Thread ben short
If your workers.properties file contains nothing then it will
defiantly prevent the application from functioning correctly.

Have you forgotten to paste the workers.properties in to the email?

On 8/15/07, Dean Lonsdale [EMAIL PROTECTED] wrote:

 Resend of the last mail removing signature attachments,

 We have built a workers.properties file to incorporate load balancing
 however when we use this file it would appear that it prevents the
 application from functioning correctly, please can anyone comment on whether
 the load balancing parameters are set correctly.

 Many thanks






  




 Unless stated otherwise above:
  IBM United Kingdom Limited - Registered in England and Wales with number
 741598.
  Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU









 -
 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: Multi-Gigabyte Uploads, Tomcat 2GB and higher uploads

2007-08-15 Thread ben short
Hi,

Have a look at the commons-fileupload [1], it should help you out.

Ben

[1] http://commons.apache.org/fileupload/

On 8/15/07, David Hesson [EMAIL PROTECTED] wrote:
 I am dealing with a client who needs multi-gigabyte uploads (4GB+,
 whatever he wants really, and he says it is needed/required by the
 system.)  Anyways, I currently upload a 4GB file to my Tomcat server,
 and it is set to simply post to a JSP with the file (please note that
 files 2GB work fine, forms are set up fine), and that JSP page is never
 reached.  It simply looks like Tomcat is invoking the servlets/target of
 the request or this is because something hasn't been dealt with yet in
 the request to cause this action.  My logs are all clean of errors,
 however, and the filter chain works fine (to some extent, it loops
 forever with this request because it is waiting for it to be dealt
 with).  I receive log messages in beforeProcessing, process, and
 afterProcessing.  However, the JSP is never hit, or if I post the file
 to a servlet, the servlet is never invoked.  I have already tried
 configuring the connector to use maxPostSize=0, as well as setting the
 maxHttpHeaderSize variable.  I am clearly at a loss of what to do.  I
 also tried creating a Request Listener whenever requests are created but
 the request never gets a contentLength or contentType.  The server
 simply begins looping the filter chain over and over and over and never
 hits my servlet/upload.jsp page.

 Any help would be greatly appreciated.

 David


 -
 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 and path with pound sign (#) - ClassNotFoundException

2007-08-08 Thread ben short
Why not just change it to /export/home/markus/tomcat_1 or something
and be done with it. Is trying to make it work with a # really worth
the time an effort? Think in terms of hours spent * hourly rate or
hour spent that you could be doing something else.

Just my opinion.

On 8/8/07, Markus Schiegl [EMAIL PROTECTED] wrote:
 Hi,

 as far as i see the shell has no problems passing the # character.
 I've added ps auxwww |grep java after the java call in catalina.sh,
 just to verify the java-program itself is called with the correct
 values, see below:

 $ ~/tomcat#1/apache-tomcat-6.0.13/bin$ ./startup.sh
 Using CATALINA_BASE:  /export/home/markus/tomcat#1/apache-tomcat-6.0.13
 Using CATALINA_HOME:   /export/home/markus/tomcat#1/apache-tomcat-6.0.13
 Using CATALINA_TMPDIR:
 /export/home/markus/tomcat#1/apache-tomcat-6.0.13/temp
 Using JRE_HOME:   /usr/java
 markus2877  0.6  1.842428 8964 pts/1R 23:20:06  0:00
 /usr/java/bin/java
 -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
 -Djava.util.logging.config.file=/export/home/markus/tomcat#1/apache-tomcat-6.0.13/conf/logging.properties
 -Djava.endorsed.dirs=/export/home/markus/tomcat#1/apache-tomcat-6.0.13/endorsed
 -classpath
 :/export/home/markus/tomcat#1/apache-tomcat-6.0.13/bin/bootstrap.jar:/export/home/markus/tomcat#1/apache-tomcat-6.0.13/bin/commons-logging-api.jar
 -Dcatalina.base=/export/home/markus/tomcat#1/apache-tomcat-6.0.13
 -Dcatalina.home=/export/home/markus/tomcat#1/apache-tomcat-6.0.13
 -Djava.io.tmpdir=/export/home/markus/tomcat#1/apache-tomcat-6.0.13/temp
 org.apache.catalina.startup.Bootstrap start
 $ ~/tomcat#1/apache-tomcat-6.0.13/bin$ pwd
 /export/home/markus/tomcat#1/apache-tomcat-6.0.13/bin
 $ ~/tomcat#1/apache-tomcat-6.0.13/bin$

 thanks!

 kind regards,
Markus

 P.S shell commands with # between or after other characters are ok, e.g.
 $ echo bla # 1
 bla
 $ echo bla#1
 bla#1
 $ echo bla#
 bla#

 Fargusson.Alan wrote:
  The # character starts a comment in the shell.  Try quoting the pathname, 
  or put a \ in front of the #.
 
  I would bet that your mkdir and cd commands didn't do what you think they 
  did.
 
  -Original Message-
  From: Markus Schiegl [mailto:[EMAIL PROTECTED]
  Sent: Wednesday, August 08, 2007 1:54 PM
  To: users@tomcat.apache.org
  Subject: Tomcat and path with pound sign (#) - ClassNotFoundException
 
 
  Hi there,
 
  starting Tomcat from a path containing a pound sign (#) somewhere
  results in a ClassNotFoundException.
 
  I've checked this with
  - Solaris Sparc/X86 + Mac OS X
  - Java 5 + 6
  - Tomcat 5.5.23 + 6.0.13
 
  example:
  - mkdir /export/home/markus/tomcat#1
  - extract tomcat within this directory
  - export JAVA_HOME=/usr/java (JDK 6)
  - /export/home/markus/tomcat#1/apache-tomcat-6.0.13/bin/startup.sh
or
cd /export/home/markus/tomcat#1/apache-tomcat-6.0.13/bin ; ./startup.sh
 
  output from catalina.sh with the java call (added set -x to catalina.sh
  - i.e. no problem of the calling script omitting something)
 
  /usr/java/bin/java
  -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
  -Djava.util.logging.config.file=/export/home/markus/tomcat#1/apache-tomcat-6.0.13/conf/logging.properties
  -Djava.endorsed.dirs=/export/home/markus/tomcat#1/apache-tomcat-6.0.13/endorsed
  -classpath
  :/export/home/markus/tomcat#1/apache-tomcat-6.0.13/bin/bootstrap.jar:/export/home/markus/tomcat#1/apache-tomcat-6.0.13/bin/commons-logging-api.jar
  -Dcatalina.base=/export/home/markus/tomcat#1/apache-tomcat-6.0.13
  -Dcatalina.home=/export/home/markus/tomcat#1/apache-tomcat-6.0.13
  -Djava.io.tmpdir=/export/home/markus/tomcat#1/apache-tomcat-6.0.13/temp
  org.apache.catalina.startup.Bootstrap start
 
  $cat catalina.out
  java.lang.ClassNotFoundException: org.apache.catalina.startup.Catalina
  at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
  at java.security.AccessController.doPrivileged(Native Method)
  at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
  at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
  at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
  at org.apache.catalina.startup.Bootstrap.init(Bootstrap.java:215)
  at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:390)
 
 
  truss output: path was truncated after the # sign:
 
  ...
  2717/2: read(5, CAFEBABE\0\0\0 1\00701\0.., 142)  = 142
  2717/2:
  stat64(/export/home/markus/tomcat#1/apache-tomcat-6.0.13/bin/org/apache/catalina/security/SecurityClassLoad.class,
  0xD230ABF0) Err#2 ENOENT
  2717/2: llseek(9, 1422, SEEK_SET)   = 1422
  2717/2: read(9,  P K0304\n\0\0\0\b\0F91C.., 30)   = 30
  2717/2: llseek(9, 1504, SEEK_SET)   = 1504
  2717/2: read(9, 95 W k o14 U18 ~ f [DAC3.., 1634) = 1634
  2717/2: brk(0x08172F08) = 0
  2717/2: brk(0x08176F08)  

Re: Tomcat cluster serving ~50 lines of the page when a request hits a stopped webapp for the first time

2007-08-02 Thread ben short
Rainer,

I setup a test httpd + loadbalancer with jk 1.2.24 and could reproduce
the problem over and over again. Then I patched the source and have
been unable to reproduce the problem with the patched mod_jk.so.

So the patch looks good.

Regards

Ben

On 8/1/07, ben short [EMAIL PROTECTED] wrote:
 I'll give it ago first thing tomorrow, well after a cup of tea :)

 On 8/1/07, Rainer Jung [EMAIL PROTECTED] wrote:
  hi Ben,
 
  could you try the following patch for 1.2.24:
 
  http://people.apache.org/~rjung/mod_jk-dev/patches/fail-on-status.patch
 
  I guess you can build the module yourself (it's easy: configure
  --with-apxs=PATHTOAPXS; make; make install). Now simply download the
  source of 1.2.24 and use the patch command to add the above file as a
  patch. Then build and retest. If you really can't build it yourself let
  me know.
 
  The patch is not well tested, don't go straight to production with it :)
 
  Regards,
 
  Rainer
 
  ben short wrote:
   Sure for stable operation, but what if the machine reboots, tomcat
   starts up and your webapp doesn't for some reason. This situation
   could occur then.
  
   Many thanks for your help with this one.
  
   Regards
  
   Ben
  
   On 8/1/07, Rainer Jung [EMAIL PROTECTED] wrote:
   Hi Ben,
  
   I think I understand the problem now, and it is a jk bug. For stable
   operation you should really use the disable/stop feature. Nevertheless
   I'm starting thinking about how to fix this in a good way.
  
   The bug has to do with the new fail on status feature you use. It is
   not very old, so we didn't experience the bug before.
  
   Stay tuned ...
  
   Regards,
  
   Rainer
 
  -
  To start a new topic, e-mail: users@tomcat.apache.org
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 


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



Re: Installing Tomcat on Linux

2007-08-02 Thread ben short
I would question his reason for this statement

A coworker claims that all unix admins should never install open source
binaries. They should build using the source.

On 8/2/07, Vigorito, Nicholas E. [EMAIL PROTECTED] wrote:
 I am going to install Tomcat standalone (not fronted by Apache) on a
 Linux box that will eventually be opened up to small portion of the
 outside world.

 I am a developer and as such haven't ever done anything with Tomcat
 except install the binaries on my Windows machine and run it locally for
 development purposes.

 A coworker claims that all unix admins should never install open source
 binaries. They should build using the source.

 Looking for a concensus. Is it ok to install the Tomcat binaries or
 should I build using the Tomcat source then install? Reasons why?

 Thanks!

 Nick


-
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 cluster serving ~50 lines of the page when a request hits a stopped webapp for the first time

2007-08-01 Thread ben short
Sure for stable operation, but what if the machine reboots, tomcat
starts up and your webapp doesn't for some reason. This situation
could occur then.

Many thanks for your help with this one.

Regards

Ben

On 8/1/07, Rainer Jung [EMAIL PROTECTED] wrote:
 Hi Ben,

 I think I understand the problem now, and it is a jk bug. For stable
 operation you should really use the disable/stop feature. Nevertheless
 I'm starting thinking about how to fix this in a good way.

 The bug has to do with the new fail on status feature you use. It is
 not very old, so we didn't experience the bug before.

 Stay tuned ...

 Regards,

 Rainer

 ben short wrote:
  Is length 1090 correct?`So does the full body have that length?
 
  Yes firefox reports that the page is 1k in size, via the web
  developer's tool bar. I have seen it happen in IE 6 and 7 also.
 
  Would it be possible for me to email you directly the output of
  wireshark for both one bad and one good attempt?
 
  I really appreciate you helping me out on this one.
 
  Regards
 
  Ben Short
 
  On 7/31/07, Rainer Jung [EMAIL PROTECTED] wrote:
  ben short wrote:
  Ok I have used wireshark and see that the request is sent to the
  apache httpd. The next first packet i get back contains the
  following...
 
  HTTP/1.1 200 OK
  Date: Tue, 31 Jul 2007 14:57:25 GMT
  Server: Apache/2.2.4 (Unix) mod_ssl/2.2.4 OpenSSL/0.9.7a mod_jk/1.2.23
  Content-Length: 1090   ***NOTE  every line but this has a \r\n shown
  in the middle frame of wireshark ***
  All Headers are supposed to end with \r\n, but I would find it very
  strange, if this does not do it (I can not really think of a reson for
  that, but who knows...)
 
  Cache-Control: no-cache
  Pragma: no-cache
  Expires: Thu, 01 Jan 1970 00:00:00 GMT
  Content-Language: en-GB
  Keep-Alive: timeout=5, max=100
  Connection: Keep-Alive
  Content-Type: text/html;charset=UTF-8
 
  Is length 1090 correct?`So does the full body have that length?
 
  !--Rail Timestamp:
 
  --
 
  !--Generated by Journeycheck
  4.0-RC5
  on host
  jc-pres2.nexusalpha.com
  --
  !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN
  http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd;
 
  html lang=english
  .head
  ..meta http-equiv=Content-Type content=text/html;charset=UTF-8/
  ..meta http-equiv=expires content=0/
  ..meta http-equiv=cache-control content=no-cache/
  ..meta http-equiv=pragma content=nocache/
  ..meta http-equiv=Content-Language content=en-us/
  ..meta content=Nexus Alpha:Andrew Langmead, Ben Short, Lawrence
  Chan name=author/
  ..meta content=journey check,rail,journey,nexus
  alpha,plan,disruption,transport,trains name=keywords/
  ..meta content=Allows you to check your journey with a particular
  rail company name=description/
  ..!--META HTTP-EQUIV=RefreshCONTENT=10;
  URL=http://www.jcheck.com/firstcapitalconnect/;--
  ..
  ..link href=/resources/common/web/css/common.css rel=stylesheet
  type=text/css/
  ..!--script type=text/javascript src=/resources/common/web/javascript
 
 
  Which is whats being shown in the browser, if i view the source.
 
  Next I see more packets that say 'Continuation or non-HTTP traffic'
  in the Info column of wireshark. When I look at the byte output I can
  see that its the rest of the page.
 
  If i use wireshark to view the same request with the webapp started I
  dont see the initial HTTP/1.1 200 OK packet, so i assume that each
  packet contains the correct headers for chunking to work correctly.
  But the first line is mandatory for HTTP responses! So in the good case,
  something is slipping the observation. We could ignore that, but if we
  don't see something in the good case, we must question the observation
  in the bad case too.
 
  So it seams that im getting a dodgy content length in the first packet
  if the request goes to the stoppped webapp first. Or infact the whole
  chunking thing is not working correctly.
  If there is a Cntent-Length header, there is no chunking involved.
  Chunking gives a way of telling the length of small chunks of the
  answer. For dynamic content it's often difficult to tell the full length
  in advance, but a Content-Length header has to come before the body. So
  chunking is used to prevent the need of buffering the full body before
  sending it out. The reposnse you showed us above does not use chunking,
  but instead the content-length header, which is OK and stable  for
  content with easy to determine length.
 
  Which browser is it? If you can reproduce the problem with firefox,
  there are very good plugins, that can show you details of communication
  and content from inside the browser. A good example is FireBug, which I
  can recommend. Even if you usually use MSIE, it might be important to
  cross check with Firefox in order to find out if the problem is browser
  specific.
 
  Regards,
 
  Rainer
 
  On 7/31/07, Rainer Jung [EMAIL PROTECTED] wrote:
  You could dig deeper into two different directions:
 
  - protocol

Re: Tomcat cluster serving ~50 lines of the page when a request hits a stopped webapp for the first time

2007-08-01 Thread ben short
I'll give it ago first thing tomorrow, well after a cup of tea :)

On 8/1/07, Rainer Jung [EMAIL PROTECTED] wrote:
 hi Ben,

 could you try the following patch for 1.2.24:

 http://people.apache.org/~rjung/mod_jk-dev/patches/fail-on-status.patch

 I guess you can build the module yourself (it's easy: configure
 --with-apxs=PATHTOAPXS; make; make install). Now simply download the
 source of 1.2.24 and use the patch command to add the above file as a
 patch. Then build and retest. If you really can't build it yourself let
 me know.

 The patch is not well tested, don't go straight to production with it :)

 Regards,

 Rainer

 ben short wrote:
  Sure for stable operation, but what if the machine reboots, tomcat
  starts up and your webapp doesn't for some reason. This situation
  could occur then.
 
  Many thanks for your help with this one.
 
  Regards
 
  Ben
 
  On 8/1/07, Rainer Jung [EMAIL PROTECTED] wrote:
  Hi Ben,
 
  I think I understand the problem now, and it is a jk bug. For stable
  operation you should really use the disable/stop feature. Nevertheless
  I'm starting thinking about how to fix this in a good way.
 
  The bug has to do with the new fail on status feature you use. It is
  not very old, so we didn't experience the bug before.
 
  Stay tuned ...
 
  Regards,
 
  Rainer

 -
 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 cluster serving ~50 lines of the page when a request hits a stopped webapp for the first time

2007-07-31 Thread ben short
Rainer,

Thanks for that. Yes we are going for a mix of both really. But I'll
run some bench marks against both sticky and none sticky to see how it
gets on.

Yes in production if we want to stop/undeploy/deploy a webapp we will
set the worker status to stopped. This issue came up as more of a what
if test.

Regards

Ben

On 7/30/07, Rainer Jung [EMAIL PROTECTED] wrote:
 Using sticky sessions will allow only requests without sessions to be
 balanced freely. If you've either got many sessions, or your sessions
 are relatively short, than load balancing will statistically still good.
 Only in case of few long lasting sessions, you could experience the
 problem, that some heavy-use sessions might go to the same node.

 In case you've got only two nodes and you are building an HA
 infrastructure, the optimality of the load balancing is not important,
 because one node needs to be able to carry the full load anyhow.

 Throughput oriented webapps balance best with method Request.

 Most installations I know observe a good load balancing although they
 are using stickyness. I would rate a deviation of +/- 15% load
 difference relative to the arithmetic mean over a 10 minute interval as
 good.

 Periods of low load don't count at all.

 Regards,

 Rainer

 ben short wrote:
  So how does setting sticky sessions to true and the default value for
  the Load Balancing Directive 'method' (defaults to request) interact
  then?
 
 
  On 7/30/07, Rainer Jung [EMAIL PROTECTED] wrote:
  Apart from all the other things I wrote: don't turn off session
  stickyness, even if you use replication. Turn it off only, if you've got
  a really good reason. The fact that switching the backend between
  requests is possible with replication should not lead to the assumption,
  that it is a good idea to do this continuously.
 
  ben short wrote:
  Hi Rainer,
 
  By shutdown I mean I have clicked the 'stop' link on the tomcat manager 
  page.
 
  Im also using session replication between the two tomcats.
 
  I have just tried turning off firefoxes cache and I see the same result.
 
  On 7/30/07, Rainer Jung [EMAIL PROTECTED] wrote:
  Hi Ben,
 
  I don't know what exactly you mean by shutdown, but mod_jk has no
  memory/cache/buffer for parts or all of an earlier response. It does
  buffer parts of a request for reusing it during failover, but not with
  responses and not between different requests.
 
  If the webapp is not available on the target system, there is no way how
  mod_jk could return with 50 lines of correct response. Those 50 lines
  might either come from your backend (what is shutdown), or from some
  other cache (browser, between browser and Apache, mod_cache_* inside
  Apache, between Apache and Tomcat).
 
  Nevertheless for production, I would always use a cleaner way of
  disabling a context: before undeploying first set the activation of the
  worker to stooped, which means it will no longer forward any requests
  and the load balancer will transparantly choose another worker. No
  recovery and errors.
 
  If you use sessions without replication, you could also set a worker to
  disabled before going into stopped. With disabled requests for existing
  sessions will still be forwarded, but no requests without sessions.
  Depending on your session timing the target might thus get slowly out of
  use.
 
  Also add timeouts to your config. We have a new docs page for 1.2.24
  (which will go live tomorrow). You can have a look at it under
 
  http://tomcat.apache.org/dev/dist/tomcat-connectors/jk/docs/jk-1.2.24/generic_howto/timeouts.html
 
  and consider using the option recovery_options.
 
  Regards,
 
  Rainer
 
 
  ben short wrote:
  Hi,
 
  I have a odd issue occurring with my tomcat cluster serving ~50 lines
  of the page from a stopped webapp.
 
  My setup is as follows...
 
  Box 1
 
  Apache running a jk mod loadbalancer. It loadbalances between an
  instance of tomcat on this box and on box 2.
 
  Box 2
 
  Apache running a jk mod loadbalancer. It loadbalances between an
  instance of tomcat on this box and on box 1.
 
  Software...
 
  OS RH 4
  Tomcat 6.0.13
  Java 1.6.0_01
  Apache 2.2.4
  Mod_jk 1.2.23
 
  workers.properties (same on both boxes)
 
  # JK Status worker config
 
  worker.list=jkstatus
  worker.jkstatus.type=status
 
  # Presentaton Load Balancer Config
 
  worker.list=preslb
 
  worker.preslb.type=lb
  worker.preslb.balance_workers=jcpres1,jcpres2
  worker.preslb.sticky_session=0
 
  worker.jcpres1.port=8009
  worker.jcpres1.host=192.168.6.171
  worker.jcpres1.type=ajp13
  worker.jcpres1.lbfactor=1
  worker.jcpres1.fail_on_status=503,400,500,909
 
  worker.jcpres2.port=8009
  worker.jcpres2.host=192.168.6.174
  worker.jcpres2.type=ajp13
  worker.jcpres2.lbfactor=1
  worker.jcpres2.fail_on_status=503,400,500,909
 
 
  My problem...
 
  If i stop the webapp on box 2, wait for a while and make a request I
  get about 50 lines of the expected page in my browser ( assuming the
  request went

Stop a webapp from being started when tomcat starts

2007-07-31 Thread ben short
Hi,

Is it possible to configure tomcat to not start a specific webapp when
it starts up?

Ben

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



Re: Tomcat cluster serving ~50 lines of the page when a request hits a stopped webapp for the first time

2007-07-31 Thread ben short
I have altered the code to write out which webapp generated the page
to the html, so i can see where the partial responses are comming
from.

What I see is

I stop the webapp on box 2. I make a request and I see part of the
page. The html shows that the partial page was generated by the
running webapp on box 1.

On a slightly different note, I have the mod_jk logging set to debug.
When it logs out the packets that its received from the webapps it
doesn't show all the html page. For instance I see two full packets
traced out then a half full one and that's it. But the page renders ok
in the browser. I have a example log if anyone would like to see it.


On 7/31/07, ben short [EMAIL PROTECTED] wrote:
 Rainer,

 Thanks for that. Yes we are going for a mix of both really. But I'll
 run some bench marks against both sticky and none sticky to see how it
 gets on.

 Yes in production if we want to stop/undeploy/deploy a webapp we will
 set the worker status to stopped. This issue came up as more of a what
 if test.

 Regards

 Ben

 On 7/30/07, Rainer Jung [EMAIL PROTECTED] wrote:
  Using sticky sessions will allow only requests without sessions to be
  balanced freely. If you've either got many sessions, or your sessions
  are relatively short, than load balancing will statistically still good.
  Only in case of few long lasting sessions, you could experience the
  problem, that some heavy-use sessions might go to the same node.
 
  In case you've got only two nodes and you are building an HA
  infrastructure, the optimality of the load balancing is not important,
  because one node needs to be able to carry the full load anyhow.
 
  Throughput oriented webapps balance best with method Request.
 
  Most installations I know observe a good load balancing although they
  are using stickyness. I would rate a deviation of +/- 15% load
  difference relative to the arithmetic mean over a 10 minute interval as
  good.
 
  Periods of low load don't count at all.
 
  Regards,
 
  Rainer
 
  ben short wrote:
   So how does setting sticky sessions to true and the default value for
   the Load Balancing Directive 'method' (defaults to request) interact
   then?
  
  
   On 7/30/07, Rainer Jung [EMAIL PROTECTED] wrote:
   Apart from all the other things I wrote: don't turn off session
   stickyness, even if you use replication. Turn it off only, if you've got
   a really good reason. The fact that switching the backend between
   requests is possible with replication should not lead to the assumption,
   that it is a good idea to do this continuously.
  
   ben short wrote:
   Hi Rainer,
  
   By shutdown I mean I have clicked the 'stop' link on the tomcat manager 
   page.
  
   Im also using session replication between the two tomcats.
  
   I have just tried turning off firefoxes cache and I see the same result.
  
   On 7/30/07, Rainer Jung [EMAIL PROTECTED] wrote:
   Hi Ben,
  
   I don't know what exactly you mean by shutdown, but mod_jk has no
   memory/cache/buffer for parts or all of an earlier response. It does
   buffer parts of a request for reusing it during failover, but not with
   responses and not between different requests.
  
   If the webapp is not available on the target system, there is no way 
   how
   mod_jk could return with 50 lines of correct response. Those 50 lines
   might either come from your backend (what is shutdown), or from some
   other cache (browser, between browser and Apache, mod_cache_* inside
   Apache, between Apache and Tomcat).
  
   Nevertheless for production, I would always use a cleaner way of
   disabling a context: before undeploying first set the activation of the
   worker to stooped, which means it will no longer forward any requests
   and the load balancer will transparantly choose another worker. No
   recovery and errors.
  
   If you use sessions without replication, you could also set a worker to
   disabled before going into stopped. With disabled requests for existing
   sessions will still be forwarded, but no requests without sessions.
   Depending on your session timing the target might thus get slowly out 
   of
   use.
  
   Also add timeouts to your config. We have a new docs page for 1.2.24
   (which will go live tomorrow). You can have a look at it under
  
   http://tomcat.apache.org/dev/dist/tomcat-connectors/jk/docs/jk-1.2.24/generic_howto/timeouts.html
  
   and consider using the option recovery_options.
  
   Regards,
  
   Rainer
  
  
   ben short wrote:
   Hi,
  
   I have a odd issue occurring with my tomcat cluster serving ~50 lines
   of the page from a stopped webapp.
  
   My setup is as follows...
  
   Box 1
  
   Apache running a jk mod loadbalancer. It loadbalances between an
   instance of tomcat on this box and on box 2.
  
   Box 2
  
   Apache running a jk mod loadbalancer. It loadbalances between an
   instance of tomcat on this box and on box 1.
  
   Software...
  
   OS RH 4
   Tomcat 6.0.13
   Java 1.6.0_01
   Apache 2.2.4

Re: Tomcat cluster serving ~50 lines of the page when a request hits a stopped webapp for the first time

2007-07-31 Thread ben short
I'm not getting anywhere with this :(

I have set the logging to trace for mod_jk and I can see all the
response packets. I have also turned on our applications response
logging and can see that the running webapp writes the full page to
the response. I can then see it all in the mod_jk logs. But the
browser only shows a partial page.



On 7/31/07, Rainer Jung [EMAIL PROTECTED] wrote:
 ben short wrote:
  I have altered the code to write out which webapp generated the page
  to the html, so i can see where the partial responses are comming
  from.
 
  What I see is
 
  I stop the webapp on box 2. I make a request and I see part of the
  page. The html shows that the partial page was generated by the
  running webapp on box 1.
 
  On a slightly different note, I have the mod_jk logging set to debug.
  When it logs out the packets that its received from the webapps it
  doesn't show all the html page. For instance I see two full packets
  traced out then a half full one and that's it. But the page renders ok
  in the browser. I have a example log if anyone would like to see it.

 Log level debug truncates packet dump to I think 1KB, log level trace
 shows all of the packets.

 Maybe interesting for you: the ReplicationValve has two configurable
 attributes, that allow you to detect from the app, if the request went
 to the same node as the last request of the same session before, i.e. if
 a failover happended.

 The first attribute is primaryIndicator (Default: false), if set to
 true, it will enable this feature. When the feature is enabled, there is
 an additional request attribute (not: parameter), with name
 org.apache.catalina.ha.tcp.isPrimarySession (this is a string name)
 and its value is a Boolean, true if the request went to the sticky node,
 false, if it switched nodes.

 The name of the request attribute can be changed from the default
 org.apache.catalina.ha.tcp.isPrimarySession to something else, by
 setting the attribute primaryIndicatorName=myname for the
 ReplicationValve.

 Regards,

 Rainer

 -
 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 cluster serving ~50 lines of the page when a request hits a stopped webapp for the first time

2007-07-31 Thread ben short
Ok I have used wireshark and see that the request is sent to the
apache httpd. The next first packet i get back contains the
following...

HTTP/1.1 200 OK
Date: Tue, 31 Jul 2007 14:57:25 GMT
Server: Apache/2.2.4 (Unix) mod_ssl/2.2.4 OpenSSL/0.9.7a mod_jk/1.2.23
Content-Length: 1090   ***NOTE  every line but this has a \r\n shown
in the middle frame of wireshark ***
Cache-Control: no-cache
Pragma: no-cache
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Content-Language: en-GB
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive
Content-Type: text/html;charset=UTF-8






!--Rail Timestamp:

--

!--Generated by Journeycheck
4.0-RC5
on host
jc-pres2.nexusalpha.com
--
!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd;

html lang=english
.head
..meta http-equiv=Content-Type content=text/html;charset=UTF-8/
..meta http-equiv=expires content=0/
..meta http-equiv=cache-control content=no-cache/
..meta http-equiv=pragma content=nocache/
..meta http-equiv=Content-Language content=en-us/
..meta content=Nexus Alpha:Andrew Langmead, Ben Short, Lawrence
Chan name=author/
..meta content=journey check,rail,journey,nexus
alpha,plan,disruption,transport,trains name=keywords/
..meta content=Allows you to check your journey with a particular
rail company name=description/
..!--META HTTP-EQUIV=RefreshCONTENT=10;
URL=http://www.jcheck.com/firstcapitalconnect/;--
..
..link href=/resources/common/web/css/common.css rel=stylesheet
type=text/css/
..!--script type=text/javascript src=/resources/common/web/javascript


Which is whats being shown in the browser, if i view the source.

Next I see more packets that say 'Continuation or non-HTTP traffic'
in the Info column of wireshark. When I look at the byte output I can
see that its the rest of the page.

If i use wireshark to view the same request with the webapp started I
dont see the initial HTTP/1.1 200 OK packet, so i assume that each
packet contains the correct headers for chunking to work correctly.

So it seams that im getting a dodgy content length in the first packet
if the request goes to the stoppped webapp first. Or infact the whole
chunking thing is not working correctly.







On 7/31/07, Rainer Jung [EMAIL PROTECTED] wrote:
 You could dig deeper into two different directions:

 - protocol: is the content-length in the response headers correct? Or
 does it use chunked transfer, and is this OK?

 - sniff the network in front of the apache: do the packets actually get
 send back to the browser?

 Regards,

 Rainer


 ben short wrote:
  I'm not getting anywhere with this :(
 
  I have set the logging to trace for mod_jk and I can see all the
  response packets. I have also turned on our applications response
  logging and can see that the running webapp writes the full page to
  the response. I can then see it all in the mod_jk logs. But the
  browser only shows a partial page.

 -
 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 cluster serving ~50 lines of the page when a request hits a stopped webapp for the first time

2007-07-31 Thread ben short
 Is length 1090 correct?`So does the full body have that length?

Yes firefox reports that the page is 1k in size, via the web
developer's tool bar. I have seen it happen in IE 6 and 7 also.

Would it be possible for me to email you directly the output of
wireshark for both one bad and one good attempt?

I really appreciate you helping me out on this one.

Regards

Ben Short

On 7/31/07, Rainer Jung [EMAIL PROTECTED] wrote:
 ben short wrote:
  Ok I have used wireshark and see that the request is sent to the
  apache httpd. The next first packet i get back contains the
  following...
 
  HTTP/1.1 200 OK
  Date: Tue, 31 Jul 2007 14:57:25 GMT
  Server: Apache/2.2.4 (Unix) mod_ssl/2.2.4 OpenSSL/0.9.7a mod_jk/1.2.23
  Content-Length: 1090   ***NOTE  every line but this has a \r\n shown
  in the middle frame of wireshark ***

 All Headers are supposed to end with \r\n, but I would find it very
 strange, if this does not do it (I can not really think of a reson for
 that, but who knows...)

  Cache-Control: no-cache
  Pragma: no-cache
  Expires: Thu, 01 Jan 1970 00:00:00 GMT
  Content-Language: en-GB
  Keep-Alive: timeout=5, max=100
  Connection: Keep-Alive
  Content-Type: text/html;charset=UTF-8
 

 Is length 1090 correct?`So does the full body have that length?

 
  !--Rail Timestamp:
 
  --
 
  !--Generated by Journeycheck
  4.0-RC5
  on host
  jc-pres2.nexusalpha.com
  --
  !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN
  http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd;
 
  html lang=english
  .head
  ..meta http-equiv=Content-Type content=text/html;charset=UTF-8/
  ..meta http-equiv=expires content=0/
  ..meta http-equiv=cache-control content=no-cache/
  ..meta http-equiv=pragma content=nocache/
  ..meta http-equiv=Content-Language content=en-us/
  ..meta content=Nexus Alpha:Andrew Langmead, Ben Short, Lawrence
  Chan name=author/
  ..meta content=journey check,rail,journey,nexus
  alpha,plan,disruption,transport,trains name=keywords/
  ..meta content=Allows you to check your journey with a particular
  rail company name=description/
  ..!--META HTTP-EQUIV=RefreshCONTENT=10;
  URL=http://www.jcheck.com/firstcapitalconnect/;--
  ..
  ..link href=/resources/common/web/css/common.css rel=stylesheet
  type=text/css/
  ..!--script type=text/javascript src=/resources/common/web/javascript
 
 
  Which is whats being shown in the browser, if i view the source.
 
  Next I see more packets that say 'Continuation or non-HTTP traffic'
  in the Info column of wireshark. When I look at the byte output I can
  see that its the rest of the page.
 
  If i use wireshark to view the same request with the webapp started I
  dont see the initial HTTP/1.1 200 OK packet, so i assume that each
  packet contains the correct headers for chunking to work correctly.

 But the first line is mandatory for HTTP responses! So in the good case,
 something is slipping the observation. We could ignore that, but if we
 don't see something in the good case, we must question the observation
 in the bad case too.

  So it seams that im getting a dodgy content length in the first packet
  if the request goes to the stoppped webapp first. Or infact the whole
  chunking thing is not working correctly.

 If there is a Cntent-Length header, there is no chunking involved.
 Chunking gives a way of telling the length of small chunks of the
 answer. For dynamic content it's often difficult to tell the full length
 in advance, but a Content-Length header has to come before the body. So
 chunking is used to prevent the need of buffering the full body before
 sending it out. The reposnse you showed us above does not use chunking,
 but instead the content-length header, which is OK and stable  for
 content with easy to determine length.

 Which browser is it? If you can reproduce the problem with firefox,
 there are very good plugins, that can show you details of communication
 and content from inside the browser. A good example is FireBug, which I
 can recommend. Even if you usually use MSIE, it might be important to
 cross check with Firefox in order to find out if the problem is browser
 specific.

 Regards,

 Rainer

  On 7/31/07, Rainer Jung [EMAIL PROTECTED] wrote:
  You could dig deeper into two different directions:
 
  - protocol: is the content-length in the response headers correct? Or
  does it use chunked transfer, and is this OK?
 
  - sniff the network in front of the apache: do the packets actually get
  send back to the browser?
 
  Regards,
 
  Rainer
 
 
  ben short wrote:
  I'm not getting anywhere with this :(
 
  I have set the logging to trace for mod_jk and I can see all the
  response packets. I have also turned on our applications response
  logging and can see that the running webapp writes the full page to
  the response. I can then see it all in the mod_jk logs. But the
  browser only shows a partial page.

 -
 To start a new topic, e-mail

Re: Tomcat cluster serving ~50 lines of the page when a request hits a stopped webapp for the first time

2007-07-30 Thread ben short
Hi Rainer,

By shutdown I mean I have clicked the 'stop' link on the tomcat manager page.

Im also using session replication between the two tomcats.

I have just tried turning off firefoxes cache and I see the same result.

On 7/30/07, Rainer Jung [EMAIL PROTECTED] wrote:
 Hi Ben,

 I don't know what exactly you mean by shutdown, but mod_jk has no
 memory/cache/buffer for parts or all of an earlier response. It does
 buffer parts of a request for reusing it during failover, but not with
 responses and not between different requests.

 If the webapp is not available on the target system, there is no way how
 mod_jk could return with 50 lines of correct response. Those 50 lines
 might either come from your backend (what is shutdown), or from some
 other cache (browser, between browser and Apache, mod_cache_* inside
 Apache, between Apache and Tomcat).

 Nevertheless for production, I would always use a cleaner way of
 disabling a context: before undeploying first set the activation of the
 worker to stooped, which means it will no longer forward any requests
 and the load balancer will transparantly choose another worker. No
 recovery and errors.

 If you use sessions without replication, you could also set a worker to
 disabled before going into stopped. With disabled requests for existing
 sessions will still be forwarded, but no requests without sessions.
 Depending on your session timing the target might thus get slowly out of
 use.

 Also add timeouts to your config. We have a new docs page for 1.2.24
 (which will go live tomorrow). You can have a look at it under

 http://tomcat.apache.org/dev/dist/tomcat-connectors/jk/docs/jk-1.2.24/generic_howto/timeouts.html

 and consider using the option recovery_options.

 Regards,

 Rainer


 ben short wrote:
  Hi,
 
  I have a odd issue occurring with my tomcat cluster serving ~50 lines
  of the page from a stopped webapp.
 
  My setup is as follows...
 
  Box 1
 
  Apache running a jk mod loadbalancer. It loadbalances between an
  instance of tomcat on this box and on box 2.
 
  Box 2
 
  Apache running a jk mod loadbalancer. It loadbalances between an
  instance of tomcat on this box and on box 1.
 
  Software...
 
  OS RH 4
  Tomcat 6.0.13
  Java 1.6.0_01
  Apache 2.2.4
  Mod_jk 1.2.23
 
  workers.properties (same on both boxes)
 
  # JK Status worker config
 
  worker.list=jkstatus
  worker.jkstatus.type=status
 
  # Presentaton Load Balancer Config
 
  worker.list=preslb
 
  worker.preslb.type=lb
  worker.preslb.balance_workers=jcpres1,jcpres2
  worker.preslb.sticky_session=0
 
  worker.jcpres1.port=8009
  worker.jcpres1.host=192.168.6.171
  worker.jcpres1.type=ajp13
  worker.jcpres1.lbfactor=1
  worker.jcpres1.fail_on_status=503,400,500,909
 
  worker.jcpres2.port=8009
  worker.jcpres2.host=192.168.6.174
  worker.jcpres2.type=ajp13
  worker.jcpres2.lbfactor=1
  worker.jcpres2.fail_on_status=503,400,500,909
 
 
  My problem...
 
  If i stop the webapp on box 2, wait for a while and make a request I
  get about 50 lines of the expected page in my browser ( assuming the
  request went to the shutdown webapp. On checking the jkstatus page I
  then see that the lb has set that webapp to ERR. On refreshing the
  browser the lb routes me to the running webapp and I get the expected
  page.
  After a while the jk lb will set the shutdown webapp into the REC
  state. If I then make another request I see the same thing, about 50
  lines of a page and then the lb kicks the lb member out of the lb
  pool.

 -
 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 cluster serving ~50 lines of the page when a request hits a stopped webapp for the first time

2007-07-30 Thread ben short
So how does setting sticky sessions to true and the default value for
the Load Balancing Directive 'method' (defaults to request) interact
then?


On 7/30/07, Rainer Jung [EMAIL PROTECTED] wrote:
 Apart from all the other things I wrote: don't turn off session
 stickyness, even if you use replication. Turn it off only, if you've got
 a really good reason. The fact that switching the backend between
 requests is possible with replication should not lead to the assumption,
 that it is a good idea to do this continuously.

 ben short wrote:
  Hi Rainer,
 
  By shutdown I mean I have clicked the 'stop' link on the tomcat manager 
  page.
 
  Im also using session replication between the two tomcats.
 
  I have just tried turning off firefoxes cache and I see the same result.
 
  On 7/30/07, Rainer Jung [EMAIL PROTECTED] wrote:
  Hi Ben,
 
  I don't know what exactly you mean by shutdown, but mod_jk has no
  memory/cache/buffer for parts or all of an earlier response. It does
  buffer parts of a request for reusing it during failover, but not with
  responses and not between different requests.
 
  If the webapp is not available on the target system, there is no way how
  mod_jk could return with 50 lines of correct response. Those 50 lines
  might either come from your backend (what is shutdown), or from some
  other cache (browser, between browser and Apache, mod_cache_* inside
  Apache, between Apache and Tomcat).
 
  Nevertheless for production, I would always use a cleaner way of
  disabling a context: before undeploying first set the activation of the
  worker to stooped, which means it will no longer forward any requests
  and the load balancer will transparantly choose another worker. No
  recovery and errors.
 
  If you use sessions without replication, you could also set a worker to
  disabled before going into stopped. With disabled requests for existing
  sessions will still be forwarded, but no requests without sessions.
  Depending on your session timing the target might thus get slowly out of
  use.
 
  Also add timeouts to your config. We have a new docs page for 1.2.24
  (which will go live tomorrow). You can have a look at it under
 
  http://tomcat.apache.org/dev/dist/tomcat-connectors/jk/docs/jk-1.2.24/generic_howto/timeouts.html
 
  and consider using the option recovery_options.
 
  Regards,
 
  Rainer
 
 
  ben short wrote:
  Hi,
 
  I have a odd issue occurring with my tomcat cluster serving ~50 lines
  of the page from a stopped webapp.
 
  My setup is as follows...
 
  Box 1
 
  Apache running a jk mod loadbalancer. It loadbalances between an
  instance of tomcat on this box and on box 2.
 
  Box 2
 
  Apache running a jk mod loadbalancer. It loadbalances between an
  instance of tomcat on this box and on box 1.
 
  Software...
 
  OS RH 4
  Tomcat 6.0.13
  Java 1.6.0_01
  Apache 2.2.4
  Mod_jk 1.2.23
 
  workers.properties (same on both boxes)
 
  # JK Status worker config
 
  worker.list=jkstatus
  worker.jkstatus.type=status
 
  # Presentaton Load Balancer Config
 
  worker.list=preslb
 
  worker.preslb.type=lb
  worker.preslb.balance_workers=jcpres1,jcpres2
  worker.preslb.sticky_session=0
 
  worker.jcpres1.port=8009
  worker.jcpres1.host=192.168.6.171
  worker.jcpres1.type=ajp13
  worker.jcpres1.lbfactor=1
  worker.jcpres1.fail_on_status=503,400,500,909
 
  worker.jcpres2.port=8009
  worker.jcpres2.host=192.168.6.174
  worker.jcpres2.type=ajp13
  worker.jcpres2.lbfactor=1
  worker.jcpres2.fail_on_status=503,400,500,909
 
 
  My problem...
 
  If i stop the webapp on box 2, wait for a while and make a request I
  get about 50 lines of the expected page in my browser ( assuming the
  request went to the shutdown webapp. On checking the jkstatus page I
  then see that the lb has set that webapp to ERR. On refreshing the
  browser the lb routes me to the running webapp and I get the expected
  page.
  After a while the jk lb will set the shutdown webapp into the REC
  state. If I then make another request I see the same thing, about 50
  lines of a page and then the lb kicks the lb member out of the lb
  pool.

 -
 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 with 8 GB memory

2007-07-30 Thread ben short
Depends on what the users are doing when they hit your application. If
the are storing lots of data in the session then you'll need enough
ram to hold all the expected data. If they are uploading files, i
would imagine that you will need to have enough ram to hold the
uploaded file before you stream it to disk or database. Although
Tomcat might be smart? and store the uploaded files to disk, the
tomcat guru's will have an answer to this.

Saying all that is the Essbase app an inhouse app or a 3rd party one,
if its 3rd party one then maybe they can give you some min
requirements.

To set the virtual machines heap size you can uses the -Xms -Xmx
params. Go here [1] for info on the vm.

The bottom line is, you need to understand what your app is going to
do to work out what hardware your going to need.

[1] http://java.sun.com/javase/technologies/hotspot/index.jsp

On 7/30/07, Karel V Sedlacek [EMAIL PROTECTED] wrote:
 So,... if I have 100s of users planned to hit the same Essbase application
 via Tomcat (5.0.28), do I need a 64 bit machine?

 And for us dummies, how do we set the heap and/or other
 performance-oriented settings?

 Karel

  -BEGIN PGP SIGNED MESSAGE-
  Hash: SHA1
 
  David,
 
  David kerber wrote:
  Nelson, Tracy M. wrote:
  | From: Christopher Schultz [mailto:[EMAIL PROTECTED]
  | Sent: Friday, 27 July, 2007 18:25
  | | First of all, no home user ever bought an 8-bit machine.
 
  Oh, I'll bet there are a ton of former Apple ][, TRS-80 and Commodore
 
  Apologies, Tracy. I was thinking of Intel chips, since that was where
  this abysmal thread had been going. You're right. There were home users
  of 8-bit general-purpose microprocessors.
 
  I used my Tandy-1000 for many years, until I sold it after buying my
  super fast 16MHz 80286 with 16MB of RAM.
 
  The Tandy-1000 did not have an 8-bit microprocessor.
 
  - -chris
 
  -BEGIN PGP SIGNATURE-
  Version: GnuPG v1.4.7 (MingW32)
  Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
 
  iD8DBQFGrkZM9CaO5/Lv0PARAoY2AJ0etHOgjcxbu9vNg4Urjhsw5965UwCdFZ2d
  B8hgq1VBM4emfWenp7lTfDY=
  =jhAk
  -END PGP SIGNATURE-
 
  -
  To start a new topic, e-mail: users@tomcat.apache.org
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 



 -
 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: Resource Injection

2007-07-29 Thread ben short
Or have a look at www.springframework.org

On 7/29/07, Johnny Kewl [EMAIL PROTECTED] wrote:

 - Original Message -
 From: John McPeek [EMAIL PROTECTED]
 To: Tomcat Users List users@tomcat.apache.org
 Sent: Sunday, July 29, 2007 4:47 AM
 Subject: Resource Injection


 I want to use Resource Injection and I have been looking around, but all I
 can find is threads about stuff that doesn't work related to JSF. Does
 Tomcat 6 support Resource Injection?

 John, no Resource Injection is still very much the domain of the EJB
 container, and application server. Tomcat is a pure lite weight servlet
 container, although one could argue that there is limited application of the
 spec for injecting Resources into servlets, and I do see annotation classes
 that seem to be in development in TC's source code, it seems pure Resource
 Injection is still not a feature, and may never be.

 Something I havnt tried, but I think its worth a look see, is Apaches
 OpenEJB project, I think if you add that to TC, you may get what you want.
 I think you will be able to inject resources into beans and use them from
 TC, and the framework seems nice and lite... otherwise I think you have to
 go for the heavy weights like geronomo, or glassfish.

 Good Luck


 -
 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: Logging all data sent to client

2007-07-25 Thread ben short

Hi Christopher,

I ripped and altered the code of the Compression Filter servlet
example from tomcat 5.5.23.

There is no LoggingServletWriter, if you look in the original
getWriter method the ServletOutputStream is wrapped by a PrintWriter.
So your proposed change of the getWriter method to the following would
result in the ServletOutputStream not being used if the client of the
LoggingHttpServletResponse called the getWriter method and thus no
logging of the response.

public PrintWriter getWriter() throws IOException
{
  if(null == mWriter)
   mWriter = new LoggingServletWriter(super.getWriter());

  return mWriter;
}

So saying that the finishResponse method change is not valid also. As
the writer flush method should be called if a writer was created,
which in turn will call the stream it has wrapped flush method.

I agree that the check to see if the logger is enabled in the close
method is not needed, and well spotted about the NPE.

Regards

Ben

On 7/25/07, Christopher Schultz [EMAIL PROTECTED] wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Ben,

I might change your LoggingHttpServletResponse slightly. I think it's
more complicated than necessary.

ben short wrote:
 LoggingHttpServletResponse.java

 class LoggingHttpServletResponse extends HttpServletResponseWrapper
{
private Logger mLogger =
 Logger.getLogger(LoggingHttpServletResponse.class);

public LoggingHttpServletResponse(HttpServletResponse
 httpServletResponse)
{
super(httpServletResponse);
mWrappedResponse = httpServletResponse;

// I would remove the mWrappedResponse. You can always call
super.getResponse to get the wrapped response.

}

[snip]

// - Public
 Methods

/**
 * Create and return a ServletOutputStream to write the content
 * associated with this Response.
 *
 * @throws IOException if an input/output error occurs
 */
public ServletOutputStream createOutputStream() throws IOException
{
mLogger.debug(Creating new LoggingOutputStream);

return new LoggingServletOutputStream(mWrappedResponse, mLogger);
}

Is this method useful? The constructor for LSOS ought to be enough.

/**
 * Finish a response.
 */
public void finishResponse()
{
try
{
if (mWriter != null)
{
mWriter.close();
}
else
{
if (mStream != null)
mStream.close();
}
}
catch (IOException e)
{
}
}

Same here. You should not need a finishResponse method. You ought to
allow the 'close' method to do its job. Remove this method.

/**
 * Flush the buffer and commit this response.
 *
 * @throws IOException if an input/output error occurs
 */
public void flushBuffer() throws IOException
{
mStream.flush();
}

How about:

public void flushBuffer()
throws IOException
{
if(null != mStream)
   mStream.flush();
else if(null != mWriter)
   mWriter.flush();
}

public ServletOutputStream getOutputStream() throws IOException
{
if (mWriter != null)
throw new IllegalStateException(getWriter() has already
 been called for this response);

if (mStream == null)
mStream = createOutputStream();

mLogger.debug(mStream is set to  + mStream +  in
 getOutputStream);

return (mStream);
}

This method should be:

public ServletOutputStream getOutputStream()
{
if(null == mStream)
mStream = new LoggingServletOutputStream(super.getOutputStream));

return mStream;
}

public PrintWriter getWriter() throws IOException
{
if (mWriter != null)
return (mWriter);

if (mStream != null)
throw new IllegalStateException(getOutputStream() has
 already been called for this response);

mStream = createOutputStream();

mLogger.debug(mStream is set to  + mStream +  in
 getOutputStream);

// HttpServletResponse.getCharacterEncoding() shouldn't return null
// according the spec, so feel free to remove that if
mWriter = new PrintWriter(mStream);

return (mWriter);
}
}

Similarly:

public PrintWriter getWriter()
   throws IOException
{
if(null == mWriter)
 mWriter = new LoggingServletWriter(super.getWriter());

return mWriter;
}


 LoggingServletOutputStream.java

 class LoggingServletOutputStream extends ServletOutputStream
{
private Logger mLogger;
private HttpServletResponse mResponse;

The response is not necessary. Remove this.

private OutputStream mOutputStream;
private ByteArrayOutputStream mByteArrayOutputStream = new
 ByteArrayOutputStream();

Good.

public LoggingServletOutputStream(HttpServletResponse

Re: Logging all data sent to client

2007-07-25 Thread ben short

One other note: since you were using a compression filter as an example,
I can see why they didn't do the whole writer thing. A compressed
stream cannot use a Writer since the output must be binary. A writer
primarily handles line-ending conversion which would break any
compression output generated.


Ah I hadnt thought of that :)

Yep it works ands not ment for production as the logging will have a
massive overhead.

On 7/25/07, Christopher Schultz [EMAIL PROTECTED] wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Ben,

ben short wrote:
 I ripped and altered the code of the Compression Filter servlet
 example from tomcat 5.5.23.

One other note: since you were using a compression filter as an example,
I can see why they didn't do the whole writer thing. A compressed
stream cannot use a Writer since the output must be binary. A writer
primarily handles line-ending conversion which would break any
compression output generated.

Since you are not bound by the requirement that an OutputStream be used,
I would recommend handling the Writer separately. But, hey, if it works,
it works, right?

- -chris

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

iD8DBQFGp7L/9CaO5/Lv0PARAsWZAJ42RaxekZB/uH8iCHoJu0aPclnpwgCeLHXl
/DG3WHjOB4Z8Kb1AXifKLqE=
=VpkL
-END PGP SIGNATURE-

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




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



Logging all data sent to client

2007-07-24 Thread ben short

Hi,

I using Tomcat 6.0.13 and Spring 2.0.6. I have been involved in
developing a website that products pages in various formats , such as
www, xml, wap and pda. We are having some issues with wap and pda, but
cant ciew the html source thats being shown on the devices.
We can view the html source in firefox using a wap and pda plugin, but
the issues are not always the same or there at all.

What I would like to do is log all the data sent to the client. I have
been looking at encapsulating the HttpServletRequest and log out the
data to a log file.

Is there any easier way to do this with tomcat?

Regards

Ben Short

-
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: Logging all data sent to client

2007-07-24 Thread ben short

Hi Tim,

Thanks for that, but it only seems to log out the request/response
headers. Is It possible to log everything sent to the client?

Ben

On 7/24/07, Tim Funk [EMAIL PROTECTED] wrote:

Look at the RequestDumperValve

-Tim

ben short wrote:
 Hi,

 I using Tomcat 6.0.13 and Spring 2.0.6. I have been involved in
 developing a website that products pages in various formats , such as
 www, xml, wap and pda. We are having some issues with wap and pda, but
 cant ciew the html source thats being shown on the devices.
 We can view the html source in firefox using a wap and pda plugin, but
 the issues are not always the same or there at all.

 What I would like to do is log all the data sent to the client. I have
 been looking at encapsulating the HttpServletRequest and log out the
 data to a log file.

 Is there any easier way to do this with tomcat?


-
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: Logging all data sent to client

2007-07-24 Thread ben short

I was just looking at the compressionFilter example. Its doing along
the lines of what I want todo.

Thank you all.


On 7/24/07, Titi Wangsa [EMAIL PROTECTED] wrote:

create a httpservlet filter?

On 7/24/07, ben short [EMAIL PROTECTED] wrote:
 Hi Tim,

 Thanks for that, but it only seems to log out the request/response
 headers. Is It possible to log everything sent to the client?

 Ben

 On 7/24/07, Tim Funk [EMAIL PROTECTED] wrote:
  Look at the RequestDumperValve
 
  -Tim
 
  ben short wrote:
   Hi,
  
   I using Tomcat 6.0.13 and Spring 2.0.6. I have been involved in
   developing a website that products pages in various formats , such as
   www, xml, wap and pda. We are having some issues with wap and pda, but
   cant ciew the html source thats being shown on the devices.
   We can view the html source in firefox using a wap and pda plugin, but
   the issues are not always the same or there at all.
  
   What I would like to do is log all the data sent to the client. I have
   been looking at encapsulating the HttpServletRequest and log out the
   data to a log file.
  
   Is there any easier way to do this with tomcat?
  
 
  -
  To start a new topic, e-mail: users@tomcat.apache.org
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 

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



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




-
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: Logging all data sent to client

2007-07-24 Thread ben short

Yes from the CompressionServletResponseWrapper example I can see the
methods I need to override as you have pointed out.

On 7/24/07, Tim Funk [EMAIL PROTECTED] wrote:

Yes - but tomcat doesn't have that functionality out of the box - you'd
need to write a filter which creates a HttpServletRequestWrapper which
overrides getOutputStream() (or getWriter()) and then passes back a
wrapped OutStream or Writer which also logs to wherever when print(int
i) is called.

-Tim

ben short wrote:
 Hi Tim,

 Thanks for that, but it only seems to log out the request/response
 headers. Is It possible to log everything sent to the client?

 Ben

 On 7/24/07, Tim Funk [EMAIL PROTECTED] wrote:
 Look at the RequestDumperValve

 -Tim

 ben short wrote:
  Hi,
 
  I using Tomcat 6.0.13 and Spring 2.0.6. I have been involved in
  developing a website that products pages in various formats , such as
  www, xml, wap and pda. We are having some issues with wap and pda, but
  cant ciew the html source thats being shown on the devices.
  We can view the html source in firefox using a wap and pda plugin, but
  the issues are not always the same or there at all.
 
  What I would like to do is log all the data sent to the client. I have
  been looking at encapsulating the HttpServletRequest and log out the
  data to a log file.

-
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: Logging all data sent to client

2007-07-24 Thread ben short

Yes sure.

On 7/24/07, Karel V Sedlacek [EMAIL PROTECTED] wrote:

Ben,

When you succeed at this would you pass along your code?  We have issues
with timeouts and it would be great to see what's being passed along to
the client.

Karel
Cornell University

 Yes from the CompressionServletResponseWrapper example I can see the
 methods I need to override as you have pointed out.

 On 7/24/07, Tim Funk [EMAIL PROTECTED] wrote:
 Yes - but tomcat doesn't have that functionality out of the box - you'd
 need to write a filter which creates a HttpServletRequestWrapper which
 overrides getOutputStream() (or getWriter()) and then passes back a
 wrapped OutStream or Writer which also logs to wherever when print(int
 i) is called.

 -Tim

 ben short wrote:
  Hi Tim,
 
  Thanks for that, but it only seems to log out the request/response
  headers. Is It possible to log everything sent to the client?
 
  Ben
 
  On 7/24/07, Tim Funk [EMAIL PROTECTED] wrote:
  Look at the RequestDumperValve
 
  -Tim
 
  ben short wrote:
   Hi,
  
   I using Tomcat 6.0.13 and Spring 2.0.6. I have been involved in
   developing a website that products pages in various formats , such
 as
   www, xml, wap and pda. We are having some issues with wap and pda,
 but
   cant ciew the html source thats being shown on the devices.
   We can view the html source in firefox using a wap and pda plugin,
 but
   the issues are not always the same or there at all.
  
   What I would like to do is log all the data sent to the client. I
 have
   been looking at encapsulating the HttpServletRequest and log out
 the
   data to a log file.

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



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





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




-
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: Logging all data sent to client

2007-07-24 Thread ben short
 (mWriter);

   if (mStream != null)
   throw new IllegalStateException(getOutputStream() has
already been called for this response);

   mStream = createOutputStream();

   mLogger.debug(mStream is set to  + mStream +  in getOutputStream);

   // HttpServletResponse.getCharacterEncoding() shouldn't return null
   // according the spec, so feel free to remove that if
   mWriter = new PrintWriter(mStream);

   return (mWriter);
   }

   }

LoggingServletOutputStream.java

class LoggingServletOutputStream extends ServletOutputStream
   {
   private Logger mLogger;
   private HttpServletResponse mResponse;
   private OutputStream mOutputStream;
   private ByteArrayOutputStream mByteArrayOutputStream = new
ByteArrayOutputStream();

   public LoggingServletOutputStream(HttpServletResponse response,
Logger logger) throws IOException
   {
   mResponse = response;
   mOutputStream = mResponse.getOutputStream();
   mLogger = logger;
   }

   public void write(int b) throws IOException
   {
   mByteArrayOutputStream.write(b);
   mOutputStream.write(b);
   }

   @Override
   public void write(byte b[]) throws IOException
   {
   mByteArrayOutputStream.write(b);
   mOutputStream.write(b);
   }

   @Override
   public void write(byte b[], int off, int len) throws IOException
   {
   mByteArrayOutputStream.write(b, off, len);
   mOutputStream.write(b, off, len);
   }

   @Override
   public void close() throws IOException
   {
   if ( mLogger.isDebugEnabled() )
   {
   float kBytes = mByteArrayOutputStream.size() / 1024f;

   mLogger.debug(Writing  + kBytes +  kb ( +
mByteArrayOutputStream.size() + b) to the client.\n +
mByteArrayOutputStream.toString());
   }

   mByteArrayOutputStream = null;
   mOutputStream.close();
   }

   @Override
   public void flush() throws IOException
   {
   mOutputStream.flush();
   }
   }

web.xml Snippit..

filter
   filter-nameLogging Filter/filter-name
   
filter-classcom.nexusalpha.journeycheck.presentation.debug.HttpServletResponseLoggingFilter/filter-class
   /filter

   filter-mapping
 filter-nameLogging Filter/filter-name
 url-pattern/*/url-pattern
   /filter-mapping







On 7/24/07, ben short [EMAIL PROTECTED] wrote:

Yes sure.

On 7/24/07, Karel V Sedlacek [EMAIL PROTECTED] wrote:
 Ben,

 When you succeed at this would you pass along your code?  We have issues
 with timeouts and it would be great to see what's being passed along to
 the client.

 Karel
 Cornell University

  Yes from the CompressionServletResponseWrapper example I can see the
  methods I need to override as you have pointed out.
 
  On 7/24/07, Tim Funk [EMAIL PROTECTED] wrote:
  Yes - but tomcat doesn't have that functionality out of the box - you'd
  need to write a filter which creates a HttpServletRequestWrapper which
  overrides getOutputStream() (or getWriter()) and then passes back a
  wrapped OutStream or Writer which also logs to wherever when print(int
  i) is called.
 
  -Tim
 
  ben short wrote:
   Hi Tim,
  
   Thanks for that, but it only seems to log out the request/response
   headers. Is It possible to log everything sent to the client?
  
   Ben
  
   On 7/24/07, Tim Funk [EMAIL PROTECTED] wrote:
   Look at the RequestDumperValve
  
   -Tim
  
   ben short wrote:
Hi,
   
I using Tomcat 6.0.13 and Spring 2.0.6. I have been involved in
developing a website that products pages in various formats , such
  as
www, xml, wap and pda. We are having some issues with wap and pda,
  but
cant ciew the html source thats being shown on the devices.
We can view the html source in firefox using a wap and pda plugin,
  but
the issues are not always the same or there at all.
   
What I would like to do is log all the data sent to the client. I
  have
been looking at encapsulating the HttpServletRequest and log out
  the
data to a log file.
 
  -
  To start a new topic, e-mail: users@tomcat.apache.org
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
  -
  To start a new topic, e-mail: users@tomcat.apache.org
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 



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





-
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: How to deploy a web app on tomcat.. help needed plz.. :)

2007-07-16 Thread ben short

Karen,

If your using maven 2 then it should be dead easy. Assuming you have
maven 2 setup on your system follow the example given here [1]. This
will create a war file artifact with a simple jsp and the web.xml. The
last goal mvn package will create you a war file.

I suggest that you give it ago and then analyse whats files are in the war file.

You can deploy the war as shown in one of the links provided by others
in this thread. I prefer the tomcat manager webapp myself.

Sorry to the Tomcat guys if this is off topic but maybe it might help
her understand the layout of the war file and she can build on it from
there.

[1] http://maven.apache.org/guides/mini/guide-webapp.html

On 7/16/07, Caldarale, Charles R [EMAIL PROTECTED] wrote:

 From: pinky88 [mailto:[EMAIL PROTECTED]
 Subject: RE: How to deploy a web app on tomcat.. help needed plz.. :)

I would recommend cleaning up your examples before posting.  This is an
international, multi-cultural, multi-gender mailing list, and you (or
your cousin's) attempts at humor are completely inappropriate.

 I do not know what tomcat logs are..

Try looking in the aptly named logs directory...

 I'll post the pom.xml

Irrelevant - that has meaning to maven, not Tomcat.

You still haven't answered the questions you were asked:

1) What's in the logs?

2) What's the name of your new .war file?

3) Where did you put your new .war file?

4) Do you have the real class inside %YOUR_WEBAPP%/WEB-INF/classes or
lib?

5) What are you typing into the browser to access this app?

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



Blank page shown while webapp is starting up

2007-07-04 Thread ben short

Hi,

I'm using Tomcat 5.5.23 and have tried on 6.0.13. My webapp can take
20 to 30 seconds to start up. If a request is made during this time a
blank page is shown in the browser. If the webapp is stopped then a
503 page is returned.

Is it possible to get tomcat to serve the 503 page until the webapp
has started up so the blank page is never shown?

Regards

Ben Short

-
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: Slightly OT: Which CMS?

2007-07-02 Thread ben short

I asked auntie Google for 'java cms' and she found this [1]. She even
gave me cucumber sandwiches :)

[1] http://java-source.net/open-source/content-managment-systems

On 7/2/07, Gregor Schneider [EMAIL PROTECTED] wrote:

Dear list,

among other things it's now my job to look out for CMS.

I've asked auntie Google, however, browsing all hits that Google
showed up would lead straight into my retirement (and I'm not *that*
old...)

What I've seen so far is, that most CMSs are based on PHP - something
which is giving me slight headaches.

I've looked for Java-based CMSs being able to run on Tomcat or JBoss,
however, seems there are only a few available.

Recommendation for a CMS would be:

- able to somehow import our old content (static HTML, Java-Script)
- would be great if it doesn't take 1/2 year training until you can
work with the CMS (like Typo3)
- open source  developer-community would be a REAL BIG PLUS
- should be able to integrate our dynamic content (Servlets, JSP)
- dynamic content is protected by Tomcat Formbased AA - would like
either to reuse this or somehow integrate it with the CMS's own
security paradigma

I know it's quite a whishlist, but does anybody here have a suggestion
where I should point my webbrowser to?

We might even consider to pay for a CMS if the benefit compared to any
free CMS is making up for the licence-fees.

And, last not least:

In case we consider a PHP-based CMS (i.e. Joomla) - is PHP still an
security-issue?
I appreciate you giving some valued oppinions on that, however, I
don't want to start a flamewar on PHP ;)

TIA

Gregor
--
what's puzzlin' you, is the nature of my game
gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2
gpgp-key available @ http://pgpkeys.pca.dfn.de:11371

-
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 - Apache: IP replacement

2007-07-02 Thread ben short

I had an issue where getLocalAddr() would return 127.0.0.1 rather than
the ip address of my linux box. Altering the /etc/hosts file to
something like the following fixed that. I wonder what effect that
might have for your problem.

192.168.6.173   box box.domain.com
127.0.0.1  localhost

On 7/2/07, Rainer Jung [EMAIL PROTECTED] wrote:

Something is wrong with your configuration or box setup.
request.getRemoteAddr() works for me, it shows the Apache server address
used by the request.

Regards,

Rainer

Nino Ulsamer wrote:
 Hello,

 I have a problem with finding out the IP address of requests in Tomcat.
 I'm using the HttpServletRequest.getRemoteAddr() function, but it
 returns 0.0.0.0. My server configuration is as follows: Apache
 receives all requests and forwards them to Tomcat via mod_jk. Probably
 in this step it replaces the address of the original request by its own
 address. I've read a lot about this topic already, but I always found
 the solution being you should use mod_jk. I'm using JK 1.2, is it
 possible to configure it so that it does not replace the IP address?

 Thanks a lot,

 Nino Ulsamer

-
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: Appointment system

2007-06-30 Thread ben short

Take a look at the String Frameworks [1] instead of ejb.

[1] http://www.springframework.org/

On 6/30/07, Asare Samuel [EMAIL PROTECTED] wrote:

Hi all,

I am about to code a web applciation(Appointment system).

It will require a database, email reminders, and JSP pages. Would you sujest an 
EJB project or a regular web application as shown in the link below~(set up own 
connection, sql code etc). I started out inclined towards the ejb route. 
However this requires the sun application server, and my copy will not start 
despite it being a new installation.

  1) http://www.netbeans.org/kb/55/mysql-webapp.html


Thanks


-
 What kind of emailer are you? Find out today - get a free analysis of your 
email personality. Take the quiz at the Yahoo! Mail Championship.


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



Deploying war files to path not the same as the war file name.

2007-06-29 Thread ben short

Hi,

We use maven to build our war files. The war file names are as
follows... appname-1.0.war. Currently I rename the file to ROOT.war
then deploy it via the tomcat manager app.

Is it possible to leave the war file name alone but deploy it as the
ROOT webapp?

Regards

Ben Short

-
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: How to write this elegantly in JSP/EL

2007-06-24 Thread ben short

And your not happ with just using...

%=com.libris4you.books.maintenancepanel.AuthorTabController.DATA_PHOTO_WIDTH%



On 6/24/07, Hassan Schroeder [EMAIL PROTECTED] wrote:

On 6/23/07, Nikola Milutinovic [EMAIL PROTECTED] wrote:

 The answer is simple, imageUrl is calculated in the controller/servlet for each request. 
com.libris4youDATA_PHOTO_HEIGHT is a constant embedded in the Java code, where it belongs. And, 
here is another one: in your example DATA_PHOTO_HEIGHT is the name of the variable. In my example, I 
have already made THAT name a constant in the Java class.

Uh, what?  Use of the `c:out` format vs. simple EL has nothing to do
with where the value is coming from.

--
Hassan Schroeder  [EMAIL PROTECTED]

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




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



Re: How to write this elegantly in JSP/EL

2007-06-22 Thread ben short

I think the following should do you

img src=${imageUrl} alt=Author photo height=c:out
value=${DATA_PHOTO_HEIGHT}/ width=c:out
value=${DATA_PHOTO_WIDTH}/ /

On 6/22/07, Johnny Kewl [EMAIL PROTECTED] wrote:


Hi Nikola, never done it, but I think you have to override the resolver.

ie instead of the standard resolver, which looks for standard properties or
custom classes declared thru XML yours will tie to a class in your app.
Managed to find an ok article maybe its enuf for you to find the
relevent code in spring, and steal it ;)

http://today.java.net/pub/a/today/2006/03/07/unified-jsp-jsf-expression-language.html

- Original Message -
From: Nikola Milutinovic [EMAIL PROTECTED]
To: Tomcat Users List users@tomcat.apache.org
Sent: Friday, June 22, 2007 10:46 AM
Subject: How to write this elegantly in JSP/EL


 Hi all.

 This is not really TC related, but more JSP and EL question, but I thought
 I'd ask.

 I would like to have an elegant way of using constants from Java classes
 in EL. This is a relatively good illustration of what I am talking about.
 Take, for instance, a Spring controller. It has a method where the
 programmer can bind objects to model-and-view, which basically binds it to
 a request or session scope. It is very similar to a plain Servlet doing
 request.setAttribute( name, value ).

 public class SomeController extends SimpleFormController {

public static final String DATA_PHOTO_WIDTH = photoWidth;
public static final String DATA_PHOTO_HEIGHT = photoHeight;

...

protected referenceData( ... ) {

...

modelAndView.put( DATA_PHOTO_WIDTH, photoWidth );
   modelAndView.put( DATA_PHOTO_HEIGHT, photoHeight );

...

}

 ...

 }


 And then in JSPF or JSP:



 img src=${imageUrl} alt=Author photo height=${photoHeight}
 width=${photoWidth} /


 Notice that the EL variable name is the same as that constant. So, I have
 2 places to keep in synch. If I wrote that in a scriptlet, it would be
 correct, from the point of do not duplicate code:



 %= request.getAttribute(
 com.libris4you.books.maintenancepanel.AuthorTabController.DATA_PHOTO_WIDTH
  ) %

 Now, how could I do the same in EL?


 Something like (tongue in cheek):

 
width=${=com.libris4you.books.maintenancepanel.AuthorTabController.DATA_PHOTO_WIDTH}

 Did I miss something crucial in EL?

 Nix.





 

 Get the Yahoo! toolbar and be alerted to new email wherever you're
 surfing.
 http://new.toolbar.yahoo.com/toolbar/features/mail/index.php

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




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




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



Re: How to write this elegantly in JSP/EL

2007-06-22 Thread ben short

Well you learn something new everyday, I wasn't aware that ${X} worked
like c:out value=${X}/

Also you talk about the DATA_PHOTO_HEIGHT and DATA_PHOTO_WIDTH
properties being static propertys of the AuthorController class. Why
not create a Constant object called PHOTO or something. make the
height and width proper static on that, then pass that into the model.
Then you can use the following in your jsp page

img src=${imageUrl} alt=Author photo height=${PHOTO.HEIGHT}
width=${PHOTO.WIDTH}/

Which doesn't seem that bad to me.

With your spring setup you could also create an HandlerInterceptor [1]
and add it to your url mapping, that adds the PHOTO object to the
model after the controller has process the request, so as not to
clutter up your controllers.

[1] 
http://www.springframework.org/docs/api/org/springframework/web/servlet/HandlerInterceptor.html





On 6/22/07, Hassan Schroeder [EMAIL PROTECTED] wrote:

On 6/22/07, Nikola Milutinovic [EMAIL PROTECTED] wrote:

  img src=${imageUrl} alt=Author photo height=c:out
  value=${DATA_PHOTO_HEIGHT}/ width=c:out
  value=${DATA_PHOTO_WIDTH}/ /

 (sigh) I feared as much. It is just that I hate JSTL tags inside another 
tag's attributes.

Why would you use `src=${imageUrl}` and then use the clumsy
'c:out' form? What's wrong with `height=${DATA_PHOTO_HEIGHT}`?

 Is there perhaps some useful function taglib?

That said, writing your own tag libs is pretty easy, and worth while if
it's something repetitious.

YMMV,
--
Hassan Schroeder  [EMAIL PROTECTED]

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




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



Re: Tomcat application connect via https only?

2007-06-20 Thread ben short

In the server.xml that comes with tomcat there are 2 HTTP/1.1
connectors defined. One is on port 8080 the other is on port 8443.

Comment out the 8080 one and uncomemnt the 8443 one and change the port to 443.

Install your cert and you should be good to go.

Regards

Ben Short



On 6/20/07, Vigorito, Nicholas E. [EMAIL PROTECTED] wrote:

I am a newbie to Tomcat. I have 5.0.28. I would like to set up a web
application so that one can ONLY connect to it via https. Anyone know
how I can do this?
 I was able to set up Tomcat (via server.xml and certificates) so that
one can connect to the app via either http or https and can even force
it to redirect http to https via the user-data-constraint and
transport-guarentee elements in the web application's web.xml file.
BTW the application is an Axis web service if that matters any.
Nick




-
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 application connect via https only?

2007-06-20 Thread ben short

I dont know about doing it via the config files, but i guess you could
write a filter that will check the requests url is https and if not
redirect them to the correct the https url.

On 6/20/07, Vigorito, Nicholas E. [EMAIL PROTECTED] wrote:

Doing that will make it so that ALL apps on the server can only be
connected to via HTTPS, correct?

Any way to do it just for one app?

Nick

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
rg] On Behalf Of ben short
Sent: Wednesday, June 20, 2007 11:04 AM
To: Tomcat Users List
Subject: Re: Tomcat application connect via https only?

In the server.xml that comes with tomcat there are 2 HTTP/1.1 connectors
defined. One is on port 8080 the other is on port 8443.

Comment out the 8080 one and uncomemnt the 8443 one and change the port
to 443.

Install your cert and you should be good to go.

Regards

Ben Short



On 6/20/07, Vigorito, Nicholas E. [EMAIL PROTECTED] wrote:
 I am a newbie to Tomcat. I have 5.0.28. I would like to set up a web
 application so that one can ONLY connect to it via https. Anyone know
 how I can do this?
  I was able to set up Tomcat (via server.xml and certificates) so that

 one can connect to the app via either http or https and can even force

 it to redirect http to https via the user-data-constraint and
 transport-guarentee elements in the web application's web.xml file.
 BTW the application is an Axis web service if that matters any.
 Nick



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

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




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



Re: Design

2007-06-19 Thread ben short

Id suggest having a look at the spring web mvc stuff it can help you
simplify form submissions by mapping request params to objects so you
don't have to do, although there will be a slight learning curve.

Just my 2 pence :)

On 6/19/07, Kevin Wilhelm [EMAIL PROTECTED] wrote:

I'd take the approach with Servlets/JSP that handle user inputs. You could
in deed use tags for the inputs and process them with suitable controllers
in the logic tier. May be there are simpler ways to proceed with
questionaires.


- Original Message -
From: Mohammed Zabin [EMAIL PROTECTED]
To: Tomcat Users List users@tomcat.apache.org
Sent: Tuesday, June 19, 2007 9:42 AM
Subject: Re: Design


I am using a Tag that render the whole questions, can i create another tag
 that deals with user request?

 On 6/19/07, Kevin Wilhelm [EMAIL PROTECTED] wrote:

 No!

 This sounds like a simple webapp to me. Just use some Servlet Container
 (Tomcat) and have all of the presentation (JSP), business and persistence
 things handled in ONE engine.

 - Original Message -
 From: Mohammed Zabin [EMAIL PROTECTED]
 To: Tomcat Users List users@tomcat.apache.org
 Sent: Tuesday, June 19, 2007 9:26 AM
 Subject: Design


  Hi All
 
  I am developing an online exam site as a graduation project. I have
  some
  questions regardsing the design:
 
  1. In such a program which is a web site that introduce some multiple
  choice
  questions, and shows the result of user answers, DO I HAVE TO USE EJB??
 


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





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




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



Re: Design

2007-06-19 Thread ben short

In learning the spring frameworks, or learning any new technology.

On 6/19/07, Mohammed Zabin [EMAIL PROTECTED] wrote:

What learning curve?

On 6/19/07, ben short [EMAIL PROTECTED] wrote:

 Id suggest having a look at the spring web mvc stuff it can help you
 simplify form submissions by mapping request params to objects so you
 don't have to do, although there will be a slight learning curve.

 Just my 2 pence :)

 On 6/19/07, Kevin Wilhelm [EMAIL PROTECTED] wrote:
  I'd take the approach with Servlets/JSP that handle user inputs. You
 could
  in deed use tags for the inputs and process them with suitable
 controllers
  in the logic tier. May be there are simpler ways to proceed with
  questionaires.
 
 
  - Original Message -
  From: Mohammed Zabin [EMAIL PROTECTED]
  To: Tomcat Users List users@tomcat.apache.org
  Sent: Tuesday, June 19, 2007 9:42 AM
  Subject: Re: Design
 
 
  I am using a Tag that render the whole questions, can i create another
 tag
   that deals with user request?
  
   On 6/19/07, Kevin Wilhelm [EMAIL PROTECTED] wrote:
  
   No!
  
   This sounds like a simple webapp to me. Just use some Servlet
 Container
   (Tomcat) and have all of the presentation (JSP), business and
 persistence
   things handled in ONE engine.
  
   - Original Message -
   From: Mohammed Zabin [EMAIL PROTECTED]
   To: Tomcat Users List users@tomcat.apache.org
   Sent: Tuesday, June 19, 2007 9:26 AM
   Subject: Design
  
  
Hi All
   
I am developing an online exam site as a graduation project. I have
some
questions regardsing the design:
   
1. In such a program which is a web site that introduce some
 multiple
choice
questions, and shows the result of user answers, DO I HAVE TO USE
 EJB??
   
  
  
   -
   To start a new topic, e-mail: users@tomcat.apache.org
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
  
 
 
  -
  To start a new topic, e-mail: users@tomcat.apache.org
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 

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





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



Apache 2.2 + Tomcat 6 + Mod_JK 1.2.23 + Session Clustering

2007-06-18 Thread ben short

Hi All,

I'm trying to setup session clustering between two Tomcat 6.0.13
instances with Apache 2.2 and Mod JK 1.2.23.

The problem I'm having is that every request returns me a new session
so the users state is not kept, So i assume that the clustering is not
configured correctly.

Looking at the manager app on both tomcats i see the same number of
sessions, so they seem tobe replicated between the server.

Can anyone help me out please.


Here is my server.xml from tomcat 1

Server port=8005 shutdown=SHUTDOWN

 !--APR library loader. Documentation at /docs/apr.html --
 Listener className=org.apache.catalina.core.AprLifecycleListener
SSLEngine=on /
 !--Initialize Jasper prior to webapps are loaded. Documentation at
/docs/jasper-howto.html --
 Listener className=org.apache.catalina.core.JasperListener /
 !-- JMX Support for the Tomcat server. Documentation at
/docs/non-existent.html --
 Listener className=org.apache.catalina.mbeans.ServerLifecycleListener /
 Listener 
className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener
/

 !-- Global JNDI resources --
 GlobalNamingResources
   Resource name=UserDatabase auth=Container
 type=org.apache.catalina.UserDatabase
 description=User database that can be updated and saved
 factory=org.apache.catalina.users.MemoryUserDatabaseFactory
 pathname=conf/tomcat-users.xml /
 /GlobalNamingResources

 Service name=Catalina

   !-- Define an HTTP/1.1 Connector on port 8080 --
   Connector port=8080 protocol=HTTP/1.1
  connectionTimeout=2
  redirectPort=8443 /

   !-- Define an AJP 1.3 Connector on port 8009 --
   Connector port=8009 protocol=AJP/1.3 redirectPort=8443
address=192.168.6.174
backlog=20
connectionTimeout=0
maxThreads=100
tcpNoDelay=true /

   Engine name=Catalina defaultHost=localhost jvmRoute=jcpres1

 Realm className=org.apache.catalina.realm.UserDatabaseRealm
resourceName=UserDatabase/

 Host name=localhost  appBase=webapps
   unpackWARs=true autoDeploy=true
   xmlValidation=false xmlNamespaceAware=false


Valve className=org.apache.catalina.valves.AccessLogValve 
directory=logs
  prefix=access. suffix=.log pattern=common
resolveHosts=false/


Cluster className=org.apache.catalina.ha.tcp.SimpleTcpCluster
channelSendOptions=4

Manager className=org.apache.catalina.ha.session.DeltaManager
expireSessionsOnShutdown=false
notifyListenersOnReplication=true/

Channel 
className=org.apache.catalina.tribes.group.GroupChannel

Membership
className=org.apache.catalina.tribes.membership.McastService
address=228.0.0.4
port=26816
frequency=500
dropTime=3000/

Receiver 
className=org.apache.catalina.tribes.transport.nio.NioReceiver
address=192.168.6.174
port=4000
autoBind=100
selectorTimeout=5000
maxThreads=6/

Sender
className=org.apache.catalina.tribes.transport.ReplicationTransmitter
Transport 
className=org.apache.catalina.tribes.transport.nio.PooledParallelSender
timeout=3000/
/Sender

Interceptor
className=org.apache.catalina.tribes.group.interceptors.TcpFailureDetector/

Interceptor
className=org.apache.catalina.tribes.group.interceptors.MessageDispatch15Interceptor/

/Channel

Valve className=org.apache.catalina.ha.tcp.ReplicationValve

filter=.*\.gif;.*\.js;.*\.jpg;.*\.png;.*\.htm;.*\.html;.*\.css;.*\.txt;/

Valve 
className=org.apache.catalina.ha.session.JvmRouteBinderValve/

ClusterListener
className=org.apache.catalina.ha.session.JvmRouteSessionIDBinderListener/
ClusterListener
className=org.apache.catalina.ha.session.ClusterSessionListener/

/Cluster

 /Host
   /Engine
 /Service
/Server


Tomcat 2's server.xml

Server port=8005 shutdown=SHUTDOWN

 !--APR library loader. Documentation at /docs/apr.html --
 Listener className=org.apache.catalina.core.AprLifecycleListener
SSLEngine=on /
 !--Initialize Jasper prior to webapps are loaded. Documentation at
/docs/jasper-howto.html --
 Listener className=org.apache.catalina.core.JasperListener /
 !-- JMX Support for the Tomcat server. Documentation at
/docs/non-existent.html --
 Listener 

Re: Apache 2.2 + Tomcat 6 + Mod_JK 1.2.23 + Session Clustering

2007-06-18 Thread ben short
::jk_ajp_common.c (1043): 00602D 38
00 00 0E 43 6F 6E 74 65 6E 74 2D 4C 65 6E  - -8...Content-Len
[Mon Jun 18 12:29:46 2007] [25137:8064] [debug]
ajp_connection_tcp_get_message::jk_ajp_common.c (1043): 007067 74
68 00 00 04 31 31 30 32 00 00 00 00 00 00  - gth...1102..
[Mon Jun 18 12:29:46 2007] [25137:8064] [debug]
ajp_unmarshal_response::jk_ajp_common.c (603): status = 404
[Mon Jun 18 12:29:46 2007] [25137:8064] [debug]
ajp_unmarshal_response::jk_ajp_common.c (610): Number of headers is =
2
[Mon Jun 18 12:29:46 2007] [25137:8064] [debug]
ajp_unmarshal_response::jk_ajp_common.c (666): Header[0]
[Content-Type] = [text/html;charset=utf-8]
[Mon Jun 18 12:29:46 2007] [25137:8064] [debug]
ajp_unmarshal_response::jk_ajp_common.c (666): Header[1]
[Content-Length] = [1102]
[Mon Jun 18 12:29:46 2007] [25137:8064] [info]
ajp_service::jk_ajp_common.c (1876): (jcpres1) request failed, because
of response status 404, recoverable operation attempt=1
[Mon Jun 18 12:29:46 2007] [25137:8064] [info]
ajp_service::jk_ajp_common.c (1941): (jcpres1) sending request to
tomcat failed,  recoverable operation attempt=2
[Mon Jun 18 12:29:46 2007] [25137:8064] [error]
ajp_service::jk_ajp_common.c (1953): (jcpres1) Connecting to tomcat
failed. Tomcat is probably not started or is listening on the wrong
port
[Mon Jun 18 12:29:46 2007] [25137:8064] [debug]
ajp_done::jk_ajp_common.c (2286): recycling connection pool slot=0 for
worker jcpres1
[Mon Jun 18 12:29:46 2007] [25137:8064] [info]
service::jk_lb_worker.c (1098): service failed, worker jcpres1 is in
error state
[Mon Jun 18 12:29:46 2007] [25137:8064] [debug]
service::jk_lb_worker.c (): recoverable error... will try to
recover on other worker
[Mon Jun 18 12:29:46 2007] [25137:8064] [info]
service::jk_lb_worker.c (1160): All tomcat instances are busy or in
error state




On 6/18/07, ben short [EMAIL PROTECTED] wrote:

Hi All,

I'm trying to setup session clustering between two Tomcat 6.0.13
instances with Apache 2.2 and Mod JK 1.2.23.

The problem I'm having is that every request returns me a new session
so the users state is not kept, So i assume that the clustering is not
configured correctly.

Looking at the manager app on both tomcats i see the same number of
sessions, so they seem tobe replicated between the server.

Can anyone help me out please.


Here is my server.xml from tomcat 1

Server port=8005 shutdown=SHUTDOWN

  !--APR library loader. Documentation at /docs/apr.html --
  Listener className=org.apache.catalina.core.AprLifecycleListener
SSLEngine=on /
  !--Initialize Jasper prior to webapps are loaded. Documentation at
/docs/jasper-howto.html --
  Listener className=org.apache.catalina.core.JasperListener /
  !-- JMX Support for the Tomcat server. Documentation at
/docs/non-existent.html --
  Listener className=org.apache.catalina.mbeans.ServerLifecycleListener /
  Listener 
className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener
/

  !-- Global JNDI resources --
  GlobalNamingResources
Resource name=UserDatabase auth=Container
  type=org.apache.catalina.UserDatabase
  description=User database that can be updated and saved
  factory=org.apache.catalina.users.MemoryUserDatabaseFactory
  pathname=conf/tomcat-users.xml /
  /GlobalNamingResources

  Service name=Catalina

!-- Define an HTTP/1.1 Connector on port 8080 --
Connector port=8080 protocol=HTTP/1.1
   connectionTimeout=2
   redirectPort=8443 /

!-- Define an AJP 1.3 Connector on port 8009 --
Connector port=8009 protocol=AJP/1.3 redirectPort=8443
address=192.168.6.174
backlog=20
connectionTimeout=0
maxThreads=100
tcpNoDelay=true /

Engine name=Catalina defaultHost=localhost jvmRoute=jcpres1

  Realm className=org.apache.catalina.realm.UserDatabaseRealm
resourceName=UserDatabase/

  Host name=localhost  appBase=webapps
unpackWARs=true autoDeploy=true
xmlValidation=false xmlNamespaceAware=false


Valve className=org.apache.catalina.valves.AccessLogValve 
directory=logs
   prefix=access. suffix=.log pattern=common
resolveHosts=false/


Cluster className=org.apache.catalina.ha.tcp.SimpleTcpCluster
channelSendOptions=4

Manager className=org.apache.catalina.ha.session.DeltaManager
expireSessionsOnShutdown=false
notifyListenersOnReplication=true/

Channel 
className=org.apache.catalina.tribes.group.GroupChannel

Membership
className=org.apache.catalina.tribes.membership.McastService
address=228.0.0.4
port=26816
frequency=500
dropTime=3000/

Receiver 
className

Re: JSVC with JDK 6 on Intel Xenon x86_64

2007-06-14 Thread ben short

Thanks Bil,

I install the amd64 jdk and it all works ok now.

I was thrown my the name, thinking that it was for the amd platform only.

On 6/14/07, Bill Barker [EMAIL PROTECTED] wrote:

Easiest is to symlink amd64 to i386.

Second easiest is to edit Makefile and change the CPU variable to be i386
and recompile.  You could also edit location.c and add the right path and
recompile.

ben short [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Hi,

 I'm trying to compile jsvc on a RedHat 4 ES box. I have installed JDK
 6 and typing java -version at the shell prompt tells me its installed
 OK.
 I then compile jsvc with that jdk and it completes ok.
 When I try and run the following startup script I get the following
 debug output.


 #!/bin/bash
 # chkconfig: 2345 101  05
 # description: Apache Tomcat 6

 JAVA_HOME='/usr/lib/jvm/java-1.6.0-sun'
 CATALINA_HOME='/usr/local/tomcat/tomcat6'

 CLASSPATH=$CATALINA_HOME/bin/bootstrap.jar
 CLASSPATH=${CLASSPATH}:$CATALINA_HOME/bin/commons-daemon.jar
 CLASSPATH=${CLASSPATH}:$JAVA_HOME/lib/tools.jar
 echo $CLASSPATH

 JAVA_OPTS='-Xms1024m -Xmx3072m -server'
 JAVA_DEBUG_OPTS= -Xdebug -Xnoagent -Djava.compiler=NONE
 -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005

 # Uncomment the next line to enable java debuging
 #JAVA_OPTS=${JAVA_OPTS} ${JAVA_DEBUG_OPTS}
 echo $JAVA_OPTS


 TOMCAT_USER=daemon

 TMPDIR=/var/tmp


 RC=0

 case $1 in

  start)

   $CATALINA_HOME/bin/jsvc   \
 -debug \
 -user $TOMCAT_USER \
 -home $JAVA_HOME   \
 -jvm server \
 -Dcatalina.home=$CATALINA_HOME \
 -Xmx256m \
 -Djava.io.tmpdir=$TMPDIR \
 -Djava.awt.headless=true \
 -outfile $CATALINA_HOME/logs/catalina.out \
 -errfile $CATALINA_HOME/logs/catalina.err \
 -cp $CLASSPATH  \
 org.apache.catalina.startup.Bootstrap

RC=$?

[ $RC = 0 ]  touch /var/lock/subsys/tomcat
;;

  stop)

PID=`cat /var/run/jsvc.pid`
kill $PID

   RC=$?

[ $RC = 0 ]  rm -f /var/lock/subsys/tomcat /var/run/jsvc.pid
;;

  *)
echo Usage: $0 {start|stop}
exit 1

 esac
 exit $RC


 13/06/2007 13:28:41 10653 jsvc debug: +-- DUMPING PARSED COMMAND LINE
 ARGUMENTS --
 13/06/2007 13:28:41 10653 jsvc debug: | Detach:  True
 13/06/2007 13:28:41 10653 jsvc debug: | Show Version:No
 13/06/2007 13:28:41 10653 jsvc debug: | Show Help:   No
 13/06/2007 13:28:41 10653 jsvc debug: | Check Only:  Disabled
 13/06/2007 13:28:41 10653 jsvc debug: | Stop:False
 13/06/2007 13:28:41 10653 jsvc debug: | Wait:0
 13/06/2007 13:28:41 10653 jsvc debug: | Run as service:  No
 13/06/2007 13:28:41 10653 jsvc debug: | Install service: No
 13/06/2007 13:28:41 10653 jsvc debug: | Remove service:  No
 13/06/2007 13:28:41 10653 jsvc debug: | JVM Name:server
 13/06/2007 13:28:41 10653 jsvc debug: | Java Home:
 /usr/lib/jvm/java-1.6.0-sun
 13/06/2007 13:28:41 10653 jsvc debug: | PID File:
 /var/run/jsvc.pid
 13/06/2007 13:28:41 10653 jsvc debug: | User Name:   daemon
 13/06/2007 13:28:41 10653 jsvc debug: | Extra Options:   5
 13/06/2007 13:28:41 10653 jsvc debug: |
 -Dcatalina.home=/usr/local/tomcat/tomcat6
 13/06/2007 13:28:41 10653 jsvc debug: |   -Xmx256m
 13/06/2007 13:28:41 10653 jsvc debug: |   -Djava.io.tmpdir=/var/tmp
 13/06/2007 13:28:41 10653 jsvc debug: |   -Djava.awt.headless=true
 13/06/2007 13:28:41 10653 jsvc debug: |
 
-Djava.class.path=/usr/local/tomcat/tomcat6/bin/bootstrap.jar:/usr/local/tomcat/tomcat6/bin/commons-daemon.jar:/usr/lib/jvm/java-1.6.0-sun/lib/tools.jar
 13/06/2007 13:28:41 10653 jsvc debug: | Class Invoked:
 org.apache.catalina.startup.Bootstrap
 13/06/2007 13:28:41 10653 jsvc debug: | Class Arguments: 0
 13/06/2007 13:28:41 10653 jsvc debug:
 +---
 13/06/2007 13:28:41 10654 jsvc debug: user changed to 'daemon'
 13/06/2007 13:28:41 10653 jsvc debug: User 'daemon' validated
 13/06/2007 13:28:41 10653 jsvc debug: Attempting to locate Java Home
 in /usr/lib/jvm/java-1.6.0-sun
 13/06/2007 13:28:41 10653 jsvc debug: Attempting to locate VM
 configuration file /usr/lib/jvm/java-1.6.0-sun/jre/lib/jvm.cfg
 13/06/2007 13:28:41 10653 jsvc debug: Attempting to locate VM
 configuration file /usr/lib/jvm/java-1.6.0-sun/lib/jvm.cfg
 13/06/2007 13:28:41 10653 jsvc debug: Attempting to locate VM
 configuration file /usr/lib/jvm/java-1.6.0-sun/jre/lib/amd64/jvm.cfg
 13/06/2007 13:28:41 10653 jsvc debug: Attempting to locate VM
 configuration file /usr/lib/jvm/java-1.6.0-sun/lib/amd64/jvm.cfg
 13/06/2007 13:28:41 10653 jsvc debug: VM configuration file not found
 13/06/2007 13:28:41 10653 jsvc debug: Attempting to locate VM library
 /usr/lib/jvm/java-1.6.0-sun/jre/lib/amd64/classic/libjvm.so
 13/06/2007 13:28:41 10653 jsvc debug: Attempting to locate VM library
 /usr/lib/jvm/java-1.6.0-sun/jre/lib/amd64/client/libjvm.so
 13/06/2007 13:28:41 10653 jsvc debug: Attempting to locate VM library
 /usr/lib/jvm/java-1.6.0-sun/jre/lib

JSVC with JDK 6 on Intel Xenon x86_64

2007-06-13 Thread ben short

Hi,

I'm trying to compile jsvc on a RedHat 4 ES box. I have installed JDK
6 and typing java -version at the shell prompt tells me its installed
OK.
I then compile jsvc with that jdk and it completes ok.
When I try and run the following startup script I get the following
debug output.


#!/bin/bash
# chkconfig: 2345 101  05
# description: Apache Tomcat 6

JAVA_HOME='/usr/lib/jvm/java-1.6.0-sun'
CATALINA_HOME='/usr/local/tomcat/tomcat6'

CLASSPATH=$CATALINA_HOME/bin/bootstrap.jar
CLASSPATH=${CLASSPATH}:$CATALINA_HOME/bin/commons-daemon.jar
CLASSPATH=${CLASSPATH}:$JAVA_HOME/lib/tools.jar
echo $CLASSPATH

JAVA_OPTS='-Xms1024m -Xmx3072m -server'
JAVA_DEBUG_OPTS= -Xdebug -Xnoagent -Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005

# Uncomment the next line to enable java debuging
#JAVA_OPTS=${JAVA_OPTS} ${JAVA_DEBUG_OPTS}
echo $JAVA_OPTS


TOMCAT_USER=daemon

TMPDIR=/var/tmp


RC=0

case $1 in

 start)

  $CATALINA_HOME/bin/jsvc   \
-debug \
-user $TOMCAT_USER \
-home $JAVA_HOME   \
-jvm server \
-Dcatalina.home=$CATALINA_HOME \
-Xmx256m \
-Djava.io.tmpdir=$TMPDIR \
-Djava.awt.headless=true \
-outfile $CATALINA_HOME/logs/catalina.out \
-errfile $CATALINA_HOME/logs/catalina.err \
-cp $CLASSPATH  \
org.apache.catalina.startup.Bootstrap

   RC=$?

   [ $RC = 0 ]  touch /var/lock/subsys/tomcat
   ;;

 stop)

   PID=`cat /var/run/jsvc.pid`
   kill $PID

  RC=$?

   [ $RC = 0 ]  rm -f /var/lock/subsys/tomcat /var/run/jsvc.pid
   ;;

 *)
   echo Usage: $0 {start|stop}
   exit 1

esac
exit $RC


13/06/2007 13:28:41 10653 jsvc debug: +-- DUMPING PARSED COMMAND LINE
ARGUMENTS --
13/06/2007 13:28:41 10653 jsvc debug: | Detach:  True
13/06/2007 13:28:41 10653 jsvc debug: | Show Version:No
13/06/2007 13:28:41 10653 jsvc debug: | Show Help:   No
13/06/2007 13:28:41 10653 jsvc debug: | Check Only:  Disabled
13/06/2007 13:28:41 10653 jsvc debug: | Stop:False
13/06/2007 13:28:41 10653 jsvc debug: | Wait:0
13/06/2007 13:28:41 10653 jsvc debug: | Run as service:  No
13/06/2007 13:28:41 10653 jsvc debug: | Install service: No
13/06/2007 13:28:41 10653 jsvc debug: | Remove service:  No
13/06/2007 13:28:41 10653 jsvc debug: | JVM Name:server
13/06/2007 13:28:41 10653 jsvc debug: | Java Home:
/usr/lib/jvm/java-1.6.0-sun
13/06/2007 13:28:41 10653 jsvc debug: | PID File:/var/run/jsvc.pid
13/06/2007 13:28:41 10653 jsvc debug: | User Name:   daemon
13/06/2007 13:28:41 10653 jsvc debug: | Extra Options:   5
13/06/2007 13:28:41 10653 jsvc debug: |
-Dcatalina.home=/usr/local/tomcat/tomcat6
13/06/2007 13:28:41 10653 jsvc debug: |   -Xmx256m
13/06/2007 13:28:41 10653 jsvc debug: |   -Djava.io.tmpdir=/var/tmp
13/06/2007 13:28:41 10653 jsvc debug: |   -Djava.awt.headless=true
13/06/2007 13:28:41 10653 jsvc debug: |
-Djava.class.path=/usr/local/tomcat/tomcat6/bin/bootstrap.jar:/usr/local/tomcat/tomcat6/bin/commons-daemon.jar:/usr/lib/jvm/java-1.6.0-sun/lib/tools.jar
13/06/2007 13:28:41 10653 jsvc debug: | Class Invoked:
org.apache.catalina.startup.Bootstrap
13/06/2007 13:28:41 10653 jsvc debug: | Class Arguments: 0
13/06/2007 13:28:41 10653 jsvc debug:
+---
13/06/2007 13:28:41 10654 jsvc debug: user changed to 'daemon'
13/06/2007 13:28:41 10653 jsvc debug: User 'daemon' validated
13/06/2007 13:28:41 10653 jsvc debug: Attempting to locate Java Home
in /usr/lib/jvm/java-1.6.0-sun
13/06/2007 13:28:41 10653 jsvc debug: Attempting to locate VM
configuration file /usr/lib/jvm/java-1.6.0-sun/jre/lib/jvm.cfg
13/06/2007 13:28:41 10653 jsvc debug: Attempting to locate VM
configuration file /usr/lib/jvm/java-1.6.0-sun/lib/jvm.cfg
13/06/2007 13:28:41 10653 jsvc debug: Attempting to locate VM
configuration file /usr/lib/jvm/java-1.6.0-sun/jre/lib/amd64/jvm.cfg
13/06/2007 13:28:41 10653 jsvc debug: Attempting to locate VM
configuration file /usr/lib/jvm/java-1.6.0-sun/lib/amd64/jvm.cfg
13/06/2007 13:28:41 10653 jsvc debug: VM configuration file not found
13/06/2007 13:28:41 10653 jsvc debug: Attempting to locate VM library
/usr/lib/jvm/java-1.6.0-sun/jre/lib/amd64/classic/libjvm.so
13/06/2007 13:28:41 10653 jsvc debug: Attempting to locate VM library
/usr/lib/jvm/java-1.6.0-sun/jre/lib/amd64/client/libjvm.so
13/06/2007 13:28:41 10653 jsvc debug: Attempting to locate VM library
/usr/lib/jvm/java-1.6.0-sun/jre/lib/amd64/libjvm.so
13/06/2007 13:28:41 10653 jsvc debug: Attempting to locate VM library
/usr/lib/jvm/java-1.6.0-sun/lib/amd64/classic/libjvm.so
13/06/2007 13:28:41 10653 jsvc debug: Attempting to locate VM library
/usr/lib/jvm/java-1.6.0-sun/lib/amd64/client/libjvm.so
13/06/2007 13:28:41 10653 jsvc debug: Attempting to locate VM library
/usr/lib/jvm/java-1.6.0-sun/lib/amd64/libjvm.so
13/06/2007 13:28:41 10653 jsvc debug: Attempting to locate VM library
/usr/lib/jvm/java-1.6.0-sun/jre/bin/amd64/classic/libjvm.so
13/06/2007 13:28:41 10653 jsvc 

Re: Cookie Rookie - cannot delete session cookie

2007-06-01 Thread ben short

Hi,

To delete a cookie you have to set its max age to 0.

Calling invalidate on the httpsession will delete the cookie that
holds the session id, wont it? request.getSession().invalidate()

Ben


On 6/1/07, Tim Funk [EMAIL PROTECTED] wrote:

There is nothing in the servelt api to explicitly delete the session cookie.


-Tim

Mike Peremsky wrote:
 I am pretty new to cookies and am having an issue. I create a cookie in my 
servlet and write it to the response to last the lifetime of the session (duration 
= -1). When the user clicks the logout button I find the cookie, reset the 
duration to 0 then re-add the cookie to the response. But when I look at the 
browser cookies the cookie is still there and is listed as a cookie lasting the 
lifetime of the session. From what I read in the API there is nothing to directly 
remove a cookie from a session, I can only write it with a duration of 0. So, why 
is the cookie still in the session? How can I get rid of it?


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




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

2007-05-31 Thread ben short

Ok I got it all working.

The server.xml supplied with tomcat 5.5 is slightly misleading IMO.

Deployer className=org.apache.catalina.cluster.deploy.FarmWarDeployer
 tempDir=/tmp/war-temp/
 deployDir=/tmp/war-deploy/
 watchDir=/tmp/war-listen/
 watchEnabled=false/

I assumed that the deployDir could be anywhere as long as it was
accessible to the tomcat user. But after searching nabble I tried
setting it to the webapps dir and it all sprung into life.

On 5/30/07, ben short [EMAIL PROTECTED] wrote:

Hi,

After reviewing the cluster-howto [1] I have noticed a few bits I have
forgotten to configure.

Namely

# Make sure your web.xml has the distributable/ element or set at
your Context distributable=true /
# Make sure that jvmRoute attribute is set at your Engine Engine
name=Catalina jvmRoute=node01 

[1] http://tomcat.apache.org/tomcat-5.5-doc/cluster-howto.html

On 5/30/07, ben short [EMAIL PROTECTED] wrote:
 Hi,

 I'm trying to setup a cluster of two tomcats and use the

 Tomcat 1 server.conf

   Cluster className=org.apache.catalina.cluster.tcp.SimpleTcpCluster

 managerClassName=org.apache.catalina.cluster.session.DeltaManager
  expireSessionsOnShutdown=false
  useDirtyFlag=true
  notifyListenersOnReplication=true

 Membership
 className=org.apache.catalina.cluster.mcast.McastService
 mcastAddr=228.0.0.4
 mcastPort=45564
 mcastFrequency=500
 mcastDropTime=3000/

 Receiver
 
className=org.apache.catalina.cluster.tcp.ReplicationListener
 tcpListenAddress=192.168.6.175
 tcpListenPort=4001
 tcpSelectorTimeout=100
 tcpThreadCount=6/

 Sender

 className=org.apache.catalina.cluster.tcp.ReplicationTransmitter
 replicationMode=pooled
 ackTimeout=15000
 waitForAck=true/

 Valve 
className=org.apache.catalina.cluster.tcp.ReplicationValve

 filter=.*\.gif;.*\.js;.*\.jpg;.*\.png;.*\.htm;.*\.html;.*\.css;.*\.txt;/

 Deployer
 className=org.apache.catalina.cluster.deploy.FarmWarDeployer
   tempDir=/home/tomcat/war-temp/
   deployDir=/home/tomcat/war-deploy/
   watchDir=/home/tomcat/war-listen/
   watchEnabled=false/

 ClusterListener
 className=org.apache.catalina.cluster.session.ClusterSessionListener/
 /Cluster


 Tomcat 2 server.conf

   Cluster className=org.apache.catalina.cluster.tcp.SimpleTcpCluster

 managerClassName=org.apache.catalina.cluster.session.DeltaManager
  expireSessionsOnShutdown=false
  useDirtyFlag=true
  notifyListenersOnReplication=true

 Membership
 className=org.apache.catalina.cluster.mcast.McastService
 mcastAddr=228.0.0.4
 mcastPort=45564
 mcastFrequency=500
 mcastDropTime=3000/

 Receiver
 
className=org.apache.catalina.cluster.tcp.ReplicationListener
 tcpListenAddress=192.168.6.103
 tcpListenPort=4001
 tcpSelectorTimeout=100
 tcpThreadCount=6/

 Sender

 className=org.apache.catalina.cluster.tcp.ReplicationTransmitter
 replicationMode=pooled
 ackTimeout=15000
 waitForAck=true/

 Valve 
className=org.apache.catalina.cluster.tcp.ReplicationValve

 filter=.*\.gif;.*\.js;.*\.jpg;.*\.png;.*\.htm;.*\.html;.*\.css;.*\.txt;/

 Deployer
 className=org.apache.catalina.cluster.deploy.FarmWarDeployer
   tempDir=/home/tomcat/war-temp/
   deployDir=/home/tomcat/war-deploy/
   watchDir=/home/tomcat/war-listen/
   watchEnabled=false/

 ClusterListener
 className=org.apache.catalina.cluster.session.ClusterSessionListener/
 /Cluster


 I configured it so that only tomcat 1 can deploy new webapps via the
 FarmWarDeployer mechanism.

 When I upload my war to the watchDir i see the following messages in
 catalina.log.

 INFO: check cluster wars at /home/tomcat/war-listen
 30-May-2007 13:07:37
 org.apache.catalina.cluster.deploy.FarmWarDeployer fileModified
 INFO: Installing webapp[] from /home/tomcat/war-deploy/ROOT.war
 30-May-2007 13:07:37 org.apache.catalina.cluster.deploy.FarmWarDeployer remove
 INFO: Cluster wide remove of web app
 30-May-2007 13:07:59 org.apache.catalina.cluster.deploy.WarWatcher check

 The ROOT.war is in tomcat 1 and tomcat 2 deployDir, but is not in
 either tomcats manager app or accessible via the webapps url.

 Can anyone give me some help with getting this going?

 Regards

 Ben

FarmWarDeployer

2007-05-30 Thread ben short

Hi,

I'm trying to setup a cluster of two tomcats and use the

Tomcat 1 server.conf

 Cluster className=org.apache.catalina.cluster.tcp.SimpleTcpCluster

managerClassName=org.apache.catalina.cluster.session.DeltaManager
expireSessionsOnShutdown=false
useDirtyFlag=true
notifyListenersOnReplication=true

   Membership
   className=org.apache.catalina.cluster.mcast.McastService
   mcastAddr=228.0.0.4
   mcastPort=45564
   mcastFrequency=500
   mcastDropTime=3000/

   Receiver
   className=org.apache.catalina.cluster.tcp.ReplicationListener
   tcpListenAddress=192.168.6.175
   tcpListenPort=4001
   tcpSelectorTimeout=100
   tcpThreadCount=6/

   Sender

className=org.apache.catalina.cluster.tcp.ReplicationTransmitter
   replicationMode=pooled
   ackTimeout=15000
   waitForAck=true/

   Valve className=org.apache.catalina.cluster.tcp.ReplicationValve

filter=.*\.gif;.*\.js;.*\.jpg;.*\.png;.*\.htm;.*\.html;.*\.css;.*\.txt;/

   Deployer
className=org.apache.catalina.cluster.deploy.FarmWarDeployer
 tempDir=/home/tomcat/war-temp/
 deployDir=/home/tomcat/war-deploy/
 watchDir=/home/tomcat/war-listen/
 watchEnabled=false/

   ClusterListener
className=org.apache.catalina.cluster.session.ClusterSessionListener/
   /Cluster


Tomcat 2 server.conf

 Cluster className=org.apache.catalina.cluster.tcp.SimpleTcpCluster

managerClassName=org.apache.catalina.cluster.session.DeltaManager
expireSessionsOnShutdown=false
useDirtyFlag=true
notifyListenersOnReplication=true

   Membership
   className=org.apache.catalina.cluster.mcast.McastService
   mcastAddr=228.0.0.4
   mcastPort=45564
   mcastFrequency=500
   mcastDropTime=3000/

   Receiver
   className=org.apache.catalina.cluster.tcp.ReplicationListener
   tcpListenAddress=192.168.6.103
   tcpListenPort=4001
   tcpSelectorTimeout=100
   tcpThreadCount=6/

   Sender

className=org.apache.catalina.cluster.tcp.ReplicationTransmitter
   replicationMode=pooled
   ackTimeout=15000
   waitForAck=true/

   Valve className=org.apache.catalina.cluster.tcp.ReplicationValve

filter=.*\.gif;.*\.js;.*\.jpg;.*\.png;.*\.htm;.*\.html;.*\.css;.*\.txt;/

   Deployer
className=org.apache.catalina.cluster.deploy.FarmWarDeployer
 tempDir=/home/tomcat/war-temp/
 deployDir=/home/tomcat/war-deploy/
 watchDir=/home/tomcat/war-listen/
 watchEnabled=false/

   ClusterListener
className=org.apache.catalina.cluster.session.ClusterSessionListener/
   /Cluster


I configured it so that only tomcat 1 can deploy new webapps via the
FarmWarDeployer mechanism.

When I upload my war to the watchDir i see the following messages in
catalina.log.

INFO: check cluster wars at /home/tomcat/war-listen
30-May-2007 13:07:37
org.apache.catalina.cluster.deploy.FarmWarDeployer fileModified
INFO: Installing webapp[] from /home/tomcat/war-deploy/ROOT.war
30-May-2007 13:07:37 org.apache.catalina.cluster.deploy.FarmWarDeployer remove
INFO: Cluster wide remove of web app
30-May-2007 13:07:59 org.apache.catalina.cluster.deploy.WarWatcher check

The ROOT.war is in tomcat 1 and tomcat 2 deployDir, but is not in
either tomcats manager app or accessible via the webapps url.

Can anyone give me some help with getting this going?

Regards

Ben Short

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

2007-05-30 Thread ben short

Hi,

After reviewing the cluster-howto [1] I have noticed a few bits I have
forgotten to configure.

Namely

# Make sure your web.xml has the distributable/ element or set at
your Context distributable=true /
# Make sure that jvmRoute attribute is set at your Engine Engine
name=Catalina jvmRoute=node01 

[1] http://tomcat.apache.org/tomcat-5.5-doc/cluster-howto.html

On 5/30/07, ben short [EMAIL PROTECTED] wrote:

Hi,

I'm trying to setup a cluster of two tomcats and use the

Tomcat 1 server.conf

  Cluster className=org.apache.catalina.cluster.tcp.SimpleTcpCluster

managerClassName=org.apache.catalina.cluster.session.DeltaManager
 expireSessionsOnShutdown=false
 useDirtyFlag=true
 notifyListenersOnReplication=true

Membership
className=org.apache.catalina.cluster.mcast.McastService
mcastAddr=228.0.0.4
mcastPort=45564
mcastFrequency=500
mcastDropTime=3000/

Receiver
className=org.apache.catalina.cluster.tcp.ReplicationListener
tcpListenAddress=192.168.6.175
tcpListenPort=4001
tcpSelectorTimeout=100
tcpThreadCount=6/

Sender

className=org.apache.catalina.cluster.tcp.ReplicationTransmitter
replicationMode=pooled
ackTimeout=15000
waitForAck=true/

Valve className=org.apache.catalina.cluster.tcp.ReplicationValve

filter=.*\.gif;.*\.js;.*\.jpg;.*\.png;.*\.htm;.*\.html;.*\.css;.*\.txt;/

Deployer
className=org.apache.catalina.cluster.deploy.FarmWarDeployer
  tempDir=/home/tomcat/war-temp/
  deployDir=/home/tomcat/war-deploy/
  watchDir=/home/tomcat/war-listen/
  watchEnabled=false/

ClusterListener
className=org.apache.catalina.cluster.session.ClusterSessionListener/
/Cluster


Tomcat 2 server.conf

  Cluster className=org.apache.catalina.cluster.tcp.SimpleTcpCluster

managerClassName=org.apache.catalina.cluster.session.DeltaManager
 expireSessionsOnShutdown=false
 useDirtyFlag=true
 notifyListenersOnReplication=true

Membership
className=org.apache.catalina.cluster.mcast.McastService
mcastAddr=228.0.0.4
mcastPort=45564
mcastFrequency=500
mcastDropTime=3000/

Receiver
className=org.apache.catalina.cluster.tcp.ReplicationListener
tcpListenAddress=192.168.6.103
tcpListenPort=4001
tcpSelectorTimeout=100
tcpThreadCount=6/

Sender

className=org.apache.catalina.cluster.tcp.ReplicationTransmitter
replicationMode=pooled
ackTimeout=15000
waitForAck=true/

Valve className=org.apache.catalina.cluster.tcp.ReplicationValve

filter=.*\.gif;.*\.js;.*\.jpg;.*\.png;.*\.htm;.*\.html;.*\.css;.*\.txt;/

Deployer
className=org.apache.catalina.cluster.deploy.FarmWarDeployer
  tempDir=/home/tomcat/war-temp/
  deployDir=/home/tomcat/war-deploy/
  watchDir=/home/tomcat/war-listen/
  watchEnabled=false/

ClusterListener
className=org.apache.catalina.cluster.session.ClusterSessionListener/
/Cluster


I configured it so that only tomcat 1 can deploy new webapps via the
FarmWarDeployer mechanism.

When I upload my war to the watchDir i see the following messages in
catalina.log.

INFO: check cluster wars at /home/tomcat/war-listen
30-May-2007 13:07:37
org.apache.catalina.cluster.deploy.FarmWarDeployer fileModified
INFO: Installing webapp[] from /home/tomcat/war-deploy/ROOT.war
30-May-2007 13:07:37 org.apache.catalina.cluster.deploy.FarmWarDeployer remove
INFO: Cluster wide remove of web app
30-May-2007 13:07:59 org.apache.catalina.cluster.deploy.WarWatcher check

The ROOT.war is in tomcat 1 and tomcat 2 deployDir, but is not in
either tomcats manager app or accessible via the webapps url.

Can anyone give me some help with getting this going?

Regards

Ben Short



-
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: pre-compile

2007-05-25 Thread ben short

At a guess i would say that if your jsp's compiled ok then all should be good.

Sorry to the tomcat guys for this post being a bit off topic.

On 5/25/07, Rogerio Baldini das Neves [EMAIL PROTECTED] wrote:

Hi Bem,

It worked...

I was using jstl 1.2 and everything worked when I changed to 1.1.2.

Thanks a lot.

Now, I need to monitor if this change won't bring me some side effect.





-Mensagem original-
De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Em nome de ben
short
Enviada em: quinta-feira, 24 de maio de 2007 17:52
Para: Tomcat Users List
Assunto: Re: pre-compile

Looks like you need the taglibs dependency. Try adding these to your pom.

dependency
groupIdtaglibs/groupId
artifactIdstandard/artifactId
version1.1.2/version
scopecompile/scope
/dependency

dependency
groupIdjavax.servlet/groupId
artifactIdjstl/artifactId
version1.1.2/version
scopecompile/scope
/dependency


On 5/24/07, Rogerio Baldini das Neves [EMAIL PROTECTED]
wrote:
 I am using this plugin like in tutorial.
 But it's happing some strange with item:

org.apache.taglibs.standard.tag.rt.core.ForTokensTag.setItems(Ljava/lang/Str
 ing;)V




 -Mensagem original-
 De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Em nome de ben
 short
 Enviada em: quinta-feira, 24 de maio de 2007 17:06
 Para: Tomcat Users List
 Assunto: Re: pre-compile

 Have a look at this maven 2 plugin

 http://mojo.codehaus.org/jspc-maven-plugin/usage.html

 Ben

 On 5/24/07, Rogerio Baldini das Neves [EMAIL PROTECTED]
 wrote:
  I need to do it in maven.
  But send me your solution,
  if I don't be able to solve my problem with maven, I will use yours.
 
  Thank you.
 
 
 
  -Mensagem original-
  De: Milanez, Marcus [mailto:[EMAIL PROTECTED]
  Enviada em: quinta-feira, 24 de maio de 2007 15:34
  Para: Tomcat Users List
  Assunto: RES: pre-compile
 
  I know how to do it using ANT. Would you like it?
 
  -Mensagem original-
  De: Rogerio Baldini das Neves [mailto:[EMAIL PROTECTED]
 
  Enviada em: quinta-feira, 24 de maio de 2007 15:30
  Para: users@tomcat.apache.org
  Assunto: pre-compile
 
  Hi Guys,
 
 
 
  I'd like to pre-compile my jsps for Tomcat 6 using maven.
 
 
 
  Anybody knows how it is possible ?
 
 
 
  I've tried to compile using jspc-maven-plugin 1.4.6 and 1.4.7-SNAPSHOT.
 
  But in both I've received the message:
 
  org.apache.taglibs.standard.tag.rt.core.ForTokensTag.setItems(Ljava/lang
  /Str
  ing;)V
 
  when accessing some pages.
 
 
 
  Thanks,
 
 
 
  Rogerio Baldini
 
 
 
 
 
 
  -
  To start a new topic, e-mail: users@tomcat.apache.org
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
  --
  No virus found in this incoming message.
  Checked by AVG Free Edition.
  Version: 7.5.467 / Virus Database: 269.7.6/815 - Release Date: 22/5/2007
  15:49
 
 
 
  -
  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]


 --
 No virus found in this incoming message.
 Checked by AVG Free Edition.
 Version: 7.5.467 / Virus Database: 269.7.6/815 - Release Date: 22/5/2007
 15:49


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


--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.467 / Virus Database: 269.7.6/815 - Release Date: 22/5/2007
15:49



-
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: How to monitor Tomcat Server.

2007-05-24 Thread ben short

How about Nagios [1]. It can check allsort of things. And you can set
it up to send email/sms notifications.



[1] http://nagios.org/

On 5/24/07, Neil Meyer [EMAIL PROTECTED] wrote:

Hi,

I have found from one of these group the following monitor tool.

www.appmanager.com

You will find a tool there that you can install that checks Tomcat, OS, DB
etc.

Kr
Neil Meyer

-Original Message-
From: Praveen Kumar [mailto:[EMAIL PROTECTED]
Sent: 24 May 2007 11:18 AM
To: Tomcat Users List
Subject: Re: How to monitor Tomcat Server.

Hi Raghu,


Right now i am using  this logic  only. it is working fine.

Is  there any  another way  to monitor  tomcat server  ?

I mean , Is  tomcat server  group  provides  any  feature to fulfil this
requirement  ?

Any  help  ?

Thanks
Praveen






On 5/24/07, Raghupathy, Gurumoorthy [EMAIL PROTECTED]
wrote:

 http://jakarta.apache.org/jmeter/usermanual/build-monitor-test-plan.html


 this works great :)


 -Original Message-
 From: Praveen Kumar [mailto:[EMAIL PROTECTED]
 Sent: 24 May 2007 07:14
 To: users@tomcat.apache.org
 Subject: How to monitor Tomcat Server.

 Hi All,

 I'm using Tomcat server for  my Project.

 Here, I  need to  send  mails to some mail aliases   regarding  tomcat
 server  status  i.e once it is  shutdown  , i need to  send mail  saying
 that  tomcat server is down etc  like that.

 I  hope that  Apache tomcat  group  itself  have some  options to
 monitor
 server  status.

 Is  there  any way  to monitor  tomcat server status  always.

 Pls  help  me in this regard. waiting  for valuble responses .


 Thanks
 Praveen Kumar.

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




--
Thanks
Domma Raju Praveen Kumar.

-
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: How to monitor Tomcat Server.

2007-05-24 Thread ben short

I would think that they have apache httpd running in font of tomcat
and the page is displayed by that.

On 5/24/07, Praveen Kumar [EMAIL PROTECTED] wrote:

Thanks for  your ans.

They  should  provide  some option  saying  send mail to  x before
shutdown.

That will be more helpful.

And one more  thing i have seen many  pages saying

Server is down  , sorry  
They will tell some time to  come  up  

right   , how they will  implement  this  ?

Is they are  providing some backup server for that  ?

What is  logic behind that  ?

Any help  ove  this  ?

Thanks
Praveen.







On 5/24/07, Pid [EMAIL PROTECTED] wrote:

 Praveen Kumar wrote:
  Hi Raghu,
 
 
  Right now i am using  this logic  only. it is working fine.
 
  Is  there any  another way  to monitor  tomcat server  ?
 
  I mean , Is  tomcat server  group  provides  any  feature to fulfil this
  requirement  ?
 
  Any  help  ?
 
  Thanks
  Praveen

 If you're asking whether Tomcat can send a message saying that it has
 shutdown, then no it can't - mostly because it's shutdown...

 There's no monitoring software provided with Tomcat.



 
  On 5/24/07, Raghupathy, Gurumoorthy [EMAIL PROTECTED]
  wrote:
 
 
 http://jakarta.apache.org/jmeter/usermanual/build-monitor-test-plan.html
 
 
  this works great :)
 
 
  -Original Message-
  From: Praveen Kumar [mailto:[EMAIL PROTECTED]
  Sent: 24 May 2007 07:14
  To: users@tomcat.apache.org
  Subject: How to monitor Tomcat Server.
 
  Hi All,
 
  I'm using Tomcat server for  my Project.
 
  Here, I  need to  send  mails to some mail aliases   regarding  tomcat
  server  status  i.e once it is  shutdown  , i need to  send
 mail  saying
  that  tomcat server is down etc  like that.
 
  I  hope that  Apache tomcat  group  itself  have some  options to
  monitor
  server  status.
 
  Is  there  any way  to monitor  tomcat server status  always.
 
  Pls  help  me in this regard. waiting  for valuble responses .
 
 
  Thanks
  Praveen Kumar.
 
  -
  To start a new topic, e-mail: users@tomcat.apache.org
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 





--
Thanks
Domma Raju Praveen Kumar.



-
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: How to monitor Tomcat Server.

2007-05-24 Thread ben short

I'd still recommend Nagios to do the monitoring, far cheaper than
hiring someone to do the checking 24*7. Also you'll get an instant
notification of when things go bad, rather then in 2 hours time when
someone checks it.

You could setup 2 instances of nagios.. get them to monitor each other
and then also mirror everything that will be monitored onto each of
them. You;ll get two alerts if things go bad, but that's better than
none.

A faq on nagios monitoring tomcat..

http://nagios.org/faqs/viewfaq.php?faq_id=310

On 5/24/07, Mark H. Wood [EMAIL PROTECTED] wrote:

On Thu, May 24, 2007 at 03:03:12PM +0530, Praveen Kumar wrote:
 It seems this is also one type of  tool. Here  again we have some problem
 ie  we  should  monitor this tool too right  ?

 So  instead installing new  tool to  monitor  tomcat server , is there any
 feature   that apache group provides  to  inform tomcat server status ?

There is an insoluble dilemma here.

If you use a separate process to monitor your server, then that
process must also be monitored.  Eventually you have two processes
watching each other, whatever else they may be doing.

If you do *not* use a separate process, then your server can only
report its state transitions if it is still able to do so.  A crashed
process cannot tell you that it has crashed; the most you can get is
that it will begin failing to tell you that it has *not* crashed.

To get complete coverage can become quite elaborate.  To protect
against hardware failure, you need two machines monitoring each other.
To protect against network or utility power failure, you need two (or
more) machines monitoring each other from different sites.

At some point as this scales up, it may be more sensible to just hire
somebody to watch screens and check things periodically.

--
Mark H. Wood, Lead System Programmer   [EMAIL PROTECTED]
Typically when a software vendor says that a product is intuitive he
means the exact opposite.





-
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: pre-compile

2007-05-24 Thread ben short

The maven config is easier on the eye ;)

On 5/24/07, Milanez, Marcus [EMAIL PROTECTED] wrote:


See if it helps you then...

target name=generate_jsp_java
echoGenerating .java files from .jsp files/echo

taskdef classname=org.apache.jasper.JspC name=jasper2 
  classpath id=jspc.classpath
pathelement location=${java.home}/lib/tools.jar/
fileset dir=${tomcat.home}/bin
  include name=*.jar/
/fileset
fileset dir=${tomcat.home}/lib
  include name=*.jar/
/fileset
fileset dir=${appFolder}/WEB-INF/lib
  include name=*.jar/
/fileset
  /classpath
/taskdef

jasper2
 validateXml=false
 uriroot=${appFolder}

webXmlFragment=${appFolder}/WEB-INF/generated_web.xml
 outputDir=${appFolder}/WEB-INF/src
/

!--
There must be a commented section !-- [INSERT FRAGMENT
HERE] -- in your original web.xml file, just after your last
servlet-class tag
 --
loadfile property=webXmlFragment
srcFile=${appFolder}/WEB-INF/generated_web.xml/
replace file=${appFolder}/WEB-INF/web.xml
token=lt;!-- [INSERT FRAGMENT HERE] --gt;
value=${webXmlFragment}/
delete file=${appFolder}/WEB-INF/generated_web.xml /

/target

target name=compile_jsps
echoCompiling JSPs/echo
mkdir dir=${appFolder}/WEB-INF/classes/
mkdir dir=${appFolder}/WEB-INF/lib/

javac destdir=${appFolder}/WEB-INF/classes
   optimize=on
   debug=on failonerror=false
   srcdir=${appFolder}/WEB-INF/src
   excludes=**/*.smap
  classpath
pathelement location=${appFolder}/WEB-INF/classes/
fileset dir=${appFolder}/WEB-INF/lib
  include name=*.jar/
/fileset
fileset dir=${appFolder}/
  include name=**/*.jsp/
/fileset
fileset dir=${tomcat.home}/bin
  include name=*.jar/
/fileset
fileset dir=${tomcat.home}/lib
  include name=*.jar/
/fileset
  /classpath
  include name=** /
  exclude name=tags/** /
/javac

/target

-Mensagem original-
De: Rogerio Baldini das Neves [mailto:[EMAIL PROTECTED]

Enviada em: quinta-feira, 24 de maio de 2007 15:43
Para: 'Tomcat Users List'
Assunto: RES: pre-compile

I need to do it in maven.
But send me your solution,
if I don't be able to solve my problem with maven, I will use yours.

Thank you.



-Mensagem original-
De: Milanez, Marcus [mailto:[EMAIL PROTECTED]
Enviada em: quinta-feira, 24 de maio de 2007 15:34
Para: Tomcat Users List
Assunto: RES: pre-compile

I know how to do it using ANT. Would you like it?

-Mensagem original-
De: Rogerio Baldini das Neves [mailto:[EMAIL PROTECTED]

Enviada em: quinta-feira, 24 de maio de 2007 15:30
Para: users@tomcat.apache.org
Assunto: pre-compile

Hi Guys,



I'd like to pre-compile my jsps for Tomcat 6 using maven.



Anybody knows how it is possible ?



I've tried to compile using jspc-maven-plugin 1.4.6 and 1.4.7-SNAPSHOT.

But in both I've received the message:

org.apache.taglibs.standard.tag.rt.core.ForTokensTag.setItems(Ljava/lang
/Str
ing;)V

when accessing some pages.



Thanks,



Rogerio Baldini






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



--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.467 / Virus Database: 269.7.6/815 - Release Date: 22/5/2007
15:49



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


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




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



Re: pre-compile

2007-05-24 Thread ben short

Looks like you need the taglibs dependency. Try adding these to your pom.

   dependency
   groupIdtaglibs/groupId
   artifactIdstandard/artifactId
   version1.1.2/version
   scopecompile/scope
   /dependency

   dependency
   groupIdjavax.servlet/groupId
   artifactIdjstl/artifactId
   version1.1.2/version
   scopecompile/scope
   /dependency


On 5/24/07, Rogerio Baldini das Neves [EMAIL PROTECTED] wrote:

I am using this plugin like in tutorial.
But it's happing some strange with item:
org.apache.taglibs.standard.tag.rt.core.ForTokensTag.setItems(Ljava/lang/Str
ing;)V




-Mensagem original-
De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Em nome de ben
short
Enviada em: quinta-feira, 24 de maio de 2007 17:06
Para: Tomcat Users List
Assunto: Re: pre-compile

Have a look at this maven 2 plugin

http://mojo.codehaus.org/jspc-maven-plugin/usage.html

Ben

On 5/24/07, Rogerio Baldini das Neves [EMAIL PROTECTED]
wrote:
 I need to do it in maven.
 But send me your solution,
 if I don't be able to solve my problem with maven, I will use yours.

 Thank you.



 -Mensagem original-
 De: Milanez, Marcus [mailto:[EMAIL PROTECTED]
 Enviada em: quinta-feira, 24 de maio de 2007 15:34
 Para: Tomcat Users List
 Assunto: RES: pre-compile

 I know how to do it using ANT. Would you like it?

 -Mensagem original-
 De: Rogerio Baldini das Neves [mailto:[EMAIL PROTECTED]

 Enviada em: quinta-feira, 24 de maio de 2007 15:30
 Para: users@tomcat.apache.org
 Assunto: pre-compile

 Hi Guys,



 I'd like to pre-compile my jsps for Tomcat 6 using maven.



 Anybody knows how it is possible ?



 I've tried to compile using jspc-maven-plugin 1.4.6 and 1.4.7-SNAPSHOT.

 But in both I've received the message:

 org.apache.taglibs.standard.tag.rt.core.ForTokensTag.setItems(Ljava/lang
 /Str
 ing;)V

 when accessing some pages.



 Thanks,



 Rogerio Baldini






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



 --
 No virus found in this incoming message.
 Checked by AVG Free Edition.
 Version: 7.5.467 / Virus Database: 269.7.6/815 - Release Date: 22/5/2007
 15:49



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


--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.467 / Virus Database: 269.7.6/815 - Release Date: 22/5/2007
15:49


-
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: XFire Spring Web Services

2007-05-23 Thread ben short

What makes you think it wouldnt?

On 5/23/07, Velidanda Srinivas [EMAIL PROTECTED] wrote:

Hi,

Does Tomcat 6.013 support XFire Spring Web Services?

Thanks  Regards,
Srinivas Velidanda.


This e-mail has been scanned for all viruses by MessageLabs.

Singularity operates globally through its offices in New York, London, 
Singapore, Ireland and India. Singularity Limited is incorporated in the United 
Kingdom with Registration Number NI 31519 and its Registered Office at 100 
Patrick Street, Derry, BT48 7EL, United Kingdom.



-
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: XFire Spring Web Services

2007-05-23 Thread ben short

I have used Spring's HTTP invoker with Tomcat 6 and it works fine. So
I dont see a reason why XFire shouldnt work too.

On 5/23/07, ben short [EMAIL PROTECTED] wrote:

What makes you think it wouldnt?

On 5/23/07, Velidanda Srinivas [EMAIL PROTECTED] wrote:
 Hi,

 Does Tomcat 6.013 support XFire Spring Web Services?

 Thanks  Regards,
 Srinivas Velidanda.

 
 This e-mail has been scanned for all viruses by MessageLabs.

 Singularity operates globally through its offices in New York, London, 
Singapore, Ireland and India. Singularity Limited is incorporated in the United 
Kingdom with Registration Number NI 31519 and its Registered Office at 100 Patrick 
Street, Derry, BT48 7EL, United Kingdom.
 



-
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: XFire Spring Web Services

2007-05-23 Thread ben short

The configureation is all done in your spring config files in your
webapp. All tomcat is doing is providing you with the http handling.

On 5/23/07, Velidanda Srinivas [EMAIL PROTECTED] wrote:

Are there any configuration settings to be done to enable XFire/Spring in 
Tomcat?

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of
 ben short
 Sent: 23 May 2007 16:10
 To: Tomcat Users List
 Subject: Re: XFire Spring Web Services


 I have used Spring's HTTP invoker with Tomcat 6 and it works fine. So
 I dont see a reason why XFire shouldnt work too.

 On 5/23/07, ben short [EMAIL PROTECTED] wrote:
  What makes you think it wouldnt?
 
  On 5/23/07, Velidanda Srinivas
 [EMAIL PROTECTED] wrote:
   Hi,
  
   Does Tomcat 6.013 support XFire Spring Web Services?
  
   Thanks  Regards,
   Srinivas Velidanda.
  
  
 __
 __
   This e-mail has been scanned for all viruses by MessageLabs.
  
   Singularity operates globally through its offices in New
 York, London, Singapore, Ireland and India. Singularity
 Limited is incorporated in the United Kingdom with
 Registration Number NI 31519 and its Registered Office at 100
 Patrick Street, Derry, BT48 7EL, United Kingdom.
  
 __
 __
 

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


 __
 __
 This e-mail has been scanned for all viruses by MessageLabs.
 __
 __



This e-mail has been scanned for all viruses by MessageLabs.

Singularity operates globally through its offices in New York, London, 
Singapore, Ireland and India. Singularity Limited is incorporated in the United 
Kingdom with Registration Number NI 31519 and its Registered Office at 100 
Patrick Street, Derry, BT48 7EL, United Kingdom.


-
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: XFire Spring Web Services

2007-05-23 Thread ben short

And also here...

http://xfire.codehaus.org/Spring+Remoting

On 5/23/07, ben short [EMAIL PROTECTED] wrote:

Take a look at the manual for a simple example..

http://static.springframework.org/spring/docs/2.0.x/reference/remoting.html#remoting-web-services-xfire

On 5/23/07, ben short [EMAIL PROTECTED] wrote:
 The configureation is all done in your spring config files in your
 webapp. All tomcat is doing is providing you with the http handling.

 On 5/23/07, Velidanda Srinivas [EMAIL PROTECTED] wrote:
  Are there any configuration settings to be done to enable XFire/Spring in 
Tomcat?
 
   -Original Message-
   From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of
   ben short
   Sent: 23 May 2007 16:10
   To: Tomcat Users List
   Subject: Re: XFire Spring Web Services
  
  
   I have used Spring's HTTP invoker with Tomcat 6 and it works fine. So
   I dont see a reason why XFire shouldnt work too.
  
   On 5/23/07, ben short [EMAIL PROTECTED] wrote:
What makes you think it wouldnt?
   
On 5/23/07, Velidanda Srinivas
   [EMAIL PROTECTED] wrote:
 Hi,

 Does Tomcat 6.013 support XFire Spring Web Services?

 Thanks  Regards,
 Srinivas Velidanda.


   __
   __
 This e-mail has been scanned for all viruses by MessageLabs.

 Singularity operates globally through its offices in New
   York, London, Singapore, Ireland and India. Singularity
   Limited is incorporated in the United Kingdom with
   Registration Number NI 31519 and its Registered Office at 100
   Patrick Street, Derry, BT48 7EL, United Kingdom.

   __
   __
   
  
   -
   To start a new topic, e-mail: users@tomcat.apache.org
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
   __
   __
   This e-mail has been scanned for all viruses by MessageLabs.
   __
   __
  
 
  
  This e-mail has been scanned for all viruses by MessageLabs.
 
  Singularity operates globally through its offices in New York, London, 
Singapore, Ireland and India. Singularity Limited is incorporated in the United 
Kingdom with Registration Number NI 31519 and its Registered Office at 100 Patrick 
Street, Derry, BT48 7EL, United Kingdom.
  
 
  -
  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: JDBC

2007-05-22 Thread ben short

Have a look here..

http://tomcat.apache.org/tomcat-6.0-doc/jndi-datasource-examples-howto.html

On 5/22/07, Mohammed Zabin [EMAIL PROTECTED] wrote:

Hi All

Am new on this, i want to know how to configure Database Connection Pooling
to use Oracle Database?? anyhelp will be appreciated.

Jotnarta



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



How to increase timeout while deploying war via the manager webapp

2007-05-21 Thread ben short

Hi,

I am trying to deploy a large war via the manager webapp over a slow
connection. After about 10 mins the connection times out. Is it
possible to increase this timeout period?

Regards

Ben Short

-
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: How to increase timeout while deploying war via the manager webapp

2007-05-21 Thread ben short

I myself dont have the problem as im sat about 2 feet away from the
box running the tomcat instance. The person getting the problem is
connected by a really naff lease line and was a bit fuzzy about what
is going on. I'll suggest the scp approch as they can use a client
that supports resuming. Many Thanks

On 5/21/07, Filip Hanik - Dev Lists [EMAIL PROTECTED] wrote:

there is a disableUploadTimeout flag on the Connector element,
are you sure tomcat is timing out the connection?

Filip

ben short wrote:
 Hi,

 I am trying to deploy a large war via the manager webapp over a slow
 connection. After about 10 mins the connection times out. Is it
 possible to increase this timeout period?

 Regards

 Ben Short

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





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




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



Re: Problem with jsvc

2007-05-16 Thread ben short

Hi,

What OS are you on?

On linux I do the following and it works fine for me. See the docs here [1]

   cd $CATALINA_HOME/bin
   tar xvfz jsvc.tar.gz
   cd jsvc-src
   autoconf
   ./configure --with-java=$JAVA_HOME
   make
   cp jsvc ..
   cd ..

[1] http://tomcat.apache.org/tomcat-5.5-doc/setup.html

On 5/16/07, reym [EMAIL PROTECTED] wrote:


Hi All,

I want to use Tomcat on Port 80, and in order to do this, i have many
options. One of them is to run Tomcat as a daemon via jsvc. I am having
problems with installing and configuring jsvc. everytime I run
./buildconf.sh, I get this error:

cannot find source file configure.in

and if i try to run it as follows:

./support/buildconf.sh

i get this error:

./support/buildconf.sh: line 25: autoconf: command not found
./support/buildconf.sh: cannot generate configure script


What am i doing wrong here??? Please advise.

Thanks in advance. I look forward to hearing from someone.

Kind regards,
reym
--
View this message in context: 
http://www.nabble.com/Problem-with-jsvc-tf3764767.html#a10642417
Sent from the Tomcat - User mailing list archive at Nabble.com.


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




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



Re: Further documentation on j_security_check

2007-01-24 Thread ben short

Langas,

Probably best you look at the source code then.

Ben

On 1/24/07, Langas de los Langas [EMAIL PROTECTED] wrote:

Thanks for the feedback, but I had already checked that documentation. I
want to understand j_security_check on a deeper level; I especifically want
to know how the process receives and handles the data from the form fileds;
I need to know why they must be called j_username and j_password... In a
word, I want to know its inner operation, not some arbitrary guidelines
about how to create the forms. Not 'how' to use it, but 'why' does it behave
in that way.


From: David Delbecq [EMAIL PROTECTED]
Reply-To: Tomcat Users List users@tomcat.apache.org
To: Tomcat Users List users@tomcat.apache.org
Subject: Re: Further documentation on j_security_check
Date: Wed, 24 Jan 2007 13:52:11 +0100


http://java.sun.com/j2ee/1.4/docs/tutorial/doc/Security5.html#wp182253

http://java.sun.com/j2ee/1.4/docs/tutorial/doc/Security5.html#wp498028

Also take a look at servlet 2.4 specifications, section SRV12.5.3
http://jcp.org/aboutJava/communityprocess/final/jsr154/index.html

En l'instant précis du 01/24/07 13:24, Langas de los Langas s'exprimait
en ces termes:
  I have searched for documentation on the process j_security_check
  (form-based authentication), but have been unable to find anything
  worthy, just some brief explanation and a sample of the form that must
  be used with it. Anybody knows where can I find extensive
  documentation about this process?
 
  _
  ¿Estás pensando en cambiar de coche? Todas los modelos de serie y
  extras en MSN Motor. http://motor.msn.es/researchcentre/
 
 
  -
  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]


_
Moda para esta temporada. Ponte al día de todas las tendencias.
http://www.msn.es/Mujer/moda/default.asp


-
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: Further documentation on j_security_check

2007-01-24 Thread ben short

The tomcat source code can be found here.

http://tomcat.apache.org/

You will need to select the tomcat version you want from the download
menu on the left. Then scroll down and you will see the source
downloads.

Ben

On 1/24/07, Langas de los Langas [EMAIL PROTECTED] wrote:


That's it! So, and excuse me if this sounds dumb, but where can I look up
the source code?


From: ben short [EMAIL PROTECTED]
Reply-To: Tomcat Users List users@tomcat.apache.org
To: Tomcat Users List users@tomcat.apache.org
Subject: Re: Further documentation on j_security_check
Date: Wed, 24 Jan 2007 13:38:52 +

Langas,

Probably best you look at the source code then.

Ben

On 1/24/07, Langas de los Langas [EMAIL PROTECTED] wrote:
Thanks for the feedback, but I had already checked that documentation. I
want to understand j_security_check on a deeper level; I especifically
want
to know how the process receives and handles the data from the form
fileds;
I need to know why they must be called j_username and j_password... In a
word, I want to know its inner operation, not some arbitrary guidelines
about how to create the forms. Not 'how' to use it, but 'why' does it
behave
in that way.


 From: David Delbecq [EMAIL PROTECTED]
 Reply-To: Tomcat Users List users@tomcat.apache.org
 To: Tomcat Users List users@tomcat.apache.org
 Subject: Re: Further documentation on j_security_check
 Date: Wed, 24 Jan 2007 13:52:11 +0100
 
 
 http://java.sun.com/j2ee/1.4/docs/tutorial/doc/Security5.html#wp182253
 
 http://java.sun.com/j2ee/1.4/docs/tutorial/doc/Security5.html#wp498028
 
 Also take a look at servlet 2.4 specifications, section SRV12.5.3
 http://jcp.org/aboutJava/communityprocess/final/jsr154/index.html
 
 En l'instant précis du 01/24/07 13:24, Langas de los Langas s'exprimait
 en ces termes:
   I have searched for documentation on the process j_security_check
   (form-based authentication), but have been unable to find anything
   worthy, just some brief explanation and a sample of the form that
must
   be used with it. Anybody knows where can I find extensive
   documentation about this process?
  
   _
   ¿Estás pensando en cambiar de coche? Todas los modelos de serie y
   extras en MSN Motor. http://motor.msn.es/researchcentre/
  
  
   -
   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]
 

_
Moda para esta temporada. Ponte al día de todas las tendencias.
http://www.msn.es/Mujer/moda/default.asp


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


_
Acepta el reto MSN Premium: Correos más divertidos con fotos y textos
increíbles en MSN Premium. Descárgalo y pruébalo 2 meses gratis.
http://join.msn.com?XAPID=1697DI=1055HL=Footer_mailsenviados_correosmasdivertidos


-
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: Embedded Tomcat and application communication

2007-01-23 Thread ben short

Hi,

I have done something similar, but used Jetty [1] as I couldn't figure
out how to get tomcat to do it..

My application registers a servlet and starts jetty. the servlet gets
the interface to the application via a static method. But it all works
OK. Maybe you could set the application interface into the
ServletConfig somehow and the servlet could grab it in the init
method.

I hope this is of some help.

Ben

ps: sorry to mention jetty on a tomcat list ;)

[1] http://docs.codehaus.org/display/JETTY/Embedding+Jetty



On 1/23/07, Yiannis Mavroukakis [EMAIL PROTECTED] wrote:

Oh no, I mean the exact opposite :)


-
| Application   |
|   |
|---|
|Embedded TC|
-

The application I am writing this for is a server daemon which has a cli
that enables the user to issue commands to it once it's up and running.
What I want, is to use Tomcat to serve a page that will present the user
with a friendlier way to issue these commands to the app. Since there is
no ready way for embedded Tomcat to communicate with the host
application that launched it, I assume that the best way is to do this
via localhost RMI calls from Tomcat to the host application


Y.

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 Yiannis,

 Yiannis Mavroukakis wrote:
  The scenario is a server daemon that has a cli for runtime
  configuration and status.

 Oh, so you want to be able to reconfigure Tomcat remotely. I assume that
 you are talking about more interesting things than can be done with the
 Tomcat Manager application.

  I intend to use embedded tomcat to replace/augment that cli and I
  have actually done so succesfully, using RMI but I was wondering
  whether there was some other solution that allows Tomcat to
  communicate with the application it's embedded into.

 You're reached the limit of my knowledge regarding Tomcat configuration
 capabilities. I've never embedded it or another like that.

 - -chris



Note:__
This message is for the named person's use only. It may contain
confidential, proprietary or legally privileged information. No
confidentiality or privilege is waived or lost by any mistransmission.
If you receive this message in error, please immediately delete it and
all copies of it from your system, destroy any hard copies of it and
notify the sender. You must not, directly or indirectly, use, disclose,
distribute, print, or copy any part of this message if you are not the
intended recipient. Jaguar Freight Services and any of its subsidiaries
each reserve the right to monitor all e-mail communications through its
networks.
Any views expressed in this message are those of the individual sender,
except where the message states otherwise and the sender is authorized
to state them to be the views of any such entity.

This e-mail has been scanned for all known viruses.

-
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: Embedded Tomcat and application communication

2007-01-23 Thread ben short

On further reading...

Server server = new Server(8080);
Context root = new Context(server,/,Context.SESSIONS);
root.addServlet(new ServletHolder(new HelloServlet(Ciao)), /*);
server.start();

You can pass the interface to your application into the HelloServlet's
constructor.

My app actually provides a hessian webservice to the application via
jetty, so i couldn't do exactly as the example shows.

Here is a snippet, if your interested.

mJettyServer = new Server();

 mJettyServer.addListener(mJettyIp + : + mJettyPort);

 ServletHttpContext ctx = (ServletHttpContext)
mJettyServer.getContext(/webservice);

 ServletHolder servletHolder = ctx.addServlet(
 wservice, // servlet name
 /wservice, // URI mapping pattern
 com.caucho.hessian.server.HessianServlet // class name
 );

 servletHolder.setInitParameter(api-class,
com.mycompany.myapp.IWebservice);
 servletHolder.setInitParameter(service-class,
com.mycompany.myapp.WebserviceImp);

 mJettyServer.start();

Ben



On 1/23/07, ben short [EMAIL PROTECTED] wrote:

Hi,

I have done something similar, but used Jetty [1] as I couldn't figure
out how to get tomcat to do it..

My application registers a servlet and starts jetty. the servlet gets
the interface to the application via a static method. But it all works
OK. Maybe you could set the application interface into the
ServletConfig somehow and the servlet could grab it in the init
method.

I hope this is of some help.

Ben

ps: sorry to mention jetty on a tomcat list ;)

[1] http://docs.codehaus.org/display/JETTY/Embedding+Jetty



On 1/23/07, Yiannis Mavroukakis [EMAIL PROTECTED] wrote:
 Oh no, I mean the exact opposite :)


 -
 | Application   |
 |   |
 |---|
 |Embedded TC|
 -

 The application I am writing this for is a server daemon which has a cli
 that enables the user to issue commands to it once it's up and running.
 What I want, is to use Tomcat to serve a page that will present the user
 with a friendlier way to issue these commands to the app. Since there is
 no ready way for embedded Tomcat to communicate with the host
 application that launched it, I assume that the best way is to do this
 via localhost RMI calls from Tomcat to the host application


 Y.

  -BEGIN PGP SIGNED MESSAGE-
  Hash: SHA1
 
  Yiannis,
 
  Yiannis Mavroukakis wrote:
   The scenario is a server daemon that has a cli for runtime
   configuration and status.
 
  Oh, so you want to be able to reconfigure Tomcat remotely. I assume that
  you are talking about more interesting things than can be done with the
  Tomcat Manager application.
 
   I intend to use embedded tomcat to replace/augment that cli and I
   have actually done so succesfully, using RMI but I was wondering
   whether there was some other solution that allows Tomcat to
   communicate with the application it's embedded into.
 
  You're reached the limit of my knowledge regarding Tomcat configuration
  capabilities. I've never embedded it or another like that.
 
  - -chris
 


 Note:__
 This message is for the named person's use only. It may contain
 confidential, proprietary or legally privileged information. No
 confidentiality or privilege is waived or lost by any mistransmission.
 If you receive this message in error, please immediately delete it and
 all copies of it from your system, destroy any hard copies of it and
 notify the sender. You must not, directly or indirectly, use, disclose,
 distribute, print, or copy any part of this message if you are not the
 intended recipient. Jaguar Freight Services and any of its subsidiaries
 each reserve the right to monitor all e-mail communications through its
 networks.
 Any views expressed in this message are those of the individual sender,
 except where the message states otherwise and the sender is authorized
 to state them to be the views of any such entity.
 
 This e-mail has been scanned for all known viruses.

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





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



Tomcat and JSTL 1.2

2007-01-09 Thread ben short

Hi all,

Im trying to use jstl 1.2 with tomcat 5.5.20 and java 1.5.0_05-b05.

My webapp deploys ok but when I browse to it I get the following exception.

xception

org.apache.jasper.JasperException: Unable to read TLD META-INF/c.tld
from JAR file 
file:/opt/apache-tomcat-5.5.20/webapps/basket/WEB-INF/lib/jstl-1.2.jar:
org.apache.jasper.JasperException: Failed to load or instantiate
TagLibraryValidator class: org.apache.taglibs.standard.tlv.JstlCoreTLV

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

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

root cause

org.apache.jasper.JasperException: Unable to read TLD META-INF/c.tld
from JAR file 
file:/opt/apache-tomcat-5.5.20/webapps/basket/WEB-INF/lib/jstl-1.2.jar:
org.apache.jasper.JasperException: Failed to load or instantiate
TagLibraryValidator class: org.apache.taglibs.standard.tlv.JstlCoreTLV

org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:50)

org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407)

org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:179)

org.apache.jasper.compiler.TagLibraryInfoImpl.init(TagLibraryInfoImpl.java:181)
org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:423)
org.apache.jasper.compiler.Parser.parseDirective(Parser.java:492)
org.apache.jasper.compiler.Parser.parseElements(Parser.java:1556)
org.apache.jasper.compiler.Parser.parse(Parser.java:126)

org.apache.jasper.compiler.ParserController.doParse(ParserController.java:211)

org.apache.jasper.compiler.ParserController.parse(ParserController.java:100)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:155)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:295)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:276)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:264)

org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:563)

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

Heres my simple index.jsp..

%@ taglib prefix=c uri=http://java.sun.com/jsp/jstl/core; %
c:redirect url=/show.html/

It simple redirects the incomming request to my spring stuff.

Has anyone got any ideas.

Ben

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



Re: Tomcat and JSTL 1.2

2007-01-09 Thread ben short

Derrick,

Thanks for spoting that, but thats a typo when i typed it into the email

On 1/9/07, Derrick Koes [EMAIL PROTECTED] wrote:

 %@ taglib prefix=c uri=http://java.sun.com/jsp/jstl/core; %
c:redirect url=/show.html/

Perhaps a missing quote in the url attribute?

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of
ben short
Sent: Tuesday, January 09, 2007 12:08 PM
To: Tomcat Users List
Subject: Tomcat and JSTL 1.2

Hi all,

Im trying to use jstl 1.2 with tomcat 5.5.20 and java 1.5.0_05-b05.

My webapp deploys ok but when I browse to it I get the following
exception.

xception

org.apache.jasper.JasperException: Unable to read TLD META-INF/c.tld
from JAR file
file:/opt/apache-tomcat-5.5.20/webapps/basket/WEB-INF/lib/jstl-1.2.jar
:
org.apache.jasper.JasperException: Failed to load or instantiate
TagLibraryValidator class: org.apache.taglibs.standard.tlv.JstlCoreTLV

org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServle
tWrapper.java:512)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.ja
va:377)

org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)

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

root cause

org.apache.jasper.JasperException: Unable to read TLD META-INF/c.tld
from JAR file
file:/opt/apache-tomcat-5.5.20/webapps/basket/WEB-INF/lib/jstl-1.2.jar
:
org.apache.jasper.JasperException: Failed to load or instantiate
TagLibraryValidator class: org.apache.taglibs.standard.tlv.JstlCoreTLV

org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHand
ler.java:50)

org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java
:407)

org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java
:179)

org.apache.jasper.compiler.TagLibraryInfoImpl.init(TagLibraryInfoImpl.
java:181)

org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:423)

org.apache.jasper.compiler.Parser.parseDirective(Parser.java:492)

org.apache.jasper.compiler.Parser.parseElements(Parser.java:1556)
org.apache.jasper.compiler.Parser.parse(Parser.java:126)

org.apache.jasper.compiler.ParserController.doParse(ParserController.jav
a:211)

org.apache.jasper.compiler.ParserController.parse(ParserController.java:
100)

org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:155)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:295)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:276)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:264)

org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.ja
va:563)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.ja
va:305)

org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)

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

Heres my simple index.jsp..

%@ taglib prefix=c uri=http://java.sun.com/jsp/jstl/core; %
c:redirect url=/show.html/

It simple redirects the incomming request to my spring stuff.

Has anyone got any ideas.

Ben

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



-
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 and JSTL 1.2

2007-01-09 Thread ben short

Tim,

Thats what I thought, but I check and double checked and the
jstl-1.2.jar file is in the correct location. It also has the c.tld
inside it.

On 1/9/07, Tim Funk [EMAIL PROTECTED] wrote:

Looks like you are missing the JSTL jar files whihc need to be in
WEB-INF/lib

-Tim

ben short wrote:
 Hi all,

 Im trying to use jstl 1.2 with tomcat 5.5.20 and java 1.5.0_05-b05.

 My webapp deploys ok but when I browse to it I get the following exception.

 xception

 org.apache.jasper.JasperException: Unable to read TLD META-INF/c.tld
 from JAR file
 file:/opt/apache-tomcat-5.5.20/webapps/basket/WEB-INF/lib/jstl-1.2.jar:
 org.apache.jasper.JasperException: Failed to load or instantiate
 TagLibraryValidator class: org.apache.taglibs.standard.tlv.JstlCoreTLV
 
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:512)

 
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377)

 org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)



-
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 and JSTL 1.2

2007-01-09 Thread ben short

Ok I think I know what is going on.

I use maven as my build system, and it downloaded the jstl-1.2.jar for
me. On looking inside the jar its directory structure seemed a bit
odd.

/META-INF
/classes/org/...
   /javax/...

I edited the file and moved the org and javax directories to the root
of the jar and it all sprung into life.

How odd.

Thanks for your help.

Ben

On 1/9/07, Derrick Koes [EMAIL PROTECTED] wrote:


The .tld file itself should tell you the URL you need in the directive
to access the file.  The .tld file doesn't need to be in web-inf/lib.
These can be accessed from the jar, at least that was true with JSTL
1.1.  I would check the .tld, perhaps the uri element value changed.

Example:

.tld snippet:

?xml version=1.0 encoding=UTF-8 ?

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

  descriptionJSTL 1.1 core library/description
  display-nameJSTL core/display-name
  tlib-version1.1/tlib-version
  short-namec/short-name
  urihttp://java.sun.com/jsp/jstl/core/uri

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



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of
ben short
Sent: Tuesday, January 09, 2007 12:45 PM
To: Tomcat Users List
Subject: Re: Tomcat and JSTL 1.2

Tim,

Thats what I thought, but I check and double checked and the
jstl-1.2.jar file is in the correct location. It also has the c.tld
inside it.

On 1/9/07, Tim Funk [EMAIL PROTECTED] wrote:
 Looks like you are missing the JSTL jar files whihc need to be in
 WEB-INF/lib

 -Tim

 ben short wrote:
  Hi all,
 
  Im trying to use jstl 1.2 with tomcat 5.5.20 and java 1.5.0_05-b05.
 
  My webapp deploys ok but when I browse to it I get the following
exception.
 
  xception
 
  org.apache.jasper.JasperException: Unable to read TLD
META-INF/c.tld
  from JAR file
 
file:/opt/apache-tomcat-5.5.20/webapps/basket/WEB-INF/lib/jstl-1.2.jar
:
  org.apache.jasper.JasperException: Failed to load or instantiate
  TagLibraryValidator class:
org.apache.taglibs.standard.tlv.JstlCoreTLV
 
  org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspSe
  rvletWrapper.java:512)
 
 
  org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrappe
  r.java:377)
 
 
  org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:
  314)
 


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



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



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




-
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: Small CMS

2007-01-07 Thread ben short

HI,

Maybe this will help...

http://www.java-source.net/open-source/content-managment-systems

Ben

On 1/7/07, Dima Retov [EMAIL PROTECTED] wrote:


Please, advise small CMS for tomcat.

I need smallest possible CMS with set of skins to rapidly setup
several sites.

I tried several CMS but they are too big. 30MB war file.

It would be great if they would use internal databases or just store
info in files.

Thank You!

--
Best regards,
 Dima  mailto:[EMAIL PROTECTED]



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




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



Re: Standards Complaint Browser Campaign

2007-01-06 Thread ben short

Um your joking right?

Tomcat dosent actually create any of the html, thats up to your servlets/jsp.

Unless you mean the Tomcat manager webapp. I havent had any problems
with it and have used a few different browsers to acces it.

On 1/6/07, Pierre Goupil [EMAIL PROTECTED] wrote:

Hello, folks !

Does anyone know about Tomcat's generated HTML standards compliance ? In
developpement, I'm using Firefox  Konqueror, but in production they will be
using IE, so... Can it be that I run into problems ?

I'm using Struts, Spring  JSTL (JSP, of course).

Regards,

Pierre



2007/1/6, EDMOND KEMOKAI [EMAIL PROTECTED]:

 Hi Guys

 Sorry about the off-topic posting but I thought the mailing list consist
 of
 the audience for this campaign. A campaign has been launch to try to
 encourage web developers and webmasters from using IE hacks to obscure the
 browsers shortcomings. Please read the appeal from the  address below and
 pass the message along to other mailing lists you may be a subscriber to,
 if
 you wish to help.

 http://www.nomoreiehacks.org/


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




--
Sans ami était le grand Maître des mondes,
Eprouvait manque - ce pour quoi il créa des esprits
Miroirs bienheureux de sa béatitude !
L'être suprême ne trouva au vrai aucun égal,
Du calice du royaume total des âmes
Ecume jusqu'à lui - l'Infinité.

(Schiller, poète allemand : L'amitié)



-
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: Standards Complaint Browser Campaign

2007-01-06 Thread ben short

Pierre,

jsp is compiled by tomcat into servlets. Tomcat then calls the servlet
to service an incoming requests.

The html that's embedded into the jsp pages is sent to the client as
its is shown, along with any you are generating.

Usually when people ask 'will it work in this browser' they are
referring to different browsers interpreting the html, css standards
differently. Or in the case of Microsoft just doing what they feel ;)
The root of this thread is talking about this.


I hope this makes some sense.

Ben



On 1/6/07, Pierre Goupil [EMAIL PROTECTED] wrote:

Errr... I thought that the JSP was converted into HTML by Tomcat ?

Regards,


Pierre



2007/1/6, ben short [EMAIL PROTECTED]:

 Um your joking right?

 Tomcat dosent actually create any of the html, thats up to your
 servlets/jsp.

 Unless you mean the Tomcat manager webapp. I havent had any problems
 with it and have used a few different browsers to acces it.

 On 1/6/07, Pierre Goupil [EMAIL PROTECTED] wrote:
  Hello, folks !
 
  Does anyone know about Tomcat's generated HTML standards compliance ? In
  developpement, I'm using Firefox  Konqueror, but in production they
 will be
  using IE, so... Can it be that I run into problems ?
 
  I'm using Struts, Spring  JSTL (JSP, of course).
 
  Regards,
 
  Pierre
 
 
 
  2007/1/6, EDMOND KEMOKAI [EMAIL PROTECTED]:
  
   Hi Guys
  
   Sorry about the off-topic posting but I thought the mailing list
 consist
   of
   the audience for this campaign. A campaign has been launch to try to
   encourage web developers and webmasters from using IE hacks to obscure
 the
   browsers shortcomings. Please read the appeal from the  address below
 and
   pass the message along to other mailing lists you may be a subscriber
 to,
   if
   you wish to help.
  
   http://www.nomoreiehacks.org/
  
  
   --
   talk trash and carry a small stick.
   PAUL KRUGMAN (NYT)
  
  
 
 
  --
  Sans ami était le grand Maître des mondes,
  Eprouvait manque - ce pour quoi il créa des esprits
  Miroirs bienheureux de sa béatitude !
  L'être suprême ne trouva au vrai aucun égal,
  Du calice du royaume total des âmes
  Ecume jusqu'à lui - l'Infinité.
 
  (Schiller, poète allemand : L'amitié)
 

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




--
Sans ami était le grand Maître des mondes,
Eprouvait manque - ce pour quoi il créa des esprits
Miroirs bienheureux de sa béatitude !
L'être suprême ne trouva au vrai aucun égal,
Du calice du royaume total des âmes
Ecume jusqu'à lui - l'Infinité.

(Schiller, poète allemand : L'amitié)



-
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: from https to http?

2007-01-04 Thread ben short

Hi Joe,

Have a look at the Acegi Security [1] stuff if your using spring. This
will allow you to configure what paths require https and redirect the
incomming requests if they are not https.
There is a catalina project too [2]  but im not to sure what that
does, but you never know it might be of help.

Regards

Ben

[1] http://acegisecurity.org/docbook/acegi.html#channel-security
[2] http://acegisecurity.org/multiproject/acegi-security-catalina/downloads.html



On 1/4/07, John Doe [EMAIL PROTECTED] wrote:

Chris, Chuck:

Thanks a lot by the explanation. Looks like Tomcat (or maybe the
Servlet specification?) needs a mechanism to switch from https to
http when this access is declared by a security-constrains otherwise
is forcing programmers to always use programatic security to made this
switch; anyway we get paid to do this stuff ;-)

   May be a workarround is to use the rewrite filter located at
http://tuckey.org/urlrewrite/

   Somebody is using it? is reliable?

Cheers!

- Pablo

On 1/3/07, Caldarale, Charles R [EMAIL PROTECTED] wrote:
  From: John Doe [mailto:[EMAIL PROTECTED]
  Subject: from https to http?

  _but_ when I want to go from restricted.jsp back to
  index.jsp using the anchor defined in it the URL is
  not replace by the standard http URL and then gets
  stuck with a https://localhost:8443/testSSL/index.jsp;

 To expand a bit on what Chris said:

 Look at the form of the link in restricted.jsp:
  a href=../index.jspBack to index/a

 It's a relative link, so the browser (not Tomcat) resolves it based on
 the URL of the current page.  The same happened when you went from
 index.jsp to ssl/restricted.jsp, except Tomcat recognized that ssl was
 controlled with a security-constraint, so it generated a redirect back
 to the browser with the http protocol and port replaced by https and the
 redirect port; the browser then made the actual https request.

  - Chuck


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

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



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




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



Re: Virtual Hosts

2006-12-28 Thread ben short

I have used something like the following with mod proxy.

This goes in your apache config file

VirtualHost 10.0.0.10:80
ServerName www.domainname.co.uk
ServerAlias www.domainname.com
ProxyPass / http://192.168.100.20:8080/yourwebapp/
ProxyPassReverse / http://192.168.100.20:8080/youwebapp/
ProxyRequests off
ErrorLog logs/youwebapp-error_log
TransferLog logs/youwebapp-access_log
/VirtualHost


On 12/28/06, Gormley, Josh [EMAIL PROTECTED] wrote:

Does anybody have a good tutorial on how to do this with Apache sitting in 
front of Tomcat?  I'd like to have a single server with multiple one-to-one 
domainname-to-webapp apps running in Tomcat such that I can hot deploy one 
webapp in Tomcat without affecting the other webapps.

Apache VirtualHost -- Tomcat webapp location
foo.mydomain.com   -- webapps/foo
bar.mydomain.com   -- webapps/bar
eggs.mydomain.com  -- webapps/eggs

Thanks,
JG

-Original Message-
From: Hassan Schroeder [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 27, 2006 10:33 AM
To: Tomcat Users List
Subject: Re: Virtual Hosts

On 12/27/06, Víctor Fragoso [EMAIL PROTECTED] wrote:

 ... but when I try it, just a blank page shows up

And there are no errors in the logs? Look there first.

Also, perhaps this will help:
  http://webtuitive.com/samples/virtual-hosting-howto.jsp

If not, post the relevant parts of your server.xml and Context files...

--
Hassan Schroeder  [EMAIL PROTECTED]

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




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




-
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: Notification of expiring sessions

2006-12-19 Thread ben short

Chuck,

Valid points.

I was hoping that doing it this way would also provide me with
replication of this data between several tomcat instances. Odviously I
would need to setup session replication between them. Also it would
allow for session data persistence should tomcat be restarted etc. I
could grab the requestedSessionId from the request and then use that
to look up the session data.

I know that tomcat provides some way of persisting session but the
documentation doesn't seem to be very good.

Ben


On 12/19/06, Caldarale, Charles R [EMAIL PROTECTED] wrote:

 From: ben short [mailto:[EMAIL PROTECTED]
 Subject: Notification of expiring sessions

 I want to store user session data into a database rather than in the
 session, to conserve memory.

Unless your session data is huge, you're probably consuming more memory
by accessing the data base rather than keeping it simple.  There are a
lot of objects that have to be created and maintained for every DB
connection, statement, result set, etc.  Also, your original session
data object(s) will remain in the heap until garbage collection runs, so
are you really conserving memory?

 - 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: webapp management

2006-11-26 Thread ben short

Hi,

If you are using maven you could try the tomcat plugin

http://mojo.codehaus.org/tomcat-maven-plugin/introduction.html

Or the cargo plugin.

http://cargo.codehaus.org/

Ben

On 11/26/06, Pierre Goupil [EMAIL PROTECTED] wrote:

Hi all there !

After my bad experience with Eclipse JST / WST, I'm looking for a way of
managing a Tomcat webapp. I mean, a tool which would allow me to fastly
deploy / undeploy / reload my servlet. Of course Tomcat manager does do it,
but it's so slow...

I'm using Sysdeo, but reloading Tomcat every time is the worst way around.

An idea, anyone ?

Regards,

Pierre


--
L'une des raisons pour lesquelles la vie est complexe
C'est qu'elle a une partie réelle et une partie imaginaire.



-
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: Solaris 10 Apache 2 Tomcat mod_jk

2006-11-24 Thread ben short

Chris,

Um, a good question. I thought that mod_jk was only available as
source and pkg_get -i ap2_mod_jk seemed like an easier option. Altough
it turned out to be a headache.

If i get time I might try out the binary from apache.

Ben

On 11/24/06, Christopher Schultz [EMAIL PROTECTED] wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Ben,

ben short wrote:
 Rainer,
 After looking at the package on the blastwave site i noticed  it has
 Apache 2.2 prefork MPM as a dependancy.

Why are you using a 3rd-party distribution of mod_jk instead of the
official one? I didn't even though 3rd-party mod_jk's existed!

- -chris

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

iD8DBQFFZwo89CaO5/Lv0PARAj4UAKCTTnRhWk0UTnhH9msPKqePfaikawCeIDYe
dMFJRGztO/QGU24BuIhf8wY=
=g0Ex
-END PGP SIGNATURE-

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




-
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: Solaris 10 Apache 2 Tomcat mod_jk

2006-11-24 Thread ben short

Chris,

Are these not binary releases then?

http://www.mirrorservice.org/sites/ftp.apache.org/tomcat/tomcat-connectors/jk/binaries/

On 11/24/06, Christopher Schultz [EMAIL PROTECTED] wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Ben,

ben short wrote:
 Chris,

 Um, a good question. I thought that mod_jk was only available as
 source and pkg_get -i ap2_mod_jk seemed like an easier option. Altough
 it turned out to be a headache.

 If i get time I might try out the binary from apache.

I think that's the biggest problem... there is no binary distribution of
mod_jk, and there really can't be; you need a binary that exactly
matches your apache httpd binaries. Unless you also get apache httpd
from blastwave, you are inviting compatibility problems, etc.

Installing from source is super simple. It's a pretty basic untar,
configure, make, install kinda package, and always results in the
binary that is appropriate for your setup. You just need to make sure
that you have a C compiler handy (which, as I recall, Solaris does not
always have).

- -chris

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

iD8DBQFFZxC99CaO5/Lv0PARAmrWAJ40w8zjv7wxS0Gckcvlnu+CrlouyACeLZOH
WVPX3DbcTDANZQlVe9Nj/cY=
=XjiM
-END PGP SIGNATURE-

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




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



  1   2   >