Dir structure? Error message? URL that you're trying to use?


Remember that the Invoker servlet is disabled by default, if you've just dumped your servlet into a directory and expect to call it by its name, it won't work. You have to map it in your web.xml file, as enabling the Invoker is a security risk.

I'm no developer, but if my memory is correct, your dir structure should be something like this:

~jblanco/public_html/myApp
~jblanco/public_html/myApp/WEB-INF
~jblanco/public_html/myApp/WEB-INF/web.xml
~jblanco/public_html/myApp/WEB-INF/lib
~jblanco/public_html/myApp/WEB-INF/classes
~jblanco/public_html/myApp/WEB-INF/classes/yourServlet

Then in web.xml:

<servlet>
    <servlet-name>yourServlet</servlet-name>
    <display-name>yourServlet</display-name>
    <servlet-class>classes.yourServlet</servlet-class>
</servlet>

<servlet-mapping>
    <servlet-name>yourServlet</servlet-name>
    <url-pattern>/yourServlet</url-pattern>
</servlet-mapping>

Then you would call it like:

http://www.your-host.com/myApp/yourServlet

More on the Invoker:

http://jakarta.apache.org/tomcat/faq/misc.html#invoker

More on arranging your files and directories:

http://jakarta.apache.org/tomcat/tomcat-4.1-doc/appdev/deployment.html

John

John Blanco wrote:

I'm having trouble finding information on this...so here's a last stab. I've got everything set up to host files out of my ~jblanco/public_html. However, when I put a Web application in my public_html/ I can't access the Servlet. I can access HTML just fine but I can't access my servlets. The same structure in Tomncat's webapps works just fine, so I know the structure is right.

Can anyone help? Let me know what info you might be looking for...this is terribly frusterating.




--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to