> -----Original Message-----
> From: Mushtaq, Hassan [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, July 31, 2002 5:34 PM
> To: '[EMAIL PROTECTED]'
> Subject: Ttomcat 4.0.4 Configuration
>
>
> Hi, I have two questions:
>
> 1. Can I configure tomcat somehow that if we put some class file in
> WEB-INF/classes folder we do not have to write page import staement?
> whatever in the classes should be visible to jsp page directly.
the page import statements can be thought of as declaring a namespace. For
example, instead of using
<%@ page import = "java.util.ArrayList" %>
<% ArrayList al = new ArrayList(); %>
You could not use the page import and just do
<% java.util.ArrayList al = new java.util.ArrayList(); %>
Tomcat really has nothing to do with this, it's just how java works.
>
> 2. How can I configure tomcat in such a was that
> WEB-INF/classes folder
> should be for servlets only and user classes and beans should go to
> WEB-INF/lib folder? When someone puts a class in classes
> folder that is not
> servlet and tries to run it, the tomcat should give 404 (page
> not found)
> error.
tomcat will throw an internal error (maybe a 404) if someone trys to do
this, unless the class extends HttpServlet ( hence making it a servlet),
because tomcat is looking for that interface on the class. That will keep
non-servlets out of the classes directory. As far as keeping servlets out of
the lib directory, i don't think there is any way to do that. If you do not
let them change the web.xml file for the webapp, they will not be able to
get at their servlet anyways. This is probably the only way to restrict
something like that.
>
> Thanks.
>
> Hassan Mushtaq
> Research Assisstant at University of Houston Clearlake
>
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>