TIA,
How you reference your servlet depends on the mapping entry in the web.xml
file in the WEB-INF directory.
ex:
<servlet>
<servlet-name>helloServlet</servlet-name>
<servlet-class>HelloServlet</servlet-class>
</servlet>
With this mapping you would reference it with helloServlet
As to your second question, the user can't invoke it because the 1)
application server won't let the user access the file since it's not mapped
2) since the bean doesn't extend the servlet class, the user doesn't have a
way to access the class anyway. The user also shouldn't know that the bean
even exists.
Regards,
Richard
At 09:45 AM 3/13/2002 +0700, you wrote:
>Hi all,
>
>If supposed i have HelloServlet.class and put it in WEB_INF\classes
>directory, should it be called using http://server/servlet/HelloServlet ?
>Can i use diferent path, ie. http://server/tools/HelloServlet or even
>http://server/HelloServlet ?
>
>What if i have MyJavaBean.class in the same directory, will user can invoke
>this bean directly (using http://server/servlet/MyJavaBean) ?
>
>Also what is the advantage servlet over jsp?
>
>TIA.
>
>===========================================================================
>To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
>JSP-INTEREST".
>For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
>Some relevant FAQs on JSP/Servlets can be found at:
>
>http://archives.java.sun.com/jsp-interest.html
>http://java.sun.com/products/jsp/faq.html
>http://www.esperanto.org.nz/jsp/jspfaq.jsp
>http://www.jguru.com/faq/index.jsp
>http://www.jspinsider.com
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:
http://archives.java.sun.com/jsp-interest.html
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.jsp
http://www.jguru.com/faq/index.jsp
http://www.jspinsider.com