tags for Map creation for the html:link tag
I have created two tga-prototypes that permit to construct a Map-object that can be used to pass multiple link-parameters to the html:link tag. Instead of having to use scriptlets to build the Map like: . . . % java.util.HashMap linkParmMap = new java.util.HashMap(); linkParmMap.put(someName1, someValue1); pageContext.setAttribute(linkParmMap, linkParmMap); % . . . logic:iterate name=records id=recordId % linkParmMap.put(someName2, recordsId); % html:link action=/drillDown name=linkParmMap. . . /logic:iterate . . . I use this: . . . fjsstruts:linkMap id=myLinkMap fjsstruts:linkMapEntry name=myLinkMap entryKey=someName bean:write name=someValue / /fjsstruts:linkMapEntry logic:iterate name=records id=recordId fjsstruts:linkMapEntry name=myLinkMap entryKey=someName2 bean:write name=recordId / /fjsstruts:linkMapEntry html:link action=/drillDown name=myLinkMap bean:write name=recordId / /html:link /logic:iterate /fjsstruts:linkMap . . . If there is interest I will finylize those tags and make them available. I think I would slightly remodel them to make them similar to the JSTL tags... regards Alexander - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How to use struts for multiple records..
Hi, one way is to create a DTO for each record and populate a collection with these DTO-objects in the Action (after having made the sql-call) by copying the result-set-records into single DTO-objects. In the JSP you then have on of the standard cases for struts: Transform a collection with DTO's into a view. (logic:iterate and bean:write are the tags to use...) hope this helps Alexander Jesse -Original Message- From: vasudevrao gupta [mailto:[EMAIL PROTECTED] Sent: Donnerstag, 4. Dezember 2003 11:07 To: 'Struts Users Mailing List' Subject: How to use struts for multiple records.. Hi All, I have a search page through which the user will enter the search criteria.I constructed an ActionForm to hold the search criteria.In the Action class, I populate the values of Action Form in a DTO object and pass it my business service class.Business service class calls the Data Access object which make a database query and gives me a result set containing multiple records and each record contains multiple attribute. Now, can anyone please suggest me on how to display these records in a simpler way using struts. Regards VasudevRao Gupta Confidentiality Notice The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain confidential or privileged information. If you are not the intended recipient, please notify the sender at Wipro or [EMAIL PROTECTED] immediately and destroy all copies of this message and any attachments. - 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: [OT] Re: Printing PDF Files in java
Are you definitely sure you want to tdo this? Better is to show the PDF (download it to the user) and let the browser and os of the client do the nasty job of rendering and printing... hth Alexander -Original Message- From: Prashanth.S [mailto:[EMAIL PROTECTED] Sent: Donnerstag, 4. Dezember 2003 13:37 To: Struts Users Mailing List Subject: Re: [OT] Re: Printing PDF Files in java try pjx third party toolbut i still havent got the answer for printing pdf files in java:(( Rouven Gehm [EMAIL PROTECTED] wrote: BTW what is a good tool, to create PDF with Java ? Thanx Rouven - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Do you Yahoo!? Free Pop-Up Blocker - Get it now - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [OT] Struts Wiki?
Somehow I remotly record having seen some messages about a struts based wiki-system... a few searches on the net revealed Chiki (http://chiki.sourceforge.net) and this mailing-list message: http://www.mail-archive.com/struts-user@jakarta.apache.org/msg25888.html At some moment I think it was discussed to set up a Struts chiki... Anyway if somebody sets up a wiki for struts it could be a chiki... (eat your own food...) regards Alexander -Original Message- From: Cliff Rowley [mailto:[EMAIL PROTECTED]] Sent: Montag, 16. September 2002 20:03 To: Struts Users Mailing List Subject: RE: [OT] Struts Wiki? That would be great. I have ample hosting, but as yet no Java support. I'd like to hear if anyone is doing something similar first before I spend hours trawling the archives categorizing stuff. If someone has already taken this on, perhaps we could combine efforts. On Mon, 2002-09-16 at 18:59, Kevin A. Smith wrote: If it would be useful, I can donate hosting space. . . -Original Message- From: Cliff Rowley [mailto:[EMAIL PROTECTED]] Sent: Monday, September 16, 2002 1:58 PM To: [EMAIL PROTECTED] Subject: [OT] Struts Wiki? There seems to be a trend of common Struts related pitfalls (not necessarily the fault of Struts itself), and I was wondering if anyone has taken the time to document these for easier lookup, rather than resorting to searching the list archives. If not, I'll probably take it on as a extra-curricular task at some point in the near future to set up a wiki type thing whereby these pitfalls can be documented and categorized. I'm talking about things like the old redirect=false vs redirect=true to carry through request parameters etc. If anyone has such a resource already available, please shout so I don't duplicate effort :) -- Regards --- Cliff Rowley| [EMAIL PROTECTED] Software Engineer | www.doctype.co.uk +44 (0) 1206 514263 | www.cliffrowley.com --- -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- Regards --- Cliff Rowley| [EMAIL PROTECTED] Software Engineer | www.doctype.co.uk +44 (0) 1206 514263 | www.cliffrowley.com --- -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: [Off Topic] File Changed Listener?
To go even more geek: use JMX (ManagedBeans...) regards Alexander -Original Message- From: Tero P Paananen [mailto:[EMAIL PROTECTED]] Sent: Mittwoch, 4. September 2002 20:07 To: Struts Users Mailing List Subject: RE: [Off Topic] File Changed Listener? I am working on a project where we have two webapps, one is a admin app, the other is for users. Both are developed in Struts. The users app loads configuration settings from an XML file at startup and puts a bean into the application's scope. The admin app has an interface to change this file and save the XML file. So is it possible to develop a File Listener that notifies the user app when this file as changed, so I can reload it? If not, how would you experts recommend accomplishing this? Maybe the admin app calls a servlet to reload the Configuration servlet? Have the admin app notify the user app of the change: * with JMS (or any other type of) messaging * by changing a database flag that the user app monitors with a scheduled job or on-demand whenever the settings are used, which ever way is better for your app * by calling a servlet / web service / CGI / whatever on the user app Or have the user app poll the file for changes with a scheduled task. I'd use JMS, cause I'm a geek and I want to play with cool technology and I haven't done that before :) Use the approach you're most familiar with, can implement within the constraints of your project schedule/cost and know that other developers can maintain when you leave. -TPP -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: [BEER] Is it Friday Yet?
possiamo anche continuare in italiano se preferite (we can also continue in Italian if you like that better) -Original Message- From: Jerry Jalenak [mailto:[EMAIL PROTECTED]] Sent: Donnerstag, 29. August 2002 21:52 To: 'Struts Users Mailing List' Subject: RE: [BEER] Is it Friday Yet? God, let's hope not. :-) -Original Message- From: Desjardins, Nicolas [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 29, 2002 2:43 PM To: 'Struts Users Mailing List' Subject: RE: [BEER] Is it Friday Yet? la liste s'est transformée en liste francophone??? :o) -Original Message- From: Galbreath, Mark [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 29, 2002 3:34 PM To: 'Struts Users Mailing List' Subject: RE: [BEER] Is it Friday Yet? Mon dieu! J'espère pas! -Original Message- From: James Mitchell [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 29, 2002 3:28 PM Mais vous reviendrez samedi à la finition ce que vous avez négligé. James Mitchell Software Engineer\Struts Evangelist Struts-Atlanta, the Open Minded Developer Network http://www.open-tools.org/struts-atlanta -Original Message- From: Galbreath, Mark [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 29, 2002 3:18 PM To: 'Struts Users Mailing List' Subject: RE: [BEER] Is it Friday Yet? Je pars du bureau tot pour obtenir une biere. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 29, 2002 2:21 PM Can we have a [Mark] tag added? +1 -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] This transmission (and any information attached to it) may be confidential and is intended solely for the use of the individual or entity to which it is addressed. If you are not the intended recipient or the person responsible for delivering the transmission to the intended recipient, be advised that you have received this transmission in error and that any use, dissemination, forwarding, printing, or copying of this information is strictly prohibited. If you have received this transmission in error, please immediately notify LabOne at (800)388-4675. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: [BEER] Is it Friday Yet?
Maybe we should ask those using "strange" fonts or languages to supply also a understable translation. Davayte nachnem pisat po-russki (Let's start to use russian) -Original Message- From: Joel Rees [mailto:[EMAIL PROTECTED]] Sent: Freitag, 30. August 2002 06:53 To: Struts Users Mailing List Subject: Re: [BEER] Is it Friday Yet? $B;d$OF|K\8l$rA~$`(J! $BIT?.?4
RE: [BEER ] Is it Friday Yet?
That's just to encourage you to learn a new 3D-language (language usefull for 3D(imensional)-contacts (== real-life). I mean English, Français, Italiano, Deutsch, Espanol and maybe Russki should be considered the minimal survival kit nowadays... salue -Original Message- From: Tim T. Young [mailto:[EMAIL PROTECTED]] Sent: Donnerstag, 29. August 2002 21:45 To: Struts Users Mailing List Subject: RE: [BEER ] Is it Friday Yet? Common guys, keeping up is hard enough without having to babelfish everything! Galbreath, Mark Galbreath@te ssco.com 08/29/2002To: 'Struts Users Mailing List' [EMAIL PROTECTED] 02:33 PM cc: Please respond to Struts Users Mailing ListSubject: RE: [BEER] Is it Friday Yet? Caterpillar: Confidential Green Retain Until: 09/28/2002 Retention Category: G90 - Information and Reports Mon dieu! J'espère pas! -Original Message- From: James Mitchell [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 29, 2002 3:28 PM Mais vous reviendrez samedi à la finition ce que vous avez négligé. James Mitchell Software Engineer\Struts Evangelist Struts-Atlanta, the Open Minded Developer Network http://www.open-tools.org/struts-atlanta -Original Message- From: Galbreath, Mark [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 29, 2002 3:18 PM To: 'Struts Users Mailing List' Subject: RE: [BEER] Is it Friday Yet? Je pars du bureau tot pour obtenir une biere. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 29, 2002 2:21 PM Can we have a [Mark] tag added? +1 -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Using Struts in Weblogic Eclipse
Use remote-debugging. Simply add the remote debugging parameters to WLS-startup, configure remote-debugging in Eclipse and go ahead... hth Alexander -Original Message- From: Madhavan Srinivasan [mailto:[EMAIL PROTECTED]] Sent: Donnerstag, 29. August 2002 22:12 To: Struts Users Mailing List Subject: Using Struts in Weblogic Eclipse Friends I use weblogic 7.0 and eclipse 2.0. I try to integrate struts sample app with weblogic and eclipse. I installed easie weblogic plugin to eclipse, so I could start weblogic server from eclipse. Now I want to debug the web application of the weblogic server instance thru eclipse IDE. If there is anybody have the procedures please inform me. Thanks Madhavan -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: [BEER] Is it Friday Yet?
Well, at least your problem is easier to fix... -Original Message- From: Andrew Hill [mailto:[EMAIL PROTECTED]] Sent: Freitag, 30. August 2002 09:19 To: Struts Users Mailing List Subject: RE: [BEER] Is it Friday Yet? 3pm and Ive had too little... -Original Message- From: Jacob Hookom [mailto:[EMAIL PROTECTED]] Sent: Friday, August 30, 2002 15:12 To: 'Struts Users Mailing List' Subject: RE: [BEER] Is it Friday Yet? It's Friday... 2am and I've had too much beer... so no 'italiano'. | -Original Message- | From: Jesse Alexander (KADA 11) [mailto:[EMAIL PROTECTED]] | Sent: Friday, August 30, 2002 1:59 AM | To: 'Struts Users Mailing List' | Subject: RE: [BEER] Is it Friday Yet? | | possiamo anche continuare in italiano se preferite | (we can also continue in Italian if you like that better) | | | | -Original Message- | From: Jerry Jalenak [mailto:[EMAIL PROTECTED]] | Sent: Donnerstag, 29. August 2002 21:52 | To: 'Struts Users Mailing List' | Subject: RE: [BEER] Is it Friday Yet? | | | God, let's hope not. :-) | | -Original Message- | From: Desjardins, Nicolas [mailto:[EMAIL PROTECTED]] | Sent: Thursday, August 29, 2002 2:43 PM | To: 'Struts Users Mailing List' | Subject: RE: [BEER] Is it Friday Yet? | | | la liste s'est transformée en liste francophone??? :o) | | -Original Message- | From: Galbreath, Mark [mailto:[EMAIL PROTECTED]] | Sent: Thursday, August 29, 2002 3:34 PM | To: 'Struts Users Mailing List' | Subject: RE: [BEER] Is it Friday Yet? | | | Mon dieu! J'espère pas! | | -Original Message- | From: James Mitchell [mailto:[EMAIL PROTECTED]] | Sent: Thursday, August 29, 2002 3:28 PM | | Mais vous reviendrez samedi à la finition ce que vous avez négligé. | | James Mitchell | Software Engineer\Struts Evangelist | Struts-Atlanta, the Open Minded Developer Network | http://www.open-tools.org/struts-atlanta | | | | | -Original Message- | From: Galbreath, Mark [mailto:[EMAIL PROTECTED]] | Sent: Thursday, August 29, 2002 3:18 PM | To: 'Struts Users Mailing List' | Subject: RE: [BEER] Is it Friday Yet? | | | Je pars du bureau tot pour obtenir une biere. | | -Original Message- | From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] | Sent: Thursday, August 29, 2002 2:21 PM | | Can we have a [Mark] tag added? | +1 | | -- | To unsubscribe, e-mail: | mailto:[EMAIL PROTECTED] | For additional commands, e-mail: | mailto:[EMAIL PROTECTED] | | | | | -- | To unsubscribe, e-mail: | mailto:[EMAIL PROTECTED] | For additional commands, e-mail: | mailto:[EMAIL PROTECTED] | | | -- | To unsubscribe, e-mail: | mailto:[EMAIL PROTECTED] | For additional commands, e-mail: | mailto:[EMAIL PROTECTED] | | | | -- | To unsubscribe, e-mail: | mailto:[EMAIL PROTECTED] | For additional commands, e-mail: | mailto:[EMAIL PROTECTED] | | | | This transmission (and any information attached to it) may be confidential | and is intended solely for the use of the individual or entity to which it | is addressed. If you are not the intended recipient or the person | responsible for delivering the transmission to the intended recipient, be | advised that you have received this transmission in error and that any | use, dissemination, forwarding, printing, or copying of this information | is strictly prohibited. If you have received this transmission in error, | please immediately notify LabOne at (800)388-4675. | | | | -- | To unsubscribe, e-mail: mailto:struts-user- | [EMAIL PROTECTED] | For additional commands, e-mail: mailto:struts-user- | [EMAIL PROTECTED] | | -- | To unsubscribe, e-mail: mailto:struts-user- | [EMAIL PROTECTED] | For additional commands, e-mail: mailto:struts-user- | [EMAIL PROTECTED] | | --- | Incoming mail is certified Virus Free. | Checked by AVG anti-virus system (http://www.grisoft.com). | Version: 6.0.381 / Virus Database: 214 - Release Date: 8/2/2002 | --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.381 / Virus Database: 214 - Release Date: 8/2/2002 -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: [Friday OT] using O/R mapping tools
As in never trust a statistic paper you have not forged yourself? Alexander -Original Message- From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]] Sent: Freitag, 23. August 2002 22:25 To: Struts Users Mailing List Subject: RE: [Friday OT] using O/R mapping tools On Fri, 23 Aug 2002, Galbreath, Mark wrote: Date: Fri, 23 Aug 2002 15:34:17 -0400 From: Galbreath, Mark [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Subject: RE: [Friday OT] using O/R mapping tools Amen to that, Melissa! Just look at how the media has abused the term hacker over the years. I'm a hacker, not a cracker nor a phreaker. To justify something because the media says it's so is the worst argument in the world! To say nothing of what they do with the output of mathematicians and statisticians :-) Mark Craig -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Struts Community is going crazy! :-))
Is there a description, dtd or schema for the documentations? regards Alexander -Original Message- From: Ted Husted [mailto:[EMAIL PROTECTED]] Sent: Montag, 19. August 2002 13:08 To: Struts Users Mailing List Subject: Re: Struts Community is going crazy! :-)) Contributing to the documentation isn't any different than contributing to the codebase. Just figure out where it should go and submit a patch or enhancement request through bugzilla. A list of which classes must be extended and which can be used as-is (whitebox vs blackbox) could be handled in the newbie FAQ. Or we could add a new section to the User Guide. The catalog document on my site is in HTML right now, but if someone converted that to XML, we could move that over to the Struts site and expand on that. Whoever does the work gets to make the decision. There is also a lot of material that can be mined from the list. For example, Craig posted some nice material on populating ActionForms on the Dev list last week. If someone took that material, poured it into XML, and submitted it to Bugzilla, we'd be on our way to a patterns document. As a rule, 90% of anything Craig posts is a FAQ waiting to happen. Someone just needs to take the initiative to convert the exchange to a documentation entry. Patches to the Javdocs are also welcome. The Struts Javadocs are a wealth of detail and should be considered the primary source of information. Moving forward, I'd like to expand on the Developers Guides http://jakarta.apache.org/struts/doc-1.0.2/api/org/apache/struts/taglib/bean/package-summary.html#package_description as a replacement for the User Guide. We can then use FAQs and working examples http://sourceforge.net/projects/struts to fill in the blanks. As it stands, maintaining details in the User Guide and in the Javadocs is becoming a maintenance burden, and the Developer Guides model seems like a better way to go. One thing to keep in mind is that Struts grew in the telling. There are many places where the evolution of the codebase has caused functionality to overlap. Someone realizes something is too hard to do and so they introduce an easier way to do it. But since many people have already done it the hard way, we can't change the old t way without breaking a lot of code. The 1.1 codebase would be much simplier if not for the 1.0 compatibility issues. But we can't desert all the 1.0 production applications on a point release and so we have to deal with the legacy issues. -Ted. Phase Web and Multimedia wrote: Ted, I totally dig your catalog and i have been examining Artimus. Stellar piece of work btw. I would love to receive more clarity towards which classes are best extended for what functions. For example, there are things that i can do in an Action class that can also be done in a RequestProcessor. But for portability, plugability and efficiency which is the best to extend for what. Also, it would be good to list which classes are made to be extended. There are four main ones that I can think of off the top of my head... RequestProcessor, Form, Action and ActionServlet. I would be totally willing to provide some pattern docs, but i am afraid my design patterns would be weak in comparison to what you have assembled in catalog. I would also be totally willing to receive various design patterns from people out there that are using struts and assemble them into xml. It would both educate me and give me an opportunity to give back to a project that has provided so much. Anyways, where do i sign-up and what are the qualifications? Brandon Goodin Phase Web and Multimedia P (406) 862-2245 F (406) 862-0354 [EMAIL PROTECTED] http://www.phase.ws -Original Message- From: Ted Husted [mailto:[EMAIL PROTECTED]] Sent: Sunday, August 18, 2002 7:41 PM To: Struts Users Mailing List Subject: Re: Struts Community is going crazy! :-)) If anyone wants to start writing up patterns and submitting them to the project (preferably in XML), I'd be happy to shepard them into the documentation. But someone has to be willling to do the work. This is an open source project, and everyone who uses Struts is part of the team. We don't take your money, but we will take your contributions =:0) If anyone is in the mood to help with the documentation, but isn't up for cataloging patterns, there are a number of 1.1 sections still marked [:TODO:]. There are also still a number of open questions on the newbie FAQ. http://jakarta.apache.org/struts/newbie.html -Ted. Phase Web and Multimedia wrote: I have seen so many extensions and ideas being developed around struts. One of the things that I have noticed is that there are a lot of different apporaches being taken towards using Struts. In my own conversations with colleagues I have found that there is a fair amount of confusion mounting over proper design patterns within and extending struts. I don't know if there is a base set of suggested patterns that have been
RE: Initialisation
Hi, I usually recommend to program the Application-Scope beans as lazy-initializing. In this way only the necessary data is prepared. Doing it in the init()-method can be usefull. BUT: In our company we had the case that a web-app could never be started, because of a init()-method taking too long. A control-mechanism (robot user) that should check whether the application was running decided that the application was dead and restarted the server... The solution was not to use the init()-method to initialize application-scope data (the whole method took more than 10 minutes getting lots of common data using a corba-service). Reading up on the spec teached us, that during the init()-method of a servlet no other request can be handled by the servlet-engines. If only it would be possible to specify a non-blocking secondary init-phase. But that discussion belongs to the servlet-spec discussions... just my 2cents Alexander -Original Message- From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]] Sent: Donnerstag, 15. August 2002 17:36 To: Struts Users Mailing List Subject: Re: Initialisation On Thu, 15 Aug 2002, Howard Miller wrote: Date: Thu, 15 Aug 2002 14:50:46 +0100 From: Howard Miller [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: '[EMAIL PROTECTED]' [EMAIL PROTECTED] Subject: Initialisation Errr... stupid newbie question coming up. If I want to create objects in the Application Scope the design notes for Struts says application scope beans are initialized in the init() method of a startup servlet. Well, they *can* be done there, and it's very common. But this is not the only choice. Application scope attributes can be created at any time. But, and I'm sure I'm missing something here, I haven't got an init() method because the servlet belongs to Struts. So where do I put my innitialisation code? In Struts 1.0.x, the common pattern is to subclass ActionServlet and override the init() method for this kind of thing: public class MyActionServlet extends ActionServlet { public void init() throws ServletException { // Perform standard Struts initialization super.init(); // Perform my extra initializations ... } } In Struts 1.1, you have the additional option of creating a PlugIn implementation and registering it in your struts-config.xml file. A PlugIn has init() and destroy() methods very similar to a servlet, and are called at startup and shutdown times as you would expect. You can have as many PlugIn instances as you need. The struts-example webapp in 1.1 uses a PlugIn to set up and shut down its pseudo-database. Take a look at the included sources to get an idea of how it all fits together. I noticed plugins in earlier posts, but there isn't any documentation that I can find - is this what I'm looking for? Sounds like a fundamental thing to want to do, which is why I'm sure I'm missing something really obvious! Cheers... Howard Craig -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: using form-tag in iteration
Hi, an easy way is to put each list-item in its own form. With your setup is it impossible to get more than product at a time...So you can use multiple forms. hope this helps Alexander -Original Message- From: Albrecht Berger [mailto:[EMAIL PROTECTED]] Sent: Montag, 15. Juli 2002 12:33 To: Struts Users Mailing List Subject: using form-tag in iteration Hello, I want to implement a shoppingcart using the struts html:form tag and logic:iterate. In my JSP I have a List of products where every product should have its own text input field for the quantity and its own submit button. What would you recommend to solve this problem ? Thx berger -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Problem with session ojects: memory size, updates
Hi Sandra, Value-Objects are less than an EJB. Value-Objects are just data-transporting objects. They contain only attributes (obviously with setter- and getter-), but no other methods. EJB's have a whole lot of additional functionality in them. VO's are (usually) easily serializable. hope this helps Alexander -Original Message- From: Heligon Sandra [mailto:[EMAIL PROTECTED]] Sent: Dienstag, 16. Juli 2002 17:37 To: 'Struts Users Mailing List' Subject: RE: Problem with session ojects: memory size, updates I read Value Object pattern on J2EE design pattern http://java.sun.com/blueprints/patterns/j2ee_patterns/catalog.html. I understood that JavaBean are an implementation of ValueObjects. a value object represents a business object, but it doesn't need to provide business methods on top of its data; it only provides methods to read its data, which makes it an ideal candidate for local access rather than remote access. So I don't understand your remark Another possible solution is to create Value Objects and serialize them. Did you want to say that EJB is a solution? Because we don't want to work with EJB. In my architecture I get data from an enterprise back-end system and then Action class create Value Objects(JavaBean) if the object required doesn't exist. If I need to update data on the back-end server, then a manager is in charge of serializing and sending JavaBean across the Network. But to maintain user information (JavaBeans) over multiple requests and pass data between Action and JSP I need to store ValueObject in a cache(session or request scope). Could you detail please why ValueObejct serialization can be a solution to session size growth ? Thanks a lot in advance -Original Message- From: Manish_Purang [mailto:[EMAIL PROTECTED]] Sent: 16 July 2002 07:31 To: Struts Users Mailing List Subject: RE: Problem with session ojects: memory size, updates hi, Maybe you could take a look at any of the ejb or java bean design pattern books to get an exhaustive idea about the value objects ..! you can download one free pdf version from the serverisde.com-- (Ejb Design patterns by Floyd Marinescu ) Rgds -Original Message- From: Heligon Sandra [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 16, 2002 10:52 AM To: 'Struts Users Mailing List' Subject: RE: Problem with session ojects: memory size, updates Perhaps my question is stupid but I am not sure to know the Value object notion well. Could you give more details about Value Objects? What is the difference between JavaBean and ValueObject(or Data Transfer Object also I believe)? Value objects are shared by the web and the back-end tier. Thanks Sandra -Original Message- From: Dave Hodson [mailto:[EMAIL PROTECTED]] Sent: 16 July 2002 00:38 To: Struts Users Mailing List Subject: RE: Problem with session ojects: memory size, updates Another possible solution is to create Value Objects and serialize them... Dave --- Dave Hodson MessageCast, inc. Email: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] www.messagecast.net -Original Message- From: Jesse Alexander (KADA 11) [mailto:[EMAIL PROTECTED]] Sent: Sunday, July 14, 2002 10:56 PM To: Struts Users Mailing List Subject: RE: Problem with session ojects: memory size, updates Hi Sandra, I prefer to remove the objects from the session as soon as I can declare that they are not usefull anymore. EG.: In action_1 I build a model-object, use it in jsp_1 and process the users action in action_2. If the usecase is finished here, I remove the object from the session. As for session size: The 4kB recommendation comes from servers that support clustering. Because the session must be propagated to all members of the cluster, it should be kept as small as possible. We have a few application running with substantial numbers of concurrent users that can have up several megabytes of session-data. If the usecase needs it, do it. Often we have the case that a few users need lots of session data, and most users just a few bytes... Ok for us session-data is used, because our persistance level is on a CORBA-backend host and we have no jdbc on our midrange. Therefor we calculate it is cheaper to a few Gig of memory to our servers in order to save on network-data-transfer. hope this helps Alexander -Original Message- From: Heligon Sandra [mailto:[EMAIL PROTECTED]] Sent: Freitag, 12. Juli 2002 13:11 To: 'Struts Users Mailing List' Subject: RE: Problem with session ojects: memory size, updates Importance: High Thanks John for your response, I have already read the message http://www.mail-archive.com/struts-user@jakarta.apache.org/msg 34592.html but I would like to have more details with real examples. I believe that the best way is to try. I read that objects in the session must be removed unlike the request objects. Is it good to do that when the application invalidates the session ?. Because we save
RE: Latest Nightly build - corrupt Class-Path entry in manifest.m f
Hi, I think somebody with deeper knowledge about the internals must look into it. Either the problem is, that the documentation is out-of-date (maybe today it is not necessary to split the class-path-entry anymore), or it is a problem of the class-loaders used in the servlet-engines (WLS accepts Class-path-entries that are up to 120+ characters line-length). Maybe somebody working on Tomcat (or at least knowing its code-base a bit) can enlighten us more on this... Meaning it might make sense to push BEA to check their class-loader and encourage somebody to take a look at the spec's and class-loaders on the Apache-side == open a problem at BEA and open a bug-report in BugZilla regards Alexander -Original Message- From: Jon.Ridgway [mailto:[EMAIL PROTECTED]] Sent: Dienstag, 16. Juli 2002 16:17 To: 'Struts Users Mailing List' Subject: RE: Latest Nightly build - corrupt Class-Path entry in manifest.m f Hi James, I may have jumped the gun here; someone else has pointed out that the Class-Path entry should break to a new line after 68 chars. It's just that WebLogic 6.1 (not sure about 7) can't handle this. So I guess I should eat some humble pie and WebLogic should sort things out at their end... Jon Ridgway -Original Message- From: James Holmes [mailto:[EMAIL PROTECTED]] Sent: 16 July 2002 15:09 To: Struts Users Mailing List Subject: RE: Latest Nightly build - corrupt Class-Path entry in manifest.m f This probably started happening as of nightly build 20020616 since that is when the Class-Path: entry got added to the MANIFEST.MF file in CVS. If you open a bug for this in Bugzilla I'll get it taken care of tonight. Make sure to include all the info from this thread. http://nagoya.apache.org/bugzilla -james [EMAIL PROTECTED] http://www.jamesholmes.com/struts/ --- Jesse Alexander (KADA 11) [EMAIL PROTECTED] wrote: Good and thanks for searching it, the problem with the manifest.mf and the class-path is, that according to the official docs the class-path-manifest-entry MUST be split at the 68th character and that theoretically it should be reassembled on the fly. Relaity shows that some servlet-engines (or is the JVM's or the class-loaders; I don't know) do not make it correctly. And at least WLS (or its class-loaders or the underlaying JVM's) is among the problematic issues. Alexander Jesse -Original Message- From: Jon.Ridgway [mailto:[EMAIL PROTECTED]] Sent: Dienstag, 16. Juli 2002 13:17 To: 'Struts Users Mailing List' Subject: RE: Latest Nightly build - corrupt Class-Path entry in manifest.m f Hi All, The advice was spot on. The manifest.mf in the latest nightly builds is corrupt. The Class-Path entry is split over several lines, the break occurs half way through several referenced jar names. Jon Ridgway -Original Message- From: Jon.Ridgway [mailto:[EMAIL PROTECTED]] Sent: 16 July 2002 12:08 To: 'Struts Users Mailing List' Subject: RE: Latest Nightly build Hi Jesse, I'll give that ago and let you know what the problem is if I can track it down, thanks for the advice... Jon Ridgway -Original Message- From: Jesse Alexander (KADA 11) [mailto:[EMAIL PROTECTED]] Sent: 16 July 2002 11:52 To: 'Struts Users Mailing List' Subject: RE: Latest Nightly build Hi, try to remove the manifest-file from the struts.jar. WLS is very precise... If you have lots of time, then you could try to remove line by line from the manifest-file if step one yields a workable jar-file, until you find the true culprit... hope this helps Alexander -Original Message- From: Jon.Ridgway [mailto:[EMAIL PROTECTED]] Sent: Dienstag, 16. Juli 2002 12:40 To: '[EMAIL PROTECTED]' Subject: Latest Nightly build Hi All, Further to my previous post I have just enabled all debugging/logging in Struts/WebLogic and download the very latest build. I'm still getting an exception when attempting to deploy a web app that works fine with the 1.1b1 release. The exception is : 16-Jul-02 11:33:25 BST Debug HTTP Exception thrown while loading spf: java.lang.StringIndexOutOfBoundsException: String index out of range: -1 java.lang.StringIndexOutOfBoundsException: String index out of range: -1 at java.lang.String.substring(String.java:1525) at weblogic.utils.jars.ManifestEntry.stream(ManifestEntry.java:166) at weblogic.utils.jars.Manifest.stream(Manifest.java:78) at weblogic.servlet.internal.WebAppHelper.resolveManifestName(WebAppHelper.java :398) etc.. This is caused by something in struts.jar. If I replace the jar with the 1.1b1 jar the app deploys. Any ideas, suggestions much appreciated. Jon Ridgway The contents of this email are intended only for the named addressees and may contain confidential and/or privileged material. If received in error please contact UPCO on +44 (0) 113 201 0600 and then delete the entire e
RE: Latest Nightly build
Hi, try to remove the manifest-file from the struts.jar. WLS is very precise... If you have lots of time, then you could try to remove line by line from the manifest-file if step one yields a workable jar-file, until you find the true culprit... hope this helps Alexander -Original Message- From: Jon.Ridgway [mailto:[EMAIL PROTECTED]] Sent: Dienstag, 16. Juli 2002 12:40 To: '[EMAIL PROTECTED]' Subject: Latest Nightly build Hi All, Further to my previous post I have just enabled all debugging/logging in Struts/WebLogic and download the very latest build. I'm still getting an exception when attempting to deploy a web app that works fine with the 1.1b1 release. The exception is : 16-Jul-02 11:33:25 BST Debug HTTP Exception thrown while loading spf: java.lang.StringIndexOutOfBoundsException: String index out of range: -1 java.lang.StringIndexOutOfBoundsException: String index out of range: -1 at java.lang.String.substring(String.java:1525) at weblogic.utils.jars.ManifestEntry.stream(ManifestEntry.java:166) at weblogic.utils.jars.Manifest.stream(Manifest.java:78) at weblogic.servlet.internal.WebAppHelper.resolveManifestName(WebAppHelper.java :398) etc.. This is caused by something in struts.jar. If I replace the jar with the 1.1b1 jar the app deploys. Any ideas, suggestions much appreciated. Jon Ridgway The contents of this email are intended only for the named addressees and may contain confidential and/or privileged material. If received in error please contact UPCO on +44 (0) 113 201 0600 and then delete the entire e-mail from your system. Unauthorised review, distribution, disclosure or other use of this information could constitute a breach of confidence. Your co-operation in this matter is greatly appreciated. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Latest Nightly build - corrupt Class-Path entry in manifest.m f
Good and thanks for searching it, the problem with the manifest.mf and the class-path is, that according to the official docs the class-path-manifest-entry MUST be split at the 68th character and that theoretically it should be reassembled on the fly. Relaity shows that some servlet-engines (or is the JVM's or the class-loaders; I don't know) do not make it correctly. And at least WLS (or its class-loaders or the underlaying JVM's) is among the problematic issues. Alexander Jesse -Original Message- From: Jon.Ridgway [mailto:[EMAIL PROTECTED]] Sent: Dienstag, 16. Juli 2002 13:17 To: 'Struts Users Mailing List' Subject: RE: Latest Nightly build - corrupt Class-Path entry in manifest.m f Hi All, The advice was spot on. The manifest.mf in the latest nightly builds is corrupt. The Class-Path entry is split over several lines, the break occurs half way through several referenced jar names. Jon Ridgway -Original Message- From: Jon.Ridgway [mailto:[EMAIL PROTECTED]] Sent: 16 July 2002 12:08 To: 'Struts Users Mailing List' Subject: RE: Latest Nightly build Hi Jesse, I'll give that ago and let you know what the problem is if I can track it down, thanks for the advice... Jon Ridgway -Original Message- From: Jesse Alexander (KADA 11) [mailto:[EMAIL PROTECTED]] Sent: 16 July 2002 11:52 To: 'Struts Users Mailing List' Subject: RE: Latest Nightly build Hi, try to remove the manifest-file from the struts.jar. WLS is very precise... If you have lots of time, then you could try to remove line by line from the manifest-file if step one yields a workable jar-file, until you find the true culprit... hope this helps Alexander -Original Message- From: Jon.Ridgway [mailto:[EMAIL PROTECTED]] Sent: Dienstag, 16. Juli 2002 12:40 To: '[EMAIL PROTECTED]' Subject: Latest Nightly build Hi All, Further to my previous post I have just enabled all debugging/logging in Struts/WebLogic and download the very latest build. I'm still getting an exception when attempting to deploy a web app that works fine with the 1.1b1 release. The exception is : 16-Jul-02 11:33:25 BST Debug HTTP Exception thrown while loading spf: java.lang.StringIndexOutOfBoundsException: String index out of range: -1 java.lang.StringIndexOutOfBoundsException: String index out of range: -1 at java.lang.String.substring(String.java:1525) at weblogic.utils.jars.ManifestEntry.stream(ManifestEntry.java:166) at weblogic.utils.jars.Manifest.stream(Manifest.java:78) at weblogic.servlet.internal.WebAppHelper.resolveManifestName(WebAppHelper.java :398) etc.. This is caused by something in struts.jar. If I replace the jar with the 1.1b1 jar the app deploys. Any ideas, suggestions much appreciated. Jon Ridgway The contents of this email are intended only for the named addressees and may contain confidential and/or privileged material. If received in error please contact UPCO on +44 (0) 113 201 0600 and then delete the entire e-mail from your system. Unauthorised review, distribution, disclosure or other use of this information could constitute a breach of confidence. Your co-operation in this matter is greatly appreciated. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] The contents of this email are intended only for the named addressees and may contain confidential and/or privileged material. If received in error please contact UPCO on +44 (0) 113 201 0600 and then delete the entire e-mail from your system. Unauthorised review, distribution, disclosure or other use of this information could constitute a breach of confidence. Your co-operation in this matter is greatly appreciated. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] The contents of this email are intended only for the named addressees and may contain confidential and/or privileged material. If received in error please contact UPCO on +44 (0) 113 201 0600 and then delete the entire e-mail from your system. Unauthorised review, distribution, disclosure or other use of this information could constitute a breach of confidence. Your co-operation in this matter is greatly appreciated. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Should I bother to try and handle this with struts?
Hi, had no such requirement so far... but I remember having read posts about using arrays and indexed attributes in ActionForm's. Maybe searching the mailing-list archives gives you some starters. hope this helps Alexander -Original Message- From: Rick Reumann [mailto:[EMAIL PROTECTED]] Sent: Donnerstag, 11. Juli 2002 17:03 To: Struts List Subject: Should I bother to try and handle this with struts? I'm confused how I can/should handle this in Struts... What I need to build (and long story why) is a User Administration utility and where I'm having trouble fitting this in with struts is in regard to the following: Picture a case where you want to give user's certain roles based on certain applications. So you'd have: BackofficeApp[ select options of possible roles ] JoeBlowApp [ select options of possible roles ] DumbApp [ select options of possible roles ] The problem is the list of applications is dynamic so I can't hard code these values into a form bean or in my dynamicActionForm. Currently I'm planning on doing this an old fashioned way where after submission I'll loop through the same dynamic list of applications and pull up the request parameters based on the values I get back. So for example somewhere I'd end up doing: //while loop through applications String appValue = request.getParameter( appNameBasedOnCurrentLoopValue ); //update db for this app name based on value //continue loop Can I have a form bean gather all this data? Or should I just continue to do it the way I'm doing it? Thanks for any comments/help. -- Rick mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Using Reset to Load Drop Downs?
Well in the action processing the request I can decide whether I want to keep the lists or remove them from the session. Furthermore for lists shared accross all users I can use the application- context and have just one singel list for all users. The first user to hit the need kicks off the lazy-initializing. Alexander -Original Message- From: Adam Hardy [mailto:[EMAIL PROTECTED]] Sent: Freitag, 12. Juli 2002 07:36 To: Struts Users Mailing List Subject: Re: Using Reset to Load Drop Downs? I don't have any reluctance to use another action in the action's xml input parameter - it had just never occurred to me. It's going to double the size of my struts-config.xml though. And if you're keeping the stuff in the session, then you're occasionally going to get orphaned lists - but I guess that's not a huge issue. Adam Jesse Alexander (KADA 11) wrote: Hi, I usually do it within an action called to prepare a form I want to show. Instead of forwarding to FORM_B from ACTION_A processing the input from FORM_A I forward to ACTION_B_PREPARE setting up all FORM_B needs and then from there go to FORM_B. I can now add the contents of the collections for the dropdowns to the session. When I process FORM_B and realize that this form is completely processed I can remove the specigfic objects from the session. I know there is some reluctance against this action-to-action forwarding, but I think it is an elegant solution to have an action per form (ACTION_B and ACTION_B_PREPARE can be united, called from 2 different action-mappings). I find that preparing the FORM_B-content in ACTION_A creates a dependency that does not please me... hope this helps Alexander -Original Message- From: Graham Lounder [mailto:[EMAIL PROTECTED]] Sent: Montag, 8. Juli 2002 20:47 To: Struts Users Mailing List Subject: Using Reset to Load Drop Downs? Hell All, I'm having a small problem with loading my drop downs after a validation error (since my action is not being called again). It is recomended/good practice to load my drop downs in the reset method of the form? Is it possible? I would load them once my application starts, but I need to modify the list before it is displayed. Any Ideas? Graham Graham Lounder Java Developer Spatial Components Division CARIS 264 Rookwood Ave Fredericton NB E3B-2M2 Office 506 462-4218 Fax506 459-3849 [EMAIL PROTECTED] http://www.spatialcomponents.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Problem with session ojects: memory size, updates
Hi Sandra, I prefer to remove the objects from the session as soon as I can declare that they are not usefull anymore. EG.: In action_1 I build a model-object, use it in jsp_1 and process the users action in action_2. If the usecase is finished here, I remove the object from the session. As for session size: The 4kB recommendation comes from servers that support clustering. Because the session must be propagated to all members of the cluster, it should be kept as small as possible. We have a few application running with substantial numbers of concurrent users that can have up several megabytes of session-data. If the usecase needs it, do it. Often we have the case that a few users need lots of session data, and most users just a few bytes... Ok for us session-data is used, because our persistance level is on a CORBA-backend host and we have no jdbc on our midrange. Therefor we calculate it is cheaper to a few Gig of memory to our servers in order to save on network-data-transfer. hope this helps Alexander -Original Message- From: Heligon Sandra [mailto:[EMAIL PROTECTED]] Sent: Freitag, 12. Juli 2002 13:11 To: 'Struts Users Mailing List' Subject: RE: Problem with session ojects: memory size, updates Importance: High Thanks John for your response, I have already read the message http://www.mail-archive.com/struts-user@jakarta.apache.org/msg34592.html but I would like to have more details with real examples. I believe that the best way is to try. I read that objects in the session must be removed unlike the request objects. Is it good to do that when the application invalidates the session ?. Because we save objects in the session in order to access data during all the session life. I would like to have advices or tricks for updating and looking up session objects (JavaBeans and not EJB). Imagine I have the following business objects model: Class A composed of several instances B, each B item can be composed of several C instances. (nested beans). If the list of each sub-beans is variable, must I use dynaBean ? Imagine the user make a request about the instance B2, I get data information and store the JavaBean B2 in the HttpSession. Later the user makes an other request and the B4 instance is required, I store B4 in the HttpSession. Then two problems: 1. The last request needs to get A instance, I get A1 but before saving A1 I have to test if A1 is composed of B4 or/and B2 in order to remove objects from the HttpSession. Then I store A1 in the HttpSession. It is very complicated, isn't it? What are the others solutions to store and look up nested beans ? 2. The WebServer receives a data change notification, in this case how can I look up all active sessions and all session objects of each session to update the JavaBeans which changed? How must I do to be sure that Actions or JSP pages don't access data during update? Thanks Sandra -Original Message- From: Jon.Ridgway [mailto:[EMAIL PROTECTED]] Sent: 12 July 2002 11:47 To: 'Struts Users Mailing List' Subject: RE: Problem with session ojects: memory size, updates Hi, Your English is a hell of a lot better than my French...Your question is one that comes up a lot on the list try a search at: http://www.mail-archive.com/struts-user@jakarta.apache.org for 'session size'. One pertinent post is: http://www.mail-archive.com/struts-user@jakarta.apache.org/msg34592.html In short, the answer to what should go in the session depends on how your application will be used. If you expect a *very* high number of concurrent users your session should be under 4k (taken from iAS, WebLogic and WebSphere docs, white papers etc). It will also depend on your hardware, how much RAM is available, network bandwidth, database size/speed etc. If you can predict the highest level of concurrent users, multiple your maximum session size by this. The result will be the amount of RAM taken up by all the sessions put together, if you have sufficient RAM to handle this and all over requirements, then the session size is not an issue. Note however that the number of users can explode unexpectedly, so the best practice recommendation is to keep session size as small as possible. As for the speed of looking up objects from the session, this will depend on your app server, when clustering some app servers will store the session in a db or other persistent store, lookups in this case are relatively expensive. If you are not clustering, I wouldn't worry about the speed of the lookup (even if you are I wouldn't worry about it that much - its not a bottle neck I've ever come across.) Jon Ridgway -Original Message- From: Heligon Sandra [mailto:[EMAIL PROTECTED]] Sent: 11 July 2002 15:12 To: '[EMAIL PROTECTED]' Subject: Problem with session ojects: memory size, updates Sorry, my english level isn't very good. I read that the Struts framework doesn't make (oblige) to use one particular model implementation
RE: Using Reset to Load Drop Downs?
Hi, I usually do it within an action called to prepare a form I want to show. Instead of forwarding to FORM_B from ACTION_A processing the input from FORM_A I forward to ACTION_B_PREPARE setting up all FORM_B needs and then from there go to FORM_B. I can now add the contents of the collections for the dropdowns to the session. When I process FORM_B and realize that this form is completely processed I can remove the specigfic objects from the session. I know there is some reluctance against this action-to-action forwarding, but I think it is an elegant solution to have an action per form (ACTION_B and ACTION_B_PREPARE can be united, called from 2 different action-mappings). I find that preparing the FORM_B-content in ACTION_A creates a dependency that does not please me... hope this helps Alexander -Original Message- From: Graham Lounder [mailto:[EMAIL PROTECTED]] Sent: Montag, 8. Juli 2002 20:47 To: Struts Users Mailing List Subject: Using Reset to Load Drop Downs? Hell All, I'm having a small problem with loading my drop downs after a validation error (since my action is not being called again). It is recomended/good practice to load my drop downs in the reset method of the form? Is it possible? I would load them once my application starts, but I need to modify the list before it is displayed. Any Ideas? Graham Graham Lounder Java Developer Spatial Components Division CARIS 264 Rookwood Ave Fredericton NB E3B-2M2 Office 506 462-4218 Fax506 459-3849 [EMAIL PROTECTED] http://www.spatialcomponents.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Checkbox Issues
Hi, a bit of peace, please (less than a day and already stressing...). The documentation and the mailing list archives clearly state, that checkboxes must be set to false (if boolean) or space (if string), and nothing else. Obvioulsy this only happens if you are going through an action. hth Alexander -Original Message- From: Kamholz, Keith (corp-staff) USX [mailto:[EMAIL PROTECTED]] Sent: Mittwoch, 10. Juli 2002 14:35 To: Struts (E-mail) Subject: FW: Checkbox Issues Hey everyone, I'm reposting my question because it kinda got ignored before. I don't want to be a mooch, but can anyone help me out with this? ~ Keith http://www.buffalo.edu/~kkamholz -Original Message- From: Kamholz, Keith (corp-staff) USX [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 09, 2002 3:16 PM To: Struts (E-mail) Subject: FW: Checkbox Issues One little addition to my question... I have an html:link to the form JSP to avoid it being validated before being submitted. Do I need to go through an action in order for reset() to be called? ~ Keith http://www.buffalo.edu/~kkamholz -Original Message- From: Kamholz, Keith (corp-staff) USX [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 09, 2002 3:14 PM To: Struts (E-mail) Subject: Checkbox Issues Hey everyone, I'm having an issue with my checkboxes. I know you're supposed to set the corresponding boolean property to false in the reset method, and I do just that. However, for some reason the checkboxes cannot be unchecked. After they are checked for the first time, the property is always selected. It doesn't seem like a very complex issue, but I don't know what's going on. Can anyone help me out here? Thanks a lot! ~ Keith http://www.buffalo.edu/~kkamholz -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Stop coming out with more toys
Well, think about having to offer other programmers a fw like struts integrated into your corporate app-framework and having to decide in fall 2001 to use a specific Struts-version to integrate (was 1.0.0 at that time). Then before you even can get the first apps in production state, you read about 1.0.2 or even 1.1... Now that's what I call frustrating. BUT, our programmers still enjoy using our frozen version because it is better than nothing at all. -- just define the functionality you want from the framework, check which version supplies the stuff you need (validator works also in 1.0.0) and then freeze this struts-version for the running project. When you have finished it and go to another version of the same app (=new project) or another project, redo the step above. This recipe will keep you happy (you have a fw to assist you) and your boss as well (hears that you will save time using a fw and see that just this happens) hope this helps Alexander -Original Message- From: Jacob Hookom [mailto:[EMAIL PROTECTED]] Sent: Donnerstag, 4. Juli 2002 07:46 To: 'Struts Users Mailing List' Subject: Stop coming out with more toys Ever since I joined this mailing list, I've basically near-reprogrammed my application 3 times now: first it was struts actions, then it was implementing the display library, and now the validator in 1.1b... please... stop coming out with more toys, my boss is getting pissed. -jake --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.373 / Virus Database: 208 - Release Date: 7/1/2002 -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Per-user downloadable logs
Hi, I've written several servlets that present log-information to the browser. Getting the file, filter and put it out in html is a piece of cake (do not forget to filter out html-characters like and ...). The biggest problem normally is to get to know where the log-files are and what name they have. Servlet-specs allow you to specify parameters in the servlet-definition (init-param). So when you setup web.xml you can pass these informations (path and file-names) to the servlet. Or you could specify path and file-names in the startup script of the servlet-container (-Dparmname=value). System-properties can be read from servlets too. So basically you just need to isolate the file-access (servlet, standard java-io) from the location-info (path, file-name - container-specific) and then you are done with your requirements. Alternatively: use a logging-mechanism (JDK-1.3-logging, log4j,...) to set up a logger that you can use also outside the servlet-class (modell-layer). That mechanism must also be configured (log-persistance, locations...). The same info can be passed to the servlet (again the same mechanism as above). Or you can establish a helper-class that gives access to the logger and some of its setup-info... eg. class needing to log: LogHelper.getInstance().log(message); servlet showing log: LogHelper.getInstance().getLogLocation(); hope you get the idea (else ask and try to explain better) Alexander -Original Message- From: Jonathan Fuerth [mailto:[EMAIL PROTECTED]] Sent: Donnerstag, 4. Juli 2002 23:45 To: [EMAIL PROTECTED] Subject: Per-user downloadable logs We are looking at various user-support scenarios for our Struts-based webapp. What we're aiming for is to create a Struts action that will return a (plain text) log of the current user's actions over a specified time interval, which they can then attach to an email when they have product support questions. We aren't willing to tie the application to a specific servlet container (such as Tomcat or WebLogic), so anything we do will have to work with Struts-1.1(b1) and the Servlet-2.2 specification. So it would seem that using ServletContext.log() is out, since there's no vendor-independant way of getting at the log from within the webapp (and I don't see anything in the spec about the format of those log entries either). Going to an extremely custom solution (like writing a log4j appender that inserts into a database table which our log retrieval action could then query) is a possibility, but it has drawbacks: It adds lots of insert activity to what is now pretty much a query-only application; it adds another table to our database schema; database-connectivity related problems can't be logged. How have other struts users solved the problem of getting at the application logs without needing to involve the web administrator? I'd be grateful for any hints or pointers to solutions! -- Jonathan Fuerth - SQL Power Group Inc. (416)218-5551 (Toronto); 1-866-SQL-POWR (Toll-Free) Unleash the Power of your Corporate Data - http://www.sqlpower.ca/ -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: datasource classpath issue with MySQL driver
Hi, at some time I had problems with MySQl-driver when I used the compressed jar-file. Try to use the uncompressed jar-file. hope this helps Alexander -Original Message- From: matt_raible [mailto:[EMAIL PROTECTED]] Sent: Montag, 1. Juli 2002 06:08 To: [EMAIL PROTECTED] Subject: Re: datasource classpath issue with MySQL driver You might want to try a newer version of the MySQL JDBC Driver. I'm using 2.0.14 and it works fine in Tomcat. Also, I register it with Tomcat via JNDI (server.xml) and then look it up in my classes. HTH, Matt --- In [EMAIL PROTECTED], Clay Graham [EMAIL PROTECTED] wrote: Hello STRUTS Users, I am asking a question because I am very suprised at an unexepected behaviour and thought that someone may have a hint. I have tomcat 404 ant struts 102 working and they have been tested, and I am taking the next step by starting to connect to my MySql database, all goodness. So my first step was to add the datasource in my struts-config.xml as follows: data-sources data-source set-property property=autoCommit value=false/ set-property property=description value=The Test Datasource/ set-property property=driverClass value=org.gjt.mm.mysql.Driver/ set-property property=maxCount value=4/ set-property property=minCount value=2/ set-property property=password value=/ set-property property=url value=jdbc:mysql://localhost/test/ set-property property=user value=root/ /data-source /data-sources the next step was to add the mm.mysql-2.0.6.1.jar to my project's WEB-INF/lib directory, the standard approach [clay@meis test]$ jar -tvf test.war|grep mm.mysql 390333 Sun Jun 30 16:20:20 PDT 2002 WEB-INF/lib/mm.mysql- 2.0.6.1.jar I am sure this JAR has the mysql driver in it: [clay@meis test]$ jar -tvf web/WEB-INF/lib/mm.mysql-2.0.6.1.jar |grep Driver 15163 Sat Jun 16 09:20:28 PDT 2001 mm.mysql-2.0.6/org/gjt/mm/mysql/Driver.java 5443 Sat Jun 16 09:20:28 PDT 2001 mm.mysql-2.0.6/org/gjt/mm/mysql/Driver.class so when I install the application using ant the following error occurs: - Root Cause - java.sql.SQLException: open: java.lang.ClassNotFoundException: org.gjt.mm.mysql.Driver I have even put mm.mysql-2.0.6.1.jar in tomcat/common/lib and it does not find the driver. I am asking this question on this list because it happens in struts-config.xml any ideas help is appreciated! clay -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe@j... For additional commands, e-mail: mailto:struts-user-help@j... -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: i18n Gets Even Weirder: It is Reading from the File, but Only Certain Languages and a Mystery Value
Hi, have you specified the correct charset in the html-header? meta http-equiv=content-type content=text/html; charset=ISO-8859-1 Well it will not be ISO-8859-1, but something different. This website should tell you which (in case...): http://www.iana.org/assignments/character-sets hope this helps Alexander -Original Message- From: micael [mailto:[EMAIL PROTECTED]] Sent: Montag, 1. Juli 2002 06:49 To: Struts Users Mailing List Subject: i18n Gets Even Weirder: It is Reading from the File, but Only Certain Languages and a Mystery Value Here are the really odd facts. 1) I know the app is finding my Resources_zh.properties file when the browser is set for Chinese, because if I use English values for the keys and change their value in Resources_zh.properties but no where else, the values come up in the browsers. 2) However, if I change the value to unicode for Chinese, the old values show up, and those values are not in any file at all at that time. They have to be coming from cache. 3) then, if I change the unicode back to different English than it ever was, that changes and shows up. Does anyone have any idea on any of this? At 03:13 PM 6/30/2002 -0700, you wrote: On Sun, 30 Jun 2002, micael wrote: Date: Sun, 30 Jun 2002 14:02:47 -0700 From: micael [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: Re: Weird i18n Results -- i18n Experts Out There? I recently added the Japanese to the entire site with no issues. I presently have English, Spanish, Italian, German, Portugese, French and Japanese working fine. There is not a file on the site that has the results that I am getting, so it must be cached. But, if it is cached, then how in the heck is it reading changes to the messages keys with English. It is like it is reading some keys from this file and some other keys from a cache or another file. Is that possible? Struts follows the standard rules for the java.util.ResourceBundle class to figure out which file to get messages from. For example, if your user's language preference (configured in the browser) is the zh_CN locale, Struts will check for the existence of the message key in each of these locales in sequence: * zh_CN * zh * The default Locale for the JVM Thus, it is quite possible for the messages on a particular page to end up coming from different files. The important thing is to match up you filenames with the way that the browser is specifying them. Micael Craig At 10:38 PM 6/30/2002 +0200, you wrote: Your browser-cache is cleaned too? Durk I am building an i18n site. I had a page with buttons that were in Chinese, and have now change about half the text to Chinese. That text still comes up in English. I thought somehow the application was not accessing the xxx_zh.properties file, so I changed a remaining English key value. And, that changed in an accessing browser, so I know it is accessing that file. Yet. it is coming up with English that is not even on the site anymore. It must be cached somewhere. However, I shutdown Tomcat, cleared the cache in TOMCAT_HOME/tomcat/work/ and still get the same results. I have no idea what is going on. I don't even know what the question is. I seemingly cannot be a cache problem, because changes to the file are shown. When I change a key that has Chinese, that is not reflected on the browser. When I change a key that has English, that is reflected. What in the Sam Hell is going on? Micael -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: default locale and unspecified locale (ActionForm)
Hi, the problem is that in your case .fr_FR is the default. I was searching along the same lines until I discovered that Struts (or was it java, had to few time on my schedule to really dive into it) did the fallback only until reaching the machine-default-locale. What I found with de_DE as machine default and fr_FR being asked from the browser that it was looking for 1) fr_FR (- not found) 2) fr(- not found) 3) de_DE (which I had created) but never without_locale... hope this helps Alexander PS: that was with Struts 1.0.2 -Original Message- From: Barbara Post [mailto:[EMAIL PROTECTED]] Sent: Montag, 10. Juni 2002 13:41 To: [EMAIL PROTECTED] Subject: default locale and unspecified locale (ActionForm) Hello, I want to display back messages on my jsp after treatment by an ActionForm. I use the classical method but want it to be localized. However, I don't find how I can use my default .properties file if the user's locale doesn't match the either default or known (not on the first jsp though, it will be used for next jsps) locale. I mean I have the following code in my ActionForm, and my .properties files which contains localized msgs are : ApplicationResources.properties, ApplicationResources_fr_FR.properties, ApplicationResources_en_US.properties. I know that ..._fr_FR.properties can be read because this is the default Locale on my computer. ActionForm code (AuthenticationForm.class) : .. private static Locale loc = Locale.getDefault(); resources = this.getServlet().getResources(); ... ActionErrors errors = new ActionErrors(); // get the fields on the form try{ userCompany = request.getParameterValues(company)[0].toUpperCase(); userLogin = request.getParameterValues(login)[0]; userPassword = request.getParameterValues(password)[0]; // here I get the language userLang = request.getParameterValues(lang)[0]; } catch(java.lang.NullPointerException e){ // don't do anything } // fill an ActionErrors object if (userLogin == null || userLogin.length() 1){ try{ errors.add(userLogin, new ActionError(resources.getMessage(loc, username.missing.field))); } catch(java.lang.NullPointerException np){ // here I want to use the Localeless msgs // or maybe I have to set locale to en_US ? Well, I'd prefer not to have a suffix but maybe I ask too much out of it ? errors.add(userLogin, new ActionError(resources.getMessage([what to fill in here ??], username.missing.field))); } // the same for the otheer fields .. } return(errors); Barbara __ ifrance.com, l'email gratuit le plus complet de l'Internet ! vos emails depuis un navigateur, en POP3, sur Minitel, sur le WAP... http://www.ifrance.com/_reloc/email.emailif -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: question about Custom Tag performance
About i18n and Model... Let's say you have to support 2 presentation-channels (full-scale browser and reduced screen browser) then you might want to show a different i18n'ed-text for the 2 clients (one with a longer more explicit text, the other one shorter...) This is why I think i18n is a View-Layer thing. anyway i18n is always a hot topic because of the requirements to remain flexible and performant (usually to requirements that are mutually exclusive...) regards Alexander Jesse -Original Message- From: Ted Husted [mailto:[EMAIL PROTECTED]] Sent: Dienstag, 4. Juni 2002 13:09 To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Re: question about Custom Tag performance It's easy to overuse things like message keys. With a Model 2 approach, it can be just as easy to look up the messages server-side and then deliver them to the page all wrapped up in a JavaBean. The ResourceBundles are not strongly tied to JSP tags, just something that tags can use too. Personally, I consider resolving i18n part of the business layer. The text of the localized message is going to be the same regardless of what presentation system you are using. The presentation layer has to markup the text, but the text itself is not presentation logic. i18n tags are handy for quick-and-easy jobs, but returning localized messages on a larger scale is a job better suited to an Action and a JavaBean than a tag. Then, you could reuse the same logic when printing a text report as a PDF, for example. A whole 'nother approach is to use the i18n capabilities of Tiles. Here you can have one layout Tile and different interior Tiles for each supported locale. This is a great way to go when embedding the localized text into a markup page is not a problem. Since the interior Tiles contain a minimum of markup (most of the chrome is in the layout tile), it wouldn't be hard to get translators to work with the tiles, or markup them up afterwards. Of course, this is not such a reusable solution as something based on using localized JavaBeans to transport the text, but it is straight-forward. -- Ted Husted, Husted dot Com, Fairport NY US -- Developing Java Web Applications with Struts -- Tel: +1 585 737-3463 -- Web: http://husted.com/about/services Ted, I read the book you wrote, JSP site design, and I do have a quick question for you: How does the jsp custom tag affect the performance of the web application? I am using JRun 3.1 and I use custom tag for i18n. Therefore, there are many tags like lib:message key=key/ on a jsp. The problem is the handler objects are not pooled by the server runner, so a new instance is created for each key. It is a performance disaster!!! I think it has to happend to Struts too. Do you have any idea on this? I will greatly appreciate your pointers. Jack -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]