Re: Problem in using logic:iterate in struts

2008-09-24 Thread Laurie Harper
If the action isn't being called, that would explain why the data the 
action pushes into request scope can't be found... Sounds like the link 
is pointing to the JSP instead of the action, then. How are you 
rendering the links? What are they rendering as? (i.e. what is the 
generated HTML?)


L.

UITOT wrote:

Hello Laurie,
Thanx a lot for replying.Let me tell you the exact
scenario.I am developing a discussion forum for my Project.There is one JSP
called View_topic.jsp.This will display the list of all topics in the
Discussion Forum.Before this JSP one action class say view_topics_Action
is getting called which is setting the arraylist for topics say topic_list
in request scope.This list is getting displayed using logic:iterate in
view_topic.jsp.No problem till here.Now when user clicks on a particular
topic I want that all the threads related to that topic should get
displayed.So I have made each topic as a Hyperlink.Now when user clicks on a
particular topic I want the topic_id to get passed to some action class say
view_threads_Action which will take care of retrieving the Threads details
for that topic  if it is successful it will call another JSP say
View_threads.jsp.


Now I don't have any problem in displaying topic list.I am getting error
only when I am clicking on the hyperlink.The error is in JSP
view_topic.jsp only so it not going to action class view_threads_Action.
I hope I am able to explain my problem.Please help.Thanx.
 


Laurie Harper wrote:
Unfortunately your struts-config.xml and JSP code didn't make it through 
to the list properly. Make sure you're sending your message as plain text.


A couple of questions:

*) How are you accessing the page? (i.e. what URL are you typing?)

*) Are you sure you are calling the action before the JSP is rendered? 
What happens if you put a println at the top of execute()


L.

UITOT wrote:

Hello all,
I have developed 1 application using struts.I am getting this error in my
JSP.I have used logic:iterate.I have populated an arraylist in action
class
which I am using in my JSP.I am able to see the data from the arraylist
in
my JSP but I am getting error when I am clicking on the hyperlink in
JSP.This is the error.Please help me as I am pretty new to struts.Any
help
will be highly appreciated.Thanx in advance.

ApplicationDispatcher[/TGMC_DB1-2009] PWC1231: Servlet.service() for
servlet
jsp threw exception
javax.servlet.jsp.JspException: Cannot find bean: topic_list in any
scope
at org.apache.struts.taglib.TagUtils.lookup(TagUtils.java:935)
at
org.apache.struts.taglib.logic.IterateTag.doStartTag(IterateTag.java:232)
at org.apache.jsp.viewThreads_jsp._jspService(viewThreads_jsp.java from
:121)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:93)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:373)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:470)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:364)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
at
org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:411)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:317)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198)
at
org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:390)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198)
at
org.apache.catalina.core.ApplicationDispatcher.doInvoke(ApplicationDispatcher.java:853)
at
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:703)
at
org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:542)
at
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:474)
at
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:366)
at
org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1085)
at
org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcessor.java:263)
at
org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:398)
at
org.apache.struts.tiles.TilesRequestProcessor.processForwardConfig(TilesRequestProcessor.java:318)
at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:241)
at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:718)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
at
org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:411)
at

Problem in using logic:iterate in struts

2008-09-23 Thread UITOT

Hello all,
I have developed 1 application using struts.I am getting this error in my
JSP.I have used logic:iterate.I have populated an arraylist in action class
which I am using in my JSP.I am able to see the data from the arraylist in
my JSP but I am getting error when I am clicking on the hyperlink in
JSP.This is the error.Please help me as I am pretty new to struts.Any help
will be highly appreciated.Thanx in advance.

