Re: img tag with action as src
Michael McGrady [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] At 10:13 AM 2/3/2004, Greg Blomquist wrote: I apologize in advance if this question has already been answered somewhere. Looks like basebeans is down so I can't search the struts-user archives. I'm trying to do the following: img src=/some/dir/myAction.do The only problem is that it doesn't like the relative path. Your question indicates some misunderstanding is going on. The path is irrelevant, since the controller will take the action no matter what. And your response indicates some inability to read a message board. At 1:48PM on 2/3/2004, I posted a message in this thread with SOLVED appended to the subject. Of course, your post occured just 10 minutes after mine did. So, perhaps cyberspace time delay could account for you having not seen my post. With the help of Ben Anderson, I was able to figure out that I should be using the path attribute of the html:img tag instead of the src attribute. At least, this is what fixed my problem. So, my final assumption is that img src=/some/path/myAction.do or even html:img src=/some/path/myAction.do/ will not work. Instead, one my use html:img path=/some/path/myAction.do/. I'm not sure if this has to do with the fact that in using the src attribute, you're telling the container (or browser, or controller) that it's an exisiting _filesystem_ path, vs. some virtual path. All I know if that src didn't work, and path did work. Thanks for the post anyhow. - Greg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: img tag with action as src
Well, Mr. Greg Bloomquist, Ben Anderson is not correct on that point, if you cite him correctly. You can use the src attribute fine. I do it all the time. I explore this more below. You said: With the help of Ben Anderson, I was able to figure out that I should be using the path attribute of the html:img tag instead of the src attribute. At least, this is what fixed my problem. So, my final assumption is that img src=/some/path/myAction.do or even html:img src=/some/path/myAction.do/ will not work. This is not correct. My original response is correct. The use of .do is the important thing and that will take the request to the controller for processing. So, you are not seeing what the problem is. You seem a bit put out about my answer and expect me to spend my time monitoring all your messages, apparently, so as not to hurt your feelings or something. I cannot promise that kind of dedication to you, I would still be happy to help you get this right, if you would like. Just so you don't think this is merely arrogance, you can go to www.michaelmcgrady.com, look at the src attribute on the opening page under the source obtained from View in your browser, if you are using Internet Explorer for direct proof that your conclusions are mistaken. Notice that I use .MICHAELMcGRADY instead of .do. Okay? Peace, shalom, namaste, handshake? LOL Relax a little man. Try going wo, woo, w, a bit. Remember that URLs are just file finding devices and that when you use .do, the URL part of that device is rendered essentially irrelevant. I am quite serious that I would like to help you and quite serious that you need to chill a bit. Michael Mcgrady I nstead, one my use html:img path=/some/path/myAction.do/. I'm not sure if this has to do with the fact that in using the src attribute, you're telling the container (or browser, or controller) that it's an exisiting _filesystem_ path, vs. some virtual path. All I know if that src didn't work, and path did work. Thanks for the post anyhow. - Greg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: img tag with action as src
Just to save you time looking, Greg Bloomquist, here is the tag that works: IMG height=18 alt=Powered by Struts src=RESOURCE.MICHAELMcGRADY?file_type=giffile_name=struts-power.gif Okay dokay? Not trying to beat a dead horse or get one to float when led to water but just letting you know how it is, because code that works for the wrong reason is likely to come back and on the Michael McGrady At 07:49 AM 2/6/2004, you wrote: So, my final assumption is that img src=/some/path/myAction.do or even html:img src=/some/path/myAction.do/ will not work. Instead, one my use html:img path=/some/path/myAction.do/. I'm not sure if this has to do with the fact that in using the src attribute, you're telling the container (or browser, or controller) that it's an exisiting _filesystem_ path, vs. some virtual path. All I know if that src didn't work, and path did work. Thanks for the post anyhow. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: img tag with action as src
Greg, maybe the best way to help you with this is to give you the simple view solution and just forget the fancy stuff. If so, here is the URL: http://jakarta.apache.org/struts/userGuide/struts-html.html#img. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: img tag with action as src
Greg use the html:base/ Tag. Then Struts appends the base uri like http://localhost:/MyApp/ to your relative path. Your image might be then img src=/some/dir/mypicture.jpg Manfred Greg Blomquist wrote: I apologize in advance if this question has already been answered somewhere. Looks like basebeans is down so I can't search the struts-user archives. I'm trying to do the following: img src=/some/dir/myAction.do The only problem is that it doesn't like the relative path. I have to code the absolute path: img src=http://localhost:/MyApp/some/dir/myAction.do; Which is fine until I move to production. Is there a way to use a relative path when using an action for the src attribute of an image tag? Thanks! Btw, I'm running WSAD 5.1 and the error message I get when trying a relative path is: Virtual Host/WebGroup Not Found : The web group /secure/isa/performance/graph.do has not been defined - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- === Dipl.-Inf. Manfred Wolff --- phone neusta : +49 421 20696-27 phone : +49 421 534522 mobil : +49 178 49 18 434 eFax : +49 1212 6 626 63 965 33 --- Diese E-Mail enthält möglicherweise vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail ist nicht gestattet. This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorised copying, disclosure or distribution of the material in this e-mail is strictly forbidden. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: img tag with action as src
Thanks for the speedy reply. However, that doesn't seem to solve the problem I'm having. I'm receiving the same error as before after adding the html:base/ tag to the HEAD section of my page. Do I need to fill in any attributes to the base tag? Also, the problem I'm having might be related to the fact that I'm trying to call an action to generate the image for the img tag. I'm not directly referencing an existing .JPG or .GIF file. Could that play a part in this? Thanks again... Greg Manfred Wolff [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Greg use the html:base/ Tag. Then Struts appends the base uri like http://localhost:/MyApp/ to your relative path. Your image might be then img src=/some/dir/mypicture.jpg Manfred Greg Blomquist wrote: I apologize in advance if this question has already been answered somewhere. Looks like basebeans is down so I can't search the struts-user archives. I'm trying to do the following: img src=/some/dir/myAction.do The only problem is that it doesn't like the relative path. I have to code the absolute path: img src=http://localhost:/MyApp/some/dir/myAction.do; Which is fine until I move to production. Is there a way to use a relative path when using an action for the src attribute of an image tag? Thanks! Btw, I'm running WSAD 5.1 and the error message I get when trying a relative path is: Virtual Host/WebGroup Not Found : The web group /secure/isa/performance/graph.do has not been defined - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- === Dipl.-Inf. Manfred Wolff --- phone neusta : +49 421 20696-27 phone : +49 421 534522 mobil : +49 178 49 18 434 eFax : +49 1212 6 626 63 965 33 --- Diese E-Mail enthält möglicherweise vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail ist nicht gestattet. This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorised copying, disclosure or distribution of the material in this e-mail is strictly forbidden. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: img tag with action as src
if img src=/some/dir/myAction.dodoens't work for you, then adding an base tag isn't going to help you. You just need to add your application context in there. Check out: http://jakarta.apache.org/struts/userGuide/struts-html.html#img Also here's another archive site: http://marc.theaimsgroup.com -Ben From: Manfred Wolff [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: Re: img tag with action as src Date: Tue, 03 Feb 2004 19:27:03 +0100 Greg use the html:base/ Tag. Then Struts appends the base uri like http://localhost:/MyApp/ to your relative path. Your image might be then img src=/some/dir/mypicture.jpg Manfred Greg Blomquist wrote: I apologize in advance if this question has already been answered somewhere. Looks like basebeans is down so I can't search the struts-user archives. I'm trying to do the following: img src=/some/dir/myAction.do The only problem is that it doesn't like the relative path. I have to code the absolute path: img src=http://localhost:/MyApp/some/dir/myAction.do; Which is fine until I move to production. Is there a way to use a relative path when using an action for the src attribute of an image tag? Thanks! Btw, I'm running WSAD 5.1 and the error message I get when trying a relative path is: Virtual Host/WebGroup Not Found : The web group /secure/isa/performance/graph.do has not been defined - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- === Dipl.-Inf. Manfred Wolff --- phone neusta : +49 421 20696-27 phone : +49 421 534522 mobil : +49 178 49 18 434 eFax : +49 1212 6 626 63 965 33 --- Diese E-Mail enthält möglicherweise vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail ist nicht gestattet. This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorised copying, disclosure or distribution of the material in this e-mail is strictly forbidden. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Find high-speed net deals comparison-shop your local providers here. https://broadband.msn.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: img tag with action as src
Could that play a part in this? nope From: Greg Blomquist [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Re: img tag with action as src Date: Tue, 3 Feb 2004 13:38:38 -0500 Thanks for the speedy reply. However, that doesn't seem to solve the problem I'm having. I'm receiving the same error as before after adding the html:base/ tag to the HEAD section of my page. Do I need to fill in any attributes to the base tag? Also, the problem I'm having might be related to the fact that I'm trying to call an action to generate the image for the img tag. I'm not directly referencing an existing .JPG or .GIF file. Could that play a part in this? Thanks again... Greg Manfred Wolff [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Greg use the html:base/ Tag. Then Struts appends the base uri like http://localhost:/MyApp/ to your relative path. Your image might be then img src=/some/dir/mypicture.jpg Manfred Greg Blomquist wrote: I apologize in advance if this question has already been answered somewhere. Looks like basebeans is down so I can't search the struts-user archives. I'm trying to do the following: img src=/some/dir/myAction.do The only problem is that it doesn't like the relative path. I have to code the absolute path: img src=http://localhost:/MyApp/some/dir/myAction.do; Which is fine until I move to production. Is there a way to use a relative path when using an action for the src attribute of an image tag? Thanks! Btw, I'm running WSAD 5.1 and the error message I get when trying a relative path is: Virtual Host/WebGroup Not Found : The web group /secure/isa/performance/graph.do has not been defined - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- === Dipl.-Inf. Manfred Wolff --- phone neusta : +49 421 20696-27 phone : +49 421 534522 mobil : +49 178 49 18 434 eFax : +49 1212 6 626 63 965 33 --- Diese E-Mail enthält möglicherweise vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail ist nicht gestattet. This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorised copying, disclosure or distribution of the material in this e-mail is strictly forbidden. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ What are the 5 hot job markets for 2004? Click here to find out. http://msn.careerbuilder.com/Custom/MSN/CareerAdvice/WPI_WhereWillWeFindJobsIn2004.htm?siteid=CBMSN3006sc_extcmp=JS_wi08_dec03_hotmail1 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: img tag with action as src SOLVED
That's it! html:img page=myAction.do/ I knew that struts taglib had a way to do what I wanted, I just couldn't remember what it was... Thanks Ben! Ben Anderson [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] if img src=/some/dir/myAction.dodoens't work for you, then adding an base tag isn't going to help you. You just need to add your application context in there. Check out: http://jakarta.apache.org/struts/userGuide/struts-html.html#img Also here's another archive site: http://marc.theaimsgroup.com -Ben From: Manfred Wolff [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: Re: img tag with action as src Date: Tue, 03 Feb 2004 19:27:03 +0100 Greg use the html:base/ Tag. Then Struts appends the base uri like http://localhost:/MyApp/ to your relative path. Your image might be then img src=/some/dir/mypicture.jpg Manfred Greg Blomquist wrote: I apologize in advance if this question has already been answered somewhere. Looks like basebeans is down so I can't search the struts-user archives. I'm trying to do the following: img src=/some/dir/myAction.do The only problem is that it doesn't like the relative path. I have to code the absolute path: img src=http://localhost:/MyApp/some/dir/myAction.do; Which is fine until I move to production. Is there a way to use a relative path when using an action for the src attribute of an image tag? Thanks! Btw, I'm running WSAD 5.1 and the error message I get when trying a relative path is: Virtual Host/WebGroup Not Found : The web group /secure/isa/performance/graph.do has not been defined - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- === Dipl.-Inf. Manfred Wolff --- phone neusta : +49 421 20696-27 phone : +49 421 534522 mobil : +49 178 49 18 434 eFax : +49 1212 6 626 63 965 33 --- Diese E-Mail enthält möglicherweise vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail ist nicht gestattet. This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorised copying, disclosure or distribution of the material in this e-mail is strictly forbidden. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Find high-speed 'net deals - comparison-shop your local providers here. https://broadband.msn.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: img tag with action as src
Hi, Try using html:rewrite page=/some/dir/myAction.do/ -Original Message- From: news [mailto:[EMAIL PROTECTED] On Behalf Of Greg Blomquist Sent: 03 February 2004 23:44 To: [EMAIL PROTECTED] Subject: img tag with action as src I apologize in advance if this question has already been answered somewhere. Looks like basebeans is down so I can't search the struts-user archives. I'm trying to do the following: img src=/some/dir/myAction.do The only problem is that it doesn't like the relative path. I have to code the absolute path: img src=http://localhost:/MyApp/some/dir/myAction.do; Which is fine until I move to production. Is there a way to use a relative path when using an action for the src attribute of an image tag? Thanks! Btw, I'm running WSAD 5.1 and the error message I get when trying a relative path is: Virtual Host/WebGroup Not Found : The web group /secure/isa/performance/graph.do has not been defined - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Confidentiality Notice The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain confidential or privileged information. If you are not the intended recipient, please notify the sender at Wipro or [EMAIL PROTECTED] immediately and destroy all copies of this message and any attachments. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: img tag with action as src
At 10:13 AM 2/3/2004, Greg Blomquist wrote: I apologize in advance if this question has already been answered somewhere. Looks like basebeans is down so I can't search the struts-user archives. I'm trying to do the following: img src=/some/dir/myAction.do The only problem is that it doesn't like the relative path. Your question indicates some misunderstanding is going on. The path is irrelevant, since the controller will take the action no matter what. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: img tag with action as src
Were are attempting to do the same thing. (Have an action return an image) everything works great but we have the following error in the server log. StandardWrapperValve[action]: Servlet.service() for servlet action threw exception java.lang.IllegalStateException: getOutputStream() has already been called for this response at org.apache.catalina.connector.ResponseBase.getWriter(ResponseBase.java: 836) at org.apache.catalina.connector.ResponseFacade.getWriter(ResponseFacade.ja va:165) at javax.servlet.ServletResponseWrapper.getWriter(ServletResponseWrapper.ja va:146) at org.apache.jasper.runtime.JspWriterImpl.initOut(JspWriterImpl.java:184) at org.apache.jasper.runtime.JspWriterImpl.flushBuffer(JspWriterImpl.java: 176) at org.apache.jasper.runtime.PageContextImpl.release(PageContextImpl.java: 174) at org.apache.jasper.runtime.JspFactoryImpl.internalReleasePageContext(JspF actoryImpl.java:204) at org.apache.jasper.runtime.JspFactoryImpl.access$000(JspFactoryImpl.java: 83) at org.apache.jasper.runtime.JspFactoryImpl$PrivilegedReleasePageContext.ru n(JspFactoryImpl.java:132) at java.security.AccessController.doPrivileged(Native Method) at org.apache.jasper.runtime.JspFactoryImpl.releasePageContext(JspFactoryIm pl.java:197) We are only calling that method one in our action. Nathan On Feb 3, 2004, at 11:41 AM, Ben Anderson wrote: if img src=/some/dir/myAction.dodoens't work for you, then adding an base tag isn't going to help you. You just need to add your application context in there. Check out: http://jakarta.apache.org/struts/userGuide/struts-html.html#img Also here's another archive site: http://marc.theaimsgroup.com -Ben From: Manfred Wolff [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: Re: img tag with action as src Date: Tue, 03 Feb 2004 19:27:03 +0100 Greg use the html:base/ Tag. Then Struts appends the base uri like http://localhost:/MyApp/ to your relative path. Your image might be then img src=/some/dir/mypicture.jpg Manfred Greg Blomquist wrote: I apologize in advance if this question has already been answered somewhere. Looks like basebeans is down so I can't search the struts-user archives. I'm trying to do the following: img src=/some/dir/myAction.do The only problem is that it doesn't like the relative path. I have to code the absolute path: img src=http://localhost:/MyApp/some/dir/myAction.do; Which is fine until I move to production. Is there a way to use a relative path when using an action for the src attribute of an image tag? Thanks! Btw, I'm running WSAD 5.1 and the error message I get when trying a relative path is: Virtual Host/WebGroup Not Found : The web group /secure/isa/performance/graph.do has not been defined - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- === Dipl.-Inf. Manfred Wolff --- phone neusta : +49 421 20696-27 phone : +49 421 534522 mobil : +49 178 49 18 434 eFax : +49 1212 6 626 63 965 33 --- Diese E-Mail enthält möglicherweise vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail ist nicht gestattet. This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorised copying, disclosure or distribution of the material in this e-mail is strictly forbidden. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Find high-speed net deals comparison-shop your local providers here. https://broadband.msn.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: img tag with action as src
I think I posted the code that works for my application that does this. Are you returning null with your action? At 03:47 PM 2/3/2004, you wrote: Were are attempting to do the same thing. (Have an action return an image) everything works great but we have the following error in the server log. StandardWrapperValve[action]: Servlet.service() for servlet action threw exception java.lang.IllegalStateException: getOutputStream() has already been called for this response at org.apache.catalina.connector.ResponseBase.getWriter(ResponseBase.java: 836) at org.apache.catalina.connector.ResponseFacade.getWriter(ResponseFacade.ja va:165) at javax.servlet.ServletResponseWrapper.getWriter(ServletResponseWrapper.ja va:146) at org.apache.jasper.runtime.JspWriterImpl.initOut(JspWriterImpl.java:184) at org.apache.jasper.runtime.JspWriterImpl.flushBuffer(JspWriterImpl.java: 176) at org.apache.jasper.runtime.PageContextImpl.release(PageContextImpl.java: 174) at org.apache.jasper.runtime.JspFactoryImpl.internalReleasePageContext(JspF actoryImpl.java:204) at org.apache.jasper.runtime.JspFactoryImpl.access$000(JspFactoryImpl.java: 83) at org.apache.jasper.runtime.JspFactoryImpl$PrivilegedReleasePageContext.ru n(JspFactoryImpl.java:132) at java.security.AccessController.doPrivileged(Native Method) at org.apache.jasper.runtime.JspFactoryImpl.releasePageContext(JspFactoryIm pl.java:197) We are only calling that method one in our action. Nathan On Feb 3, 2004, at 11:41 AM, Ben Anderson wrote: if img src=/some/dir/myAction.dodoens't work for you, then adding an base tag isn't going to help you. You just need to add your application context in there. Check out: http://jakarta.apache.org/struts/userGuide/struts-html.html#img Also here's another archive site: http://marc.theaimsgroup.com -Ben From: Manfred Wolff [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: Re: img tag with action as src Date: Tue, 03 Feb 2004 19:27:03 +0100 Greg use the html:base/ Tag. Then Struts appends the base uri like http://localhost:/MyApp/ to your relative path. Your image might be then img src=/some/dir/mypicture.jpg Manfred Greg Blomquist wrote: I apologize in advance if this question has already been answered somewhere. Looks like basebeans is down so I can't search the struts-user archives. I'm trying to do the following: img src=/some/dir/myAction.do The only problem is that it doesn't like the relative path. I have to code the absolute path: img src=http://localhost:/MyApp/some/dir/myAction.do; Which is fine until I move to production. Is there a way to use a relative path when using an action for the src attribute of an image tag? Thanks! Btw, I'm running WSAD 5.1 and the error message I get when trying a relative path is: Virtual Host/WebGroup Not Found : The web group /secure/isa/performance/graph.do has not been defined - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- === Dipl.-Inf. Manfred Wolff --- phone neusta : +49 421 20696-27 phone : +49 421 534522 mobil : +49 178 49 18 434 eFax : +49 1212 6 626 63 965 33 --- Diese E-Mail enthält möglicherweise vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail ist nicht gestattet. This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorised copying, disclosure or distribution of the material in this e-mail is strictly forbidden. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Find high-speed net deals comparison-shop your local providers here. https://broadband.msn.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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL
Re: img tag with action as src
Perfect! I remember seeing that but just did not register. My bad :) On Feb 3, 2004, at 5:28 PM, Michael McGrady wrote: I think I posted the code that works for my application that does this. Are you returning null with your action? At 03:47 PM 2/3/2004, you wrote: Were are attempting to do the same thing. (Have an action return an image) everything works great but we have the following error in the server log. StandardWrapperValve[action]: Servlet.service() for servlet action threw exception java.lang.IllegalStateException: getOutputStream() has already been called for this response at org.apache.catalina.connector.ResponseBase.getWriter(ResponseBase.java : 836) at org.apache.catalina.connector.ResponseFacade.getWriter(ResponseFacade. ja va:165) at javax.servlet.ServletResponseWrapper.getWriter(ServletResponseWrapper. ja va:146) at org.apache.jasper.runtime.JspWriterImpl.initOut(JspWriterImpl.java: 184) at org.apache.jasper.runtime.JspWriterImpl.flushBuffer(JspWriterImpl.java : 176) at org.apache.jasper.runtime.PageContextImpl.release(PageContextImpl.java : 174) at org.apache.jasper.runtime.JspFactoryImpl.internalReleasePageContext(Js pF actoryImpl.java:204) at org.apache.jasper.runtime.JspFactoryImpl.access$000(JspFactoryImpl.jav a: 83) at org.apache.jasper.runtime.JspFactoryImpl$PrivilegedReleasePageContext. ru n(JspFactoryImpl.java:132) at java.security.AccessController.doPrivileged(Native Method) at org.apache.jasper.runtime.JspFactoryImpl.releasePageContext(JspFactory Im pl.java:197) We are only calling that method one in our action. Nathan On Feb 3, 2004, at 11:41 AM, Ben Anderson wrote: if img src=/some/dir/myAction.dodoens't work for you, then adding an base tag isn't going to help you. You just need to add your application context in there. Check out: http://jakarta.apache.org/struts/userGuide/struts-html.html#img Also here's another archive site: http://marc.theaimsgroup.com -Ben From: Manfred Wolff [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: Re: img tag with action as src Date: Tue, 03 Feb 2004 19:27:03 +0100 Greg use the html:base/ Tag. Then Struts appends the base uri like http://localhost:/MyApp/ to your relative path. Your image might be then img src=/some/dir/mypicture.jpg Manfred Greg Blomquist wrote: I apologize in advance if this question has already been answered somewhere. Looks like basebeans is down so I can't search the struts-user archives. I'm trying to do the following: img src=/some/dir/myAction.do The only problem is that it doesn't like the relative path. I have to code the absolute path: img src=http://localhost:/MyApp/some/dir/myAction.do; Which is fine until I move to production. Is there a way to use a relative path when using an action for the src attribute of an image tag? Thanks! Btw, I'm running WSAD 5.1 and the error message I get when trying a relative path is: Virtual Host/WebGroup Not Found : The web group /secure/isa/performance/graph.do has not been defined --- -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- === Dipl.-Inf. Manfred Wolff --- phone neusta : +49 421 20696-27 phone : +49 421 534522 mobil : +49 178 49 18 434 eFax : +49 1212 6 626 63 965 33 --- Diese E-Mail enthlt mglicherweise vertrauliche und/oder rechtlich geschtzte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtmlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail ist nicht gestattet. This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorised copying, disclosure or distribution of the material in this e-mail is strictly forbidden. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Find high-speed net deals comparison-shop your local providers here. https://broadband.msn.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