RE: [OFF TOPIC] Book recommendations (J2EE, Struts, JUnit, EJB, Weblogic)
I think Linus' requirements are wrong. Books on J2EE patterns in general, and Core J2EE Patterns in particular, are not worth reading. Change the requirement to books that provide useful patterns for J2EE applications, and you get the answer you want, which is Fowler's Patterns of Enterprise Application Archectecture. Unit testing in Java sounds interesting. I too am in search of a WebLogic book. I have one on my desk, and have perused the Amazon comments. I plan to visit a bookshop later this week and buy one. I will try to post a review view once I have read one. Brendan -Original Message- From: Laurent PETIT [mailto:[EMAIL PROTECTED] Sent: Monday, August 04, 2003 4:06 AM To: Struts Users Mailing List Subject: Re: [OFF TOPIC] Book recommendations (J2EE, Struts, JUnit, EJB, Weblogic) Hello, I'm looking for a good book related to the Test first driven development area. I browsed the amazon customer reviews for the classical books on the subject (Kent Beck, ...) but was still afraid of something : are this book really connected to reality when you have to deal with real projects (what I mean here by real project could be : a web version of an enterprise application to deal with its products, employees, commercials, ..., not just a project to build an Euro converter or a bowling scorer (*), ... which does'nt really speak to me and prove to me that those techniques may scale well and prove benefits in my area of concern). I found one book that seems REALLY interesting on the subject : Unit testing in Java, by Johannes Link and Peter Frohlich. It seems to address topic as testing in web apps, with databases involved, asynchronous processes (do you know a recent application which doesn't have to send or receive emails in its requirements ? ...) But there are only 3 reviews on the book, the book itself is very young (April 2003), so I wonder if you folks in this mailing list have read it, and maybe may give us some other point of view ?? Thanks in advance, -- Laurent (*) : In fact, I really enjoyed the reading of the paper on the bowling scorer pair programming and TDD I found on the objectmentor website, but after reading it, one question still occurs to me : well, ok, but what in real projects, and with real programmers that aren't senior consultants of a brilliant society ? Linus Nikander [EMAIL PROTECTED] a écrit dans le message news: [EMAIL PROTECTED] Thank you for the reply. But I'm looking for books, not online articles or documentation. I know I can probably find book recommendations at the sites you point to, but I was trying to save myself the effort of searching for them and of evaluating their recommendations by posting to this group instead. //Linus Nikander message message [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] J2EE PATTERNS - www.JAVA.SUN.COM Struts - struts in action. JUNIT - Eclipse - free IDE comes with documenttion on JUNIT /www.junit.org EJB - www.JAVA.SUN.COM Weblogic - Weblogic saleman. From: Linus Nikander [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: [OFF TOPIC] Book recommendations (J2EE, Struts, JUnit, EJB, Weblogic) Date: Mon, 4 Aug 2003 11:24:17 +0200 Browsing peoples comments at amazon might be rewarding, but it sure takes a lot of time. I'm trying to find good (best) books for a couple of java-related areas. As most people who subscribe to this newsgroup probably have a bunch of books at home this should be the ideal place to ask for recommendations. So, what are your recommendations for good books on any/all of the following subjects: J2EE Patterns Struts JUnit (or testing in general, JUnit seems to be one of the most widely accepted, haven't seen a lot of books for it though) EJB (more interested in performance tuning, best practices etc, not EJB as a technology) Weblogic 7.x or 8.x (Administration, tuning, best practices for EJBs and enterprise solutions) All recommendations appreciated. //Linus Nikander - [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. http://join.msn.com/?page=features/virus - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Original Message - From: message message [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, August 04, 2003 10:56 AM Subject: Re: [OFF TOPIC] Book recommendations (J2EE, Struts, JUnit, EJB, Weblogic) Struts in Action is a book. Good luck with your specific requirements. From: Linus Nikander [EMAIL PROTECTED] Reply-To:
RE: Problems with Struts 1.1, html-el, and weblogic 6.1
I am using WebLogic 6.1 and struts I have not tried html-el. There are a few options for where you can put the libraries: 1. I have them in the lib directory under WEB-INF. 2. Another option is to put them in the classpath in startWebLogic. 3. The priority/treatment of classes can be changed by selecting PreferWebInfClasses=true in the web application tag in config.xml. It is likely that the way you compile your JSP's impacts how the class loaders are structured and therefore what classes can be found. We use weblogic.jspc to compile the JSP's before deployment. However JSP's currently recompile in production. Note also that I have had difficulties with the WebLogic jsp compiler, depending on service pack. I have a patch for service pack 5 to address difficulties. Here is the 1.1 release code: /** * Return the codeClass/code object for the specified fully qualified * class name, from this web application's class loader. * * @param className Fully qualified class name to be loaded * @return Class object * @exception ClassNotFoundException if the class cannot be found */ public static Class applicationClass(String className) throws ClassNotFoundException { // Look up the class loader to be used ClassLoader classLoader = Thread.currentThread().getContextClassLoader(); if (classLoader == null) { classLoader = RequestUtils.class.getClassLoader(); } // Attempt to load the specified class return (classLoader.loadClass(className)); } I wonder if the context class loader is not set in one of the two cases. You may want to use a debugger, or add some debug logs to find out. Since it works one way and not the other, you can guess that WebLogic is doing something different in each case, which to my mind is unexpected behavoir. Brendan -Original Message- From: Jarrod M. Lugo [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 29, 2003 12:38 PM To: [EMAIL PROTECTED] Apache. Org Subject: Problems with Struts 1.1, html-el, and weblogic 6.1 I have been running Struts 1.1 on WebLogic 6.1 with no problems (using both the html and html-el taglibs), until I tried to use the precompile option. If I have a page that uses the html taglib, the compilation works fine. But if I change the page to use the html-el taglib, I get this error. Any help would be greatly appreciated. Regards, Jarrod Lugo [ERROR] MessageResourcesFactory - -MessageResourcesFactory.createFactory java.lang.ClassNotFoundException: org.apache.struts.util.PropertyMessageResourcesFactoryjava.lang.ClassNotFou ndException: org.apache.struts.util.PropertyMessageResourcesFactory at java.net.URLClassLoader$1.run(URLClassLoader.java:195) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:183) at java.lang.ClassLoader.loadClass(ClassLoader.java:294) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:281) at java.lang.ClassLoader.loadClass(ClassLoader.java:250) at org.apache.struts.util.RequestUtils.applicationClass(RequestUtils.java:207) at org.apache.struts.util.MessageResourcesFactory.createFactory(MessageResource sFactory.java:192) at org.apache.struts.util.MessageResources.getMessageResources(MessageResources .java:576) at org.apache.struts.util.RequestUtils.clinit(RequestUtils.java:134) at org.apache.struts.util.MessageResourcesFactory.createFactory(MessageResource sFactory.java:192) at org.apache.struts.util.MessageResources.getMessageResources(MessageResources .java:576) at org.apache.struts.taglib.html.BaseTag.clinit(BaseTag.java:94) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:115) at org.apache.strutsel.taglib.html.ELBaseTagBeanInfo.class$(ELBaseTagBeanInfo.j ava:81) at org.apache.strutsel.taglib.html.ELBaseTagBeanInfo.getPropertyDescriptors(ELB aseTagBeanInfo.java:81) at java.beans.Introspector.getTargetPropertyInfo(Introspector.java:341) at java.beans.Introspector.getBeanInfo(Introspector.java:291) at java.beans.Introspector.getBeanInfo(Introspector.java:123) at weblogic.servlet.jsp.StandardTagLib.parseTagDD(StandardTagLib.java:1034) at weblogic.servlet.jsp.StandardTagLib.parseDD(StandardTagLib.java:972) at weblogic.servlet.jsp.StandardTagLib.init(StandardTagLib.java:207) at weblogic.servlet.jsp.JspLexer.loadTagLib(JspLexer.java:150) at weblogic.servlet.jsp.JspLexer.mTAGLIB_DIRECTIVE_BODY(JspLexer.java:4596) at weblogic.servlet.jsp.JspLexer.mTAGLIB_DIRECTIVE(JspLexer.java:4434) at weblogic.servlet.jsp.JspLexer.mDIRECTIVE(JspLexer.java:4281) at weblogic.servlet.jsp.JspLexer.mSTANDARD_THING(JspLexer.java:2167) at
RE: Prob:Calling a bean:write inside html:text - Nesting is nice
It would be nice if this: aTag anAtribute=aValue / Parsed the same as: aTag anAtributeaValue/anAttribute /aTag Failing that it would be nice if any tags with attribute also accepted nested tags with the same name and meaning as an alternative. Brendan -Original Message- From: Craig R. McClanahan [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 30, 2003 10:23 AM To: Struts Users Mailing List Cc: [EMAIL PROTECTED] Subject: RE: Prob:Calling a bean:write inside html:text On Wed, 30 Jul 2003, James Childers wrote: Date: Wed, 30 Jul 2003 11:35:53 -0500 From: James Childers [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED], [EMAIL PROTECTED] Subject: RE: Prob:Calling a bean:write inside html:text YOU CAN'T NEST TAGS. YOU CAN'T NEST TAGS. You, or anyone else, cannot nest tags. Tags cannot be nested. Nesting tags is prohibited. If you nest a tag inside another tag, the page won't compile. Nesting tags ist verbotten. Do not nest tags if you want your page to work. The following won't work: html:test property=bean:write property=something / / It is true that this won't work, but I would caution you that nesting tags actually means something different: html:form ... html:text .../ html:text .../ /html:form which is perfectly legitimate. A correct sentence describing what you cannot do is You cannot use one tag to create all or part of the attribute value of another tag. Craig - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[OT] RE: Prob:Calling a bean:write inside html:text - Nesting is nice
The JSTL authors decided that the value might need calculation to work it out, but that a pattern would not require other tags to determine. Were they right? Maybe, maybe not. If they adopted the approach I suggested, they would just have some extra busy work supporting nesting for everything, but they would not have to think about it, and would be 'right' everytime. The conceptual size of the tag would be smaller than the approach they took, because I would not need to look up the documentation to see which attributes could be tags. If the authors of XML took this approach, not only would the authors of JSTL not think have about it, but parsers would be simpler, and whole paragraphs wasted on what should be an attribute and what should be tag would be gone from the world. So my solution is simple, pretend that the authors of XML did take this approach. Brendan -Original Message- From: Steve Raeburn [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 30, 2003 11:28 AM To: Struts Users Mailing List Subject: RE: Prob:Calling a bean:write inside html:text - Nesting is nice Try JSTL. For example: fmt:parseDate var=aDate pattern=dd/MM/ value=26/12/1968 / is equivalent to: fmt:parseDate var=aDate pattern=dd/MM/ 26/12/1968 /fmt:parseDate The content of the second example can even be generated by nested tags. Steve -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: July 30, 2003 11:10 AM To: [EMAIL PROTECTED] Subject: RE: Prob:Calling a bean:write inside html:text - Nesting is nice It would be nice if this: aTag anAtribute=aValue / Parsed the same as: aTag anAtributeaValue/anAttribute /aTag Failing that it would be nice if any tags with attribute also accepted nested tags with the same name and meaning as an alternative. Brendan -Original Message- From: Craig R. McClanahan [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 30, 2003 10:23 AM To: Struts Users Mailing List Cc: [EMAIL PROTECTED] Subject: RE: Prob:Calling a bean:write inside html:text On Wed, 30 Jul 2003, James Childers wrote: Date: Wed, 30 Jul 2003 11:35:53 -0500 From: James Childers [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED], [EMAIL PROTECTED] Subject: RE: Prob:Calling a bean:write inside html:text YOU CAN'T NEST TAGS. YOU CAN'T NEST TAGS. You, or anyone else, cannot nest tags. Tags cannot be nested. Nesting tags is prohibited. If you nest a tag inside another tag, the page won't compile. Nesting tags ist verbotten. Do not nest tags if you want your page to work. The following won't work: html:test property=bean:write property=something / / It is true that this won't work, but I would caution you that nesting tags actually means something different: html:form ... html:text .../ html:text .../ /html:form which is perfectly legitimate. A correct sentence describing what you cannot do is You cannot use one tag to create all or part of the attribute value of another tag. Craig - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Memory consumption 1.1 b3 vs. 1.1 final
Is this an issue because the session is being serialized? Maybe the reference to the struts config needs to be declared transient and be restored if the object is deserialized. Brendan -Original Message- From: Craig R. McClanahan [mailto:[EMAIL PROTECTED] Sent: Monday, July 28, 2003 1:20 PM To: Struts Users Mailing List Subject: RE: Memory consumption 1.1 b3 vs. 1.1 final On Mon, 28 Jul 2003, Maya Retzlaff wrote: Date: Mon, 28 Jul 2003 21:19:19 +0200 From: Maya Retzlaff [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Subject: RE: Memory consumption 1.1 b3 vs. 1.1 final Hi, Unfortunate no one replied. But I'll try again with more information. After a bit more debugging, when using the debugger see screen shot. http://maya.retzlaff.se/debugScreenShot.png, sorry couldn't export to text. Its a bit censored. This means that the whole struts-config.xml (a HashMap with 127 elements) is saved in the session for every user when action scope=session is set in struts-config.xml. For us with the memory restrictions we face, the 50k that the strutsconfig takes in memory is very severe. Why are you assuming that the memory is being duplicated? All of the references point to the one-and-only copy of the actual Config instances, in the collection that was built when the configuration file was first parsed. Craig - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: html:form tag and coupling between ActionForm and Action
I don't think Daniel's idea will work. If the action form does not exist then struts wants to instantiate the form. Therefore struts needs to know the type. It might work if you have a session scope form already there. I think of actions as the most dependent class, i.e. nothing should depend on actions (no other classes should know anything about actions), actions should depend on everything (well not everything, but definitely the model and the view). Because they are such nasty beasts, (and because in struts they should have no state), they should be very small. Since they are so small the architecture that puts effort into making them generic and reusable may be misguided. Brendan -Original Message- From: Suzette Daniel [mailto:[EMAIL PROTECTED] Sent: Monday, July 21, 2003 9:41 AM To: 'Struts Users Mailing List' Subject: RE: html:form tag and coupling between ActionForm and Action I just wanted to add a little bit more to Alex's comment. 1.Create a form interface that represents your family of forms abstract class PersonForm extends ActionForm{ getFirstName(); getLastName(); getMiddleName(); } 2.Make your forms implement that interface 3.In your action cast ActionForm to your interface PersonProcessingAction extends Action { Person personForm = (PersonForm)form; String first = personForm.getFirstName(); } -Original Message- From: Alex Shneyderman [mailto:[EMAIL PROTECTED] Sent: Monday, July 21, 2003 12:31 PM To: 'Struts Users Mailing List' Subject: RE: html:form tag and coupling between ActionForm and Action What if you want to write an Action that can service a family of several different ActionForms?? You can do it. Just need to do it yourself (well sort of). Alex. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]