You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Eddie Fahy <ed...@yahoo.com> on 2006/09/13 05:28:16 UTC

plz hlp. Servlet Not found when accessing Servlet from internet

Hi,
  I have a strange problem. I am not able to access my servlet from internet although everything works very well when i access mywebapp using http://localhost/mywebapp/Servletx

I am running a webapp which has a servlet. When I try to run my webapp, all the JSPs work good but the servlet is "not found". If I try to access the application from "http://localhost/mywebapp/Servletx" everything including the servlet, etc. is working perfect. But when I try to access my webapp via internet, everything works, but servlet doesnt' work. I get "404 Not Found" error message. I checked chmod of the files, they all are in good shape.
My web.xml is very small and simple (pasted below). Can anyone tell me what could be the reason that outside world cannot access my servlet?

More precise error message:
"Not Found

The requested URL /mywebapp/Search was not found on this server.
Apache/2.0.53 (Unix) mod_ssl/2.0.53 OpenSSL/0.9.7a PHP/5.0.3 mod_jk/1.2.9  Server at x.x.x.x  Port 80"

Thanks,
Eddie.

<web-app xmlns="http://java.sun.com/xml/ns/j2ee" versionfiltered="2.4"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocationfiltered="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
         
  <servlet>
    <servlet-name>Search</servlet-name>
    <servlet-class>test.HelloServlet</servlet-class>
  </servlet>
 
  <servlet-mapping>
    <servlet-name>Search</servlet-name>
    <url-pattern>/Search</url-pattern>
  </servlet-mapping>
  
</web-app>
 		
---------------------------------
Do you Yahoo!?
 Everyone is raving about the  all-new Yahoo! Mail.

Re: plz hlp. Servlet Not found when accessing Servlet from internet

Posted by Santosh Puranshettiwar <sa...@wirkle.com>.
Essentially, you will first have to install mod_jk. Then configure its 
worker properties. The article in the following link briefs about this.
http://www.serverwatch.com/tutorials/article.php/2203891

You might also be interested in reading the Jakarta reference:
http://tomcat.apache.org/tomcat-3.2-doc/tomcat-apache-howto.html

Santosh.
Eddie Fahy wrote:
> Hi Santosh,
>     Thanks for your reply. Yes, your suggestion makes lots of sense. There is apache webserver installed. Along with that there is php, tomcat, etc. Just like anyother Linux Server. Yesterday I discovered that if I access my servlet from internet by sepcifying port 8080, now its ok. but if I dont' specify 8080, default is 80 and it goes to apache. and apache doesnt' find my servlet. 
>
> Could you please explaing me little bit more that what should be done on the server that Apache forwards request to Tomcat. I m not that experienced with Linux.
>
> Thanks.
> Eddie.
>
> Santosh Puranshettiwar <sa...@wirkle.com> wrote: Eddie Fahy wrote:
>   
>> Hi,
>>   I have a strange problem. I am not able to access my servlet from internet although everything works very well when i access mywebapp using http://localhost/mywebapp/Servletx
>>
>> I am running a webapp which has a servlet. When I try to run my webapp, all the JSPs work good but the servlet is "not found". If I try to access the application from "http://localhost/mywebapp/Servletx" everything including the servlet, etc. is working perfect. But when I try to access my webapp via internet, everything works, but servlet doesnt' work. I get "404 Not Found" error message. I checked chmod of the files, they all are in good shape.
>> My web.xml is very small and simple (pasted below). Can anyone tell me what could be the reason that outside world cannot access my servlet?
>>
>> More precise error message:
>> "Not Found
>>
>> The requested URL /mywebapp/Search was not found on this server.
>> Apache/2.0.53 (Unix) mod_ssl/2.0.53 OpenSSL/0.9.7a PHP/5.0.3 mod_jk/1.2.9  Server at x.x.x.x  Port 80"
>>
>> Thanks,
>> Eddie.
>>
>>
>>          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>          xsi:schemaLocationfiltered="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
>>          
>>   
>>     Search
>>     test.HelloServlet
>>   
>>  
>>   
>>     Search
>>     /Search
>>   
>>   
>>
>>    
>> ---------------------------------
>> Do you Yahoo!?
>>  Everyone is raving about the  all-new Yahoo! Mail.
>>   
>>     
> In deployment mode, do you use Apache (or any other server in that 
> matter) at the front end? If so, you will have to program mod_jk (or any 
> other connector you use) to forward all requests meant for the webapp, 
> from Apache to Tomcat.
>
> Santosh.
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
>
>  		
> ---------------------------------
> How low will we go? Check out Yahoo! Messenger’s low  PC-to-Phone call rates.
>   


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: plz hlp. Servlet Not found when accessing Servlet from internet

