Re: Pls help on shopping cart App
Do your html:text have the indexed=true attribute? On 18 Mar 2004, at 07:07, sougata wrote: Hi All, I have a shopping cart apps.When the user is buying items it is coming to mycart .In my mycart page I am showing all the products and the beside that I have a update button by which I can update the quantity of my each item which is in a textbox.I am follwing struts for that.My text box name is same in every row(say quantity).if its name is quantity in servlet I am getting a String array of quantity.But when I am coming to the same page its showing value=[Ljava.lang.String;@1765ae which is the reference of my string array.How to get the original value Pls let me know ASAP. Thanks Sougata - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Problem in Deploying
HTTP Status 404 - /StrutsNetBeansSample/TestForm.jsp _ type Status report message /StrutsNetBeansSample/TestForm.jsp description The requested resource (/StrutsNetBeansSample/TestForm.jsp) is not available. _ Apache Tomcat/4.1.29 This is the error I got when I deploy the war file created from netbeans. The app run fine inside netbeans. And the error appear when I deploy in to tomcat. Please help. Newbie Iwan
RE: Hierarchical Lists
I'm envolved in a Project that will be basically lots of this stuff. This CSS approach seems nice one, but it doesn't look like feasible if the hierarchical structure is too complex and / or it's just too big (then we would have an awfully heavy page). Everytime I face the same problem, I come to the very same conclusion (100% server-side solution). I admit it: I haven't had the guts to take the risk with the client-side one. Anybody: something to share regarding these issues? Has somebody gone all-the-way with some scripting solution for a complex hierarchy? Cheers, Freddy. -Mensaje original- De: Scherger, Derek [mailto:[EMAIL PROTECTED] Enviado el: miércoles, 17 de marzo de 2004 23:16 Para: 'Struts Users Mailing List' Asunto: RE: Hierarchical Lists You might use something like select id=parent-list.../select select id=child-1 style=display:none;.../select select id=child-2 style=display:none;.../select select id=child-3 style=display:none;.../select select id=child-4 style=display:none;.../select Then in the onchange event of the parent-list you can call a javascript function that would do list = document.getElementById(child) list.style.display=; // show list list.style.display=none; // hide list as required. You'll have to set the proper list to be visible when the page first loads and you'll have to keep track of which list is currently visible (in javascript) so that you can toggle it off and the next one on. This type of thing seems to be working pretty well for me at the moment, although I haven't done exactly this. Let mw know how it works out. Cheers, Derek -Original Message- From: Randy Dillon [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 17, 2004 2:46 PM To: Struts Users Mailing List Subject: RE: Hierarchical Lists Derek, That's an interesting concept. My CSS skills are pretty basic though. How could you use CSS to do it? Would it work if the first list was multi-select with many different possible combinations? :- -Original Message- :- From: Scherger, Derek [mailto:[EMAIL PROTECTED] :- Sent: Wednesday, March 17, 2004 3:32 PM :- To: 'Struts Users Mailing List' :- Subject: RE: Hierarchical Lists :- :- :- I've though of (but not done) the possibility of using css :- to hide and show :- different versions of the second select list rather than :- adding/removing :- elements with javascript. Not sure which would be a better :- way to go as they :- both will require some scripting. The css hide/show :- version's script is :- pertty trivial though. :- :- Cheers, :- Derek :- :- -Original Message- :- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] :- Sent: Wednesday, March 17, 2004 12:54 PM :- To: [EMAIL PROTECTED] :- Subject: RE: Hierarchical Lists :- :- :- Short of a reload, I believe only a JavaScript/DHTML :- function can provide :- this behavior. :- :- :- -Original Message- :- From: Randy Dillon [mailto:[EMAIL PROTECTED] :- Sent: Wednesday, March 17, 2004 2:48 PM :- To: Struts Users Mailing List :- Subject: Hierarchical Lists :- :- :- Say I have 2 (or more) lists that are part of a hierarchy, :- such that the :- first list is a category (say Food Groups) and the second :- list contains :- children of each of the first list's items (for this :- example, let's say Food :- Types). :- :- How do I get the second list to be filtered based on the :- selection in the :- first list? I know this can be done by reloading the page :- each time the :- selection is changed in the first list, but is there a way :- to do this :- without the page reload? :- :- To add more detail to the example: :- :- Food Groups Food Types :- --- -- :- MeatDairy Beef :- Chicken :- Milk :- Eggs :- FruitVeg Melons :- Apples :- Oranges :- Lettuce :- . . :- . . :- . . :- :- If MeatDairy is selected in the Food Groups list, can the :- second Food Types :- list be filtered to only the MeatDairy food types without :- a page reload? :- :- :- :- - :- 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: security framework!!!
David, I think it is unusual to design the security system such that you must switch identities to meet your requirements. It may be worth rethinking your security system design so that a user will remain who they are, but be allowed to access resources that fall under their responsibility. As a generic example, it is customary for a user who is a system administrator to be able to change the password for any user in the system. The administrator does not actually switch their identity in the process, but rather they are granted access to do the password change by virtue of having some kind of sysadmin role. I realize that your business domain is more complex than that, but I think it would be useful to think about it in terms of a user having access to things without having to switch their identity. Since you can't use simple system-wide roles like admin due to the structure of responsibilities dictated by your business domain (client can add and edit their employees, but not the employees of another client), you have to do something special. One option is to map (flatten) the complex domain to a flat set of roles. For example, client Bob has role client1234.client, where client1234 is the client that Bob is a client for. You might also have roles like admin, reseller33, customer128, client1234.employee, etc. The numbers in in the role names are the id of the entity they represent. This requires programmatic security in a sense, since you will need to determine what role to check for at runtime. But you will still be able to use the J2EE standard request.isUserInRole() call to determine membership for the currently authenticated user. Another option is to do thoroughly programmatic security, where you still use container-managed security for authentication (is this Bob?) and write code to do the authorization (Bob wants to edit a user account in the context of the client with id = 1234, is Bob allowed to do that?) without mapping it to a role name. Perhaps your realm could create Principal objects such that the application code can ask the Principal if they can do something. Bob will very likely have other responsibilties (the same stuff the employees do) that you might wish to control with a single role client1234.employee. In that case, Bob would have both the client1234.client and client1234.employee roles. Alternately, you could identify a set of roles that would allow a user to do that stuff: client1234.employee, client1234.client, customer128, reseller33, etc. where client1234 is under the customer128 account, which in turn is under the reseller33 account. If Bob had any of those roles, he would be allowed to do employee stuff in the context of client1234. A single user can have an unlimited number of roles, and you can write your own security realm to read that information from a variety of tables in the database. Or write a view in the database for your User_Role join table and use a standard realm. Be aware that you might end up wasting a lot of memory if each user ends up with a ton of roles and your realm loads them all into memory during authentication. I have not done anything with JAAS, so perhaps there is a better solution available using JAAS technology. It would be great to hear from someone that knows of a good JAAS-based solution. David's problem of entity-based (rather than system-wide) responsibilities is a very common one. -Max - Original Message - From: David Friedman [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wednesday, March 17, 2004 5:48 PM Subject: RE: security framework!!! Adam, With my structure, I might have to become a particular reseller, then flip into a customer of his/hers, then become one of their client accounts to look into a reported problem. I worry about login identities for the following reasons: Using a JAAS login, my principal would be fixed (set in stone) for my session. Then, I couldn't be able to use the 'roles' settings inside Struts, Tiles, and JSPs to control content. Without using a JAAS login, I also become unable to use 'roles' in Tiles and JSPs to control content. Without having any theories on how to successfully (and without much alteration to the package[s]) use roles for Struts, Tiles, and JSPs, I'm at a loss how to change my identity/roles If I made a filter to wrapper the Request with a HTTPServletRequestWrapper object then added my own push/pop/depth methods, I see how I could use roles in all of those places. Knowing all of the above gory details, do you (or anyone) have any suggestions on how to make things cleaner while using roles in all of those places with the various levels of control I need to exert (albeit probably rarely switching roles) ? Thanks (to all) for any constructive suggestions, David -Original Message- From: Adam Hardy [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 17, 2004 6:51 PM To: Struts Users Mailing List Subject: Re:
Re: Problem in Deploying
The app probably did not deploy. Consult the server log to figure out why. -Max - Original Message - From: Iwan Soenarto (IT) [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, March 18, 2004 12:18 AM Subject: Problem in Deploying HTTP Status 404 - /StrutsNetBeansSample/TestForm.jsp _ type Status report message /StrutsNetBeansSample/TestForm.jsp description The requested resource (/StrutsNetBeansSample/TestForm.jsp) is not available. _ Apache Tomcat/4.1.29 This is the error I got when I deploy the war file created from netbeans. The app run fine inside netbeans. And the error appear when I deploy in to tomcat. Please help. Newbie Iwan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Webb access to mailing list
check the following link: http://www.mail-archive.com/struts-user%40jakarta.apache.org/ for other list try: http://www.mail-archive.com/lists.html Jon Bohm [EMAIL PROTECTED] on 03/18/2004 08:25:57 AM Please respond to Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] cc:(bcc: Anuj Upadhyay/Jeppesen/TMC) Subject: Webb access to mailing list Hello, This mailing list is very good and appreciated, but it fills up my hotmail mailbox every second day. Is there a web interface viewing a threaded version of this list, and perhaps with a search function? Best regards, Jon - 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: Webb access to mailing list
yes,if there is a newsgroup ,things will be better. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: Single Checkbox Required
hi sam first off, javascript is not really fun, but here goes. your form should have the same name as the formbean you associate with it. you can check this in the html code generated from your jsp. the html:form tag does not supply an attribute for setting/overriding the name of the form (correct me if i'm wrong). furthermore, if you don't want to use the document.forms[...] syntax, you can use things like document.getElementsByName, document.getElementById etc. You could even get all elements in the document, filter out the checkboxes and modify/check attributes like that. you can find a nice explanation of document.forms[] vs. document.getElementsByName when you google for selfhtml just make sure that you are working with a browser that gives you nice error messages while debugging your javascript - like mozilla. andreas -Ursprungliche Nachricht- Von: as as [mailto:[EMAIL PROTECTED] Gesendet: Mittwoch, 17. Marz 2004 19:27 An: Struts Users Mailing List Betreff: RE: Single Checkbox Required Hi, Interesting... yourForm- where do we mention this in the struts's html:form tag Thanks! Sam (I had similar error where my form on submission would say .length is null...was probably not able to invoke checkbox.length on the form already as struts form is generated only after hitting the server but we may need javascript validation much before that-on client side... please...correct me if i am wrong. Thanks my code snipet below: html:form action=edit name=displayForm type=com.model.DisplayForm table border=0 width=100% input type=checkbox name=edit_all value=Check All onClick=check(this.form.list)/th .. ... logic:iterate id=driver name=drivers input type=checkbox value=list name=delete_bean:write name=book property=ISBN / ... ... SCRIPT LANGUAGE=JavaScript var checkflag = false; function check(field) { if (checkflag == false) { for (i = 0; i field.length; i++) { field[i].checked = true;} checkflag = true; return Uncheck All; } else { for (i = 0; i field.length; i++) { field[i].checked = false; } checkflag = false; return Check All; } } Brendan Richards [EMAIL PROTECTED] wrote: Sorry - didn't realise you were using javascript validation (should have read your post more carefully). You could add your own client side code: function checkTheBox() { if (!document.forms['yourForm'].myCheckbox.checked) { alert(you must check the box to proceed); return false; } else { return true; } } -Original Message- From: Morowitz, Michael [mailto:[EMAIL PROTECTED] Sent: 17 March 2004 17:14 To: Struts Users Mailing List Subject: RE: Single Checkbox Required But, when I mark it required in my validator.xml, it doesn't work. The javascript that is generated (validateRequired) does not apply to fields of type checkbox. I suppose I could modify the javascript, but I want both server side and client-side validation. -M -Original Message- From: Brendan Richards [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 17, 2004 10:52 AM To: Struts Users Mailing List Subject: RE: Single Checkbox Required What makes a checkbox unusual is that it only submits a value when checked - when unchecked nothing is submitted. You should therefore be able to validate that it's been checked with a standard required validator. -Original Message- From: Morowitz, Michael [mailto:[EMAIL PROTECTED] Sent: 17 March 2004 16:26 To: [EMAIL PROTECTED] Subject: Single Checkbox Required I have searched the archive of the list and I came up empty. I want to use validator.xml to indicate that a single checkbox must be checked 'true' on my form. Has anyone had success simply indicating a boolean field to be required? I've noticed that in the client-side javascript that is generated, validateRequired does not look at fields of type 'checkbox'. I have read that commons-validator added this functionality at some point in the past, but has it not made it into the Struts validtion package? Thanks, Michael - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Webb access to mailing list
Jon Bohm wrote: Hello, This mailing list is very good and appreciated, but it fills up my hotmail mailbox every second day. Is there a web interface viewing a threaded version of this list, and perhaps with a search function? This list is mirrored by gmane.org as news and as webarchive. Maybe you should use a newsclient to read this list...:) Check out: http://gmane.org/find.php?list=struts Cheers, Maik - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Again Action Chaining
Please help me with your advice... How can I avoid action chaining in such situation... In my application user can set resolution on some demand. For example, there two types of resolutions: bug and not a bug. If user selects not a bug option on form, then nothing happens... But if user selects bug option, then he must create object bug. But also user can create object bug from another place of application. So I get two actions: ResolutionSelectAction and BugCreateAction, how can avoid action chaining between them and move this dependence to business logic? P.S. Sorry for my English... - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Declarative Exception Handling
In case of Declarative Exception handling, how do I pass the replacement values for the messages specified in the message resource bundle. When you are using programmatic approach, you can pass the same to ActionError/ActionMessage constructor. Can anyone explain how to achieve the same in the former case? - Ashutosh - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
LookupDispatchAction with html:image?
hi struts-users is it possible to use the LookupDispatchAction with image-submit-buttons (html:image) instead of normal submit-buttons? thanks and greetings stefan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Can javascript generate a html form?
Hi, I need to know if javascript is able to write a from 'on' an html file while certain events are activated and then submit the form to a server action? if it can ,can anyone give me a simple example? ThanksRegards _ MSN Messenger: http://messenger.msn.com/cn - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Map-backed Forms and Struts Validator
Hi Derek, from the ppt doc, it looks like validWhen is using a syntax that is designed for checking indexed properties. I haven't used it though. I assume that it would handle nested beans as well, in accordance with the rest of the action form functionality. But again, I don't know. Also it says you can't use validWhen until you upgrade to struts 1.2 or a nightly build. I admit, it doesn't look hopeful. Have you tried a simple test case using the syntax like in the ppt doc? Adam On 03/18/2004 12:56 AM Derek Richardson wrote: Read through the various Struts validator docs and the map-backed form faq but didn't see this. James Turner's Indexed Properties and Validation presentation (http://www.strutskickstart.com/IndexedPropertiesandValidation.ppt) came close, but still not explicit enough for me to figure out. :( Struts 1.1. Uses Commons Validator 1.0.2. Is it possible to use the Struts validator to validate beans stored in a map-backed form? If so, does anyone have an example at-hand to send me? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [FRIDAY]:RE: calling ASP inside a JSP
snip What you won't be able to do easily is share any server side data such as session objects between the two servers /snip You could probably use a database to share most of the important info. -Original Message- From: Brendan Richards [mailto:[EMAIL PROTECTED] Sent: Thursday, 18 March 2004 17:21 To: Struts Users Mailing List Subject: RE: [FRIDAY]:RE: calling ASP inside a JSP Shouldn't be a problem. I don't think there's anything in browsers that stop different frames being served from different servers. You'd have a framset page looking something like this. frameset cols=200,* frame src=http://myASPServer.com/page.asp; name=leftFrame frame src=http://myJSPServer.com/page.jsp; name=rightFrame /framsest This frameset page could be a HTML file on either of your servers or could even be an asp or jsp file to make it dynamic. What you won't be able to do easily is share any server side data such as session objects between the two servers -Original Message- From: Andrew Hill [mailto:[EMAIL PROTECTED] Sent: 18 March 2004 02:21 To: Struts Users Mailing List Subject: RE: [FRIDAY]:RE: calling ASP inside a JSP Whats the Ugly? PHP? hmmm. Friday seems to come very early in your part of the world ;-) -Original Message- From: Wiebe de Jong [mailto:[EMAIL PROTECTED] Sent: Thursday, 18 March 2004 08:17 To: 'Struts Users Mailing List' Subject: [FRIDAY]:RE: calling ASP inside a JSP You have JSP, and ASP, and you want to mix them together?!? Reminds me of that Clint Eastwood movie: The Good, the Bad, and the Ugly ;-) -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 17, 2004 4:05 PM To: [EMAIL PROTECTED] Subject: calling ASP inside a JSP Hi All I have a webpage in which i have two Frames. In my left frame i want to display an ASP page. In the main frame i have a JSP page. Can i do this at all. I have a link to the ASP page, but i do not want to provide a link but only want to display the content of the ASP page. Please let me know if i can do this. Thanks --Mohan - 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]
[OT]Re: Off topic Oracle JDeveloper question
Martin you can ask this on the JDeveloper forum on OTN http://forums.oracle.com/forums/forum.jsp?forum=83 However, I assume you talking about the New Dialog in JDev 9.0.3 / 9.0.4? The option is there in mine - but you'll find it's disabled unless you have a project created to put it into. So create a new Workspace and project, then bring up the new dialog and away you go... Duncan Martin Gainty wrote: Hello Anyone out there using JDeveloper know how to add Java Web Services item to General / WebServices Menu Sorry for being completely off topic but I dont know where else to ask Thank You, Martin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Regards Duncan Mills - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: LookupDispatchAction with html:image?
Search for ImageButtonDispatchAction in struts previous messages. It is devoloped by somebody and have put it there. 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: Stefan Burkard [mailto:[EMAIL PROTECTED] Sent: Thursday, 18 March 2004 8:19 PM To: [EMAIL PROTECTED] Subject: LookupDispatchAction with html:image? hi struts-users is it possible to use the LookupDispatchAction with image-submit-buttons (html:image) instead of normal submit-buttons? thanks and greetings stefan - 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: [FRIDAY]:RE: calling ASP inside a JSP
The ugly bit is when you try to incorporate an ASP page with a JSP page, M$ will sue you for stealing their code. ;) On 03/18/2004 03:21 AM Andrew Hill wrote: Whats the Ugly? PHP? hmmm. Friday seems to come very early in your part of the world ;-) -Original Message- From: Wiebe de Jong [mailto:[EMAIL PROTECTED] Sent: Thursday, 18 March 2004 08:17 To: 'Struts Users Mailing List' Subject: [FRIDAY]:RE: calling ASP inside a JSP You have JSP, and ASP, and you want to mix them together?!? Reminds me of that Clint Eastwood movie: The Good, the Bad, and the Ugly ;-) -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 17, 2004 4:05 PM To: [EMAIL PROTECTED] Subject: calling ASP inside a JSP Hi All I have a webpage in which i have two Frames. In my left frame i want to display an ASP page. In the main frame i have a JSP page. Can i do this at all. I have a link to the ASP page, but i do not want to provide a link but only want to display the content of the ASP page. Please let me know if i can do this. Thanks --Mohan - 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] -- 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: LookupDispatchAction with html:image?
Will this not work then? html:image property=method value=Save page=/image/buttons/en/save.gif / assuming the value is set by nesting bean:message html:image property=method page=/image/buttons/en/save.gif bean:message key=button.save / /html:image On 18 Mar 2004, at 10:36, Dixit, Shashank (Cognizant) wrote: Search for ImageButtonDispatchAction in struts previous messages. It is devoloped by somebody and have put it there. 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: Stefan Burkard [mailto:[EMAIL PROTECTED] Sent: Thursday, 18 March 2004 8:19 PM To: [EMAIL PROTECTED] Subject: LookupDispatchAction with html:image? hi struts-users is it possible to use the LookupDispatchAction with image-submit-buttons (html:image) instead of normal submit-buttons? thanks and greetings stefan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] InterScan_Disclaimer.txt- 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: Hierarchical Lists
Populating the select objects via javascript isn't too scary - just make sure you do a thorough cross-browser test (which you should be doing anyway) Javascript: var theForm = document.forms['formName'] gets you the form object. theForm.mySelectBox - gets you the select box object theForm.mySelectBox.selectedIndex - 0 -based index of currently selected option theForm.mySelectBox.options = array of option objects. You can create new option objects with var newOption = new Option(text, value, defaultSelected, selected) where: text = text to display value = value returned on submission if selected defaultSelected = Boolean - if true this option is selected by default when first created selected - Boolean current selected property. Get data into javascript by using server side code to populate a series of javascript arrays. A good example can be found here: http://www.experts-exchange.com/Web/Web_Languages/JavaScript/Q_20888121. html -Original Message- From: Freddy Villalba Arias [mailto:[EMAIL PROTECTED] Sent: 18 March 2004 08:25 To: Struts Users Mailing List Subject: RE: Hierarchical Lists I'm envolved in a Project that will be basically lots of this stuff. This CSS approach seems nice one, but it doesn't look like feasible if the hierarchical structure is too complex and / or it's just too big (then we would have an awfully heavy page). Everytime I face the same problem, I come to the very same conclusion (100% server-side solution). I admit it: I haven't had the guts to take the risk with the client-side one. Anybody: something to share regarding these issues? Has somebody gone all-the-way with some scripting solution for a complex hierarchy? Cheers, Freddy. -Mensaje original- De: Scherger, Derek [mailto:[EMAIL PROTECTED] Enviado el: miércoles, 17 de marzo de 2004 23:16 Para: 'Struts Users Mailing List' Asunto: RE: Hierarchical Lists You might use something like select id=parent-list.../select select id=child-1 style=display:none;.../select select id=child-2 style=display:none;.../select select id=child-3 style=display:none;.../select select id=child-4 style=display:none;.../select Then in the onchange event of the parent-list you can call a javascript function that would do list = document.getElementById(child) list.style.display=; // show list list.style.display=none; // hide list as required. You'll have to set the proper list to be visible when the page first loads and you'll have to keep track of which list is currently visible (in javascript) so that you can toggle it off and the next one on. This type of thing seems to be working pretty well for me at the moment, although I haven't done exactly this. Let mw know how it works out. Cheers, Derek -Original Message- From: Randy Dillon [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 17, 2004 2:46 PM To: Struts Users Mailing List Subject: RE: Hierarchical Lists Derek, That's an interesting concept. My CSS skills are pretty basic though. How could you use CSS to do it? Would it work if the first list was multi-select with many different possible combinations? :- -Original Message- :- From: Scherger, Derek [mailto:[EMAIL PROTECTED] :- Sent: Wednesday, March 17, 2004 3:32 PM :- To: 'Struts Users Mailing List' :- Subject: RE: Hierarchical Lists :- :- :- I've though of (but not done) the possibility of using css :- to hide and show :- different versions of the second select list rather than :- adding/removing :- elements with javascript. Not sure which would be a better :- way to go as they :- both will require some scripting. The css hide/show :- version's script is :- pertty trivial though. :- :- Cheers, :- Derek :- :- -Original Message- :- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] :- Sent: Wednesday, March 17, 2004 12:54 PM :- To: [EMAIL PROTECTED] :- Subject: RE: Hierarchical Lists :- :- :- Short of a reload, I believe only a JavaScript/DHTML :- function can provide :- this behavior. :- :- :- -Original Message- :- From: Randy Dillon [mailto:[EMAIL PROTECTED] :- Sent: Wednesday, March 17, 2004 2:48 PM :- To: Struts Users Mailing List :- Subject: Hierarchical Lists :- :- :- Say I have 2 (or more) lists that are part of a hierarchy, :- such that the :- first list is a category (say Food Groups) and the second :- list contains :- children of each of the first list's items (for this :- example, let's say Food :- Types). :- :- How do I get the second list to be filtered based on the :- selection in the :- first list? I know this can be done by reloading the page :- each time the :- selection is changed in the first list, but is there a way :- to do this :- without the page reload? :- :- To add more detail to the example: :- :- Food Groups Food Types :- --- -- :- MeatDairy Beef :- Chicken :- Milk :-
Way tho highlight error form field
Hello! Is there a way in Struts to highlight the HTML form field that has an error? I mean, changing the style class of the form field, for example. Is there some feature in Struts that can help me? Thanks, JP
RE: [OT] 3/18 Struts Tiles Talk by Rick Hightower at VeriSign
Will there meeting be video stream (stream cast) for other user? Best Regards, Benz Lim -Original Message- From: Van Riper, Mike [mailto:[EMAIL PROTECTED] Sent: Saturday, March 13, 2004 4:29 AM To: '[EMAIL PROTECTED]' Subject: [OT] 3/18 Struts Tiles Talk by Rick Hightower at VeriSign The Silicon Valley Struts User Group has a meeting next Thursday evening at VeriSign in Mountain View. Our meetings are always free and open to the general public. A speaker that is flying in for the Software Development conference next week has agreed to speak to our group while he is in town. Rick Hightower is the CTO of ArcMind http://www.arc-mind.com and one of the co-authors of Professional Jakarta Struts. If you would like to learn about the Tiles framework in Struts 1.1, this would be an excellent talk to attend. The full meeting announcement can be found online here: http://www.baychi.org/bof/struts/20040318/ To get an idea of what will be covered in this talk, you could look at an online tutorial previously created by Rick that is available at the IBM developerWorks web site: http://tinyurl.com/2uby6 Finally, I do need to know how many people to expect for planning purposes. I arrange the room differently depending upon the expected turnout. If you are going to attend this talk, please RSVP with me by noon on the day of the talk. Thanks, Van Mike Van Riper Silicon Valley Struts User Group http://www.baychi.org/bof/struts/ mailto:[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]
Module switching issue on weblogic 8.1
hi there, I've run into a persistent problem with weblogic 8.1 using struts 1.1 I'm trying to switch modules and have downloaded the sample simple-module-switching.war archive from sourceforge to try to get it working. I deployed it on Tomcat and it worked perfectly, but no matter which mechanism I use to try to use on weblogic I get a message key not found exception. Having trawled a few newsgroups, I gather that I am not the only one who has come across this, nor is this issue unique to WebLogic application servers. Is there a workaround? Incidentally, I can't use weblogic proprietary pageflows because this application has to be platform independant. Kind Regards, Colm Garvey -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: 17 March 2004 09:00 To: [EMAIL PROTECTED] Subject: Important Information Regarding Your BEA eSupport Login ID To: [EMAIL PROTECTED] From: [EMAIL PROTECTED] Subject: Important Information Regarding Your BEA eSupport Login ID Colm Garvey: Thank you for your recent registration to BEA eSupport. As a new user to BEA eSupport, you're entitled to comprehensive self-help resources, product downloads, personalized interfaces, and the ability to manage support cases online. BEA eSupport is seamlessly integrated with BEA Support Centers, allowing you to use the telephone and web while interacting with BEA. We recommend that you log-in now by clicking http://support.bea.com. The Login link is located at the top of the page. We also recommend that you take the time to customize your views and complete your environment profiles. To help us better serve you, please review the following information: BEA Login ID: cgarvey Name : Colm Garvey E-mail : [EMAIL PROTECTED] Don't know your password? For security reasons, your password is not displayed in this message. Try our Password Finder, located in the User Status Bar on http://support.bea.com. Incorrect information? You can view and update your registration information by clicking the link that says Manage User Profile, in the User Status Bar on http://support.bea.com. Still need help? Please contact us by replying to this message and we will make every effort to assist you with your account. Thank you for choosing BEA products and services! -BEA Customer Support This message is for the designated recipient only and may contain privileged, proprietary, or otherwise private information. If you have received it in error, please notify the sender immediately and delete the original. Any other use of the email by you is prohibited.
Re: action - delegate - facade
Downside is though, trying to cram string request parameters into your DTO in your form before you validate them. Causes ugly exception messages on the browser. On 03/18/2004 02:25 AM Robert Taylor wrote: Well, I would say it depends. If I had a DTO ( a domain object) which had all the fields I needed to display...including types like int, Date, boolean, etc... I would probably just pass that along to the form bean and let view helpers like the Struts tags or JSTL render the contents. With JSTL you can format Dates and numbers. I believe those tags leverage the java.text.* package for formatting data. If I needed to perform some specialized formatting which could not be done by view helpers then I may just convert the necessary fields to Strings (maybe using BeanUtils) format them, and populate my ActionForm. If the view I needed of the data was not encapsulated in a single DTO, then you could retrieve multiple DTO objects and rendered them as described above or use a pattern described as Transfer Object Assembler which builds a custom DTO or a collection of customer DTO objects which you could pass along to the ActionForm. You can read more about Transfer Object Assembler here: http://java.sun.com/blueprints/corej2eepatterns/Patterns/TransferObjectAssembler.html robert -Original Message- From: Nick Wesselman [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 17, 2004 6:28 PM To: Struts Users Mailing List Subject: Re: action - delegate - facade What about when simply displaying data on a page? Do developers typically copy data out of the domain object just to display it? (As opposed to using it w/ a form.) The only issue I see is that you may end up introducing view helper methods to your model beans. Nick Robert Taylor wrote: Adam, its frowned upon to pass a web tier object (ActionForm) into the business tier. I believe a widely used technique is to use BeanUtils to copy the properties from the ActionForm to a DTO (a Domain Object) which can be passed to the business tier. robert - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- struts 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: Way tho highlight error form field
You could modify the client-side validation stuff to do this rather than just alerting. An easy way of layering this on is to define a compulsory array of fields and then loop through the form on validation. changing the borderColor style attribute when you have a match between the element name and your array. compulsary = [name,email]; function validate(form) { for(i = 0;i compulsary.length;i++) { field = compulsary[i]; value = form.elements[field].value; if(value == ) { form.elements[field].style.borderColor = #ff; } } } Then you can think about having your compulsary array populated in the same way as the struts validator client-side stuff. In fact you could use the array then it defines. On 18 Mar 2004, at 10:49, Joao Batistella wrote: Hello! Is there a way in Struts to highlight the HTML form field that has an error? I mean, changing the style class of the form field, for example. Is there some feature in Struts that can help me? Thanks, JP - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: security framework!!!
JAAS won't help you any more than what you've got in tomcat. The use of roles operates on exactly the same principles. It's got to, because it's not JAAS that has to deal with the roles, it's the container. JAAS allows multiple login modules to be combined in a pluggable fashion. Say a user/password with a smartcard and a biometric scanner. (perhaps Sun are trying to sell it to the Pentagon!) I'm not helping much here, but I still don't get what the problem is. I read the bit about 'entity-based not system-wide' responsibilities and I get that, but I don't see what the issue is. You're deciding permissions: you have a user's identity (ID or login name) and you have a user's roles. In this case, your superuser wants to 'become' a normal user, so that means to me that the superuser wants to see exactly what the user sees, and be able to do exactly what the user can do. That means the superuser must borrow the user's identity and roles. To borrow the identity, you use some sort of session attribute containing the 'currently effective ID' and to borrow the roles, well you don't, you just have them already because you're superuser. Perhaps a concrete example would help. I assume you are talking about deciding on the presence / absence of form controls depending on the user viewing the page. Adam On 03/18/2004 09:34 AM Max Cooper wrote: David, I think it is unusual to design the security system such that you must switch identities to meet your requirements. It may be worth rethinking your security system design so that a user will remain who they are, but be allowed to access resources that fall under their responsibility. As a generic example, it is customary for a user who is a system administrator to be able to change the password for any user in the system. The administrator does not actually switch their identity in the process, but rather they are granted access to do the password change by virtue of having some kind of sysadmin role. I realize that your business domain is more complex than that, but I think it would be useful to think about it in terms of a user having access to things without having to switch their identity. Since you can't use simple system-wide roles like admin due to the structure of responsibilities dictated by your business domain (client can add and edit their employees, but not the employees of another client), you have to do something special. One option is to map (flatten) the complex domain to a flat set of roles. For example, client Bob has role client1234.client, where client1234 is the client that Bob is a client for. You might also have roles like admin, reseller33, customer128, client1234.employee, etc. The numbers in in the role names are the id of the entity they represent. This requires programmatic security in a sense, since you will need to determine what role to check for at runtime. But you will still be able to use the J2EE standard request.isUserInRole() call to determine membership for the currently authenticated user. Another option is to do thoroughly programmatic security, where you still use container-managed security for authentication (is this Bob?) and write code to do the authorization (Bob wants to edit a user account in the context of the client with id = 1234, is Bob allowed to do that?) without mapping it to a role name. Perhaps your realm could create Principal objects such that the application code can ask the Principal if they can do something. Bob will very likely have other responsibilties (the same stuff the employees do) that you might wish to control with a single role client1234.employee. In that case, Bob would have both the client1234.client and client1234.employee roles. Alternately, you could identify a set of roles that would allow a user to do that stuff: client1234.employee, client1234.client, customer128, reseller33, etc. where client1234 is under the customer128 account, which in turn is under the reseller33 account. If Bob had any of those roles, he would be allowed to do employee stuff in the context of client1234. A single user can have an unlimited number of roles, and you can write your own security realm to read that information from a variety of tables in the database. Or write a view in the database for your User_Role join table and use a standard realm. Be aware that you might end up wasting a lot of memory if each user ends up with a ton of roles and your realm loads them all into memory during authentication. I have not done anything with JAAS, so perhaps there is a better solution available using JAAS technology. It would be great to hear from someone that knows of a good JAAS-based solution. David's problem of entity-based (rather than system-wide) responsibilities is a very common one. -Max - Original Message - From: David Friedman [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wednesday, March 17, 2004 5:48 PM Subject: RE: security framework!!! Adam, With
Re: Validator: Validation based on action path and not by form name
Kamakshya, if you use the ValidatorActionForm instead of the ValidatorForm, then you can do this. Adam On 03/18/2004 08:26 AM Prasad, Kamakshya wrote: Hi All, Is it possible for validation.xml to take action path attribute instead of form name for putting javascript validation rules for a page? I am having a page with lot of buttons, each mapping to a particular action path. I want to validate the screen elements based on these action paths and not as a whole form. Please let me know if there is any such facility provided by struts. Regards, Kamakshya -- 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: Validator: Validation based on action path and not by form name
Thanks Adam, But what exactly I have to put in validation.xml Now the xml has these lines formset form name=assetForm Should I change it to? formset action path=/resolveAsset Regards Kamakshya -Original Message- From: Adam Hardy [mailto:[EMAIL PROTECTED] Sent: Thursday, March 18, 2004 7:19 PM To: Struts Users Mailing List Subject: Re: Validator: Validation based on action path and not by form name Kamakshya, if you use the ValidatorActionForm instead of the ValidatorForm, then you can do this. Adam On 03/18/2004 08:26 AM Prasad, Kamakshya wrote: Hi All, Is it possible for validation.xml to take action path attribute instead of form name for putting javascript validation rules for a page? I am having a page with lot of buttons, each mapping to a particular action path. I want to validate the screen elements based on these action paths and not as a whole form. Please let me know if there is any such facility provided by struts. Regards, Kamakshya -- 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]
[partly answered] Re: Validator: Validation based on action path and not by form name
Hi Kamakshya! yes it is provided. just make it a ValidatorActionForm instead of a ValidatorForm. (check docs for further info) If you use DynaFormBeans, there is a DynaValdaterActionForm, but it never worked for me... hope this help, Axel On 2004-03-18 at 13:40:27 +0900, Prasad, Kamakshya wrote: Hi All, Is it possible for validation.xml to take action path attribute instead of form name for putting javascript validation rules for a page? I am having a page with lot of buttons, each mapping to a particular action path. I want to validate the screen elements based on these action paths and not as a whole form. Please let me know if there is any such facility provided by struts. Regards, Kamakshya - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Validator: Validation based on action path and not by form name
form name=/resolveAsset as far as i can remember On 2004-03-18 at 19:36:05 +0900, Prasad, Kamakshya wrote: Thanks Adam, But what exactly I have to put in validation.xml Now the xml has these lines formset form name=assetForm Should I change it to? formset action path=/resolveAsset Regards Kamakshya -Original Message- From: Adam Hardy [mailto:[EMAIL PROTECTED] Sent: Thursday, March 18, 2004 7:19 PM To: Struts Users Mailing List Subject: Re: Validator: Validation based on action path and not by form name Kamakshya, if you use the ValidatorActionForm instead of the ValidatorForm, then you can do this. Adam On 03/18/2004 08:26 AM Prasad, Kamakshya wrote: Hi All, Is it possible for validation.xml to take action path attribute instead of form name for putting javascript validation rules for a page? I am having a page with lot of buttons, each mapping to a particular action path. I want to validate the screen elements based on these action paths and not as a whole form. Please let me know if there is any such facility provided by struts. Regards, Kamakshya -- 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]
How to configure a DataBase in tomcat 5.0
i have tired in triralwith configuring my database resource in tomcat 5.0.it also return the same err ,even if iworkedaccording as manual in www.apache.org ,step by step. the patch accompany with this letter is my server.xml ,which located in %CATALINA_HOME%\conf), strutsTest.xml,wich located in %CATALINA_HOME%\conf\catalina\localhost,strutsTest is my web app name, web.xml wich located in mywebApp docbase\web-inf . it is confused where there are three xml file ,not two as described in some document. the same err msg is: javax.naming.NameNotFoundException: Name JDBC is not bound in this Context at org.apache.naming.NamingContext.lookup(NamingContext.java:814) . i had so depress.what's wrong with mycofigure? best regard. asd ?xml version='1.0' encoding='utf-8'? Server Listener className=org.apache.catalina.mbeans.ServerLifecycleListener/ Listener className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener/ GlobalNamingResources Environment name=simpleValue type=java.lang.Integer value=30/ Resource auth=Container description=User database that can be updated and saved name=UserDatabase type=org.apache.catalina.UserDatabase/ Resource name=JDBC/ORADB type=javax.sql.DataSource/ ResourceParams name=UserDatabase parameter namefactory/name valueorg.apache.catalina.users.MemoryUserDatabaseFactory/value /parameter parameter namepathname/name valueconf/tomcat-users.xml/value /parameter /ResourceParams ResourceParams name=JDBC/ORADB parameter nameContext.PROVIDER_URL/name valuehttp://192.168.0.35:8080/value /parameter parameter nameurl/name valuejdbc:oracle:thin:@192.168.0.26:1521:ORADB/value /parameter parameter namepassword/name valuelrx/value /parameter parameter namemaxActive/name value10/value /parameter parameter namemaxWait/name value5000/value /parameter parameter namedriverClassName/name valueoracle.jdbc.driver.OracleDriver/value /parameter parameter nameusername/name valuelrx/value /parameter parameter namemaxIdle/name value2/value /parameter /ResourceParams /GlobalNamingResources Service name=Catalina Connector acceptCount=100 connectionTimeout=2 disableUploadTimeout=true port=8080 redirectPort=8443 /Connector Connector port=8009 protocol=AJP/1.3 protocolHandlerClassName=org.apache.jk.server.JkCoyoteHandler redirectPort=8443 /Connector Engine defaultHost=localhost name=Catalina Host appBase=webapps name=localhost Logger className=org.apache.catalina.logger.FileLogger prefix=localhost_log. suffix=.txt timestamp=true/ Context path=/groller reloadable=true docBase=E:\G-Roller workDir=E:\G-Roller\work / Context displayName=Struts Blank Application docBase=E:/study/proj/strutsTest path=/strutsTest reloadable=true Resource name=JDBC/ORADB type=javax.sql.DataSource/ ResourceParams name=JDBC/ORADB parameter nameContext.PROVIDER_URL/name valuehttp://192.168.0.35:8080/value /parameter parameter nameurl/name valuejdbc:oracle:thin:@192.168.0.26:1521:ORADB/value /parameter parameter namepassword/name valuelrx/value /parameter parameter namemaxActive/name value10/value /parameter parameter namemaxWait/name value5000/value /parameter parameter namedriverClassName/name valueoracle.jdbc.driver.OracleDriver/value /parameter parameter nameusername/name valuelrx/value /parameter parameter namemaxIdle/name value2/value /parameter /ResourceParams /Context /Host Logger className=org.apache.catalina.logger.FileLogger prefix=catalina_log. suffix=.txt timestamp=true/ Realm className=org.apache.catalina.realm.UserDatabaseRealm/ /Engine /Service /Server ?xml version='1.0' encoding='utf-8'? Context displayName=Struts Blank Application docBase=E:/study/proj/strutsTest path=/strutsTest reloadable=true /Context - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
How to configure in tomcat5.0
i have tired in triralwith configuring my database resource in tomcat 5.0.it also return the same err ,even if iworkedaccording as manual in www.apache.org ,step by step. the patch accompany with this letter is my server.xml ,which located in %CATALINA_HOME%\conf), strutsTest.xml,which located in %CATALINA_HOME%\conf\catalina\localhost,strutsTest is my web app name, web.xml which located in mywebApp docbase\web-inf . index.jsp ,which is my test jsp. it is confused where there are three xml file ,not two as described in some document. the same err msg is: javax.naming.NameNotFoundException: Name JDBC is not bound in this Context at org.apache.naming.NamingContext.lookup(NamingContext.java:814) . i had so depress.what's wrong with mycofigure? best regard. asd ?xml version='1.0' encoding='utf-8'? Context displayName=Struts Blank Application docBase=E:/study/proj/strutsTest path=/strutsTest reloadable=true /Context ?xml version='1.0' encoding='utf-8'? Server Listener className=org.apache.catalina.mbeans.ServerLifecycleListener/ Listener className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener/ GlobalNamingResources Environment name=simpleValue type=java.lang.Integer value=30/ Resource auth=Container description=User database that can be updated and saved name=UserDatabase type=org.apache.catalina.UserDatabase/ Resource name=JDBC/ORADB type=javax.sql.DataSource/ ResourceParams name=UserDatabase parameter namefactory/name valueorg.apache.catalina.users.MemoryUserDatabaseFactory/value /parameter parameter namepathname/name valueconf/tomcat-users.xml/value /parameter /ResourceParams ResourceParams name=JDBC/ORADB parameter nameContext.PROVIDER_URL/name valuehttp://192.168.0.35:8080/value /parameter parameter nameurl/name valuejdbc:oracle:thin:@192.168.0.26:1521:ORADB/value /parameter parameter namepassword/name valuelrx/value /parameter parameter namemaxActive/name value10/value /parameter parameter namemaxWait/name value5000/value /parameter parameter namedriverClassName/name valueoracle.jdbc.driver.OracleDriver/value /parameter parameter nameusername/name valuelrx/value /parameter parameter namemaxIdle/name value2/value /parameter /ResourceParams /GlobalNamingResources Service name=Catalina Connector acceptCount=100 connectionTimeout=2 disableUploadTimeout=true port=8080 redirectPort=8443 /Connector Connector port=8009 protocol=AJP/1.3 protocolHandlerClassName=org.apache.jk.server.JkCoyoteHandler redirectPort=8443 /Connector Engine defaultHost=localhost name=Catalina Host appBase=webapps name=localhost Logger className=org.apache.catalina.logger.FileLogger prefix=localhost_log. suffix=.txt timestamp=true/ Context path=/groller reloadable=true docBase=E:\G-Roller workDir=E:\G-Roller\work / Context displayName=Struts Blank Application docBase=E:/study/proj/strutsTest path=/strutsTest reloadable=true Resource name=JDBC/ORADB type=javax.sql.DataSource/ ResourceParams name=JDBC/ORADB parameter nameContext.PROVIDER_URL/name valuehttp://192.168.0.35:8080/value /parameter parameter nameurl/name valuejdbc:oracle:thin:@192.168.0.26:1521:ORADB/value /parameter parameter namepassword/name valuelrx/value /parameter parameter namemaxActive/name value10/value /parameter parameter namemaxWait/name value5000/value /parameter parameter namedriverClassName/name valueoracle.jdbc.driver.OracleDriver/value /parameter parameter nameusername/name valuelrx/value /parameter parameter namemaxIdle/name value2/value /parameter /ResourceParams /Context /Host Logger className=org.apache.catalina.logger.FileLogger prefix=catalina_log. suffix=.txt timestamp=true/ Realm className=org.apache.catalina.realm.UserDatabaseRealm/ /Engine /Service /Server ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.2//EN http://java.sun.com/j2ee/dtds/web-app_2_2.dtd; web-app resource-ref descriptionDB Connection/description res-ref-nameJDBC/ORADB/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref display-nameStruts Blank Application/display-name !-- Standard Action Servlet Configuration (with debugging) -- servlet servlet-nameaction/servlet-name
RE: Hierarchical Lists
I agree. This behaviour looks very suited to a dhtml/js solution. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: 17 March 2004 19:54 To: [EMAIL PROTECTED] Subject: RE: Hierarchical Lists Short of a reload, I believe only a JavaScript/DHTML function can provide this behavior. -Original Message- From: Randy Dillon [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 17, 2004 2:48 PM To: Struts Users Mailing List Subject: Hierarchical Lists Say I have 2 (or more) lists that are part of a hierarchy, such that the first list is a category (say Food Groups) and the second list contains children of each of the first list's items (for this example, let's say Food Types). How do I get the second list to be filtered based on the selection in the first list? I know this can be done by reloading the page each time the selection is changed in the first list, but is there a way to do this without the page reload? To add more detail to the example: Food Groups Food Types --- -- MeatDairy Beef Chicken Milk Eggs FruitVeg Melons Apples Oranges Lettuce . . . . . . If MeatDairy is selected in the Food Groups list, can the second Food Types list be filtered to only the MeatDairy food types without a page reload? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] *** This e-mail and its attachments are confidential and are intended for the above named recipient only. If this has come to you in error, please notify the sender immediately and delete this e-mail from your system. You must take no action based on this, nor must you copy or disclose it or any part of its contents to any person or organisation. Statements and opinions contained in this email may not necessarily represent those of Littlewoods. Please note that e-mail communications may be monitored. The registered office of Littlewoods Limited and its subsidiaries is 100 Old Hall Street, Liverpool, L70 1AB. Registered number of Littlewoods Limited is 262152. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: calling ASP inside a JSP
Use the superior JSP to suck in the contents of the ASP (using the link to it) and write it out directly to the frame using javascript or, another jsp that contains the sucked in ASP information in a bean. Chris -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: 18 March 2004 00:05 To: [EMAIL PROTECTED] Subject: calling ASP inside a JSP Hi All I have a webpage in which i have two Frames. In my left frame i want to display an ASP page. In the main frame i have a JSP page. Can i do this at all. I have a link to the ASP page, but i do not want to provide a link but only want to display the content of the ASP page. Please let me know if i can do this. Thanks --Mohan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] *** This e-mail and its attachments are confidential and are intended for the above named recipient only. If this has come to you in error, please notify the sender immediately and delete this e-mail from your system. You must take no action based on this, nor must you copy or disclose it or any part of its contents to any person or organisation. Statements and opinions contained in this email may not necessarily represent those of Littlewoods. Please note that e-mail communications may be monitored. The registered office of Littlewoods Limited and its subsidiaries is 100 Old Hall Street, Liverpool, L70 1AB. Registered number of Littlewoods Limited is 262152. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: *****SPAM***** How to configure in tomcat5.0
Hi, I got same frustration that you had I got solved By trying to reuse the webapp examples.. Steps: - define a Datasource in server.xml (following instructions given in tomcat), within the context jsp-examples (one of the webapp that comes along with tomcat - inside jsp-examples\WEB-INF\web.xml define your datasource Ref - write a simple JSP in jsp-examples that looks up the database from JNDI and get a connection See if this work (it worked for me), and if it does then Repeat the process for your web application Hope this helps Regards marco -Original Message- From: asd [mailto:[EMAIL PROTECTED] Sent: 18 March 2004 10:56 To: Struts Users Mailing List Subject: *SPAM* How to configure in tomcat5.0 Spam detection software, running on the system waersys.net, has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or block similar future email. If you have any questions, see the administrator of that system for details. Content preview: --=_NextPart_001_005D_01C40D1A.A78B1FC0 i have tired in triral with configuring my database resource in tomcat 5.0.it also return the same err ,even if i worked according as manual in www.apache.org ,step by step. the patch accompany with this letter is my strutsTest.xml,which located in %CATALINA_HOME%\conf\catalina\localhost,strutsTest is my web app name, web.xml which located in mywebApp docbase\web-inf . index.jsp ,which is my test jsp. it is confused where there are three xml file ,not two as described in some document. the same err msg is: javax.naming.NameNotFoundException: Name JDBC is not bound in this Context . i had so depress.what's wrong with my cofigure? best regard. [...] Content analysis details: (10.2 points, 7.5 required) pts rule name description -- -- 2.5 MIME_BASE64_TEXT RAW: Message text disguised using base64 encoding 1.3 RCVD_IN_SBLRBL: Received via a relay in Spamhaus Block List [http://www.spamhaus.org/SBL/sbl.lasso?query=SBL10717] 1.3 RCVD_IN_NJABL_RELAYRBL: NJABL: sender is confirmed open relay [211.144.13.62 listed in dnsbl.njabl.org] 2.0 RCVD_IN_SORBS RBL: SORBS: sender is listed in SORBS [211.144.13.62 listed in dnsbl.sorbs.net] 2.0 RCVD_IN_NJABL RBL: Received via a relay in dnsbl.njabl.org [211.144.13.62 listed in dnsbl.njabl.org] 4.8 FORGED_OUTLOOK_TAGSOutlook can't send HTML in this format -3.7 AWLAWL: Auto-whitelist adjustment The original message was not completely plain text, and may be unsafe to open with some email clients; in particular, it may contain a virus, or confirm that your address can receive spam. If you wish to view it, it may be safer to save it to a file and open it with an editor. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: how to submit javascript variable of array type
You can also create a Hidden form field for each value in the Array. Something like this : for(var i = 0 ; i theArray.size ; i++) document.writeln(INPUT TYPE='HIDDEN' NAME='theArray_' + i + ' VALUE=' + theArray[i] + '); - Original Message - From: as as [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Wednesday, March 17, 2004 1:42 PM Subject: RE: how to submit javascript variable of array type Andrew, I used the exact same approach my in my action class, the array from request is yielding null... Any clues.. Thanks so much! Andrew Hill [EMAIL PROTECTED] wrote: I usually concatenate the array into a single string (using a delimiter such as a comma) and then put this value into a single field. In my actionform I have a getter (under different property name) that returns it as an array (using the delimiter to explode the string). -Original Message- From: Mu Mike [mailto:[EMAIL PROTECTED] Sent: Wednesday, 17 March 2004 10:24 To: [EMAIL PROTECTED] Subject: how to submit javascript variable of array type I now have a javascript array var, and I need to submit it by a form to an action class, how can I achieve this? ThanksRegards _ Ãâ·ÑÏÂÔØ MSN Explorer: http://explorer.msn.com/lccn/ - 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! Mail - More reliable, more storage, less spam - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: action - delegate - facade
Adam, I think Nick was just asking about the trip from the server to the client, not from the client to the server. As already discussed, the method for transfering user input to the business tier would be to copy the values from the action form to the appropriate DTO's using BeanUtils or some other method. robert -Original Message- From: Adam Hardy [mailto:[EMAIL PROTECTED] Sent: Thursday, March 18, 2004 4:57 AM To: Struts Users Mailing List Subject: Re: action - delegate - facade Downside is though, trying to cram string request parameters into your DTO in your form before you validate them. Causes ugly exception messages on the browser. On 03/18/2004 02:25 AM Robert Taylor wrote: Well, I would say it depends. If I had a DTO ( a domain object) which had all the fields I needed to display...including types like int, Date, boolean, etc... I would probably just pass that along to the form bean and let view helpers like the Struts tags or JSTL render the contents. With JSTL you can format Dates and numbers. I believe those tags leverage the java.text.* package for formatting data. If I needed to perform some specialized formatting which could not be done by view helpers then I may just convert the necessary fields to Strings (maybe using BeanUtils) format them, and populate my ActionForm. If the view I needed of the data was not encapsulated in a single DTO, then you could retrieve multiple DTO objects and rendered them as described above or use a pattern described as Transfer Object Assembler which builds a custom DTO or a collection of customer DTO objects which you could pass along to the ActionForm. You can read more about Transfer Object Assembler here: http://java.sun.com/blueprints/corej2eepatterns/Patterns/TransferObjectAssembler.html robert -Original Message- From: Nick Wesselman [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 17, 2004 6:28 PM To: Struts Users Mailing List Subject: Re: action - delegate - facade What about when simply displaying data on a page? Do developers typically copy data out of the domain object just to display it? (As opposed to using it w/ a form.) The only issue I see is that you may end up introducing view helper methods to your model beans. Nick Robert Taylor wrote: Adam, its frowned upon to pass a web tier object (ActionForm) into the business tier. I believe a widely used technique is to use BeanUtils to copy the properties from the ActionForm to a DTO (a Domain Object) which can be passed to the business tier. robert - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- struts 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]
Re: *****SPAM***** How to configure in tomcat5.0
my help word became spam!!!faint. that is more than like a doohickey ,not a solution. i will try it laterly,thx u at first. - Original Message - From: Marco Mistroni [EMAIL PROTECTED] To: 'asd' [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Thursday, March 18, 2004 7:10 PM Subject: RE: *SPAM* How to configure in tomcat5.0 Hi, I got same frustration that you had I got solved By trying to reuse the webapp examples.. Steps: - define a Datasource in server.xml (following instructions given in tomcat), within the context jsp-examples (one of the webapp that comes along with tomcat - inside jsp-examples\WEB-INF\web.xml define your datasource Ref - write a simple JSP in jsp-examples that looks up the database from JNDI and get a connection See if this work (it worked for me), and if it does then Repeat the process for your web application Hope this helps Regards marco -Original Message- From: asd [mailto:[EMAIL PROTECTED] Sent: 18 March 2004 10:56 To: Struts Users Mailing List Subject: *SPAM* How to configure in tomcat5.0 Spam detection software, running on the system waersys.net, has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or block similar future email. If you have any questions, see the administrator of that system for details. Content preview: --=_NextPart_001_005D_01C40D1A.A78B1FC0 i have tired in triral with configuring my database resource in tomcat 5.0.it also return the same err ,even if i worked according as manual in www.apache.org ,step by step. the patch accompany with this letter is my strutsTest.xml,which located in %CATALINA_HOME%\conf\catalina\localhost,strutsTest is my web app name, web.xml which located in mywebApp docbase\web-inf . index.jsp ,which is my test jsp. it is confused where there are three xml file ,not two as described in some document. the same err msg is: javax.naming.NameNotFoundException: Name JDBC is not bound in this Context . i had so depress.what's wrong with my cofigure? best regard. [...] Content analysis details: (10.2 points, 7.5 required) pts rule name description -- -- 2.5 MIME_BASE64_TEXT RAW: Message text disguised using base64 encoding 1.3 RCVD_IN_SBLRBL: Received via a relay in Spamhaus Block List [http://www.spamhaus.org/SBL/sbl.lasso?query=SBL10717] 1.3 RCVD_IN_NJABL_RELAYRBL: NJABL: sender is confirmed open relay [211.144.13.62 listed in dnsbl.njabl.org] 2.0 RCVD_IN_SORBS RBL: SORBS: sender is listed in SORBS [211.144.13.62 listed in dnsbl.sorbs.net] 2.0 RCVD_IN_NJABL RBL: Received via a relay in dnsbl.njabl.org [211.144.13.62 listed in dnsbl.njabl.org] 4.8 FORGED_OUTLOOK_TAGSOutlook can't send HTML in this format -3.7 AWLAWL: Auto-whitelist adjustment The original message was not completely plain text, and may be unsafe to open with some email clients; in particular, it may contain a virus, or confirm that your address can receive spam. If you wish to view it, it may be safer to save it to a file and open it with an editor. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
EL buggy? this shouldn't happen
hi all! while trying to figure out how indexed/mapped properties work I get some strange behaviour - I'm pretty sure this doesn't conform to standard (hope I'm mistaken): logic:iterate id=foo indexId=ctr name=mappedTest property=testPrimKey tr td${foo}/td td${ctr}/td tdtestPrimKey[${ctr}]/td /tr /logic:iterate evaluates to: tr tdk1/td td0/td tdtestPrimKey[]/td /tr tr tdk2/td td1/td tdtestPrimKey[]/td /tr ... where the k1, k2.. are the expected values of key testPrimKey in the HashMap put under mappedTest in the PageContext BUT ${ctr} gets evaluated to different values I'm using struts1.1 and tomcat 5.0.19 so whose wrong? me or the result ??? thanks for enlightenment! Axel - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
java.lang.VerifyErrror - Illegal stste of Jump or Branch
Hi List, I am facing one problem in a jsp file. In this file, i am including lot of codes. While using html:select html:optionaa/html:option /html:select Here if i include, one extra line it is throwing such error. But if i remove one line option it is working fine. I searched in the netbut not yet solved. So i try to use the jsp:include inside the html:select. But it os throwing error, 'unable to flush between the custom tags If i use the [EMAIL PROTECTED] again it throws the same error. Please give me the solution regarding this Thanx and Regards, Ram - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Peculiar Session Problem Weblogic 8.1
Hi All I have a peculiar problem of session maintenence I have two servers one runing TomCat and the other running Weblogic . On on of the pages presented by the TomCat server there exists a HREF link to another page on the Weblogic Server. When the user clicks on this link then the page from the Weblogic Server is supposed to load in the right frame. now the problem is that the page from weblogic has three IFRAMES embedded in it which use the session object to display some data. These sessions are not consistent. When I run he whole app only on Weblogic it runs fine. Can someone please help me out on this !!! Regards Saugata -Original Message- From: news [mailto:[EMAIL PROTECTED] Behalf Of Vic Cekvenich Sent: Thursday, March 18, 2004 10:39 AM To: [EMAIL PROTECTED] Subject: Re: Performace Improvement :: Struts based applications Unit test the performance of the model layer. .V Satya Narayan Dash wrote: Hi, I am in the process of improving a struts based application. I am using the cache taglib (from apache) and have written some filters to improve the performace. I am using Apache2 as the web-sever and Tomcat4 as the servelt/jsp engine. I have optimized them both. But the peformance improvement is not substantial. Can you please give me some tips to improve the performance ? Need your help, Regards, Satya. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: java.lang.VerifyErrror - Illegal stste of Jump or Branch
Why not populate an array and use that ? If doing it in the action seems a little tiresome then JSTL could help. It will be tidier than including a page with a bunch of options in. On 18 Mar 2004, at 13:00, Ramachandran wrote: Hi List, I am facing one problem in a jsp file. In this file, i am including lot of codes. While using html:select html:optionaa/html:option /html:select Here if i include, one extra line it is throwing such error. But if i remove one line option it is working fine. I searched in the netbut not yet solved. So i try to use the jsp:include inside the html:select. But it os throwing error, 'unable to flush between the custom tags If i use the [EMAIL PROTECTED] again it throws the same error. Please give me the solution regarding this Thanx and Regards, Ram - 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: Module switching issue on weblogic 8.1
I guess there is some problem in installation .Can u pls send me the apps so that i can try it Thanks Sougata -Original Message- From: Colm Garvey [mailto:[EMAIL PROTECTED] Sent: Thursday, March 18, 2004 3:26 PM To: [EMAIL PROTECTED] Subject: Module switching issue on weblogic 8.1 hi there, I've run into a persistent problem with weblogic 8.1 using struts 1.1 I'm trying to switch modules and have downloaded the sample simple-module-switching.war archive from sourceforge to try to get it working. I deployed it on Tomcat and it worked perfectly, but no matter which mechanism I use to try to use on weblogic I get a message key not found exception. Having trawled a few newsgroups, I gather that I am not the only one who has come across this, nor is this issue unique to WebLogic application servers. Is there a workaround? Incidentally, I can't use weblogic proprietary pageflows because this application has to be platform independant. Kind Regards, Colm Garvey -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: 17 March 2004 09:00 To: [EMAIL PROTECTED] Subject: Important Information Regarding Your BEA eSupport Login ID To: [EMAIL PROTECTED] From: [EMAIL PROTECTED] Subject: Important Information Regarding Your BEA eSupport Login ID Colm Garvey: Thank you for your recent registration to BEA eSupport. As a new user to BEA eSupport, you're entitled to comprehensive self-help resources, product downloads, personalized interfaces, and the ability to manage support cases online. BEA eSupport is seamlessly integrated with BEA Support Centers, allowing you to use the telephone and web while interacting with BEA. We recommend that you log-in now by clicking http://support.bea.com. The Login link is located at the top of the page. We also recommend that you take the time to customize your views and complete your environment profiles. To help us better serve you, please review the following information: BEA Login ID: cgarvey Name : Colm Garvey E-mail : [EMAIL PROTECTED] Don't know your password? For security reasons, your password is not displayed in this message. Try our Password Finder, located in the User Status Bar on http://support.bea.com. Incorrect information? You can view and update your registration information by clicking the link that says Manage User Profile, in the User Status Bar on http://support.bea.com. Still need help? Please contact us by replying to this message and we will make every effort to assist you with your account. Thank you for choosing BEA products and services! -BEA Customer Support This message is for the designated recipient only and may contain privileged, proprietary, or otherwise private information. If you have received it in error, please notify the sender immediately and delete the original. Any other use of the email by you is prohibited. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Pls help on shopping cart App
No it is not like that since I am using weblogic's struts .Anyway I solved that.Thanks for your reply Sougata -Original Message- From: Mark Lowe [mailto:[EMAIL PROTECTED] Sent: Thursday, March 18, 2004 1:36 PM To: Struts Users Mailing List Subject: Re: Pls help on shopping cart App Do your html:text have the indexed=true attribute? On 18 Mar 2004, at 07:07, sougata wrote: Hi All, I have a shopping cart apps.When the user is buying items it is coming to mycart .In my mycart page I am showing all the products and the beside that I have a update button by which I can update the quantity of my each item which is in a textbox.I am follwing struts for that.My text box name is same in every row(say quantity).if its name is quantity in servlet I am getting a String array of quantity.But when I am coming to the same page its showing value=[Ljava.lang.String;@1765ae which is the reference of my string array.How to get the original value Pls let me know ASAP. Thanks Sougata - 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]
[SOLVED] - my fault - Re: EL buggy? this shouldn't happen
sorry! in my code (on the other machine), I reference once the not existing EL variable crt so the code i posted works as expected sorry again :(( (should have taken a break) regards, Axel On 2004-03-18 at 12:46:41 +0100, Axel Groß wrote: hi all! while trying to figure out how indexed/mapped properties work I get some strange behaviour - I'm pretty sure this doesn't conform to standard (hope I'm mistaken): logic:iterate id=foo indexId=ctr name=mappedTest property=testPrimKey tr td${foo}/td td${ctr}/td tdtestPrimKey[${ctr}]/td /tr /logic:iterate evaluates to: tr tdk1/td td0/td tdtestPrimKey[]/td /tr tr tdk2/td td1/td tdtestPrimKey[]/td /tr ... where the k1, k2.. are the expected values of key testPrimKey in the HashMap put under mappedTest in the PageContext BUT ${ctr} gets evaluated to different values I'm using struts1.1 and tomcat 5.0.19 so whose wrong? me or the result ??? thanks for enlightenment! Axel - 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: EL buggy? this shouldn't happen
${testPrimKey[ctr]} or perhaps with the wrappers c:set var=key value=${testPrimKey[ctr]} / ${key} what does that do? On 18 Mar 2004, at 12:46, Axel Groß wrote: hi all! while trying to figure out how indexed/mapped properties work I get some strange behaviour - I'm pretty sure this doesn't conform to standard (hope I'm mistaken): logic:iterate id=foo indexId=ctr name=mappedTest property=testPrimKey tr td${foo}/td td${ctr}/td tdtestPrimKey[${ctr}]/td /tr /logic:iterate evaluates to: tr tdk1/td td0/td tdtestPrimKey[]/td /tr tr tdk2/td td1/td tdtestPrimKey[]/td /tr ... where the k1, k2.. are the expected values of key testPrimKey in the HashMap put under mappedTest in the PageContext BUT ${ctr} gets evaluated to different values I'm using struts1.1 and tomcat 5.0.19 so whose wrong? me or the result ??? thanks for enlightenment! Axel - 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: Way tho highlight error form field
But, how about server side errors that I can't not validate in Javascript? I tought about something like this: html:text property=test styleClass=normal_class styleClassOnError=error_class/ So, if I return an ActionError about the property test, the style class to use would be error_class, otherwise, normal_class. I know this doesn't exist in Struts but is there something that can do something like this? Thanks -Original Message- From: Mark Lowe [mailto:[EMAIL PROTECTED] Sent: quinta-feira, 18 de março de 2004 10:06 To: Struts Users Mailing List Subject: Re: Way tho highlight error form field You could modify the client-side validation stuff to do this rather than just alerting. An easy way of layering this on is to define a compulsory array of fields and then loop through the form on validation. changing the borderColor style attribute when you have a match between the element name and your array. compulsary = [name,email]; function validate(form) { for(i = 0;i compulsary.length;i++) { field = compulsary[i]; value = form.elements[field].value; if(value == ) { form.elements[field].style.borderColor = #ff; } } } Then you can think about having your compulsary array populated in the same way as the struts validator client-side stuff. In fact you could use the array then it defines. On 18 Mar 2004, at 10:49, Joao Batistella wrote: Hello! Is there a way in Struts to highlight the HTML form field that has an error? I mean, changing the style class of the form field, for example. Is there some feature in Struts that can help me? Thanks, JP - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: calling ASP inside a JSP
This has nothing to do with ASP or JSP specifically. You simply want to use one frame as the target of another's links/posts. This is very easy to do. -- James Mitchell Software Engineer / Open Source Evangelist EdgeTech, Inc. 678.910.8017 AIM: jmitchtx MSN: [EMAIL PROTECTED] Yahoo IM:[EMAIL PROTECTED] [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi All I have a webpage in which i have two Frames. In my left frame i want to display an ASP page. In the main frame i have a JSP page. Can i do this at all. I have a link to the ASP page, but i do not want to provide a link but only want to display the content of the ASP page. Please let me know if i can do this. Thanks --Mohan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
adding items to list in a tile definition using extension
Hello, Is it possible when extending a tile definition to ADD some items to an existing list (defined by parent tile definition) ? I would like to do this : My web pages have a top line that describe flow in app, something like this : home catalog search result I'm using a tile definition for this using the putlist and item tags. But I need to set the full list on every definition. I would like to use definition extends mecanism to have a home tile definition, extend it in a home.catalog, itself extended by a home.catalog.search and so on. Every tile definition should only have to ADD it's item to the existing list. Is they're a way to do it ? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Re: Performace Improvement :: Struts based applications
Hi, I have done the testing of the view layer. And what is peculiar is when i am hitting the ServletEngine for the first time, then it takes a lot of time, but subsequent hits take less time. Is it because the ActionServlet is not initiliazed, though I have started the engine? I would like to know if any recommended technique is given to improve the performance. Regards, Satya. On Thu, 18 Mar 2004 Vic Cekvenich wrote : Unit test the performance of the model layer. .V Satya Narayan Dash wrote: Hi, I am in the process of improving a struts based application. I am using the cache taglib (from apache) and have written some filters to improve the performace. I am using Apache2 as the web-sever and Tomcat4 as the servelt/jsp engine. I have optimized them both. But the peformance improvement is not substantial. Can you please give me some tips to improve the performance ? Need your help, Regards, Satya. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Re: Performace Improvement :: Struts based applications
The reason is jsps are not compiled when you hit the pages the first time.So the first call will always be slow as it alos has to compile jsps.The subsequent calls will use the compiled jsps and hence faster. Some server/ServletEngines have the option to precompile jsps. HTH. Regards, Shirish -Original Message- From: Satya Narayan Dash [mailto:[EMAIL PROTECTED] Sent: Thursday, March 18, 2004 2:13 PM To: Struts Users Mailing List Cc: Vic Cekvenich Subject: Re: Re: Performace Improvement :: Struts based applications Hi, I have done the testing of the view layer. And what is peculiar is when i am hitting the ServletEngine for the first time, then it takes a lot of time, but subsequent hits take less time. Is it because the ActionServlet is not initiliazed, though I have started the engine? I would like to know if any recommended technique is given to improve the performance. Regards, Satya. On Thu, 18 Mar 2004 Vic Cekvenich wrote : Unit test the performance of the model layer. .V Satya Narayan Dash wrote: Hi, I am in the process of improving a struts based application. I am using the cache taglib (from apache) and have written some filters to improve the performace. I am using Apache2 as the web-sever and Tomcat4 as the servelt/jsp engine. I have optimized them both. But the peformance improvement is not substantial. Can you please give me some tips to improve the performance ? Need your help, Regards, Satya. - 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 implement such an action?
Alex: ok, let me state the problem as i understand it: ActionA -- page1.jsp --ActionB if (success in ActionB) forward to success.jsp else forward to ActionA. Your question is how to get the if failure part working. If my understanding of your problem is wrong, please write back and tell us where I'm wrong. However, if this *is* the problem, here's how you can implement a solution using hidden vars: In page1.jsp, use a hidden var: html:hidden property=theAction value=ActionA / In ActionB.execute, if failure do the following: String theAction = formBean.getTheAction(); ActionForward failureForward = new ActionForward(); failureForward.setName(failure); failureForward.setPath(theAction); log.debug(Redirecting to + failureForward.getName() +: + failureForward.getPath()); return failureForward; Hth, Geeta chiu alex wrote: Maybe there is a solution,which is much like using hidden jsp variable as you said in previous mail. Regards, Alex - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Performace Improvement :: Struts based applications
But the peformance improvement is not substantial. Can you please give me some tips to improve the performance ? Observe the following steps for performance tuning. 1) Run the app. Identify that there is a performance issue. 2) Narrow down the problem; is the whole app slow, or just specific screens? 3) Profile the problem area. Any number of tools can be used, including some free / open source onces. @see http://eclipsecolorer.sourceforge.net/index_profiler.html for an example. 4) Fix the problems. Frequent culprits: * Object creation instead of reuse * Frequent DB connection open/close calls * Queries not hitting DB indices @see http://javaperformancetuning.com/ for more general information on performance tuning. David Hibbs, ACS Staff Programmer / Analyst American National Insurance Company - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Again Action Chaining
On Thu, 18 Mar 2004 15:24:25 +0300, AKostylev wrote: How can I avoid action chaining in such situation... In my application user can set resolution on some demand. For example, there two types of resolutions: bug and not a bug. If user selects not a bug option on form, then nothing happens... But if user selects bug option, then he must create object bug. But also user can create object bug from another place of application. So I get two actions: ResolutionSelectAction and BugCreateAction, how can avoid action chaining between them and move this dependence to business logic? The Actions should not be implementing the business logic. The business logic should be behind a facade where any Action can call it. In this way, if multiple Actions need to call an operation, like createBug, they can. The facade can simply be a JavaBean placed in application scope by a Plug-In, as is done with the Struts MailReader example. If the facade is based on an interface, as is done with MailReader, you can change the implementation of the facade whenever you like. The Action's job is not to create business objects, but to *decide* whether an object needs to be created. When any Action anywhere needs to create a business object, they should be able to call a method on the facade. Actions should represent the workflows or scripts (to use Fowler's term) within an application, not the underlying business operations. The idea is that the user makes a request, and the Action fulfills that request, calling whatever business operations it may need along the way. Another responsibility of the Action is to select the resource that will complete the response, usually by rendering a page. Sometimes this resource may be behind another Action. But this is not an instance of Action Chaining, since a resource Action (or PageLoader) seeks to complete the response, rather than fulfill the request. Another way to think of the facade is as a set of services, like Web Services. Any time anyone needs to work with a business object, they should be able to call a service to handle the implementations details. All the Actions see are signatures. -Ted. Developing Web Applications Using Open Source Tools Saturday, 3 Apr 2004, New York City http://basebeans.com/do/website - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
indexed property problem
Hi Mark! thanks for your answer tdtestPrimKey[${ctr}]/td evaluates to as it should to testPrimKey[0], testPrimKey[1].. ( i did a stupid mistake in my code ), On 2004-03-18 at 13:25:22 +0100, Mark Lowe wrote: ${testPrimKey[ctr]} that actually evaluates to nothing but ${mappedTest.testPrimKey[ctr]} gets the right result BUT my original intention (to use it with html:struts) still fails, because the tag doesnt populate the value for the indexed property: without using the indexed property: html:text name=mappedTest property='testPrimKey'/html:text - is as expected: input type=text name=testPrimKey value=[Ljava...{right object reference} / with using the indexed property html:text name=mappedTest property='testPrimKey[${ctr}]' / - doesnt put value attribute: input type=text name=testPrimKey[0] value= / input type=text name=testPrimKey[1] value= / ... if anybody could help me with that one, i'd be relieved thanks, axel or perhaps with the wrappers c:set var=key value=${testPrimKey[ctr]} / ${key} what does that do? On 18 Mar 2004, at 12:46, Axel Groß wrote: hi all! while trying to figure out how indexed/mapped properties work I get some strange behaviour - I'm pretty sure this doesn't conform to standard (hope I'm mistaken): logic:iterate id=foo indexId=ctr name=mappedTest property=testPrimKey tr td${foo}/td td${ctr}/td tdtestPrimKey[${ctr}]/td /tr /logic:iterate evaluates to: tr tdk1/td td0/td tdtestPrimKey[]/td /tr tr tdk2/td td1/td tdtestPrimKey[]/td /tr ... where the k1, k2.. are the expected values of key testPrimKey in the HashMap put under mappedTest in the PageContext BUT ${ctr} gets evaluated to different values I'm using struts1.1 and tomcat 5.0.19 so whose wrong? me or the result ??? thanks for enlightenment! Axel - 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]
Refresh parent window on popup submit with old params to parent
This must have asked before but ... I popup a child window from a parent window. Popup window submits info, gets closed. Parent window gets refreshed. Whats the best way to refresh parent window, such that it gets the new info from child window and the parameters that were previously submitted for the parent window to appear. Thanks Panchasheel - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: calling ASP inside a JSP
Hi James Can u tell me how can acheive this. I have never developed stuff in HTML or ASP. Suppose the link is www.xyz.com/abc/dba.asp, how do we read this stuff into a frame. Please let me know. --Mohan This has nothing to do with ASP or JSP specifically. You simply want to use one frame as the target of another's links/posts. This is very easy to do. -- James Mitchell Software Engineer / Open Source Evangelist EdgeTech, Inc. 678.910.8017 AIM: jmitchtx MSN: [EMAIL PROTECTED] Yahoo IM:[EMAIL PROTECTED] [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi All I have a webpage in which i have two Frames. In my left frame i want to display an ASP page. In the main frame i have a JSP page. Can i do this at all. I have a link to the ASP page, but i do not want to provide a link but only want to display the content of the ASP page. Please let me know if i can do this. Thanks --Mohan - 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: LookupDispatchAction with html:image?
try ImageButtonBeanManager from Mitranosoft - Original Message - From: Stefan Burkard [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, March 18, 2004 2:48 PM Subject: LookupDispatchAction with html:image? hi struts-users is it possible to use the LookupDispatchAction with image-submit-buttons (html:image) instead of normal submit-buttons? thanks and greetings stefan - 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]
Validate and Global Errors
Hello i have a little question in the MessageTag i can specify an attribute called name to say where he can find the errors or messages in request. Lets say the value is DOIT now how can i make that if i use validate in my FormBean, the ActionErrors are saved under DOIT instead of Globals.ERROR_KEY Anyone knows? Thx for any help Michael
RE: calling ASP inside a JSP
These tutorials are good: Frames Basics: http://hotwired.lycos.com/webmonkey/96/31/index3a.html?tw=authoring Linking Between Frames: http://hotwired.lycos.com/webmonkey/96/36/index2a.html?tw=authoring short synopsis: when you create a frameset, every frame gets a name. Any link can be made to load into any frame by specifying a target a href=pagetoload.asp target=frameNamelink/a Initial pages are specified in the frameset file itself. This is more a javascript / HTML issue than a Struts one. Try checking out some HTML/javascript mailing lists: http://www.htmlforums.com/ -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: 18 March 2004 13:50 To: [EMAIL PROTECTED] Subject: Re: calling ASP inside a JSP Hi James Can u tell me how can acheive this. I have never developed stuff in HTML or ASP. Suppose the link is www.xyz.com/abc/dba.asp, how do we read this stuff into a frame. Please let me know. --Mohan This has nothing to do with ASP or JSP specifically. You simply want to use one frame as the target of another's links/posts. This is very easy to do. -- James Mitchell Software Engineer / Open Source Evangelist EdgeTech, Inc. 678.910.8017 AIM: jmitchtx MSN: [EMAIL PROTECTED] Yahoo IM:[EMAIL PROTECTED] [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi All I have a webpage in which i have two Frames. In my left frame i want to display an ASP page. In the main frame i have a JSP page. Can i do this at all. I have a link to the ASP page, but i do not want to provide a link but only want to display the content of the ASP page. Please let me know if i can do this. Thanks --Mohan - 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: adding items to list in a tile definition using extension
On 2004-03-18 at 14:11:43 +0100, nicolas De Loof wrote: Hello, Is it possible when extending a tile definition to ADD some items to an existing list (defined by parent tile definition) ? no, not with the current tiles implementation i posted a generic request for solving this a while ago, but didnt get much answers to it (maybe I should repost) I would like to do this : My web pages have a top line that describe flow in app, something like this : home catalog search result I'm using a tile definition for this using the putlist and item tags. But I need to set the full list on every definition. I would like to use definition extends mecanism to have a home tile definition, extend it in a home.catalog, itself extended by a home.catalog.search and so on. Every tile definition should only have to ADD it's item to the existing list. Is they're a way to do it ? suppose you should use another tiles:putList for each of the following extensions and treat the values of them like they were in just one list. but its evil! should be already in tiles ;) also you have to decide if want to be able to override old items (then you just have to implement it) i.e. (without markup :) definition name=justOne putList name=bla1 item name=itemX value=valueX ... definition name=alreadyTwo extends=justOne putList name=bla2 item name=itemY value=valueY ... when using it search for blaN until you don't find that blaN anymor (using logic:iterate and logic:exists and/or EL syntax) - 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: calling ASP inside a JSP
Mohan, please go to and read: http://www.w3schools.com/html/html_frames.asp Colm -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: 18 March 2004 13:50 To: [EMAIL PROTECTED] Subject: Re: calling ASP inside a JSP Hi James Can u tell me how can acheive this. I have never developed stuff in HTML or ASP. Suppose the link is www.xyz.com/abc/dba.asp, how do we read this stuff into a frame. Please let me know. --Mohan This has nothing to do with ASP or JSP specifically. You simply want to use one frame as the target of another's links/posts. This is very easy to do. -- James Mitchell Software Engineer / Open Source Evangelist EdgeTech, Inc. 678.910.8017 AIM: jmitchtx MSN: [EMAIL PROTECTED] Yahoo IM:[EMAIL PROTECTED] [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi All I have a webpage in which i have two Frames. In my left frame i want to display an ASP page. In the main frame i have a JSP page. Can i do this at all. I have a link to the ASP page, but i do not want to provide a link but only want to display the content of the ASP page. Please let me know if i can do this. Thanks --Mohan - 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: Way tho highlight error form field
I've been thinking about this myself, and the way I plan on doing it is using a variation on my usual theme of: logic:messagesPresent html:messages id=error script language=jscriptalert('bean:write name=error/')/script /html:messages /logic:messagesPresent to using a superior jscript function to read the errors into an array which then either pops up an alert and/or dynamically changes the class of the element in question. HTH Colm -Original Message- From: Joao Batistella [mailto:[EMAIL PROTECTED] Sent: 18 March 2004 12:26 To: 'Struts Users Mailing List' Subject: RE: Way tho highlight error form field But, how about server side errors that I can't not validate in Javascript? I tought about something like this: html:text property=test styleClass=normal_class styleClassOnError=error_class/ So, if I return an ActionError about the property test, the style class to use would be error_class, otherwise, normal_class. I know this doesn't exist in Struts but is there something that can do something like this? Thanks -Original Message- From: Mark Lowe [mailto:[EMAIL PROTECTED] Sent: quinta-feira, 18 de março de 2004 10:06 To: Struts Users Mailing List Subject: Re: Way tho highlight error form field You could modify the client-side validation stuff to do this rather than just alerting. An easy way of layering this on is to define a compulsory array of fields and then loop through the form on validation. changing the borderColor style attribute when you have a match between the element name and your array. compulsary = [name,email]; function validate(form) { for(i = 0;i compulsary.length;i++) { field = compulsary[i]; value = form.elements[field].value; if(value == ) { form.elements[field].style.borderColor = #ff; } } } Then you can think about having your compulsary array populated in the same way as the struts validator client-side stuff. In fact you could use the array then it defines. On 18 Mar 2004, at 10:49, Joao Batistella wrote: Hello! Is there a way in Struts to highlight the HTML form field that has an error? I mean, changing the style class of the form field, for example. Is there some feature in Struts that can help me? Thanks, JP - 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: indexed property problem
try html-el:text name=mappedTest property=testPrimKey(${ctr}) / On 18 Mar 2004, at 14:49, Axel Groß wrote: Hi Mark! thanks for your answer tdtestPrimKey[${ctr}]/td evaluates to as it should to testPrimKey[0], testPrimKey[1].. ( i did a stupid mistake in my code ), On 2004-03-18 at 13:25:22 +0100, Mark Lowe wrote: ${testPrimKey[ctr]} that actually evaluates to nothing but ${mappedTest.testPrimKey[ctr]} gets the right result BUT my original intention (to use it with html:struts) still fails, because the tag doesnt populate the value for the indexed property: without using the indexed property: html:text name=mappedTest property='testPrimKey'/html:text - is as expected: input type=text name=testPrimKey value=[Ljava...{right object reference} / with using the indexed property html:text name=mappedTest property='testPrimKey[${ctr}]' / - doesnt put value attribute: input type=text name=testPrimKey[0] value= / input type=text name=testPrimKey[1] value= / ... if anybody could help me with that one, i'd be relieved thanks, axel or perhaps with the wrappers c:set var=key value=${testPrimKey[ctr]} / ${key} what does that do? On 18 Mar 2004, at 12:46, Axel Groß wrote: hi all! while trying to figure out how indexed/mapped properties work I get some strange behaviour - I'm pretty sure this doesn't conform to standard (hope I'm mistaken): logic:iterate id=foo indexId=ctr name=mappedTest property=testPrimKey tr td${foo}/td td${ctr}/td tdtestPrimKey[${ctr}]/td /tr /logic:iterate evaluates to: tr tdk1/td td0/td tdtestPrimKey[]/td /tr tr tdk2/td td1/td tdtestPrimKey[]/td /tr ... where the k1, k2.. are the expected values of key testPrimKey in the HashMap put under mappedTest in the PageContext BUT ${ctr} gets evaluated to different values I'm using struts1.1 and tomcat 5.0.19 so whose wrong? me or the result ??? thanks for enlightenment! Axel - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re[2]: Again Action Chaining
Ted, Thursday, March 18, 2004, 4:45:01 PM, you wrote: TH On Thu, 18 Mar 2004 15:24:25 +0300, AKostylev wrote: How can I avoid action chaining in such situation... In my application user can set resolution on some demand. For example, there two types of resolutions: bug and not a bug. If user selects not a bug option on form, then nothing happens... But if user selects bug option, then he must create object bug. But also user can create object bug from another place of application. So I get two actions: ResolutionSelectAction and BugCreateAction, how can avoid action chaining between them and move this dependence to business logic? TH The Actions should not be implementing the business logic. TH The business logic should be behind a facade where any Action can TH call it. In this way, if multiple Actions need to call an TH operation, like createBug, they can. The facade can simply be a TH JavaBean placed in application scope by a Plug-In, as is done with TH the Struts MailReader example. If the facade is based on an TH interface, as is done with MailReader, you can change the TH implementation of the facade whenever you like. TH The Action's job is not to create business objects, but to TH *decide* whether an object needs to be created. When any Action TH anywhere needs to create a business object, they should be able to TH call a method on the facade. Actions should represent the TH workflows or scripts (to use Fowler's term) within an TH application, not the underlying business operations. The idea is TH that the user makes a request, and the Action fulfills that TH request, calling whatever business operations it may need along TH the way. TH Another responsibility of the Action is to select the TH resource that will complete the response, usually by rendering a TH page. Sometimes this resource may be behind another Action. But TH this is not an instance of Action Chaining, since a resource TH Action (or PageLoader) seeks to complete the response, rather than TH fulfill the request. TH Another way to think of the facade is as a set of services, TH like Web Services. Any time anyone needs to work with a business TH object, they should be able to call a service to handle the TH implementations details. All the Actions see are signatures. TH -Ted. I think I've understood you... In my application I use single Actions to serve as PageLoader and to fulfill the request. So, for example, I've two actions:ResolutionSelectAction and BugCreateAction, each of them renders the response and fulfills the request. So when user requests ResolutionSelectAction, in this action depending on value of Resolution that user have selected I can forward him to BugCreateAction which firstly will serve as PageLoader. Is this normal workflow? P.S. Of course, I use JavaBeans as facade... P.P.S. [OT] But I still don't know what should I do with transactions in this situation... If I'll use session object to keep data objects between actions and save them in last Action, I think my Action will become too tightly bound... Thank you for your answer... - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: calling ASP inside a JSP
Hi All Thank you very much. Sure i will go to the Html tutorials. Actually i dint see the previous mails of this thread. I just started my morning. Anyways, thanks to all of you. --Mohan Mohan, please go to and read: http://www.w3schools.com/html/html_frames.asp Colm -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: 18 March 2004 13:50 To: [EMAIL PROTECTED] Subject: Re: calling ASP inside a JSP Hi James Can u tell me how can acheive this. I have never developed stuff in HTML or ASP. Suppose the link is www.xyz.com/abc/dba.asp, how do we read this stuff into a frame. Please let me know. --Mohan This has nothing to do with ASP or JSP specifically. You simply want to use one frame as the target of another's links/posts. This is very easy to do. -- James Mitchell Software Engineer / Open Source Evangelist EdgeTech, Inc. 678.910.8017 AIM: jmitchtx MSN: [EMAIL PROTECTED] Yahoo IM:[EMAIL PROTECTED] [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi All I have a webpage in which i have two Frames. In my left frame i want to display an ASP page. In the main frame i have a JSP page. Can i do this at all. I have a link to the ASP page, but i do not want to provide a link but only want to display the content of the ASP page. Please let me know if i can do this. Thanks --Mohan - 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: indexed property problem
On 2004-03-18 at 15:10:47 +0100, Mark Lowe wrote: try html-el:text name=mappedTest property=testPrimKey(${ctr}) / doesnt exist in struts 1.1,right? should be evaluated anyway... i tried now html:text name=mappedTest property='testPrimKey[0]' / - still input type=text name=testPrimKey[0] value= / should that version work? if so it doesnt seem to be the EL part which is amiss. On 18 Mar 2004, at 14:49, Axel Groß wrote: Hi Mark! thanks for your answer tdtestPrimKey[${ctr}]/td evaluates to as it should to testPrimKey[0], testPrimKey[1].. ( i did a stupid mistake in my code ), On 2004-03-18 at 13:25:22 +0100, Mark Lowe wrote: ${testPrimKey[ctr]} that actually evaluates to nothing but ${mappedTest.testPrimKey[ctr]} gets the right result BUT my original intention (to use it with html:struts) still fails, because the tag doesnt populate the value for the indexed property: without using the indexed property: html:text name=mappedTest property='testPrimKey'/html:text - is as expected: input type=text name=testPrimKey value=[Ljava...{right object reference} / with using the indexed property html:text name=mappedTest property='testPrimKey[${ctr}]' / - doesnt put value attribute: input type=text name=testPrimKey[0] value= / input type=text name=testPrimKey[1] value= / ... if anybody could help me with that one, i'd be relieved thanks, axel or perhaps with the wrappers c:set var=key value=${testPrimKey[ctr]} / ${key} what does that do? On 18 Mar 2004, at 12:46, Axel Groß wrote: hi all! while trying to figure out how indexed/mapped properties work I get some strange behaviour - I'm pretty sure this doesn't conform to standard (hope I'm mistaken): logic:iterate id=foo indexId=ctr name=mappedTest property=testPrimKey tr td${foo}/td td${ctr}/td tdtestPrimKey[${ctr}]/td /tr /logic:iterate evaluates to: tr tdk1/td td0/td tdtestPrimKey[]/td /tr tr tdk2/td td1/td tdtestPrimKey[]/td /tr ... where the k1, k2.. are the expected values of key testPrimKey in the HashMap put under mappedTest in the PageContext BUT ${ctr} gets evaluated to different values I'm using struts1.1 and tomcat 5.0.19 so whose wrong? me or the result ??? thanks for enlightenment! Axel - 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: adding items to list in a tile definition using extension
OK, I've done it another way : I put ALL items used in the webapp in a list : definition name=tile:base putList name=locations item vale=home item vale=catalog ... and I extend it for every page : definition name=tile:search-result extends=tile:base put name=currentLocation value=0.1.2/ /definition I use c:forTokens to get indexes in locations (0, 1 2) from currentLocation and print ${locations[index].value} in the JSP. Nico. Axel Groß a écrit : On 2004-03-18 at 14:11:43 +0100, nicolas De Loof wrote: Hello, Is it possible when extending a tile definition to ADD some items to an existing list (defined by parent tile definition) ? no, not with the current tiles implementation i posted a generic request for solving this a while ago, but didnt get much answers to it (maybe I should repost) I would like to do this : My web pages have a top line that describe flow in app, something like this : home catalog search result I'm using a tile definition for this using the putlist and item tags. But I need to set the full list on every definition. I would like to use definition extends mecanism to have a home tile definition, extend it in a home.catalog, itself extended by a home.catalog.search and so on. Every tile definition should only have to ADD it's item to the existing list. Is they're a way to do it ? suppose you should use another tiles:putList for each of the following extensions and treat the values of them like they were in just one list. but its evil! should be already in tiles ;) also you have to decide if want to be able to override old items (then you just have to implement it) i.e. (without markup :) definition name=justOne putList name=bla1 item name=itemX value=valueX ... definition name=alreadyTwo extends=justOne putList name=bla2 item name=itemY value=valueY ... when using it search for blaN until you don't find that blaN anymor (using logic:iterate and logic:exists and/or EL syntax) - 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: AW: Single Checkbox Required
Andreas, Thanks for the reply.I will try this and post back my results! -Sam Andreas Solarik [EMAIL PROTECTED] wrote: hi sam first off, javascript is not really fun, but here goes. your form should have the same name as the formbean you associate with it. you can check this in the html code generated from your jsp. the html:form tag does not supply an attribute for setting/overriding the name of the form (correct me if i'm wrong). furthermore, if you don't want to use the document.forms[...] syntax, you can use things like document.getElementsByName, document.getElementById etc. You could even get all elements in the document, filter out the checkboxes and modify/check attributes like that. you can find a nice explanation of document.forms[] vs. document.getElementsByName when you google for selfhtml just make sure that you are working with a browser that gives you nice error messages while debugging your javascript - like mozilla. andreas -Ursprungliche Nachricht- Von: as as [mailto:[EMAIL PROTECTED] Gesendet: Mittwoch, 17. Marz 2004 19:27 An: Struts Users Mailing List Betreff: RE: Single Checkbox Required Hi, Interesting... yourForm- where do we mention this in the struts's tag Thanks! Sam (I had similar error where my form on submission would say .length is null...was probably not able to invoke checkbox.length on the form already as struts form is generated only after hitting the server but we may need javascript validation much before that-on client side... please...correct me if i am wrong. Thanks my code snipet below: [input] onClick=check(this.form.list) .. ... [input] property=ISBN / ... ... var checkflag = false; function check(field) { if (checkflag == false) { for (i = 0; i field[i].checked = true;} checkflag = true; return Uncheck All; } else { for (i = 0; i field[i].checked = false; } checkflag = false; return Check All; } } Brendan Richards wrote: Sorry - didn't realise you were using javascript validation (should have read your post more carefully). You could add your own client side code: function checkTheBox() { if (!document.forms['yourForm'].myCheckbox.checked) { alert(you must check the box to proceed); return false; } else { return true; } } -Original Message- From: Morowitz, Michael [mailto:[EMAIL PROTECTED] Sent: 17 March 2004 17:14 To: Struts Users Mailing List Subject: RE: Single Checkbox Required But, when I mark it required in my validator.xml, it doesn't work. The javascript that is generated (validateRequired) does not apply to fields of type checkbox. I suppose I could modify the javascript, but I want both server side and client-side validation. -M -Original Message- From: Brendan Richards [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 17, 2004 10:52 AM To: Struts Users Mailing List Subject: RE: Single Checkbox Required What makes a checkbox unusual is that it only submits a value when checked - when unchecked nothing is submitted. You should therefore be able to validate that it's been checked with a standard required validator. -Original Message- From: Morowitz, Michael [mailto:[EMAIL PROTECTED] Sent: 17 March 2004 16:26 To: [EMAIL PROTECTED] Subject: Single Checkbox Required I have searched the archive of the list and I came up empty. I want to use validator.xml to indicate that a single checkbox must be checked 'true' on my form. Has anyone had success simply indicating a boolean field to be required? I've noticed that in the client-side javascript that is generated, validateRequired does not look at fields of type 'checkbox'. I have read that commons-validator added this functionality at some point in the past, but has it not made it into the Struts validtion package? Thanks, Michael - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam
Organization chart...
Someone know one way to build a organization chart (dinamic the informations come from data base), some tag or any other ideia is very wellcome. cheers Daniel S.
[REPOST] tiles - smth like addToList?
as I wanted to start a discussion and evaluate how important this is to the community (~ which didnt work first time; beginning of march) I repost this as nicolas De Loof just again asked the question which led to this mail. To the first posting just Adam Hardy answered - that it would be useful. - Hi people! Concerning tiles definition and extension of those. First part-o-mail: concrete problem Second part-o-mail: a more general approach (beginning of it ;) First part: I see the need for extending the entries of a putList without overriding the entries in the super definition. Example: definition name=.head.common path=htmlHead.jsp putList name=httpEquiv item value=pragma link=no-cache / item value=cache-control link=no-cache / item value=expires link=0 / /putList /definition definition name=.head.project extends=.head.common putList name=httpEquiv item value=expires link=1 / item value=description link=tiles definition extension example / /putList /definition so usually this would replace the list in .head.common with the one in .head.project desired behaviour would be to just add the new entries (description) and overwrite those which are already present (expires). Even without the feature to overwrite old values, it would be really nice to have a tag for that (i.e. addToList name=httpEquiv..). At the moment I use 'specialised' definitions (wrapping those attributes likely to change in another definition), as I didn't go deep into tiles code until now. But that just works in some cases. Second part: I think to have this as a general capability would make a lot of sense (virtually adding+replacing nodes in the definition to those the superdefinition at the same place of hierarchy) Especially if the other config files are going to support extension, too. So questions arise; did anybody do this? do others think there's a real need? how to judge, which nodes should be overwritten? thanks for your patience, Axel - End forwarded message - - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Module switching issue on weblogic 8.1
Well, after a bit of experimentation, I've noticed that Weblogic seems to be managing the leap from one module to another. The problem is that is the message bundles aren't being found. So, a possible workaround based on: http://www.mail-archive.com/[EMAIL PROTECTED]/msg85246.html may well be the short-term solution Colm -Original Message- From: sougata [mailto:[EMAIL PROTECTED] Sent: 18 March 2004 12:23 To: Struts Users Mailing List; [EMAIL PROTECTED] Subject: RE: Module switching issue on weblogic 8.1 I guess there is some problem in installation .Can u pls send me the apps so that i can try it Thanks Sougata -Original Message- From: Colm Garvey [mailto:[EMAIL PROTECTED] Sent: Thursday, March 18, 2004 3:26 PM To: [EMAIL PROTECTED] Subject: Module switching issue on weblogic 8.1 hi there, I've run into a persistent problem with weblogic 8.1 using struts 1.1 I'm trying to switch modules and have downloaded the sample simple-module-switching.war archive from sourceforge to try to get it working. I deployed it on Tomcat and it worked perfectly, but no matter which mechanism I use to try to use on weblogic I get a message key not found exception. Having trawled a few newsgroups, I gather that I am not the only one who has come across this, nor is this issue unique to WebLogic application servers. Is there a workaround? Incidentally, I can't use weblogic proprietary pageflows because this application has to be platform independant. Kind Regards, Colm Garvey -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: 17 March 2004 09:00 To: [EMAIL PROTECTED] Subject: Important Information Regarding Your BEA eSupport Login ID To: [EMAIL PROTECTED] From: [EMAIL PROTECTED] Subject: Important Information Regarding Your BEA eSupport Login ID Colm Garvey: Thank you for your recent registration to BEA eSupport. As a new user to BEA eSupport, you're entitled to comprehensive self-help resources, product downloads, personalized interfaces, and the ability to manage support cases online. BEA eSupport is seamlessly integrated with BEA Support Centers, allowing you to use the telephone and web while interacting with BEA. We recommend that you log-in now by clicking http://support.bea.com. The Login link is located at the top of the page. We also recommend that you take the time to customize your views and complete your environment profiles. To help us better serve you, please review the following information: BEA Login ID: cgarvey Name : Colm Garvey E-mail : [EMAIL PROTECTED] Don't know your password? For security reasons, your password is not displayed in this message. Try our Password Finder, located in the User Status Bar on http://support.bea.com. Incorrect information? You can view and update your registration information by clicking the link that says Manage User Profile, in the User Status Bar on http://support.bea.com. Still need help? Please contact us by replying to this message and we will make every effort to assist you with your account. Thank you for choosing BEA products and services! -BEA Customer Support This message is for the designated recipient only and may contain privileged, proprietary, or otherwise private information. If you have received it in error, please notify the sender immediately and delete the original. Any other use of the email by you is prohibited. - 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: SOLVED: Multibox problem when defaulted all on
Wiebe, Nice to hear that. Actually I tried implementing the rows in my table with checkboxes generated through html:checkbox and pull out the checked Items' array in my action class, as per Ted's online struts tip. I couldnt get it to show me the array from httpRequest.. if possible could you post the snippets in the classes.. it would be a good learning experience for us... Thanks! Wiebe de Jong [EMAIL PROTECTED] wrote: Hey David, thanks for the clue: When nothing is selected, the browser doesn't send anything back. So, my hack to this problem is to always have at least one of the checkboxes checked. To implement this hack, I changed the following: Form: private String[] marketingItems = {filler, accountHolder, user2, user3, user4, user5}; Jsp: value=filler/ Now there is a hidden checkbox on my page that can't be tabbed to and turned off. Since there will always be at least one checkbox on, the browser will always return the checkbox list. The display:none; makes the checkbox totally invisible. It's a hack, but it works!!! Wiebe -Original Message- From: David Erickson [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 17, 2004 1:48 PM To: Struts Users Mailing List Subject: Re: Multibox problem when defaulted all on I don't think I explained myself quite clearly. WORKS: All the checkboxes on the form default to on. WORKS: User leaves all checkboxes on. WORKS: User turns some of the checkboxes off. DOESN'T WORK: User turns all of the checkboxes off. In the last situation, the form reports to the action that the marketing array still has the value of {accountHolder, user2, user3, user4, user5}, even though the user turned all the checkboxes off. This is because when nothing is selected, nothing gets sent to the form to be populated, so assuming your form is in session scope, whatever you had in there when it was rendered, is still in there. That's why inside the reset method of the form you need to empty that string array. That way if there are value submitted they will be populated, and if there are none, it will stay at none. -David Wiebe -Original Message- From: David Erickson [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 17, 2004 12:28 PM To: Struts Users Mailing List Subject: Re: Multibox problem when defaulted all on Actually according to Ted inside the reset method your code should be: marketing = new String[] {}; HTH, David - Original Message - From: David Erickson To: Struts Users Mailing List Sent: Wednesday, March 17, 2004 1:22 PM Subject: Re: Multibox problem when defaulted all on I'm still a little hazy on when reset is called on forms, but you may want to try moving marketing = marketingItems; to the forms constructor, so when the form is created the first time its holding the default values. And inside the reset method: marketing = null; -David - Original Message - From: Wiebe de Jong To: Struts Users Mailing List Sent: Wednesday, March 17, 2004 1:14 PM Subject: Multibox problem when defaulted all on I am having a problem with multibox. I need to have a set of checkboxes to default on in my form. I found and followed Ted Husted's Struts Tip #7 - Use Multibox to manage checkboxes and everything works well, except in one condition explained below. When everything is defaulted on, and the user checks off the boxes but leaves at least one checked on, everything works as planned. However, if all the boxes are defaulted on (as in the code below) and the user checks all the boxes off, the marketing array is not updated. In this case, the form ends up telling me that the checkboxes are all on. How do I get it to work properly in this situation? - Form: public void reset(ActionMapping mapping, HttpServletRequest request) { ... marketing = marketingItems; } private String[] marketing = {}; private String[] marketingItems = {accountHolder,user2,user3,user4,user5}; public String[] getMarketing() { return this.marketing; } public void setMarketing(String[] marketing) { this.marketing = marketing; } - Jsp: styleClass= ... ... ... ... - Action: String[] marketing = form.getMarketing(); log.debug(marketing + marketing.length); - 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
Re: SOLVED: Multibox problem when defaulted all on
Wiebe, Nice to hear that. Actually I tried implementing the rows in my table with checkboxes generated through html:checkbox and pull out the checked Items' array in my action class, as per Ted's online struts tip. I couldnt get it to show me the array from httpRequest.. if possible could you post the snippets in the classes.. it would be a good learning experience for us... Thanks! Wiebe de Jong [EMAIL PROTECTED] wrote: Hey David, thanks for the clue: When nothing is selected, the browser doesn't send anything back. So, my hack to this problem is to always have at least one of the checkboxes checked. To implement this hack, I changed the following: Form: private String[] marketingItems = {filler, accountHolder, user2, user3, user4, user5}; Jsp: value=filler/ Now there is a hidden checkbox on my page that can't be tabbed to and turned off. Since there will always be at least one checkbox on, the browser will always return the checkbox list. The display:none; makes the checkbox totally invisible. It's a hack, but it works!!! Wiebe -Original Message- From: David Erickson [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 17, 2004 1:48 PM To: Struts Users Mailing List Subject: Re: Multibox problem when defaulted all on I don't think I explained myself quite clearly. WORKS: All the checkboxes on the form default to on. WORKS: User leaves all checkboxes on. WORKS: User turns some of the checkboxes off. DOESN'T WORK: User turns all of the checkboxes off. In the last situation, the form reports to the action that the marketing array still has the value of {accountHolder, user2, user3, user4, user5}, even though the user turned all the checkboxes off. This is because when nothing is selected, nothing gets sent to the form to be populated, so assuming your form is in session scope, whatever you had in there when it was rendered, is still in there. That's why inside the reset method of the form you need to empty that string array. That way if there are value submitted they will be populated, and if there are none, it will stay at none. -David Wiebe -Original Message- From: David Erickson [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 17, 2004 12:28 PM To: Struts Users Mailing List Subject: Re: Multibox problem when defaulted all on Actually according to Ted inside the reset method your code should be: marketing = new String[] {}; HTH, David - Original Message - From: David Erickson To: Struts Users Mailing List Sent: Wednesday, March 17, 2004 1:22 PM Subject: Re: Multibox problem when defaulted all on I'm still a little hazy on when reset is called on forms, but you may want to try moving marketing = marketingItems; to the forms constructor, so when the form is created the first time its holding the default values. And inside the reset method: marketing = null; -David - Original Message - From: Wiebe de Jong To: Struts Users Mailing List Sent: Wednesday, March 17, 2004 1:14 PM Subject: Multibox problem when defaulted all on I am having a problem with multibox. I need to have a set of checkboxes to default on in my form. I found and followed Ted Husted's Struts Tip #7 - Use Multibox to manage checkboxes and everything works well, except in one condition explained below. When everything is defaulted on, and the user checks off the boxes but leaves at least one checked on, everything works as planned. However, if all the boxes are defaulted on (as in the code below) and the user checks all the boxes off, the marketing array is not updated. In this case, the form ends up telling me that the checkboxes are all on. How do I get it to work properly in this situation? - Form: public void reset(ActionMapping mapping, HttpServletRequest request) { ... marketing = marketingItems; } private String[] marketing = {}; private String[] marketingItems = {accountHolder,user2,user3,user4,user5}; public String[] getMarketing() { return this.marketing; } public void setMarketing(String[] marketing) { this.marketing = marketing; } - Jsp: styleClass= ... ... ... ... - Action: String[] marketing = form.getMarketing(); log.debug(marketing + marketing.length); - 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
Re: SOLVED: Multibox problem when defaulted all on
Wiebe, Nice to hear that. Actually I tried implementing the rows in my table with checkboxes generated through html:checkbox and pull out the checked Items' array in my action class, as per Ted's online struts tip. I couldnt get it to show me the array from httpRequest.. if possible could you post the snippets in the classes.. it would be a good learning experience for us... Thanks! Wiebe de Jong [EMAIL PROTECTED] wrote: Hey David, thanks for the clue: When nothing is selected, the browser doesn't send anything back. So, my hack to this problem is to always have at least one of the checkboxes checked. To implement this hack, I changed the following: Form: private String[] marketingItems = {filler, accountHolder, user2, user3, user4, user5}; Jsp: value=filler/ Now there is a hidden checkbox on my page that can't be tabbed to and turned off. Since there will always be at least one checkbox on, the browser will always return the checkbox list. The display:none; makes the checkbox totally invisible. It's a hack, but it works!!! Wiebe -Original Message- From: David Erickson [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 17, 2004 1:48 PM To: Struts Users Mailing List Subject: Re: Multibox problem when defaulted all on I don't think I explained myself quite clearly. WORKS: All the checkboxes on the form default to on. WORKS: User leaves all checkboxes on. WORKS: User turns some of the checkboxes off. DOESN'T WORK: User turns all of the checkboxes off. In the last situation, the form reports to the action that the marketing array still has the value of {accountHolder, user2, user3, user4, user5}, even though the user turned all the checkboxes off. This is because when nothing is selected, nothing gets sent to the form to be populated, so assuming your form is in session scope, whatever you had in there when it was rendered, is still in there. That's why inside the reset method of the form you need to empty that string array. That way if there are value submitted they will be populated, and if there are none, it will stay at none. -David Wiebe -Original Message- From: David Erickson [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 17, 2004 12:28 PM To: Struts Users Mailing List Subject: Re: Multibox problem when defaulted all on Actually according to Ted inside the reset method your code should be: marketing = new String[] {}; HTH, David - Original Message - From: David Erickson To: Struts Users Mailing List Sent: Wednesday, March 17, 2004 1:22 PM Subject: Re: Multibox problem when defaulted all on I'm still a little hazy on when reset is called on forms, but you may want to try moving marketing = marketingItems; to the forms constructor, so when the form is created the first time its holding the default values. And inside the reset method: marketing = null; -David - Original Message - From: Wiebe de Jong To: Struts Users Mailing List Sent: Wednesday, March 17, 2004 1:14 PM Subject: Multibox problem when defaulted all on I am having a problem with multibox. I need to have a set of checkboxes to default on in my form. I found and followed Ted Husted's Struts Tip #7 - Use Multibox to manage checkboxes and everything works well, except in one condition explained below. When everything is defaulted on, and the user checks off the boxes but leaves at least one checked on, everything works as planned. However, if all the boxes are defaulted on (as in the code below) and the user checks all the boxes off, the marketing array is not updated. In this case, the form ends up telling me that the checkboxes are all on. How do I get it to work properly in this situation? - Form: public void reset(ActionMapping mapping, HttpServletRequest request) { ... marketing = marketingItems; } private String[] marketing = {}; private String[] marketingItems = {accountHolder,user2,user3,user4,user5}; public String[] getMarketing() { return this.marketing; } public void setMarketing(String[] marketing) { this.marketing = marketing; } - Jsp: styleClass= ... ... ... ... - Action: String[] marketing = form.getMarketing(); log.debug(marketing + marketing.length); - 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
Re: SOLVED: Multibox problem when defaulted all on
Wiebe, Nice to hear that. Actually I tried implementing the rows in my table with checkboxes generated through html:checkbox and pull out the checked Items' array in my action class, as per Ted's online struts tip. I couldnt get it to show me the array from httpRequest.. if possible could you post the snippets in the classes.. it would be a good learning experience for us... Thanks! Wiebe de Jong [EMAIL PROTECTED] wrote: Hey David, thanks for the clue: When nothing is selected, the browser doesn't send anything back. So, my hack to this problem is to always have at least one of the checkboxes checked. To implement this hack, I changed the following: Form: private String[] marketingItems = {filler, accountHolder, user2, user3, user4, user5}; Jsp: value=filler/ Now there is a hidden checkbox on my page that can't be tabbed to and turned off. Since there will always be at least one checkbox on, the browser will always return the checkbox list. The display:none; makes the checkbox totally invisible. It's a hack, but it works!!! Wiebe -Original Message- From: David Erickson [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 17, 2004 1:48 PM To: Struts Users Mailing List Subject: Re: Multibox problem when defaulted all on I don't think I explained myself quite clearly. WORKS: All the checkboxes on the form default to on. WORKS: User leaves all checkboxes on. WORKS: User turns some of the checkboxes off. DOESN'T WORK: User turns all of the checkboxes off. In the last situation, the form reports to the action that the marketing array still has the value of {accountHolder, user2, user3, user4, user5}, even though the user turned all the checkboxes off. This is because when nothing is selected, nothing gets sent to the form to be populated, so assuming your form is in session scope, whatever you had in there when it was rendered, is still in there. That's why inside the reset method of the form you need to empty that string array. That way if there are value submitted they will be populated, and if there are none, it will stay at none. -David Wiebe -Original Message- From: David Erickson [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 17, 2004 12:28 PM To: Struts Users Mailing List Subject: Re: Multibox problem when defaulted all on Actually according to Ted inside the reset method your code should be: marketing = new String[] {}; HTH, David - Original Message - From: David Erickson To: Struts Users Mailing List Sent: Wednesday, March 17, 2004 1:22 PM Subject: Re: Multibox problem when defaulted all on I'm still a little hazy on when reset is called on forms, but you may want to try moving marketing = marketingItems; to the forms constructor, so when the form is created the first time its holding the default values. And inside the reset method: marketing = null; -David - Original Message - From: Wiebe de Jong To: Struts Users Mailing List Sent: Wednesday, March 17, 2004 1:14 PM Subject: Multibox problem when defaulted all on I am having a problem with multibox. I need to have a set of checkboxes to default on in my form. I found and followed Ted Husted's Struts Tip #7 - Use Multibox to manage checkboxes and everything works well, except in one condition explained below. When everything is defaulted on, and the user checks off the boxes but leaves at least one checked on, everything works as planned. However, if all the boxes are defaulted on (as in the code below) and the user checks all the boxes off, the marketing array is not updated. In this case, the form ends up telling me that the checkboxes are all on. How do I get it to work properly in this situation? - Form: public void reset(ActionMapping mapping, HttpServletRequest request) { ... marketing = marketingItems; } private String[] marketing = {}; private String[] marketingItems = {accountHolder,user2,user3,user4,user5}; public String[] getMarketing() { return this.marketing; } public void setMarketing(String[] marketing) { this.marketing = marketing; } - Jsp: styleClass= ... ... ... ... - Action: String[] marketing = form.getMarketing(); log.debug(marketing + marketing.length); - 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
Re: adding items to list in a tile definition using extension
nice traditional solution... make the stuff global, then it's sure to be accessible ;) looks like a good way for toggling any parameters on and off maybe should do a tile which does this in a generic way .. just some thoughts.. definition name=tile:toggle:base path=toggleOnOffTile.jsp put name=realExtends value=tile:base / putList name=pleaseToggleUs item name=home value=yes / item name=catalog value=furniture /putList definition name=tile:search-result extends=tile:toggle:base put name=currentLocation value=0.1/ /definition On 2004-03-18 at 15:27:07 +0100, nicolas De Loof wrote: OK, I've done it another way : I put ALL items used in the webapp in a list : definition name=tile:base putList name=locations item vale=home item vale=catalog ... and I extend it for every page : definition name=tile:search-result extends=tile:base put name=currentLocation value=0.1.2/ /definition I use c:forTokens to get indexes in locations (0, 1 2) from currentLocation and print ${locations[index].value} in the JSP. Nico. Axel Groß a écrit : On 2004-03-18 at 14:11:43 +0100, nicolas De Loof wrote: Hello, Is it possible when extending a tile definition to ADD some items to an existing list (defined by parent tile definition) ? no, not with the current tiles implementation i posted a generic request for solving this a while ago, but didnt get much answers to it (maybe I should repost) I would like to do this : My web pages have a top line that describe flow in app, something like this : home catalog search result I'm using a tile definition for this using the putlist and item tags. But I need to set the full list on every definition. I would like to use definition extends mecanism to have a home tile definition, extend it in a home.catalog, itself extended by a home.catalog.search and so on. Every tile definition should only have to ADD it's item to the existing list. Is they're a way to do it ? suppose you should use another tiles:putList for each of the following extensions and treat the values of them like they were in just one list. but its evil! should be already in tiles ;) also you have to decide if want to be able to override old items (then you just have to implement it) i.e. (without markup :) definition name=justOne putList name=bla1 item name=itemX value=valueX ... definition name=alreadyTwo extends=justOne putList name=bla2 item name=itemY value=valueY ... when using it search for blaN until you don't find that blaN anymor (using logic:iterate and logic:exists and/or EL syntax) - 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: Re: Performace Improvement :: Struts based applications
some IDEs also precompile the pages... axel On 2004-03-18 at 14:16:26 +0100, [EMAIL PROTECTED] wrote: The reason is jsps are not compiled when you hit the pages the first time.So the first call will always be slow as it alos has to compile jsps.The subsequent calls will use the compiled jsps and hence faster. Some server/ServletEngines have the option to precompile jsps. HTH. Regards, Shirish -Original Message- From: Satya Narayan Dash [mailto:[EMAIL PROTECTED] Sent: Thursday, March 18, 2004 2:13 PM To: Struts Users Mailing List Cc: Vic Cekvenich Subject: Re: Re: Performace Improvement :: Struts based applications Hi, I have done the testing of the view layer. And what is peculiar is when i am hitting the ServletEngine for the first time, then it takes a lot of time, but subsequent hits take less time. Is it because the ActionServlet is not initiliazed, though I have started the engine? I would like to know if any recommended technique is given to improve the performance. Regards, Satya. On Thu, 18 Mar 2004 Vic Cekvenich wrote : Unit test the performance of the model layer. .V Satya Narayan Dash wrote: Hi, I am in the process of improving a struts based application. I am using the cache taglib (from apache) and have written some filters to improve the performace. I am using Apache2 as the web-sever and Tomcat4 as the servelt/jsp engine. I have optimized them both. But the peformance improvement is not substantial. Can you please give me some tips to improve the performance ? Need your help, Regards, Satya. - 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]
LookupDispatchAction problem
Hi out there, i've no idea why the following mechanisms doesn't work. I want to build a formular with 2 submit buttons. When i push one of the buttons the validation method of the suitable form bean validates the user input. It works fine if an an error occures. Then the user gets an error message. If the data is valid then i get the following error message. Request[/uploadDocument] does not contain handler parameter named submit i really don't know why this error appears. i've searched the archives the whole day but found nothing that solves my problem. THE ARCHITECTURE: # A JSP page with a formular. The formular contains two submit buttons. html:form action=uploadDocument.do . . html:submit property=submit bean:message key=profile.dom.upload.label.addMetaData/ /html:submit html:submit property=submit bean:message key=profile.dom.upload.label.changeMetaData/ /html:submit /html:form # A lookupDispatchAction like this: public class DomUploadAction extends LookupDispatchAction{ protected Map getKeyMethodMap() { Map map = new HashMap(); map.put(profile.dom.upload.label.addMetaData, addMetaData); map.put(profile.dom.upload.label.changeMetaData, modifyMetaData); map.put(profile.dom.upload.label.sendDoc, uploadData); return map; } ... Here the methods addMetaData, modifyMetaData, uploadData ... } # the configuration files says action path=/uploadDocument type=com.odc.vis.web.actions.DomUploadAction name=DocumentUploadForm scope=request input=/jsp/secured/dom/Dom_Upload.jsp parameter=submit unknown=false validate=true I think the form bean is not so interesting at this point ! Please give a hint (Maybe i'm to blind) THX - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Re: Performance Improvement :: Struts based applications
If you build your war file using ant then you can use jasper (see org.apache.jasper.JspC) to precompile your jsps. This is useful if you are deploying your app to a live user environment and dont want the initial compile time to impact any users experience. On top of that you could use tomcat/apache mods to compress requests etc. If you are serious about needing bigger performance boosts, then look at partial/full caching. i.e store in server ram/disk the static or infrequently changing parts of your application (jsp or java objects), or have a small cache period on dynamic but less frequently updated parts of your application. There are a few companies that ply these out of the box caching solutions on companies now for extortionate cost (naming no names) but there are a few excellent open source contenders. The best of the open source solutions I have used is this one : http://wiki.opensymphony.com/space/OSCache (It does tie you in to using HttpSession unfortunately, but with a few lines of code you can easily work around this). It is a shame that this project http://www.jcp.org/en/jsr/detail?id=128 is not in progress, anyone on this list working on it ? ;) cheers Chris McCormack -Original Message- From: Axel Groß [mailto:[EMAIL PROTECTED] Sent: 18 March 2004 14:43 To: Struts Users Mailing List Cc: [EMAIL PROTECTED] Subject: Re: Re: Performace Improvement :: Struts based applications some IDEs also precompile the pages... axel On 2004-03-18 at 14:16:26 +0100, [EMAIL PROTECTED] wrote: The reason is jsps are not compiled when you hit the pages the first time.So the first call will always be slow as it alos has to compile jsps.The subsequent calls will use the compiled jsps and hence faster. Some server/ServletEngines have the option to precompile jsps. HTH. Regards, Shirish -Original Message- From: Satya Narayan Dash [mailto:[EMAIL PROTECTED] Sent: Thursday, March 18, 2004 2:13 PM To: Struts Users Mailing List Cc: Vic Cekvenich Subject: Re: Re: Performace Improvement :: Struts based applications Hi, I have done the testing of the view layer. And what is peculiar is when i am hitting the ServletEngine for the first time, then it takes a lot of time, but subsequent hits take less time. Is it because the ActionServlet is not initiliazed, though I have started the engine? I would like to know if any recommended technique is given to improve the performance. Regards, Satya. On Thu, 18 Mar 2004 Vic Cekvenich wrote : Unit test the performance of the model layer. .V Satya Narayan Dash wrote: Hi, I am in the process of improving a struts based application. I am using the cache taglib (from apache) and have written some filters to improve the performace. I am using Apache2 as the web-sever and Tomcat4 as the servelt/jsp engine. I have optimized them both. But the peformance improvement is not substantial. Can you please give me some tips to improve the performance ? Need your help, Regards, Satya. - 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] *** This e-mail and its attachments are confidential and are intended for the above named recipient only. If this has come to you in error, please notify the sender immediately and delete this e-mail from your system. You must take no action based on this, nor must you copy or disclose it or any part of its contents to any person or organisation. Statements and opinions contained in this email may not necessarily represent those of Littlewoods. Please note that e-mail communications may be monitored. The registered office of Littlewoods Limited and its subsidiaries is 100 Old Hall Street, Liverpool, L70 1AB. Registered number of Littlewoods Limited is 262152. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
tomcat 5.0.19 - Data Replicating
Hi List, I am using tomcat 5.0.19. Here i am having one jsp file called menuinclude.jsp contains code for menu. When i am trying to include that file using jsp:include in all my pages, one problem is arising. When i logs in intially the menu was displayed correctly. But when navigating , the menu is duplicating..ie displaying another time.like that it is dipalying consecutively for each navigation But it is not arising in Tomcat 3.2 but it is arising in 5.0.19 CAn any one tell me what is the problem Please help needed Thanx and Regards, Ram - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: LookupDispatchAction problem
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Request[/uploadDocument] does not contain handler parameter named submit i really don't know why this error appears. [I'm currently trying to convince the spam filter to cough up all the messages it quarantined since 3pm yesterday, so this may have already been answered, but...] It's saying that there is no request parameter named submit. What does the HTML generated by the JSP look like? Can you list out all the request parameters and examine them? I wonder if the name is reserved? I think you'll have trouble later if you need to refer to the form element with JavaScript-- there is already a document.forms[0].submit(); function (method?) and you'll get errors if you ever try to say document.forms[0].submit.value=abc; I suggest changing the name of the form element to 'method' as used in the LookupDispatchAction javadocs. Or, I've used 'mode' and 'userAction' with no problems. Anything but 'submit' (or any other HTML keyword). -- 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: indexed property problem
I thought you were trying to get a mapped property. What does the structure look like? I cant see what you're drilling to. On 18 Mar 2004, at 15:23, Axel Groß wrote: On 2004-03-18 at 15:10:47 +0100, Mark Lowe wrote: try html-el:text name=mappedTest property=testPrimKey(${ctr}) / doesnt exist in struts 1.1,right? should be evaluated anyway... i tried now html:text name=mappedTest property='testPrimKey[0]' / - still input type=text name=testPrimKey[0] value= / should that version work? if so it doesnt seem to be the EL part which is amiss. On 18 Mar 2004, at 14:49, Axel Groß wrote: Hi Mark! thanks for your answer tdtestPrimKey[${ctr}]/td evaluates to as it should to testPrimKey[0], testPrimKey[1].. ( i did a stupid mistake in my code ), On 2004-03-18 at 13:25:22 +0100, Mark Lowe wrote: ${testPrimKey[ctr]} that actually evaluates to nothing but ${mappedTest.testPrimKey[ctr]} gets the right result BUT my original intention (to use it with html:struts) still fails, because the tag doesnt populate the value for the indexed property: without using the indexed property: html:text name=mappedTest property='testPrimKey'/html:text - is as expected: input type=text name=testPrimKey value=[Ljava...{right object reference} / with using the indexed property html:text name=mappedTest property='testPrimKey[${ctr}]' / - doesnt put value attribute: input type=text name=testPrimKey[0] value= / input type=text name=testPrimKey[1] value= / ... if anybody could help me with that one, i'd be relieved thanks, axel or perhaps with the wrappers c:set var=key value=${testPrimKey[ctr]} / ${key} what does that do? On 18 Mar 2004, at 12:46, Axel Groß wrote: hi all! while trying to figure out how indexed/mapped properties work I get some strange behaviour - I'm pretty sure this doesn't conform to standard (hope I'm mistaken): logic:iterate id=foo indexId=ctr name=mappedTest property=testPrimKey tr td${foo}/td td${ctr}/td tdtestPrimKey[${ctr}]/td /tr /logic:iterate evaluates to: tr tdk1/td td0/td tdtestPrimKey[]/td /tr tr tdk2/td td1/td tdtestPrimKey[]/td /tr ... where the k1, k2.. are the expected values of key testPrimKey in the HashMap put under mappedTest in the PageContext BUT ${ctr} gets evaluated to different values I'm using struts1.1 and tomcat 5.0.19 so whose wrong? me or the result ??? thanks for enlightenment! Axel --- -- 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Problem with tiles:insert ignore=true'
Can anyone tell me why this tiles:insert attribute=user-menu ignore=true/ In my layout page, with this put name=user-menu value=/tiles/user/menu.jsp/ In my tiles-defs.xml Gives me this Can't insert page '/tiles/user/menu.jsp' : /tiles/user/menu.jsp java.io.FileNotFoundException: /tiles/user/menu.jsp at jrun.jsp.JSPEngine.getPageState(JSPEngine.java:294) at jrun.jsp.Translator.translate(Translator.java:68) at jrun.jsp.JSPEngine.translateJSP(JSPEngine.java:670) at jrun.jsp.JSPServlet.translate(JSPServlet.java:112) at jrun.jsp.JSPServlet.service(JSPServlet.java:100) at jrun.servlet.ServletInvoker. Isn't the idea of ignore=true to *not* throw FileNotFoundExceptions? Is this just Jrun being silly? Thanks, Derek
RE: Problem with tiles:insert ignore=true'
No, the ignore attribute means an exception won't get thrown if the tiles attribute is not present, as it would be if you left out the put tag all together. It can't help that a valid attribute was specified that points to a nonexistant file. -Original Message- From: Scherger, Derek [mailto:[EMAIL PROTECTED] Sent: Thursday, March 18, 2004 10:17 AM To: '[EMAIL PROTECTED]' Subject: Problem with tiles:insert ignore=true' Can anyone tell me why this tiles:insert attribute=user-menu ignore=true/ In my layout page, with this put name=user-menu value=/tiles/user/menu.jsp/ In my tiles-defs.xml Gives me this Can't insert page '/tiles/user/menu.jsp' : /tiles/user/menu.jsp java.io.FileNotFoundException: /tiles/user/menu.jsp at jrun.jsp.JSPEngine.getPageState(JSPEngine.java:294) at jrun.jsp.Translator.translate(Translator.java:68) at jrun.jsp.JSPEngine.translateJSP(JSPEngine.java:670) at jrun.jsp.JSPServlet.translate(JSPServlet.java:112) at jrun.jsp.JSPServlet.service(JSPServlet.java:100) at jrun.servlet.ServletInvoker. Isn't the idea of ignore=true to *not* throw FileNotFoundExceptions? Is this just Jrun being silly? Thanks, Derek - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Problem with tiles:insert ignore=true'
Thanks! That actually works even better for what I'm trying to do. Cheers, Derek -Original Message- From: Paul, R. Chip [mailto:[EMAIL PROTECTED] Sent: Thursday, March 18, 2004 9:32 AM To: 'Struts Users Mailing List' Subject: RE: Problem with tiles:insert ignore=true' No, the ignore attribute means an exception won't get thrown if the tiles attribute is not present, as it would be if you left out the put tag all together. It can't help that a valid attribute was specified that points to a nonexistant file. -Original Message- From: Scherger, Derek [mailto:[EMAIL PROTECTED] Sent: Thursday, March 18, 2004 10:17 AM To: '[EMAIL PROTECTED]' Subject: Problem with tiles:insert ignore=true' Can anyone tell me why this tiles:insert attribute=user-menu ignore=true/ In my layout page, with this put name=user-menu value=/tiles/user/menu.jsp/ In my tiles-defs.xml Gives me this Can't insert page '/tiles/user/menu.jsp' : /tiles/user/menu.jsp java.io.FileNotFoundException: /tiles/user/menu.jsp at jrun.jsp.JSPEngine.getPageState(JSPEngine.java:294) at jrun.jsp.Translator.translate(Translator.java:68) at jrun.jsp.JSPEngine.translateJSP(JSPEngine.java:670) at jrun.jsp.JSPServlet.translate(JSPServlet.java:112) at jrun.jsp.JSPServlet.service(JSPServlet.java:100) at jrun.servlet.ServletInvoker. Isn't the idea of ignore=true to *not* throw FileNotFoundExceptions? Is this just Jrun being silly? Thanks, Derek - 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 log
I am creating an application with a business layer that will be used by a struts presentation layer and a standalone application. I want to use log4j to log debug messages from the struts layer and the business layer. How do I set that up? All I see in the log right now is: log4j: Could not find root logger information. Is this OK? log4j: Parsing for [fi.els] with value=[DEBUG, l1]. log4j: Level token is [DEBUG]. log4j: Category fi.els set to DEBUG log4j: Parsing appender named l1. log4j: Parsing layout options for l1. log4j: Setting property [conversionPattern] to [%d{-MM-dd HH:mm:ss} %-5p %F:%L - %m%n]. log4j: End of parsing for l1. log4j: Setting property [file] to [/tmp/els]. log4j: setFile called: /tmp/els, true log4j: setFile ended log4j: Parsed l1 options. log4j: Handling log4j.additivity.fi.els=[null] log4j: Finished configuring. log4j:WARN No appenders could be found for logger (org.apache.catalina.session.ManagerBase). log4j:WARN Please initialize the log4j system properly. Is there a simple but *complete* example of using logging in struts in a situation like this somewhere? Thanks. Dean Hoover - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: indexed property problem
i was trying to figure out how to use indexed properties. in the end I want to pass a collection of name/value pairs to the form, which the user can edit and then check those and maybe pass the new values to business logic. at the moment i'm trying to do this with two String[], one called keys the other one called values. For passing those values to the browser, I try using indexed propertie. As I'm not sure how it has to look like in html so that struts will populate the ActionForm I'm stuck with the html:text tag, which I can't make work the way I'd like it to testPrimKey is a String[] which should put values into the html, which should get put into the ActionForm, which has an indexed property called 'keys' so if I'm guessing right it should look in the end like input type=text value=k1 name=keys[0] / but if I have that i get a ServletException: BeanUtils.populate ..(RequestUtils.java:1254) root cause ArrayIndexOutOfBoundsException java.lang.reflect.Aray.set(Native Method) ... so maybe that means, the html syntax is ok; but i don't know.. :/ On 2004-03-18 at 17:17:10 +0100, Mark Lowe wrote: I thought you were trying to get a mapped property. What does the structure look like? I cant see what you're drilling to. On 18 Mar 2004, at 15:23, Axel Groß wrote: On 2004-03-18 at 15:10:47 +0100, Mark Lowe wrote: try html-el:text name=mappedTest property=testPrimKey(${ctr}) / doesnt exist in struts 1.1,right? should be evaluated anyway... i tried now html:text name=mappedTest property='testPrimKey[0]' / - still input type=text name=testPrimKey[0] value= / should that version work? if so it doesnt seem to be the EL part which is amiss. On 18 Mar 2004, at 14:49, Axel Groß wrote: Hi Mark! thanks for your answer tdtestPrimKey[${ctr}]/td evaluates to as it should to testPrimKey[0], testPrimKey[1].. ( i did a stupid mistake in my code ), On 2004-03-18 at 13:25:22 +0100, Mark Lowe wrote: ${testPrimKey[ctr]} that actually evaluates to nothing but ${mappedTest.testPrimKey[ctr]} gets the right result BUT my original intention (to use it with html:struts) still fails, because the tag doesnt populate the value for the indexed property: without using the indexed property: html:text name=mappedTest property='testPrimKey'/html:text - is as expected: input type=text name=testPrimKey value=[Ljava...{right object reference} / with using the indexed property html:text name=mappedTest property='testPrimKey[${ctr}]' / - doesnt put value attribute: input type=text name=testPrimKey[0] value= / input type=text name=testPrimKey[1] value= / ... if anybody could help me with that one, i'd be relieved thanks, axel or perhaps with the wrappers c:set var=key value=${testPrimKey[ctr]} / ${key} what does that do? On 18 Mar 2004, at 12:46, Axel Groß wrote: hi all! while trying to figure out how indexed/mapped properties work I get some strange behaviour - I'm pretty sure this doesn't conform to standard (hope I'm mistaken): logic:iterate id=foo indexId=ctr name=mappedTest property=testPrimKey tr td${foo}/td td${ctr}/td tdtestPrimKey[${ctr}]/td /tr /logic:iterate evaluates to: tr tdk1/td td0/td tdtestPrimKey[]/td /tr tr tdk2/td td1/td tdtestPrimKey[]/td /tr ... where the k1, k2.. are the expected values of key testPrimKey in the HashMap put under mappedTest in the PageContext BUT ${ctr} gets evaluated to different values I'm using struts1.1 and tomcat 5.0.19 so whose wrong? me or the result ??? thanks for enlightenment! Axel --- -- 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] - 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]
validwhen validation question
I'm looking at using validwhen for a complex validation. I've got a value that can either be ignored when another parameter is set or is valid when it's a date. A simple date validation would be something like this: field property=date depends=required,date arg0 key=myForm.date/ varvar-namedatePattern/var-namevar-valuedd-MM-/var-value/ var /field Can a validwhen call another validation? Giving you something like field property=date depends=validwhen arg0 key=myform.date/ var var-nametest/var-name var-value((ignoreDate == yes) or ( #insert date validation# ))/var-value /var /field or should I just write my own validation rule / do it with javascript before I submit? Thanks, Brendan
[OT] Dealer Locator / Zip Code Lookup
All, i'm looking for (hopefully) an open-source product that will allow me to do a 'dealer locator' type of function - one where I enter a zip code and a radius, and I get back a list of 'dealer' within that radius. If there isn't an open-source product (yes, I'm cheap), can anyone recommend a commercial product? Thanks. Jerry Jalenak Development Manager, Web Publishing LabOne, Inc. 10101 Renner Blvd. Lenexa, KS 66219 (913) 577-1496 [EMAIL PROTECTED] This transmission (and any information attached to it) may be confidential and is intended solely for the use of the individual or entity to which it is addressed. If you are not the intended recipient or the person responsible for delivering the transmission to the intended recipient, be advised that you have received this transmission in error and that any use, dissemination, forwarding, printing, or copying of this information is strictly prohibited. If you have received this transmission in error, please immediately notify LabOne at the following email address: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
HowTo logical date validation
Hi all, i´m looking for some kind of 'logical date validation' which means that dates like '2004-02-31' are filtered out and sent back to input page. Has anyone ever done this before (i´m sure you have ;-)) ? Are there any sites dealing with this problem ? thanks for your reply... - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Executing Struts-layout
Hi all, when I execute an Action which forward to a JSP I receive a null pointer exception. in my JSP I have : layout:collection name=SaisiPBForm property=tab id=col1 styleClass=FORM layout:collectionItem title=SIGLE1 property=SIGLE1 width=150/ layout:collectionItem title=SIGLE2 property=SIGLE2 width=150/ /layout:collection tab in an ArrayList witch I got from the Database. can someone help me. thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: indexed property problem
went through the beanutils code to find the reason for the ArrayIndexOutOfBounds. found that it doesn't use my setter method, which would adjust the array size, but just my getter method (which returns an array, which isn't big enough); moving over to lists instead so i suppose my html was correct. the html:text issues are still not working anyway :/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Dynamic Messages
Hey, Can ActionMessages/ActionErrors be created dynamically or do they always need to read from a resource file. I would like a more meaningful message shown when something is added to the DB, like instead of Client successfully added I would like Joe Bloggs details have been added. Can this be done using these classes? Thanks
Re: how to implement such an action?
Geeta: Yes,that's right,thanks. just a little difference here, ActionA can has the formbean of page1.jsp and ActionB cannot(because it cannot be tied with many jsps, and actually it need to be tied with a new success.jsp).So my soltion is put the ActionA in ActionB's request parameter instead of getting it from formbean,like this statement in page1.jsp: META HTTP-EQUIV=refresh CONTENT=30;URL=/../ActionB.do?preurl=/../ActionA.do I have written a custom tag to replace it like this: app:redirect page=/ActionB.do preurl=ActionA.do/ so I just have one question, how to nicely replace the string after preurl= with the hidden var value. how about just like this: html:hidden property=theAction value=ActionA / app:redirect page=/ActionB.do propery=theAction/ Can it work? and how can the tag class recognize the formbean's variable? maybe this is the key point here. Regards, Alex From: Geeta Ramani [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: Re: how to implement such an action? Date: Thu, 18 Mar 2004 08:20:50 -0500 Alex: ok, let me state the problem as i understand it: ActionA -- page1.jsp --ActionB if (success in ActionB) forward to success.jsp else forward to ActionA. Your question is how to get the if failure part working. If my understanding of your problem is wrong, please write back and tell us where I'm wrong. However, if this *is* the problem, here's how you can implement a solution usinghtml:hidden property=theAction value=ActionA / hidden vars: In page1.jsp, use a hidden var: In ActionB.execute, if failure do the following: String theAction = formBean.getTheAction(); ActionForward failureForward = new ActionForward(); failureForward.setName(failure); failureForward.setPath(theAction); log.debug(Redirecting to + failureForward.getName() +: + failureForward.getPath()); return failureForward; Hth, Geeta chiu alex wrote: Maybe there is a solution,which is much like using hidden jsp variable as you said in previous mail. Regards, Alex - 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: html:link /action does not contain handler parameter ...
Oh ya if you didn't realize it already, I am using LookupDispatchAction for my Action. Another question: could the request be getting lost on the way to the server b/c of the frames? I don't think this is the case since the request of the frame the link is in should get sent to the server and this holds the action parameter, so action should be found and the value of it used to determine which method to call. This is the action mapping I am using: action attribute=viewForm input=pages/products/type.jsp name=viewForm parameter=action path=/view scope=request type=xxx.xxx.xxx.struts.action.ViewAction validate=false forward name=productList path=pages/products/productListing.jsp / forward name=type path=pages/products/idx_product.htm / !-- this is a frameset -- /action where the type forward is where: html:link page=%=/view.do?action=View%20Types% target=_top Machines /html:link will eventually take the user and the productList forward is where: html:link page=%=/view.do?action=View%20Products% target=body_content Products /html:link will take the user. [EMAIL PROTECTED] wrote: Hello, I am using frames in my web app not b/c I want to, but b/c I have to. I am using the html:link tag to with a page attribute to go to my action class. I am able to do this successfully from one frameset to another one using the following link in the menu frame of frameset1: html:link page=%=/view.do?action=View%20Types% target=_top Machines /html:link This passes the user onto a new frameset: frameset2. I have another link that is almost identical to the previous one in the menu frame of frameset2 html:link page=%=/view.do?action=View%20Products% target=body_content Products /html:link This link does not work, it gives me the Request[/view] does not contain handler parameter named action error. This is very frustrating. I know that the ViewAction has the hanler for the parameter named action b/c I am able to type the link into the browser address bar and everything behaves correctly. Any ideas as to why this is happening? thanks, c. - 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: Executing Struts-layout
Just take a close look at the stack trace and read it from buttom up, and see where the code fails...Usually it is something like: NullPointerException com.blablah.myAction (myAction:30) which means the nullpointerexception happened at line 30 of myAction or whatever class you are calling.. Khalid Quoting Zakaria khabot [EMAIL PROTECTED]: Hi all, when I execute an Action which forward to a JSP I receive a null pointer exception. in my JSP I have : layout:collection name=SaisiPBForm property=tab id=col1 styleClass=FORM layout:collectionItem title=SIGLE1 property=SIGLE1 width=150/ layout:collectionItem title=SIGLE2 property=SIGLE2 width=150/ /layout:collection tab in an ArrayList witch I got from the Database. can someone help me. thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Khalid K. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
An Action that only call a forward
Hello! I have a Global Forward like this: forward name=portal path=/login.jsp redirect=true/ All that I want is to declare an Action Mapping for that only forward the control to the global forward portal. I've tried this: action path=/portal forward=portal/ But it didn't work. Is there a way? Thanks, JP
RE: Dynamic Messages
Messages from your resource file can have parameters. Resource file: user.added={0} successfully added Action: errors.add(ActionErrors.GLOBAL_ERROR, new ActionError(user.added, bean.name)); messages.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage(user.added, bean.name)); You could have as many parameters as you want. For example: detail.line={0} of {1} was added on {2} -Original Message- From: Ciaran Hanley [mailto:[EMAIL PROTECTED] Sent: Thursday, March 18, 2004 9:14 AM To: Struts User Mailing List Subject: Dynamic Messages Hey, Can ActionMessages/ActionErrors be created dynamically or do they always need to read from a resource file. I would like a more meaningful message shown when something is added to the DB, like instead of Client successfully added I would like Joe Bloggs details have been added. Can this be done using these classes? Thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: An Action that only call a forward
if you look at the struts-example.war it has the same functionality with the /welcome forward. defined like this: forward name=welcome path=/welcome.do/ action path=/welcome type=org.apache.struts.actions.ForwardAction parameter=/pages/Welcome.jsp/ Joao Batistella wrote: Hello! I have a Global Forward like this: forward name=portal path=/login.jsp redirect=true/ All that I want is to declare an Action Mapping for that only forward the control to the global forward portal. I've tried this: action path=/portal forward=portal/ But it didn't work. Is there a way? Thanks, JP - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]