ApplicationDispatcher[/TGMC_DB1-2009] PWC1231: Servlet.service() for servlet
jsp threw exception
javax.servlet.jsp.JspException: Cannot find bean: topic_list in any scope
at org.apache.struts.taglib.TagUtils.lookup(TagUtils.java:935)
at org.apache.struts.taglib.logic.IterateTag.doStartTag(IterateTag.java:232)
at org.apache.jsp.viewThreads_jsp._jspService(viewThreads_jsp.java from
:121)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:93)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:373)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:470)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:364)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
at
org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:411)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:317)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198)
at
org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:390)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198)
at
org.apache.catalina.core.ApplicationDispatcher.doInvoke(ApplicationDispatcher.java:853)
at
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:703)
at
org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:542)
at
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:474)
at
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:366)
at
org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1085)
at
org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcessor.java:263)
at
org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:398)
at
org.apache.struts.tiles.TilesRequestProcessor.processForwardConfig(TilesRequestProcessor.java:318)
at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:241)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:718)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
at
org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:411)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:317)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198)
at
org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:390)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:288)
at
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:271)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:202)
at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:206)
at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:150)
at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:270)
at

Re: Problem in using logic:iterate in struts

2008-09-23 Thread Alexander Baetz

UITOT schrieb:

Hello all,
I have developed 1 application using struts.I am getting this error in my
JSP.I have used logic:iterate.I have populated an arraylist in action class
which I am using in my JSP.I am able to see the data from the arraylist in
my JSP but I am getting error when I am clicking on the hyperlink in
JSP.This is the error.Please help me as I am pretty new to struts.Any help
will be highly appreciated.Thanx in advance.
javax.servlet.jsp.JspException: Cannot find bean: topic_list in any scope
  
I don't know anything about Struts 1 but this looks to me as if you 
didn't create a bean with the name topic_list anywhere in the code.
// this is the statement which is generating error 
get_threads.do?topic_id=bean:write name= 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Problem in using logic:iterate in struts

2008-09-23 Thread UITOT

Hello Alexander,
First of all thanx for replying.My code looks very much
unclear here.You can refer this link
http://forums.sun.com/thread.jspa?threadID=5333420.Again topic_list is my
arraylist.I have created it in action class  I have set it in request
scope.Same arraylist I am using in logic:iterate.Why to create a bean for
topic_list?? please solve my doubt...Thanks in advance.


Alexander Baetz wrote:
 
 UITOT schrieb:
 Hello all,
 I have developed 1 application using struts.I am getting this error in my
 JSP.I have used logic:iterate.I have populated an arraylist in action
 class
 which I am using in my JSP.I am able to see the data from the arraylist
 in
 my JSP but I am getting error when I am clicking on the hyperlink in
 JSP.This is the error.Please help me as I am pretty new to struts.Any
 help
 will be highly appreciated.Thanx in advance.
 javax.servlet.jsp.JspException: Cannot find bean: topic_list in any
 scope
   
 I don't know anything about Struts 1 but this looks to me as if you 
 didn't create a bean with the name topic_list anywhere in the code.
 // this is the statement which is generating error   
   
 get_threads.do?topic_id=bean:write name= 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Problem-in-using-logic%3Aiterate-in-struts-tp19622971p19628906.html
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Problem in using logic:iterate in struts

2008-09-23 Thread Laurie Harper
Unfortunately your struts-config.xml and JSP code didn't make it through 
to the list properly. Make sure you're sending your message as plain text.


A couple of questions:

*) How are you accessing the page? (i.e. what URL are you typing?)

*) Are you sure you are calling the action before the JSP is rendered? 
What happens if you put a println at the top of execute()


L.

UITOT wrote:

Hello all,
I have developed 1 application using struts.I am getting this error in my
JSP.I have used logic:iterate.I have populated an arraylist in action class
which I am using in my JSP.I am able to see the data from the arraylist in
my JSP but I am getting error when I am clicking on the hyperlink in
JSP.This is the error.Please help me as I am pretty new to struts.Any help
will be highly appreciated.Thanx in advance.

