Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
I want to use angular 4 with java as backend. What I need is a single war file.I dont want to run different server for front end and back end. I want that there will be single java war file so that I can deploy it on app server like tomcat or jboss.
Please suggest some approach. Your help is highly appreciated.
HI I have done this in my project and what can you do that when you take a build of your Angular2 application then after the build copy all the content from the build/install folder and paste it in your Java Work space as a static content inside WebContent folder.
Makesure that you correctly configured the url of the backend service in your angular code.
After that try to clean the tomcat server and then restart it.
I hope it will work.
Related
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
I have fully working localhost website(with java server, react front, MySQL database).I already moved front on host, but I can not understand or find how to move java server on web host and run it. Can anyone explain it to me?
Create a war file of the java application using maven plugin and install tomcat on the host and then just copy the war file into the tomcat directory on the host. Here is tutorial on this.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
I have a struts2 project that I launch with a jetty server. I would like to make a dockerfile allowing me to create a struts2 image (to be able to launch it with a compose docker), my problem is that I have the impression that there is no documentation about struts2 to create the dockerfile, would you have some tricks to propose to me? Thank you in advance for your answer
Struts is part of the application scope and shouldn't be packed in a docker container by itself. It's should be packed in the EAR or Spring Boot application (for example) you are working on. You have to deploy/add the EAR or Spring Boot application to the docker image.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I want to publish my project on internet through my paid web
, but they doesn't support JSP pages and glassfish.
So is there's any way to publish it?
There are different ways to deploy your build to web servers according to the server. In this situation you telling that you are using glassfish server. It allows three different methods as follows.
1. Using admin console
First thing you should be able to access admin console which is http://localhost:4848. Follow the link below the step by step guide to deploy from oracle help.
https://docs.oracle.com/cd/E19798-01/821-1757/ghgjn/index.html
2. Using command line
You should be able to access command line with asadmin commands. Use following guide to deploy using command line.
https://docs.oracle.com/cd/E19798-01/821-1757/ghgjj/index.html
3. Deploying an Application Automatically
You can deploy applications automatically by placing them in the as-install/domains/domain-name/autodeploy directory, where domain-name is the name of the domain for which you want to configure automatic deployment. Follow the link below to step by step guide.
https://docs.oracle.com/cd/E19798-01/821-1757/ghgmi/index.html
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 7 years ago.
Improve this question
I've created a simple servlet web app in Eclipse (Java EE of course).
It runs on the Tomcat server I've configured locally in Eclipse.
I would like to run it on a Tomcat server using XAMPP, while leaving the app in Eclipse (not exporting JARs).
I've tried editing the web.xml but it did not work.
The URL for the home page is:
localhost:8080/webstore/controller/index
Should I just copy the war file to webapps?
I quite new to this, please let me know what I'm doing wrong.
Thanks.
You don't add web.xml to your Tomcat. You deploy (place) the whole war which includes web.xml under WEB-INF inside your jar. You either place to war file in the Tomcat webapps folder (typically) or you are using its manager under your.tomcat.address/manager
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
I'm creating a servlet-based application using Tomcat.
Besides that i've some classes to acces a DB with jdbc. (present in a other folder/package)
I was asking myself how to integrate them cleanly in my servlet-based application.
What's the "cleanest" solution ?
thx
I would go with packaging as a separate JAR file and placing in WEB-INF/lib of your web app.
While it may seem easier to just put JAR to the common libraries folder so that several web apps start using it - it will result in not being able to upgrade the JAR without restarting the whole server. Also you will need to make sure that the new JAR is working fine with all of the apps. Classpath issues are possible with this approach too.
Package them in jar files and then add files to you're project.