Re: db error
, tabtype from tab); if (!rs.wasNull()) { /** * some records where returned */ System.err.println(==); while (rs.next()) { System.err.println(Table Name: + rs.getString(1)); System.err.println(TabType: + rs.getString(2)); System.err.println(--); } System.err.println(==); } } catch (SQLException e) { System.err.println(== Error in getting the connection: + e.getMessage()); ---end of code -- -- Rajat Pandit | [EMAIL PROTECTED] System Analyst Manchitra Services Pvt. Ltd (www.manchitra.com) Tel: 011-26232696 / 26232798 Cellphone: 9818247126 B231 / C GK I New Delhi *** This e-mail and its attachments are confidential and are intended for the above named recipient only. If this has come to you in error, please notify the sender immediately and delete this e-mail from your system. You must take no action based on this, nor must you copy or disclose it or any part of its contents to any person or organisation. Statements and opinions contained in this email may not necessarily represent those of Littlewoods. Please note that e-mail communications may be monitored. The registered office of Littlewoods Limited and its subsidiaries is 100 Old Hall Street, Liverpool, L70 1AB. Registered number of Littlewoods Limited is 262152. - === message truncated === __ Do you Yahoo!? Yahoo! Finance Tax Center - File online. File on time. http://taxes.yahoo.com/filing.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[OT] Is it possible to use commons-el in a standalone application?
Hi, I know this is an off-topic message, but as many people here works with Jakarta Commons components, i decided to start my search in this list. I was thinking about writing a Swing app where its config file would be a XML file. And i'd like to put EL expressions in that file. So, my question is: is it possible to embed EL into a standalone app? I was reading commons-el API docs and they make a lot of references to JSP implementation classes (PageContext, VariableResolver, etc). So, in first glance, looks it is not possible. Is my conclusion right? Thanks in advance for any hint. Regards, Daniel Silva. __ Do you Yahoo!? Yahoo! Finance Tax Center - File online. File on time. http://taxes.yahoo.com/filing.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: collection of strings (newbie question)
Hi all, Other possibility is to check whether 'myBean' exists in some scope. Cheers, Daniel Silva. --- Daniel Henrique Alves Lima [EMAIL PROTECTED] wrote: Have you import logic taglibs ? steve hazelwood wrote: I have an action that creates a bean. That bean has a property myStrings that returns a collection of String objects. On a jsp, I want to list the strings. If my jsp has this: logic:iterate id=myId name=myBean property=myStrings bean:write name=myId/ /logic:iterate Then I get an exception Cannot find bean myId in any scope. I can understand that cos myId is a String not a bean. What should I use instead of bean:write ? Steve ___ Yahoo! Messenger - Communicate instantly...Ping your friends today! Download Messenger Now http://uk.messenger.yahoo.com/download/index.html - 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] __ Do you Yahoo!? Yahoo! Search - Find what youre looking for faster http://search.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Suggestion] struts-user-newbie list
Hi, My point is: will Struts gurus that participate this list subscribe to one more list? I think they are too busy for increasing their email load a bit more. Newbies could get a better help if, before posting to this list, they did homework: i mean, read Struts docs, Google, etc. I'm not sure about this number, it is just a guessing, but based on my experience in this list, 95% of the questions are already answered. You just have to find that answer, and that is what Google is for. My two cents. Cheers, Daniel Silva. --- Daniel Henrique Alves Lima [EMAIL PROTECTED] wrote: It sounds good to me ! Andrew Petro wrote: Incidentally, have there been any thoughts on this list of differentiating out a struts-user-newbie list from the main struts-user list? I think it's wonderful to have a welcoming place for newbies to post questions, but I think it might also be useful to be able to differentiate opportunities to help out newbies / be helped as a newbie from opportunities to ask more difficult questions / discuss more advanced features of the framework. My two cents. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? Yahoo! Search - Find what youre looking for faster http://search.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [Suggestion] struts-user-newbie list
Hi Andrew, Good point. Freedom of choice is very appreciated and is one the axioms of open-source community ;-) By the way, I'd like to invite all newbies and even Struts gurus to join us at #struts_users IRC channel at irc.darkmyst.org. There you can get help and meet some of the coolest guys in Struts world (myself included ;-)). You can, at least, have fun there! Cheers, Daniel Silva. --- Andrew Petro [EMAIL PROTECTED] wrote: My hope was that differentiating the lists Struts might make the email load more tractable for everyone. Struts gurus might very well look at a new list for newbies and choose not to subscribe. I don't see this as a problem. Struts gurus helping newbies is a wonderful thing, but we're all volunteers here and if the gurus would prefer not to be on the newbie list, they should be empowered to make that decision. It is true that differentiating the lists might lower the threshold for newbie effort prior to newbie posts. However, the existing infrastructure for encouraging everyone to think, read, Google, etc. before posting would still be in place and could apply equally to the struts-user-newbies list. However, separating out a newbies list would allow newbies to helped by those Struts gurus who are most generous, patient, or have whatever other attributes that make them want to help newbies, while not annoying other Struts subscribers who are less interested in this. This accommodation might help to preserve the friendly and supportive character of the list for newbies even as Struts continues to grow. What I think differentiating the lists would do is empower subscribers to separate out the two streams and manage them independently. It feels to me like there really are two simultaneous streams of messages on this list. When things get crazy at work I could choose to fail to keep up with the struts-user-newbie list and delete the messages unread without feeling that I was risking something I'd need to know. Or, for that matter, when things get crazy at work I could choose to come home and see if there's someone to be helped out on the struts-user-newbie list, letting the more demanding struts-user material go until things settle down again. I don't know for sure how people would use the ability to differentiate, but I think volume on the list is sufficient that it would be worth giving subscribers this ability. My point is: will Struts gurus that participate this list subscribe to one more list? I think they are too busy for increasing their email load a bit more. Newbies could get a better help if, before posting to this list, they did homework: i mean, read Struts docs, Google, etc. I'm not sure about this number, it is just a guessing, but based on my experience in this list, 95% of the questions are already answered. You just have to find that answer, and that is what Google is for. My two cents. Cheers, Daniel Silva. --- Daniel Henrique Alves Lima [EMAIL PROTECTED] wrote: It sounds good to me ! Andrew Petro wrote: Incidentally, have there been any thoughts on this list of differentiating out a struts-user-newbie list from the main struts-user list? I think it's wonderful to have a welcoming place for newbies to post questions, but I think it might also be useful to be able to differentiate opportunities to help out newbies / be helped as a newbie from opportunities to ask more difficult questions / discuss more advanced features of the framework. My two cents. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? Yahoo! Search - Find what youre looking for faster http://search.yahoo.com - 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] __ Do you Yahoo!? Yahoo! Search - Find what youre looking for faster http://search.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Help URL Rewriting
Christian Bollmeyer wrote: Am Freitag, 23. Januar 2004 19:59 schrieb Michael E. Allen: Where would I put that? Already tried putting it in the %@ page [..] % on top of your JSP pages? :-) As Struts tends to create a session implicitly, such as for storing the default locale settings etc, doing so in the end would show no real effect anyway (provided that you're not doing direct JSP calls, but wrap them into a standard Struts forward action at least, which is definitely recommendable). Considering the URL rewriting issue: just yesterday I wrote about enforcing Cookies (for certain parts of the application that won't work otherwise, among these those invoking external systems written in other languages inside a session-wide transaction), so I better refer to that post here. Normally, supporting URL rewriting is definitely a good thing, and you shouldn't suppress this fine mechanism unless you have to. If you have to, still, you can always say session.invalidate() and do a normal forward, in a custom Action. HTH, -- Chris. Anyway... I ended up doing a double redirect... the first to get the cookie set and the second to get the URL without the ?JSESSION=xxx stuff appended. Eric Bariaux wrote: What about session=false on your jsp page directive? Would this help? Eric. -Original Message- From: news [mailto:[EMAIL PROTECTED] On Behalf Of Michael E. Allen Sent: Thursday, January 22, 2004 10:37 PM To: [EMAIL PROTECTED] Subject: Re: Help URL Rewriting Ted Husted wrote: The container can't be sure that any given client supports cookies, so it will always use URL rewriting on the first request. Is there any way to shut that off? From and Action I am returning an ActionForward from the execute that maps to an jnlp file. The ?jsessionid=090280243 at the end is messing up starting java web start. I can tell me users to hit refresh once and it will go away... but there should be a better way! I am not using jsp... the page I want to forward to is a jnlp file (java web start), so there is no jsp directive in that file. I am not a jsp programmer, so I thought perhaps there was a configuration file somewhere. In any case, neither setting session=false nor calling session.invalidate() will do what I want; because I *do*, in fact, want there to be a session. I just don't want the JSESSIONID appended to the url on the first call. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Help URL Rewriting
Where would I put that? Anyway... I ended up doing a double redirect... the first to get the cookie set and the second to get the URL without the ?JSESSION=xxx stuff appended. Eric Bariaux wrote: What about session=false on your jsp page directive? Would this help? Eric. -Original Message- From: news [mailto:[EMAIL PROTECTED] On Behalf Of Michael E. Allen Sent: Thursday, January 22, 2004 10:37 PM To: [EMAIL PROTECTED] Subject: Re: Help URL Rewriting Ted Husted wrote: The container can't be sure that any given client supports cookies, so it will always use URL rewriting on the first request. Is there any way to shut that off? From and Action I am returning an ActionForward from the execute that maps to an jnlp file. The ?jsessionid=090280243 at the end is messing up starting java web start. I can tell me users to hit refresh once and it will go away... but there should be a better way! Thanks, Michael - 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: Help URL Rewriting
Ted Husted wrote: The container can't be sure that any given client supports cookies, so it will always use URL rewriting on the first request. Is there any way to shut that off? From and Action I am returning an ActionForward from the execute that maps to an jnlp file. The ?jsessionid=090280243 at the end is messing up starting java web start. I can tell me users to hit refresh once and it will go away... but there should be a better way! Thanks, Michael - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Chart generation Framework
Hi Otávio, Well, i just readed available documentation at Cewolf website. It was enough for me. If you got in trouble using it, let me know about your problems. Maybe i can help you. Cheers, Daniel Silva. --- Otávio Augusto [EMAIL PROTECTED] wrote: I've heard and read a lot about Cewolf, but was not able to work withit. I tryed to follow its manual, but with no success. Then I used another open source option (don't remember its name, was long time ago). Anyway, I'd like to know if you guys who have already worked with Cewolf have any nice tutorial/manual link which could help me. Thanks in advance Otávio Augusto On Tue, 20 Jan 2004 13:28:03 -0800 (PST) Daniel H. F. e Silva [EMAIL PROTECTED] wrote: Hi Vinicius, Cewolf is really a good option. It is a taglib that abstracts a lot of JFreeChart complexity. I used it in some projects and it did a great job. As far as i know, it is the best open-source option. There are other libraries, but Cewolf+JFreeChart offers the largest amount of features. Cheers, Daniel Silva. --- Vinicius Carvalho [EMAIL PROTECTED] wrote: Hi there! Does anyone here uses a chart Framework? I've heard about Cewolf, seems to be nice, any suggestions on this? Thanks Vinicius - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? Yahoo! Hotjobs: Enter the Signing Bonus Sweepstakes http://hotjobs.sweepstakes.yahoo.com/signingbonus - 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] __ Do you Yahoo!? Yahoo! Hotjobs: Enter the Signing Bonus Sweepstakes http://hotjobs.sweepstakes.yahoo.com/signingbonus - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Chart generation Framework
Hi Vinicius, Cewolf is really a good option. It is a taglib that abstracts a lot of JFreeChart complexity. I used it in some projects and it did a great job. As far as i know, it is the best open-source option. There are other libraries, but Cewolf+JFreeChart offers the largest amount of features. Cheers, Daniel Silva. --- Vinicius Carvalho [EMAIL PROTECTED] wrote: Hi there! Does anyone here uses a chart Framework? I've heard about Cewolf, seems to be nice, any suggestions on this? Thanks Vinicius - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? Yahoo! Hotjobs: Enter the Signing Bonus Sweepstakes http://hotjobs.sweepstakes.yahoo.com/signingbonus - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: struts and ibatis
Kelly, After looking for good options to make my applications simple, i found iBATIS. It is a very nice piece of software and, in my opinion, based on experiences, it is ready to go to a production environment. I used iBATS DB Layer and SQL Maps in two projects and it did very well. New 2.0 version has amazing features. It is still in beta stage. But i'm sure being in beta is not worse than Windows + SP1000. In fact, i trust more in iBATIS beta than in any M$ 'production' software as you have access to the code and if you find a bug you can fix it. If you'd like to know more experiences about iBATIS join us at #struts_users IRC channel on irc.darkmyst.org. Other cool resource for iBATIS newbies is Rick Reumann's iBATIS lesson (www.reumann.net). A simple and useful app showing how to use iBATIS. Hope i helped you. Cheers, Daniel Silva. --- Kelly Goedert [EMAIL PROTECTED] wrote: It helps mapping between the application and database. Take a look on this sites: http://www.ibatis.com/common/sqlmaps.html http://www.reumann.net Kelly. Viral_Thakkar wrote: BTW, What is iBATIS? -Original Message- From: Kelly Goedert [mailto:[EMAIL PROTECTED] Sent: Monday, January 19, 2004 3:41 PM To: Struts Users Mailing List Subject: struts and ibatis Hello, has anyone ever used iBATIS in a production environment? Is it stable enough? Kelly - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? Yahoo! Hotjobs: Enter the Signing Bonus Sweepstakes http://hotjobs.sweepstakes.yahoo.com/signingbonus - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: newbie question : cannot resolve symbol when compiling an Action class
First, your class name should begin with a capital letter by convention. The error is saying that no constructor an be found that matches myABC (..). So, be sure there is such a constructor. - Original Message - From: lixin chu [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, January 19, 2004 10:04 AM Subject: newbie question : cannot resolve symbol when compiling an Action class sorry for this newbie question, tried, googled, but can not find an anwser: I have a Action class (myAction) and a utility class (myABC class), in myAction, I try to instantiate it: myABC abc = new myABC (..); when compiling, error msg: ~~~ cannot reolve symbol symbol: constructor myABC location : class com.util.myABC what's wrong ? thanks ! li xin __ Do you Yahoo!? Yahoo! Hotjobs: Enter the Signing Bonus Sweepstakes http://hotjobs.sweepstakes.yahoo.com/signingbonus - 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: SV: Struts and Action errors
Hi Vinicius, I think you are a bit lost regarding Struts. Take a look at www.reumann.net. Very good tutorials. They will help you to understand better how to use Struts properly. By the way, i'd like to invite you to a very good struts chatroom. Point your IRC client to irc.darkmyst.org and join #struts_users channel. You'll find great guys there (and a girl too!), that have strong Struts experience. See you there! Regards, Daniel Silva --- Vinicius Carvalho [EMAIL PROTECTED] wrote: Ok, I got it. But what about the other questions? if I'm in a ActionForm, or a requestprocessor ... At 10:18 15/1/2004, you wrote: Hi there Use the saveErrors method in Action, before forwarding to jsp. Med venlig hilsen Claus Weng Madsen, Teamleder TELMORE A/S Carl Gustavsgade 3, 2630 Taastrup Telefon 70218700, Mobil 30242875 www.telmore.dk -Oprindelig meddelelse- Fra: Vinicius Carvalho [mailto:[EMAIL PROTECTED] Sendt: 15. januar 2004 12:24 Til: [EMAIL PROTECTED] Emne: Struts and Action errors Hi there! I'm a newbie to Struts, and this question may be a little silly, sorry. How exactly do I use action errors? How do I render them? In my app, I control the session via RequestProcessor using processPreProcess method. If the session is invalid, I create a new error using ActionErrors errors = new ActionErrors(); errors.add(sessionExpired, new ActionError(errors.sessionExpired); Well, and then I redirect the user to the desired login page, and there I have But nothing is shown. Also, in my actionForms, in the validate method, I add errors using the same syntax and none are shown either. In the Actions classes, the examples created by Websphere, I see that everytime those actionErrors are saved using a method called saveErrors, but this method is not static and belongs to Action class, the other modules does not access it. Any help? Thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? Yahoo! Hotjobs: Enter the Signing Bonus Sweepstakes http://hotjobs.sweepstakes.yahoo.com/signingbonus - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Multiple config files under single application
Yep, they are called application modules. You define multiple struts-configs in the web.xml. This will get you started: http://www.onjava.com/pub/a/onjava/2002/10/30/jakarta.html?page=2 Will - Original Message - From: Ramadoss Chinnakuzhandai [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, January 14, 2004 12:27 PM Subject: Multiple config files under single application Hi, Is there anyway I can define multiple config files under a single application ? any suggestions/inputs would be hightly appreciated. Thanks in advance. -Ram - 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: mapping question
Vanessa, As discussed a time ago on this list, it is considered a best pratice to go through an action all the time. So you can decouple your view layer in a way that makes your life easier. There are plenty of learning resources around the Internet about Struts, but i'd like to recommend www.reumann.net and www.ibatis.com. iBATIS is where you'll find a nice implementation of PetStore sample application that could be useful as a starting point to your apps. Cheers, Daniel Silva. PS: If you need help during your day you could go to #struts_users IRC channel at irc.darkmyst.org You'll meet nice people and very skilled java and struts developers there. --- Vanessa Monteiro [EMAIL PROTECTED] wrote: Hello everyone, I'm having trouble understanding the mapping tags of struts-config.xml. I have one simple jsp form and one form and one action to take care of it. In my /pages/form.jsp I have a html:form pointing to my do/action. My action-mapping is path=/action and I'm putting no input value. So to get to my form I link to /pages/form.jsp or do I need and action to point to the unsubmitted form? Vanessa. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? Yahoo! Hotjobs: Enter the Signing Bonus Sweepstakes http://hotjobs.sweepstakes.yahoo.com/signingbonus - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: expiring time
Otávio, Take a look on HttpSession class reference. I'm sure you'll find answer there. Cheers, Daniel Silva. --- Otávio Augusto [EMAIL PROTECTED] wrote: How to I set the expiring time for a session (or the sessions)? Thanks in advance Otávio Augusto - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? Yahoo! Hotjobs: Enter the Signing Bonus Sweepstakes http://hotjobs.sweepstakes.yahoo.com/signingbonus - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Resources from ActionForm
Hi, I want to access a resource bundle (key=PORTAL_RESOURCES) from an ActionForm to pull out display names for error messages (ActionError). I can't see how to access the resource bundle and pull out the strings I want. Thanks for your help. Will - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Resources from ActionForm
Hi, When I define the message resources as: message-resources parameter=PortalMessages null=false/ message-resources parameter=PortalResources null=false key=PortalResources/ I can access them from jsp as: bean:message key=portal.cnw/ bean:message bundle=PortalResources key=shortTitle/ But, when I execute this from an ActionForm: MessageResources mrs = (MessageResources) request.getAttribute (PortalResources); System.err.println (PortalResources: + mrs); I get: PortalResources: null Thanks, Will - Original Message - From: Matthias Wessendorf [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED]; 'e-denton Java Programmer' [EMAIL PROTECTED] Sent: Wednesday, January 07, 2004 8:49 AM Subject: RE: Resources from ActionForm hi, in an actionForm.validate(): MessageResources res = (MessageResources) request.getAttribute(GLOBALS.MESSAGES_KEY); //thats default-key String foo = res.getMessage(my_Key_In_bundle); //get an message greetings -Original Message- From: e-denton Java Programmer [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 07, 2004 3:42 PM To: Struts Users Mailing List Subject: Resources from ActionForm Hi, I want to access a resource bundle (key=PORTAL_RESOURCES) from an ActionForm to pull out display names for error messages (ActionError). I can't see how to access the resource bundle and pull out the strings I want. Thanks for your help. Will - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
How find out calling page or mapping?
Hi, How can you determine from within an Action: 1. What the calling .jsp page is 2. What the calling ActionMapping is Thanks. Will - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Proper use of ProcessAction, ProcessResult and ResultList
Dear Struts users: For a couple of weeks now, I've been trying to use the ProcessAction class in Struts Scaffold, following the book Struts in Action and the example Artimus application in which it was demonstrated. It's pretty convenient in that it simplifies the design of my business logic classes, making them completely reusable outside of Struts or even a web app. I just have a number of issues with it that I haven't resolved, despite having stepped through the source code and closely studying the Artimus app: 1. How do you display a confirmation message when, say, a record was successfully saved? I use a ProcessResult to wrap the results, and there is a method ProcessResult.addMessage() which seems to allow you to add a message to it. Here is the snippet of code... start of Java code snippet -- ... UserManager manager = getUserManager(); List users = manager.getAllUsers(); ResultList resultList = new ResultListBase(users); result = new ProcessResultBase(resultList); if (resultList.getSize() 0) { result.addMessage(users.found); result.addMessage(new Integer(resultList.getSize())); } else { result.addMessage(users.none.found); } result.setDispatch(success); end of Java code snippet -- and here is the JSP fragment that attempts to display the message... start of JSP fragment - ... logic:messagesPresent UL html:messages id=error LIbean:write name=error//LI /html:messages /UL /logic:messagesPresent logic:messagesPresent message=true UL html:messages id=message LIbean:write name=message//LI /html:messages /UL /logic:messagesPresent ... end of JSP fragment - This is a verbatim copy of the message.jsp in the example Artimus application. However, when I hit the page, an exception is thrown with the message could not find bean message... END OF FIRST ISSUE == 2. How do you set a transactional token? From the code in ProcessAction (at the very end of the preProcess() method), it appears that I have to define a forward whose name is stored in Tokens.SET_TOKEN for a token to be set. Does this mean that I have to define a local forward for each data entry form that I need to guard against multiple submissions? END OF SECOND ISSUE = I hope I've explained the issues above clearly. I've been looking at this for two weeks, searching through the archives for answers without much success. I hope that with this post, someone can give me some clues as to where to look. Thank you very much, and a Happy New Year to all! Noel Lecaros - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
How test for attribute?
Hi, I am trying to test for the presence of a request attribute called PCAT. This works: if (request.getAttribute (PCAT) != null) This doesn't work: logic:present parameter=PCAT /logic:present What Struts logic tag would work? Thanks, Will - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Easy question: iterate
Sorry to bother you with an easy question, but I can't find the answer. I want to iterate over Category_VO[] which is stored in a session attribute. I read that it can be done, but I can't find an example for raw arrays. Here's what I have (which probably doesn't even make sense): logic:iterate id=category collection=com.cnw.portal.database.Category_VO type=com.cnw.portal.database.Category_VO scope=session p bean:write name=category property=shortTitle/ /logic:iterate Thanks! will - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Easy question: iterate
Hi Mark, I tried this: Category_VO[] pcatResults = null; Category_DAO dao= new Category_DAO(); pcatResults = dao.selectTopLevel(); request.getSession (true).setAttribute (PCAT, pcatResults); --- jsp:useBean id=PCAT class=com.cnw.portal.database.Category_VO scope=session / logic:iterate id=category name=PCAT pbean:write name=category property=shortTitle/ /logic:iterate and, I get this: javax.servlet.jsp.JspException: Cannot create iterator for this collection Will - Original Message - From: Mark Lowe [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wednesday, December 24, 2003 12:31 PM Subject: Re: Easy question: iterate //psuedo code. List categoryList = Category.getList(); request.setAttribute(categories, categoryList.toArray()); logic:iterate id=category name=categories /logic:iterate I made the first bit up. But should give you the idea. jsp:useBean id=categories class=com.cnw.portal.database.Category_VO scope=request / may do what you want.. Depends on what methods you've got in there.. Cheers Mark On 24 Dec 2003, at 18:23, e-denton Java Programmer wrote: Sorry to bother you with an easy question, but I can't find the answer. I want to iterate over Category_VO[] which is stored in a session attribute. I read that it can be done, but I can't find an example for raw arrays. Here's what I have (which probably doesn't even make sense): logic:iterate id=category collection=com.cnw.portal.database.Category_VO type=com.cnw.portal.database.Category_VO scope=session p bean:write name=category property=shortTitle/ /logic:iterate Thanks! will - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Easy question: iterate
I's iteratin'! Thanks for all the help. - Original Message - From: Daniel Lipofsky [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED]; e-denton Java Programmer [EMAIL PROTECTED] Sent: Wednesday, December 24, 2003 1:07 PM Subject: RE: Easy question: iterate % LabelValueBean[] lvArray = new LabelValueBean[] { new LabelValueBean(label1, value1), new LabelValueBean(label2, value2), new LabelValueBean(label3, value3), new LabelValueBean(label4, value4) }; request.setAttribute(lvArray, lvArray); % logic:iterate name=lvArray id=row indexId=rowIndex type=org.apache.struts.util.LabelValueBean bean:write name=rowIndex/ - bean:write name=row property=label/ - bean:write name=row property=value/BR /logic:iterate -Original Message- From: e-denton Java Programmer [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 24, 2003 10:24 AM To: Struts Users Mailing List Subject: Easy question: iterate Sorry to bother you with an easy question, but I can't find the answer. I want to iterate over Category_VO[] which is stored in a session attribute. I read that it can be done, but I can't find an example for raw arrays. Here's what I have (which probably doesn't even make sense): logic:iterate id=category collection=com.cnw.portal.database.Category_VO type=com.cnw.portal.database.Category_VO scope=session p bean:write name=category property=shortTitle/ /logic:iterate Thanks! will - 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: How find DataSource?
Merry Christmas, Wow, I finally connected to my data source! Now, I want to put the code somewhere it will be executed only once, and save the DataSource object where Actions, beans, etc. can get at it. That way, I don't have to perform the lookup all the time. Any suggestions on where to put the one time setup code, and where to save the DataSource object reference (in the application?). Thanks again, Will - Original Message - From: Vic Cekvenich [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, December 20, 2003 12:14 PM Subject: Re: How find DataSource? See sample source code section here: http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples-howto.html Ex: Context ctx = new InitialContext(); if(ctx == null ) throw new Exception(Boom - No Context); DataSource ds = (DataSource)ctx.lookup( java:comp/env/jdbc/TestDB); Of course what you do with the data source depends on your DAO implementataion (iBatis, Hibrenate, etc.) .V hylepc wrote: Hi, From a Data Acess Object (DAO), I need to access a DataSource (like getServletContext().getAttribute (Globals.DATA_SOURCE_KEY)). But, I don't have access to the servlet variable. What is the proper way to get the DataSource from a DAO which is called by an Action but doesn't extend Action? Thanks, Will - 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: How find DataSource?
I neglected to mention that my servlet container can be passivated on my virtual host. So, all objects must be serializable and I can't use static variables. - Original Message - From: Vic Cekvenich [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, December 22, 2003 8:31 AM Subject: Re: How find DataSource? I put mine in a static block of the base DAO. (static as in once per class, and all DAO's extend my base DAO). .V e-denton Java Programmer wrote: Merry Christmas, Wow, I finally connected to my data source! Now, I want to put the code somewhere it will be executed only once, and save the DataSource object where Actions, beans, etc. can get at it. That way, I don't have to perform the lookup all the time. Any suggestions on where to put the one time setup code, and where to save the DataSource object reference (in the application?). Thanks again, Will - Original Message - From: Vic Cekvenich [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, December 20, 2003 12:14 PM Subject: Re: How find DataSource? See sample source code section here: http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples-howto.html Ex: Context ctx = new InitialContext(); if(ctx == null ) throw new Exception(Boom - No Context); DataSource ds = (DataSource)ctx.lookup( java:comp/env/jdbc/TestDB); Of course what you do with the data source depends on your DAO implementataion (iBatis, Hibrenate, etc.) .V hylepc wrote: Hi, From a Data Acess Object (DAO), I need to access a DataSource (like getServletContext().getAttribute (Globals.DATA_SOURCE_KEY)). But, I don't have access to the servlet variable. What is the proper way to get the DataSource from a DAO which is called by an Action but doesn't extend Action? Thanks, Will - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [other] error tag
Jerald, The first parameter to ActionMessages.add() is a string interpreted to be either ActionMessages.GLOBAL_MESSAGE or a name of one of your form fields. If you had a field on your form that was named (i.e. property=...) username, then if you wished to add a message pertaining to this field, then you would write: messages.add(username, errorMsg). You're not getting any messages displayed probably because you don't have a form field with property=init_message. Cheers, Noel -Original Message- From: Jerald Powel [mailto:[EMAIL PROTECTED] Sent: Monday, December 22, 2003 12:26 AM To: Struts Users Mailing List Subject: RE: [other] error tag Hi Noel, Thanks for that. Since that post, I have opted for constructing an ActionMessages object and populating it with ActionMessage (s). This being because I hear ActionError/s are deprecated as of Struts 1.2. I have set up the Application.properties file under WEB-INF/classes/resources containing: initialisation.error=Initialisation error - invalid UserID I catch the exception thus: ActionMessages messages = new ActionMessages(); ActionMessage errorMsg = new ActionMessage(initialisation.error); messages.add(init_message, errorMsg); saveMessages(request, messages); and forward off to the error page, but nothing is rendered. Any idea here? Perhaps something to do with the init_message string I am passing? What does that represent? appreciated G. Hi Jerald, The single-string ActionError class constructor that you are invoking interprets the parameter passed to it as a key of a message string defined in your Application.properties file (this file is usually placed under the classes/resources directory). HTH Noel -Original Message- From: Jerald Powel [mailto:[EMAIL PROTECTED] Sent: Sunday, December 21, 2003 9:45 PM To: Struts Users Mailing List Subject: [other] error tag Hello, I am handling my errors and constructing an errors object thus: ActionErrors errors = new ActionErrors(); errors.add(ActionErrors.GLOBAL_ERROR, new ActionError(Initialisation error - userID not found)); saveErrors(request, errors); return mapping.findForward(FORWARD_error); how from the JSP do I iterate over the errors object and retrieve the messages please? I have tried but nothing was rendered to the screen? thanks G - Yahoo! Messenger - Communicate instantly...Ping your friends today! Download Messenger Now - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Yahoo! Messenger - Communicate instantly...Ping your friends today! Download Messenger Now - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Example of a non-threadsafe Action?
Hi! Don't store any request related items in static or instance variables. - Original Message - From: David Erickson [EMAIL PROTECTED] To: Struts Mailing List [EMAIL PROTECTED] Sent: Monday, December 22, 2003 1:02 PM Subject: Example of a non-threadsafe Action? Hey I have been reading a lot about threading lately from the JLS and otherwise.. but my question is what would be an example of a non-threadsafe action? Struts manual said that only one instance of an action exists in the JVM.. and when I run an action each thread creates its own versions of all the variables within the action correct? So assuming I'm not accessing some outside 'global' variable, everything is inherintly threadsafe right? If anyone can give me an example of what 'not' to do that would help tremendously. thanks, David - 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: How find DataSource?
Wow, my personal saga of discovery continues... Apparently I have been trying to set up connection pooling *both* in server.xml context *and* in web.xml unnecessarily. Well, the server.xml works, but then I have the problem of where to store the DataStore object and how my Data Access Objects will access it. Has anyone set up a connection pool using web.xml? Steps? Examples? Tips? I can't even seem to change the driver without problems. And, web.xml doesn't use JNDI, does it? Has anyone used server.xml instead? Where did you keep the DataSource Object? I looked into keeping it in the session, but then I have to pass session to my DAOs--ick. (I am writing my own DAOs.) Vic, I might have two problems with keeping it in a static block. 1. My container can be passivated, so everything must be serializable. 2. I hope to only look it up once for efficiency's sake. Martin, I assume you mean to extend DynaActionForm and override initialize, but that means tying myself to Struts. (Like I'm not already!) Ideally, I shouldn't have to modify the framework. Thanks, Will - Original Message - From: Martin Gainty [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Monday, December 22, 2003 1:41 PM Subject: Re: How find DataSource? how about putting it into DynaActionForm::initialize which initialises the beans anyhow.. -Martin this way your connections are - Original Message - From: Vic Cekvenich [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, December 22, 2003 9:31 AM Subject: Re: How find DataSource? I put mine in a static block of the base DAO. (static as in once per class, and all DAO's extend my base DAO). .V e-denton Java Programmer wrote: Merry Christmas, Wow, I finally connected to my data source! Now, I want to put the code somewhere it will be executed only once, and save the DataSource object where Actions, beans, etc. can get at it. That way, I don't have to perform the lookup all the time. Any suggestions on where to put the one time setup code, and where to save the DataSource object reference (in the application?). Thanks again, Will - Original Message - From: Vic Cekvenich [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, December 20, 2003 12:14 PM Subject: Re: How find DataSource? See sample source code section here: http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples-howto.html Ex: Context ctx = new InitialContext(); if(ctx == null ) throw new Exception(Boom - No Context); DataSource ds = (DataSource)ctx.lookup( java:comp/env/jdbc/TestDB); Of course what you do with the data source depends on your DAO implementataion (iBatis, Hibrenate, etc.) .V hylepc wrote: Hi, From a Data Acess Object (DAO), I need to access a DataSource (like getServletContext().getAttribute (Globals.DATA_SOURCE_KEY)). But, I don't have access to the servlet variable. What is the proper way to get the DataSource from a DAO which is called by an Action but doesn't extend Action? Thanks, Will - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [other] newbie question/problem
How about your struts.jar? You might have multiple copies of it, and the one being picked up happens to be an older copy. -Original Message- From: Jim Anderson [mailto:[EMAIL PROTECTED] Sent: Monday, December 22, 2003 2:23 PM To: Struts Users Mailing List Cc: Jim Anderson Subject: [other] newbie question/problem I've been trying to modify the logon app from Struts in Action to use the new features in Struts 1.1 but am having a problem I haven't be able to solve. I replaced html:errors/ in Logon.jsp with html:messages id=error bean:write name=error/ /html:messages and get the following error: org.apache.jasper.JasperException: /pages/Logon.jsp(7,0) No such tag messages in the tag library imported with prefix html Of course it looks like I'm somehow referencing the 1.0 version of struts-html, but I don't see how that can be. In web.xml I've got: taglib taglib-uri/tags/struts-html/taglib-uri taglib-location/WEB-INF/lib/struts-html.tld/taglib-location /taglib and the struts-html.tld in /WEB-INF/lib contains: !DOCTYPE taglib PUBLIC -//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd; ... tag namemessages/name tagclassorg.apache.struts.taglib.html.MessagesTag/tagclass teiclassorg.apache.struts.taglib.html.MessagesTei/teiclass ... Any ideas??? - 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: [other] RE: Rollover image
In my setup, I had the images in the root of the web application while all the jsps are under WEB-INF/pages. However, I had to specify a URL of /context-root/images/view_over.gif to be able to pick up the images. -Original Message- From: Andy Schmidgall [mailto:[EMAIL PROTECTED] Sent: Monday, December 22, 2003 3:05 PM To: Struts Users Mailing List Subject: [other] RE: Rollover image Apparently ctrl-enter sends the email... :) Here's the example: html:img src=images/view.gif border=0 onmouseover=this.src='images/view_over.gif' onmouseout=this.src='images/view.gif' onmousedown=this.src='images/view_click.gif'/ -Andy -Original Message- From: Andy Schmidgall Sent: Monday, December 22, 2003 2:03 PM To: Struts Users Mailing List Subject: RE: Rollover image You can do it much the same way as with regular html and javascript. Here's an example... -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, December 22, 2003 3:57 AM To: [EMAIL PROTECTED] Subject: Rollover image Hi all I am relatively new to struts and I would like to know how I can create a roll over image using the html:image tag. Would appreciate if some sample piece of code is there.. Thanks in advance Best regards, S - 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: [other] error tag
Hi Jerald, The single-string ActionError class constructor that you are invoking interprets the parameter passed to it as a key of a message string defined in your Application.properties file (this file is usually placed under the classes/resources directory). HTH Noel -Original Message- From: Jerald Powel [mailto:[EMAIL PROTECTED] Sent: Sunday, December 21, 2003 9:45 PM To: Struts Users Mailing List Subject: [other] error tag Hello, I am handling my errors and constructing an errors object thus: ActionErrors errors = new ActionErrors(); errors.add(ActionErrors.GLOBAL_ERROR, new ActionError(Initialisation error - userID not found)); saveErrors(request, errors); return mapping.findForward(FORWARD_error); how from the JSP do I iterate over the errors object and retrieve the messages please? I have tried html:errors/ but nothing was rendered to the screen? thanks G - Yahoo! Messenger - Communicate instantly...Ping your friends today! Download Messenger Now - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: DOTs, wild cards, and action mapping
David Friedman wrote: Thomas, (Probably a) Dumb question From the ${area.name} it looks like you're using Velocity Templates. I thought Velocity couldn't mix with JSP's like that (My impression from ch 17 of 'Struts in Action'. How are you mixing the two? (Or is there a Velocity update which allows it?) I should have noted that I am using tomcat 5.0 also. I am not using Velocity, but merely JSP EL. So no mixing. In debugging, the EL is returning the right thing. Struts is stripping the last .something assuming it is an extension. I guess barring any other comment I will just add a bogus extension to make sure I have no more conflicts. -Tom - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DOTs, wild cards, and action mapping
I started using the wild-card support in action mappings (from a CVS build). It works, but I noticed something strange (until I realized what it was doing). So, I have a action mapping like: action path=/areas/* type=apackage.AreaAction forward name=success path=.area/ /action Then in some jsp I have: html:link title=${area.name} action=/areas/${area.address} Where area.address expands to '10.0.0.1'. Struts will look for the last dot in an action and chop it off. So I keep getting a string like: a href=/managearea/do/areas/10.0.0 title=area1area1/a So I am not using extensions in my struts configuration and I would intuitively think that I would get '10.0.0.1' back. Is this an ambiguity that appeared with the new wildcard support that cannot be resolved (meaning I should never use '.' in any names) or is there some way to resolve this? Perhaps I must always use extensions to combat this (i.e. action=/areas/${area.address}.bogus_extension - which is fine by me as a workaround)? -Tom - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: RES: [OT] Looking for a Taglib
Hi Tiago and Linda, JavaScript is really the best option to this task in my opinion. I suggest taking a look at http://javascript.internet.com in section Form. Lots of nice scripts! Including one script that does what Linda wants. Hope my tip was useful. Regards, Daniel Silva. --- Tiago Henrique Costa Rodrigues Alves [EMAIL PROTECTED] wrote: You will need just JavaScript for this kind of job... You should take a look at: JavaScript DOM It is quite simple to do this... You will see Tiago Henrique C. R. Alves Analista de Sistemas Politec - CSS Tel: 3038-6952 -Mensagem original- De: Linda Coleman [mailto:[EMAIL PROTECTED] Enviada em: segunda-feira, 8 de dezembro de 2003 14:07 Para: [EMAIL PROTECTED] Assunto: [OT] Looking for a Taglib Hi List, I have several pages that need to show users a list of available options in one listbox, an add remove button a list box that shows the options they've already selected. This fairly common in UI's I've seen this on a few web pages something like this... Available States Selected States +++--+ | Alabama|| Connecticut | | Alaska | +-+ | Maine| | Arizona| | Add | | | | Arkansas | +-+ | | | California || | | Colorado | +-+ | | | Delaware | |Remove | | | | Florida| +-+ | | +++--+ I've looked on Google, SourceForge Jakarta for a taglib that would do something like this, without success. Obviously the html taglib will help with the buttons listboxes, but there's a lot of javascript needed to support this kind of widget it would be a lot easier to manage if there was a taglib that could generate it. Does anyone know of a taglib that could help with this and/or another source finding taglibs? Thanks in advance. Linda :) - 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] __ Do you Yahoo!? New Yahoo! Photos - easier uploading and sharing. http://photos.yahoo.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JSTL Question...
Hi Jacob, Try displaytag: http://displaytag.sourceforge.net. It is an amazing piece of code. Regards, Daniel. --- Jacob Wilson [EMAIL PROTECTED] wrote: Hi, I have a question regarding JSTL. Is there anyway to do sorting of the colums on a table using JSTL. I know there is one table tag that does sorting... But, does it sort all the values that is present in the collection or does it do just page level sorting??? Is there any other tag libr ary that takes all the values present in the collection and does a complete sorting??? -Jacob - Do you Yahoo!? The New Yahoo! Shopping - with improved product search __ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How can I compute data for html:select choices?
Hi Bob, I think you could try bean:define/ or, better, JSTL tag c:set/. I'm not a JSTL expert but i know you can determine scope to be used by c:set/. And i'm not sure, but i think you can do that also with bean:define/. Hope it helped you. Regards, Daniel. --- Bob Langford [EMAIL PROTECTED] wrote: Hi, I can't seem to understand how to declare things correctly to do what I want to do. Can anyone tell me where I am going wrong? I'm trying to use a simple Java method as the source of the choices in a html:select box in a form. The method returns a java.util.List, where each item is a org.apache.struts.util.ValueLabelBean object, just what I need for this. Here's one way I tried to use it: = %@ page import=foo.bar.MyUtils % jsp:useBean id=months type=java.util.List / % months = MyUtils.getMonthsList(); % ... html:select ... html:options collection=months property=value labelProperty=label / /html:select = The problem is that useBean looks up the attribute months in the page context, and since it can't find it, throws an exception. But without the useBean tag, the html:options tag can't find the data it needs. I've read the docs until my eyes hurt, and I can't find any technique to tell useBean to merely create a new bean, not fetch an existing one. This seems so easy, I can't believe I haven't done it before, but I can't find an example in any of my previous code. What am I missing? Thanks in advance... -- Bob Langford Silicon Masters Consulting, Inc.8207 Stone River Court, Richmond, VA 23235 phone: 804-674-1253 fax: 804-745-6650 http://www.silicon-masters.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Please help with this error ???en_US.errors.required???
Hi Vivien, Take a look at your web.xml. Maybe you copied it from Struts dist and message-resources was already configured there. As settings in web.xml will override settings in struts-config.xml, classloader can't find resource to be loaded and then you get that messages. Hope i helped you. Kind regards, Daniel. --- Chen, Vivien [EMAIL PROTECTED] wrote: I have a login.jsp which I use DynaValidatorForm. Both the username and password are required fields. When I submited the page without entering these data, I got ???en_US.errors.required??? and ???en_US.errors.required???. It looks like the validation was peformed because I got two error.required messages but I don't understand why it was not able to print the accurate message. please help. Thanks in adavance. In xxxResources.properties: errors.required={0} is required. errors.minlength={0} cannot be less than {1} characters. errors.maxlength={0} cannot be greater than {2} characters. ... In struts-config.xml: form-beans !-- Login form bean -- form-bean name=loginForm type=org.apache.struts.validator.DynaValidatorForm form-property name=username type=java.lang.String/ form-property name=password type=java.lang.String/ /form-bean /form-beans message-resources parameter=xxxResources/ I packaged the xxxResource.properties in my xxx.war: WEB-INF/classes/xxxResources.properties In Validation.xml: form-validation formset form name=loginForm field property=username depends=required,minlength,maxlength arg0 key=prompt.username/ arg1 key=${var:minlength} name=minlength resource=false/ arg2 key=${var:maxlength} name=maxlength resource=false/ var var-namemaxlength/var-name var-value16/var-value /var var var-nameminlength/var-name var-value3/var-value /var /field .. /form - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Please help with this error ???en_US.errors.required???
Hi Vivien, I think it depends on Struts version you are using. I use 1.1 and everything works fine. Your message-resources/ config tells Struts to look for your resources at package org.apache.struts.webapp.tiles.dev1-1. So, you should have, for instance, this: WEB-INF -- | |--- classes -- | |--- org/apache/struts/webapp/tiles/dev1-1 | | - ApplicationResources.properties If you are not using 1.1, please, upgrade to. If problem still happens, you know how to find us. Hope it was useful. Regards, Daniel. --- Chen, Vivien [EMAIL PROTECTED] wrote: Thanks for your tips which gave me some idea what to look for. My web.xml is fine. The problem is I have the following in my struts-config.xml, which I copied/pasted from the strust-config.xml in the Struts tiles_documentation examples. Will my application, which uses tiles, breaks at some point if I don't include it as the comment states? !-- Not used by tiles or this website, but needed due to a bug in actual Struts version -- message-resources parameter=org.apache.struts.webapp.tiles.dev1-1.ApplicationResources null=false / Vivien -Original Message- From: Daniel H. F. e Silva [mailto:[EMAIL PROTECTED] Sent: Fri 10/10/2003 1:44 PM To: Struts Users Mailing List Cc: Subject: RE: Please help with this error ???en_US.errors.required??? Hi Vivien, Sorry, but i did not make myself clear. Property you have to check existence in web.xml is application. It has same effect as parameter attribute of message-resources/. So, if you find it there (web.xml), remove it. Hope it helped you. Regards, Daniel. --- Chen, Vivien [EMAIL PROTECTED] wrote: I checked my web.xml and did not see message-resources being defined there. Do you have any other idea where I might do wrong. I am really stuck with this problem now. Vivien -Original Message- From: Daniel H. F. e Silva [mailto:[EMAIL PROTECTED] Sent: Fri 10/10/2003 9:55 AM To: Struts Users Mailing List Cc: Subject:Re: Please help with this error ???en_US.errors.required??? Hi Vivien, Take a look at your web.xml. Maybe you copied it from Struts dist and message-resources was already configured there. As settings in web.xml will override settings in struts-config.xml, classloader can't find resource to be loaded and then you get that messages. Hope i helped you. Kind regards, Daniel. --- Chen, Vivien [EMAIL PROTECTED] wrote: I have a login.jsp which I use DynaValidatorForm. Both the username and password are required fields. When I submited the page without entering these data, I got ???en_US.errors.required??? and ???en_US.errors.required???. It looks like the validation was peformed because I got two error.required messages but I don't understand why it was not able to print the accurate message. please help. Thanks in adavance. In xxxResources.properties: errors.required={0} is required. errors.minlength={0} cannot be less than {1} characters. errors.maxlength={0} cannot be greater than {2} characters. ... In struts-config.xml: form-beans !-- Login form bean -- form-bean name=loginForm type=org.apache.struts.validator.DynaValidatorForm form-property name=username type=java.lang.String/ form-property name=password type=java.lang.String/ /form-bean /form-beans message-resources parameter=xxxResources/ I packaged the xxxResource.properties in my xxx.war: WEB-INF/classes/xxxResources.properties In Validation.xml: form-validation formset form name=loginForm field property=username depends=required,minlength,maxlength arg0 key=prompt.username/ arg1 key=${var:minlength} name=minlength resource=false/ arg2 key=${var:maxlength} name=maxlength resource=false/ var var-namemaxlength/var-name var-value16/var-value /var var var-nameminlength/var-name var-value3/var-value /var /field .. /form - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional
Re: Struts And iBATIS
Hello Aswathy, Take a loot at this URL: http://www.reumann.net It has a nice example of using iBatis and Struts together. It was designed by a great guy: Rick Reumann. Regards, Daniel. --- Aswathy Priyarenj [EMAIL PROTECTED] wrote: Hello all, Is Struts And iBATIS going smoothly together ? Could u please explore the benefits with iBATIS ? Thanks in advance Aswathy _ The heat is on! Catch the latest action. http://server1.msn.co.in/sp03/formula2003/ Speed along with F1! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] [Reflection/Classes] doing something like instanceof at runtime
Andrew, I don't know if this is the best way, but you can try something like that: boolean isInstanceOf(Object o, String klass) { Class c = null; try { c = Class.forName(klass); } catch (ClassNotFoundException e) { // TODO } return c.isInstance(o); } Regards, Daniel. --- Andrew Hill [EMAIL PROTECTED] wrote: I want to be able to check if an object is an instance or a subclass of a specified class - where that class is specified in a string that is only known at runtime. For example to have the following code print out bobs got a date: boolean isInstanceof(Object o, String klass) { //TODO } java.sql.Timestamp bob = new java.sql.Timestamp(0); if( isInstanceof( bob, java.util.Date ) ) { System.out.println(bobs got a date); } One idea that occured to me was to get the classname of bob, and test against the string, and if that didnt match, to get the classname of that classes superclass ( and test that and so on, but Im wondering if there exists a more efficient technique... - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: bean:write property= Format a Date ?
Hi Mahalkar, You can use JSTL to do that work on your JSP page. Just use formatting standard tags. As Mark said, it is piece of cake. You can use: fmt:formatDate value={$my_property} pattern=my_pattern/ Formatting pattern is exactly the same as patterns used in SimpleDateFormat. Look at JSTL reference docs to more details. Regards, Daniel Silva --- Mark Galbreath [EMAIL PROTECTED] wrote: Just use java.text.DateFormat in your action class and set a String property in your form bean with the result. Easy as pie. -Original Message- From: Abhijeet Mahalkar [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 17, 2003 8:45 AM To: Struts Users Mailing List Subject: Re: bean:write property= Format a Date ? I don't thing struts provide you formating date functionality as i never tried also but frankly it will take another 20 min. to write a function for formatting date.. use string.substring methods and all after retriving the date from DB using getStirng() or use to_char(datefield,'dd/mm/ hh24:mi:ss') or any other format u want. and if you are working with Java Date class then calculate the long value of that with String s = date.getDay()+/+ getMonth()+/getYear() functions it's really simple... regards abhijeet - Original Message - From: [EMAIL PROTECTED] To: Struts-User [EMAIL PROTECTED] Sent: Wednesday, September 17, 2003 6:00 PM Subject: bean:write property= Format a Date ? one of my Bean propertys is a Date and i want to output it formated, is there a way to do that with struts ? Mit freundlichen Grüßen Christian Reps, Dipl. Inf. (FH) Web Applications - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Validator JavaScript and html:radio buttons
Hi all. I have two radio buttons on a page, one both named outcome one with the value of Accepted and one with the value of Rejected. In my validation.xml file, I say that outcome is required. The Javascript checking generated by the Validator framework doesn't give an error if neither on is selected, however the backend will, and produce an error I can see with the html:errors tag. How do I get the javascript to check the radio buttons to make sure one is selected? __ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
nested:iterate rendering fails
Hi all, I have a form with a nested bean. That bean contains a collection I'm trying to iterate with indexed properties. I tried first doing this without the nested tags but had no success. (The page displayed but instead of myForm.nestedBean.element[0].property, I only got element[0].property.) I did add the extra getter and setter to the nestedBean, but I guess Struts expects it to be on the form. I then tried the nested tags based on this post: http://marc.theaimsgroup.com/?l=struts-user http://marc.theaimsgroup.com/?l=struts-userm=105364604308495w=2 m=105364604308495w=2. This seemed promising, but the page won't even render. The relevant part of the stack trace is at the end of this message. My jsp code looks like this: nested:nest property=clientDoc nested:iterate property=defects /tr ... td nested:text property=statusEffectiveDate/ /td /tr /nested:iterate /nested:nest clientDoc is the bean on the form. defects is a collection on the form. statusEffectiveDate is a property of each element in the defects collection. I ran the debugger and can see that NestedIterateTag's property property is set to clientDoc.defects, which seems reasonable, and originalProperty is set to defects. Some attr is trying to be looked up, but it's name is null. I'm using Struts 1.1 rc1. thanks a lot java.lang.NullPointerException at java.util.Hashtable.get(Hashtable.java:329) at org.apache.jasper.runtime.PageContextImpl.findAttribute(PageContextImpl.java :308) at org.apache.struts.util.RequestUtils.lookup(RequestUtils.java:787) at org.apache.struts.util.RequestUtils.lookup(RequestUtils.java:835) at org.apache.struts.taglib.logic.IterateTag.doStartTag(IterateTag.java:277) at org.apache.struts.taglib.nested.logic.NestedIterateTag.doStartTag(NestedIter ateTag.java:123) at org.apache.jsp.doc_0002ddefects_jsp._jspService(doc_0002ddefects_jsp.java:15 8) john gregg Wells Fargo Services Company Minneapolis, MN
iterating through lists in tiles
I am trying to create a list of links using items from a putList in tiles. The end result would be: a href=linkitem/a a href=linkitem/a How do I iterate through both link and item in parallel, so to speak? i.e. how do I modify the code below to get the result I want? tiles:importAttribute/ logic:iterate name=items id=item/ logic:iterate name=links id=link/ html:link page=bean:write name=link/bean:write name=item//html:link /logic:iterate /logic:iterate Thanks. -eva - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: Suggestions for Calendar Popup taglib?
Hi, this calendar popup looks really great. It would be neat, to integrate this directly into some form pages. (not as a pop up) -Ursprüngliche Nachricht- Von: Kruse, Matt [mailto:[EMAIL PROTECTED] Gesendet: Montag, 18. August 2003 16:56 An: Struts Users Mailing List (E-mail) Betreff: Suggestions for Calendar Popup taglib? I'm going to have some free time soon and I plan to convert my calendar popup javascript (http://www.mattkruse.com/javascript/calendarpopup) into a tag lib to be easily used in struts apps. If anyone has suggestions on how it should work or features it should support, please let me know! Also, should it be extending the struts html:input tag, or since those will one day go away, should I be extending a different taglib? I'm more familiar with the struts tags (extended them before) but I want the tag to be useable by the majority of struts developers :) Matt - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Writing Javascript for Validators
Hello All, I've written a new plugable validator rule, and now I'd like to write some javascript for it. Looking at the existing javascript for other validators, I see they all make a call like this: oRequired = new required(); which (in this case) gets all the required fields. I'm not sure what generates this method, but I can see it in my jsp when i put in html:javascript. my new rule is called futuredate. I don't know what sort of method I should call that will be like required(); but give me all the fields marked with furuterdate. How do I do this? Cheers __ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Writing Javascript for Validators
Robert, Warning, I haven't done this before, but need to : The validator-rules.xml and validator.xml file for your project have the same format. In --your-- validator.xml you can enter: form-validation global validator name=futuredate classname=com.matte.futuredate.validator.FieldChecks method=validateFutureDate methodParams=java.lang.Object, org.apache.commons.validator.ValidatorAction, org.apache.commons.validator.Field, org.apache.struts.action.ActionErrors, javax.servlet.http.HttpServletRequest msg=errors.required javascript![CDATA[ function validateFutureDate(form) { ...Your code } ]] /javascript /validator /global My question is this. In that Javascript code, I need to validate the fields. How do I know what fields need to validated? The javascript methods provided by Struts for the other validators seem to call a method that builds an array of all the fields in the form to check, and then do a loop over that array. (for example, the required validator makes a call to a method called required()). My question is what call should I be making? I don't know how the required() method is being generated (it isn't in the validation-rules.xml file, but it appears in the code included by html:javascript. I'm going to need something like a futuredate() method that builds this array, but I don't know where I need to write it (or how I tell struts to build it for me). Does this make sense? Cheers __ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: struts 1.1 question
From the article at link below Direct Requests to JSPs To take the full advantage of sub-application support, Struts 1.1 stipulates the requirement that all requests must flow through the controller servlet, i.e. the ActionServlet. Effectively, this means all JSPs must be fronted by Actions. Instead of allowing direct requests to any of the JSPs, all requests must go through an Action and let the Action forward to the appropriate JSP. This is perhaps the biggest impact of migration to Struts 1.1 if you have not followed this idiom in your applications. This restriction is required because without going through the ActionServlet, Struts navigation taglibs (e.g. html:form and html:link) used in the JSPs will not have the correct sub-app context to work with. http://www.theserverside.com/resources/article.jsp?l=Struts1_1 At 8/11/2003 04:48 PM, you wrote: Where exactly did you read that all jsps must be fronted by actions? I'm using 1.1, and assuredly have NOT (nor will I) front them all with actions. From: e [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: struts 1.1 question Date: Mon, 11 Aug 2003 16:37:28 -0400 I am about to upgrade to struts 1.1 and I have a question. I have a site with a decent amount of content stored in a content manager. I want to use tiles, but I read that in struts 1.1, all jsps have to be fronted by actions. Does this mean that I have to write forwards in strutsconfig.xml for every single jsp on the site? This could add up to a lot of pages. Am I interpreting this correctly? Thanks. -e - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Help STOP SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail - 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]
migrating to struts 1.1
I am trying to migrate my 1.0 app to 1.1. As far as I can tell, I have made the necessary updates/changes. However, when I deploy and try to call up an action, I get the exception below. I am deploying to Silverstream 3.7. Any insight? Exception Information com.sssw.shr.http.AgoServletExceptionjava.lang.NullPointerException -- Stack Trace java.lang.NullPointerException at org.apache.struts.action.ActionServlet.getRequestProcessor(ActionServlet.java:854) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482) at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507) at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at com.sssw.srv.resources.AgWarResource.doServletDispatch(AgWarResource.java:950) at com.sssw.srv.resources.AgWarResource.service(AgWarResource.java:727) at com.sssw.srv.resources.AgWarURLResource.perform(AgWarURLResource.java:114) at com.sssw.srv.http.httpd.perform(httpd.java:4702) at com.sssw.srv.http.Client.processRequest(Client.java:907) at com.sssw.srv.http.Client.loop(Client.java:1278) at com.sssw.srv.http.Client.runConnection(Client.java:1495) at com.sssw.srv.http.Client.run(Client.java:1442) at java.lang.Thread.run(Unknown Source) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
struts 1.1 question
I am about to upgrade to struts 1.1 and I have a question. I have a site with a decent amount of content stored in a content manager. I want to use tiles, but I read that in struts 1.1, all jsps have to be fronted by actions. Does this mean that I have to write forwards in strutsconfig.xml for every single jsp on the site? This could add up to a lot of pages. Am I interpreting this correctly? Thanks. -e - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [OT] TLD question
Anybody on the list migrate from struts 1.0 to struts 1.1 running on silverstream 3.7? I've been trying to get it to work and I keep getting null pointer exceptions, and I'm wondering if there is something random I'm missing. Thanks. -e - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: struts 1.1 question
I guess it just seems like extra work that doesn't yield obvious benefits, not unlike having to do all those getters/setters in 1.0, but I guess if I had to choose between the two, I'd choose this. I guess I'm also partial to the familiar file extensions like .jsp..do never did it for me, though I guess I can come up with something more to my liking. I do like the idea of modules and was planning on using them, so I guess I'll be doing the right thing whether I like it or not. Of course I have to get struts 1.1 to work first, oh joy. -e At 8/11/2003 04:48 PM, you wrote: Yup. It really isn't so bad. A lot of pages of what? You need a lot of pages even without Struts if your site has a lot of content. You don't have any extra JSP pages because of it but it makes you Struts config file a little longer than if you didn't have to map all your JSPs. But then that (config file size) is one reason you can break down your struts config into multiple files per module. Goes back to a point I made last week that config info might be better served in say the LDAP compared to a flat file. Unless the framework is willing to do inefficient constant file reads to get the actions mappings then it means all the Struts config info has to be loaded into memory. If you site has 1 mappings could you imagine the memory usage? But the LDAP is made for fast reads, perfect for something which doesn't change much, like config information. Wouldn't that be nice for a large Enterprise site? -Original Message- From: e [mailto:[EMAIL PROTECTED] Sent: Monday, August 11, 2003 4:37 PM To: Struts Users Mailing List Subject: struts 1.1 question I am about to upgrade to struts 1.1 and I have a question. I have a site with a decent amount of content stored in a content manager. I want to use tiles, but I read that in struts 1.1, all jsps have to be fronted by actions. Does this mean that I have to write forwards in strutsconfig.xml for every single jsp on the site? This could add up to a lot of pages. Am I interpreting this correctly? Thanks. -e - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Date format
Hi all, Well, i recommend using JSTL tag formatNumber with type='currency'. You can do this way: %@ taglib uri=http://java.sun.com/jstl/fmt; prefix=fmt % fmt:setLocale value=pt_BR/ fmt:formatNumber value=${your_property} type=currency/ It worked for me. Regards, Daniel Silva --- Tamia_Ramírez [EMAIL PROTECTED] wrote: THIS CODE BECOME A JAVA.UTIL.DATE WITH FORMAT: dd/MM/ to a date MMM dd, : SimpleDateFormat dateFormatter = new SimpleDateFormat(MMM dd, ); String new_Date = dateFormatter.format(myDate); reservacion.setFechaSalString(new_Date); you may need to import java.text first. I hope it can help to you too... it works for me. -Original Message- From: Silverio Wagner Silva(Secorp) [mailto:[EMAIL PROTECTED] Sent: Friday, August 01, 2003 10:33 AM To: 'Struts Users Mailing List' Subject: RES: Date format java.util.Date -Mensagem original- De: Tamia Ramírez [mailto:[EMAIL PROTECTED] Enviada em: sexta-feira, 1 de agosto de 2003 13:33 Para: Struts Users Mailing List Assunto: RE: Date format with type is your date, java.sql or java.util? -Original Message- From: Silverio Wagner Silva(Secorp) [mailto:[EMAIL PROTECTED] Sent: Friday, August 01, 2003 10:27 AM To: 'Struts Users Mailing List' Subject: Date format A beginner question: When my date field is shown in my jsp it appears in a different way, although my Locale object is correctly set. Anyone knows how to solve this problem? Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Form Bean Help?
Hello All, I'm running into a little problem, maybe someone can help me fix it. My application is driven by filling out web forms. At one point, A user can click the Save Form button, which writes the form information to a Database. When the user visits the page again, the action builds a DTO that contains all the information they had filled out and puts it in the session scope, then forwards to the JSP page that has the form on it. I had been using the value property of the struts-html tags to fill in the data, but I've noticed that when the user hits submit, if there is a validation error, they are pushed back to the page, and the data they had enetered is replaced with what was in the DTO (which is now old data). I've also run into the problem of filling in things like radio buttons, based on what was in the DTO. It seems to me that what I want to do is not pass along the DTO with the action, but fill out parts of the Form Bean before forwarding to the page that displays it, at which point I could remove the value properties of the html tags, and have everything work. My question is, how can I do this from the action? Or do I want to attack this problem in another way? Thanks! __ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Form Bean Help?
Mike, The bean is stored in the Session scope (the bean needs to be stored in the session scope, so that some other data for it which is valid for the life of the session stays around). Even if it was a request scoped bean, I'd still like a way to fill out the action form before hand, because then things like Radio buttons could be preselected based on what I loaded from the database. Cheers. --- Mainguy, Mike [EMAIL PROTECTED] wrote: My angle on this is to only load the data from the database when the user is submitted a request to read data. If they are submitting an update action, I don't load the data from the database. -Original Message- From: Matt E [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 29, 2003 12:37 PM To: [EMAIL PROTECTED] Subject: Form Bean Help? Hello All, I'm running into a little problem, maybe someone can help me fix it. My application is driven by filling out web forms. At one point, A user can click the Save Form button, which writes the form information to a Database. When the user visits the page again, the action builds a DTO that contains all the information they had filled out and puts it in the session scope, then forwards to the JSP page that has the form on it. I had been using the value property of the struts-html tags to fill in the data, but I've noticed that when the user hits submit, if there is a validation error, they are pushed back to the page, and the data they had enetered is replaced with what was in the DTO (which is now old data). I've also run into the problem of filling in things like radio buttons, based on what was in the DTO. It seems to me that what I want to do is not pass along the DTO with the action, but fill out parts of the Form Bean before forwarding to the page that displays it, at which point I could remove the value properties of the html tags, and have everything work. My question is, how can I do this from the action? Or do I want to attack this problem in another way? Thanks! __ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This message and its contents (to include attachments) are the property of Kmart Corporation (Kmart) and may contain confidential and proprietary information. You are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on information contained herein is strictly prohibited. Unauthorized use of information contained herein may subject you to civil and criminal prosecution and penalties. If you are not the intended recipient, you should delete this message immediately. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Writing values from javabeans to html tags.
Hello All! I'm trying to give an inital value to one of the fields in a form in an application of mine. I had tried this: html:textarea property=comments rows=4 cols=50 value=%=requestDTO.getComments()% Since I had read that you couldn't use bean:write tag in the value attribute of the html tags. However this gives me an error in tomcat: org.apache.jasper.JasperException: Unable to compile /int0/opt/tomcat/b331/work/DEFAULT/tir/pla/ReviewRequest_3.java:899: Undefined variable or class name: requestDTO _jspx_th_html_textarea_0.setValue(requestDTO.getComments()); The bean in question (requestDTO) is session scoped. I can use bean:write to write out the value, so I know it's there. What do I need to do so that %=requestDTO.getComments()% works also? __ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: Online Multiple Choice Testing System--Struts will be considered...
Hi, I did this (more or less) using Struts and Hibernate an it worked very well. You may have a look at http://it-performance.net using gast/gast as login. Sincerly, -Ursprüngliche Nachricht- Von: nurkhamid [mailto:[EMAIL PROTECTED] Gesendet: Montag, 14. Juli 2003 09:17 An: [EMAIL PROTECTED] Betreff: Online Multiple Choice Testing System--Struts will be considered... I'm going to design a web application. I'll call the great project Online Multiple Choice Testing System, that could be deployed in my LAN-ed campus. There will be at least three types of users: guest, tester, testee. Guest is able to see general information. Testee is able to log in and do a test of her choice. Tester is able to create, edit, delete, and manage test. Tester can have more than one set of test. Tester is also able to make her test as active meaning that it can be used by testee; as disabled meaning that the test is inactive-inaccessible by testee; as active for certain time and date period meaning that the test can only be done only at predertermined time period. Tester is also able to analyze her test items, such as statistical analysis. Maybe the fourth type of user will be better, i.e., admin with task to manage the system such as limiting number of test that can be created by the tester. Other possibilities may occur later. Questions are: How should I implement the above project (using Java technology) with regard to should I use struts or not? What will be the benefits of each approach-with or without struts? With regard to ease of implementation, because I'm new to web application, which one will be easier-with or without struts (for a newbie-r)? why? However, I'm tempted to use struts. When I use struts, what simple steps should I do to finish the project? Are there similar examples (using struts) found at the Net that I can cusomize to my purpose? In this case, I'm going to use MySQL as database engine. Thanks for your suggestions and opinions. - 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: Converting an ActionError to a string programmatically
Example: ConfigHelper helper = new ConfigHelper(); helper.setApplication(servlet.getServletContext()); MessageResources messageResources = helper.getMessageResources(); ActionErrors errors = searchProductMasksForm.validate(actionMapping,request); if (errors !=null !errors.isEmpty()) { Vector verr = new Vector(); for(Iterator er = errors.get();er.hasNext();) { ActionError err = (ActionError)er.next(); String message = MessageResources.getMessageResources (resources.application).getMessage(request.getLocale(),err.getKey(),err.ge tValues()); verr.add(message); if (log.isDebugEnabled()){ log.debug(message=+message); } } } S privetom, Slava -Original Message- From: Kornelis Sietsma [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 09, 2003 5:12 AM To: [EMAIL PROTECTED] Subject: Converting an ActionError to a string programmatically Hi all. I am looking for a good way to turn an ActionError into a string, without having a PageContext or anything else so useful (so I can't use the RequestUtils.message() function). Is there a simple way to do this? I can probably do it the hard way, by digging through the RequestUtils source and working out what it does, but I'm hoping that either (a) there is another utility class I've missed that will do this, or (b) someone else has done this and can save me the pain! The reason I need this is that I have some code that updates a back-end system, and returns ActionErrors if there are any validation failures. Usually this gets called from a struts action, and the errors get displayed to the user with the errors/ tag. However, now we need to do some background batch updates, called from a thread spawned from a servlet (which is outside our normal struts pages). The batch process is likely to be slow, and so we want the results of any validation failures to get logged to an error file, rather than getting displayed to the user. Any suggestions? - Korny -- Kornelis Sietsma http://www.sietsma.com/korny [EMAIL PROTECTED] goofey: korny yahoo: kornysietsma icq: 2039172 ph: 0421 079 693 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Struts Taglib DTD's and Firewalls
Hello All. I'm attempting to deploy a Struts project to a server here at work. Whenever I try to access any pages in it I get this error: org.apache.jasper.compiler.CompileException: /int0/webdata/swtools/apps/tir/toolDevelopmentRequest.jsp(0,0) Unable to open taglibrary /WEB-INF/struts-html.tld : Parse Error in the tag library descriptor: External entity not found: http://java.sun.com/dtd/web-app_2_3.dtd;. I think this is due to a firewall that blocks all access to external sites unless you have entered a username and password. From my local machine I can access the dtd. Is there anyway to put a copy of it on the local machine, and then tell the tag libs to look at the local copy of the dtd? I don't want to try to get a hole broken in the firewall for this. Thanks all! __ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Struts Taglib DTD's and Firewalls
Kevin, I downloaded all the DTDs and editied the taglib and XML files to remove the url but keep the DTD. I now get this error: org.apache.jasper.compiler.CompileException: /int0/webdata/swtools/apps/tir/toolDevelopmentRequest.jsp(0,0) Unable to open taglibrary /WEB-INF/struts-html.tld : Parse Error in the tag library descriptor: Relative URI web-app_2_3.dtd; can not be resolved without a base URI. What do I need to do to tell the xml/tld files that the dtd is in the same directory as the other files? Do I have to put an absoulte URL or can I get away with a realitive path somehow? Thanks --- Kevin Peters [EMAIL PROTECTED] wrote: That's what we did. We downloaded all of the DTDs our application references so we can point to a local copy. Make sure you keep them current, though. Kevin -Original Message- From: Matt E [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 25, 2003 10:06 AM To: [EMAIL PROTECTED] Subject: Struts Taglib DTD's and Firewalls Hello All. I'm attempting to deploy a Struts project to a server here at work. Whenever I try to access any pages in it I get this error: org.apache.jasper.compiler.CompileException: /int0/webdata/swtools/apps/tir/toolDevelopmentRequest.jsp(0,0) Unable to open taglibrary /WEB-INF/struts-html.tld : Parse Error in the tag library descriptor: External entity not found: http://java.sun.com/dtd/web-app_2_3.dtd;. I think this is due to a firewall that blocks all access to external sites unless you have entered a username and password. From my local machine I can access the dtd. Is there anyway to put a copy of it on the local machine, and then tell the tag libs to look at the local copy of the dtd? I don't want to try to get a hole broken in the firewall for this. Thanks all! __ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] *** This electronic mail transmission contains confidential and/or privileged information intended only for the person(s) named. Any use, distribution, copying or disclosure by another person is strictly prohibited. *** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Passing Information with forward
Hello All. I'm running up a problem and I'm not sure how to solve it. In my application, there is an action called PLAReview. An e-mail is sent to someone telling them to click on a link that looks like this: http://www.whatever.com/PLAReview.do?id=1 The Action PLAReview uses that ID number to pull some data out of a database, push it into a DTO, put the DTO in the request scope, and then calls mapping.findForward(Success); which forwards to another jsp page. This page prints out all the data from the DTO, and also has a few form feilds that the user needs to complete, and then submit. I'm rendering a html:hidden object on this second page, that will hold the id of this request (the same ID value from above), but I don't know how to get it there. I tried doing: html:hidden property=id/ But that didn't seem to work because I think it wants to get the ID property from the ActionForm object tied to the form, which doesn't have the correct value. I need a way to get that value from the first URL, and also make sure that if validation fails and the form is redisplayed, the value for ID is pulled from the ActionForm (since I think the initial id from the first URL will be lost). Does this make any sense? Cheers! __ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Adding to JavaScript Validator
Hello All. I'm using Struts 1.1rc2 with the Validator Frame work. I have some conditional validation that has to be done (if this option is selected, then some other field must be filled out). Everything works fine when I mess around with the validate method of the action form, but I don't know what I need to do so get JavaScript validation working. I'd like to have a way to call my own methods in adition to the ones called when I use html:javascript form=myForm and have all the errors pop up in the same error box. Is there an easy way to do this? __ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Newbie: Passing information from an Action to a JSP
Hello All, Here's what I want to do. I have an action called LookupRequest. It has some code that gets data out of a Database, builds a Data Transfer Objects from it, and then will forward to another jsp using ActionMapping. However, in that JSP I need to access the data transfer object that I just built in the action. I'm unsure how to keep this object around for the rest of the request, so I can access it in the JSP that is forwarded to. I'm sure I'm missing something trivial, but I don't know how I should do this. Thanks! __ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: logic:iterate problems
) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:594) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:392) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619) at java.lang.Thread.run(Thread.java:536) --- guo yingshou [EMAIL PROTECTED] wrote: try something like: % Collection c = org.ellism.tir.util.DatabaseConstantsAdapter.getInstance().getProductLines(); request.setAttribute(colName,c); % and then: logic:iterate id=... collection=colName... /logic:iterate you can alse put your collection into the jsp scope variable somewhere in your action. hope it helps. guo --- Matt E [EMAIL PROTECTED] µÄÕýÎÄ£º Hello All! I'm running into some problems getting the logic:iterate tag to work. I have a class who's full name is org.ellism.tir.util.DatabaseConstantsAdapter. It has a public method, getInstance() that returns an instance of itself (The class itself is a singleton). This class has a method getProductLines() that returns an ArrayList full of org.ellis.tir.util.ProductLineToken objects. I'd like to iterate over this collection and print some stuff out. I've tried this: %@ taglib uri=/WEB-INF/struts-html.tld prefix=html % %@ taglib uri=/WEB-INF/struts-bean.tld prefix=bean % %@ taglib uri=/WEB-INF/struts-logic.tld prefix=logic % ...Lots of HTML code... logic:iterate id=productLine collection=% org.ellism.tir.util.DatabaseConstantsAdapter.getInstance().getProductLines(); % The name is: bean:write name=productLine property=name/. /logic:iterate However this doesn't seem to work, I get this error: org.apache.jasper.JasperException: Cannot create iterator for this collection ..Stack Trace I'm not sure why this happens? The object returned by org.ellism.tir.util.DatabaseConstantsAdapter.getInstance().getProductLines() is of type ArrayList, and I thought that was a valid collection to iterate over? Any insights would be wonderful. Cheers! __ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Do You Yahoo!? Á÷Á¬ÍøÂçÊÀ½çµÄ¡°Ä㡱ÊÇË£¿ http://cn.rd.yahoo.com/mail_cn/tag/?http://cn.surveys.yahoo.com/cn_user_profile_study_may2003 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: logic:iterate problems
% Collection c = ...getProductLines(); Iterator it = c.iterator(); out.print(it); % This worked as expected. It wrote: [EMAIL PROTECTED] to the HTML, which leads me to belive that the collection is returning an iterator. I then tried this (after deleting the above): % Collection c = ...getProductLines(); request.setAttribute(colName,c); % logic:iterate id=productLines collection=colName Is this working? /logic:iterate However, when I introduce the logic iterate tag, I get the same Cannot create iterator for this collection error. I'd really like to not have to drop back to coding Java to do the Iteration, since the taglib seems cleaner to me. Any ideas what to try? __ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: logic:iterate problems
Hello! Changed the code to read: % Collection c = ...getProductLines(); Iterator it = c.iterator(); out.print(it); pageContext.setAttribute(colName,c); % However it still fails with the same problem. Cheers. --- Valery Jacot [EMAIL PROTECTED] wrote: Hello, Try to put your collection in the pageContext and not in the request... Strut's tags works a lot with the pageContext... -Original Message- From: Matt E [mailto:[EMAIL PROTECTED] Sent: mardi, 17. juin 2003 17:09 To: Struts Users Mailing List Subject: Re: logic:iterate problems % Collection c = ...getProductLines(); Iterator it = c.iterator(); out.print(it); % This worked as expected. It wrote: [EMAIL PROTECTED] to the HTML, which leads me to belive that the collection is returning an iterator. I then tried this (after deleting the above): % Collection c = ...getProductLines(); request.setAttribute(colName,c); % logic:iterate id=productLines collection=colName Is this working? /logic:iterate However, when I introduce the logic iterate tag, I get the same Cannot create iterator for this collection error. I'd really like to not have to drop back to coding Java to do the Iteration, since the taglib seems cleaner to me. Any ideas what to try? __ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] *** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager to [EMAIL PROTECTED] *** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: logic:iterate problems
Worked like a charm. I noticed that you removed the collection argument and changed it to a name argument. For the archives, here's the complete code: % Collection c = org.ellism.tir.util.DatabaseConstantsAdapter.getInstance().getProductLines(); pageContext.setAttribute(productLineCollection,c); % logic:iterate id=productLine name=productLineCollection Next element is bean:write name=productLine property=name/ /logic:iterate Thanks! --- Chen, Gin [EMAIL PROTECTED] wrote: logic:iterate id=productLines name=colName Next element is bean:write name=productLines property=blah/ /logic:iterate Doesn't matter what scope you put it in. -Tim -Original Message- From: Matt E [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 17, 2003 11:23 AM To: Struts Users Mailing List Subject: RE: logic:iterate problems Hello! Changed the code to read: % Collection c = ...getProductLines(); Iterator it = c.iterator(); out.print(it); pageContext.setAttribute(colName,c); % However it still fails with the same problem. Cheers. --- Valery Jacot [EMAIL PROTECTED] wrote: Hello, Try to put your collection in the pageContext and not in the request... Strut's tags works a lot with the pageContext... -Original Message- From: Matt E [mailto:[EMAIL PROTECTED] Sent: mardi, 17. juin 2003 17:09 To: Struts Users Mailing List Subject: Re: logic:iterate problems % Collection c = ...getProductLines(); Iterator it = c.iterator(); out.print(it); % This worked as expected. It wrote: [EMAIL PROTECTED] to the HTML, which leads me to belive that the collection is returning an iterator. I then tried this (after deleting the above): % Collection c = ...getProductLines(); request.setAttribute(colName,c); % logic:iterate id=productLines collection=colName Is this working? /logic:iterate However, when I introduce the logic iterate tag, I get the same Cannot create iterator for this collection error. I'd really like to not have to drop back to coding Java to do the Iteration, since the taglib seems cleaner to me. Any ideas what to try? __ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] *** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager to [EMAIL PROTECTED] *** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com - 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] __ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
logic:iterate problems
Hello All! I'm running into some problems getting the logic:iterate tag to work. I have a class who's full name is org.ellism.tir.util.DatabaseConstantsAdapter. It has a public method, getInstance() that returns an instance of itself (The class itself is a singleton). This class has a method getProductLines() that returns an ArrayList full of org.ellis.tir.util.ProductLineToken objects. I'd like to iterate over this collection and print some stuff out. I've tried this: %@ taglib uri=/WEB-INF/struts-html.tld prefix=html % %@ taglib uri=/WEB-INF/struts-bean.tld prefix=bean % %@ taglib uri=/WEB-INF/struts-logic.tld prefix=logic % ...Lots of HTML code... logic:iterate id=productLine collection=% org.ellism.tir.util.DatabaseConstantsAdapter.getInstance().getProductLines(); % The name is: bean:write name=productLine property=name/. /logic:iterate However this doesn't seem to work, I get this error: org.apache.jasper.JasperException: Cannot create iterator for this collection ..Stack Trace I'm not sure why this happens? The object returned by org.ellism.tir.util.DatabaseConstantsAdapter.getInstance().getProductLines() is of type ArrayList, and I thought that was a valid collection to iterate over? Any insights would be wonderful. Cheers! __ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Problems with Locale and MessageResources
Hi all, I am needing help. I am getting in trouble with Locale and MessageResources stuff. When my JSP having a html:messages tag renders it is printing ???en_US.my_property_name???. I know this is because i configured message-resources null=false parameter=com.sbpi.jsiw.resource.ApplicationResources/ Well, i have a file with name ApplicationResources.properties located at com/sbpi/jsiw/resource folder below WEB-INF/classes. So it is at my application classpath. I also have a file with name ApplicationResources_en_US.properties at that same folder. But i'm still getting ???en_US.my_property_name??? stuff. I tried with Resin-2.1.9 and with Tomcat-4.1.24. It happens on both. Now tell me: what am i doing wrong? Thanks in advance, Daniel. __ Do you Yahoo!? Yahoo! Calendar - Free online calendar with sync to Outlook(TM). http://calendar.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] I'm tired of restarting tomcat!
Hi Fabio, I know Tomcat is reference implementation and its license is great, but i can't loose my time with issues like that you reported. So, i use Resin at my development environment. Let it take a chance. But if you still prefer Tomcat, use 4.1.24. Maybe this issue was solved. I think 4.1.24 is a nice try! Best regards, Daniel Silva. --- Fabio Mancinelli [EMAIL PROTECTED] wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hello all, this is somewhat off-topic but I don't know why I have this behaviour. I deployed my struts application on tomcat 4.1.18 and randomly, it stops serving requests (it waits forever on index.jsp). In the log files I always notice an exception: 003-05-27 16:30:09 StandardWrapperValve[default]: Servlet.service() for servlet default threw exception java.net.SocketException: Connection reset at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:96) at java.net.SocketOutputStream.write(SocketOutputStream.java:136) at org.apache.coyote.http11.InternalOutputBuffer$OutputStreamOutputBuff ... The only way to restore the normal behaviour is to restart tomcat. Does anyone know why I get this behaviour? A presto, Fabio - -- - --- Fabio Mancinelli, PhD student EMail : [EMAIL PROTECTED] Dipartimento di Informatica WWW : http://www.di.univaq.it/~mancinel Universita' dell'Aquila - --- -BEGIN PGP SIGNATURE- Version: GnuPG v1.2.1 (GNU/Linux) Comment: Made with pgp4pine 1.75-6 iD8DBQE+04t76dsQbk2R3cMRAgHrAKCjXY+NqIChZrIhZsCNw7/923Fb+ACghEFq +/DiCrnBlm2xQCZarq9gr+A= =Yu0y -END PGP SIGNATURE- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? The New Yahoo! Search - Faster. Easier. Bingo. http://search.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Does a degree matter?
Hi all, Just my two cents. Craig's viewpoint is good for american-like degrees. But there are many different education systems all over the world. For example, in my country (Brazil), Comp Sci bachelor's degree from public universities don't teach nothing more than old theory. We study Automata theory, Graph theory, Calculus, Algebra, Physics, Statistics and Algorithms as course basis and we have specialized disciplines where we study more specific theory like: DataBases theory, Operating Systems theory, Programming Language theory, Compilers theory, Data transmission, Computer Networks, Computer Networks Management, Artificial Intelligence, Functional programming, Logic programming, Object-Oriented programming, Object-Oriented analysis, Project management, etc. And at my university (University of Brasilia) we have to take some optional (not so much) courses to get our degree. They are: Management, Accounting, Economics, Sports, Political science, Philosophy, English, Operational research, Law science etc. Our professors don't teach programming languages like Java, C, Pascal, Lisp, Prolog, FORTRAN. They delegate this task to students. I think it is a hard course but it's worth it. Best regards, Daniel. --- apachep2 [EMAIL PROTECTED] wrote: Sorry, I am not intended to offend any one subscribed to this list. I just can't be more agreed with Craig's view. BTW, I was actually forwarding this email to my boss but accidentally click the Reply. -Original Message- From: apachep2 [mailto:[EMAIL PROTECTED] Sent: March 31, 2003 9:57 AM To: 'Struts Users Mailing List' Subject: RE: Does a degree matter? This guy always has a different but brighter/cleverer view than others. No wonder why he is leading the development of many open source projects. -Original Message- From: Craig R. McClanahan [mailto:[EMAIL PROTECTED] Sent: March 30, 2003 12:45 AM To: Struts Users Mailing List Subject: Re: Does a degree matter? On Sat, 29 Mar 2003, Arron Bates wrote: Date: Sat, 29 Mar 2003 20:36:21 -0600 From: Arron Bates [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: Re: Does a degree matter? Brandon, If you can do the deed (which it sounds like you can), I would hazard offering my opinion in thinking that it wouldn't be the best use of your time. By education I'm a graphic designer, not a computer scientist. First job was web design, programmer ever since. Results... I've only had two places not take me on because it's not a computer degree. Two interviews of hundreds. My personal experience (both for myself and for folks I have hired over the years) mirrors this -- indeed, my personal opinion is that a Comp Sci degree is worth less (to me as an employer) than a degree in some field that is more closely associated with the general needs of potential employers. Why? A couple of reasons: * Many folks who go for Comp Sci degrees obsess over learning the particular technologies being taught in their classes, at the expense of courses to improve your general thinking skills. Any specific technology you learn in your first year is going to be totally obsolete by the time you graduate from the program anyway, so why bother? The important skill to employers (at least from my viewpoint) is that you've learned how to quickly adapt your existing skills to new technologies as they become available. Also, the fundamentals of good architecture and design practices tend to change much more slowly than the favorite language de jour -- so if you decide to go for Comp Sci, focus on fundamentals like O-O, design patterns, and so on. * Many folks who go for Comp Sci degrees are so focused on the technical things, and don't accumulate any domain knowledge along the way that would make you *more* valuable to potential employers than another Comp Sci graduate with similar skills. If you're building e-commerce systems, do you know anything about the fundamental accounting principles involved in tracking purchases? If you're building systems to introduce novices to the world of online information, have you ever studied any human factors engineering? If you're building trading systems for a Wall Street broker, do you have the slightest idea how stock and commodity exchanges work? It may surprise some of you to find out that I don't have a Comp Sci degree at all -- instead, I got a BA in Business with a focus on Accounting. This was ***tremendously*** helpful in setting me apart from everyone else who was learning programming and systems analysis in those days -- I could immediately communicate with the end users responsible for the systems we were building, using their vocabulary, without having to be trained -- in addition to the fact that I was a fair-to-middlin' programmer
requiredif and null
Hi all, I'm doing validation on a form where I have 3 dependent fields. If any one is present, they all must be present. I set-up my validation by saying A depends on B depends on C depends on A. I know this worked at one time. Currently I'm using 1.1 rc1 and previously was using 1.1 b3. I don't know when this stopped working. While stepping though the jsp generation with a debugger, I can see that value= is being written even when the form values are null. The server-side validation then sees empty strings instead of nulls, so my validation doesn't work. BaseFieldTag.doStartTag() is automatically writing empty strings instead of nulls. Should I take a completely different approach? thanks john john gregg Wells Fargo Services Company Minneapolis, MN
trimming fields in bean and html tags
Hi all, I'm forced to live with a db where many columns are chars instead of varchars. In cases where the contents of the char column doesn't fill the space allowed, I get my result padded with spaces. The practical problem that this introduces is that if I want to use the validator to enforce length restrictions (where the max length is the db column width), a user can't just put his cursor at the end of the visible text and start typing because of all the spaces. I was hoping for a way to specify in bean:write and html:text to trim any extra spaces but see no such option. Any suggestions? thanks john john gregg Wells Fargo Services Company Minneapolis, MN
[OT] BeanUtils property copying facility
Hi all, Forgive me for posting an off-topic e-mail but i am needing help and as some contributors to Jakarta Commons-BeanUtils read messages from this list i thought you could help me. Is there a feature in commons-beanutils where i can copy properties from a bean to a map instance? Best regards, Daniel. __ Do you Yahoo!? Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop! http://platinum.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [OT] BeanUtils property copying facility
Hi all, I'd like to thank everybody for helping me. I think describe method will work. But to that guys that said copyProperties would do the job i don't think so. Looking at code of commons-beanutils 1.6.1 (latest available) i can't see that code working with destination bean being a Map instance. Is my guessing right? Best regards, Daniel. --- Ady Das O'Toole ady.daso'[EMAIL PROTECTED] wrote: BeanUtils.copyProperties -Original Message- From: Daniel H. F. e Silva [mailto:[EMAIL PROTECTED] Sent: 24 March 2003 14:31 To: [EMAIL PROTECTED] Subject: [OT] BeanUtils property copying facility Hi all, Forgive me for posting an off-topic e-mail but i am needing help and as some contributors to Jakarta Commons-BeanUtils read messages from this list i thought you could help me. Is there a feature in commons-beanutils where i can copy properties from a bean to a map instance? Best regards, Daniel. __ Do you Yahoo!? Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop! http://platinum.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail has been scanned for all viruses by Star Internet. The service is powered by MessageLabs. For more information on a proactive anti-virus service working around the clock, around the globe, visit: http://www.star.net.uk ** The information contained in this e-mail may be confidential. It is intended only for for the use of the named recipient. If you are not the named recipient please delete this e-mail. If you have received this e-mail and are not the named recipient, any disclosure, reproduction, distribution or other dissemination or use of the information contained in this e-mail is strictly prohibited. E-mail transmission cannot be guaranteed to be secure or error free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required please request a hard copy version. Registered Office: Camelot Group plc Tolpits Lane Watford WD18 9RN Tel: 01923 425000 Registered in England and Wales No. 2822203 ** This e-mail has been scanned for all viruses by Star Internet. The service is powered by MessageLabs. For more information on a proactive anti-virus service working around the clock, around the globe, visit: http://www.star.net.uk - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop! http://platinum.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: struts + resin
Guys, I use Resin-2.1.8 and don't have problems. How are you deploying your application? Could you post here problematic part of your resin.conf file? Instead of configuring my application at resin.conf i put it at webapps folder and configure my application in web.xml according to Servlets and JSP spec. This works for me in all cases. Best regards, Daniel. --- Sander Hofstee [EMAIL PROTECTED] wrote: Sounds like a problem we had with a custom tag, worked fine in tomcat, not in Resin. Resin seems to have problems with custom tags and static parameters, don't know why. This is the how we solved it , seems to work: html:form action=%= /login.do % Matt Redman wrote: Hi, I have created a web app based around the struts framework and successfully deployed and run the application on Tomcat 4.0.4. Our clients have required that this hook into IIS, so we have attempted to port the application over to Resin 2.1.8. When resin renders the html:form action=/login.do /html:form element in the page, instead of the form's action being form name=loginForm action=/ormisweb/login.do it renders as the name of the web app.. (called ormisweb in resin.conf - web-app id='/ormisweb' /) form name=loginForm method=POST action=/ormisweb Anyone had any experience with this issue? Cheers, Matt. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop! http://platinum.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Html:Options usage
thanks for replying but the solution doesn't work, so I changed it a bit: logic:iterate name=filters id=filters indexId=filterIndex html:select property='%=filter+filterIndex%' html:optionsCollection property=filters label=label value=value/ /html:select /logic:iterate and I got this error: Error Message: No getter method available for property filter0 for bean under name org.apache.struts.taglib.html.BEAN Error Code: 500 Target Servlet: null Error Stack: javax.servlet.jsp.JspException: No getter method available for property filter0 for bean under name org.apache.struts.taglib.html.BEAN at org.apache.struts.taglib.html.SelectTag.doStartTag(SelectTag.java:309) du Plessis, Corneil C [EMAIL PROTECTED] wrote: 'name=filter label=label value=value/ -Original Message- From: e gg [mailto:[EMAIL PROTECTED] Sent: 17 March, 2003 15:16 To: [EMAIL PROTECTED] Subject: Html:Options usage Hi, I have a bean class that returns an ArrayList of ArrayLists for my dropdowns. I am really confused on how to show this dropdowns. Here's my bean class: public class UserAccessBean implements java.io.Serializable { List deptList = new ArrayList(); List brokerList = new ArrayList(); List filters = new ArrayList(); public List getFilters() { deptList.add(new LabelValueBean(1, Department1)); deptList.add(new LabelValueBean(2, Department2)); deptList.add(new LabelValueBean(3, Department3)); brokerList.add(new LabelValueBean(broker1, BrokerDepartment1)); brokerList.add(new LabelValueBean(broker2, BrokerDepartment2)); brokerList.add(new LabelValueBean(broker3, BrokerDepartment3)); filters.add(deptList); filters.add(brokerList); return filters; } } The 'filters' ArrayList can actually return 2 or more ArrayList. Like if there's 3 ArrayLists, I would like an html output such as: tia,Emmanuel -Do you Yahoo!?Yahoo! Web Hosting - establish your business online__Disclaimer and confidentiality noteEverything in this e-mail and any attachments relating to the official business of Standard Bank Group Limited is proprietary to the company. It is confidential, legally privileged and protected by law. Standard Bank does not own and endorse any other content. Views and opinions are those of the sender unless clearly stated as being that of Standard Bank. The person addressed in the e-mail is the sole authorised recipient. Please notify the sender immediately if it has unintentionally reached you and do not read, disclose or use the contentin any way. Standard Bank can not assure that the integrity of this communication has been maintained nor that it is free of errors, virus, interception or interference.__-To unsubscribe, e-mail: [EMAIL PROTECTED] additional commands, e-mail: [EMAIL PROTECTED] - Do you Yahoo!? Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
Html:Options usage
Hi, I have a bean class that returns an ArrayList of ArrayLists for my dropdowns. I am really confused on how to show this dropdowns. Here's my bean class: public class UserAccessBean implements java.io.Serializable { List deptList = new ArrayList(); List brokerList = new ArrayList(); List filters = new ArrayList(); public List getFilters() { deptList.add(new LabelValueBean(1, Department1)); deptList.add(new LabelValueBean(2, Department2)); deptList.add(new LabelValueBean(3, Department3)); brokerList.add(new LabelValueBean(broker1, BrokerDepartment1)); brokerList.add(new LabelValueBean(broker2, BrokerDepartment2)); brokerList.add(new LabelValueBean(broker3, BrokerDepartment3)); filters.add(deptList); filters.add(brokerList); return filters; } } The 'filters' ArrayList can actually return 2 or more ArrayList. Like if there's 3 ArrayLists, I would like an html output such as: select name=filter1options/select select name=filter2options ... /select select name=filter3options.../select tia, Emmanuel - Do you Yahoo!? Yahoo! Web Hosting - establish your business online
Re: ActionServlet Action caching problem
My execute/perform methods aren't normally synchronized. The javadocs don't indicate they expect it to be, so, calls to that methods shouldn't get blocked. However, you could have concurrency problems if you're using static, class, or instance variables. The execute/perform method should limit itself to using local variables or data passed by reference and you won't have this problem. Unless you explicitly declare some class methods synchronized, in which case you're exactly right. If you do that, however, you ought to mean to produce that effect and limit your critical section to a small block of code-- ideally one that doesn't block on anything. ;-) Maybe I'm out to lunch, though. Its been a while since I've coded java threads. -nash On Tuesday, March 11, 2003, at 12:52 PM, Whitmire, Jeffrey wrote: I'll have to look into it, but it seems to me that if the action is doing a non-trivial amount of work (which mine is), then if there are multiple requests, they will get serialized through the single instance of the action. It may be that I need to redesign how my action works, but currently it will submit a job and block until it completes. If there were a pool of actions instead of a single one it seems like it would be more efficient. Jeff. *** This message is intended only for the use of the intended recipient and may contain information that is PRIVILEGED and/or CONFIDENTIAL. If you are not the intended recipient, you are hereby notified that any use, dissemination, disclosure or copying of this communication is strictly prohibited. If you have received this communication in error, please destroy all copies of this message and its attachments and notify us immediately. *** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Sort a collection in alphabetic order
You could have your PeopleBean implement Comparable, which is pretty easy, and then use TreeSet to create a sorted set using your compareTo method. -nash On Monday, March 10, 2003, at 01:16 PM, Søren Blidorf wrote: Hi. I need to sort my collection people in alphabetic order by lastname, firstname. Can anybody help me? I guess I should do it in the Action and not when displayed in jsp page. Collection people = new ArrayList(); while( rs.next() ) { PeopleBean pb = new PeopleBean(); pb.setId(rs.getInt(ID)); pb.setFirstname( rs.getString( FIRSTNAME )); pb.setLastname( rs.getString( LASTNAME )); } people.add( pb ); Søren Blidorf - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] *** This message is intended only for the use of the intended recipient and may contain information that is PRIVILEGED and/or CONFIDENTIAL. If you are not the intended recipient, you are hereby notified that any use, dissemination, disclosure or copying of this communication is strictly prohibited. If you have received this communication in error, please destroy all copies of this message and its attachments and notify us immediately. *** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: ActionServlet Action caching problem
I've had problems with references to beans on instance variables in an Action object getting stale. I'm on Jboss and in my experience the stale references hork a nice fat RMI exception. Can you turn debug logging on in your execute / perform method and see if that's ever getting called? In my case, it always was. My issue relates to Action objects hanging around after a session bean has been removed or passivated by the EJB container. It would be really nice if someone decided to implement a timeout on the Action objects so that if they were older than a certain age, they wouldn't be used. Don't know if we're seeing the same behavior from different angles or not. ciao, -nash On Monday, March 10, 2003, at 04:07 PM, Whitmire, Jeffrey wrote: I've got a weird one. I'm hoping that somebody else has encountered this before and can help. We are in the midst of load testing our app before rolling it out to production. I have one action class (only one) that starts failing well over an hour into the test. It appears that the instance of that action class cached by the ActionServlet becomes invalid. I can see no reason why the change in behaviour, but at some point the RequestProcessor gets an instance to the Action that is no longer valid. It is not null, but it never executes it. The rest of the app works perfectly, but that button (tied to that specific Action) never works again until the tomcat instance is restarted. It just hangs, and the last indication in the log is the RequestProcessor finding and returning an instance of that action class. Has anyone ever had problems with Action instances going stale? or some other config problem that could cause this? Thanks, I'm a bit desparate, Jeff. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] *** This message is intended only for the use of the intended recipient and may contain information that is PRIVILEGED and/or CONFIDENTIAL. If you are not the intended recipient, you are hereby notified that any use, dissemination, disclosure or copying of this communication is strictly prohibited. If you have received this communication in error, please destroy all copies of this message and its attachments and notify us immediately. *** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: dynamic generated controls
I've used code like this in my Action class execute/perform method: String inputs[] = request.getParameterValues(s); for (int x = 0; x inputs.length; x++) { String oneInput = inputs[x]; dosomething(oneInput); } This seems to work quite well, assuming all the form input tags are named the same. I don't know struts well enough, yet, to know whether you can have an ActionForm property be a Collection type, or not. Would be interested in the answer, though. It wouldn't have mattered in my application, though, as I needed to generate an entire form dynamically, so it would have been a wash, either way. -nash On Monday, March 10, 2003, at 04:33 PM, miguel angel rojas aquino wrote: hi, i'm creating a html form that dinamically adds new rows to a html table via javascript, so it goes to the server only when the user ends the data capture, like a jtable control in a swing app, so the problem now is, how can i map all this dynamic controls to the corresponding ActionForm? is there a way to do something like puting all those values in an array in the action form? thanks in advance, greetings. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] *** This message is intended only for the use of the intended recipient and may contain information that is PRIVILEGED and/or CONFIDENTIAL. If you are not the intended recipient, you are hereby notified that any use, dissemination, disclosure or copying of this communication is strictly prohibited. If you have received this communication in error, please destroy all copies of this message and its attachments and notify us immediately. *** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT]: Struts, Web Development, J2EE, and what is too much?
I use Jboss. It works quite well with struts. EJBs have made my application EASIER and LESS complex for me, but I don't know any SQL or database technologies at all. If you're comfortable with managing your own database widgets, you may be frustrated with how slow J2EE is on your hardware and you may also be frustrated you can't access some of the more advanced functions easily. Performance is an issue as you pay mad overhead for the RMI stuff in J2EE. Much slower than native JDBC. If you can afford to upgrade your hardware, you may benefit. YMMV, but, I like it. I'm just using struts for presentation. -nash On Monday, March 10, 2003, at 05:41 PM, David Graham wrote: I've never used EJBs but Struts doesn't need to know about them at all. The actions could talk to a service interface that may be implemented by EJBs or just normal Java classes. David From: Aaron O'Hara [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: 'Struts-user-list ' [EMAIL PROTECTED] Subject: [OT]: Struts, Web Development, J2EE, and what is too much? Date: Mon, 10 Mar 2003 14:34:45 -0800 I know this question has probably been asked before, and that biased publications have had their opinions on it, but I wanted to get some feedback regarding some real user experience regarding the use of EJB in a web application used along with Struts. I am creating a web application and I have decided to use struts. The application needs to be high performance, uses a single database (so it doesn't have heterogeneous transactional db requirements). I have designed the application in layers, and it will only have a web interface. It's starting small, but will grow to have many functions. Even though I'm confident that I need not invest in EJB's, I don't want to develop the application to find out I should have used them (hence why I'm creating this post). In what scenarios have people found the use of EJB beneficial? When have they been overkill? Does struts integrate smoothly with EJBs? My fear is that I'll make the application overly complex by implementing EJBs, but I'd like to hear from people with experience building large web-only projects with struts. Thanks, Aaron - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Add photos to your e-mail with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] *** This message is intended only for the use of the intended recipient and may contain information that is PRIVILEGED and/or CONFIDENTIAL. If you are not the intended recipient, you are hereby notified that any use, dissemination, disclosure or copying of this communication is strictly prohibited. If you have received this communication in error, please destroy all copies of this message and its attachments and notify us immediately. *** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[OT]XML DOCTYPE question
Hi all, This could be a dummy question but i didn't found any documentation talking about this issue. My problem is: I developed an API that uses a XML configuration file. And i have also a DTD file to enable XML validation. Then i generate a jar file containing my API and my DTD file. When running a test application using my framework, JDOM returns follow exception: org.jdom.JDOMException: Error on line 2: Relative URI sql-map.dtd; can not be resolved without a base URI. My config file has (at line 2): !DOCTYPE sql-map SYSTEM sql-map.dtd What am i doing wrong? Remember that my dtd file is inside my jar file. How would be an URI to that? Thanks in advance, Daniel. __ Do you Yahoo!? Yahoo! Shopping - Send Flowers for Valentine's Day http://shopping.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[OT]XML DOCTYPE question
Hi all, This could be a dummy question but i didn't found any documentation talking about this issue. My problem is: I developed an API that uses a XML configuration file. And i have also a DTD file to enable XML validation. Then i generate a jar file containing my API and my DTD file. When running a test application using my framework, JDOM returns follow exception: org.jdom.JDOMException: Error on line 2: Relative URI sql-map.dtd; can not be resolved without a base URI. My config file has (at line 2): !DOCTYPE sql-map SYSTEM sql-map.dtd What am i doing wrong? Remember that my dtd file is inside my jar file. How would be an URI to that? Thanks in advance, Daniel. __ Do you Yahoo!? Yahoo! Shopping - Send Flowers for Valentine's Day http://shopping.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: RES: [OT] Resin 2.1.6 doesn't like resource-env-ref
Hi all, Take a look at this : http://www.caucho.com/resin/ref/app-config.xtp First paragraph says that Resin HTTP configuration follows the Servlet 2.2 deployment descriptors. Best regards, Daniel. --- Marcelo Aita Riss [EMAIL PROTECTED] wrote: Hi Sri, I'm having the same trouble here. Seems to me that it's a resin problem. I have tried to search some help to fix this problem at www.caucho.com, but have found nothing until now. You are right about web-app_2_3.dtd, but I have a web-app_2_2.dtd copy that do not have any reference to a 'resource-env-ref'. I think that resin 2.1.6 use 2_2 to validate web.xml. The servlet 2.3 specification file (a pdf file) shows both versions (2.2 and 2.3). If you look at version 2.2 there is no reference to 'resource-env-ref' too. I have no solution to fix this yet. If you find a solution, let me to know. I hope it helps, Marcelo -Mensagem original- De: Sri Sankaran [mailto:[EMAIL PROTECTED]] Enviada em: terca-feira, 11 de fevereiro de 2003 17:42 Para: Struts-User Assunto: [OT] Resin 2.1.6 doesn't like resource-env-ref I am having trouble deploying to Resin 2.1.6. When I try to access the application URL, I get the response: 500 Servlet Exception C:\resin-2.1.6\webapps\qs\WEB-INF\web.xml:102: unknown element unknown element `resource-env-ref' in web-app I checked the web-app_2_3.dtd and resource-env-ref *is* allowed. Any thoughts on resolving this matter? Sri P.S. Resin 2.1.6 is a servlet 2.3 and JSP 1.2 engine P.P.S Tomcat 4.1.18 doesn't have any such heartache with my web.xml - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? Yahoo! Shopping - Send Flowers for Valentine's Day http://shopping.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [OT] Which Object Relational mapping tool?
Hi Jacob, You did a good point. I am working on a project and was in doubt about what use: pure JDBC, DB Layer from iBatis or a real O/R mapping tool. I tested OJB, it is a great piece of software. Looked at Hibernate, it seems like a good choice. I tested also Torque, what is as good as others. But, to my project i have choosed DB Layer from iBatis. But i am doing some customizations on it. I am adpating it to use Jakarta Commons BeanUtils and, thanks to that, extending ResultMap elements to enable dynamic ResultMaps using DynaBeans since there are moments where you can't write 50 classes only to hold your results, or, you are lazy enough to write it. When i finish that modifications i will submit then to Clinton Begin, iBatis author, to receive his agreement about that. If you have any cool suggestion about iBatis DB Layer, i'd like to hear it from you. Best regards, Daniel Silva. --- Jacob Hookom [EMAIL PROTECTED] wrote: In my opinion, this topic is just fine-- it comes up every week :-) I personally dislike O/R mappers because in most cases, I completely agree that beans and db should be separated, but it's at the point of merger that things get overly complex at the expense of an additional layer that needs just as much configuring as writing your sql code for each use case. For example, with O/R, you have an ArticleHeader that has ArticlePage(s). You are actually storing the page content in the DB for various reasons. If you are using OJB with the goal of getting the number of pages the article has, in most cases, you are ending up selecting 1000+% of what you REALLY need from the DB: --- OJB: SELECT ArticleHeader key Check cache SELECT ArticleHeader and SELECT ArticlePage keys Cache it Call getPages() on ArticleHeaderBean SELECT each ArticlePage where cached key = DB key while checking the cache before EACH SELECT to ArticlePage table for EACH Row Builds collection of ArticlePages (including all of that page content) Call getSize() Vs. SELECT COUNT(key) FROM ... I guess I really can't reason the practicality of it. On the other hand, the ibatis.com db layer is VERY cool because it allows you to look at your use cases and write a select statement that can be executed; much like the way struts has actions. I get the bonus of caching objects with O/R mappers, but site performance is much better by caching the resulting output (the view itself) in most cases. Someone please enlighten me as to why someone would want to use O/R mappers :-) Best Regards, Jacob Hookom | -Original Message- | From: Mark Chaimungkalanont [mailto:[EMAIL PROTECTED]] | Sent: Tuesday, February 04, 2003 10:24 PM | To: [EMAIL PROTECTED] | Subject: [OT] Which Object Relational mapping tool? | | Howdy all, | | This is not about struts really... But I figured it could be relevant for | some people. If you know a better forum for relatively unbiased opinion, | please tell me I'll take it there! | | Just looking into O/R mappers and have looked at (Briefly): | | Hibernate 2.0 beta 2 | Castor 0.9.4.2 | OJB 0.9.8 | | Does anyone know which is better for what? Which is the most robust and | mature development? Have any recommendations of any other ones? Had some | success/problems? Hibernate SOUNDS impressive and looks quite professional | but I haven't used any of them... | | Again, sorry for spamming the struts mailing list and will take it | elsewhere if it bothers people. | | Cheers | | MC | | | - | 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] __ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Stuts on iPlanet 6.0 - which one is broken?
Struts just doesn't play nicely on Solaris iPlanet 6.0 sp5 j2sdk-1_4_1_01 - resource messages don't work, correctly. - form-bean does not work at all !! Spent 2 weeks so far, trying to find solution. I thought this would be the correct forum - but I don't think there are any experts that know enough about iPlanet. Would someone please, at least be kind enough to say if it is POSSIBLE to use struts on iPlanet ??? Which one is broken ?? Struts 1.1-b3 ?? iPlanet 6.0 sp5 ?? Is it the container ?? Should I research modifying the struts source for a work-around ?? I own EVERY book on the topic! All my research has turned up NO SOLUTIONS! And my emails on the topic are ignored completely. Thanks, Frustrated Dan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Stuts on iPlanet 6.0 - which one is broken?
Using iPlanet Web Server 6.0 sp5 on Solaris 8, current patches. Always try to make the 'test' case simple! Just using struts-example. The struts-config.xml is configured to use DynaValidatorForm by default - which works fine. However, when I switch to the form-bean: form-bean name=logonForm type=org.apache.struts.webapp.example.LogonForm/ I get the following error: , root cause: javax.servlet.jsp.JspException at org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:600) at _jsps._logon_jsp._jspService(_logon_jsp.java:164) The sample LogonForm.java looks fine and all the configuration looks fine. Looks like it can't find the bean? Thanks, Dan Karr, David wrote: I don't know whether you did this in any of your earlier notes, but how about describing exactly what went wrong, including specific error messages and stack traces, and showing us your relevant source files? -Original Message- From: Daniel E. Morrison [mailto:[EMAIL PROTECTED]] Sent: Friday, January 31, 2003 7:36 AM To: [EMAIL PROTECTED] Subject: Stuts on iPlanet 6.0 - which one is broken? Struts just doesn't play nicely on Solaris iPlanet 6.0 sp5 j2sdk-1_4_1_01 - resource messages don't work, correctly. - form-bean does not work at all !! Spent 2 weeks so far, trying to find solution. I thought this would be the correct forum - but I don't think there are any experts that know enough about iPlanet. Would someone please, at least be kind enough to say if it is POSSIBLE to use struts on iPlanet ??? Which one is broken ?? Struts 1.1-b3 ?? iPlanet 6.0 sp5 ?? Is it the container ?? Should I research modifying the struts source for a work-around ?? I own EVERY book on the topic! All my research has turned up NO SOLUTIONS! And my emails on the topic are ignored completely. Thanks, Frustrated Dan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Stuts on iPlanet 6.0 - which one is broken? (just needs tlc,but we use it in production)
Thank you SO much! I've been going crazy on this. At least now I know there is light at the end of the tunnel! Thanks, Dan Ka-Wai Chan wrote: I am using iPlanet WS6.0 SP4 w/ JDK1.3 in production Struts 1.1b1 - 1.1b3 have all worked given some workarounds with the classpath and settings. 1) modify classpath /---/xerces.jar://log4j-1.2rc1.jar://commons-logging.jar://locationToTheDirWIthApplicationResources.properties I explicitly copy the applicationResources.properties from /WEB-INF/classes to an external location which is in the classpath 2) FormBeans MUST be declared in struts-config.xml and created by the controller, have the form bean tags in your jsp will not create the FormBean objects correctly and will be null. So in general have just 1 form bean associated with a jsp 3) increase stack size of in your magnus editor under performace to at least 262144 When in doubt, make sure full DEBUG messages are on and see exactly where it dies, but everything can work under iPlanet good luck Ka-Wai Chan Daniel E. Morrison wrote: Using iPlanet Web Server 6.0 sp5 on Solaris 8, current patches. Always try to make the 'test' case simple! Just using struts-example. The struts-config.xml is configured to use DynaValidatorForm by default - which works fine. However, when I switch to the form-bean: form-bean name=logonForm type=org.apache.struts.webapp.example.LogonForm/ I get the following error: , root cause: javax.servlet.jsp.JspException at org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:600) at _jsps._logon_jsp._jspService(_logon_jsp.java:164) The sample LogonForm.java looks fine and all the configuration looks fine. Looks like it can't find the bean? Thanks, Dan Karr, David wrote: I don't know whether you did this in any of your earlier notes, but how about describing exactly what went wrong, including specific error messages and stack traces, and showing us your relevant source files? -Original Message- From: Daniel E. Morrison [mailto:[EMAIL PROTECTED]] Sent: Friday, January 31, 2003 7:36 AM To: [EMAIL PROTECTED] Subject: Stuts on iPlanet 6.0 - which one is broken? Struts just doesn't play nicely on Solaris iPlanet 6.0 sp5 j2sdk-1_4_1_01 - resource messages don't work, correctly. - form-bean does not work at all !! Spent 2 weeks so far, trying to find solution. I thought this would be the correct forum - but I don't think there are any experts that know enough about iPlanet. Would someone please, at least be kind enough to say if it is POSSIBLE to use struts on iPlanet ??? Which one is broken ?? Struts 1.1-b3 ?? iPlanet 6.0 sp5 ?? Is it the container ?? Should I research modifying the struts source for a work-around ?? I own EVERY book on the topic! All my research has turned up NO SOLUTIONS! And my emails on the topic are ignored completely. Thanks, Frustrated Dan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
tokens and set-property
I'd like to use the set-property element of struts-config to tell my action whether to expect a token. For example, I have an action like this: action path=blah... set-property property=useToken value=true/ /action I'm using an abstract action subclass that itself is a superclass to my real actions. It contains a boolean useToken property. I also tries a String but it didn't matter. That property never gets set to what I specify in the struts-config file. Any suggestions? thanks john john gregg Wells Fargo Services Company Minneapolis, MN
[OT] Cayenne O/R Mapping Tool
Hi all, I know this kind of question is done here almost every day, but i am still without a decision about what O/R mapping tool to use. I found Cayenne (www.objectstyle.org/cayenne). Did anyone here use it? Pros? Cons? Thanks in advance, Daniel. __ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
struts-example JspException using form-bean
Hello- Running struts 1.1-3b struts-example. The struts-config.xml is configured to use DynaValidatorForm by default - which works fine. However, when I switch to the form-bean: form-bean name=logonForm type=org.apache.struts.webapp.example.LogonForm/ I get the following error: , root cause: javax.servlet.jsp.JspException at org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:600) at _jsps._logon_jsp._jspService(_logon_jsp.java:164) I've spent days trying to figure out how to get a 'normal' form-bean to work. Studied the books, searched archives, etc. The sample LogonForm.java looks fine and all the configuration looks fine. Does form-bean still work? What would cause this to fail? Thanks in advance!! Dan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [OT] Geek Code
Hey guys, Let's stop to hurt members of this list. We are here to talk about struts and technology in general. We are not here to start a war. Bush will do it! Love and peace for anyone, Daniel. --- Jarnot Voytek Contr AU HQ/SC [EMAIL PROTECTED] wrote: I'd call you stupid right back, but I can't figure out how to phrase it. Are you a stupid: Swissy? Swissite? Swizzler? Switzerlandian? Switzerlandener? Switzerlard? Switzerlander? -Original Message- From: alexj [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 30, 2003 1:52 PM To: Struts Users Mailing List; [EMAIL PROTECTED] Subject: Re: [OT] Geek Code pff you just song like a stupid man who think he have all the rigth and the other people didn't have the rigth to have a different opinon stupid american - Original Message - From: Andrew Hill [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Thursday, January 30, 2003 4:42 AM Subject: RE: [OT] Geek Code While we are at it lets kill the latin too! ( anything my simple mind doesnt grok...) ;- +1 -Original Message- From: Jarnot Voytek Contr AU HQ/SC [mailto:[EMAIL PROTECTED]] Sent: Thursday, 30 January 2003 00:51 To: 'Struts Users Mailing List' Subject: RE: [OT] Geek Code +1 I agree completely. Can this topic die off now? Maybe a filter should be instituted for the list which would reject any message wherein the content is shorter than the sig... -- Voytek Jarnot Quidquid latine dictum sit, altum viditur. -Original Message- From: Mark Galbreath [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 29, 2003 10:37 AM To: 'Struts Users Mailing List' Subject: RE: [OT] Geek Code That is actually a cool piece of parsing script. I doubt, however, that anybody is really interested in having sigs decoded and are less interested in seeing the sig in the first place. Put in on your website, not your email; this does not indicate your cleverness, only your newbie status. Mark -Original Message- From: alexj [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 29, 2003 10:46 AM http://www.ebb.org/ungeek/ -- Alexandre Jaquet - -BEGIN GEEK CODE BLOCK- Version: 3.12 GCM d+ s: a22 C U*+ P L--- E--- W+++ N+++ o K w+ O M-- V-- PS+++ PE+++ Y+++ PGP--- 5-- X R* tv b DI--- D G++ e* h++ r% y* --END GEEK CODE BLOCK-- - Original Message - From: Mark Galbreath [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] What's to say? http://www.geekcode.com/geek.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] = - Daniel H. F. e Silva Analista de Sistemas SBPI __ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
JspException form-bean in virtual server
Hello- struts 1.1-3b, iPlanet Web Server 6.0 sp5, Using virtual server, I get: , root cause: javax.servlet.jsp.JspException at org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:600) at _jsps._logon_jsp._jspService(_logon_jsp.java:164) Has anyone ever gotten a form-bean to work with iPlanet?? Thanks, Dan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Copying 'nested' properties from Dyna form to beans
I've tinkered with this, but there are definite limitations. I saw in Chuck Cavaness' book where he put a value or domain object as the sole property inside a form. In the JSPs he references it as form.bean.blahblahblah. I thought this meant I wouldn't have to dumb-down my forms. Well, as you've seen, BeanUtils.copyProperties() won't copy when it doesn't recognize the target class. You can create a Converter to handle some of these situations. I created an AbstractConverter class that has abstract getToClass() and getFromClass() methods. My convert() implementation just uses getToClass() to create an approriate target object (using Class.newInstance()), then calls BeanUtils.copyProperties on it. For simple situations, this works really well. However, there are some limitations. First, you can't have circular references because there's no mechanism in place to note whether the copying of a given object is already in progress. You'll get a StackOverflowError. I think I know how to get around this but it's pretty invasive. Second, you can't copy properties that are of the same type as the containing object easily. You'd have to duplicate a lot (all?) of the functionality of copyProperties(). Third, the contents of collections are a problem because you won't know what type the contents of the new collectin should be, unless you add some other facility for figuring this out (like given value object type X, convert to domain object type Y. This is the opposite of how the Converters work now.) Finally, if you're copying from a persistent object that uses some form of pointer swizzling to a value object, you've opened a whole new can of worms. I don't know what my fallabck solution is exactly. I think I might pick a few limitations and live with them for now. john -Original Message- From: Molitor, Stephen [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 28, 2003 8:30 AM To: 'Struts Users Mailing List' Cc: Ramarao, Nagaraj; Nair, Pramod Subject: Copying 'nested' properties from Dyna form to beans What's the best way to copy 'nested' form property values to Java beans? For example, let's say I a 'Person' bean, which contains a nested 'Name' bean, like this: class Name { String getFirstName() {...} void setFirstName(String firstName) {...} String getLastName() {...} void setLastName(String lastName) {...} } class Person { Name getName() {...} void setName(Name name) {...} String getZip() {...} void setZip(String zip) {...} } In the Person class, 'zip' is a top level property, but firstName and lastName are nested properties of the name property. I'd like to set up my validation.xml form element something like this: form name=personForm field property=name.firstName/ field property=name.lastName/ field property=zip/ /form Or, can I / should I nest form elements? Finally, what I'd like to do is use BeanUtils.copyProperties, or whatever, to copy from the dyna bean to the Person bean: BeanUtils.copyProperties(person, form); It would be cool if copyProperties would know to copy the name.firstName form element to person.getName().setFirstName(...). What's the best way to do something like this, to copy 'nested' properties transparently in one method call? Thanks! Steve - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
sematic validation
Hi all. I love the ability of Struts to perform syntactic validation of input data and automatically redisplay the screen + data + error messages. However, I'm reluctant to put semantic validation checks anywhere but the business objects to which they belong. For example, I have a rule that says an organization's effective date cannot be in the future. I consider that part of what it means to be an organization in my domain, therefore logical places to enforce the rule are either the appropriate setter or a preCommit() persistence callback method. However, when using something like BeanUtils to copy values from my value objects to my persistent domain objects, if an exception is thrown in the setter (or even later at commit() time), what's the best way to propagate that back to the user? BeanUtils will throw an exception as soon as the underlying setter throws one, regardless of whether there are further semantic validations (on other properties) to perform. I'd like it to appear to the user the same way as when the Struts validator flags a problem. thanks john gregg Wells Fargo Services Company Minneapolis, MN
RE: DynaValidatorForm and multipage forms
Nope. I got no responses. For now I've abandoned the DynaValidatorForms. I'm new to Struts so I'm just trying a lot of different things to see what works. You might try submitting your question separately from mine to see if you get any bites. Good luck john -Original Message- From: Dennis Muhlestein [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 22, 2003 5:18 PM To: Struts Users Mailing List Subject: Re: DynaValidatorForm and multipage forms Did you figure anything out with this problem? I have the exact same problem. I'd like to make a multipage form with DynaValidatorForm instead of extending ValidatorForm Thanks -- Dennis Muhlestein [EMAIL PROTECTED] ZServe Corporation On Tue, 2003-01-21 at 12:44, [EMAIL PROTECTED] wrote: Is it even possible to use the DynaValidatorForm with multipage forms? Because BeanUtils.setProperty() ignores any property that hasn't been declared in struts-config.xml, there seems to be no way to set the page number. html:hidden property=page value=1/ doesn't work for dyna forms. If this isn't possible, is there a reason other than that no one has gotten around to implementing it? thanks john gregg Wells Fargo Services Company Minneapolis, MN -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
null references in ActionForms
Hi all, I'm curious about why forms don't like null references. Let's say I have a form with a ref to a domain class that I wrote. That class has a name attribute. Struts complains when it tries to reference someForm.someClass.name if someClass is null. In the case of displaying an entry page for the first time, if someForm.someClass is null, Struts I think should either ignore it, as it would if someForm.someClass.name were null, or it should call the default constructor and go from there. Why does it not do this? Can it be configured to do so? Is there an alternative? I see FormPropertyConfig but it only applies to DynaForms. For now I've tweaked my getters to return a new instance if the ref is null, but I'm uncomfortable with this. thanks john john gregg Wells Fargo Services Company Minneapolis, MN