Here are the important points:
- Download Maven (m2eclipse), pivotal tc server, wtp (Jave EE Developer Tools, Java Web Developer Tools,
Web Developer Tools, XML Editors and Tools, XSL Developer Tools, m2e-wtp Maven Integration for WTP),
Spring Tool Suite (necessary ones, you can exclude Dashboard, tc server (previously installed), etc)
- Open Servers view (Views->Servers) and add the local Tomcat.
- If you import an existing Spring MVC Maven project, it may show an error as "HttpServletRequest cannot be resolved to a type" for jsp files.
This is because the runtime for the web project is not set to the Tomcat installation where HttpServletRequest resides.
Fix: Project Properties -> Targeted Runtimes -> select the installed Tomcat server.
- To produce the war file:
You should add the the servlet-api dependency to pom.xml.
The scope should be provided. Add it from the tomcat group, not maven's own.
- To be able to use Apache Tomcat 8, change catalina.jar:
and set installed facet to at least 2.5 in .settings/org.eclipse.wst.common.project.f
You can set to 3.0 for example.
* Spring throws an exception when async support is not mentioned in web.xml (used in WebSocket apps): workspace, an exception is thrown when the websocket using page is requested from the browser:
"Async support must be enabled on a servlet and for all filters".
To overcome, add "
must be 3.0. It is explained here: http://docs.spring.io/spring/docs/curre
- Folders after .war is generated:
- Folders before .war is generated. It runs on tc server: