Re: Writing to response and issuing sendError

2012-11-28 Thread Michael-O
Am 2012-11-28 21:41, schrieb Caldarale, Charles R: From: Michael-O [mailto:1983-01...@gmx.net] Subject: Writing to response and issuing sendError The exception is thrown out to the console but the response is still written. As it should be - it's already committed, and may well have been del

Re: Writing to response and issuing sendError

2012-11-28 Thread Michael-O
Am 2012-11-28 21:39, schrieb Mark Thomas: On 28/11/2012 20:34, Michael-O wrote: Hi, I am having again trouble with the respone.sendError method. The docs say that an IllegalStateException is thrown if response has already been committed. So this should cause an exception: protected void doGet(

RE: Writing to response and issuing sendError

2012-11-28 Thread Caldarale, Charles R
> From: Michael-O [mailto:1983-01...@gmx.net] > Subject: Writing to response and issuing sendError > The exception is thrown out to the console but the response is still > written. As it should be - it's already committed, and may well have been delivered. > If I leave out the flush (which com

Re: Writing to response and issuing sendError

2012-11-28 Thread Mark Thomas
On 28/11/2012 20:34, Michael-O wrote: > Hi, > > I am having again trouble with the respone.sendError method. The docs > say that an IllegalStateException is thrown if response has already been > committed. So this should cause an exception: > > protected void doGet(HttpServletRequest request, Htt

Re: Writing a custom resource factory

2012-03-16 Thread Felix Schumacher
Am 16.03.2012 09:34, schrieb 1983-01...@gmx.net: Am 16.03.2012 08:24, schrieb Felix Schumacher: > Am 15.03.2012 21:54, schrieb Michael-O: >> Hi folks, >> >> I'd like to write a custom ldap resource factory as same as a data >> source factory. The getObjectInstance method shall return >> Initial

Re: Writing a custom resource factory

2012-03-16 Thread 1983-01-06
> Am 16.03.2012 08:24, schrieb Felix Schumacher: > > Am 15.03.2012 21:54, schrieb Michael-O: > >> Hi folks, > >> > >> I'd like to write a custom ldap resource factory as same as a data > >> source factory. The getObjectInstance method shall return > >> InitialDirContext object. I have written a moc

Re: Writing a custom resource factory

2012-03-16 Thread Felix Schumacher
Am 16.03.2012 08:24, schrieb Felix Schumacher: Am 15.03.2012 21:54, schrieb Michael-O: Hi folks, I'd like to write a custom ldap resource factory as same as a data source factory. The getObjectInstance method shall return InitialDirContext object. I have written a mock factory and noticed that

Re: Writing a custom resource factory

2012-03-16 Thread Felix Schumacher
Am 15.03.2012 21:54, schrieb Michael-O: Hi folks, I'd like to write a custom ldap resource factory as same as a data source factory. The getObjectInstance method shall return InitialDirContext object. I have written a mock factory and noticed that the output is cached by Tomcat. So the object is

Re: writing logs on a separate server while the project as jar file

2011-01-25 Thread Konstantin Kolinko
2011/1/25 Christopher Schultz : > >> What exactly I need is something that is the standard way to write logs to a >> server where there are many Java application are deployed as separate jar >> file and is being used by the tibco processes. > > If you can't get access to the servlet container to pe

Re: writing logs on a separate server while the project as jar file

2011-01-24 Thread Prashant Rajput
Thanks for your reply. On Mon, Jan 24, 2011 at 7:05 PM, Christopher Schultz < ch...@christopherschultz.net> wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Prashant, > > On 1/24/2011 8:25 PM, Prashant Rajput wrote: > > I am not using console output, its the latest version of stable l

Re: writing logs on a separate server while the project as jar file

2011-01-24 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Prashant, On 1/24/2011 8:25 PM, Prashant Rajput wrote: > I am not using console output, its the latest version of stable log4j > release. Log4j can be configured to log to as many places as you want. I agree with Chuck: this has absolutely nothing t

RE: writing logs on a separate server while the project as jar file

2011-01-24 Thread Caldarale, Charles R
> From: Prashant Rajput [mailto:praj...@infocepts.com] > Subject: Re: writing logs on a separate server while the project as jar file > The application is not deployed as a complete web application as > this is being used inside the processes of tibco. Let's back up a ste

Re: writing logs on a separate server while the project as jar file

2011-01-24 Thread Prashant Rajput
Hi, I am not using console output, its the latest version of stable log4j release. The application is not deployed as a complete web application as this is being used inside the processes of tibco. So the TIBCO processes used this application to generate the query, by simply giving in the inputs

RE: writing logs on a separate server while the project as jar file

2011-01-22 Thread Caldarale, Charles R
> From: Prashant Rajput [mailto:praj...@infocepts.com] > Subject: writing logs on a separate server while the project as jar file > I am deploying my Java application on tibco server and > this server has its own log configuration. When I try to > write log on this server I have to write separat

Re: Writing errors to localhost log

2010-06-23 Thread Pid
On 22 Jun 2010, at 14:55, laredotornado wrote: > > Hi, > > I'm using Tomcat 6.0.26. I notice that when I define an error page for my > JSPs > > <%@ page errorPage="/error-pages/500.jsp" %> > > The error page gets called properly, but the stack trace of the error is no > longer written to my

Re: Writing to client aborted or client network problems...

2010-03-01 Thread Pid
On 01/03/2010 12:59, Munirathinavel wrote: Hi to all... I'm using apache2.2 + tomcat6.0.18 + mod_jk1.2.28 for our portal.While doing load test with 20& more users, I try to access the application through browser but pages are getting loaded and in mod_jk.log file I'm getting the following mess

Re: Writing a proxy transformation servlet.

2009-01-19 Thread Karl San Gabriel
sandy8531 wrote: Hi, I need to set up a proxy-server-with-transformation that frontends the clients and transforms the incoming request (HTTP post) and forwards it to the actual application server, and then get a response back and transforms it back into data format that the client understands a

Re-writing

2007-07-26 Thread Jurian Botha
w that it has to take this re-write into account. Any direction would be appreciated. -- View this message in context: http://www.nabble.com/Re-writing-tf4152537.html#a11813492 Sent from the Tomcat - User mailing list archive at Nabble.com. -

Re: Writing My Own Connector

2007-03-02 Thread Peter Kennard
Thanks very much! The big hope is all the socket connection and thread pool management "wheel re-inventing" etc is "done" and I can do it mostly "high level" except for the interpreting of the input protocol byte streams. Have it do somehing like: ProtocolConnectorThread.onListenerConnect(i

Re: Writing My Own Connector

2007-03-02 Thread Bill Barker
"Peter Kennard" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > would definately be someting to do. > one has to wade through a lot of stuff to get to that point :) > I have to find out where what defines a connector is, how it is installed > and configured ... > Well, the first t

Re: Writing My Own Connector

2007-03-02 Thread Peter Kennard
would definately be someting to do. one has to wade through a lot of stuff to get to that point :) I have to find out where what defines a connector is, how it is installed and configured ... So what people are saying is "get the source and build it" as step #1 ?? At 16:38 3/2/2007, you wrote:

Re: Writing My Own Connector

2007-03-02 Thread Hassan Schroeder
On 3/2/07, Peter Kennard <[EMAIL PROTECTED]> wrote: What I would like to do is take an AJP connector, redo it's insides to parse another format and then pass the requests off to servlets. Seems to me that looking at the differences in source between two connectors (e.g. AJP and HTTP) would be

Re: Writing My Own Connector

2007-03-02 Thread Peter Kennard
I think the existing connectors in tomcat source could be the only existing documentation :) Not a good sign for them being "officially" supported. Has anyone here made one? What I would like to do is take an AJP connector, redo it's insides to parse another format and then pass the request

