Re: URGENT HELP
Label is not a taglib, but an HTML element. http://www.w3.org/TR/REC-html40/interact/forms.html#h-17.9.1 Dakota Jack wrote: Where does this tag come from? And, how to you download the sandbox for taglibs? I cannot find the place. It is sure not easy to find. Jack On Apr 4, 2005 8:49 AM, Justin Morgan <[EMAIL PROTECTED]> wrote: The label is supposed to be closed before the input tag. IE is nicer about mistakes like this than Netscape is. Try the code below. Reference: http://www.w3.org/TR/REC-html40/interact/forms.html#h-17.9.1 -Justin -Original Message- From: Sunu Mathew [mailto:[EMAIL PROTECTED] Sent: Monday, April 04, 2005 11:34 AM To: user@struts.apache.org Subject: URGENT HELP Hi, Could you please tell me how to use label tag in struts. Label tag is required in our application (deveice dependant users). This works fine in IE, but the label will not appear in Netscape 6.2 Sunu Mathew National Patient Safety Agency 4-8 Maple Street London W1T 5HD - 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: ??? find site error (action)
Hi Eric, I'm guessing that you don't have struts configured in your web.xml correctly. Of course, thats just a guess. You might show us your web.xml, struts-config.xml and the entire URL that you are trying to view. Is it a link in a JSP page? If so, what's the link? Eric Lemle wrote: Here is what the error says: * Internet Explorer cannot download myAction.do?myparam=344 from localhost Internet Explorer was not able to open this Internet site. The requested site is either unavailable or cannot be found. Please try again later. *** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Is There a Tool for JSF?
Caroline Jen wrote: There are many tools that help developing the Struts; for example, EasyStruts, StrutsConsole, StrutsBox. We also have the NitroX, Lomboz, etc. that help debugging. Is there any tool available for JSF? Sun JavaStudio Creator http://www.sun.com/software/products/jscreator/index.xml JSF Studio http://www.exadel.com/products_jsfstudio.htm Nitrox is supposed to be coming out with one. Roadmap says Q1 2005... http://www.m7.com/roadmap.do Faces Console http://www.jamesholmes.com/JavaServerFaces/console/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts or SpringFramework
Richard Reyes wrote: Hello, Whats the advantage of using spring for your persitence layer when you can do it with struts? Well, you don't really use "Spring" for your persistence layer, you use Spring to simplify using your persistence layer, whether it's Hibernate, Ibatis, or straight JDBC. It provides nice convenience methods, a way to transparently manage Sessions, Datasources, etc, declarative transactions, etc. You can use it WITH struts (you don't really do a persistence layer in struts do you?). In fact, it provides some nice conveniences for Struts. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Hibernate object relational mapping
I honestly don't know how much different using Hibernate will degrade as compared to using Stored Procedures... But, on top of the advice everyone else has given you, you might look at Ibatis. I personally have never used it, but I mean to soon. My thought is this: Its fairly easy to write your own persistence layer, but at what cost? A day? A week? Hibernate (and others) do one thing, and they do it good. Why reinvent the wheel. Just my unworthy opinion.. I'm far from a SQL Guru, but I think I can write pretty good SQL. Brian McGovern wrote: That was my question. From what i understand hibernate uses sql statements not stored procs. And i assumed that even though it was more coding on my part, that using stored procs and JDBC i could achieve faster db interaction. But we all know what happens when we assume.. haha - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [ANN] Free JSP Editor for Eclipse (Call jor Jack Dakota!) [FRIDAY]
hehe... I wasn't trying to say it was the best way, just that it works for me. My projects tend to be small, self contained projects. Leon Rosenberg wrote: This is actually the moment i expect Jack Dakota to jump out of the bushes :-) What do you do, if you habe more than one build target? I don't How you separate the libs for the stand-alone application or scriplet from those you need only for taglibs? Doesn't apply to me. Tell me your jsps aren't packaged as the rest of the code... ? I have JSPs inside the webroot folder. You are probably 'implementing' constant interfaces? Nope :-) Forgive me, it's Friday... Nothing to forgive. Honest debate going on, nothing to start a jihad over. But to be serious again: I like the idea of having all the files related to a project in the same parent folder. I think WEB-INF doesn't belong to the project, since it's neither a source nor a configuration file/requirement. It's just part of specification of one of possible environments. And by the way, hitting ant button in eclipse or a key-shortcut is as fast as hitting ctrl-s :-) I'll try that sometime. For now, my method works for me. I'm pretty sure it works for others too. I was just trying to make the point that having the WEB-INF inside a project isn't as inconceivable as you made it sound like. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [ANN] Free JSP Editor for Eclipse
Leon Rosenberg wrote: > Why would anyone have WEB-INF folder in his/her project ? > Never heard about ant? I do. It makes at least one less test/deployment step and is actually very easy to setup (in Eclipse at least). Plus, I like the idea of having all the files related to a project in the same parent folder. My typical web project looks like this: root -src -test -webroot ---WEB-INF -classes -lib source is compiled into webroot\WEB-INF\classes. Set my Tomcat context docBase to point to the project's webroot folder. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Static site and Struts
nitin dubey wrote: Is it worth using Struts for a static site that is CMS Driven ? I can think of two options: Sure, why not ->Fetching the data from database into Action forms and then building the page using Struts HTML taglibs. :Can be done, but I doubt that Struts HTML is powerful enough to handle minute details of the HTML page eg:tool tips, sections, javascripts What makes you think Struts HTML is not powerfull enought? The HTML tags generate HTML. You can still assign javascripts to it, you can use CSS to style... - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [almost OT] Struts in Practice
Another +1 on oswd.org. I am chiming in to offer one of my favorite sites: http://www.csszengarden.com/ Really shows what you can do with CSS.. I browse ocassionally for inspiration. Martin Wegner wrote: +1 on www.oswd.org They are a great place to start your next web project. --- "M. Bitner" <[EMAIL PROTECTED]> wrote: As a programmer with no design skills, one resource I've found to be helpful is Open Source Web Design: http://www.oswd.org/ There are quite a few site designs to choose from, many using CSS. They do have professional designs you can purchase if you'd like to go that direction, but I've found the free designs to be more than sufficient for my needs. HTH, Melissa On Wed, 12 Jan 2005 07:28:00 -0800 (PST), t t <[EMAIL PROTECTED]> wrote: Also because I really like the Google style: simple, but useful and powerful. So I have been trying to make my website-- www.sportslovers.net in that way. I am not sure if I can say that mine is powerful now, but I am sure I can say it's useful, and, simple. :) t t <[EMAIL PROTECTED]> wrote:Thanks. I would like to get a web designer to help me. But I don't have money to do that. :( Vincent <[EMAIL PROTECTED]> wrote: Congrats. So this your demo site? If it is in production, you may want think about getting a web designer to help you with the layout. It kind of reminds me of a 1998 webpage. No offense intended. t t wrote: If you are a sports lover, or Struts lover, please take a look at this website: www.sportslovers.net . It's based on Struts. Have a good day! Sorry if this email bothers you. - 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: How to view the actual HTTP generated by a struts action.
Jim Barrows wrote: -Original Message- From: kjc [mailto:[EMAIL PROTECTED] Is there a way to log the HTTP post string that is sent by the browser when clicking on Why won't right click view source not work? I think the OP meant what the HTTP Post looks like, not what the generated HTML looks like. I use a feature that comes with MyEclipse (its not unique to MyEclipse, but its the one I'm familiar with). I think another popular one is ProxyWorkbench http://www.tcpiq.com/tcpIQ/ProxyWorkbench/. Basically, they act like a proxy. Suppose your Tomcat listens on port 8080. You setup your proxy to listen to another port, like say 8081. It redirects to port 8080. You then setup your app to post to port 8081. The proxy logs the conversation. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JSP bean-- commclipse plugin info
http://commonclipse.sourceforge.net/ Ashish Kulkarni wrote: Hi sounds like a good plugin, but was not able to google it, can you give the website from where i can download this plugin Ashish - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Can we create group in Yahoo/MSN messenger to help those who need fast help
gmane.org Google will return results from there. James Mitchell wrote: Why would you do this? You will end up answering the same questions over and over again because there is no history for people to google against. I get questions emailed directly to me from time to time. My response is usually something like"take it to the list, unless you want to pay for my time". Most usually ask on the list after that. My corporate rate is "business friendly", but not "college homework" or "i'm too lazy to google" friendly ;) -- James Mitchell Software Engineer / Open Source Evangelist EdgeTech, Inc. 678.910.8017 AIM: jmitchtx - Original Message - From: "Amit Gupta" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" Sent: Tuesday, December 28, 2004 2:23 AM Subject: Can we create group in Yahoo/MSN messenger to help those who need fast help Can we create group in Yahoo/MSN messenger to help those who need fast help? Amit Gupta Mobile: 91-9818052171 Yahoo IM: amitguptainn MSN IM : amitguptainn - 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: Struts and DreamWeaver
http://www.fwasi.com/products/ Extension for struts. -Original Message- From: Antony Paul [mailto:[EMAIL PROTECTED] Sent: Thursday, December 23, 2004 11:39 PM To: Struts Users Mailing List Subject: Re: Struts and DreamWeaver I added Struts html tags to DreamWeaver using the add tag from tld option. But it is not rendering the tags as html elements. I use DreamWeaver for visual display. rgds Antony Paul On Thu, 23 Dec 2004 07:50:02 -0800 (PST), Ashish Kulkarni <[EMAIL PROTECTED]> wrote: > Hi > I use macro media dreamweaver and can add tag library > and so can support struts or jstl, i explained my > graphical designer to use these tags instead of html > tags and it worked out well, try teaching graphical > designer to use tags.. > Ashish > --- Erik Weber <[EMAIL PROTECTED]> wrote: > > > I completed a non-Struts JSP project with a designer > > who used > > DreamWeaver. I hooked him up with the Tortoise CVS > > client, and we didn't > > have any problems. Occasionally I would find tabs > > blown out, that was > > about it. The HTML was fine. The site is in > > production and works in IE > > and Mozilla. He told me Dreamweaver ignored stuff it > > didn't know how to > > handle, and he never complained about inability to > > edit layouts. > > > > Erik > > > > > > Wendy Smoak wrote: > > > > >This is my first time having someone else do the > > page design. I'm thrilled > > >to have someone else do it, but they use > > DreamWeaver and I'm not sure what's > > >going to happen if it sees . Then > > there's the fun of JSTL > > >tags embedded within HTML tags, which works fine > > but can't exactly be > > >considered valid syntax. > > > > > >I checked the archives, but only found suggestions > > to use something other > > >than DreamWeaver. I don't think that's going to go > > over well. > > > > > >My current plan is to have them use plain-old html > > form elements, and I'll > > >automate as much as possible the task of switching > > them over to > > > tags. Not much fun, but far better > > than having to do the > > >page design. > > > > > >Does anyone have suggestions for coordinating page > > design with Struts webapp > > >development? > > > > > > > > > > > > > > - > > To unsubscribe, e-mail: > > [EMAIL PROTECTED] > > For additional commands, e-mail: > > [EMAIL PROTECTED] > > > > > > > __ > Do you Yahoo!? > Yahoo! Mail - 250MB free storage. Do more. Manage less. > http://info.mail.yahoo.com/mail_250 > > - > 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: Flash buttons in struts???
Donie Kelly wrote: I have lovely pages made with flash buttons but does anybody know how to submit forms etc using flash buttons??? If you are using Dreamweaver, and using its facilities to insert a flash button, just set the link to: javascript:document.formName.submit(); If its a button you created in Flash yourself, then I'm not sure. I think you have to set it up to call the JS, but I don't know how. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts and DreamWeaver
Wendy Smoak wrote: Ugh, the first thing they sent was a solid block of tags. I explained the virtues of external style sheets and sent it back. From the other messages, it sounds like I'm better off doing it myself. :/ I'll try to get a clean formatted example out of them and just use that. Thankfully we all agree that simple is better, so the pages are not too complicated, but I still think I'm in for a bunch of editing. (And they're already talking about changes...) HTML Tidy can help a great deal. Its a little complex, but there are some GUI tools, and integrations with other apps. One thing it can do is clean it up, get rid of the tags, make it XHTML compliant, pretty print it, and do your laundry... (just kidding about the laundry part). Its well worth digging into if you are getting stuff that looks horrendous... http://tidy.sourceforge.net/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts and DreamWeaver
Jim Barrows wrote: DreamWeaver should support the tags, and ignore the JSTL. My biggest worry with DreamWeaver would be the HTML code the thing generates. Typically it's pretty abysmal. I have marketing people who generate better HTML then DreamCleaver does. I don't know what version of DreamWeaver you used, but my exprience with it has been pretty good. I must confess, however, I've only worked with documents I've created, not one's that other's have. With that said, some of the automated "Server Behaviors" that DreamWeaver creates look horrendous. But, as for JSP, JSTL and Struts, it works pretty good. By default, it will show the HTML fine, and just put some funky tags instead of the JSP tags... There is an extension to Dreamweaver, however, that helps a great deal. Its by these guys: www.fwasi.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: OT: Syntax checker
Since JSP is XML, why not load it up in an XML editor. It should complain and show you where the problem is. Apte, Dhanashree (Noblestar) wrote: Sorry for the deviation, but is there an easy way to find out what exactly is causing org.apache.jasper.compiler.ParseException: End of content reached while more parsing required: tag nesting error? error on a jsp? Maybe run it through some tool which points out the problematic tag? Thanks! Dhanashree. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] Hosting Companies
I use jvds.com. UML style hosting, so you can install anything you want. You basically have root access to your own virtual Linux machine. Joe Hertz wrote: I dont see Struts supporting hosting companies on the wiki. It used to be on the site before the resources link pointed you to the wiki IARC. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Mail Archive Access
Josh Holtzman wrote: Can someone please provide me with the location of a mirror of the mailing list archive? I personally use gmane.org - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: BeanUtils Class Cannot Be Found!
How are you compiling? Command line? IDE? Eclipse? When compiling, the jar file needs to be in your classpath. just putting it in lib directory works for Tomcat when executing, but doesn't automatically put it in your classpath. Caroline Jen wrote: The error occurred at the compilation time: SendMessage.java:17: package org.apache.commons.beanutils does not exist. The java code on line 17 is: import org.apache.commons.beanutils.BeanUtils; and the commons-beanutils.jar is in the c:\jakarta-tomcat-5.0.27\webapps\AppName\WEB-INF\lib directory. --- Andrew Hill <[EMAIL PROTECTED]> wrote: The error is run-time or compile-time? Caroline Jen wrote: I have the commons-beanutils.jar file in my AppName\WEB-INF\lib directory. And I have this statement: import org.apache.commons.beanutils.BeanUtils; in my .java class. Why do I get the error message that the BeanUtils class cannot be found - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Is there an installation automater yet
Not free, but I have this, its pretty handy: http://www.openlogic.com/index.php Dan wrote: I haven't been on this list in a while. I was wondering if anyone's created an installation wizard/thingy for it yet. All I have so far is a PC with a new Linux OS. Ideally, I'd like a wizard that sets up everything I need to create a typical application... Struts, MySQL or another DB, JRE, J2EE, J2SE, Expresso, JDBC drivers, Tomcat, etc. Any chance of this existing? I'm thinking of how useful and cool the cygwin installer is. If not, can anyone suggest another open source architecture that might provide something like this? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Help - struggling this for days !
I assume that when you say messages.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage("something here"); the "something here" corresponds to a key in your messages.properties file (or whichever file has your resource messages)? lixin chu wrote: Here is how I prepare action messages in Action: ActionMessages messages = new ActionMessages(); messages.add(ActionMessages.GLOBAL_MESSAGE, new ActionMaessage ("something here")); saveMessages(request, messages); anything wrong ? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts Studio - Anyone using it?
I bought a previous version (5.0). It works as advertised. But in reality, I find Struts pretty easy to use, and thought that it was just as easy to had configure everything. Its nice to see the diagrams to visualize what's going on. The only complaint about the diagrams is that it was difficult to see at a glance what ActionForms (if any) were assigned to an action. I see they are running a special for $99, which sounds like a good deal. I tend to just use UML to diagram, as MagicDraw has support for UML Web Extensions, and actually has Struts extensions as well (I don't think they are a standard or anything, but it makes it easy to document and design). If you already have a UML tool such as MagicDraw or Posseidon, you may want to look at AndroMDA (URL not handy, but its easily google'd). I was really interested in Nitrox, as it provided a more integrated solution. But I'd already invested in other tools, and couldn't justify the expense. Paul Kirkley wrote: Anyone have any critique on Exadel Struts Studio 6.0 in a WSAD 5.1 environment? I am new to struts and I thought this tool looked interesting. Thanks for any input. Paul - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: ActionForm data type X BeanUtils -> using Dates
Then you are doing better than I did. It took me several iterations to figure it out. I ended up testing with two differnt forms, putting breakpoints in my Converters to figure out what was going on... Leandro Melo wrote: I almost understand it in the other way, haha... Now things are clear!!! --- Bryce Fischer <[EMAIL PROTECTED]> escreveu: Leandro Melo wrote: I got one doubt in your code when used in a situation that i mentioned (transforming data from action form to dto). When date comes from action form, they usually come in Strings, but in your method you verify value instanceof Date... This will never happen, as the value comes in String. Sorry, I had it backwards (thats what I get when I post in a hurry). The example I sent was converting a Date property to String. To convert other types to Date I have the following Converter: public class DateConverter implements Converter{ public Object convert(Class type, Object value) { if (value == null) { return null; } else if (type == Date.class) { return convertToDate(type, value); } else if (type == String.class) { return convertToString(type, value); } throw new ConversionException("Could not convert " + value.getClass().getName() + " to " + type.getName()); } protected Object convertToDate(Class type, Object value) { if (value instanceof String) { try { return df.parse((String) value); } catch (Exception pe) { throw new ConversionException("Error converting String to Date"); } } throw new ConversionException("Could not convert " + value.getClass().getName() + " to " + type.getName()); } } To register: ConvertUtils.register(new DateConverter(), Date.class); Am i saying something stupid??? I'm not saying your code is wrong, but not appropriate for the situation in question. Am i right? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] ___ Yahoo! Acesso Grátis - navegue de graça com conexão de qualidade! http://br.acesso.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]
Re: ActionForm data type X BeanUtils -> using Dates
Leandro Melo wrote: I got one doubt in your code when used in a situation that i mentioned (transforming data from action form to dto). When date comes from action form, they usually come in Strings, but in your method you verify value instanceof Date... This will never happen, as the value comes in String. Sorry, I had it backwards (thats what I get when I post in a hurry). The example I sent was converting a Date property to String. To convert other types to Date I have the following Converter: public class DateConverter implements Converter{ public Object convert(Class type, Object value) { if (value == null) { return null; } else if (type == Date.class) { return convertToDate(type, value); } else if (type == String.class) { return convertToString(type, value); } throw new ConversionException("Could not convert " + value.getClass().getName() + " to " + type.getName()); } protected Object convertToDate(Class type, Object value) { if (value instanceof String) { try { return df.parse((String) value); } catch (Exception pe) { throw new ConversionException("Error converting String to Date"); } } throw new ConversionException("Could not convert " + value.getClass().getName() + " to " + type.getName()); } } To register: ConvertUtils.register(new DateConverter(), Date.class); Am i saying something stupid??? I'm not saying your code is wrong, but not appropriate for the situation in question. Am i right? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: ActionForm data type X BeanUtils -> using Dates
The custom converter is done independently of the action, form or DTO. First step is to implement the interface org.apache.commons.beanutils.Converter. Keep in mind that the converter you are writing uses the appropriate converter for the original class. So, if you were converting from a String to a Date, you would create a String converter. And vice versa, if you were converting from a Date to a String you would create a Date converter. Example below Then, to override the standard converters, you call: ConvertUtils.register(, .class); First parameter is your new converter, and the second is the class its used for. I call this in a static initializer of a utility class, you just need to make sure its called before any validations occur, and it only needs to be done once. Since we are interested in customizing conversions from String to Date, I override the String converter: public class StringConverter implements Converter{ public Object convert(Class type, Object value) { Object returnObj = null; if (value != null) { if (value instanceof Date){ returnObj = dateFormatter.format((Date)value); } else if (value instanceof BigDecimal){ returnObj = decimalFormatter.format((BigDecimal)value); } else { returnObj = value.toString(); } } return returnObj; } } I've left out some properties, their getters and setters, but I think you get the gist of what I'm doing. Now, I register this converter as such: ConvertUtils.register(new StringConverter(), String.class); I actually have a utility class, where the register is done in the static initializer. I suppose another way would be to use a servlet that loads prior to Struts.. Or if your Actions have a base class, etc... Maybe there's a more elegant way of doing that. This is what I've come up with. If someone has a better way, post please, I'm always looking for more elegant ways of accomplishing stuff like this. Jason King wrote: Could you point us at some code that does this? Do you customize in the action, the form or the DTO? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: ActionForm data type X BeanUtils -> using Dates
You can register a different converter that BeanUtils uses to copy from a string to a date. Write your own converter, using the date format you need, then use ConvertUtils.register(...) to register it. That's what I do anyhow. -Original Message- From: Leandro Melo [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 08, 2004 10:21 AM To: struts jakarta Subject: ActionForm data type X BeanUtils -> using Dates Hi, i believe that a lot of developers use BeanUtils to copy the data from ActionForms to the specific DTOs. I've used this approach, but right now i'm facing a problem, not a big one. I've allways been confused about working with dates in Java. I got a jsp where the user must input a date in the following format. Date: dd/mm/ That's how we use dates in Brazil: the day, month and year. I'd like to make a validation if the user input the date in the correct manner in the ActionForm (i'm using traditional validation and the user input comes in a String). So, keeping in mind the variou ways of doing this date validation (even the deprecated ones), how should a do the date validation Which one is the best way??? I just want to check if the user input a day with 2 digits, a slash, a month with 2 digits, a slash and a year with 4 digits. Also, after that i'd like to copy this form data to my DTO with BeanUtils. Which type should i use in my DTO for this date??? Thanks, Leandro. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] java group on news.gmane.org
Slattery, Tim - BLS wrote: What group should I subscribe to (within news.gmane.org) for general JAVA/J2EE discussion? Assuming that's a Usenet server, try comp.lang.java.programmer. its a usenet style server, but instead of usenet feeds, it provides access to mailing lists, such as this one (gmane.comp.jakarta.struts.user). To the OP, just search for Java ejb, etc... Since they are archives of mailing lists, I don't know if you will find groups for general discussions. I found gmane.comp.java.ejb.general, but it doesn't look very active. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] someone using Outlook 2003, please tell me it can't be this LAME...
M. Bitner wrote: Tools->Options->Other->Empty the Deleted Items folder upon exiting doesn't work? Nope. Because with IMAP, there's 2 steps to deleting an email message. In Outlook, when you delete a message, it only marks the message for deletion. It will still display in your inbox, but with a line through it. Unless you Purge Deleted Messages, it will stay in your inbox (just marked for deletion). Therefore, the message never gets into your Deleted Items folder (I have my IMAP server setup to move items to the Trash folder when they are purged). Check in the Outlook newsgroups, its a known "issue" with people who use Outlook with IMAP. The only response you ever get from Outlook support is "you have to manually purge". On Sat, 4 Sep 2004 17:43:52 +0800, Big Chiz <[EMAIL PROTECTED]> wrote: It cant be, hehehe, of course im just being biased On Fri, 03 Sep 2004 09:24:32 -0400, Bryce Fischer <[EMAIL PROTECTED]> wrote: My big issue with Outlook, is that its support for IMAP leaves a lot to be desired. With IMAP, deleting is a two part process, marking message as deleted, and purging. Outlook has no way to automatically purge deleted messages, and it drives me nuts. Every other IMAP client I have seen does this. Thunderbird, which I use now, has the option to purge when you close. Outlook, you have to delete the message, then use a menu item to purge (or you can put the button on your tool bar). I've gone on the Outlook newsgroup, and the only response you get is "you need to purge using the menu item". Funny thing is, Outlook Express has this feature... - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT-Friday] Group Sing-along
Jim Barrows wrote: -Original Message- From: news [mailto:[EMAIL PROTECTED] Behalf Of Bill Siggelkow Sent: Friday, September 03, 2004 1:04 PM To: [EMAIL PROTECTED] Subject: Re: [OT-Friday] Group Sing-along Jim Barrows wrote: -Original Message- From: news [mailto:[EMAIL PROTECTED] Behalf Of Bill Siggelkow Sent: Friday, September 03, 2004 12:57 PM To: [EMAIL PROTECTED] Subject: [OT-Friday] Group Sing-along Okay -- its Friday and I thought we could have a group sing-along -- I'll start - Ohhh ... I am a lumberjack and I'm okay ... (now everybody else join in...) Oh, you wood have to go there. Yeah -- just something I've been pining for ... Oakay... now you're going out on a limb. That reminds me... Just got a promotion here at the Tree factory.. I'm now a branch manager... - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: ARRRGGGGHHHH!!! I'm being stupid again....
Jim Barrows wrote: -Original Message- From: news [mailto:[EMAIL PROTECTED] Behalf Of Bill Siggelkow Jim, I know it seems like its unrelated but its really not ... when you create an element you are really defining an instance of ActionMapping (which extends ActionConfig). One of the "properties" of the ActionMapping is the type of the Action. Another is the path, whether to validate or not -- etc. If anything, the confusion lies in the name of the element -- it might be less confusing (but more verbose) it it were . WHat I was trying to do, was create a generic wizard action class, and use the set-property to set the maximum number of pages in the wizard, and be able to use that setup for multiple different wizards. Setting that value per action would have been perfect. Have you considered using Spring? Works well with Struts, and allows you to inject values like that. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] someone using Outlook 2003, please tell me it can't be this LAME...
My big issue with Outlook, is that its support for IMAP leaves a lot to be desired. With IMAP, deleting is a two part process, marking message as deleted, and purging. Outlook has no way to automatically purge deleted messages, and it drives me nuts. Every other IMAP client I have seen does this. Thunderbird, which I use now, has the option to purge when you close. Outlook, you have to delete the message, then use a menu item to purge (or you can put the button on your tool bar). I've gone on the Outlook newsgroup, and the only response you get is "you need to purge using the menu item". Funny thing is, Outlook Express has this feature... - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] Flex, openamf, flash remoting, or ?
Wennberg, Mathias wrote: We're considering putting a new interface on our app and are currently looking into flex, openamf, and flash remoting. Have anyone tried these products and what are your experiences with them? Flex was too much $$ for us. I did some stuff in Flash Remoting, and it worked good. There's a 3rd party Flash Remoting that we used, FlashORB http://www.flashorb.com/ The standard version is free for "most" commercial uses (consult their website for more info on that). - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to stop the first validation when a web page first displays?
This is similar to the issue I had last night. What was suggested to me, and it worked, was to turn automatic validation off by specifying validate=false in the action mapping, and manually validating in my DispatchAction. PC Leung wrote: The web page displays at the first time with the following error. java.lang.NullPointerException java.text.SimpleDateFormat.parse(SimpleDateFormat.java:1108) java.text.DateFormat.parse(DateFormat.java:333) com.erp.quotation.AddUserProfileForm.getSqlJoinDate(AddUserProfileForm.java:68) com.erp.quotation.AddUserProfileForm.validate(AddUserProfileForm.java:80) org.apache.struts.action.RequestProcessor.processValidate(RequestProcessor.java:942) When it first displays, I want it to show with a token. Then I make a setup DispatchAction like the following. public final class AddUserProfileAction extends DispatchAction { public ActionForward setup (ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { saveToken(request); return mapping.findForward("success"); } How it get a validation error message? Actually submit button has not been clicked. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: ValidatorForm issue
Rick Reumann wrote: Vic wrote: I allways say validate = false in mapping, and then manualy call it. Would that help? I do the same. Validating manually also gives you the nice advantage of being able to set up any lists or other objects you need in request scope if valdiation fails. Bryce, an example of it might look like: Thanks. That clarifies what I was thinking. And it makes a lot of sense (Thanks also to David Friedman, didn't want you to think I didn't appreciate your feedback even though I didn't respond to your email). - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: ValidatorForm issue
Vic wrote: I allways say validate = false in mapping, and then manualy call it. Would that help? Thanks for your quick response Vic. Do you mean manually calling it in the DispatchAction class (I think that's what you mean, but I didn't want to assume)? Bryce Fischer wrote: I'm having a problem with a ValidatorForm and validation. The first time I try to access the action below, I get a validation error. The form never gets the opportunity to be filled in by the Action class (action called is /fringe.do?method=edit). Is there any way to tell Struts to not do validation unless we are saving? For example, calling /fringe.do?method=save? I have solved it by overrideing the validate() method, checking the parameters and seeing if "method = 'save'". I was wondering if this was the only way to accomplish this? I'd like to be able to keep that kind of logic out of my form, and put it in the validation.xml file, or another configuration file... Form: public class FringeForm extends ValidatorForm implements java.io.Serializable { private String field1; public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) { ActionErrors actionErrors = new ActionErrors(); String method = request.getParameter("method"); if ("save".equals(method)) { actionErrors = super.validate(mapping, request); } return actionErrors; } // getters and setters omitted for brevity } Validation: And the action mapping looks like this (actual class extends DispatchAction): - 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]
ValidatorForm issue
I'm having a problem with a ValidatorForm and validation. The first time I try to access the action below, I get a validation error. The form never gets the opportunity to be filled in by the Action class (action called is /fringe.do?method=edit). Is there any way to tell Struts to not do validation unless we are saving? For example, calling /fringe.do?method=save? I have solved it by overrideing the validate() method, checking the parameters and seeing if "method = 'save'". I was wondering if this was the only way to accomplish this? I'd like to be able to keep that kind of logic out of my form, and put it in the validation.xml file, or another configuration file... Form: public class FringeForm extends ValidatorForm implements java.io.Serializable { private String field1; public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) { ActionErrors actionErrors = new ActionErrors(); String method = request.getParameter("method"); if ("save".equals(method)) { actionErrors = super.validate(mapping, request); } return actionErrors; } // getters and setters omitted for brevity } Validation: And the action mapping looks like this (actual class extends DispatchAction): - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Recommend Struts Plugins for Eclipse?
> Struts Studio. The best... Struts Studio is ok. My only issue is that about a year ago, I bought it. Since then, they've had 2 paid updates. That's a lot of dough. I haven't bothered to update to 6.x yet, as I cannot see any benefits. I'm currently looking at NitroX from M7. Has some nice features that Struts Studio doesn't have, such as a visual editor for JSP, code completion and validation of form bean properties on the JSP page, etc... -- Bryce Fischer <[EMAIL PROTECTED]> - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: .properties file
> And in struts-config.xml I got : > > parameter="ca.ulaval.fsa.drdb.struts12.resources. ApplicationResources"/> > > But still I get the same error messge. The file exists in the above > parameter definition. I am puzzled! Well, one thing that always gets me where you actually put the resource file. For example, I specify this in my struts-config.xml: so, in my web application directory I have the following: /WEB-INF/resources/application.properties. Struts treats your parameter like its a package and class declaration (its relative to the WEB-INF). Think of it as a class resources.application. if you had a class com.test, then it would be located com/test.class so in your case above, you'd have /WEB-INF/ca/ulaval/fsa/drdb/struts12/resources.properties Don't know if this was your problem, but I figured I'd throw it out there. -- Bryce Fischer <[EMAIL PROTECTED]> - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]