facebook

spring velocity configuration!!

  1. MyEclipse IDE
  2.  > 
  3. Off Topic
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #270656 Reply

    have 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

    #270657 Reply

    thanks in advance

    #270666 Reply

    Riyad Kalla
    Member

    Moving to OT > Soft Dev

Viewing 3 posts - 1 through 3 (of 3 total)
Reply To: spring velocity configuration!!

You must be logged in to post in the forum log in