on Eclipse: on Project Explorer pane: right click > New > Other > Web > Dynamic Web Project > select the root directory (project name is like, chart) make sub directories under src make *.java (like Front.java) add Java EE JAR: right click on the project > Properties > Java Build Path > Libraries > Add External Jars > select javaee.jar in local file system deploy assembly: Build Project -> warning message "javaee.jar will not be exported or published..." to solve this problem: right click on the project > Properties > Deployment Assembly > Add > Archives from File System, and Next > Add, select the above jars, Finish > OK build project select JavaEE Perspective right click on the project > Java EE tools > Generate Deployment Descriptor Stub: web.xml is made edit web.xml Front com.treeofwords.Front Front /front export to WAR, like chart.war
upload sample.war to the server.
on server: $ sudo vi /etc/httpd/conf.d/ssl.conf (add the following line for https to work) JkMount /chart/* worker1 if already exist, delete /usr/share/tomcat8/webapps/chart/ move chart.war to webapps directory under Tomcat home, like /usr/share/tomcat8/webapps/ on CentOS. (/usr/share/tomcat8/webapps/chart/ is made automatically) chown tomcat.tomcat chart.war chmod 644 chart.war sudo /etc/init.d/tomcat8 restart (may not be necessary???)
access to the server with "https://treeofwords.com/chart/front"
|