Is there are reason you can't just use:
session.setAttribute(tempName); and then later
session.getAttribute(tempName);???

Hamish

> -----Original Message-----
> From: Michael Ni [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, April 02, 2003 1:11 PM
> To: [EMAIL PROTECTED]
> Subject: Re: instance names problem will pay $2 for solution
> 
> 
> <jsp:useBean id="temp" scope="request" 
> class="beangame.GameInstance" />
> <jsp:setProperty name="temp" property="*" />
> 
> 
> <%
>       String tempname = temp.getInstance_name();
> 
>       beangame.Earthquake counter1 = 
> (beangame.Earthquake)getServletContext().getAttribute(tempname);
>       if (counter1 == null) {
>               out.println("is null <p>");
>               counter1 = new beangame.Earthquake();
>               getServletContext().setAttribute(tempname, counter1);
>       }
> 
> %>
> 
> This is a snippet from my code basically im trying to create 
> an instance of 
> an application scope bean but naming it myself with the 
> stored value of 
> tempname which i get from another bean temp using getInstanceName()
> 
> how do I apply reflection so I can use the instance which 
> name is not in the 
> code at all.
> 
> mike
> 
> _________________________________________________________________
> The new MSN 8: smart spam protection and 2 months FREE*  
> http://join.msn.com/?page=features/junkmail
> 
> 
> ---------------------------------------------------------------------
> 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]

Reply via email to