Java & J2EE Page 10 - Developing JavaServer Pages |
If you're using Tomcat 4.0, Figure 10 shows where and how to save your compiled Java classes (the .class files) so Tomcat can access them. Usually, you'll save your source code (the .java files) in the same directory, but that's not required. Figure 10: Where and How to Save and Compile Regular Java Classes Where the User class is saved
Where the UserIO class is saved
Other places to save your Java classes
The DOS Prompt Window for Compiling the User Class
Description To compile a class, you can use TextPad's Compile Java command, your IDE's compile command, or the javac command from the DOS prompt window. If you have trouble compiling a class, make sure your system is configured correctly as described in appendix A of my textbook. The two paths shown at the top of this figure show where the User and UserIO classes that come with this book are saved. After that, the figure presents the syntax for other paths that can be used to store Java classes. If you review these paths, you'll see that each one places the Java classes in a subdirectory of the WEB-INFclasses directory.
blog comments powered by Disqus |