Posted by Eddie Fahy <ed...@yahoo.com>.
Hi Santosh,
    Thanks for your reply. Yes, your suggestion makes lots of sense. There is apache webserver installed. Along with that there is php, tomcat, etc. Just like anyother Linux Server. Yesterday I discovered that if I access my servlet from internet by sepcifying port 8080, now its ok. but if I dont' specify 8080, default is 80 and it goes to apache. and apache doesnt' find my servlet. 

Could you please explaing me little bit more that what should be done on the server that Apache forwards request to Tomcat. I m not that experienced with Linux.

Thanks.
Eddie.

Santosh Puranshettiwar <sa...@wirkle.com> wrote: Eddie Fahy wrote:
> Hi,
>   I have a strange problem. I am not able to access my servlet from internet although everything works very well when i access mywebapp using http://localhost/mywebapp/Servletx
>
> I am running a webapp which has a servlet. When I try to run my webapp, all the JSPs work good but the servlet is "not found". If I try to access the application from "http://localhost/mywebapp/Servletx" everything including the servlet, etc. is working perfect. But when I try to access my webapp via internet, everything works, but servlet doesnt' work. I get "404 Not Found" error message. I checked chmod of the files, they all are in good shape.
> My web.xml is very small and simple (pasted below). Can anyone tell me what could be the reason that outside world cannot access my servlet?
>
> More precise error message:
> "Not Found
>
> The requested URL /mywebapp/Search was not found on this server.
> Apache/2.0.53 (Unix) mod_ssl/2.0.53 OpenSSL/0.9.7a PHP/5.0.3 mod_jk/1.2.9  Server at x.x.x.x  Port 80"
>
> Thanks,
> Eddie.
>
> 
>          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>          xsi:schemaLocationfiltered="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
>          
>   
>     Search
>     test.HelloServlet
>   
>  
>   
>     Search
>     /Search
>   
>   
> 
>    
> ---------------------------------
> Do you Yahoo!?
>  Everyone is raving about the  all-new Yahoo! Mail.
>   
In deployment mode, do you use Apache (or any other server in that 
matter) at the front end? If so, you will have to program mod_jk (or any 
other connector you use) to forward all requests meant for the webapp, 
from Apache to Tomcat.

Santosh.

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org



 		
---------------------------------
How low will we go? Check out Yahoo! MessengerÂ’s low  PC-to-Phone call rates.

Re: plz hlp. Servlet Not found when accessing Servlet from internet

Posted by Santosh Puranshettiwar <sa...@wirkle.com>.
Eddie Fahy wrote:
> Hi,
>   I have a strange problem. I am not able to access my servlet from internet although everything works very well when i access mywebapp using http://localhost/mywebapp/Servletx
>
> I am running a webapp which has a servlet. When I try to run my webapp, all the JSPs work good but the servlet is "not found". If I try to access the application from "http://localhost/mywebapp/Servletx" everything including the servlet, etc. is working perfect. But when I try to access my webapp via internet, everything works, but servlet doesnt' work. I get "404 Not Found" error message. I checked chmod of the files, they all are in good shape.
> My web.xml is very small and simple (pasted below). Can anyone tell me what could be the reason that outside world cannot access my servlet?
>
> More precise error message:
> "Not Found
>
> The requested URL /mywebapp/Search was not found on this server.
> Apache/2.0.53 (Unix) mod_ssl/2.0.53 OpenSSL/0.9.7a PHP/5.0.3 mod_jk/1.2.9  Server at x.x.x.x  Port 80"
>
> Thanks,
> Eddie.
>
> <web-app xmlns="http://java.sun.com/xml/ns/j2ee" versionfiltered="2.4"
>          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>          xsi:schemaLocationfiltered="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
>          
>   <servlet>
>     <servlet-name>Search</servlet-name>
>     <servlet-class>test.HelloServlet</servlet-class>
>   </servlet>
>  
>   <servlet-mapping>
>     <servlet-name>Search</servlet-name>
>     <url-pattern>/Search</url-pattern>
>   </servlet-mapping>
>   
> </web-app>
>  		
> ---------------------------------
> Do you Yahoo!?
>  Everyone is raving about the  all-new Yahoo! Mail.
>   
In deployment mode, do you use Apache (or any other server in that 
matter) at the front end? If so, you will have to program mod_jk (or any 
other connector you use) to forward all requests meant for the webapp, 
from Apache to Tomcat.

Santosh.

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org