Questions tagged [embedded-tomcat-7]

Questions about running Apache Tomcat 7 as an embedded server in another application.

155 questions
3
votes
0 answers

Get tomcat-context.xml functionality in spring boot and look-up resource on startup

In tomcat if we put context.xml file in META-INF folder tomcat create resource for us and we can lookup that resource. Here is my context file:
3
votes
2 answers

"ArquillianServletRunner not found" with Tomcat 7 Embedded

I'm attempting to create a test suite with Arquillian and Tomcat 7 embedded, but when I deploy my WAR file with a web.xml file, I get the following error. ArquillianServletRunner not found. Could not determine ContextRoot from ProtocolMetadata,…
Phyxx
  • 15,730
  • 13
  • 73
  • 112
3
votes
1 answer

Interaction Between Spring Container and Servlets

I am trying to understand the plumbing between a Spring framework container and a Servlet. I am just getting started and believe that a Spring MVC application can work with servlets, portlets etc., When a spring application using servlets is…
3
votes
2 answers

How to put a file on the servlet context path with Spring Boot?

I am trying to add BlazeDS to a Spring Boot application. I have added the `MessageBrokerServlet' in my configuration for this: @Bean public ServletRegistrationBean messageBrokerRegistration() { ServletRegistrationBean registration = new…
Wim Deblauwe
  • 25,113
  • 20
  • 133
  • 211
3
votes
1 answer

How to set custom realm in embedded tomcat server? I am using Spring Boot.

How to set custom realm for the embedded tomcat? i am using SpringBoot however dont see a way to add custom realm via Embeddedservletcontainercustomizer.
3
votes
0 answers

Embeded Tomcat with webapp directory within the classpath/jar

So I have a Java application that use to be packaged as a war and then deployed to Tomcat, but now I have it setup so it all runs straight from a jar file using embedded Jetty as follows: class JettyServer extends ServerTrait { val server = new…
djsumdog
  • 2,560
  • 1
  • 29
  • 55
3
votes
1 answer

Automatically starting/stopping web server for frontend tests

Now, I start separately embedded tomcat via maven: mvn tomcat7:run And then run the mvn test goal. My question is can I configure maven in order to do that automatically? tomcat has to be started before all tests run, and then stopped. The…
Alexandr
  • 9,213
  • 12
  • 62
  • 102
3
votes
0 answers

Restarting Embedded Tomcat 7 Server

We're using embedded Tomcat 7 to host a web application. It works very well, with one slight exception. The reason that we're using embedded Tomcat is because we need to operate on multiple platforms and our architect has made the call. The…
MattWeiler
  • 789
  • 1
  • 12
  • 21
3
votes
0 answers

how to apply context configuration in tomcat-maven-plugin?

My goal is to deploy several webapps using tomcat-maven-plugin and make some cross context interactions between them. This is for prototyping purposes. So I created two war modules (core & webapp1), placed apropriate context.xml into META-INF folder…
Zkejid
  • 81
  • 5
3
votes
1 answer

Tomcat embedded correct usage of addContext for docBase

Does anyone know how to set up the context in an embedded Tomcat instance to serve files from a local directory not within the deployed folder? In the standard server.xml it looks something like this:
Jimmy Johnson
  • 889
  • 7
  • 20
2
votes
1 answer

How I can deploy existing web applications (wars) in the Spring Boot embedded server (tomcat)

I have an application which allows to dynamically generate web applications (wars) and I would like to deploy these applications in a server to test them and I think of putting them in the same embedded server of spring, here is how I solved the…
Belgacem
  • 183
  • 9
2
votes
0 answers

Embedded Tomcat without unpacking

What steps are required to make a executable war without unpacking the war. ( Similar to the way spring boot does). Basically want to wrap Embedded Tomcat into existing war and make it execurable. Env: Spring mvc, Java 7, Webapp with web.xml So far…
2
votes
1 answer

Caused by: java.lang.NoSuchMethodError: javax.servlet.ServletContext.getVirtualServerName()Ljava/lang/String;

My application works fine when I use Embedded tomcat to launch Spring boot application in Spring STS by clicking on Run on Spring boot App. I then built a JAR with Maven using mvn clean install. While the JAR was built successfully, launching the…
Mahideep
  • 41
  • 7
2
votes
1 answer

Using Spring Boot 2.0 with Tomcat 7.0.82

I have a project that uses Spring Boot 2.0.0.RC2. I need to deploy it to a customer environment using traditional deployment for Tomcat 7.0.82. I've managed to build a war that can be deployed successfully by configuring web.xml in a typical way…
MateuszPrzybyla
  • 897
  • 8
  • 17
2
votes
1 answer

java.lang.IllegalArgumentException: The main resource set specified [] is not valid in Embedded Tomcat

How to fix the error: java.lang.IllegalArgumentException: The main resource set specified [C:\temp\myApp.jar] is not valid in an Embedded Tomcat application? I believe I am doing something wrong with the context path but I couldn't figure out how…
Jim C
  • 3,957
  • 25
  • 85
  • 162
1 2
3
10 11