I have created a java web application using netbeans 8. The project works fine.
I need a help to put my project to the raspberry pi , so that when i type the ip address in the web browser it should run my java web application.
Also what are the things i needed to make my raspberry pi as a web server.
In my raspberry pi ,i already have java 8 ,apache2 ,tomcat8.
Step 1 Follow the instructions from Digital Ocean and install tomcat.
Step 2 After installing in netbeans, Go to Run->Clean and build.
Step 3 Goto Project folder and find the projectname.war file in dist folder.
Step 4 Rename the war to ROOT.war.
Step 5 Assuming you have followed all the procedure as mentioned in digital
ocean from step 1, goto http://localhost:8080/
Step 6. Click Manage App .
Step 7 At the bottom there will be a browse button under upload war. Click it
Step 8 After selecting ROOT.war . Click deploy.
There you go. Now enter http://ip_of_pi:8080 from any browser in local network to view your site.
Port forward it to access it globally. (optional).
PS :- if you find error in the line curl -O in step 1 guide , replace the step by manually downloading tomcat.tar from Tomcat Official Site. Tomcat's Official Site to tmp folder.
Hope it helps someone
Download Tomcat8 from in /home/pi https://tomcat.apache.org/download-80.cgi#8.0.53
$ cd $HOME
$ sudo nano tomcat-users.xml add add
$ cd $HOME/tomcat8/bin
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.