Announcement Announcement Module
Collapse
No announcement yet.
accessing GET parameters? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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
    Re: accessing GET parameters?

    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.

    Comment


    • #3
      Re: accessing GET parameters?

      Originally posted by manifoldronin
      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.

      Comment

      Working...
      X