Re: RequestDumperValve screws UTF-8 parameter parsing
On Tuesday, 10 בJanuary 2006 00:06, Endre Stølsvik wrote: Enabling the RequestDumperValve in both 5.5.12 and 5.0.16 (!) messes up the parsing of other-than-ISO-8859-1 incoming parameters. After using a rather huge bunch of hours, this came down as the result: when this debug valve is turned on, it seems to default to ISO-8859-1 when it parses and log-outputs the incoming parameters, thus also implicitly setting the entire Request-object to this enc, so any subsequnt setting to UTF-8 doesn't matter at all. At least this is true for POST paramters. AFAIK, the catalina implementation of HttpServletRequest does not allow to set the character set more then once, even though it doesn't do any pre-processing of the input. Maybe that should be fixed instead ? -- Oded ::.. Democracy is also a form of worship. It is the worship of Jackals by Jackasses. -- Henry Louis Mencken - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: RequestDumperValve screws UTF-8 parameter parsing
On Mon, 9 Jan 2006, Mark Thomas wrote: | Endre Stølsvik wrote: | Enabling the RequestDumperValve in both 5.5.12 and 5.0.16 (!) messes up | the parsing of other-than-ISO-8859-1 incoming parameters. | | After using a rather huge bunch of hours, this came down as the result: | when this debug valve is turned on, it seems to default to ISO-8859-1 | when it parses and log-outputs the incoming parameters, thus also | implicitly setting the entire Request-object to this enc, so any | subsequnt setting to UTF-8 doesn't matter at all. At least this is true | for POST paramters. | | For GET parameters, the situation is a little different. Here an | explicit setting of URIEncoding to UTF-8 seems to work as it should, | while useBodyEncodingForURI doesn't - it picks up the wrong already | implicitly set encoding. (For 5.0.16 I can't seem to get the latter | version to work, and have to use the explicit setting.) | | Sorry if my analysis doesn't hold water, but at least the bug seems to | be very consistent. | | Regards, | Endre. | | Which is why the following text appears in the docs for this valve: When was this added? See, I have a hunch that this comment wasn't there in the beginning. Why isn't this slightly important point put in a clearly visible place within the server.xml file then?! Or the code just fixed, or rather just deleted off of the face of the earth until some code who haven't got his head totally up a ASCII-speaking place makes a usable version of it? Tomcat 5.5.12's server.xml: !-- The request dumper valve dumps useful debugging information about the request headers and cookies that were received, and the response headers and cookies that were sent, for all requests received by this instance of Tomcat. If you care only about requests to a particular virtual host, or a particular application, nest this element inside the corresponding Host or Context entry instead. For a similar mechanism that is portable to all Servlet 2.4 containers, check out the RequestDumperFilter Filter in the example application (the source for this filter may be found in $CATALINA_HOME/webapps/examples/WEB-INF/classes/filters). Request dumping is disabled by default. Uncomment the following element to enable it. -- !-- Valve className=org.apache.catalina.valves.RequestDumperValve/ -- Putting some high risk debugging feature within the default example server.xml file as yeah, this is fucking cool, just uncomment this to debug your problems without in the same breath pointing out that this will increase the exact problems you're trying to fix, is rather provocative after using 7 hours of debugging time on a I18N problem where my bleedin' parameters including something as simple as my three extra scandinavian characters æøå won't get through correctly. Really, how can a request dumper feature that cannot handle any other charsets than the default Locale's the user running the JVM has, still be present in the default example config of the powerful and one-would-assume better-than-this Tomcat?? Anyways, thanks for answering, Thomas. If you have commit access (or any other reading this), then maybe you'd care to shove in a line at the top of the quoted comment, AND the bottom within the comment-out part of the definition, along the lines of: EXTREME WARNING / ERROR: Enabling this will most definately mess up all your parameter handling unless you live in USofA or England (and won't test for I18N anyways), or if mercury's third moon happens to be aligned with mars. (and/or simply delete the damn class) .. then maybe the next poor bastard hitting some I18N problems won't get caught using a debugging feature that will _ensure_ that his problems won't _ever_ go away. Kind regards, Endre. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: RequestDumperValve screws UTF-8 parameter parsing
On Tue, 10 Jan 2006, Oded Arbel wrote: | On Tuesday, 10 ÿÿJanuary 2006 00:06, Endre Stølsvik wrote: | Enabling the RequestDumperValve in both 5.5.12 and 5.0.16 (!) messes | up the parsing of other-than-ISO-8859-1 incoming parameters. | | After using a rather huge bunch of hours, this came down as the | result: when this debug valve is turned on, it seems to default to | ISO-8859-1 when it parses and log-outputs the incoming parameters, | thus also implicitly setting the entire Request-object to this enc, | so any subsequnt setting to UTF-8 doesn't matter at all. At least | this is true for POST paramters. | | AFAIK, the catalina implementation of HttpServletRequest does not allow | to set the character set more then once, even though it doesn't do any | pre-processing of the input. | | Maybe that should be fixed instead ? I think that when you touch the servlet request object's parameters at all (or even anything else it might seem like), it parses them all at once using the then-set (or default) encoding and caches them. This is most probably according to spec. I really don't find this that problematic, as it also ensures that you code in the most efficient way: Letting you set the encoding (differently) multiple times would definately ensure a slower processing, and would also most probably simply be a bug: the browser sends all its parameters using one encoding, and it would be a strange setting if it was really needed to change the encoding midways in your processing. I feel the problem here is a) i18n ignorance, b) bad coding logic, and c) bad documentation/commenting of a debugging feature. Regards, Endre. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Avoid duplication of database settings
I have an application consisting of a web application and some stand alone java clients. Both the web application and the java clients use a database. The problem is that the database configuration is duplicated. If you are doing it the ant way I recommend using filtering. Thanks for the suggestion. I will have a look at it. Do you know if frameworks like Spring or Hibernate solves this kind of problems? -Tomas - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Avoid duplication of database settings
Sorry about the antispammed subject in my previous post. I have an application consisting of a web application and some stand alone java clients. Both the web application and the java clients use a database. The problem is that the database configuration is duplicated. If you are doing it the ant way I recommend using filtering. Thanks for the suggestion. I will have a look at it. Do you know if frameworks like Spring or Hibernate solves this kind of problems? I don't know about spring but in hibernate there is one configuration file that you can share between webapp and standalone clients. (Using it in my current project.) If you only use Hibernate to access your database you will be fine. It is also possible to get the DataSource from the hibernate configuration if you want to access the database directly (for performance reasons). I have some SQL scripts that need the database info so I use filtering anyway both as a way to have the configuration values in one place and as a way to easily build for different environments. Regards, Fredrik - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat 5.5.x and java 1.4.x
Of course - otherwise it couldn't run under 1.4. http://apache.scarlet.be/tomcat/tomcat-5/v5.5.12/README.html : Tomcat 5.5 requires JRE 5.0 by default Regards, Jean-Pol. -Original Message- From: Caldarale, Charles R [mailto:[EMAIL PROTECTED] Sent: 09 January 2006 16:00 To: Tomcat Users List Subject: RE: Tomcat 5.5.x and java 1.4.x From: Akoulov, Alexandre [IT] [mailto:[EMAIL PROTECTED] Subject: Tomcat 5.5.x and java 1.4.x My question is: was Tomcat 5.5.12 binary version that can be downloaded from http://tomcat.apache.org/download-55.cgi#5.5.12 compiled with java 1.4? Of course - otherwise it couldn't run under 1.4. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat 5.5.x and java 1.4.x
LANDRAIN Jean-Pol wrote: Of course - otherwise it couldn't run under 1.4. http://apache.scarlet.be/tomcat/tomcat-5/v5.5.12/README.html : Tomcat 5.5 requires JRE 5.0 by default Fine. Nevertheless, Charles' statement is perfectly true. Regards mks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: AW: JSessionID
Bill Barker wrote: Jess Holle [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Conveying servlet sessions by SSL session is clearly not required by the spec, though... I'm not sure whether Tomcat supports this... It doesn't (mostly because nobody has been interested enough to write the code for it). Understood. Frankly I'm not interested enough to even ask anyone else to prioritize writing such code over other the usual areas (stability/performance [not that this is bad now, mind you], servlet 2.5/JSP 2.1, etc...) -- Jess Holle - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: RequestDumperValve screws UTF-8 parameter parsing
Endre Stølsvik wrote: On Tue, 10 Jan 2006, Oded Arbel wrote: | On Tuesday, 10 ÿÿJanuary 2006 00:06, Endre Stølsvik wrote: | Enabling the RequestDumperValve in both 5.5.12 and 5.0.16 (!) messes | up the parsing of other-than-ISO-8859-1 incoming parameters. | | After using a rather huge bunch of hours, this came down as the | result: when this debug valve is turned on, it seems to default to | ISO-8859-1 when it parses and log-outputs the incoming parameters, | thus also implicitly setting the entire Request-object to this enc, | so any subsequnt setting to UTF-8 doesn't matter at all. At least | this is true for POST paramters. | | AFAIK, the catalina implementation of HttpServletRequest does not allow | to set the character set more then once, even though it doesn't do any | pre-processing of the input. | | Maybe that should be fixed instead ? I think that when you touch the servlet request object's parameters at all (or even anything else it might seem like), it parses them all at once using the then-set (or default) encoding and caches them. This is most probably according to spec. This is most definitely according to the spec. Then again, valves are below the level of the spec and could do things differently. The point is that this would be difficult to do efficiently at request start and so tradeoffs were clearly made. This may not have been documented right at first (I know I got burned once), but the issue has always clearly been there. I'd suggest living with it or writing your own filter. Doing such output at request end works and while I don't think such a filter can provide everything a valve can it does allow an awful lot of information to be gathered. -- Jess Holle - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Apache + Tomcat, Tomcat only handles JSP in localhost
On Tuesday, 10 בJanuary 2006 02:35, Caldarale, Charles R wrote: From: Sriram Narayanan [mailto:[EMAIL PROTECTED] Subject: Re: Apache + Tomcat, Tomcat only handles JSP in localhost The link he gave talks about how to have PHP etc along side Tomcat. PHP can be fairly easily used with Tomcat standalone: http://wiki.apache.org/tomcat/UsingPhp So, I repeat: What full-fledged features do you think are missing from Tomcat? The most important reason that I use an Apache frontend for tomcat, which is probably not relevant to the original poster, is that under Unix only root processes can open port 80 (the default HTTP port), and so if tomcat is configured to serve pages on port 80, it must run as root. This is a serious security concern. Apache knows how to open port 80 and then change to a non-privileged user, something which AFAIK tomcat - being based on Java which does not support the concept of operating system privileges - cannot do. There for, some kind of frontend is required. While we are in the process of providing a frontend, it might as well be Apache which offers additional features: reverse-proxying and caching and support for a huge number of scripting languages (python, perl or ruby anyone ?) and other modules. Also - the tomcat support for PHP is really nice and I am planning on trying it out ASAP, but I prefer not to do hacks on production machines, and Apache support for PHP is better integrated and is offered as part of my base operating system - including support for compiled pages, code caches and PHP debugging. -- Oded ::.. Ability is nothing without opportunity. -- Napoleon Bonaparte - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: RequestDumperValve screws UTF-8 parameter parsing
On Tuesday, 10 בJanuary 2006 11:16, Endre Stølsvik wrote: On Tue, 10 Jan 2006, Oded Arbel wrote: | AFAIK, the catalina implementation of HttpServletRequest does not | allow to set the character set more then once, even though it | doesn't do any pre-processing of the input. | | Maybe that should be fixed instead ? I think that when you touch the servlet request object's parameters at all (or even anything else it might seem like), it parses them all at once using the then-set (or default) encoding and caches them. This is most probably according to spec. I really don't find this that problematic ... the browser sends all its parameters using one encoding, and it would be a strange setting if it was really needed to change the encoding midways in your processing. Then why is it at all possible to set the encoding ? it should not be needed and there for should not be possible. The fact that such a call exists suggests to me that calling it repeatedly would have some effect (granted - it will slow the performance, but that is as expected) - I would prefer the request implementation reparse everything when I supply new character set information - taking it sweet time to do it (I'm probably only going to do this once per request) - rather then just ignore me. The fact is, if you get at the request too late in the process, where the character set has already been set (wrongly), theres nothing you can do to rescue the data, and many times I've had that problem. -- Oded ::.. -- Members of an avian species of identical plumage congregate. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: RequestDumperValve screws UTF-8 parameter parsing
The first thing a servlet (or filter) should do is set the encoding before touching the request parameters. Its not intended to be called somewhere late in the processing lifecycle. Since a Valve executes before any javax.servlet code - all bets are off (for the request encoding) based on the warning messages in the Valve. For GET requests, reparsing might work when a new encoding is requested. But for POST requests - doing so would require saving the entire POST body somewhere. This can easily cause a memory based DOS attack. -Tim Oded Arbel wrote: Then why is it at all possible to set the encoding ? it should not be needed and there for should not be possible. The fact that such a call exists suggests to me that calling it repeatedly would have some effect (granted - it will slow the performance, but that is as expected) - I would prefer the request implementation reparse everything when I supply new character set information - taking it sweet time to do it (I'm probably only going to do this once per request) - rather then just ignore me. The fact is, if you get at the request too late in the process, where the character set has already been set (wrongly), theres nothing you can do to rescue the data, and many times I've had that problem. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Re: Apache + Tomcat, Tomcat only handles JSP in localhost
From: Oded Arbel [EMAIL PROTECTED] Date: 2006/01/10 Tue AM 06:59:08 EST To: users@tomcat.apache.org CC: Caldarale, Charles R [EMAIL PROTECTED] Subject: Re: Apache + Tomcat, Tomcat only handles JSP in localhost On Tuesday, 10 ?January 2006 02:35, Caldarale, Charles R wrote: From: Sriram Narayanan [mailto:[EMAIL PROTECTED] Subject: Re: Apache + Tomcat, Tomcat only handles JSP in localhost The link he gave talks about how to have PHP etc along side Tomcat. PHP can be fairly easily used with Tomcat standalone: http://wiki.apache.org/tomcat/UsingPhp So, I repeat: What full-fledged features do you think are missing from Tomcat? The most important reason that I use an Apache frontend for tomcat, which is probably not relevant to the original poster, is that under Unix only root processes can open port 80 (the default HTTP port), and so if tomcat is configured to serve pages on port 80, it must run as root. This is a serious security concern. Apache knows how to open port 80 and then change to a non-privileged user, something which AFAIK tomcat - being based on Java which does not support the concept of operating system privileges - cannot do. You can use jsvc to run tomcat as a non-priviledged user on port 80. There for, some kind of frontend is required. While we are in the process of providing a frontend, it might as well be Apache which offers additional features: reverse-proxying and caching and support for a huge number of scripting languages (python, perl or ruby anyone ?) and other modules. Also - the tomcat support for PHP is really nice and I am planning on trying it out ASAP, but I prefer not to do hacks on production machines, and Apache support for PHP is better integrated and is offered as part of my base operating system - including support for compiled pages, code caches and PHP debugging. -- Oded ::.. Ability is nothing without opportunity. -- Napoleon Bonaparte - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Two tomcat executables in Windows XP Task Manager
OS: Windows XP Professional SP2 Tomcat Version 5.5.12 isapi_redirect.dll I recently installed Tomcat 5.5.12 on my machine at work. I had to front-end tomcat with IIS because of an existing ASP intranet site that I'm just not willing to rewrite. In Windows task manager, I notice that both tomcat5.exe and tomcat5w.exe appear as running processes after system startup. Is this normal? Both tomcat and isapi_redirect were installed using the Windows installer packages. Thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Re: Two tomcat executables in Windows XP Task Manager
Understood. Thanks! From: Hardik Tank [EMAIL PROTECTED] Date: 2006/01/10 Tue AM 07:53:22 EST To: Tomcat Users List users@tomcat.apache.org Subject: Re: Two tomcat executables in Windows XP Task Manager yes it is normal only. tomcat5w.exe is for tomcat service manager and tomcat5.exe is the actual tomcat server. if you stop the service tomcat5.exe will go. rgds, Hardik Tank --- Warren Pace [EMAIL PROTECTED] wrote: OS: Windows XP Professional SP2 Tomcat Version 5.5.12 isapi_redirect.dll I recently installed Tomcat 5.5.12 on my machine at work. I had to front-end tomcat with IIS because of an existing ASP intranet site that I'm just not willing to rewrite. In Windows task manager, I notice that both tomcat5.exe and tomcat5w.exe appear as running processes after system startup. Is this normal? Both tomcat and isapi_redirect were installed using the Windows installer packages. Thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Send instant messages to your online friends http://in.messenger.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
java.lang.VerifyError Wrong return type in function
My servlet seems seemingly to work just fine, but running through the log I've found a whole bunch of FATAL errors. They also seem to have risen without me envoking the servlet and the classes involved are nothing but apache. What could it be? Errorlog: java.lang.VerifyError: (class: org/apache/jasper/runtime/PageContextImpl, method: getExpressionEvaluator signature: ()Ljavax/servlet/jsp/el/ExpressionEvaluator;) Wrong return type in function at org.apache.jasper.runtime.JspFactoryImpl.internalGetPageContext(JspFactoryImpl.java:99) at org.apache.jasper.runtime.JspFactoryImpl.getPageContext(JspFactoryImpl.java:61) at org.apache.jsp.index_jsp._jspService(index_jsp.java:32) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:868) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:663) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Single Thread is deprecated?
On 1/9/06, Wade Chandler [EMAIL PROTECTED] wrote: ... I don't know about 5.5.15, but 5.5.9 used HashMap. The synchronization of the session object was an issue which caused other issues and is why there should now be synchronization on the reading as well as writing session attributes. There was a huge discussion on this on the list as well as a bug associated with it which could cause finite dead locks in Tomcat if access made the session resize while it were being read (should be able to find it in bugzilla...bugzilla was still being used). http://issues.apache.org/bugzilla/show_bug.cgi?id=36541 leon - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Concept for modeling hierarchical data
Florian Lindner wrote: Hello, I'm searching for the best concept of how to use and save hierarchical data. I have a structure like PC file system with meta data. There a folder objects and files objects of different types. Every object have data like permissions, date and author. And they have type-specific data fields like resolution (of an image type) or location (of an meeting type) or ingredients (of an recipe type). What is the best way to store that kind of data? What database is recommendable? What concepts of persistance? Or not using managed persistance and do it manually? Thanks for all ideas! Florian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] There is also JSR-170 which defines an API for storing data hierarchically. The Jackrabbit project is one implementation of it and currently used in the Magnolia CMS. JSR-170 spec: http://www.jcp.org/en/jsr/detail?id=170 Jackrabbit project: http://incubator.apache.org/projects/jackrabbit.html Magnolia CMS: http://www.magnolia.info --David - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Error loop for R - Tomcat 3.3.1a
Sid, The code where the exception is occurring is: private final String getAbsolutePathRelativeToContext(String relativeUrlPath) { String path = relativeUrlPath; if (!path.startsWith(/)) { String uri = (String) request.getAttribute(javax.servlet.include.servlet_path); if (uri == null) uri = ((HttpServletRequest) request).getServletPath(); 401 String baseURI = uri.substring(0, uri.lastIndexOf('/')); path = baseURI+'/'+path; } return path; } The code is trying to convert the weblmpagetop.jsp relative path to a path from the root of the webapp. What Jasper has to work with to establish where weblmpagetop.jsp is located is failing the uri.lastIndexOf('/'). This suggests the problem is related to the forwards that are occurring prior to reaching the include. Perhaps there is something that needs to start with a '/' that doesn't. I can't say that this isn't due to a quirk, bug, or spec ambiguity, as opposed the webapp doing something wrong with respect to the Servlet 2.2 spec. It sounds like you are stuck with 3.3.1 as is. Hopefully a reasonable workaround can be found. Cheers, Larry -Original Message- From: Siddhartha Mehta [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 10, 2006 1:50 AM To: users@tomcat.apache.org Subject: Error loop for R - Tomcat 3.3.1a I am currently working on a web application that uses Tomcat 4.1.27 and JDK 1.4.2_03. The same piece of code now needs to be supported on Tomcat 3.3.1 and JDK 1.4.2_08. I managed to get the classes, jsps coompile and built by modifying the ant script. In fact even the application runs perfect and the functionalities are working as expected. Although, all is not good as it seems so. In the backend, the tomcat - startup windows isn't quite happy with the changes. I repeatedly get the following error and I can make out very little from it. I can think of possible cause as this code in my jsp but not really sure: jsp:include page=weblmpagetop.jsp flush=true jsp:param name=disable-session-validation value=true / jsp:param name=body-title-text value=%= title % / jsp:param name=body-location-text value=%= location % / /jsp:include Exception thrown in tomcat-start up window is below: 2006-01-10 11:48:04 - Ctx(/WebLM) : Exception in R( /WebLM + /weblmlogin.jsp + n ull) - javax.servlet.ServletException: String index out of range: -1 at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageCon textImpl.java:460) at com.avaya.weblm.weblmlogin._jspService(Unknown Source) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119) at javax.servlet.http.HttpServlet.service(HttpServlet.java) at org.apache.tomcat.facade.ServletHandler.doService(ServletHandler.java :574) at org.apache.tomcat.core.Handler.invoke(Handler.java:322) at org.apache.tomcat.core.Handler.service(Handler.java:235) at org.apache.tomcat.facade.ServletHandler.service(ServletHandler.java:4 85) at org.apache.tomcat.facade.RequestDispatcherImpl.doForward(RequestDispa tcherImpl.java:272) at org.apache.tomcat.facade.RequestDispatcherImpl.forward(RequestDispatc herImpl.java:174) at com.avaya.weblm.WebLMServlet.forwardToNextPage(Unknown Source) at com.avaya.weblm.WebLMClientLogin.doPost(Unknown Source) at javax.servlet.http.HttpServlet.service(HttpServlet.java) at javax.servlet.http.HttpServlet.service(HttpServlet.java) at org.apache.tomcat.facade.ServletHandler.doService(ServletHandler.java :574) at org.apache.tomcat.core.Handler.invoke(Handler.java:322) at org.apache.tomcat.core.Handler.service(Handler.java:235) at org.apache.tomcat.facade.ServletHandler.service(ServletHandler.java:4 85) at org.apache.tomcat.facade.RequestDispatcherImpl.doForward(RequestDispa tcherImpl.java:272) at org.apache.tomcat.facade.RequestDispatcherImpl.forward(RequestDispatc herImpl.java:174) at org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.jav a:423) at com.avaya.weblm.weblmlogin._jspService(Unknown Source) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119) at javax.servlet.http.HttpServlet.service(HttpServlet.java) at org.apache.tomcat.facade.ServletHandler.doService(ServletHandler.java :574) at org.apache.tomcat.core.Handler.invoke(Handler.java:322) at org.apache.tomcat.core.Handler.service(Handler.java:235) at org.apache.tomcat.facade.ServletHandler.service(ServletHandler.java:4 85) at org.apache.tomcat.facade.RequestDispatcherImpl.doForward(RequestDispa tcherImpl.java:272) at org.apache.tomcat.facade.RequestDispatcherImpl.forward(RequestDispatc
Tomcat unusable when logging set to debug mode
Hi all! Because of a mistake in writing in my log4j configuration logging has been set to debug mode. When deploying the webapp Tomcat began to log thousands of debug messages, and so became unusable because of the heavy load. I had to stop Tomcat and delete the webapp from the webapp-directory manually. This is not very useful if there are running several, frequently used webapps... So is there away to avoid such situations? How can I Tomcat prevent to produce such heavy (and not very useful) load? Is there a way? Thanks Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Error loop for R - Tomcat 3.3.1a
Hey Larry, Finally a refresh click brought a smile on my face :-) Yeah, it is one of those scenarios where people want backward support as against to moving forward. One thing that I dont understand is that the UIs are working very well. In fact I am able to change the password (that is when these exceptions are thrown) and is updated as well. Then why this backend exception. Any thoughts here? Also, there is a forward that is called before the include as you pointed out. Do you have any ideas on what tweaking I can try? Thanks again for your reply. Sid Larry Isaacs [EMAIL PROTECTED] wrote: Sid, The code where the exception is occurring is: private final String getAbsolutePathRelativeToContext(String relativeUrlPath) { String path = relativeUrlPath; if (!path.startsWith(/)) { String uri = (String) request.getAttribute(javax.servlet.include.servlet_path); if (uri == null) uri = ((HttpServletRequest) request).getServletPath(); 401 String baseURI = uri.substring(0, uri.lastIndexOf('/')); path = baseURI+'/'+path; } return path; } The code is trying to convert the weblmpagetop.jsp relative path to a path from the root of the webapp. What Jasper has to work with to establish where weblmpagetop.jsp is located is failing the uri.lastIndexOf('/'). This suggests the problem is related to the forwards that are occurring prior to reaching the include. Perhaps there is something that needs to start with a '/' that doesn't. I can't say that this isn't due to a quirk, bug, or spec ambiguity, as opposed the webapp doing something wrong with respect to the Servlet 2.2 spec. It sounds like you are stuck with 3.3.1 as is. Hopefully a reasonable workaround can be found. Cheers, Larry -Original Message- From: Siddhartha Mehta [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 10, 2006 1:50 AM To: users@tomcat.apache.org Subject: Error loop for R - Tomcat 3.3.1a I am currently working on a web application that uses Tomcat 4.1.27 and JDK 1.4.2_03. The same piece of code now needs to be supported on Tomcat 3.3.1 and JDK 1.4.2_08. I managed to get the classes, jsps coompile and built by modifying the ant script. In fact even the application runs perfect and the functionalities are working as expected. Although, all is not good as it seems so. In the backend, the tomcat - startup windows isn't quite happy with the changes. I repeatedly get the following error and I can make out very little from it. I can think of possible cause as this code in my jsp but not really sure: name=body-title-text % name=body-location-text Exception thrown in tomcat-start up window is below: 2006-01-10 11:48:04 - Ctx(/WebLM) : Exception in R( /WebLM + /weblmlogin.jsp + n ull) - javax.servlet.ServletException: String index out of range: -1 at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageCon textImpl.java:460) at com.avaya.weblm.weblmlogin._jspService(Unknown Source) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119) at javax.servlet.http.HttpServlet.service(HttpServlet.java) at org.apache.tomcat.facade.ServletHandler.doService(ServletHandler.java :574) at org.apache.tomcat.core.Handler.invoke(Handler.java:322) at org.apache.tomcat.core.Handler.service(Handler.java:235) at org.apache.tomcat.facade.ServletHandler.service(ServletHandler.java:4 85) at org.apache.tomcat.facade.RequestDispatcherImpl.doForward(RequestDispa tcherImpl.java:272) at org.apache.tomcat.facade.RequestDispatcherImpl.forward(RequestDispatc herImpl.java:174) at com.avaya.weblm.WebLMServlet.forwardToNextPage(Unknown Source) at com.avaya.weblm.WebLMClientLogin.doPost(Unknown Source) at javax.servlet.http.HttpServlet.service(HttpServlet.java) at javax.servlet.http.HttpServlet.service(HttpServlet.java) at org.apache.tomcat.facade.ServletHandler.doService(ServletHandler.java :574) at org.apache.tomcat.core.Handler.invoke(Handler.java:322) at org.apache.tomcat.core.Handler.service(Handler.java:235) at org.apache.tomcat.facade.ServletHandler.service(ServletHandler.java:4 85) at org.apache.tomcat.facade.RequestDispatcherImpl.doForward(RequestDispa tcherImpl.java:272) at org.apache.tomcat.facade.RequestDispatcherImpl.forward(RequestDispatc herImpl.java:174) at org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.jav a:423) at com.avaya.weblm.weblmlogin._jspService(Unknown Source) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119) at javax.servlet.http.HttpServlet.service(HttpServlet.java) at org.apache.tomcat.facade.ServletHandler.doService(ServletHandler.java :574) at org.apache.tomcat.core.Handler.invoke(Handler.java:322) at org.apache.tomcat.core.Handler.service(Handler.java:235) at org.apache.tomcat.facade.ServletHandler.service(ServletHandler.java:4 85) at
Re: Tomcat unusable when logging set to debug mode
How about editing your log4j.properties file and adding the following?: log4j.logger.org.apache=INFO [EMAIL PROTECTED] wrote: Hi all! Because of a mistake in writing in my log4j configuration logging has been set to debug mode. When deploying the webapp Tomcat began to log thousands of debug messages, and so became unusable because of the heavy load. I had to stop Tomcat and delete the webapp from the webapp-directory manually. This is not very useful if there are running several, frequently used webapps... So is there away to avoid such situations? How can I Tomcat prevent to produce such heavy (and not very useful) load? Is there a way? Thanks Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Error loop for R - Tomcat 3.3.1a
I'm afraid I don't have any simple guesses as to what to change. It appears there are multiple forwards occurring and it may be the multiple that is the root cause of this behavior. You can experiment with changes to see what happens, or try to run tomcat in a debugger to see if you can determine what ((HttpServletRequest) request).getServletPath() is returning and why it doesn't have the expected '/'. If you want to try the latter, source for Tomcat 3.3.1 or 3.3.1.a can be found here: http://archive.apache.org/dist/tomcat/tomcat-3/archive/ An alternative to debugging is to create a classes directory under lib/container and extract the source for PageContextImpl into the package appropriate subdirectory. Then add System.out.println()s, and compile. When Tomcat is run, the PageContextImpl under classes will take precedence over the one in jasper.jar, allowing you to gather clues. HTH, Larry -Original Message- From: Siddhartha Mehta [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 10, 2006 8:51 AM To: Tomcat Users List Subject: RE: Error loop for R - Tomcat 3.3.1a Hey Larry, Finally a refresh click brought a smile on my face :-) Yeah, it is one of those scenarios where people want backward support as against to moving forward. One thing that I dont understand is that the UIs are working very well. In fact I am able to change the password (that is when these exceptions are thrown) and is updated as well. Then why this backend exception. Any thoughts here? Also, there is a forward that is called before the include as you pointed out. Do you have any ideas on what tweaking I can try? Thanks again for your reply. Sid Larry Isaacs [EMAIL PROTECTED] wrote: Sid, The code where the exception is occurring is: private final String getAbsolutePathRelativeToContext(String relativeUrlPath) { String path = relativeUrlPath; if (!path.startsWith(/)) { String uri = (String) request.getAttribute(javax.servlet.include.servlet_path); if (uri == null) uri = ((HttpServletRequest) request).getServletPath(); 401 String baseURI = uri.substring(0, uri.lastIndexOf('/')); path = baseURI+'/'+path; } return path; } The code is trying to convert the weblmpagetop.jsp relative path to a path from the root of the webapp. What Jasper has to work with to establish where weblmpagetop.jsp is located is failing the uri.lastIndexOf('/'). This suggests the problem is related to the forwards that are occurring prior to reaching the include. Perhaps there is something that needs to start with a '/' that doesn't. I can't say that this isn't due to a quirk, bug, or spec ambiguity, as opposed the webapp doing something wrong with respect to the Servlet 2.2 spec. It sounds like you are stuck with 3.3.1 as is. Hopefully a reasonable workaround can be found. Cheers, Larry -Original Message- From: Siddhartha Mehta [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 10, 2006 1:50 AM To: users@tomcat.apache.org Subject: Error loop for R - Tomcat 3.3.1a I am currently working on a web application that uses Tomcat 4.1.27 and JDK 1.4.2_03. The same piece of code now needs to be supported on Tomcat 3.3.1 and JDK 1.4.2_08. I managed to get the classes, jsps coompile and built by modifying the ant script. In fact even the application runs perfect and the functionalities are working as expected. Although, all is not good as it seems so. In the backend, the tomcat - startup windows isn't quite happy with the changes. I repeatedly get the following error and I can make out very little from it. I can think of possible cause as this code in my jsp but not really sure: name=body-title-text % name=body-location-text Exception thrown in tomcat-start up window is below: 2006-01-10 11:48:04 - Ctx(/WebLM) : Exception in R( /WebLM + /weblmlogin.jsp + n ull) - javax.servlet.ServletException: String index out of range: -1 at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageCon textImpl.java:460) at com.avaya.weblm.weblmlogin._jspService(Unknown Source) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119) at javax.servlet.http.HttpServlet.service(HttpServlet.java) at org.apache.tomcat.facade.ServletHandler.doService(ServletHandler.java :574) at org.apache.tomcat.core.Handler.invoke(Handler.java:322) at org.apache.tomcat.core.Handler.service(Handler.java:235) at org.apache.tomcat.facade.ServletHandler.service(ServletHandler.java:4 85) at org.apache.tomcat.facade.RequestDispatcherImpl.doForward(RequestDispa tcherImpl.java:272) at org.apache.tomcat.facade.RequestDispatcherImpl.forward(RequestDispatc herImpl.java:174) at com.avaya.weblm.WebLMServlet.forwardToNextPage(Unknown Source) at com.avaya.weblm.WebLMClientLogin.doPost(Unknown
RE: Tomcat 5.5.x and java 1.4.x
From: LANDRAIN Jean-Pol [mailto:[EMAIL PROTECTED] Subject: RE: Tomcat 5.5.x and java 1.4.x http://apache.scarlet.be/tomcat/tomcat-5/v5.5.12/README.html : Tomcat 5.5 requires JRE 5.0 by default An excellent example of quoting out of context. The very next sentence says: Read the RELEASE-NOTES and the RUNNING.txt file in the distribution for more details. And, if you actually bother to do that, you'll find the following in RUNNING.txt: Out of the box, Tomcat 5.5 requires the Java 2 Standard Edition Runtime Environment (JRE) version 5.0 or later. However, you can also run Tomcat 5.5 on earlier versions of the JRE, as detailed below. The only thing needed to run on 1.4 is the compatibility package, which contains a few class files that are standard in the 1.5 JRE but have to be downloaded separately for 1.4. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Using Tomcat 5.5 as a standalone web server
Hello all, I am running a reasonable sized site, on Linux Red Hat + Tomcat 5.5.7. The site is serving mainly Flash movies and servlets with streaming video through a commercial codec, plus a full HTML version of the site. Currently, I have Tomcat 5.5.7 integrated with Apache 2.0.46, which was (very) difficult to set up, and now I am looking to rebuild my server into a better configuration, I want to simplify my admin by running Tomcat on its own to serve all content. My question is this : does anyone have experience of running a 500 000 - 1 000 000 page impressions / month site, including elements such as I mention above, on Tomcat alone? I want to avoid the web server integration if Tomcat is up to it, but I would love to hear if anyone else has been successful with Tomcat standalone before I do? Many thanks! Adam This email is intended only for the person or entity to which it is addressed and may contain information that is privileged, confidential or otherwise protected from disclosure. Dissemination, distribution or copying of this e-mail or the information herein by anyone other than the intended recipient, or an employee or agent responsible for delivering the message to the intended recipient, is prohibited. If you have received this e-mail in error, please immediately notify us by calling the Help Desk at +44 20 7675 9666 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat 5.5.x and java 1.4.x
The only thing needed to run on 1.4 is the compatibility package, which contains a few class files that are standard in the 1.5 JRE but have to be downloaded separately for 1.4. It's not class files it contains: it's xml and jmx jars. I haven't quoted out of context: I know the details. Regards, Jean-Pol. -Original Message- From: Caldarale, Charles R [mailto:[EMAIL PROTECTED] Sent: 10 January 2006 15:43 To: Tomcat Users List Subject: RE: Tomcat 5.5.x and java 1.4.x From: LANDRAIN Jean-Pol [mailto:[EMAIL PROTECTED] Subject: RE: Tomcat 5.5.x and java 1.4.x http://apache.scarlet.be/tomcat/tomcat-5/v5.5.12/README.html : Tomcat 5.5 requires JRE 5.0 by default An excellent example of quoting out of context. The very next sentence says: Read the RELEASE-NOTES and the RUNNING.txt file in the distribution for more details. And, if you actually bother to do that, you'll find the following in RUNNING.txt: Out of the box, Tomcat 5.5 requires the Java 2 Standard Edition Runtime Environment (JRE) version 5.0 or later. However, you can also run Tomcat 5.5 on earlier versions of the JRE, as detailed below. The only thing needed to run on 1.4 is the compatibility package, which contains a few class files that are standard in the 1.5 JRE but have to be downloaded separately for 1.4. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Using Tomcat 5.5 as a standalone web server
If possible - look into 5.5.15. The APR connectors should help with serving all the video and flash streaming. -Tim Adam Johnston wrote: Hello all, I am running a reasonable sized site, on Linux Red Hat + Tomcat 5.5.7. The site is serving mainly Flash movies and servlets with streaming video through a commercial codec, plus a full HTML version of the site. Currently, I have Tomcat 5.5.7 integrated with Apache 2.0.46, which was (very) difficult to set up, and now I am looking to rebuild my server into a better configuration, I want to simplify my admin by running Tomcat on its own to serve all content. My question is this : does anyone have experience of running a 500 000 - 1 000 000 page impressions / month site, including elements such as I mention above, on Tomcat alone? I want to avoid the web server integration if Tomcat is up to it, but I would love to hear if anyone else has been successful with Tomcat standalone before I do? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat 5.5.x and java 1.4.x
The only thing needed to run on 1.4 is the compatibility package, which contains a few class files that are standard in the 1.5 JRE but have to be downloaded separately for 1.4. It's not class files it contains: it's xml and jmx jars. I haven't quoted out of context: I know the details. And just maybe there may be class files in the jar files? Fredrik - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat 5.5.x and java 1.4.x
What do you think is in those jar files? Home made pickles? -Original Message- From: LANDRAIN Jean-Pol [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 10, 2006 9:47 AM To: Tomcat Users List Subject: RE: Tomcat 5.5.x and java 1.4.x The only thing needed to run on 1.4 is the compatibility package, which contains a few class files that are standard in the 1.5 JRE but have to be downloaded separately for 1.4. It's not class files it contains: it's xml and jmx jars. I haven't quoted out of context: I know the details. == Please access the attached hyperlink for an important electronic communications disclaimer: http://www.csfb.com/legal_terms/disclaimer_external_email.shtml == - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Concept for modeling hierarchical data
Am Dienstag, 10. Januar 2006 07:51 schrieb Nikola Milutinovic: Florian Lindner wrote: Hello, I'm searching for the best concept of how to use and save hierarchical data. I have a structure like PC file system with meta data. There a folder objects and files objects of different types. Every object have data like permissions, date and author. And they have type-specific data fields like resolution (of an image type) or location (of an meeting type) or ingredients (of an recipe type). What is the best way to store that kind of data? What database is recommendable? What concepts of persistance? Or not using managed persistance and do it manually? If you want to do it manually, a hierarchical tree can be represented by just one table: CREATE TABLE tree ( id INTEGER PRIMARY KEY, parent_id INTEGER ); With managed persistence, be carefull not to configure it to load the entire tree at once. As for a DB, any decent relational DB will do. In this concept I need a table for every type of objekt I want? Regards, Florian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Compiling Servlets - Tomcat 5.5
Folks im trying to compile a servlet but JCreator complains about not finding the servlet api's. I did this a few years ago but put it down...can someone please help - Yahoo! Photos Showcase holiday pictures in hardcover Photo Books. You design it and well bind it!
RE: Using Tomcat 5.5 as a standalone web server
-Original Message- From: Adam Johnston [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 10, 2006 7:43 AM To: users@tomcat.apache.org Subject: Using Tomcat 5.5 as a standalone web server Hello all, My question is this : does anyone have experience of running a 500 000 - 1 000 000 page impressions / month site, including elements such as I mention above, on Tomcat alone? I want to avoid the web server integration if Tomcat is up to it, but I would love to hear if anyone else has been successful with Tomcat standalone before I do? I'm running around 700,000 pages a month on a pure tomcat installation with no problems. Since I'm currently running 90+ virtual hosts, I wanted to avoid having to configure them in both Tomcat and Apache, so I went pure tomcat. George Sexton MH Software, Inc. http://www.mhsoftware.com/ Voice: 303 438 9585 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Using Tomcat 5.5 as a standalone web server
From: George Sexton [mailto:[EMAIL PROTECTED] I'm running around 700,000 pages a month on a pure tomcat installation with no problems. Just for interest, George, is that on similar hardware / software to your benchmark at http://www.mhsoftware.com/caldemo/manual/en/pageFinder.html?page=622.htm ? - Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Concept for modeling hierarchical data
Florian Lindner wrote: Florian Lindner wrote: Hello, I'm searching for the best concept of how to use and save hierarchical data. I have a structure like PC file system with meta data. There a folder objects and files objects of different types. Every object have data like permissions, date and author. And they have type-specific data fields like resolution (of an image type) or location (of an meeting type) or ingredients (of an recipe type). What is the best way to store that kind of data? What database is recommendable? What concepts of persistance? Or not using managed persistance and do it manually? If you want to do it manually, a hierarchical tree can be represented by just one table: CREATE TABLE tree ( id INTEGER PRIMARY KEY, parent_id INTEGER ); With managed persistence, be carefull not to configure it to load the entire tree at once. As for a DB, any decent relational DB will do. In this concept I need a table for every type of objekt I want? It depends on if you want the DB to handle data integrity for you. If you are happy to have everything as key-value pairs you can come away with two tables. Add a table with columns kay, values and a foreign key to the suggested tree table. If you want specific data integrity per type you will have to have one table per type. It also seems that some data is there for all types (permissions, date and author). Maybe you want to reuse that definition in one table. In the end it depends on what you will be using this tree of data for, how will you access it and what technology will be used? Will it be read-only or both reads and writes? Volumes? Number of users? If data is to be updated by several users I think youl should definitely use a relational database of some kind. If it is read-only then XML files will be good enough. Hibernate is a good persistence framework to use if you want to do the modeling in XML or Java. Fredrik - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Compiling Servlets - Tomcat 5.5
Try adding TOMCAT_HOME/common/lib/servlet-api.jar to your classpath. On Jan 10, 2006, at 8:09 AM, Lenandlar Singh wrote: Folks im trying to compile a servlet but JCreator complains about not finding the servlet api's. I did this a few years ago but put it down...can someone please help - Yahoo! Photos – Showcase holiday pictures in hardcover Photo Books. You design it and we’ll bind it! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Using Tomcat 5.5 as a standalone web server
Yes. That is the same machine/configuration. CPU Utilization is between 1-2.5% during the day which is the peak usage time. George Sexton MH Software, Inc. http://www.mhsoftware.com/ Voice: 303 438 9585 -Original Message- From: Peter Crowther [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 10, 2006 8:16 AM To: Tomcat Users List Subject: RE: Using Tomcat 5.5 as a standalone web server From: George Sexton [mailto:[EMAIL PROTECTED] I'm running around 700,000 pages a month on a pure tomcat installation with no problems. Just for interest, George, is that on similar hardware / software to your benchmark at http://www.mhsoftware.com/caldemo/manual/en/pageFinder.html?pa ge=622.htm ? - Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How do I log to file jasper compile error messages?
I am migrating from version 4.1 to 5.5 and am wrestling with the logging. How do I get compile errors from jasper to go to a log file instead of the console? I have set swallowOutput to true in the context config, and added the below entries to the {catalina_home}/conf/logging.properties file. But when I call a jsp page with a compile error, I see the error on the console but not in any of the log files. Any pointers as to what I am missing? #add the 6mpower... entry to the handlers handlers = 1catalina.org.apache.juli.FileHandler, 2localhost.org.apache.juli.FileHandler, 3manager.org.apache.juli.FileHandler, 4admin.org.apache.juli.FileHandler, 5host-manager.org.apache.juli.FileHandler, 6mpower.org.apache.juli.FileHandler, java.util.logging.ConsoleHandler 6mpower.org.apache.juli.FileHandler.level = FINE 6mpower.org.apache.juli.FileHandler.directory = ${catalina.base}/logs 6mpower.org.apache.juli.FileHandler.prefix = mpower. org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/mpower].level = INFO org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/mpower].handlers = 6mpower.org.apache.juli.FileHandler Try: org.apache.jasper.handlers=6mpower.org.apache.juli.FileHandler Thanks for the suggestion. I added this line right after the handlers=... line, but there is still no change. The mpower log file is created, but jasper compile errors are not being logged to it. Is jasper running under a different classloader? ... and would this confuse logging? This suggestion makes sense -- why wouldn't it work? - Steve Peterson
Re: Compiling Servlets - Tomcat 5.5
James Goodwill [EMAIL PROTECTED] wrote:Try adding /common/lib/servlet-api.jar to your classpath. This is what i set as a classpath environment variable... variable -- classpath value -- C:\Tomcat 5.5\common\lib\servlet-api.jar Still no progress. - Yahoo! Photos Got holiday prints? See all the ways to get quality prints in your hands ASAP.
RE: Using Tomcat 5.5 as a standalone web server
There is quite an easy sollution. Run squid as you main webserver and as a web accelator in front of your tomcat. From the squid config you can decide what your want cached and what now. I don't understand why this is not done more often since its A) a very easy sollution B) does not loose any of the funtionality tomcat can offer you C) allow to fine grain the load of tomcat completely Only downsite, the squid cache in core memory gives of course the best performance so as much memory as possible will help. On the other hand. The HTML of much sites fits easily in 500MB core memory. Regards, Wouter -Original Message- From: Adam Johnston [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 10, 2006 3:43 PM To: users@tomcat.apache.org Subject: Using Tomcat 5.5 as a standalone web server Hello all, I am running a reasonable sized site, on Linux Red Hat + Tomcat 5.5.7. The site is serving mainly Flash movies and servlets with streaming video through a commercial codec, plus a full HTML version of the site. Currently, I have Tomcat 5.5.7 integrated with Apache 2.0.46, which was (very) difficult to set up, and now I am looking to rebuild my server into a better configuration, I want to simplify my admin by running Tomcat on its own to serve all content. My question is this : does anyone have experience of running a 500 000 - 1 000 000 page impressions / month site, including elements such as I mention above, on Tomcat alone? I want to avoid the web server integration if Tomcat is up to it, but I would love to hear if anyone else has been successful with Tomcat standalone before I do? Many thanks! Adam This email is intended only for the person or entity to which it is addressed and may contain information that is privileged, confidential or otherwise protected from disclosure. Dissemination, distribution or copying of this e-mail or the information herein by anyone other than the intended recipient, or an employee or agent responsible for delivering the message to the intended recipient, is prohibited. If you have received this e-mail in error, please immediately notify us by calling the Help Desk at +44 20 7675 9666 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Using Tomcat 5.5 as a standalone web server
### Wouter Boers [EMAIL PROTECTED] wrote message to 'Tomcat Users List' users@tomcat.apache.org ### ### this is reply for: RE: Using Tomcat 5.5 as a standalone web server ### There is quite an easy sollution. Run squid as you main webserver and as a web accelator in front of your tomcat. From the squid config you can decide what your want cached and what now. I don't understand why this is not done more often since its A) a very easy sollution B) does not loose any of the funtionality tomcat can offer you C) allow to fine grain the load of tomcat completely What about scalability? ;-) -- Rafał Zawadzki Deploy/Release Manager eo Networks Sp. z o.o. pgpDH7DZLcqHi.pgp Description: PGP signature
Re: Compiling Servlets - Tomcat 5.5
Lenandlar, What is happening when you compile? Can you include the output? Thanks, James On Jan 10, 2006, at 8:58 AM, Lenandlar Singh wrote: James Goodwill [EMAIL PROTECTED] wrote:Try adding /common/lib/ servlet-api.jar to your classpath. This is what i set as a classpath environment variable... variable -- classpath value -- C:\Tomcat 5.5\common\lib\servlet-api.jar Still no progress. - Yahoo! Photos Got holiday prints? See all the ways to get quality prints in your hands ASAP. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Compiling Servlets - Tomcat 5.5
It keeps saying javax.servlet api does not exist... Its not finding these packages... - Yahoo! Photos Ring in the New Year with Photo Calendars. Add photos, events, holidays, whatever.
RE: Compiling Servlets - Tomcat 5.5
I got it to compile just copied servlet-api.jar into the /ext directory of my java installation Tomcat wont start now for me to test this - Yahoo! Photos Got holiday prints? See all the ways to get quality prints in your hands ASAP.
Re: Apache + Tomcat, Tomcat only handles JSP in localhost
On Tuesday, 10 בJanuary 2006 14:31, Warren Pace wrote: The most important reason that I use an Apache frontend for tomcat, which is probably not relevant to the original poster, is that under Unix only root processes can open port 80 (the default HTTP port), and so if tomcat is configured to serve pages on port 80, it must run as root. You can use jsvc to run tomcat as a non-priviledged user on port 80. That is very interesting - I was not aware of that capability of jsvc. Currently neither of my production operating systems (Mandriva and RedHat) offer this as a package, but I'll check it out. -- Oded ::.. For every minute you are angry, you lose sixty seconds of happiness. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Reading Sessions from Persistent Store
I am attempting to use non-sticky sessions using a syncronous Persistent Manager and a JDBC Store. I have written a class SyncPersistentManager that extends PersistentManagerBase and implements HttpSessionAttributeListener to store the sessions in the JDBC store each time an attribute in the HttpSession is modified. Is there a simple extension point that I can use to get Tomcat to read the session from the store if HttpSession.getAttribute is called. I was hoping to be able to implement this functionality via some extension point rather than having to modify the StandardSession object as the Session object does not appear to be pluggable (unless I'm missing something). Anyone have any ideas? Thanks, Gary Blomquist Source for SyncPersistentManager public class SyncPersistentManager extends PersistentManagerBase implements HttpSessionAttributeListener { boolean registered = false; private static final String info = SyncPersistentManager/1.0; protected static String name = SyncPersistentManager; public SyncPersistentManager() { super(); } public String getInfo() { return info; } public String getName() { return name; } public void attributeAdded(HttpSessionBindingEvent event) { persistSession(event); } public void attributeRemoved(HttpSessionBindingEvent event) { persistSession(event); } public void attributeReplaced(HttpSessionBindingEvent event) { persistSession(event); } private void persistSession(HttpSessionBindingEvent event) { HttpSession httpSession = event.getSession(); try { StandardSession standardSession = (StandardSession)findSession(httpSession.getId()); this.writeSession(standardSession); } catch (IOException e) { System.out.println(SyncPersistentManager::error persisting session + e.getMessage()); } catch (Exception e) { System.out.println(SyncPersistentManager::error persisting session + e.getMessage()); } } protected synchronized void writeSession(Session session) throws IOException { if ( ! registered ) { register(); } super.writeSession(session); } private void register() { Context context = (Context)getContainer(); Object listeners[] = context.getApplicationEventListeners(); Object updatedListeners[] = new Object[listeners.length + 1]; for (int i=0; i(updatedListeners.length - 1); i++) { updatedListeners[i] = listeners[i]; } updatedListeners[updatedListeners.length -1] = this; context.setApplicationEventListeners(updatedListeners); registered = true; } }
Re: Reading Sessions from Persistent Store
I forgot to mention I would only reload the session from the store if it was dirty (based on last access time). From: Gary Blomquist Sent: Tuesday, January 10, 2006 2:14 PM To: 'users@tomcat.apache.org' Subject: Reading Sessions from Persistent Store I am attempting to use non-sticky sessions using a syncronous Persistent Manager and a JDBC Store. I have written a class SyncPersistentManager that extends PersistentManagerBase and implements HttpSessionAttributeListener to store the sessions in the JDBC store each time an attribute in the HttpSession is modified. Is there a simple extension point that I can use to get Tomcat to read the session from the store if HttpSession.getAttribute is called. I was hoping to be able to implement this functionality via some extension point rather than having to modify the StandardSession object as the Session object does not appear to be pluggable (unless I'm missing something). Anyone have any ideas? Thanks, Gary Blomquist Source for SyncPersistentManager public class SyncPersistentManager extends PersistentManagerBase implements HttpSessionAttributeListener { boolean registered = false; private static final String info = SyncPersistentManager/1.0; protected static String name = SyncPersistentManager; public SyncPersistentManager() { super(); } public String getInfo() { return info; } public String getName() { return name; } public void attributeAdded(HttpSessionBindingEvent event) { persistSession(event); } public void attributeRemoved(HttpSessionBindingEvent event) { persistSession(event); } public void attributeReplaced(HttpSessionBindingEvent event) { persistSession(event); } private void persistSession(HttpSessionBindingEvent event) { HttpSession httpSession = event.getSession(); try { StandardSession standardSession = (StandardSession)findSession(httpSession.getId()); this.writeSession(standardSession); } catch (IOException e) { System.out.println(SyncPersistentManager::error persisting session + e.getMessage()); } catch (Exception e) { System.out.println(SyncPersistentManager::error persisting session + e.getMessage()); } } protected synchronized void writeSession(Session session) throws IOException { if ( ! registered ) { register(); } super.writeSession(session); } private void register() { Context context = (Context)getContainer(); Object listeners[] = context.getApplicationEventListeners(); Object updatedListeners[] = new Object[listeners.length + 1]; for (int i=0; i(updatedListeners.length - 1); i++) { updatedListeners[i] = listeners[i]; } updatedListeners[updatedListeners.length -1] = this; context.setApplicationEventListeners(updatedListeners); registered = true; } }
Help with wmv MIME definitions in Tomcat 5.0
Hello, I am unable to get Tomcat 5.0 to properly serve up Windows Media (wmv) files. Despite adding the following to my web.xml file, mime-mapping extensionwmv/extension mime-typevideo/x-ms-wmv/mime-type /mime-mapping whenever I attempt to open wmv, I get pages and pages of: 0²uŽfϦ٪bÎlv ¡Ü«ŒG(c)ÏŽäÀ [EMAIL PROTECTED] ¤¤¢ µ¿_.(c)ÏŽãÀ SeaÒÓ«º(c)ÏŽæÀ Se3(c)FC|àïüK²)9ÞA\…' en-us]‹ñ„EìGŸ_eRÉêËøů[wH„gªŒDúLÊb IsVBR4DeviceConformanceTemplateL2 IsVBR4 Needless to say, this is not the desired result. I'm fairly confident that this is some kind of MIME misconfiguration, but am at a loss to find anything to rectify the solution. Can anyone shed some light on this? Thanks, -mw
Help with wmv MIME definitions in Tomcat 5.0?
Hello, I am unable to get Tomcat 5.0 to properly serve up Windows Media (wmv) files. Despite adding the following to my web.xml file, mime-mapping extensionwmv/extension mime-typevideo/x-ms-wmv/mime-type /mime-mapping whenever I attempt to open wmv, I get pages and pages of text. Needless to say, this is not the desired result. I'm fairly confident that this is some kind of MIME misconfiguration, but am at a loss to find anything to rectify the solution. Can anyone shed some light on this? Thanks, -mw
Can't play wmv
Hello, I am unable to get Tomcat 5.0 to properly serve up Windows Media (wmv) files. Despite adding the video/x-ms-wmv to my web.xml file, whenever I attempt to open wmv, I get pages and pages of text. Needless to say, this is not the desired result. I'm fairly confident that this is some kind of MIME misconfiguration, but am at a loss to find anything to rectify the solution. Can anyone shed some light on this? Thanks, -mw **
RE: JDBC Session Persistence in a cluster problem/question
I am looking into this as well. It appears that you must use sticky sessions with the Persistent Manager/JDBC store to get failover to work. However, it also appears that due to the asyncronous persisting of the sessions, you might still lose some session data. I have written a manager that will store sessions syncronously. However, I haven't yet figured out how to develop functionality to read the sessions in if they are dirty based on last access time. I am attempting to develop this by extending rather than modifying Tomcat. (I have made a couple of related posts.) Gary Blomquist -Original Message- From: Paul Smith [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 10, 2006 1:45 AM To: users@tomcat.apache.org Subject: JDBC Session Persistence in a cluster problem/question From: [EMAIL PROTECTED] Subject:JDBC Session persistence in a cluster problem/question Date: 10 January 2006 5:42:51 PM To: [EMAIL PROTECTED] [For context, Tomcat 5.5.12] Hello all, I'm having a bit of trouble understanding exactly what the capabilities are of the whole PersistenceManager and how it saves session data. here's what I we have configured in server.xml: Host name=localhost appBase=foo Context path=/ docBase=${catalina.home}/app/mel/ Manager className=org.apache.catalina.session.PersistentManager Store className=org.apache.catalina.session.JDBCStore connectionURL=jdbc:inetdae7:tower.aconex.com? database=paulamp;user=sqlamp;password=sql driverName=com.inet.tds.TdsDriver sessionIdCol=session_id sessionValidCol=valid_session sessionMaxInactiveCol=max_inactive sessionLastAccessedCol=last_access sessionTable =tomcat_sessions sessionAppCol = app_name sessionDataCol = session_data / /Manager /Context /Host Sessions are persisting, as we can see the new rows being added to the DB. Fine, great. However in our test cluster environment we have noticed that session variables (strings, Integers) are being lost during the failover to the other node in the cluster. From looking at the Javadoc of the PersistentManager and other related info on the net, I can't see anywhere where it indicates that the Session is persisted to the DB when the session is updated/modified/addedto. It seems to only have settings that set how long to wait before saving to the persistence store. 1). Am I correct in my understanding so far? 2) . If so, is this design because of the likely performance impact of all these session changes, and the somewhat unlikely case of the server going down in the first place. 3). do I have any options here? We really do need a pretty seamless failover with session information being kept in sync as it failsover to the other node in the cluster. cheers, Paul Smith - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Can't play wmv
Hello, I am unable to properly serve up wmv files. Despite adding the video/x-ms-wmv to my web.xml file, whenever I attempt to open wmv, I get pages and pages of text. Needless to say, this is not the desired result. I'm fairly confident that this is some kind of MIME misconfiguration, but am at a loss to find anything to rectify the solution. Can anyone shed some light on this? Thanks, -mw **
no luck with wmv
Hello, I am unable to properly serve up wmv files. Despite adding the video/x-ms-wmv to my web.xml file, whenever I attempt to open wmv, I get pages and pages of text. Needless to say, this is not the desired result. I'm fairly confident that this is some kind of MIME misconfiguration, but am at a loss to find anything to rectify the solution. Can anyone shed some light on this? Thanks, -mw
FW: JDBC Session Persistence in a cluster problem/question
If you used the syncronous persistent manager I posted with sticky sessions I think you would not lose data on failover. However, I just developed it and have barely tested it at all. I was hoping for some feedback from the list. Gary -Original Message- From: Gary Blomquist [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 10, 2006 3:08 PM To: Tomcat Users List Subject: RE: JDBC Session Persistence in a cluster problem/question I am looking into this as well. It appears that you must use sticky sessions with the Persistent Manager/JDBC store to get failover to work. However, it also appears that due to the asyncronous persisting of the sessions, you might still lose some session data. I have written a manager that will store sessions syncronously. However, I haven't yet figured out how to develop functionality to read the sessions in if they are dirty based on last access time. I am attempting to develop this by extending rather than modifying Tomcat. (I have made a couple of related posts.) Gary Blomquist -Original Message- From: Paul Smith [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 10, 2006 1:45 AM To: users@tomcat.apache.org Subject: JDBC Session Persistence in a cluster problem/question From: [EMAIL PROTECTED] Subject:JDBC Session persistence in a cluster problem/question Date: 10 January 2006 5:42:51 PM To: [EMAIL PROTECTED] [For context, Tomcat 5.5.12] Hello all, I'm having a bit of trouble understanding exactly what the capabilities are of the whole PersistenceManager and how it saves session data. here's what I we have configured in server.xml: Host name=localhost appBase=foo Context path=/ docBase=${catalina.home}/app/mel/ Manager className=org.apache.catalina.session.PersistentManager Store className=org.apache.catalina.session.JDBCStore connectionURL=jdbc:inetdae7:tower.aconex.com? database=paulamp;user=sqlamp;password=sql driverName=com.inet.tds.TdsDriver sessionIdCol=session_id sessionValidCol=valid_session sessionMaxInactiveCol=max_inactive sessionLastAccessedCol=last_access sessionTable =tomcat_sessions sessionAppCol = app_name sessionDataCol = session_data / /Manager /Context /Host Sessions are persisting, as we can see the new rows being added to the DB. Fine, great. However in our test cluster environment we have noticed that session variables (strings, Integers) are being lost during the failover to the other node in the cluster. From looking at the Javadoc of the PersistentManager and other related info on the net, I can't see anywhere where it indicates that the Session is persisted to the DB when the session is updated/modified/addedto. It seems to only have settings that set how long to wait before saving to the persistence store. 1). Am I correct in my understanding so far? 2) . If so, is this design because of the likely performance impact of all these session changes, and the somewhat unlikely case of the server going down in the first place. 3). do I have any options here? We really do need a pretty seamless failover with session information being kept in sync as it failsover to the other node in the cluster. cheers, Paul Smith - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
help with wmv
Hello, I am unable to properly serve up wmv files. Despite adding the video/x-ms-wmv to my web.xml file, whenever I attempt to open wmv, I get pages and pages of text. Needless to say, this is not the desired result. I'm fairly confident that this is some kind of MIME misconfiguration, but am at a loss to find anything to rectify the solution. Can anyone shed some light on this? Thanks, -mw
mod_jk 1.2.15 makes Firefox crash
Hello all. I've got a strange behaviour with mod_jk 1.2.15 (compiled from source on a sarge system with Apache 2.0 prefork). I've got an ajax application ( http://llfr.info/tribune/ ) and the upgrade to mod_jk on my server make my firefox crash when I access to this page. It's working fine with mod_jk 1.2.6. I'd like to gather information, but I don't really what. Do someone have any advise? Another problem: I can't have the jkstatus worker working (I've always got an 500 error, and nothing in the log). I've set in one of the virtual host: JkMount /jkmanager/* jkstatus JkMount /jkmanager jkstatus Finally, the last: mod_jk 1.2.15 can't write to the specified log file. Do anything prevent the module to write in an existant file? Apache/2.0.54 (Debian GNU/Linux) DAV/2 SVN/1.1.4 mod_jk/1.2.15 PHP/4.3.10-16 Tomcat 5.5.12 workers.properties =: # workers.properties - # The workers that your plugins should create and work with # # Add 'inprocess' if you want JNI connector worker.list=node1 worker.list=status # , inprocess # #-- DEFAULT ajp13 WORKER DEFINITION -- #- # # # Defining a worker named ajp13 and of type ajp13 # Note that the name and the type do not have to match. # worker.node1.port=8009 worker.node1.host=localhost worker.node1.type=ajp13 worker.jkstatus.type=status === jk.conf == JkWorkersFile /etc/apache2/workers.properties JkLogFile /var/log/apache2/mod_jk.log JkLogLevelerror #JkShmFile /var/run/apache2/shm Best regards. Aurélien - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Java WSDP and Tomcat
Hello all, Is anyone aware of what tomcat builds have JWSDP packages with the tomcat instance? I have been told that some releases come with JWSDP, whereas others do not. Is there any particular reason for this? Thanks for your time. Best Regards, Khawaja Shams
Re: problem calling request.getParameter(myparameter) in jsp
I see %! String query = request.getParameter(display) ; % is declared in the init() of the servlet.I changed it but now I`m getting org.apache.jasper.JasperException java.lang.NullPointerException which should not execute the query Can anyone throw licht on this Thanks marju jalloh [EMAIL PROTECTED] wrote: Hi everyone I `m writing a bean application to execute sql query.The query properties in the Bean works perfect.I have a jsp with textArea where the user can enter query.The query is the required parameter that the Bean should execute. snippet ... [input] %! String query = request.getParameter(display) ; % % if(!query.equals() || !query.equals(null)) { String selector = (query.substring(0,6)).trim(); out.write(selector); if(selector.equals(SELECT)){ out.write(myBean.getData()); }else if(selector.equals(INSERT)){ myBean.setData(query) ; }else if(selector.equals(DELETE)){ myBean.setDelete(query); } else out.write(nothing is entered); } % ... My problem is when the jsp page is requested for the first time I got this error: cannot find symbol variable request. I know I should have null for request.getParameter(display) at first access and that is caugt.If I submit the form then the content of the textarea should be request.getParameter(display) .That was what I was expecting. Can anyone help Thanks in advance - Yahoo! Photos Got holiday prints? See all the ways to get quality prints in your hands ASAP. __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
Re: problem calling request.getParameter(myparameter) in jsp
I got it. HttpRequest throws an exception by enclosing String query = request.getParameter(display) in a try and catch block everything was fine marju jalloh [EMAIL PROTECTED] wrote: I see %! String query = request.getParameter(display) ; % is declared in the init() of the servlet.I changed it but now I`m getting org.apache.jasper.JasperException java.lang.NullPointerException which should not execute the query Can anyone throw licht on this Thanks marju jalloh wrote: Hi everyone I `m writing a bean application to execute sql query.The query properties in the Bean works perfect.I have a jsp with textArea where the user can enter query.The query is the required parameter that the Bean should execute. snippet ... [input] %! String query = request.getParameter(display) ; % % if(!query.equals() || !query.equals(null)) { String selector = (query.substring(0,6)).trim(); out.write(selector); if(selector.equals(SELECT)){ out.write(myBean.getData()); }else if(selector.equals(INSERT)){ myBean.setData(query) ; }else if(selector.equals(DELETE)){ myBean.setDelete(query); } else out.write(nothing is entered); } % ... My problem is when the jsp page is requested for the first time I got this error: cannot find symbol variable request. I know I should have null for request.getParameter(display) at first access and that is caugt.If I submit the form then the content of the textarea should be request.getParameter(display) .That was what I was expecting. Can anyone help Thanks in advance - Yahoo! Photos Got holiday prints? See all the ways to get quality prints in your hands ASAP. __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - Yahoo! Photos Got holiday prints? See all the ways to get quality prints in your hands ASAP.
Re: Form based login with UTF8 and Tomcat
Joacim Turesson wrote: I have trouble with UTF-8 and form based login with Tomcat 5.5.12 together with Apache 2.0.55 using mod_jk 1.2.15. See the last section of http://tomcat.apache.org/tomcat-5.5-doc/config/valve.html I have a struts based application that works fine with UTF-8, but the form based login using jdbc realm don’t work with åäö. I added URIEncoding=UTF-8 the connectors in server.xml, and the application has a filter matching “/” (in web.xml) that encodes to UTF-8 as described in http://www.javaworld.com/javaworld/jw-05-2004/jw-0524-i18n_p.html Mark - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Problem with pdf in tomcat 4.1.29
I have a jsp page that grabs a pdf from a blob in a database and sends it to the browser inline. It works fine for firefox and most ie users but for some it displays it in a separate window or doesn't display at all. I am using tomcat 4.1.29 with jk going through iis 5. Here are the headers: Headers for 'http://www.practical.com.au/web/downloadFile.jsp?vfkey=104' HTTP/1.1 200 OK Server: Microsoft-IIS/5.0 Date: Tue, 10 Jan 2006 23:33:51 GMT X-Powered-By: ASP.NET Set-Cookie: JSESSIONID=5DA445035BFEFFB189E828434381EB24; Path=/web Pragma: public Cache-Control: max-age=0 Content-Disposition: inline;filename=See Map.pdf Accept-Ranges: none Content-Type: application/pdf;charset=ISO-8859-1 Content-Length: 543974 Does anyone have any idea what I am doing wrong? Is there something wrong with the headers? Would upgrading tomcat have a good chance of fixing the problem? I can send the jsp source if that would help? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
problem of setting up ssl in tomcat 5.5.9
Hello everyone, I want to configure the SSL in tomcat5 and I followed the following instructions: http://tomcat.apache.org/tomcat-5.0-doc/printer/ssl-howto.html However, after starting the tomcat without any problem. [EMAIL PROTECTED] bin]$ ps aux | grep java globus4 2668 2.2 6.2 296704 64436 pts/1 S 17:07 0:11 /opt/jdk1.5.0_04//bin/java -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.endorsed.dirs=/home/globus4/jakarta-tomcat-5.5.9/common/endorsed -classpath :/home/globus4/jakarta-tomcat-5.5.9/bin/bootstrap.jar:/home/globus4/jakarta-tomca globus4 3137 0.0 0.0 3580 636 pts/1S 17:15 0:00 grep java However, I could access with https://localhost:8443. I am using jdk1.5.0_04. The only step I skipped is JSSE. Do you have any ideas? Thanks, --Paul __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Re: Apache + Tomcat, Tomcat only handles JSP in localhost
From: Oded Arbel [EMAIL PROTECTED] Date: 2006/01/10 Tue PM 12:46:14 EST To: users@tomcat.apache.org CC: Warren Pace [EMAIL PROTECTED] Subject: Re: Apache + Tomcat, Tomcat only handles JSP in localhost On Tuesday, 10 ?January 2006 14:31, Warren Pace wrote: The most important reason that I use an Apache frontend for tomcat, which is probably not relevant to the original poster, is that under Unix only root processes can open port 80 (the default HTTP port), and so if tomcat is configured to serve pages on port 80, it must run as root. You can use jsvc to run tomcat as a non-priviledged user on port 80. That is very interesting - I was not aware of that capability of jsvc. Currently neither of my production operating systems (Mandriva and RedHat) offer this as a package, but I'll check it out. I'm running it on OpenSuSE and have previously run it on Debian and Fedora Core 4. None of these distributions offer jsvc as a package either. The source code for jsvc is included with the tomcat binaries in the bin directory. You have to gunzip the file jsvc.tar.gz which will create the subdirectries containing the source you'll need to compile. You'll then need to compile jsvc and write your own init.d script. You'll also need to edit server.xml and change the connector port from 8080 to 80. I'll send you a copy of my init script you can used as a template if you'd like but basically it's just /etc/skeleton altered to launc jsvc. -- Oded ::.. For every minute you are angry, you lose sixty seconds of happiness. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Re: Apache + Tomcat, Tomcat only handles JSP in localhost
Don't forget the alternate trick of port(s) redirection. For some it is simpler. I use jsvc on TAO Linux, a RedHat clone. Doug - Original Message - From: Warren Pace [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Tuesday, January 10, 2006 9:50 PM Subject: Re: Re: Apache + Tomcat, Tomcat only handles JSP in localhost From: Oded Arbel [EMAIL PROTECTED] Date: 2006/01/10 Tue PM 12:46:14 EST To: users@tomcat.apache.org CC: Warren Pace [EMAIL PROTECTED] Subject: Re: Apache + Tomcat, Tomcat only handles JSP in localhost On Tuesday, 10 ?January 2006 14:31, Warren Pace wrote: The most important reason that I use an Apache frontend for tomcat, which is probably not relevant to the original poster, is that under Unix only root processes can open port 80 (the default HTTP port), and so if tomcat is configured to serve pages on port 80, it must run as root. You can use jsvc to run tomcat as a non-priviledged user on port 80. That is very interesting - I was not aware of that capability of jsvc. Currently neither of my production operating systems (Mandriva and RedHat) offer this as a package, but I'll check it out. I'm running it on OpenSuSE and have previously run it on Debian and Fedora Core 4. None of these distributions offer jsvc as a package either. The source code for jsvc is included with the tomcat binaries in the bin directory. You have to gunzip the file jsvc.tar.gz which will create the subdirectries containing the source you'll need to compile. You'll then need to compile jsvc and write your own init.d script. You'll also need to edit server.xml and change the connector port from 8080 to 80. I'll send you a copy of my init script you can used as a template if you'd like but basically it's just /etc/skeleton altered to launc jsvc. -- Oded ::.. For every minute you are angry, you lose sixty seconds of happiness. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Help - org.apache.jasper.JasperException: Unable to initialize TldLocationsCache: null
Try it without the taglib.../taglib in web.xml. Tomcat (and any other JSP-2.0 container) will pick up a .tld in /META-INF of a jar file in WEB-INF/lib automagically. Unfortunately, Jasper is hiding the root cause of the Exception that is being thrown, so I can't see why it's unhappy :(. If the above doesn't fix anything, check the file permissions under WEB-INF (e.g. the user Tomcat is running as can read and list all directories). Justin Moore [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi, I am using tomcat version 5.5.12 and am getting the following exception and cannot find a way around the issue. Google isn't offering much. I have also included my web.xml below. One site on google mentioned that taglib declarations should no longer use the !DOCTYPE .. command. I also have included my taglib definition. I have been struggling with this for a couple of days, and now need to resort to the experts, so you help is greatly appreciated. Thanks, Justin == The exception: == org.apache.jasper.JasperException: Unable to initialize TldLocationsCache: null org.apache.jasper.compiler.TldLocationsCache.init(TldLocationsCache.java :252) org.apache.jasper.compiler.TldLocationsCache.getLocation(TldLocationsCac he.java:223) org.apache.jasper.JspCompilationContext.getTldLocation(JspCompilationCon text.java:526) org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:422) org.apache.jasper.compiler.Parser.parseDirective(Parser.java:492) org.apache.jasper.compiler.Parser.parseElements(Parser.java:1552) org.apache.jasper.compiler.Parser.parse(Parser.java:126) org.apache.jasper.compiler.ParserController.doParse(ParserController.jav a:211) org.apache.jasper.compiler.ParserController.parse(ParserController.java: 100) org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:146) org.apache.jasper.compiler.Compiler.compile(Compiler.java:286) org.apache.jasper.compiler.Compiler.compile(Compiler.java:267) org.apache.jasper.compiler.Compiler.compile(Compiler.java:255) org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.ja va:563) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.ja va:293) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) == The Web.xml == ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd; web-app display-nameWorkbenchFileManager/display-name description Receives file upload/download requests for the Workbench web application. The idea is that the Workbench will cause any file posts or gets to go through this application, so that this application can potentially reside on a separate, more secure server. Upon completion of file uploads, this application will post-back the results to a specified URL on the Workbench site. This will return the user to the workflow of that application, keeping this application as simple as possible. /description !-- Tell the application what its name is. -- context-param param-nameappname/param-name param-valueWorkbenchFileManager/param-value /context-param !-- * LISTENERS * These are called on application start in the order they appear. They are called again on application stop in reverse of the order in which they appear. -- !-- Controls the SystemLog -- listener listener-classcom.cbase.web.product.workbench.SystemLogLifecycleManage r/listener-class /listener !-- Controls the Performance Log -- listener listener-classcom.cbase.web.product.workbench.PerformanceLogLifecycleM anager/listener-class /listener !-- Controls the ApplicationController -- listener listener-classcom.cbase.web.product.workbench.ApplicationControllerLif ecycleManager/listener-class /listener !-- Error Page Mappings -- error-page error-code404/error-code location/systemunavailabledisplay.jsp/location /error-page taglib taglib-urihttp://ecount.com/tags/framework/taglib-uri taglib-location/WEB-INF/lib/ClientFrameworkTags.jar/taglib-location /taglib /web-app == The TagLib.tld == ?xml version=1.0 encoding=ISO-8859-1? taglib xmlns=http://java.sun.com/xml/ns/j2ee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_ 0.xsd version=2.0 tlib-version1.0/tlib-version jsp-version1.2/jsp-version short-nametables/short-name
Re: Compiling Servlets - Tomcat 5.5
Lenandlar, I do not understand why you had to move the servlet-api.jar. Can you echo your $CLASSPATH and your $TOMCAT_HOME? Did you get Tomcat started? Thanks, James On Jan 10, 2006, at 10:32 AM, Lenandlar Singh wrote: I got it to compile just copied servlet-api.jar into the /ext directory of my java installation Tomcat wont start now for me to test this - Yahoo! Photos Got holiday prints? See all the ways to get quality prints in your hands ASAP. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: Question regarding tomcat class path handling
3. You might even wish to see if you could copy classes into the classes folder while Tomcat is running. That way the web apps would get reloaded. You'd need to configure Tomcat to recognize the Web apps to be reloadable, of course. Or you might use an ant build-file which first stops the application, then copies/updates the classes/jars and then starts the webapp again (see http://tomcat.apache.org/tomcat-5.0-doc/manager-howto.html#Executing%20M anager%20Commands%20With%20Ant). Bjoern - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]