Re: Application Context Access
concerning my own question: so far i realized that it has to do with my mapping somehow. before i had mapped *.do to my actionservlet and then images/someimg.gif worked and now, as i switched over to use /do/ for mapping, it doesn't work anymore with images/someimg.gif and i have to use MyApp/images/someimg.gif... any ideas, suggestions? thanks! _ Testen Sie MSN Messenger für Ihren Online-Chat mit Freunden: http://messenger.msn.de -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Application Context Access
This may not be the problem, but are you using html:base? Reason I ask: html:base and putting jsp under WEB-INF do not play well together. In fact, according to the spec, they should not play at all. James Mitchell Software Engineer\Struts Evangelist Struts-Atlanta, the Open Minded Developer Network http://www.open-tools.org/struts-atlanta -Original Message- From: petra staub [mailto:[EMAIL PROTECTED]] Sent: Monday, August 26, 2002 7:47 AM To: [EMAIL PROTECTED] Subject: Re: Application Context Access concerning my own question: so far i realized that it has to do with my mapping somehow. before i had mapped *.do to my actionservlet and then images/someimg.gif worked and now, as i switched over to use /do/ for mapping, it doesn't work anymore with images/someimg.gif and i have to use MyApp/images/someimg.gif... any ideas, suggestions? thanks! _ Testen Sie MSN Messenger für Ihren Online-Chat mit Freunden: http://messenger.msn.de -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Application Context Access
No, currently I use no struts related taglib only pure JSTL. But maybe someone can simply explain me, what is actually going on... ;) if i have following mapping in web.xml servlet-mapping servlet-nameaction/servlet-name url-pattern/do/*/url-pattern /servlet-mapping i thought that *only* url which meet this pattern are processed by the action servlet, such as ...MyApp/do/callMyAction. if i now have in my html code something like img src=images/myIcon.gif why is it somehow processed/influenced by my mapping? normally, this image (myIcon.gif) should be directly accessible (the directory is in the root of the application) through this relative path, isnt it? however...of course i could add everywhere the application name in front (img src=/MyApp/images/myIcon.gif) but what seems to me quite a work-around i dont like really... _ Senden und empfangen Sie MSN Hotmail über Ihren PocketPC: http://pocketpc.msn.de -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Application Context Access
You've got to keep in mind the relative reference of your images. By configuring: /do/callMyAction with application: MyApp and using: img src=images/myIcon.gif Your saying that you have a structure like this: /MyApp + do + images '---myIcon.gif '---myOtherIcon.gif Unless you plan to change all your image references to src=../images/blah.gif you will need to use base href=something That's the purpose of the html:base, it does it for you automatically. I do not know the JSTL equivalent, but you'll need something. Good luck. James Mitchell Software Engineer\Struts Evangelist Struts-Atlanta, the Open Minded Developer Network http://www.open-tools.org/struts-atlanta -Original Message- From: petra staub [mailto:[EMAIL PROTECTED]] Sent: Monday, August 26, 2002 10:21 AM To: [EMAIL PROTECTED] Subject: RE: Application Context Access No, currently I use no struts related taglib only pure JSTL. But maybe someone can simply explain me, what is actually going on... ;) if i have following mapping in web.xml servlet-mapping servlet-nameaction/servlet-name url-pattern/do/*/url-pattern /servlet-mapping i thought that *only* url which meet this pattern are processed by the action servlet, such as ...MyApp/do/callMyAction. if i now have in my html code something like img src=images/myIcon.gif why is it somehow processed/influenced by my mapping? normally, this image (myIcon.gif) should be directly accessible (the directory is in the root of the application) through this relative path, isnt it? however...of course i could add everywhere the application name in front (img src=/MyApp/images/myIcon.gif) but what seems to me quite a work-around i dont like really... _ Senden und empfangen Sie MSN Hotmail über Ihren PocketPC: http://pocketpc.msn.de -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Application Context Access
On Mon, 26 Aug 2002, petra staub wrote: Date: Mon, 26 Aug 2002 11:55:09 +0200 From: petra staub [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Application Context Access I dont understand the following: I have a struts application, lets call it MyApp, which actions call jsp pages under MyApp/WEB-INF/pages. additionally, I have images stored in the root of my application (MyApp/images). Why cant I access the images in MyApp using the relative path /images? If I do so in a jsp file (eg. MyApp/WEB-INF/ pages/home.jsp) forwarded from my action, the relative directory /images is not known...I have to use /MyApp/images/. From a jsp in the root (e.g. MyApp/home.jsp) every works fine with images accessed by /images. Does anyone has a quick explanation for me? :) thanks a lot! Relative paths starting with / are assumed to be relative to the server, not the current directory. Try: img src=../../images/logo.gif Craig -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]