Hyn, I have a servlet filter,
in first step:
I am checking url from particualr action and based on that creating a new url, redirecting
String redirectURL = httpResponse.encodeRedirectURL( shopUrl + "/catalogPreview?setPreviewDate=090000");
LOG.info("RUN PREVIEW: " + redirectURL + " | IP " + httpRequest.getRemoteAddr());
httpResponse.sendRedirect(redirectURL);
return;
and return then the filter is again called with previously assemble url and let it through going through filter chain
else
{
// proceed filters
filterChain.doFilter(httpRequest, httpResponse);
}
the new url should reach the spring controller here is spring annotation mapping for review
@Controller
@RequestMapping(value = {"/{testId:.*}/", "/lalanium","/catalogPreview"})
public class TestPageController extends AbstractTestPageController
{
the new URL is also visible in header but getting 400 error... am I missing some step? please share
Aucun commentaire:
Enregistrer un commentaire