RE: OptionsCollectionTag with ActionForm and a collection attribute
No takers on this? If I am renderin a select box in JSP with selectTag and optionsCollectionTag, can my form bean store the selected options in a collection? (instead of an array, which seems to work fine) From: Janne Mattila [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: OptionsCollectionTag with ActionForm and a collection attribute Date: Mon, 09 Aug 2004 09:54:57 + I am just studying the basic things about Struts, and have some trouble getting selectTag and optionsCollectionTag work as I would expect. Intention is to have two properties in a form: allChoices, that is a collection holding all possible choices for the select tag, and selectedChoicesCollection, that contains the currently selected ones. Each choice is modelled by a class Choice, that contains two attributes, id for identifying the selection and name, which is displaed to the user. SelectedChoicesCollection contains only the values of the Choices (as having it contain Choice objects did not seem to work at all). I have to actions, SimpleGetAction and SimpleSaveAction. User starts by calling a URL which maps to SimpleGetAction. This action populates the form object and moves on to the JSP page. This part works out as I excpect, and the correct choice(s) is highlighted. When user submits the form, SimpleSaveAction gets called - except that BeanUtils.populate throws an exception before action gets it's turn: 12:34:46,268 INFO [STDOUT] DEBUG [org.apache.struts.util.RequestUtils][1799] Get module name for path /SaveSimpleTest.do 12:34:46,268 INFO [STDOUT] DEBUG [org.apache.struts.util.RequestUtils][1821] Module name found: default 12:34:46,268 INFO [STDOUT] DEBUG [org.apache.struts.action.RequestProcessor][225] Processing a 'POST' for path '/SaveSimpleTest' 12:34:46,268 INFO [STDOUT] DEBUG [org.apache.struts.util.RequestUtils][764] Looking for ActionForm bean instance in scope 'request' under attribute key 'simp eForm' 12:34:46,268 INFO [STDOUT] DEBUG [org.apache.struts.util.RequestUtils][839] Creating new ActionForm instance of type 'jannen.form.SimpleTestForm' 12:34:46,268 INFO [STDOUT] DEBUG [org.apache.struts.util.RequestUtils][844] -- jannen.form.SimpleTestForm selectedChoicesArray: selectedChoicesCollection: 3] 12:34:46,308 INFO [STDOUT] DEBUG [org.apache.struts.action.RequestProcessor][372] Storing ActionForm bean instance in scope 'request' under attribute key 'si pleForm' 12:34:46,388 INFO [STDOUT] DEBUG [org.apache.struts.action.RequestProcessor][813] Populating bean properties from this request 12:34:46,388 ERROR [Engine] StandardWrapperValve[action]: Servlet.service() for servlet action threw exception javax.servlet.ServletException: BeanUtils.populate at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:1254) at org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.java:821) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:254) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256) 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.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.jboss.web.tomcat.security.JBossSecurityMgrRealm.invoke(JBossSecurityMgrRealm.java:220) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.jboss.web.tomcat.tc4.statistics.ContainerStatsValve.invoke(ContainerStatsValve.java:76) 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
Scriptlet in html:img
Hi All, following ing tag givin me error can anyone correct this html:img border=0 vspace=0 hspace=0 align=left height=146 src=%=request.getContextPath()%/images/a.gif / Thanks Ashwini - Do you Yahoo!? Express yourself with Y! Messenger! Free. Download now.
RE: OptionsCollectionTag with ActionForm and a collection attribute
Why do you want to store it in a collection ?? The selected option would be a String right ?? -Original Message- From: Janne Mattila [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 10, 2004 11:54 AM To: [EMAIL PROTECTED] Subject: RE: OptionsCollectionTag with ActionForm and a collection attribute No takers on this? If I am renderin a select box in JSP with selectTag and optionsCollectionTag, can my form bean store the selected options in a collection? (instead of an array, which seems to work fine) From: Janne Mattila [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: OptionsCollectionTag with ActionForm and a collection attribute Date: Mon, 09 Aug 2004 09:54:57 + I am just studying the basic things about Struts, and have some trouble getting selectTag and optionsCollectionTag work as I would expect. Intention is to have two properties in a form: allChoices, that is a collection holding all possible choices for the select tag, and selectedChoicesCollection, that contains the currently selected ones. Each choice is modelled by a class Choice, that contains two attributes, id for identifying the selection and name, which is displaed to the user. SelectedChoicesCollection contains only the values of the Choices (as having it contain Choice objects did not seem to work at all). I have to actions, SimpleGetAction and SimpleSaveAction. User starts by calling a URL which maps to SimpleGetAction. This action populates the form object and moves on to the JSP page. This part works out as I excpect, and the correct choice(s) is highlighted. When user submits the form, SimpleSaveAction gets called - except that BeanUtils.populate throws an exception before action gets it's turn: 12:34:46,268 INFO [STDOUT] DEBUG [org.apache.struts.util.RequestUtils][1799] Get module name for path /SaveSimpleTest.do 12:34:46,268 INFO [STDOUT] DEBUG [org.apache.struts.util.RequestUtils][1821] Module name found: default 12:34:46,268 INFO [STDOUT] DEBUG [org.apache.struts.action.RequestProcessor][225] Processing a 'POST' for path '/SaveSimpleTest' 12:34:46,268 INFO [STDOUT] DEBUG [org.apache.struts.util.RequestUtils][764] Looking for ActionForm bean instance in scope 'request' under attribute key 'simp eForm' 12:34:46,268 INFO [STDOUT] DEBUG [org.apache.struts.util.RequestUtils][839] Creating new ActionForm instance of type 'jannen.form.SimpleTestForm' 12:34:46,268 INFO [STDOUT] DEBUG [org.apache.struts.util.RequestUtils][844] -- jannen.form.SimpleTestForm selectedChoicesArray: selectedChoicesCollection: 3] 12:34:46,308 INFO [STDOUT] DEBUG [org.apache.struts.action.RequestProcessor][372] Storing ActionForm bean instance in scope 'request' under attribute key 'si pleForm' 12:34:46,388 INFO [STDOUT] DEBUG [org.apache.struts.action.RequestProcessor][813] Populating bean properties from this request 12:34:46,388 ERROR [Engine] StandardWrapperValve[action]: Servlet.service() for servlet action threw exception javax.servlet.ServletException: BeanUtils.populate at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:1254) at org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessorjava:821) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:254) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256) 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.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.jboss.web.tomcat.security.JBossSecurityMgrRealm.invoke(JBossSecurityMgrRealm.java:220) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.jboss.web.tomcat.tc4.statistics.ContainerStatsValve.invoke(ContainerStatsValve.java:76) at
Re: [Please help me!] upgrade from struts 1.1 rc1 to struts 1.1 final
Hello, please can someone be so kind to help me. Problem see below. Thanks! Andrea Hello, I didn't neccessarily exspect that someone could recite the steps, but it could be possibe that someone could do it. To tell the truth I've not thought that it are so many steps. Perhaps someone can tell me a site with the infos I need. I thought that it would be easier to help me, if I ask for the individual steps, instead of posting my different error messages. I'm sorry! That's my error: java.lang.ClassCastException at org.apache.struts.tiles.TilesRequestProcessor.initDefinitionsMapping(TilesRequestProcessor.java:126) at org.apache.struts.tiles.TilesRequestProcessor.init(TilesRequestProcessor.java:116) at org.apache.struts.action.ActionServlet.getRequestProcessor(ActionServlet.java:872) 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 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:260) 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.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:2396) 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:170) 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:405) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:380) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:508) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:533) at java.lang.Thread.run(Thread.java:536) I've copied the new struts.jar to my WEB-INF/lib-directory and the new tld- and dtd-files to my WEB-INF-directory. Thank you for your help! Andrea I'd be surprised if anyone could recite off the top of their head the steps you need to take and saying it doesn't work isn't giving enough information for anyone to help you. Niall - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, August 05, 2004 1:18 PM Subject: upgrade from struts 1.1 rc1 to struts 1.1 final Hello, unfortunately I've problems at upgrading from struts 1.1 rc1 to struts 1.1 final. I've read some things in the mailing list archive, but I've still problems. My application has run with rc1, but after trying to upgrade, it doesn't work. Could someone of you tell me, what I've to do exactly. The individual steps! Thank you very much! Andrea -- NEU: WLAN-Router für 0,- EUR* - auch für DSL-Wechsler! GMX DSL = supergünstig kabellos http://www.gmx.net/de/go/dsl
Re: Scriptlet in html:img
html:img page=/images/a.gif/ should render as: img src=/your_context_path/images/a.gif if I am not mistaken. Erik ashwini jagtap wrote: Hi All, following ing tag givin me error can anyone correct this html:img border=0 vspace=0 hspace=0 align=left height=146 src=%=request.getContextPath()%/images/a.gif / Thanks Ashwini - Do you Yahoo!? Express yourself with Y! Messenger! Free. Download now. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: OptionsCollectionTag with ActionForm and a collection attribute
Collections are more convenient to use than arrays (of course, disagreement on this is allowed :) and they integrate more easily to the rest of the codebase, which uses collections everywhere. Multiple values can be selected (multiple=true), so the selected options would be a collection. In this example, I would expect it to be a collection of Choice objectsalthough a collection of Strings (as a collection of parameters) or a collection of Integers (collection of Choice.ids) I would also understand, too. Even the struts examples (struts-exercise-taglib.war) use only arrays to model the selected options. This seems odd, since it would be logical to allow selected options to be stored in a collection, since all available options are stored in a collection. Plus, it seems to work to one way but not the other (JSP gets populated ok, problems occur only when submitting the form). Oh well, it seems that struts documentation http://struts.apache.org/userGuide/struts-html.html#select states that multiple=true IS selected - The corresponding property should be an array of any supported data type. so I think I am out of luck here. Funny though that it works halfway... From: [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: RE: OptionsCollectionTag with ActionForm and a collection attribute Date: Tue, 10 Aug 2004 12:29:59 +0530 Why do you want to store it in a collection ?? The selected option would be a String right ?? -Original Message- From: Janne Mattila [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 10, 2004 11:54 AM To: [EMAIL PROTECTED] Subject: RE: OptionsCollectionTag with ActionForm and a collection attribute No takers on this? If I am renderin a select box in JSP with selectTag and optionsCollectionTag, can my form bean store the selected options in a collection? (instead of an array, which seems to work fine) From: Janne Mattila [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: OptionsCollectionTag with ActionForm and a collection attribute Date: Mon, 09 Aug 2004 09:54:57 + I am just studying the basic things about Struts, and have some trouble getting selectTag and optionsCollectionTag work as I would expect. Intention is to have two properties in a form: allChoices, that is a collection holding all possible choices for the select tag, and selectedChoicesCollection, that contains the currently selected ones. Each choice is modelled by a class Choice, that contains two attributes, id for identifying the selection and name, which is displaed to the user. SelectedChoicesCollection contains only the values of the Choices (as having it contain Choice objects did not seem to work at all). I have to actions, SimpleGetAction and SimpleSaveAction. User starts by calling a URL which maps to SimpleGetAction. This action populates the form object and moves on to the JSP page. This part works out as I excpect, and the correct choice(s) is highlighted. When user submits the form, SimpleSaveAction gets called - except that BeanUtils.populate throws an exception before action gets it's turn: 12:34:46,268 INFO [STDOUT] DEBUG [org.apache.struts.util.RequestUtils][1799] Get module name for path /SaveSimpleTest.do 12:34:46,268 INFO [STDOUT] DEBUG [org.apache.struts.util.RequestUtils][1821] Module name found: default 12:34:46,268 INFO [STDOUT] DEBUG [org.apache.struts.action.RequestProcessor][225] Processing a 'POST' for path '/SaveSimpleTest' 12:34:46,268 INFO [STDOUT] DEBUG [org.apache.struts.util.RequestUtils][764] Looking for ActionForm bean instance in scope 'request' under attribute key 'simp eForm' 12:34:46,268 INFO [STDOUT] DEBUG [org.apache.struts.util.RequestUtils][839] Creating new ActionForm instance of type 'jannen.form.SimpleTestForm' 12:34:46,268 INFO [STDOUT] DEBUG [org.apache.struts.util.RequestUtils][844] -- jannen.form.SimpleTestForm selectedChoicesArray: selectedChoicesCollection: 3] 12:34:46,308 INFO [STDOUT] DEBUG [org.apache.struts.action.RequestProcessor][372] Storing ActionForm bean instance in scope 'request' under attribute key 'si pleForm' 12:34:46,388 INFO [STDOUT] DEBUG [org.apache.struts.action.RequestProcessor][813] Populating bean properties from this request 12:34:46,388 ERROR [Engine] StandardWrapperValve[action]: Servlet.service() for servlet action threw exception javax.servlet.ServletException: BeanUtils.populate at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:1254) at org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessorjava:821) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:254) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at
RE: Scriptlet in html:img
Try with below rectified code html:img border=0 vspace=0 hspace=0 align=left height=146 src=%=request.getContextPath()%/images/a.gif / with regards, Ningappa -Original Message- From: ashwini jagtap [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 10, 2004 12:27 PM To: [EMAIL PROTECTED] Subject: Scriptlet in html:img Hi All, following ing tag givin me error can anyone correct this html:img border=0 vspace=0 hspace=0 align=left height=146 src=%=request.getContextPath()%/images/a.gif / Thanks Ashwini - Do you Yahoo!? Express yourself with Y! Messenger! Free. Download now. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Struts and encoding
Are you sending the form using POST method? Do you set request encoding in your action before reading the parameter value? - (request.setCharacterEncoding(UTF-8); Do you have the content type of jsp set to UTF-8? - %@ page contentType=text/html;charset=UTF-8 language=java % Radek -Original Message- From: Masoud Kalali [mailto:[EMAIL PROTECTED] Sent: Monday, August 09, 2004 7:59 PM To: Struts Users Mailing List Subject: Struts and encoding Hi friends I have a problem with Struts / Jsp when i send a paramete from a jsp to my action (by using formBean) It seems that character encoding of my parameter changes , is it true? my prameter is UTF-8 , but in action it seems that its encoding changed to iso Latin-1 is there any solution for this? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
XMoon new documentation
Released new documentation and an example of Hello World powered by XMoon http://www.xmoon.org/pdf/Struts_xmoon_eng.pdf Home site: http://www.xmoon.org - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Scriptlet in html:img
yes, that's correct.. but i don't understand html:img tag is not parsing correct Erik Weber [EMAIL PROTECTED] wrote: should render as: /images/a.gif if I am not mistaken. Erik ashwini jagtap wrote: Hi All, following ing tag givin me error can anyone correct this src=/images/a.gif / Thanks Ashwini - Do you Yahoo!? Express yourself with Y! Messenger! Free. Download now. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Do you Yahoo!? Yahoo! Mail - 50x more storage than other providers!
RE: Scriptlet in html:img
sorry, actually it's like that only... due to copy paste gap has came.. it's like.. html:img border=0 vspace=0 hspace=0 align=left height=146 src=%=request.getContextPath()%/images/e.gif / Ningappa Doddamani [EMAIL PROTECTED] wrote: Try with below rectified code src=/images/a.gif / with regards, Ningappa -Original Message- From: ashwini jagtap [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 10, 2004 12:27 PM To: [EMAIL PROTECTED] Subject: Scriptlet in html:img Hi All, following ing tag givin me error can anyone correct this src=/images/a.gif / Thanks Ashwini - Do you Yahoo!? Express yourself with Y! Messenger! Free. Download now. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages!
RE: Scriptlet in html:img
You can use *either* literals or RT expressions to provide an attribute value to a JSP tag. You cannot use both. See JSP.2.13.1 in the JSP 1.2 spec. So, src=%=request.getContextPath() + /images/a.gif% should work, though as other posters have noted this is unnceessary as html:img does this kind of thing for you. Paul -Original Message- From: ashwini jagtap [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 10, 2004 7:57 AM To: [EMAIL PROTECTED] Subject: Scriptlet in html:img Hi All, following ing tag givin me error can anyone correct this html:img border=0 vspace=0 hspace=0 align=left height=146 src=%=request.getContextPath()%/images/a.gif / Thanks Ashwini - Do you Yahoo!? Express yourself with Y! Messenger! Free. Download now. ** Axios Email Confidentiality Footer Privileged/Confidential Information may be contained in this message. If you are not the addressee indicated in this message (or responsible for delivery of the message to such person), you may not copy or deliver this message to anyone. In such case, you should destroy this message, and notify us immediately. If you or your employer does not consent to Internet email messages of this kind, please advise us immediately. Opinions, conclusions and other information expressed in this message are not given or endorsed by my Company or employer unless otherwise indicated by an authorised representative independent of this message. WARNING: While Axios Systems Ltd takes steps to prevent computer viruses from being transmitted via electronic mail attachments we cannot guarantee that attachments do not contain computer virus code. You are therefore strongly advised to undertake anti virus checks prior to accessing the attachment to this electronic mail. Axios Systems Ltd grants no warranties regarding performance use or quality of any attachment and undertakes no liability for loss or damage howsoever caused. ** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat5 not logging me in
Could you please add some more log comments on various levels i.e. request received by servlet, connection called from connection pool, connection received, and then print connection object (it will print its reference) before using it and then check the connection, whether it is alive or not. It should pin point the problem. - regards Raj (+91-11-31261821) -Original Message- From: Jignesh Patel [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 10, 2004 3:53 AM To: Struts Users Mailing List Subject: Re: Tomcat5 not logging me in It seems your database connection is not getting close. Your connection pool is not availalble after some time. Put all connection close code in finally block. -Jignesh On Mon, 2004-08-09 at 06:17, Rajesh wrote: Hai all am using l Tomcat5, MySql, Struts 1.1 Linux. i had written a web applicaiton in tomcat with the support given above. i tested my site theroughly. its really working fine. but after a day or so, when i try to login first time its not letting me to my home page. i think after a concesting access to DB the connection is freezes. below are th full diagnosis of my tomcat and db. in my DBCP i have given. data-source type=org.apache.commons.dbcp.BasicDataSource set-property property=driverClassName value=com.mysql.jdbc.Driver/ set-property property=url value=jdbc:mysql://ip address/contextname/ set-property property=username value=/ set-property property=password value=/ set-property property=removeAbandoned value=true/ set-property property=removeAbandonedTimeout value=60/ /data-source my Server status is Server Status Manager List Applications /manager/html/listHTML Manager Help /manager/html-manager-howto.htmlManager Help /manager/manager-howto.html Complete Server Status /manager/status/all Server Information Tomcat VersionJVM Version JVM Vendor OS Name OS Version OS Architecture Apache Tomcat/5.0.25 1.4.2_02-b03Sun Microsystems Inc. Linux 2.4.20-020stab009.21.777-enterprise i386 JVM Free memory: 42.25 MB Total memory: 63.31 MB Max memory: 63.31 MB http-8080 Max threads: 15 Min spare threads: 5 Max spare threads: 10 Current thread count: 5 Current thread busy: 1 Max processing time: 4 ms Processing time: 0 s Request count: 1 Error count: 0 Bytes received: 0.00 MB Bytes sent: 0.00 MB Stage TimeB Sent B Recv Client VHost Request *R* ? ? ? ? ? ? *R* ? ? ? ? ? ? P: Parse and prepare request S: Service F: Finishing R: Ready K: Keepalive jk8009 Max threads: 200 Min spare threads: 4 Max spare threads: 50 Current thread count: 8 Current thread busy: 3 after restarting my tomcat its working fine. am fasing the problem many times can anybody kindly help me thankyou Rajesh - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Confidentiality Notice The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain confidential or privileged information. If you are not the intended recipient, please notify the sender at Wipro or [EMAIL PROTECTED] immediately and destroy all copies of this message and any attachments. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: html:file
According to the tld for (I think all) html elements : attribute namestyle/name requiredfalse/required rtexprvaluetrue/rtexprvalue /attribute attribute namestyleClass/name requiredfalse/required rtexprvaluetrue/rtexprvalue /attribute attribute namestyleId/name requiredfalse/required rtexprvaluetrue/rtexprvalue /attribute you can alter the style using css till your hearts content :) Chris -Original Message- From: Erik Weber [mailto:[EMAIL PROTECTED] Sent: 10 August 2004 10:23 To: Struts Users Mailing List Subject: html:file The browse . . . button that is rendered by html:file is sticking out like a sore thumb. How can I change the text and/or style of this particular button? Erik - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] *** 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. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Database connectivity
HI , Please check the path which you have setup in the mycomputer and restart the system again and check the following format in the struts-config.xml. The follwoing are hierachery in struts-config.xml. Data Sources Form Beans Global Exceptions Global Forwards Actions Controller Message Resources Plug Ins please check with this. Regards, Jbalaji vineesh . kumar [EMAIL PROTECTED] wrote: Dear sir(s), I tried to connect to the database at 192.168.1.1:/crm through by configuring struts-config.xml. this is actualy my local system. I am using postgresql as my database back end. it is running on the default port of postgresql 5432. I am using pgjdbc.jar(for org.postgrsql.Driver). I had configured eclipse to use this driver and also copied pgjdbc.jar,commons-dbcp-1.2.1.jar,commopns-dbutils.jar etc. but when i executed the application(I am using tomcat) it shows an error null pointer exception in the LogonAction.java how this can be overcame? Thanking You, vineesh [EMAIL PROTECTED] - Do you Yahoo!? Yahoo! Mail - 50x more storage than other providers!
Re: html:file
Hmm well I'll give that a try. I am confused because there are actually two objects involved -- the text field and the browse button, and the attributes seem to apply to the text field . . . But, maybe I just don't know enough about CSS. How can I refer to the button and not the text field? How can I do things like change the font in the button but not the field, put space between the field and the button, etc.? Sorry, I guess I'm off topic. Thanks, Erik McCormack, Chris wrote: According to the tld for (I think all) html elements : attribute namestyle/name requiredfalse/required rtexprvaluetrue/rtexprvalue /attribute attribute namestyleClass/name requiredfalse/required rtexprvaluetrue/rtexprvalue /attribute attribute namestyleId/name requiredfalse/required rtexprvaluetrue/rtexprvalue /attribute you can alter the style using css till your hearts content :) Chris -Original Message- From: Erik Weber [mailto:[EMAIL PROTECTED] Sent: 10 August 2004 10:23 To: Struts Users Mailing List Subject: html:file The browse . . . button that is rendered by html:file is sticking out like a sore thumb. How can I change the text and/or style of this particular button? Erik - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] *** 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. - 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]
AW: Scriptlet in html:img
10.0.33.231:80 -Ursprüngliche Nachricht- Von: Paul McCulloch [mailto:[EMAIL PROTECTED] Gesendet: Dienstag, 10. August 2004 11:19 An: 'Struts Users Mailing List' Betreff: RE: Scriptlet in html:img You can use *either* literals or RT expressions to provide an attribute value to a JSP tag. You cannot use both. See JSP.2.13.1 in the JSP 1.2 spec. So, src=%=request.getContextPath() + /images/a.gif% should work, though as other posters have noted this is unnceessary as html:img does this kind of thing for you. Paul -Original Message- From: ashwini jagtap [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 10, 2004 7:57 AM To: [EMAIL PROTECTED] Subject: Scriptlet in html:img Hi All, following ing tag givin me error can anyone correct this html:img border=0 vspace=0 hspace=0 align=left height=146 src=%=request.getContextPath()%/images/a.gif / Thanks Ashwini - Do you Yahoo!? Express yourself with Y! Messenger! Free. Download now. ** Axios Email Confidentiality Footer Privileged/Confidential Information may be contained in this message. If you are not the addressee indicated in this message (or responsible for delivery of the message to such person), you may not copy or deliver this message to anyone. In such case, you should destroy this message, and notify us immediately. If you or your employer does not consent to Internet email messages of this kind, please advise us immediately. Opinions, conclusions and other information expressed in this message are not given or endorsed by my Company or employer unless otherwise indicated by an authorised representative independent of this message. WARNING: While Axios Systems Ltd takes steps to prevent computer viruses from being transmitted via electronic mail attachments we cannot guarantee that attachments do not contain computer virus code. You are therefore strongly advised to undertake anti virus checks prior to accessing the attachment to this electronic mail. Axios Systems Ltd grants no warranties regarding performance use or quality of any attachment and undertakes no liability for loss or damage howsoever caused. ** - 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]
AW: Scriptlet in html:img
Sorry, this mail was send by error :-) -Ursprüngliche Nachricht- Von: Rosenberg, Leon Gesendet: Dienstag, 10. August 2004 12:48 An: 'Struts Users Mailing List' Betreff: AW: Scriptlet in html:img 10.0.33.231:80 -Ursprüngliche Nachricht- Von: Paul McCulloch [mailto:[EMAIL PROTECTED] Gesendet: Dienstag, 10. August 2004 11:19 An: 'Struts Users Mailing List' Betreff: RE: Scriptlet in html:img You can use *either* literals or RT expressions to provide an attribute value to a JSP tag. You cannot use both. See JSP.2.13.1 in the JSP 1.2 spec. So, src=%=request.getContextPath() + /images/a.gif% should work, though as other posters have noted this is unnceessary as html:img does this kind of thing for you. Paul -Original Message- From: ashwini jagtap [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 10, 2004 7:57 AM To: [EMAIL PROTECTED] Subject: Scriptlet in html:img Hi All, following ing tag givin me error can anyone correct this html:img border=0 vspace=0 hspace=0 align=left height=146 src=%=request.getContextPath()%/images/a.gif / Thanks Ashwini - Do you Yahoo!? Express yourself with Y! Messenger! Free. Download now. ** Axios Email Confidentiality Footer Privileged/Confidential Information may be contained in this message. If you are not the addressee indicated in this message (or responsible for delivery of the message to such person), you may not copy or deliver this message to anyone. In such case, you should destroy this message, and notify us immediately. If you or your employer does not consent to Internet email messages of this kind, please advise us immediately. Opinions, conclusions and other information expressed in this message are not given or endorsed by my Company or employer unless otherwise indicated by an authorised representative independent of this message. WARNING: While Axios Systems Ltd takes steps to prevent computer viruses from being transmitted via electronic mail attachments we cannot guarantee that attachments do not contain computer virus code. You are therefore strongly advised to undertake anti virus checks prior to accessing the attachment to this electronic mail. Axios Systems Ltd grants no warranties regarding performance use or quality of any attachment and undertakes no liability for loss or damage howsoever caused. ** - 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: html:file
It is a little OT to try and explain how to alter the button and not the textfield which would involve giving some sort of css tutorial. It may be easier for you to post a code snippet of the button and text field jstl that someone could add the style sheet references to. Chris -Original Message- From: Erik Weber [mailto:[EMAIL PROTECTED] Sent: 10 August 2004 11:11 To: Struts Users Mailing List Subject: Re: html:file Hmm well I'll give that a try. I am confused because there are actually two objects involved -- the text field and the browse button, and the attributes seem to apply to the text field . . . But, maybe I just don't know enough about CSS. How can I refer to the button and not the text field? How can I do things like change the font in the button but not the field, put space between the field and the button, etc.? Sorry, I guess I'm off topic. Thanks, Erik McCormack, Chris wrote: According to the tld for (I think all) html elements : attribute namestyle/name requiredfalse/required rtexprvaluetrue/rtexprvalue /attribute attribute namestyleClass/name requiredfalse/required rtexprvaluetrue/rtexprvalue /attribute attribute namestyleId/name requiredfalse/required rtexprvaluetrue/rtexprvalue /attribute you can alter the style using css till your hearts content :) Chris -Original Message- From: Erik Weber [mailto:[EMAIL PROTECTED] Sent: 10 August 2004 10:23 To: Struts Users Mailing List Subject: html:file The browse . . . button that is rendered by html:file is sticking out like a sore thumb. How can I change the text and/or style of this particular button? Erik - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] *** 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. - 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] *** 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. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
newbie question - mail reader
Hi Guys, Im trying to learn struts. I have just downloaded the jakarta-struts-1.2.1-src how do i see its codes and how can i see it running. tia! Richard
Re: newbie question - mail reader
I mean the mailreader sample that uses pojo, how can i run it and see its codes. thanks Richard wrote: Hi Guys, Im trying to learn struts. I have just downloaded the jakarta-struts-1.2.1-src how do i see its codes and how can i see it running. tia! Richard
Re: help with multiple submit buttons
At 04:49 AM 8/10/2004, you wrote: Quite often I need to implement a form that has several submit buttons - for example a page where several products are listed, and next to each product is a delete -button. Does struts provide some sort of help to this problem? I have to say I am quite surprised if it does not! http://wiki.apache.org/struts/StrutsCatalogMultipleImageButtonsWithNoJavaScript - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: question on logic:iterate
Okay in my experience using struts logic tag, I dont have any problem displaying an int bean property. So I have some question: bean:write name=employee property=name / bean:write name=employee property=email / bean:write name=employee property=empId / Does the page currently displays the 'name' and 'email' propertly ? If yes the can I take a look at the ActionForm code ? and the action class code that populate the ActionForm ? my best guess here is that the empId is not populated properly, but before we jump to any conclusion, let us see the entire code first. Regards, Irfandhy Franciscus Kakoli Saha wrote: All, The problem is I want to list out all the employee using the logic:iterate tag.It does not show the property which is not of type String in the bean and say of type int. Am I missing something here? Sample code below: logic:iterate id=employee name=employees bean:write name=employee property=name / bean:write name=employee property=email / bean:write name=employee property=empId / /logic:iterate Thanks All, Kakoli If you have received this e-mail in error, please delete it and notify the sender as soon as possible. The contents of this e-mail may be confidential and the unauthorized use, copying, or dissemination of it and any attachments to it, is prohibited. Internet communications are not secure and Hyperion does not, therefore, accept legal responsibility for the contents of this message nor for any damage caused by viruses. The views expressed here do not necessarily represent those of Hyperion. For more information about Hyperion, please visit our Web site at www.hyperion.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Struts and Websphere security - best practice
One thing to double check is that your welcome page really does do a *redirect* to sessionStart.do, rather than a jsp:forward. The latter will not kick in the container managed security, because they are only applied on the URL that is originally requested from the client (which will be the one for the welcome page in this scenario). AHA! Any suggestions for poking the username into the session for alter retrieval? I am trying a javascript function launched from the onSubmit event on the form, and an intermediary jsp/form. Can I use a struts form.action to store the username/pw and forward directly to the j_security_check servlet? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Dealing with request variables during validation
vpsangeetha wrote: Hi, I have a jsp page(test.jsp) and a custom form that extends DynaActionForm(TestForm.java) associated with it for validation. tesp.jsp populates the fields in the form to be displayed using an object(TestObject.java) stored in the request. When a validation error happens, it is supposed to go back to test.jsp. But I get an error since the request no longer has TestObject.java. How do I deal with this problem? Currently I am repopulating TestObject and storing it in the request before returning the errors in the validate method of TestForm. Is there any other way to do this? Thanks for ur input. Sangeetha. Sangeetha, The typical way to do this would be to store your object in a 'longer lived' scope, e.g. the session. In your case, there are a few tacts you can take. You can store it in the session and upon successful validation in TestForm, remove the object from the session (that way it doesn't hang around any longer than you need it to). Alternately, you can make the object part of your TestForm, which will always be available to the JSP. Out of curiosity, if you have this need to pre-populate a form, why are you using the DynaActionForm? It would seem that you could simply make TestObject into your form bean and then your problems would go away. Respectfully, Brice Ruth -- Brice Ruth, Sr. IT Analyst Fiskars Brands Inc http://www.fiskarsbrands.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: varying form element types using struts
Victor Grazi wrote: I am creating a Struts form with some dynamically populated drop down lists. There is a general requirement that any drop down that contains just a single element should display as free html text instead of as a drop down. Is there any way to specify this type of variation using struts? Regards Victor Victor, Not to my knowledge. You would need to put some conditional logic in your JSP (or XSL, if you're using that) to determine what type of form element to render out to the browser. Someone more knowledgeable of Java Server Faces might be able to indicate if this is something that JSF might be coerced into doing for you. Respectfully, Brice Ruth -- Brice Ruth, Sr. IT Analyst Fiskars Brands Inc http://www.fiskarsbrands.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: is this a struts bug?
Woodchuck wrote: hihi, i have a jsp with the following: c:forEach var=i begin=0 end=5 html-el:text name=MyObj property=foo[${i}].bar/ /c:forEach in MyObj i have these methods: public Collection getFoo() { return foo; } public Bar getFoo(int i) { while(i = foo.size()) { ((ArrayList)foo).add(new Bar()); } return (Bar)((ArrayList)foo).get(i); } when i request for the jsp, it calls the first getFoo() method. should it not call the second getFoo(int) method instead, since the jsp is using jstl to provide an index parameter? the weird part is when i take out the getFoo() method and recompile, then the jsp calls getFoo(int) correctly. why is the behavior like this? is this a bug? (when it calls the first getFoo() method i get an indexOutOfBounds exception because my foo collection has nothing in it... i want the collection size to be driven by the jsp page) thanks in advance, woodchuck You might take a look at the .java file your JSP is compiled into, for an understanding of what exactly is going on. Stepping through it in a debugger might help as well. -- Brice Ruth, Sr. IT Analyst Fiskars Brands Inc http://www.fiskarsbrands.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
TagLib
This isn't a struts specific question (more towards tag-libs) but I figure it is worth asking: Why does org.apache.taglivs.standard.tag.common.sql.DataSourceUtil assume that the datasource is within java:comp/env? What if you loaded it outside of Tomcat into another namespace (since Tomcat makes java:comp/env read-only) so that your app is not tied to Tomcat's server.xml file (in case you would want to change web servers easily)? If I want to use sql:query I have to now load my datasource in Tomcats context configuration because of this. Just curious if there is a set standard that says I have to use java:comp/env and therefore am tied to Tomcat's config file since it makes it read-only after initialization. Thanks! -- Sloan
RE: [OT] DOM Document as JMS message object's container
Serializing org.w3c.dom.Document into String and passing this as JMS object message is working nicely. DOM document is built back again by parsing ByteArrayInputStream made of string. --- Reddy Pingili -Original Message- From: Pingili, Madhupal Sent: Friday, August 06, 2004 12:39 PM To: 'Struts Users Mailing List' Subject: RE: [OT] DOM Document as JMS message object's container Thanks for your suggestions. The main reason to create an object (that contains Document as a member and provide methods) is to eliminate the need to store the document. Somehow, if we can pass this object as JMS object message, then the consumer can use it for processing the request. Now, I am trying to serialize org.w3c.dom.Document into String using Xalan serializer and pass this String as JMS object message. I have to test this and see if it works. I will post the result after testing. Reddy Pingili -Original Message- From: Erik Weber [SMTP:[EMAIL PROTECTED] Sent: Thursday, August 05, 2004 5:59 PM To: Struts Users Mailing List Subject:Re: [OT] DOM Document as JMS message object's container Perhaps the XML document could be stored elsewhere, and the object you embed in your JMS message could be of a simpler type which just contains a URI for the XML document. Then, the object that receives the JMS message could be a reconstruction wrapper, basically, that can use the URI to reconstruct an instance of your original type (which contains the Document and all the methods, etc.), and pass this on to whatever object was going to receive the message in the first place. You might have a matching deconstruction wrapper at the front of JMS -- a guy who might extract the Document from your original object, store it, and create the new URI-containing object and enqueue it to JMS. Then in the future if you find a way to Serialize all the objects you need to embed, you just get rid of the wrappers. Also, I don't know if the XBeans project is still around, but a few years back, its purpose was to make it easy to build systems that pass around XML documents as messages (it used JavaBeans that fired DOM Events as I recall). It was looking pretty good, but then I remember that development seemed to just cease on it. I would contact the lead developer and never hear back from him. Erik Pingili, Madhupal wrote: This is way Off Topic. I have an object that implements Serializable in order to be sent to JMS Queue destination. This object contains org.w3c.dom.Document as private member and creates a new DOM document in it's constructor. It also has other methods to access document.createElement(...), createTextNode(...) etc. Now, I am getting an error MQJMS1060: Unable to serialize object. I found out that this is because Document is not Serializable inside the message object. Can anyone tell me if there is an implementation of org.w3c.dom.Document that is Serializable? OR is this the wrong design and I should just build another type of JMS message? Any direction to solve this problem or better design will be helpful. -- Reddy Pingili - 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]
I have a form spread over several pages. The user fills out each section in progression. I am using a dispatch action and each page calls the same function i.e. processForm. I want struts to validate each submission but I cannot change the input page in the action ( I get configuration frozen thrown). I don't want to send the user back to the beginning page if they've only made a mistake in the last page so what am I to do?
I have a form spread over several pages. The user fills out each section in progression. I am using a dispatch action and each page calls the same function i.e. processForm. I want struts to validate each submission but I cannot change the input page in the action ( I get configuration frozen thrown). I don't want to send the user back to the beginning page if they've only made a mistake in the last page so what am I to do? thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: help with multiple submit buttons
At 05:22 AM 8/10/2004, you wrote: Thanks, that goes some way...but not all the way though. A common situation where a dynamic page displays 0n items with different identifiers. For example, an item list is fetched from database, and page contains delete buttons for items 23, 67, 101 and 128. I do not think you can use this approach to solve that problem. You would have to magically create getDeleteItem23, getDeleteItem67methods in your class. I'm surprised that this kind of common problem is not handled internally by the framework, and there is a need to use quite strange workarounds (get - methods that modify state of the form). You could just read the values of the parameter names for input type='image' name='button.blah0', input type='image' name='button.blah1', ... , input type='image' name='button.blahN' then when you sort out a name such that the name begins with button you could read the text between the dots, viz., e.g., blah0 as the command. Since the position of x and y is of no interest to us, I don't know why the struts form is popluated with [form].getButton().getBlah0().setX(Integer x) anyway. I am looking into this. Michael - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: html:file using an image button
At 07:41 AM 8/10/2004, you wrote: Michael McGrady wrote: Is there a way to hide the standard browse button and use an image for the button instead? Michael, I don't believe this is part of the HTML spec, so in short, no. Every browser uses a different button for browsing. I don't believe that even CSS can control this. There is a way, Brice. There are many, actually, as it turns out. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: help with multiple submit buttons
For the various ids and their respective methods: 1. Create a hidden text field. 2. Call a javascript function before submitting the page. This javascript takes ID as an argument. 3. The ID is saved in the hidden text field and the page is submitted. 4. Now call getDeleteItem() and get the ID to be deleted. I hope this helps, Nitin Dubey --- Michael McGrady [EMAIL PROTECTED] wrote: At 05:22 AM 8/10/2004, you wrote: Thanks, that goes some way...but not all the way though. A common situation where a dynamic page displays 0n items with different identifiers. For example, an item list is fetched from database, and page contains delete buttons for items 23, 67, 101 and 128. I do not think you can use this approach to solve that problem. You would have to magically create getDeleteItem23, getDeleteItem67methods in your class. I'm surprised that this kind of common problem is not handled internally by the framework, and there is a need to use quite strange workarounds (get - methods that modify state of the form). You could just read the values of the parameter names for input type='image' name='button.blah0', input type='image' name='button.blah1', ... , input type='image' name='button.blahN' then when you sort out a name such that the name begins with button you could read the text between the dots, viz., e.g., blah0 as the command. Since the position of x and y is of no interest to us, I don't know why the struts form is popluated with [form].getButton().getBlah0().setX(Integer x) anyway. I am looking into this. Michael - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? Y! Messenger - Communicate in real time. Download now. http://messenger.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: help with multiple submit buttons
The idea, Nitin, has been to avoid JavaScript. With JavaScript we have an entirely different situation. Michael At 09:06 AM 8/10/2004, you wrote: For the various ids and their respective methods: 1. Create a hidden text field. 2. Call a javascript function before submitting the page. This javascript takes ID as an argument. 3. The ID is saved in the hidden text field and the page is submitted. 4. Now call getDeleteItem() and get the ID to be deleted. I hope this helps, Nitin Dubey --- Michael McGrady [EMAIL PROTECTED] wrote: At 05:22 AM 8/10/2004, you wrote: Thanks, that goes some way...but not all the way though. A common situation where a dynamic page displays 0n items with different identifiers. For example, an item list is fetched from database, and page contains delete buttons for items 23, 67, 101 and 128. I do not think you can use this approach to solve that problem. You would have to magically create getDeleteItem23, getDeleteItem67methods in your class. I'm surprised that this kind of common problem is not handled internally by the framework, and there is a need to use quite strange workarounds (get - methods that modify state of the form). You could just read the values of the parameter names for input type='image' name='button.blah0', input type='image' name='button.blah1', ... , input type='image' name='button.blahN' then when you sort out a name such that the name begins with button you could read the text between the dots, viz., e.g., blah0 as the command. Since the position of x and y is of no interest to us, I don't know why the struts form is popluated with [form].getButton().getBlah0().setX(Integer x) anyway. I am looking into this. Michael - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? Y! Messenger - Communicate in real time. Download now. http://messenger.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: java.net.ConnectException: Connection refused
I am using Tomcat4.0, struts1.1, mysql 4.0.18 , on Linux environment. And i am unable to connect to mysql db. Below is the url i am using in server.xml file. and also i have the jdbc driver under WEB-INF/lib - mysql-connector-java-3.0.14-production-bin.jar...I was successfully able to deploy the same application on Windows, using the same server.xml file. please help. parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter parameter nameurl/name valuejdbc:mysql://localhost:3306/prototypedb?autoReconnect=true/value /parameter !-- Class name for mm.mysql JDBC driver -- parameter namedriverClassName/name valueorg.gjt.mm.mysql.Driver/value /parameter org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory, cause: java.sql.SQLException: Server connection failure during transaction. Due to underlying exception: 'java.net.ConnectException: Connection refused'. ** BEGIN NESTED EXCEPTION ** java.net.ConnectException MESSAGE: Connection refused STACKTRACE: java.net.ConnectException: Connection refused at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:305) at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:171) at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:158) at java.net.Socket.connect(Socket.java:452) at java.net.Socket.connect(Socket.java:402) at java.net.Socket.init(Socket.java:309) at java.net.Socket.init(Socket.java:124) at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:121) at com.mysql.jdbc.MysqlIO.init(MysqlIO.java:220) at com.mysql.jdbc.Connection.createNewIO(Connection.java:1884) at com.mysql.jdbc.Connection.init(Connection.java:440) at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:400) at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConne ctionFactory.java:82) at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnect ionFactory.java:300) at org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(BasicDataS ource.java:838) at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.jav a:821) at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:5 18) at com.ecommerce.DAO.DAOFactory.getConnection(Unknown Source) at com.ecommerce.DAO.UserDAO.init(Unknown Source) at com.ecommerce.action.PlaceOrderAction.execute(Unknown Source) at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProces sor.java:484) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application FilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh ain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja va:243) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 66) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja va:190) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 66) at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:2 46) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 64) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2347) Attempted reconnect 3 times. Giving up. at com.mysql.jdbc.Connection.createNewIO(Connection.java:1952) at com.mysql.jdbc.Connection.init(Connection.java:440) at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:400) at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConne ctionFactory.java:82) at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnect ionFactory.java:300) at org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(BasicDataS ource.java:838) at
RE: java.net.ConnectException: Connection refused
-Original Message- From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 10, 2004 9:17 AM Cc: Struts Users Mailing List Subject: RE: java.net.ConnectException: Connection refused I am using Tomcat4.0, struts1.1, mysql 4.0.18 , on Linux environment. And i am unable to connect to mysql db. Below is the url i am using in server.xml file. and also i have the jdbc driver under WEB-INF/lib - mysql-connector-java-3.0.14-production-bin.jar...I was successfully able to deploy the same application on Windows, using the same server.xml file. please help. This is a well known problem regarding MySQL and Linux. One of two has a screwy implementation of resolving host names. WHich one depends on who you talk to. Known solutions include using 127.0.0.1. You will also have issues with authenticating to the server if you limit mysql logins by server. parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter parameter nameurl/name valuejdbc:mysql://localhost:3306/prototypedb?autoReconnect=t rue/value /parameter !-- Class name for mm.mysql JDBC driver -- parameter namedriverClassName/name valueorg.gjt.mm.mysql.Driver/value /parameter org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory, cause: java.sql.SQLException: Server connection failure during transaction. Due to underlying exception: 'java.net.ConnectException: Connection refused'. ** BEGIN NESTED EXCEPTION ** java.net.ConnectException MESSAGE: Connection refused STACKTRACE: java.net.ConnectException: Connection refused at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:305) at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:171) at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:158) at java.net.Socket.connect(Socket.java:452) at java.net.Socket.connect(Socket.java:402) at java.net.Socket.init(Socket.java:309) at java.net.Socket.init(Socket.java:124) at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFac tory.java:121) at com.mysql.jdbc.MysqlIO.init(MysqlIO.java:220) at com.mysql.jdbc.Connection.createNewIO(Connection.java:1884) at com.mysql.jdbc.Connection.init(Connection.java:440) at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriv er.java:400) at org.apache.commons.dbcp.DriverConnectionFactory.createConnecti on(DriverConne ctionFactory.java:82) at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(P oolableConnect ionFactory.java:300) at org.apache.commons.dbcp.BasicDataSource.validateConnectionFact ory(BasicDataS ource.java:838) at org.apache.commons.dbcp.BasicDataSource.createDataSource(Basic DataSource.jav a:821) at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDat aSource.java:5 18) at com.ecommerce.DAO.DAOFactory.getConnection(Unknown Source) at com.ecommerce.DAO.UserDAO.init(Unknown Source) at com.ecommerce.action.PlaceOrderAction.execute(Unknown Source) at org.apache.struts.action.RequestProcessor.processActionPerform (RequestProces sor.java:484) at org.apache.struts.action.RequestProcessor.process(RequestProce ssor.java:274) at org.apache.struts.action.ActionServlet.process(ActionServlet.j ava:1482) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilt er(Application FilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(Appli cationFilterCh ain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardW rapperValve.ja va:243) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardP ipeline.java:5 66) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipel ine.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardContextValve.invoke(StandardC ontextValve.ja va:190) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardP ipeline.java:5 66) at org.apache.catalina.valves.CertificatesValve.invoke(Certificat esValve.java:2 46) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardP ipeline.java:5 64) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipel ine.java:472) at
Re: Struts and Websphere security - best practice
On Tue, 10 Aug 2004 09:15:49 -0400, Tom McCobb [EMAIL PROTECTED] wrote: One thing to double check is that your welcome page really does do a *redirect* to sessionStart.do, rather than a jsp:forward. The latter will not kick in the container managed security, because they are only applied on the URL that is originally requested from the client (which will be the one for the welcome page in this scenario). AHA! Any suggestions for poking the username into the session for alter retrieval? I am trying a javascript function launched from the onSubmit event on the form, and an intermediary jsp/form. Can I use a struts form.action to store the username/pw and forward directly to the j_security_check servlet? You can retrieve the logged-in username by calling request.getRemoteUser() in some subsequent request. For security reasons, you cannot retrieve the password, unless your particular app server provides some proprietary mechanism. Craig - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: TagLib
On Tue, 10 Aug 2004 10:44:34 -0400, Seaman, Sloan [EMAIL PROTECTED] wrote: This isn't a struts specific question (more towards tag-libs) but I figure it is worth asking: Why does org.apache.taglivs.standard.tag.common.sql.DataSourceUtil assume that the datasource is within java:comp/env? The java:comp/env context is the J2EE standard location for components (comp) provided by the container to the environment (env) of the application. As such, you will find it to be portable across any app server that implements JNDI resources in the J2EE standard way (including Tomcat). What if you loaded it outside of Tomcat into another namespace (since Tomcat makes java:comp/env read-only) so that your app is not tied to Tomcat's server.xml file (in case you would want to change web servers easily)? Every server will have it's own way of *configuring* resources into the standard environment, and those mechanisms will be server-dependent. However, the application using those resources will remain portable. If I want to use sql:query I have to now load my datasource in Tomcats context configuration because of this. Only if you're using Tomcat. On some other server, you'd use that server's initialization mechanism -- but your application would still work. Just curious if there is a set standard that says I have to use java:comp/env and therefore am tied to Tomcat's config file since it makes it read-only after initialization. Thanks! -- Sloan Craig - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: html:file using an image button
Use something like this script function getNomFichier(){ document.forms[0].btnFichier.click(); document.forms[0].nomFichier.value=document.form[frmFichier].btnFichier.value; } /script input type=text name=nomFichier disabledimg src=../images/loupe.gif onclick=getNomFichier(); div style=display:none input type=file name=btnFichier /div Ovidiu On Tue, 10 Aug 2004 08:27:49 -0700, Michael McGrady [EMAIL PROTECTED] wrote: At 07:41 AM 8/10/2004, you wrote: Michael McGrady wrote: Is there a way to hide the standard browse button and use an image for the button instead? Michael, I don't believe this is part of the HTML spec, so in short, no. Every browser uses a different button for browsing. I don't believe that even CSS can control this. There is a way, Brice. There are many, actually, as it turns out. - 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]
using tiles with dynamic links
I wish to make some of my tiles return content from web pages outside my site i.e. kind of like using frames. can this be done with tiles? thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: java.net.ConnectException: Connection refused
Unfortunately I'm not at home, which is where my MySQL implementation is, so I can't show you what I'm doing for another 7-8 hours :( On the other hand the MySQL folk have some great documentation and help forums that could probably help you more, if no one else has any solutions for you here. ---thanks a lot, i'll try to refer mysql docs. Also changed driver class name to com.mysql.jdbc.Driver, didn't work parameter nameurl/name valuejdbc:mysql://127.0.0.1:3306/prototypedb?autoReconnect=t rue/value /parameter !-- Class name for mm.mysql JDBC driver -- parameter namedriverClassName/name valueorg.gjt.mm.mysql.Driver/value /parameter -Original Message- From: Jim Barrows [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 10, 2004 12:26 PM To: Struts Users Mailing List Subject: RE: java.net.ConnectException: Connection refused -Original Message- From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 10, 2004 9:17 AM Cc: Struts Users Mailing List Subject: RE: java.net.ConnectException: Connection refused I am using Tomcat4.0, struts1.1, mysql 4.0.18 , on Linux environment. And i am unable to connect to mysql db. Below is the url i am using in server.xml file. and also i have the jdbc driver under WEB-INF/lib - mysql-connector-java-3.0.14-production-bin.jar...I was successfully able to deploy the same application on Windows, using the same server.xml file. please help. This is a well known problem regarding MySQL and Linux. One of two has a screwy implementation of resolving host names. WHich one depends on who you talk to. Known solutions include using 127.0.0.1. You will also have issues with authenticating to the server if you limit mysql logins by server. parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter parameter nameurl/name valuejdbc:mysql://localhost:3306/prototypedb?autoReconnect=t rue/value /parameter !-- Class name for mm.mysql JDBC driver -- parameter namedriverClassName/name valueorg.gjt.mm.mysql.Driver/value /parameter org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory, cause: java.sql.SQLException: Server connection failure during transaction. Due to underlying exception: 'java.net.ConnectException: Connection refused'. ** BEGIN NESTED EXCEPTION ** java.net.ConnectException MESSAGE: Connection refused STACKTRACE: java.net.ConnectException: Connection refused at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:305) at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:171) at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:158) at java.net.Socket.connect(Socket.java:452) at java.net.Socket.connect(Socket.java:402) at java.net.Socket.init(Socket.java:309) at java.net.Socket.init(Socket.java:124) at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFac tory.java:121) at com.mysql.jdbc.MysqlIO.init(MysqlIO.java:220) at com.mysql.jdbc.Connection.createNewIO(Connection.java:1884) at com.mysql.jdbc.Connection.init(Connection.java:440) at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriv er.java:400) at org.apache.commons.dbcp.DriverConnectionFactory.createConnecti on(DriverConne ctionFactory.java:82) at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(P oolableConnect ionFactory.java:300) at org.apache.commons.dbcp.BasicDataSource.validateConnectionFact ory(BasicDataS ource.java:838) at org.apache.commons.dbcp.BasicDataSource.createDataSource(Basic DataSource.jav a:821) at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDat aSource.java:5 18) at com.ecommerce.DAO.DAOFactory.getConnection(Unknown Source) at com.ecommerce.DAO.UserDAO.init(Unknown Source) at com.ecommerce.action.PlaceOrderAction.execute(Unknown Source) at org.apache.struts.action.RequestProcessor.processActionPerform (RequestProces sor.java:484) at org.apache.struts.action.RequestProcessor.process(RequestProce ssor.java:274) at org.apache.struts.action.ActionServlet.process(ActionServlet.j ava:1482) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilt er(Application FilterChain.java:247)
Re: missing reload method on ActionServlet
Reload is no longer supported. http://struts.apache.org/faqs/newbie.html#reload --- Andy Dailey [EMAIL PROTECTED] wrote: I am currently in process of upgrading to version 1.1, an application that was build on version 1.0.2. Right now it seems that I am stuck. I have extended the ActionServlet class and have invoked the reload() method. This worked with 1.0.2. But in 1.1, the method is totally missing. So my application will not compile. I do not see a deprecated ActionServlet.reload() method message anywhere in 1.0.2 or 1.1. Can someone point me in the right direction with this? Is there a different method I should be using. Thanks, Andy __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: help with multiple submit buttons
At 05:22 AM 8/10/2004, you wrote: Thanks, that goes some way...but not all the way though. A common situation where a dynamic page displays 0n items with different identifiers. For example, an item list is fetched from database, and page contains delete buttons for items 23, 67, 101 and 128. I do not think you can use this approach to solve that problem. You would have to magically create getDeleteItem23, getDeleteItem67methods in your class. How about this, Janne: public final class ButtonCommand { private ButtonCommand() { } public final static String getCommand(HttpServletRequest request) { Enumeration enum = request.getParameterNames(); String parameterName = null; while(enum.hasMoreElements()) { parameterName = (String)enum.nextElement(); if(parameterName.endsWith(.x)) { return parameterName.substring(0,parameterName.indexOf('.')); } } return parameterName; } } Now, you just dynamically make your name attribute of the input type='image' button, or the property attribute of your html:image button be whatever command you want on a dynamic or static basis. You can deal with the logic of what to do with your commands: String command = ButtonCommand.getCommand(request); anyway you see fit. I don't use buttons with indexed (0, 1, 2, ... , n) values, so I don't need to worry about that. That is easy to do, of course. Michael Cool, eh? Michael
RE: missing reload method on ActionServlet
Thanks. I had been searching for 2 hours for something regarding this. -Original Message- From: Hubert Rabago [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 10, 2004 2:34 PM To: Struts Users Mailing List Subject: Re: missing reload method on ActionServlet Reload is no longer supported. http://struts.apache.org/faqs/newbie.html#reload --- Andy Dailey [EMAIL PROTECTED] wrote: I am currently in process of upgrading to version 1.1, an application that was build on version 1.0.2. Right now it seems that I am stuck. I have extended the ActionServlet class and have invoked the reload() method. This worked with 1.0.2. But in 1.1, the method is totally missing. So my application will not compile. I do not see a deprecated ActionServlet.reload() method message anywhere in 1.0.2 or 1.1. Can someone point me in the right direction with this? Is there a different method I should be using. Thanks, Andy __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.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]
Servlet help for a Struts programmer
I have an strange request: While I am very familiar with Struts (I've worked almost exclusively in Struts for last 2 years, right after college), I have only basic knowledge of actual Servlet programming. Now I am faced with a task of updating and maintaining a pure Servlet application. Does anyone know of a resource (or resources) where I can compare servlet functionality to struts functionality. I know they are related, but (for example) I miss having a Struts config file, where I can glance at one file and see all my action mappings. Is there anyone there in a similar situation? How are you coping? Thanks, Denis - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
custom transactions
hihi, this is my scenario: - container managed pooling (Tomcat 4.1.24) - jdbc (PreparedStatement objects) - wrapping my own transactions by autoCommit(false), and issuing commit() manually i'm running into a table-lock situation after DELETE statements. i'm using the same Connection object for multiple PreparedStatement objects. my plan is to call commit() at the end. but when i reach a PreparedStatement that is doing a DELETE, the code stops and does not continue with the rest of the other PreparedStatement objects. is this the nature of DELETE statements? that we cannot continue further without first committing it immediately? or is this possible and there is something else wrong? how can i handle a 'custom transaction' that contains many INSERTS, UPDATES, DELETE statements in random order? thanks in advance! __ Do you Yahoo!? Yahoo! Mail is new and improved - Check it out! http://promotions.yahoo.com/new_mail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Servlet help for a Struts programmer
Struts is in a sense pure servlet technology. Very pure: only one servlet extends HttpServlet and only one servlet implements HttpServlet, viz. ActionServlet and MultipartRequestWrapper. I would suggest you get a copy of a good book on Servlets like Jason Hunter's, cf. www.servlets.com. Michael At 11:54 AM 8/10/2004, you wrote: I have an strange request: While I am very familiar with Struts (I've worked almost exclusively in Struts for last 2 years, right after college), I have only basic knowledge of actual Servlet programming. Now I am faced with a task of updating and maintaining a pure Servlet application. Does anyone know of a resource (or resources) where I can compare servlet functionality to struts functionality. I know they are related, but (for example) I miss having a Struts config file, where I can glance at one file and see all my action mappings. Is there anyone there in a similar situation? How are you coping? Thanks, Denis - 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: Servlet help for a Struts programmer
WEB-INF/web.xml You can take a glance there and see what servlets are mapped to where. Servlet programming is not that much different. You just end up doing a lot of manual labor to get your parameters and such. Instead of doing thing like, myForm.getPersonName(); You will do something like request.getParameter(personName); When you get integers, its even more painful, you end up doing something like int someInt = -1; try{ someInt = Integer.parseInt(request.getParameter(someInt));}catch(Exception e){/*do nothing, or do whatever you need to*/} So yeah. Life just get a little more painful to go back, that's about it. I wrote a little tutorial that kind of shows how to go from jsp to struts, you can reverse engineer it, and see if that helps. http://www.bachansoft.com/tutorials/web/strutsquickstart.jsp Regards, Pritpal Dhaliwal -Original Message- From: Denis Avdic [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 10, 2004 11:55 AM To: Struts Users Mailing List Subject: Servlet help for a Struts programmer I have an strange request: While I am very familiar with Struts (I've worked almost exclusively in Struts for last 2 years, right after college), I have only basic knowledge of actual Servlet programming. Now I am faced with a task of updating and maintaining a pure Servlet application. Does anyone know of a resource (or resources) where I can compare servlet functionality to struts functionality. I know they are related, but (for example) I miss having a Struts config file, where I can glance at one file and see all my action mappings. Is there anyone there in a similar situation? How are you coping? Thanks, Denis - 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: using tiles with dynamic links
Yes. At 10:17 AM 8/10/2004, you wrote: I wish to make some of my tiles return content from web pages outside my site i.e. kind of like using frames. can this be done with tiles? 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]
Re: html:file using an image button
At 10:14 AM 8/10/2004, you wrote: Use something like this script function getNomFichier(){ document.forms[0].btnFichier.click(); document.forms[0].nomFichier.value=document.form[frmFichier].btnFichier.value; } /script input type=text name=nomFichier disabledimg src=../images/loupe.gif onclick=getNomFichier(); div style=display:none input type=file name=btnFichier /div Will this work with input type='file'? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Servlet help for a Struts programmer
-Original Message- From: Michael McGrady [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 10, 2004 12:25 PM To: Struts Users Mailing List Subject: RE: Servlet help for a Struts programmer At 12:17 PM 8/10/2004, you wrote: WEB-INF/web.xml You can take a glance there and see what servlets are mapped to where. Servlet programming is not that much different. You just end up doing a lot of manual labor to get your parameters and such. Instead of doing thing like, myForm.getPersonName(); I think that he must be considering replacing JSP with Servlet. No? What else could this be? Surely he is not going to replace ActionForm, etc. with servlets. That would make no sense. The question is probably not well formed. Struts is not an alternative to servlets. It is a web platform based on JSP and Servlet technology. Nope.. you misunderstood his question. First he started on struts. Every project he's worked on. Now, PHB wants him to work on another project, which is just servlets. He's never done any servlet programming, so he wants to know what differences there are etc. etc. etc. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: html:file using an image button
I'm using html:file and it works just fine . In my previous reply I made a copypaste from the generated html. The most important lines are these 2 document.forms[0].btnFichier.click(); document.forms[0].nomFichier.value=document.form[frmFichier].btnFichier.value; On Tue, 10 Aug 2004 12:21:44 -0700, Michael McGrady [EMAIL PROTECTED] wrote: At 10:14 AM 8/10/2004, you wrote: Use something like this script function getNomFichier(){ document.forms[0].btnFichier.click(); document.forms[0].nomFichier.value=document.form[frmFichier].btnFichier.value; } /script input type=text name=nomFichier disabledimg src=../images/loupe.gif onclick=getNomFichier(); div style=display:none input type=file name=btnFichier /div Will this work with input type='file'? - 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: Servlet help for a Struts programmer
Jim is correct. :) On Tue, 10 Aug 2004 12:29:23 -0700, Jim Barrows [EMAIL PROTECTED] wrote: -Original Message- From: Michael McGrady [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 10, 2004 12:25 PM To: Struts Users Mailing List Subject: RE: Servlet help for a Struts programmer At 12:17 PM 8/10/2004, you wrote: WEB-INF/web.xml You can take a glance there and see what servlets are mapped to where. Servlet programming is not that much different. You just end up doing a lot of manual labor to get your parameters and such. Instead of doing thing like, myForm.getPersonName(); I think that he must be considering replacing JSP with Servlet. No? What else could this be? Surely he is not going to replace ActionForm, etc. with servlets. That would make no sense. The question is probably not well formed. Struts is not an alternative to servlets. It is a web platform based on JSP and Servlet technology. Nope.. you misunderstood his question. First he started on struts. Every project he's worked on. Now, PHB wants him to work on another project, which is just servlets. He's never done any servlet programming, so he wants to know what differences there are etc. etc. etc. - 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: Servlet help for a Struts programmer
At 12:29 PM 8/10/2004, you wrote: Nope.. you misunderstood his question. First he started on struts. Every project he's worked on. Now, PHB wants him to work on another project, which is just servlets. He's never done any servlet programming, so he wants to know what differences there are etc. etc. etc. Hi, Jim. That is what I thought he said. That makes no sense. The comparison is of apples and oranges. There is no project that is just servlets unless it is nuts. Struts, again, is not an alternative to Servlets. Struts is based on Servlet technology. Working on a project involving Servlets but not using the Struts framework of course makes sense. But comparing Struts to Servlets makes no sense. Michael - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Servlet help for a Struts programmer
At 12:40 PM 8/10/2004, you wrote: Jim is correct. :) About what the gentleman meant? I doubt that. If so, they are both confused. LOL I doubt that Jim is. ;-) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Servlet help for a Struts programmer
I am sure that in a week or two that might be apparent to me. However right now I am exposed to everything that ActionServlet and MultipartRequestWrapper hid from view. Using Struts in my programming, the controller part of the MVC was hidden. For example, one of the first questions I had was: How in the world do I control where a successful action will forward to? Where do I set that? My questions are pretty much in that ballpark. :) On Tue, 10 Aug 2004 12:40:50 -0700, Michael McGrady [EMAIL PROTECTED] wrote: At 12:29 PM 8/10/2004, you wrote: Nope.. you misunderstood his question. First he started on struts. Every project he's worked on. Now, PHB wants him to work on another project, which is just servlets. He's never done any servlet programming, so he wants to know what differences there are etc. etc. etc. Hi, Jim. That is what I thought he said. That makes no sense. The comparison is of apples and oranges. There is no project that is just servlets unless it is nuts. Struts, again, is not an alternative to Servlets. Struts is based on Servlet technology. Working on a project involving Servlets but not using the Struts framework of course makes sense. But comparing Struts to Servlets makes no sense. 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]
Multiple image tags
Hi, this is a big question, so probably for only the patient ones... I'm beeing a very purist on MVC in my application, so i got a .jsf that is called HTMLbuttons.jsf, wich looks like this. code: %@ taglib uri=/WEB-INF/struts-bean.tld prefix=bean% %@ taglib uri=/WEB-INF/struts-html.tld prefix=html% %@ taglib uri=/WEB-INF/struts-logic.tld prefix=logic% logic : present name=buttons scope=session table tr logic:iterate id=buttonElement name=buttons indexId=idx td align=left bean : d efine id=buttonAction bean:message name=buttonElement property=btnAction/ /bean : define bean : define id=buttonFigure bean:write name=buttonElement property=btnFigure/ /bean : define html:image property=method value=%= buttonAction % pageKey=%= buttonFigure %/ /td /logic:iterate /tr /table input type=hidden name=method/ /logic : present This piece of page just iterates over a collection buttons that was set in a specific Action, so what the control layer sends, the jsp displays. This piece of page is usually included in other jsps in the following manner. code: html:form action=/registerpartyhousereq html:errors/ html:base/ %@ include file=/functionalBlocks/partyhouseHTMLcomponent.jsf % %@ include file=/functionalBlocks/addressHTMLcomponent.jsf % logic : present name=partyHouseIndex scope=request html:hidden name=partyHouseIndex property=partyHouseIndex value=%= (String)request.getAttribute(partyHouseIndex) %/ /logic : present %-- !! --% %-- !! --% %-- HERE IT'S INCLUDED %@ include file=/functionalBlocks/HTMLButtons.jsf % %-- !! --% /html:form As you can see the HTML buttons never know where they're gonna be placed, because all pages use them. This whole thing works perfectly in Mozilla Firefox, but not in Internet Explorer. Here is the explanation. Note the following tag in HTMLButtons.jsf. code: html:image property=method value=%= buttonAction % pageKey=%= buttonFigure %/ I have a BaseLookupDispatchAction that waits for a submission parameter method that can have 4 values: Create, Save, Update, Delete. Suppose now the the value of buttonAction is Save, for example (the figure being displayd doesn't really matter). When this page is submitted, Mozilla Firefox sends the following values. method.x=12 method.y=80 method=Save Where the numbers 12 and 80 are the place where the image was clicked. But, when Internet Explorer submits this page, it submits the follwing values - The weird thing is that Internet Explorer is actually the one that does what the standart says. method.x=12 method.y=80 Note that it doesn't send method=Save (sending this is not the standart, but Firefox is smarter that what the standart says and just send this third parameter, but not IE), which is what i really expect for my BaseLookupDispatchAction. So, i needed to workaround this, what can be easily done by using ordinary html:submit buttons, because they'll send what i want perfectly. The point is that i really would like to have images for the user to click on (in my application, presentation is very important). So, in HTML forums i got some options that would workaround this if i were using static pages, but they won't work in my case because as you see my buttons don't really know in wich page or form they're gonna be displayed. If i were actually writting these buttons in each page i could use one of this approaches: - Use one form for each button and place a hidden filed named method and associating the action for that button. - Use a traditional hyperlink with an image tag inside it. This link would contain all information i need from that page. But, as i said and you can see, none of these solutions would work in my case. That's why i'm asking the question on this forum. I didn't find a solution using html stuff, but maybe, some good Struts expert could tell me a Struts workaround for dealing with this. I first thought on some kind of indexed properties, but i
Re: Servlet help for a Struts programmer
From: Michael McGrady [EMAIL PROTECTED] There is no project that is just servlets unless it is nuts. It is *entirely* possible that there are webapps still running out there that are done completely with Servlets. No JSP, no Struts, nothing but (IIRC) out.println( bunch of html here); Struts did not always exist, and since JSP's get compiled into Servlet code, they had to come after Servlets, indicating that there was a point in time when there were only Servlets. Even if the Servlet JSP specs came out together, it's entirely possible that the original author was more comfortable writing straight Java and avoided JSP for that or some other reason. Someone who came straight to Struts would not necessarily have a clue about mapping Servlets in web.xml, or getting parameters directly from the request, etc. Yes, Struts is based on Servlets, but you don't have to know anything about Servlets to make a useful Struts webapp. To the OP, if no one has yet suggested it, Jason Hunter's Java Servlet Programming book is getting dated (perhaps there is a new edition now?) but is a good reference. -- Wendy Smoak - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Servlet help for a Struts programmer
At 12:51 PM 8/10/2004, you wrote: I am sure that in a week or two that might be apparent to me. However right now I am exposed to everything that ActionServlet and MultipartRequestWrapper hid from view. Using Struts in my programming, the controller part of the MVC was hidden. For example, one of the first questions I had was: How in the world do I control where a successful action will forward to? Where do I set that? My questions are pretty much in that ballpark. :) Basically, Denis, you can control what requests go to what Servlets in web.xml, which is why Struts usually captures requests that end in .do. Struts is one way of using Servlets and does the job by running every request within its domain, i.e. those ending with .do as a rule, through a controller Servlet, viz. ActionServlet. Essentially, Struts is a one Servlet application, using the Servlet as the C in MVC. You can use more Servlets if you want, but using Struts is to use Servlets in one particular way, albeit a very interesting and successful way. There is not much to learn about Servlets with Struts. Struts is just all about things non-Servlet in nature. Again, I would strongly suggest you spend this evening with a book like Jason Hunter's book on Servlets. You can study and run a pure Servlet application and use Struts at the same time. Struts is not not pure Servlets anywhere. If someone is trying to tell you that somehow Struts and Servlet applications differ, they are mixed up. Whatever application structure you use in a web context, it will of necessity have to do a lot like Struts does if it is based on Servlets. Michael - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Servlet help for a Struts programmer
At 12:57 PM 8/10/2004, you wrote: From: Michael McGrady [EMAIL PROTECTED] There is no project that is just servlets unless it is nuts. It is *entirely* possible that there are webapps still running out there that are done completely with Servlets. No JSP, no Struts, nothing but (IIRC) out.println( bunch of html here); Struts did not always exist, and since JSP's get compiled into Servlet code, they had to come after Servlets, indicating that there was a point in time when there were only Servlets. Even if the Servlet JSP specs came out together, it's entirely possible that the original author was more comfortable writing straight Java and avoided JSP for that or some other reason. Someone who came straight to Struts would not necessarily have a clue about mapping Servlets in web.xml, or getting parameters directly from the request, etc. Yes, Struts is based on Servlets, but you don't have to know anything about Servlets to make a useful Struts webapp. To the OP, if no one has yet suggested it, Jason Hunter's Java Servlet Programming book is getting dated (perhaps there is a new edition now?) but is a good reference. -- Wendy Smoak A webapp completely in servlets? No helper classes? No decoupling from Servlets at all? I doubt it! But, if so, it is nuts, as I said, and certainly not the question here. I assume that he would like to do something that does not resemble the stone age. Michael - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Servlet help for a Struts programmer
Feel your pain! I havent't seen any comprehensive documentation on development with servlet/JSP vs Struts development. Nobody really writes about basic servlet development anymore. It's soo old school. I'd look for older articles (at www.servlets.com, onjava.com, javaworld.com, etc.) for examples. Or as others mentioned get a good servlet book. Java servlet programming from O'Reilly is very good. Be prepared for a lot more flow control, exception handling, validation to be done programmatically, not declarativly. If the app you are maintaining took a few ideas from Sun's blueprint J2EE patterns, it might even contain a mini-struts(using a controller servlet to dispatch request to correct handler). Or if the app is small enough, you could just port it to struts? good luck Henrik Bentel Denis Avdic [EMAIL PROTECTED] 08/10/04 01:54 PM Please respond to Struts Users Mailing List To: Struts Users Mailing List [EMAIL PROTECTED] cc: Subject:Servlet help for a Struts programmer I have an strange request: While I am very familiar with Struts (I've worked almost exclusively in Struts for last 2 years, right after college), I have only basic knowledge of actual Servlet programming. Now I am faced with a task of updating and maintaining a pure Servlet application. Does anyone know of a resource (or resources) where I can compare servlet functionality to struts functionality. I know they are related, but (for example) I miss having a Struts config file, where I can glance at one file and see all my action mappings. Is there anyone there in a similar situation? How are you coping? Thanks, Denis - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: java.net.ConnectException: Connection refused
Hi Jim, I have tried all different options for the jdbc url, but everything leads to same error, :java.net.ConnectException: Connection refused -- i tried to get connection from DriverManager.getConnection() instead from datasource and even that doen't work. I was able to use the same configuration on my desktop, so its something to do with the linux environment. I am not able to figure it out, can you send me guildelines on how u were able to make it work, whenever u got time. i am using mysql4.0, Tomcat 4.0, and struts1.1. -Original Message- From: Jim Barrows [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 10, 2004 1:17 PM To: Struts Users Mailing List Subject: RE: java.net.ConnectException: Connection refused -Original Message- From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 10, 2004 10:10 AM To: Struts Users Mailing List Subject: RE: java.net.ConnectException: Connection refused This is a well known problem regarding MySQL and Linux. One of two has a screwy implementation of resolving host names. WHich one depends on who you talk to. Known solutions include using 127.0.0.1. You will also have issues with authenticating to the server if you limit mysql logins by server. I have tried 127.0.0.1, but even this does not work gives same error, can you think of any other solution... Unfortunately I'm not at home, which is where my MySQL implementation is, so I can't show you what I'm doing for another 7-8 hours :( On the other hand the MySQL folk have some great documentation and help forums that could probably help you more, if no one else has any solutions for you here. Also changed driver class name to com.mysql.jdbc.Driver, didn't work parameter nameurl/name valuejdbc:mysql://127.0.0.1:3306/prototypedb?autoReconnect=t rue/value /parameter !-- Class name for mm.mysql JDBC driver -- parameter namedriverClassName/name valueorg.gjt.mm.mysql.Driver/value /parameter -Original Message- From: Jim Barrows [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 10, 2004 12:26 PM To: Struts Users Mailing List Subject: RE: java.net.ConnectException: Connection refused -Original Message- From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 10, 2004 9:17 AM Cc: Struts Users Mailing List Subject: RE: java.net.ConnectException: Connection refused I am using Tomcat4.0, struts1.1, mysql 4.0.18 , on Linux environment. And i am unable to connect to mysql db. Below is the url i am using in server.xml file. and also i have the jdbc driver under WEB-INF/lib - mysql-connector-java-3.0.14-production-bin.jar...I was successfully able to deploy the same application on Windows, using the same server.xml file. please help. This is a well known problem regarding MySQL and Linux. One of two has a screwy implementation of resolving host names. WHich one depends on who you talk to. Known solutions include using 127.0.0.1. You will also have issues with authenticating to the server if you limit mysql logins by server. parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter parameter nameurl/name valuejdbc:mysql://localhost:3306/prototypedb?autoReconnect=t rue/value /parameter !-- Class name for mm.mysql JDBC driver -- parameter namedriverClassName/name valueorg.gjt.mm.mysql.Driver/value /parameter org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory, cause: java.sql.SQLException: Server connection failure during transaction. Due to underlying exception: 'java.net.ConnectException: Connection refused'. ** BEGIN NESTED EXCEPTION ** java.net.ConnectException MESSAGE: Connection refused STACKTRACE: java.net.ConnectException: Connection refused at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:305) at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:171) at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:158) at java.net.Socket.connect(Socket.java:452) at java.net.Socket.connect(Socket.java:402) at java.net.Socket.init(Socket.java:309) at java.net.Socket.init(Socket.java:124) at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFac tory.java:121) at com.mysql.jdbc.MysqlIO.init(MysqlIO.java:220) at com.mysql.jdbc.Connection.createNewIO(Connection.java:1884) at com.mysql.jdbc.Connection.init(Connection.java:440) at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriv er.java:400) at org.apache.commons.dbcp.DriverConnectionFactory.createConnecti on(DriverConne
RE: Servlet help for a Struts programmer
At 01:06 PM 8/10/2004, you wrote: But comparing Struts to Servlets makes no sense. SUre it does... as he says later.. how do I forward to a completed action... Since in servlets there is no action. The only forward there is, is a real forward, not a struts style forward. Not to mention that most servlets, in the early days did consist of nothing but out.println() statements ( as Wendy correctly remembered). Having written a few of those.. I really liked it when JSP's when they came out :) I am sure he is not interested in those uses for Servlets. I am trying to be practical and help the guy. I guess there are some comparisons. You are right about that. The Struts ActionForward is based, ultimately, on forwarding relating to web technology and not completely unrelated to Servlets. That is true. That is also true about redirects. But, I do think Denis will be better served to step back a moment and to see that the comparison is not between Struts and Servlets but between all the various alternative ways of using Servlet technology out there and the way that Struts uses Servlet technology. Michael - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Servlet help for a Struts programmer
This is probably the first struts mailing list thread I've browsed through, dear god you guys confuse me :) -Joe On Tue, 10 Aug 2004 13:11:34 -0700, Michael McGrady [EMAIL PROTECTED] wrote: At 12:57 PM 8/10/2004, you wrote: From: Michael McGrady [EMAIL PROTECTED] There is no project that is just servlets unless it is nuts. It is *entirely* possible that there are webapps still running out there that are done completely with Servlets. No JSP, no Struts, nothing but (IIRC) out.println( bunch of html here); Struts did not always exist, and since JSP's get compiled into Servlet code, they had to come after Servlets, indicating that there was a point in time when there were only Servlets. Even if the Servlet JSP specs came out together, it's entirely possible that the original author was more comfortable writing straight Java and avoided JSP for that or some other reason. Someone who came straight to Struts would not necessarily have a clue about mapping Servlets in web.xml, or getting parameters directly from the request, etc. Yes, Struts is based on Servlets, but you don't have to know anything about Servlets to make a useful Struts webapp. To the OP, if no one has yet suggested it, Jason Hunter's Java Servlet Programming book is getting dated (perhaps there is a new edition now?) but is a good reference. -- Wendy Smoak A webapp completely in servlets? No helper classes? No decoupling from Servlets at all? I doubt it! But, if so, it is nuts, as I said, and certainly not the question here. I assume that he would like to do something that does not resemble the stone age. 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: Servlet help for a Struts programmer
At 01:12 PM 8/10/2004, you wrote: I havent't seen any comprehensive documentation on development with servlet/JSP vs Struts development. Geesch! Struts IS basic Servlet development at the highest level. Michael - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Servlet help for a Struts programmer
-Original Message- From: Denis Avdic [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 10, 2004 12:52 PM To: Struts Users Mailing List Subject: Re: Servlet help for a Struts programmer I am sure that in a week or two that might be apparent to me. However right now I am exposed to everything that ActionServlet and MultipartRequestWrapper hid from view. Using Struts in my programming, the controller part of the MVC was hidden. For example, one of the first questions I had was: How in the world do I control where a successful action will forward to? Where do I set that? Ummm.. you may not do that.. it depends on what era your servlet app is from.. and more importantly, how it's set up. If you are particularly unfortunate you will have sevlets generating HTML. If this is the case, personally I would consider another job.. but hey those are my nightmares, not yours :) Course, if you have the stomach for it, begging to redo the app in struts might also work. Since this is probable.. given your question... in your doPost, doGet or doPut method you will do everything in one nasty ugly bit of code, which can be broken down into various step by step method calls, to keep your code clean, and your sanity in tact. There is no forward. There is no automatic translation from form into a form bean. There are not hand dandy url to action mapping, everything is a url to servlet mapping. The best way to describe this is... imagine trying to build a modern car using 1914 car building technology. Add in the your predicament, which is that you first have to learn how they built cars in 1914. If you are somewhat luckier then you have servlets that do some processing and then call sendRedirect().. you might want to look at what struts is doing internally. If you are more fortunate then I think you are, you have someones attempt at a struts like MVC controller. In which case you'll probably have to read the documentation (ie code) to figure out how to make it work. My questions are pretty much in that ballpark. :) On Tue, 10 Aug 2004 12:40:50 -0700, Michael McGrady [EMAIL PROTECTED] wrote: At 12:29 PM 8/10/2004, you wrote: Nope.. you misunderstood his question. First he started on struts. Every project he's worked on. Now, PHB wants him to work on another project, which is just servlets. He's never done any servlet programming, so he wants to know what differences there are etc. etc. etc. Hi, Jim. That is what I thought he said. That makes no sense. The comparison is of apples and oranges. There is no project that is just servlets unless it is nuts. Struts, again, is not an alternative to Servlets. Struts is based on Servlet technology. Working on a project involving Servlets but not using the Struts framework of course makes sense. But comparing Struts to Servlets makes no sense. 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Servlet help for a Struts programmer
At 12:57 PM 8/10/2004, you wrote: Yes, Struts is based on Servlets, but you don't have to know anything about Servlets to make a useful Struts webapp. I wonder if this is true. I cannot imagine that it could be. Maybe it is. I am beginning to think so. ///;-) Michael - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Servlet help for a Struts programmer
-Original Message- From: Michael McGrady [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 10, 2004 1:12 PM To: Struts Users Mailing List Subject: Re: Servlet help for a Struts programmer At 12:57 PM 8/10/2004, you wrote: From: Michael McGrady [EMAIL PROTECTED] There is no project that is just servlets unless it is nuts. It is *entirely* possible that there are webapps still running out there that are done completely with Servlets. No JSP, no Struts, nothing but (IIRC) out.println( bunch of html here); Struts did not always exist, and since JSP's get compiled into Servlet code, they had to come after Servlets, indicating that there was a point in time when there were only Servlets. Even if the Servlet JSP specs came out together, it's entirely possible that the original author was more comfortable writing straight Java and avoided JSP for that or some other reason. Someone who came straight to Struts would not necessarily have a clue about mapping Servlets in web.xml, or getting parameters directly from the request, etc. Yes, Struts is based on Servlets, but you don't have to know anything about Servlets to make a useful Struts webapp. To the OP, if no one has yet suggested it, Jason Hunter's Java Servlet Programming book is getting dated (perhaps there is a new edition now?) but is a good reference. -- Wendy Smoak A webapp completely in servlets? No helper classes? No decoupling from Servlets at all? I doubt it! But, if so, it is nuts, as I said, and certainly not the question here. I assume that he would like to do something that does not resemble the stone age. Guess what don't doubt it. I did it. I wrote them. I hated it. It was painful. It was complex. It was ugly. In fact if you see a url that includes something like /servlet/blah you are probably looking at a website done entirely in servlets. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: java.net.ConnectException: Connection refused
-Original Message- From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 10, 2004 1:13 PM To: Struts Users Mailing List Subject: RE: java.net.ConnectException: Connection refused Hi Jim, I have tried all different options for the jdbc url, but everything leads to same error, :java.net.ConnectException: Connection refused -- i tried to get connection from DriverManager.getConnection() instead from datasource and even that doen't work. I was able to use the same configuration on my desktop, so its something to do with the linux environment. I am not able to figure it out, can you send me guildelines on how u were able to make it work, whenever u got time. i am using mysql4.0, Tomcat 4.0, and struts1.1. Does your linux box have a firewall? If so, is it blocking the port? -Original Message- From: Jim Barrows [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 10, 2004 1:17 PM To: Struts Users Mailing List Subject: RE: java.net.ConnectException: Connection refused -Original Message- From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 10, 2004 10:10 AM To: Struts Users Mailing List Subject: RE: java.net.ConnectException: Connection refused This is a well known problem regarding MySQL and Linux. One of two has a screwy implementation of resolving host names. WHich one depends on who you talk to. Known solutions include using 127.0.0.1. You will also have issues with authenticating to the server if you limit mysql logins by server. I have tried 127.0.0.1, but even this does not work gives same error, can you think of any other solution... Unfortunately I'm not at home, which is where my MySQL implementation is, so I can't show you what I'm doing for another 7-8 hours :( On the other hand the MySQL folk have some great documentation and help forums that could probably help you more, if no one else has any solutions for you here. Also changed driver class name to com.mysql.jdbc.Driver, didn't work parameter nameurl/name valuejdbc:mysql://127.0.0.1:3306/prototypedb?autoReconnect=t rue/value /parameter !-- Class name for mm.mysql JDBC driver -- parameter namedriverClassName/name valueorg.gjt.mm.mysql.Driver/value /parameter -Original Message- From: Jim Barrows [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 10, 2004 12:26 PM To: Struts Users Mailing List Subject: RE: java.net.ConnectException: Connection refused -Original Message- From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 10, 2004 9:17 AM Cc: Struts Users Mailing List Subject: RE: java.net.ConnectException: Connection refused I am using Tomcat4.0, struts1.1, mysql 4.0.18 , on Linux environment. And i am unable to connect to mysql db. Below is the url i am using in server.xml file. and also i have the jdbc driver under WEB-INF/lib - mysql-connector-java-3.0.14-production-bin.jar...I was successfully able to deploy the same application on Windows, using the same server.xml file. please help. This is a well known problem regarding MySQL and Linux. One of two has a screwy implementation of resolving host names. WHich one depends on who you talk to. Known solutions include using 127.0.0.1. You will also have issues with authenticating to the server if you limit mysql logins by server. parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter parameter nameurl/name valuejdbc:mysql://localhost:3306/prototypedb?autoReconnect=t rue/value /parameter !-- Class name for mm.mysql JDBC driver -- parameter namedriverClassName/name valueorg.gjt.mm.mysql.Driver/value /parameter org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory, cause: java.sql.SQLException: Server connection failure during transaction. Due to underlying exception: 'java.net.ConnectException: Connection refused'. ** BEGIN NESTED EXCEPTION ** java.net.ConnectException MESSAGE: Connection refused STACKTRACE: java.net.ConnectException: Connection refused at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:305) at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:171) at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:158) at java.net.Socket.connect(Socket.java:452) at java.net.Socket.connect(Socket.java:402) at java.net.Socket.init(Socket.java:309) at java.net.Socket.init(Socket.java:124) at
RE: Servlet help for a Struts programmer
-Original Message- From: Michael McGrady [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 10, 2004 1:19 PM To: Struts Users Mailing List Subject: Re: Servlet help for a Struts programmer At 01:12 PM 8/10/2004, you wrote: I havent't seen any comprehensive documentation on development with servlet/JSP vs Struts development. Geesch! Struts IS basic Servlet development at the highest level. No it's not. Trust me It's not even remotely close to servlet development... it uses only one servlet. Servlet development uses lots of servlets. Each one lovingly crafted by hand. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Servlet help for a Struts programmer
At 01:22 PM 8/10/2004, you wrote: Guess what don't doubt it. I did it. I wrote them. I hated it. It was painful. It was complex. It was ugly. In fact if you see a url that includes something like /servlet/blah you are probably looking at a website done entirely in servlets. Granite, as my sister says. ///;-) Or, granted, as I say! But, this surely is not where Denis wants to go. It all really is just Servlets still but done more intelligently. Struts is Servlets done smart. I cannot believe that Denis has an employer that wants him to write a site in Servlets alone. Do they, Denis? I suspect, as Wendy suggested, Denis just has not had to worry much about Servlets because the Struts technology let him get by without knowing what was essentially going on. Now he needs to know. That is not an alternative to Struts, however, and can be understood by understanding Struts itself better. We making sense? Michael - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Struts1.1 + Tiles on Resin 2.1.14
Hello all!! 1. I've got a huge problem - i wrote an app that utilizes subj, tested it on bunch of app-servers in local environment and finally (happily) deployed it to my ISP. ..App don't work there!!! All of the Struts1.1 (either with Tiles or nor) examles don't. I' m confused.. 2. my index.jsp: %@ taglib uri=struts-logic prefix=logic % logic:redirect forward=home / 3. my struts-config: global-forwards forward name=home path=/home / /global-forwards . action-mappings action path=/home type=ru.brainhouse.struts.action.StubAction validate=false forward name=success path=homeDef / . /action-mappings 4. my web-xml: servlet servlet-nameaction/servlet-name servlet-classorg.apache.struts.action.ActionServlet/servlet-class ... /servlet servlet-mapping servlet-nameaction/servlet-name url-pattern/home/url-pattern /servlet-mapping -- 5. if browse http://01.brainhouse.ru/ java.lang.NullPointerException at org.apache.struts.util.RequestUtils.computeURL(RequestUtils.java:521) at org.apache.struts.util.RequestUtils.computeURL(RequestUtils.java:436) at org.apache.struts.util.RequestUtils.computeURL(RequestUtils.java:396) at org.apache.struts.taglib.logic.RedirectTag.doEndTag(RedirectTag.java:294) at _index__jsp._jspService(/index.jsp:9) . 6. if browse http://01.brainhouse.ru/home java.lang.NoClassDefFoundError: org/apache/commons/beanutils/MethodUtils at org.apache.commons.digester.CallMethodRule.end(CallMethodRule.java:505) at org.apache.commons.digester.Rule.end(Rule.java:276) at org.apache.commons.digester.Digester.endElement(Digester.java:1058) at com.caucho.xml.XmlParser.popNode(XmlParser.java:883) . --- 7. All jars in /lib ANY SUGGESTIONS? COULD ANY ONE HELP HERE? Desperatly yours, dyp. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Servlet help for a Struts programmer
From: Michael McGrady [EMAIL PROTECTED] A webapp completely in servlets? No helper classes? No decoupling from Servlets at all? I doubt it! But, if so, it is nuts, as I said, and certainly not the question here. I assume that he would like to do something that does not resemble the stone age. The name calling is getting tiresome. The OP has an existing application that doesn't use Struts. The first thing he needs to do is figure out how it works, which is what he asked for help with. Whatever you think of it, it exists, and it most likely works just fine. In that case, the powers that be may not be all that interested in having it rewritten. If he is particularly unlucky, the app is exactly what I described, a bunch of Servlets spitting out HTML. I hope not, but it's entirely possible, and calling it nuts isn't going to make his job any easier. -- Wendy Smoak - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Servlet help for a Struts programmer
At 01:26 PM 8/10/2004, you wrote: No it's not. Trust me It's not even remotely close to servlet development... it uses only one servlet. Servlet development uses lots of servlets. Each one lovingly crafted by hand. Decoupling concerns for architectural and design purposes does not change the nature of the beast, Jim. Every single request in Struts is handled by a servlet: input and output. That is about as Servlet as it gets. That is as Servlet as it gets. That is my take on it, at any rate. Michael - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Servlet help for a Struts programmer
At 01:27 PM 8/10/2004, you wrote: The name calling is getting tiresome. Name calling? If I called anyone a name, I apologize. Do you mean referring to people by their names? Whatever, if you are talking to me, I certainly did not intend to offend anyone and am merely enjoying a conversation about Struts and Servlets. I am not sure what names you mean, dare I mention your name? Michael - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: java.net.ConnectException: Connection refused
No there is no firewall on Linux box. -Original Message- From: Jim Barrows [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 10, 2004 4:24 PM To: Struts Users Mailing List Subject: RE: java.net.ConnectException: Connection refused -Original Message- From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 10, 2004 1:13 PM To: Struts Users Mailing List Subject: RE: java.net.ConnectException: Connection refused Hi Jim, I have tried all different options for the jdbc url, but everything leads to same error, :java.net.ConnectException: Connection refused -- i tried to get connection from DriverManager.getConnection() instead from datasource and even that doen't work. I was able to use the same configuration on my desktop, so its something to do with the linux environment. I am not able to figure it out, can you send me guildelines on how u were able to make it work, whenever u got time. i am using mysql4.0, Tomcat 4.0, and struts1.1. Does your linux box have a firewall? If so, is it blocking the port? -Original Message- From: Jim Barrows [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 10, 2004 1:17 PM To: Struts Users Mailing List Subject: RE: java.net.ConnectException: Connection refused -Original Message- From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 10, 2004 10:10 AM To: Struts Users Mailing List Subject: RE: java.net.ConnectException: Connection refused This is a well known problem regarding MySQL and Linux. One of two has a screwy implementation of resolving host names. WHich one depends on who you talk to. Known solutions include using 127.0.0.1. You will also have issues with authenticating to the server if you limit mysql logins by server. I have tried 127.0.0.1, but even this does not work gives same error, can you think of any other solution... Unfortunately I'm not at home, which is where my MySQL implementation is, so I can't show you what I'm doing for another 7-8 hours :( On the other hand the MySQL folk have some great documentation and help forums that could probably help you more, if no one else has any solutions for you here. Also changed driver class name to com.mysql.jdbc.Driver, didn't work parameter nameurl/name valuejdbc:mysql://127.0.0.1:3306/prototypedb?autoReconnect=t rue/value /parameter !-- Class name for mm.mysql JDBC driver -- parameter namedriverClassName/name valueorg.gjt.mm.mysql.Driver/value /parameter -Original Message- From: Jim Barrows [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 10, 2004 12:26 PM To: Struts Users Mailing List Subject: RE: java.net.ConnectException: Connection refused -Original Message- From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 10, 2004 9:17 AM Cc: Struts Users Mailing List Subject: RE: java.net.ConnectException: Connection refused I am using Tomcat4.0, struts1.1, mysql 4.0.18 , on Linux environment. And i am unable to connect to mysql db. Below is the url i am using in server.xml file. and also i have the jdbc driver under WEB-INF/lib - mysql-connector-java-3.0.14-production-bin.jar...I was successfully able to deploy the same application on Windows, using the same server.xml file. please help. This is a well known problem regarding MySQL and Linux. One of two has a screwy implementation of resolving host names. WHich one depends on who you talk to. Known solutions include using 127.0.0.1. You will also have issues with authenticating to the server if you limit mysql logins by server. parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter parameter nameurl/name valuejdbc:mysql://localhost:3306/prototypedb?autoReconnect=t rue/value /parameter !-- Class name for mm.mysql JDBC driver -- parameter namedriverClassName/name valueorg.gjt.mm.mysql.Driver/value /parameter org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory, cause: java.sql.SQLException: Server connection failure during transaction. Due to underlying exception: 'java.net.ConnectException: Connection refused'. ** BEGIN NESTED EXCEPTION ** java.net.ConnectException MESSAGE: Connection refused STACKTRACE: java.net.ConnectException: Connection refused at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:305) at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:171) at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:158) at
RE: Servlet help for a Struts programmer
-Original Message- From: Michael McGrady [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 10, 2004 1:22 PM To: Struts Users Mailing List Subject: Re: Servlet help for a Struts programmer At 12:57 PM 8/10/2004, you wrote: Yes, Struts is based on Servlets, but you don't have to know anything about Servlets to make a useful Struts webapp. I wonder if this is true. I cannot imagine that it could be. Maybe it is. I am beginning to think so. ///;-) Try it yourself no JSP's. No struts, and basic CRUD operations on an address book. Now today, you would probably be smart. You would have a CRUD servlet for the actions, that would redirect to a servlet for generating HTML. That's 4 serlvets handling CRUD, one servlet to generate the add/edit form page, one servlet to generate the list address page. And no, you don't get to use jakarta's ECS either!!! Nope. Not at all.. you can however drool over it :) out.println( html); out.println( head); out.println( titleTHis is the title of my page./title); out.println( /head); Or: out.println( html +head + titleThis is the title of my page./title); +/head); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Servlet help for a Struts programmer
At 01:27 PM 8/10/2004, you wrote: The OP has an existing application that doesn't use Struts. Oh, I see what you mean, Wendy. I assume that the OP, whatever that is (client?), does not have a Servlet application that fails to use standard decoupling techniques, and even if it did, he would want to change that. I certainly do not mean to demean anyone by stating that a web application with nothing but Servlet classes would be nuts. I cannot imagine that a web application with Servlet classes alone ever existed except in a sort of student or home grown environment. But, if I am wrong, I am not meaning to challenge anyone's sanity. That is just an expression. Nothing personal. I love you all. Hell, I am a Buddhist. Aum! LOL Seriously, I am not the slightest bit agitated about anything and am merely trying to assist Denis the best I can without losing track of my common sense. Okay dokay? Friends? Michael - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: java.net.ConnectException: Connection refused
-Original Message- From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 10, 2004 1:29 PM To: Struts Users Mailing List Subject: RE: java.net.ConnectException: Connection refused No there is no firewall on Linux box. Okay I'm going to down a mental list you've probably already checked, and I'm assuming a moderate level of linux understanding. networking on the linux box is up and running? mysql is up and running? netstat --listen shows the 3306 port for mysql open and listening? Can you get the mysql admin tools to connect from commandline? If all of these are yes, I'll have to wait until I get home to post my config... unless anyone can post theirs -Original Message- From: Jim Barrows [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 10, 2004 4:24 PM To: Struts Users Mailing List Subject: RE: java.net.ConnectException: Connection refused -Original Message- From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 10, 2004 1:13 PM To: Struts Users Mailing List Subject: RE: java.net.ConnectException: Connection refused Hi Jim, I have tried all different options for the jdbc url, but everything leads to same error, :java.net.ConnectException: Connection refused -- i tried to get connection from DriverManager.getConnection() instead from datasource and even that doen't work. I was able to use the same configuration on my desktop, so its something to do with the linux environment. I am not able to figure it out, can you send me guildelines on how u were able to make it work, whenever u got time. i am using mysql4.0, Tomcat 4.0, and struts1.1. Does your linux box have a firewall? If so, is it blocking the port? -Original Message- From: Jim Barrows [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 10, 2004 1:17 PM To: Struts Users Mailing List Subject: RE: java.net.ConnectException: Connection refused -Original Message- From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 10, 2004 10:10 AM To: Struts Users Mailing List Subject: RE: java.net.ConnectException: Connection refused This is a well known problem regarding MySQL and Linux. One of two has a screwy implementation of resolving host names. WHich one depends on who you talk to. Known solutions include using 127.0.0.1. You will also have issues with authenticating to the server if you limit mysql logins by server. I have tried 127.0.0.1, but even this does not work gives same error, can you think of any other solution... Unfortunately I'm not at home, which is where my MySQL implementation is, so I can't show you what I'm doing for another 7-8 hours :( On the other hand the MySQL folk have some great documentation and help forums that could probably help you more, if no one else has any solutions for you here. Also changed driver class name to com.mysql.jdbc.Driver, didn't work parameter nameurl/name valuejdbc:mysql://127.0.0.1:3306/prototypedb?autoReconnect=t rue/value /parameter !-- Class name for mm.mysql JDBC driver -- parameter namedriverClassName/name valueorg.gjt.mm.mysql.Driver/value /parameter -Original Message- From: Jim Barrows [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 10, 2004 12:26 PM To: Struts Users Mailing List Subject: RE: java.net.ConnectException: Connection refused -Original Message- From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 10, 2004 9:17 AM Cc: Struts Users Mailing List Subject: RE: java.net.ConnectException: Connection refused I am using Tomcat4.0, struts1.1, mysql 4.0.18 , on Linux environment. And i am unable to connect to mysql db. Below is the url i am using in server.xml file. and also i have the jdbc driver under WEB-INF/lib - mysql-connector-java-3.0.14-production-bin.jar...I was successfully able to deploy the same application on Windows, using the same server.xml file. please help. This is a well known problem regarding MySQL and Linux. One of two has a screwy implementation of resolving host names. WHich one depends on who you talk to. Known solutions include using 127.0.0.1. You will also have issues with authenticating to the server if you limit mysql logins by server. parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter parameter nameurl/name valuejdbc:mysql://localhost:3306/prototypedb?autoReconnect=t rue/value /parameter !-- Class name for mm.mysql JDBC driver -- parameter namedriverClassName/name
RE: Servlet help for a Struts programmer
At 01:33 PM 8/10/2004, you wrote: Try it yourself no JSP's. No struts, and basic CRUD operations on an address book. Now today, you would probably be smart. You would have a CRUD servlet for the actions, that would redirect to a servlet for generating HTML. That's 4 serlvets handling CRUD, one servlet to generate the add/edit form page, one servlet to generate the list address page. And no, you don't get to use jakarta's ECS either!!! Nope. Not at all.. you can however drool over it :) out.println( html); out.println( head); out.println( titleTHis is the title of my page./title); out.println( /head); Or: out.println( html +head + titleThis is the title of my page./title); +/head); The point, however, Denis, is that you DON'T want to do this. This is not good Servlet programming. Struts is. Crudy programs are too. LOL Michael - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Servlet help for a Struts programmer
-Original Message- From: Michael McGrady [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 10, 2004 1:38 PM To: Struts Users Mailing List Subject: Re: Servlet help for a Struts programmer At 01:27 PM 8/10/2004, you wrote: The OP has an existing application that doesn't use Struts. Oh, I see what you mean, Wendy. I assume that the OP, whatever that is (client?), does not have a Servlet application that fails to use standard decoupling techniques, and even if it did, he would want to change that. I certainly do not mean to demean anyone by stating that a web application with nothing but Servlet classes would be nuts. I cannot It is nuts. It's one of the big reasons why the Java world is so gung ho on seperation of concerns, in my never to be humble opinion. At the time, servlets were a huge step forward from CGI/perl applications. People were writing huge apps in them... and suffering the very pitfalls that moden practices seek to avoid. MVC did not show up until relatively late, when JSP's came out, because in the beginning, there were no JSP's. Take a look at the JSP spec version number vs. the Servlet spec version number. JSP's are basically inverted servlets, and were created because of the amount of pain involved in spitting out what was bascially boilerplate html. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Servlet help for a Struts programmer
At 12:57 PM 8/10/2004, you wrote: It is *entirely* possible that there are webapps still running out there that are done completely with Servlets. No JSP, no Struts, nothing but (IIRC) out.println( bunch of html here); Struts did not always exist, and since JSP's get compiled into Servlet code, they had to come after Servlets, indicating that there was a point in time when there were only Servlets. Even if the Servlet JSP specs came out together, it's entirely possible that the original author was more comfortable writing straight Java and avoided JSP for that or some other reason. I can remember those days too, Wendy. We developed and most people, I think, developed their own frameworks no unlike Struts. I have to admit that Struts is better than the one I used, but very, very similar. I had one framework we used that just had: %= Process.process(request) % on every page (other than the import). Lots of fun inventing in those days. Everyone seemed to be working in the same direction though, viz. toward something like Struts. This is what is a lot of fun even today about Open Source for me, watching the Velocity and similar ideas crop up. I like the way that Bruce Tate takes such a high level (50,000 feet) view of it all. Michael - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Servlet help for a Struts programmer
-Original Message- From: Denis Avdic [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 10, 2004 11:55 AM To: Struts Users Mailing List Subject: Servlet help for a Struts programmer I have an strange request: While I am very familiar with Struts (I've worked almost exclusively in Struts for last 2 years, right after college), I have only basic knowledge of actual Servlet programming. Now I am faced with a task of updating and maintaining a pure Servlet application. Does anyone know of a resource (or resources) where I can compare servlet functionality to struts functionality. I know they are related, but (for example) I miss having a Struts config file, where I can glance at one file and see all my action mappings. Is there anyone there in a similar situation? How are you coping? I would have several suggestions, depending on what kind of legacy stuff you have. If you are adding new functionality, you can get away with doing it in struts... you might have to change the extension mapping from *.do to something else, but it beats trying to do everything the old way. If you are modifying existing code (ie bug fixing, enhancements) then you are looking at trying to keep the exisiting code base, and thats going to require a lot of study as to how the application works. Start in the web.xml file, looking at urls there and what's being generated on the app. Once you get an understanding for how it all works, then you can make changes as you need to. If you have a struts like MVC controller, then again you'll probably have to read the code to figure out how it works. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Servlet help for a Struts programmer
At 01:45 PM 8/10/2004, you wrote: JSP's are basically inverted servlets, and were created because of the amount of pain involved in spitting out what was bascially boilerplate html. We used helper classes back then to do with Servlets essentially (in principle) what is done with JSP today. In fact, JSP IS what we were doing in a different way with Servlets at the time. I am not sure even today that JSP is such a good idea even as a solution to the Servlet problem. I like some of the things we invented as well, if not better. Michael - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Servlet help for a Struts programmer
At 01:51 PM 8/10/2004, you wrote: updating and maintaining a pure Servlet application. What is the application like, Denis? What do you mean when you say it is pure Servlet? Is it without JSP pages, etc.? That would be surprising to me. Michael - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Servlet help for a Struts programmer
I find this to be a good tutorial also. http://www.apl.jhu.edu/~hall/java/Servlet-Tutorial/ HTH Pritpal Dhaliwal -Original Message- From: Denis Avdic [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 10, 2004 11:55 AM To: Struts Users Mailing List Subject: Servlet help for a Struts programmer I have an strange request: While I am very familiar with Struts (I've worked almost exclusively in Struts for last 2 years, right after college), I have only basic knowledge of actual Servlet programming. Now I am faced with a task of updating and maintaining a pure Servlet application. Does anyone know of a resource (or resources) where I can compare servlet functionality to struts functionality. I know they are related, but (for example) I miss having a Struts config file, where I can glance at one file and see all my action mappings. Is there anyone there in a similar situation? How are you coping? Thanks, Denis - 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: Multiple image tags
At 12:55 PM 8/10/2004, you wrote: Hi, this is a big question, so probably for only the patient ones... All the solutions with the image tag are based on transforming the parameter name in the tag to a value. The name\value pair, e.g. button.submit.x=9, is useful only for the name, i.e. for button.submit.x and not for the value, i.e. 9. This is, of course, unusual. So, solutions must efficiently determine whether the name was this or that and have no interest at all in the value in this case. I like, after much experimentation, just doing it as follows: public final class ButtonCommand { private ButtonCommand() { } public final static String getCommand(HttpServletRequest request) { Enumeration enum = request.getParameterNames(); String parameterName = null; while(enum.hasMoreElements()) { parameterName = (String)enum.nextElement(); if(parameterName.endsWith(.x)) { return parameterName.substring(0,parameterName.indexOf('.')); } } return parameterName; } } This works when the name attribute in input type='image' name='whatever (the property attribute in html:image) is whatever you want as the command. (The word command is probably a misnomer here.) So, if you have html:image property='submit' etc., this will be sent as something like submit.x=7submit.y=11. You can use the presence of the .x to mine the value of the name or property attribute directly wherever you do your controller logic. There are two solutions at: http://wiki.apache.org/struts/StrutsCatalogMultipleImageButtonsWithNoJavaScript. The one is very simple and probably is the best. Ted Husted's solution, I have come to think, after having done something similar, is just to heavy. There is no need to create all those button objects. However, if you read the above link and in particular the least favored solution using CrackWillowButton as an inner class for ActionForms, you will see how Ted's works, I think, since the ideas are similar. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Servlet help for a Struts programmer
At 02:06 PM 8/10/2004, you wrote: I find this to be a good tutorial also. http://www.apl.jhu.edu/~hall/java/Servlet-Tutorial/ HTH Pritpal Dhaliwal This is an early version of the Core book,which is online for free. http://www.coreservlets.com/ Michael - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: java.net.ConnectException: Connection refused
All the below 4 are working on my Linux box but still i have the same problem networking on the linux box is up and running? mysql is up and running? netstat --listen shows the 3306 port for mysql open and listening? Can you get the mysql admin tools to connect from commandline? -Original Message- From: Jim Barrows [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 10, 2004 4:39 PM To: Struts Users Mailing List Subject: RE: java.net.ConnectException: Connection refused -Original Message- From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 10, 2004 1:29 PM To: Struts Users Mailing List Subject: RE: java.net.ConnectException: Connection refused No there is no firewall on Linux box. Okay I'm going to down a mental list you've probably already checked, and I'm assuming a moderate level of linux understanding. networking on the linux box is up and running? mysql is up and running? netstat --listen shows the 3306 port for mysql open and listening? Can you get the mysql admin tools to connect from commandline? If all of these are yes, I'll have to wait until I get home to post my config... unless anyone can post theirs -Original Message- From: Jim Barrows [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 10, 2004 4:24 PM To: Struts Users Mailing List Subject: RE: java.net.ConnectException: Connection refused -Original Message- From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 10, 2004 1:13 PM To: Struts Users Mailing List Subject: RE: java.net.ConnectException: Connection refused Hi Jim, I have tried all different options for the jdbc url, but everything leads to same error, :java.net.ConnectException: Connection refused -- i tried to get connection from DriverManager.getConnection() instead from datasource and even that doen't work. I was able to use the same configuration on my desktop, so its something to do with the linux environment. I am not able to figure it out, can you send me guildelines on how u were able to make it work, whenever u got time. i am using mysql4.0, Tomcat 4.0, and struts1.1. Does your linux box have a firewall? If so, is it blocking the port? -Original Message- From: Jim Barrows [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 10, 2004 1:17 PM To: Struts Users Mailing List Subject: RE: java.net.ConnectException: Connection refused -Original Message- From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 10, 2004 10:10 AM To: Struts Users Mailing List Subject: RE: java.net.ConnectException: Connection refused This is a well known problem regarding MySQL and Linux. One of two has a screwy implementation of resolving host names. WHich one depends on who you talk to. Known solutions include using 127.0.0.1. You will also have issues with authenticating to the server if you limit mysql logins by server. I have tried 127.0.0.1, but even this does not work gives same error, can you think of any other solution... Unfortunately I'm not at home, which is where my MySQL implementation is, so I can't show you what I'm doing for another 7-8 hours :( On the other hand the MySQL folk have some great documentation and help forums that could probably help you more, if no one else has any solutions for you here. Also changed driver class name to com.mysql.jdbc.Driver, didn't work parameter nameurl/name valuejdbc:mysql://127.0.0.1:3306/prototypedb?autoReconnect=t rue/value /parameter !-- Class name for mm.mysql JDBC driver -- parameter namedriverClassName/name valueorg.gjt.mm.mysql.Driver/value /parameter -Original Message- From: Jim Barrows [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 10, 2004 12:26 PM To: Struts Users Mailing List Subject: RE: java.net.ConnectException: Connection refused -Original Message- From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 10, 2004 9:17 AM Cc: Struts Users Mailing List Subject: RE: java.net.ConnectException: Connection refused I am using Tomcat4.0, struts1.1, mysql 4.0.18 , on Linux environment. And i am unable to connect to mysql db. Below is the url i am using in server.xml file. and also i have the jdbc driver under WEB-INF/lib - mysql-connector-java-3.0.14-production-bin.jar...I was successfully able to deploy the same application on Windows, using the same server.xml file. please help. This is a well known problem regarding MySQL and Linux. One of two has a screwy implementation of resolving host names. WHich one depends on who you talk to. Known solutions include using 127.0.0.1. You will also have
Re: Servlet help for a Struts programmer
imo this is true, a beginner can build a simple web app using Struts (without any prior servlet experience) i am living proof, as i started with Struts directly. HOWEVER, because real-world apps are never basic/simple, and because Struts is really a facade on top of the java-based web app paradigm, i struggled through building apps.. knowing how to build and make a java-based web app WITHOUT using Struts helps A TONNE (sp?) in making Struts apps... but the reverse is NOT true Denis, take this as a learning step 'missed' that should have been done before learning Struts. i wish i had. i had NO understanding of anything, no basic understanding of the stateless web model, didn't know what the heck POST/GET was, didn't know all this fundamental stuff, everything worked mysteriously... because sooner or later, you will run into a situation that you can't quite figure how to do it in Struts, and necessitates the need to use 'old school' methods like request.getParameter(), or whatever. Struts is great, but it also hides a lot of plumbing that if you're not aware, can make life difficult to understand/accomplish what you need to do --- Michael McGrady [EMAIL PROTECTED] wrote: At 12:57 PM 8/10/2004, you wrote: Yes, Struts is based on Servlets, but you don't have to know anything about Servlets to make a useful Struts webapp. I wonder if this is true. I cannot imagine that it could be. Maybe it is. I am beginning to think so. ///;-) Michael - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? Read only the mail you want - Yahoo! Mail SpamGuard. http://promotions.yahoo.com/new_mail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Servlet help for a Struts programmer
Have any of you guys read Jakarta Struts Live by Hightower? Its available for free here in pdf form: http://www.theserverside.com/books/sourcebeat/JakartaStrutsLive/index.tss Has a good tutorial (holy crap i just sneezed and shook my entire desk causing the cd case to fall off my monitor) chapter that gets you up and running fast. Although I noticed a typo in his code that wouldnt let me compile until i fixed. -joe On Tue, 10 Aug 2004 14:16:08 -0700 (PDT), Woodchuck [EMAIL PROTECTED] wrote: imo this is true, a beginner can build a simple web app using Struts (without any prior servlet experience) i am living proof, as i started with Struts directly. HOWEVER, because real-world apps are never basic/simple, and because Struts is really a facade on top of the java-based web app paradigm, i struggled through building apps.. knowing how to build and make a java-based web app WITHOUT using Struts helps A TONNE (sp?) in making Struts apps... but the reverse is NOT true Denis, take this as a learning step 'missed' that should have been done before learning Struts. i wish i had. i had NO understanding of anything, no basic understanding of the stateless web model, didn't know what the heck POST/GET was, didn't know all this fundamental stuff, everything worked mysteriously... because sooner or later, you will run into a situation that you can't quite figure how to do it in Struts, and necessitates the need to use 'old school' methods like request.getParameter(), or whatever. Struts is great, but it also hides a lot of plumbing that if you're not aware, can make life difficult to understand/accomplish what you need to do --- Michael McGrady [EMAIL PROTECTED] wrote: At 12:57 PM 8/10/2004, you wrote: Yes, Struts is based on Servlets, but you don't have to know anything about Servlets to make a useful Struts webapp. I wonder if this is true. I cannot imagine that it could be. Maybe it is. I am beginning to think so. ///;-) Michael - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? Read only the mail you want - Yahoo! Mail SpamGuard. http://promotions.yahoo.com/new_mail - 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: Servlet help for a Struts programmer
At 02:16 PM 8/10/2004, you wrote: hides a lot of plumbing that if you're not aware, can make life difficult to understand/accomplish what you need to do I can still remember my Grandmama asking me where the key making a space on the typewriter was. She was looking for a key saying space. In my first month on the job, my lead did not believe in assisting the newbies (he would say Tell it to the Telly Tubbies and show me a Telly Tubby doll). I took several days figuring out why there were ?s in the code. Do you know how hard it is to find out something that is so basic no one talks about it? I knew nothing about URLs or about request/response objects. That is just horrible mentoring. My unsolicited advice, Denis, if you are not aware of these things is to take HTML very seriously because that is what we are passing around and to learn without question everything you can about request and response objects. I would also highly recommend that you break down the parts of what is normally termed (incorrectly) as the URL and see how that all fits into the picture. I, for one, have really been helped by removing file based protocols from my web requests and forwards. I convert web protocols to file protocols internally now and am so much freed in terms of time I cannot believe it myself. Blah, blah! Michael - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Importing context with Struts
Suppose i got scattered pieces of code, wich includes a lot of Struts tags. These pieces are separate files, and i need to accesss some struts attributes (or beans) from these other files for each request. A nice example would be the html: error tag. In my case, it's located outside of the file that contains the submitted form, and i need to get the errors from these other file (where the html: error tag is located). That's why i need to import struts contexts so i can get it done. Is there a way to do that? = _ Leandro Terra C. Melo Eng. de Controle e Automação - UFMG ___ Yahoo! Acesso Grátis - navegue de graça com conexão de qualidade! Acesse: http://br.acesso.yahoo.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Importing context with Struts
-Original Message- From: Leandro Melo [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 10, 2004 2:50 PM To: struts jakarta Subject: Importing context with Struts Suppose i got scattered pieces of code, wich includes a lot of Struts tags. These pieces are separate files, and i need to accesss some struts attributes (or beans) from these other files for each request. A nice example would be the html: error tag. In my case, it's located outside of the file that contains the submitted form, and i need to get the errors from these other file (where the html: error tag is located). That's why i need to import struts contexts so i can get it done. Is there a way to do that? Are all these pages being displayed at the same time? In that case all vars are probalby in request scope, if not session. Other then that... I don't think so. I do much the same thing, using tiles to tie it all together for display and have no trouble accessing anything in session or request.. never tried page scope though. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Servlet help for a Struts programmer
At 02:21 PM 8/10/2004, you wrote: Have any of you guys read Jakarta Struts Live by Hightower? Its available for free here in pdf form: http://www.theserverside.com/books/sourcebeat/JakartaStrutsLive/index.tss Thanx! I also highly recommend as a beginning The Struts Framework by Sue Spielman. Ted Husted's Struts in Action and Programming Jakarta Struts by Chuck Cavaness are, of course, better for the cognizantorees. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Distributable Web Application Question
Is anyone using Struts in a distributed Web application? If so, are there any gotchas that you have run accross using Struts in a distributed Web Application? Thanks, Marty Jones - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Importing context with Struts
At 02:53 PM 8/10/2004, you wrote: Is there a way to do that? Are all these pages being displayed at the same time? In that case all vars are probalby in request scope, if not session. Other then that... I don't think so. I do much the same thing, using tiles to tie it all together for display and have no trouble accessing anything in session or request.. never tried page scope though. If you are using tiles, then they have to be in the same class, so they have to have access to one another, right? Michael - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Importing context with Struts
-Original Message- From: Michael McGrady [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 10, 2004 2:58 PM To: Struts Users Mailing List Subject: RE: Importing context with Struts At 02:53 PM 8/10/2004, you wrote: Is there a way to do that? Are all these pages being displayed at the same time? In that case all vars are probalby in request scope, if not session. Other then that... I don't think so. I do much the same thing, using tiles to tie it all together for display and have no trouble accessing anything in session or request.. never tried page scope though. If you are using tiles, then they have to be in the same class, so they have to have access to one another, right? Not class no, scope yes. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: java.net.ConnectException: Connection refused
Sounds like you may have a different classloader best to use the class loader that the DriverManangerConnectionFactory uses e.g. Class.forName(com.mysql.jdbc.Driver, true, DriverManagerConnectionFactory.class.getClassLoader()); Let me know how you make out, Martin Gainty From: Jim Barrows [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: RE: java.net.ConnectException: Connection refused Date: Tue, 10 Aug 2004 10:16:42 -0700 MIME-Version: 1.0 Received: from mail.apache.org ([209.237.227.199]) by mc12-f11.hotmail.com with Microsoft SMTPSVC(5.0.2195.6824); Tue, 10 Aug 2004 10:17:13 -0700 Received: (qmail 16184 invoked by uid 500); 10 Aug 2004 17:16:45 - Received: (qmail 16166 invoked by uid 99); 10 Aug 2004 17:16:44 - Received: from [12.34.77.106] (HELO SSSC-MAIL-2.internal.sssc.com) (12.34.77.106) by apache.org (qpsmtpd/0.27.1) with ESMTP; Tue, 10 Aug 2004 10:16:44 -0700 X-Message-Info: JGTYoYF78jHjm9i5WASZbo4Un9bGokO1 Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm Precedence: bulk List-Unsubscribe: mailto:[EMAIL PROTECTED] List-Subscribe: mailto:[EMAIL PROTECTED] List-Help: mailto:[EMAIL PROTECTED] List-Post: mailto:[EMAIL PROTECTED] List-Id: Struts Users Mailing List user.struts.apache.org Delivered-To: mailing list [EMAIL PROTECTED] X-ASF-Spam-Status: No, hits=0.0 required=10.0tests= X-Spam-Check-By: apache.org content-class: urn:content-classes:message X-MimeOLE: Produced By Microsoft Exchange V6.0.6487.1 Message-ID: [EMAIL PROTECTED] X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: java.net.ConnectException: Connection refused Thread-Index: AcR+/Raevrqm1LFhRiC9L2lugobangAAEiFg X-Virus-Checked: Checked Return-Path: [EMAIL PROTECTED] X-OriginalArrivalTime: 10 Aug 2004 17:17:13.0578 (UTC) FILETIME=[E0C0E4A0:01C47EFD] -Original Message- From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 10, 2004 10:10 AM To: Struts Users Mailing List Subject: RE: java.net.ConnectException: Connection refused This is a well known problem regarding MySQL and Linux. One of two has a screwy implementation of resolving host names. WHich one depends on who you talk to. Known solutions include using 127.0.0.1. You will also have issues with authenticating to the server if you limit mysql logins by server. I have tried 127.0.0.1, but even this does not work gives same error, can you think of any other solution... Unfortunately I'm not at home, which is where my MySQL implementation is, so I can't show you what I'm doing for another 7-8 hours :( On the other hand the MySQL folk have some great documentation and help forums that could probably help you more, if no one else has any solutions for you here. Also changed driver class name to com.mysql.jdbc.Driver, didn't work parameter nameurl/name valuejdbc:mysql://127.0.0.1:3306/prototypedb?autoReconnect=t rue/value /parameter !-- Class name for mm.mysql JDBC driver -- parameter namedriverClassName/name valueorg.gjt.mm.mysql.Driver/value /parameter -Original Message- From: Jim Barrows [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 10, 2004 12:26 PM To: Struts Users Mailing List Subject: RE: java.net.ConnectException: Connection refused -Original Message- From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 10, 2004 9:17 AM Cc: Struts Users Mailing List Subject: RE: java.net.ConnectException: Connection refused I am using Tomcat4.0, struts1.1, mysql 4.0.18 , on Linux environment. And i am unable to connect to mysql db. Below is the url i am using in server.xml file. and also i have the jdbc driver under WEB-INF/lib - mysql-connector-java-3.0.14-production-bin.jar...I was successfully able to deploy the same application on Windows, using the same server.xml file. please help. This is a well known problem regarding MySQL and Linux. One of two has a screwy implementation of resolving host names. WHich one depends on who you talk to. Known solutions include using 127.0.0.1. You will also have issues with authenticating to the server if you limit mysql logins by server. parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter parameter nameurl/name valuejdbc:mysql://localhost:3306/prototypedb?autoReconnect=t rue/value /parameter !-- Class name for mm.mysql JDBC driver -- parameter namedriverClassName/name valueorg.gjt.mm.mysql.Driver/value /parameter org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory, cause: java.sql.SQLException: Server connection failure during transaction. Due to underlying exception: 'java.net.ConnectException: Connection refused'. ** BEGIN NESTED EXCEPTION **
RE: Importing context with Struts
At 03:00 PM 8/10/2004, you wrote: Not class no, scope yes. The extension is not real? Michael - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]