Improving performace of Struts based Apps
Hi All, Can you provide me any tips for improving Struts based applications? Satya
Re: Populating form Elements from another object.
Hi, I saw your code. I have one doubt. How do you plugin your own DynaBean implementation into the struts framework. Shanmugam PL Niall Pemberton wrote: I wrote these http://www.niallp.pwp.blueyonder.co.uk Niall - Original Message - From: shanmugampl [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, February 25, 2004 7:00 AM Subject: Populating form Elements from another object. Hi, I have a requirement where i need to populate the values of a form from another object, and then again transform the contents of the form back to the object once the form is submitted. i.e Say, when i click a button, i do some functionalities and have a Properties object as an output. The keys in the Properties object are not static. These values need to be shown in a form. As the keys retrieved for the current operation is not known, i cant define the values in the struts-config.xml for the dynaactionclass. Is it possible to extend the dynaactionclass, and during its init or something, iterate the properties object and populate the form. Are there any other way of doing it. Thanks Shanmugam PL - 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: Populating form Elements from another object.
I haven't seen the code but if what i understand of what Niall has been saying you'd use them instead of DynaActionForm. form-bean name=fooForm type=com.ilovesparrows.struts.NiallsForm / of course you'll need to call the package and class name to something appropriate. On 9 Mar 2004, at 09:47, shanmugampl wrote: Hi, I saw your code. I have one doubt. How do you plugin your own DynaBean implementation into the struts framework. Shanmugam PL Niall Pemberton wrote: I wrote these http://www.niallp.pwp.blueyonder.co.uk Niall - Original Message - From: shanmugampl [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, February 25, 2004 7:00 AM Subject: Populating form Elements from another object. Hi, I have a requirement where i need to populate the values of a form from another object, and then again transform the contents of the form back to the object once the form is submitted. i.e Say, when i click a button, i do some functionalities and have a Properties object as an output. The keys in the Properties object are not static. These values need to be shown in a form. As the keys retrieved for the current operation is not known, i cant define the values in the struts-config.xml for the dynaactionclass. Is it possible to extend the dynaactionclass, and during its init or something, iterate the properties object and populate the form. Are there any other way of doing it. Thanks Shanmugam PL - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
How can I get MessageResources in jsp
Hi folks, if I don't use the bean:message tag, is there any ways to get MessageResources objewct from session or request in jsp? I have tried the following, but it doesn't work. MessageResources message = (MessageResources)session.getAttribute(org.apache.struts.action.Action.MESSAGES_KEY); Thanks! Billy Ng This mailbox protected from junk email by Matador from MailFrontier, Inc. http://info.mailfrontier.com
Re: How can I get MessageResources in jsp
Taken from the Struts Action class: /** * Return the default message resources for the current module. * * @param request The servlet request we are processing * @since Struts 1.1 */ protected MessageResources getResources(HttpServletRequest request) { return ((MessageResources) request.getAttribute(Globals.MESSAGES_KEY)); } In you case: MessageResources res = (MessageResources) request.getAttribute(Globals.MESSAGES_KEY); Christian _ Please be advised that the information contained herein is confidential and intended only for use by the individual stated above. If you are not the named recipient, you are hereby notified that any disclosure, distribution, dissemination, or copying is prohibited. If this information has been directed to you in error, please contact the sender immediately at the telephone number listed above.
Error in message resources
Hi all, I am getting the following error when i tried to run the application. Cannot find message resources under key org.apache.struts.action.MESSAGE Can any suggest the solution for it. regards praveen - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: Error in message resources
Quoting Ted from a forum on JGuru: snip Re[2]: More info: Cannot find message resources under key org.apache.struts.action.MESSAGE Topic: Struts Ted Husted PREMIUM, Feb 10, 2003 Under b3 and later, you may need to specify the messages resources in the struts-config: message-resources parameter=resources.ApplicationResources This can go at the very end of the struts-config, after the action-mappings. HTH, Ted. /snip Andreas -Ursprüngliche Nachricht- Von: Praveen Reddy Basani [mailto:[EMAIL PROTECTED] Gesendet: Dienstag, 09. März 2004 11:04 An: Struts Users Mailing List Betreff: Error in message resources Hi all, I am getting the following error when i tried to run the application. Cannot find message resources under key org.apache.struts.action.MESSAGE Can any suggest the solution for it. regards praveen - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
How to configure JNDI in tomcat5
I had try to configure JNDI( and DataSource) with my tomcat5.0,by hand or by web page which is localhost:8080/admin,but both are failure.the err occur: Context context = new IntitalContext(); Context envContext = ( Context)context.lookup(java:comp/env); with the err msg : javax.naming.NameNotFoundException: Name bean is not bound in this Context ... i had operate under by tomcat5.0's spec in apache.step by step,is it error?what's the matter with my configure file web.xml or server.xml? _ MSN Hotmail http://www.hotmail.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: can struts generate strict XHTML
It seems like the html:form tag still adds a name attribute to the generated form tag (as was the issue in the mentioned discussion from half a year ago) , and validators don't like that in XHTML So either I'm badly mistaken, or it still hasn't changed. Jeroen -Oorspronkelijk bericht- Van: Adam Hardy [mailto:[EMAIL PROTECTED] Verzonden: maandag 8 maart 2004 23:01 Aan: Struts Users Mailing List Onderwerp: Re: can struts generate strict XHTML On 03/08/2004 02:12 PM Ruud Steeghs wrote: hi, Can Struts actually generate compliant valid XHTML 1.0 strict markup using the html:xhtml/ tag? If so, which version of Struts to use? (http://www.junlu.com/msg/22026.html, but hey, technologies may change so fast) Yes, I'm doing it. Can't remember when I started, but it definitely works on struts 1.1. There are a couple of issues to look out for, such as with tiles, where you use the tag you mention. In your main pages, use html:html xhtml=true Adam -- struts 1.1 + tomcat 5.0.16 + java 1.4.2 Linux 2.4.20 Debian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How to configure JNDI in tomcat5
Hi, I m assuming u have been thru the steps of configuring Jndi in tomcat (update of server.xml and common\lib) Assuming you have called, in ur server.xml, your datasource test/myDb, You would have entered a resource-ref in your web.xml, that refers to Test/myDb Now when you look it up you have to look for java:comp/env/test/myDb Hope this helps Regards marco -Original Message- From: rx liu [mailto:[EMAIL PROTECTED] Sent: 09 March 2004 10:32 To: [EMAIL PROTECTED] Subject: How to configure JNDI in tomcat5 I had try to configure JNDI( and DataSource) with my tomcat5.0,by hand or by web page which is localhost:8080/admin,but both are failure.the err occur: Context context = new IntitalContext(); Context envContext = ( Context)context.lookup(java:comp/env); with the err msg : javax.naming.NameNotFoundException: Name bean is not bound in this Context ... i had operate under by tomcat5.0's spec in apache.step by step,is it error?what's the matter with my configure file web.xml or server.xml? _ 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]
RE: How to configure JNDI in tomcat5
If you are using default initialContext() i.e. Context ctx = new InitialContext(); // without any parameter Then you have to look up like java:comp/dsname Or if you are initialising your context with server specific factory Context ctx = new InitialContext(xx, yy) // Refer server sp. Documentation. As far as weblogic is concerned its a constant for tengainitialfactory Then you have to call the way which is specified in server sp. Doc. Guys correct me if I am wrong. Hope this helps. Regards, Shashank Dixit jpmc ib , cognizant technology solutions pvt. ltd. Tel: +91 20 2931100 Ext : 2354 Vnet : 22362 Mobile : 98904 25400 An Obstacle is something you see when you take your eyes off the goal. -Original Message- From: Marco Mistroni [mailto:[EMAIL PROTECTED] Sent: Tuesday, 9 March 2004 9:43 PM To: 'Struts Users Mailing List' Subject: RE: How to configure JNDI in tomcat5 Hi, I m assuming u have been thru the steps of configuring Jndi in tomcat (update of server.xml and common\lib) Assuming you have called, in ur server.xml, your datasource test/myDb, You would have entered a resource-ref in your web.xml, that refers to Test/myDb Now when you look it up you have to look for java:comp/env/test/myDb Hope this helps Regards marco -Original Message- From: rx liu [mailto:[EMAIL PROTECTED] Sent: 09 March 2004 10:32 To: [EMAIL PROTECTED] Subject: How to configure JNDI in tomcat5 I had try to configure JNDI( and DataSource) with my tomcat5.0,by hand or by web page which is localhost:8080/admin,but both are failure.the err occur: Context context = new IntitalContext(); Context envContext = ( Context)context.lookup(java:comp/env); with the err msg : javax.naming.NameNotFoundException: Name bean is not bound in this Context ... i had operate under by tomcat5.0's spec in apache.step by step,is it error?what's the matter with my configure file web.xml or server.xml? _ 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] This e-mail and any files transmitted with it are for the sole use of the intended recipient(s) and may contain confidential and privileged information.If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message. Any unauthorised review, use, disclosure, dissemination, forwarding, printing or copying of this email or any action taken in reliance on this e-mail is strictly prohibited and may be unlawful. Visit us at http://www.cognizant.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Cookies And Session Problems
If you mean in the action mappings then no, I have the scope set to request for each mapping. Ciaran -Original Message- From: David Friedman [mailto:[EMAIL PROTECTED] Sent: 09 March 2004 03:26 To: Struts Users Mailing List Subject: RE: Cookies And Session Problems Did you accidentally set the scope of the FormBean for your Action to application instead of session or request? Regards, David -Original Message- From: Ciaran Hanley [mailto:[EMAIL PROTECTED] Sent: Monday, March 08, 2004 7:48 PM To: Struts User Mailing List Subject: Cookies And Session Problems Hey, I am writing an app but am having session problems. The last user to log into the system has their details available to all other users logged in. I haven't much of an idea about session control can anybody give some pointers in the right direction? From reading I am thinking url rewriting is the way to go about it, but cant find any good code snippets to get me started. Also, if caching is disabled does this mean that cookies won't be stored on the hard drive? 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: Cookies And Session Problems
I think that i've found the problem. Please, look below : Ciaran Hanley wrote: Hi thanks for your reply, I am using form based authentication. Cookies are enabled. I am storing all session information using request.getSession() for example: request.getSession().getServletContext().setAttribute(user, loggedUser); stores the user bean in the session. Ciaran, you must use request.getSession().setAttribute( user,loggedUser ); When you use request.getSession().getServletContext().setAttribute(user, loggedUser); you're putting your bean at application scope... - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Cookies And Session Problems
As a general point life gets less confusing when you retrieve you objects one at a time rather than drilling through several at once.. When you get used to using stuff on a daily basis then of course you're going to start opting for one line rather than several. but IMO you better thinking/coding like this until you get used to messing with these things. HttpSession session = request.getSession(); session.setAttribute(foo,bar); if you wanted t o get to the application scope to shortest way in an actions would be ServletContext context = getServlet().getServletContext(); or words to that effect. Might be an egg sucking lesson but seems to be this trendy coding style thats confusing you. So could very well be useful. HTH mark On 9 Mar 2004, at 14:15, Daniel Henrique Alves Lima wrote: I think that i've found the problem. Please, look below : Ciaran Hanley wrote: Hi thanks for your reply, I am using form based authentication. Cookies are enabled. I am storing all session information using request.getSession() for example: request.getSession().getServletContext().setAttribute(user, loggedUser); stores the user bean in the session. Ciaran, you must use request.getSession().setAttribute( user,loggedUser ); When you use request.getSession().getServletContext().setAttribute(user, loggedUser); you're putting your bean at application scope... - 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: Cookies And Session Problems
I think that i've found the problem. Please, look below : Ciaran Hanley wrote: Hi thanks for your reply, I am using form based authentication. Cookies are enabled. I am storing all session information using request.getSession() for example: request.getSession().getServletContext().setAttribute(user, loggedUser); stores the user bean in the session. Ciaran, you must use request.getSession().setAttribute( user,loggedUser ); When you use request.getSession().getServletContext().setAttribute(user, loggedUser); you're putting your bean at application scope... - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
collection of strings (newbie question)
I have an action that creates a bean. That bean has a property myStrings that returns a collection of String objects. On a jsp, I want to list the strings. If my jsp has this: logic:iterate id=myId name=myBean property=myStrings bean:write name=myId/ /logic:iterate Then I get an exception Cannot find bean myId in any scope. I can understand that cos myId is a String not a bean. What should I use instead of bean:write ? Steve ___ Yahoo! Messenger - Communicate instantly...Ping your friends today! Download Messenger Now http://uk.messenger.yahoo.com/download/index.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: collection of strings (newbie question)
Have you import logic taglibs ? steve hazelwood wrote: I have an action that creates a bean. That bean has a property myStrings that returns a collection of String objects. On a jsp, I want to list the strings. If my jsp has this: logic:iterate id=myId name=myBean property=myStrings bean:write name=myId/ /logic:iterate Then I get an exception Cannot find bean myId in any scope. I can understand that cos myId is a String not a bean. What should I use instead of bean:write ? Steve ___ Yahoo! Messenger - Communicate instantly...Ping your friends today! Download Messenger Now http://uk.messenger.yahoo.com/download/index.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: collection of strings (newbie question)
Solved, well done. I'm glad I put 'newbie' in the subject line now :-) Thanks, Steve On 9 Mar 2004 at 11:03, Daniel Henrique Alves Lima wrote: Have you import logic taglibs ? steve hazelwood wrote: I have an action that creates a bean. That bean has a property myStrings that returns a collection of String objects. On a jsp, I want to list the strings. If my jsp has this: logic:iterate id=myId name=myBean property=myStrings bean:write name=myId/ /logic:iterate Then I get an exception Cannot find bean myId in any scope. I can understand that cos myId is a String not a bean. What should I use instead of bean:write ? Steve ___ Yahoo! Messenger - Communicate instantly...Ping your friends today! Download Messenger Now http://uk.messenger.yahoo.com/download/index.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[ANNOUNCEMENT] final release of struts-layout 1.0
Hi everybody, Im pleased to announce that struts-layout 1.0 is available now. Struts-layout is an open source taglib for struts which provides easy and fast interface creation. This is achieved by powerful tags which display panels, input fields, tables, treeviews, sortable lists, popups, calendars etc. With those tags, the developer have neither to write nor know HTML. Struts-layout 1.0 features include: - Date pickup calendar, sortable list, pager, tabbed panels, treeview and more, - Runtime modification of css style and writeability of input fields, - Runtime display of buttons and links, - Skin framework, allowing to use a customized css file or generate specific HTML code for different users or clients, - Format framework, allowing to format date, numbers, and any objets, - Basic el support Improvements since 1.0b2 include: - Maven build system, - Improved documentation, - New FAQ section, - Allow to expand / close a whole subtree in the treeview, - Support el on many more properties. Find more information on struts-layout at http://struts.application-servers.com struts-layout 1.0 can be downloaded at http://struts.application-servers.com/struts-layout-v1.0.zip Best regards, Jean-Noel Ribette - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: collection of strings (newbie question)
Hi all, Other possibility is to check whether 'myBean' exists in some scope. Cheers, Daniel Silva. --- Daniel Henrique Alves Lima [EMAIL PROTECTED] wrote: Have you import logic taglibs ? steve hazelwood wrote: I have an action that creates a bean. That bean has a property myStrings that returns a collection of String objects. On a jsp, I want to list the strings. If my jsp has this: logic:iterate id=myId name=myBean property=myStrings bean:write name=myId/ /logic:iterate Then I get an exception Cannot find bean myId in any scope. I can understand that cos myId is a String not a bean. What should I use instead of bean:write ? Steve ___ Yahoo! Messenger - Communicate instantly...Ping your friends today! Download Messenger Now http://uk.messenger.yahoo.com/download/index.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ 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]
Using global-exceptions in modules
Hi all, I'm using modules in my struts application and I want to have some general exceptions handlers that will be used by all modules. When I've put this information im my default struts-config.xml, the exception threw by my sub-module was not catched. When I've put this information in struts-config-OP201_02.xml, the browser couldn't find the page specified in my path because it takes the context relative path. What I have to do to use correctly generals exception handlers that will be shared by all modules? Thanks in advance, Bruno Moreno __ Yahoo! Mail - O melhor e-mail do Brasil! Abra sua conta agora: http://br.yahoo.com/info/mail.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
SSL and actionforms
Hi!! I'm running a struts application on Websphere and have encountered a problem when added SSL. It seems that on submit, the set methods on the actionform sometimes are not invoked. It works fine when not using SSL on the container. Does anyone has a suggestion what to do? Hakan Fransson Per Jans vag 3 903 55 Umea +46 (0)90 135061 (home) +46 (0)70 5135061 (mobile) +46 (0)90 7866938 (Work) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
validator framework / multibox and javascript validation
Hi all, I have want to validate (client-side using javascript generated by the validator framework) if my user has at least selected one checkbox in my html:multibox form item. Unfortunatly the javascript generator does not generate the JavaScript needed to validate this. I read somewhere on the mailinglist archive that this is a known issue with struts 1.1. The advice was to upgrade using a nightly build. I tried to do so, but unfortunatly this does not work with the Tiles framework (which I'm also using in my application). Can somebody tell me how to get this validation work? Below provided my code: I have a simple validator form: public class SimpleForm extends ValidatorForm { private String[] selectedItems; public String[] getSelectedItems() { return selectedItems; } public void setSelectedItems(String[] items) { this.selectedItems = items; } } And the following rule in validation.xml: formset form name=simpleForm field property=selectedItems depends=required arg0 key=simpleForm.selectedItems/ /field /form /formset I have the following JSP: html:javascript formName=autoForm onsubmit=return validateSimpleForm(this);/ html:form action=/test html:multibox property=selectedItems bean:write name=car property=id/ /html:multibox /html:form Thanks, Regards, Harm de Laat Informatiefabriek The Netherlands
Re: copyrighted documents in Struts package
If those files are part of Struts package, but copyrighted as netscape's property, is it still legal to use Struts to develop commercial software? Paul Stanton [EMAIL PROTECTED] Paul Stanton [EMAIL PROTECTED] 03/08/2004 05:46 PM Please respond to Struts Users Mailing List To: Struts Users Mailing List [EMAIL PROTECTED] cc: Subject: Re: copyrighted documents in Struts package the rss spec is owned by netscape. the dtds are therefore netscapes property - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: SSL and actionforms
what's your deployment setup like? running with apache? On 9 Mar 2004, at 16:21, Håkan Fransson wrote: Hi!! I'm running a struts application on Websphere and have encountered a problem when added SSL. It seems that on submit, the set methods on the actionform sometimes are not invoked. It works fine when not using SSL on the container. Does anyone has a suggestion what to do? Hakan Fransson Per Jans vag 3 903 55 Umea +46 (0)90 135061 (home) +46 (0)70 5135061 (mobile) +46 (0)90 7866938 (Work) - 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] copyrighted documents in Struts package
So, is it just me, or are licensing and copyrighting rather unrelated issues? -Ursprungliche Nachricht- Von: Kevin Wang [mailto:[EMAIL PROTECTED] Gesendet: Dienstag, 09. Marz 2004 16:31 An: Struts Users Mailing List Betreff: Re: copyrighted documents in Struts package If those files are part of Struts package, but copyrighted as netscape's property, is it still legal to use Struts to develop commercial software? Paul Stanton [EMAIL PROTECTED] Paul Stanton [EMAIL PROTECTED] 03/08/2004 05:46 PM Please respond to Struts Users Mailing List To: Struts Users Mailing List [EMAIL PROTECTED] cc: Subject: Re: copyrighted documents in Struts package the rss spec is owned by netscape. the dtds are therefore netscapes property - 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]
SV: SSL and actionforms
We are on development right now so we are just assuming all material being dynamic and deploy the web application direct on the application server(WAS 5.0.2.2) and it's web container using port 9443. I'm running it through WSAD. -Ursprungligt meddelande- Från: Mark Lowe [mailto:[EMAIL PROTECTED] Skickat: den 9 mars 2004 16:34 Till: Struts Users Mailing List Ämne: Re: SSL and actionforms what's your deployment setup like? running with apache? On 9 Mar 2004, at 16:21, Håkan Fransson wrote: Hi!! I'm running a struts application on Websphere and have encountered a problem when added SSL. It seems that on submit, the set methods on the actionform sometimes are not invoked. It works fine when not using SSL on the container. Does anyone has a suggestion what to do? Hakan Fransson Per Jans vag 3 903 55 Umea +46 (0)90 135061 (home) +46 (0)70 5135061 (mobile) +46 (0)90 7866938 (Work) - 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: SV: SSL and actionforms
Are you accessing the app through InternetExplorer? We had a production app running on just WAS 5 Express (no apache) with SSL with no problems Then the users upgraded their browsers in the beginning of Feb, and they started having problems. It appears that sometimes POST forms don't submit any data when submitted. It's not just the actionForms not being populated. In one of my actionForms validate methods, I looped through all the requests parameters and there were none, so it seems the request doesn't even get populated. Unfortunately, I don't have a good work around, we ended up just turning off SSL once they get past the login screen. This is ok for our purposes, but depending on your app it may not be an option for you. GET method forms, seem to work ok, so changing all your forms to GET is another option. Now I wonder if it's a combination of WebSphere. Struts, IE and SSL, I didn't think of relating it to WAS , but I was wondering why no one else seems to have the same problem. Also I have had the same problem with WAS adminconsole which is a struts app, so I was able to sort of rule out just us doing something wrong. Håkan Fransson [EMAIL PROTECTED] e To Struts Users Mailing List 03/09/2004 10:49 [EMAIL PROTECTED] AM cc Subject Please respond to SV: SSL and actionforms Struts Users Mailing List [EMAIL PROTECTED] rta.apache.org We are on development right now so we are just assuming all material being dynamic and deploy the web application direct on the application server(WAS 5.0.2.2) and it's web container using port 9443. I'm running it through WSAD. -Ursprungligt meddelande- Från: Mark Lowe [mailto:[EMAIL PROTECTED] Skickat: den 9 mars 2004 16:34 Till: Struts Users Mailing List Ämne: Re: SSL and actionforms what's your deployment setup like? running with apache? On 9 Mar 2004, at 16:21, Håkan Fransson wrote: Hi!! I'm running a struts application on Websphere and have encountered a problem when added SSL. It seems that on submit, the set methods on the actionform sometimes are not invoked. It works fine when not using SSL on the container. Does anyone has a suggestion what to do? Hakan Fransson Per Jans vag 3 903 55 Umea +46 (0)90 135061 (home) +46 (0)70 5135061 (mobile) +46 (0)90 7866938 (Work) - 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: Grid..........
We tried grid from http://www.blueshoes.org It works great. It has basic functionalities like paste/copy/export etc. The only problem we faced was performance. If the number of row/columns is large. It takes 10 something seconds to load. If you have found a better grid. Please let us know HTH -Amar -Original Message- From: Andrew Hill [mailto:[EMAIL PROTECTED] Sent: Monday, March 01, 2004 3:41 AM To: Struts Users Mailing List Subject: RE: Grid.. Hang on one cotton pickin minute... snip We are developing a web application where in we are using the MVC architecture..Hence we are using the Jsp for the view. /snip Since when did MVC imply JSP? -Original Message- From: Mark Lowe [mailto:[EMAIL PROTECTED] Sent: Monday, 1 March 2004 16:39 To: Struts Users Mailing List Subject: Re: Grid.. Sounds great.. On 1 Mar 2004, at 06:05, Milind P wrote: Hi All! Iam a new developer using the struts framework... We are developing a web application where in we are using the MVC architecture..Hence we are using the Jsp for the view. Now the problem is our project demands to dsiplay the data and read the same from a grid. So how do I 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
tiles tabbed layout
hello I want to use tiles tabbed layout. I'm using tiles at the moment, but no tiles definitions. My question is : can I use this layout without definitions and how do I put the tabs in my jsp that fills my layout page, e.g. tiles:insert page = /layouts/isisLayoutExtraHeadMenu.jsp flush=true tiles:put name=title value=ISIS WEB / tiles:put name=header value=/pages/defaultHeader.jsp/ any help is very appreciated Koen boutsen Find what you are looking for with the Lycos Yellow Pages http://r.lycos.com/r/yp_emailfooter/http://yellowpages.lycos.com/default.asp?SRC=lycos10 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: SSL and actionforms
Le Tuesday, March 09, 2004 11:49 AM, Håkan Fransson [EMAIL PROTECTED] m'a, d'une plume avisee, ecrit: We are on development right now so we are just assuming all material being dynamic and deploy the web application direct on the application server(WAS 5.0.2.2) and it's web container using port 9443. I'm running it through WSAD. maybe http://www.modwest.com/help/kb.phtml?cat=2qid=260 -- Franck Lefebure - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: html:select question
Hi Paul, Your question seems very similar to my post last week. I need to set a pre-defined option in html:select using the value= attribute, I thought the following will work: For this you can set the attribute in your form class and when you use html:selectin your jsp, while populating the options in the drop down, struts will automatically select the dafult predetermined option and show it as selected. (See vincent and robert's posts). Let me know if that helps! (I did try the same logic and when i give system.out in my jsp, it is identifying the correct default value-only that I cant see the option selected.let me know if yours works from these hints. That would help me too) :-))) Thanks, Sam. Au-Yeung, Stella H [EMAIL PROTECTED] wrote: I see. I'll try that tomorrow and let you know. Thx. -Original Message- From: Paul Stanton [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 09, 2004 12:05 AM To: Struts Users Mailing List Subject: Re: question the most simplest solution is often the best Au-Yeung, Stella H wrote: Paul wrote: labelProperty=name/ No I don't know how to try yours because I don't see how the above statement tells it to compare userId with person.id and then store the value into person.id. In other words, I don't know how to convert my statement below to yours: collection=uList name=UserFormBean property=userId labelproperty=commonName/ -Original Message- From: Paul Stanton [mailto:[EMAIL PROTECTED] Sent: Monday, March 08, 2004 6:45 PM To: Struts Users Mailing List Subject: Re: question i think you are trying to do the following... labelProperty=name/ this is assuming uList is a list of beans with id/name fields and your form has a userId field. Au-Yeung, Stella H wrote: Hi: I need to set a pre-defined option in using the value= attribute, I thought the following will work: collection=uList name=UserFormBean property=userId labelproperty=commonName/ I have a person bean. I want to set the selected option if person.id matches userId . I thought the value attribute is to be compared with for marking an option selected. But the above doesn't work. It always set the 1st option to be the selected option . Am I misunderstanding the use of value=? - 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] - Do you Yahoo!? Yahoo! Search - Find what youre looking for faster.
RE: Problems with UTF-8 and forms
Hi, We had the same problem but we are using weblogic. May this will give you a clue on what needs to be changed in Tomcat. We did the following to solve the problem : In weblogic's web.xml we have following snippet context-param param-nameweblogic.jsp.encoding/param-name param-valueiso-8859-1/param-value /context-param In all the jsps we dish out we have following : html head meta http-equiv=Content-Type content=text/html; charset=iso-8859-1 /head This was for display, which you said you have already achieved. And finally to accept the characters in the same encoding format we added following line in weblogic.properties . weblogic.httpd.inputCharset./*=iso-8859-1. I think you will have to something similar in tomcat's properrties file HTH -Amar -Original Message- From: Adam Hardy [mailto:[EMAIL PROTECTED] Sent: Monday, March 01, 2004 3:47 AM To: Struts Users Mailing List Subject: Re: Problems with UTF-8 and forms On 03/01/2004 12:29 AM Jon Bohm wrote: BUT if I rewrite my custombean's getValue method it all works fine (except for swedish uppercase letters): public String getValue() { return new String( value.getBytes(), UTF-8); } Still shouldn't be necessary. Apache Tomcat/5.0.12 Java 1.4.2_01-b06 Struts 1.1 (I think - how do I check?) Windows XP (I know, I'm a Linuxdude gone bad) Open up struts.jar in winzip or something and view META-INF/MANIFEST.mf - check implementation-version. So what does the debugging say at the end of your JSPs? Is your response UTF-8 or iso- encoded? I bet it says the page content-type is still iso-8859. How are you setting your struts controller parameter (in struts-config.xml): set-property property=contentType value=text/html; charset=UTF-8/ Do you have any locale-encoding-mapping-list in your web.xml? You don't need it with UTF-8. You also don't need to specify it in any jsp-property-group since the struts controller will handle it. http://www.anassina.com/struts/i18n/i18n.html Good link, but getting a little out-of-date now. You have a better one? :) I wish! If you get this solved, we can condense this thread and post it in the struts wikki. Adam -- struts 1.1 + tomcat 5.0.16 + java 1.4.2 Linux 2.4.20 Debian - 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]
SV: SV: SSL and actionforms
yeah, using IE and this was NOT good. It works fine with mozilla. Microsoft are incredible!!. They will hear from us. Thanks for your answer. -Ursprungligt meddelande- Från: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Skickat: den 9 mars 2004 17:03 Till: Struts Users Mailing List Ämne: Re: SV: SSL and actionforms Are you accessing the app through InternetExplorer? We had a production app running on just WAS 5 Express (no apache) with SSL with no problems Then the users upgraded their browsers in the beginning of Feb, and they started having problems. It appears that sometimes POST forms don't submit any data when submitted. It's not just the actionForms not being populated. In one of my actionForms validate methods, I looped through all the requests parameters and there were none, so it seems the request doesn't even get populated. Unfortunately, I don't have a good work around, we ended up just turning off SSL once they get past the login screen. This is ok for our purposes, but depending on your app it may not be an option for you. GET method forms, seem to work ok, so changing all your forms to GET is another option. Now I wonder if it's a combination of WebSphere. Struts, IE and SSL, I didn't think of relating it to WAS , but I was wondering why no one else seems to have the same problem. Also I have had the same problem with WAS adminconsole which is a struts app, so I was able to sort of rule out just us doing something wrong. Håkan Fransson [EMAIL PROTECTED] e To Struts Users Mailing List 03/09/2004 10:49 [EMAIL PROTECTED] AM cc Subject Please respond to SV: SSL and actionforms Struts Users Mailing List [EMAIL PROTECTED] rta.apache.org We are on development right now so we are just assuming all material being dynamic and deploy the web application direct on the application server(WAS 5.0.2.2) and it's web container using port 9443. I'm running it through WSAD. -Ursprungligt meddelande- Från: Mark Lowe [mailto:[EMAIL PROTECTED] Skickat: den 9 mars 2004 16:34 Till: Struts Users Mailing List Ämne: Re: SSL and actionforms what's your deployment setup like? running with apache? On 9 Mar 2004, at 16:21, Håkan Fransson wrote: Hi!! I'm running a struts application on Websphere and have encountered a problem when added SSL. It seems that on submit, the set methods on the actionform sometimes are not invoked. It works fine when not using SSL on the container. Does anyone has a suggestion what to do? Hakan Fransson Per Jans vag 3 903 55 Umea +46 (0)90 135061 (home) +46 (0)70 5135061 (mobile) +46 (0)90 7866938 (Work) - 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: Populating form Elements from another object.
Yup, thats it - plus dynamic=true form-bean name=fooForm1 type=lib.framework.struts.LazyValidatorActionForm dynamic=true / form-bean name=fooForm2 type=lib.framework.struts.LazyValidatorActionForm dynamic=true / form-bean name=fooForm3 type=lib.framework.struts.LazyValidatorActionForm dynamic=true / form-bean name=fooForm4 type=lib.framework.struts.LazyValidatorActionForm dynamic=true / Oh, I noticed an error in LazyValidatorForm, its declared as abstract - which it shouldn't be - I don't use it directly, I use LazyValidatorActionForm which extends it. Niall - Original Message - From: Mark Lowe [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Tuesday, March 09, 2004 8:53 AM Subject: Re: Populating form Elements from another object. I haven't seen the code but if what i understand of what Niall has been saying you'd use them instead of DynaActionForm. form-bean name=fooForm type=com.ilovesparrows.struts.NiallsForm / of course you'll need to call the package and class name to something appropriate. On 9 Mar 2004, at 09:47, shanmugampl wrote: Hi, I saw your code. I have one doubt. How do you plugin your own DynaBean implementation into the struts framework. Shanmugam PL Niall Pemberton wrote: I wrote these http://www.niallp.pwp.blueyonder.co.uk Niall - Original Message - From: shanmugampl [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, February 25, 2004 7:00 AM Subject: Populating form Elements from another object. Hi, I have a requirement where i need to populate the values of a form from another object, and then again transform the contents of the form back to the object once the form is submitted. i.e Say, when i click a button, i do some functionalities and have a Properties object as an output. The keys in the Properties object are not static. These values need to be shown in a form. As the keys retrieved for the current operation is not known, i cant define the values in the struts-config.xml for the dynaactionclass. Is it possible to extend the dynaactionclass, and during its init or something, iterate the properties object and populate the form. Are there any other way of doing it. Thanks Shanmugam PL - 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]
Multiple validation
Hi, here is the scenario ... i've got 4 different validation depending on 4 different javascript tab, i want to do a validation depending on the tab that you are localized, ie, i want to validate one field if the user is in the tab 1, other if the user are in tab 2 and so on. I define in validation.xml 4 different form, and call some validate...Form(), or other depending of the tab, but it doesn't work properly because some code overwrite other, what i could do? thanks, ___ Yahoo! Messenger - Nueva versión GRATIS Super Webcam, voz, caritas animadas, y más... http://messenger.yahoo.es - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: SSL and actionforms
FL maybe http://www.modwest.com/help/kb.phtml?cat=2qid=260 This works, thanks so much! I thought I had googled the subject to exhaustion I dont know how I missed it... feeling a little dumb... Franck Lefebure [EMAIL PROTECTED] ecaraibe.com To Struts Users Mailing List 03/09/2004 11:13 [EMAIL PROTECTED] AM cc Subject Please respond to Re: SSL and actionforms Struts Users Mailing List [EMAIL PROTECTED] rta.apache.org Le Tuesday, March 09, 2004 11:49 AM, Håkan Fransson [EMAIL PROTECTED] m'a, d'une plume avisee, ecrit: We are on development right now so we are just assuming all material being dynamic and deploy the web application direct on the application server(WAS 5.0.2.2) and it's web container using port 9443. I'm running it through WSAD. maybe http://www.modwest.com/help/kb.phtml?cat=2qid=260 -- Franck Lefebure - 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 locking and deadlock
Hi Shyam, You can synchronise the whole transaction with the 2 updates.That will take care of 1 of the issues.The other issue might be cyclic i.e are you updating table C first and then updating table A or B somewhere in your application.You will then have to make the updates in the same order i.e always update A first before C.This issue is a wild guess of mine-so I might be way off base here depending on row level locking etc. Vijay -Original Message- From: Shyam A [mailto:[EMAIL PROTECTED] Sent: Monday, March 08, 2004 6:36 PM To: Struts Users Mailing List Subject: Re: [OT] Database locking and deadlock Vic, Yes, I do get a deadly embrace or deadlock, as the row locks on the table multiply when they occur, holding up connections in the connection pool, eventually consuming all connections, and then all hell breaks loose. Were you referring to synchronizing with semaphores? I read somewhere that the Oracle database is supposed to handle deadlocks by rolling back one of the affected transactions. But the row locks seem to occur intermittently, possibly when there are large numbers of concurrent users. I cannot avoid the transaction as the database updates have to be done as one unit. An alternative that comes to mind is using a stored procedure for the update operations. Anyway, I need to do some research on passing Java objects to stored procedures. Thanks, Shyam --- Vic Cekvenich [EMAIL PROTECTED] wrote: Do you have a deadly embrace? Maybe just syncronise w/ semaphorse or the like. .V Shyam A wrote: Vic, Thanks again. I'm not in a position to switch to IBatis as my application is currently in use. Right now, I'm manually killing the user sessions which lock up the table in the database. My database is Oracle 9i, and this problem seems to occur only with large numbers of concurrent users. In my DAO,I update three tables as part of a transaction - table A and/or table B (in loops), and table C. Commit operation is done only after all tables are updated successfully. So, it may be possible that the DBMS locks up rows of table A or B (before commit) and waits until it updates table C for the commit. Is this the cause of the problem? I've not been able to determine (using SQl Plus, TOAD ) which query is causing the row-level lock. Any ideas? Thanks, Shyam --- Vic Cekvenich [EMAIL PROTECTED] wrote: Is there a way you can reproduce this w/ iSQL - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ 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]
dataPatterString e.g. 01JAN2003 - validation
Is there a Date validation option for a date in a format from a subject? (DDMMM e.g. 02JAN2003) Thanks, Bojan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Suggestion needed on good Struts book
I have both the O'Reilly and Struts in Action. I think the O'Reilly book is better when you're first starting out, it's overview presentation was easier to understand for me. But the Struts in Action book really goes into a lot greater depth about the possibilities form using the tools Struts provides. For example, how do you get the data in an ActionForm into your business objects? Struts in Action lists 8 different approaches, pros and cons, etc. The O'Reilly book presents a single approach. If you just wanna get it done the O'Reilly book is a faster way. If you want to understand the many possible ways to do it, i think the Struts in Action is alot better. dave On Mon, 2004-03-08 at 12:49, Steve Hill wrote: Struts In Action does cover the basics in more detail than some of the other books available, but I have to agree there really are a lot of irritating typos in there, and the provided examples sometimes don't match up with the code presented in the book. The Spielman book is a quick overview of the basics but does not go into much detail. There's a SAMS book called Struts Kick Start that has some good information in it. The O'Reilly book, Programming Jakarta Struts, is a good overview (most O'Reilly books are pretty decent), although it seems a little more segmented than Husted's book. O'Reilly also puts out a Jakarta Struts Pocket Reference that is handy to have around. Each book has its good points and bad points - for FredB, the best thing to do is take a look at all of them at the local bookstore and decide which best fits the user's learning level and style. -Steve - Original Message - From: Frank Burns [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Monday, March 08, 2004 9:07 AM Subject: Re: Suggestion needed on good Struts book I would say I'm smack bang in the middle of my Struts learning curve and, in my opinion, the single most useful resource I have found is this six-part series of articles: http://www.ftponline.com/javapro/2002_09/online/servletsjsp_bkurniawan_09_13_02/ In terms of books, I've got both Struts In Action and Programming Jakarta Struts. Each have their strengths and weaknesses in terms of the depth and breadth of information that they contain. However, in terms of *how* the information is presented, I personally find the Struts In Action really frustrating. It's as though the content has been *forced* into the In Action format. And the result, unfortunately, is that it works neither as a good hand-held tour through Struts (very long-winded, and repetitive), nor as a useful reference book (the useful information is scattered throughout its various sections). And, finally, I have the FOURTH *corrected* reprint, and it's still riddled with typos. My recommendation would be the above-mentioned series of articles and Programming Jakarta Struts. Frank. - Original Message - From: Janarthan Sathiamurthy [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Monday, March 08, 2004 8:23 AM Subject: Re: Suggestion needed on good Struts book Programming Jakarta Struts - OReilly [EMAIL PROTECTED] wrote:Hi, I am a newbie to Struts. I have been looking for books on Struts and found these on Amazon Programming Jakarta Struts - OReilly Struts in Action - Manning Struts Framework - Morgan Kaufmann Struts Survival Guide - ObjectSource Professional Jakarta Struts - Wrox Struts Kick Start - Sams Can anybody suggest which is good? Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: html:select
Paul: I tried the following in the JSP based on your suggestion and it is still not defaulting to the desired option. I just want to default the option to whatever matches between shopWorkOrder.engineerId and userId. Segment of JSP: bean:define id=eList name=ShopWorkOrderFormBean property=engineerList/ html:select property=shopWorkOrder.engineerId html:options collection=eList name=ShopWorkOrderFormBean property=userId labelproperty=commonName/ /html:select The following debug section is used to print out if shopWorkOrder.engineerId matches any userId in the ArrayList: String engineer = formBean.getShopWorkOrder().getEngineerId(); PeopleBean pBean; EtLog.debug(this,EngineerId=+engineer+***); for (int i=0; iformBean.getEngineerList().size(); i++) { pBean = (PeopleBean) formBean.getEngineerList().get(i); if (engineer != null engineer.equals(pBean.getUserId())) { EtLog.debug(this,Found Matching ID= + pBean.getUserId() + ***); break; } } And the debug printout suggested it found a matching id. But the html:select and html:option won't default to it: 03/09/2004 10:54:28 [DBUG] ShopWorkOrderMaintainAction EngineerId=8*** 03/09/2004 10:54:28 [DBUG] ShopWorkOrderMaintainAction Found Matching ID=8*** Did I misunderstand what you suggested? -Original Message- From: Paul Stanton [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 09, 2004 12:45 AM To: Au-Yeung, Stella H Subject: html:select this is by far the simplest way to achieve what you desire, but it does assume that your form is already populated with data. if your form is populated, the populated values will be used to select the correct option in the select. if it isn't (or the field is null) no option will be selected. i like to set my defaults to the fields values on the form bean in reset() and at field initialisation. html:select property=formBeanProp html:options collection=collection property=listProp labelProperty=listLabel / /html:select formBeanProp: the name of the field on the form bean of the enclosing html:form tag. if this field has a value matching one of the listProp values, this item will be selected. collection: the name of the attribute you have stored the list you are using to populate the options under. listProp: the name of the field in the list elements that will be used to compare to the formBeanProp. listLabel: the name of the field in the list elements that will be displayed to the user. note: if your value/label for your options is going to be the same you can omit this. hope this helps. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Regarding Error in Validator
Hi Friends, I am using the validator to perform the validations. I am facing the error while perform such operations. Can anyone please help me regarding this one. I am having LoginForm conatins username and password. For that i am performing the validation using validator. Please suugest me.. This is the error Error: 500 Location: /ecgv1.2/login.jsp Internal Servlet Error: javax.servlet.ServletException: (class: org/apache/struts/validator/ValidatorForm, method: validate signature: (Lorg/apache/struts/action/ActionMapping;Ljavax/servlet/http/HttpServletRequ est;)Lorg/apache/struts/action/ActionErrors;) Incompatible object argument for function call at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:399) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404) at org.apache.tomcat.core.Handler.service(Handler.java:286) at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372) at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:79 7) at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743) at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC onnectionHandler.java:210) at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416) at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498) at java.lang.Thread.run(Thread.java:536) Root cause: java.lang.VerifyError: (class: org/apache/struts/validator/ValidatorForm, method: validate signature: (Lorg/apache/struts/action/ActionMapping;Ljavax/servlet/http/HttpServletRequ est;)Lorg/apache/struts/action/ActionErrors;) Incompatible object argument for function call at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:140) at org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:563) at _0002flogin_0002ejsplogin_jsp_0._jspService(_0002flogin_0002ejsplogin_jsp_0. java:118) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja va:177) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:318) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:391) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404) at org.apache.tomcat.core.Handler.service(Handler.java:286) at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372) at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:79 7) at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743) at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC onnectionHandler.java:210) at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416) at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498) at java.lang.Thread.run(Thread.java:536) Thanks N Regds M.Ramachandran SummitWorks Technologies Pvt Ltd Voice : 28478601 X 123 www.summitworks.com [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat and Aliases
We're running TC in a standalone configuration. Short of putting Apache in front of it, and running mod_jk is there a way in server.xml, web.xml or otherwise to do aliasing like the following httpd.conf entry? Alias /images/ /usr/local/product/images/ Directory /usr/local/product/images Options Indexes MultiViews AllowOverride None Order allow,deny Allow from all /Directory Regards, Eric - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Suggestion needed on good Struts book
I have to second Dave's opinion. I have Strings In Action, Mastering Jakarta Struts, Mastering Jakarta Struts and JSP Site Design. The book I turn to again and again is Struts In Action. What I truly like about Ted's book, beside the fact that I won a free copy from him, is that he goes into a lot of design theory. For instance, he talks about how the Action classes become a firewall to your web application. It's little things like that which sets it apart from the rest. Ed David Evans wrote: I have both the O'Reilly and Struts in Action. I think the O'Reilly book is better when you're first starting out, it's overview presentation was easier to understand for me. But the Struts in Action book really goes into a lot greater depth about the possibilities form using the tools Struts provides. For example, how do you get the data in an ActionForm into your business objects? Struts in Action lists 8 different approaches, pros and cons, etc. The O'Reilly book presents a single approach. If you just wanna get it done the O'Reilly book is a faster way. If you want to understand the many possible ways to do it, i think the Struts in Action is alot better. dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problems with UTF-8 and forms
I don't know if this will help but try to search charset encoding at tomcat maillist archive. You will find some tips in there. Take a look at http://tagunov.tripod.com/i18n/i18n.html (try to contact Anton, if you want). -Original Message- From: Adam Hardy [mailto:[EMAIL PROTECTED] Sent: Monday, March 01, 2004 3:47 AM To: Struts Users Mailing List Subject: Re: Problems with UTF-8 and forms On 03/01/2004 12:29 AM Jon Bohm wrote: BUT if I rewrite my custombean's getValue method it all works fine (except for swedish uppercase letters): public String getValue() { return new String( value.getBytes(), UTF-8); } Still shouldn't be necessary. Apache Tomcat/5.0.12 Java 1.4.2_01-b06 Struts 1.1 (I think - how do I check?) Windows XP (I know, I'm a Linuxdude gone bad) Open up struts.jar in winzip or something and view META-INF/MANIFEST.mf - check implementation-version. So what does the debugging say at the end of your JSPs? Is your response UTF-8 or iso- encoded? I bet it says the page content-type is still iso-8859. How are you setting your struts controller parameter (in struts-config.xml): set-property property=contentType value=text/html; charset=UTF-8/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
people using action form field
I know this is a javascript question but is related with struts. If you use a field called action in the form, how can you change the form action with javascript. When I try to set the document.form.action it tries to set the field instead of the action for the form. Is there any other way to change the action for the form? Thanks, Julio
RE: people using action form field
If you use a field called action in the form, how can you change the form action with javascript. When I try to set the document.form.action it tries to set the field instead of the action for the form. Is there any other way to change the action for the form? Give the form an id attribute: form action=whatever id=formname Now you can use the ID attribute to find the form: document.getElementById(formname).action=newaction.do; -- Tim Slattery [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problems with UTF-8 and forms
You can try this also: http://jakarta.apache.org/tomcat/faq/misc.html#utf8 -Original Message- From: Adam Hardy [mailto:[EMAIL PROTECTED] Sent: Monday, March 01, 2004 3:47 AM To: Struts Users Mailing List Subject: Re: Problems with UTF-8 and forms On 03/01/2004 12:29 AM Jon Bohm wrote: BUT if I rewrite my custombean's getValue method it all works fine (except for swedish uppercase letters): public String getValue() { return new String( value.getBytes(), UTF-8); } Still shouldn't be necessary. Apache Tomcat/5.0.12 Java 1.4.2_01-b06 Struts 1.1 (I think - how do I check?) Windows XP (I know, I'm a Linuxdude gone bad) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: people using action form field
But I cannot set the id element in the html:form tag. Thanks -Mensaje original- De: Slattery, Tim - BLS [mailto:[EMAIL PROTECTED] Enviado el: Martes, 09 de Marzo de 2004 04:07 p.m. Para: 'Struts Users Mailing List' Asunto: RE: people using action form field If you use a field called action in the form, how can you change the form action with javascript. When I try to set the document.form.action it tries to set the field instead of the action for the form. Is there any other way to change the action for the form? Give the form an id attribute: form action=whatever id=formname Now you can use the ID attribute to find the form: document.getElementById(formname).action=newaction.do; -- Tim Slattery [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: [OT] Database locking and deadlock
Hello Vijay, Thanks for your mail. I know I can synchronize the transactions using synchronized method in Java or use semaphores. This will avoid the row-level locks, but,I understand it may cause performance bottlenecks when there are many concurrent users. I always update the tables in the same order.So, there is no question of cyclic issue. The issue here is concurrent users may update the same rows of the concerned table, and at some point, the database cannot handle the updates, depending on the number of users. Do you think using a stored procedure for the transaction will help? Thanks, Shyam --- Balakrishnan, Vijay [EMAIL PROTECTED] wrote: Hi Shyam, You can synchronise the whole transaction with the 2 updates.That will take care of 1 of the issues.The other issue might be cyclic i.e are you updating table C first and then updating table A or B somewhere in your application.You will then have to make the updates in the same order i.e always update A first before C.This issue is a wild guess of mine-so I might be way off base here depending on row level locking etc. Vijay -Original Message- From: Shyam A [mailto:[EMAIL PROTECTED] Sent: Monday, March 08, 2004 6:36 PM To: Struts Users Mailing List Subject: Re: [OT] Database locking and deadlock Vic, Yes, I do get a deadly embrace or deadlock, as the row locks on the table multiply when they occur, holding up connections in the connection pool, eventually consuming all connections, and then all hell breaks loose. Were you referring to synchronizing with semaphores? I read somewhere that the Oracle database is supposed to handle deadlocks by rolling back one of the affected transactions. But the row locks seem to occur intermittently, possibly when there are large numbers of concurrent users. I cannot avoid the transaction as the database updates have to be done as one unit. An alternative that comes to mind is using a stored procedure for the update operations. Anyway, I need to do some research on passing Java objects to stored procedures. Thanks, Shyam --- Vic Cekvenich [EMAIL PROTECTED] wrote: Do you have a deadly embrace? Maybe just syncronise w/ semaphorse or the like. .V Shyam A wrote: Vic, Thanks again. I'm not in a position to switch to IBatis as my application is currently in use. Right now, I'm manually killing the user sessions which lock up the table in the database. My database is Oracle 9i, and this problem seems to occur only with large numbers of concurrent users. In my DAO,I update three tables as part of a transaction - table A and/or table B (in loops), and table C. Commit operation is done only after all tables are updated successfully. So, it may be possible that the DBMS locks up rows of table A or B (before commit) and waits until it updates table C for the commit. Is this the cause of the problem? I've not been able to determine (using SQl Plus, TOAD ) which query is causing the row-level lock. Any ideas? Thanks, Shyam --- Vic Cekvenich [EMAIL PROTECTED] wrote: Is there a way you can reproduce this w/ iSQL - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ 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: people using action form field
But I cannot set the id element in the html:form tag. Yes you can. The Struts styleId attribute of html:form... translates in HTML to the id attribute of form -- Tim Slattery [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problems with UTF-8 and forms
Thanks, File encoding flag for java.exe? Sounds like an old version of Tomcat. I suppose you set this in web.xml now, or am I wrong? - Jon [paste] In the Catalina.bat (windows) catalina.sh (windows) apache$jakarta_config.com (OpenVMS), file there must be a switch added to the call to java.exe. The switch is: -Dfile.encoding=UTF-8 I cannot find documentation for this environment variable anywhere or what it actually does but it is essential. - Original Message - From: Jirole, Amar [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Sent: Tuesday, March 09, 2004 5:20 PM Subject: RE: Problems with UTF-8 and forms Hi, We had the same problem but we are using weblogic. May this will give you a clue on what needs to be changed in Tomcat. We did the following to solve the problem : In weblogic's web.xml we have following snippet context-param param-nameweblogic.jsp.encoding/param-name param-valueiso-8859-1/param-value /context-param In all the jsps we dish out we have following : html head meta http-equiv=Content-Type content=text/html; charset=iso-8859-1 /head This was for display, which you said you have already achieved. And finally to accept the characters in the same encoding format we added following line in weblogic.properties . weblogic.httpd.inputCharset./*=iso-8859-1. I think you will have to something similar in tomcat's properrties file HTH -Amar -Original Message- From: Adam Hardy [mailto:[EMAIL PROTECTED] Sent: Monday, March 01, 2004 3:47 AM To: Struts Users Mailing List Subject: Re: Problems with UTF-8 and forms On 03/01/2004 12:29 AM Jon Bohm wrote: BUT if I rewrite my custombean's getValue method it all works fine (except for swedish uppercase letters): public String getValue() { return new String( value.getBytes(), UTF-8); } Still shouldn't be necessary. Apache Tomcat/5.0.12 Java 1.4.2_01-b06 Struts 1.1 (I think - how do I check?) Windows XP (I know, I'm a Linuxdude gone bad) Open up struts.jar in winzip or something and view META-INF/MANIFEST.mf - check implementation-version. So what does the debugging say at the end of your JSPs? Is your response UTF-8 or iso- encoded? I bet it says the page content-type is still iso-8859. How are you setting your struts controller parameter (in struts-config.xml): set-property property=contentType value=text/html; charset=UTF-8/ Do you have any locale-encoding-mapping-list in your web.xml? You don't need it with UTF-8. You also don't need to specify it in any jsp-property-group since the struts controller will handle it. http://www.anassina.com/struts/i18n/i18n.html Good link, but getting a little out-of-date now. You have a better one? :) I wish! If you get this solved, we can condense this thread and post it in the struts wikki. Adam -- struts 1.1 + tomcat 5.0.16 + java 1.4.2 Linux 2.4.20 Debian - 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: people using action form field
From: Julio Cesar De Salvo [mailto:[EMAIL PROTECTED] I know this is a javascript question but is related with struts. If you use a field called action in the form, how can you change the form action with javascript. When I try to set the document.form.action it tries to set the field instead of the action for the form. Is there any other way to change the action for the form? There is, and Tim gave you that answer. I solved the problem by changing the form property to 'userAction' which makes the whole thing clearer. Think about the next person who has to maintain your project-- if you leave it as 'action' at least document this issue clearly. I know I spent a while trying to figure it out! -- Wendy Smoak Application Systems Analyst, Sr. ASU IA Information Resources Management - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
html:image tag and DynaActionForm
I have an html:image tag inside a html:form tag, which points to one of my Struts Actions. My Action utilizes a DynaActionForm, in which I have defined several form-property entries. One of these form-property entries, lets call it imageProperty matches the property attribute of my html:image tag, also imageProperty. However, in my Action, when I have clicked on the image generated by the html:image tag, the DynaActionForm object does NOT contain an entry for the html:image property attribute. I would expect that my call to dynaForm.get(imageProperty) would return something other than throwing an IllegalArgumentException. Here's the HTML: html:form action=myAction html:image page=/img/myImage.gif property=imageProperty / /html:form The struts-config.xml: form-bean dynamic=true name=myActionForm type=org.apache.struts.action.DynaActionForm form-property name=imageProperty type=java.lang.String / /form-bean action attribute=myActionForm name=myActionForm path=/myAction type=com.foo.bar.MyAction validate=false forward ... / /action The Action code: DynaActionForm dynaForm = (DynaActionForm) form; if ( dynaForm != null ) { Object o = dynaForm.get(imageProperty); } Any thoughts on what I am doing wrong here? T - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: people using action form field
Ok, Tim. But when I try the change the value of the action, as you said, document.getElementById(formname).action=newaction.do; it refers to the action field and not the action element in the form tag. Thanks -Mensaje original- De: Slattery, Tim - BLS [mailto:[EMAIL PROTECTED] Enviado el: Martes, 09 de Marzo de 2004 04:23 p.m. Para: 'Struts Users Mailing List' Asunto: RE: people using action form field But I cannot set the id element in the html:form tag. Yes you can. The Struts styleId attribute of html:form... translates in HTML to the id attribute of form -- Tim Slattery [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: people using action form field
Ok, Tim. But when I try the change the value of the action, as you said, document.getElementById(formname).action=newaction.do; it refers to the action field and not the action element in the form tag. Suddenly I have the feeling that I don't know what you're talking about. What's the difference between the action field and the action element? Can you give a snippet of your JSP or HTML code? -- Tim Slattery [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: display message on success
Thanks all for the suggestions. Will try. Roy. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: people using action form field
document.forms[0].action='somethig.do' works to me... to change a field with name action, i guess you must do something like document.forms[0].action.value Slattery, Tim - BLS wrote: If you use a field called action in the form, how can you change the form action with javascript. When I try to set the document.form.action it tries to set the field instead of the action for the form. Is there any other way to change the action for the form? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: people using action form field
Julio, are you talking about something like: form action=whatever input type=text name=action In that case, you can assign an id attribute to the input field the same way you assigned one to the form field, and address it in the same manner. Or you can use the name field: Document.getElementsByName(action)[0].value=whatever; Note that getElementsByName returns an array of items, since the name attribute doesn't have to have a unique value (but id does). So you need to subscript that array to get the right one. If there's only one element with name=action then it's element zero of the array. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: people using action form field
Ok, let me show what I'm trying to do, imagine that this is the HTML code rendered by struts: form name=elementForm action=/getElements.do input type=hidden name=action value=Create /form Now, when I try to change the value of ..action=/getElements.do.. using javascript , document.elementForm.action = '/newGetElements.do', this refers to the field that has the Create value instead of the action element in the form tag (form name=elementForm action=/getElements.do). Hope this helps, and thanks again -Mensaje original- De: Slattery, Tim - BLS [mailto:[EMAIL PROTECTED] Enviado el: Martes, 09 de Marzo de 2004 04:45 p.m. Para: 'Struts Users Mailing List' Asunto: RE: people using action form field Ok, Tim. But when I try the change the value of the action, as you said, document.getElementById(formname).action=newaction.do; it refers to the action field and not the action element in the form tag. Suddenly I have the feeling that I don't know what you're talking about. What's the difference between the action field and the action element? Can you give a snippet of your JSP or HTML code? -- Tim Slattery [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: people using action form field
Ok, let me show what I'm trying to do, imagine that this is the HTML code rendered by struts: form name=elementForm action=/getElements.do input type=hidden name=action value=Create /form Now, when I try to change the value of ..action=/getElements.do.. using javascript , document.elementForm.action = '/newGetElements.do', this refers to the field that has the Create value instead of the action element in the form tag (form name=elementForm action=/getElements.do). So you're trying to change the value of the action attribute of the form... tag? Then my first post was right: assign an id= attribute to the form.. tag (using the styleId attribute of the Struts html:form... tag), then use document.getElementById() to find the form tag. So you have: form action=something.do id= Which might come from the Struts tag: html:form action=something.do styleId= Then your JavaScript would look like this: document.getElementById().action=somethingelse.do; That can only assign a new value to the action attribute of the form.. tag, it can't possibly address the hidden text field. -- Tim Slattery [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat and Aliases
I have searched the archives as well as google with no lick. Is the answer use apache? We're running TC in a standalone configuration. Short of putting Apache in front of it, and running mod_jk is there a way in server.xml, web.xml or otherwise to do aliasing like the following httpd.conf entry? Alias /images/ /usr/local/product/images/ Directory /usr/local/product/images Options Indexes MultiViews AllowOverride None Order allow,deny Allow from all /Directory Regards, Eric - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Role based access?
Hi Pedro, I'm interested in your software, can you send it to me? Zsolt -Original Message- From: Pedro Salgado [mailto:[EMAIL PROTECTED] Sent: Thursday, January 01, 1970 1:09 AM To: Struts Users List Subject: Re: Role based access? If you need this kind of behaviour (Container Managed Security) I already implemented a very simple, free and open framework that allows to manage security over your application. I haven't made any documentation besides javadoc but, if you need any help, just send me an email. Pedro Salgado On 19/02/2004 06:04, Navjot Singh [EMAIL PROTECTED] wrote: in this case, Form is decalratively saying that it can be accessed only by userRole. Now when you use CMA, every user will be bound to to a role. RequestController compare the two roles one from user-in-request and other from ActionMapping/ActionConfig and continue.. However, you can also override the default behaviour of processRoles and go your own way. HTH Navjot Singh -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 18, 2004 8:49 PM To: Struts Users Mailing List Subject: Role based access? Hi Guys, Struts-config.xml action attribute=Form roles=userRole How do i use this 'roles' attribute to implement role-based access. Thanks and Regards Subramaniam Olaganthan Tata Consultancy Services Mailto: [EMAIL PROTECTED] Website: http://www.tcs.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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: people using action form field
Tim, I keep on getting the value of the action field when I try your solution. I guess the best solution would be changing the action field name to whichAction or something. Thanks especially you and everyone for helping! Julio -Mensaje original- De: Slattery, Tim - BLS [mailto:[EMAIL PROTECTED] Enviado el: Martes, 09 de Marzo de 2004 05:20 p.m. Para: 'Struts Users Mailing List' Asunto: RE: people using action form field Ok, let me show what I'm trying to do, imagine that this is the HTML code rendered by struts: form name=elementForm action=/getElements.do input type=hidden name=action value=Create /form Now, when I try to change the value of ..action=/getElements.do.. using javascript , document.elementForm.action = '/newGetElements.do', this refers to the field that has the Create value instead of the action element in the form tag (form name=elementForm action=/getElements.do). So you're trying to change the value of the action attribute of the form... tag? Then my first post was right: assign an id= attribute to the form.. tag (using the styleId attribute of the Struts html:form... tag), then use document.getElementById() to find the form tag. So you have: form action=something.do id= Which might come from the Struts tag: html:form action=something.do styleId= Then your JavaScript would look like this: document.getElementById().action=somethingelse.do; That can only assign a new value to the action attribute of the form.. tag, it can't possibly address the hidden text field. -- Tim Slattery [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]
Compression Filter
I'm trying to implement a compression filter on the HTTP response similar to that discussed in http://www.onjava.com/pub/a/onjava/2003/11/19/filters.html?page=1. When requesting straight JSP's, it works fine, but any Struts .dos do not work. Specifically, it appears the compression filter itself functions normally, but the browser responds with an empty page. (The source code, cryptically enough, does include htmlbody/body/html, but I suspect that's being defaulted somewhere.) I've tried: - Configuring the filter to handle *.do as a url-pattern, instead of the servlet-name action. - Commenting out the compression code entirely, leaving only GZIPResponseWrapper wrappedResponse = new GZIPResponseWrapper(res); chain.doFilter(req, wrappedResponse); - Executing the compression on a subclass of ActionServlet (after the super's doGet/doPost are called). ...but still the same results. We are running Struts on Sybase EAServer 4.2, by the way. Thanks in advance, Shahak Nagiel Software Engineer Northrop Grumman Mission Systems - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Compression Filter
Check your server logs for exceptions that say the response has already been committed. We had a programmer try to create a compression filter based on the source from one of those articles and it did not work on our production servers. Worth a look... -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 09, 2004 2:56 PM To: [EMAIL PROTECTED] Subject: Compression Filter I'm trying to implement a compression filter on the HTTP response similar to that discussed in http://www.onjava.com/pub/a/onjava/2003/11/19/filters.html?page=1. When requesting straight JSP's, it works fine, but any Struts .dos do not work. Specifically, it appears the compression filter itself functions normally, but the browser responds with an empty page. (The source code, cryptically enough, does include htmlbody/body/html, but I suspect that's being defaulted somewhere.) I've tried: - Configuring the filter to handle *.do as a url-pattern, instead of the servlet-name action. - Commenting out the compression code entirely, leaving only GZIPResponseWrapper wrappedResponse = new GZIPResponseWrapper(res); chain.doFilter(req, wrappedResponse); - Executing the compression on a subclass of ActionServlet (after the super's doGet/doPost are called). ...but still the same results. We are running Struts on Sybase EAServer 4.2, by the way. Thanks in advance, Shahak Nagiel Software Engineer Northrop Grumman Mission Systems - 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: Compression Filter
Indeed, I got the exceptions you mentioned. Presumably, this is because requests for .dos ultimately either forward or redirect to JSP's, and, I believe, either one will flush the response buffer and hence commit the response. So, does this mean there's no way to enable a filter-based compression with Struts? -Original Message- From: Hookom, Jacob [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 09, 2004 4:04 PM To: Struts Users Mailing List Subject: RE: Compression Filter Check your server logs for exceptions that say the response has already been committed. We had a programmer try to create a compression filter based on the source from one of those articles and it did not work on our production servers. Worth a look... -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 09, 2004 2:56 PM To: [EMAIL PROTECTED] Subject: Compression Filter I'm trying to implement a compression filter on the HTTP response similar to that discussed in http://www.onjava.com/pub/a/onjava/2003/11/19/filters.html?page=1. When requesting straight JSP's, it works fine, but any Struts .dos do not work. Specifically, it appears the compression filter itself functions normally, but the browser responds with an empty page. (The source code, cryptically enough, does include htmlbody/body/html, but I suspect that's being defaulted somewhere.) I've tried: - Configuring the filter to handle *.do as a url-pattern, instead of the servlet-name action. - Commenting out the compression code entirely, leaving only GZIPResponseWrapper wrappedResponse = new GZIPResponseWrapper(res); chain.doFilter(req, wrappedResponse); - Executing the compression on a subclass of ActionServlet (after the super's doGet/doPost are called). ...but still the same results. We are running Struts on Sybase EAServer 4.2, by the way. Thanks in advance, Shahak Nagiel Software Engineer Northrop Grumman Mission Systems - 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: Compression Filter
No, the problem is that the implementation you are using is the same as the one our programmer tried to use. In the Servlet spec, you can write to response 2 different ways. Depending on the application server you are using, this can be through the writer or stream, but not both. This is the problem you are seeing. http://java.sun.com/j2ee/1.4/docs/api/javax/servlet/ServletResponse.html#get OutputStream() Have your ResponseWrapper instead write to an object like this. Also, in your filter, before you wrap, check the instanceof the response to make sure you don't double bag the response (servlet 2.3 spec). public class ResponseToken { private byte[] content; private transient ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); public ResponseToken() { } public ResponseToken(String content) { this.content = content.getBytes(); } public void commit() { if (this.content == null) { try { this.outputStream.close(); } catch (IOException e) { } this.content = this.outputStream.toByteArray(); } } public OutputStream getOutputStream() { return outputStream; } public void setOutputStream(ByteArrayOutputStream outputStream) { this.outputStream = outputStream; } public void readExternal(ObjectInput input) throws IOException, ClassNotFoundException { this.content = (byte[]) input.readObject(); } public void writeExternal(ObjectOutput output) throws IOException { this.commit(); output.writeObject(this.content); } public void writeToResponse(HttpServletResponse response) throws ServletException, IOException { this.commit(); OutputStream os = new BufferedOutputStream(response.getOutputStream()); os.write(this.content); os.flush(); } } Jacob Hookom Senior Analyst/Programmer McKesson Medical-Surgical Golden Valley, Minnesota http://www.mckesson.com -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 09, 2004 3:24 PM To: [EMAIL PROTECTED] Subject: RE: Compression Filter Indeed, I got the exceptions you mentioned. Presumably, this is because requests for .dos ultimately either forward or redirect to JSP's, and, I believe, either one will flush the response buffer and hence commit the response. So, does this mean there's no way to enable a filter-based compression with Struts? -Original Message- From: Hookom, Jacob [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 09, 2004 4:04 PM To: Struts Users Mailing List Subject: RE: Compression Filter Check your server logs for exceptions that say the response has already been committed. We had a programmer try to create a compression filter based on the source from one of those articles and it did not work on our production servers. Worth a look... -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 09, 2004 2:56 PM To: [EMAIL PROTECTED] Subject: Compression Filter I'm trying to implement a compression filter on the HTTP response similar to that discussed in http://www.onjava.com/pub/a/onjava/2003/11/19/filters.html?page=1. When requesting straight JSP's, it works fine, but any Struts .dos do not work. Specifically, it appears the compression filter itself functions normally, but the browser responds with an empty page. (The source code, cryptically enough, does include htmlbody/body/html, but I suspect that's being defaulted somewhere.) I've tried: - Configuring the filter to handle *.do as a url-pattern, instead of the servlet-name action. - Commenting out the compression code entirely, leaving only GZIPResponseWrapper wrappedResponse = new GZIPResponseWrapper(res); chain.doFilter(req, wrappedResponse); - Executing the compression on a subclass of ActionServlet (after the super's doGet/doPost are called). ...but still the same results. We are running Struts on Sybase EAServer 4.2, by the way. Thanks in advance, Shahak Nagiel Software Engineer Northrop Grumman Mission Systems - 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 locking and deadlock
On 08/03/2004 21:31 Shyam A wrote: [snip] Is there a possibilty of a deadlock occuring in the above code when there are mutliple users concurrently accessing the system.i.e, multiple users update multiple rows of the table at the same time I can't see anything in your update that might cause deadlock but perhaps you'd better run it past an Oracle expert just to be sure. Could somebody throw some light on this? My understanding is that deadlocks are automatically handled by the DBMS. Anyway, is there a way to prevent the possiblity of deadlocks in my program ? One more thing - in the code above and in other Select queries, I open and close the Connection from the connection pool. However, I do not close the Statement or ResultSet objects. Will this lead to problems ? My understanding is that closing the Connection object will free up all the associated resources. True but rememeber that when using a connection from a connection pool the close() method probably (i.e. 99.% certainly) won't close the physical connection but just return it to the pool. So your clean-up won't happen. Some connection pools have the ability to track and close orphaned Statements and ResultSets. I suppose you need to consult your containers docs. -- Paul Thomas +--+-+ | Thomas Micro Systems Limited | Software Solutions for Business | | Computer Consultants | http://www.thomas-micro-systems-ltd.co.uk | +--+-+ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Getting values from two different beans in the same form
Hi, I have a question on using two beans in same form. I get the followig error: javax.servlet.jsp.JspException: No getter method for property name of bean testModule basically I am trying to access name and id of bean1 and version of bean2 to show in the same one form... is this possible.. samples appreciated. thanks much, Sam - Do you Yahoo!? Yahoo! SiteBuilder - Free web site building tool. Try it!
Re: Getting values from two different beans in the same form
I don't know if a got it...You can use nested beans inside your ActionForm, like: FirstBean - has get/set name and get/set id SecondBean - has get/set version MyActionForm - has get/set firstBean and secondBean You can do : html:form... html:hidden property=firstBean.id/ html:text property=secondBean.version/ /html:form as as wrote: Hi, I have a question on using two beans in same form. I get the followig error: javax.servlet.jsp.JspException: No getter method for property name of bean testModule basically I am trying to access name and id of bean1 and version of bean2 to show in the same one form... is this possible.. samples appreciated. thanks much, Sam - 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: Getting values from two different beans in the same form
From: as as [mailto:[EMAIL PROTECTED] I have a question on using two beans in same form. I get the followig error: javax.servlet.jsp.JspException: No getter method for property name of bean testModule basically I am trying to access name and id of bean1 and version of bean2 to show in the same one form... You need to show the code that's giving you the error, otherwise we can only guess. The error message says it's looking for a 'getName()' method in the 'testModule' bean. Apparently that's not where the 'getName()' method is. Make sure your beans conform to the JavaBeans specification-- no duplicate 'set' methods with different signatures, for example. If you're just doing bean:write or c:out you may need to name the bean that you want it to use. If you're trying to get form fields to pick up values from two different beans, you should probably populate the single form bean in the Action, and then let the Struts tags do their thing. -- 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: Getting values from two different beans in the same form
Thanks Daniel and Wendy! I am trying this now and will post my results soon ~~~Sam. Daniel Henrique Alves Lima [EMAIL PROTECTED] wrote: I don't know if a got it...You can use nested beans inside your ActionForm, like: FirstBean - has get/set name and get/set id SecondBean - has get/set version MyActionForm - has get/set firstBean and secondBean You can do : - Do you Yahoo!? Yahoo! Search - Find what youre looking for faster.
Tomcat and matching actions
Hey all.. I have experienced some really stupid behavior of tomcat/struts when combined.. let me explain. In web.xml if you map *.do to the struts action servlet you are able to match actions with paths, ie /blah/something.do correctly gets matched to /blah/something (the .do gets stripped.. still don't understand why) But what really irks me is I need to do some directory matching, ie in web.xml i have /getDocument/* mapped to the struts servlet. But in my struts config I cannot match /getDocument/**, the only way I can match is based on file extensions because the /getDocument/ gets stripped, so im forced to matching *.pdf, *.zip.. etc! Is there some way to fix this?? Or a suitable good alternative? Thanks, David - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] copyrighted documents in Struts package
Having the Netscape copyrighted stuff in there can't cause any commercial problems as there must be RSS commercial tools out there. Unless every commercial RSS tool is bad. It's more of an issue for Apache licencewise, in that all files distributed by Apache are increasingly meant to be owned by Apache. This used to (realistically) just mean source files, but it's now being extended to include configurations, documentation etc. It's something to bring up with the PMC, and I'll aim to pass it on. Onto Andreas' actual question thread-wise. I think they're tied in that copyrighting tends to be linked to ownership, and the owner is the one who has the power to change licences and things. Licences don't seem to say: ASF own this, but just say Copyright (c) 1999 The Apache Sof..., so the copyright seems the only link between a piece of work and the owner. Hen On Tue, 9 Mar 2004, Andreas Solarik wrote: So, is it just me, or are licensing and copyrighting rather unrelated issues? -Ursprungliche Nachricht- Von: Kevin Wang [mailto:[EMAIL PROTECTED] Gesendet: Dienstag, 09. Marz 2004 16:31 An: Struts Users Mailing List Betreff: Re: copyrighted documents in Struts package If those files are part of Struts package, but copyrighted as netscape's property, is it still legal to use Struts to develop commercial software? Paul Stanton [EMAIL PROTECTED] Paul Stanton [EMAIL PROTECTED] 03/08/2004 05:46 PM Please respond to Struts Users Mailing List To: Struts Users Mailing List [EMAIL PROTECTED] cc: Subject: Re: copyrighted documents in Struts package the rss spec is owned by netscape. the dtds are therefore netscapes property - 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: Populating form Elements from another object.
This is really good. An example of processing this form in Action classes would be very useful too as the way Shanmugam needs. Niall Pemberton [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Yup, thats it - plus dynamic=true form-bean name=fooForm1 type=lib.framework.struts.LazyValidatorActionForm dynamic=true / form-bean name=fooForm2 type=lib.framework.struts.LazyValidatorActionForm dynamic=true / form-bean name=fooForm3 type=lib.framework.struts.LazyValidatorActionForm dynamic=true / form-bean name=fooForm4 type=lib.framework.struts.LazyValidatorActionForm dynamic=true / Oh, I noticed an error in LazyValidatorForm, its declared as abstract - which it shouldn't be - I don't use it directly, I use LazyValidatorActionForm which extends it. Niall - Original Message - From: Mark Lowe [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Tuesday, March 09, 2004 8:53 AM Subject: Re: Populating form Elements from another object. I haven't seen the code but if what i understand of what Niall has been saying you'd use them instead of DynaActionForm. form-bean name=fooForm type=com.ilovesparrows.struts.NiallsForm / of course you'll need to call the package and class name to something appropriate. On 9 Mar 2004, at 09:47, shanmugampl wrote: Hi, I saw your code. I have one doubt. How do you plugin your own DynaBean implementation into the struts framework. Shanmugam PL Niall Pemberton wrote: I wrote these http://www.niallp.pwp.blueyonder.co.uk Niall - Original Message - From: shanmugampl [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, February 25, 2004 7:00 AM Subject: Populating form Elements from another object. Hi, I have a requirement where i need to populate the values of a form from another object, and then again transform the contents of the form back to the object once the form is submitted. i.e Say, when i click a button, i do some functionalities and have a Properties object as an output. The keys in the Properties object are not static. These values need to be shown in a form. As the keys retrieved for the current operation is not known, i cant define the values in the struts-config.xml for the dynaactionclass. Is it possible to extend the dynaactionclass, and during its init or something, iterate the properties object and populate the form. Are there any other way of doing it. Thanks Shanmugam PL - 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: [OT] Tomcat and Aliases
I went thru this myself with Windows and IIS -- If it's a *nix install, you can use a symbolic link. If it's a Windows install (2K) or later, see the following URL about Junctions which are more or less the same thing. http://www.sysinternals.com/ntw2k/source/misc.shtml HTH, Joe -Original Message- From: Eric Dahnke [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 09, 2004 3:24 PM To: 'Struts Users Mailing List' Subject: Tomcat and Aliases I have searched the archives as well as google with no lick. Is the answer use apache? We're running TC in a standalone configuration. Short of putting Apache in front of it, and running mod_jk is there a way in server.xml, web.xml or otherwise to do aliasing like the following httpd.conf entry? Alias /images/ /usr/local/product/images/ Directory /usr/local/product/images Options Indexes MultiViews AllowOverride None Order allow,deny Allow from all /Directory Regards, Eric - 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 locking and deadlock
From a pure Oracle perspective I would program this more defensively e.g Do a select for update nowait before you issue the update to grab the lock in advance. That way you'll get an oracle error (ora -54) if another user has the row and you can handle it appropriately Duncan Shyam A wrote: Hi, I know the subject of my mail is off-topic but I hope somebody will be able to help me out with my problem. I experienced a wierd problem today when a deadlock occured in my database - Oracle 9i, and it locked up all connections in the connection pool on my server - OC4J (Oracle 9iAS). I have a connection pool, which is configured on my server- OC4J. It is intialized on server startup, using a Servlet. I would like to verify if the code I use in my DAO may cause any deadlock condition. In my DAO, I use Update queries as part of a transaction. i.e, I turn off auto-commit, do my Update queries, and commit or rollback depending on the outcome of the queries. In one of the queries, I may need to update multiple rows of a table, and hence do the update operation in a loop (over a collection). Given below is the relevant portion of the code: snip //method that updates votes for candidates in an election public int updateVotes(BallotList ballotList) { int result=0; //result of insert operation String query=; Ballot ballot=null; CandidateList candList=null; Candidate candidate=null; int currVote=0; int electionNo = ballotList.getElectionNo(); try { for(int i=0;iballotList.getSize();i++) { ballot = ballotList.getBallot(i); candList = ballot.getCandidateList(); for(int j=0;jcandList.getSize();j++) { candidate = candList.getCandidate(j); //update votes for candidate if(candidate.getVote() 0) { //get current vote count and update currVote = getCurrentVote(electionNo,candidate.getPostNo(),candidate.getPidm()); currVote++; query = Update DZRCAND set DZRCAND_NUM_VOTE = +currVote+ + where DZRCAND_ELCTN_NO = +electionNo+ + and DZRCAND_POST_NO = +candidate.getPostNo()+ + and DZRCAND_CAND_PIDM = +candidate.getPidm()+; result += dbConnection.doUpdate(query); } } //end of inner for loop } //end of outer for loop } catch(Exception e) { System.out.println(Exception in DZRCAND update for votes: + e.getMessage()); System.out.println(query: + query); } return result; } /snip Is there a possibilty of a deadlock occuring in the above code when there are mutliple users concurrently accessing the system.i.e, multiple users update multiple rows of the table at the same time Could somebody throw some light on this? My understanding is that deadlocks are automatically handled by the DBMS. Anyway, is there a way to prevent the possiblity of deadlocks in my program ? One more thing - in the code above and in other Select queries, I open and close the Connection from the connection pool. However, I do not close the Statement or ResultSet objects. Will this lead to problems ? My understanding is that closing the Connection object will free up all the associated resources. Any help/pointers/suggestions will be greatly appreciated. Thanks, Shyam __ 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Iterating List
I need to iterate and display collection object List containing objects of type String in my JSP, I know that if the collection is of type Array I can index and get all the objects but is there anyway I can iterate this List object and disply its String objects in my JSP(without having to convert the list to Array). Thanks for your help -Ramadoss - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Newbie Q
Hi All! Can someone tell me as to how do I call bean:write .../ inside html:link .../html:link Example: html:link href=bean:write name=myBean property=beanProperty /Link Text/html:link I investigated a little abt nested tags, but I don't think that it is applicable here. TIA, Kunal - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Iterating List
Try logic:iterate (http://jakarta.apache.org/struts/userGuide/struts-logic.html#iterate) and bean:write (http://jakarta.apache.org/struts/userGuide/struts-bean.html#write). Look at mail archive (http://mail-archives.apache.org/eyebrowse/[EMAIL PROTECTED]). I think somebody has been sent a question like yours. I hope this helps you... Ramadoss Chinnakuzhandai wrote: I need to iterate and display collection object List containing objects of type String in my JSP, I know that if the collection is of type Array I can index and get all the objects but is there anyway I can iterate this List object and disply its String objects in my JSP(without having to convert the list to Array). Thanks for your help -Ramadoss - 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: Newbie Q
I don't know if your construction is possible (i think it is). But try to use bean:define : bean:define id=myProp name=myBean property=beanProperty/ html:link href=%=myProp%Link Text/html:link Kunal H. Parikh wrote: Hi All! Can someone tell me as to how do I call bean:write .../ inside html:link .../html:link Example: html:link href=bean:write name=myBean property=beanProperty /Link Text/html:link I investigated a little abt nested tags, but I don't think that it is applicable here. TIA, Kunal - 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 locking and deadlock
Duncan, Thanks for the suggestion. I was aware of that and did consider the option. However, after consulting with my DBA and doing some research, it seems the problem lies with the number of concurrent transactions that can be done on a table. This can be configured in the INITRANS parameter for the table. It has been increased from the default value of 1 to 5. We are waiting to see if this fixes my problem. Thanks, Shyam --- Duncan Mills [EMAIL PROTECTED] wrote: From a pure Oracle perspective I would program this more defensively e.g Do a select for update nowait before you issue the update to grab the lock in advance. That way you'll get an oracle error (ora -54) if another user has the row and you can handle it appropriately Duncan Shyam A wrote: Hi, I know the subject of my mail is off-topic but I hope somebody will be able to help me out with my problem. I experienced a wierd problem today when a deadlock occured in my database - Oracle 9i, and it locked up all connections in the connection pool on my server - OC4J (Oracle 9iAS). I have a connection pool, which is configured on my server- OC4J. It is intialized on server startup, using a Servlet. I would like to verify if the code I use in my DAO may cause any deadlock condition. In my DAO, I use Update queries as part of a transaction. i.e, I turn off auto-commit, do my Update queries, and commit or rollback depending on the outcome of the queries. In one of the queries, I may need to update multiple rows of a table, and hence do the update operation in a loop (over a collection). Given below is the relevant portion of the code: snip //method that updates votes for candidates in an election public int updateVotes(BallotList ballotList) { int result=0; //result of insert operation String query=; Ballot ballot=null; CandidateList candList=null; Candidate candidate=null; int currVote=0; int electionNo = ballotList.getElectionNo(); try { for(int i=0;iballotList.getSize();i++) { ballot = ballotList.getBallot(i); candList = ballot.getCandidateList(); for(int j=0;jcandList.getSize();j++) { candidate = candList.getCandidate(j); //update votes for candidate if(candidate.getVote() 0) { //get current vote count and update currVote = getCurrentVote(electionNo,candidate.getPostNo(),candidate.getPidm()); currVote++; query = Update DZRCAND set DZRCAND_NUM_VOTE = +currVote+ + where DZRCAND_ELCTN_NO = +electionNo+ + and DZRCAND_POST_NO = +candidate.getPostNo()+ + and DZRCAND_CAND_PIDM = +candidate.getPidm()+; result += dbConnection.doUpdate(query); } } //end of inner for loop } //end of outer for loop } catch(Exception e) { System.out.println(Exception in DZRCAND update for votes: + e.getMessage()); System.out.println(query: + query); } return result; } /snip Is there a possibilty of a deadlock occuring in the above code when there are mutliple users concurrently accessing the system.i.e, multiple users update multiple rows of the table at the same time Could somebody throw some light on this? My understanding is that deadlocks are automatically handled by the DBMS. Anyway, is there a way to prevent the possiblity of deadlocks in my program ? One more thing - in the code above and in other Select queries, I open and close the Connection from the connection pool. However, I do not close the Statement or ResultSet objects. Will this lead to problems ? My understanding is that closing the Connection object will free up all the associated resources. Any help/pointers/suggestions will be greatly appreciated. Thanks, Shyam __ Do you Yahoo!? Yahoo! Search - Find what youre looking for faster http://search.yahoo.com
RE: Iterating List
finally I got the following working.. logic:iterate id=list name=myform property=ListofStringobjects bean:define id=xyz name=list type=java.lang.String/ /logic:iterate -Ramadoss -Original Message- From: Daniel Henrique Alves Lima [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 09, 2004 8:35 PM To: Struts Users Mailing List Subject: Re: Iterating List Try logic:iterate (http://jakarta.apache.org/struts/userGuide/struts-logic.html#iterate) and bean:write (http://jakarta.apache.org/struts/userGuide/struts-bean.html#write). Look at mail archive (http://mail-archives.apache.org/eyebrowse/[EMAIL PROTECTED]). I think somebody has been sent a question like yours. I hope this helps you... Ramadoss Chinnakuzhandai wrote: I need to iterate and display collection object List containing objects of type String in my JSP, I know that if the collection is of type Array I can index and get all the objects but is there anyway I can iterate this List object and disply its String objects in my JSP(without having to convert the list to Array). Thanks for your help -Ramadoss - 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: How to configure JNDI in tomcat5
thx at first. my tomcat version is 5.0.as your know,there is nothing about my webapp in server.xml ,oppositely,there are some xml file in %CATALINA_HOME%/conf/catalina/localhost,in which myApp.xml has been. i have configure myApp.xml,web.xml in %myapp_home%/web-inf,and throw class12.jar into common/lib( oracle 9i driver and win shell). my calling code likes: lookup(java:comp/env/jdbc/mydb), error msg is comp not bind lookup(jdbc/mydb), error msg is jdbc not bind From: Marco Mistroni [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Subject: RE: How to configure JNDI in tomcat5 Date: Tue, 9 Mar 2004 10:43:16 - Hi, I m assuming u have been thru the steps of configuring Jndi in tomcat (update of server.xml and common\lib) Assuming you have called, in ur server.xml, your datasource test/myDb, You would have entered a resource-ref in your web.xml, that refers to Test/myDb Now when you look it up you have to look for java:comp/env/test/myDb Hope this helps Regards marco -Original Message- From: rx liu [mailto:[EMAIL PROTECTED] Sent: 09 March 2004 10:32 To: [EMAIL PROTECTED] Subject: How to configure JNDI in tomcat5 I had try to configure JNDI( and DataSource) with my tomcat5.0,by hand or by web page which is localhost:8080/admin,but both are failure.the err occur: Context context = new IntitalContext(); Context envContext = ( Context)context.lookup(java:comp/env); with the err msg : javax.naming.NameNotFoundException: Name bean is not bound in this Context ... i had operate under by tomcat5.0's spec in apache.step by step,is it error?what's the matter with my configure file web.xml or server.xml? _ 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] _ MSN Hotmail http://www.hotmail.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Newbie Q
Will try this, but doesn't having %=myProp% mean that I am using a scriptlet ? And, shouldn't our JSP not include scriptlets as far as possible ? Thanks for the help! Kunal -Original Message- From: Daniel Henrique Alves Lima [mailto:[EMAIL PROTECTED] Sent: Wednesday, 10 March 2004 12:38 To: Struts Users Mailing List Subject: Re: Newbie Q I don't know if your construction is possible (i think it is). But try to use bean:define : bean:define id=myProp name=myBean property=beanProperty/ html:link href=%=myProp%Link Text/html:link Kunal H. Parikh wrote: Hi All! Can someone tell me as to how do I call bean:write .../ inside html:link .../html:link Example: html:link href=bean:write name=myBean property=beanProperty /Link Text/html:link I investigated a little abt nested tags, but I don't think that it is applicable here. TIA, Kunal - 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: Newbie Q
yes, but theres no other way (without writing your own tag) to put myProp into the href attribute. Kunal H. Parikh wrote: Will try this, but doesn't having %=myProp% mean that I am using a scriptlet ? And, shouldn't our JSP not include scriptlets as far as possible ? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
help ,action path
I got this jsp page: sample.jsp: html:form method=post action=/openReport.do tr td html:text property=fileName value=this is the filename/ /td /tr input type=submit/ /html:form it is saved in /contextPath/rv/sample.jsp this is part of my web.xml web.xml: init-param param-nameconfig/rv/param-name param-value/WEB-INF/struts-rv-config.xml/param-value /init-param this is part of my struts-rv-config.xml struts-rv-config.xml: action path=/openReport type=com.viador.rv.action.RunReportAction name=OpenReportForm scope=session /action when I try to access the jsp page directly by this url http://localhost/myapp/rv/sample.jsp there is an error says Cannot retrieve mapping for action /openReport why? even when I modified the jsp page as the below action=/rv/openReport.do or action=myapp/rv/openReport.do it still doesnt work but if I use the form element of HTML instead of that of struts, smaple.jsp works! why is this? _ MSN Messenger: http://messenger.msn.com/cn - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
pdf file open.
Hi, I am trying to open a pdf file. I am using servlet and struts in my application. Everything is working fine except it ask me two times do you want to open or save the file, once for the file whoes name is session id and second time for the actual file. Am i doing some thing wrong. Please help me Servelet code is as follows public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException { //Method name final String METHOD_NAME = CLASS_NAME.concat(.doGet()); String sessionId = request.getParameter(GUIConstants.USER_SESSION_ID); String encodefileName = request.getParameter(GUIConstants.USER_FILE_NAME); String fileName = new String(); try { fileName = URLDecoder.decode(encodefileName, GUIConstants.CHAR_ENCODING); } catch (Exception ex) { LOGGER.error(METHOD_NAME, ex); } HttpSession session = request.getSession(); if (!session.getId().equals(sessionId)) { // Don't do anything - just return //response.sendRedirect(GUIConstants.LOGIN_URL); return; } LOGGER.debug(File Name + fileName); int dot = fileName.lastIndexOf(CommonConstants.DOT) + 1; if(fileName.substring(dot).equalsIgnoreCase(CommonConstants.PDF)) { response.setContentType(GUIConstants.PDF_CONTENT_TYPE); } else { response.setContentType(GUIConstants.CONTENT_TYPE); } response.setHeader( GUIConstants.CONTENT_DIS, GUIConstants.CONTENT_ATT + \ + fileName + \); try { String filePath = GetProperties.getValue( PropertiesFileConstants.PMP_PROP_FILE_PATH, CommonConstants.DOCUMENT_LOCAL_STORE_PATH_FOR_VIEWING); ServletOutputStream out = response.getOutputStream(); String fullFilePath = filePath + File.separator + fileName; FileInputStream fin = new FileInputStream(new File(fullFilePath)); byte[] buf = new byte[GUIConstants.FILE_SIZE]; int len = 0; while ((len = fin.read(buf)) != -1) { out.write(buf); } out.flush(); fin.close(); } catch (Exception e) { //e.printStackTrace(); LOGGER.error(e.getMessage(), e); } } /** * @param req HttpServletRequest * @param res HttpServletResponse * @throws ServletException servlet exception */ public void doPost(HttpServletRequest req, HttpServletResponse res) throws ServletException { doGet(req, res); } Thanks and Regards Deepak. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Iterating List
How about this ? logic:iterate id=myString name=myform property=ListofStringobjects bean:write name=myString/ /logic:iterate Ramadoss Chinnakuzhandai wrote: finally I got the following working.. logic:iterate id=list name=myform property=ListofStringobjects bean:define id=xyz name=list type=java.lang.String/ /logic:iterate -Ramadoss - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: help ,action path
Please, try html:form method=post action=/openReport or html:form method=post action=/myapp/openReport You can also do a view source and look the html generated by tag html:form - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: help ,action path
modified the jsp file to the below still doesnt work html:form method=post action=/openReport or html:form method=post action=/myapp/openReport You can also do a view source and look the html generated by tag html:form and ,I think I need an explaination of this, and what should be the right way? (I think I m doing the right which I described in my last mail(below) ) thank you all From: Mu Mike [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: help ,action path Date: Wed, 10 Mar 2004 03:18:51 + I got this jsp page: sample.jsp: html:form method=post action=/openReport.do tr td html:text property=fileName value=this is the filename/ /td /tr input type=submit/ /html:form it is saved in /contextPath/rv/sample.jsp this is part of my web.xml web.xml: init-param param-nameconfig/rv/param-name param-value/WEB-INF/struts-rv-config.xml/param-value /init-param this is part of my struts-rv-config.xml struts-rv-config.xml: action path=/openReport type=com.viador.rv.action.RunReportAction name=OpenReportForm scope=session /action when I try to access the jsp page directly by this url http://localhost/myapp/rv/sample.jsp there is an error says Cannot retrieve mapping for action /openReport why? even when I modified the jsp page as the below action=/rv/openReport.do or action=myapp/rv/openReport.do it still doesnt work but if I use the form element of HTML instead of that of struts, smaple.jsp works! why is this? _ MSN Messenger: http://messenger.msn.com/cn - 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: help ,action path
Sorry, my mistake. When you use view source of your browser, how does the html code look like ? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: help ,action path
Do you have the tag libraries defined on top of the page Example: %@ taglib uri=/WEB-INF/struts-html.tld prefix=html % %@ taglib uri=/WEB-INF/struts-bean.tld prefix=bean % ??? Khalid modified the jsp file to the below still doesnt work html:form method=post action=/openReport or html:form method=post action=/myapp/openReport You can also do a view source and look the html generated by tag html:form and ,I think I need an explaination of this, and what should be the right way? (I think I m doing the right which I described in my last mail(below) ) thank you all From: Mu Mike [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: help ,action path Date: Wed, 10 Mar 2004 03:18:51 + I got this jsp page: sample.jsp: html:form method=post action=/openReport.do tr td html:text property=fileName value=this is the filename/ /td /tr input type=submit/ /html:form it is saved in /contextPath/rv/sample.jsp this is part of my web.xml web.xml: init-param param-nameconfig/rv/param-name param-value/WEB-INF/struts-rv-config.xml/param-value /init-param this is part of my struts-rv-config.xml struts-rv-config.xml: action path=/openReport type=com.viador.rv.action.RunReportAction name=OpenReportForm scope=session /action when I try to access the jsp page directly by this url http://localhost/myapp/rv/sample.jsp there is an error says Cannot retrieve mapping for action /openReport why? even when I modified the jsp page as the below action=/rv/openReport.do or action=myapp/rv/openReport.do it still doesnt work but if I use the form element of HTML instead of that of struts, smaple.jsp works! why is this? _ MSN Messenger: http://messenger.msn.com/cn - 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] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.594 / Virus Database: 377 - Release Date: 2/24/2004 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.594 / Virus Database: 377 - Release Date: 2/24/2004 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: help ,action path
of course, I m using an ide to edit the jsp page, it can hotly tell the errors in a jsp page and I have struts.jar(1.1) in my library directory(web-inf/lib) From: Khalid K. [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Subject: RE: help ,action path Date: Tue, 9 Mar 2004 21:41:30 -0800 Do you have the tag libraries defined on top of the page Example: %@ taglib uri=/WEB-INF/struts-html.tld prefix=html % %@ taglib uri=/WEB-INF/struts-bean.tld prefix=bean % ??? Khalid modified the jsp file to the below still doesnt work html:form method=post action=/openReport or html:form method=post action=/myapp/openReport You can also do a view source and look the html generated by tag html:form and ,I think I need an explaination of this, and what should be the right way? (I think I m doing the right which I described in my last mail(below) ) thank you all From: Mu Mike [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: help ,action path Date: Wed, 10 Mar 2004 03:18:51 + I got this jsp page: sample.jsp: html:form method=post action=/openReport.do tr td html:text property=fileName value=this is the filename/ /td /tr input type=submit/ /html:form it is saved in /contextPath/rv/sample.jsp this is part of my web.xml web.xml: init-param param-nameconfig/rv/param-name param-value/WEB-INF/struts-rv-config.xml/param-value /init-param this is part of my struts-rv-config.xml struts-rv-config.xml: action path=/openReport type=com.viador.rv.action.RunReportAction name=OpenReportForm scope=session /action when I try to access the jsp page directly by this url http://localhost/myapp/rv/sample.jsp there is an error says Cannot retrieve mapping for action /openReport why? even when I modified the jsp page as the below action=/rv/openReport.do or action=myapp/rv/openReport.do it still doesnt work but if I use the form element of HTML instead of that of struts, smaple.jsp works! why is this? _ MSN Messenger: http://messenger.msn.com/cn - 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] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.594 / Virus Database: 377 - Release Date: 2/24/2004 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.594 / Virus Database: 377 - Release Date: 2/24/2004 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ MSN Hotmail http://www.hotmail.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: help ,action path
The exception is been generated when .jsp is rendered (and not when you submit the form), hum ? Try to enable struts debug log (in your log4j config file) and try to check the package/name of your action (in struts-config.xml)... - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Multiple databases in 1 Query
In my struts application I need two databases. I have used DBCP and defined the datasources. I am able to use both the databases. But I want to execute some query which will require tables from both the databases.(Union). Is it possible? If so how can I do it. I kno that this is more of a database concept issue than a Struts issue, but please help me. Any comments and suggestions are welcome. Thanks in advance for paying attention to my problem. Regards, Nilesh.
RE: people using action form field
Hehe. I remember when I first encountered this. Took me ages to figure out why the heck my form didnt work. I ended up chopping bits out of the form one at a time till suddenly it worked, and seeing it was an input field named 'action' the penny dropped! lol. Like Wendy says, the best way to deal with this issue is quite simple. Dont stuff around trying to name a field 'action' - just call it something else. (Ditto for any other fields whose names will cause them to shadow javascript form properties). -Original Message- From: Wendy Smoak [mailto:[EMAIL PROTECTED] Sent: Wednesday, 10 March 2004 03:35 To: Struts Users Mailing List Subject: RE: people using action form field From: Julio Cesar De Salvo [mailto:[EMAIL PROTECTED] I know this is a javascript question but is related with struts. If you use a field called action in the form, how can you change the form action with javascript. When I try to set the document.form.action it tries to set the field instead of the action for the form. Is there any other way to change the action for the form? There is, and Tim gave you that answer. I solved the problem by changing the form property to 'userAction' which makes the whole thing clearer. Think about the next person who has to maintain your project-- if you leave it as 'action' at least document this issue clearly. I know I spent a while trying to figure it out! -- 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]