Re: Missing bean when validating
Thanks, Hubert! That was the information I was looking for. Hubert Rabago wrote: http://www.mail-archive.com/struts-user%40jakarta.apache.org/msg94386.html hth, Hubert --- Martin Gross [EMAIL PROTECTED] wrote: Hi, I have a form with a dropdown list: html:options collection=campaignList property=id labelProperty=name / The collection is set by an action which redirects to this form. action path=/showNewCampaigns type=de.evolt.newsletter.webgui.CampaignAction scope=request forward name=success path=edit.campaign / /action I use Validator to check the values of this form when submitting it. action path=/updateCampaign type=de.evolt.newsletter.webgui.CampaignAction name=campaignForm scope=request input=edit.campaign forward name=success path=/showNewsletterOverview.do / /action The problem is that I get an Cannot find bean campaignList error when validation detects that a required field was not filled. I could solve the problem putting campaignList into session scope. But is there another solution without putting campaignList into session scope (e.g. request scope)? Regards, Martin __ Do you Yahoo!? Get better spam protection with Yahoo! Mail. http://antispam.yahoo.com/tools - 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]
Missing bean when validating
Hi, I have a form with a dropdown list: html:options collection=campaignList property=id labelProperty=name / The collection is set by an action which redirects to this form. action path=/showNewCampaigns type=de.evolt.newsletter.webgui.CampaignAction scope=request forward name=success path=edit.campaign / /action I use Validator to check the values of this form when submitting it. action path=/updateCampaign type=de.evolt.newsletter.webgui.CampaignAction name=campaignForm scope=request input=edit.campaign forward name=success path=/showNewsletterOverview.do / /action The problem is that I get an Cannot find bean campaignList error when validation detects that a required field was not filled. I could solve the problem putting campaignList into session scope. But is there another solution without putting campaignList into session scope (e.g. request scope)? Regards, Martin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Best Practice for long running tasks with status check
Hi, I need to start an long running task by a struts action which will run for maybe half an hour. I dont want the action to run for half an hour. It should start the task and then respond that the task has been started. Also it should be possible to check the status of the task and see for example how many elements have already been processed. What would be the best practice to do this? Code examples would be also appreciated. Regards, Martin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re[2]: Best Practice for long running tasks with status check
hi marco, thanks for the information. I will check JMX. Regards, Martin Hi, My 2 cents.. For the first half of your query, you can use JMX timer. Best way to do that Is to write an MBean that register itself with the timer and eventually receive notifications. You can make so that the 'object htat needs to be updated all the time' is A listener to notifications sent from the Timer. This 'object' should be inside your Mbean, and you can write a method on your MBean that returns the Current status. Ok, maybe I am giving u too much info, but please check JMX and the Timer service to see if it suits you Regards marco -Original Message- From: Martin Gross [mailto:[EMAIL PROTECTED] Sent: 29 January 2004 17:20 To: Struts Users Mailing List Subject: Best Practice for long running tasks with status check Hi, I need to start an long running task by a struts action which will run for maybe half an hour. I dont want the action to run for half an hour. It should start the task and then respond that the task has been started. Also it should be possible to check the status of the task and see for example how many elements have already been processed. What would be the best practice to do this? Code examples would be also appreciated. Regards, Martin - 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[2]: Best Practice for long running tasks with status check
How would I get the results from the getter to the browser if I want them regularily? With a meta-refresh in the html page? Or some kind of keeping the connection or response open? Create a bean with a list of tasks to complete and have a thread execute them and then have a getter that will respond with the total tasks over tasks completed. -Original Message- From: Martin Gross [mailto:[EMAIL PROTECTED] Sent: Thursday, January 29, 2004 11:20 AM To: Struts Users Mailing List Subject: Best Practice for long running tasks with status check Hi, I need to start an long running task by a struts action which will run for maybe half an hour. I dont want the action to run for half an hour. It should start the task and then respond that the task has been started. Also it should be possible to check the status of the task and see for example how many elements have already been processed. What would be the best practice to do this? Code examples would be also appreciated. Regards, Martin - 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[4]: Best Practice for long running tasks with status check
Thanks, I think I will do it this way. I do not know how they managed to do that: But I saw in another webapp that the application did send some kind of continuing response to the browser. The resulting page kept on growing with the messages until all tasks were finished. It was the same effect like browsing with a very slow internet connection. Probably they did some kind of response manipulation on a servlet level. The only way to force a client to update is to do a meta-refresh in the html. The other thing you can do is setup a callback handler, so you can have Bean A, listen for events from you task thread, telling you when things are completed. You in turn, ask Bean A for information that it receives as a call back handler for your task thread. -Original Message- From: Martin Gross [mailto:[EMAIL PROTECTED] Sent: Thursday, January 29, 2004 12:55 PM To: Struts Users Mailing List Subject: Re[2]: Best Practice for long running tasks with status check How would I get the results from the getter to the browser if I want them regularily? With a meta-refresh in the html page? Or some kind of keeping the connection or response open? Create a bean with a list of tasks to complete and have a thread execute them and then have a getter that will respond with the total tasks over tasks completed. -Original Message- From: Martin Gross [mailto:[EMAIL PROTECTED] Sent: Thursday, January 29, 2004 11:20 AM To: Struts Users Mailing List Subject: Best Practice for long running tasks with status check Hi, I need to start an long running task by a struts action which will run for maybe half an hour. I dont want the action to run for half an hour. It should start the task and then respond that the task has been started. Also it should be possible to check the status of the task and see for example how many elements have already been processed. What would be the best practice to do this? Code examples would be also appreciated. Regards, Martin - 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[2]: How to read contents of MANIFEST.MF
That is what I was looking for. Thanks a lot. Will this do? import java.util.jar.Manifest; ... ServletContext ctx = ...; InputStream in = ctx.getResourceAsStream(/META-INF/MANIFEST.MF); if (in != null) { Manifest mfst = new Manifest(in); ... in.close(); } Quoting Martin Gross [EMAIL PROTECTED]: I would like to read the content of /WEB-INF/META-INF/MANIFEST.MF file by a struts based application. Does anybody have an example how to do it? The only references I found are only for jar files. TIA, Martin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Sharing violation when editing JSP file
Hi, I ported an existing web application to Struts 1.1b3. Now I am getting a sharing violation whenever I try to save an edited JSP file after testing the application. The file seems to be locked by Tomcat. After restarting tomcat everything works fine as long as I do not test the application in my browser. My environment is Tomcat 4.0.3 on Win2K with Struts 1.1b3. Does anybody know of a solution? It is very annoying to restart tomcat for each small change in a JSP. Regards, Martin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tool to convert html file to strustified jsp
Look at the ressources part of the Jakarta Struts Website. One example would be Struts Console. is there any tool which can convert an html file to strutsified jsp?? - 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: Automated Site testing
You did not explain what kind of features you are exactly looking for, but this might be the right tool for you: http://www.opensta.org/ Regards, Martin Hey All, I was hoping that someone of the list would be able to help me out. Our company currently uses JUnit to perform automated tests on the back end of our sites, and was wondering if something similar existed for doing tests on the front end. I have looked into httpunit but that doesn't seem to be able to adequately do what we are after, or provide further benefit than performing JUnit tests on our actions? If anyone has any tried suggestions I would be most appreciative. Thanks in advance, Sean -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Object Mapping w/ Struts?
Try ObjectRelationalBridge: http://objectbridge.sourceforge.net/ Martin [EMAIL PROTECTED] . EVOLT Internet Applications GmbH Brüningstrasse 35 61350 Bad Homburg, Germany http://www.evolt.de . I am looking for an object-mapping (to sql relational DB) solution for Struts. I have a medium sized database application which I've developed in struts. (around 25 tables in PostgreSQL) I've been using a home-brew lightweight data-access bean system -- using perl scripts to generate beans that interact with the database. The java source these scripts generate need a lot of manual editing, so making changes to the object model can be a nightmare. I tried downloading Torque 2.1, but had problems, so then I tried Torque 3.0b1. It seems like Torque isn't going to integrate well with my already existing tables. I use some postgres types such as TEXT and BOOLEAN, which I would expect to map to LONGVARCHAR and BIT respectively, but in the SQL that torque spit out they were bytea and . I can't find mention of bytea in postgres docs, and obviously isn't going to do much for me. =) After reading the Torque docs, I really like what it offers but I'm not sure that it will work for me. Are there any other solutions that people can recommend? Or should I try modifying torque to fit my needs? I don't have any EJB experience but I've heard good things about JBoss. I've also heard the going EJB can really slow an application down. I've also noticed some talk of Expresso on this list, would this be worth trying? Thanks for any advice! -james -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]