我的應用程序運行成功,直到我在其中添加org.springframework.web.servlet.view.InternalResourceViewResolver
。它給人的錯誤:Spring ViewResolver問題
javax.servlet.ServletException: Could not resolve view with name '/jsp/cusbilman/main/billportmain.jsp' in servlet with name 'cusbilman'
我認爲它打破了默認的重定向方法:
任何想法?
更新
代碼:
<bean id="htmlViewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name="prefix" value="/cusbilman/resources/static/"/>
<property name="suffix" value=".html"/>
<property name="viewNames">
<list>
<value>html1</value>
</list>
</property>
</bean>
老bean定義:
<bean id="billingPortalMainController" class="com.tt.cusman.cusbilman.main.view.BillingPortalMainController" >
<property name="commandName"><value>dummy</value></property>
<property name="commandClass"><value>com.tt.cusman.cusbilman.main.view.command.DummyObject</value></property>
<property name="sessionForm"><value>false</value></property>
<property name="formView"><value>/jsp/cusbilman/main/billportmain.jsp</value></property>
<property name="successView"><value>/jsp/cusbilman/main/billportmain.jsp</value></property>
<property name="searchView"><value>/../cusinfman/search/search.html</value></property>
<property name="postPaidHome"><value>/cusbilman/cusbilman/invoices.html?page=new</value></property>
<property name="prePaidHome"><value>/cusbilman/cusbilman/prepaid/main.html?page=new</value></property>
<property name="emptyForm"><value>/cusbilman/jsp/cusbilman/main/emptyForm.jsp</value></property>
<property name="cusbilmanMainQdbDao" ref="cusbilmanMainQdbDao" />
感謝您的答覆
發佈相關配置和代碼 – 2011-03-14 10:01:11
感謝您的回覆 – Ali 2011-03-14 11:02:02