Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-13-2007, 02:59 PM
Senior Member
 
Join Date: Jun 2007
Posts: 130
Jack is on a distinguished road
JSP tags problem
I have the following problem: when I try to create a list that is inside of the vertical scroll the information of the list doesn't appear.
Do I mix the tags? I want the list from a collection of objects
Can you help me?

my page.jsp:
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <%@page contentType="text/html"%> <%@page pageEncoding="UTF-8"%> <%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> <%@taglib uri="/WEB-INF/struts-html-el.tld" prefix="html" %> <%@taglib uri="/WEB-INF/struts-bean-el.tld" prefix="bean" %> <%@page import="XXX.beans.UserBean" %> <html:html xhtml="true"> <head> <title>XXX</title> </head> <body> <form name="form1" method="post" action="${LISTAR_ACTION}"> <html:select property="users" title="Users" size="4" multiple="false"> <html:option value="all">ALL</html:option> <html:optionsCollection name="usersList" label="userId" value="userId" /> </html:select> <input type="submit" name="List" value=" List" /> </form> </body> </html:html>
my code:
Code:
Collection usersList= new Vector(); if (resultUsers != null ){ while(resultUsers.next()){ UserBean usrBO = new UserBean(); usrBO.setName(resultUsers.getString("userId")); usrBO.setAuthModules(null); usrBO.setPasword(null); usersList.add(usrBO); } }
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 06-13-2007, 03:25 PM
Senior Member
 
Join Date: Jun 2007
Posts: 119
Peter is on a distinguished road
The problem is that you don't send the collection to the JSP.
Example:

request.setAttribute("usersList", userList);
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 07-02-2007, 06:11 AM
Senior Member
 
Join Date: Jun 2007
Posts: 164
Heather is on a distinguished road
I don't think that it is the problem.
the problem is that your collection is null
check it and then tell us
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Html tags within XML- need help iamhappy XML 2 03-27-2008 05:21 PM
Using Struts2 Tags (IV) JavaForums Java Blogs 0 01-18-2008 03:40 PM
Using tags in Struts(II) JavaForums Java Blogs 0 01-09-2008 02:51 PM
Using tags in Struts(I) JavaForums Java Blogs 0 01-08-2008 02:20 PM
Help with Tags JSP Marcus JavaServer Pages (JSP) and JSTL 2 07-04-2007 03:53 PM


All times are GMT +3. The time now is 05:01 AM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org