Announcement Announcement Module
Collapse
No announcement yet.
no mapping found error for stylesheet Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • no mapping found error for stylesheet

    Please ignore this, I had my css in the wrong place
    my web.xml

    Code:
        <context-param>
            <param-name>contextConfigLocation</param-name>
            <param-value>/WEB-INF/applicationContext.xml</param-value>
        </context-param>
        <listener>
            <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
        </listener>
        <servlet>
            <servlet-name>gridView</servlet-name>
            <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
            <load-on-startup>1</load-on-startup>
        </servlet>
        <servlet-mapping>
            <servlet-name>gridView</servlet-name>
            <url-pattern>/grids/*</url-pattern>
        </servlet-mapping>
    my servlet

    Code:
        <bean id="viewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver">
            <property name="prefix" value="/WEB-INF/jsp/"/>
            <property name="suffix" value=".jsp"/>
        </bean>
    
        <bean name="/grid" class="com.griddle.grid.web.controller.GridController">
            <!-- name is name in class, ref is bean definition in config file -->
            <property name="gridMaker" ref="gridService" />
        </bean>
    jsp snippet

    Code:
    <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
      <head>
        <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
        <title>Grid Viewer</title>
        <link  type="text/css" href="<c:url value='css/gridStyle.css' />" rel="stylesheet"/>
      </head>
    my error

    WARNING: No mapping found for HTTP request with URI [/grids/css/gridStyle.css] in DispatcherServlet with name 'gridView'

    I have tried without the c:url tag as well with no luck.

    I don't understand why this is happening or what I need to do to fix it. Can anyone enlighten me, please?

    Thanks
    Last edited by drellim; Jan 29th, 2009, 03:42 PM. Reason: found solution - cssfile was in the wrong place
Working...
X