RE: [OT] Sending email from struts
We also use the velocity template engine and it has worked like a charm. During initial development we simply sent a Hashmap of variable values to the Template helper class we created ( and created very rudimentary emails for testing) when the system was ready to go into production the end users simply updated the templates to format the emails to look like they wanted and saved and everything worked out great. -Original Message- From: Tim Kettering [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 11, 2004 10:10 AM To: 'Struts Users Mailing List' Subject: RE: [OT] Sending email from struts For our project, what we're using is Velocity. I wrote up a simple velocity utility class that would take a velocity template, a hashmap of values, and return the formatted string, and then use that string for the mail body. Then you can keep your velocity files (.vm) in the classpath, and fetch them via the classloader. It works pretty good. I would imagine that you could take it a bit further and store the velocity text in the database instead. The other option is to use the mailer taglib on a jsp page, but I found that it was distruptive in terms of workflow if you want to do a forward to a page while sending a email, like a password reminder workflow, etc. -tim -Original Message- From: Samyukta Akunuru [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 11, 2004 11:05 AM To: Struts Users Mailing List Subject: RE: [OT] Sending email from struts Did you try using JavaMail API -Original Message- From: Matt Bathje [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 11, 2004 10:03 AM To: strutslist Subject: [OT] Sending email from struts Hi all. This is kind of off topic as it is not really struts related, but somebody here would probably have the answer. We have our application sending emails to users at some points and it is working fine. The problem is that we have the email message hardcoded into the Java, which we would like to avoid either by storing the message in application.properties or our database. This would be easy, except all of the messages contain user-specific information like their name or phone number or order id or something like that. Anybody have any ideas (or links to programs!) that can read in an email, replace the information it needs to from the db, and send that to the user. I could obviously write something myself to do it, but wouldn't want to reinvent the wheel. Turns out this is hard to search for too - email is not a search term that makes things easy. Thanks, Matt Bathje - 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]
how to specify HTML attribute when HTML Tag does not have corrosp onding attribute
I'm using the textarea tag in a page, however I need to specify the wrap attribute as hard so text is sent to the server with carriage returns and line feeds in place. Since the TEXTAREA HTML tag does not have a wrap attribute how can I tell it to render the correct html wrap attribute - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: how to specify HTML attribute when HTML Tag does not have cor rosp onding attribute
Fair enough... I'm thinking If I have to subclass and create this attribute would there be any forseeable harm in making an unsupportedAttribute and pass in the key/value pair combination to be rendered (IE. html:textarea unsupportedAttribute=wrap='hard' property=description cols=30 rows=2/) that way I don't have to go through this every time I need to use a new attribute. -Original Message- From: Hubert Rabago [mailto:[EMAIL PROTECTED] Sent: Monday, February 09, 2004 2:41 PM To: Struts Users Mailing List Subject: Re: how to specify HTML attribute when HTML Tag does not have corrosp onding attribute If you need an attribute that isn't supported, you have to subclass the tag class and add that support. And sorry, but no, I haven't tried it yet. --- Nimmons, Buster [EMAIL PROTECTED] wrote: I'm using the textarea tag in a page, however I need to specify the wrap attribute as hard so text is sent to the server with carriage returns and line feeds in place. Since the TEXTAREA HTML tag does not have a wrap attribute how can I tell it to render the correct html wrap attribute - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? Yahoo! Finance: Get your refund fast by filing online. http://taxes.yahoo.com/filing.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]
RE: how to specify HTML attribute when HTML Tag does not have cor rosp onding attribute
Not sure about browser specific, but view the properties/attributes section of the MSDN dhtml developer reference there are well over 200 attributes or properties available. Granted this is for all object types but there is still a tremendous gap between what is available and ahat is supported. This is my first application in which I have utilized STRUTS, I have normally shied away from tags to generate HTML tags just for this reason. I figured STRUTS is mature enough that I should run into very few of these situations. Well, the very first tag on the very first page is a culprit. Now, I'm not against implementing the WRAP attribute but having an unsupportedAttribute would sure make life easier at times. -Original Message- From: Wendy Smoak [mailto:[EMAIL PROTECTED] Sent: Monday, February 09, 2004 3:24 PM To: Struts Users Mailing List Subject: RE: how to specify HTML attribute when HTML Tag does not have cor rosp onding attribute Fair enough... I'm thinking If I have to subclass and create this attribute would there be any forseeable harm in making an unsupportedAttribute and pass in the key/value pair combination to be rendered (IE. html:textarea unsupportedAttribute=wrap='hard' property=description cols=30 rows=2/) that way I don't have to go through this every time I need to use a new attribute. What happens if you need to use two unsupported attributes in a single tag? I'd just extend the tag and do it right... How many browser specific attributes are there? -- Wendy Smoak Application Systems Analyst, Sr. ASU IA Information Resources Management - 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 specify HTML attribute when HTML Tag does not have cor rosp onding attribute
Upon further contemplation a extendedHTMLTagBody attribute might be more appropriate. So that you can instruct the tag bean to write what is supplied into the html tag. (IE html:textarea property=description cols=30 rows=2 extendedHTMLTagBody=myCustomAttribute='something' wrap='hard' /. I don't care how many attributes you implement in a tag somebody somewhere will need to have something extra written to the HTML stream. -Original Message- From: Nimmons, Buster [mailto:[EMAIL PROTECTED] Sent: Monday, February 09, 2004 3:41 PM To: 'Struts Users Mailing List' Subject: RE: how to specify HTML attribute when HTML Tag does not have cor rosp onding attribute Not sure about browser specific, but view the properties/attributes section of the MSDN dhtml developer reference there are well over 200 attributes or properties available. Granted this is for all object types but there is still a tremendous gap between what is available and ahat is supported. This is my first application in which I have utilized STRUTS, I have normally shied away from tags to generate HTML tags just for this reason. I figured STRUTS is mature enough that I should run into very few of these situations. Well, the very first tag on the very first page is a culprit. Now, I'm not against implementing the WRAP attribute but having an unsupportedAttribute would sure make life easier at times. -Original Message- From: Wendy Smoak [mailto:[EMAIL PROTECTED] Sent: Monday, February 09, 2004 3:24 PM To: Struts Users Mailing List Subject: RE: how to specify HTML attribute when HTML Tag does not have cor rosp onding attribute Fair enough... I'm thinking If I have to subclass and create this attribute would there be any forseeable harm in making an unsupportedAttribute and pass in the key/value pair combination to be rendered (IE. html:textarea unsupportedAttribute=wrap='hard' property=description cols=30 rows=2/) that way I don't have to go through this every time I need to use a new attribute. What happens if you need to use two unsupported attributes in a single tag? I'd just extend the tag and do it right... How many browser specific attributes are there? -- Wendy Smoak Application Systems Analyst, Sr. ASU IA Information Resources Management - 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: Unit Test in struts
if the front end to your application is strictly browser based then JavaScript will more than likely play a role in the application. Same as if you were to use a Swing front end you would more than likely have to make use of eventlisteners. When I hear someone say you shouldn't use JavaScript (or something similar) in a browser based application, I usually find out that they really cannot distinguish the separate components of an application and how they interact with each other and the user. I especially like the I somehow dislike statements.. You dislike something but can't figure out why? Sounds like upper management material to me. -Original Message- From: Edgar P Dollin [mailto:[EMAIL PROTECTED] Sent: Thursday, January 22, 2004 4:42 PM To: 'Struts Users Mailing List' Subject: RE: Unit Test in struts Maybe I am not smart enough for my applications (order entry, inventory, etc.) I just don't see how to give any real functionality in the application space without JavaScript. Some issues where I don't see a work around for which are intrisic to all the applications I am working on. 1) The user is entering items. User needs dynamic feedback as to to how much is entered so correctness of data entry can be determined. 2) User can't remember a code from a 'large' list and needs to look it up and return to where he was with the correct value filled in. Perhaps it can be done with some fancy footwork with actions but... 3) Menus, yes there are plenty of static menus but all the real ones are javascript, i.e. coolmenus cannot be tested with the existing test tools. Menu's are not required to be tested but it would be nice. Edgar -Original Message- From: Ashikuzzaman [mailto:[EMAIL PROTECTED] Sent: Thursday, January 22, 2004 1:25 PM To: 'Struts Users Mailing List' Subject: RE: Unit Test in struts I somehow dislike JavaScript from the very beginning. I try my best to avoid it in big projects and so far successful. :-{ Regards, Muhammad Ashikuzzaman (Fahim) Senior Software Engineer, SurroundApps Inc. --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.564 / Virus Database: 356 - Release Date: 1/19/2004 - 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: Stateful session bean
Even though it seems this is a general J2EE related question it is not. Unlike most, this individual described the entire environment so that we may have a better understanding of the question. Which was, should store reference of business delegate in the HttpSession so that another Action class (some another event in same session) can refer to the existing stateful session bean instance that seems like a logical STRUTS related question to me. Now to answer the question. HttpSession would be the logical place to store the reference to resources needed across multiple HTTP requests -Original Message- From: SasiDharma Tharmarajah [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 30, 2003 7:36 AM To: Struts Users Mailing List Subject: RE: Stateful session bean I suppose this user group mainly caters for struts and strust related issues... May b u shd try posting it to [EMAIL PROTECTED] or [EMAIL PROTECTED] sasi -Original Message- From: Viral_Thakkar [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 30, 2003 7:29 PM To: Struts Users Mailing List Subject: Stateful session bean Hi all, Please confirm the below understanding of mine. Architecture: Action -- Business Delegate -- Session Bean -- Database Business delegate will hold a reference of session bean, this uses Service locator pattern to get Home Object reference. It will have business methods which will invoke corresponding methods on session EJB. In case of stateless session bean, I don't seem any problem but if I have to use stateful session bean then I think I should store reference of business delegate in the HttpSession so that another Action class (some another event in same session) can refer to the existing stateful session bean instance through business delegate which can be accessed from HttpSession. Please reply. Thanks Regards, Viral - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Best place to initialize resources in an action class
I recently started using strutsin lie of straight servlets and jsps. I was wondering where is the most logical place to perform initialization process in an Action class. In a servlet I normally use the init method to perform these tasks. The closest I have found in the Action class is the Setservlet Method. Is this the correct place? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]