Re: [Somewhat OT] Sending HTML email using struts/java/javamail
All of the form data is in a form been and I don't know of any way to pass that to a URLConnection. Also ... I don't want to email the form. I am emailing something that looks like the form, but instead of a textarea and the like ... I need to put the results of the form. On Wed, 2002-04-24 at 23:08, Jeffrey Bonevich wrote: Could you open an InputStream on an URLConnection on the jsp page, then read that stream into the mail object? That would be one way to do it and leverage the existing app. jeff Edward Muller wrote: I have an internal application that needs to send a html email (management choice, not mine). The application is a mini struts application, but I need to manually format the html email using a large string and constantly appending to it and then I send the email via javamail. Does anyone know of a better way? I'd like to just pass my form bean to another jsp, get the results back (formatted as HTML) and then use javamail to send the email... -- Jeffrey Bonevich Ann Arbor, Michigan [EMAIL PROTECTED] http://www.bonevich.com Hwæt! Wë Gär-Dena in geär-dagum, peod-cyninga, prym gefrünon, hü ða aepelingas ellen fremedon! -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- -- Edward Muller - Director of Information Services LearningPatterns.com Inc. Mobile: 973.715.0230 NYC: 212.487.9064 x115 Email/Jabber: [EMAIL PROTECTED] http://www.learningpatterns.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: [Somewhat OT] Sending HTML email using struts/java/javamail
You still end up writing HTML in the servlet, which is what I want to avoid. On Thu, 2002-04-25 at 00:20, Rick Reumann wrote: On Wednesday, April 24, 2002, 9:13:17 PM, Edward Muller wrote: EM I have an internal application that needs to send a html email EM (management choice, not mine). The application is a mini struts EM application, but I need to manually format the html email using a EM large string and constantly appending to it and then I send the EM email via javamail. EM Does anyone know of a better way? I like to write the html page to a file. Then with the java.mail api you can send the file you created (something.html) as an attachment. EM I'd like to just pass my form bean to another jsp, get the results back EM (formatted as HTML) and then use javamail to send the email... -- Rick mailto:[EMAIL PROTECTED] As the light changed from red to green to yellow and back to red again, I sat there thinking about life. Was it nothing more than a bunch of honking and yelling? Sometimes it seemed that way. -Jack Handey -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- -- Edward Muller - Director of Information Services LearningPatterns.com Inc. Mobile: 973.715.0230 NYC: 212.487.9064 x115 Email/Jabber: [EMAIL PROTECTED] http://www.learningpatterns.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: [Somewhat OT] Sending HTML email using struts/java/javamail
I've used the mailer taglib before (actually this app started out as one large jsp using the mailer taglib). I still needed to stuff all of my html into a String (or StringBuffer ... thanks for the tip) and then use that string in the taglib ... like this... Oh dammit ... I just realized I never had to do that ... I can put whatever I want in between mailer:message/mailer:message Duh ... Chalk it up to beginners ignorance (I spend most of my time doing Linux stuff ... not Java)... On Thu, 2002-04-25 at 10:03, Eddie Bush wrote: Suggestion: Be sure to use a StringBuffer for your appends - it sounds like you're using a lot of '+', which can hinder performance a great deal. So far as sending HTML mail goes, I use the mailer taglib. I'm not sure I understand your problem entirely, but the mailer taglib lets your send mail easy as pie! http://jakarta.apache.org/taglibs/doc/mailer-doc/intro.html If nothing else, it's a good plug for other useful Apache technology =) HTH, Eddie - Original Message - From: Edward Muller [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wednesday, April 24, 2002 8:13 PM Subject: [Somewhat OT] Sending HTML email using struts/java/javamail I have an internal application that needs to send a html email (management choice, not mine). The application is a mini struts application, but I need to manually format the html email using a large string and constantly appending to it and then I send the email via javamail. Does anyone know of a better way? I'd like to just pass my form bean to another jsp, get the results back (formatted as HTML) and then use javamail to send the email... -- -- Edward Muller - Director of Information Services LearningPatterns.com Inc. Mobile: 973.715.0230 NYC: 212.487.9064 x115 Email/Jabber: [EMAIL PROTECTED] http://www.learningpatterns.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- -- Edward Muller - Director of Information Services LearningPatterns.com Inc. Mobile: 973.715.0230 NYC: 212.487.9064 x115 Email/Jabber: [EMAIL PROTECTED] http://www.learningpatterns.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Struts reflection can't find getters on form bean
Your WireTransferForm bean should look something like... import org.apache.struts.action.ActionForm; public WireTransferForm extends ActionForm { private String routingCode = ; public String getRoutingCode() { return this.routingCode; } public void setRoutingCode(String newRoutingCode) { this.routingCode = newRoutingCode; } } i.e. you need a getter and setter for each property ... On Thu, 2002-04-25 at 14:58, [EMAIL PROTECTED] wrote: Hello, I'm having the weirdest problem with Struts. When rendering a JSP using the html: custom tags, Struts can't find some of the getters on the form bean. In particular, it's when using html:radio. In my form bean wireTransferForm, which corresponds to the Java class WireTransferForm, I have properties transferType and routingType, both of which are Strings. If I access these in the html:form using html:text, no problem. If I access them using html:radio, I get the error: javax.servlet.jsp.JspException: No getter method for property routingCode of bean org.apache.struts.taglib.html.BEAN. What is going on here? Why would I be able to access a property with html:text and not with html:radio? Thanks! David David A. Ventimiglia Wells Fargo Private Client Services (415) 396-0414 (work) -- -- Edward Muller - Director of Information Services LearningPatterns.com Inc. Mobile: 973.715.0230 NYC: 212.487.9064 x115 Email/Jabber: [EMAIL PROTECTED] http://www.learningpatterns.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: How to avoid a separate .jsp page for body definition when using Templates?
:[EMAIL PROTECTED] -- -- Edward Muller - Director of Information Services LearningPatterns.com Inc. Mobile: 973.715.0230 NYC: 212.487.9064 x115 Email/Jabber: [EMAIL PROTECTED] http://www.learningpatterns.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
[Somewhat OT] Sending HTML email using struts/java/javamail
I have an internal application that needs to send a html email (management choice, not mine). The application is a mini struts application, but I need to manually format the html email using a large string and constantly appending to it and then I send the email via javamail. Does anyone know of a better way? I'd like to just pass my form bean to another jsp, get the results back (formatted as HTML) and then use javamail to send the email... -- -- Edward Muller - Director of Information Services LearningPatterns.com Inc. Mobile: 973.715.0230 NYC: 212.487.9064 x115 Email/Jabber: [EMAIL PROTECTED] http://www.learningpatterns.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Can't load action classes (solution)
On 26 Jul 2001 17:44:25 -0400, Patrick Coskren wrote: [snip] Solution: take struts.jar out of the system-wide location. Following some advice on another page, I unpacked the entire jar into my WEB- INF/classes directory, just to be positive it got loaded by the right class loader. Everything now works fine. [snip] Another solution is to just place the struts har file in the apps WEB-INF/lib directory. -- Edward Muller Director of Information Services LearningPatterns.com Inc. Direct: 212-487-9064 x 115 Fax: 212-202-3822 Email: [EMAIL PROTECTED] http://www.learningpatterns.com
Re: HotSpot Virtual Machine Error, Internal Error !!
I got the same or similar thing yesterday with the same setup while testing my 'training app' that I am working on. On 26 Jul 2001 14:34:38 +0200, Adriano Labate wrote: I have the following error in the Tomcat window when running my application: ... 2001-07-26 02:33:17 - PoolTcpConnector: Starting HttpConnectionHandler on 8080 2001-07-26 02:33:17 - PoolTcpConnector: Starting Ajp12ConnectionHandler on 8007 # # HotSpot Virtual Machine Error, Internal Error # Please report this error at # http://java.sun.com/cgi-bin/bugreport.cgi # # Error ID: 47454E45524154452F4F502D41500E435050084B # abnormal program termination Has anyone already seen this error and what is the cause ? Tomcat, Hotspot ? I'm running Tomcat 3.2.2 and JDK 1.3.0_02 with Struts 1.0. Thanks Adriano Labate -- Edward Muller Director of Information Services LearningPatterns.com Inc. Direct: 212-487-9064 x 115 Fax: 212-202-3822 Email: [EMAIL PROTECTED] http://www.learningpatterns.com
Re: Error with Data Sources
So I've put in a data-sources section that does parse right, but I get the following errors when tomcat starts up een though postgresql.jar is in the apps WEB-INF/lib directory... Can anyone please help? BTW: I can use regular (non-pool) JDBC as that is how I have the application working. New org.apache.struts.util.GenericDataSource java.lang.NoClassDefFoundError: javax/sql/DataSource at java.lang.ClassLoader.defineClass0(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:486) at org.apache.tomcat.loader.AdaptiveClassLoader12.doDefineClass(AdaptiveClassLoader12.java:93) at org.apache.tomcat.loader.AdaptiveClassLoader.loadClass(AdaptiveClassLoader.java:509) at java.lang.ClassLoader.loadClass(ClassLoader.java:253) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:120) at org.apache.struts.digester.ObjectCreateRule.begin(ObjectCreateRule.java:152) at org.apache.struts.digester.Digester.startElement(Digester.java:498) at com.sun.xml.parser.Parser.maybeElement(Parser.java:1391) at com.sun.xml.parser.Parser.content(Parser.java:1499) at com.sun.xml.parser.Parser.maybeElement(Parser.java:1400) at com.sun.xml.parser.Parser.content(Parser.java:1499) at com.sun.xml.parser.Parser.maybeElement(Parser.java:1400) at com.sun.xml.parser.Parser.parseInternal(Parser.java:492) at com.sun.xml.parser.Parser.parse(Parser.java:284) at javax.xml.parsers.SAXParser.parse(SAXParser.java:155) at javax.xml.parsers.SAXParser.parse(SAXParser.java:77) at org.apache.struts.digester.Digester.parse(Digester.java:716) at org.apache.struts.action.ActionServlet.initMapping(ActionServlet.java:1247) at org.apache.struts.action.ActionServlet.init(ActionServlet.java:437) at javax.servlet.GenericServlet.init(GenericServlet.java:258) at org.apache.tomcat.core.ServletWrapper.doInit(ServletWrapper.java:317) at org.apache.tomcat.core.Handler.init(Handler.java:215) at org.apache.tomcat.core.ServletWrapper.init(ServletWrapper.java:296) at org.apache.tomcat.context.LoadOnStartupInterceptor.contextInit(LoadOnStartupInterceptor.java:130) at org.apache.tomcat.core.ContextManager.initContext(ContextManager.java:491) at org.apache.tomcat.core.ContextManager.init(ContextManager.java:453) at org.apache.tomcat.startup.Tomcat.execute(Tomcat.java:195) at org.apache.tomcat.startup.Tomcat.main(Tomcat.java:235) Begin event threw exception java.lang.ClassNotFoundException: org/apache/struts/util/GenericDataSource at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:120) at org.apache.struts.digester.ObjectCreateRule.begin(ObjectCreateRule.java:152) at org.apache.struts.digester.Digester.startElement(Digester.java:498) at com.sun.xml.parser.Parser.maybeElement(Parser.java:1391) at com.sun.xml.parser.Parser.content(Parser.java:1499) at com.sun.xml.parser.Parser.maybeElement(Parser.java:1400) at com.sun.xml.parser.Parser.content(Parser.java:1499) at com.sun.xml.parser.Parser.maybeElement(Parser.java:1400) at com.sun.xml.parser.Parser.parseInternal(Parser.java:492) at com.sun.xml.parser.Parser.parse(Parser.java:284) at javax.xml.parsers.SAXParser.parse(SAXParser.java:155) at javax.xml.parsers.SAXParser.parse(SAXParser.java:77) at org.apache.struts.digester.Digester.parse(Digester.java:716) at org.apache.struts.action.ActionServlet.initMapping(ActionServlet.java:1247) at org.apache.struts.action.ActionServlet.init(ActionServlet.java:437) at javax.servlet.GenericServlet.init(GenericServlet.java:258) at org.apache.tomcat.core.ServletWrapper.doInit(ServletWrapper.java:317) at org.apache.tomcat.core.Handler.init(Handler.java:215) at org.apache.tomcat.core.ServletWrapper.init(ServletWrapper.java:296) at org.apache.tomcat.context.LoadOnStartupInterceptor.contextInit(LoadOnStartupInterceptor.java:130) at org.apache.tomcat.core.ContextManager.initContext(ContextManager.java:491) at org.apache.tomcat.core.ContextManager.init(ContextManager.java:453) at org.apache.tomcat.startup.Tomcat.execute(Tomcat.java:195) at org.apache.tomcat.startup.Tomcat.main(Tomcat.java:235) On 25 Jul 2001 22:20:00 -0400, Edward Muller wrote: Okay. I figured out that data-sources needs to go at the tope and I removed the set-property tags and actually made the properties. I am using postgres 7.1 something. Now when I start my sample application I get a ClassNotFoundException. I've checked and postgresql.jar from my postgres install is in my apps WEF-INF/lib directory. I've got the application working
Re: Error with Data Sources
Nevermind. I figured it out. I'm a duh. I didn't have the JDBC2 extra classes. On 26 Jul 2001 09:07:10 -0400, Edward Muller wrote: So I've put in a data-sources section that does parse right, but I get the following errors when tomcat starts up een though postgresql.jar is in the apps WEB-INF/lib directory... Can anyone please help? BTW: I can use regular (non-pool) JDBC as that is how I have the application working. New org.apache.struts.util.GenericDataSource java.lang.NoClassDefFoundError: javax/sql/DataSource at java.lang.ClassLoader.defineClass0(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:486) at org.apache.tomcat.loader.AdaptiveClassLoader12.doDefineClass(AdaptiveClassLoader12.java:93) at org.apache.tomcat.loader.AdaptiveClassLoader.loadClass(AdaptiveClassLoader.java:509) at java.lang.ClassLoader.loadClass(ClassLoader.java:253) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:120) at org.apache.struts.digester.ObjectCreateRule.begin(ObjectCreateRule.java:152) at org.apache.struts.digester.Digester.startElement(Digester.java:498) at com.sun.xml.parser.Parser.maybeElement(Parser.java:1391) at com.sun.xml.parser.Parser.content(Parser.java:1499) at com.sun.xml.parser.Parser.maybeElement(Parser.java:1400) at com.sun.xml.parser.Parser.content(Parser.java:1499) at com.sun.xml.parser.Parser.maybeElement(Parser.java:1400) at com.sun.xml.parser.Parser.parseInternal(Parser.java:492) at com.sun.xml.parser.Parser.parse(Parser.java:284) at javax.xml.parsers.SAXParser.parse(SAXParser.java:155) at javax.xml.parsers.SAXParser.parse(SAXParser.java:77) at org.apache.struts.digester.Digester.parse(Digester.java:716) at org.apache.struts.action.ActionServlet.initMapping(ActionServlet.java:1247) at org.apache.struts.action.ActionServlet.init(ActionServlet.java:437) at javax.servlet.GenericServlet.init(GenericServlet.java:258) at org.apache.tomcat.core.ServletWrapper.doInit(ServletWrapper.java:317) at org.apache.tomcat.core.Handler.init(Handler.java:215) at org.apache.tomcat.core.ServletWrapper.init(ServletWrapper.java:296) at org.apache.tomcat.context.LoadOnStartupInterceptor.contextInit(LoadOnStartupInterceptor.java:130) at org.apache.tomcat.core.ContextManager.initContext(ContextManager.java:491) at org.apache.tomcat.core.ContextManager.init(ContextManager.java:453) at org.apache.tomcat.startup.Tomcat.execute(Tomcat.java:195) at org.apache.tomcat.startup.Tomcat.main(Tomcat.java:235) Begin event threw exception java.lang.ClassNotFoundException: org/apache/struts/util/GenericDataSource at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:120) at org.apache.struts.digester.ObjectCreateRule.begin(ObjectCreateRule.java:152) at org.apache.struts.digester.Digester.startElement(Digester.java:498) at com.sun.xml.parser.Parser.maybeElement(Parser.java:1391) at com.sun.xml.parser.Parser.content(Parser.java:1499) at com.sun.xml.parser.Parser.maybeElement(Parser.java:1400) at com.sun.xml.parser.Parser.content(Parser.java:1499) at com.sun.xml.parser.Parser.maybeElement(Parser.java:1400) at com.sun.xml.parser.Parser.parseInternal(Parser.java:492) at com.sun.xml.parser.Parser.parse(Parser.java:284) at javax.xml.parsers.SAXParser.parse(SAXParser.java:155) at javax.xml.parsers.SAXParser.parse(SAXParser.java:77) at org.apache.struts.digester.Digester.parse(Digester.java:716) at org.apache.struts.action.ActionServlet.initMapping(ActionServlet.java:1247) at org.apache.struts.action.ActionServlet.init(ActionServlet.java:437) at javax.servlet.GenericServlet.init(GenericServlet.java:258) at org.apache.tomcat.core.ServletWrapper.doInit(ServletWrapper.java:317) at org.apache.tomcat.core.Handler.init(Handler.java:215) at org.apache.tomcat.core.ServletWrapper.init(ServletWrapper.java:296) at org.apache.tomcat.context.LoadOnStartupInterceptor.contextInit(LoadOnStartupInterceptor.java:130) at org.apache.tomcat.core.ContextManager.initContext(ContextManager.java:491) at org.apache.tomcat.core.ContextManager.init(ContextManager.java:453) at org.apache.tomcat.startup.Tomcat.execute(Tomcat.java:195) at org.apache.tomcat.startup.Tomcat.main(Tomcat.java:235) On 25 Jul 2001 22:20:00 -0400, Edward Muller wrote: Okay. I figured out that data-sources needs to go at the tope and I removed the set-property tags and actually made the properties. I am using postgres 7.1 something. Now when I start my sample application I get a ClassNotFoundException. I've checked
Error with Data Sources
I'm trying to configure a data-source in my struts-config.xml file and I get the following error: Parse Error at line 71 column -1: Element struts-config allows no further input; data-sources is not allowed. ...(more traceback here)... The snippet from my struts-config.xml file is as follows: data-sources data-source set-property property=autoCommit value=false / set-property property=description value=Postgres Server/ set-property property=driverClass value=org.postgresql.Driver/ set-property property=maxCount value=4/ set-property property=minCount value=2/ set-property property=password value=zsdc980/ set-property property=url value=jdbc:postgresql://localhost/LPC/ set-property property=user value=edwardam/ /data-source /data-sources What am I doing wrong? -- Edward Muller Director of Information Services LearningPatterns.com Inc. Direct: 212-487-9064 x 115 Fax: 212-202-3822 Email: [EMAIL PROTECTED] http://www.learningpatterns.com
Re: Error with Data Sources
Okay. I figured out that data-sources needs to go at the tope and I removed the set-property tags and actually made the properties. I am using postgres 7.1 something. Now when I start my sample application I get a ClassNotFoundException. I've checked and postgresql.jar from my postgres install is in my apps WEF-INF/lib directory. I've got the application working by establishing my own connections and not using the pool, so I know I can talk to JDBC and it can load the driver. But I can't seem to get the strut-pool stuff to load it Can anyone point out my stupid mistake? Here is my data-sources section: data-sources data-source autoCommit=false driverClass=org.postgresql.Driver maxCount=4 minCount=2 password=whatever url=jdbc:postgresql://localhost/LPC user=edwardam / /data-sources On 25 Jul 2001 14:05:00 -0400, Edward Muller wrote: I'm trying to configure a data-source in my struts-config.xml file and I get the following error: Parse Error at line 71 column -1: Element struts-config allows no further input; data-sources is not allowed. ...(more traceback here)... The snippet from my struts-config.xml file is as follows: data-sources data-source set-property property=autoCommit value=false / set-property property=description value=Postgres Server/ set-property property=driverClass value=org.postgresql.Driver/ set-property property=maxCount value=4/ set-property property=minCount value=2/ set-property property=password value=whatever/ set-property property=url value=jdbc:postgresql://localhost/LPC/ set-property property=user value=edwardam/ /data-source /data-sources What am I doing wrong? -- Edward Muller Director of Information Services LearningPatterns.com Inc. Direct: 212-487-9064 x 115 Fax: 212-202-3822 Email: [EMAIL PROTECTED] http://www.learningpatterns.com -- Edward Muller Director of Information Services LearningPatterns.com Inc. Direct: 212-487-9064 x 115 Fax: 212-202-3822 Email: [EMAIL PROTECTED] http://www.learningpatterns.com