ApplicationDispatcher[/TGMC_DB1-2009] PWC1231: Servlet.service() for servlet
jsp threw exception
javax.servlet.jsp.JspException: Cannot find bean: topic_list in any scope
at org.apache.struts.taglib.TagUtils.lookup(TagUtils.java:935)
at org.apache.struts.taglib.logic.IterateTag.doStartTag(IterateTag.java:232)
at org.apache.jsp.viewThreads_jsp._jspService(viewThreads_jsp.java from
:121)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:93)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:373)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:470)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:364)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
at
org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:411)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:317)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198)
at
org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:390)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198)
at
org.apache.catalina.core.ApplicationDispatcher.doInvoke(ApplicationDispatcher.java:853)
at
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:703)
at
org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:542)
at
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:474)
at
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:366)
at
org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1085)
at
org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcessor.java:263)
at
org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:398)
at
org.apache.struts.tiles.TilesRequestProcessor.processForwardConfig(TilesRequestProcessor.java:318)
at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:241)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:718)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
at
org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:411)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:317)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198)
at
org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:390)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:288)
at
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:271)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:202)
at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:206)
at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:150)
at

Re: Problem in using logic:iterate in struts

2008-09-23 Thread UITOT

Hello Laurie,
Thanx a lot for replying.Let me tell you the exact
scenario.I am developing a discussion forum for my Project.There is one JSP
called View_topic.jsp.This will display the list of all topics in the
Discussion Forum.Before this JSP one action class say view_topics_Action
is getting called which is setting the arraylist for topics say topic_list
in request scope.This list is getting displayed using logic:iterate in
view_topic.jsp.No problem till here.Now when user clicks on a particular
topic I want that all the threads related to that topic should get
displayed.So I have made each topic as a Hyperlink.Now when user clicks on a
particular topic I want the topic_id to get passed to some action class say
view_threads_Action which will take care of retrieving the Threads details
for that topic  if it is successful it will call another JSP say
View_threads.jsp.


Now I don't have any problem in displaying topic list.I am getting error
only when I am clicking on the hyperlink.The error is in JSP
view_topic.jsp only so it not going to action class view_threads_Action.
I hope I am able to explain my problem.Please help.Thanx.
 

Laurie Harper wrote:
 
 Unfortunately your struts-config.xml and JSP code didn't make it through 
 to the list properly. Make sure you're sending your message as plain text.
 
 A couple of questions:
 
 *) How are you accessing the page? (i.e. what URL are you typing?)
 
 *) Are you sure you are calling the action before the JSP is rendered? 
 What happens if you put a println at the top of execute()
 
 L.
 
 UITOT wrote:
 Hello all,
 I have developed 1 application using struts.I am getting this error in my
 JSP.I have used logic:iterate.I have populated an arraylist in action
 class
 which I am using in my JSP.I am able to see the data from the arraylist
 in
 my JSP but I am getting error when I am clicking on the hyperlink in
 JSP.This is the error.Please help me as I am pretty new to struts.Any
 help
 will be highly appreciated.Thanx in advance.
 
 ApplicationDispatcher[/TGMC_DB1-2009] PWC1231: Servlet.service() for
 servlet
 jsp threw exception
 javax.servlet.jsp.JspException: Cannot find bean: topic_list in any
 scope
 at org.apache.struts.taglib.TagUtils.lookup(TagUtils.java:935)
 at
 org.apache.struts.taglib.logic.IterateTag.doStartTag(IterateTag.java:232)
 at org.apache.jsp.viewThreads_jsp._jspService(viewThreads_jsp.java from
 :121)
 at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:93)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
 at
 org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:373)
 at
 org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:470)
 at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:364)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
 at
 org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:411)
 at
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:317)
 at
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198)
 at
 org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:390)
 at
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)
 at
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198)
 at
 org.apache.catalina.core.ApplicationDispatcher.doInvoke(ApplicationDispatcher.java:853)
 at
 org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:703)
 at
 org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:542)
 at
 org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:474)
 at
 org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:366)
 at
 org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1085)
 at
 org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcessor.java:263)
 at
 org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:398)
 at
 org.apache.struts.tiles.TilesRequestProcessor.processForwardConfig(TilesRequestProcessor.java:318)
 at
 org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:241)
 at
 org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
 at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:718)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
 at
 org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:411)
 at
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:317)
 at
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198)
 at