Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JSP files inside WEB-INF are not recognizing

 
Raghu Sha
Ranch Hand
Posts: 122
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
How to refer jsp files available in WEB-INF\jsp folder?
Added
<bean id="jspviewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name="viewClass" value="org.springframework.web.servlet.view.JstlView" />
<property name="prefix" value="/WEB-INF/jsp/" />
<property name="suffix" value=".jsp" />
</bean>
It is not recognizing and viewreslover is got ingored. Tiles are not applied.

The below are the confograion in spring-servlet.xml

<bean id="viewResolver"
class="org.springframework.web.servlet.view.UrlBasedViewResolver">
<property name="viewClass">
<value>
org.springframework.web.servlet.view.tiles2.TilesView
</value>
</property>
</bean>

web.xml


<servlet>
<servlet-name>spring</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>spring</servlet-name>
<url-pattern>*.html</url-pattern>
</servlet-mapping>


Thanks
 
Ashwini Kashyap
Ranch Hand
Posts: 90
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think your xml file isn't been read.

Have you mentioned InternalResourceViewResolver bean tag in spring-servlet.xml itself?

I am asking since you haven't stated the same like you stated for UrlBasedViewResolver.

Thanks,
Ashwini Kashyap | www.infocepts.com
 
Jhakda Velu
Ranch Hand
Posts: 167
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think you may need TilesConfigurer for proper functioning.
 
shai ban
Ranch Hand
Posts: 177
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You will be getting some exception about View not found. Please paste the trace.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic