Re: Can't find property - but it's there

2004-11-15 Thread Wendy Smoak
From: "Slattery, Tim - BLS" <[EMAIL PROTECTED]>
> This has nothing to do with the scriptlet variables, the scriptlet was
there
> to demonstrate that the object the JSTL tag is supposed to access is
there,
> and has the required property. The JSTL should be able to access the
request
> attribute "SeasAdjBean" and get the property "seasAdjs" by accessing the
> method "getSeasAdjs()". The scriptlet proves that the proper object
> containing the proper method was in the right place. So why can't the JSTL
> tag find it?

Any chance the misbehaving server has a different JSTL implementation?  Are
you using the one from Jakarta, or possibly one that came with WebLogic?

I have had a few things act differently on my Win2000 workstation vs. the
HP-UX web server, though we usually end up blaming it on the JVM.

-- 
Wendy Smoak


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Can't find property - but it's there

2004-11-15 Thread Slattery, Tim - BLS
> > <%
> > gov.bls.idcf.ppi.struts.SeasAdjBean xx = 
> > 
> (gov.bls.idcf.ppi.struts.SeasAdjBean)request.getAttribute("SeasAdjBean
> > ");
> > %>
> >  > varStatus="stat">
> > The scriptlet accesses the getSeasAdjs property, and simply 
> dumps its size
> > as a comment on the page. Then the c:forEach tag tries to 
> access the same
> > property. And fails.
> 
> I believe that's the intended behavior.  JSTL can't "see" 
> scriptlet variables.  In the JSTL 1.0 specification, it's 
> section 2.2 that talks about scoped variables:

This has nothing to do with the scriptlet variables, the scriptlet was there
to demonstrate that the object the JSTL tag is supposed to access is there,
and has the required property. The JSTL should be able to access the request
attribute "SeasAdjBean" and get the property "seasAdjs" by accessing the
method "getSeasAdjs()". The scriptlet proves that the proper object
containing the proper method was in the right place. So why can't the JSTL
tag find it?

--
Tim Slattery
[EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Can't find property - but it's there

2004-11-15 Thread Wendy Smoak
From: "Slattery, Tim - BLS" <[EMAIL PROTECTED]>
> <%
> gov.bls.idcf.ppi.struts.SeasAdjBean xx =
> (gov.bls.idcf.ppi.struts.SeasAdjBean)request.getAttribute("SeasAdjBean");
> %>
>  varStatus="stat">
> The scriptlet accesses the getSeasAdjs property, and simply dumps its size
> as a comment on the page. Then the c:forEach tag tries to access the same
> property. And fails.

I believe that's the intended behavior.  JSTL can't "see" scriptlet
variables.  In the JSTL 1.0 specification, it's section 2.2 that talks about
scoped variables:

"Because JSTL supports an expression language, the need for scripting
variables is significantly reduced. This is why all the JSTL tags expose
information only as JSP scoped attributes (no scripting variable exposed)"

Usually one sees people attempting to access something they've created with
 in a scriptlet, and you seem to be doing it the other way around,
but I think you're running into the same issue.

HTH,
-- 
Wendy Smoak


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Can't find property -- but it's there

2004-11-12 Thread Slattery, Tim - BLS
> Yes, but it may be possible that the ClassLoader (for 
> whatever reason) has a cached version of the older class and 
> it is not loading the new class when the web app reloads. 
> Have you tried rebooting the application server on the 
> development machine? If the problem still occurs on the dev. 
> box after the application server reboots then you could rule 
> out the ClassLoader issue. It may be a pain in the ***, but 
> it would eliminate a path.

To try to eliminate anything connected with this, I changed the name of the
class in question from "SeasAdjData" to "SeasAdjBean". No change in
behavior. It works flawlessly on  my local server,  but I get the same
message on the dev server. (With "SeasAdjData" changed to "SeasAdjBean", of
course.

--
Tim Slattery
[EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Can't find property -- but it's there

2004-11-10 Thread Robert Taylor
Yes, but it may be possible that the ClassLoader (for whatever reason)
has a cached version of the older class and it is not loading the new
class when the web app reloads. Have you tried rebooting the application server 
on the development
machine? If the problem still occurs on the dev. box after the application
server reboots then you could rule out the ClassLoader issue. It may be a
pain in the ***, but it would eliminate a path.

One other thing to check, is to make sure you don't have any older
versions of that class in the system classpath. I believe ClassLoaders
are hierarchical and classes in the "parent" classpaths will be loaded
instead of those in the "child" classpaths.

>From java.lang.ClassLoader:

The ClassLoader class uses a delegation model to search for classes and 
resources. Each instance of ClassLoader has an associated
parent class loader. When requested to find a class or resource, a ClassLoader 
instance will delegate the search for the class or
resource to its parent class loader before attempting to find the class or 
resource itself. The virtual machine's built-in class
loader, called the "bootstrap class loader", does not itself have a parent but 
may serve as the parent of a ClassLoader instance.

Ofcourse different application servers may have different implementations
of ClassLoader employing different search algorithms.


robert

> -Original Message-
> From: Slattery, Tim - BLS [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, November 10, 2004 2:20 PM
> To: 'Struts Users Mailing List'
> Subject: RE: Can't find property -- but it's there
>
>
>
> > On 2004-11-10 at 14:04:38 -0500, Slattery, Tim - BLS wrote:
> > > > Just a guess Tim, but is it possible that the ClassLoader
> > > > used on the development server and the ClassLoader used
> > > > locally are loading different versions of SeasAdjData? Was
> > > > the getSeasAdjs() added to SeasAdjData recently?
> > >
> > > I have no clue about ClassLoader. I don't know how I'd find out.
> > Hmm. Also not so good at ClassLoaders.
> >
> > What robert meant is that maybe the server is stuck with
> > another version of your class, where this get method didn't exist.
>
> I can't see how that could be possible. I deploy the app by bundling the
> entire directory structure (including WEB-INF, and lib and classes
> structures under that) into a WAR file, sending that to the Unix box, and
> running "redeploy" from the Weblog console. Everything - all the jsps, all
> the *.class files, all the struts and JSTL libraries - is in that WAR.
>
> --
> Tim Slattery
> [EMAIL PROTECTED]
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Can't find property -- but it's there

2004-11-10 Thread Slattery, Tim - BLS
 
> On 2004-11-10 at 14:04:38 -0500, Slattery, Tim - BLS wrote:
> > > Just a guess Tim, but is it possible that the ClassLoader
> > > used on the development server and the ClassLoader used 
> > > locally are loading different versions of SeasAdjData? Was 
> > > the getSeasAdjs() added to SeasAdjData recently?
> > 
> > I have no clue about ClassLoader. I don't know how I'd find out.
> Hmm. Also not so good at ClassLoaders.
> 
> What robert meant is that maybe the server is stuck with 
> another version of your class, where this get method didn't exist.

I can't see how that could be possible. I deploy the app by bundling the
entire directory structure (including WEB-INF, and lib and classes
structures under that) into a WAR file, sending that to the Unix box, and
running "redeploy" from the Weblog console. Everything - all the jsps, all
the *.class files, all the struts and JSTL libraries - is in that WAR.

--
Tim Slattery
[EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Can't find property -- but it's there

2004-11-10 Thread Slattery, Tim - BLS
> Since your problems occur in the deployed to a clustered 
> environment, could you accidentally have the redirect="true" 
> on that action's ActionForwward? Then one of two things could 
> be happening:

"redirect" is set to "false":
   

> 1) You might be redirected to the other server
> 2) You might have had the bean in request scope and not 
> session scope so it would be lost during the HTTP redirect.

The bean is certainly in request scope (request.setAttribute("SeasAdjData",
sad);).

--
Tim Slattery
[EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Can't find property -- but it's there

2004-11-10 Thread Axel Groß
On 2004-11-10 at 14:04:38 -0500, Slattery, Tim - BLS wrote:
> > Just a guess Tim, but is it possible that the ClassLoader 
> > used on the development server and the ClassLoader used 
> > locally are loading different versions of SeasAdjData? Was 
> > the getSeasAdjs() added to SeasAdjData recently?
> 
> I have no clue about ClassLoader. I don't know how I'd find out.
Hmm. Also not so good at ClassLoaders.

What robert meant is that maybe the server is stuck with another version of
your class, where this get method didn't exist.

But you could use reflection to check, what is actually there (i.e. the
getSeasAdjs() method) on the server.
Or use a debugger on the server, to check the class.

hth,
Axel

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Can't find property -- but it's there

2004-11-10 Thread David G. Friedman
Since your problems occur in the deployed to a clustered environment, could
you accidentally have the redirect="true" on that action's ActionForwward?
Then one of two things could be happening:

1) You might be redirected to the other server
2) You might have had the bean in request scope and not session scope so it
would be lost during the HTTP redirect.

Regards,
David

-Original Message-
From: Slattery, Tim - BLS [mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 10, 2004 2:05 PM
To: 'Struts Users Mailing List'
Subject: RE: Can't find property -- but it's there


> Just a guess Tim, but is it possible that the ClassLoader
> used on the development server and the ClassLoader used
> locally are loading different versions of SeasAdjData? Was
> the getSeasAdjs() added to SeasAdjData recently?

I have no clue about ClassLoader. I don't know how I'd find out.

"SeasAdjData" is a new object, and this page is a new page. When it dies on
the dev server, the  tag renders correctly and two
 elements render correctly. Then it encounters the
 tag and stops.

--
Tim Slattery
[EMAIL PROTECTED]


> robert
>
> > -Original Message-
> > From: Slattery, Tim - BLS [mailto:[EMAIL PROTECTED]
> > Sent: Wednesday, November 10, 2004 1:46 PM
> > To: Struts User List ([EMAIL PROTECTED])
> > Subject: Can't find property -- but it's there
> >
> >
> > We develop our Struts apps running them on a BEA Weblogic server
> > installed on our individual machines. When they run right,
> we  deploy
> > them to the development server, a Unix box that everybody
> can access.
> > Generally, this works beautifully.
> >
> > I'm now working with a Struts JSP page that works fine on
> my desktop,
> > but dies on the server. The immediate problem is a 
> > tag, viz:
> >
> >  > varStatus="stat">
> >
> > SeasAdjData is the form bean for this page. Two 
> > tags precede the forEach tag, and there's no problem with them.
> >
> > As I said before, there's no problem at all when I run this on the
> > Weblogic server on my desktop machine. But when I move it
> to the Unix
> > box, I get:
> >
> > javax.servlet.jsp.JspException: An error occurred while evaluating
> > custom action attribute "items" with value
> "${SeasAdjData.seasAdjs}":
> > Unable to find a value for "seasAdjs" in object of class
> > "gov.bls.idcf.ppi.struts.SeasAdjData" using operator "." (null)
> >
> > This seems to be saying that there is no "getSeasAdjs()"
> method on the
> > SeasAdjData object. But it is definitely there, and it's
> found when I
> > run the app locally.
> >
> > The Unix version of Weblogic is in fact running on a cluster of two
> > Unix machines. I've used c:forEach *many, many* times
> before, without
> > incident. What might be going on here?
> >
> > --
> > Tim Slattery
> > [EMAIL PROTECTED]
> >
> >
> >
> -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Can't find property -- but it's there

2004-11-10 Thread Slattery, Tim - BLS
> Just a guess Tim, but is it possible that the ClassLoader 
> used on the development server and the ClassLoader used 
> locally are loading different versions of SeasAdjData? Was 
> the getSeasAdjs() added to SeasAdjData recently?

I have no clue about ClassLoader. I don't know how I'd find out.

"SeasAdjData" is a new object, and this page is a new page. When it dies on
the dev server, the  tag renders correctly and two
 elements render correctly. Then it encounters the
 tag and stops.

--
Tim Slattery
[EMAIL PROTECTED]


> robert
> 
> > -Original Message-
> > From: Slattery, Tim - BLS [mailto:[EMAIL PROTECTED]
> > Sent: Wednesday, November 10, 2004 1:46 PM
> > To: Struts User List ([EMAIL PROTECTED])
> > Subject: Can't find property -- but it's there
> > 
> > 
> > We develop our Struts apps running them on a BEA Weblogic server 
> > installed on our individual machines. When they run right, 
> we  deploy 
> > them to the development server, a Unix box that everybody 
> can access. 
> > Generally, this works beautifully.
> > 
> > I'm now working with a Struts JSP page that works fine on 
> my desktop, 
> > but dies on the server. The immediate problem is a  
> > tag, viz:
> > 
> >  > varStatus="stat">
> > 
> > SeasAdjData is the form bean for this page. Two  
> > tags precede the forEach tag, and there's no problem with them.
> > 
> > As I said before, there's no problem at all when I run this on the 
> > Weblogic server on my desktop machine. But when I move it 
> to the Unix 
> > box, I get:
> > 
> > javax.servlet.jsp.JspException: An error occurred while evaluating 
> > custom action attribute "items" with value 
> "${SeasAdjData.seasAdjs}": 
> > Unable to find a value for "seasAdjs" in object of class 
> > "gov.bls.idcf.ppi.struts.SeasAdjData" using operator "." (null)
> > 
> > This seems to be saying that there is no "getSeasAdjs()" 
> method on the 
> > SeasAdjData object. But it is definitely there, and it's 
> found when I 
> > run the app locally.
> > 
> > The Unix version of Weblogic is in fact running on a cluster of two 
> > Unix machines. I've used c:forEach *many, many* times 
> before, without 
> > incident. What might be going on here?
> > 
> > --
> > Tim Slattery
> > [EMAIL PROTECTED]
> > 
> > 
> > 
> -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Can't find property -- but it's there

2004-11-10 Thread Robert Taylor
Just a guess Tim, but is it possible that the ClassLoader used on the
development server and the ClassLoader used locally are loading different
versions of SeasAdjData? Was the getSeasAdjs() added to SeasAdjData recently?

robert

> -Original Message-
> From: Slattery, Tim - BLS [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, November 10, 2004 1:46 PM
> To: Struts User List ([EMAIL PROTECTED])
> Subject: Can't find property -- but it's there
> 
> 
> We develop our Struts apps running them on a BEA Weblogic server installed
> on our individual machines. When they run right, we  deploy them to the
> development server, a Unix box that everybody can access. Generally, this
> works beautifully.
> 
> I'm now working with a Struts JSP page that works fine on my desktop, but
> dies on the server. The immediate problem is a  tag, viz:
> 
>  varStatus="stat">
> 
> SeasAdjData is the form bean for this page. Two  tags
> precede the forEach tag, and there's no problem with them.
> 
> As I said before, there's no problem at all when I run this on the Weblogic
> server on my desktop machine. But when I move it to the Unix box, I get:
> 
> javax.servlet.jsp.JspException: An error occurred while evaluating custom
> action attribute "items" with value "${SeasAdjData.seasAdjs}": Unable to
> find a value for "seasAdjs" in object of class
> "gov.bls.idcf.ppi.struts.SeasAdjData" using operator "." (null)
> 
> This seems to be saying that there is no "getSeasAdjs()" method on the
> SeasAdjData object. But it is definitely there, and it's found when I run
> the app locally.
> 
> The Unix version of Weblogic is in fact running on a cluster of two Unix
> machines. I've used c:forEach *many, many* times before, without incident.
> What might be going on here?
> 
> --
> Tim Slattery
> [EMAIL PROTECTED]
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]