Error 500 No Collection Found
This Site Careers Other all forums Forum: Struts jsp.JspException: No collection found SambaSiva Goud Greenhorn Posts: 9 posted 9 years ago when i am trying to get action class it will execute perfectly but jap is not showin the error is javax.servlet.jsp.JspException: No collection found Brent Sterling Ranch Hand Posts: 948 posted 9 years ago Posting your jsp code would help. - Brent Abhilash George Greenhorn Posts: 13 posted 9 years ago The no collection found exception is coming since your jsp displays some list or collection on the page and it is coming empty . You need to ensure either one of the two a)that the action which is forwarding to this page fills the collection field of the form associated with the jsp page or b) The jsp page should have a check for null condition of the collection using
This Site Careers Other all forums Forum: Struts No collection found utkarsh sinha Greenhorn Posts: 5 posted 8 years ago How to populate the bean form with the dynamic content??? I used indexed properties with lazy initialization, lists in a form bean "question 6 of this forum's FAQ" Well i tried to run the code given by Brent Sterling http://coderanch.com/t/56494/Struts/jsp-JspException-collection at "question 6 of this forum's FAQ" but there is an error and i am not able to run the application: javax.servlet.jsp.JspException: No collection found org.apache.struts.taglib.logic.IterateTag.doStartTag(IterateTag.java:281) org.apache.jsp.order_005findexed_jsp._jspService(order_005findexed_jsp.java:104) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) jsp page is:
struts No Collection Found LinkBack LinkBack URL About LinkBacks Thread Tools Show Printable Version Email this Page… Subscribe to this Thread… Search Thread Advanced Search http://www.java-forums.org/web-frameworks/67-struts-no-collection-found.html Display Linear Mode Switch to Hybrid Mode Switch to Threaded Mode 04-25-2007,07:23 PM http://stackoverflow.com/questions/12980761/mongokit-no-collection-found #1 orchid Member Join Date Apr 2007 Location Midwest Posts 60 Rep Power 0 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 error 500 unanswered questions about this. Here are the details. The list has 4 elements in it. //jsp looks like this
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up mongokit No collection found up vote 1 down vote favorite I'm using mongokit with flask, and everytime I try to use a collection I created, I receive the error No collection found I defined my collections in a separated file models.py. It looks like this: from mongokit import Connection, Document import os import sys here = os.path.dirname(os.path.abspath(__file__)) path = os.path.abspath(os.path.join(here, 'settings')) sys.path.append(path) from settings import base as settings connection = Connection() @connection.register class Contact(Document): __database__ = settings.MONGO_DBNAME __collection__ = "Contact" structure = { "name":unicode, "mobile_number":unicode, } required_fields = ["name"] @connection.register class User(Document): __database__ = settings.MONGO_DBNAME __collection__ = 'User' structure = { "username":unicode, "twitter_access_token":unicode, "twitter_token_secret":unicode, "contacts":[Contact] } required_fields = ["username"] default_values = { "twitter_access_token": "", "twitter_token_secret": "" } But then I tried: >>> from models import User >>> u = User() >>> u["username"] = "somename" >>> u.save() Traceback (most recent call last): File "