I have created a Wicket application for a final year programming project. I need to create an executable version of this project. How can I do this in such a way that the person trying to execute the file need not have Wicket, any of its libraries or Tomcat to execute the file?
If you follow these instructions, you get a jar file which you can run like this:
java -jar selfcontained.jar
Build WAR file (mvn package on war packaged project if using maven).
Put it in /deploy directory of fresh Tomcat.
Wrap Tomcat including WAR with Tanuki Service Wrapper.
Give your customer ZIP file (or create GUI installer) and ask him to run a single script that install the service/deamon.
How were you working with your Wicket application so far?
Related
I want my project to be launched on my personal computer via the Main function (either via java -jar or by mvn spring-boot: run), and when the development is complete, I can deploy it directly to Tomcat.
How to configure, to do this
You don't have to do anything special. Just follow the official documentation to build a deployable war. The war file created using the Spring Boot build process is executable as a regular jar file as it contains an embedded servlet container in a separate directory called lib-provided which is added to the classpath only when the war is directly executed.
Bonus: If you want to get rid of unnecessary dependencies on embedded server when creating a deployable war, you can check out a blog post, which show how to do it step-by-step.
I am linux admin and i want to automate the process of java web application deployment process in my client location. And actually they are using svn tool for version control.
So my question is if they commit the code into subversion repository automatically create a war file through bash script and move that war file into tomcat for automated deployment....
This is my thought.. can u guys suggest me about war file creation remain process i can build through bash
Thank u in advance
To create war file, you need to use jar tool of JDK. You need to use -c switch of jar, to create the war file.
Go inside the project directory of your project (outside the WEB-INF), then write the following command:
jar -cvf projectname.war *
Here, -c is used to create file, -v to generate the verbose output and -f to specify the arhive file name.
The * (asterisk) symbol signifies that all the files of this directory (including sub directory).
There are multiple ways to create WAR file
Using ANT/Maven or many times framework also provides command e.g. Play Framework.
You basically need to go to the SVN checkout project folder.
if you have ANT or Maven project than follow the steps :
How to create a WAR file using the commandline?
How to create war files
else for other Java based project :
To create war file, you need to use jar tool of JDK. You need to use -c switch of jar, to create the war file.
Go inside the project directory of your project (outside the WEB-INF), then write the following command:
jar -cvf projectname.war *
https://www.javatpoint.com/war-file
You can then copy the newly created WAR file to Tomcat webapps folder using linux command
SCP or CP.
Hi can anyone please tell me how to convert the eclipse dynamic web app into executable jar. I need to use this jar in another application to generate the jsps. So even after adding into another project it should be working as web app only.
Can anyone please help me to resolve this.
For Dynamic web projects you cannot create an Executable jar file,but you always have an option to export as .War file that you can include to build and EAR file which can include multiple .war files from other Dynamic web applications as well. How this war can communicate with other war files with in EAR for that you can refer this Options to communicate between WARs in the same EAR
I saw lots of questions including this one : How to create an war file in Eclipse without ant or maven?
I have standard web project created with eclipse. In this web project like many others there isn't only jsp and web files, but java files also. I am using eclipse Luna and I am trying to export my project as war but when I use the export option and package it like war it packages only my web content. Normally after I deploy it to tomcat it fails on login in my site because there is no java files on the war. I am new to the web projects and I do not want to use maven or ant. I want to just simply make working war from eclipse and could not find normal way to do that.
Right Click on your Web project --> export --> War file --> Choose destination path and select on Export source files.
See the below screen shot:
After creating Excel2DB22.war. I have imported it again into my IDE. I can see all the files including java also in that project.
See the below SS:
I hope it will help you.
Hello all master minds,
I have created a java spring application in eclipse with mysql db.
Now I can run this application using >Run on server in eclipse,but I want to know how to deploy this application on my own laptop(windows 7).
I have already configured server,by localhost://8080 I can see Apache tomcat is configured.
Give me simple steps so that i can just run that software using browser via its link like
http://localhost:8080/PMS
PMS is my project name.
Thanks in advance.
You can install tomcat-manager in order to deploy your war using a web interface: Tomcat 7 manager
Another option is to copy your war file into tomcat webapps folder. Your container will auto deploy your war: http://tomcat.apache.org/tomcat-7.0-doc/appdev/deployment.html#Deployment_With_Tomcat.
The easiest way, since you are using eclipse is to just export your project as war and then put that war (naming it PMS) in webapps directory in your tomcat.
Once started, Tomcat will deploy that war on http://localhost:8080/PMS
You have to do the following steps:
Right click on project>> Export (Export as WAR file).
or if you are using a maven project then you can give a maven build.
Copy that WAR file, (you will get that war file inside the project folder in your workspace) to the tomcat_Installed_Folder/ webapps
Inorder to deploy the app from outside eclipse,
goto tomcat_Installed_Folder/bin
and double click on startup.bat
then you could see a console.
For detailed logs of deployment, goto tomcat_Installed_Folder/logs
ALL THE BEST :)