Did I find a bug?
Hi, I am having a strange JSP compiler problem. The error message is as follows. First, notice that the lines cocerned are commented out! Still compiler compiling! Second, the second argument of the caller is missing in the error message! ??? === org.apache.jasper.JasperException: Unable to compile class for JSP: An error occurred at line: 70 in the jsp file: /jsp/pdfexample1.jsp The method addCell(Object, Table, int, int, int, int) in the type iTex is not applicable for the arguments (Image, int, int, int, int) 67: 68: 69: 70: // cell = iTex.addCell(Image.getInstance(data), 71: // datatable, iTex.ALIGN_CENTER, iTex.ALIGN_TOP, 2, 1); 72: 73: Stacktrace: org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:85) org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330) org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:415) org.apache.jasper.compiler.Compiler.compile(Compiler.java:308) org.apache.jasper.compiler.Compiler.compile(Compiler.java:286) org.apache.jasper.compiler.Compiler.compile(Compiler.java:273) org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:566) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:308) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) servlets.rme.jspreport.doGet(jspreport.java:23) javax.servlet.http.HttpServlet.service(HttpServlet.java:690) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) -- View this message in context: http://www.nabble.com/Did-I-find-a-bug--tp15113261p15113261.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: find out the possible bottleneck webapp
Hi, What do you mean by SOMETIMES? Is it recurring problem at certain intervals? If it's early-on, it's more likely caused by first time compiling. If it occurs at certain intervals and you use large heap memory, its likely for garbage collection. You can find out the heap memory size allocated and using with Runtime APIS. Regards. Regards. -- View this message in context: http://www.nabble.com/find-out-the-possible-bottleneck-webapp-tp15065234p15114035.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: find out the possible bottleneck webapp
maggie-41 wrote: But sometimes the response time of Tomcat is very long. At that time, the CPU usage is very high. First of all, some of your application is causing this, you should be guess which ones can cause. Otherwise, it could be followings; 1. Garbage collectors kicked in. 2. Compiling: both source and JIT. If you don't have enough main memory, this will accomany with excessive I/O as well as high CPU usage intemittantly mixed. Then you will have very long resonse time. If not, it could be your application. Regards. -- View this message in context: http://www.nabble.com/find-out-the-possible-bottleneck-webapp-tp15065234p15075430.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: ssl.SessionId Cache keeps growing
There are alternative designs than using sessions! If the problem is that serious, you might consider other options. Regards. Yuval Perlov wrote: On a side note, I'd like to argue that if you have users logging in, you can't help having some kind of object on the server side telling you which user is actually sending the request. -- View this message in context: http://www.nabble.com/ssl.SessionId-Cache-keeps-growing-tp14999824p15014379.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: ssl.SessionId Cache keeps growing
IMHO, there isn't much you can do about once you use sessions. The problem with session is that there is no natural way telling that session is ended and can be discarded! So system may have to keep session objects for long. For this reason, I always avoid to use sessions. If this is a major problem for you, alternative techniques might be worth trying! Regards. -- View this message in context: http://www.nabble.com/ssl.SessionId-Cache-keeps-growing-tp14999824p15010907.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Custom initialization after startup
Christopher Schultz-2 wrote: This is a self-defeating technique: your threads are not guaranteed to complete your database configuration before any requests are serviced. Nop! The embedded DMBS is not designed such crappy way. That's why we need to use specially developed embedded DBMSs! It creates a server socket that will delay all incoming requests until others are ready! Christopher Schultz-2 wrote: By definition, Tomcat will call this method exactly once before a web application is destroyed, and requests are guaranteed not to follow this call. | Note that ServletContextEvent does not provide such information! What information? I need to know whether Tomcat server shutdown is destroying or whether it is destroyed by administrators. I have to say detecting server shutdown may be difficult. -- View this message in context: http://www.nabble.com/Custom-initialization-after-startup-tp14937407p14965130.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: PDF problem on IE from JSP
It's just plain HTTP! Pid-2 wrote: Jonadan wrote: BTW, is this problem is specific to Tomcat ONLY? Or also occurs in other servers such as JBoss, and so on? Are you delivering your PDF over an HTTPS connection? -- View this message in context: http://www.nabble.com/PDF-problem-on-IE-from-JSP-tp14879788p14957804.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Ordered loading of WAR files
If you deploy apps as deflated, shouldn't that solve your problem? I mean insstead of war files, just copy directoried as UNZIPPED. Regards. Fu-Tung Cheng wrote: Hi, I have two war files. One is an authentication war and the other is setup to use the authentication war via the servlet context.xml mechanism. On windows my issues appears to be that the context.xml from the auth.war is being cached inside tc/conf/Catalina/localhost/... and that on the 2nd startup it tries to test the connection before the war that is the connection has loaded. I've solved this temporarily by deleting this directory before startup. Does anyone know of a better way to do this? I am using tomcat 6014. Thanks, Fu-Tung Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ -- View this message in context: http://www.nabble.com/Ordered-loading-of-WAR-files-tp14937881p14957811.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: PDF problem on IE from JSP
PS; Dynamic generation of PDF files involves more than I thought. I noticed that iText may not generate the same byte strings for the same code. This is from iText manuals. In addition, database contents may change. So there is no way I can deliver the same byte stream in case IE reissues partial requests. Given this type of problems, the following header should be a reasonable compromise that works; response.setContentType(application/pdf;charset=UTF-8); response.setHeader(Content-Disposition, inline;filename=\Document.pdf\); // response.setHeader(Content-Disposition, attachment;filename=\Document.pdf\); response.setContentLength(baos.size()); response.setHeader(Cache-Control, cache); // to make IE work! response.setHeader(Pragma, cache); // to make IE work! response.setDateHeader(Expires, 1); Note that browser will cache for the first time. But will abandon next time for fresh copy! At least current my testing worked. Regards. -- View this message in context: http://www.nabble.com/PDF-problem-on-IE-from-JSP-tp14879788p14967238.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How can I speed up and reduce load of initialization
How big is your main memory? Compiling (both source JIT) consumes lots of memory. If your main memory is small, it can take a lot of initialization time! Gavan Hood wrote: My web app is very simple, two servlets already installed so no war file. Once it finally gets going it is very responsive, the initialization just takes forever... -- View this message in context: http://www.nabble.com/How-can-I-speed-up-and-reduce-load-of-initialization-tp14857523p14914576.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How can I speed up and reduce load of initialization
Normally compilers are the memory hogs! A few things you can do is that; 1. If you use JSP, convert to servlets to avoid initialization phase compiling. 2. If your JDk is JIT (Just in time) compiler enable, disable it. You may have a bit slow execution. But should have satisfactory speed. 3. Increase memory size! I use 512MB and dual CPU. Still initialization taking significant time! Gavan Hood wrote: I agree it will take time, i have 64MB of ram. ... I notice that on running it is causing a lot of swapping to occur, my swapping process is using a lot of time. -- View this message in context: http://www.nabble.com/How-can-I-speed-up-and-reduce-load-of-initialization-tp14857523p14934889.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: PDF problem on IE from JSP
My output MIME is ALWAYS PDF! If I save the generated PDF into normal directory and access is OK. It may be one of these; 1. IE security system may be blocking certain patterns developed by previous errors. 2. Tomcat is not handling requests well. Regards. -- View this message in context: http://www.nabble.com/PDF-problem-on-IE-from-JSP-tp14879788p14935186.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Custom initialization after startup
Is there any way I can perform custom initialization IMMEDIATELY after Tomcat startup automatically? -- View this message in context: http://www.nabble.com/Custom-initialization-after-startup-tp14937407p14937407.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: PDF problem on IE from JSP
Thanks! After changing no-cache to cache, it worked! But I am not sure whether this may deliver the same documents when diiferent documents are generated. The another problem was that inline didn't work for JSP urls, say, .../mydoc.jsp. So I have to use a servlet taking JSP as parameters and use RequestDispatcher. It works properly now. Regards. MrKimi wrote: The critical part of my solution (which I got from someone else's post) is the setting of the cache stuff. -- View this message in context: http://www.nabble.com/PDF-problem-on-IE-from-JSP-tp14879788p14936162.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Custom initialization after startup
I need to start database before any servlet gets first request. So immediately after server start, initialize embedded database and make it ready for incomming first requests, of course, in a separate thread. The same goes not termination time. I need to have control passed immediately after all working servelts destroyed so that I can terminate database system NORMALLY! Currently it dies suddenly with Tomcat and every new starts starts with emergency recovery! Smooth normal shutdown is preferred. Regards. Caldarale, Charles R wrote: From: Jonadan [mailto:[EMAIL PROTECTED] Subject: Custom initialization after startup Is there any way I can perform custom initialization IMMEDIATELY after Tomcat startup automatically? Depends on what you mean by IMMEDIATELY. You'll at least need to insure that the Host attribute deployOnStartup is true (it is by default), and that you implement a ServletContextListener for each webapp of interest. Read section 10 of the servlet spec for details of the latter. -- View this message in context: http://www.nabble.com/Custom-initialization-after-startup-tp14937407p14947102.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Custom initialization after startup
PS: Yes, it can be done with ServletContextListener since we can check whether it is alive or not. However we may not sure whether it is system shutdown or app. shutdown. This is quite tricky. DBMS can use huge heap resources up to over 500GB on larger systems. This can be a problem without knowing the entire server is going down! Regards. -- View this message in context: http://www.nabble.com/Custom-initialization-after-startup-tp14937407p14947980.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: PDF problem on IE from JSP
BTW, is this problem is specific to Tomcat ONLY? Or also occurs in other servers such as JBoss, and so on? -- View this message in context: http://www.nabble.com/PDF-problem-on-IE-from-JSP-tp14879788p14947983.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
PDF problem on IF from JSP
Hi, I am generating PDF documents from JSP directly to output stream. However when I try it from IE, it does not work properly. Sometime nothing happens. Sometimes, show data corruption error. Sometimes connection error, etc. I suspect it may be something to do with partial content reading from IE and Tomcat does not support or my JSP does not take care, etc. Anyone had the same problems before? Jonadan. -- View this message in context: http://www.nabble.com/PDF-problem-on-IF-from-JSP-tp14879788p14879788.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: PDF problem on IE from JSP
Pitre, Russell wrote: response.setContentLength(baos.size()); Hi, I added the size information as follows; response.setContentType(application/pdf;charset=UTF-8); // response.setHeader(Content-Disposition, inline;filename=\Document.pdf\); response.setHeader(Content-Disposition, attachment;filename=\Document.pdf\); response.setContentLength(baos.size()); response.setHeader(Cache-Control,no-cache); response.setHeader(Pragma,no-cache); response.setDateHeader(Expires, 0); ServletOutputStream outstream = response.getOutputStream(); baos.writeTo(outstream); // outstream.flush(); If I change the disposition to inline, nothing changes in the browser. With the attachement, I get this error message dialog; == Internet Explore cannot download pdf example.jsp from localhost. Internet Explore was not able to open this Internet site. The requested site is unavailable or cannot be found. Please try again later. == I suspect that Tomcat is not handling partial content request properly. IE tends to read PDF page by page as we read pages. Regards. -- View this message in context: http://www.nabble.com/PDF-problem-on-IE-from-JSP-tp14879788p14896465.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: PDF problem on IE from JSP
Or IE does not like content or does not expect as valid connection. -- View this message in context: http://www.nabble.com/PDF-problem-on-IE-from-JSP-tp14879788p14899461.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How can I preserve a directory on Deployment?
Option 1: Deploy as unpacked. Simple and I use! Option 2: If you deploy as war files, you may be able to read files inside wars using classloader resource stream readers. Greg Kontos wrote: When I redeploy my .war file I want this upload directory to remain unchanged. Is there a way for me to tell Tomcat to leave this directory unchanged when the .war file is unpacked? -- View this message in context: http://www.nabble.com/How-can-I-preserve-a-directory-on-Deployment--tp14845804p14909597.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]