0
votes

According to http://www.herongyang.com/JSP/JavaBean-Set-and-Get-JavaBean-Properties.html

Compile and deploy the class file to the Tomcat class folder:

C:>\Progra~1\java\jdk1.7.0_07\bin\javac herong\DemoBean.java

C:>xcopy herong \local\apache-tomcat-7.0.32\webapps**ROOT**\WEB-INF\classes\herong

If I have my jsp under \local\apache-tomcat-7.0.32\webapps\app1\ with WEB-INF can I use it instead of webapps\ROOT

If yes what's the advantage of one or the other ?

1

1 Answers

1
votes

ROOT is tomcat's placeholder for the application that you reach on / (e.g. just your server name), while app1 will be on /app1. Which of both is an advantage over the other shall be left as an exercise to you.

You probably want to look into proper packaging and deploying of webapps instead of xcopy'ing random files into existing ones. Just overwriting or injecting any file into existing web applications will just create an unmaintainable mess. Even if you're just doing this for exploratory reasons, you better explore the proper way of operation instead of this very hacky way.