connection reset by peer
Hello, I'm using tomcat5.5.23 on a Fedora 5 kernel: 2.6.20-1.2320.fc5. I redirect port 80 to 8080 by running by root: iptables -t nat -A OUTPUT -d localhost -p tcp --dport 80 -j REDIRECT --to-ports 8080 iptables -t nat -A PREROUTING -p tcp --dport 80 -i eth0 -j REDIRECT --to-port 8080 Sometimes (quite often) I get connection reset by peer, in the middle of page loading. It looks like that when running wget (although it happens also using firefox and ie): Connecting to ard.huji.ac.il|132.64.50.50|:80... connected. HTTP request sent, awaiting response... 200 OK Length: unspecified [text/html] 0% [ ] 2,555 --.--K/s 23:43:29 (169.02 KB/s) - Read error at byte 271959 (Connection reset by peer).Retrying. it happens each time in a different stage of the page download. It happens mainly (or only) on large pages (~45 bytes). the server is inside inside a firewall, the error occurs when trying to access it from outside the firewall, I couldn't reproduce the error from inside the firewall. Can someone help with that ? Yair. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
How do I get the response status code?
Hello, I'm trying to create a filter that will do the access logging for my web application (I would like to write the information directly to the database not to a file). I have a problem to get the status code of the response. The filter receives a ServletResponse object that do not have a getStatus() method. Any idea ? Yair Zohar. - 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 do I get the response status code?
Hi Brantley, Thanks for replying. I've tried to pass a wrapper to the filter's chain, here is the wrapper's code: import java.io.IOException; import javax.servlet.http.*; public class TestResponse extends HttpServletResponseWrapper { private int statusCode; public TestResponse(HttpServletResponse response) { super(response); } public int getStatus() { return statusCode; } public void sendError(int errorCode) throws IOException { this.statusCode = errorCode; super.sendError(errorCode); } public void sendError(int errorCode, String errorMessage) throws IOException { this.statusCode = errorCode; super.sendError(errorCode, errorMessage); } public void setStatus(int statusCode) { this.statusCode = statusCode; super.setStatus(statusCode); } } I hopped tomcat will use the wrapper's setStatus() method and then I will be able to get the status code. What actually happened is that sometimes the status code returned was 0 and sometimes 404 or 304. It seems tomcat used the wrapper's setStatus() method only in part of the cases (maybe only when there was a problem getting the page). How does the byte count gives information on the status code ? How do you get the byte count from the output stream ? Yair. Brantley Hobbs wrote: Yair, I too would be interested in this. I wrote a logging filter that does what you describe, but the best that I could come up with was a response wrapper that was passed along the filter chain. In the wrapper, I could set a status, thus guaranteeing that I would end up with a status at the end. The wrapper extends HttpServletResponseWrapper. You may also find a wrapper useful because response sizes are not always set either, at least in my experience. With the wrapper, you can monitor the output stream to get a byte count. B. Yair Zohar wrote: Hello, I'm trying to create a filter that will do the access logging for my web application (I would like to write the information directly to the database not to a file). I have a problem to get the status code of the response. The filter receives a ServletResponse object that do not have a getStatus() method. Any idea ? Yair Zohar. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How do I get the response status code?
Well, it does, partially. I sometimes get a non zero status code, but it's not zero only when there is an error (status code s: 404, 304). Yair. Brantley Hobbs wrote: Ahh.please ignore my last. I see that you're doing the same thing I mentioned (setting a private variable and returning that as the status). Is this not working for you? Brantley Yair Zohar wrote: Hi Brantley, Thanks for replying. I've tried to pass a wrapper to the filter's chain, here is the wrapper's code: import java.io.IOException; import javax.servlet.http.*; public class TestResponse extends HttpServletResponseWrapper { private int statusCode; public TestResponse(HttpServletResponse response) { super(response); } public int getStatus() { return statusCode; } public void sendError(int errorCode) throws IOException { this.statusCode = errorCode; super.sendError(errorCode); } public void sendError(int errorCode, String errorMessage) throws IOException { this.statusCode = errorCode; super.sendError(errorCode, errorMessage); } public void setStatus(int statusCode) { this.statusCode = statusCode; super.setStatus(statusCode); } } I hopped tomcat will use the wrapper's setStatus() method and then I will be able to get the status code. What actually happened is that sometimes the status code returned was 0 and sometimes 404 or 304. It seems tomcat used the wrapper's setStatus() method only in part of the cases (maybe only when there was a problem getting the page). How does the byte count gives information on the status code ? How do you get the byte count from the output stream ? Yair. Brantley Hobbs wrote: Yair, I too would be interested in this. I wrote a logging filter that does what you describe, but the best that I could come up with was a response wrapper that was passed along the filter chain. In the wrapper, I could set a status, thus guaranteeing that I would end up with a status at the end. The wrapper extends HttpServletResponseWrapper. You may also find a wrapper useful because response sizes are not always set either, at least in my experience. With the wrapper, you can monitor the output stream to get a byte count. B. Yair Zohar wrote: Hello, I'm trying to create a filter that will do the access logging for my web application (I would like to write the information directly to the database not to a file). I have a problem to get the status code of the response. The filter receives a ServletResponse object that do not have a getStatus() method. Any idea ? Yair Zohar. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Reloading shared classes
Hello, I'm using tomcat 5.0.28 on a Linux machine. My web applications are using some shared class. I put them under $CATALINA_HOME/shared/classes. The problem: When I make changes in the shared classes, restarting a web application by tomcat's manager is not enough for the changes to be reloaded. Only the tomcat server shutdown + start cause the changes to be reloaded. How do I configure the web application or tomcat to reload the shared classes when restarting the web application? Thanks ahead, Yair. - 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: Reloading shared classes
You are right, I've just wanted to avoid multiple copies of the same classes. They are not really shared. If the classes are shared, all the web applications should be restarted, because the change affect all of them. Yair. Peter Crowther wrote: From: Yair Zohar [mailto:[EMAIL PROTECTED] My web applications are using some shared class. I put them under $CATALINA_HOME/shared/classes. The problem: When I make changes in the shared classes, restarting a web application by tomcat's manager is not enough for the changes to be reloaded. Only the tomcat server shutdown + start cause the changes to be reloaded. How do I configure the web application or tomcat to reload the shared classes when restarting the web application? You can't. To reload those classes, you'd have to reload the contents of the shared classloader - which you can't do without restarting all the other webapps. Any other approach removes the need for the *shared* classes. Do the classes genuinely need to be shared between the webapps, or are you doing this to save space? - Peter - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
using JNI
Hi, I have a DLL that I need to use from some of my servlets. Where should I put the DLL? How do I load the DLL from all those servlets (should it be loaded only once?)? Is there anywhere I can read about this? Thanks, Zohar. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
loading dlls
Hi, I have a servlet which needs to load a dll. using Tomcat 5.5., what is the right way to do that (do I need to set java.library.path? if so - where? where should my loading classes reside?)? Thanks, Zohar. - 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: configuring Tomcat for protocols other than http/s
Is there anything more about this, other than the (very poor) javadocs, or is the only option is looking in the code? Viraj Turakhia [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi all, I am starting to work with Tomcat's code and have no clue where to start from. Any pointers would be very very helpful. Well, one method is to implement your own ProtocolHandler ( http://tomcat.apache.org/tomcat-5.5-doc/catalina/docs/api/org/apache/coyote/ProtocolHandler.html). This is responsible for setting up the Request and Response objects, threading, and handling sending and receiving data on the protocol. It then hands off the Request and Response to the service method of the Adapter (http://tomcat.apache.org/tomcat-5.5-doc/catalina/docs/api/org/apache/coyote/Adapter.html) that Tomcat passed to it. The MemoryProtocolHandler (http://tomcat.apache.org/tomcat-5.5-doc/catalina/docs/api/org/apache/coyote/memory/MemoryProtocolHandler.html) is the easiest if you want an example. You'll probably also want to implement ActionHook (http://tomcat.apache.org/tomcat-5.5-doc/catalina/docs/api/org/apache/coyote/ActionHook.html) for best results. You tell Tomcat to use yours via: Connector protocol=com.myfirm.mypackage.MyProtocolHandler / To start with, I would like to know whether Tomcat is configurable to work with protocols other than http/https? Well, it comes with AJP/1.3 support ;-). However, the servlet container neutral to the protocol (that's the job of the ProtocolHandler :). I want to configure Tomcat in such a way that it gives me RAW data that is posted on given port. Please let me know which server element is to be configured (and where.. server.xml?) such that forming request/response from RAW data is possible for me. This RAW data is not necessarily a http/https specific data. It could be specific to any other protocol like ftp://. Waiting for reply, thanks. -- The first right of human is the right of EGO. -- http://www.xperienceexperience.blogspot.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: configuring Tomcat for protocols other than http/s
Is there anything more about this (ProtocolHandler, Adapter, etc...), other than the (very poor) javadocs, or is the only option is looking in the code?
RE: debugging tomcat with eclipse
http://www.eclipse.org/webtools/ Date: Wed, 23 Aug 2006 17:24:46 -0500 From: [EMAIL PROTECTED] To: users@tomcat.apache.org Subject: debugging tomcat with eclipse I have found various different examples, just curious what folks are find to be the best practice? D- _ Use Messenger to talk to your IM friends, even those on Yahoo! http://ideas.live.com/programpage.aspx?versionId=7adb59de-a857-45ba-81cc-685ee3e858fe
JDBCReal drivers
When using JDBCRealm, where should I put my driver jars?
file type and name
Hello list, I have a servlet that generates a CSV file. What I do is: response.setContentType("application/csv"); PrintWriter out = response.getWriter(); out.write(csvContent); out.flush(); What I get is attached. How do I fix this? I also want the filename to be something else... Thanks, Zohar - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
BASIC authentication response
Hello list, I'm using BASIC authentication with tomcat 5.5 and I wanted to know whether it is possible to return some text when the user login fails (e.g. you typed in the wrong password). Is it? Thanks. Zohar.
forwarding to a remote host
Hello list, I have a servlet that handles POST requests. Sometimes the request needs to be forwarded to a different servlet, which may be running on a different server. What is the best way to do that? Thanks, Zohar.
Re: forwarding to a remote host
What's the easiest way to transfer all the data from the Request to the PostMethod? - Original Message - From: Avi Deitcher [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Tuesday, July 11, 2006 14:38 Subject: Re: forwarding to a remote host Zohar, - In the same host context, use RequestDispatcher.forward() - In the same host but different context, if cross-context enabled, get the RequestDispatcher for that context then use forward() - Different host entirely, or cross-context not enabled, you will probably need to rebuild the request. I usually use the Jakarta Commons HTTPClient for this. Check out http://jakarta.apache.org/commons/httpclient/ Anyone have a better suggestion? Avi Zohar wrote: Hello list, I have a servlet that handles POST requests. Sometimes the request needs to be forwarded to a different servlet, which may be running on a different server. What is the best way to do that? Thanks, Zohar. -- __ Avi Deitcher [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Re: error page
all it does is put h1%=exception.getMessage()%/h1 I am a bit lost here. The way I set my error page is : errorPage=error.jsp Should I use errorPage=/error.jsp instead? Thanks for your reply, Zohar. Date: Sat, 20 May 2006 14:05:20 -0400 From: [EMAIL PROTECTED] To: users@tomcat.apache.org Subject: Re: error page It could be that the error page itself is throwing an error. Try using an ultra-simple error page. -- Len On 5/18/06, Zohar [EMAIL PROTECTED] wrote: No, I've used the Letting a page define its error page option. - Original Message - From: Franck Borel [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Thursday, May 18, 2006 14:20 Subject: Re: error pageI'm trying to use the error handling mechanism described in http://java.sun.com/developer/EJTechTips/2003/tt0114.html. When an exception in thrown in JSP1 it is indeed redirected to JSP2. in JSP2 I've put System.out.println(exception.getMessage()); and sure enough the exception's message is printed. But what I get as a response to the browser is HTTP 500. Have you make an entry like this in your Web deployment descriptor (web.xml)? !-- Catch a system error using an HTML page --error-page exception-typeyour.exception. /exception-type location/JSP2.jsp/location/error-page -- Franck - 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] _ Join the next generation of Hotmail and you could win the adventure of a lifetime http://www.imagine-msn.com/minisites/sweepstakes/mail/register.aspx
RE: Re: error page
If anyone has an example I'd love seeing it... Date: Sat, 20 May 2006 14:05:20 -0400 From: [EMAIL PROTECTED] To: users@tomcat.apache.org Subject: Re: error page It could be that the error page itself is throwing an error. Try using an ultra-simple error page. -- Len On 5/18/06, Zohar [EMAIL PROTECTED] wrote: No, I've used the Letting a page define its error page option. - Original Message - From: Franck Borel [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Thursday, May 18, 2006 14:20 Subject: Re: error pageI'm trying to use the error handling mechanism described in http://java.sun.com/developer/EJTechTips/2003/tt0114.html. When an exception in thrown in JSP1 it is indeed redirected to JSP2. in JSP2 I've put System.out.println(exception.getMessage()); and sure enough the exception's message is printed. But what I get as a response to the browser is HTTP 500. Have you make an entry like this in your Web deployment descriptor (web.xml)? !-- Catch a system error using an HTML page --error-page exception-typeyour.exception. /exception-type location/JSP2.jsp/location/error-page -- Franck - 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] _ Join the next generation of Hotmail and you could win the adventure of a lifetime http://www.imagine-msn.com/minisites/sweepstakes/mail/register.aspx
JSP error page results in HTTP 500
Hello list, I'm using tomcat 5.5.16 . I'm trying to use JSP's error page mechanism. In my main.jsp I have [EMAIL PROTECTED] errorPage=error.jsp %When an exception is thrown in main.jsp it is indeed forwarded to error.jsp, where I have [EMAIL PROTECTED] isErrorPage=true % I can see the code in error.jsp being executed (I've put some println's there), but the calling HTTP browser gets an HTTP 500 response.Is this a known issue with tomcat? If not, then can anyone please help me with this.Thanks,Zohar. _ It's the future, it's here, and it's free: Windows Live Mail beta http://www2.imagine-msn.com/minisites/mail/Default.aspx?locale=en-us
error page
Hello, I'm trying to use the error handling mechanism described in http://java.sun.com/developer/EJTechTips/2003/tt0114.html. When an exception in thrown in JSP1 it is indeed redirected to JSP2. in JSP2 I've put System.out.println(exception.getMessage()); and sure enough the exception's message is printed. But what I get as a response to the browser is HTTP 500. Can anyone please help me with this? Thanks, Zohar.
Re: error page
No, I've used the Letting a page define its error page option. - Original Message - From: Franck Borel [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Thursday, May 18, 2006 14:20 Subject: Re: error page I'm trying to use the error handling mechanism described in http://java.sun.com/developer/EJTechTips/2003/tt0114.html. When an exception in thrown in JSP1 it is indeed redirected to JSP2. in JSP2 I've put System.out.println(exception.getMessage()); and sure enough the exception's message is printed. But what I get as a response to the browser is HTTP 500. Have you make an entry like this in your Web deployment descriptor (web.xml)? !-- Catch a system error using an HTML page -- error-page exception-typeyour.exception. /exception-type location/JSP2.jsp/location /error-page -- Franck - 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: access control
They used to be all interface servlets, but then I unified all external interface access into one simple servlet that forwards the request to the appropriate service. This way it should be easier to control the access to that context (e.g., protect it with a password, deny access to internal services, etc.). The internal contexts also provide service to other internal servers. - Original Message - From: Markus Schönhaber [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Thursday, April 06, 2006 17:23 Subject: Re: access control Zohar wrote: I have a few servlets which are deployed to different contexts (each servlet to its own context). One of these servlets acts as an interface to clients, and it forwards the requests from clients to the appropriate servlets. I don't want any of the non-interface servlets to be accessible to clients (but they must still be accessible to the interface servlet). How do I do that? You could, for example, use a Remote Address Filter or a Remote Host Filter for the contexts you don't want to be accessible: http://tomcat.apache.org/tomcat-5.5-doc/config/valve.html#Remote%20Address%20Filter But would you mind to elaborate a little why you put servlets into contexts you don't want to be accessible or why it is neccessary for those non-interface servlets to be servlets at all? Regards mks - 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: access control
Can I grant access to some jsp pages and deny access to others (in the same context)? - Original Message - From: Markus Schönhaber [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Thursday, April 06, 2006 17:23 Subject: Re: access control Zohar wrote: I have a few servlets which are deployed to different contexts (each servlet to its own context). One of these servlets acts as an interface to clients, and it forwards the requests from clients to the appropriate servlets. I don't want any of the non-interface servlets to be accessible to clients (but they must still be accessible to the interface servlet). How do I do that? You could, for example, use a Remote Address Filter or a Remote Host Filter for the contexts you don't want to be accessible: http://tomcat.apache.org/tomcat-5.5-doc/config/valve.html#Remote%20Address%20Filter But would you mind to elaborate a little why you put servlets into contexts you don't want to be accessible or why it is neccessary for those non-interface servlets to be servlets at all? Regards mks - 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: Eclipse plugins for tomcat
take a look at WTP (http://www.eclipse.org/webtools/) - Original Message - From: Anandi Vyagrapuri [EMAIL PROTECTED] To: users@tomcat.apache.org Sent: Thursday, April 06, 2006 18:35 Subject: Eclipse plugins for tomcat Hi, Can anyone comment on the best eclipse plugin for tomcat development. Tried sysdeo but had difficulties running the application from eclipse. Anybody tried the plugin called Lombaz ? Or, should i purchase My eclipse ? Any suggestions are welcome. Thanks Anandi __ 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: tomcat and xslt 2.0
I've tried putting it right before TransformerFactory.newInstance() . now, when I invoke the transform method I get NPE at net.sf.saxon.Controller.transform(Controller.java:1319) Any help? - Original Message - From: Zohar Amir [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org; Richard Toren [EMAIL PROTECTED] Sent: Wednesday, March 01, 2006 9:25 AM Subject: Re: tomcat and xslt 2.0 Thanks. Where do I put the System.setProperty(...)? - Original Message - From: Richard Toren [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Monday, February 27, 2006 7:28 PM Subject: Re: tomcat and xslt 2.0 I think there are not that many xslt 2.0 engines out there to choose from. In any case saxon is xslt 2.0 and very fast. You have to include the jar (obvious, but) and before you instantiate a TransformerFactory set the System property: System.setProperty( javax.xml.transform.TransformerFactory, net.sf.saxon.TransformerFactoryImpl); You will get a warning if the xslt is 1.0, but it will still compile and function. Richard Toren Zohar Amir wrote: Correct me if I'm wrong here: as I understand it, tomcat uses Xalan as its XSLT engine. Xalan does not support XSLT 2.0 . Is there any other XSLT engine I can use with tomcat (I read something about Saxon)? If so, how do I do that? Thanks, Zohar. - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: tomcat and xslt 2.0
Thanks. Where do I put the System.setProperty(...)? - Original Message - From: Richard Toren [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Monday, February 27, 2006 7:28 PM Subject: Re: tomcat and xslt 2.0 I think there are not that many xslt 2.0 engines out there to choose from. In any case saxon is xslt 2.0 and very fast. You have to include the jar (obvious, but) and before you instantiate a TransformerFactory set the System property: System.setProperty( javax.xml.transform.TransformerFactory, net.sf.saxon.TransformerFactoryImpl); You will get a warning if the xslt is 1.0, but it will still compile and function. Richard Toren Zohar Amir wrote: Correct me if I'm wrong here: as I understand it, tomcat uses Xalan as its XSLT engine. Xalan does not support XSLT 2.0 . Is there any other XSLT engine I can use with tomcat (I read something about Saxon)? If so, how do I do that? Thanks, Zohar. - 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]
xslt
Can I use XSLT 2.0 stylesheets with tomcat 5.5.15 ? I get: ERROR: 'Error checking type of the expression 'funcall(format-dateTime, [step(child, 24), literal-expr([Mn] [D1o], [Y0001] at [h01]:[m09]:[s02] [P])])'.' Thanks, Zohar. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
tomcat and xslt 2.0
Correct me if I'm wrong here: as I understand it, tomcat uses Xalan as its XSLT engine. Xalan does not support XSLT 2.0 . Is there any other XSLT engine I can use with tomcat (I read something about Saxon)? If so, how do I do that? Thanks, Zohar. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Image files accesable for a servlet in Tomcat, but they were accesible in Java standalone program
Sorry to barge in, but maybe you can help me with my question: If I want to reference images from my servlet, when should I put them and how do I reference them? Thanks, Zohar. - Original Message - From: Wentink, Marc [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Wednesday, February 22, 2006 6:20 PM Subject: RE: Image files accesable for a servlet in Tomcat, but they were accesible in Java standalone program Hey thanks! That's it -Oorspronkelijk bericht- Van: Paul Hamer [mailto:[EMAIL PROTECTED] Verzonden: woensdag 22 februari 2006 17:19 Aan: 'Tomcat Users List' Onderwerp: RE: Image files accesable for a servlet in Tomcat, but they were accesible in Java standalone program Hi Marc, Are you running Tomcat on a headless machine, in other words, on a machine that does not have any graphics drivers installed? This is the case for many SSH-only Linux servers, like mine. If so, then specify -Djava.awt.headless=true as a parameter to Tomcat. Regards, Paul Hamer management development [EMAIL PROTECTED] toHAVE websolutions www.tohave.nl [EMAIL PROTECTED] -Original Message- From: Wentink, Marc [mailto:[EMAIL PROTECTED] Sent: Wednesday, 22 February, 2006 16:42 To: tomcat-user@jakarta.apache.org Subject: Image files accesable for a servlet in Tomcat, but they were accesible in Java standalone program Dear Sirs, I have got a servlet that generates a pdf file from a xml file, the servlet runs in Tomcat, and it runs fine as long as in the xml file does not contain references to images. At the moment the xml contains an image I got this error: java.lang.NoClassDefFoundError at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(Graph icsEnvironment.java:62) at java.awt.image.BufferedImage.createGraphics(BufferedImage.java:1041) at java.awt.image.BufferedImage.getGraphics(BufferedImage.java:1031) at net.antonius.pdfgen.TypeImageMap.parse(Unknown Source) The strange thing is that if I ran the old program as an independent java program, I did not got the error. Hence the java environment provided by Tomcat misses some classes? Thanks in advance for any suggestions. Marc - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Image files accesable for a servlet in Tomcat, but they were accesible in Java standalone program
I mean I want to have an img src=http://myserver/mycontext/images/image2.gif/ Since my servlet is mapped to / it gets invoked for the above URL. - Original Message - From: Paul Hamer [EMAIL PROTECTED] To: 'Tomcat Users List' users@tomcat.apache.org Sent: Wednesday, February 22, 2006 6:48 PM Subject: RE: Image files accesable for a servlet in Tomcat, but they were accesible in Java standalone program Hi Zohar, What doe you mean by reference ?? Please elaborate. Regards, Paul Hamer management development [EMAIL PROTECTED] toHAVE websolutions www.tohave.nl [EMAIL PROTECTED] -Original Message- From: Zohar Amir [mailto:[EMAIL PROTECTED] Sent: Wednesday, 22 February, 2006 17:28 To: Tomcat Users List Subject: Re: Image files accesable for a servlet in Tomcat, but they were accesible in Java standalone program Sorry to barge in, but maybe you can help me with my question: If I want to reference images from my servlet, when should I put them and how do I reference them? Thanks, Zohar. - Original Message - From: Wentink, Marc [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Wednesday, February 22, 2006 6:20 PM Subject: RE: Image files accesable for a servlet in Tomcat, but they were accesible in Java standalone program Hey thanks! That's it -Oorspronkelijk bericht- Van: Paul Hamer [mailto:[EMAIL PROTECTED] Verzonden: woensdag 22 februari 2006 17:19 Aan: 'Tomcat Users List' Onderwerp: RE: Image files accesable for a servlet in Tomcat, but they were accesible in Java standalone program Hi Marc, Are you running Tomcat on a headless machine, in other words, on a machine that does not have any graphics drivers installed? This is the case for many SSH-only Linux servers, like mine. If so, then specify -Djava.awt.headless=true as a parameter to Tomcat. Regards, Paul Hamer management development [EMAIL PROTECTED] toHAVE websolutions www.tohave.nl [EMAIL PROTECTED] -Original Message- From: Wentink, Marc [mailto:[EMAIL PROTECTED] Sent: Wednesday, 22 February, 2006 16:42 To: tomcat-user@jakarta.apache.org Subject: Image files accesable for a servlet in Tomcat, but they were accesible in Java standalone program Dear Sirs, I have got a servlet that generates a pdf file from a xml file, the servlet runs in Tomcat, and it runs fine as long as in the xml file does not contain references to images. At the moment the xml contains an image I got this error: java.lang.NoClassDefFoundError at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(Graph icsEnvironment.java:62) at java.awt.image.BufferedImage.createGraphics(BufferedImage.java:1041) at java.awt.image.BufferedImage.getGraphics(BufferedImage.java:1031) at net.antonius.pdfgen.TypeImageMap.parse(Unknown Source) The strange thing is that if I ran the old program as an independent java program, I did not got the error. Hence the java environment provided by Tomcat misses some classes? Thanks in advance for any suggestions. Marc - 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] - 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]
images
Hi, I have a servlet that transforms an XML using XSLT. In the result HTML I want to include some images. Where do I place those images? I tried the WebContent directory, but they could not be loaded (I even tried getting them explicitly, but the servlet was invoked instead). Thanks, Zohar. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
password protection
Hello, I'm using tomcat 5.5.15 on Win XP. I have a servlet that is deployed on a certain context. I would like anyone trying to use that servlet use a username-password. how do I do this? What if I need to protect a jsp that is part of the servlet? Thanks, Zohar. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: password protection
Thanks, Where can I find info on how exactly to do this? maybe an example...? - Original Message - From: David Delbecq [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Wednesday, February 15, 2006 2:52 PM Subject: Re: password protection Zohar Amir a écrit : Hello, I'm using tomcat 5.5.15 on Win XP. I have a servlet that is deployed on a certain context. I would like anyone trying to use that servlet use a username-password. how do I do this? set a security-constrain in WEB-INF/web.xml What if I need to protect a jsp that is part of the servlet? You mean to prevent direct loading of a jsp included by your servlet? Same thing, add a security-constraint to the url of your jsp. Thanks, Zohar. - 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: password protection
Thank you again, I've set a security-constraint on the context (in the web.xml), and it works OK now. What I'd like to know is: 1. Can I do it anywhere else other than the web.xml, so that the deployer can control this and not the developer? 2. Can I set it for a group of contexts, so that they will all be able to use request.getPricipal() and have the user name that logged in? - Original Message - From: David Delbecq [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Wednesday, February 15, 2006 3:05 PM Subject: Re: password protection http://www.onjava.com/pub/a/onjava/2001/07/24/tomcat.html http://www.cafesoft.com/products/cams/tomcat-security.html for other ones, use favorite search engine. Zohar Amir a écrit : Thanks, Where can I find info on how exactly to do this? maybe an example...? - Original Message - From: David Delbecq [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Wednesday, February 15, 2006 2:52 PM Subject: Re: password protection Zohar Amir a écrit : Hello, I'm using tomcat 5.5.15 on Win XP. I have a servlet that is deployed on a certain context. I would like anyone trying to use that servlet use a username-password. how do I do this? set a security-constrain in WEB-INF/web.xml What if I need to protect a jsp that is part of the servlet? You mean to prevent direct loading of a jsp included by your servlet? Same thing, add a security-constraint to the url of your jsp. Thanks, Zohar. - 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] - 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]
distribution
Hello, I've used tomcat to run some naive servlets, and now I need to do something more complicated. I need to be able to distribute my service. Clients connect to a tomcat server and their requests are forwarded to a backend server. I need to be able to distribute all this, so that clients can connect to any of a number of tomcat servers and then be directed to the same backend server throughout their session (until they log out). Can anyone point me to where I can read about such a solution? What I thought was maintaining a database with a mapping of session - backend server, and use it, but this requires querying the database for each transaction... Any other ideas?] Thanks, Zohar. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: distribution
The requests from the client are made in distinct sessions. For each request a new HTTP session may be created, but it would still need it to be directed to the same tomcat (and to the same backend server) that handles it. The session is identified with an HTTP header or an attribute in the request's body (not sure yet). I guess I have an application-level session that may encompass many HTTP sessions. Any way of doing this? Thanks, Zohar. - Original Message - From: Richard Mixon [EMAIL PROTECTED] To: 'Tomcat Users List' users@tomcat.apache.org Sent: Sunday, January 08, 2006 5:55 PM Subject: RE: distribution Zohar, Not exactly clear on your requirements. Do you care which backend server the client is initially redirected to? If not, then you can use a load balancer that supports session affinity. It will use a load-balancing algorithm to initially decide which back-end server to forward a particular client to. Afterwards it will redirect all requests from the same client to the same backend server - until the session times out, which is configurable usually). You can of course use a dedicated load-balancing appliance to do this. Current versions of Tomcat also ship with a load-balancing application application that might work for you. However a lot of people use the Apache web server with its associated mod_jk module to perform this function. I have used it a year and it works fine for this. Here is the doc on the mod_jk connector: http://tomcat.apache.org/connectors-doc/index.html Here is the tomcat load balancer doc: http://tomcat.apache.org/tomcat-5.5-doc/balancer-howto.html You should also search the archives for this mailing list, there have been many posts in the past on this topic: http://marc.theaimsgroup.com/?l=tomcat-userr=1w=2 HTH - Richard -Original Message- From: Zohar Amir [mailto:[EMAIL PROTECTED] Sent: Sunday, January 08, 2006 6:03 AM To: Tomcat Users List Subject: distribution Hello, I've used tomcat to run some naive servlets, and now I need to do something more complicated. I need to be able to distribute my service. Clients connect to a tomcat server and their requests are forwarded to a backend server. I need to be able to distribute all this, so that clients can connect to any of a number of tomcat servers and then be directed to the same backend server throughout their session (until they log out). Can anyone point me to where I can read about such a solution? What I thought was maintaining a database with a mapping of session - backend server, and use it, but this requires querying the database for each transaction... Any other ideas?] Thanks, Zohar. - 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: upgrading a war file
I do have access, but not through tomcat's web admin. - Original Message - From: Seak, Teng-Fong [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Wednesday, November 09, 2005 7:15 PM Subject: Re: upgrading a war file Oops, sorry, I've just noticed that you've written I do not have admin web access to the server. Mea culpa. But that's strange. I mean, how did you deploy your webapp for the first time? You must have some kind of access. Seak, Teng-Fong wrote: Do you have full access to the server machine? If yes, you could just copy and paste the war file inside and wait for several seconds. At least that's how I do it. If you want to avoid potential problem due to class change, maybe stop TC before pasting and restart it afterwards. Zohar Amir wrote: Hi, I have a servlet deployed on my tomcat server. What are the options of upgrading this servlet (I have a new war file)? Which is the best way? What if I do not have admin web access to the server? - 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 WAP/WML
http://www.kannel.org/ - Original Message - From: Carl Olivier [EMAIL PROTECTED] To: 'Tomcat Users List' users@tomcat.apache.org Sent: Tuesday, November 08, 2005 2:16 PM Subject: RE: Tomcat WAP/WML Hi. Great. Thanks! Is there Gateway software available though? If you wanted to set your own gateway up? Carl -Original Message- From: Jon Wingfield [mailto:[EMAIL PROTECTED] Sent: 08 November 2005 12:11 To: Tomcat Users List Subject: Re: Tomcat WAP/WML You don't need a WAP gateway. The mobile operator's have them and they proxy the browser request :) You just need to make sure the wml you vend is valid and sent with the correct mime type and the operator's gateway will do the rest (conversion to wmlc, a wbxml tokenized version of the markup). HTH, Jon Carl Olivier wrote: Thanks! Appreciate that. -Original Message- From: t.n.a. [mailto:[EMAIL PROTECTED] Sent: 08 November 2005 11:54 To: Tomcat Users List Subject: Re: Tomcat WAP/WML Carl Olivier wrote: Hi. Thanks for the info - but I was actually wonderin about the whole WAP gateway - generating the different presentation layers is no problem - however the protocol handler? Maybe I should go do more reading - but I assume a WAP gateway is required in order to process the WAP stacck to HTTP stack and send to the web server? I see your point. I'll forward your query to my colleagues and see what they have to say about it. t.n.a. - 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] - 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]
upgrading a war file
Hi, I have a servlet deployed on my tomcat server. What are the options of upgrading this servlet (I have a new war file)? Which is the best way? What if I do not have admin web access to the server? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
NPE in init()
Hello, I'm new here, so all the normal disclaimers... I wrote a servlet and needed to read some configuration, so I overrode init(ServletConfig config). I forgot to invoke super(config) and then tried invoking getServletContext() and got a NPE. It took me some (a lot actually) time to figure out why... My question is why can't a descriptive exception be thrown when invoking anything that presumes that config is set? I refer to GenericServlet, where a few methods rely on getServletConfig() to return a non-null value, and act on it. TMHO the return value should be checked and a descriptive exception be thrown (servlet should be initialized or whatever), instead of the NPE. Thanks, Zohar. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
WAR versions
Hello, I was wondering what is the best way to indicate a war file's version. Should the file's name indicate it (e.g., bla_1.3.2.war), and/or should the manifest in META-INF include an entry for it? Thanks, Zohar. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: WAR versions
any standard entry for that? - Original Message - From: David Delbecq [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Thursday, October 20, 2005 4:47 PM Subject: Re: WAR versions manifest as name of .war is used by tomcat during deployement to name the webapp :) Zohar Amir a écrit : Hello, I was wondering what is the best way to indicate a war file's version. Should the file's name indicate it (e.g., bla_1.3.2.war), and/or should the manifest in META-INF include an entry for it? Thanks, Zohar. - 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]