Announcement Announcement Module
Collapse
No announcement yet.
View resolvers + multiple JSP packages Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • View resolvers + multiple JSP packages

    Hello Everyone,

    Ok so I am working on a story where you go to one URL and based on the requesting device ( an XHTML device or a WML device) then load a different set of JSPs.

    So I have a bunch of JSPs in packageA and packageB.

    How do I configure my dispatcher XML file to be able to resolve which package to go to to load the JSP it needs?

    Happy Holidays,
    Thanks
    Joyce

  • #2
    <bean id="jspViewResolver1" class="org.springframework.web.servlet.view.Intern alResourceViewResolver">
    <property name="viewClass" value="org.springframework.web.servlet.view.JstlVi ew"/>
    <property name="prefix" value="/WEB-INF/jsp/A"/>
    <property name="suffix" value=".jsp"/>
    <property name="order" value="1"/> </bean>

    <bean id="jspViewResolver2" class="org.springframework.web.servlet.view.Intern alResourceViewResolver">
    <property name="viewClass" value="org.springframework.web.servlet.view.JstlVi ew"/>
    <property name="prefix" value="/WEB-INF/jsp/B"/>
    <property name="suffix" value=".jsp"/>
    <property name="order" value="2"/>
    </bean>


    i am not sure but above one will be helpful. try it out so that i can come to know that i am correct or wrong

    Comment

    Working...
    X