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 Baker <jb...@teamenergy.com> on 2001/08/02 18:45:12 UTC

<jsp:plugin type='applet' code='AppletWrapper.class' align='center'
            archive='jcchart450K.jar'
            width='600' height='500' jreversion='1.2'>
   <jsp:params>
      <jsp:param name="setCount" value="<= labels.length %>" />
<%
   for (int i=0; i<labels.length; i++) {
%>
      <jsp:param name="setName<%= i %>" value="<%= labels[i] %>" />
<%
   }
%>
   </jsp:params>
</jsp:plugin>

Why isn't this allowed? It seems such a useful feature! And if this isn't 
allowed, how can I do it?

Tomcat 4 beta 6.


John Baker

-- 
John Baker, BSc CS.
Java developer, Linux lover.
I don't wanna rock, DJ.

Re: Posted by John Baker <jb...@teamenergy.com>.
On Saturday 04 August 2001 03:06 am, you wrote:
> On Thu, 2 Aug 2001, John Baker wrote:
> > <jsp:plugin type='applet' code='AppletWrapper.class' align='center'
> >             archive='jcchart450K.jar'
> >             width='600' height='500' jreversion='1.2'>
> >    <jsp:params>
> >       <jsp:param name="setCount" value="<= labels.length %>" />
> > <%
> >    for (int i=0; i<labels.length; i++) {
> > %>
> >       <jsp:param name="setName<%= i %>" value="<%= labels[i] %>" />
> > <%
> >    }
> > %>
> >    </jsp:params>
> > </jsp:plugin>
> >
> > Why isn't this allowed? It seems such a useful feature! And if this isn't
> > allowed, how can I do it?
>
> The <jsp:plugin> tag and it's corresponding parameters are evaluated at
> page compile time, not at runtime.  That's why the above doesn't work.
>

Yeah, that makes sense. So is there a way of rewriting the <jsp:plugin tag as 
it's very useful to use and I'd like to add additional parameters.

> > Tomcat 4 beta 6.
> >
> >
> > John Baker
> >
> > --
> > John Baker, BSc CS.
> > Java developer, Linux lover.
> > I don't wanna rock, DJ.
>
> Craig

-- 
John Baker, BSc CS.
Java developer, Linux lover.
I don't wanna rock, DJ.

Re: Posted by "Craig R. McClanahan" <cr...@apache.org>.
On Thu, 2 Aug 2001, John Baker wrote:

> <jsp:plugin type='applet' code='AppletWrapper.class' align='center'
>             archive='jcchart450K.jar'
>             width='600' height='500' jreversion='1.2'>
>    <jsp:params>
>       <jsp:param name="setCount" value="<= labels.length %>" />
> <%
>    for (int i=0; i<labels.length; i++) {
> %>
>       <jsp:param name="setName<%= i %>" value="<%= labels[i] %>" />
> <%
>    }
> %>
>    </jsp:params>
> </jsp:plugin>
> 
> Why isn't this allowed? It seems such a useful feature! And if this isn't 
> allowed, how can I do it?
> 

The <jsp:plugin> tag and it's corresponding parameters are evaluated at
page compile time, not at runtime.  That's why the above doesn't work.

> Tomcat 4 beta 6.
> 
> 
> John Baker
> 
> -- 
> John Baker, BSc CS.
> Java developer, Linux lover.
> I don't wanna rock, DJ.
> 

Craig