facebook

How to set up your own "resources" dir for .ccs et

  1. MyEclipse IDE
  2.  > 
  3. Spring Development
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #315089 Reply

    Greg Soulsby
    Member

    Would 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?

    #315204 Reply

    jkennedy
    Member

    The 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.html

    You 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

    #315219 Reply

    Greg Soulsby
    Member

    I 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

    #315220 Reply

    Greg Soulsby
    Member

    I see what is happening – another small piece of progress. Will keep it simple and use the<link href=”${pageContext.request.contextPath}/….

    Many thanks

    #315256 Reply

    jkennedy
    Member

    Great thanks, let me know if you run into any issues.

    Jack

Viewing 5 posts - 1 through 5 (of 5 total)
Reply To: How to set up your own "resources" dir for .ccs et

You must be logged in to post in the forum log in