Page 2 of 2 FirstFirst 12
Results 11 to 12 of 12

Thread: Is that reason file can't get loaded?

  1. #11

    Default

    Quote Originally Posted by Grzegorz Grzybek View Post
    Hi

    The REST style of application doesn't have anything with the fact you're delegating to Tomcat's (specific) "default" servlet. Just remove the mapping to "default" servlet from your web.xml and everything will be fine.

    Or look at the solution Spring-WebFlow (JS subproject) provides in the scope of resource provision (org.springframework.js.resource.ResourceServlet).

    regards
    Grzegorz Grzybek
    What make you said so? As I had mentioned, the purpose of the configuration is for REST to exclude some paths. Otherwise, I get something like
    No mapping found for HTTP request with URI [/vsm/static/css/form.css] in DispatcherServlet with name ...
    [URL="http://vicina.info"] 新闻,社区新闻,分类广告

  2. #12
    Join Date
    Oct 2008
    Location
    Poland, Wrocław
    Posts
    431

    Default

    Hi

    You get "No mapping found" error because the URL is mapped to your (single) DispatcherServlet. I can't figure out why, because your web.xml maps "/" to vsm servlet, and not "/*".

    Generally it is not a good idea to map some URLs to Tomcat's specific servlet. Add another servlet mapping to "vsm" servlet with path "/rest/*" or something and get rid of "/static/*" mapping".

    Standard Java EE servlets mapping are poor - there are only 3 kinds of mapping - "*.ext", "/path" or "/path/*". When you want some base path to be excluded from more general mapping, it's not that easy.
    You may serve static resources from "/static/*" base path by mapping "application" requests by extension (e.g. *.do) or by <b>other</b> base path (e.g. "/app" or "/main", or something).

    regards
    Grzegorz Grzybek

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •