You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by John Blanco <jb...@tvmax.net> on 2003/08/13 03:44:53 UTC

Servlets from public_html?

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.

-- 
	- John Blanco
	- Code Guru @ Rapture In Venice
	- http://members.bbnow.net/jblanco

Re: Servlets from public_html?

Posted by John Turner <to...@johnturner.com>.
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.
> 



Re: Servlets from public_html?

Posted by John Turner <to...@johnturner.com>.
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: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org