tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kitching Simon <Simon.Kitch...@orange.ch>
Subject RE: sessions problem
Date Thu, 12 Oct 2000 17:39:37 GMT
Hmm... very strange.

So can you be a bit more explicit about 
this "change the variable name" thing?

Do you mean that you:
(a) change the name of the getMissingList() 
function in your bean (eg to getMissingList2), then
(b) change the jsp file to get property "missingList2"

Or do you mean something else?

What happens if you just "touch" the .class or the .jsp
file, to update its timestamp? (On windows, you would
presumably have to copy it somewhere then copy it
back to change the timestamp?)

And what version of tomcat, what OS are you using?

> -----Original Message-----
> From:	Josh Knowles [SMTP:josh.knowles@worldwidepackets.com]
> Sent:	Thursday, October 12, 2000 7:24 PM
> To:	'tomcat-user@jakarta.apache.org'
> Subject:	RE: sessions problem
> 
> Here is the useBean code:
> 
> <jsp:useBean id="partner" class="wwp.PartnersApplicationBean"
> scope="session" />
> 
> Here is the getProperty code:
> 
> <jsp:getProperty name="partner" property="missingList" />
> 
> Here is the code for the getter in the bean:
> 
> public String getMissingList() {
>     return this.missingList;
> }
> 
> All of the code looks fine to me and it is weird because it works once
> every
> time that I change the variable name that is being get/set.
> 
> Thanks again for the help
> 
> Josh
> 
> -----Original Message-----
> From: Kitching Simon [mailto:Simon.Kitching@orange.ch]
> Sent: Thursday, October 12, 2000 10:17 AM
> To: 'tomcat-user@jakarta.apache.org'
> Subject: RE: sessions problem
> 
> 
> 
> 
> > -----Original Message-----
> > From:	Josh Knowles [SMTP:josh.knowles@worldwidepackets.com]
> > Sent:	Thursday, October 12, 2000 6:56 PM
> > To:	'tomcat-user@jakarta.apache.org'
> > Subject:	sessions problem
> > 
> > 
> > 
> > I am having a problem sending a bean to the session object through a
> > servlet.  I first have a servlet process a form then it creates and
> fills
> > a
> > bean and then sends the bean to the servlet.  This all works fine the
> > first
> > time that I run it but every other time after that no matter if I close
> > the
> > browser or restart tomcat it doesn't work - it returns an error saying 
> > 
> > org.apache.jasper.JasperException: Cannot find a method to read property
> > 'missingList' in a bean of type 'wwp.PartnersApplicationBean'
> > 
> > Here is the code that I use to create the session object:
> > 
> > wwp.PartnersApplicationBean p = new wwp.PartnersApplicationBean();
> >       p.setMissingList(missing);
> >       HttpSession session = session = request.getSession(); 
> >       session.setAttribute("partner", p);
> > 
> > I then forward to a jsp page and call a useBean with a scope of session
> > and
> > then a getProperty to get the info that I need.
> > 
> > I am using tomcat 3.1 and apache 1.3.12 on Redhat 6.2
> > 
> > Thanks for the help
> > 
> > Josh
> 	[Kitching Simon]  
> 	Can you confirm that you have a method 
> 	"somedatatype getMissingList()"
> 	on your bean class?
> 
> 	 If your  getProperty statement looks like
> 
> 	<jsp:getProperty name="missingList" .... />
> 
> 	then it generates a call to getMissingList(); the 
> 	error message sure looks like the getMissingList 
> 	method is not there - maybe a typo?
> 
> 	Including your useBean/getProperty statements in the 
> 	reply might also help diagnose the problem; all the 
> 	above code looks good to me....
> 
> 	Cheers,
> 
> 	Simon

Mime
View raw message