Re: where to store user-generated files?
Looks like roll your own then! A few thoughts on the matter - maybe someone could add to them? It should be easy to map requests for images to a servlet, which can then find the appropriate image file wherever it might be ( within or outside the server ). Like this in the web.xml file: servletName *.jpg ? But how is the image then added to the reponse? Another servlet ( behind the scenes - I am actually using the Spring framework ) is handling the request/response. Can the request/response be passed to the image-providing servlet for the images within a page to be written to the reponse in this kind of way: // This method is called by the servlet container to process a GET request. public void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException { // Get the absolute path of the image ServletContext sc = getServletContext(); String filename = sc.getRealPath("image.gif"); // Get the MIME type of the image String mimeType = sc.getMimeType(filename); if (mimeType == null) { sc.log("Could not get MIME type of "+filename); resp.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR); return; } // Set content type resp.setContentType(mimeType); // Set content size File file = new File(filename); resp.setContentLength((int)file.length()); // Open the file and output streams FileInputStream in = new FileInputStream(file); OutputStream out = resp.getOutputStream(); // Copy the contents of the file to the output stream byte[] buf = new byte[1024]; int count = 0; while ((count = in.read(buf)) >= 0) { out.write(buf, 0, count); } in.close(); out.close(); } ( from http://www.exampledepot.com/egs/javax.servlet/GetImage.html ) I'm off for a walk to mull it over - any suggestions while I am out and before I get to experimenting will be most welcome. Thanks, John - 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: [OT] Rough hint about server sizing Apache/Tomcat
Hello Sacha, http://www.sizinglounge.com http://www.sizinglounge.com is a free online sizing tool for any kind of software. It allows you to perform sizings up to 2000 concurrent users. For even higher web server sizings, please visit http://apache.sizinglounge.com http://apache.sizinglounge.com Your SizingLounge Team Sascha Wehnert wrote: > > Hi folks, > > > > guess this is a more Apache related question but perhaps someone can give > me some hints here: > > > > I am in the situation to provide a proposal for a Apache/Tomcat setup > where Apache might have to serve 4000 clients. > > I am a bit unsure about the hardware I need for this. Is a dual XEON 32bit > system with about 2GB oversized or to > > small? Is there any Documentation available that helps to create a server > sizing? > > > > Regards, > > > > Sascha > > > Sitz der Gesellschaft: Ritterhude . Amtsgericht Walsrode HRB 122181. > Ust.-Id. DE 153074644. Steuer-Nr. 36/201/00642. > Geschaeftsfuehrer: Martin Gueldenpfennig. Jeroen Boon. Nigel Horn. > Thomas Pasold. Mark Pearman. > > > -- View this message in context: http://www.nabble.com/Rough-hint-about-server-sizing-Apache-Tomcat-tf3227112.html#a9078244 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]
java.lang.OutOfMemoryError: PermGen space .
hi, I am using RHEL 4 and Tomcat. I have restarted my tomcat. After restarting my Tomcat server i am getting the following error while i try to view some jsp pages *java.lang.OutOfMemoryError: PermGen space* . Please any one help me. Thanks, M.Muruganantham. -- Regards, M.Muruganantham. CheapChess Development Team, Silicon Oyster Technologies, Chennai-84. www.sot.in
Re: [OT] RE: Found a product for running Tomcat off CDROM -have anybody tried it?
Hello, According to this page (select Tomcat in the left pane): http://stunnix.com/ws-ui-saws/ui.xpl/1/project.showprops Tomcat seems to be 5.5.20 but here they state that one can add support for any version of Tomcat to it (here: http://stunnix.com/prod/aws/tomcat-cdrom.shtml ) As for use of MySQL w/JDK - I got the impression that it can't do this. But I guess you'll have to contact them directly - probably they'll add support for it if you'll ask. -David On 2/21/07, Jason Pyeron <[EMAIL PROTECTED]> wrote: But it could be a useful spam. As I read it and said to myself, "oh, maybe we could use that here" and then discovered that it does not allow use to use MySQL w/JDK and did not mention which version of tomcat it was. Then the costs, we don't mind paying costs, but not 3/4k$ to a fly by night. Oh well, but it was good spam. -Jason -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- - - - Jason Pyeron PD Inc. http://www.pdinc.us - - Sr. Consultant10 West 24th Street #100- - +1 (443) 269-1555 x333Baltimore, Maryland 21218 - - - -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- This message is for the designated recipient only and may contain privileged, proprietary, or otherwise private information. If you have received it in error, purge the message from your system and notify the sender immediately. Any other use of the email by you is prohibited. -Original Message- From: news [mailto:[EMAIL PROTECTED] On Behalf Of Stephen Souness Sent: Tuesday, February 20, 2007 15:33 To: users@tomcat.apache.org Subject: Re: Found a product for running Tomcat off CDROM -have anybody tried it? Interesting that the Stunnix website appears to make no mention of who is actually behind it the product. Also interesting that you have posted a very similar message to a python mailing list, subject: "Found a product for running Python-based websites off CDROM -have anybody tried it?" -- Stephen David Wishnie wrote: > Hello, > > I've found a product on freshmeat.net that allows to run tomcat-based > websites off cdrom, allowing to produce > CDs that work on Windows, MacOS X and Linux at the same time (also it seems > to support perl, > python, php & mysql). Apache is used for serving static content, and it has > a nice support > for stopping everything and releasing the media. > >http://www.stunnix.com/prod/aws/overview.shtml > > Have anybody tried it? > > Seems useful.. > > Thanks for your input! > 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: Found a product for running Tomcat off CDROM -have anybody tried it?
Hello, On 2/20/07, Stephen Souness <[EMAIL PROTECTED]> wrote: Interesting that the Stunnix website appears to make no mention of who is actually behind it the product. Also interesting that you have posted a very similar message to a python mailing list, subject: "Found a product for running Python-based websites off CDROM -have anybody tried it?" I'm considering to use Python and Tomcat with this product and I'm collecting opinions on it. -David
RE: java.lang.OutOfMemoryError: PermGen space .
> From: Muruganantham [mailto:[EMAIL PROTECTED] > *java.lang.OutOfMemoryError: PermGen space* . http://tomcat.apache.org/faq/memory.html - search for "MaxPermSize". - Peter - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Specifying -Djava.library.path when tomcat is running as a service
Hi, I am running tomcat 4.1.34 as a Windows Service by using service.bat My application uses JNI and the required libraries exist in 3 folders: C:\f1,C:\f2,C:\f3 When I add the these folders in -Djava.library.path: "%EXECUTABLE%" //US//%SERVICE_NAME% ++JvmOptions "-Djava.library.path=C:\f1" "%EXECUTABLE%" //US//%SERVICE_NAME% ++JvmOptions "-Djava.library.path=C:\f2" "%EXECUTABLE%" //US//%SERVICE_NAME% ++JvmOptions "-Djava.library.path=C:\f3" Only the last line seems to be effective. (Meaning f1,f2 are NOT in java.library.path). Also I cannot seem to specify : "%EXECUTABLE%" //US//%SERVICE_NAME% ++JvmOptions "-Djava.library.path=C:\f1;C:\f2;C:\f3" since tomcat fails to start. I guess this is because ; is a separator for the -D/-X options. Other than merging the 3 folders, is it possible to specify multiple directories as a part of -Djava.library.path ? Regards, Sriram
Re: overlapped parameters between sessions
Caldarale, Charles R wrote: From: WILLIAM PARRA [mailto:[EMAIL PROTECTED] Subject: overlapped parameters between sessions When passing parameters with get metod, with many users (about 200); some parameters, are overlapped between sessions. If you're speaking of parameters taken from a URL, they are relative to a Request, not a Session. There can be many Requests associated with a single Session being processed concurrently. If you app is storing Request-specific information in a Session object, your app is in error. If you don't *need* to process per-session requests concurrently, you may find it easier and safer overall to synchronise access to each session and continue to code your sessions without worrying about concurrent requests. Your users will never notice. Just don't serialise *all* requests :-) But this may not be what William is on about... Paul Singleton - 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: overlapped parameters between sessions
Hi I understood that the sessions were of each user. isn't it? I understood that One session to one Navegator to one user. isn't it? I don't understand because the parameter can be overwritten by the value from another request. The object request is not part of the session? Greetings and thanks for its patience. William Enrique Parra Alba Ingeniero De Sistemas Universidad Pedagógica y Tecnológica de Colombia /\ /\ / //\\ \ \ \\// / / / \ \ \/\/ - Mensaje original De: "Caldarale, Charles R" <[EMAIL PROTECTED]> Para: Tomcat Users List Enviado: martes, 20 de febrero, 2007 18:13:32 Asunto: RE: overlapped parameters between sessions > From: WILLIAM PARRA [mailto:[EMAIL PROTECTED] > Subject: Re: overlapped parameters between sessions > > I pass an parameter to identify the type user. With this > parameter, i define if show one page.. or other. Some times > the parameter requested, was changed. Do you ever store the parameter in some place that's not specific to the particular Request object currently being processsed? For example, if you store the parameter in the Session or in some static variable, it can be overwritten by the value from another 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] __ Correo Yahoo! Espacio para todos tus mensajes, antivirus y antispam ¡gratis! Regístrate ya - http://correo.espanol.yahoo.com/
Re: overlapped parameters between sessions
My aplication is a system of inscription for aspirings to the university. Therefore, it has concurrent connections. that I do? William Enrique Parra Alba Ingeniero De Sistemas Universidad Pedagógica y Tecnológica de Colombia /\ /\ / //\\ \ \ \\// / / / \ \ \/\/ - Mensaje original De: Paul Singleton <[EMAIL PROTECTED]> Para: Tomcat Users List Enviado: miércoles, 21 de febrero, 2007 7:02:48 Asunto: Re: overlapped parameters between sessions Caldarale, Charles R wrote: >> From: WILLIAM PARRA [mailto:[EMAIL PROTECTED] >> Subject: overlapped parameters between sessions >> >> When passing parameters with get metod, with many >> users (about 200); some parameters, are overlapped >> between sessions. > > If you're speaking of parameters taken from a URL, they are relative to > a Request, not a Session. There can be many Requests associated with a > single Session being processed concurrently. If you app is storing > Request-specific information in a Session object, your app is in error. If you don't *need* to process per-session requests concurrently, you may find it easier and safer overall to synchronise access to each session and continue to code your sessions without worrying about concurrent requests. Your users will never notice. Just don't serialise *all* requests :-) But this may not be what William is on about... Paul Singleton - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Correo Yahoo! Espacio para todos tus mensajes, antivirus y antispam ¡gratis! Regístrate ya - http://correo.espanol.yahoo.com/
http://tomcat.apache.org/faq/misc.html#externalJndi
http://tomcat.apache.org/faq/misc.html#externalJndi I noticed from the above link that you cannot access Tomcat's JNDI provider outside of Tomcat "at this time". Is there plans to include it with Tomcat 6? -- Marc Farrow
Re: [OT] mod_jk configuration for production
I've read the documentation and my question is : - socket_timeout = 2s but reply_timeout is 0 meaning that the webserver is waiting forever. Which of them is used for timeout ajp connection? nuka wrote: > > Hello, > > I am facing to a problem concerning apache-tomcat configuration via mod_jk > for our production environment. We are using Apache: 2.0.55, Tomcat 5.0, > mod_jk 1.2.15. > > Our first problem has been raised some weeks ago when the clients received > http 404 errors. > > mod_jk logs have shown errors such as: > > [Tue Feb 13 08:36:03 2007][info] ajp_send_request::jk_ajp_common.c > (1178): Socket 14 is not connected any more (errno=-1) > [Tue Feb 13 08:36:03 2007][info] ajp_send_request::jk_ajp_common.c > (1202): Error sending request. Will try another pooled connection > [Tue Feb 13 08:36:03 2007][info] ajp_send_request::jk_ajp_common.c > (1225): All endpoints are disconnected or dead > [Tue Feb 13 08:36:03 2007][info] ajp_service::jk_ajp_common.c (1749): > Sending request to tomcat failed, recoverable operation attempt=1 > > After that, we changed the timeout for tomcat ajp connector (initially = > 1) to 6ms. > > Now we get other errors: > > - a lot of "Error decoding request" in the JBoss logs at the same times > where mod_jk is showing > > [Mon Feb 19 13:25:50 2007][info] > ajp_connection_tcp_get_message::jk_ajp_common.c (955): Tomcat has forced a > connection close for socket 14 > [Mon Feb 19 13:25:50 2007][error] ajp_get_reply::jk_ajp_common.c (1503): > Tomcat is down or refused connection. No response has been sent to the > client (yet) > [Mon Feb 19 13:25:50 2007][info] ajp_service::jk_ajp_common.c (1721): > Receiving from tomcat failed, recoverable operation attempt=0 > > Bellow is our configuration: > > > enableLookups="false" redirectPort="8443" debug="0" > protocol="AJP/1.3" connectionTimeout="6"/> > > workers.properties: > > # Define list of workers that will be used > # for mapping requests > worker.list=loadbalancer, loadbalancer2, status > > > worker.xxxNode1.port=8109 > worker.xxxNode1.host= > worker.xxxNode1.type=ajp13 > worker.xxxNode1.socket_keepalive=True > worker.xxxNode1.socket_timeout=2 > worker.xxxNode1.recycle_timeout=300 > worker.xxxNode1.recovery_options=0 > > worker.xxxNode2.port=8209 > worker.xxxNode2.host=xxx.xx.xx.xx > worker.xxxNode2.type=ajp13 > worker.xxxNode2.socket_keepalive=True > worker.xxxNode2.socket_timeout=2 > worker.xxxNode2.recycle_timeout=300 > worker.xxx2.recovery_options=0 > > Do you have any idea which parameters do we need to change in this > configuration? > > thanks > > rgds > > Nuka > > -- View this message in context: http://www.nabble.com/mod_jk-configuration-for-production-tf3260752.html#a9080605 Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] mod_jk configuration for production
I've read the documentation and my question is : - socket_timeout = 2s but reply_timeout is 0 meaning that the webserver is waiting forever. Which of them is used for timeout ajp connection? Rainer Jung-3 wrote: > > Then start reading on > > http://tomcat.apache.org/connectors-doc/reference/workers.html > > what your configuration means. You will notice, that a value of 2 for > the socket_timeout does not really make any sense. > > Regards, > > Rainer > > nuka schrieb: >> This configuration was done some time ago by someone else. I don't >> believe >> there is a specific reason for this parameter configuration. >> I believe that this should be a default dev configuration. >> >> >> >> Rainer Jung-3 wrote: >>> What's your idea why you configured a socket timeout of 2? >>> >>> nuka schrieb: Hello, I am facing to a problem concerning apache-tomcat configuration via mod_jk for our production environment. We are using Apache: 2.0.55, Tomcat 5.0, mod_jk 1.2.15. Our first problem has been raised some weeks ago when the clients received http 404 errors. mod_jk logs have shown errors such as: [Tue Feb 13 08:36:03 2007][info] ajp_send_request::jk_ajp_common.c (1178): Socket 14 is not connected any more (errno=-1) [Tue Feb 13 08:36:03 2007][info] ajp_send_request::jk_ajp_common.c (1202): Error sending request. Will try another pooled connection [Tue Feb 13 08:36:03 2007][info] ajp_send_request::jk_ajp_common.c (1225): All endpoints are disconnected or dead [Tue Feb 13 08:36:03 2007][info] ajp_service::jk_ajp_common.c (1749): Sending request to tomcat failed, recoverable operation attempt=1 After that, we changed the timeout for tomcat ajp connector (initially = 1) to 6ms. Now we get other errors: - a lot of "Error decoding request" in the JBoss logs at the same times where mod_jk is showing [Mon Feb 19 13:25:50 2007][info] ajp_connection_tcp_get_message::jk_ajp_common.c (955): Tomcat has forced a connection close for socket 14 [Mon Feb 19 13:25:50 2007][error] ajp_get_reply::jk_ajp_common.c (1503): Tomcat is down or refused connection. No response has been sent to the client (yet) [Mon Feb 19 13:25:50 2007][info] ajp_service::jk_ajp_common.c (1721): Receiving from tomcat failed, recoverable operation attempt=0 Bellow is our configuration: >>> enableLookups="false" redirectPort="8443" debug="0" protocol="AJP/1.3" connectionTimeout="6"/> workers.properties: # Define list of workers that will be used # for mapping requests worker.list=loadbalancer, loadbalancer2, status worker.xxxNode1.port=8109 worker.xxxNode1.host= worker.xxxNode1.type=ajp13 worker.xxxNode1.socket_keepalive=True worker.xxxNode1.socket_timeout=2 worker.xxxNode1.recycle_timeout=300 worker.xxxNode1.recovery_options=0 worker.xxxNode2.port=8209 worker.xxxNode2.host=xxx.xx.xx.xx worker.xxxNode2.type=ajp13 worker.xxxNode2.socket_keepalive=True worker.xxxNode2.socket_timeout=2 worker.xxxNode2.recycle_timeout=300 worker.xxx2.recovery_options=0 Do you have any idea which parameters do we need to change in this configuration? thanks rgds Nuka >>> - >>> To start a new topic, e-mail: users@tomcat.apache.org >>> To unsubscribe, e-mail: [EMAIL PROTECTED] >>> For additional commands, e-mail: [EMAIL PROTECTED] >>> >>> >>> >> > > - > To start a new topic, e-mail: users@tomcat.apache.org > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/mod_jk-configuration-for-production-tf3260752.html#a9080778 Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: java.lang.OutOfMemoryError: PermGen space .
try setting in JVM paramerter MaxPermSize=256m (if using linux) > hi, > > I am using RHEL 4 and Tomcat. I have restarted my tomcat. > > After restarting my Tomcat server i am getting the following error while i > try to view some jsp pages > > > *java.lang.OutOfMemoryError: PermGen space* . > > > Please any one help me. > > > Thanks, > > M.Muruganantham. > > > -- > Regards, > > M.Muruganantham. > CheapChess Development Team, > Silicon Oyster Technologies, > Chennai-84. > www.sot.in > Regards Mohan Wickramasinghe - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
XML parser issue while defining a Realm
Hello My environment : Windows 2003 server Tomcat 5.5.12 What i tried : userSearch="(&(uid={0})(|(dncomp=ou=Oneorgunit)(dencomp=ou=AnOtherOU)))" while defining a Realm using an LDAP directory I gave a xml parser error when i started the Tomcat Instance : org.xml.sax.SAXParseException: The entity name must immediately follow the '&' in the entity reference. When i use this filter through an LDAP browser (replacing {0} with a valid uid) that works well Thanks Jean-Claude
RE: overlapped parameters between sessions
> From: WILLIAM PARRA [mailto:[EMAIL PROTECTED] > Subject: Re: overlapped parameters between sessions > > I understood that the sessions were of each user. isn't it? There may be multiple sessions per "user", depending on the browser, number of windows open, etc. > I understood that One session to one Navegator to one user. isn't it? Not necessarily; there may be more than one session. A session will not be shared by multiple clients, but it can be shared by multiple tabs or browser windows opened by a single client. > I don't understand because the parameter can be overwritten > by the value from another request. The object request is not > part of the session? No, it is not part of the session. A browser often submits multiple requests simultaneously, resulting in multiple threads within Tomcat utilizing the same Session object at the same time. Any synchronization of access to the Session object is the responsibility of the app. The same is true for any fields of your servlet objects. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: where to store user-generated files?
I'm new at this, so bear with me here for a moment... The servlet mapping seems to me to tell tomcat "anytime you have a request for a URI with .jpg extension, deliver the request to this servlet", but that doesn't give any information about where in the "real" file system said jpeg is stored, does it? So, when you call sc.getRealPath(), how does the servlet context know where to go? Doesn't there have to be a mapping or alias somewhere (server.xml, web.xml,...?) that resolves, or translates "ThisTypeofFileName.ext" into "/real/path/in/OS/ThatTypeOfFileName.oxt"? -Original Message- From: John Pedersen [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 21, 2007 4:37 AM To: Tomcat Users List Subject: Re: where to store user-generated files? Looks like roll your own then! A few thoughts on the matter - maybe someone could add to them? It should be easy to map requests for images to a servlet, which can then find the appropriate image file wherever it might be ( within or outside the server ). Like this in the web.xml file: servletName *.jpg ? But how is the image then added to the reponse? Another servlet ( behind the scenes - I am actually using the Spring framework ) is handling the request/response. Can the request/response be passed to the image-providing servlet for the images within a page to be written to the reponse in this kind of way: // This method is called by the servlet container to process a GET request. public void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException { // Get the absolute path of the image ServletContext sc = getServletContext(); String filename = sc.getRealPath("image.gif"); // Get the MIME type of the image String mimeType = sc.getMimeType(filename); if (mimeType == null) { sc.log("Could not get MIME type of "+filename); resp.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR); return; } // Set content type resp.setContentType(mimeType); // Set content size File file = new File(filename); resp.setContentLength((int)file.length()); // Open the file and output streams FileInputStream in = new FileInputStream(file); OutputStream out = resp.getOutputStream(); // Copy the contents of the file to the output stream byte[] buf = new byte[1024]; int count = 0; while ((count = in.read(buf)) >= 0) { out.write(buf, 0, count); } in.close(); out.close(); } ( from http://www.exampledepot.com/egs/javax.servlet/GetImage.html ) I'm off for a walk to mull it over - any suggestions while I am out and before I get to experimenting will be most welcome. Thanks, John - 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: where to store user-generated files?
> From: Williams, Allen [mailto:[EMAIL PROTECTED] > Subject: RE: where to store user-generated files? > > Doesn't there have to be a mapping or alias somewhere (server.xml, > web.xml,...?) that resolves, or translates > "ThisTypeofFileName.ext" into > "/real/path/in/OS/ThatTypeOfFileName.oxt"? Yes. Normally, such static content is handled by Tomcat's DefaultServlet, and the file system mapping must correspond to the URI path. In this case, a servlet of your app will be handling the request, and it's up to your app to implement whatever mapping you desire. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Expression Language in JSP and JasperException
Hi David, Ok forgive me now, but this is getting confusing. Where does result come into this picture? Were you expecting actionBean to be an instance of a different class? You aren't offering a lot to go on here. Sorry for mixup. I've just thought that it is just about some option in Tomcat configuration or something, and I haven't knew it. Like I see... It may be not. :( Here goes more background. login.jsp (handled by LoginActionBean class) redirects after submission login form to calculator.jsp. After submition form from calculator.jsp (what is handled by CalculatorActionBean class) it returns to calculator.jsp and shows the result of mathematical equation. Sources of calculator.jsp and it's class are placed below. Problem shows when I'm submiting from LoginActionVean to calculator.jsp. Like I wrote before, LoginActionBean doesn't have result field because it doesn't need it. But JSP (in this case used by two classes) expects result in: 46: 47:Result: ${actionBean.result} line. Here actionBean could be an instance of different class. Sorry for so much source in thread, here it goes: # package com.some.packages.action; import net.sourceforge.stripes.action.ActionBean; import net.sourceforge.stripes.action.ActionBeanContext; import net.sourceforge.stripes.action.DefaultHandler; import net.sourceforge.stripes.action.DontValidate; import net.sourceforge.stripes.action.ForwardResolution; import net.sourceforge.stripes.action.Resolution; import net.sourceforge.stripes.validation.LocalizableError; import net.sourceforge.stripes.validation.Validate; import net.sourceforge.stripes.validation.ValidationErrors; import net.sourceforge.stripes.validation.ValidationMethod; /** * A very simple calculator action. * @author Tim Fennell */ public class CalculatorActionBean implements ActionBean { private ActionBeanContext context; private String forwardSuccess = "/calculator.jsp"; private String forwardFail = "/index.jsp"; private Double result; @Validate(required=true, mask="^\\d*$") private double numberOne; @Validate(required=true, mask="^\\d*$") private double numberTwo; public CalculatorActionBean() { } /* execution */ /* * Handler method. * Handles addition functionality of web application form. */ @DefaultHandler @DontValidate public Resolution init() { return new ForwardResolution(forwardSuccess); } /* * Handler method. * Handles addition functionality of web application form. */ public Resolution addition() { result = getNumberOne() + getNumberTwo(); return new ForwardResolution(forwardSuccess); } /* getters and setters */ public ActionBeanContext getContext() { return context; } public void setContext(ActionBeanContext context) { this.context = context; } public double getNumberOne() { return numberOne; } public void setNumberOne(double numberOne) { this.numberOne = numberOne; } public double getNumberTwo() { return numberTwo; } public void setNumberTwo(double numberTwo) { this.numberTwo = numberTwo; } public Double getResult() { return result; } public void setResult(Double result) { this.result = result; } } # # <%@ page contentType="text/html;charset=UTF-8" language="java" %> <%@ taglib prefix="stripes" uri="http://stripes.sourceforge.net/stripes.tld"%> <%@ taglib prefix="display" uri="http://displaytag.sf.net"%> <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"; %> <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"; %> - Result: ${actionBean.result} Logged in as: ${sessionScope.user.firstName} ${sessionScope.user.lastName} (${sessionScope.user.userName}) # -- Piotr Kiraga K i r a g a d e s i g n +48 693 104 834 http://www.kiragadesign.pl/ -
Re: XML parser issue while defining a Realm
Hi 1) This is not an ldap or filter error, this is an xml wellformness error. That mean tomcat can not parse your xml file 2) You say you can cut and paste it inside and ldap browser and it work? Are you sure it is "&" that is inside your search rule? I mean your ldap browser most probably do not parse xml entities, and as such, you must probably feed it with '&' instead of '&' So check you have correctly, in your xml, all '&' replaces by '&' 3) Send us you xml file as attachement if it still does not work :) En l'instant précis du 02/21/07 14:43, Serlet Jean-Claude s'exprimait en ces termes: > Hello > > My environment : > Windows 2003 server > Tomcat 5.5.12 > > What i tried : > userSearch="(&(uid={0})(|(dncomp=ou=Oneorgunit)(dencomp=ou=AnOtherOU)))" > while defining a Realm using an LDAP directory > I gave a xml parser error when i started the Tomcat Instance : > org.xml.sax.SAXParseException: The entity name must immediately follow the > '&' in the entity reference. > When i use this filter through an LDAP browser (replacing {0} with a valid > uid) that works well > Thanks > > Jean-Claude > > > - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Posting Xml
Hello, Is that good idea to POST XML data to Tomcat? I wish to make HTTP request to servlet in Tomcat. Method POST Content Type: text/xml Content would be non encoded XML file. Is it good idea in general. My tomcat handles such requests now. Is it expected that it will work in future? Is there any limitations? e.g. request.getParameter() - should parse GET parameters only. -- 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]
RE: where to store user-generated files?
Gotcha. So, servlets can access the file system just like any other java or C++ program? I was thinking they were restricted, but now that I'm thinking about it I think I was confusing that with applets. If tomcat is running as user tomcat55, do the servlets run as the same user, so you can set file permissions up with something like rwx-- (700) if you make the directory owned by tomcat55? Thanks, and Regards, Allen Williams [EMAIL PROTECTED] Office: (321)309-7931 Mobile: (321)258-1272 FAX: (321)727-9607 -Original Message- From: Caldarale, Charles R [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 21, 2007 9:50 AM To: Tomcat Users List; [EMAIL PROTECTED] Subject: RE: where to store user-generated files? > From: Williams, Allen [mailto:[EMAIL PROTECTED] > Subject: RE: where to store user-generated files? > > Doesn't there have to be a mapping or alias somewhere (server.xml, > web.xml,...?) that resolves, or translates > "ThisTypeofFileName.ext" into > "/real/path/in/OS/ThatTypeOfFileName.oxt"? Yes. Normally, such static content is handled by Tomcat's DefaultServlet, and the file system mapping must correspond to the URI path. In this case, a servlet of your app will be handling the request, and it's up to your app to implement whatever mapping you desire. - 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: where to store user-generated files?
I'm sure this is horribly insufficient, so I would recommend reading the servlet spec. It's not all that bad a read as far as specifications go and you can learn a lot about how tomcat operates. If you have a servlet mapping all *.jpg to some servlet "myServlet" in web.xml, web.xml also has another section where the servlets are individually declared. In there you'll find the class that backs the servlet named "myServlet". All that means is the request for the resource goes to that specific servlet class to be handled. What the servlet does with it is open-ended. In the case of the default servlet, it basically calls sc.getResourceAsStream( request.getServletPath() + request.getPathInfo() ) and returns the contents of the file to the client. That's over simplified -- the real default servlet does some security checks to be sure it's not returning something it shouldn't and set's the mime type in the response, but you get the idea. sc.getResourceAsStream is aware of the webapp's location in the filesystem and takes care of finding the resource in the webapp's folder. sc.getRealPath will only return a full path to a file if the webapp is NOT compressed in a web archive file (.war). From within a .war file, it always returns null and isn't recommended except in rare cases where you might want to write access. This is all in the spec. Servlet 2.4 spec is available at http://jcp.org/aboutJava/communityprocess/final/jsr154/index.html --David Williams, Allen wrote: >I'm new at this, so bear with me here for a moment... > >The servlet mapping seems to me to tell tomcat "anytime you have a >request for a URI with .jpg extension, deliver the request to this >servlet", but that doesn't give any information about where in the >"real" file system said jpeg is stored, does it? So, when you call >sc.getRealPath(), how does the servlet context know where to go? >Doesn't there have to be a mapping or alias somewhere (server.xml, >web.xml,...?) that resolves, or translates "ThisTypeofFileName.ext" into >"/real/path/in/OS/ThatTypeOfFileName.oxt"? > > >-Original Message- >From: John Pedersen [mailto:[EMAIL PROTECTED] >Sent: Wednesday, February 21, 2007 4:37 AM >To: Tomcat Users List >Subject: Re: where to store user-generated files? > >Looks like roll your own then! > >A few thoughts on the matter - maybe someone could add to them? > >It should be easy to map requests for images to a servlet, which can >then find the appropriate image file wherever it might be ( within or >outside the server ). Like this in the web.xml file: > > > servletName > *.jpg > > >? > >But how is the image then added to the reponse? Another servlet ( >behind the scenes - I am actually using the Spring framework ) is >handling the request/response. Can the request/response be passed to >the image-providing servlet for the images within a page to be written >to the reponse in this kind of way: > > // This method is called by the servlet container to process a GET >request. >public void doGet(HttpServletRequest req, HttpServletResponse >resp) throws IOException { >// Get the absolute path of the image >ServletContext sc = getServletContext(); >String filename = sc.getRealPath("image.gif"); > >// Get the MIME type of the image >String mimeType = sc.getMimeType(filename); >if (mimeType == null) { >sc.log("Could not get MIME type of "+filename); > >resp.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR); >return; >} > >// Set content type >resp.setContentType(mimeType); > >// Set content size >File file = new File(filename); >resp.setContentLength((int)file.length()); > >// Open the file and output streams >FileInputStream in = new FileInputStream(file); >OutputStream out = resp.getOutputStream(); > >// Copy the contents of the file to the output stream >byte[] buf = new byte[1024]; >int count = 0; >while ((count = in.read(buf)) >= 0) { >out.write(buf, 0, count); >} >in.close(); >out.close(); >} > >( from http://www.exampledepot.com/egs/javax.servlet/GetImage.html ) > >I'm off for a walk to mull it over - any suggestions while I am out >and before I get to experimenting will be most welcome. > >Thanks, > >John > >- >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
Tomcat/mod_jk/Apache - up to date - matching versions?
We are configuring a new server for use in a production environment, we would like to maintain a similar setup to our other servers (apache + mod_jk + tomcat) but would like to upgrade to the latest appropriate versions. We are running on Red Hat Linux (kernel 2.6.9-5) with the 1.5.0_11 JVM - looking around, I believe that the latest stable versions are: apache: 2.2.4 mod_jk: 1.2.20 tomcat: 5.5.20 My understanding is that within reason the versions of tomcat/mod_jk/apache don't need to "match", but I wonder if there are any version combinations that would best be avoided? Or conversely, a combination that is particularly useful? Anyone care to convince me that the above aren't the versions I ought to be using? Thank you in advance for any input, Sharon French Xtensible Technology Inc 195 McGregor St. Suite 322 Manchester, NH 03102 603.641.8141 x202 - 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: XML parser issue while defining a Realm
Sorry I made a mistake The .war with an erronous context.xml stays under the webbapps directory while i tried to modify the context.xml under the application directory Now it works fine Jean-Claude -Message d'origine- De : Serlet Jean-Claude Envoyé : mercredi 21 février 2007 14:44 À : TomcatUsers Objet : XML parser issue while defining a Realm Hello My environment : Windows 2003 server Tomcat 5.5.12 What i tried : userSearch="(&(uid={0})(|(dncomp=ou=Oneorgunit)(dencomp=ou=AnOtherOU)))" while defining a Realm using an LDAP directory I gave a xml parser error when i started the Tomcat Instance : org.xml.sax.SAXParseException: The entity name must immediately follow the '&' in the entity reference. When i use this filter through an LDAP browser (replacing {0} with a valid uid) that works well Thanks Jean-Claude - 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: where to store user-generated files?
> From: Williams, Allen [mailto:[EMAIL PROTECTED] > Subject: RE: where to store user-generated files? > > So, servlets can access the file system just like any other > java or C++ program? Yes - they're just part of the Tomcat process. > If tomcat is running as user tomcat55, do the servlets run > as the same user, so you can set file permissions up with > something like rwx-- (700) if you make the directory > owned by tomcat55? Correct. David S's concerns about the use of getRealPath() apply to servlets attempting to access resources within the deployed app, not to file system references outside of the app's deployment location. As Dave suggests, familiarity with the servlet spec is strongly recommended. - 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]
Get rid of 8080 port in Tomcat 3.3
Hi, We’re still running 3.3.1 – We’d like to get rid of specifying the port 8080 in the http request like HYPERLINK "http://www.something.com:8080/"http://www.something.com:8080 and have it default to 80 (HYPERLINK "http://www.somehting.com/"http://www.somehting.com only) but could not find any way. I tried to define port=80 in server.xml but tomcat threw exceptions. If you know a way, could you help ? Thanks in advance, Frank Nguyen -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.441 / Virus Database: 268.18.1/691 - Release Date: 2/17/2007 5:06 PM -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.441 / Virus Database: 268.18.1/691 - Release Date: 2/17/2007 5:06 PM
Re: Get rid of 8080 port in Tomcat 3.3
80 is a privileged port on *nix systems, you'll need to run tomcat as root (generally not recommended). May I ask why you're still running tomcat circa version 3? On 2/21/07, Frank Nguyen <[EMAIL PROTECTED]> wrote: Hi, We're still running 3.3.1 – We'd like to get rid of specifying the port 8080 in the http request like HYPERLINK "http://www.something.com:8080/"http://www.something.com:8080 and have it default to 80 (HYPERLINK "http://www.somehting.com/"; http://www.somehting.com only) but could not find any way. I tried to define port=80 in server.xml but tomcat threw exceptions. If you know a way, could you help ? Thanks in advance, Frank Nguyen -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.441 / Virus Database: 268.18.1/691 - Release Date: 2/17/2007 5:06 PM -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.441 / Virus Database: 268.18.1/691 - Release Date: 2/17/2007 5:06 PM -- "talk trash and carry a small stick." PAUL KRUGMAN (NYT)
RE: where to store user-generated files?
Got it. I'll also get the spec. Thanks to you and Dave! -Original Message- From: Caldarale, Charles R [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 21, 2007 10:51 AM To: Tomcat Users List Subject: RE: where to store user-generated files? > From: Williams, Allen [mailto:[EMAIL PROTECTED] > Subject: RE: where to store user-generated files? > > So, servlets can access the file system just like any other > java or C++ program? Yes - they're just part of the Tomcat process. > If tomcat is running as user tomcat55, do the servlets run > as the same user, so you can set file permissions up with > something like rwx-- (700) if you make the directory > owned by tomcat55? Correct. David S's concerns about the use of getRealPath() apply to servlets attempting to access resources within the deployed app, not to file system references outside of the app's deployment location. As Dave suggests, familiarity with the servlet spec is strongly recommended. - 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: Connection pool problem DBCP - 4.1.3
I wonder...would I get mixed results trying to implement JNDI maing in my server.xml file, but only trying to (on a page by page basis, with an existing servlet and/or JSP) utilize the naming context method? In other words, I test out DBCP with one dedicated servlet or JSP, and perhaps it works fine, but somehow that adversely affects another servlet or JSP where I've not really implemented the Naming Context portion, but since I've altered the server.xml file, that's affected it? Please let me know if you have any insight into this. Thanks! -Original Message- From: Mike Quilleash [mailto:[EMAIL PROTECTED] Sent: Monday, February 19, 2007 1:08 PM To: Tomcat Users List Subject: RE: Connection pool problem DBCP - 4.1.3 Need a bit more info. DB type and version, JDBC driver version, ResultSet loop/access code. Generally the pseudo code should be... Open Connection try { Prepare Statement try { Execute Query try { while ( resultSet.next() ) { // process row here } } finally { Close ResultSet } } finally { Close PreparedStatement } } finally { Close Connection } All of the closing should be done in finally blocks so they happen even if you get an exception. -Original Message- From: Propes, Barry L [GCG-NAOT] [mailto:[EMAIL PROTECTED] Sent: 19 February 2007 18:22 To: Tomcat Users List Subject: Connection pool problem DBCP - 4.1.3 This is driving me crazy. I'm finally close, I think, on getting this solved. Problem is I seem to either get Connection is closed or Exhausted resultset, depending where I put my close statement. I've got the following up at the top, which replaces my driver reference that was previously there. Context initCtx = new InitialContext(); Context envCtx = (Context) initCtx.lookup("java:comp/env"); // Look up our data source DataSource ds = (DataSource) envCtx.lookup("jdbc/myoracle"); // Allocate and use a connection from the pool Connection connection = ds.getConnection(); Statement selstmt = connection.createStatement(); String prepSQL = "SELECT AID, ACTIVE, REQUESTOR_NAME...," + "PHONE_NUM,DATE_REQ,... " + "" + "FROM table a INNER JOIN table b " + "ON a.CTRL_ID = b.CTRL_ID " + "WHERE AID = ?"; PreparedStatement prepstmt = connection.prepareStatement(prepSQL); prepstmt.setString(1, aidstrd); ResultSet admsql = prepstmt.executeQuery(); admsql.next(); (etc., etc.) admsql.close(); selstmt.close(); connection.close(); If I move up connection.close, I get the Connection is closed statement, otherwise I get exhausted result set. Any idea what gives? - 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 is bound by the terms and conditions described at http://www.subexazure.com/mail-disclaimer.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] - 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: Expression Language in JSP and JasperException
Ok. I'm not overly familiar with Stripes, so you'll have to bear with me a little. I can think of a few ways to handle this. First, look at what makes a request from calculator.jsp unique. You could use the referrer header, the value of a submit button, or the presence of the equation request parameter. Below is an example using the submit button: The answer is ${actionBean.result} A better solution would be to name the actionBean that's a result of CalculatorActionBean something more descript than just 'actionBean' like 'calcBean'. The main advantage here is it's simple and you could use your original expression language test -- just change the name of the object being tested: ... display the result A more complicated solution if you can't change the name of 'actionBean' might be to test the type of actionBean like... (request.getAttribute("actionBean") != null) && (request.getAttribute("actionBean") instanceOf com.some.packages.action.CalculatorActionBean ) The answer is ${actionBean.result} Sorry, I couldn't understand your equation. Please rephrase it... The essential point of this is testing for a property to be null is not the same as testing for it's presence. You'll have to know if it has a property before you can test the property for null. --David Piotr Kiraga wrote: > Hi David, > >> Ok forgive me now, but this is getting confusing. Where does >> result come into this picture? Were you expecting actionBean to be an >> instance of a different class? You aren't offering a lot to go on here. > > > Sorry for mixup. I've just thought that it is just about some option > in Tomcat configuration or something, and I haven't knew it. Like I > see... It may be not. :( > > Here goes more background. > > login.jsp (handled by LoginActionBean class) redirects after > submission login form to calculator.jsp. After submition form from > calculator.jsp (what is handled by CalculatorActionBean class) it > returns to calculator.jsp and shows the result of mathematical > equation. Sources of calculator.jsp and it's class are placed below. > > Problem shows when I'm submiting from LoginActionVean to > calculator.jsp. Like I wrote before, LoginActionBean doesn't have > result field because it doesn't need it. But JSP (in this case used by > two classes) expects result in: > 46: > 47:Result: ${actionBean.result} > line. > > Here actionBean could be an instance of different class. > > Sorry for so much source in thread, here it goes: > > > > > # > package com.some.packages.action; > > import net.sourceforge.stripes.action.ActionBean; > import net.sourceforge.stripes.action.ActionBeanContext; > import net.sourceforge.stripes.action.DefaultHandler; > import net.sourceforge.stripes.action.DontValidate; > import net.sourceforge.stripes.action.ForwardResolution; > import net.sourceforge.stripes.action.Resolution; > import net.sourceforge.stripes.validation.LocalizableError; > import net.sourceforge.stripes.validation.Validate; > import net.sourceforge.stripes.validation.ValidationErrors; > import net.sourceforge.stripes.validation.ValidationMethod; > > /** > * A very simple calculator action. > * @author Tim Fennell > */ > > public class CalculatorActionBean implements ActionBean { > > private ActionBeanContext context; > private String forwardSuccess = "/calculator.jsp"; > private String forwardFail = "/index.jsp"; > > private Double result; > @Validate(required=true, mask="^\\d*$") private double numberOne; > @Validate(required=true, mask="^\\d*$") private double numberTwo; > > public CalculatorActionBean() { > } > > /* execution */ > > /* > * Handler method. > * Handles addition functionality of web application form. > */ > @DefaultHandler > @DontValidate > public Resolution init() { > return new ForwardResolution(forwardSuccess); > } > > /* > * Handler method. > * Handles addition functionality of web application form. > */ > public Resolution addition() { > result = getNumberOne() + getNumberTwo(); > return new ForwardResolution(forwardSuccess); > } > > /* getters and setters */ > > public ActionBeanContext getContext() { > return context; > } > > public void setContext(ActionBeanContext context) { > this.context = context; > } > > public double getNumberOne() { > return numberOne; > } > > public void setNumberOne(double numberOne) { > this.numberOne = numberOne; > } > > public double getNumberTwo() { > return numberTwo; > } > > public void setNumberTwo(double numberTwo) { > this.numberTwo = numberTwo; > } > > public Double getResult() { > return result; > } > > public void setResult(Double result) { > this.result = result; > } > >
Re: Tomcat/mod_jk/Apache - up to date - matching versions?
All of those would fit together. Neither of those (except maybe 2.2.4) is to young, so a lot of people already tried them and bugs concerning their mainstream usage will be in the bug database very likely. Concerning Tomcat, version 5.5.22 is in release preparation. There have been serveral fixes between 5.5.20 and 5.5.22, which means you can get a couple of intersting fixes with 5.5.22, but you also get a little risk, because you would need to hop onto it directly after release. The same holds true for mod_jk 1.2.21. There have been no version compatibility issues between httpd, mod_jk, Tomcat and the JVM for a long time. (I'm no talking about Java 6 or TC 6, which are both a little to young to judge). The version do not need to match, their development cycle is independant of each other. Beware, that for Tomcat 5.5.20 there was a packaging issue, so the mail factory was missing and has to be copied in from an older version. This issue is documented e.g. in issues.apache.org. Regards, Rainer Sharon French wrote: We are configuring a new server for use in a production environment, we would like to maintain a similar setup to our other servers (apache + mod_jk + tomcat) but would like to upgrade to the latest appropriate versions. We are running on Red Hat Linux (kernel 2.6.9-5) with the 1.5.0_11 JVM - looking around, I believe that the latest stable versions are: apache: 2.2.4 mod_jk: 1.2.20 tomcat: 5.5.20 My understanding is that within reason the versions of tomcat/mod_jk/apache don't need to "match", but I wonder if there are any version combinations that would best be avoided? Or conversely, a combination that is particularly useful? Anyone care to convince me that the above aren't the versions I ought to be using? Thank you in advance for any input, Sharon French Xtensible Technology Inc 195 McGregor St. Suite 322 Manchester, NH 03102 603.641.8141 x202 - 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: Get rid of 8080 port in Tomcat 3.3
I haven't tried it on such an old version of tomcat, but I would think jsvc from the commons-daemon project would work here. http://jakarta.apache.org/commons/daemon It essentially allows you to start tomcat as a privileged user long enough to grab the port and then drop back to a low privilege user for general running. --David EDMOND KEMOKAI wrote: > 80 is a privileged port on *nix systems, you'll need to run tomcat as > root > (generally not recommended). May I ask why you're still running tomcat > circa > version 3? > > On 2/21/07, Frank Nguyen <[EMAIL PROTECTED]> wrote: > >> >> Hi, >> >> >> >> We're still running 3.3.1 – We'd like to get rid of specifying the port >> 8080 >> in the http request like HYPERLINK >> "http://www.something.com:8080/"http://www.something.com:8080 and >> have it >> default to 80 (HYPERLINK "http://www.somehting.com/"; >> http://www.somehting.com >> only) but could not find any way. I tried to define port=80 in >> server.xml >> but tomcat threw exceptions. If you know a way, could you help ? >> >> >> >> Thanks in advance, >> >> >> >> >> >> Frank Nguyen >> >> >> -- >> No virus found in this outgoing message. >> Checked by AVG Free Edition. >> Version: 7.5.441 / Virus Database: 268.18.1/691 - Release Date: >> 2/17/2007 >> 5:06 PM >> >> >> >> -- >> No virus found in this outgoing message. >> Checked by AVG Free Edition. >> Version: 7.5.441 / Virus Database: 268.18.1/691 - Release Date: >> 2/17/2007 >> 5:06 PM >> >> > - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Posting Xml
Hi, tomcat does not care what is in the body of request, it just look at url to map it to a servlet and headers to create context and request objects. The rest is entierly up to servlet to manager. For your information, slide is a webdav servlet working under any J2EE compliant webapp container that handles xml request from clients, and there are also lots of webservices servlets around that take requests in xml form En l'instant précis du 02/21/07 16:17, Dima Retov s'exprimait en ces termes: > Hello, > > Is that good idea to POST XML data to Tomcat? > > I wish to make HTTP request to servlet in Tomcat. > > Method POST > Content Type: text/xml > > Content would be non encoded XML file. > > Is it good idea in general. My tomcat handles such requests now. > Is it expected that it will work in future? > > Is there any limitations? e.g. request.getParameter() - should > parse GET parameters only. > > - 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: where to store user-generated files?
I have something that works: in web.xml: imageServlet ImageServlet 2 imageServlet /users/image/* Links to user images are like this: ( I am using Velocity ) and this is the servlet: public class ImageServlet extends HttpServlet { public void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException { String path = PhotoHandler.getUserImageDirectory(); String pathInfo = req.getPathInfo(); String fileName = path + pathInfo; // Set content type resp.setContentType("jpg"); // Set content size File file = new File(fileName); resp.setContentLength((int) file.length()); resp.setContentType("image/jpeg"); // Open the file and output streams FileInputStream in = new FileInputStream(file); OutputStream out = resp.getOutputStream(); // Copy the contents of the file to the output stream FileCopyUtils.copy(in, out); } } Image directory path is held in a properties file, which is held in memory by a class called PhotoHandler - that is just the way I have it - of course the path to the image folder could be an init parameter of the servlet. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Help with tomcat installation
Note: forwarded message attached. Speed is good only when wisdom leads the way. -James Poe - Don't be flakey. Get Yahoo! Mail for Mobile and always stay connected to friends.--- Begin Message --- Hi, I am a new user of tomcat. I have successfully downloaded tomcat 4.1.34 and installed it. Now when I try to startup the server using startup.bat, I see that a window flashes on my screen and the server doesnot startup. I tried starting the server from my command prompt as follows: C:\Tomcat\bin>startup C:\Tomcat\bin\catalina.bat ECHO is off. Using CATALINA_BASE: C:\Tomcat Using CATALINA_HOME: C:\Tomcat Using CATALINA_TMPDIR: C:\Tomcat\temp Using JAVA_HOME: C:\j2sdk1.4.2_10 C:\Tomcat\bin> but still I see that a second window flashes with the above execution in my command prompt window and the server doesnot startup. Please help Thanks Speed is good only when wisdom leads the way. -James Poe - Bored stiff? Loosen up... Download and play hundreds of games for free on Yahoo! Games.--- End Message --- - 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: Get rid of 8080 port in Tomcat 3.3
Frank Nguyen schrieb: Hi, We’re still running 3.3.1 – We’d like to get rid of specifying the port 8080 in the http request like HYPERLINK "http://www.something.com:8080/"http://www.something.com:8080 and have it default to 80 (HYPERLINK "http://www.somehting.com/"http://www.somehting.com only) but could not find any way. I tried to define port=80 in server.xml but tomcat threw exceptions. If you know a way, could you help ? Thanks in advance, Frank Nguyen -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.441 / Virus Database: 268.18.1/691 - Release Date: 2/17/2007 5:06 PM That's the way You should go: http://www.linux.org.mt/article/tomcat-ports We run several tomcat servers standalone with the combination of rinetd and iptables. Good luck Stefan -- Stefan Riegel TELIG GmbH - 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: Connection Pooling Question
> -Original Message- > From: Marc Farrow [mailto:[EMAIL PROTECTED] > Sent: Monday, February 19, 2007 3:56 PM > To: tomcat-users > Subject: Connection Pooling Question > > Slightly off topic, but the core of what I want is being done in the > source > code of Tomcat. I am trying to use the Apache Commons DBCP classes to > create > my own connection pooling factory that I can use within my servlet > container > (Tomcat) and also in stand alone programs. I see how the Datasource that > Tomcat creates when you use its connection pooling is put into a JNDI > context, but I have scoured over the Tomcat source code and I have not > been > able to find the code that is actually doing the context bindings and > where > the information is being held. Can someone point me in the right I have done something similar, which may be helpful or of interest to you. For our unit tests, I have used the standard JNDI jars from Tomcat (naming-factory, naming-factory-dbcp, naming-resources) and in the BaseTestCase (extends junit.framework.TestCase) I create and load the JNDI context from a property file. This allows the rest of the classes-under-test to function as if they were running under the Tomcat container and allows for the regular and complete JNDI lookup of all our DataSources. I used to use the JavaRanch jndi helper but it only supports a single DataSource. I would be happy to share the code with anyone who may want it. It's 200+ lines of code, and I wouldn't post the whole thing to the list, so send me e-mail off-list if you want a copy. > direction > of the source code to review and also any "advanced" JNDI tutorials that > teach you how to bind to a context that can be reused by external > resources > (meaning another JVM). For one JVM to see or provide JNDI lookups for another would require a network/port aware JNDI scheme. I'm not aware of one, but wouldn't be surprised if one exists either. > > Also, has anyone seen or done this type of solution before? > > Thank you, > > -- > Marc Farrow Tim - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Compiling mod-jk plugin for SunOne on Solaris
There was a thread from February 1st on this same issue. I am having the same problem that person did, but I tried everything in the thread and still no luck. After I get mod_jk compiled I get this on server startup: failure: CORE3170: Configuration initialization failed: Error running init function load-modules: dlopen of /wamu/hr/sunone/plugins/mod_jk/nsapi_redirector.so failed (ld.so.1: webservd: fatal: relocation error: file /wamu/hr/sunone/plugins/mod_jk/nsapi_redirector.so: symbol __lshrdi3: referenced symbol not found) The one thing that I think is making a difference as compared to the person in the earlier thread is that gcc is not installed on the server I am trying to deploy on and I am not allowed to have it on there. it is not an option, don't ask. I tried static linking, but I have a feeling I am doing it wrong. So, my question is, what exactly do I need to do to compile the mod_jk plugin for SunOne on Solaris where it is to be deployed on a server that does not have gcc installed at all? Thanks, Kirk
authentication security constraint error
Hi, I've been using versions 4.0 and 4.1.3 with a security constraint with no problems. However, when I added info in my server.xml file to try and attempt DBCP, I get a warning in my logs about something being defined in in an auth-constraint without being in a security role. Maybe not too big a deal. However, ever since I added the Resource Name and Params for the DBCP, I don't get challenged on the form to enter the "password protected" area, which in turn causes some other errors. Does anyone know why adding that bit of configuration to the server.xml file would render the security constraint inoperable? I'm open to feedback, let me know if more info's needed. Thanks! I've actually got the security constraint configured properly, as it's worked before with no issues.: -- Change Control Protected Area /chngctrl/admin/* /chngctrl/change_ctrl_admin4.jsp /chngctrl/chg_ctrl_adm_vote.jsp GET POST service admin comply ops legal risk Here's the log info: 2007-02-21 16:28:02 HostConfig[localhost]: Deploying web application directory murach 2007-02-21 16:28:02 StandardHost[localhost]: Installing web application at context path /murach from URL file:C:\jakarta-tomcat-4.1.31\webapps\murach 2007-02-21 16:28:02 WebappLoader[/murach]: Deploying class repositories to work directory C:\jakarta-tomcat-4.1.31\work\Standalone\localhost\murach 2007-02-21 16:28:02 WebappLoader[/murach]: Deploy class files /WEB-INF/classes to C:\jakarta-tomcat-4.1.31\webapps\murach\WEB-INF\classes 2007-02-21 16:28:02 WebappLoader[/murach]: Deploy JAR /WEB-INF/lib/mm.mysql-2.0.8-bin.jar to C:\jakarta-tomcat-4.1.31\webapps\murach\WEB-INF\lib\mm.mysql-2.0.8-bin.jar 2007-02-21 16:28:02 ContextConfig[/murach]: WARNING: Security role name service used in an without being defined in a 2007-02-21 16:28:02 ContextConfig[/murach]: WARNING: Security role name admin used in an without being defined in a 2007-02-21 16:28:02 ContextConfig[/murach]: WARNING: Security role name comply used in an without being defined in a 2007-02-21 16:28:02 ContextConfig[/murach]: WARNING: Security role name ops used in an without being defined in a 2007-02-21 16:28:02 ContextConfig[/murach]: WARNING: Security role name legal used in an without being defined in a 2007-02-21 16:28:02 ContextConfig[/murach]: WARNING: Security role name risk used in an without being defined in a 2007-02-21 16:28:02 ContextConfig[/murach]: Configured an authenticator for method FORM 2007-02-21 16:28:02 StandardManager[/murach]: Seeding random number generator class java.security.SecureRandom 2007-02-21 16:28:02 StandardManager[/murach]: Seeding of random number generator has been completed 2007-02-21 16:28:02 StandardWrapper[/murach:default]: Loading container servlet default 2007-02-21 16:28:02 default: init 2007-02-21 16:28:02 StandardWrapper[/murach:invoker]: Loading container servlet invoker 2007-02-21 16:28:02 invoker: init 2007-02-21 16:28:02 jsp: init 2007-02-21 16:28:02 HostConfig[localhost]: Deploying web application directory ROOT -
RE: authentication security constraint error
> From: Propes, Barry L [GCG-NAOT] > [mailto:[EMAIL PROTECTED] > Subject: authentication security constraint error > > However, when I added info in my server.xml file to try and > attempt DBCP, I get a warning in my logs about something > being defined in in an auth-constraint without being in a > security role. Maybe not too big a deal. Read the servlet spec. A list of elements is required in the app's web.xml for an to be effective. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: authentication security constraint error
ok, thanks, Chuck. -Original Message- From: Caldarale, Charles R [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 21, 2007 5:02 PM To: Tomcat Users List Subject: RE: authentication security constraint error > From: Propes, Barry L [GCG-NAOT] > [mailto:[EMAIL PROTECTED] > Subject: authentication security constraint error > > However, when I added info in my server.xml file to try and > attempt DBCP, I get a warning in my logs about something > being defined in in an auth-constraint without being in a > security role. Maybe not too big a deal. Read the servlet spec. A list of elements is required in the app's web.xml for an to be effective. - 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: authentication security constraint error
Yeah, I had them in there. -Original Message- From: Caldarale, Charles R [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 21, 2007 5:02 PM To: Tomcat Users List Subject: RE: authentication security constraint error > From: Propes, Barry L [GCG-NAOT] > [mailto:[EMAIL PROTECTED] > Subject: authentication security constraint error > > However, when I added info in my server.xml file to try and > attempt DBCP, I get a warning in my logs about something > being defined in in an auth-constraint without being in a > security role. Maybe not too big a deal. Read the servlet spec. A list of elements is required in the app's web.xml for an to be effective. - 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: Compiling mod-jk plugin for SunOne on Solaris
Option 1) (Quick and dirty): Deploy libgcc_s.so. It's *not* the compiler. The lib contains some machine specific runtime routines, for which appropriate machine statements are not available. Option 2): Compiling statically. If you've got good control over the compilation process you can add "-static-libgcc" to gcc as flags. If you don't want to find out, where all the gcc compile flags are coming from (configure, environment variables etc.) you can decide to make all compiles using static libgcc by hacking a specs file. a) dump a specs file by calling "gcc -dumpspecs". b) Edit the results and throw everything away except the block beginneing with "*libgcc". The exact structure depends on the gcc version. Here is an example: *libgcc: %{static|static-libgcc:-lgcc -lgcc_eh}%{!static:%{!static-libgcc:%{!shared:%{!shared-libgcc:-lgcc -lgcc_eh}%{shared-libgcc:-lgcc_s -lgcc}}%{shared:-lgcc_s}}} Caution: this is only two lines, the second one is pretty long. Now edit to make gcc link against libgcc (this is the static version) instead of libgcc_s (the shared one) even if it has been called to produce a shared object. In our example the result would be: %{static|static-libgcc:-lgcc -lgcc_eh}%{!static:%{!static-libgcc:%{!shared:%{!shared-libgcc:-lgcc -lgcc_eh}%{shared-libgcc:-lgcc -lgcc_eh}}%{shared:-lgcc -lgcc_eh}}} Save this file, e.g. as /my/gcc.specs. Then set the environment variable CC to "gcc -specs=/my/gcc.specs" and start building. You can check the library dependencies of the resulting "*.so" file by using "ldd". Good luck. Regards, Rainer Kirk schrieb: > There was a thread from February 1st on this same issue. I am having the > same problem that person did, but I tried everything in the thread and > still > no luck. > > After I get mod_jk compiled I get this on server startup: > > failure: CORE3170: Configuration initialization failed: Error running > init function load-modules: > dlopen of /wamu/hr/sunone/plugins/mod_jk/nsapi_redirector.so failed > (ld.so.1: webservd: fatal: > relocation error: file > /wamu/hr/sunone/plugins/mod_jk/nsapi_redirector.so: symbol __lshrdi3: > referenced symbol not found) > > > The one thing that I think is making a difference as compared to the person > in the earlier thread is that gcc is not installed on the server I am > trying > to deploy on and I am not allowed to have it on there. it is not an > option, > don't ask. I tried static linking, but I have a feeling I am doing it > wrong. > > So, my question is, what exactly do I need to do to compile the mod_jk > plugin for SunOne on Solaris where it is to be deployed on a server that > does not have gcc installed at all? > > Thanks, > Kirk > - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
JVM per web App in Tomcat 5 possiable
Hi guys a noob question, my application uses a thrid-party native lib which will bring down tomcat if the internet connectivity is lost after a couple of attempts. Is there a way to start another JVM for that web app alone ? or does anyone have any suggestion for my situation ? Thanks -- View this message in context: http://www.nabble.com/JVM-per-web-App-in-Tomcat-5-possiable-tf3269997.html#a9091456 Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Get rid of 8080 port in Tomcat 3.3
Hi > That's the way You should go: > http://www.linux.org.mt/article/tomcat-ports I totally disagree. First, it would surely be best to update to 6.0 and run it using jsvc However, let's look at the solution in the link above. 1. "The Apache solution". (Which should be called the "httpd" solution.) This will work, and might be okay, if you are already running apache on that system. BUT tomcat itself can be faster (at least newer ones, I don't know about 3.x) without httpd. 2. The IP tables solution You webapplication will not know about the different port and encode urls incorrecly. Bad Idea and impossible if SSL is required. 3. The rinetd solution Good for development and tests. Adds a little overhead AND destroy a lot of logging and security, as tomcat will always see ONE client ip. 4. IPchains alternative see 2. UPGRADE. Otherwise get jsvc to work for you. Regards, Steffen smime.p7s Description: S/MIME cryptographic signature
RE: authentication security constraint error
> From: Propes, Barry L [GCG-NAOT] > [mailto:[EMAIL PROTECTED] > Subject: RE: authentication security constraint error > > Yeah, I had them in there. Are they in the right order relative to the other elements? The schema is rather picky about how things are arranged. The web.xml files for Tomcat's manager and admin apps server as good examples. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: authentication security constraint error
now I'll double check that part. That could be an issue. -Original Message- From: Caldarale, Charles R [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 21, 2007 5:35 PM To: Tomcat Users List Subject: RE: authentication security constraint error > From: Propes, Barry L [GCG-NAOT] > [mailto:[EMAIL PROTECTED] > Subject: RE: authentication security constraint error > > Yeah, I had them in there. Are they in the right order relative to the other elements? The schema is rather picky about how things are arranged. The web.xml files for Tomcat's manager and admin apps server as good examples. - 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: JVM per web App in Tomcat 5 possiable
> From: jerrythenoob [mailto:[EMAIL PROTECTED] > Subject: JVM per web App in Tomcat 5 possiable > > my application uses a thrid-party native lib which will > bring down tomcat if the internet connectivity is lost > after a couple of attempts. Hope you didn't pay money for that. > Is there a way to start another JVM for that web app alone ? You can run multiple Tomcat instances on the same box, but each will require its own unique IP-address/port combination. See the Advanced Configuration section of RUNNING.txt in your Tomcat home directory for details. If you need to run multiple instances all with the same IP address and port, you'll need something in front of them to dispatch requests to the proper instance. Apache httpd can do this, for example. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: JVM per web App in Tomcat 5 possiable
I had a similar problem (native exceptions propagating out and killing the JVM and thereby Tomcat). My quick and dirty solution was to wrap the calls with a main() and run them as a separate java app in its own JVM. Any problems therefore killed the subordinate JVM not the one running Tomcat. I'm sure there are better ways but I haven't had the luxury of time to re-address this yet. Michael Rutherfurd -Original Message- From: jerrythenoob [mailto:[EMAIL PROTECTED] Sent: Thursday, 22 February 2007 10:26 AM To: users@tomcat.apache.org Subject: JVM per web App in Tomcat 5 possiable Hi guys a noob question, my application uses a thrid-party native lib which will bring down tomcat if the internet connectivity is lost after a couple of attempts. Is there a way to start another JVM for that web app alone ? or does anyone have any suggestion for my situation ? Thanks -- View this message in context: http://www.nabble.com/JVM-per-web-App-in-Tomcat-5-possiable-tf3269997.ht ml#a9091456 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] ** IMPORTANT MESSAGE * This e-mail message is intended only for the addressee(s) and contains information which may be confidential. If you are not the intended recipient please advise the sender by return email, do not use or disclose the contents, and delete the message and any attachments from your system. Unless specifically indicated, this email does not constitute formal advice or commitment by the sender or the Commonwealth Bank of Australia (ABN 48 123 123 124) or its subsidiaries. We can be contacted through our web site: commbank.com.au. If you no longer wish to receive commercial electronic messages from us, please reply to this e-mail by typing Unsubscribe in the subject line. ** - 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: Get rid of 8080 port in Tomcat 3.3
Great article! Yes, this is the way to do it! Many thanks. Frank Nguyen -Original Message- From: Stefan [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 21, 2007 10:43 AM To: Tomcat Users List Subject: Re: Get rid of 8080 port in Tomcat 3.3 Frank Nguyen schrieb: > Hi, > > > > We’re still running 3.3.1 – We’d like to get rid of specifying the port 8080 > in the http request like HYPERLINK > "http://www.something.com:8080/"http://www.something.com:8080 and have it > default to 80 (HYPERLINK "http://www.somehting.com/"http://www.somehting.com > only) but could not find any way. I tried to define port=80 in server.xml > but tomcat threw exceptions. If you know a way, could you help ? > > > > Thanks in advance, > > > > > > Frank Nguyen > > > -- > No virus found in this outgoing message. > Checked by AVG Free Edition. > Version: 7.5.441 / Virus Database: 268.18.1/691 - Release Date: 2/17/2007 > 5:06 PM > > > > That's the way You should go: http://www.linux.org.mt/article/tomcat-ports We run several tomcat servers standalone with the combination of rinetd and iptables. Good luck Stefan -- Stefan Riegel TELIG GmbH - 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.441 / Virus Database: 268.18.1/691 - Release Date: 2/17/2007 5:06 PM -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.441 / Virus Database: 268.18.1/691 - Release Date: 2/17/2007 5:06 PM - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: JVM per web App in Tomcat 5 possiable
Thanks for the help : ) I'll try that Caldarale, Charles R wrote: > >> From: jerrythenoob [mailto:[EMAIL PROTECTED] >> Subject: JVM per web App in Tomcat 5 possiable >> >> my application uses a thrid-party native lib which will >> bring down tomcat if the internet connectivity is lost >> after a couple of attempts. > > Hope you didn't pay money for that. > >> Is there a way to start another JVM for that web app alone ? > > You can run multiple Tomcat instances on the same box, but each will > require its own unique IP-address/port combination. See the Advanced > Configuration section of RUNNING.txt in your Tomcat home directory for > details. > > If you need to run multiple instances all with the same IP address and > port, you'll need something in front of them to dispatch requests to the > proper instance. Apache httpd can do this, for example. > > - 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] > > > -- View this message in context: http://www.nabble.com/JVM-per-web-App-in-Tomcat-5-possiable-tf3269997.html#a9092113 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]
Maximum single threaded moldel servlets
Hi, I am trying to find out how to limit the number of Single Threaded Model servlets which get created by the StandardWrapper. I have looked at the API and there is a setMaxInstances(int) method but I cannot find anywhere in the config xml files to change it. I did find the "wrapperClass" attribute for the element which allows you to override StandardWrapper with another class which I could call the setMaxInstances from. Is there a more elegant way such as: Kind regards James McIntosh - 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: Maximum single threaded moldel servlets
> From: James McIntosh [mailto:[EMAIL PROTECTED] > Subject: Maximum single threaded moldel servlets > > I am trying to find out how to limit the number of > Single Threaded Model servlets which get created by > the StandardWrapper. I suspect there's not much interest in this aspect of the servlet environment these days, considering the following quote from section 2.2.1 of the 2.4 servlet spec: "The SingleThreadModel Interface is deprecated in this version of the specification." I don't know when it became deprecated, but it strikes me as a bit risky to base an application architecture on such a capability. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Maximum single threaded moldel servlets
On 2/22/07, James McIntosh <[EMAIL PROTECTED]> wrote: Hi, I am trying to find out how to limit the number of Single Threaded Model servlets which get created by the StandardWrapper. I have looked at the API and there is a setMaxInstances(int) method but I cannot find anywhere in the config xml files to change it. I did find the "wrapperClass" attribute for the element which allows you to override StandardWrapper with another class which I could call the setMaxInstances from. Nobody asked for configuration of this before. I don't think you need to increase it beyond the default value in the real world: 20 threads for one servlet is significant. Rémy - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
System property use in web.xml?
I've inherited a webapp which includes a system property reference (ie., "region") in its web.xml (BTW, this context-param is used to lookup a Spring context file---e.g. /WEB-INF/jmsContext-eur.xml) contextConfigLocation /WEB-INF/jmsContext-${region}.xml, When I deploy this webapp to Tomcat 5.5.12, and define a command-line system property with '-Dregion=eur' in catalina.sh, it works fine: the jmsContext-eur.xml file is found. However, when I try to deploy this webapp to Websphere 6.0.x, even after defining a custom property for 'region' in the server profile, I get a: java.io.FileNotFoundException: /WEB-INF/jmsContext-${region}.xml, when the server starts. While my immediate problem is how to deploy the webapp to Websphere, my question to this group is this: Which component is responsible for this behaviour (the parsing of the web deployment descriptor and the substitution of the system property)? Is it expected J2EE 1.4 behaviour---ie., something I can complain to IBM about? Thanks, Martin National Australia Bank Ltd - ABN 12 004 044 937 This email may contain confidential information. If you are not the intended recipient, please immediately notify us at [EMAIL PROTECTED] or by replying to the sender, and then destroy all copies of this email. Except where this email indicates otherwise, views expressed in this email are those of the sender and not of National Australia Bank Ltd. Advice in this email does not take account of your objectives, financial situation, or needs. It is important for you to consider these matters and, if the e-mail refers to a product(s), you should read the relevant Product Disclosure Statement(s)/other disclosure document(s) before making any decisions. If you do not want email marketing from us in future, forward this email with "unsubscribe" in the subject line to [EMAIL PROTECTED] in order to stop marketing emails from this sender. National Australia Bank Ltd does not represent that this email is free of errors, viruses or interference.
How can I set tomcat 5.5 NOT Case Sensitive
Hello, Sir i have a problem . Actually i am using tomcat 5.5, and i want that when i run jsp file on the server it will be case insensitive. means case sensitive free. as when I write in browser's 'http://localhost/test.html' equals to 'http://localhost/TEST.htm'. Can I do it ? Sir, i search this on the web like "google" But they all said that to use I have use this also, but i dont get any sollution Sir please giv me whole information about above topic in detail. Thanks !! -- View this message in context: http://www.nabble.com/How-can-I-set-tomcat-5.5-NOT-Case-Sensitive-tf3270850.html#a9094007 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]
Mysql timouts...
I am having the seemingly common "Broken pipe" to mysql problem with tomcat. All i could find was some info about a "maxideltime" setting and "idleconnectiontestperiod" where can I find out info about tuning to make sure tomcat doesn't serve out stale database connections? The following settings don't seem to be doing the trick: driverClassName="com.mysql.jdbc.Driver" url="jdbc:mysql://localhost:3306/blah?autoReconnect=true&useUnicode=true&characterEncoding=utf8"/> Thanks guys. Jacob - 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: System property use in web.xml?
<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > I've inherited a webapp which includes a system property reference (ie., > "region") in its web.xml (BTW, this context-param is used to lookup a > Spring context file---e.g. /WEB-INF/jmsContext-eur.xml) > > >contextConfigLocation > >/WEB-INF/jmsContext-${region}.xml, > > > > When I deploy this webapp to Tomcat 5.5.12, and define a command-line > system property with '-Dregion=eur' in catalina.sh, it works fine: the > jmsContext-eur.xml file is found. > > However, when I try to deploy this webapp to Websphere 6.0.x, even after > defining a custom property for 'region' in the server profile, I get a: > > java.io.FileNotFoundException: /WEB-INF/jmsContext-${region}.xml, > > when the server starts. > > While my immediate problem is how to deploy the webapp to Websphere, my > question to this group is this: Which component is responsible for this > behaviour (the parsing of the web deployment descriptor and the > substitution of the system property)? Is it expected J2EE 1.4 > behaviour---ie., something I can complain to IBM about? > I'm afraid that system property substitution is a Tomcat-specific feature. You can't rely on it working in any other Servlet Container. > Thanks, > > Martin > > National Australia Bank Ltd - ABN 12 004 044 937 > This email may contain confidential information. If you are not the > intended recipient, please immediately notify us at [EMAIL PROTECTED] > or by replying to the sender, and then destroy all copies of this email. > Except where this email indicates otherwise, views expressed in this email > are those of the sender and not of National Australia Bank Ltd. Advice in > this email does not take account of your objectives, financial situation, > or needs. It is important for you to consider these matters and, if the > e-mail refers to a product(s), you should read the relevant Product > Disclosure Statement(s)/other disclosure document(s) before making any > decisions. If you do not want email marketing from us in future, forward > this email with "unsubscribe" in the subject line to > [EMAIL PROTECTED] in order to stop marketing emails from this > sender. National Australia Bank Ltd does not represent > that this email is free of errors, viruses or interference. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Pls help : How to make case insensitive URL(JSP) on Tomcat 5.5
Hi, I have an intranet based JSP application on Tomcat 5.5. i have rolled it out. but the problem my JSP application users are facing is ' URL of application' is case sensetive. CAN ANYBODY TELL me a way to make my URL CASE INSENSITIVE? I need a step by step guide. Pls help. Thanks and Regards, Bhandari -- View this message in context: http://www.nabble.com/Pls-help-%3A-How-to-make-case-insensitive-URL%28JSP%29-on-Tomcat-5.5-tf3271075.html#a9094670 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]
strange log4j behaviour
Hi, I m using tomcat 5.5 and we're hosting 5 application. The problem is that 1 of the application is not doing the log as expected. We're using commons logging and log4j. All of the log4j config is similar. and this is the log4j config file log4j.rootLogger=INFO,STDOUT,FILE log4j.appender.STDOUT=org.apache.log4j.ConsoleAppender log4j.appender.STDOUT.layout=org.apache.log4j.PatternLayout log4j.appender.STDOUT.layout.ConversionPattern=%5p %d{HH:mm:ss} [%t] %c{1} - %m%n log4j.appender.FILE.layout=org.apache.log4j.PatternLayout log4j.appender.FILE.DatePattern=-MM-dd log4j.appender.FILE.layout.ConversionPattern=%5p %d{HH:mm:ss} [%t] %c{1} - %m%n log4j.appender.FILE=org.apache.log4j.DailyRollingFileAppender log4j.appender.FILE.File=/opt/gateway/logs/LegacyEngine.log log4j.logger.com.mchange=WARN log4j.logger.com.csp=INFO log4j.logger.com.ricochet=INFO what we're doing is : all of the codes are saved as a jar, these jar then placed at WEB-INF/lib at the war. those 4 applications that succeeded at logging, only use jars at the lib and not using any codes at classes. But the troublesome application, have classes placed at WEB-INF classes and logs from these classes are not logged properly at the log files. any insights ? for reference, this is the structure of the trouble some application : Archive: heart.war Length Date TimeName 39 02-21-07 14:09 META-INF/MANIFEST.MF 0 01-24-07 11:11 WEB-INF/classes/com/ricochet/j2ee/ 4900 02-19-07 16:42 WEB-INF/classes/com/ricochet/util/ApplicationUtil.class 395 02-19-07 16:42 WEB-INF/classes/com/ricochet/ems/dao/ContentNotExistException.class 335 02-15-07 14:19 invalid_request_id.wml 1313 02-19-07 16:42 WEB-INF/classes/com/ricochet/ems/dao/LegacyContentDao$2.class 388 02-15-07 14:19 no_service.wml 65 09-13-06 17:11 index.html 84462 02-21-07 14:09 WEB-INF/lib/commons-validator.jar 188671 02-21-07 14:09 WEB-INF/lib/commons-beanutils.jar 571259 02-21-07 14:09 WEB-INF/lib/commons-collections.jar 1021 02-19-07 16:42 WEB-INF/classes/com/ricochet/database/ConnectionPoolFactory.class 18905 02-21-07 14:09 WEB-INF/lib/base.jar 367444 02-21-07 14:09 WEB-INF/lib/log4j-1.2.14.jar 446464 02-21-07 14:09 WEB-INF/lib/mysql.jar 226877 02-21-07 14:09 WEB-INF/lib/jaxen-1.1-beta-7.jar 9537 02-19-07 16:42 WEB-INF/classes/com/ricochet/service/ServiceProcessor.class 4516 02-19-07 16:42 WEB-INF/classes/com/ricochet/service/bean/WapMessageBean.class 0 12-28-06 16:08 META-INF/ 35695 02-21-07 14:09 WEB-INF/lib/md-bean.jar 0 12-28-06 15:29 WEB-INF/ 227 02-15-07 14:20 success_download.wml 231 01-31-07 19:02 META-INF/context.xml 0 12-19-06 02:28 WEB-INF/classes/com/ricochet/database/ 0 01-25-07 13:56 WEB-INF/classes/com/ricochet/ 1302 02-19-07 16:42 WEB-INF/classes/com/ricochet/ems/bean/RawContent.class 79151 02-21-07 14:09 WEB-INF/lib/qdox-1.5.jar 279781 02-21-07 14:09 WEB-INF/lib/commons-httpclient.jar 96529 02-21-07 14:09 WEB-INF/lib/commons-javaflow.jar 2539 02-16-07 15:40 WEB-INF/web.xml 0 01-25-07 14:11 WEB-INF/classes/com/ricochet/ems/bean/ 313898 02-21-07 14:09 WEB-INF/lib/dom4j-1.6.1.jar 2274 02-19-07 16:42 WEB-INF/classes/com/ricochet/database/Query.class 6382 02-21-07 14:08 WEB-INF/classes/com/ricochet/service/ContentProcessor.class 16146 02-19-07 16:42 WEB-INF/classes/com/ricochet/service/WapReceiverServlet.class 134104 02-21-07 14:09 WEB-INF/lib/sunjce_provider.jar 168446 02-21-07 14:09 WEB-INF/lib/commons-digester.jar 1526 02-19-07 16:42 WEB-INF/classes/com/ricochet/j2ee/LegacyEngineStarter.class 0 01-25-07 14:11 WEB-INF/classes/com/ricochet/ems/dao/ 243016 02-21-07 14:09 WEB-INF/lib/commons-lang.jar 46725 02-21-07 14:09 WEB-INF/lib/commons-codec.jar 0 01-25-07 17:00 WEB-INF/classes/com/ricochet/service/ 266 02-19-07 16:42 WEB-INF/classes/com/ricochet/ems/dao/ContentDao.class 2581 02-19-07 16:42 WEB-INF/classes/com/ricochet/service/SubscriptionWapPageServlet.class 3730 02-19-07 16:42 WEB-INF/classes/com/ricochet/util/SoapMessageGenerator.class 4475 02-19-07 16:42 WEB-INF/classes/com/ricochet/service/DigiChargeMT.class 283 02-15-07 14:20 product_not_available.wml 0 12-19-06 02:28 WEB-INF/classes/com/ricochet/system/ 9081 02-19-07 16:42 WEB-INF/classes/com/ricochet/service/SubscriptionDownloadServlet.class 18524 02-19-07 16:42 WEB-INF/classes/com/ricochet/service/ServiceConstants.class 265 02-15-07 14:20 product_downloaded.wml 61562 02-21-07 14:09 WEB-INF/lib/commons-io.jar 75549 02-21-07 14:09 WEB-INF/lib/md-logic.jar 103101 02-21-07 14:09 WEB-INF/lib/xmlizable.jar 2021 02-19-07 16:42 WEB-INF/classes/com/ricochet/util/DigiSecurityUtilWAP.class 0 12-28-06 17:14 WEB-INF/lib/ 25938
RE: Pls help : How to make case insensitive URL(JSP) on Tomcat 5.5
> From: Bhandari [mailto:[EMAIL PROTECTED] > Subject: Pls help : How to make case insensitive URL(JSP) on > Tomcat 5.5 > > CAN ANYBODY TELL me a way to make my URL CASE INSENSITIVE? > I need a step by step guide. Read the doc: http://tomcat.apache.org/tomcat-5.5-doc/config/context.html "caseSensitive "If the value of this flag is true, all case sensitivity checks will be disabled. If not specified, the default value of the flag is true. "NOTE: This flag MUST NOT be set to false on the Windows platform (or any other OS which does not have a case sensitive filesystem), as it will disable case sensitivity checks, allowing JSP source code disclosure, among other security problems." It's strongly recommended that you teach your users to type, since case-sensitivity is mandated by the URI Generic Syntax document (RFC 3986) and the servlet spec. - 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]
How can I realize server side GUI??
Hello I want to make a server side GUI application that draw senveral Rectanges and when mouse drag the bottom of Rectange, the rectange extends. Do anybody know how I can realize this appication. Thank you at advance. Wang suya wang suya - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]