Announcement Announcement Module
Collapse

Spring Dynamic Modules forum decommissioned in favor of Eclipse Gemini Blueprint

With the official first release of Eclipse Gemini Blueprint shipped, the migration of the Spring Dynamic Modules code base to the Eclipse Foundation, as part of the Gemini project, has been completed.

As such, this forum has been decommissioned in favour of the Eclipse Gemini forums.
See more
See less
org.springframework.web.servlet.PageNotFound Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • org.springframework.web.servlet.PageNotFound

    Hi,

    I'm trying to adapt Oleg's tutorial on Spring DM (with Spring MVC) so additional plugins can contribute with controllers, views, jsp's, css's, images, etc.

    I'm trying to create a fragment plugin (host is simpleweb.war) where resources (css, images, jsps, etc.) and controllers are put. The idea is to keep web.xml in simpleweb.war plugin.

    Fragment pluing structure is:

    Code:
    src
       org/springframework/osgi/sample/app/StringReverserOSGiFacade.java
       org/springframework/osgi/sample/web/SimpleController.java
    images
       springsource_banner.png
    styles
       springsource.css
    views
       osgi.jsp
    WEB-INF
       applicationContext.xml
    index.jsp
    All the above files were removed from host plugin.

    The warning I get is:

    Code:
     WARN  org.springframework.web.servlet.PageNotFound  - No mapping found for HTTP request with URI [/springmvc/osgi/osgi.htm] in DispatcherServlet with name 'osgiwebmvc'
    Questions are:

    - Is this approach (creating fragments) ok?
    - Any hints on how to solve the problem above?

    Thanks a lot.

    Ricardo Giacomin

  • #2
    Yes, providing all OSGi rules (Import-package, Export-package, etc. . .) are maintained.
    Modifying/extending bundle behavior is what fragments are all about.
    Your issue looks like typical Spring misconfiguration.
    Let me know if you still have an issue

    Comment


    • #3
      I just add three rules before spring default rule (/**) to tuckey's urlrewritefilter (urlrewrite.xml) to solve the problem

      http://stackoverflow.com/questions/1...614036#3614036

      Code:
      <?xml version="1.0" encoding="utf-8"?>
      <!DOCTYPE urlrewrite PUBLIC "-//tuckey.org//DTD UrlRewrite 3.0//EN" "http://tuckey.org/res/dtds/urlrewrite3.0.dtd">
          <urlrewrite default-match-type="wildcard">
              <rule>
                  <from>/</from>
                  <to>/app/welcome</to>
              </rule>
              <rule>
                  <from>/scripts/**</from>
                  <to>/scripts/$1</to>
              </rule>
              <rule>
                  <from>/styles/**</from>
                  <to>/styles/$1</to>
              </rule>
              <rule>
                  <from>/images/**</from>
                  <to>/images/$1</to>
              </rule>
              <rule>
                  <from>/**</from>
                  <to>/app/$1</to>
              </rule>
              <outbound-rule>
                  <from>/app/**</from>
                  <to>/$1</to>
              </outbound-rule>    
          </urlrewrite>
      Last edited by phstc; Aug 31st, 2010, 07:22 PM.

      Comment

      Working...
      X