Re: Struts, WebLogic 6.0 and template tags
"Craig R. McClanahan" wrote: > Maya Muchnik wrote: > > > Hello, Torsen, > > > > It is not an answer to your question. But I would like to use this email and > > ask the struts development team about compatibility template library and > > components library (http://www.lifl.fr/~dumoulin/components/). Components allow > > to define "instances" to reuse them with different parameter values. They have > > good examples how to use them for implementation. They do not have a "role" > > attribute yet. Both components and templates have a lot of common. Why not > > combine the best parts both of them and put under struts project before 1.0 > > release? > > > > There is no end to good ideas for improvements to Struts, and the components > library is one of them. However, if we kept adding new functionality we'd never > have a 1.0 release, and that's not good either. > > This is definitely high on my personal priority list to look at for 1.1. Me too. As soon as I get my book out the door, I'll take a look at adding components to Struts. david (the Struts templates guy)
Re: Struts, WebLogic 6.0 and template tags
Thanks all for you comments on Components library. Unfortunately, I have less and less time for Components. So, if there is some volunteers to improve them, let me know. I will soon put Components project on a CVS server. This will allows others people to participate ... Cedric "Deadman, Hal" wrote: > I am using the components add-on and I like it but it shouldn't go into the > 1.0 release. It's too much code and has too much functionality to be merged > without some more review which will take time. One problem I have noticed is > that when a component is included the exceptions are caught which makes it > difficult to have any kind of global error handler. That's an easy fix but > merging the code will not be a trivial effort. > > Besides, there is no compelling reason to add it to struts now because there > is nothing to stop people using struts from also using the components > framework. When it is added to struts there will probably be some re-work > involved but it should be straightforward. > > Hal > > -Original Message- > From: Maya Muchnik [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, February 21, 2001 10:48 AM > To: [EMAIL PROTECTED] > Subject: Re: Struts, WebLogic 6.0 and template tags > > Hello, Torsen, > > It is not an answer to your question. But I would like to use this email and > ask the struts development team about compatibility template library and > components library (http://www.lifl.fr/~dumoulin/components/). Components > allow > to define "instances" to reuse them with different parameter values. They > have > good examples how to use them for implementation. They do not have a "role" > attribute yet. Both components and templates have a lot of common. Why not > combine the best parts both of them and put under struts project before 1.0 > release? > > "Beuck, Torsten" wrote: > > > Hi, we like to use Struts with Bea WLS 6.0 for a B2B application. > Currently > > I am developing a prototype and the first tests under Tomcat worked fine. > I > > used the Struts template tags for a page design with header, navigation > menu > > and content. An example: > > > > <%@ taglib uri='/WEB-INF/tlds/struts-template.tld' prefix='template' %> > > > > > > > > > > > > > > > >
Re: Struts, WebLogic 6.0 and template tags
Hello, Torsen, It is not an answer to your question. But I would like to use this email and ask the struts development team about compatibility template library and components library (http://www.lifl.fr/~dumoulin/components/). Components allow to define "instances" to reuse them with different parameter values. They have good examples how to use them for implementation. They do not have a "role" attribute yet. Both components and templates have a lot of common. Why not combine the best parts both of them and put under struts project before 1.0 release? "Beuck, Torsten" wrote: > Hi, we like to use Struts with Bea WLS 6.0 for a B2B application. Currently > I am developing a prototype and the first tests under Tomcat worked fine. I > used the Struts template tags for a page design with header, navigation menu > and content. An example: > > <%@ taglib uri='/WEB-INF/tlds/struts-template.tld' prefix='template' %> > > > > > > > >
RE: Struts, WebLogic 6.0 and template tags
I am not sure what you are looking for. The component library comes with examples including a struts-template example that uses the component library. The issue with components I was complaining about, albeit not clearly, was that if a jsp that is part of a component instance and the jsp throws an exception, the code surrounding the include will trap the exception and print it to the browser. I would prefer that the exception was not caught so that I could set up some global handler. Trapping the exception and printing it to the browser means that the site operator won't know users are experiencing trouble. Below is some of the offending code from s1.struts.taglib.component.IncludeTag.java. Fixing it would involve trapping the exceptions and throwing a JspException. Unfortunately that has its own problems because JspExceptions can't nest the root exception so you don't know exactly where the error occured. At least you know that something bad happened. I am not planning to fix this problem for the time being, I am just planning to write the jsps so they don't fail. :) Hal ... pageContext.include(page); } catch (IOException ex) { processException( ex, "Can't include page '"+ page+ "' : " + ex.getMessage() ); } catch (IllegalArgumentException ex) { // Can't resolve page uri processException( ex, "Tag 'include' can't include page '" + page + "'. Check if it exist.\n" + ex.getMessage() ); } catch (ServletException ex) { Throwable realEx = ex; if( ex.getRootCause() != null ) { realEx = ex.getRootCause(); } processException( realEx, "[ServletException in:"+ page+ "] " + realEx.getMessage()+ "'" ); } catch (Exception ex) { processException( ex, "[Exception in:" + page + "] "+ ex.getMessage()); } -Original Message- From: Maya Muchnik [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 21, 2001 11:28 AM To: [EMAIL PROTECTED] Subject: Re: Struts, WebLogic 6.0 and template tags Hal, Please give a code example with a component, when you cannot get an exception. And how it can be fix now. Maya "Deadman, Hal" wrote: > I am using the components add-on and I like it but it shouldn't go into the > 1.0 release. It's too much code and has too much functionality to be merged > without some more review which will take time. One problem I have noticed is > that when a component is included the exceptions are caught which makes it > difficult to have any kind of global error handler. That's an easy fix but > merging the code will not be a trivial effort. > > Besides, there is no compelling reason to add it to struts now because there > is nothing to stop people using struts from also using the components > framework. When it is added to struts there will probably be some re-work > involved but it should be straightforward. > > Hal >
RE: Struts, WebLogic 6.0 and template tags
My hasBody() method is like the following so it shouldn't have a null pointer exception. Are you using a recent nightly build? I think I had this problem a couple months ago but I think it has been fixed for awhile. private boolean hasBody() { if (bodyContent == null) return (false); return ! bodyContent.getString().equals(""); } -Original Message- From: Beuck, Torsten [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 21, 2001 10:26 AM To: '[EMAIL PROTECTED]' Subject: Struts, WebLogic 6.0 and template tags Hi, we like to use Struts with Bea WLS 6.0 for a B2B application. Currently I am developing a prototype and the first tests under Tomcat worked fine. I used the Struts template tags for a page design with header, navigation menu and content. An example: <%@ taglib uri='/WEB-INF/tlds/struts-template.tld' prefix='template' %> Now, when I deploy the web application to WLS I get the following: <21.02.2001 13:21:12 GMT+01:00> <[WebAppServletContext(5574888,b2bweb)] Servlet failed with Exception java.lang.NullPointerException at org.apache.struts.taglib.template.PutTag.hasBody(PutTag.java:198) at org.apache.struts.taglib.template.PutTag.getContent(PutTag.java:181) at org.apache.struts.taglib.template.PutTag.doEndTag(PutTag.java:152) at jsp_servlet._loginpage._jspService(_loginpage.java:111) at weblogic.servlet.jsp.JspBase.service(JspBase.java:27) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java :208) at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletCo ntext.java:1127) at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java :1529) at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137) at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120) > I tried to debug the application an it seems as if the setBodyContent() method of class PutTag is not invoked, so that the bodyContent member variable is null. This leads to a NullPointerException in the method hasBody(). Is that right? Is there a workaround? I like the template tags, so i don't want to give them up. By the way: Is the problem described in msg01892 (PropertyResource problem on WebLogic 6.0) fixed? Thanks, Torsten --- Torsten Beuck OTTO Versand Abteilung IT-SP-WQ Wandsbeker Str. 3 - 7 22172 Hamburg Tel.: ++49 40 6461 5351 Fax: ++49 40 6464 5351 eMail: [EMAIL PROTECTED]
Re: Struts, WebLogic 6.0 and template tags
Thank you. OK, I understand, that if JSP is good, then no problem. "Deadman, Hal" wrote: > I am not sure what you are looking for. The component library comes with > examples including a struts-template example that uses the component > library. > > The issue with components I was complaining about, albeit not clearly, was > that if a jsp that is part of a component instance and the jsp throws an > exception, the code surrounding the include will trap the exception and > print it to the browser. I would prefer that the exception was not caught so > that I could set up some global handler. Trapping the exception and printing > it to the browser means that the site operator won't know users are > experiencing trouble. > > Below is some of the offending code from > s1.struts.taglib.component.IncludeTag.java. Fixing it would involve trapping > the exceptions and throwing a JspException. Unfortunately that has its own > problems because JspExceptions can't nest the root exception so you don't > know exactly where the error occured. At least you know that something bad > happened. I am not planning to fix this problem for the time being, I am > just planning to write the jsps so they don't fail. :) > > Hal > > ... > pageContext.include(page); > } >catch (IOException ex) > { > processException( ex, "Can't include page '"+ page+ "' : " + > ex.getMessage() ); > } >catch (IllegalArgumentException ex) > { > // Can't resolve page uri > processException( ex, "Tag 'include' can't include page '" + page + > "'. Check if it exist.\n" + ex.getMessage() ); > } >catch (ServletException ex) > { > Throwable realEx = ex; > if( ex.getRootCause() != null ) > { > realEx = ex.getRootCause(); > } > processException( realEx, "[ServletException in:"+ page+ "] " + > realEx.getMessage()+ "'" ); > } > catch (Exception ex) { > processException( ex, "[Exception in:" + page + "] "+ > ex.getMessage()); > } > >
Re: Struts, WebLogic 6.0 and template tags
Maya Muchnik wrote: > Hello, Torsen, > > It is not an answer to your question. But I would like to use this email and > ask the struts development team about compatibility template library and > components library (http://www.lifl.fr/~dumoulin/components/). Components allow > to define "instances" to reuse them with different parameter values. They have > good examples how to use them for implementation. They do not have a "role" > attribute yet. Both components and templates have a lot of common. Why not > combine the best parts both of them and put under struts project before 1.0 > release? > There is no end to good ideas for improvements to Struts, and the components library is one of them. However, if we kept adding new functionality we'd never have a 1.0 release, and that's not good either. This is definitely high on my personal priority list to look at for 1.1. Craig
Re: Struts, WebLogic 6.0 and template tags
Hal, Please give a code example with a component, when you cannot get an exception. And how it can be fix now. Maya "Deadman, Hal" wrote: > I am using the components add-on and I like it but it shouldn't go into the > 1.0 release. It's too much code and has too much functionality to be merged > without some more review which will take time. One problem I have noticed is > that when a component is included the exceptions are caught which makes it > difficult to have any kind of global error handler. That's an easy fix but > merging the code will not be a trivial effort. > > Besides, there is no compelling reason to add it to struts now because there > is nothing to stop people using struts from also using the components > framework. When it is added to struts there will probably be some re-work > involved but it should be straightforward. > > Hal >
Re: Struts, WebLogic 6.0 and template tags
When you have a lot of nested Components, and one is faulty, it is very hard to discovered which one. It is why the actual implementation of insert catch the exception, and show it in browser. We definitely need to find a better solution. Cedric "Deadman, Hal" wrote: > I am not sure what you are looking for. The component library comes with > examples including a struts-template example that uses the component > library. > > The issue with components I was complaining about, albeit not clearly, was > that if a jsp that is part of a component instance and the jsp throws an > exception, the code surrounding the include will trap the exception and > print it to the browser. I would prefer that the exception was not caught so > that I could set up some global handler. Trapping the exception and printing > it to the browser means that the site operator won't know users are > experiencing trouble. > > Below is some of the offending code from > s1.struts.taglib.component.IncludeTag.java. Fixing it would involve trapping > the exceptions and throwing a JspException. Unfortunately that has its own > problems because JspExceptions can't nest the root exception so you don't > know exactly where the error occured. At least you know that something bad > happened. I am not planning to fix this problem for the time being, I am > just planning to write the jsps so they don't fail. : > > Hal > > ... > pageContext.include(page); > } >catch (IOException ex) > { > processException( ex, "Can't include page '"+ page+ "' : " + > ex.getMessage() ); > } >catch (IllegalArgumentException ex) > { > // Can't resolve page uri > processException( ex, "Tag 'include' can't include page '" + page + > "'. Check if it exist.\n" + ex.getMessage() ); > } >catch (ServletException ex) > { > Throwable realEx = ex; > if( ex.getRootCause() != null ) > { > realEx = ex.getRootCause(); > } > processException( realEx, "[ServletException in:"+ page+ "] " + > realEx.getMessage()+ "'" ); > } > catch (Exception ex) { > processException( ex, "[Exception in:" + page + "] "+ > ex.getMessage()); > } > > -Original Message- > From: Maya Muchnik [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, February 21, 2001 11:28 AM > To: [EMAIL PROTECTED] > Subject: Re: Struts, WebLogic 6.0 and template tags > > Hal, > Please give a code example with a component, when you cannot get an > exception. > And how it can be fix now. > Maya > > "Deadman, Hal" wrote: > > > I am using the components add-on and I like it but it shouldn't go into > the > > 1.0 release. It's too much code and has too much functionality to be > merged > > without some more review which will take time. One problem I have noticed > is > > that when a component is included the exceptions are caught which makes it > > difficult to have any kind of global error handler. That's an easy fix but > > merging the code will not be a trivial effort. > > > > Besides, there is no compelling reason to add it to struts now because > there > > is nothing to stop people using struts from also using the components > > framework. When it is added to struts there will probably be some re-work > > involved but it should be straightforward. > > > > Hal > >
RE: Struts, WebLogic 6.0 and template tags
I am using the components add-on and I like it but it shouldn't go into the 1.0 release. It's too much code and has too much functionality to be merged without some more review which will take time. One problem I have noticed is that when a component is included the exceptions are caught which makes it difficult to have any kind of global error handler. That's an easy fix but merging the code will not be a trivial effort. Besides, there is no compelling reason to add it to struts now because there is nothing to stop people using struts from also using the components framework. When it is added to struts there will probably be some re-work involved but it should be straightforward. Hal -Original Message- From: Maya Muchnik [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 21, 2001 10:48 AM To: [EMAIL PROTECTED] Subject: Re: Struts, WebLogic 6.0 and template tags Hello, Torsen, It is not an answer to your question. But I would like to use this email and ask the struts development team about compatibility template library and components library (http://www.lifl.fr/~dumoulin/components/). Components allow to define "instances" to reuse them with different parameter values. They have good examples how to use them for implementation. They do not have a "role" attribute yet. Both components and templates have a lot of common. Why not combine the best parts both of them and put under struts project before 1.0 release? "Beuck, Torsten" wrote: > Hi, we like to use Struts with Bea WLS 6.0 for a B2B application. Currently > I am developing a prototype and the first tests under Tomcat worked fine. I > used the Struts template tags for a page design with header, navigation menu > and content. An example: > > <%@ taglib uri='/WEB-INF/tlds/struts-template.tld' prefix='template' %> > > > > > > > >
Re: Struts, WebLogic 6.0 and template tags
My fault: I used a build from late December. Thanks a lot Hal!