You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Daxin Zuo <dz...@techexcel.com> on 2004/06/12 00:10:45 UTC

A Servlet question

I use Apache 2.4.9, Tomcat 4.1.9.
In a JSP, there there are three frames in a frameset. the script of each
frame is JSP.
Can a JSP in one frame submit to a Servlet? I did a test and failed. Please
confirm or teach me how to do.
Thanks



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: A Servlet question

Posted by Emerson Cargnin <em...@tre-sc.gov.br>.
Your classes must be inside ROOT/classes ...
is it a servlet or a JSP page...

Daxin Zuo wrote:
> I thought this map may not work either.
> in my web.xml I mapped the servlet as following:
> servlet>
>         <servlet-name>testJSP</servlet-name>
>         <servlet-class>texcel.testJSP.spiderClass</servlet-class>
>   </servlet>
>   <servlet-mapping>
>         <servlet-name>testJSP</servlet-name>
>        <url-pattern>/testJSP</url-pattern>
>   </servlet-mapping>
> 
> All me jsp of frames are in ROOT/texcel/testjsp/
> when frame2.jsp makes the frame1.jsp submit to "testJSP". the error is: The
> requested resource (/texcel/testjsp/testJSP) is not available.
> 
> if frame2.jsp makes the frame1.jsp submit to
> "http://localhost:8008/testJSP", it works.
> 
> Look for further instruction.
> Thanks.
> 
> -----Original Message-----
> From: Emerson Cargnin [mailto:emerson@tre-sc.gov.br]
> Sent: Friday, June 11, 2004 3:49 PM
> To: Tomcat Users List
> Subject: Re: A Servlet question
> 
> 
>   <servlet>
>      <servlet-name>partServlet</servlet-name>
>      <servlet-class>gov.tresc.sgip.PartServlet</servlet-class>
>    </servlet>
> 
> 
>    <servlet-mapping>
>      <servlet-name>partServlet</servlet-name>
>      <url-pattern>/servlet/partServlet/*</url-pattern>
>    </servlet-mapping>
> 
> In this example, to access the servlet you could use
> 
> http://localhost:8080/sgip/servlet/partServlet
> 
> 
> Daxin Zuo wrote:
> 
>>You are right, after I send my last email to this list, I tested it with
>>full URL of the servlet. It worked well. So I need to tell Tomcat that it
> 
> is
> 
>>a servlet.
>>The previous problem is that Tomcat add the relative path before the
> 
> servlet
> 
>>name.
>>Could you please give the example for the servlet name mapping?
>>Thanks.
>>
>>-----Original Message-----
>>From: Emerson Cargnin [mailto:emerson@tre-sc.gov.br]
>>Sent: Friday, June 11, 2004 3:19 PM
>>To: Tomcat Users List
>>Subject: Re: A Servlet question
>>
>>
>>AFAIK, submiting from a frame is the same as a single page. What was the
>>error msg you've got?
>>Probably, it has some problem in the servlet mapping... did you try to
>>load the jsp alone in the browser and submit it? if it doens't work, it
>>doens't has to do with the frames at all.
>>Emerson
>>
>>Daxin Zuo wrote:
>>
>>
>>>I use Apache 2.4.9, Tomcat 4.1.9.
>>>In a JSP, there there are three frames in a frameset. the script of each
>>>frame is JSP.
>>>Can a JSP in one frame submit to a Servlet? I did a test and failed.
>>
>>Please
>>
>>
>>>confirm or teach me how to do.
>>>Thanks
>>>
>>>
>>>
>>>---------------------------------------------------------------------
>>>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>>>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>>>
>>>
>>
>>
>>
>>--
>>Emerson Cargnin
>>Analista de Sistemas
>>Setor de Desenvolvimento de Sistemas - TRE-SC
>>tel : (048) - 251-3700 - Ramal 3181
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>>
>>
> 
> 
> 
> --
> Emerson Cargnin
> Analista de Sistemas
> Setor de Desenvolvimento de Sistemas - TRE-SC
> tel : (048) - 251-3700 - Ramal 3181
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 
> 


-- 
Emerson Cargnin
Analista de Sistemas
Setor de Desenvolvimento de Sistemas - TRE-SC
tel : (048) - 251-3700 - Ramal 3181

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


RE: A Servlet question

Posted by Daxin Zuo <dz...@techexcel.com>.
I thought this map may not work either.
in my web.xml I mapped the servlet as following:
servlet>
        <servlet-name>testJSP</servlet-name>
        <servlet-class>texcel.testJSP.spiderClass</servlet-class>
  </servlet>
  <servlet-mapping>
        <servlet-name>testJSP</servlet-name>
       <url-pattern>/testJSP</url-pattern>
  </servlet-mapping>

All me jsp of frames are in ROOT/texcel/testjsp/
when frame2.jsp makes the frame1.jsp submit to "testJSP". the error is: The
requested resource (/texcel/testjsp/testJSP) is not available.

if frame2.jsp makes the frame1.jsp submit to
"http://localhost:8008/testJSP", it works.

Look for further instruction.
Thanks.

-----Original Message-----
From: Emerson Cargnin [mailto:emerson@tre-sc.gov.br]
Sent: Friday, June 11, 2004 3:49 PM
To: Tomcat Users List
Subject: Re: A Servlet question


  <servlet>
     <servlet-name>partServlet</servlet-name>
     <servlet-class>gov.tresc.sgip.PartServlet</servlet-class>
   </servlet>


   <servlet-mapping>
     <servlet-name>partServlet</servlet-name>
     <url-pattern>/servlet/partServlet/*</url-pattern>
   </servlet-mapping>

In this example, to access the servlet you could use

http://localhost:8080/sgip/servlet/partServlet


Daxin Zuo wrote:
> You are right, after I send my last email to this list, I tested it with
> full URL of the servlet. It worked well. So I need to tell Tomcat that it
is
> a servlet.
> The previous problem is that Tomcat add the relative path before the
servlet
> name.
> Could you please give the example for the servlet name mapping?
> Thanks.
>
> -----Original Message-----
> From: Emerson Cargnin [mailto:emerson@tre-sc.gov.br]
> Sent: Friday, June 11, 2004 3:19 PM
> To: Tomcat Users List
> Subject: Re: A Servlet question
>
>
> AFAIK, submiting from a frame is the same as a single page. What was the
> error msg you've got?
> Probably, it has some problem in the servlet mapping... did you try to
> load the jsp alone in the browser and submit it? if it doens't work, it
> doens't has to do with the frames at all.
> Emerson
>
> Daxin Zuo wrote:
>
>>I use Apache 2.4.9, Tomcat 4.1.9.
>>In a JSP, there there are three frames in a frameset. the script of each
>>frame is JSP.
>>Can a JSP in one frame submit to a Servlet? I did a test and failed.
>
> Please
>
>>confirm or teach me how to do.
>>Thanks
>>
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>>
>>
>
>
>
> --
> Emerson Cargnin
> Analista de Sistemas
> Setor de Desenvolvimento de Sistemas - TRE-SC
> tel : (048) - 251-3700 - Ramal 3181
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>


--
Emerson Cargnin
Analista de Sistemas
Setor de Desenvolvimento de Sistemas - TRE-SC
tel : (048) - 251-3700 - Ramal 3181

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: A Servlet question

Posted by Emerson Cargnin <em...@tre-sc.gov.br>.
  <servlet>
     <servlet-name>partServlet</servlet-name>
     <servlet-class>gov.tresc.sgip.PartServlet</servlet-class>
   </servlet>


   <servlet-mapping>
     <servlet-name>partServlet</servlet-name>
     <url-pattern>/servlet/partServlet/*</url-pattern>
   </servlet-mapping>

In this example, to access the servlet you could use

http://localhost:8080/sgip/servlet/partServlet


Daxin Zuo wrote:
> You are right, after I send my last email to this list, I tested it with
> full URL of the servlet. It worked well. So I need to tell Tomcat that it is
> a servlet.
> The previous problem is that Tomcat add the relative path before the servlet
> name.
> Could you please give the example for the servlet name mapping?
> Thanks.
> 
> -----Original Message-----
> From: Emerson Cargnin [mailto:emerson@tre-sc.gov.br]
> Sent: Friday, June 11, 2004 3:19 PM
> To: Tomcat Users List
> Subject: Re: A Servlet question
> 
> 
> AFAIK, submiting from a frame is the same as a single page. What was the
> error msg you've got?
> Probably, it has some problem in the servlet mapping... did you try to
> load the jsp alone in the browser and submit it? if it doens't work, it
> doens't has to do with the frames at all.
> Emerson
> 
> Daxin Zuo wrote:
> 
>>I use Apache 2.4.9, Tomcat 4.1.9.
>>In a JSP, there there are three frames in a frameset. the script of each
>>frame is JSP.
>>Can a JSP in one frame submit to a Servlet? I did a test and failed.
> 
> Please
> 
>>confirm or teach me how to do.
>>Thanks
>>
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>>
>>
> 
> 
> 
> --
> Emerson Cargnin
> Analista de Sistemas
> Setor de Desenvolvimento de Sistemas - TRE-SC
> tel : (048) - 251-3700 - Ramal 3181
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 
> 


-- 
Emerson Cargnin
Analista de Sistemas
Setor de Desenvolvimento de Sistemas - TRE-SC
tel : (048) - 251-3700 - Ramal 3181

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


RE: A Servlet question

Posted by Daxin Zuo <dz...@techexcel.com>.
You are right, after I send my last email to this list, I tested it with
full URL of the servlet. It worked well. So I need to tell Tomcat that it is
a servlet.
The previous problem is that Tomcat add the relative path before the servlet
name.
Could you please give the example for the servlet name mapping?
Thanks.

-----Original Message-----
From: Emerson Cargnin [mailto:emerson@tre-sc.gov.br]
Sent: Friday, June 11, 2004 3:19 PM
To: Tomcat Users List
Subject: Re: A Servlet question


AFAIK, submiting from a frame is the same as a single page. What was the
error msg you've got?
Probably, it has some problem in the servlet mapping... did you try to
load the jsp alone in the browser and submit it? if it doens't work, it
doens't has to do with the frames at all.
Emerson

Daxin Zuo wrote:
> I use Apache 2.4.9, Tomcat 4.1.9.
> In a JSP, there there are three frames in a frameset. the script of each
> frame is JSP.
> Can a JSP in one frame submit to a Servlet? I did a test and failed.
Please
> confirm or teach me how to do.
> Thanks
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>


--
Emerson Cargnin
Analista de Sistemas
Setor de Desenvolvimento de Sistemas - TRE-SC
tel : (048) - 251-3700 - Ramal 3181

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: A Servlet question

Posted by Emerson Cargnin <em...@tre-sc.gov.br>.
AFAIK, submiting from a frame is the same as a single page. What was the 
error msg you've got?
Probably, it has some problem in the servlet mapping... did you try to 
load the jsp alone in the browser and submit it? if it doens't work, it 
doens't has to do with the frames at all.
Emerson

Daxin Zuo wrote:
> I use Apache 2.4.9, Tomcat 4.1.9.
> In a JSP, there there are three frames in a frameset. the script of each
> frame is JSP.
> Can a JSP in one frame submit to a Servlet? I did a test and failed. Please
> confirm or teach me how to do.
> Thanks
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 
> 


-- 
Emerson Cargnin
Analista de Sistemas
Setor de Desenvolvimento de Sistemas - TRE-SC
tel : (048) - 251-3700 - Ramal 3181

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org