RE: [OT] Lightweight weblogger
> I am looking for a lightweight, Java based weblogger that can be > *easily* integrated into an existing Struts-based web application. I You mentioned that you were looking at MiniBlog, but did not like the scriplet approach. Neil Eyde's PersonalBlog began as a struts-based rewrite of MiniBlog. It has since been rewritten heavily, but it is still struts and tiles based, so it might suit your needs. http://www.eyde.net/index.do?cat=D http://sourceforge.net/projects/personalblog -Greg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Urgent: generating PDF from form data
> Hi All I use struts. I wanted to know if there is a we can generate a PDF with the form data the user submits so that the users can print the pages. Please let me know if there is any resource on it or if there is something related to it. < You may wish to look into these two open source projects, depending on your specific needs. FOP, Apache's Formatting Output Processor - http://xml.apache.org/fop/ iText, a java-pdf library - http://sourceforge.net/projects/itext/ Greg Ludington - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] How can Java compete?
Mark Galbreath wrote: > I understand M$ will subcontract with prophylactic vendors to install latex > glove dispensers in the loos so that patrons can practice safe hex. And this is precisely why Java will win. Microsoft hires contractors, while we can use automatic garbage collection. And if we would rather squeeze out the last drop of performance, we can take a look at this article: http://www-106.ibm.com/developerworks/ibm/library/i-incrcomp/?ca=dgr-lnx w06TrashCompactor Entitled: "Mash that trash -- Incremental compaction in the IBM JDK Garbage Collector -- How to minimize pause times and free the heap from dark matter" Clearly, IBM has this lucrative market next in their sights. Now, who wants to write *this* plug-in? Greg Ludington - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Asking again - basic design question
> I am designing a store check-out process. The old software > (pre-struts) had a check at the top of each page to make sure the > information from the previous page had been entered. And if not, > forwarded to that page. So if you bookmarked the last page and went > there, you would get forwarded back page by page and still start on > the first page. I believe you might want to look at the Validator, and in particular into the "page" attribute of the validator, as well as the ValidatorActionForm/DynaValidatorActionForm classes. With it, you can assign a "page" number to fields field, and the Validator will check the validity of those fields only when it is their turn. (If your field is page=2, the Validator will not check it on page 1, but will check it on page 2, 3, and so on.) I am not sure how that would interact with bookmarks, but, presumably, if somebody had bookmarked a page, and then returned to the bookmark without any of the needed variables (say, if the needed values were only in the session, which had since expired), it would fail all the way back to the beginning. However, I have never implemented a multipage form, so I cannot say that is exactly how it would work.Check the documentation, as well as list archives (one such one at http://marc.theaimsgroup.com/?l=struts-user ) -- there have been a few discussions on multipage forms. -Greg Ludington - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Struts is incomplete
/complaint/problem is specific and to the point, it will get addressed. If it is not, the discussion will die, and the problem goes unresolved. >>>Comparatively those of us who have to meet to spec are not allowed >>>such luxuries of beta versions. You have beta versions; you just do not call them that, and you do not open your doors and let people see them. Many people work that way; by the time we deliver to our client(s), hopefully we have cleaned up the problems, so that people only see the polished version. The Apache people do it differently. Millions of eyes *see* the warts on their software, and motivated people from that group of users can help improve it. The theory is that allowing others to see the problems leads to quicker and more thorough fixes. On some projects it works very well; on others, not as well. >>>The only upside is that if somebody(who doesn't want to spend on >>>licensing fees) >>>and wants to write a bespoke product can use the tools freely. >>>How ever you have to take your chances with the stability. As said earlier, struts is not for everybody, or for every project. If struts works for you, use it. If it does not, use something else. If it is close-but-not-quite, ask specific questions or help make specific improvments -- there is a type of responsiveness here you will not find anywhere else in the software world. We all have jobs to do, and we pick the tools that help us do those jobs most effectively. Moving on the original poster/question... >>>>I have done quite a bit of development without even knowing about >>>>Struts...and it went quite smoothly as far as crying like a >>>>little baby over an iterate tag is concerned,that For what it's worth, I think the 'crying like a little baby' comment was out of line. However, many people here have devoted substantial amounts of their time to this project, so when a question starts with a blanket statement like 'struts is not yet complete', you can expect people to get a bit offended. >>>>was just an example...If inside 3-4 days i could find some basic thing >>>>which was not there in Struts what about in later stages of >>>>development... Iteration over constant numbers is more difficult in struts than it probably could be, but it is not lack of a basic feature so much as a concious design decision. Struts encourages developers to do it another way. This might be why you are not getting the types of straight answers you want, and it may mean that Struts is not suitable for the type of project you have. Iterating over a constant list often suggests having something like an Array of objects or a ResultSet directly in the JSP, and output with something like: <%=object[i].getName()%> = <%=object[i].getPrice()%> Which is something struts tries to minimize, because it means the JSP has to know details about the underlying object type. This might be quick to write, but it can create the maintenance problem that you cannot change your data model without having to change your JSPs. In the struts world, that Array or ResultSet would be converted to a standard java object type before the JSP ever saw it, so that the JSP author never has to worry about syntax or the underlying object type. He/she might use: = This way, the page author does not have to know or care if the underlying objects are an Array, a Vector, a ResultSet, or a Map -- and, more importantly, the programmer can change the underlying code without disturbing any JSPs. You can argue that these struts tags, as well as the separating the layers as much as possible seems awkward, and adds needless complexity to what you are trying to do, and, for some projects, I might even agree. However, if you work with a team, or are writing code that will have to live past your involvement, this type of separation really helps the project stay clean. After that long-winded bit above, I now have to confess I am relatively new to struts, so others might know how to do it better, but here are two suggestions: - If you can, get the Array/ResultSet/whatever to a standard java Collection or Map before you get to the JSP layer. This might seem like an extra layer of work, but it will provide some freedom between your presentation and model layers. Are you using the entire struts framework, or just the taglibs? If you are using only the taglibs, are you following a "Model 2" design, or is the controller and model code in the JSP as well? What specifically do you have to iterate over in your JSP? - If you absolutely have to iterate over constants in your JSP, rather than try to work around the logic:iterate tag, use the JSTL forEach tag. It works in struts applications, and in fact struts developers are encouraging JSTL use when possible. You can find a free implementation of that tag a
RE: Problem in validation requiredif in struts 1.1 that worked fine in Struts 1.1 RC1
The format of the variable names changed before Struts 1.1 final. In your validator, try replacing your var-names field-test[0] and field-value[0] with fieldTest[0] and fieldTest[0], respectively. You can see this format in the example at http://jakarta.apache.org/struts/userGuide/dev_validator.html -Greg Ludington - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: adding a parameter to html:link with a map
>Okay I can do this: > > >Printer page > > >seems a bit of a kludge, be nice to just specify an addition rather than put >in and take it out of the map. I am not sure it is recommended practice to mix Map and single params in the same html:link tag, but, if all you need is to add a print=true to the end of one of your standard links, this should do the trick: Printer page Assuming you have some bean named "myBean" defined, and the value of that bean is "true", this will add both your Map of parameters and print=true to the link's query string. -Greg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [OT] Shopping cart best practices - Cookie, HttpSession or DB
>1. Store your cart in session, and when that all works. For everyone. >Gets to the checkout and funds are exchanged. While I agree with the previous posters who said that it would make your life easier if you can require login, if you absolutely need to save carts of users regardless of login status, you might consider having your Cart object impelment javax.servlet.http.HttpSessionBindingListener. Objects implementing this interface are notified when they are bound to or unbound from (either explicitly or by the session itself expiring/invalidated) a session, and can perform tasks at these times. In your case, when your Cart object is unbound you would save its contents to your database. (Conversely, when you first bind a Cart object to a session, you can check the database and refresh its contents, if any.) Nothing about this approach prohibits you from saving Cart information at other appropriate times -- user logins, purchases, and the like -- this approach just allows you the ability to store information, like cart contents, at the end of a client session. -Greg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: HELP -- Problems Returning ResultSet
I am not entirely sure what your intentions are here, but it appears that you are missing a return statement in your OrgIdService execute() method -- the function only has one return statement, and it returns null. You need at least one return statement that returns an ArrayList. As a minimal change, you probably want to have: return facilList; Right after you close your connection in your try block. Alternatively, you could return null only in the catch block, and return facilList otherwise at the end of the method, depending on your other intentions. -Greg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Re [OT] As the Struts world turns [was: Re: DO NOT REPLY [Bug 22519] - Allow multiple MessageResources files to be loaded under one key]
>Also, if your using IE it does that... A browser that regulates >popups (shameless mozilla plug) does not have that problem. If you are stuck with IE, and have the ability to install browser components on your machine, the new version of the Google Toolbar includes a popup blocker that does not work *quite* as well as Mozilla here, but it will suppress the window explosions enough so that you can close the idiot window with determined alt-f4 pressing. -Greg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Struts form with pop-up window
>Any ideas on how I can get the data from the main page, through the >struts form, up \ into the pop-up window for display *before* submitting the main page? < As an alternative to javascript passings, you could actually submit the form to another window, using the "target" attribute of forms. It's normal use is to submit forms to different windows in a frameset, but it can work in this case, as well. (I just ran through this quickly, and have not checked this against every browser, but something like this should work): Main page form (you can and probably should use html:form, which also has a target attribute): ... This will submit your form to a child pop-up window, where the onSubmit sets the window's properties. The form in the child window would be: ...your business logic-adjusted form fields... Or, if you do not want to hard-code the name of the main window in the form, you can use this: document.forms[0].target=window.opener.name The catch here is that the main window has to be named *SOMETHING*, or the child window will not know which window to submit back to. Probably the best way to do this would be to have that first form in a frameset, even a dummy frameset, to ensure it has a name when the user submits the form. Otherwise, a workaround like: On the main form page seems to work as well, but somehow strikes me as less reliable. -Greg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [OT] International telephone number formatter component????
> I do not disagree about the research part at all. I know it will take a researcher on my staff a great deal of time to maintain, but it is never the less, a needed feature. I just thought that most Countries have a fairly well formatted number. And mostly I am taking about supporting N.&S. America, Western Europe only. Later look at the far East. < You may be able to accomplish what you want using localized forms and the mask rule in the validator. Assuming that your default language/country is en_US (a parochial assumption, I know), your validation.xml might contain bits like the following: mask ^\(?(\d{3})\)?[-| ]?(\d{3})[-| ]?(\d{4})$ mask --a regexp for British phone numbers -- sorry, never been :)-- ...and so on for each language/country. Your researchers would have to provide you the masks for each country, and, as you add counties, you would add their formsets to validation.xml. A standalone validation rule might be more convenient, but this sort of approach might do the job for you. The struts-validator example webapp has a couple of sample forms that perform locale-specific validations. -Greg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: URGENT - Help defending Struts
TiVO Central Online (the service by which people log in and schedule programs and other operations on their TiVOs through the web) runs on Struts. https://www3.tivo.com/tivo-com/tco/index.do Of course, you have to have a TiVO with Home Media Option to log in and do anything meaningful on the Struts portion of the site. (The article content is from an ASP-based CMS.) -Greg -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Thursday, December 18, 2003 7:49 AM To: [EMAIL PROTECTED] Subject: URGENT - Help defending Struts All: Our CIO is currently fighting the use of Struts by saying that it is not widely used in B2C sites. Does anyone know of any sites, preferably commerce sites that are using Struts? This would be extremely helpful. The issue is that the CIO is looking for sites that may be similar to ours that are using Struts already. Thanks very much, Russell [EMAIL PROTECTED] 310-426-5587 This message is for the designated recipient only and may contain privileged, proprietary, or otherwise private information. If you have received it in error, please notify the sender immediately and delete the original. Any other use of the email by you is prohibited. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]