Announcement Announcement Module
Collapse
No announcement yet.
standard way to map Spring 3 MVC servlet to Root context? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • standard way to map Spring 3 MVC servlet to Root context?

    What is the standard way to map a Spring 3 MVC servlet to the server root context when using Tiles as in a Spring Roo project? The first index page under the server root which will be running on Tomcat 6.0.3x standalone is not going to be a static page, but will be a servlet. I've set my url-pattern to "/**" for my controller class for this view, added a Context.xml file to META-INF:
    Code:
    <?xml version='1.0' encoding='utf-8'?>
    <Context displayName="siteName" docBase="" path="" workDir="work/Catalina/siteName/_">
    </Context>
    . I'm returning the proper view that I want. But still I get "The requested resource (/) is not available."

    If I use the context "/[projectName]" I get the view I want. But I really need the root context.

    My Tomcat 6 test server have only one base webapp.

    Any ideas? I'm not sure if it is the nature of the Spring project I need to change or if it is my deployment method.

  • #2
    Try keeping a file named on your webapp under conf/Catalina/locahost. example serverRoot/conf/Catalina/localhost/myapp.xml

    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <Context path="/" >
    </Context>
    I am not completely sure but given this; and an exploded war under webapps with dir name /ROOT should work.

    Comment

    Working...
    X