Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / First Aid / March 2008

Tip: Looking for answers? Try searching our database.

JSP Bean retrieval

Thread view: 
Vittorix - 09 Mar 2008 23:37 GMT
hi all,

in a JSP page:

<%
   String bookBeanBeg;
   bookBeanBeg = "bookBeanBeg1";
%>

<jsp:useBean id="<%=bookBeanBeg%>"
   type="p4Solution.BookBean" scope="session" />
<jsp:getProperty name="<%=bookBeanBeg%>"
   property="shortDescription"/>

it doesn't work.

please help to make it work. I'm going crazy with it!

Signature

ciao
Vittorix

Andrew Thompson - 10 Mar 2008 02:20 GMT
> hi all,

Please refrain from multi-posting in future.

(X-post to c.l.j.p./h., w/ f-u to c.l.j.h. only)

--
Andrew T.
Vittorix - 10 Mar 2008 17:23 GMT
> Please refrain from multi-posting in future.
>
> (X-post to c.l.j.p./h., w/ f-u to c.l.j.h. only)

in many newsgroups they suggest not to xpost...

Signature

ciao
Vittorix

Daniel Pitts - 10 Mar 2008 22:19 GMT
>> Please refrain from multi-posting in future.
>>
>> (X-post to c.l.j.p./h., w/ f-u to c.l.j.h. only)
>
> in many newsgroups they suggest not to xpost...

True, but multi-posting is a worse offense in almost all of them.  If
you are going to post a message to many places, it should be a cross,
not multi.

Signature

Daniel Pitts' Tech Blog: <http://virtualinfinity.net/wordpress/>

Vittorix - 11 Mar 2008 00:43 GMT
>>> Please refrain from multi-posting in future.
>>>
[quoted text clipped - 5 lines]
> you are going to post a message to many places, it should be a cross,
> not multi.

I'll keep that in mind.

however, this could be helpful for somebody in the future, then I post it
here:

because I couldn't find a solution, I'm using a scriplet inside the JSP that
does the job:

   int numBooks = Integer.parseInt(request.getParameter("numBook"));
   for (int i=1; i<=numBooks; i++)
   {
       String bookBeanS = "bookBeanBeg" + i + "";
       p4Solution.BookBean bookBean = null;
       bookBean = (p4Solution.BookBean) session.getAttribute(bookBeanS);
       out.write(bookBean.getSeq_no());
   }

Signature

ciao
Vittorix



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.