how can I submit an array object in a form using struts?
I now need to submit an array object to an action, how can I achieve this using struts? you know, for a primary type value you just do like this html:form html:text property=name value=Mike/ html:submit property=submitButto value=submit/ /html:form or maybe you can submit values to a bean likethis html:form html:text property=mybean.name value=Mike/ html:submit property=submitButto value=submit/ /html:form but how to do when I want to submit an array? ThanksRegards _ MSN Hotmail http://www.hotmail.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Reporting + Struts
Hi, I am working in Actuate the Reporting tool and in J2EE also. To answer your first question we are using the struts framework for the reports also but we are not following all the rules. It depends your requirement. Mohamed Abdul Khaliq.M IT Specialist SDC2 - Chennai Ph 8272628 Ext 8098 Shyam A [EMAIL PROTECTED]To: [EMAIL PROTECTED] hoo.com cc: Subject: Reporting + Struts 03/10/2004 11:57 AM Please respond to Struts Users Mailing List Hi, I have a web application in which I need to generate reports on the fly, i.e., the user submits some report criteria on a web page and report has to be generated dynamically. I searched the archives and found that Jasper reports is a good tool to use, and there are some GUI tools available which will help in report design eg. iReports. I have a couple of questions: 1. Is it advisable to use Struts for the reporting application? Or just a JSP/Servlet based application would suffice? 2. Is there a big learning curve for using Jasper reports/IReports? I would appreciate it if somebody could share their experience in using the above mentioned tools. Thanks, Shyam __ Do you Yahoo!? Yahoo! Search - Find what you're looking for faster http://search.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] * This electronic mail message is intended solely for the named recipients and may contain confidential and proprietary business information of eFunds Corporation and all its subsidiaries. If you are not a named recipient, please notify the sender immediately. You may not disclose the contents to any other person; use this electronic mail message or its contents for any other purpose; or further store or copy its contents in any medium * - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: Reporting + Struts
Hi Mohamed! Damn, that was a cryptic post. Now you've gone and sparked my curiosity: what rules didn't you follow while snipworking in Actuate the Reporting tool and in J2EE/snip? Regards, Andreas -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Gesendet: Donnerstag, 11. März 2004 10:22 An: Struts Users Mailing List Betreff: Re: Reporting + Struts Hi, I am working in Actuate the Reporting tool and in J2EE also. To answer your first question we are using the struts framework for the reports also but we are not following all the rules. It depends your requirement. Mohamed Abdul Khaliq.M IT Specialist SDC2 - Chennai Ph 8272628 Ext 8098 Shyam A [EMAIL PROTECTED]To: [EMAIL PROTECTED] hoo.com cc: Subject: Reporting + Struts 03/10/2004 11:57 AM Please respond to Struts Users Mailing List Hi, I have a web application in which I need to generate reports on the fly, i.e., the user submits some report criteria on a web page and report has to be generated dynamically. I searched the archives and found that Jasper reports is a good tool to use, and there are some GUI tools available which will help in report design eg. iReports. I have a couple of questions: 1. Is it advisable to use Struts for the reporting application? Or just a JSP/Servlet based application would suffice? 2. Is there a big learning curve for using Jasper reports/IReports? I would appreciate it if somebody could share their experience in using the above mentioned tools. Thanks, Shyam __ Do you Yahoo!? Yahoo! Search - Find what you're looking for faster http://search.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] * This electronic mail message is intended solely for the named recipients and may contain confidential and proprietary business information of eFunds Corporation and all its subsidiaries. If you are not a named recipient, please notify the sender immediately. You may not disclose the contents to any other person; use this electronic mail message or its contents for any other purpose; or further store or copy its contents in any medium * - 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: Cannot Create Iterator
Here is the solution - HashMap hMap = (HashMap) request.getSession().setAttribute(alpha,alpha); logic:iterate id=map collection=%= hMap % Regards, Janarthan S Craig Tataryn [EMAIL PROTECTED] wrote: Try this: When you iterate a map, the elements are of type Map.Entry (http://java.sun.com/j2se/1.4.2/docs/api/java/util/Map.Entry.html) See: http://jakarta.apache.org/struts/userGuide/struts-logic.html#iterate for more details. Craig On Wed, 10 Mar 2004 17:17:15 -0300, Henrique VIECILI wrote: Hi, I have a bean in session scope wich is a HashMap of HashMap, i.e., the key's value stored is another HashMap. Ex.: HashMap alpha = new HashMap(); alpha.put(key1,new HashMap()); request.getSession().setAttribute(alpha,alpha); But, when I use : it produces an JSPException: Cannot create iterator for this collection Is that any known bug? How to correct this issue? Thanx, Henrique Viecili - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Do you Yahoo!? Yahoo! Search - Find what youre looking for faster.
Re: how can I submit an array object in a form using struts?
Take a look at the indexed properties/tags How To http://jakarta.apache.org/struts/faqs/indexedprops.html Niall - Original Message - From: Mu Mike [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, March 11, 2004 9:15 AM Subject: how can I submit an array object in a form using struts? I now need to submit an array object to an action, how can I achieve this using struts? you know, for a primary type value you just do like this html:form html:text property=name value=Mike/ html:submit property=submitButto value=submit/ /html:form or maybe you can submit values to a bean likethis html:form html:text property=mybean.name value=Mike/ html:submit property=submitButto value=submit/ /html:form but how to do when I want to submit an array? ThanksRegards _ MSN Hotmail http://www.hotmail.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]
Changing position of nested beans
I was wondering if anyone has found any slick, no javascript dependent solution to the following situation. My question in short is, is there a way of having an indexed dispatch action, or have i been on the crack again? I have a form of nested beans which are ordered according to a position stored in the model. I don't do any sorting in the web tier nor do i want to, other than rejigging the indices of some indexed properties until such a time as the user is ready to save his/her changes to the model. form name=foosForm action=/myapp/save.do input type=text name=foo[0].name input type=text name=foo[1].name input type=text name=foo[2].name /form Now when i save I'll save the index as a field called position, thus all that's fine and dandy. So lets say I want the use to define the position by having a move up and move down, but rather than using an indexed link i want to use a button. I've a lookup dispatch action with a moveup method and all that jazz. html:form action=/save.do logic:iterate id=foo name=foosForm property=foos html:text name=foo property=name indexed=true / html:submit property=method indexed=true bean:message key=button.moveup / /html:submit /logic:iterate /html:form So the rendered html would like like this form name=foosForm action=/myapp/save.do input type=text name=foo[0].nameinput type=submit name=method[0] value=Move Up //and so on /form Of course if i submit this to a lookupdispatch action, its gonna call me a crazy fool. So i need to have some means of having an indexed map key in my key method map, or something to cross the same bridge i'm trying to cross. Any ideas? I know i can do this in javascript which i will once i get things running without it, please no javascript suggestions. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: AW: Reporting + Struts
Hi, We have Servlets, Action class, Business class and JSPs (call the reports). If the call to the Report does require any validation or business then it will be routed by default. (Controller-Action-Business-Reports) If not then we will submit a direct request to report Server (Jsp-Actuate Server) like simple href. The report server is designed with MVC architecture. Hope i have answered your question. Thanks Mohamed Abdul Khaliq.M IT Specialist SDC2 - Chennai Ph 8272628 Ext 8098 * This electronic mail message is intended solely for the named recipients and may contain confidential and proprietary business information of eFunds Corporation and all its subsidiaries. If you are not a named recipient, please notify the sender immediately. You may not disclose the contents to any other person; use this electronic mail message or its contents for any other purpose; or further store or copy its contents in any medium * - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Changing position of nested beans
Why don't you use a hidden field with the index number in it. So you can use that information in your action. -Original Message- From: Mark Lowe [mailto:[EMAIL PROTECTED] Sent: donderdag 11 maart 2004 10:31 To: Struts Users Mailing List Subject: Changing position of nested beans I was wondering if anyone has found any slick, no javascript dependent solution to the following situation. My question in short is, is there a way of having an indexed dispatch action, or have i been on the crack again? I have a form of nested beans which are ordered according to a position stored in the model. I don't do any sorting in the web tier nor do i want to, other than rejigging the indices of some indexed properties until such a time as the user is ready to save his/her changes to the model. form name=foosForm action=/myapp/save.do input type=text name=foo[0].name input type=text name=foo[1].name input type=text name=foo[2].name /form Now when i save I'll save the index as a field called position, thus all that's fine and dandy. So lets say I want the use to define the position by having a move up and move down, but rather than using an indexed link i want to use a button. I've a lookup dispatch action with a moveup method and all that jazz. html:form action=/save.do logic:iterate id=foo name=foosForm property=foos html:text name=foo property=name indexed=true / html:submit property=method indexed=true bean:message key=button.moveup / /html:submit /logic:iterate /html:form So the rendered html would like like this form name=foosForm action=/myapp/save.do input type=text name=foo[0].nameinput type=submit name=method[0] value=Move Up //and so on /form Of course if i submit this to a lookupdispatch action, its gonna call me a crazy fool. So i need to have some means of having an indexed map key in my key method map, or something to cross the same bridge i'm trying to cross. Any ideas? I know i can do this in javascript which i will once i get things running without it, please no javascript suggestions. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] STRICTLY PERSONAL AND CONFIDENTIAL This message may contain confidential and proprietary material for the sole use of the intended recipient. Any review or distribution by others is strictly prohibited. If you are not the intended recipient please contact the sender and delete all copies. Ce Message est uniquement destiné aux destinataires indiqués et peut contenir des informations confidentielles. Si vous n'êtes pas le destinataire, vous ne devez pas révéler le contenu de ce message ou en prendre copie. Si vous avez reçu ce message par erreur, veuillez en informer l'expéditeur, ou La Poste immédiatement, avant de le supprimer. Dit bericht is enkel bestemd voor de aangeduide ontvangers en kan vertrouwelijke informatie bevatten. Als u niet de ontvanger bent, dan mag u de inhoud van dit bericht niet bekendmaken noch kopiëren. Als u dit bericht per vergissing heeft ontvangen, gelieve er de afzender of De Post onmiddellijk van op de hoogte te brengen en het bericht vervolgens te verwijderen.
Re: a security framework!
I would start by looking at Tiles - you can associate roles using tiles. If you are using XML configuration, you can associate a role with a definition definition name=my.tile.definition path= role=myRole /definition Also the tiles tags tiles:insert page=.. role=... tiles:definition template=.. role=... tiles:put name=.. value= role=... tiles:add value=.. role=... tiles:get value=.. role=... To find out more about tiles: http://jakarta.apache.org/struts/userGuide/dev_tiles.html http://www.lifl.fr/~dumoulin/tiles/tilesAdvancedFeatures.pdf Also there is a tiles-documentation.war shipped with struts Niall - Original Message - From: Mailing List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, March 11, 2004 4:16 AM Subject: a security framework! Hi, I'm developing a web application with struts framework.I want to design some jsp pages that support security at pages level.The security that I want to be supported is that some components of each page can be shown for certain user.I mean that for each user deponds on his access to the system we can show some components of each page and does'nt show other components.Each user deponds on his type and access at the system just can see his own pages.can you offer a good framework for this goal that be compatible with struts framework. Regards - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Changing position of nested beans
Can you elaborate? I'd have several indexed properties in my form, how would i know which to extract? On 11 Mar 2004, at 10:43, VAN BROECK Jimmy wrote: Why don't you use a hidden field with the index number in it. So you can use that information in your action. -Original Message- From: Mark Lowe [mailto:[EMAIL PROTECTED] Sent: donderdag 11 maart 2004 10:31 To: Struts Users Mailing List Subject: Changing position of nested beans I was wondering if anyone has found any slick, no javascript dependent solution to the following situation. My question in short is, is there a way of having an indexed dispatch action, or have i been on the crack again? I have a form of nested beans which are ordered according to a position stored in the model. I don't do any sorting in the web tier nor do i want to, other than rejigging the indices of some indexed properties until such a time as the user is ready to save his/her changes to the model. form name=foosForm action=/myapp/save.do input type=text name=foo[0].name input type=text name=foo[1].name input type=text name=foo[2].name /form Now when i save I'll save the index as a field called position, thus all that's fine and dandy. So lets say I want the use to define the position by having a move up and move down, but rather than using an indexed link i want to use a button. I've a lookup dispatch action with a moveup method and all that jazz. html:form action=/save.do logic:iterate id=foo name=foosForm property=foos html:text name=foo property=name indexed=true / html:submit property=method indexed=true bean:message key=button.moveup / /html:submit /logic:iterate /html:form So the rendered html would like like this form name=foosForm action=/myapp/save.do input type=text name=foo[0].nameinput type=submit name=method[0] value=Move Up //and so on /form Of course if i submit this to a lookupdispatch action, its gonna call me a crazy fool. So i need to have some means of having an indexed map key in my key method map, or something to cross the same bridge i'm trying to cross. Any ideas? I know i can do this in javascript which i will once i get things running without it, please no javascript suggestions. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] STRICTLY PERSONAL AND CONFIDENTIAL This message may contain confidential and proprietary material for the sole use of the intended recipient. Any review or distribution by others is strictly prohibited. If you are not the intended recipient please contact the sender and delete all copies. Ce Message est uniquement destiné aux destinataires indiqués et peut contenir des informations confidentielles. Si vous n'êtes pas le destinataire, vous ne devez pas révéler le contenu de ce message ou en prendre copie. Si vous avez reçu ce message par erreur, veuillez en informer l'expéditeur, ou La Poste immédiatement, avant de le supprimer. Dit bericht is enkel bestemd voor de aangeduide ontvangers en kan vertrouwelijke informatie bevatten. Als u niet de ontvanger bent, dan mag u de inhoud van dit bericht niet bekendmaken noch kopiëren. Als u dit bericht per vergissing heeft ontvangen, gelieve er de afzender of De Post onmiddellijk van op de hoogte te brengen en het bericht vervolgens te verwijderen. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
help about struts
Hi , I want to work with struts. But i dont know where will I start first? What I need for working with struts? Where should I start first? Can I work struts on Resin , or only Tomcat? Which files needed to work struts.? Please help me ? Erol Tezcan - Do you Yahoo!? Yahoo! Search - Find what youre looking for faster.
RE: help about struts
This is where I started: Read Struts In Action (Published by Manning) book. http://www.manning.com/husted/index.html Resources: http://jakarta.apache.org/struts/ http://jakarta.apache.org/index.html -Original Message- From: EROL TEZCAN [mailto:[EMAIL PROTECTED] Sent: 11 March 2004 10:11 To: [EMAIL PROTECTED] Subject: help about struts Hi , I want to work with struts. But i dont know where will I start first? What I need for working with struts? Where should I start first? Can I work struts on Resin , or only Tomcat? Which files needed to work struts.? Please help me ? Erol Tezcan - Do you Yahoo!? Yahoo! Search - Find what youre looking for faster. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: help about struts
Hi Erol, I suppose you have already visited http://jakarta.apache.org/struts/learning.html, so I'll tell you how I started. First I installed tomcat, then I deployed the example application (by putting the .war file in the webapps directory of tomcat). After clicking around a little I started to look at how the struts-config.xml glues together all the files related to a struts powered front-end. Finally, I actually looked at and started modifying source code in my favourite java IDE. Ragards, Andreas -Ursprungliche Nachricht- Von: EROL TEZCAN [mailto:[EMAIL PROTECTED] Gesendet: Donnerstag, 11. Marz 2004 11:11 An: [EMAIL PROTECTED] Betreff: help about struts Hi , I want to work with struts. But i dont know where will I start first? What I need for working with struts? Where should I start first? Can I work struts on Resin , or only Tomcat? Which files needed to work struts.? Please help me ? Erol Tezcan - Do you Yahoo!? Yahoo! Search - Find what youre looking for faster. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to set the selected value in an select rendered by optionsCollection
Hi Hubert, This would only be true if the action that was called specified that form in its mapping. If this is a preprocessing action (that's being called to provide an HTML form with data to show), and there's no name attribute to tie a form to it, Struts will not create/populate a form (because it wouldn't know what form to create). Sorry, but i guess you are wrong. The declared formBeans are digested during ActionServlets.init(). If you have a tool that is able to visualize your Java Objects like the 'variables' view in Eclipse, you will see the following right after applications startup, when setting a breakpoint in any action: mapping/moduleConfig/formBeans which is a HashMap. All your declared beans are right there. Does anyone know the right way to access this HashMap ? Anyway, we became very far away from my optionsCollection problem. I´ll try to repost it trying to be a little more specific. CU - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Newbie needs help: Validator not working with Struts/Velocity
You say No errors are appearing in either the catalina.out or localhost log file - I don't think validator logs anything to those places and saying that makes me think what are you expecting to happen when validation fails. The normal course of events when validation fails is struts saves an ActionErrors object in the request under a certain key (org.apache.struts.action.ERROR) and forwards to the input parameter defined for your action. If you were using jsps you would then probably use the html:errors tag which processes the stored ActionErrors and displays the error messages to the user - I don't know velocity but presumably you could do something similar. Looking at your struts-config.xml, its your /Processing action which you are expecting to validate - its input attribute is /Payment.do - this action forwards to your velocity stuff /payment.vm - is there anything in /payment.vm which displays the ActionErrors? To be honest your action looks to be configured the wrong way round, I would have expected: action path=/Processing type=org.apache.struts.actions.ForwardAction name=paymentForm input=/processing.vm validate=true parameter=/Payment.do/ How about setting up a validation errors page in velocity and changing your input parameter - that way if you get an validation error you should see a different page. Something like... action path=/Processing type=org.apache.struts.actions.ForwardAction name=paymentForm input=/paymentErrors.vm validate=true parameter=/Payment.do/ Niall - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, March 10, 2004 5:54 PM Subject: Newbie needs help: Validator not working with Struts/Velocity I'm fairly new to Struts, and have been trying to get my simple application to work - using Struts 1.1, Velocity 1.3.1, Velocity Tools 1.1-rc1, and Tomcat 4.1.29. The application (such as it is) works as far as presentation and workflow - but _isn't_ working is the Validator framework. I've spent the last day mining the web for help and haven't been able to progress at all... The validator files _are_ being loaded - I see them in the log files. And the rules/formset are being parsed - again, I see it in the log. However, when the form is submitted on the first page (payment.vm) and it goes to the second...no validation takes place. No errors are appearing in either the catalina.out or localhost log file. I have kicked up the log level to trace and still see nothing wrong - other than the validation doesn't seem to happen. Any help or suggestions would be GREATLY appreciated - I'm rather stuck at the moment. I'm sure its just some silly configuration or other error... I'm including all the relevant files inline below. Thank you very much Andy Akins == web.xml ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.2//EN http://java.sun.com/j2ee/dtds/web-app_2_2.dtd; web-app display-nameCCPAY/display-name servlet servlet-nameaction/servlet-name servlet-classorg.apache.struts.action.ActionServlet/servlet-class init-param param-nameconfig/param-name param-value/WEB-INF/struts-config.xml/param-value /init-param init-param param-namedebug/param-name param-value2/param-value /init-param init-param param-namedetail/param-name param-value2/param-value /init-param init-param param-namevalidate/param-name param-valuetrue/param-value /init-param load-on-startup2/load-on-startup /servlet servlet servlet-namevelocity/servlet-name servlet-classorg.apache.velocity.tools.view.servlet.VelocityViewServlet/s ervlet-class init-param param-nameorg.apache.velocity.toolbox/param-name param-value/WEB-INF/toolbox.xml/param-value /init-param init-param param-nameorg.apache.velocity.properties/param-name param-value/WEB-INF/velocity.properties/param-value /init-param load-on-startup10/load-on-startup /servlet servlet-mapping servlet-nameaction/servlet-name url-pattern*.do/url-pattern /servlet-mapping servlet-mapping servlet-namevelocity/servlet-name url-pattern*.vm/url-pattern /servlet-mapping welcome-file-list welcome-fileindex.html/welcome-file /welcome-file-list /web-app = struts-config.xml ?xml version=1.0 encoding=ISO-8859-1 ? !DOCTYPE struts-config PUBLIC -//Apache Software Foundation//DTD Struts Configuration 1.1//EN http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd; struts-config form-beans form-bean name=paymentForm type=org.apache.struts.validator.DynaValidatorForm form-property name=amount type=java.lang.String initial=boo / /form-bean /form-beans action-mappings action path=/Payment type=org.apache.struts.actions.ForwardAction name=paymentForm validate=false
Re: AW: help about struts
Hi Andreas, I looked this site and others but didnt analyze them detailed. Can I work on Resin? First you installed tomcat. Secondly you put .war file in the webapps directory of tomcat. (which war file?) If you have a free time, please tell me setup step by step Thanks. Erol Andreas Solarik [EMAIL PROTECTED] wrote:Hi Erol, I suppose you have already visited http://jakarta.apache.org/struts/learning.html, so I'll tell you how I started. First I installed tomcat, then I deployed the example application (by putting the .war file in the webapps directory of tomcat). After clicking around a little I started to look at how the struts-config.xml glues together all the files related to a struts powered front-end. Finally, I actually looked at and started modifying source code in my favourite java IDE. Ragards, Andreas -Ursprungliche Nachricht- Von: EROL TEZCAN [mailto:[EMAIL PROTECTED] Gesendet: Donnerstag, 11. Marz 2004 11:11 An: [EMAIL PROTECTED] Betreff: help about struts Hi , I want to work with struts. But i dont know where will I start first? What I need for working with struts? Where should I start first? Can I work struts on Resin , or only Tomcat? Which files needed to work struts.? Please help me ? Erol Tezcan - Do you Yahoo!? Yahoo! Search - Find what youre looking for faster. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Do you Yahoo!? Yahoo! Search - Find what youre looking for faster.
Q: How to submit form in pop-up window and forward parent results page?
Hi all. (Caveat: this might actually turn out to be a Javascript question): I would appreciate any help or even alternatives to what I'm trying to achieve below:- Here's a rough sequence of what I'm trying to achieve... (1) My app has a page displaying an item link. (2) When the user clicks on the link a pop-up browser window appears with a form containing all the details about that item. (3) After modifying the item's details the user clicks on the form Submit button. (4) The Submit action saves the changes to the database. (5) The pop-up windows closes. (6) The original, parent page 'refreshes' to reflect the changes the user made in the pop-up windows (e.g. changing the name of the item under the link). I can get as far as step (4) using Struts and Javascript handlers. Here's how my parent pops-up the item editing window: -- % String link = javascript:popUp('+ request.getContextPath()+ /editItem.do?action=edititem=+ itemID + ');; % . . . tdhtml:link href=javascript:; onclick=%=link% c:out value=Edit Item//html:link /td -- Here's the form element of my pop-up: -- % String submitScript = form.submit(); opener.location='+ request.getContextPath()+ /showItemDetails.do';+ self.close();; % . . . html:form action=/saveItem onsubmit=%=submitScript% -- So I'm submitting the form, telling the parent to forward to the results page ('/showItemDetails.do') and closing the pop-up. But it doesn't work that way:-( The submission works fine; the data is written to the DB. But the pop-up browser window doesn't close and the parent isn't forwarded to the results page. So I guess once a form is submitted the rest of the Javascript just 'disappears' and isn't executed? Any help out there..? Many thanks in advance! -- bOOyah - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: AW: help about struts
Erol, I've never actually used resin - so I can't help you with that one. .war files (in the perfect world) contain all code needed to deploy a web application on an application server like tomcat. You can do this on tomcat by copying the .war file into tomcats webapps directory and restarting tomcat. After this, you should see a directory with the same name as the .war file - containing all sources. Furthermore, the .war takes care of modifying the configuration files for you :) the download for struts is at http://jakarta.apache.org/site/binindex.cgi, you need to find it in the list. The example application is included in the struts distribution .zip file (if you're a windows user) at /webapps/struts-example.war The struts distribution also contains lots of documentation and some howto information. good luck, Andreas -Ursprungliche Nachricht- Von: EROL TEZCAN [mailto:[EMAIL PROTECTED] Gesendet: Donnerstag, 11. Marz 2004 11:49 An: Struts Users Mailing List Betreff: Re: AW: help about struts Hi Andreas, I looked this site and others but didnt analyze them detailed. Can I work on Resin? First you installed tomcat. Secondly you put .war file in the webapps directory of tomcat. (which war file?) If you have a free time, please tell me setup step by step Thanks. Erol Andreas Solarik [EMAIL PROTECTED] wrote:Hi Erol, I suppose you have already visited http://jakarta.apache.org/struts/learning.html, so I'll tell you how I started. First I installed tomcat, then I deployed the example application (by putting the .war file in the webapps directory of tomcat). After clicking around a little I started to look at how the struts-config.xml glues together all the files related to a struts powered front-end. Finally, I actually looked at and started modifying source code in my favourite java IDE. Ragards, Andreas -Ursprungliche Nachricht- Von: EROL TEZCAN [mailto:[EMAIL PROTECTED] Gesendet: Donnerstag, 11. Marz 2004 11:11 An: [EMAIL PROTECTED] Betreff: help about struts Hi , I want to work with struts. But i dont know where will I start first? What I need for working with struts? Where should I start first? Can I work struts on Resin , or only Tomcat? Which files needed to work struts.? Please help me ? Erol Tezcan - Do you Yahoo!? Yahoo! Search - Find what youre looking for faster. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Do you Yahoo!? Yahoo! Search - Find what youre looking for faster. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How to submit form in pop-up window and forward parent results page?
The javascript for the submit in the popup window could be something like this opener.parent.document.forms[0].action=Action.do; opener.parent.document.forms[0].submit(); Anirudh Jayanth SysArris Software 120A, Elephant Rock Road, 3rd Block, Jayanagar, Bangalore - 560011 Tel: 6655165 / 052 [ ext - 244 ] [EMAIL PROTECTED] -Original Message- From: news [mailto:[EMAIL PROTECTED] On Behalf Of bOOyah Sent: Thursday, March 11, 2004 4:13 PM To: [EMAIL PROTECTED] Subject: Q: How to submit form in pop-up window and forward parent results page? Hi all. (Caveat: this might actually turn out to be a Javascript question): I would appreciate any help or even alternatives to what I'm trying to achieve below:- Here's a rough sequence of what I'm trying to achieve... (1) My app has a page displaying an item link. (2) When the user clicks on the link a pop-up browser window appears with a form containing all the details about that item. (3) After modifying the item's details the user clicks on the form Submit button. (4) The Submit action saves the changes to the database. (5) The pop-up windows closes. (6) The original, parent page 'refreshes' to reflect the changes the user made in the pop-up windows (e.g. changing the name of the item under the link). I can get as far as step (4) using Struts and Javascript handlers. Here's how my parent pops-up the item editing window: -- % String link = javascript:popUp('+ request.getContextPath()+ /editItem.do?action=edititem=+ itemID + ');; % . . . tdhtml:link href=javascript:; onclick=%=link% c:out value=Edit Item//html:link /td -- Here's the form element of my pop-up: -- % String submitScript = form.submit(); opener.location='+ request.getContextPath()+ /showItemDetails.do';+ self.close();; % . . . html:form action=/saveItem onsubmit=%=submitScript% -- So I'm submitting the form, telling the parent to forward to the results page ('/showItemDetails.do') and closing the pop-up. But it doesn't work that way:-( The submission works fine; the data is written to the DB. But the pop-up browser window doesn't close and the parent isn't forwarded to the results page. So I guess once a form is submitted the rest of the Javascript just 'disappears' and isn't executed? Any help out there..? Many thanks in advance! -- bOOyah - 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]
Struts-Validation and Property file
Hi, I am using Struts validator in my application. I have defined a properties file that has all the error messages for my application. I have mapped this file in my struts-config.xml file. I have created a new rule specific for my application. I have mapped this in my validation-rules.xml. Now, in my validation-rules.xml file, i want to specify the 'msg' parameter of the validator tag. I want Struts to read this ('msg' parameter value) from the properties file that i have created(the one that contains errors messages with key's mapped to them) Please advice me on how do achieve this ? Regards, Janarthan S - Do you Yahoo!? Yahoo! Search - Find what youre looking for faster.
Re: Changing position of nested beans
Mark, Seems to me you have already worked out the solution, except why do you need a lookup dispatch action - rather than a roll your own - you have two methods right - Move Up and Move Down? Your jsp will populate a (foo?) List with either Move Up or Move Down (depending on the button pressed) in the appropriate index position - so you loop through them until you find a none null entry and call the appropriate method depending on the value with the index position you're at. trying to use look up dispatch action seems to be overly complicating things to me. Niall - Original Message - From: Mark Lowe [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Thursday, March 11, 2004 9:31 AM Subject: Changing position of nested beans I was wondering if anyone has found any slick, no javascript dependent solution to the following situation. My question in short is, is there a way of having an indexed dispatch action, or have i been on the crack again? I have a form of nested beans which are ordered according to a position stored in the model. I don't do any sorting in the web tier nor do i want to, other than rejigging the indices of some indexed properties until such a time as the user is ready to save his/her changes to the model. form name=foosForm action=/myapp/save.do input type=text name=foo[0].name input type=text name=foo[1].name input type=text name=foo[2].name /form Now when i save I'll save the index as a field called position, thus all that's fine and dandy. So lets say I want the use to define the position by having a move up and move down, but rather than using an indexed link i want to use a button. I've a lookup dispatch action with a moveup method and all that jazz. html:form action=/save.do logic:iterate id=foo name=foosForm property=foos html:text name=foo property=name indexed=true / html:submit property=method indexed=true bean:message key=button.moveup / /html:submit /logic:iterate /html:form So the rendered html would like like this form name=foosForm action=/myapp/save.do input type=text name=foo[0].nameinput type=submit name=method[0] value=Move Up //and so on /form Of course if i submit this to a lookupdispatch action, its gonna call me a crazy fool. So i need to have some means of having an indexed map key in my key method map, or something to cross the same bridge i'm trying to cross. Any ideas? I know i can do this in javascript which i will once i get things running without it, please no javascript suggestions. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts-Validation and Property file
So in your validation-rules.xml you have something like... validator name=myValidatorRule classname=myPackage.MyValidator method=validateMyRule methodParams=java.lang.Object, org.apache.commons.validator.ValidatorAction, org.apache.commons.validator.Field, org.apache.struts.action.ActionErrors, javax.servlet.http.HttpServletRequest depends= msg=errors.myRule /validator In your properties file you define errors.myRule In your MyValidator class you have something like public static boolean validateMyRule(Object bean, ValidatorAction va, ActionErrors errors, HttpServletRequest request) { boolean invalid = /validation check if (invalid) { errors.add(field.getKey(), Resources.getActionError(request, va, field)); } } - Original Message - From: Janarthan Sathiamurthy [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, March 11, 2004 11:15 AM Subject: Struts-Validation and Property file Hi, I am using Struts validator in my application. I have defined a properties file that has all the error messages for my application. I have mapped this file in my struts-config.xml file. I have created a new rule specific for my application. I have mapped this in my validation-rules.xml. Now, in my validation-rules.xml file, i want to specify the 'msg' parameter of the validator tag. I want Struts to read this ('msg' parameter value) from the properties file that i have created(the one that contains errors messages with key's mapped to them) Please advice me on how do achieve this ? Regards, Janarthan S - Do you Yahoo!? Yahoo! Search - Find what you're looking for faster. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
problems with html:base/
Hi List! I'm trying to get started with struts (1.1) step by step. I had a working frameset made from *.JSPs in Tomcat 3.23 (The JSPs don't actually do anything at this stage, they're like static html). Then I inserted the html:base/ tag in one of the JSPs, together with the %@ taglib uri=/tags/struts-bean prefix=bean % %@ taglib uri=/tags/struts-html prefix=html % %@ taglib uri=/tags/struts-logic prefix=logic % At first, my web.xml only had the taglib taglib-uri/tags/struts-bean/taglib-uri taglib-location/WEB-INF/struts-bean.tld/taglib-location /taglib taglib taglib-uri/tags/struts-html/taglib-uri taglib-location/WEB-INF/struts-html.tld/taglib-location /taglib taglib taglib-uri/tags/struts-logic/taglib-uri taglib-location/WEB-INF/struts-logic.tld/taglib-location /taglib When that didn't work, I figured the actionServlet must probably be required and added servlet servlet-nameaction/servlet-name servlet-classorg.apache.struts.action.ActionServlet/servlet-class init-param param-nameconfig/param-name param-value/WEB-INF/struts-config.xml/param-value /init-param load-on-startup1/load-on-startup /servlet servlet-mapping servlet-nameaction/servlet-name url-pattern/do/*/url-pattern /servlet-mapping The struts-config.xml is where it should be, but pretty empty, like this: ?xml version=1.0 encoding=ISO-8859-1 ? !DOCTYPE struts-config PUBLIC -//Apache Software Foundation//DTD Struts Configuration 1.0//EN http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd; struts-config /struts-config The Struts 1.1 libs , taglibs, and dtds are all where they should be, AFAIK . I figured, as at this stage I'm only using STRUTS in the one tag above, and not actually invoking the ActionServlet, the app should work without setting up any ActionForwards and so on. Is that correct? When Tomcat is started up, this is what happens: 11-Mar-2004 11:24:39 org.apache.struts.util.MessageResourcesFactory createFactory SEVERE: MessageResourcesFactory.createFactory java.lang.ClassNotFoundException: org.apache.struts.util.PropertyMessageResourcesFactory at java.net.URLClassLoader$1.run(URLClassLoader.java:199) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:187) at java.lang.ClassLoader.loadClass(ClassLoader.java:289) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274) at java.lang.ClassLoader.loadClass(ClassLoader.java:235) at org.apache.struts.util.RequestUtils.applicationClass(RequestUtils.java:207) at org.apache.struts.util.MessageResourcesFactory.createFactory(MessageResourcesFactory.java:192) at org.apache.struts.util.MessageResources.getMessageResources(MessageResources.java:576) at org.apache.struts.util.RequestUtils.clinit(RequestUtils.java:134) at org.apache.struts.util.MessageResourcesFactory.createFactory(MessageResourcesFactory.java:192) at org.apache.struts.util.MessageResources.getMessageResources(MessageResources.java:576) at org.apache.struts.action.ActionServlet.initInternal(ActionServlet.java:1329) at org.apache.struts.action.ActionServlet.init(ActionServlet.java:464) at javax.servlet.GenericServlet.init(GenericServlet.java:258) at org.apache.tomcat.core.ServletWrapper.doInit(ServletWrapper.java:317) at org.apache.tomcat.core.Handler.init(Handler.java:215) at org.apache.tomcat.core.ServletWrapper.init(ServletWrapper.java:296) at org.apache.tomcat.context.LoadOnStartupInterceptor.contextInit(LoadOnStartupInterceptor.java:130) at org.apache.tomcat.core.ContextManager.initContext(ContextManager.java:491) at org.apache.tomcat.core.ContextManager.init(ContextManager.java:453) at org.apache.tomcat.startup.Tomcat.execute(Tomcat.java:195) at org.apache.tomcat.startup.Tomcat.main(Tomcat.java:235) 11-Mar-2004 11:24:39 org.apache.struts.util.MessageResourcesFactory createFactory SEVERE: MessageResourcesFactory.createFactory java.lang.ExceptionInInitializerError at org.apache.struts.util.MessageResourcesFactory.createFactory(MessageResourcesFactory.java:192) at org.apache.struts.util.MessageResources.getMessageResources(MessageResources.java:576) at org.apache.struts.action.ActionServlet.initInternal(ActionServlet.java:1329) at org.apache.struts.action.ActionServlet.init(ActionServlet.java:464) at javax.servlet.GenericServlet.init(GenericServlet.java:258) at org.apache.tomcat.core.ServletWrapper.doInit(ServletWrapper.java:317) at org.apache.tomcat.core.Handler.init(Handler.java:215) at org.apache.tomcat.core.ServletWrapper.init(ServletWrapper.java:296) at org.apache.tomcat.context.LoadOnStartupInterceptor.contextInit(LoadOnStartupInterceptor.java:130) at
rePost: How to set the selected value in an select rendered by optionsCollection
Hi all, i´m reposting my problem trying to be a little bit more specific. This problem is very important for me, though i made another 'book like' example to show where i am. There are three beans playing in my theatre: 1. the CommonValuesBean which stores frequently asked data for my JSP HTMLForms 2. the CustomerBean which is an buisiness objekt representing a customer 3. the DynaForm which stores data coming from my JSP HTMLForms. First of all, the CommonValuesBean is initialised. Therefore, i´ve got the sessionListener that puts data in it, anytime a new session is creatd: public void sessionCreated(HttpSessionEvent event) { CommonValuesBean commonValuesBean = new CommonValuesBean(); // create new bean instance HashMap countries = new HashMap(); // Create new map countries.put(countryCode1,country1) countries.put(countryCode2,country2) countries.put(countryCode3,country3) countries.setCountries(countries); // Our example map is now stored HttpSession session = event.getSession(); session.setAttribute(commonValuesBean,CommonValuesBean); } Now we begin to deal with the customers. There is listCustomers Action that shows all of the customers. You can klick one to get more detailed information using the customersDetailsAction: public class customersDetailsAction extends Action { private Customer customer = new Customer(); public ActionForward execute(ActionMapping mapping,ActionForm form,HttpServletRequest req,HttpServletResponse res) throws IOException, ServletException { customer.setFirstName(Frank); customer.setLastName(Schaare); customer.setCountry(country2); req.setAttribute(customer,customer); // storing customer in request return mapping.findForward(customerShowDetails); // mapped to customerShowDetails.jsp } } The customerShowDetails.jsp looks like this: html:form action=/BenutzerBearbeitungSubmit . . tons of markup . html:select property=country size=1 html:optionsCollection name=commonValuesBean property=countries label=value value=key/ /html:select . . again: tons of markup . /html:form The problem is, that the html:optionsCollection renders a select like this: select name=country option value=countryCode1country1/option option value=countryCode2country2/option option value=countryCode3country3/option /select i desperately NEED to render the select like this: select name=country option value=countryCode1country1/option option selected value=countryCode2country2/option option value=countryCode3country3/option /select because my customer lives in country2 ! Is there any way to tell Struts to do this ? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Changing position of nested beans
The only reason why dispatch action appeals is that i can map the form to one action and have several buttons within a form without needing to change to form action with javascript or anything grotty like that. I'm not especially keen dispatch actions . Just this business of using links and the request being cleared leaves me scoping to session and using a link, again i'm not that against scoping to session but I thought someone in the anti httpsession brigade would have a solution for this common problem. I don't think I'm tree-barking but ruminating on dispatch action (although i'm not certain). I'm trying various ways and seeing what happens. But indexed handler parameters seem like the sort of thing that would be required to do such a thing, but seem to be more the consequence of a crack induced state of derangement than something that struts supports. On 11 Mar 2004, at 12:19, Niall Pemberton wrote: Mark, Seems to me you have already worked out the solution, except why do you need a lookup dispatch action - rather than a roll your own - you have two methods right - Move Up and Move Down? Your jsp will populate a (foo?) List with either Move Up or Move Down (depending on the button pressed) in the appropriate index position - so you loop through them until you find a none null entry and call the appropriate method depending on the value with the index position you're at. trying to use look up dispatch action seems to be overly complicating things to me. Niall - Original Message - From: Mark Lowe [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Thursday, March 11, 2004 9:31 AM Subject: Changing position of nested beans I was wondering if anyone has found any slick, no javascript dependent solution to the following situation. My question in short is, is there a way of having an indexed dispatch action, or have i been on the crack again? I have a form of nested beans which are ordered according to a position stored in the model. I don't do any sorting in the web tier nor do i want to, other than rejigging the indices of some indexed properties until such a time as the user is ready to save his/her changes to the model. form name=foosForm action=/myapp/save.do input type=text name=foo[0].name input type=text name=foo[1].name input type=text name=foo[2].name /form Now when i save I'll save the index as a field called position, thus all that's fine and dandy. So lets say I want the use to define the position by having a move up and move down, but rather than using an indexed link i want to use a button. I've a lookup dispatch action with a moveup method and all that jazz. html:form action=/save.do logic:iterate id=foo name=foosForm property=foos html:text name=foo property=name indexed=true / html:submit property=method indexed=true bean:message key=button.moveup / /html:submit /logic:iterate /html:form So the rendered html would like like this form name=foosForm action=/myapp/save.do input type=text name=foo[0].nameinput type=submit name=method[0] value=Move Up //and so on /form Of course if i submit this to a lookupdispatch action, its gonna call me a crazy fool. So i need to have some means of having an indexed map key in my key method map, or something to cross the same bridge i'm trying to cross. Any ideas? I know i can do this in javascript which i will once i get things running without it, please no javascript suggestions. - 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]
html:link with javascript variable
Hi everyone I am having trouble with a jsp when using a javascript variable in a 'html:link page=' tag. The variable does not seem expand to its value. When my jsp is compiled, the code snippet below bean:define id=procBranch type=java.lang.String property=mendstatbrCde name=APSB/ html:link page=/BranchDetailPage.do?enquiryBranch=%=procBranch% bean:write name=APSB property=mendstatbrCde/ /html:link becomes a href=/central/BranchDetailPage.do?enquiryBranch=%=procBranch%2007 /a instead of a href=/central/BranchDetailPage.do?enquiryBranch=20072007 /a assuming that mendstatbrCde is equal to 2007 for this example. Does anyone know what I could do to get around this? I'm using Struts 1.1 . -- Stuart Logie Programmer UNIVERSAL COMPUTER SERVICES (PTY) LTD A member of South Africa's largest retail software vendor, the UCS Group Tel : (011) 712 1371 Cell : 082 902 5632 Fax : (011) 339 3421 Internet : http://ucs.co.za I am the Unconquerable Spirit. -- Poet Unknown Powered by Debian GNU/Linux - testing/unstable pgp0.pgp Description: PGP signature
Re: rePost: How to set the selected value in an select rendered by optionsCollection
Its the name/property specified on the html:select tag that causes OptionsCollection to set selected - in your case the select tag needs to look at he country property of the customer bean - if optionsCollection finds a value that matches that, it will set selected. html:select name=customer property=country html:optionsCollection ./ /select Niall - Original Message - From: Frank Schaare [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Thursday, March 11, 2004 11:49 AM Subject: rePost: How to set the selected value in an select rendered by optionsCollection Hi all, i´m reposting my problem trying to be a little bit more specific. This problem is very important for me, though i made another 'book like' example to show where i am. There are three beans playing in my theatre: 1. the CommonValuesBean which stores frequently asked data for my JSP HTMLForms 2. the CustomerBean which is an buisiness objekt representing a customer 3. the DynaForm which stores data coming from my JSP HTMLForms. First of all, the CommonValuesBean is initialised. Therefore, i´ve got the sessionListener that puts data in it, anytime a new session is creatd: public void sessionCreated(HttpSessionEvent event) { CommonValuesBean commonValuesBean = new CommonValuesBean(); // create new bean instance HashMap countries = new HashMap(); // Create new map countries.put(countryCode1,country1) countries.put(countryCode2,country2) countries.put(countryCode3,country3) countries.setCountries(countries); // Our example map is now stored HttpSession session = event.getSession(); session.setAttribute(commonValuesBean,CommonValuesBean); } Now we begin to deal with the customers. There is listCustomers Action that shows all of the customers. You can klick one to get more detailed information using the customersDetailsAction: public class customersDetailsAction extends Action { private Customer customer = new Customer(); public ActionForward execute(ActionMapping mapping,ActionForm form,HttpServletRequest req,HttpServletResponse res) throws IOException, ServletException { customer.setFirstName(Frank); customer.setLastName(Schaare); customer.setCountry(country2); req.setAttribute(customer,customer); // storing customer in request return mapping.findForward(customerShowDetails); // mapped to customerShowDetails.jsp } } The customerShowDetails.jsp looks like this: html:form action=/BenutzerBearbeitungSubmit . . tons of markup . html:select property=country size=1 html:optionsCollection name=commonValuesBean property=countries label=value value=key/ /html:select . . again: tons of markup . /html:form The problem is, that the html:optionsCollection renders a select like this: select name=country option value=countryCode1country1/option option value=countryCode2country2/option option value=countryCode3country3/option /select i desperately NEED to render the select like this: select name=country option value=countryCode1country1/option option selected value=countryCode2country2/option option value=countryCode3country3/option /select because my customer lives in country2 ! Is there any way to tell Struts to do this ? - 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: problems with html:base/
Hello, Lukas: Here's a simple script that can be helpful in these situations: +++ for jar in `ls *jar` do echo checking $jar... jar tvf $jar | grep org.apache.struts.util.PropertyMessageResourcesFactory done +++ When I checked WEB-INF\lib under a struts-based web application on my system, it produced the following output: # checking commons-beanutils.jar... checking commons-collections.jar... checking commons-digester.jar... checking commons-fileupload.jar... checking commons-lang.jar... checking commons-logging.jar... checking commons-validator.jar... checking jakarta-oro.jar... checking struts.jar... 749 Sun Jun 29 21:46:38 PDT 2003 org/apache/struts/util/PropertyMessageResourcesFactory.class # Perhaps you are missing struts.jar? btw: if you are on Windows, you can download either Cygwin or uwin (if you prefer ksh) Cordially, Oswald Lukas Latz [EMAIL PROTECTED] wrote: Hi List! I'm trying to get started with struts (1.1) step by step. I had a working frameset made from *.JSPs in Tomcat 3.23 (The JSPs don't actually do anything at this stage, they're like static html). Then I inserted the tag in one of the JSPs, together with the At first, my web.xml only had the /tags/struts-bean /WEB-INF/struts-bean.tld /tags/struts-html /WEB-INF/struts-html.tld /tags/struts-logic /WEB-INF/struts-logic.tld When that didn't work, I figured the actionServlet must probably be required and added action org.apache.struts.action.ActionServlet config /WEB-INF/struts-config.xml 1 action /do/* The struts-config.xml is where it should be, but pretty empty, like this: http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd; The Struts 1.1 libs , taglibs, and dtds are all where they should be, AFAIK . I figured, as at this stage I'm only using STRUTS in the one tag above, and not actually invoking the ActionServlet, the app should work without setting up any ActionForwards and so on. Is that correct? When Tomcat is started up, this is what happens: 11-Mar-2004 11:24:39 org.apache.struts.util.MessageResourcesFactory createFactory SEVERE: MessageResourcesFactory.createFactory java.lang.ClassNotFoundException: org.apache.struts.util.PropertyMessageResourcesFactory at java.net.URLClassLoader$1.run(URLClassLoader.java:199) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:187) at java.lang.ClassLoader.loadClass(ClassLoader.java:289) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274) at java.lang.ClassLoader.loadClass(ClassLoader.java:235) at org.apache.struts.util.RequestUtils.applicationClass(RequestUtils.java:207) at org.apache.struts.util.MessageResourcesFactory.createFactory(MessageResourcesFactory.java:192) at org.apache.struts.util.MessageResources.getMessageResources(MessageResources.java:576) at org.apache.struts.util.RequestUtils.(RequestUtils.java:134) at org.apache.struts.util.MessageResourcesFactory.createFactory(MessageResourcesFactory.java:192) at org.apache.struts.util.MessageResources.getMessageResources(MessageResources.java:576) at org.apache.struts.action.ActionServlet.initInternal(ActionServlet.java:1329) at org.apache.struts.action.ActionServlet.init(ActionServlet.java:464) at javax.servlet.GenericServlet.init(GenericServlet.java:258) at org.apache.tomcat.core.ServletWrapper.doInit(ServletWrapper.java:317) at org.apache.tomcat.core.Handler.init(Handler.java:215) at org.apache.tomcat.core.ServletWrapper.init(ServletWrapper.java:296) at org.apache.tomcat.context.LoadOnStartupInterceptor.contextInit(LoadOnStartupInterceptor.java:130) at org.apache.tomcat.core.ContextManager.initContext(ContextManager.java:491) at org.apache.tomcat.core.ContextManager.init(ContextManager.java:453) at org.apache.tomcat.startup.Tomcat.execute(Tomcat.java:195) at org.apache.tomcat.startup.Tomcat.main(Tomcat.java:235) 11-Mar-2004 11:24:39 org.apache.struts.util.MessageResourcesFactory createFactory SEVERE: MessageResourcesFactory.createFactory java.lang.ExceptionInInitializerError at org.apache.struts.util.MessageResourcesFactory.createFactory(MessageResourcesFactory.java:192) at org.apache.struts.util.MessageResources.getMessageResources(MessageResources.java:576) at org.apache.struts.action.ActionServlet.initInternal(ActionServlet.java:1329) at org.apache.struts.action.ActionServlet.init(ActionServlet.java:464) at javax.servlet.GenericServlet.init(GenericServlet.java:258) at org.apache.tomcat.core.ServletWrapper.doInit(ServletWrapper.java:317) at org.apache.tomcat.core.Handler.init(Handler.java:215) at org.apache.tomcat.core.ServletWrapper.init(ServletWrapper.java:296) at org.apache.tomcat.context.LoadOnStartupInterceptor.contextInit(LoadOnStartupInterceptor.java:130) at
RE: can anyone help me address this issue
I really need to get some idea about this issue, any suggestions? ThanksRegards From: Mu Mike [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: can anyone help me address this issue Date: Thu, 11 Mar 2004 05:12:16 + I m using javascript doing dhtml, now I have a table, every time a user changes the width of a specific column(by draging the border line), I will save the column index and the new width to variables in javascript.Now ,after doing many such changes, I need to submit those values saved in the vairables to the server side program by submiting a form, which has an action path designing what action should be called after it get the submitted value. Now, I m wondering how I should define such javasript variables and how I can submit these values by submiting a form? I m using struts, is there any possibility to implement this idea in struts? ThanksRegards _ MSN Hotmail http://www.hotmail.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ MSN Messenger: http://messenger.msn.com/cn - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Changing position of nested beans
You know before I read you messages, I would have understood crack programmer as a compliment - now I'm thinking it could be a support group for those of us who spend too much time on lists like this :-). - Original Message - From: Mark Lowe [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Thursday, March 11, 2004 11:51 AM Subject: Re: Changing position of nested beans The only reason why dispatch action appeals is that i can map the form to one action and have several buttons within a form without needing to change to form action with javascript or anything grotty like that. I'm not especially keen dispatch actions . Just this business of using links and the request being cleared leaves me scoping to session and using a link, again i'm not that against scoping to session but I thought someone in the anti httpsession brigade would have a solution for this common problem. I don't think I'm tree-barking but ruminating on dispatch action (although i'm not certain). I'm trying various ways and seeing what happens. But indexed handler parameters seem like the sort of thing that would be required to do such a thing, but seem to be more the consequence of a crack induced state of derangement than something that struts supports. On 11 Mar 2004, at 12:19, Niall Pemberton wrote: Mark, Seems to me you have already worked out the solution, except why do you need a lookup dispatch action - rather than a roll your own - you have two methods right - Move Up and Move Down? Your jsp will populate a (foo?) List with either Move Up or Move Down (depending on the button pressed) in the appropriate index position - so you loop through them until you find a none null entry and call the appropriate method depending on the value with the index position you're at. trying to use look up dispatch action seems to be overly complicating things to me. Niall - Original Message - From: Mark Lowe [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Thursday, March 11, 2004 9:31 AM Subject: Changing position of nested beans I was wondering if anyone has found any slick, no javascript dependent solution to the following situation. My question in short is, is there a way of having an indexed dispatch action, or have i been on the crack again? I have a form of nested beans which are ordered according to a position stored in the model. I don't do any sorting in the web tier nor do i want to, other than rejigging the indices of some indexed properties until such a time as the user is ready to save his/her changes to the model. form name=foosForm action=/myapp/save.do input type=text name=foo[0].name input type=text name=foo[1].name input type=text name=foo[2].name /form Now when i save I'll save the index as a field called position, thus all that's fine and dandy. So lets say I want the use to define the position by having a move up and move down, but rather than using an indexed link i want to use a button. I've a lookup dispatch action with a moveup method and all that jazz. html:form action=/save.do logic:iterate id=foo name=foosForm property=foos html:text name=foo property=name indexed=true / html:submit property=method indexed=true bean:message key=button.moveup / /html:submit /logic:iterate /html:form So the rendered html would like like this form name=foosForm action=/myapp/save.do input type=text name=foo[0].nameinput type=submit name=method[0] value=Move Up //and so on /form Of course if i submit this to a lookupdispatch action, its gonna call me a crazy fool. So i need to have some means of having an indexed map key in my key method map, or something to cross the same bridge i'm trying to cross. Any ideas? I know i can do this in javascript which i will once i get things running without it, please no javascript suggestions. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: can anyone help me address this issue
Its not a struts issue - its a dhtml/javascript issue - maybe you should ask the question on a dhtml/javascript list. Niall - Original Message - From: Mu Mike [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, March 11, 2004 12:16 PM Subject: RE: can anyone help me address this issue I really need to get some idea about this issue, any suggestions? ThanksRegards From: Mu Mike [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: can anyone help me address this issue Date: Thu, 11 Mar 2004 05:12:16 + I m using javascript doing dhtml, now I have a table, every time a user changes the width of a specific column(by draging the border line), I will save the column index and the new width to variables in javascript.Now ,after doing many such changes, I need to submit those values saved in the vairables to the server side program by submiting a form, which has an action path designing what action should be called after it get the submitted value. Now, I m wondering how I should define such javasript variables and how I can submit these values by submiting a form? I m using struts, is there any possibility to implement this idea in struts? ThanksRegards _ MSN Hotmail http://www.hotmail.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ MSN Messenger: http://messenger.msn.com/cn - 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: can anyone help me address this issue
use onResize on the html element that is clicked to report its new value to a form variable. use an onChange for the form to auto submit itself. If you need to hide the submission of the form use an IFrame. messy eugh, javascript is the pits. Chris -Original Message- From: Mu Mike [mailto:[EMAIL PROTECTED] Sent: 11 March 2004 12:16 To: [EMAIL PROTECTED] Subject: RE: can anyone help me address this issue I really need to get some idea about this issue, any suggestions? ThanksRegards From: Mu Mike [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: can anyone help me address this issue Date: Thu, 11 Mar 2004 05:12:16 + I m using javascript doing dhtml, now I have a table, every time a user changes the width of a specific column(by draging the border line), I will save the column index and the new width to variables in javascript.Now ,after doing many such changes, I need to submit those values saved in the vairables to the server side program by submiting a form, which has an action path designing what action should be called after it get the submitted value. Now, I m wondering how I should define such javasript variables and how I can submit these values by submiting a form? I m using struts, is there any possibility to implement this idea in struts? ThanksRegards _ MSN Hotmail http://www.hotmail.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ MSN Messenger: http://messenger.msn.com/cn - 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: html:link with javascript variable
On Thu, 11 Mar 2004 12:10:21 - Niall Pemberton [EMAIL PROTECTED] wrote: Try I think you mean jsp scriptlet (rather than javascript) - I'm not good on it, I'm a java-in-general newbie, so half the time I don't know what I mean :) but how about doing this (you can do without the bean:define) instead: html:link action=/BranchDetailPage.do paramId=enquiryBranch paramName=APSB paramProperty=mendstatbrCde bean:write name=APSB property=mendstatbrCde/ /html:link Aah, perfect (tho I substituted 'action=' with 'page=' ). That's exactly what I needed. Thanks a lot!! -- Stuart Logie Programmer UNIVERSAL COMPUTER SERVICES (PTY) LTD A member of South Africa's largest retail software vendor, the UCS Group Tel : (011) 712 1371 Cell : 082 902 5632 Fax : (011) 339 3421 Internet : http://ucs.co.za I am the Unconquerable Spirit. -- Poet Unknown Powered by Debian GNU/Linux - testing/unstable pgp0.pgp Description: PGP signature
Re: problems with html:base/
Hello, Lukas: Here's a simple script that can be helpful in these situations: +++ for jar in `ls *jar` do echo checking $jar... jar tvf $jar | grep org.apache.struts.util.PropertyMessageResourcesFactory done +++ When I checked WEB-INF\lib under a struts-based web application on my system, it produced the following output: # checking commons-beanutils.jar... checking commons-collections.jar... checking commons-digester.jar... checking commons-fileupload.jar... checking commons-lang.jar... checking commons-logging.jar... checking commons-validator.jar... checking jakarta-oro.jar... checking struts.jar... 749 Sun Jun 29 21:46:38 PDT 2003 org/apache/struts/util/PropertyMessageResourcesFactory.class # Perhaps you are missing struts.jar? btw: if you are on Windows, you can download either Cygwin or uwin (if you prefer ksh) Cordially, Oswald Thanks for the script, Oswald! I did manually check the presence of all the required stuff once tomcat had unpacked the war file. struts.jar is in WEB-INF/lib, together with all the other *.jar s from struts 1.1, all the *.tld and *.dtd from struts 1.1 are in WEB-INF, and web.xml and struts-config.xml are in WEB-INF, too. I had actually downloaded the sources and looked at the PropertyMessageResourcesFactory, but I couldn't figure out what it needs that's not there. I suspect that some entries in either web.xml or in struts-config are required that I didn't put in there, or maybe some properties file? Kind regards Lukas -- +++ NEU bei GMX und erstmalig in Deutschland: TÜV-geprüfter Virenschutz +++ 100% Virenerkennung nach Wildlist. Infos: http://www.gmx.net/virenschutz - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Problems with custom validation
Hi! I've created my own pluggable validator but it's not working. These are the steps I've followed: First: I added this to validator-rules.xml validator name=nif classname=com.pruebas.MTValidations method=validateNif methodParams=java.lang.Object, org.apache.commons.validator.ValidatorAction, org.apache.commons.validator.Field, org.apache.struts.action.ActionErrors, javax.servlet.http.HttpServletRequest depends= msg=errors.nif /validator Second: I created the class com.pruebas.MTValidations with a public static boolean validateNif method. Third: I added a errors.nif to my application resources file: errors.nif='{0}' is not a valid NIF. When I test it, the method validateNif is called, and returns true or false correctly, but the validator seems to omit the result and always thinks the value is OK. By the way, I also have a javascript tag which I've omitted here and the client validation works OK, but the server validation refuses to work, despite of the result returned by validateNif (it never calls the input method). The standard validations (email, required, etc.) are working properly, both client and server, in the same test and in the same conditions. Have I missed anything? thanks in advance This message was sent using IMP, the Internet Messaging Program. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Forget it (Problems with custom validation)
Sorry people, I was investigating that problem for no less than 2 hours and one minute after I sent the message I saw that I wasn't adding errors (but shoulnd't the validator deny the validation if the method is returning false, anyway?). I solved it adding this line to the validateNif method: errors.add(field.getKey(), Resources.getActionError(request, va, field)); bye! This message was sent using IMP, the Internet Messaging Program. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problems with custom validation
Whats in your validateNif method - are you adding a error to ActionErrors if its invalid? errors.add(field.getKey(), Resources.getActionError(request, va, field)); - Original Message - From: Diego [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, March 11, 2004 12:56 PM Subject: Problems with custom validation Hi! I've created my own pluggable validator but it's not working. These are the steps I've followed: First: I added this to validator-rules.xml validator name=nif classname=com.pruebas.MTValidations method=validateNif methodParams=java.lang.Object, org.apache.commons.validator.ValidatorAction, org.apache.commons.validator.Field, org.apache.struts.action.ActionErrors, javax.servlet.http.HttpServletRequest depends= msg=errors.nif /validator Second: I created the class com.pruebas.MTValidations with a public static boolean validateNif method. Third: I added a errors.nif to my application resources file: errors.nif='{0}' is not a valid NIF. When I test it, the method validateNif is called, and returns true or false correctly, but the validator seems to omit the result and always thinks the value is OK. By the way, I also have a javascript tag which I've omitted here and the client validation works OK, but the server validation refuses to work, despite of the result returned by validateNif (it never calls the input method). The standard validations (email, required, etc.) are working properly, both client and server, in the same test and in the same conditions. Have I missed anything? thanks in advance This message was sent using IMP, the Internet Messaging Program. - 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]
textarea
Hi, I am generatinga textare on my jsp with this: textarea name=info rows=12 cols=50 tabindex=0bean:write name=teacher property=qualifications //textarea BUt if i enter a large peice of text in the textarea and save it (try to save it) in my bean, its not getting the whole chunck of data (like a paragraph or a page) ANything wrong i may be doing? how to fix it... Thanks in advance - Do you Yahoo!? Yahoo! Search - Find what youre looking for faster.
AW: textarea
Just a guess, but if the method field of the form is set to GET, then you can only transfer a limited amount of data. If you have set the method to POST, then I'm at a loss. Andreas -Ursprungliche Nachricht- Von: as as [mailto:[EMAIL PROTECTED] Gesendet: Donnerstag, 11. Marz 2004 14:46 An: Struts Users Mailing List Betreff: textarea Hi, I am generatinga textare on my jsp with this: textarea name=info rows=12 cols=50 tabindex=0bean:write name=teacher property=qualifications //textarea BUt if i enter a large peice of text in the textarea and save it (try to save it) in my bean, its not getting the whole chunck of data (like a paragraph or a page) ANything wrong i may be doing? how to fix it... Thanks in advance - Do you Yahoo!? Yahoo! Search - Find what youre looking for faster. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
page logging out
Hi, I am using welogic server 7.0 to deploy my struts app.My jsp's are logging out even afetr a couple of minutes of inactivity.Performance wise, I am also looking for ways to speed up page download time.(MY backend database connectivity is through Hiberntae to mysql). How may I do these two things Thanks in advance Sam - Do you Yahoo!? Yahoo! Search - Find what youre looking for faster.
Re: textarea
You must be carefull. You can don't see the whole text (because the \n characteres). Are you using an java IDE to debug your source ? If this is true, try to write the contents of your property in your log file... as as wrote: Hi, I am generatinga textare on my jsp with this: textarea name=info rows=12 cols=50 tabindex=0bean:write name=teacher property=qualifications //textarea BUt if i enter a large peice of text in the textarea and save it (try to save it) in my bean, its not getting the whole chunck of data (like a paragraph or a page) ANything wrong i may be doing? how to fix it... Thanks in advance - Do you Yahoo!? Yahoo! Search - Find what youre looking for faster. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: AW: textarea
Andreas, Thanks for the quick reply. I am using struts form tag as follows. wondering ,syntax wise, how I can mention form method as GET...in this tag. Thanks in advance, Sam. html:form action=teacherDisplay name=teacherForm type=com.model.TeacherForm Andreas Solarik [EMAIL PROTECTED] wrote: Just a guess, but if the method field of the form is set to GET, then you can only transfer a limited amount of data. If you have set the method to POST, then I'm at a loss. Andreas -Ursprungliche Nachricht- Von: as as [mailto:[EMAIL PROTECTED] Gesendet: Donnerstag, 11. Marz 2004 14:46 An: Struts Users Mailing List Betreff: textarea Hi, I am generatinga textare on my jsp with this: bean:writebrname=teacher property=qualifications / BUt if i enter a large peice of text in the textarea and save it (try to save it) in my bean, its not getting the whole chunck of data (like a paragraph or a page) ANything wrong i may be doing? how to fix it... Thanks in advance - Do you Yahoo!? Yahoo! Search - Find what youre looking for faster. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Do you Yahoo!? Yahoo! SiteBuilder - Free web site building tool. Try it!
Re: map-backed action forms - form params not loaded ?
Raghu, i think this .html is wrong. It must be like : form action=/saveParams.do input type=text name=value(param1)/ input type=text name=value(param2)/ /form Please, try it. Raghu Havaldar wrote: I do not have a problem while displaying those properties. However, when a form (which has a bunch of params like the one below) is submitted, the ActionForm's setValue method is not called. e.g. This is plain html, no jsp. form action=/saveParams.do input type=text name=param1/ input type=text name=param2/ /form Have you used a map-backed action form to capture params from a submitted form ? Have observed lots of folks having this problem. thanks, raghu - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: AW: textarea
html:form method=post I think that post is the default but i'm not sure... as as wrote: Andreas, Thanks for the quick reply. I am using struts form tag as follows. wondering ,syntax wise, how I can mention form method as GET...in this tag. Thanks in advance, Sam. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: help me with using bean
On Thu, 11 Mar 2004 01:30:38 + Mu Mike [EMAIL PROTECTED] wrote: I have files like the below,I m trying to submit a bean object to my action class, yet when I pressed the submit on the jsp file,it threw an exception:java.lang.IllegalArgumentException: No bean specified what is the correct way? ThanksRegards myjsp.jsp html:form action=/selectFont.do tr td html:text property=bean.size value=10/ /td td html:text property=bean.fontName value=aria/ /td /tr input type=submit/ /html:form Don't you need the 'name' attribute in your html:text tags ie html:text name=SelectFontForm property=bean.size value=10/ ^ -- Stuart Logie Programmer UNIVERSAL COMPUTER SERVICES (PTY) LTD A member of South Africa's largest retail software vendor, the UCS Group Tel : (011) 712 1371 Cell : 082 902 5632 Fax : (011) 339 3421 Internet : http://ucs.co.za I am the Unconquerable Spirit. -- Poet Unknown Powered by Debian GNU/Linux - testing/unstable pgp0.pgp Description: PGP signature
RE: help me with using bean
Can you send the mail without the entrust cretificate? I can not read the mail and hence help you :-(( -Original Message- From: stu [mailto:[EMAIL PROTECTED] Sent: Thursday, March 11, 2004 3:04 PM To: [EMAIL PROTECTED] Subject: Re: help me with using bean File: SMIME.txt - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: How to submit form in pop-up window and forward parent result s page?
Hello bOOyah, I have had the same problem that you describe. Were you able to solve it?. If so could you share how you did it? Sam -Ursprungliche Nachricht- Von: news [mailto:[EMAIL PROTECTED] Auftrag von bOOyah Gesendet: Donnerstag, 11. Marz 2004 11:43 An: [EMAIL PROTECTED] Betreff: Q: How to submit form in pop-up window and forward parent results page? Hi all. (Caveat: this might actually turn out to be a Javascript question): I would appreciate any help or even alternatives to what I'm trying to achieve below:- Here's a rough sequence of what I'm trying to achieve... (1) My app has a page displaying an item link. (2) When the user clicks on the link a pop-up browser window appears with a form containing all the details about that item. (3) After modifying the item's details the user clicks on the form Submit button. (4) The Submit action saves the changes to the database. (5) The pop-up windows closes. (6) The original, parent page 'refreshes' to reflect the changes the user made in the pop-up windows (e.g. changing the name of the item under the link). I can get as far as step (4) using Struts and Javascript handlers. Here's how my parent pops-up the item editing window: -- % String link = javascript:popUp('+ request.getContextPath()+ /editItem.do?action=edititem=+ itemID + ');; % . . . tdhtml:link href=javascript:; onclick=%=link% c:out value=Edit Item//html:link /td -- Here's the form element of my pop-up: -- % String submitScript = form.submit(); opener.location='+ request.getContextPath()+ /showItemDetails.do';+ self.close();; % . . . html:form action=/saveItem onsubmit=%=submitScript% -- So I'm submitting the form, telling the parent to forward to the results page ('/showItemDetails.do') and closing the pop-up. But it doesn't work that way:-( The submission works fine; the data is written to the DB. But the pop-up browser window doesn't close and the parent isn't forwarded to the results page. So I guess once a form is submitted the rest of the Javascript just 'disappears' and isn't executed? Any help out there..? Many thanks in advance! -- bOOyah - 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: AW: textarea
Hi Sam, You can find the info at http://jakarta.apache.org/struts/userGuide/struts-html.html#form. snip method The HTTP method that will be used to submit this request (GET, POST). [POST] [RT Expr] /snip Its set to post by default, so I guess I havn't got a clue what your problem is. Maybe textareas can be limited by a parameter as to how much data they will hold - but I'm guessing here. Good luck, Andreas -Ursprungliche Nachricht- Von: as as [mailto:[EMAIL PROTECTED] Gesendet: Donnerstag, 11. Marz 2004 14:55 An: Struts Users Mailing List Betreff: Re: AW: textarea Andreas, Thanks for the quick reply. I am using struts form tag as follows. wondering ,syntax wise, how I can mention form method as GET...in this tag. Thanks in advance, Sam. html:form action=teacherDisplay name=teacherForm type=com.model.TeacherForm Andreas Solarik [EMAIL PROTECTED] wrote: Just a guess, but if the method field of the form is set to GET, then you can only transfer a limited amount of data. If you have set the method to POST, then I'm at a loss. Andreas -Ursprungliche Nachricht- Von: as as [mailto:[EMAIL PROTECTED] Gesendet: Donnerstag, 11. Marz 2004 14:46 An: Struts Users Mailing List Betreff: textarea Hi, I am generatinga textare on my jsp with this: bean:writebrname=teacher property=qualifications / BUt if i enter a large peice of text in the textarea and save it (try to save it) in my bean, its not getting the whole chunck of data (like a paragraph or a page) ANything wrong i may be doing? how to fix it... Thanks in advance - Do you Yahoo!? Yahoo! Search - Find what youre looking for faster. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Do you Yahoo!? Yahoo! SiteBuilder - Free web site building tool. Try it! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How to set the selected value in an select rendered by optionsCollection
From: Frank Schaare [mailto:[EMAIL PROTECTED] This would only be true if the action that was called specified that form in its mapping. Sorry, but i guess you are wrong. The declared formBeans are digested during ActionServlets.init(). Actually, he's right. :) My advice only applies if you have name=myForm in your action tag. If not, Struts will pass a null form into the execute method. It may have digested struts-config.xml, but without the name attribute in the form tag, it will not have actually instantiated one for you. I don't use any pre-processing Actions. Mine are all LookupDispatchAction, so the form is always there, although if it comes in with no parameter, the unspecified method will pre-fill the form from the database. -- Wendy Smoak Application Systems Analyst, Sr. ASU IA Information Resources Management - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: AW: How to submit form in pop-up window and forward parent result s page?
[EMAIL PROTECTED] wrote: Hello bOOyah, I have had the same problem that you describe. Were you able to solve it?. If so could you share how you did it? Sam Hi Sam The closest help I've received yet was from Anirudh Jayanth who said: 8-- The javascript for the submit in the popup window could be something like this opener.parent.document.forms[0].action=Action.do; opener.parent.document.forms[0].submit(); 8-- I haven't had a chance to try that out but it looks promising. I don't think it will also close the pop-up window though. Kind regards, -- bOOyah - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How to submit form in pop-up window and forward parent results page?
Put an onSubmit(refreshOpener()) on your form (assuming your form is on your popup) write something along these lines (code below is off the top of my head and untested) function refreshOpener() { if(window.opener!=null){ window.opener.location.href=/context/showsomething.do; } window.focus(); window.close(); } if the opener already has the page loaded you require but it needs a refresh use window.opener.location.reload(true); hth Chris -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: 11 March 2004 14:24 To: [EMAIL PROTECTED] Subject: AW: How to submit form in pop-up window and forward parent results page? Hello bOOyah, I have had the same problem that you describe. Were you able to solve it?. If so could you share how you did it? Sam -Ursprungliche Nachricht- Von: news [mailto:[EMAIL PROTECTED] Auftrag von bOOyah Gesendet: Donnerstag, 11. Marz 2004 11:43 An: [EMAIL PROTECTED] Betreff: Q: How to submit form in pop-up window and forward parent results page? Hi all. (Caveat: this might actually turn out to be a Javascript question): I would appreciate any help or even alternatives to what I'm trying to achieve below:- Here's a rough sequence of what I'm trying to achieve... (1) My app has a page displaying an item link. (2) When the user clicks on the link a pop-up browser window appears with a form containing all the details about that item. (3) After modifying the item's details the user clicks on the form Submit button. (4) The Submit action saves the changes to the database. (5) The pop-up windows closes. (6) The original, parent page 'refreshes' to reflect the changes the user made in the pop-up windows (e.g. changing the name of the item under the link). I can get as far as step (4) using Struts and Javascript handlers. Here's how my parent pops-up the item editing window: -- % String link = javascript:popUp('+ request.getContextPath()+ /editItem.do?action=edititem=+ itemID + ');; % . . . tdhtml:link href=javascript:; onclick=%=link% c:out value=Edit Item//html:link /td -- Here's the form element of my pop-up: -- % String submitScript = form.submit(); opener.location='+ request.getContextPath()+ /showItemDetails.do';+ self.close();; % . . . html:form action=/saveItem onsubmit=%=submitScript% -- So I'm submitting the form, telling the parent to forward to the results page ('/showItemDetails.do') and closing the pop-up. But it doesn't work that way:-( The submission works fine; the data is written to the DB. But the pop-up browser window doesn't close and the parent isn't forwarded to the results page. So I guess once a form is submitted the rest of the Javascript just 'disappears' and isn't executed? Any help out there..? Many thanks in advance! -- bOOyah - 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]
WAS: problems with html:base/ - Help Please - ActionServlet fails on startup
To find out what's going on, I created an even simpler project: All the struts 1.1 jars, tlds and dtds A simple index.jsp with NO struts related tags or taglib directives. An ActionServlet set to load on startup. The same failure as reported under problems with html:base/ happens, that shows the failure is not related to the jsp file that contained the html:base/ tag in my other project, but to the initial loading of the ActionServlet. I realized I hadn't run a struts 1.1 in this tomcat instance before, only the struts 1.0 logon application from the manning/husted struts book. Is there a problem with using Tomcat 3.23 and Struts 1.1 ? Otherwise, the only possible explanation could be missing items in the web.xml or struts-config.xml This is what the app currently look like: /index.jsp /META-INF/ /META-INF/MANIFEST.MF /WEB-INF/ /WEB-INF/struts-bean.tld /WEB-INF/struts-html.tld /WEB-INF/struts-logic.tld /WEB-INF/struts-nested.tld /WEB-INF/struts-template.tld /WEB-INF/struts-tiles.tld /WEB-INF/struts-config_1_0.dtd /WEB-INF/struts-config_1_1.dtd /WEB-INF/tiles-config.dtd /WEB-INF/tiles-config_1_1.dtd /WEB-INF/validation_1_1.dtd /WEB-INF/validator-rules_1_1.dtd /WEB-INF/web-app_2_2.dtd /WEB-INF/web-app_2_3.dtd /WEB-INF/web.xml /WEB-INF/struts-config.xml /WEB-INF/classes/ /WEB-INF/lib/ /WEB-INF/lib/commons-beanutils.jar /WEB-INF/lib/commons-collections.jar /WEB-INF/lib/commons-digester.jar /WEB-INF/lib/commons-fileupload.jar /WEB-INF/lib/commons-lang.jar /WEB-INF/lib/commons-logging.jar /WEB-INF/lib/commons-validator.jar /WEB-INF/lib/jakarta-oro.jar /WEB-INF/lib/struts-legacy.jar /WEB-INF/lib/struts.jar ** web.xml ** ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.2//EN http://java.sun.com/j2ee/dtds/web-app_2_2.dtd; web-app !-- Standard Action Servlet Configuration (with debugging) -- servlet servlet-nameaction/servlet-name servlet-classorg.apache.struts.action.ActionServlet/servlet-class init-param param-nameconfig/param-name param-value/WEB-INF/struts-config.xml/param-value /init-param load-on-startup1/load-on-startup /servlet servlet-mapping servlet-nameaction/servlet-name url-pattern/do/*/url-pattern /servlet-mapping !-- The Usual Welcome File List -- welcome-file-list welcome-fileindex.jsp/welcome-file /welcome-file-list !-- Struts Tag Library Descriptors -- taglib taglib-uri/tags/struts-html/taglib-uri taglib-location/WEB-INF/struts-html.tld/taglib-location /taglib /web-app ** struts-config.xml * ?xml version=1.0 encoding=ISO-8859-1 ? !DOCTYPE struts-config PUBLIC -//Apache Software Foundation//DTD Struts Configuration 1.1//EN http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd; struts-config form-beans /form-beans global-forwards /global-forwards action-mappings /action-mappings /struts-config There must be a really simple reason for the failure, as there's really no application code my test app. any pointers much appreciated. Lukas -- +++ NEU bei GMX und erstmalig in Deutschland: TÜV-geprüfter Virenschutz +++ 100% Virenerkennung nach Wildlist. Infos: http://www.gmx.net/virenschutz - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: AW: How to submit form in pop-up window and forward parent results page? [OT]
Your editItem action, when the update is finished, forwards to autoCloseAndReloadOpener.jsp autoCloseAndReloadOpener.jsp does steps (5) and (6): html body onLoad=self.close() script // Reload opener opener.formReload.submit(); // or something like this, using opener /scrip /body /html I have not tried it... Regards PD. This is not struts related. [EMAIL PROTECTED] wrote: Hello bOOyah, I have had the same problem that you describe. Were you able to solve it?. If so could you share how you did it? Sam -Ursprungliche Nachricht- Von: news [mailto:[EMAIL PROTECTED] Auftrag von bOOyah Gesendet: Donnerstag, 11. Marz 2004 11:43 An: [EMAIL PROTECTED] Betreff: Q: How to submit form in pop-up window and forward parent results page? Hi all. (Caveat: this might actually turn out to be a Javascript question): I would appreciate any help or even alternatives to what I'm trying to achieve below:- Here's a rough sequence of what I'm trying to achieve... (1) My app has a page displaying an item link. (2) When the user clicks on the link a pop-up browser window appears with a form containing all the details about that item. (3) After modifying the item's details the user clicks on the form Submit button. (4) The Submit action saves the changes to the database. (5) The pop-up windows closes. (6) The original, parent page 'refreshes' to reflect the changes the user made in the pop-up windows (e.g. changing the name of the item under the link). I can get as far as step (4) using Struts and Javascript handlers. Here's how my parent pops-up the item editing window: -- % String link = javascript:popUp('+ request.getContextPath()+ /editItem.do?action=edititem=+ itemID + ');; % . . . tdhtml:link href=javascript:; onclick=%=link% c:out value=Edit Item//html:link /td -- Here's the form element of my pop-up: -- % String submitScript = form.submit(); opener.location='+ request.getContextPath()+ /showItemDetails.do';+ self.close();; % . . . html:form action=/saveItem onsubmit=%=submitScript% -- So I'm submitting the form, telling the parent to forward to the results page ('/showItemDetails.do') and closing the pop-up. But it doesn't work that way:-( The submission works fine; the data is written to the DB. But the pop-up browser window doesn't close and the parent isn't forwarded to the results page. So I guess once a form is submitted the rest of the Javascript just 'disappears' and isn't executed? Any help out there..? Many thanks in advance! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: WAS: problems with html:base/ - Help Please - ActionServlet fails on startup
I just found the struts-blank.war in the Struts 1.1 binary distribution and deployed it to my Tomcat 2.32 . I fails in the same way! -- +++ NEU bei GMX und erstmalig in Deutschland: TÜV-geprüfter Virenschutz +++ 100% Virenerkennung nach Wildlist. Infos: http://www.gmx.net/virenschutz - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
bean:message format ssn
Hi all, I am wondering if there is an easy way to format the ssnn. What I have is a String '123456789' but the users would like to see '123-45-6789'. Is there an easy way of doing this using bean:write or bean:message or any other tag? Thanks!! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: WAS: problems with html:base/ - Help Please - ActionServlet fails on startup
Lukas, I am not familiar with your previous posts, but will this archive post help? http://marc.theaimsgroup.com/?l=struts-userm=106326387004081w=2 Susan Bradeen Lukas Latz [EMAIL PROTECTED] wrote on 03/11/2004 10:22:44 AM: snip Is there a problem with using Tomcat 3.23 and Struts 1.1 ? Otherwise, the only possible explanation could be missing items in the web.xml or struts-config.xml This is what the app currently look like: /snip There must be a really simple reason for the failure, as there's really no application code my test app. any pointers much appreciated. Lukas -- +++ NEU bei GMX und erstmalig in Deutschland: TÜV-geprüfter Virenschutz +++ 100% Virenerkennung nach Wildlist. Infos: http://www.gmx.net/virenschutz - 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: bean:message format ssn
There's a few options, off the top of my head: -Do the string manipulation in the (preprocessing) action -Use a combination of the Jakarta String taglib (http://jakarta.apache.org/taglibs/doc/string-doc/string-1.0.1/index.html) tags (such as left, right, and mid) to parse out the value (since SSN is always 9 digits) with dashes in between. -Write your own custom tag -Original Message- From: Kumar M [mailto:[EMAIL PROTECTED] Sent: Thursday, March 11, 2004 10:45 AM To: Struts Users Mailing List Subject: bean:message format ssn Hi all, I am wondering if there is an easy way to format the ssnn. What I have is a String '123456789' but the users would like to see '123-45-6789'. Is there an easy way of doing this using bean:write or bean:message or any other tag? 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]
AW: bean:message format ssn
Hi Kumar, when you look at the documentation for bean:write (http://jakarta.apache.org/struts/userGuide/struts-bean.html#write) you can find that it allows formating. Bean:message looks like it does not support this feature - which kind of makes sense when you consider what its used for (lookup of strings in the resources - supporting parameterized replacement). The format of the format string is something like snip - tr - td%= pageContext.getAttribute(test7.value) %/td -td[#,000.00] bean:write name=test7.value format=#,000.00//td -td[bean:message key=format.pattern /] bean:write name=test7.value formatKey=format.pattern//td - /tr /snip The preceeding code came from http://www.mail-archive.com/[EMAIL PROTECTED]/msg20743.html Andreas -Ursprungliche Nachricht- Von: Kumar M [mailto:[EMAIL PROTECTED] Gesendet: Donnerstag, 11. Marz 2004 16:45 An: Struts Users Mailing List Betreff: bean:message format ssn Hi all, I am wondering if there is an easy way to format the ssnn. What I have is a String '123456789' but the users would like to see '123-45-6789'. Is there an easy way of doing this using bean:write or bean:message or any other tag? 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: Reporting + Struts
Hi all, I have the same problem... I was going to use jasper (I posted a similar message in jasper mailing list) but I am stucked at the point Of how do I render the report generated by jasper If I want to show it to the user, ideally I have to get the report in XML Format and then convert it to HTML via stylesheet Jasper generates an HTML report, but I am wondering how can I render it to the user via struts... Anyone has any idea or any suggestions? Thanx in advance and regards marco -Original Message- From: Andreas Solarik [mailto:[EMAIL PROTECTED] Sent: 11 March 2004 09:24 To: 'Struts Users Mailing List' Subject: AW: Reporting + Struts Hi Mohamed! Damn, that was a cryptic post. Now you've gone and sparked my curiosity: what rules didn't you follow while snipworking in Actuate the Reporting tool and in J2EE/snip? Regards, Andreas -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Gesendet: Donnerstag, 11. März 2004 10:22 An: Struts Users Mailing List Betreff: Re: Reporting + Struts Hi, I am working in Actuate the Reporting tool and in J2EE also. To answer your first question we are using the struts framework for the reports also but we are not following all the rules. It depends your requirement. Mohamed Abdul Khaliq.M IT Specialist SDC2 - Chennai Ph 8272628 Ext 8098 Shyam A [EMAIL PROTECTED]To: [EMAIL PROTECTED] hoo.com cc: Subject: Reporting + Struts 03/10/2004 11:57 AM Please respond to Struts Users Mailing List Hi, I have a web application in which I need to generate reports on the fly, i.e., the user submits some report criteria on a web page and report has to be generated dynamically. I searched the archives and found that Jasper reports is a good tool to use, and there are some GUI tools available which will help in report design eg. iReports. I have a couple of questions: 1. Is it advisable to use Struts for the reporting application? Or just a JSP/Servlet based application would suffice? 2. Is there a big learning curve for using Jasper reports/IReports? I would appreciate it if somebody could share their experience in using the above mentioned tools. Thanks, Shyam __ Do you Yahoo!? Yahoo! Search - Find what you're looking for faster http://search.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] * This electronic mail message is intended solely for the named recipients and may contain confidential and proprietary business information of eFunds Corporation and all its subsidiaries. If you are not a named recipient, please notify the sender immediately. You may not disclose the contents to any other person; use this electronic mail message or its contents for any other purpose; or further store or copy its contents in any medium * - 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: Changing position of nested beans
Crack smoking gags aside.. I've tried hacking around the problem using the unspecified method to no avail. Looks like storing in session and using links. Unless I have any sudden rushes of blood to the head. On 11 Mar 2004, at 13:21, Niall Pemberton wrote: You know before I read you messages, I would have understood crack programmer as a compliment - now I'm thinking it could be a support group for those of us who spend too much time on lists like this :-). - Original Message - From: Mark Lowe [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Thursday, March 11, 2004 11:51 AM Subject: Re: Changing position of nested beans The only reason why dispatch action appeals is that i can map the form to one action and have several buttons within a form without needing to change to form action with javascript or anything grotty like that. I'm not especially keen dispatch actions . Just this business of using links and the request being cleared leaves me scoping to session and using a link, again i'm not that against scoping to session but I thought someone in the anti httpsession brigade would have a solution for this common problem. I don't think I'm tree-barking but ruminating on dispatch action (although i'm not certain). I'm trying various ways and seeing what happens. But indexed handler parameters seem like the sort of thing that would be required to do such a thing, but seem to be more the consequence of a crack induced state of derangement than something that struts supports. On 11 Mar 2004, at 12:19, Niall Pemberton wrote: Mark, Seems to me you have already worked out the solution, except why do you need a lookup dispatch action - rather than a roll your own - you have two methods right - Move Up and Move Down? Your jsp will populate a (foo?) List with either Move Up or Move Down (depending on the button pressed) in the appropriate index position - so you loop through them until you find a none null entry and call the appropriate method depending on the value with the index position you're at. trying to use look up dispatch action seems to be overly complicating things to me. Niall - Original Message - From: Mark Lowe [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Thursday, March 11, 2004 9:31 AM Subject: Changing position of nested beans I was wondering if anyone has found any slick, no javascript dependent solution to the following situation. My question in short is, is there a way of having an indexed dispatch action, or have i been on the crack again? I have a form of nested beans which are ordered according to a position stored in the model. I don't do any sorting in the web tier nor do i want to, other than rejigging the indices of some indexed properties until such a time as the user is ready to save his/her changes to the model. form name=foosForm action=/myapp/save.do input type=text name=foo[0].name input type=text name=foo[1].name input type=text name=foo[2].name /form Now when i save I'll save the index as a field called position, thus all that's fine and dandy. So lets say I want the use to define the position by having a move up and move down, but rather than using an indexed link i want to use a button. I've a lookup dispatch action with a moveup method and all that jazz. html:form action=/save.do logic:iterate id=foo name=foosForm property=foos html:text name=foo property=name indexed=true / html:submit property=method indexed=true bean:message key=button.moveup / /html:submit /logic:iterate /html:form So the rendered html would like like this form name=foosForm action=/myapp/save.do input type=text name=foo[0].nameinput type=submit name=method[0] value=Move Up //and so on /form Of course if i submit this to a lookupdispatch action, its gonna call me a crazy fool. So i need to have some means of having an indexed map key in my key method map, or something to cross the same bridge i'm trying to cross. Any ideas? I know i can do this in javascript which i will once i get things running without it, please no javascript suggestions. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: WAS: problems with html:base/ - Help Please - ActionServlet fails on startup
Lukas, I am not familiar with your previous posts, but will this archive post help? http://marc.theaimsgroup.com/?l=struts-userm=106326387004081w=2 Susan Bradeen Susan, this post somewhat contradicts the info on the Struts website, where they state: Apache's Tomcat (version 3.1 or later required, version 3.3 or later recommended). I'm not fundamentally opposed to upgrading to Tomcat 3.3, but I feel that if Tomcat 3.3 does not work with Struts 1.1 at all, it should be mentioned on the Struts website. I also saw the jaxp 1.1 vs 1.0 issue on the struts website, but as the Java that Tomcat uses here is 1.4 , thus the included jaxp 1.1 is presumably used. Thanks, Lukas -- +++ NEU bei GMX und erstmalig in Deutschland: TÜV-geprüfter Virenschutz +++ 100% Virenerkennung nach Wildlist. Infos: http://www.gmx.net/virenschutz - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: AW: bean:message format ssn
Thanks for your replies. There seems to be a way to format using bean:message. If you look at the following article from Ted Husted: http://www.jguru.com/faq/view.jsp?EID=915891 From the article: ordering.authorized.range.staff=Staff is only authorized to requisition supplies that cost less than ${0,number} USD would convert argument 0 to the number format. Isn't that nice! I was wondering if there is anyway we could extend this for things like ssn. I am looking at the MessageFormat class and all but was wondering if some one has come across this already. Thanks! [EMAIL PROTECTED] wrote: Hi Kumar, when you look at the documentation for bean:write (http://jakarta.apache.org/struts/userGuide/struts-bean.html#write) you can find that it allows formating. Bean:message looks like it does not support this feature - which kind of makes sense when you consider what its used for (lookup of strings in the resources - supporting parameterized replacement). The format of the format string is something like snip - tr - td%= pageContext.getAttribute(test7.value) %/td -td[#,000.00] bean:write name=test7.value format=#,000.00//td -td[bean:message key=format.pattern /] bean:write name=test7.value formatKey=format.pattern//td - /tr /snip The preceeding code came from http://www.mail-archive.com/[EMAIL PROTECTED]/msg20743.html Andreas -Ursprungliche Nachricht- Von: Kumar M [mailto:[EMAIL PROTECTED] Gesendet: Donnerstag, 11. Marz 2004 16:45 An: Struts Users Mailing List Betreff: bean:message format ssn Hi all, I am wondering if there is an easy way to format the ssnn. What I have is a String '123456789' but the users would like to see '123-45-6789'. Is there an easy way of doing this using bean:write or bean:message or any other tag? 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: Reporting + Struts
From what I saw of Jasper a year ago, the html it generated was pretty crud and you had to set up a load of XML in a definitition to generate a report. Now I may be way off base here, but if you want to generate a report in html and then render it using struts why not use jsp, tiles, velocity or something else which is set up to render webapps in html? Niall - Original Message - From: Marco Mistroni [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Sent: Thursday, March 11, 2004 4:00 PM Subject: RE: Reporting + Struts Hi all, I have the same problem... I was going to use jasper (I posted a similar message in jasper mailing list) but I am stucked at the point Of how do I render the report generated by jasper If I want to show it to the user, ideally I have to get the report in XML Format and then convert it to HTML via stylesheet Jasper generates an HTML report, but I am wondering how can I render it to the user via struts... Anyone has any idea or any suggestions? Thanx in advance and regards marco -Original Message- From: Andreas Solarik [mailto:[EMAIL PROTECTED] Sent: 11 March 2004 09:24 To: 'Struts Users Mailing List' Subject: AW: Reporting + Struts Hi Mohamed! Damn, that was a cryptic post. Now you've gone and sparked my curiosity: what rules didn't you follow while snipworking in Actuate the Reporting tool and in J2EE/snip? Regards, Andreas -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Gesendet: Donnerstag, 11. März 2004 10:22 An: Struts Users Mailing List Betreff: Re: Reporting + Struts Hi, I am working in Actuate the Reporting tool and in J2EE also. To answer your first question we are using the struts framework for the reports also but we are not following all the rules. It depends your requirement. Mohamed Abdul Khaliq.M IT Specialist SDC2 - Chennai Ph 8272628 Ext 8098 Shyam A [EMAIL PROTECTED]To: [EMAIL PROTECTED] hoo.com cc: Subject: Reporting + Struts 03/10/2004 11:57 AM Please respond to Struts Users Mailing List Hi, I have a web application in which I need to generate reports on the fly, i.e., the user submits some report criteria on a web page and report has to be generated dynamically. I searched the archives and found that Jasper reports is a good tool to use, and there are some GUI tools available which will help in report design eg. iReports. I have a couple of questions: 1. Is it advisable to use Struts for the reporting application? Or just a JSP/Servlet based application would suffice? 2. Is there a big learning curve for using Jasper reports/IReports? I would appreciate it if somebody could share their experience in using the above mentioned tools. Thanks, Shyam __ Do you Yahoo!? Yahoo! Search - Find what you're looking for faster http://search.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] * This electronic mail message is intended solely for the named recipients and may contain confidential and proprietary business information of eFunds Corporation and all its subsidiaries. If you are not a named recipient, please notify the sender immediately. You may not disclose the contents to any other person; use this electronic mail message or its contents for any other purpose; or further store or copy its contents in any medium * - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: WAS: problems with html:base/ - Help Please - ActionServlet fails on startup
Lukas Latz [EMAIL PROTECTED] wrote on 03/11/2004 11:12:26 AM: Lukas, I am not familiar with your previous posts, but will this archive post help? http://marc.theaimsgroup.com/?l=struts-userm=106326387004081w=2 Susan Bradeen Susan, this post somewhat contradicts the info on the Struts website, where they state: Apache's Tomcat (version 3.1 or later required, version 3.3 or later recommended). I'm not fundamentally opposed to upgrading to Tomcat 3.3, but I feel that if Tomcat 3.3 does not work with Struts 1.1 at all, it should be mentioned on the Struts website. I see your confusion. I don't use TC, but remembered a while back there was a lot of conversation about certain versions people had trouble with. Perhaps it does work, but maybe you have to jump through hoops to get it to do so. The archives might have more background on the specific issues with TC 3.2.x. If you wanted, you could submit a bugzilla request for site documentation clarification. Good luck, Susan I also saw the jaxp 1.1 vs 1.0 issue on the struts website, but as the Java that Tomcat uses here is 1.4 , thus the included jaxp 1.1 is presumably used. Thanks, Lukas -- +++ NEU bei GMX und erstmalig in Deutschland: TÜV-geprüfter Virenschutz +++ 100% Virenerkennung nach Wildlist. Infos: http://www.gmx.net/virenschutz - 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]
Please help :No Collection found
Hello All, I am Kurakula .I am new to this group .My Problem is I've three jsp pages create,view and edit. I've one form bean UIForm with attributes I am invoking create.jsp and saving data UIForm and then forwarding it uiview.jsp From uiview.jsp I am trying to populate data to uiedit.jsp.Please observe I've submit button by name Edit with which I am trying to call uiedit.jsp. I am getting following error. org.apache.jasper.JasperException: No collection found at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:254) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:684) at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:432) at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:356) at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1069) at org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:455) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:279) 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.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:2417) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:193) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:781) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:549) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:589) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:666) at java.lang.Thread.run(Thread.java:484) Could any one please let me know what is error I am comitting? Thanks in advance Kurakula - Do you Yahoo!? Yahoo! Search - Find what youre looking for faster.
AW: AW: bean:message format ssn
Ah, I guess I misunderstood your previous post. Maybe this will help you along? snip Use the formatKey attribute if you want to pull it from message resources. Have a look at java.text.DecimalFormat for an explanation of formatting patterns for decimal numbers. /snip The above code came from http://www.junlu.com/msg/45833.html. I didn't even know that this was possible. Lets see if I need it some day! Andreas -Ursprungliche Nachricht- Von: Kumar M [mailto:[EMAIL PROTECTED] Gesendet: Donnerstag, 11. Marz 2004 17:30 An: Struts Users Mailing List Betreff: Re: AW: bean:message format ssn Thanks for your replies. There seems to be a way to format using bean:message. If you look at the following article from Ted Husted: http://www.jguru.com/faq/view.jsp?EID=915891 From the article: ordering.authorized.range.staff=Staff is only authorized to requisition supplies that cost less than ${0,number} USD would convert argument 0 to the number format. Isn't that nice! I was wondering if there is anyway we could extend this for things like ssn. I am looking at the MessageFormat class and all but was wondering if some one has come across this already. Thanks! [EMAIL PROTECTED] wrote: Hi Kumar, when you look at the documentation for bean:write (http://jakarta.apache.org/struts/userGuide/struts-bean.html#write) you can find that it allows formating. Bean:message looks like it does not support this feature - which kind of makes sense when you consider what its used for (lookup of strings in the resources - supporting parameterized replacement). The format of the format string is something like snip - tr - td%= pageContext.getAttribute(test7.value) %/td -td[#,000.00] bean:write name=test7.value format=#,000.00//td -td[bean:message key=format.pattern /] bean:write name=test7.value formatKey=format.pattern//td - /tr /snip The preceeding code came from http://www.mail-archive.com/[EMAIL PROTECTED]/msg20743.html Andreas -Ursprungliche Nachricht- Von: Kumar M [mailto:[EMAIL PROTECTED] Gesendet: Donnerstag, 11. Marz 2004 16:45 An: Struts Users Mailing List Betreff: bean:message format ssn Hi all, I am wondering if there is an easy way to format the ssnn. What I have is a String '123456789' but the users would like to see '123-45-6789'. Is there an easy way of doing this using bean:write or bean:message or any other tag? Thanks!! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Changing position of nested beans
Niall Okay.. Can i assume your solution involves links and scoping to session or is there something I'm missing? On 11 Mar 2004, at 12:19, Niall Pemberton wrote: Mark, Seems to me you have already worked out the solution, except why do you need a lookup dispatch action - rather than a roll your own - you have two methods right - Move Up and Move Down? Your jsp will populate a (foo?) List with either Move Up or Move Down (depending on the button pressed) in the appropriate index position - so you loop through them until you find a none null entry and call the appropriate method depending on the value with the index position you're at. trying to use look up dispatch action seems to be overly complicating things to me. Niall - Original Message - From: Mark Lowe [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Thursday, March 11, 2004 9:31 AM Subject: Changing position of nested beans I was wondering if anyone has found any slick, no javascript dependent solution to the following situation. My question in short is, is there a way of having an indexed dispatch action, or have i been on the crack again? I have a form of nested beans which are ordered according to a position stored in the model. I don't do any sorting in the web tier nor do i want to, other than rejigging the indices of some indexed properties until such a time as the user is ready to save his/her changes to the model. form name=foosForm action=/myapp/save.do input type=text name=foo[0].name input type=text name=foo[1].name input type=text name=foo[2].name /form Now when i save I'll save the index as a field called position, thus all that's fine and dandy. So lets say I want the use to define the position by having a move up and move down, but rather than using an indexed link i want to use a button. I've a lookup dispatch action with a moveup method and all that jazz. html:form action=/save.do logic:iterate id=foo name=foosForm property=foos html:text name=foo property=name indexed=true / html:submit property=method indexed=true bean:message key=button.moveup / /html:submit /logic:iterate /html:form So the rendered html would like like this form name=foosForm action=/myapp/save.do input type=text name=foo[0].nameinput type=submit name=method[0] value=Move Up //and so on /form Of course if i submit this to a lookupdispatch action, its gonna call me a crazy fool. So i need to have some means of having an indexed map key in my key method map, or something to cross the same bridge i'm trying to cross. Any ideas? I know i can do this in javascript which i will once i get things running without it, please no javascript suggestions. - 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]
jsp.error.attribute.noequal
Hi, I keep getting this error.Sometimes recompiling my jsps makes this error go away.but i have so many jsps(atleast 20) that recompiling is giving error in one or the other of them kinda strange wondering how to fix it the error was at this line sometimes and the next one in the rest of the cases: input type=hidden name=id value=%= request.getParameter(id) % bean:write name=teacher property=age / Thanks in advance! - Do you Yahoo!? Yahoo! SiteBuilder - Free web site building tool. Try it!
Formatting in message resources (was: bean:message format ssn)
Yes, the default MessageResources implementation uses the Java Format object, so in some of my messages, I have: my.msg.key=No was found for {0,date,MM} Cool, ain't it? Not sure a lot of people know about it. So you won't have to mess with source code when all you wanna do is change data formatting. Problem is, the JSP tags can only accept string values, so my particular example (date formatting) only works on messages created in my Action objects, not in my JSPs. I'm pretty sure it'll work for Strings, though. --- Andreas Solarik [EMAIL PROTECTED] wrote: Ah, I guess I misunderstood your previous post. Maybe this will help you along? snip Use the formatKey attribute if you want to pull it from message resources. Have a look at java.text.DecimalFormat for an explanation of formatting patterns for decimal numbers. /snip The above code came from http://www.junlu.com/msg/45833.html. I didn't even know that this was possible. Lets see if I need it some day! Andreas -Ursprungliche Nachricht- Von: Kumar M [mailto:[EMAIL PROTECTED] Gesendet: Donnerstag, 11. Marz 2004 17:30 An: Struts Users Mailing List Betreff: Re: AW: bean:message format ssn Thanks for your replies. There seems to be a way to format using bean:message. If you look at the following article from Ted Husted: http://www.jguru.com/faq/view.jsp?EID=915891 From the article: ordering.authorized.range.staff=Staff is only authorized to requisition supplies that cost less than ${0,number} USD would convert argument 0 to the number format. Isn't that nice! I was wondering if there is anyway we could extend this for things like ssn. I am looking at the MessageFormat class and all but was wondering if some one has come across this already. Thanks! [EMAIL PROTECTED] wrote: Hi Kumar, when you look at the documentation for bean:write (http://jakarta.apache.org/struts/userGuide/struts-bean.html#write) you can find that it allows formating. Bean:message looks like it does not support this feature - which kind of makes sense when you consider what its used for (lookup of strings in the resources - supporting parameterized replacement). The format of the format string is something like snip - tr - td%= pageContext.getAttribute(test7.value) %/td -td[#,000.00] bean:write name=test7.value format=#,000.00//td -td[bean:message key=format.pattern /] bean:write name=test7.value formatKey=format.pattern//td - /tr /snip The preceeding code came from http://www.mail-archive.com/[EMAIL PROTECTED]/msg20743.html Andreas -Ursprungliche Nachricht- Von: Kumar M [mailto:[EMAIL PROTECTED] Gesendet: Donnerstag, 11. Marz 2004 16:45 An: Struts Users Mailing List Betreff: bean:message format ssn Hi all, I am wondering if there is an easy way to format the ssnn. What I have is a String '123456789' but the users would like to see '123-45-6789'. Is there an easy way of doing this using bean:write or bean:message or any other tag? Thanks!! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? Yahoo! Search - Find what youre looking for faster http://search.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: AW: AW: bean:message format ssn
Yup, formatKey is pretty handy. We use it to format dates. But bean:write tag seems to do this only when converting from non-String data type to String datatype. What I have is a String '123456789'. One solution is to probably convert this to Integer and that will force it to use a number formatter. But bean:message seems to convert String to String too. And therefore the curiosity! Thanks! [EMAIL PROTECTED] wrote: Ah, I guess I misunderstood your previous post. Maybe this will help you along? snip Use the formatKey attribute if you want to pull it from message resources. Have a look at java.text.DecimalFormat for an explanation of formatting patterns for decimal numbers. /snip The above code came from http://www.junlu.com/msg/45833.html. I didn't even know that this was possible. Lets see if I need it some day! Andreas -Ursprungliche Nachricht- Von: Kumar M [mailto:[EMAIL PROTECTED] Gesendet: Donnerstag, 11. Marz 2004 17:30 An: Struts Users Mailing List Betreff: Re: AW: bean:message format ssn Thanks for your replies. There seems to be a way to format using bean:message. If you look at the following article from Ted Husted: http://www.jguru.com/faq/view.jsp?EID=915891 From the article: ordering.authorized.range.staff=Staff is only authorized to requisition supplies that cost less than ${0,number} USD would convert argument 0 to the number format. Isn't that nice! I was wondering if there is anyway we could extend this for things like ssn. I am looking at the MessageFormat class and all but was wondering if some one has come across this already. Thanks! [EMAIL PROTECTED] wrote: Hi Kumar, when you look at the documentation for bean:write (http://jakarta.apache.org/struts/userGuide/struts-bean.html#write) you can find that it allows formating. Bean:message looks like it does not support this feature - which kind of makes sense when you consider what its used for (lookup of strings in the resources - supporting parameterized replacement). The format of the format string is something like snip - tr - td%= pageContext.getAttribute(test7.value) %/td -td[#,000.00] bean:write name=test7.value format=#,000.00//td -td[bean:message key=format.pattern /] bean:write name=test7.value formatKey=format.pattern//td - /tr /snip The preceeding code came from http://www.mail-archive.com/[EMAIL PROTECTED]/msg20743.html Andreas -Ursprungliche Nachricht- Von: Kumar M [mailto:[EMAIL PROTECTED] Gesendet: Donnerstag, 11. Marz 2004 16:45 An: Struts Users Mailing List Betreff: bean:message format ssn Hi all, I am wondering if there is an easy way to format the ssnn. What I have is a String '123456789' but the users would like to see '123-45-6789'. Is there an easy way of doing this using bean:write or bean:message or any other tag? Thanks!! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Reporting + Struts
Hi Niall, Well, actually I want to generate a report first, And then eventually render it in HTML (or whatever other format). Using jasperreports, easy way could be to generate an XML report and then Render it via some stylesheet in HTML... I was hoping that there is an XSL stylesheet somewhere in jasper that does The trick of producing HTML output from XSL report...and It could save me time instead of writing my own... That's why I was enquiring about that.. i am currently generating a 'so called' report (it's very simple) using struts, some JDBC code and tiles...i m hoping that jasperreports, since it is designed for reports, is in some way better than my 'custom' way.. thanx for comments regards marco -Original Message- From: Niall Pemberton [mailto:[EMAIL PROTECTED] Sent: 11 March 2004 16:36 To: Struts Users Mailing List Subject: Re: Reporting + Struts From what I saw of Jasper a year ago, the html it generated was pretty crud and you had to set up a load of XML in a definitition to generate a report. Now I may be way off base here, but if you want to generate a report in html and then render it using struts why not use jsp, tiles, velocity or something else which is set up to render webapps in html? Niall - Original Message - From: Marco Mistroni [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Sent: Thursday, March 11, 2004 4:00 PM Subject: RE: Reporting + Struts Hi all, I have the same problem... I was going to use jasper (I posted a similar message in jasper mailing list) but I am stucked at the point Of how do I render the report generated by jasper If I want to show it to the user, ideally I have to get the report in XML Format and then convert it to HTML via stylesheet Jasper generates an HTML report, but I am wondering how can I render it to the user via struts... Anyone has any idea or any suggestions? Thanx in advance and regards marco -Original Message- From: Andreas Solarik [mailto:[EMAIL PROTECTED] Sent: 11 March 2004 09:24 To: 'Struts Users Mailing List' Subject: AW: Reporting + Struts Hi Mohamed! Damn, that was a cryptic post. Now you've gone and sparked my curiosity: what rules didn't you follow while snipworking in Actuate the Reporting tool and in J2EE/snip? Regards, Andreas -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Gesendet: Donnerstag, 11. März 2004 10:22 An: Struts Users Mailing List Betreff: Re: Reporting + Struts Hi, I am working in Actuate the Reporting tool and in J2EE also. To answer your first question we are using the struts framework for the reports also but we are not following all the rules. It depends your requirement. Mohamed Abdul Khaliq.M IT Specialist SDC2 - Chennai Ph 8272628 Ext 8098 Shyam A [EMAIL PROTECTED]To: [EMAIL PROTECTED] hoo.com cc: Subject: Reporting + Struts 03/10/2004 11:57 AM Please respond to Struts Users Mailing List Hi, I have a web application in which I need to generate reports on the fly, i.e., the user submits some report criteria on a web page and report has to be generated dynamically. I searched the archives and found that Jasper reports is a good tool to use, and there are some GUI tools available which will help in report design eg. iReports. I have a couple of questions: 1. Is it advisable to use Struts for the reporting application? Or just a JSP/Servlet based application would suffice? 2. Is there a big learning curve for using Jasper reports/IReports? I would appreciate it if somebody could share their experience in using the above mentioned tools. Thanks, Shyam __ Do you Yahoo!? Yahoo! Search - Find what you're looking for faster http://search.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] * This electronic mail message is intended solely for the named recipients and may contain confidential and proprietary business information of eFunds Corporation and all its subsidiaries. If you are not a named recipient, please notify the sender immediately. You may not disclose the contents to any other person; use this electronic mail message or its contents for any other purpose; or further store or copy its contents in any medium * - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL
RE: jsp.error.attribute.noequal
From: as as [mailto:[EMAIL PROTECTED] I keep getting this error.Sometimes recompiling my jsps makes this error go away.but i have so many jsps(atleast 20) that recompiling is giving error in one or the other of them wondering how to fix it input type=hidden name=id value=%= request.getParameter(id) % bean:write name=teacher property=age / I don't understand why you're using input and trying to manually fill in the value. Struts will populate the form from the values coming in in the request, and then write them back out for you in HTML form elements. If you have something special going on (prepopulating from a database) you can set the values in the form bean in your Action and then when you forward to the JSP Struts will again fill in the values for you. Instead of your input tag above, try: html:hidden property=id/ The bean:write tag looks fine. Is it giving an error? -- Wendy Smoak Application Systems Analyst, Sr. ASU IA Information Resources Management - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
struts-workflow-extension and DynaValidatorForm
I am interested in using the workflow extension but do not want to give up using DynaValidatorForm. Is it possible? Dean Hoover - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: AW: AW: bean:message format ssn
Yup, formatKey is pretty handy. We use it to format dates. But bean:write tag seems to do this only when converting from non-String data type to String datatype. What I have is a String '123456789'. One solution is to probably convert this to Integer and that will force it to use a number formatter. You've hit the nail on the head! You're trying to edit a string, while the bean:write formatter (and, for that matter, the JSTL fmt:formatNumber... and fmt:formatDate... tags )translate from something else to a string. The easy way out here is to just write a getter in your FormBean that returns the SSN string with the appropriate punctuation inserted. -- Tim Slattery [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Changing position of nested beans
Not sure if you're looking different ways to do Move Up/Move Down or just a way to make your one button for each item work. If it's the former, you can include a radio button beside each item and have one Move Up and one Move Down button for the whole form. The radio button will have the index of the item it's sitting next to. When a Move button is pressed, you'll have one non-indexed field containing the index of the item to either move up or down, and you can react appropriately. Hmm... the question is, how do you get the value of logic:iterate's indexId to the value of your html:radio without using %= %? Could I have been on the crack, too, and not know it? Hubert -Original Message- From: Mark Lowe [mailto:[EMAIL PROTECTED] Sent: Thursday, March 11, 2004 10:05 AM To: Struts Users Mailing List Subject: Re: Changing position of nested beans Crack smoking gags aside.. I've tried hacking around the problem using the unspecified method to no avail. Looks like storing in session and using links. Unless I have any sudden rushes of blood to the head. On 11 Mar 2004, at 13:21, Niall Pemberton wrote: You know before I read you messages, I would have understood crack programmer as a compliment - now I'm thinking it could be a support group for those of us who spend too much time on lists like this :-). - Original Message - From: Mark Lowe [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Thursday, March 11, 2004 11:51 AM Subject: Re: Changing position of nested beans The only reason why dispatch action appeals is that i can map the form to one action and have several buttons within a form without needing to change to form action with javascript or anything grotty like that. I'm not especially keen dispatch actions . Just this business of using links and the request being cleared leaves me scoping to session and using a link, again i'm not that against scoping to session but I thought someone in the anti httpsession brigade would have a solution for this common problem. I don't think I'm tree-barking but ruminating on dispatch action (although i'm not certain). I'm trying various ways and seeing what happens. But indexed handler parameters seem like the sort of thing that would be required to do such a thing, but seem to be more the consequence of a crack induced state of derangement than something that struts supports. On 11 Mar 2004, at 12:19, Niall Pemberton wrote: Mark, Seems to me you have already worked out the solution, except why do you need a lookup dispatch action - rather than a roll your own - you have two methods right - Move Up and Move Down? Your jsp will populate a (foo?) List with either Move Up or Move Down (depending on the button pressed) in the appropriate index position - so you loop through them until you find a none null entry and call the appropriate method depending on the value with the index position you're at. trying to use look up dispatch action seems to be overly complicating things to me. Niall - Original Message - From: Mark Lowe [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Thursday, March 11, 2004 9:31 AM Subject: Changing position of nested beans I was wondering if anyone has found any slick, no javascript dependent solution to the following situation. My question in short is, is there a way of having an indexed dispatch action, or have i been on the crack again? I have a form of nested beans which are ordered according to a position stored in the model. I don't do any sorting in the web tier nor do i want to, other than rejigging the indices of some indexed properties until such a time as the user is ready to save his/her changes to the model. form name=foosForm action=/myapp/save.do input type=text name=foo[0].name input type=text name=foo[1].name input type=text name=foo[2].name /form Now when i save I'll save the index as a field called position, thus all that's fine and dandy. So lets say I want the use to define the position by having a move up and move down, but rather than using an indexed link i want to use a button. I've a lookup dispatch action with a moveup method and all that jazz. html:form action=/save.do logic:iterate id=foo name=foosForm property=foos html:text name=foo property=name indexed=true / html:submit property=method indexed=true bean:message key=button.moveup / /html:submit /logic:iterate /html:form So the rendered html would like like this form name=foosForm action=/myapp/save.do input type=text name=foo[0].nameinput type=submit name=method[0] value=Move Up //and so on /form Of course if i submit this to a lookupdispatch action, its gonna call me a crazy fool. So i need to have some means of having an indexed map key in my key method map, or something to cross the same bridge i'm trying to cross. Any ideas? I know i
printing pdf using javascript....
Hi all, I have a requirement for printing of a PDF document on load of the page. As soon as the browser window opens, the PDF document need to be loaded and the print dialogue box of the PDF need to open. This works fine with the following code in IE6.0 But when used with the IE5.0, this does not work HTML HEAD TITLEIntranet End user Pages/TITLE script language=javascript function callMe(){ frames[0].focus(); frames[0].print(); } /script /HEAD FRAMESET ROWS=* FRAME name=bottom SRC=temp/abc.pdf onLoad=javascript:callMe() /FRAMESET /HTML If I call the onLoad() function in frameset instead of Frame, the IE5.0 will open the print dialogue box of the Browser(File-print) and not of the PDF software. But this is also does not meet my requirement as I need to get the print dialogue box for the PDF software. They are two different dialogue boxes. FRAMESET ROWS=* onLoad=javascript:callMe() FRAME name=bottom SRC=temp/abc.pdf /FRAMESET Thanks Prashanth - Do you Yahoo!? Yahoo! Search - Find what youre looking for faster.
Re: Reporting + Struts
I sent this earlier, but it didn't seem to reach the list. A number of messages I sent never seemed to arrive (most do) - does anyone else find this? Niall - Original Message - From: Niall Pemberton [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Thursday, March 11, 2004 12:51 PM Subject: [OT]Re: Reporting + Struts I looked briefly at Jasper reports. Its supposed to be good but I decided against using it. You have to set up a load of xml to create a report, doing it by hand would be very cumbersome - you have to use something like iReports to generate the XML. My users wanted a specific look for a report with alot of data accross the page and I struggled to do it in Jasper Reports - maybe simpler stuff it would be much better. Also I wanted pdf versions, but what it actually did was create an image and stuff it in a pdf file, rather than actually writing the data to the pdf file, which means you can't use facilities such as search. There were also other things I wanted to do in pdf, that I couldn't user Jasper I ended up ditching it and creating reports using iText to create pdf files directly. http://www.lowagie.com/iText/ BTW, I wasn't doing it in a web environment and the pdf generation is slow, can take up to 30 seconds for a large report. I am going to be putting reporting into my webapp, but I'm thinking of doing it by the users submitting a request for a report, storing the request in a database, then have a separate machine which wakes up periodically (say every five minutes), checks the requests, generates the report and emails it out to the user. That way my webapp isn't affected by the report generation clogging up the CPU. Niall - Original Message - From: Shyam A [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, March 10, 2004 7:57 PM Subject: Reporting + Struts Hi, I have a web application in which I need to generate reports on the fly, i.e., the user submits some report criteria on a web page and report has to be generated dynamically. I searched the archives and found that Jasper reports is a good tool to use, and there are some GUI tools available which will help in report design eg. iReports. I have a couple of questions: 1. Is it advisable to use Struts for the reporting application? Or just a JSP/Servlet based application would suffice? 2. Is there a big learning curve for using Jasper reports/IReports? I would appreciate it if somebody could share their experience in using the above mentioned tools. Thanks, Shyam __ Do you Yahoo!? Yahoo! Search - Find what you're looking for faster http://search.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[OT] PDF generation (was: Reporting + Struts)
--- Niall Pemberton [EMAIL PROTECTED] wrote: I ended up ditching it and creating reports using iText to create pdf files directly. http://www.lowagie.com/iText/ BTW, I wasn't doing it in a web environment and the pdf generation is slow, can take up to 30 seconds for a large report. I am going to be putting If you think that is slow, wait till you try Apache's FOP. It's been a while, but IIRC, when my reports went five pages or more, I believe it took around 30 secs. With 50 pages, my users started calling and asking if the app was still running. My current users are Excel lovers, so I generate formatted Excel docs (through POI) that they can edit or print directly. I was gonna use IText the next time I needed PDFs. If that's slow too, are there other alternatives? __ Do you Yahoo!? Yahoo! Search - Find what youre looking for faster http://search.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Changing position of nested beans
The radio button could just be the boy.. Nice one Hubert On 11 Mar 2004, at 18:28, Hubert Rabago wrote: Not sure if you're looking different ways to do Move Up/Move Down or just a way to make your one button for each item work. If it's the former, you can include a radio button beside each item and have one Move Up and one Move Down button for the whole form. The radio button will have the index of the item it's sitting next to. When a Move button is pressed, you'll have one non-indexed field containing the index of the item to either move up or down, and you can react appropriately. Hmm... the question is, how do you get the value of logic:iterate's indexId to the value of your html:radio without using %= %? Could I have been on the crack, too, and not know it? Hubert -Original Message- From: Mark Lowe [mailto:[EMAIL PROTECTED] Sent: Thursday, March 11, 2004 10:05 AM To: Struts Users Mailing List Subject: Re: Changing position of nested beans Crack smoking gags aside.. I've tried hacking around the problem using the unspecified method to no avail. Looks like storing in session and using links. Unless I have any sudden rushes of blood to the head. On 11 Mar 2004, at 13:21, Niall Pemberton wrote: You know before I read you messages, I would have understood crack programmer as a compliment - now I'm thinking it could be a support group for those of us who spend too much time on lists like this :-). - Original Message - From: Mark Lowe [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Thursday, March 11, 2004 11:51 AM Subject: Re: Changing position of nested beans The only reason why dispatch action appeals is that i can map the form to one action and have several buttons within a form without needing to change to form action with javascript or anything grotty like that. I'm not especially keen dispatch actions . Just this business of using links and the request being cleared leaves me scoping to session and using a link, again i'm not that against scoping to session but I thought someone in the anti httpsession brigade would have a solution for this common problem. I don't think I'm tree-barking but ruminating on dispatch action (although i'm not certain). I'm trying various ways and seeing what happens. But indexed handler parameters seem like the sort of thing that would be required to do such a thing, but seem to be more the consequence of a crack induced state of derangement than something that struts supports. On 11 Mar 2004, at 12:19, Niall Pemberton wrote: Mark, Seems to me you have already worked out the solution, except why do you need a lookup dispatch action - rather than a roll your own - you have two methods right - Move Up and Move Down? Your jsp will populate a (foo?) List with either Move Up or Move Down (depending on the button pressed) in the appropriate index position - so you loop through them until you find a none null entry and call the appropriate method depending on the value with the index position you're at. trying to use look up dispatch action seems to be overly complicating things to me. Niall - Original Message - From: Mark Lowe [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Thursday, March 11, 2004 9:31 AM Subject: Changing position of nested beans I was wondering if anyone has found any slick, no javascript dependent solution to the following situation. My question in short is, is there a way of having an indexed dispatch action, or have i been on the crack again? I have a form of nested beans which are ordered according to a position stored in the model. I don't do any sorting in the web tier nor do i want to, other than rejigging the indices of some indexed properties until such a time as the user is ready to save his/her changes to the model. form name=foosForm action=/myapp/save.do input type=text name=foo[0].name input type=text name=foo[1].name input type=text name=foo[2].name /form Now when i save I'll save the index as a field called position, thus all that's fine and dandy. So lets say I want the use to define the position by having a move up and move down, but rather than using an indexed link i want to use a button. I've a lookup dispatch action with a moveup method and all that jazz. html:form action=/save.do logic:iterate id=foo name=foosForm property=foos html:text name=foo property=name indexed=true / html:submit property=method indexed=true bean:message key=button.moveup / /html:submit /logic:iterate /html:form So the rendered html would like like this form name=foosForm action=/myapp/save.do input type=text name=foo[0].nameinput type=submit name=method[0] value=Move Up //and so on /form Of course if i submit this to a lookupdispatch action, its gonna call me a crazy fool. So i need to have some means of having an indexed map key in my key method map, or something to cross the same bridge i'm trying to cross. Any ideas? I know i can do this in javascript which
Struts in Action: 12.10.1 Multipage validations
This section of the book sounds interesting, but it would be nice if there were an example somewhere. Can someone point me to one? Dean Hoover - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: AW: AW: bean:message format ssn
Tim, That is what I have right now...and is ofcourse very simple to do it in FormBeans :). But I have to do this at a number of places/form beans, so I was wondering if it could be done using bean:message as I mentioned in the subject of this e-mail (not necessarily bean:write). Thanks! [EMAIL PROTECTED] wrote: Yup, formatKey is pretty handy. We use it to format dates. But bean:write tag seems to do this only when converting from non-String data type to String datatype. What I have is a String '123456789'. One solution is to probably convert this to Integer and that will force it to use a number formatter. You've hit the nail on the head! You're trying to edit a string, while the bean:write formatter (and, for that matter, the JSTL fmt:formatNumber... and fmt:formatDate... tags )translate from something else to a string. The easy way out here is to just write a getter in your FormBean that returns the SSN string with the appropriate punctuation inserted. -- Tim Slattery [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
How to make AND and OR conditions with logic struts tags
Anyone know how to create a condition with struts? Thanks, Julio
[OT] How to tell whether a HTML/JSP page is on the same machine as the Servlet it calls
Hi, I am trying to find out whether a HTML or JSP page in on the same machine as the Servlet it calls. The reason I want to do this is preventing a page not on the Servlet machine from posting to the Servlet. I tried comparing the Referer header info with the RemoteHost info, but unfortunately request.getRemoteHost() doesn't give me the real host name when the Servlet machine is behind the firewall. Any ideas about this? TIA, Saul
Re: How to make AND and OR conditions with logic struts tags
This may not work for your situation, but you could try: AND: logic: name=...logic: name=... stuff /logic:_/logic:_ OR: logic:bean:define name=test //logic:_ logic:bean:define name=test //logic:_ logic:present name=test stuff /logic:present Paul Global Equity Derivatives Technology Deutsche Bank [/] Julio Cesar De Salvo [EMAIL PROTECTED] 11/03/2004 15:23 Please respond to Struts Users Mailing List To: 'Struts Users Mailing List' [EMAIL PROTECTED] cc: Subject:How to make AND and OR conditions with logic struts tags Anyone know how to create a condition with struts? Thanks, Julio - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How to make AND and OR conditions with logic struts tags
Anyone know how to create a condition with struts? With the Struts logic: tags, you don't. Use the JSTL tags instead: c:if test=${ arbitrary logical expression} whatever /c:if And c:choose c:when test=${...} whatever /c:when more when clauses c:otherwise stuff that happens when none of the when clauses execute /c:otherwise /c:choose -- Tim Slattery [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [OT] PDF generation (was: Reporting + Struts)
Niall Pemberton wrote http://www.lowagie.com/iText/ BTW, I wasn't doing it in a web environment and the pdf generation is slow, can take up to 30 seconds for a large report. I'm using iText for my Struts app, and it's not that slow for me... 120 pages in ~7 seconds. I suppose it depends on what you're trying to transform, though. Mine is pre-formatted text, the only thing I do is page breaks. Hubert Rabago wrote: My current users are Excel lovers, so I generate formatted Excel docs (through POI) that they can edit or print directly. Do you have a small example? I'm currently sending a CSV from my Struts app, but there is a huge demand for Excel. I've started experimenting with the XML structure of an Excel Workbook, but I don't know how far that's going to get me. -- Wendy Smoak Application Systems Analyst, Sr. ASU IA Information Resources Management - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[OT] Database password
Hi: Our Struts application is currently in production. This applciation uses an Oracle Database (we are using DBCP from jakarta). We access this database through url, user a password and we need to hide the production database password. The password is stored in a configuration file and is in plain text. Have you got some best practices in this scenario? How are your Java Applications get connected to production databases and how is the database password protected? If we encrypt the password with 3DES, how should the key be protected? Cheers. Guillermo. NOTA DE CONFIDENCIALIDAD Este mensaje (y sus anexos) es confidencial, esta dirigido exclusivamente a las personas direccionadas en el mail y puede contener informacion (i)de propiedad exclusiva de Interbanking S.A. o (ii) amparada por el secreto profesional. Cualquier opinion en el contenido, es exclusiva de su autor y no representa necesariamente la opinion de Interbanking S.A. El acceso no autorizado, uso, reproduccion, o divulgacion esta prohibido. Interbanking S.A no asumira responsabilidad ni obligacion legal alguna por cualquier informacion incorrecta o alterada contenida en este mensaje. Si usted ha recibido este mensaje por error, le rogamos tenga la amabilidad de destruirlo inmediatamente junto con todas las copias del mismo, notificando al remitente. No debera utilizar, revelar, distribuir, imprimir o copiar este mensaje ni ninguna de sus partes si usted no es el destinatario. Muchas gracias.
Re: [OT] Database password
If the problem is the user accesing the plain text file by typing the URL in the browser... a better solution would be to tell apache to hide those files... - Original Message - From: Guillermo Meyer [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Sent: Thursday, March 11, 2004 3:49 PM Subject: [OT] Database password Hi: Our Struts application is currently in production. This applciation uses an Oracle Database (we are using DBCP from jakarta). We access this database through url, user a password and we need to hide the production database password. The password is stored in a configuration file and is in plain text. Have you got some best practices in this scenario? How are your Java Applications get connected to production databases and how is the database password protected? If we encrypt the password with 3DES, how should the key be protected? Cheers. Guillermo. NOTA DE CONFIDENCIALIDAD Este mensaje (y sus anexos) es confidencial, esta dirigido exclusivamente a las personas direccionadas en el mail y puede contener informacion (i)de propiedad exclusiva de Interbanking S.A. o (ii) amparada por el secreto profesional. Cualquier opinion en el contenido, es exclusiva de su autor y no representa necesariamente la opinion de Interbanking S.A. El acceso no autorizado, uso, reproduccion, o divulgacion esta prohibido. Interbanking S.A no asumira responsabilidad ni obligacion legal alguna por cualquier informacion incorrecta o alterada contenida en este mensaje. Si usted ha recibido este mensaje por error, le rogamos tenga la amabilidad de destruirlo inmediatamente junto con todas las copias del mismo, notificando al remitente. No debera utilizar, revelar, distribuir, imprimir o copiar este mensaje ni ninguna de sus partes si usted no es el destinatario. Muchas gracias. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] PDF generation (was: Reporting + Struts)
We use POI as well, the best place to start is the Quick Guide: http://jakarta.apache.org/poi/hssf/quick-guide.html Niall - Original Message - From: Wendy Smoak [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Thursday, March 11, 2004 6:37 PM Subject: RE: [OT] PDF generation (was: Reporting + Struts) Niall Pemberton wrote http://www.lowagie.com/iText/ BTW, I wasn't doing it in a web environment and the pdf generation is slow, can take up to 30 seconds for a large report. I'm using iText for my Struts app, and it's not that slow for me... 120 pages in ~7 seconds. I suppose it depends on what you're trying to transform, though. Mine is pre-formatted text, the only thing I do is page breaks. Hubert Rabago wrote: My current users are Excel lovers, so I generate formatted Excel docs (through POI) that they can edit or print directly. Do you have a small example? I'm currently sending a CSV from my Struts app, but there is a huge demand for Excel. I've started experimenting with the XML structure of an Excel Workbook, but I don't know how far that's going to get me. -- Wendy Smoak Application Systems Analyst, Sr. ASU IA Information Resources Management - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [OT] Database password
From: Guillermo Meyer [mailto:[EMAIL PROTECTED] How are your Java Applications get connected to production databases and how is the database password protected? I make no claims of best practices. My Factory class that produces (non-JDBC) connections to my database reads a .properties file to get the account to connect to, and, optionally, the userid and password, hostname and timeouts. The default userid and password (among other things) are compiled into the Factory class, and the java source code does not live on the web server. In the event we need to change the userid/password, I can add it to the .properties file temporarily until I can recompile and deploy the changed version. -- Wendy Smoak Application Systems Analyst, Sr. ASU IA Information Resources Management - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [OT] Database password
Users cant access this file, but the file can be accessed by people that is not from Information Security area (Seguridad Informática). The password shouldnt be known neither by the application deployer, nor the system administrator, but only by Information Security people. -Original Message- From: Lucas Gonzalez [mailto:[EMAIL PROTECTED] Sent: Jueves, 11 de Marzo de 2004 03:56 p.m. To: Struts Users Mailing List Subject: Re: [OT] Database password If the problem is the user accesing the plain text file by typing the URL in the browser... a better solution would be to tell apache to hide those files... - Original Message - From: Guillermo Meyer [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Sent: Thursday, March 11, 2004 3:49 PM Subject: [OT] Database password Hi: Our Struts application is currently in production. This applciation uses an Oracle Database (we are using DBCP from jakarta). We access this database through url, user a password and we need to hide the production database password. The password is stored in a configuration file and is in plain text. Have you got some best practices in this scenario? How are your Java Applications get connected to production databases and how is the database password protected? If we encrypt the password with 3DES, how should the key be protected? Cheers. Guillermo. NOTA DE CONFIDENCIALIDAD Este mensaje (y sus anexos) es confidencial, esta dirigido exclusivamente a las personas direccionadas en el mail y puede contener informacion (i)de propiedad exclusiva de Interbanking S.A. o (ii) amparada por el secreto profesional. Cualquier opinion en el contenido, es exclusiva de su autor y no representa necesariamente la opinion de Interbanking S.A. El acceso no autorizado, uso, reproduccion, o divulgacion esta prohibido. Interbanking S.A no asumira responsabilidad ni obligacion legal alguna por cualquier informacion incorrecta o alterada contenida en este mensaje. Si usted ha recibido este mensaje por error, le rogamos tenga la amabilidad de destruirlo inmediatamente junto con todas las copias del mismo, notificando al remitente. No debera utilizar, revelar, distribuir, imprimir o copiar este mensaje ni ninguna de sus partes si usted no es el destinatario. Muchas gracias. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] NOTA DE CONFIDENCIALIDAD Este mensaje (y sus anexos) es confidencial, esta dirigido exclusivamente a las personas direccionadas en el mail y puede contener informacion (i)de propiedad exclusiva de Interbanking S.A. o (ii) amparada por el secreto profesional. Cualquier opinion en el contenido, es exclusiva de su autor y no representa necesariamente la opinion de Interbanking S.A. El acceso no autorizado, uso, reproduccion, o divulgacion esta prohibido. Interbanking S.A no asumira responsabilidad ni obligacion legal alguna por cualquier informacion incorrecta o alterada contenida en este mensaje. Si usted ha recibido este mensaje por error, le rogamos tenga la amabilidad de destruirlo inmediatamente junto con todas las copias del mismo, notificando al remitente. No debera utilizar, revelar, distribuir, imprimir o copiar este mensaje ni ninguna de sus partes si usted no es el destinatario. Muchas gracias. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] Database password
I believe that it will be easier to define a proper security policy in your production server than trying to hide the password or encrypt it. Another option is to hard-code it into your source, but you will loose some flexibility there. Hope that helps Lucas - Original Message - From: Guillermo Meyer [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Sent: Thursday, March 11, 2004 3:59 PM Subject: RE: [OT] Database password Users cant access this file, but the file can be accessed by people that is not from Information Security area (Seguridad Informática). The password shouldnt be known neither by the application deployer, nor the system administrator, but only by Information Security people. -Original Message- From: Lucas Gonzalez [mailto:[EMAIL PROTECTED] Sent: Jueves, 11 de Marzo de 2004 03:56 p.m. To: Struts Users Mailing List Subject: Re: [OT] Database password If the problem is the user accesing the plain text file by typing the URL in the browser... a better solution would be to tell apache to hide those files... - Original Message - From: Guillermo Meyer [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Sent: Thursday, March 11, 2004 3:49 PM Subject: [OT] Database password Hi: Our Struts application is currently in production. This applciation uses an Oracle Database (we are using DBCP from jakarta). We access this database through url, user a password and we need to hide the production database password. The password is stored in a configuration file and is in plain text. Have you got some best practices in this scenario? How are your Java Applications get connected to production databases and how is the database password protected? If we encrypt the password with 3DES, how should the key be protected? Cheers. Guillermo. NOTA DE CONFIDENCIALIDAD Este mensaje (y sus anexos) es confidencial, esta dirigido exclusivamente a las personas direccionadas en el mail y puede contener informacion (i)de propiedad exclusiva de Interbanking S.A. o (ii) amparada por el secreto profesional. Cualquier opinion en el contenido, es exclusiva de su autor y no representa necesariamente la opinion de Interbanking S.A. El acceso no autorizado, uso, reproduccion, o divulgacion esta prohibido. Interbanking S.A no asumira responsabilidad ni obligacion legal alguna por cualquier informacion incorrecta o alterada contenida en este mensaje. Si usted ha recibido este mensaje por error, le rogamos tenga la amabilidad de destruirlo inmediatamente junto con todas las copias del mismo, notificando al remitente. No debera utilizar, revelar, distribuir, imprimir o copiar este mensaje ni ninguna de sus partes si usted no es el destinatario. Muchas gracias. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] NOTA DE CONFIDENCIALIDAD Este mensaje (y sus anexos) es confidencial, esta dirigido exclusivamente a las personas direccionadas en el mail y puede contener informacion (i)de propiedad exclusiva de Interbanking S.A. o (ii) amparada por el secreto profesional. Cualquier opinion en el contenido, es exclusiva de su autor y no representa necesariamente la opinion de Interbanking S.A. El acceso no autorizado, uso, reproduccion, o divulgacion esta prohibido. Interbanking S.A no asumira responsabilidad ni obligacion legal alguna por cualquier informacion incorrecta o alterada contenida en este mensaje. Si usted ha recibido este mensaje por error, le rogamos tenga la amabilidad de destruirlo inmediatamente junto con todas las copias del mismo, notificando al remitente. No debera utilizar, revelar, distribuir, imprimir o copiar este mensaje ni ninguna de sus partes si usted no es el destinatario. Muchas gracias. - 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: [OT] PDF generation (was: Reporting + Struts)
--- Wendy Smoak [EMAIL PROTECTED] wrote: Hubert Rabago wrote: My current users are Excel lovers, so I generate formatted Excel docs (through POI) that they can edit or print directly. Do you have a small example? I'm currently sending a CSV from my Struts app, but there is a huge demand for Excel. I've started experimenting with the XML structure of an Excel Workbook, but I don't know how far that's going to get me. I found this really helpful: http://jakarta.apache.org/poi/hssf/quick-guide.html It's their Busy Developers' Guide to HSSF Features and it gives you the complete needed to produce a worksheet to see each feature, one at a time. I got 95% of what I needed there, and the rest by studying the method signatures of the different classes. Hubert __ Do you Yahoo!? Yahoo! Search - Find what youre looking for faster http://search.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Reporting + Struts
Niall, Thanks for sharing your experience with Jasper reports. Looks like using iText will make things easier for me. I noticed that I also missed a few posts on the same thread. Thanks, Shyam --- Niall Pemberton [EMAIL PROTECTED] wrote: I sent this earlier, but it didn't seem to reach the list. A number of messages I sent never seemed to arrive (most do) - does anyone else find this? Niall - Original Message - From: Niall Pemberton [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Thursday, March 11, 2004 12:51 PM Subject: [OT]Re: Reporting + Struts I looked briefly at Jasper reports. Its supposed to be good but I decided against using it. You have to set up a load of xml to create a report, doing it by hand would be very cumbersome - you have to use something like iReports to generate the XML. My users wanted a specific look for a report with alot of data accross the page and I struggled to do it in Jasper Reports - maybe simpler stuff it would be much better. Also I wanted pdf versions, but what it actually did was create an image and stuff it in a pdf file, rather than actually writing the data to the pdf file, which means you can't use facilities such as search. There were also other things I wanted to do in pdf, that I couldn't user Jasper I ended up ditching it and creating reports using iText to create pdf files directly. http://www.lowagie.com/iText/ BTW, I wasn't doing it in a web environment and the pdf generation is slow, can take up to 30 seconds for a large report. I am going to be putting reporting into my webapp, but I'm thinking of doing it by the users submitting a request for a report, storing the request in a database, then have a separate machine which wakes up periodically (say every five minutes), checks the requests, generates the report and emails it out to the user. That way my webapp isn't affected by the report generation clogging up the CPU. Niall - Original Message - From: Shyam A [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, March 10, 2004 7:57 PM Subject: Reporting + Struts Hi, I have a web application in which I need to generate reports on the fly, i.e., the user submits some report criteria on a web page and report has to be generated dynamically. I searched the archives and found that Jasper reports is a good tool to use, and there are some GUI tools available which will help in report design eg. iReports. I have a couple of questions: 1. Is it advisable to use Struts for the reporting application? Or just a JSP/Servlet based application would suffice? 2. Is there a big learning curve for using Jasper reports/IReports? I would appreciate it if somebody could share their experience in using the above mentioned tools. Thanks, Shyam __ Do you Yahoo!? Yahoo! Search - Find what you're looking for faster http://search.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? Yahoo! Search - Find what youre looking for faster http://search.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] PDF generation (was: Reporting + Struts)
Wendy's post about this suggests that she isn't having a problem with it (120 pages in 7 seconds). To get a sexy looking grid on the page, with nice headers (multi-line, cell spaning stuff) we created our own TableRenderer based on iText's PdfPTableEvent - it handles drawing the headers and nice colored lines around all the cells. I think that slows it down quite a bit. As well as that, we wanted nice page headers and footers, with page numbering and ended up doing that through the PdfPageEvents. I think the combination of all that slows it down. Its probably not as bad as I think though - we currently generate a report by kicking of a batch script which starts up its own jvm and initializes a db framework - if I put it in a web app, that wouldn't happen every time, plus we could cache our report definitions - so maybe we would save a proportion of the 30 seconds. Thats next on my list after the current stuff I'm doing. Niall - Original Message - From: Hubert Rabago [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Thursday, March 11, 2004 5:57 PM Subject: [OT] PDF generation (was: Reporting + Struts) --- Niall Pemberton [EMAIL PROTECTED] wrote: I ended up ditching it and creating reports using iText to create pdf files directly. http://www.lowagie.com/iText/ BTW, I wasn't doing it in a web environment and the pdf generation is slow, can take up to 30 seconds for a large report. I am going to be putting If you think that is slow, wait till you try Apache's FOP. It's been a while, but IIRC, when my reports went five pages or more, I believe it took around 30 secs. With 50 pages, my users started calling and asking if the app was still running. My current users are Excel lovers, so I generate formatted Excel docs (through POI) that they can edit or print directly. I was gonna use IText the next time I needed PDFs. If that's slow too, ar e there other alternatives? __ Do you Yahoo!? Yahoo! Search - Find what you're looking for faster http://search.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Struts in Action: 12.10.1 Multipage validations
I'm not guaranteeing that this is the best way to do it, but it works for me ;-) validator name=date1LEdate2 classname=portfolio.CustomValidators method=date1LEdate2 methodParams=java.lang.Object, org.apache.commons.validator.ValidatorAction, org.apache.commons.validator.Field, org.apache.struts.action.ActionErrors, javax.servlet.http.HttpServletRequest msg=errors.daterange /validator private static final String dateTimeFormat = MM/dd/-HH:mm:ss; /* * This validator must be associated with date2 (the later date), * not date1. (This is so that date1 has already been validated.) * date1 and date2 must use the same datePattern and * they must have already been validated as valid dates, */ public static boolean date1LEdate2( Object bean, ValidatorAction va, Field field, ActionErrors errors, HttpServletRequest request ) { String date2Property = field.getProperty(); String dateStr2 = ValidatorUtil.getValueAsString(bean,date2Property); String date1Property = field.getVarValue(date1); String dateStr1 = ValidatorUtil.getValueAsString(bean,date1Property); String datePattern = null; try { datePattern = field.getVarValue(datePatternStrict); } catch (Exception e1) { try { datePattern = field.getVarValue(datePattern); } catch (Exception e2) {} } if (datePattern == null) { errors.add( field.getKey(), new ActionMessage(errors.validator.config) ); return false; } boolean returnVal; try { SimpleDateFormat formatter = new SimpleDateFormat(datePattern); Date date1 = formatter.parse(dateStr1, new ParsePosition(0)); Date date2 = formatter.parse(dateStr2, new ParsePosition(0)); returnVal = date1.compareTo(date2) = 0 ? true : false; } catch (Exception e) { System.out.println(e); e.printStackTrace(); returnVal = false; } if ( returnVal == false ) { errors.add( field.getKey(), new ActionMessage(errors.daterange, date1Property, date2Property) ); } return returnVal; } -Original Message- From: Dean A. Hoover [mailto:[EMAIL PROTECTED] Sent: Thursday, March 11, 2004 1:12 PM To: [EMAIL PROTECTED] Subject: Struts in Action: 12.10.1 Multipage validations This section of the book sounds interesting, but it would be nice if there were an example somewhere. Can someone point me to one? Dean Hoover - 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]
help implementing modules...
I've successfully used Struts for several applications and have been very happy with it. I am getting ready to use it for a larger project and would like to use modules but I'm having some problems. It appears that when I attempt to switch from the default module to a new module (module1) it never actually recognizes the new module. When I attempt to go to a page in the new module that references an action that is defined in the new module action mappings I consistently get the following error. I have looked through the documentation and browsed the list archive and still can not figure out what I'm doing wrong. Any help appreciated. Also, if anyone knows a good book that documents modules well I'd like to know (Struts In Action and Jakarta Struts have little information on modules). The error: ... [2004/03/11 11:23:07] Cannot retrieve mapping for action /DomainSearch javax.servlet.jsp.JspException: Cannot retrieve mapping for action /DomainSearch at org.apache.struts.taglib.html.FormTag.lookup(FormTag.java:810) at org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:506) at org.apache.strutsel.taglib.html.ELFormTag.doStartTag(ELFormTag.java:324) at _module1._home__jsp._jspService(_home__jsp.java:448) ... Here is my web.xml where I define the module: ... init-param id=InitParam_4 param-nameconfig/module1/param-name param-value/WEB-INF/struts-config-module1.xml/param-value /init-param ... Here is my forward to the page in module1: ... action path=/Module1HomeLink type=com.qualcomm.bds.struts.SampleAppSuccessAction unknown=false validate=false forward name=success path=/module1/Home.jsp contextRelative=true redirect=true / /action ... Here is my link on the originating jsp (in default module): ... html-el:link action=Module1HomeLinkbean:message key=label.module1//html-el:link ... Here is the form in the new module that references the action: ... html-el:form action=DomainSearch ... Here is the action in the module1 config file: ... action path=/DomainSearch name=SearchForm type=com.qualcomm.bds.struts.SampleAppSearchAction unknown=false validate=true input=/module1/Home.jsp forward name=success path=/module1/List.jsp contextRelative=true / exception key=errors.generic type=java.lang.Exception/ /action ... - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
problems with ValidatorActionForm
I'm working with ValidatorForm, but the validate javascript function is not being created when I use the ValidatorAction form. Any one has a llitle walkthrough to configure this properly? Thanks, Julio
RE: help implementing modules...
I don't know if this will help, but you have to prepend the module name into your URL. Thus, your link should look like html-el:form action=module1/DomainSearch I've found the short section in the struts the most helpful when dealing with modules http://jakarta.apache.org/struts/userGuide/configuration.html#dd_config_modu les -Original Message- From: Damm, Gary [SMTP:[EMAIL PROTECTED] Sent: Thursday, March 11, 2004 1:56 PM To: [EMAIL PROTECTED] Subject: help implementing modules... I've successfully used Struts for several applications and have been very happy with it. I am getting ready to use it for a larger project and would like to use modules but I'm having some problems. It appears that when I attempt to switch from the default module to a new module (module1) it never actually recognizes the new module. When I attempt to go to a page in the new module that references an action that is defined in the new module action mappings I consistently get the following error. I have looked through the documentation and browsed the list archive and still can not figure out what I'm doing wrong. Any help appreciated. Also, if anyone knows a good book that documents modules well I'd like to know (Struts In Action and Jakarta Struts have little information on modules). The error: ... [2004/03/11 11:23:07] Cannot retrieve mapping for action /DomainSearch javax.servlet.jsp.JspException: Cannot retrieve mapping for action /DomainSearch at org.apache.struts.taglib.html.FormTag.lookup(FormTag.java:810) at org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:506) at org.apache.strutsel.taglib.html.ELFormTag.doStartTag(ELFormTag.java:324) at _module1._home__jsp._jspService(_home__jsp.java:448) ... Here is my web.xml where I define the module: ... init-param id=InitParam_4 param-nameconfig/module1/param-name param-value/WEB-INF/struts-config-module1.xml/param-value /init-param ... Here is my forward to the page in module1: ... action path=/Module1HomeLink type=com.qualcomm.bds.struts.SampleAppSuccessAction unknown=false validate=false forward name=success path=/module1/Home.jsp contextRelative=true redirect=true / /action ... Here is my link on the originating jsp (in default module): ... html-el:link action=Module1HomeLinkbean:message key=label.module1//html-el:link ... Here is the form in the new module that references the action: ... html-el:form action=DomainSearch ... Here is the action in the module1 config file: ... action path=/DomainSearch name=SearchForm type=com.qualcomm.bds.struts.SampleAppSearchAction unknown=false validate=true input=/module1/Home.jsp forward name=success path=/module1/List.jsp contextRelative=true / exception key=errors.generic type=java.lang.Exception/ /action ... - 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: [OT] Database password
I have to say I think putting it in the source code is the worst possible option. If for security reasons (say one of your developers leaves unhappily!) you need to change your database password, I don't think you want to have to change your java source, compile and re-deploy your app in order to achieve this. Its got to be better to have this as some kind of configuration parameter - you just have to make sure you protect the host's configuration properly. Niall - Original Message - From: Lucas Gonzalez [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Thursday, March 11, 2004 7:07 PM Subject: Re: [OT] Database password I believe that it will be easier to define a proper security policy in your production server than trying to hide the password or encrypt it. Another option is to hard-code it into your source, but you will loose some flexibility there. Hope that helps Lucas - Original Message - From: Guillermo Meyer [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Sent: Thursday, March 11, 2004 3:59 PM Subject: RE: [OT] Database password Users cant access this file, but the file can be accessed by people that is not from Information Security area (Seguridad Informática). The password shouldnt be known neither by the application deployer, nor the system administrator, but only by Information Security people. -Original Message- From: Lucas Gonzalez [mailto:[EMAIL PROTECTED] Sent: Jueves, 11 de Marzo de 2004 03:56 p.m. To: Struts Users Mailing List Subject: Re: [OT] Database password If the problem is the user accesing the plain text file by typing the URL in the browser... a better solution would be to tell apache to hide those files... - Original Message - From: Guillermo Meyer [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Sent: Thursday, March 11, 2004 3:49 PM Subject: [OT] Database password Hi: Our Struts application is currently in production. This applciation uses an Oracle Database (we are using DBCP from jakarta). We access this database through url, user a password and we need to hide the production database password. The password is stored in a configuration file and is in plain text. Have you got some best practices in this scenario? How are your Java Applications get connected to production databases and how is the database password protected? If we encrypt the password with 3DES, how should the key be protected? Cheers. Guillermo. NOTA DE CONFIDENCIALIDAD Este mensaje (y sus anexos) es confidencial, esta dirigido exclusivamente a las personas direccionadas en el mail y puede contener informacion (i)de propiedad exclusiva de Interbanking S.A. o (ii) amparada por el secreto profesional. Cualquier opinion en el contenido, es exclusiva de su autor y no representa necesariamente la opinion de Interbanking S.A. El acceso no autorizado, uso, reproduccion, o divulgacion esta prohibido. Interbanking S.A no asumira responsabilidad ni obligacion legal alguna por cualquier informacion incorrecta o alterada contenida en este mensaje. Si usted ha recibido este mensaje por error, le rogamos tenga la amabilidad de destruirlo inmediatamente junto con todas las copias del mismo, notificando al remitente. No debera utilizar, revelar, distribuir, imprimir o copiar este mensaje ni ninguna de sus partes si usted no es el destinatario. Muchas gracias. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] NOTA DE CONFIDENCIALIDAD Este mensaje (y sus anexos) es confidencial, esta dirigido exclusivamente a las personas direccionadas en el mail y puede contener informacion (i)de propiedad exclusiva de Interbanking S.A. o (ii) amparada por el secreto profesional. Cualquier opinion en el contenido, es exclusiva de su autor y no representa necesariamente la opinion de Interbanking S.A. El acceso no autorizado, uso, reproduccion, o divulgacion esta prohibido. Interbanking S.A no asumira responsabilidad ni obligacion legal alguna por cualquier informacion incorrecta o alterada contenida en este mensaje. Si usted ha recibido este mensaje por error, le rogamos tenga la amabilidad de destruirlo inmediatamente junto con todas las copias del mismo, notificando al remitente. No debera utilizar, revelar, distribuir, imprimir o copiar este mensaje ni ninguna de sus partes si usted no es el destinatario. Muchas gracias. - 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]