Tomcat 7 – Servlet 3.0: Invalid byte tag in constant pool

Adding metadata-complete=”true” to your web.xml should sort the issue <web-app version=”3.0″ xmlns=”http://java.sun.com/xml/ns/javaee” xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xsi:schemaLocation=”http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd” metadata-complete=”true”> This tells tomcat not to scan classes for annotations: https://web.archive.org/web/20180510163848/http://www.tomcatexpert.com/blog/2011/10/12/how-use-fragments-and-annotations-configure-your-web-application

SpringServletContainerInitializer cannot be cast to javax.servlet.ServletContainerInitializer

A better servlet 3.0 api dependency entry in pom is available here – https://github.com/SpringSource/greenhouse/tree/servlet3, you should also mark the scope as provided, otherwise the jar will be included in your final war which will interfere with the jar provided by the container which is what seems to be happening in your case.

What is difference between @RequestBody and @RequestParam?

@RequestParam annotated parameters get linked to specific Servlet request parameters. Parameter values are converted to the declared method argument type. This annotation indicates that a method parameter should be bound to a web request parameter. For example Angular request for Spring RequestParam(s) would look like that: $http.post(‘http://localhost:7777/scan/l/register?username=”Johny”&password=”123123″&auth=true’) .success(function (data, status, headers, config) { … }) … Read more

Recommended way to save uploaded files in a servlet application

Store it anywhere in an accessible location except of the IDE’s project folder aka the server’s deploy folder, for reasons mentioned in the answer to Uploaded image only available after refreshing the page: Changes in the IDE’s project folder does not immediately get reflected in the server’s work folder. There’s kind of a background job … Read more