Re: What a wonderfull world ..
thanks On 12/30/06, Vijay Hatewar [EMAIL PROTECTED] wrote: WHAT A WONDERFUL WORLD I see trees of green, red roses too I see them bloom for me and you And I think to myself, what a wonderful world I see skies of blue and clouds of white The bright blessed day, the dark sacred night And I think to myself, what a wonderful world The colours of the rainbow, so pretty in the sky Are also on the faces of people going by I see friends shakin' hands, sayin' How do you do? They're really saying I love you I hear babies cryin', I watch them grow They'll learn much more than I'll ever know And I think to myself, what a wonderful world Yes, I think to myself, what a wonderful world Oh yeah Happy new Year .. Enjoy life ..Love thyself and others Thanks Regards, Vijay G Hatewar |Member of Technical Staff - TQE|Persistent Systems Pvt, Ltd., Pune.| |Ph: +91 .20 .3023.5331| Mobile: +91.9890678168| @: [EMAIL PROTECTED]| mailto:[EMAIL PROTECTED] DISCLAIMER == This e-mail may contain privileged and confidential information which is the property of Persistent Systems Pvt. Ltd. It is intended only for the use of the individual or entity to which it is addressed. If you are not the intended recipient, you are not authorized to read, retain, copy, print, distribute or use this message. If you have received this communication in error, please notify the sender and delete all copies of this message. Persistent Systems Pvt. Ltd. does not accept any liability for virus infected mails. - 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: Session sharing accros subdomains?
hy , I think that your problem is on the client side. session is maintained through cookies (well you know what i mean server discriminates session based on cookies and stores data somowhere on server) and your client will never send cookie to different server (in some cases maybe it will work but mostly not). So if you want to do this you first have to deal with this problem than you could serialize whole session data and store it somewhere in database and on new domain you can deserialize it and use it as session regards On 8/9/06, Madhur K Tanwani [EMAIL PROTECTED] wrote: I've a main website hosting domain domain.com. There are links on this page that point to response servers, which is a subdomain rs.domain.com. The problem is that when a user signs in on the domain.com and clicks on any link his session is not available on rs.domain.com. I see that this question has been asked an ample number of times on this group. I think I'm clear on the point that this is against the spec / not possible normally. What I want to ask is that whether there is something that can be done either in Tomcat / Apache / my application that will help me in this sharing of sessions. We will be using Tomcat along with Apache (for load balancing) on Linux (FC4). Awaiting responses, -- __ Madhur Kumar Tanwani - 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: Writing files accessible from a browser
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 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 technology). The Servlet can only push a String (Pushlets requirements). So my problem is where can I write the images, so they can be accessible by a URL. One easy solution, the one I use for testing, is to hardcode in my webapp the directory where the images are written. For instance TOMCAT_HOME\webapps\frames\, and in my jsp to have img src=http://myserver/frames/name.jpg where name.jpg is pushed by the servlet when this image is generated. However, this solution is not satisfactory, indeed, if I deploy my application in another place, I don't want people to edit my code to change for suitable values. I admit I could use properties or a configuration file to set these value(even if I am not sure it would work in all configuration), anyway I would like to check if using the servletcontext, or other solutions might be more appropriate. As I said a solution with the temp directory would be perfect, if this directory was accessible with a URL Hope it is clear Regards Li wrote: 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\httpdocs\images or a href=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 why I am looking for an approach using the webapp context, so I don't have to worry about the OS, or the port, or whatever configuration. Anyway thanks for your help Regards Romain Li wrote: 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 $APACHE_HOME\httpdocs\images\1.jpg (assume, you had defined APACHE_HOME, make sure the images folder is read/write only for the user/group that runs tomcat 2. Make sure apache is on ... 3. in your jsp: use e.g. a href=http://yourdomain/images/1.jpg;click to view/a Wish it helps On 8/7/06, Romain Quilici [EMAIL PROTECTED] wrote: 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 imagePath = path+../image_dir/ and use the imagePath to create my images, then in my jsp something like request.getContextPath()/../image_dir/image1.jpg But I am not sure this approach works in all configurations, particularly if my webapp is deployed inside a war. Thanks Romain Li wrote: if you have apache server, you can write file to its home dir, and then use http://youdomain/image_dir/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 problem. I need to write files on the file system that can be accessible with a browser(I write images). - The most reliable solution I found was to use the webapp's tmp directory, unfortunately this directory is not accessible with a URL. - Another solution would be to write these images under my webapp root(or in another place under my webapp). But it seems that this approach does not work with webapps deployed in a war file. Indeed you cannot write inside wars like this. I don't want to rely on some hardcoded solutions. There is still the possibility to pass the absolute path to the directory (let's say TOMCAT_HOME/webapps/myimages/) and later, use inside my JSP request.getContextPath()/../myimages/image1.jpg, but I think this solution won't work in many configurations Thanks a lot for your help Regards Romain - 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: Writing files accessible from a browser
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 but I am not shure about filesystem regards On 8/7/06, Romain Quilici [EMAIL PROTECTED] wrote: 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 = getContext().getRealPath(/); then String imagePath = path+../imagedir; would work so I am writting in a separate directory outside my webapp. In case I use war file, this solution might still works Regards Almir Kazazic wrote: 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 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 technology). The Servlet can only push a String (Pushlets requirements). So my problem is where can I write the images, so they can be accessible by a URL. One easy solution, the one I use for testing, is to hardcode in my webapp the directory where the images are written. For instance TOMCAT_HOME\webapps\frames\, and in my jsp to have img src=http://myserver/frames/name.jpg where name.jpg is pushed by the servlet when this image is generated. However, this solution is not satisfactory, indeed, if I deploy my application in another place, I don't want people to edit my code to change for suitable values. I admit I could use properties or a configuration file to set these value(even if I am not sure it would work in all configuration), anyway I would like to check if using the servletcontext, or other solutions might be more appropriate. As I said a solution with the temp directory would be perfect, if this directory was accessible with a URL Hope it is clear Regards Li wrote: 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\httpdocs\images or a href=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 why I am looking for an approach using the webapp context, so I don't have to worry about the OS, or the port, or whatever configuration. Anyway thanks for your help Regards Romain Li wrote: 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 $APACHE_HOME\httpdocs\images\1.jpg (assume, you had defined APACHE_HOME, make sure the images folder is read/write only for the user/group that runs tomcat 2. Make sure apache is on ... 3. in your jsp: use e.g. a href=http://yourdomain/images/1.jpg;click to view/a Wish it helps On 8/7/06, Romain Quilici [EMAIL PROTECTED] wrote: 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 imagePath = path+../image_dir/ and use the imagePath to create my images, then in my jsp something like request.getContextPath()/../image_dir/image1.jpg But I am not sure this approach works in all configurations, particularly if my webapp is deployed inside a war. Thanks Romain Li wrote: if you have apache server, you can write file to its home dir, and then use http://youdomain/image_dir/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 problem. I need to write files on the file system that can be accessible with a browser(I write images
Re: howto deal with war files if context.xml needs configration?
where can I find more information about old way ? On 8/7/06, Mikolaj Rydzewski [EMAIL PROTECTED] wrote: Holger Klawitter wrote: I have written a webapplication with I would like to distribute as a war file amongst a few hosts. There is a resource in the context file which needs some individual configuration per server. * I used to unpack directly into the webapps directory and doing the configuration in the true context.xml file. * As far as I understand, this approach is no longer recommended and causes more an more problems with every new tomcat version. You can define them in server.xml. The 'old way' with embeding Context inside Host in server.xml. -- Mikolaj Rydzewski [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: logging url of page
Hi Filip, problem with error page is that in most cases it (if headers have been sent to the client and that happens for me very very often ) simply throws invalidStateException and user sees only half of the rendered page. Can this be changed by any means regards almir On 8/6/06, Filip Hanik - Dev Lists [EMAIL PROTECTED] wrote: Almir Kazazic wrote: Hi , I am using tomcat 5.5 with log4j to log my errors, and it works great, but it would be of great help if I could get information about URL of errror, this way I could reproduce it and remove much faster, I want to have this code on a single place and not for every exception in application Using errorpage wont work anyhow (as it throws invalidStateExeption or something similar). using error page will work, as you can specify Exception error pages, not just codes, take a look at a web.xml tutorial I have my own exceptions which are used through whole application as well a single place to call log.fatal and other logger methods, and this is only place where I could put code in single place and use it through whole application. What I would like to have is something like tomcat.Context.getCurrentContext().getUrl, or something like that, where I could, by using some static methods get to context or similar objects which could tell me about my location. thanks almir - 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]
logging url of page
Hi , I am using tomcat 5.5 with log4j to log my errors, and it works great, but it would be of great help if I could get information about URL of errror, this way I could reproduce it and remove much faster, I want to have this code on a single place and not for every exception in application Using errorpage wont work anyhow (as it throws invalidStateExeption or something similar). I have my own exceptions which are used through whole application as well a single place to call log.fatal and other logger methods, and this is only place where I could put code in single place and use it through whole application. What I would like to have is something like tomcat.Context.getCurrentContext().getUrl, or something like that, where I could, by using some static methods get to context or similar objects which could tell me about my location. thanks almir - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]