Where do I configure the context-root? - open-liberty

I have a spring boot project do deploy but when I install my zip file on openliberty I get the message
Context root not found
Where do I set this?

Related

Start spring boot jar file as part of tomcat start

There is a way I can start the spring boot jar file as part of tomcat start(catalina.bat start).
I have a spring cloud api gateway which does not support war file deployment.
In a bare metal box, I have installed the tomcat, and as part of deployment I have converted all microservice into war file and able to deploy it into tomcat/webapp folder and up and running.
As spring cloud api gateway does not support war file, I kept this application with embed tomcat.
Now I need this jar file as well get started along with the tomcat [catalina.bat start].
In tomcat I have seen there is something shared.loader option in catalina.properties file.
I have kept the jar file in below path as shown below and when I try to start it, jar file is not getting picked up.
Need to know if there is a way to start the spring boot application [jar file] as part of tomcat [catalina.bat start] start.

Properties are not found in Spring Boot application

I have a Spring Boot + JSF (Primefaces) integrated project
git clone https://iva-nova-e-katerina#bitbucket.org/iva-nova-e-katerina/jsf-springboot.git
And build it with mvn package then run with
cd target
java -jar ./JSF-springboot-demo-0.0.1-SNAPSHOT.war
And when I check http://localhost:8080/index.xhtml I can see that there are no messages on the page. The messages are the strings in the properties files, which are bundled into WAR file, but it seems like Primefaces can't see them https://bitbucket.org/iva-nova-e-katerina/jsf-springboot/src/master/src/main/resources/. Could you help me to fetch this properties files inside Spring Boot application?

Deploying a spring boot war on jetty9.4.6 with no URI in the war available

I follow the spring boot reference document to make an executable and deployable war in 2 steps:
in pom file, make a war package and make spring-boot-starter-tomcat scope
provided
make the Application class extends
SpringBootServletInitializer and override configure method.
then copy the war file to {jetty_home}/webapps.
I tried restart the jetty server and it seems the war was loaded with below info
2017-07-24 11:16:35.740:INFO:oejsh.ContextHandler:main: Started o.e.j.w.WebAppContext#6e1ec318{/abc-0.1,file:///tmp/jetty-0.0.0.0-8080-abc-0.1.war-_abc-0.1-any-4452702112804908874.dir/webapp/,AVAILABLE}{/abc-0.1.war}
Visitin {jetty_server_ip}:8080/abc-0.1 shows "Directory: /abc-0.1/" while visit any URL in the war returns a 404 error.
What am I doing wrong? Please guide.
The WebApp's "context path" is set to /abc-0.1 in your deployed instance.
You will only be able to access that webapp on {host}/abc-0.1/.
Assuming that you have no other contexts (webapps) deployed, then you have nothing answering at {host}/abc/ and will always get 404 for {host}/abc/ prefixed URLs.

How to use Websphere liberty in spring boot application

I want to use Websphere liberty in spring boot application instead of tomcat server. If I am correct it is not supported out of the box. How can I configure spring boot/websphere liberty to achieve this?
Using the Liberty app accelerator you can download a zip containing a Maven buildable 'Spring Boot with Spring MVC' app as your starting point. Just run mvn install and you'll get the app running at http://localhost:9080/myLibertyApp/
Actually, you can now create runnable jar files with WebSphere Liberty. You need v8.5.5.9 or higher. Create a runnable jar this way:
server package {server name} --archive={jar name}.jar --include=minify,runnable
Resultant jar can be run as you'd expect:
java -jar {jar name}.jar
Since very recently (May 2018) you can deploy a Spring Boot jar with Liberty, as it seems. See https://developer.ibm.com/wasdev/blog/2018/05/11/spring-boot-applications-on-liberty/. Haven't tried it out yet, though.

grails tomcat 7 deployment

So I have a grails 2.0.4 application that works exactly the way I want. I created the war file and deployed it to Tomcat 7. I'm getting an error saying that the application can't find the jar I'm using to connect to oracle (ojdbc6.jar). The jar is listed under mywebapp/WEB-INF/lib. WHY can't it be found?? Any help would be greatly appreciated!
The jar file should be in the toplevel lib directory of your project (or specified as a dependency in a repository), not webapp/WEB-INF/lib. Is the jar file actually inside the warfile? You can test this by opening the war as a zip file, or by running jar tf target/mywebapp*.war and looking for ojdbc6.jar. If it is, it should get deployed and you should see it in tomcat7/webapps/mywebapp/WEB-INF/lib.
The default environment for grails war is production instead of development. Make sure you've got the production data source configured correctly in grails-app/conf/DataSource.groovy

Resources