This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js and have Paul Jensen on-line!
See this thread for details.
Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

printing it 2 times?  RSS feed

sam christopher
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i am new bie to scriptlet codings..
here i in jsp page, i am trying to print "mesgbody" which is array list., from a class "ScrollMsg".
code is...

<jsp:useBean id="ScrollMsg" scope="request" class="com.sasd.bean.ScrollMsg" >

<jsp:getProperty name="ScrollMsg" property="mesgbody" />

for (int i=0;i<ScrollMsg.getTot();i++)
<span class="title">
<% java.util.ArrayList tmp = ScrollMsg.getMesgbody();



and my back end bean code...

public ArrayList getMesgbody() {
FacesContext context = FacesContext.getCurrentInstance();
ArrayList tmp = new ArrayList();
UserBean usb = (UserBean) httpSession.getAttribute("UserBean");
int empId = usb.getEmpId();

try {
session = getSession();

list = session.createQuery("Select sc ......bla bla .....asc").list();

int i=0;
Object[] msgtuple;

for(Iterator it =list.iterator(); it.hasNext();){
Smessagemst row = (Smessagemst);
String msghd =row.getMsghd().toString();
catch(Exception e){

return mesgbody;

and bak end bean it not much necessary in this case.....
anyway i put for the reference....

my backend process are all fine... and coming to jsp,
"out.println(tmp.get(i));" print my required output once , before that..

<jsp:getProperty name="ScrollMsg" property="mesgbody" /> is also print the same once.. ,
but the former one is not working properly, with out the latter one...
why ?? help me
[ September 08, 2006: Message edited by: Bear Bibeault ]
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!