|Re: Java class files for tomcat, where? [message #1736030 is a reply to message #1735741]
||Fri, 24 June 2016 13:25
| Larry Isaacs
Registered: July 2009
On 6/22/2016 7:30 AM, Jens Andersson wrote:|
> This question was posted in the Newcomers forum, see
> A comment suggested re- posting here.
> Original post:
> Learning web server programming (java, tomcat) using the tutorial found
> on jsptut.com. When I come to 'Beans and Forms Processing' I run into
> trouble: Where in the project should I store the java class
> UserData.java definition file? And how to compile it within Eclipse?
> Finally, where should teh UserData.class file go?
> A working solution found by trial-and-terror is to store the .java file
> under Java Resources/src/<package name>, mark the .java file and hit
> Run. This creates a .class file in the build/classes/<package name>
> directory. I copy this .class file to WEB-INF/classes and restart the
> I run Eclipse Mars.2, JDK 1.8 and Tomcat 8 on a CentOS 6 host.
For details about the Tomcat support in WTP, see the Tomcat FAC.
Though the information is rather old, it still applies.
Note that "publishing" is involved when running your Dynamic Web project
on a server. This "publishing" includes copying the classes under
"build/classes" to the "WEB-INF/classes" of the target publish location.
Since your class file is going to "build/classes", you are putting
your Java source in the right location. The "assembly" that occurs
during "publishing" is controlled by the Deployment Assembly page in the
project's Properties dialog.
Powered by FUDForum
. Page generated in 0.02018 seconds