Deploying just HTML, CSS webpage to Tomcat

后端 未结 4 1009
醉梦人生
醉梦人生 2020-11-28 02:02

I am just getting started on developing a website. All I have at the moment is a HTML page supported by a couple of CSS stylesheets

4条回答
  •  暗喜
    暗喜 (楼主)
    2020-11-28 03:00

    Here's my step in Ubuntu 16.04 and Tomcat 8.

    1. Copy folder /var/lib/tomcat8/webapps/ROOT to your folder.

      cp -r /var/lib/tomcat8/webapps/ROOT /var/lib/tomcat8/webapps/{yourfolder}

    2. Add your html, css, js, to your folder.

    3. Open "http://localhost:8080/{yourfolder}" in browser

    Notes:

    1. If you using chrome web browser and did wrong folder before, then clean web browser's cache(or change another name) otherwise (sometimes) it always 404.

    2. The folder META-INF with context.xml is needed.

提交回复
热议问题