You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Si...@planalto.gov.br on 2006/07/27 23:01:18 UTC

Back to 404 problem: The requested resource (/Sisc/servlet/servle ts/PesquisaTabPeriferica) is not available

Dear All,

I implemented the suggestions from the list but the 404 problem still
persists.
I have an application called Sisc
Under Sisc there are package1 package2 package3... and a new package called
servlets with all my servlets (note that the name has a S at the end).
I included 'package servlets;' as first line of all servlets
The web.xml file looks like this:
<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE web-app
    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
    "http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
  <display-name>Presidencia da Republica</display-name>
  <description>SISC by Siomara Pantarotto</description>
  <servlet>
      <servlet-name>incluiMarcaPropriedade</servlet-name>
      <servlet-class>servlets.IncluiMarcaPropriedade</servlet-class>

      <servlet-name>pesquisaTabPeriferica</servlet-name>
      <servlet-class>servlets.PesquisaTabPeriferica</servlet-class>
      
	  <servlet-name>registraMarcaPropriedade</servlet-name>
      <servlet-class>servlets.RegistraMarcaPropriedade</servlet-class>
  </servlet>
  <servlet-mapping>
      <servlet-name>incluiMarcaPropriedade</servlet-name>
      <url-pattern>/servlet/servlets/IncluiMarcaPropriedade</url-pattern>
     
      <servlet-name>pesquisaTabPeriferica</servlet-name>
      <url-pattern>/servlet/servlets/PesquisaTabPeriferica</url-pattern>
      
      <servlet-name>registraMarcaPropriedade</servlet-name>
      <url-pattern>/servlet/servlets/RegistraMarcaPropriedade</url-pattern>
  </servlet-mapping>
</web-app>

Am I missing something????
The weird thing I noticed is that sometimes the servlet
'PesquisaTabPeriferica' works fine, sometimes it does not and I get 404
message (specially when I clean browser history, delete files and off line
files). When the servlet 'PesquisaTabPeriferica' works the other one
'RegistraMarcaPropriedade' does not.
I have no clue of what is going on. This never happened to me before. I am
losing confidence regarding TOMCAT and don't know what to do. 
Can someone help me please. I do appreciate your feed back.
These are my calls from the application:

from index.htm:
...
        <td width="50%" height="20"><a
href="servlet/servlets/PesquisaTabPeriferica?idTabela=1">
        Consultar/Manutenção Marca de Propriedade</a></td>
...


from incluiMarcaPropriedade.htm:
...
////////////////////////////////////////////////////////////////////////////
///
// Validate fields and submit form elements to servlet
RegistraMarcaPropriedade
//
function doFormSubmit()
{
	objfrm=document.incluiAlteraMarcaPropriedade;
	//Store the file path of the next servlet/jsp to be called
	strFilePath = "servlet/servlets/RegistraMarcaPropriedade"
  
	strDescricao=objfrm.txtDescricao.value;
	if(isSpecialChar(strDescricao) || !isChar(strDescricao))
	{
    	alert("Favor entrar com uma descrição válida.");
		objfrm.txtDescricao.focus();
		return false;
	}

	if(isEmpty(strDescricao))
	{
    	alert("Campo obrigatório");
		objfrm.TxtNumber.focus();
		return false;
	}

	objfrm.method="post";
	objfrm.action=strFilePath;
	return true;
	objfrm.submit();
	
}
...
Thanks a lot


---------------------------------------------------------------------
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: Back to 404 problem: The requested resource (/Sisc/servlet/servle ts/PesquisaTabPeriferica) is not available

Posted by Guilherme Silveira <gu...@caelum.com.br>.
Oi Siomara,


>   <servlet>
>       <servlet-name>incluiMarcaPropriedade</servlet-name>
>       <servlet-class>servlets.IncluiMarcaPropriedade</servlet-class>
>
>       <servlet-name>pesquisaTabPeriferica</servlet-name>
>       <servlet-class>servlets.PesquisaTabPeriferica</servlet-class>
>
>           <servlet-name>registraMarcaPropriedade</servlet-name>
>       <servlet-class>servlets.RegistraMarcaPropriedade</servlet-class>
>   </servlet>
The servlet specification doesnt mention allowing two servlets
configured in one servlet tag.... (take a look at the dtd file)

For the 2.3 specs you should put 8 lines of code for each
servlet+servlet mapping

This might be your prob

Att

Guilherme Silveira

This never happened to me before. I am
> losing confidence regarding TOMCAT and don't know what to do.
> Can someone help me please. I do appreciate your feed back.
> These are my calls from the application:
>
> from index.htm:
> ...
>         <td width="50%" height="20"><a
> href="servlet/servlets/PesquisaTabPeriferica?idTabela=1">
>         Consultar/Manutenção Marca de Propriedade</a></td>
> ...
>
>
> from incluiMarcaPropriedade.htm:
> ...
> ////////////////////////////////////////////////////////////////////////////
> ///
> // Validate fields and submit form elements to servlet
> RegistraMarcaPropriedade
> //
> function doFormSubmit()
> {
>         objfrm=document.incluiAlteraMarcaPropriedade;
>         //Store the file path of the next servlet/jsp to be called
>         strFilePath = "servlet/servlets/RegistraMarcaPropriedade"
>
>         strDescricao=objfrm.txtDescricao.value;
>         if(isSpecialChar(strDescricao) || !isChar(strDescricao))
>         {
>         alert("Favor entrar com uma descrição válida.");
>                 objfrm.txtDescricao.focus();
>                 return false;
>         }
>
>         if(isEmpty(strDescricao))
>         {
>         alert("Campo obrigatório");
>                 objfrm.TxtNumber.focus();
>                 return false;
>         }
>
>         objfrm.method="post";
>         objfrm.action=strFilePath;
>         return true;
>         objfrm.submit();
>
> }
> ...
> Thanks a lot
>
>
> ---------------------------------------------------------------------
> 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
>
>


-- 
Guilherme Silveira
--------------------------------------------------
guilherme.silveira@caelum.com.br
Caelum - Ensino e Solucoes em Java
www.caelum.com.br

---------------------------------------------------------------------
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: Back to 404 problem: The requested resource (/Sisc/servlet/servle ts/PesquisaTabPeriferica) is not available

Posted by David Smith <dn...@cornell.edu>.
And what do the logs show regarding the problem servlets?

--David

Siomara@planalto.gov.br wrote:
> Dear All,
>
> I implemented the suggestions from the list but the 404 problem still
> persists.
> I have an application called Sisc
> Under Sisc there are package1 package2 package3... and a new package called
> servlets with all my servlets (note that the name has a S at the end).
> I included 'package servlets;' as first line of all servlets
> The web.xml file looks like this:
> <?xml version="1.0" encoding="ISO-8859-1"?>
>
> <!DOCTYPE web-app
>     PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
>     "http://java.sun.com/dtd/web-app_2_3.dtd">
> <web-app>
>   <display-name>Presidencia da Republica</display-name>
>   <description>SISC by Siomara Pantarotto</description>
>   <servlet>
>       <servlet-name>incluiMarcaPropriedade</servlet-name>
>       <servlet-class>servlets.IncluiMarcaPropriedade</servlet-class>
>
>       <servlet-name>pesquisaTabPeriferica</servlet-name>
>       <servlet-class>servlets.PesquisaTabPeriferica</servlet-class>
>       
> 	  <servlet-name>registraMarcaPropriedade</servlet-name>
>       <servlet-class>servlets.RegistraMarcaPropriedade</servlet-class>
>   </servlet>
>   <servlet-mapping>
>       <servlet-name>incluiMarcaPropriedade</servlet-name>
>       <url-pattern>/servlet/servlets/IncluiMarcaPropriedade</url-pattern>
>      
>       <servlet-name>pesquisaTabPeriferica</servlet-name>
>       <url-pattern>/servlet/servlets/PesquisaTabPeriferica</url-pattern>
>       
>       <servlet-name>registraMarcaPropriedade</servlet-name>
>       <url-pattern>/servlet/servlets/RegistraMarcaPropriedade</url-pattern>
>   </servlet-mapping>
> </web-app>
>
> Am I missing something????
> The weird thing I noticed is that sometimes the servlet
> 'PesquisaTabPeriferica' works fine, sometimes it does not and I get 404
> message (specially when I clean browser history, delete files and off line
> files). When the servlet 'PesquisaTabPeriferica' works the other one
> 'RegistraMarcaPropriedade' does not.
> I have no clue of what is going on. This never happened to me before. I am
> losing confidence regarding TOMCAT and don't know what to do. 
> Can someone help me please. I do appreciate your feed back.
> These are my calls from the application:
>
> from index.htm:
> ...
>         <td width="50%" height="20"><a
> href="servlet/servlets/PesquisaTabPeriferica?idTabela=1">
>         Consultar/Manutenção Marca de Propriedade</a></td>
> ...
>
>
> from incluiMarcaPropriedade.htm:
> ...
> ////////////////////////////////////////////////////////////////////////////
> ///
> // Validate fields and submit form elements to servlet
> RegistraMarcaPropriedade
> //
> function doFormSubmit()
> {
> 	objfrm=document.incluiAlteraMarcaPropriedade;
> 	//Store the file path of the next servlet/jsp to be called
> 	strFilePath = "servlet/servlets/RegistraMarcaPropriedade"
>   
> 	strDescricao=objfrm.txtDescricao.value;
> 	if(isSpecialChar(strDescricao) || !isChar(strDescricao))
> 	{
>     	alert("Favor entrar com uma descrição válida.");
> 		objfrm.txtDescricao.focus();
> 		return false;
> 	}
>
> 	if(isEmpty(strDescricao))
> 	{
>     	alert("Campo obrigatório");
> 		objfrm.TxtNumber.focus();
> 		return false;
> 	}
>
> 	objfrm.method="post";
> 	objfrm.action=strFilePath;
> 	return true;
> 	objfrm.submit();
> 	
> }
> ...
> Thanks a lot
>
>
> ---------------------------------------------------------------------
> 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
>
>   


-- 
David Smith
Network Operations Supervisor
Department of Entomology
Cornell University
2132 Comstock Hall
Ithaca, NY 14853
Phone: (607) 255-9571
Fax: (607) 255-0940


---------------------------------------------------------------------
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