Menu
  • HOME
  • TAGS

How to run a main after embedded tomcat is run

java,manifest,maven-tomcat-plugin,embedded-tomcat-7

What you need is to setup your application's entry point. For this you need to configure your main class inside the jar's Manifest file. Something like Manifest-Version: 1.0.1 Created-By: <jdk_version> Main-Class: fully.qalified.class.name.with.main.method For more details on Manifest, take a look into this link here For making this step part of...

How to get original request URI in EL spring-boot page behind httpd proxypass

apache,spring-boot,el,proxypass,embedded-tomcat-7

In the controller you can use ServletUriComponentsBuilder: initialize it from the request and it picks out the proxy headers and builds the URI for the origin for you, e.g. String uri = ServletUriComponentsBuilder.fromCurrentRequest().build().toString().

How to run spring-boot embedded tomcat with tiles in eclipse?

java,eclipse,spring-boot,embedded-tomcat-7,tiles-3

This happened for an imported project, for which eclipse settings were not shared in the source control repository (understandingly, that is most often a wise thing (not-) to do in my opinion); it might have been because of that, or maybe not, anyway using the maven archetype for creating a...

Add ServerEndpoint to Tomcat instance without annotations

java,tomcat,websocket,embedded-tomcat-7,embedded-tomcat-8

One alternative is to extend javax.websocket.Endpoint: https://blogs.oracle.com/arungupta/entry/websocket_client_and_server_endpoint public class MyEndpoint extends Endpoint { @Override public void onOpen(final Session session, EndpointConfig ec) { session.addMessageHandler(new MessageHandler.Whole<String>() { @Override public void onMessage(String text) { try { session.getBasicRemote().sendText(text); } catch (IOException ex) { Logger.getLogger(MyEndpoint.class.getName()).log(Level.SEVERE, null, ex); } } }); } ...

403 error while deploying to embedded tomcat using maven-tomcat7-plugin on pre-integration-tests phase

maven,tomcat,deployment,embedded-tomcat-7

I managed to solve the problem and it's actually pretty simple. Since no one answered, here's what I did. I only have one execution now to deploy both apps. <execution> <id>start-portal</id> <goal>run-war</goal> </goals> <configuration> <path>/</path> <fork>true</fork> <warDirectory>${portal.war}</warDirectory> <additionalConfigFilesDir>${portal.properties}</additionalConfigFilesDir> <webapps> <webapp>...

embedded neo4j database with tomcat 7.0 eclipse plugin Unable to create directory path for Neo4j store

java,eclipse,neo4j,embedded-tomcat-7

Check your current working directory, and verify that you have permissions to create files there. You can get your current working directory via the java System.getProperty("user.dir"). When you're running under tomcat inside of eclipse, sometimes the directory will be somewhere different than you expect, because it depends on many aspects...