Tomcat, web.xml and "[xX][mM][lL]" is not allowed

Problem So, I had the following issue when trying to run my web application from Eclipse deploying to a local Tomcat. The processing instruction target matching "[xX][mM][lL]" is not allowed.The processing instruction target matching "[xX][mM][lL]" is not allowed. Solution It turned out that I had an empty line at the beginning of my web.xml!

Tomcat 7.0.32 & Tomcat Maven Plugin

I am using the Tomcat Maven Plugin by Codehaus. Here is an excerpt from my pom.xml: ... <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>tomcat-maven-plugin</artifactId> <version>1.1</version> <configuration> <server>tomcat_localhost</server> <url>http://localhost:8080/manager/html</url> <path>/ubicon-webapp</path> </configuration> </plugin> ...... <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>tomcat-maven-plugin</artifactId> <version>1.1</version> <configuration> <server>tomcat_localhost</server> <url>http://localhost:8080/manager/html</url> <path>/ubicon-webapp</path> </configuration> </plugin> ... For Tomcat 6 one is supposed to use the URL http://localhost:8080/manager with a user assigned to Continue reading →

Tomcat: Servlet Context Parameters

I have been working with Tomcat and Srping and was trying to get settings from the META-INF/context.xml to be accessible in Spring or the JSPs. I found a few ways. The first one is by creating a JNDI resource using a custom bean and @Autowire it. The second involves context parameters. Custom JNDI Resource In Continue reading →

Tomcat & Eclipse: change time zone

I was trying to change timezone of my Tomcat instance started from Eclipse. This turned out to be quite easy. Just go to Run > Run Configurations... and choose Apache Tomcat > Your Tomcat Server and change to tab Arguments. In the VM Arguments section add for example -Duser.timezone=America/Montreal-Duser.timezone=America/Montreal Source: http://www.loria.fr/~szathmar/pmwiki/index.php?n=Liferay.20100204TomcatTimezone