That solves mine too!!!

Thanks
raman

-----Original Message-----
From: A mailing list about Java Server Pages specification and reference
[mailto:[EMAIL PROTECTED]]On Behalf Of Veena
Sent: Wednesday, February 02, 2000 09:23 AM
To: [EMAIL PROTECTED]
Subject: Re: Pass my custom class across a JSP Page


----- Original Message -----
From: Vini Sethi <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, July 11, 2000 9:19 AM
Subject: Re: Pass my custom class across a JSP Page


> Thanks for the reply Veena,
>
> I tried the workaround and it definitely works. However, i have a few
> questions:
>
> I am assigning the value to a hidden control which is hence viewable on
the
> source code of the page.Is this secure / safe?
>
> I was considering something like putting it in the session , so as to keep
> the data secure.

Hi

u can go for this also.........

Have a HashTable(Key,myclassobj) instead of Vector.
Put this Hashtable in session in the current page.
Then u click on the link just pass just the key.
In the next page access the key,get the Hashtable from the session , loop
thru the Hashtable keys to find the one which matches with passed key.
Retrieve that object.
And access the methods in the object

Hope this helps.....
Bye


>
> Also, i now question the use of classes.
> I created a class called clsperson and gave it attributes like name and
age.
>
> Initially i was returning a resultset and was able to access the
parameters
> as name=rs(0) ; age-rs(1) etc
>
> I didnt like the idea of returning a resultset and hence created a custom
> class (clsperson) and put each instance of the class into a vector,
finally
> returning the vector.
>
> Now, i understand i cannot pass the reference of the class i created and
> have to pass the attributes of the class as parameters.
>
> I would like to know your views on returning the resultset Vs returning
the
> Vecor of my custom class.
>
> Also, clsPerson, is just a simple example. The class is a little different
> with a few more attributes.
>
> Thanks in advance
> Vini
>
> ----------------------------
> <snip>
> Veena :
> >When u click on the link u can't pass the object.
> >Workaround is :
> >U can call a method like say
> >< a href="method1('<%= myclass.name %>','<%= myclass.age %>')"
> > >Employeeinfo</a>
> >
> </snip>
>
> <snip>
> Vinny :
> >On click of the name , i am trying to pass the class to the next page.
> > > on the next page:
> > > i can get
> > > MyCustomClass
> > > thepassedclass=(MyCustomClass)Session.getValue("passedclassvariable");
> > > and then process further based on the values in the class.
> > > My Problem is in passing the class across the page.
> > > I tried href=testpage.jsp?name=clsDisp
> > > ands tried typecasting on the next page, but that is not allowed.
> </snip>
> ________________________________________________________________________
> Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com
>
>
===========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to