header « MVC « Spring Q&A





1. Adding HTTP Headers in a Spring Interceptor postHandle method    stackoverflow.com

I have a Spring Interceptor which attempts to add an HTTP header in the postHandle() method.

public void postHandle(HttpServletRequest req, HttpServletResponse resp, 
          ...

2. using spring validation on request headers    stackoverflow.com

Is it possible to use the spring validation framework with Spring MVC to validate the presence/absence and value of an HTTP request header? Thanks!

3. header and footer and freemarker    stackoverflow.com

My website has a consistant header and footer that I want on all pages. What is the best way to do this? The header will have some dynamic data also, based on the ...

4. How to use @requestMapping headers?    stackoverflow.com

I studying springmvc,When I use @RequestMapping(value="/helloWorld", headers = "content-type=text/*"),I input http://localhost:8080/SpringMVC_10100/helloWorld ,I found console is

WARN org.springframework.web.servlet.PageNotFound - No matching handler method found for servlet ...

5. Setup a Filter that will set the Response Header to only Image File(s)    stackoverflow.com

I am having a caching problem based on the discussion that I have in this link But I am not sure how to go about with the suggestion on setting the ...

6. In spring mvc, headers = "x-requested-with:XMLHttpRequest" in request mapping not working?    stackoverflow.com

I have two methods, one is supposed to handle login request issued by JS, another takes care of login page.

 @RequestMapping(value = "/login", method = {RequestMethod.GET, RequestMethod.HEAD},
    headers ...

7. spring mvc @RequestMapping headers can only accept one value?    stackoverflow.com

this will work:

@RequestMapping(value = "/test", method = RequestMethod.POST,
    headers = {"content-type=application/json"})
{
.......
}
If I added another value to it like the following, the it will fail and tell me "The ...

8. Ignore Accept header in spring mvc    stackoverflow.com

I have a controller that serves files (images, pdfs, etc,.):

@Controller
public class FileController {

    @ResponseBody
    @RequestMapping("/{filename}")
    public Object download(@PathVariable String filename) throws Exception ...

9. What alternatives exist to Sitemesh to help layout JSP/JSTL page footers/headers in a Spring MVC app?    stackoverflow.com

I've tried excluding certain pages from my Sitemesh decorator but it doesn't seem to follow its own logic:

<decorators>
    <excludes>
        <pattern>/register</pattern>
  ...





10. How to match wildcard accept header when using @RequestMapping in Spring framework    stackoverflow.com

I have three resources:

   @RequestMapping(value = "sample", method = RequestMethod.GET, headers = "Accept=text/html")
   public ResponseEntity<String> sampleResourceHtml()

   @RequestMapping(value = "sample", method = RequestMethod.GET, headers = "Accept=application/xml")
 ...

11. Spring mvc mapping headers and parameters    stackoverflow.com

I would like to support a scenario where a specific piece of value can be sent to my application either by a parameter or header. I have several arguments that I ...

12. springframework get all request headers    stackoverflow.com

I know that spring3 has @RequestHeader to get a single request header in a controller. I'm wondering if there is an easy way to get ALL the request headers? I'm hoping ...

13. How to set content-length after a view is resolved using spring mvc?    stackoverflow.com

We're using Spring MVC (3.0.5) for an API we are building. However, we have discovered that the application does not always return a content-length in the response header. Why I haven't ...

14. Browser displays raw image data of jpeg. What headers should I make sure to have in the response?    stackoverflow.com

I seem to have run into an interesting problem where the browser happily displays an image generated by my Spring MVC web application as long as the URL to my controller ...

15. Error:invalid LOC header (bad signature) while compiling Spring MVC with Maven    forum.springsource.org

Error:invalid LOC header (bad signature) while compiling Spring MVC with Maven Hi All, thanks in advance. please assist me with below issue if any body know what is the problem. i ...

16. Headers in MVC 2.5    forum.springsource.org

I believed there was a better way - more high level without having to deal with the HttpServletRequest. I ended up with creating a method with the HttpServletRequest as a parameter ...





17. SpringMVC/Tiles Problem - "Attribute 'header' not found."    forum.springsource.org

Mar 3rd, 2010, 02:54 PM #1 Chamal View Profile View Forum Posts Private Message Junior Member Join Date Feb 2010 Posts 12 SpringMVC/Tiles Problem - "Attribute 'header' not found." Hello, I ...

18. Add an Expire Header on Spring MVC 2.5    forum.springsource.org

Add an Expire Header on Spring MVC 2.5 I am maintaining a legacy application that was built with a mixture of Spring MVC 2.5 annotation based controller and the old school ...