You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Alex Yiu <ay...@us.oracle.com> on 2000/03/31 00:28:19 UTC

Re:

Hi,

I have checked with Tomcat 3.1 beta 1.
The problem still exists. It does not conform to the spec. Jasper folks,
maybe you want to add this to the Watchdog test case. Thanks.

Here is a test case:
=======================================================
incl01.jsp:
=======================================================
<pre>
incl01.jsp
<%= new java.util.Date() %>
<%= request.getParameter("abc") %>
<jsp:include page="incl02.jsp" flush="true" />
<jsp:include page="incl02.jsp?abc=ghi" flush="true" />
<jsp:include page="incl02.jsp?abc=ghi&abc=jkl" flush="true" />
<jsp:include page="incl02.jsp" flush="true" >
  <jsp:param name="abc" value="jkl" />
</jsp:include>
<jsp:include page="incl02.jsp" flush="true" >
  <jsp:param name="abc" value="jkl" />
  <jsp:param name="abc" value="mno" />
</jsp:include>
<jsp:include page="incl02.jsp" flush="true" />
</pre>
=======================================================
incl02.jsp:
=======================================================
incl02.jsp
<%= request.getParameter("abc") %>
<%
  String s[]=request.getParameterValues("abc");
  if (s!=null)
    for (int i=0; i<s.length; i++)
    {
      out.println(i+"="+s[i]);
    }
%>
=======================================================
The result:
=======================================================
incl01.jsp
Thu Mar 30 14:04:30 PST 2000
def
incl02.jsp
def
0=def

incl02.jsp
ghi
0=ghi

incl02.jsp
ghi
0=ghi
1=jkl

