Hmmm, that doesn't seem to work either. I changed the bean:define in the second test file to be:
----FILE NAMED: wlstest2.jsp---- <bean:define id="myMessage" value="this is another test" type="java.lang.String" toScope="request" /> On the second page: <%= myMessage %><br> and got the same error as before. - Jim Piper -----Original Message----- From: Sandeep Takhar [mailto:[EMAIL PROTECTED] Sent: Friday, June 20, 2003 2:28 PM To: Struts Users Mailing List Subject: Re: problem with bean:define and wls 6.1 sp5 when using include should use toScope="request" I think. sandeep --- "Piper, James D CECOM SEC EPS" <[EMAIL PROTECTED]> wrote: > I am having a problem with bean:define and wls 6.1 > sp5 when using it from a > <%@ include %> code. I don't have this problem with > sp4. > > For example here is a simple test case (this code > works on WebLogic 6.1 SP4, > but it does not work on WebLogic 6.1 SP5): > > ----FILE NAMED: wlstest.jsp---- > <%@ page language="java" %> > <%@ taglib uri="/WEB-INF/struts-bean.tld" > prefix="bean" %> > <html> > <head> > <title>wlstest</title> > </head> > <body> > On the first page: this is a test<br> > <%@ include file="wlstest2.jsp" %> > </body> > </html> > > ----FILE NAMED: wlstest2.jsp---- > <bean:define id="myMessage" value="this is another > test" > type="java.lang.String"/> > On the second page: <%= myMessage %><br> > > > > With SP5 I get an error that: > /opt/home/weblogic/bea/wlserver6.1/config/SCRO/applications/.wlnotdelete/wla > p22883/WEB-INF/_tmp_war_SCRO_Server_SCRO_SCRO-WAR-0.1-dev/jsp_servlet/__wlst > est.java:118: Undefined variable: myMessage > probably occurred due to an error in /wlstest2.jsp > line 2: > On the second page: <%= myMessage %><br> > > It looks to me like SP5 allows me to use my > struts-bean.tld that was defined > in the outer jsp, but when I try to use that > bean:define tag from the inner > jsp then it is as if the scripting variable that it > sets is not accessible > from the inner jsp. > > Just as a curiosity if I add a <jsp:useBean> to the > inner JSP as shown in > the following, then it works fine on SP5, but fails > on SP4: > > ----FILE NAMED: wlstest2.jsp---- > <bean:define id="myMessage" value="this is another > test" > type="java.lang.String"/> > <jsp:useBean id="myMessage" class="java.lang.String" > /> > On the second page: <%= myMessage %><br> > > With SP4 that jsp:useBean will result in what to me > is the expected error: > /wlstest.jsp(2): a variable named "myMessage" was > previously declared at > line 1 of /wlstest2.jsp > probably occurred due to an error in /wlstest.jsp > line 2: > <%@ taglib uri="/WEB-INF/struts-bean.tld" > prefix="bean" %> > > This is bugging me because I used the <%@ include > > quite a bit in my code > and now that we are trying to move to SP5 it is all > screwy. I know I could > go through and instead use jsp:include but I don't > want to if I don't have > to. Anybody have any ideas? Am I missing something? > is sp5 missing > something? > > - Jim Piper > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]