Tools
Dynamic Content inc Java
Using Java Servlets (Tomcat) | Using Java Servlets (Tomcat) |
|
|
|
Java Tomcat AccountsThis page describes how to use your Java Account. RequirementsYour account detail e-mail/letter Using ServletsTesting your accountTo test your account is correctly set up for servlets, open up a web browser and go to http:// webserver /mountpoint / test2020 where
Both of these are in the account detail letter. This should bring up a page looking like:
If this does not happen, then contact support. Your Tomcat Servlet AccountDirectory StructureHome Directory/ WEB-INF DirectoryIn your account there will be a directory called 'WEB-INF' with a sub-directories 'classes' and 'lib'. The 'classes' directory contains the classes for the test page and also for any servlets that you generate, and the 'lib' directory contains any jar files. The mapping between the URL's and particular servlets is controlled via the XML file 'web.xml'. For each servlet that is directly accessed via a URL there are the following lines (for the servlet 'test2020'): < servlet > An example version of the file, which runs the demo servlet is in the directory and it is recommended that you use this as a template. Downloading ServletsYou can either download servlet class or jar files into the 'classes' or 'lib' directory or by downloading the source files and compiling them on the server. It is quite common for people to develop their applications 'off-line' and then just download the completed files when ready. Compiling ServletsJava 2 is installed on the server, and you can compile your servlets with javac. For example the test servlet was compiled using (in the src directory) javac -d ../classes test2020.java DebuggingOnce the class files are installed, the main source of debugging information are the logs from Apache / Tomcat. These log files are available to developers on the password protected web page: http://webserver/logs/errorlog.shtml If you require further assistance then contact us Further InformationUsing SSH Using Servlets and MySQL FinallyWe hope that this page has made setting up and using servlets as painless as possible. If there is anything we have left out, or you have further comments, please Contact Us. |
||
| Next > |
|---|
| Hosting |
| Domains |
| Servers |
| Connectivity |
|
||





