GeeCON Prague 2014*
The moose likes Spring and the fly likes JSP files inside WEB-INF are not recognizing Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Frameworks » Spring
Bookmark "JSP files inside WEB-INF are not recognizing" Watch "JSP files inside WEB-INF are not recognizing" New topic
Author

JSP files inside WEB-INF are not recognizing

Raghu Sha
Ranch Hand

Joined: Feb 02, 2013
Posts: 122
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

Joined: Aug 30, 2012
Posts: 90
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

Joined: Feb 26, 2008
Posts: 166
I think you may need TilesConfigurer for proper functioning.


If I become filthy rich, I'll sponsor research for painless dental treatment at Harvard Medical School. Thats why,I'm learning Java.I have 32 teeth, 22 are man made.
shai ban
Ranch Hand

Joined: Jan 05, 2010
Posts: 177
You will be getting some exception about View not found. Please paste the trace.
 
GeeCON Prague 2014
 
subject: JSP files inside WEB-INF are not recognizing