Re: avoiding multiple form submission

2006-12-20 Thread olivier nouguier
1) How do you submit your forms ... a few years ago I had a guy who show my that "issue", in fact he submitted the form "oncheck" on an input image ... 2a) There is a simple server side pattern two avoid double submit:(could not find the www reference). * jsp put a token in the session (scriplet,

Limit Num Requests

2006-12-20 Thread adamle
Hello, I'm running a j2EE with Apache front end and Tomcat at the back accessing a MySQL db. I have some heavy urls, can take around 2 seconds each call. While testing the site with JMeter if I put 25 users in a thread group and hit the above url concurrently I kill my tomcat instance. This mean

RE: Limit Num Requests

2006-12-20 Thread Peter Crowther
> From: adamle [mailto:[EMAIL PROTECTED] > While testing the site with JMeter if I put 25 users in a > thread group and > hit the above url concurrently I kill my tomcat instance. What's the error? Do you run out of memory, for example? How much memory have you allocated to the JVM? > I'm loo

RE: Limit Num Requests

2006-12-20 Thread adamle
Thanks for the reply Peter. I am caching these pages after they are processed, but because of the nature of the application, they are many different kinds of these pages. Tomcat does not even throw an exception, I have allocated 128-356 mb memory. It just dies and does not response to requests.

Re: How to Run Servlet

2006-12-20 Thread athula bogoda
Here is the out put. I run it on command prompt. D:\BOGODA\DEVELOPMENT\PRODUCTS\SERVLETS>javac HelloServlet.java HelloServlet.java:3: package javax.servlet does not exist import javax.servlet.*; ^ HelloServlet.java:5: package javax.servlet.http does not exist import javax.servlet.http.*; ^ HelloS

Re: How to Run Servlet

2006-12-20 Thread Andre Prasetya
no wonder, add the classpath to servlet, you need to ad the servlet-api.jar e.g : javac -cp d:/path/to/servlet-api.jar HelloServlet.java Athula, I suggest u startoff with an IDE, I recommend Netbeans for a beginner to servlet. download the Netbeans5.5 then new project, choose web project, choo

RE: Limit Num Requests

2006-12-20 Thread Peter Crowther
> From: adamle [mailto:[EMAIL PROTECTED] > I am looking for a solution that for a certain url pattern > only allows a > certain number of requests to be serviced at the same time. > This would > solve my problem, while not affecting servicing lighter pages. Makes sense. If you can stand for y

RE: Limit Num Requests

2006-12-20 Thread adamle
Thanks for the idea Peter. I thought of maybe putting a filter on the certain url pattern that I want, but instead of turning back the user, I could put his thread to sleep for aset amount of time and have him try again. Hopefully by then some of the earlier threads will have finished and he can

RE: Limit Num Requests

2006-12-20 Thread Peter Crowther
> From: adamle [mailto:[EMAIL PROTECTED] > I thought of maybe putting a filter on the certain url > pattern that I want, > but instead of turning back the user, I could put his thread > to sleep for > aset amount of time and have him try again. Hopefully by > then some of the > earlier threads

RE: Limit Num Requests

2006-12-20 Thread adamle
That's not a bad idea, I will look into. Thanks again for the help. Peter Crowther wrote: > >> From: adamle [mailto:[EMAIL PROTECTED] >> I thought of maybe putting a filter on the certain url >> pattern that I want, >> but instead of turning back the user, I could put his thread >> to sleep

Re: How to Run Servlet

2006-12-20 Thread athula bogoda
Thnks it works fine. But then why it not works after I set the class path for the servlet-api.jar file using "Environment Variables"... Thanks, Athula --- Andre Prasetya <[EMAIL PROTECTED]> wrote: > no wonder, add the classpath to servlet, you need to > ad the servlet-api.jar > > e.g : jav

Re: avoiding multiple form submission

2006-12-20 Thread Pierre Goupil
Hello ! 2006/12/20, olivier nouguier <[EMAIL PROTECTED]>: 1) How do you submit your forms ... a few years ago I had a guy who show my that "issue", in fact he submitted the form "oncheck" on an input image ... No, just and 2a) There is a simple server side pattern two avoid double submi

RE: How to Run Servlet

2006-12-20 Thread Nelson, Tracy
Make sure you're including the actual name of the jar file (e.g., /usr/local/apache/tomcat5.5/common/lib/servlet-api.jar) in the CLASSPATH. If you just specify the directory (/usr/local/apache/tomcat5.5/common/lib), it won't work. I remember this because it took me close to a day to figure it

Re[2]: PHP on Tomcat

2006-12-20 Thread Dima Retov
Here is faster solution. http://php-java-bridge.sourceforge.net/ It runs PHP in FastCGI mode. (much faster then CGI) Tuesday, December 19, 2006, 10:40:52 PM, you wrote: d> Ran-2 wrote: >> >> Has anyone managed to get PHP4/5 to work on Tomcat ? d> Try here .. d> http://tools.herberlin.de/

RE: Installing Tomcat and IIS

2006-12-20 Thread Simon Renshaw
Thanks again! Today I will try to install version 1.2. Maybe I'll get it to work. My other sites are OWA and a few Wikis (uses PHP). -Original Message- From: LiuYan 刘研 [mailto:[EMAIL PROTECTED] Sent: 19 décembre, 2006 21:51 To: users@tomcat.apache.org Subject: RE: Installing Tomcat and

Setting session variables

2006-12-20 Thread Andres Cubides P.
Hi: I’m having trouble setting session variables in a tomcat application. I have the same application in two different tomcat servers (5.5), using the same configuration, in one of them the sessions work perfectly, but in the other one it’s impossible to create session variables. No related e

RE: Setting session variables

2006-12-20 Thread Peter Crowther
> From: Andres Cubides P. [mailto:[EMAIL PROTECTED] > I'm having trouble setting session variables in a tomcat > application. *Exactly* which 5.5 version is it, what configuration (load-balanced?) and what errors / symptoms do you get? We don't really have a lot to go on here...

RE: Multi processor issue

2006-12-20 Thread Marziou, Gael
Some fresh news and hopefully I have narrowed the scope enough to get the root cause. First, the previous traces that I posted last week were wrong because my bug catcher was buggy: I forgot to reset the fields in recycle(). So, I fixed this and saved few other fields in org.apache.catalina.conne

RE: Several instancias of Tomcat on a same machine

2006-12-20 Thread Bachler, Elisabeth \(Elisabeth\)
Hello, I have never done that before and I am affraid of making a mistake so please help me with this. I would like to download tomcat (5 times). I need 5 instances of tomcat on the same machine (tomcat1, tomcat2, etc). What do I have to configure in order to work I seem to remember I need t

RE: Several instancias of Tomcat on a same machine

2006-12-20 Thread Peter Crowther
> From: Bachler, Elisabeth (Elisabeth) > [mailto:[EMAIL PROTECTED] > I would like to download tomcat (5 times). You'll only need to download it once. Are you wanting to run this on Windows or Linux, and do you want to start the instances as daemons/services or from the command line? > I need 5

RE: Multi processor issue

2006-12-20 Thread Marziou, Gael
> By looking at the code of ApplicationDispatcher, I would tend to think that > the answer is no because of fields like wrapRequest and requestURI (there > are other fields but they are unused) however the javadoc does not mention it. I forgot to include the question but some of you may have gues

Re: Several instancias of Tomcat on a same machine

2006-12-20 Thread David Smith
Two things to keep an eye on: 1. The shutdown port at the top of each server.xml has to be unique 2. The connector ports in each server.xml have to be unique. I'd recommend putting some thought into a methodology before starting, let's say start with 8001 for shutdown ports and increment for eac

Re: Multi processor issue

2006-12-20 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Gael, Marziou, Gael wrote: > So, we see that the problems occurs between > ProxySessionController.forwardRequest() and the first line of > PassThroughController.doHttp(). In fact we can go down to > PassThroughController.doGet() as it is just directly

RE: Setting session variables

2006-12-20 Thread Andres Cubides P.
Apache Tomcat version: 5.5.12 OS: Windows 2003 5.2 No errors appear in tomcat/stderr logs. I have a simple test servlet to show session id/variables, each time I call the servlet in the same browser session a different ID is returned: ID 9180ECEA4F3CBBECC2FA86EA592D2C4E Created: Wed Dec 20 1

RE: Several instancias of Tomcat on a same machine

2006-12-20 Thread Bachler, Elisabeth \(Elisabeth\)
Thanks for your quick answer. I want to run the 5 instances of tomcat on Solaris. Let's have a look at the server.xml and let's make sure I have understood correctly what needs to be done: . - The shutdown port (in this case ... 8004) has to be unique... ===> I

RE: Several instancias of Tomcat on a same machine

2006-12-20 Thread Peter Crowther
> From: Bachler, Elisabeth (Elisabeth) > - The shutdown port (in this case ... 8004) has to be unique... >===> I can start with 8001 - 8002 ... Till 8005 Yes. > - The http connector port (in this case 8081) has to be > unique... ==> I can start with 8080 - 8081 - ... Till 8084 Yes.

RE: Several instancias of Tomcat on a same machine

2006-12-20 Thread Bachler, Elisabeth \(Elisabeth\)
I must admit that I don't know what AJP is ... So I guess I am not using it. No need to change it right? Thank you so much! -Original Message- From: Peter Crowther [mailto:[EMAIL PROTECTED] Sent: miércoles, 20 de diciembre de 2006 18:22 To: Tomcat Users List Subject: RE: Several instan

RE: Several instancias of Tomcat on a same machine

2006-12-20 Thread Peter Crowther
> From: Peter Crowther > > - The ajp connector (in this case 8009) has to be unique .. > >==> I can start with 8009 -8010 till 8013 > > Only true if you're using AJP - i.e. front-ending with > Apache. Are you? > If so, are you using it exclusively (in which case you can > knock out

Test JSP Page

2006-12-20 Thread Grok Mogger
Hey everyone, I'm setting up Tomcat for the first time. I'm trying to use a simple test just to verify that I have everything set up properly, and I was hoping someone could confirm for me that I understand what I'm doing. I'm setting up Apache, mod_jk, and Tomcat on a (Debian) Linux serve

Re: Re[2]: PHP on Tomcat

2006-12-20 Thread Ran
Thanks Dima, I may not understand how the the php-java bridge works. It did not seem to allow a php application to run under Tomcat ? ran On 12/20/06, Dima Retov <[EMAIL PROTECTED]> wrote: Here is faster solution. http://php-java-bridge.sourceforge.net/ It runs PHP in FastCGI mode. (much fast

Re: Setting session variables

2006-12-20 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Andres, Andres Cubides P. wrote: > No errors appear in tomcat/stderr logs. I have a simple test servlet to > show session id/variables, each time I call the servlet in the same > browser session a different ID is returned: > > ID 9180ECEA4F3CBBECC2FA

Re: JSessionId and Google

2006-12-20 Thread Brian Caruso
Consider using a filter like this: package com.foo; import java.io.IOException; import javax.servlet.Filter; import javax.servlet.FilterChain; import javax.servlet.FilterConfig; import javax.servlet.ServletException; import javax.servlet.ServletRequest; import javax.servlet.ServletResponse; impo

Re[4]: PHP on Tomcat

2006-12-20 Thread Dima Retov
You can run php daemon in FastCGI mode and setup servlet in tomcat that would handle *.php requests http://php-java-bridge.sourceforge.net/pjb/faq.php R> I want to use PHP for all tomcat applications. Apache and IIS are R> not available, but performance is important. How do I install it? Wedn

RE: Several instancias of Tomcat on a same machine

2006-12-20 Thread Bachler, Elisabeth \(Elisabeth\)
Thanks! Elisabeth -Original Message- From: Peter Crowther [mailto:[EMAIL PROTECTED] Sent: miércoles, 20 de diciembre de 2006 18:26 To: Tomcat Users List Subject: RE: Several instancias of Tomcat on a same machine > From: Peter Crowther > > - The ajp connector (in this case 8009)

RE: Custom JAAS LoginModule not authorizing GenericPrincipal roles

2006-12-20 Thread Workman, Joe
Thanks Charles and John, you were both a great help!!! I got it working now. Cheers Joe -Original Message- From: John McPeek [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 19, 2006 6:50 PM To: Tomcat Users List Subject: Re: Custom JAAS LoginModule not authorizing GenericPrincipal ro

Re: Servlet with POST Request

2006-12-20 Thread Hassan Schroeder
On 12/19/06, Scott Carr <[EMAIL PROTECTED]> wrote: adduser can be an unlimited amount of times. I want to process the lines as they come into the Servlet, that way a seperate process could be doing something to complete each of the tasks, while I am in the process of working on reading the line

Re: Multi processor issue

2006-12-20 Thread Leon Rosenberg
BINGO :-) Please check the servlet spec 2.5, SRV 8.2 "To use a request dispatcher, a servlet calls either the include method or forward method of the RequestDispatcher interface. The parameters to these methods can be either the request and response arguments that were passed in via the service

Re: JSessionId and Google

2006-12-20 Thread Brian Caruso
Also, if you have been running your site with jsessionids for awhile then the spiders have your jsessionid urls on their link frontier. So the spiders will continue to crawl your site for jsession funky urls even once you've prevented your tomcat from generating them. Tomcat strips the jsession pa

RE: Need help with JK2 connector/workers2.properties

2006-12-20 Thread Simon Renshaw
I tried to get it to work with JK1.2 but I got the same page not found error. There was no workers.properties and uriworkermap.properties files in Tomcat 5.5.20 so I had to make my own. This might be the problem. I put the following in workers.preperties (from Tomcat's site): # Define 1 real

RE: Multi processor issue

2006-12-20 Thread Caldarale, Charles R
> From: Leon Rosenberg [mailto:[EMAIL PROTECTED] > Subject: Re: Multi processor issue > > "The Container Provider should ensure that the dispatch of the > request to a target servlet occurs in the same thread of the > same JVM as the original request." I'm not sure the above is really pertinen

Re: Setting session variables

2006-12-20 Thread Andres Cubides P.
Cristopher: Thanks for the Firefox/cookies hint, it was very helpful to figure out the problem. It was related with Internet Explorer. I was using IE, so I decided to try Firefox to test the cookies configuration. In Firefox the app worked perfectly. Searching again in the tomcat list archive

Re: Test JSP Page

2006-12-20 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Grok, Grok Mogger wrote: > I'm setting up Tomcat for the first time. I'm trying to use a simple > test just to verify that I have everything set up properly, and I was > hoping someone could confirm for me that I understand what I'm doing. > > I'm s

Re: Setting session variables

2006-12-20 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Andres, Andres Cubides P. wrote: > Searching again in the tomcat list archives I > found that a "patch" provided by Microsoft for IE 5.5 and 6.0 causes > cookies to be rejected from servers with non-alphanumeric characters, > such as "_". The server n

Re: Test JSP Page

2006-12-20 Thread Steve R Burrus
Just thinking back to my past limited Java education, I think/believe that there is some kind of a method associated with the Date class that will allow you to both format the date-time display properly and specify which particular time zone that you want to use. Hope that helps. Christopher S

Re: JSessionId and Google

2006-12-20 Thread Brian Caruso
Also, you should never need to let google index a page that has a sessionid. If google indexes a page of yours folks are going to come from a google search results to your page, without a session. Any page/jsp/servlet that you need a session id on should be in your robots.txt. If your page is

Re: Test JSP Page

2006-12-20 Thread David Smith
I've been using java.text.SimpleDateFormat for both parsing input and formatting output. --David Steve R Burrus wrote: > Just thinking back to my past limited Java education, I think/believe that there is some kind of a method associated with the Date class that will allow you to both format the

Re: Need help with JK2 connector/workers2.properties

2006-12-20 Thread Martin Gainty
could you display the port number specification for your default connector in $CATALINA_BASE/conf/server.xml you will see To: "Tomcat Users List" Sent: Wednesday, December 20, 2006 2:31 PM Subject: RE: Need help with JK2 connector/workers2.properties I tried to get it to work with JK1.2 but I

Re: Multi processor issue

2006-12-20 Thread Mark Thomas
Leon Rosenberg wrote: > BINGO :-) > > Please check the servlet spec 2.5, SRV 8.2 > > The Container Provider should ensure that the dispatch of the request to a > target servlet occurs in the same thread of the same JVM as the > original request." > > Please note that the last paragraph. I assume

RE: Multi processor issue

2006-12-20 Thread Caldarale, Charles R
> From: Mark Thomas [mailto:[EMAIL PROTECTED] > Subject: Re: Multi processor issue > > This requirement will be enforceable in 5.5.21 onwards. It was > implemented in response to > http://issues.apache.org/bugzilla/show_bug.cgi?id=34956 Does the change in 5.5.21 address the OP's real problem? (

[ANN] Apache Tomcat JK 1.2.20 Web Server Connector released

2006-12-20 Thread Rainer Jung
The Apache Tomcat team is pleased to announce the immediate availability of version 1.2.20 of the Apache Tomcat Connectors. It contains connectors, which allow a web server such as Apache HTTPD, Microsoft IIS and Sun Web Server to act as a front end to the Tomcat web application server. This vers

Re: Multi processor issue

2006-12-20 Thread Mark Thomas
Caldarale, Charles R wrote: >> From: Mark Thomas [mailto:[EMAIL PROTECTED] >> Subject: Re: Multi processor issue >> >> This requirement will be enforceable in 5.5.21 onwards. It was >> implemented in response to >> http://issues.apache.org/bugzilla/show_bug.cgi?id=34956 > > Does the change in 5.5

Re: Multi processor issue

2006-12-20 Thread Mark Thomas
Caldarale, Charles R wrote: >> From: Leon Rosenberg [mailto:[EMAIL PROTECTED] >> Subject: Re: Multi processor issue >> >> "The Container Provider should ensure that the dispatch of the >> request to a target servlet occurs in the same thread of the >> same JVM as the original request." > > I'm

Re: Test JSP Page

2006-12-20 Thread Grok Mogger
Christopher Schultz wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Grok, Grok Mogger wrote: I'm setting up Tomcat for the first time. I'm trying to use a simple test just to verify that I have everything set up properly, and I was hoping someone could confirm for me that I understand wh

RE: Multi processor issue

2006-12-20 Thread Caldarale, Charles R
> From: Mark Thomas [mailto:[EMAIL PROTECTED] > Subject: Re: Multi processor issue > > What about RequestDispatcher ServletContext.getNamedDispatcher(String) > > Since this method is at the Context level, any RequestDispatcher > obtained effectively has context wide scope. It is this method that

Multiple designing.

2006-12-20 Thread Wang Penghui
Hello, We are starting to design a ISP level JSP virutal hosting system which could serve JSP and Servlets. Here are some thing i decide to to: Apache 2.0.52(RHEL 4 default installation) Tomcat 5.5.20 (http://tomcat.apache.org) Tomcat connector 1.2.18(http://tomcat.apache.org) Add the follow li

How can I display servlet in browser.....

2006-12-20 Thread athula bogoda
can any one tell me how should I display servlet file(HelloWorld.java) in IE browser. I already compile the file and put both .java and .class file it to the C:\Program Files\Apache Software Foundation\Tomcat 5.0\webapps\ROOT\bo (bo is the file I put my develped files) after I browse the file us

RE: How can I display servlet in browser.....

2006-12-20 Thread Caldarale, Charles R
> From: athula bogoda [mailto:[EMAIL PROTECTED] > Subject: How can I display servlet in browser. > > I already compile the file and put both .java and > .class file it to the > C:\Program Files\Apache Software Foundation\Tomcat > 5.0\webapps\ROOT\bo > (bo is the file I put my develped files)

Re: Servlet with POST Request

2006-12-20 Thread Andre Prasetya
I see, you're thinking in Sockets Sockets are usually : 1. open connection 2. give start byte 3. keep streaming the job byte 4. give the stop byte The question is. How long is the number 3 ? how long between the 1st adduser and the 2nd adduser ? if its very short then you can use put, if not...