|
I.
TOMCAT ACTIVATION:
Tomcat
is available for use with our Pro
Unix and eCommerce
Unix shared hosting plans. Here is how you can activate
the Tomcat server for your account using the Control Panel:
- Start
by logging into the Aplus.Net Control Panel at http://cp.aplus.net
using your Registration Number and Customer Password.
- Select
Web Hosting from the top navigation bar.
- Next,
select Hosted Domains and click on Manage
Hosted Domains.
- Now,
select the hosted domain name that you’d like to manage.
- Click
the Tomcat Activation
icon.
- Click
the Install button.
This will activate Tomcat for all hosted domains in
the current plan
including the utility domain:
II.
JSP FILES
You
can put your JSP files anywhere within your /html
directory. Once your Tomcat support is activated, a directory named WEB-INF
will be automatically created in your main /html directory. Your web.xml
file and the classes and lib
directories reside in the WEB-INF directory. You will also see a file snoop.jsp
in your /html directory, which you can use for testing purposes.
Example:
If you have a JSP file named “snoop.jsp” inside
your /html directory, you have to use the following URL to access it: http://yourdomainname.com/snoop.jsp
III.
SERVLETS:
All
Servlets should be uploaded in the /html/WEB-INF/classes
directory. Any unpacked custom classes and resources should be uploaded
in the /html/WEB-INF/classes directory, while
classes and resources packed in Jar files should be
uploaded to /html/WEB-INF/lib. In order to be able
to use any newly uploaded Servlets or custom class libraries, the
Tomcat has to be restarted. The Tomcat service is restarted
automatically on a regular basis - Monday to Friday at 9:30AM PST. You
do not need to create any class paths, those will be updated at the
next Tomcat restart.
Example:
If you have a Servlet named “TestServlet”, and its
files reside in the /html/WEB-INF/classes directory,
you have to use the following URL to access it: http://yourdomainname.com/servlet/TestServlet
If
you’d like to use Servlet Mapping, you have to modify your
web.xml file located in the /html/WEB-INF directory.
Example
of web.xml content: If you have a Servlet named
“myServlet” and you want to map it to
“ss”, you can use the following web.xml code:
<web-app>
<servlet>
<servlet-name>Snoopy</servlet-name>
<!--This can be any name. It is used as definition only
-->
<servlet-class>myServlet</servlet-class>
<!--This is the real name of your Servlet, i.e. myServlet.class
-->
</servlet>
<servlet-mapping>
<servlet-name>Snoopy</servlet-name>
<!--This has to be same as the name used for definition
-->
<url-pattern>/servlet/ss</url-pattern>
<!--How to access it: http://domain.com/servlet/ss-->
</servlet-mapping>
</web-app>
|