[Stripes-users] How to include css within Stripes app
Hi everybody I'm trying to include some an external css file on a page which comes from a ForwardResolution, but it seems not to work at all, while using servlets it does. The structure of WEB-INF is: * WEB-INF JSP(folder) CSS(folder) stijl.css home.jsp* So basically home.jsp and the CSS folder are parallels, a simple relative url from the home.jsp page should work: link rel=stylesheet href=css/stijl.css type=text.css / But it does not, I have also tried this way: link rel=stylesheet type=text/css href=${pageContext.request.contextPath}/WebContent/WEB-INF/jsp/css/stijl.css/ But nothing, Do you know if this is an url-based issue? Thank you, any help would be appreciated, i've never worked with Stripes before -- *Enrico Iorio* -- BlackBerryreg; DevCon Americas, Oct. 18-20, San Francisco, CA Learn about the latest advances in developing for the BlackBerryreg; mobile platform with sessions, labs more. See new tools and technologies. Register for BlackBerryreg; DevCon today! http://p.sf.net/sfu/rim-devcon-copy1 ___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users
Re: [Stripes-users] How to include css within Stripes app
Hi Enrico, The CSS path is resolved from the client-visible path of your action, not the server path, because the resolution is done by the client browser not the server. So if you have an action at http://yoursite.com/yourcontext/bean that produces a page containing link rel=stylesheet href=css/stijl.css type=text/css, then you need to have a folder in your WebContent like this: WebContent css stijl.css So what you probably want to do is move the css folder to under WebContent, which will mean that you can access it from a browser as http://yoursite.com/yourcontext/css/stijl.css, and then you link to it as: link rel=stylesheet type=text/css href=${pageContext.request.contextPath}/css/stijl.css/ Kind regards, William Rose From: Enrico Iorio [mailto:writetoenr...@gmail.com] Sent: Wednesday, 14 September 2011 7:43 AM To: Stripes Users List Subject: [Stripes-users] How to include css within Stripes app Hi everybody I'm trying to include some an external css file on a page which comes from a ForwardResolution, but it seems not to work at all, while using servlets it does. The structure of WEB-INF is: WEB-INF JSP(folder) CSS(folder) stijl.css home.jsp So basically home.jsp and the CSS folder are parallels, a simple relative url from the home.jsp page should work: link rel=stylesheet href=css/stijl.css type=text.css / But it does not, I have also tried this way: link rel=stylesheet type=text/css href=${pageContext.request.contextPath}/WebContent/WEB-INF/jsp/css/stij l.css/ But nothing, Do you know if this is an url-based issue? Thank you, any help would be appreciated, i've never worked with Stripes before -- Enrico Iorio This email (including any attachments or links) may contain confidential and/or legally privileged information and is intended only to be read or used by the addressee. If you are not the intended addressee, any use, distribution, disclosure or copying of this email is strictly prohibited. Confidentiality and legal privilege attached to this email (including any attachments) are not waived or lost by reason of its mistaken delivery to you. If you have received this email in error, please delete it and notify us immediately by telephone or email. Peter MacCallum Cancer Centre provides no guarantee that this transmission is free of virus or that it has not been intercepted or altered and will not be liable for any delay in its receipt. -- BlackBerryreg; DevCon Americas, Oct. 18-20, San Francisco, CA Learn about the latest advances in developing for the BlackBerryreg; mobile platform with sessions, labs more. See new tools and technologies. Register for BlackBerryreg; DevCon today! http://p.sf.net/sfu/rim-devcon-copy1 ___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users
Re: [Stripes-users] How to include css within Stripes app
Hi Enrico, You need to place your CSS folder outside WEB-INF directory. Files under WEB-INF will not be accessible from URL entered in the browser. *The WEB-INF-directory is a protected one to hold internal configuration data like the web.xml. Nothing inside should be delivered by HTTP access. No URL should contain WEB-INF at all. So if you are having same problem then, please move your style sheets, images and all other files to be accessible by a browser outside WEB-INF. And if WEB-INF directory would be available then the configuration files like web.xml would be available as well which will lead to security issues*. Cheers, -- Samuel Santos http://www.samaxes.com/ On Tue, Sep 13, 2011 at 10:42 PM, Enrico Iorio writetoenr...@gmail.comwrote: Hi everybody I'm trying to include some an external css file on a page which comes from a ForwardResolution, but it seems not to work at all, while using servlets it does. The structure of WEB-INF is: * WEB-INF JSP(folder) CSS(folder) stijl.css home.jsp* So basically home.jsp and the CSS folder are parallels, a simple relative url from the home.jsp page should work: link rel=stylesheet href=css/stijl.css type=text.css / But it does not, I have also tried this way: link rel=stylesheet type=text/css href=${pageContext.request.contextPath}/WebContent/WEB-INF/jsp/css/stijl.css/ But nothing, Do you know if this is an url-based issue? Thank you, any help would be appreciated, i've never worked with Stripes before -- *Enrico Iorio* -- BlackBerryreg; DevCon Americas, Oct. 18-20, San Francisco, CA Learn about the latest advances in developing for the BlackBerryreg; mobile platform with sessions, labs more. See new tools and technologies. Register for BlackBerryreg; DevCon today! http://p.sf.net/sfu/rim-devcon-copy1 ___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users -- BlackBerryreg; DevCon Americas, Oct. 18-20, San Francisco, CA Learn about the latest advances in developing for the BlackBerryreg; mobile platform with sessions, labs more. See new tools and technologies. Register for BlackBerryreg; DevCon today! http://p.sf.net/sfu/rim-devcon-copy1 ___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users