tags:

views:

34

answers:

1

i want to create a mappings for a spring view controller:

this works:

<b:property name="mappings">
    <b:props>
        <b:prop key="/index.do">indexSpringController</b:prop>
        <b:prop key="/index.htm">indexSpringController</b:prop>
        <b:prop key="/index.html">indexSpringController</b:prop>
    </b:props>
</b:property>

but this does not work:

<b:property name="mappings">
    <b:props>
        <b:prop key="/index.pref">indexSpringController</b:prop>
    </b:props>
</b:property>

are the endings *.do *.html *.htm predefined?

A: 

You also need to set 'index.pref' to your web.xml:

<servlet-mapping>
    <servlet-name>springapp</servlet-name>
    <url-pattern>*.pref</url-pattern>
</servlet-mapping>
michel