Re: Writing My Own Connector

2007-03-02 Thread David Delbecq
Peter Kennard a écrit : > I want to write my own "protocol handler" which I can configure as a > connector. I want it to do something along the lines of AJP - packet > hits in, servlet hits out. > > B - I want a good reference on what class I need to subclass, how to > use it and what are consi

RE: Writing a text file back to browser from a servlet

2006-10-18 Thread Tim Lucia
g File->Save As gives unpredictable results. Tim -Original Message- From: David Kerber [mailto:[EMAIL PROTECTED] Sent: Monday, October 16, 2006 8:23 PM To: Tomcat Users List Subject: Re: Writing a text file back to browser from a servlet This worked, though not exactly how I expecte

Re: Writing a text file back to browser from a servlet

2006-10-16 Thread David Kerber
This worked, though not exactly how I expected. The "save file as..." box comes up and works, but is there a way of showing the file in the browser screen as well? Right now, it keeps the previous page displayed while prompting to save the download. I can live with that if I have to, but it

Re: Writing a text file back to browser from a servlet

2006-10-14 Thread David Kerber
Thanks, Tim - I'll give that a try later today. Dave Tim Lucia wrote: You could stream it directly to the user, if practical (why write to a temp file only to stream that back to the user?) In order to be recognized by the browser as text and an attachment, you should: response.setContentTy

RE: Writing a text file back to browser from a servlet

2006-10-14 Thread Tim Lucia
You could stream it directly to the user, if practical (why write to a temp file only to stream that back to the user?) In order to be recognized by the browser as text and an attachment, you should: response.setContentType("text/plain; charset=UTF-8"); response.setHeader("Content-disposition", "

Re: Writing Web.xml & Context.xml at Runtime

2006-08-19 Thread Renaud Waldura
I believe this is just what the Administration webapp does. Available at /admin on your default Tomcat install. - Original Message - From: "Feris Thia" <[EMAIL PROTECTED]> To: "Tomcat Users List" Sent: Friday, August 18, 2006 9:56 PM Subject: Writing Web.xml & Context.xml at Runtime

Re: Writing files accessible from a browser

2006-08-07 Thread Romain Quilici
Hi all, thanks a lot for all solutions proposed. I think I am going create the directory within my webapp, but without symbolic link, as my images are temporary files. So even if the directory is deleted it really does not matter Thanks again Romain Li wrote: you are right Moises, if you really

Re: Writing files accessible from a browser

2006-08-07 Thread Li
you are right Moises, if you really wanna write to somewhere within the webapp deploy folder, a better is to make a soft symbol link point to the directory that stores the image, /webapps --- ---> /tmp/images/ so next time update the war, even the folder is

Re: Writing files accessible from a browser

2006-08-07 Thread Len Popp
So, you need a directory where you can write files and serve them to the web, and you don't want that directory to be hard-coded in your application. First, you need a way to specify the directory when the app is installed. (In general your app may need a bunch of configuration settings.) There a

Re: Writing files accessible from a browser

2006-08-07 Thread Moises Lejter
I had a similar question, earlier... There is another issue here: you are right that WAR files are expanded back into a folder - at least by default - so one could still create a folder within the web app to write to, and which is visible to browsers... Until one deploys an updated WAR file.

RE: Writing files accessible from a browser

2006-08-07 Thread Tim Lucia
mailto:[EMAIL PROTECTED] > Sent: Monday, August 07, 2006 5:32 AM > To: Tomcat Users List > Subject: Re: Writing files accessible from a browser > > You can use a servlet init param inside web.xml for avoiding hardcoded > solutions. > e.g. > > MY_PATH > c:\my\path\

Re: Writing files accessible from a browser

2006-08-07 Thread Mohsen Saboorian
You can use a servlet init param inside web.xml for avoiding hardcoded solutions. e.g. MY_PATH c:\my\path\to\imgs On 8/7/06, Romain Quilici <[EMAIL PROTECTED]> wrote: Hi, Hope I will be clear enough: One part of my web application receives encodes stream that it has to convert to jpg images.

Re: Writing files accessible from a browser

2006-08-07 Thread Li
hi, 1. even you deploy as war, later after start tomcat, it will still generate a folder that actually tomcat uses normally. so in this case, you still be able to use context path to write 2. if you wanna avoid other people modiy, you can create script/IO stream object that generates folder befor

Re: Writing files accessible from a browser

2006-08-07 Thread Almir Kazazic
Oh I see, something like that , i do not think taht this will work String imagePath = path+"../imagedir"; but you will have to either convert path to instance of directory object, or chop of the end by some string functions , using String imagePath = path+"../imagedir"; as path works for browser

Re: Writing files accessible from a browser

2006-08-07 Thread Romain Quilici
I agree with you, but getContext().getRealPath("/"), will return the path to my webapp root, so it means I am going to create my image dir under my webapp, which is fine unless my application is deployed in a war file. In such case I won't be able to write in my webapp. Maybe using String path

Re: Writing files accessible from a browser

2006-08-07 Thread Almir Kazazic
Hi, to avoid using absolut paths you can find that out on runtime by getContext().getRealPath("/") - will return your path to the root regards On 8/7/06, Romain Quilici <[EMAIL PROTECTED]> wrote: Hi, Hope I will be clear enough: One part of my web application receives encodes stream that it

Re: Writing files accessible from a browser

2006-08-07 Thread Romain Quilici
Hi, Hope I will be clear enough: One part of my web application receives encodes stream that it has to convert to jpg images. When an image is written on the server, it notifies a Servlet which pushes the name (or the url) of the newly generated image inside client browser(thanks to pushlets

Re: Writing files accessible from a browser

2006-08-07 Thread Li
Hi, It is not advisable to make your webapp dir writable, can you tell me what exactly would you like to achieve so that I may get more info to help out ... On 8/7/06, Romain Quilici <[EMAIL PROTECTED]> wrote: Hi, thanks for the advice, But I want to avoid harcoded links such as $APACHE_HOME\

Re: Writing files accessible from a browser

2006-08-07 Thread Romain Quilici
Hi, thanks for the advice, But I want to avoid harcoded links such as $APACHE_HOME\httpdocs\images or http://yourdomain/images/1.jpg";> in my jsp. Indeed I don't want to modify these values if I decide Tomcat to run on another port, or to install Tomcat in another directory or even OS. That is

Re: Writing files accessible from a browser

2006-08-06 Thread Li
Hi, Here are few steps of achieving it (just tested, and it works): 1. use FileOutputStream or any output streaming object to write a image file into the directory in Windows, the path string should look like: "c:\apache_home\httpdocs\images\1.jpg" in unix/linux, the path should look like

Re: Writing files accessible from a browser

2006-08-06 Thread Romain Quilici
Thanks for the answer, this solution was part of my investigation, and was actually the first idea I had. The problem with this approach is I don't know how to access the /image_dir/ from within my web application. Maybe using something like String path = servletContext.getRealPath("/"); String

Re: Writing files accessible from a browser

2006-08-06 Thread Li
if you have apache server, you can write file to its home dir, and then use http:image_name.suffix to view. On 8/7/06, Romain Quilici <[EMAIL PROTECTED]> wrote: Hi all, I have been reading several messages about writing files inside a web application, but I found no answer regarding my probl

Re: writing files with a web application

2006-01-24 Thread David Smith
Glen Mazza wrote: > Peter Crowther wrote: > >>> From: SOA Work [mailto:[EMAIL PROTECTED] >> >> >> >> Check the Servlet Spec (version 2.4 is at >> http://www.jcp.org/aboutJava/communityprocess/final/jsr154/ >> ) for questions of this kind. >> >>> From memory in both cases (so treat with caution):

Re: writing files with a web application

2006-01-23 Thread Markus Schönhaber
Peter Crowther wrote: > > From: SOA Work [mailto:[EMAIL PROTECTED] > > Check the Servlet Spec (version 2.4 is at > http://www.jcp.org/aboutJava/communityprocess/final/jsr154/ > ) for questions of this kind. > > From memory in both cases (so treat with caution): > > 1.) am I allowed to call main met

Re: writing files with a web application

2006-01-23 Thread Glen Mazza
Peter Crowther wrote: From: SOA Work [mailto:[EMAIL PROTECTED] Check the Servlet Spec (version 2.4 is at http://www.jcp.org/aboutJava/communityprocess/final/jsr154/ ) for questions of this kind. From memory in both cases (so treat with caution): 1.) am I allowed to call main methods or p

RE: writing files with a web application

2006-01-23 Thread Peter Crowther
> From: SOA Work [mailto:[EMAIL PROTECTED] Check the Servlet Spec (version 2.4 is at http://www.jcp.org/aboutJava/communityprocess/final/jsr154/ ) for questions of this kind. >From memory in both cases (so treat with caution): > 1.) am I allowed to call main methods or programms in my web > ap