Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within JSF
Search Coderanch
Advance search
Google search
Register / Login
Win a copy of
OCP Oracle Certified Professional Java SE 21 Developer Study Guide: Exam 1Z0-830
this week in the
Programmer Certification
forum!
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Tim Cooke
Liutauras Vilda
Jeanne Boyarsky
paul wheaton
Sheriffs:
Ron McLeod
Devaka Cooray
Henry Wong
Saloon Keepers:
Tim Holloway
Stephan van Hulst
Carey Brown
Tim Moores
Mikalai Zaikin
Bartenders:
Frits Walraven
Forum:
JSF
trouble with f:selectItems
Sushma Sharma
Ranch Hand
Posts: 139
posted 18 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Hi,
I am trying to use f:selectItems within a f:selectManyListBox, but I am getting exception. here is my code.
my jsp ============================================================= <h:selectManyListBox style="width:100px;height:200px;" id="12"> <f:selectItems id="name" value="#{cean.cames}"/> </h:selectManyListBox> myBean Method ======================================================================== public List getCames() { Collection ctemList = this.getTems(); List cames = new ArrayList(); if ((ctemList != null) && !ctemList.isEmpty()) { Iterator it = ctemList.iterator(); while (it.hasNext()) { Item item = (Item) it.next(); if (item != null) { String name = item.getName(); if (name != null) { cames.add(new SelectItem(name, name)); //UISelectItem i = new UISelectItem(); //i.setItemLabel(name); //i.setItemValue(name); //cames.add(i); } } } } return cames; }
And below is the stackTrace.
==============================================================
[ServletException in:/layout.jsp] javax/servlet/jsp/el/VariableResolver' java.lang.NoClassDefFoundError: javax/servlet/jsp/el/VariableResolver at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Class.java:1655) at java.lang.Class.getDeclaredMethods(Class.java:1139) at java.beans.Introspector$1.run(Introspector.java:1272) at java.security.AccessController.doPrivileged(Native Method) at java.beans.Introspector.getPublicDeclaredMethods(Introspector.java:1270) at java.beans.Introspector.getTargetMethodInfo(Introspector.java:1133) at java.beans.Introspector.getBeanInfo(Introspector.java:383) at java.beans.Introspector.getBeanInfo(Introspector.java:220) at java.beans.Introspector.(Introspector.java:364) at java.beans.Introspector.getBeanInfo(Introspector.java:220) at java.beans.Introspector.getBeanInfo(Introspector.java:206) at weblogic.servlet.jsp.StandardTagLib.parseTagDD(StandardTagLib.java:1331) at weblogic.servlet.jsp.StandardTagLib.parseDD(StandardTagLib.java:1269) at weblogic.servlet.jsp.StandardTagLib.(StandardTagLib.java:292) at weblogic.servlet.jsp.TagLibHelper.loadTagLib(TagLibHelper.java:314) at weblogic.servlet.jsp.JspLexer.loadTagLib(JspLexer.java:145) at weblogic.servlet.jsp.JspLexer.mTAGLIB_DIRECTIVE_BODY(JspLexer.java:5067) at weblogic.servlet.jsp.JspLexer.mTAGLIB_DIRECTIVE(JspLexer.java:4905) at weblogic.servlet.jsp.JspLexer.mDIRECTIVE(JspLexer.java:4751) at weblogic.servlet.jsp.JspLexer.mSTANDARD_THING(JspLexer.java:2161) at weblogic.servlet.jsp.JspLexer.mTOKEN(JspLexer.java:1947) at weblogic.servlet.jsp.JspLexer.nextToken(JspLexer.java:1820) at weblogic.servlet.jsp.JspLexer.parse(JspLexer.java:963) at weblogic.servlet.jsp.JspParser.doit(JspParser.java:106) at weblogic.servlet.jsp.JspParser.parse(JspParser.java:234) at weblogic.servlet.jsp.Jsp2Java.outputs(Jsp2Java.java:125) at weblogic.utils.compiler.CodeGenerator.generate(CodeGenerator.java:258) at weblogic.servlet.jsp.JspStub.compilePage(JspStub.java:396) at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:246) at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:196) at weblogic.servlet.internal.ServletStubImpl.getServlet(ServletStubImpl.java:598) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:406) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:526) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:348) at weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImpl.java:646) at weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImpl.java:431) at weblogic.servlet.jsp.PageContextImpl.include(PageContextImpl.java:154) at org.apache.struts.tiles.TilesUtilImpl.doInclude(TilesUtilImpl.java:137) at org.apache.struts.tiles.TilesUtil.doInclude(TilesUtil.java:177) at org.apache.struts.taglib.tiles.InsertTag.doInclude(InsertTag.java:756) at org.apache.struts.taglib.tiles.InsertTag$InsertHandler.doEndTag(InsertTag.java:881) at org.apache.struts.taglib.tiles.InsertTag.doEndTag(InsertTag.java:473) at jsp_servlet.__layout._jspService(__layout.java:244) at weblogic.servlet.jsp.JspBase.service(JspBase.java:33) at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1077) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:465) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:348) at weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImpl.java:646) at weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImpl.java:431) at weblogic.servlet.jsp.PageContextImpl.include(PageContextImpl.java:154) at org.apache.struts.tiles.TilesUtilImpl.doInclude(TilesUtilImpl.java:137) at org.apache.struts.tiles.TilesUtil.doInclude(TilesUtil.java:177) at org.apache.struts.taglib.tiles.InsertTag.doInclude(InsertTag.java:756) at org.apache.struts.taglib.tiles.InsertTag$InsertHandler.doEndTag(InsertTag.java:881) at org.apache.struts.taglib.tiles.InsertTag.doEndTag(InsertTag.java:473) at jsp_servlet.__product._jspService(__product.java:190) at weblogic.servlet.jsp.JspBase.service(JspBase.java:33) at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1077) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:465) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:526) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:348) at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:330) at com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:322) at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:142) at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87) at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200) at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:198) at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1077) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:465) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:348) at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:7047) at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321) at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121) at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3902) at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2773) at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:224) at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:183)
please help. If I remove the select part, everything is working fine.
Thanks,
Sushma
Richard Green
Ranch Hand
Posts: 536
posted 18 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
hmm. not sure whats wrong. but i have something similar to
public List<SelectItem> getCames()
{
List<SelectItem> selectItems = new ArrayList<SelectItem>();
for (Item item : ctemList)
{
if (item.getName()!=null)
{
selectItems.add(new SelectItem(item.getName(), item.getName(),item.getName()));
}
}
return selectItems;
}
in my code and it works fine.
MCSD, SCJP, SCWCD, SCBCD, SCJD (in progress - URLybird 1.2.1)
What? What, what, what? What what tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
Displaying BLOB in JSF
IndexOutOfBoundsException at javax.faces.component.UICompo
JSTL xml tag throwing error
code too large
Struts with weblogic7.0
More...