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 04-25-2007, 08:23 PM
orchid's Avatar
Member
 
Join Date: Apr 2007
Location: Midwest
Posts: 60
orchid is on a distinguished road
struts No Collection Found
I am getting this error:"javax.servlet.ServletException: No collection found
org.apache.jasper.runtime.PageContextImpl.doHandle PageException(PageContextImpl.java:825)"
I have been googling for the answer and nothing helps. I do what they say but there seem to be a lot of unanswered questions about this.
Here are the details. The list has 4 elements in it.

//jsp looks like this

<logic:iterate name="protocolListForm" property="protocols" id="protocol">
list will be here
</logic:iterate>

//Action looks like this
Code:
System.out.println("Size of list is " + results.size()); ProtocolListForm pForm = new ProtocolListForm(results);
//Form looks like this
Code:
private List<CollectionProtocol> protocols = null; public ProtocolListForm(List <CollectionProtocol>results) { this.protocols=results; } public List getProtocols() { return protocols; } public void setProtocols(List <CollectionProtocol>protocols) { this.protocols = protocols; }
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 04-25-2007, 08:29 PM
orchid's Avatar
Member
 
Join Date: Apr 2007
Location: Midwest
Posts: 60
orchid is on a distinguished road
I ended up just putting it in the request like so...
request.setAttribute("protocols",results);
and it works fine, but why will it not work if I put the collection in the ActionForm ? I am stumped.
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 04-25-2007, 08:56 PM
Member
 
Join Date: Apr 2007
Location: Indiana
Posts: 84
pegitha is on a distinguished road
Send a message via Skype™ to pegitha
Put your form into the request, otherwise it just uses the blank form. Its wierd I know....
request.setAttribute("protocolListForm", pForm);
Yet one more reason I would love to move away from struts and jsp.
p
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
Class not found Exception surendra Java Servlet 4 01-11-2008 07:23 AM
could not be found in the registry alam99 Eclipse 0 01-08-2008 09:21 AM
404 Not Found mary Java Servlet 5 11-07-2007 11:15 AM
ConnectException not found tamayo New To Java 1 07-23-2007 09:23 AM
Hibernate table not found orchid Database 2 05-06-2007 08:44 AM


All times are GMT +3. The time now is 04:25 PM.


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