Announcement Announcement Module
Collapse
No announcement yet.
help me about views.properties Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • help me about views.properties

    it's not intuitionistic at all!!!!!!!!!

    Code:
    listPerson.class=org.springframework.web.servlet.view.JstlView
    listPerson.url=/WEB-INF/jsp/listPerson.jsp

    can i put them into servlet.xml? such as ...
    Code:
    <bean name="/addPerson.form" class="com.hii.web.AddPersonForm">
      <property name="formView">
        <value>jstlViewType</value>
        <value>/addPerson.jsp</value>
      </property>
      <property name="successView">
        <value>jstlViewType</value>
        <value>/listPerson.jsp</value>
      </property>
      <property name="validator"><ref local="personValidator"/></property>
      <property name="hibernateDao"><ref bean="hibernateDao"/></property>
    </bean>
    i wish something like that,so i can easily to know which jsp would controller go

    if i have big project,hundreds of views,i have to ctrl+find to see which exactly jsp would return.....i hate that!!!

    what can i do?

  • #2
    The benefit of putting them in views.properties is that you can easily change to another view when you want, by just replacing org.springframework.web.servlet.view.JstlView with ExcelView for example. This way there is a clean separation between views and the actual rendering of the view.

    If you put them inside your bean definition, you would have to specify the class and url every time you use the same view again.

    PS: Shouting in your post does not encourage others to post a reply...

    Comment

    Working...
    X