Foolish Java / Tomcat question
asbestos underwear So I get the concept of the garbage collector.. at least in principal.. but what happens to all the memory that gets allocated for a tomcat session (by a single login) when that session closes or is timed out? is *everything* from that session decremented so it can be cleaned up? do I need to be checking for this? what about session beans and variables stored therein? /asbestos underwear thanks. let the scorching begin.
building a server to maximize tomcat
Im shopping about for a good server to run tomcat on. Im having a problem with my existing 700Mhz PIII in that it tends to bog down on longer processes. I bought it on EBay as a test machine and well.. its been ok to this point. It has 500 Mb RAM. Im running Tomcat and mySQL on it and it isn't performing too well lately. In any event - suggestions on a good machine? When I buy servers I generally buy Dell as they are easy to work on, parts are available,etc. I'd be game to try something more 'boutique' if the price was competitive. Any boxes I should steer clear of or take a second look at?
Wrong page appearing - problem with WEB.XML?
I enter a URL (EG http://server:8080/someServlet?param=value) but instead of getting the servlet I get the 'default' or 'welcome' page from the same site. The servlet in question doesn't have anything to do with the page that is appearing. The servlet does work - why wouldn't it appear when called? (sounds like my dog)
RE: Image download?
Can you be more specific as to whats (not) happening? Are you getting anything? How are you calling it? -Original Message- From: Josh G [mailto:[EMAIL PROTECTED] Sent: Monday, February 09, 2004 3:59 PM To: [EMAIL PROTECTED] Subject: Image download? Hi, I have a servlet that's trying to send image files instead of a html response that doesn't seem to be working. Here's the code in question: //Set content-type ServletContext context = getServletContext(); response.setContentType(context.getMimeType(media.getLocation())); //Open file try { FileReader in = new FileReader(new File(media.getLocation())); char[] buffer = new char[4096]; int rc; PrintWriter out = response.getWriter(); //dump contents for (rc=in.read(buffer,0,buffer.length);rc0;rc=in.read(buffer,0,buffer.leng th)) out.write(buffer,0,rc); //Close file, and finish. in.close(); return; } catch (IOException e) { Logger.debug(this,IOException on media read/dump :(); e.printStackTrace(); return; } Anybody out there know where I'm going wrong? Is it some sort of text-binary thing in the java.io functions I didn't take into account? Any help much appreciated! Cheers, -Josh He likes to run, And then the thing with the.. person.. ... Oh boy, that monkey is going to pay. [ Josh 'G' McDonald ] -- [ Pirion Systems, Brisbane] [ 07 3257 0490 ] -- [ 0415 784 825 ] -- [ http://www.gfunk007.com/ ] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: HOST - DNS setup
Im doing something (vaguely)similar using Apache2, mod_jk and mod_rewrite. Im taking the 1st part of the address (http://1.2.3 - the '1') and using it to determine what db to access. mod_rewrite lets you get v detailed with parsing the incoming URL. Perhaps you could boil down your efforts into some perl and let apache do the work for you rather than having to maintain multiple independant server.xml files. Just a notion. Hi Hmm as far as i know there is no other way... The only thing i know you could do is the following: Create a CatchAll-DNS entry which responses to *.mycompany.com = All requests to subdomains which are not in use will go to the default context. From there you could redirect/forward the request to the apropriate context. To get the requested hostname you can do: String reqHost = request.getHeader(Host); ^^^ (which will contain: blah.mycompany.com if user typed: http://blah.mycompany.com) (as far as i know - i do not have tested this). greets, mike Kal Govindu wrote: Hi all, Our company has just started into Java based web applications. Our current methodology for deploying to production is to setup a DNS like say firstapp.mycompany.com and define a Host entry in the server.xml with aliases to respond to the new DNS. We do this purely for the capability of typing http://firstapp.mycompany.com in a web browser and getting to the application. But this is kind of cumbersome and time consuming setup when ever we deploy to production. As we have more applications this way we will end up with several Host's which does not seem like a good thing. Is there a better way to do this? Please help. Thanks Kal - 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: communication issue between .jsp and servlet
So I found a few machines (about 50% of the ones I could track down) that are not preserving the session ID. I tried to enable session cookies but it didn't change the problem. Here's the scenario: Im working on some image display code. The images are downloaded via 'img src=http://servlet?img=id;' from a servlet. Im trying to block people from linking to the images by calling this from a .jsp wherein I call 'setAttribute()' somewhere to make it a 'valid' session. The problem seems to be specific to this servlet. Other .jsp code seems to be able to share attributes with servlets, beans, etc with no problem. Any suggestions what Im doing wrong? -Original Message- From: Ben Souther [mailto:[EMAIL PROTECTED] Sent: Monday, January 12, 2004 10:23 AM To: Tomcat Users List Subject: Re: communication issue between .jsp and servlet Also make sure that you have session cookies enabled in your browser. On Monday 12 January 2004 01:00 pm, Shapira, Yoav wrote: Howdy, Are you sure it's the same session? (Check it's ID in the JSP and servlet). Yoav Shapira Millennium ChemInformatics -Original Message- From: jon yeargers [mailto:[EMAIL PROTECTED] Sent: Monday, January 12, 2004 12:57 PM To: [EMAIL PROTECTED] Subject: communication issue between .jsp and servlet Im hoping to restrict access to a servlet object by setting a session attribute in the valid .jsp and looking for it in the called servlet. Unfortunately the object doesn't seem to be transferring properly. Are there issues with using: % HttpSession sessionObj = request.getSession(); sessionObj.setAttribute(something, new Boolean(true)); /*** some code here to call servlet - form or similar **/ % in my .jsp and then calling: protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, java.io.IOException { HttpSession sessionObj = request.getSession(); Boolean b = (Boolean)sessionObj.getAttribute(something); } For some reason I keep turning up a null obj in the servlet. Ive tried enumerating all the sessionObj and its all turning up null. This seems pretty straightforward.. what am I doing wrong? This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Ben Souther F.W. Davison Company, Inc. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: communication issue between .jsp and servlet
When communicating between a client browser and servlet code - will this param *always* need to be set to use session attributes? Or to maintain other session information? -Original Message- From: Ben Souther [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 13, 2004 9:13 AM To: jon yeargers Cc: [EMAIL PROTECTED] Subject: Re: communication issue between .jsp and servlet It's in a stupid place in MSIE: Tools - Options - Privacy (tab) - click the Advanced button - Always allow session cookies (checkbox). I'm happy to answer these privately but it's better to keep the threads on the list. Someone else might have the same issue later an could benefit from our thread. ;-) On Tuesday 13 January 2004 11:56 am, you wrote: Im looking around trying to find a reference to a 'session cookie'. Are there any other names it might appear under? -Original Message- From: Ben Souther [mailto:[EMAIL PROTECTED] Sent: Monday, January 12, 2004 10:23 AM To: Tomcat Users List Subject: Re: communication issue between .jsp and servlet Also make sure that you have session cookies enabled in your browser. On Monday 12 January 2004 01:00 pm, Shapira, Yoav wrote: Howdy, Are you sure it's the same session? (Check it's ID in the JSP and servlet). Yoav Shapira Millennium ChemInformatics -Original Message- From: jon yeargers [mailto:[EMAIL PROTECTED] Sent: Monday, January 12, 2004 12:57 PM To: [EMAIL PROTECTED] Subject: communication issue between .jsp and servlet Im hoping to restrict access to a servlet object by setting a session attribute in the valid .jsp and looking for it in the called servlet. Unfortunately the object doesn't seem to be transferring properly. Are there issues with using: % HttpSession sessionObj = request.getSession(); sessionObj.setAttribute(something, new Boolean(true)); /*** some code here to call servlet - form or similar **/ % in my .jsp and then calling: protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, java.io.IOException { HttpSession sessionObj = request.getSession(); Boolean b = (Boolean)sessionObj.getAttribute(something); } For some reason I keep turning up a null obj in the servlet. Ive tried enumerating all the sessionObj and its all turning up null. This seems pretty straightforward.. what am I doing wrong? This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Ben Souther F.W. Davison Company, Inc. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
communication issue between .jsp and servlet
Im hoping to restrict access to a servlet object by setting a session attribute in the valid .jsp and looking for it in the called servlet. Unfortunately the object doesn't seem to be transferring properly. Are there issues with using: % HttpSession sessionObj = request.getSession(); sessionObj.setAttribute(something, new Boolean(true)); /*** some code here to call servlet - form or similar **/ % in my .jsp and then calling: protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, java.io.IOException { HttpSession sessionObj = request.getSession(); Boolean b = (Boolean)sessionObj.getAttribute(something); } For some reason I keep turning up a null obj in the servlet. Ive tried enumerating all the sessionObj and its all turning up null. This seems pretty straightforward.. what am I doing wrong?
RE: communication issue between .jsp and servlet
Hmm.. The session IDs are def different.. Which begs the question - why? The servlet is being called from the .JSP - why would it start a new session? -Original Message- From: Ben Souther [mailto:[EMAIL PROTECTED] Sent: Monday, January 12, 2004 10:23 AM To: Tomcat Users List Subject: Re: communication issue between .jsp and servlet Also make sure that you have session cookies enabled in your browser. On Monday 12 January 2004 01:00 pm, Shapira, Yoav wrote: Howdy, Are you sure it's the same session? (Check it's ID in the JSP and servlet). Yoav Shapira Millennium ChemInformatics -Original Message- From: jon yeargers [mailto:[EMAIL PROTECTED] Sent: Monday, January 12, 2004 12:57 PM To: [EMAIL PROTECTED] Subject: communication issue between .jsp and servlet Im hoping to restrict access to a servlet object by setting a session attribute in the valid .jsp and looking for it in the called servlet. Unfortunately the object doesn't seem to be transferring properly. Are there issues with using: % HttpSession sessionObj = request.getSession(); sessionObj.setAttribute(something, new Boolean(true)); /*** some code here to call servlet - form or similar **/ % in my .jsp and then calling: protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, java.io.IOException { HttpSession sessionObj = request.getSession(); Boolean b = (Boolean)sessionObj.getAttribute(something); } For some reason I keep turning up a null obj in the servlet. Ive tried enumerating all the sessionObj and its all turning up null. This seems pretty straightforward.. what am I doing wrong? This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Ben Souther F.W. Davison Company, Inc. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
using mod_rewrite with mod_jk2
In what order do the various mod_* bits interact? Can I use mod_rewrite to setup the URL for passage to mod_jk2?
Re: Image Viewing
So your tag would be img src='servlet(params);' alt='something' ? If you do this do the images get cached by the browser? It sounds like what you're asking is: How can you allow users to view images via the app without allowing them to look at them directly with a browser? If that's what you want to do, it can be accomplished by writing a servlet that streams images and use it as the src attribute to your image tags. This should get you started: package img; import java.io.*; import javax.servlet.*; import javax.servlet.http.*; import javax.servlet.ServletException; public class ImageServlet extends HttpServlet{ public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException{ try{ response.setContentType(image/jpg); OutputStream o = response.getOutputStream(); BufferedInputStream in = new BufferedInputStream( getServletContext() .getResourceAsStream( /WEB-INF/forbidden_images/axis.jpg)); byte[] buf = new byte[32 * 1024]; // 32k buffer int nRead = 0; while( (nRead = in.read(buf)) != -1 ) { o.write(buf, 0, nRead); } o.flush(); o.close(); return; }catch(Exception e){ // do something.. } } } ~ ~ I'm not a streaming guru. It works but someone else might be able to show you a more elegant way to do it or how to do it from a JSP. You'll probably want to pass the image's file name in the querystring. Good Luck -Ben On Thursday 11 December 2003 01:29 pm, you wrote: Howdy, You asked how to block the user from seeing the images by putting the address in the browser. I told you one possible way, e.g. by putting them under WEB-INF. You can still access them from your servlets and JSPs from this location, but users can't. What part is unclear? Yoav Shapira Millennium ChemInformatics -Original Message- From: Kiran Patel [mailto:[EMAIL PROTECTED] Sent: Thursday, December 11, 2003 1:28 PM To: [EMAIL PROTECTED] Subject: Image Viewing Thank you for the replay and your help. If I move the images under WEB-INF folder, I can't access the images from the application through the internet. The images can only be viewed if you login and start the application not by typing the url. For security purpose. Please help me if anybody know how to do that. Thank you. Kiran Patel Howdy, Put the images directory under the WEB-INF directory and change your servlet accordingly. Yoav Shapira Millennium ChemInformatics -Original Message- From: Kiran Patel [mailto:[EMAIL PROTECTED] Sent: Thursday, December 11, 2003 9:53 AM To: [EMAIL PROTECTED] Subject: Image Viewing I am using jsp and tomcat 4.1 for my web application. My application= is viewing image which is in the webapps/image folder. This image can also be viewed from the internet by just typing the url. I want to block thi= s since these are the confidential images. Does anybody know how to do= that. Thanks in advance. Kiran Patel This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - 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: Image Viewing
Errr.. right.. to a point - you can store something in the HttpSession that would indicate that a valid session was underway and to permit the tag to work. (per YS) In the end _it is_ still just a URL but there are 'other forces at work.' How does an image get displayed in a page? 1. The browser receives an HTML page with an IMG tag in it. The IMG tag contains a src attr (an HTTP URL). 2. The browser makes another request, for the URL of the image. 3. The server returns the image, which is displayed. Clearly, if you want an image to be displayed within a web page, the image must be available on your server. There is no difference between the browser making a request for an URL and the user typing that URL into the address bar directly. Maybe you can look at the referer field, but of course that can be hoaxed so if you are really trying to keep this secure that is not a solution. If you really want to only provide content to specific users, you must provide some sort of access control mechanism. The same mechanism should apply to images you wish to protect. This is all related to the fundamental workings of HTTP. HTTP is an integral part of how the web works - anyone thinking of designing a website (especially using scripting languages, servlets, or anyone trying to provide any type of security) should understand at least the fundamentals of HTTP. -Erik Christopher Schultz wrote: All, It would be img src=http://yourserver/yourservlet?param=paramValue; alt=something This still doesn't answer the original interpreted question. I don't think it's possible to display an image on a page and prevent users from browsing to it directly from their browser. The only thing I can think of is to check the REFERER header to see if it came from the page on which you want to display it. That's also not foolproof... -chris - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- http://www.spectacle.ca/ The Online Source for Live Music in Montreal .::514.286.1699::. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Image Viewing
Another method Ive seen is to use an applet to display the images. One advantage to this is you can display any sort of graphic that you have the code to work with. You also get around the issue of having a displayed graphic end up in the cache for the user. Disadvantage.. well... its an applet.. :^( How does an image get displayed in a page? 1. The browser receives an HTML page with an IMG tag in it. The IMG tag contains a src attr (an HTTP URL). 2. The browser makes another request, for the URL of the image. 3. The server returns the image, which is displayed. Clearly, if you want an image to be displayed within a web page, the image must be available on your server. There is no difference between the browser making a request for an URL and the user typing that URL into the address bar directly. Maybe you can look at the referer field, but of course that can be hoaxed so if you are really trying to keep this secure that is not a solution. If you really want to only provide content to specific users, you must provide some sort of access control mechanism. The same mechanism should apply to images you wish to protect. This is all related to the fundamental workings of HTTP. HTTP is an integral part of how the web works - anyone thinking of designing a website (especially using scripting languages, servlets, or anyone trying to provide any type of security) should understand at least the fundamentals of HTTP. -Erik Christopher Schultz wrote: All, It would be img src=http://yourserver/yourservlet?param=paramValue; alt=something This still doesn't answer the original interpreted question. I don't think it's possible to display an image on a page and prevent users from browsing to it directly from their browser. The only thing I can think of is to check the REFERER header to see if it came from the page on which you want to display it. That's also not foolproof... -chris - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- http://www.spectacle.ca/ The Online Source for Live Music in Montreal .::514.286.1699::. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
errors from mod_jk2 / apache2
After pounding my head on mod_jk2 for a few days I finally got the tomcat examples dir to appear.. woot!.. but my apache2 log is filling with errors v quickly. Can someone shed light on what configuration problems I have? Surely this isn't the normal output... [Thu Dec 11 13:51:18 2003] [notice] caught SIGTERM, shutting down [Thu Dec 11 13:55:23 2003] [notice] Digest: generating secret for digest authentication ... [Thu Dec 11 13:55:23 2003] [notice] Digest: done [Thu Dec 11 13:55:23 2003] [error] env.createBean2(): Factory error creating channel.jni:jni ( channel.jni, jni) [Thu Dec 11 13:55:23 2003] [error] config.update(): Can't create channel.jni:jni [Thu Dec 11 13:55:23 2003] [error] env.createBean2(): Factory error creating vm: ( vm, ) [Thu Dec 11 13:55:23 2003] [error] config.update(): Can't create vm: [Thu Dec 11 13:55:23 2003] [error] env.createBean2(): Factory error creating worker.jni:onStartup ( worker.jni, onStartup) [Thu Dec 11 13:55:23 2003] [error] config.update(): Can't create worker.jni:onStartup [Thu Dec 11 13:55:23 2003] [error] env.createBean2(): Factory error creating worker.jni:onShutdown ( worker.jni, onShutdown) [Thu Dec 11 13:55:23 2003] [error] config.update(): Can't create worker.jni:onShutdown [Thu Dec 11 13:55:23 2003] [notice] jk2_init() Found child 18552 in scoreboard slot 0 [Thu Dec 11 13:55:23 2003] [notice] workerEnv.init() ok /etc/httpd/2.0/conf/workers2.properties [Thu Dec 11 13:55:23 2003] [error] mod_jk child init 1 0 [Thu Dec 11 13:55:23 2003] [error] jk2_init() Can't find child 18554 in scoreboard [Thu Dec 11 13:55:23 2003] [notice] workerEnv.init() ok /etc/httpd/2.0/conf/workers2.properties [Thu Dec 11 13:55:23 2003] [error] mod_jk child init 1 -2 [Thu Dec 11 13:55:23 2003] [notice] Apache-AdvancedExtranetServer/2.0.44 (Mandrake Linux/11mdk) mod_ssl/2.0.44 OpenSSL/0.9.7a mod_jk2/2.0.2 configured -- resuming normal operations [Thu Dec 11 13:55:23 2003] [notice] jk2_init() Found child 18553 in scoreboard slot 1 [Thu Dec 11 13:55:23 2003] [notice] workerEnv.init() ok /etc/httpd/2.0/conf/workers2.properties [Thu Dec 11 13:55:23 2003] [notice] jk2_init() Found child 18555 in scoreboard slot 3 [Thu Dec 11 13:55:23 2003] [notice] workerEnv.init() ok /etc/httpd/2.0/conf/workers2.properties [Thu Dec 11 13:55:23 2003] [notice] jk2_init() Found child 18556 in scoreboard slot 4 [Thu Dec 11 13:55:23 2003] [notice] workerEnv.init() ok /etc/httpd/2.0/conf/workers2.properties [Thu Dec 11 13:56:05 2003] [error] jk2_init() Can't find child 18558 in scoreboard [Thu Dec 11 13:56:05 2003] [notice] workerEnv.init() ok /etc/httpd/2.0/conf/workers2.properties [Thu Dec 11 13:56:05 2003] [error] mod_jk child init 1 -2 [Thu Dec 11 13:56:46 2003] [error] channelSocket.open() connect failed localhost:8019 111 Connection refused [Thu Dec 11 13:56:46 2003] [error] ajp13.connect() failed ajp13:localhost:8019 [Thu Dec 11 13:56:46 2003] [error] ajp13.service() failed to connect endpoint errno=111 Connection refused [Thu Dec 11 13:56:46 2003] [error] ajp13.service() Error forwarding ajp13:localhost:8019 1 1 [Thu Dec 11 13:56:46 2003] [notice] ajp13.done() close endpoint ajp13:localhost:8019 error_state 1 [Thu Dec 11 13:56:46 2003] [error] lb.service() worker failed 12 for ajp13:localhost:8019 [Thu Dec 11 13:56:46 2003] [error] channelUn.connect() connect failed 2 No such file or directory [Thu Dec 11 13:56:46 2003] [error] ajp13.connect() failed ajp13:/opt/33/work/jk2.socket [Thu Dec 11 13:56:46 2003] [error] ajp13.service() failed to connect endpoint errno=2 No such file or directory [Thu Dec 11 13:56:46 2003] [error] ajp13.service() Error forwarding ajp13:/opt/33/work/jk2.socket 1 1 [Thu Dec 11 13:56:46 2003] [notice] channelUn.close(): close unix socket -1 [Thu Dec 11 13:56:46 2003] [notice] ajp13.done() close endpoint ajp13:/opt/33/work/jk2.socket error_state 1 [Thu Dec 11 13:56:46 2003] [error] lb.service() worker failed 12 for ajp13:/opt/33/work/jk2.socket [Thu Dec 11 13:56:46 2003] [notice] shm.createSlot() Create 1 0x40573000 0x40575000 [Thu Dec 11 13:56:46 2003] [notice] workerEnv.init() create slot epStat.1 [Thu Dec 11 13:56:46 2003] [error] channelSocket.open() connect failed localhost:8019 111 Connection refused [Thu Dec 11 13:56:46 2003] [error] ajp13.connect() failed ajp13:localhost:8019 [Thu Dec 11 13:56:46 2003] [error] ajp13.service() failed to connect endpoint errno=111 Connection refused [Thu Dec 11 13:56:46 2003] [error] ajp13.service() Error forwarding ajp13:localhost:8019 1 1 [Thu Dec 11 13:56:46 2003] [notice] ajp13.done() close endpoint ajp13:localhost:8019 error_state 1 [Thu Dec 11 13:56:46 2003] [error] lb.service() worker failed 12 for ajp13:localhost:8019 [Thu Dec 11 13:56:46 2003] [error] channelUn.connect() connect failed 2 No such file or directory [Thu Dec 11 13:56:46 2003] [error] ajp13.connect() failed ajp13:/opt/33/work/jk2.socket [Thu Dec 11 13:56:46 2003] [error] ajp13.service() failed to connect endpoint errno=2 No such file or directory [Thu
building mod_jk - exportable?
Im wanting to integrate tomcat and Apache on a 'public' server. In the directions for building mod_jk it states that you need to modify the build.properties files to point to your apache and tomcat installations and the use 'ant' to build the code. For obvious reasons I don't have ant or any compilers on this public server. Is it possible to modify the settings for mod_jk *after* building it so I can export it to this server from an internal build machine?
Getting a strange exception from Tomcat
Im using a tomcat installation to do a some JPEG manipulation. From most machines it works fine but one customer causes this exception when the image code is hit. Why would different client machines cause problems running the same code with the same data? Im sure its a UFU but I don't have a clue how to debug it. Suggestions? org.apache.jasper.JasperException: Can't connect to X11 window server using ':0.0' as the value of the DISPLAY variable. at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:248) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:260) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:432) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:386) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:534) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:530) at java.lang.Thread.run(Thread.java:536) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Trying to get past java.net.ConnectException
I guess Im confused as it worked fine when run against the same server code runnning in my IDE. I assumed that Tomcat would have more security to prevent hostile apps from doing damage. -Original Message- From: Tim Funk [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 08, 2003 2:48 PM To: Tomcat Users List Subject: Re: Trying to get past java.net.ConnectException If your applet is bombing with java.net.ConnectException, then your applet is the problem, not tomcat. -Tim jon yeargers wrote: Problem: Im trying to use an Applet to interact with my Tomcat code via sockets to transfer files. I get the following exception: java.net.ConnectException: Connection refused: connect and it points to a line in my code where I call URLConnection::getOutputStream(); All well and good. I can see where this needs to be protected. I STFW for information about setting tomcat security (since my books don't seem to cover it very well.. bad books I guess) and found this page: http://jakarta.apache.org/tomcat/tomcat-4.0-doc/security-manager-howto .h tml Sounds like a good thing to try. My applet lives in ${catalina.home}/webapps/viewer so I added this line to my catalina.policy file: grant codebase file:{catalina.home}/webapps/viewer/- { permission java.security.AllPermission; }; - 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]
Firewall rules - blocking tomcat traffic inadvertantly?
I have a tomcat server in a DMZ coming off my firewall machine. I have permitted traffic to /from port 8080 but am having some connection problems. Are there other *standard* ports needed for communications with my server process? Specifically Im trying to call URLConnection::getOutputStream() - AFAIK it doesn't ask for a specific port # so I don't think Im doing anything entirely strange with it. Communication with my server process works ok when its not across the firewall but fails otherwise (I can get info from the server but I can't send files back).
Trying to get past java.net.ConnectException
Problem: Im trying to use an Applet to interact with my Tomcat code via sockets to transfer files. I get the following exception: java.net.ConnectException: Connection refused: connect and it points to a line in my code where I call URLConnection::getOutputStream(); All well and good. I can see where this needs to be protected. I STFW for information about setting tomcat security (since my books don't seem to cover it very well.. bad books I guess) and found this page: http://jakarta.apache.org/tomcat/tomcat-4.0-doc/security-manager-howto.h tml Sounds like a good thing to try. My applet lives in ${catalina.home}/webapps/viewer so I added this line to my catalina.policy file: grant codebase file:{catalina.home}/webapps/viewer/- { permission java.security.AllPermission; }; and restarted the server with bin/startup.sh -security .. to no avail. The situation hasn't changed. is this the right approach? Am I barking up the wrong proverbial tree? (The applet in question is signed with a test cert - it makes it past client security and sees my local drive ok)