Re: Nested tags : trying to get recursion to work

2003-07-03 Thread Sloan Seaman
What does yout struts config file look like?

Sounds like that is where the problem is...

Also, you can't just start with a nest tag (to my knowledge)  you have to
have it in a nested:form or nested:root, but I may be wrong.  The docs are a
bit thin and I can't even get the examples to work properly

--
Sloan

- Original Message - 
From: Pratima Aiyagari [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, July 02, 2003 6:33 PM
Subject: Nested tags : trying to get recursion to work


 I am trying to get recursive inclusion to work with
 the nested tags.

 Here is what I'm trying to do: I have a directory,
 which might have a bunch of files or more directories
 inside of it. Just like any regular directory
 structure. And I need to display all the directories
 and the files inside each.

 In main.jsp:
 
 nested:nest property=directory
 jsp:include page=recursiveDirectories.jsp /
 /nested:nest

 There is a bean in the request whose getter
 [getDirectory] method returns a directory.

 So, this should be fine.

 In recursiveDirectories.jsp
 
 nested:root
 readflag=[nested:write property=readFlag/]
 /nested:root

 The directory bean which is now passed to nested:root
 has a getReadFlag method. So this should work ?

 Or not ..  :-/

 I get a strange exception. It says Cannot find bean
 blank in any scope

 Please see end of this post for the exact exception.
 It says it can't find some bean, but no indication of
 what that might be ..

 Any help appreciated!

 Pratima

 ===
 org.apache.jasper.JasperException: Cannot find bean
 in any scope
 at

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2
48)
 at
 org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
 at
 org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
 at
 javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at

org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.
java:684)
 at

org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatch
er.java:575)
 at

org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher
.java:498)
 at

org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:8
22)
 at

org.apache.jsp.queryInvReport_jsp._jspx_meth_nested_nest_0(queryInvReport_js
p.java:1470)
 at
 org.apache.jsp.queryInvReport_jsp._jspService(queryInvReport_jsp.java:735)
 at
 org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
 at
 javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2
04)
 at
 org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
 at
 org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
 at
 javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at

org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.
java:684)
 at

org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatch
er.java:432)
 at

org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher
.java:356)
 at

org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:10
69)
 at

org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProces
sor.java:455)
 at

org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:279)
 at
 org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
 at
 org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
 at
 javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
 at
 javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at

org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:247)
 at

org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:193)
 at

org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:260)
 at

org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
 at

org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
 at
 org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
 at

org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:191)
 at

org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
 at

org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
 at
 org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
 at
 org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
 at

org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180
)
 at

org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643

Nested tags : trying to get recursion to work

2003-07-02 Thread Pratima Aiyagari
I am trying to get recursive inclusion to work with
the nested tags.

Here is what I'm trying to do: I have a directory,
which might have a bunch of files or more directories
inside of it. Just like any regular directory
structure. And I need to display all the directories
and the files inside each. 

In main.jsp: 

nested:nest property=directory
jsp:include page=recursiveDirectories.jsp /
/nested:nest

There is a bean in the request whose getter
[getDirectory] method returns a directory. 

So, this should be fine. 

In recursiveDirectories.jsp

nested:root
readflag=[nested:write property=readFlag/]
/nested:root

The directory bean which is now passed to nested:root
has a getReadFlag method. So this should work ?

Or not ..  :-/

I get a strange exception. It says Cannot find bean
blank in any scope

Please see end of this post for the exact exception.
It says it can't find some bean, but no indication of
what that might be .. 

Any help appreciated!

Pratima

===
org.apache.jasper.JasperException: Cannot find bean 
in any scope
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:248)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:684)
at
org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:575)
at
org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:498)
at
org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:822)
at
org.apache.jsp.queryInvReport_jsp._jspx_meth_nested_nest_0(queryInvReport_jsp.java:1470)
at
org.apache.jsp.queryInvReport_jsp._jspService(queryInvReport_jsp.java:735)
at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:204)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:684)
at
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:432)
at
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:356)
at
org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1069)
at
org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:455)
at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:279)
at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
at
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:260)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
at

Re: Nested tags : trying to get recursion to work

2003-07-02 Thread Pratima Aiyagari
Never mind .. I got it to work.

- P

--- Pratima Aiyagari [EMAIL PROTECTED] wrote:
 I am trying to get recursive inclusion to work with
 the nested tags.
 
 Here is what I'm trying to do: I have a directory,
 which might have a bunch of files or more
 directories
 inside of it. Just like any regular directory
 structure. And I need to display all the directories
 and the files inside each. 
 
 In main.jsp: 
 
 nested:nest property=directory
 jsp:include page=recursiveDirectories.jsp /
 /nested:nest
 
 There is a bean in the request whose getter
 [getDirectory] method returns a directory. 
 
 So, this should be fine. 
 
 In recursiveDirectories.jsp
 
 nested:root
 readflag=[nested:write property=readFlag/]
 /nested:root
 
 The directory bean which is now passed to
 nested:root
 has a getReadFlag method. So this should work ?
 
 Or not ..  :-/
 
 I get a strange exception. It says Cannot find bean
 blank in any scope
 
 Please see end of this post for the exact exception.
 It says it can't find some bean, but no indication
 of
 what that might be .. 
 
 Any help appreciated!
 
 Pratima
 
 ===
 org.apache.jasper.JasperException: Cannot find bean 
 in any scope
   at

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:248)
   at

org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
   at

org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
   at

javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
   at

org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:684)
   at

org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:575)
   at

org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:498)
   at

org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:822)
   at

org.apache.jsp.queryInvReport_jsp._jspx_meth_nested_nest_0(queryInvReport_jsp.java:1470)
   at

org.apache.jsp.queryInvReport_jsp._jspService(queryInvReport_jsp.java:735)
   at

org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
   at

javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
   at

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:204)
   at

org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
   at

org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
   at

javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
   at

org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:684)
   at

org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:432)
   at

org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:356)
   at

org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1069)
   at

org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:455)
   at

org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:279)
   at

org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
   at

org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
   at

javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
   at

javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
   at

org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
   at

org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
   at

org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:260)
   at

org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
   at

org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
   at

org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
   at

org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
   at

org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
   at

org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
   at

org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
   at

org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
   at

org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
   at

org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
   at

org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
   at