incl02.jsp (* wrong behavior here #A *)
jkl
0=jkl

incl02.jsp (* wrong behavior here #B *)
jkl
0=jkl
1=mno

incl02.jsp
def
0=def
=======================================================
Right behavior:
=======================================================
incl02.jsp (* right behavior here #A *)
jkl
0=jkl
1=def

incl02.jsp (* right behavior here #B *)
jkl
0=jkl
1=mno
2=def
=======================================================


Thanks.

Regards,
Alex Yiu





Hans Bergsten wrote:
> 
> Reinhard Pilz wrote:
> >
> > When calling another servlet/jsp from a .jsp-file with
> >
> > <jsp:include....>
> >   <jsp:param.../>
> > </jsp:include>
> >
> > or with
> >
> > pageContext.include("page.jsp?param=value")
> >
> > Tomcat seems the overwrite the old values of already existing request
> > parameters with the values specified with the page to include.
> >
> > According to the JSP1.1 Spec. (Nov. 30, 1999), Section 2.13.6, the included
> > page should see the old AND the new values.
> >
> > Am I right?
> > Or is Tomcat right?
> 
> Have you tested this with Tomcat 3.1 Beta? I know there were a lot of
> problems in this area in Tomcat 3.0, but as far as I know they have all
> been fixed in 3.1 Beta.
> 
> Hans
> --
> Hans Bergsten           hans@gefionsoftware.com
> Gefion Software         http://www.gefionsoftware.com
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: general-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: general-help@jakarta.apache.org

-- 
================================================================== 
Alex Yiu 
Java Product Group, LORT, ST    Email:  ayiu@us.oracle.com   
Oracle Corporation              Phone:  (650) 506-4522 
Mailstop: 4op9                  Fax:    (650) 633-2349
500 Oracle Parkway,                
Redwood Shores, CA 94065   
================================================================== 

**----------------- I think, therefore I am. ----------------**
** The statements and opinions expressed here are my own and **
** do not necessarily represent those of Oracle Corporation. **

Re:

Posted by "Anil K. Vijendran" <An...@eng.sun.com>.
alex,

thanks for your test case. i'll look into it soon.

Alex Yiu wrote:

> Hi,
>
> I have checked with Tomcat 3.1 beta 1.
> The problem still exists. It does not conform to the spec. Jasper folks,
> maybe you want to add this to the Watchdog test case. Thanks.
>
> Here is a test case:
> =======================================================
> incl01.jsp:
> =======================================================
> <pre>
> incl01.jsp
> <%= new java.util.Date() %>
> <%= request.getParameter("abc") %>
> <jsp:include page="incl02.jsp" flush="true" />
> <jsp:include page="incl02.jsp?abc=ghi" flush="true" />
> <jsp:include page="incl02.jsp?abc=ghi&abc=jkl" flush="true" />
> <jsp:include page="incl02.jsp" flush="true" >
>   <jsp:param name="abc" value="jkl" />
> </jsp:include>
> <jsp:include page="incl02.jsp" flush="true" >
>   <jsp:param name="abc" value="jkl" />
>   <jsp:param name="abc" value="mno" />
> </jsp:include>
> <jsp:include page="incl02.jsp" flush="true" />
> </pre>
> =======================================================
> incl02.jsp:
> =======================================================
> incl02.jsp
> <%= request.getParameter("abc") %>
> <%
>   String s[]=request.getParameterValues("abc");
>   if (s!=null)
>     for (int i=0; i<s.length; i++)
>     {
>       out.println(i+"="+s[i]);
>     }
> %>
> =======================================================
> The result:
> =======================================================
> incl01.jsp
> Thu Mar 30 14:04:30 PST 2000
> def
> incl02.jsp
> def
> 0=def
>
> incl02.jsp
> ghi
> 0=ghi
>
> incl02.jsp
> ghi
> 0=ghi
> 1=jkl
>
> incl02.jsp (* wrong behavior here #A *)
> jkl
> 0=jkl
>
> incl02.jsp (* wrong behavior here #B *)
> jkl
> 0=jkl
> 1=mno
>
> incl02.jsp
> def
> 0=def
> =======================================================
> Right behavior:
> =======================================================
> incl02.jsp (* right behavior here #A *)
> jkl
> 0=jkl
> 1=def
>
> incl02.jsp (* right behavior here #B *)
> jkl
> 0=jkl
> 1=mno
> 2=def
> =======================================================
>
> Thanks.
>
> Regards,
> Alex Yiu
>
> Hans Bergsten wrote:
> >
> > Reinhard Pilz wrote:
> > >
> > > When calling another servlet/jsp from a .jsp-file with
> > >
> > > <jsp:include....>
> > >   <jsp:param.../>
> > > </jsp:include>
> > >
> > > or with
> > >
> > > pageContext.include("page.jsp?param=value")
> > >
> > > Tomcat seems the overwrite the old values of already existing request
> > > parameters with the values specified with the page to include.
> > >
> > > According to the JSP1.1 Spec. (Nov. 30, 1999), Section 2.13.6, the included
> > > page should see the old AND the new values.
> > >
> > > Am I right?
> > > Or is Tomcat right?
> >
> > Have you tested this with Tomcat 3.1 Beta? I know there were a lot of
> > problems in this area in Tomcat 3.0, but as far as I know they have all
> > been fixed in 3.1 Beta.
> >
> > Hans
> > --
> > Hans Bergsten           hans@gefionsoftware.com
> > Gefion Software         http://www.gefionsoftware.com
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: general-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: general-help@jakarta.apache.org
>
> --
> ==================================================================
> Alex Yiu
> Java Product Group, LORT, ST    Email:  ayiu@us.oracle.com
> Oracle Corporation              Phone:  (650) 506-4522
> Mailstop: 4op9                  Fax:    (650) 633-2349
> 500 Oracle Parkway,
> Redwood Shores, CA 94065
> ==================================================================
>
> **----------------- I think, therefore I am. ----------------**
> ** The statements and opinions expressed here are my own and **
> ** do not necessarily represent those of Oracle Corporation. **
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: general-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: general-help@jakarta.apache.org

--
Peace, Anil +<:-)



Re:

Posted by Costin Manolache <co...@eng.sun.com>.
Hi Alex,

The nightly ( or hourly ) script is back on line, can you please check the latest
one ?
It seems to work better, except:

> <jsp:include page="incl02.jsp?abc=ghi" flush="true" />

Will print out:
ghi
0=ghi
1=def


> <jsp:include page="incl02.jsp?abc=ghi&abc=jkl" flush="true" />

0=ghi
1=jkl
2=def

Same for <jsp:param/> case.

Let me know if we can close the bug.
( Craig fixed a related bug )

Costin


Re:

Posted by pauly <pa...@x-radio.com>.

I don't know if there's a separate jetspeed mailing list -- i looked on
the site but didn't see one, but here's a bug i found.

i downloaded the latest jetspeed-1.1 distribution and tried to compile it
with ant, but it didn't work -- it kept creating a null directory and then
ending with success. so.....

i noticed that there seemed to be a dependency missing.  i added the
following lines...



<project name="JetSpeed" default="dist" basedir=".">
 
####>  <target name="init">
 
     <property name="version" value="1.1"/>                                             
     ...
     END Stylebook support
     -->
###>>>  </target>
 

and added the "init" dependency to the core target, as such:


  <target name="core" depends="init">                                                

it works now.  you might want to fix this.


Re:

Posted by Hans Bergsten <ha...@gefionsoftware.com>.
Alex Yiu wrote:
> 
> Hi,
> 
> I have checked with Tomcat 3.1 beta 1.
> The problem still exists. It does not conform to the spec. Jasper folks,
> maybe you want to add this to the Watchdog test case. Thanks.

Please log it as a bug in Bugzilla as well so it can be tracked.

Thanks,
Hans
-- 
Hans Bergsten		hans@gefionsoftware.com
Gefion Software		http://www.gefionsoftware.com

Re:

Posted by Hans Bergsten <ha...@gefionsoftware.com>.
Alex Yiu wrote:
> 
> Hi,
> 
> I have checked with Tomcat 3.1 beta 1.
> The problem still exists. It does not conform to the spec. Jasper folks,
> maybe you want to add this to the Watchdog test case. Thanks.

Please log it as a bug in Bugzilla as well so it can be tracked.

Thanks,
Hans
-- 
Hans Bergsten		hans@gefionsoftware.com
Gefion Software		http://www.gefionsoftware.com