- This topic has 4 replies, 2 voices, and was last updated 13 years, 11 months ago by
jkennedy.
-
AuthorPosts
-
Greg SoulsbyMemberWould like to now update the scaffolded pages with our propriatory .css and images etc.
In the scafolded .jsp pages I am seeing
@import url(“${pageContext.request.contextPath}/resources/dojo/resources/dojo.css”);but @import url(“${pageContext.request.contextPath}/mydirectory/mycss.css”);
is not working for me – the Spring handlers are trapping the link to /mydirectory/mycss.css?
There is something in web.xml suspisiously called a filter, that maps to /resources dir.
If you set up a directory for your own resources like .css, how do you give access?
jkennedyMemberThe filter in the web.xml is a Spring JS concept that allows resources that are packaged in .jar files on the project to be read through a servlet.
You can find a review of that concept in this forum topic where someone was working to change the dojo style that also talks a bit about the other generates CSS files in the project:
http://www.myeclipseide.com/PNphpBB2-viewtopic-t-26900-highlight-resources.htmlYou will notice in the main.jsp page under sitemesh-decorators folder that there are <links> to dashboard.css and style.css which are both in the css folder of the WebRoot of the project.
This CSS controls quite a bit of the look and feel.
You will notice that we are able to reference our own css using the path:
<link href=”${pageContext.request.contextPath}/css/style.css” rel=”stylesheet” type=”text/css” />You should be able to do the same.
In the web.xml there are two filters on /* (one for Sitemesh and one for the OpenEntityManagerInViewFilter). This may be the Spring layer that you see intercepting, but there should be nothing stopping you from reaching your own folders in the webroot.
If you can not get this resolved, please send the project to [email protected] and I will take a look.
Thanks,
Jack
Greg SoulsbyMemberI see what is happening – another small piece of progress. Will keep it simple and use
<link href=”${pageContext.request.contextPath}/css/style.css” rel=”stylesheet” type=”text/css” />Many thanks
Greg SoulsbyMemberI see what is happening – another small piece of progress. Will keep it simple and use the<link href=”${pageContext.request.contextPath}/….
Many thanks
jkennedyMemberGreat thanks, let me know if you run into any issues.
Jack
-
AuthorPosts