From: Benedetto, Kristina (CAP, TIP)
> I am a new user of Velocity. I have a simple servlet (my
> servlet) that extends the VelocityServlet. I am having
> trouble using the getParameter() method to obtain parameters
> submitted from the vm template. I understand that the
> VelocityServlet puts the request object in the context, but I
> cannot figure out how to obtain the parameters from the request.
>
> I have tried putting this in the handleRequest method of 'my
> servlet' class
> file://to get the request
> Object req = ctx.get(REQUEST);
Do this :
HttpServletRequest req = (HttpServletRequest ) ctx.get(REQUEST);
that should solve it...
> // to get parameter from request
> String branch = req.getParameter("branch");
>
> I get this error
> java:31: cannot resolve symbol
> symbol : method getParameter (java.lang.String)
> location: class java.lang.Object
> String branch = req.getParameter("branch");
> ^
>
>
> Any assistance would be appreciated.
>