Results 1 to 3 of 3

Thread: accessing GET parameters?

  1. #1
    Join Date
    Aug 2004
    Location
    u.s.a
    Posts
    399

    Default accessing GET parameters?

    Pardon my ignorance, I'm just starting to use Spring's MVC stuff.

    I'm using Jetty as an embedded server and when I do a get I'm getting: GET /depo/main?rec=1234 HTTP/1.1

    But, I can't access the 'rec' param in my controller subclass. My view technology is Velocity.

    part of my config file is:
    Code:
    <bean id="viewResolver" class="org.springframework.web.servlet.view.velocity.VelocityViewResolver">
    	<property name="viewClass"><value>org.springframework.web.servlet.view.velocity.VelocityView</value></property>
    	<property name="suffix"><value>.html</value></property>
    </bean>
    
    <bean id="defaultHandlerMapping" class="org.springframework.web.servlet.handler.BeanNameUrlHandlerMapping"/>
    
    <bean id="mainController" class="some.package.MainController"> 
        <property name="buffer">
            <ref bean="viewBuffer"></ref>
        </property>       
    </bean>
    
        <bean id="logMainView" class="org.springframework.web.servlet.view.velocity.VelocityView">
            <property name="url"><value>/main.html</value>            
            </property> 
            <property name="velocityEngine"><ref bean="velocityEngine"></ref>            
            </property>        
        </bean>
    Of course, as shown, I'm still experimenting to see how all this plumbing plumbs.

  2. #2
    Join Date
    Oct 2004
    Location
    Herndon, VA, US
    Posts
    648

    Default Re: accessing GET parameters?

    Quote Originally Posted by jbetancourt
    But, I can't access the 'rec' param in my controller subclass. My view technology is Velocity.
    Could you be more specific about "can't access"? Also it might be helpful to post the source code for MainController.
    --Jing Xue

  3. #3
    Join Date
    Aug 2004
    Location
    u.s.a
    Posts
    399

    Default Re: accessing GET parameters?

    Quote Originally Posted by manifoldronin
    Quote Originally Posted by jbetancourt
    But, I can't access the 'rec' param in my controller subclass. My view technology is Velocity.
    Could you be more specific about "can't access"? Also it might be helpful to post the source code for MainController.
    Sorry. I was doing a simple request.getParameter(s) and was not finding one. But, now its working. Probably was a config gremlin.

    Thanks anyway.

Similar Threads

  1. FilterSecurityInterceptor can't match URL parameters
    By mattlangston in forum Security
    Replies: 3
    Last Post: Jul 31st, 2007, 02:16 PM
  2. Replies: 3
    Last Post: Nov 20th, 2006, 05:04 AM
  3. Replies: 6
    Last Post: Jun 13th, 2005, 04:09 AM
  4. Replies: 4
    Last Post: Mar 19th, 2005, 09:20 PM
  5. Replies: 1
    Last Post: Sep 6th, 2004, 12:30 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •