Hi Vinnie,
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>
Now in Javascript part in the same page
<script language="Javascript">
function method1(name,age){
assign it to 2 hidden elements here
then submit the page with action page set.
}
</script>
Now in the target page u can access the hidden elements using
Request.getParameter()
JSP gurus any commment on this..............
Hope this helps
Bye
Regards
Veena
----- Original Message -----
From: Vini Sethi <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, July 10, 2000 12:59 PM
Subject: Pass my custom class across a JSP Page
> hi
>
> I have a bean which returns a vector of MyCustomClass.
>
> on my JSP Page; i generate dynamic rows :
> out.println("<table>");
> for (int i=0; i<myvector.size();i++)
> {
> MyCustomeClass myclass=(MyCustomClass)myvector.elementAt(i);
> out.println("<tr><td><a href=nextpage.jsp>"+myclass.name+"</a></td>");
> out.println("<td>myclass.age</td></tr>");
> }
> out.println("</table>");
>
> The output is
>
> name1 Age1
> Name2 Age2
> Name3 Age3 .....
>
> 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.
>
> Could someone please point me in the right direction.
>
> Thanks in advance
> Vinny
>
>
>
>
>
> ________________________________________________________________________
> 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