- This topic has 2 replies, 2 voices, and was last updated 17 years, 8 months ago by Riyad Kalla.
-
AuthorPosts
-
Muhammad FAisalMemberhave issues with spring velocity configuraiton.
*********************************
added in spring-servlet.xml file of my project
*********************************
<bean id=”velocityConfigurer” class=”org.springframework.web.servlet.view.veloci ty.VelocityConfigurer”>
<property name=”resourceLoaderPath”>
<value>WEB-INF/views</value>
</property>
<property name=”configLocation”>
<value>/WEB-INF/velocity.properties</value>
</property></bean>
<bean id=”portfolioController”
class=”com.devx.tradingapp.web.portfolio.Portfolio Controller”>
</bean><!– you can have more than one handler defined –>
<bean id=”urlMapping”
class=”org.springframework.web.servlet.handler.Sim pleUrlHandlerMapping”>
<property name=”urlMap”>
<map>
<entry key=”/port.htm”>
<ref bean=”portfolioController” />
</entry>
</map>
</property>
</bean>**********************
/WEB-INF/velocity.properties
**********************
#product/index
p-index.class=org.springframework.web.servlet.view.v elocity.VelocityView
p-index.url=index.vm*****************
PortfolioController.java
*****************
public class PortfolioController extends MultiActionController {public ModelAndView index(
HttpServletResponse request,
HttpServletRequest resonse
){return new ModelAndView(“p-index”);
}
}*******
index.vm which resides /WEB-INF/
*******
<html>
<body>
#set( $name = “Velocity” )
Hello $name World!
</body>
</html>************************************************** ***
file port.htm should move to the index.vm file which is not
display an error******************
HTTP Status 404 –type Status report
message
description The requested resource () is not available.
Apache Tomcat/5.0.28
******************when i simply test my spring with jsp file it works fine.
any idea or fixing ?
i am using myeclipse and din’t include extra jars instead eclipse’s spring core, AOP and spring web libraries.thanks
FAisal khan
Muhammad FAisalMemberthanks in advance
Riyad KallaMemberMoving to OT > Soft Dev
-
AuthorPosts