Results 1 to 2 of 2

Thread: help me about views.properties

  1. #1
    Join Date
    Oct 2004
    Location
    China
    Posts
    6

    Default 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. #2
    Join Date
    Aug 2004
    Location
    Roeselare, Belgium
    Posts
    16

    Default

    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...
    Pieter Coucke
    Onthoo.com

Similar Threads

  1. Replies: 1
    Last Post: Jan 30th, 2005, 07:36 AM
  2. Replies: 2
    Last Post: Dec 27th, 2004, 04:22 PM
  3. Replies: 2
    Last Post: Aug 23rd, 2004, 01:45 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •