[ANN] Struts Dialogs project joined Struts Applications project
New project homepage: http://struts.sourceforge.net/strutsdialogs/ According to survey http://jmikus.freepolls.com/cgi-bin/polls/001/poll_center.htm , about 60% of Struts developers use form beans for both input and output, that is, as temporary I/O buffer. If I am not mistaken, JSF calls these buffer objects "backing beans". So DialogAction goes with the flow, utilizing form bean for both phases of I/O. Check out the demo of Login Control: http://www.superinterface.com/strutsdialog , the last two links. It uses same action URL for two different pages, and shows a page which corresponds to current control state. A control can be refreshed at any time, and there is no access to stale page, so double submit is impossible (except sucky Opera). Now think that you dropped this control onto JSP page. Whenever you refresh the main page, the control would show current app state. Portlets for poor ;-) The project will be enhanced with concrete types of controls, like improved Login Control, that was shown as a demo. You are encouraged to create your own controls. ASP.NET 2.0 will have a lot of them, now Struts has viable alternative. This is second and the last announcement of Struts Dialogs on this week, so please don't write me that I self-advertise too much ;-) Michael. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [Tiles]
I read the paper http://www.browsermedia.com/devcorner/whitepapers/tiles201.jsp which explains how to add attributes into a tile of a definition then it invokes the page. Unfortunatly all I want to do is replace the page that the layout uses to render the layout, without the calling page having to care about it. Humpf! -Original Message- From: David G. Friedman [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 08, 2005 3:36 PM To: Struts Users Mailing List Subject: RE: [Tiles] Ray, If Xinsheng [mike] Huang's suggestion about using the JSP ($) dollar sign notation doesn't work, I'd suggest looking at giving your template a tiles controller so you can set the navi attribute to some object and scope. That way the controller can specify the insert automatically before the tile is rendered and without having to put code into every action, just that one tile's controller class. Regards, David -Original Message- From: Ray Madigan [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 08, 2005 5:18 PM To: Struts Users Mailing List Subject: RE: [Tiles] I have a fairly simple situation where a set of pages are used throughout the application. Based on a set of crriteria known about the user, I want the page to use a set of common tiles to fill some parts of the page, like the header of the page. Other parts of the page are filled with specific tiles relative to what the page is attempting to show. Instead of each of the pages that use the layout setting the attribute, I thought if it was computed in the layout, I would save some management of these entries. -Original Message- From: David G. Friedman [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 08, 2005 1:58 PM To: Struts Users Mailing List Subject: RE: [Tiles] Ray, What architectural problems prevent you from either using a TilesAction, instead of a regular action, or a tiles controller to look those things up and set them for you so the page doesn't need to be 'that smart?' Regards, David -Original Message- From: Ray Madigan [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 08, 2005 5:01 PM To: Struts Users Mailing List Subject: [Tiles] I have beat this situation to death without coming up with an answer. I want to create a tile layout that includes a composed tile in the layout definition. Any suggestions would be appreciated It needs to look like ** OR ** ** **
Re: ActionForm::reset method
hi, if u want to prepopulate the form from form then the proper place is constructor but remember 2nd time u wouldn't get the form populated as to resuse the form actionservelet call the reset method befor resuing any existing form. so u can place same code into the reset method. the best way is populating the form from configuration i mean from struts config form configuration. Another way could be populating it from action class. On 6/8/05, Janek Ziniewicz <[EMAIL PROTECTED]> wrote: > So where is the proper place to prepopulate fields? [I know I am a noob] > > On 6/8/05, Hubert Rabago <[EMAIL PROTECTED]> wrote: > > Yes. Is this causing a problem for you? Please note that reset() is > > not where you should be prepopulating fields. As it says in the > > javadoc: > > > > "In practice, the only properties that need to be reset are those > > which represent checkboxes on a session-scoped form." > > > > ... and ... > > > > "You mainly need to worry about setting checkbox values to false; most > > of the time you can leave this method unimplemented." > > > > Hubert > > > > > > On 6/8/05, Janek Ziniewicz <[EMAIL PROTECTED]> wrote: > > > My app contains a few forms. Each form has one ActionForm and one > > > Action class associated. Each time page with form is displayed I see > > > that ActionForm::reset method is displayed. After submitting I can see > > > that reset method is launched again, and right after that > > > ActionForm::execute. > > > > > > Is it proper behaviour? > > > > > > -- > > > Pozdrawiam, > > > Janek Ziniewicz > > > gg: 902858 > > > irc.freenode.net: #gore, #dub > > > > > > - > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > > -- > Pozdrawiam, > Janek Ziniewicz > gg: 902858 > irc.freenode.net: #gore, #dub > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- -- Rokibul Islam Khan Software Developer - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn Q
have been trying to configure my NetBeans 4.1 to use subversion (SVN) i've downloaded the svn module (beta) but can't seem to figure out how to configure it. the website (http://www.apache.org/dev/version-control.html) does not _seem_ to give how to annonymously check out data. if anybody is using this combination of software (NB41/SVN) please help riyaz - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Shale] Validation Server-Side
On 6/7/05, Mariano Petrakovsky <[EMAIL PROTECTED]> wrote: > If use the tag like this > > message="#{messages['lcrArsNplNode.nplNumberNotMatch']}" > server="true" client="true" /> > > I need implement the server side validation ? or this is inside de shale? > It is done for you (by JSF, actually ... from the JSF perspective this is just another validator). Craig > Thanxs > > -- > Mariano G. Petrakovsky > Programmer · Software Factory > AXG Tecnonexo - www.tecnonexo.com > > Development facilities:Av. Maipú 1252 8º (C1006ACT) · Buenos Aires · > Argentina. > Tel.: (54-11) 4878-0005 - Fax: (54-11) 4878-0065. > > Headquarters: 1604 Spring Hill Road, Suite 160 Vienna · VA 22182 · USA. > Tel.: (202) 986-7541 - Fax: (202) 787-3891. > > > · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · > · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · > · · · · > > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts 1.2.7 JAR files different from Commons JAR files
--- Leandro_Dorileo/[EMAIL PROTECTED] wrote: > I think (not sure) their versions are different. Take a look at the > dependencies section in the struts release page[1] and see if they > are the > same ;-) > > 1- http://struts.apache.org/userGuide/release-notes.html > > > Dorileo thanks! i realized my oversight after posting and while driving home. :) most likely, i was probably comparing different versions. anyhow, i am still going ahead with my plan to have the latest 'commons' JAR files. so i will overwrite any existing Struts commons JARs with the most current versions from the Jakarta Commons project. i hope there will be no breakages in doing so. -_- regards, woodchuck __ Discover Yahoo! Use Yahoo! to plan a weekend, have fun online and more. Check it out! http://discover.yahoo.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Tiles]
Ray: Did you check out this article by Chuck Cavaness? http://www.oreilly.com/catalog/jakarta/chapter/ch14.html Martin- - Original Message - From: "Ray Madigan" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" Sent: Wednesday, June 08, 2005 8:59 PM Subject: RE: [Tiles] I guess I'm not sure about Mike's suggestion. He wrote: use the "navi" is defined in tiles definition file like "header" does. Is this in the layout file? maybe im mixing up which file is which. I have a layout definition that includes the code in my original post. It is called from a jsp that inserts it along with some attributes. I want everything about this attribute to be dealt with in the layout file. I do not have a definition for this tile in the struts-config file. I don't understand what a tiles controller is. I read the javadoc on it and TileAction and can't figure how to implement it or how it can help. I copy the attribute (it this case Foo), which is in sessionScope into the layout tile. can see it, but I cannot get anything to work in the layout jsp itself. I think this is what Mike was saying. Is there any web literature on what a tile controller is, how it works, and how you implement one? Thanks -Original Message- From: David G. Friedman [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 08, 2005 3:36 PM To: Struts Users Mailing List Subject: RE: [Tiles] Ray, If Xinsheng [mike] Huang's suggestion about using the JSP ($) dollar sign notation doesn't work, I'd suggest looking at giving your template a tiles controller so you can set the navi attribute to some object and scope. That way the controller can specify the insert automatically before the tile is rendered and without having to put code into every action, just that one tile's controller class. Regards, David -Original Message- From: Ray Madigan [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 08, 2005 5:18 PM To: Struts Users Mailing List Subject: RE: [Tiles] I have a fairly simple situation where a set of pages are used throughout the application. Based on a set of crriteria known about the user, I want the page to use a set of common tiles to fill some parts of the page, like the header of the page. Other parts of the page are filled with specific tiles relative to what the page is attempting to show. Instead of each of the pages that use the layout setting the attribute, I thought if it was computed in the layout, I would save some management of these entries. -Original Message- From: David G. Friedman [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 08, 2005 1:58 PM To: Struts Users Mailing List Subject: RE: [Tiles] Ray, What architectural problems prevent you from either using a TilesAction, instead of a regular action, or a tiles controller to look those things up and set them for you so the page doesn't need to be 'that smart?' Regards, David -Original Message- From: Ray Madigan [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 08, 2005 5:01 PM To: Struts Users Mailing List Subject: [Tiles] I have beat this situation to death without coming up with an answer. I want to create a tile layout that includes a composed tile in the layout definition. Any suggestions would be appreciated It needs to look like ** OR ** ** **
RE: [Tiles]
I guess I'm not sure about Mike's suggestion. He wrote: use the "navi" is defined in tiles definition file like "header" does. Is this in the layout file? maybe im mixing up which file is which. I have a layout definition that includes the code in my original post. It is called from a jsp that inserts it along with some attributes. I want everything about this attribute to be dealt with in the layout file. I do not have a definition for this tile in the struts-config file. I don't understand what a tiles controller is. I read the javadoc on it and TileAction and can't figure how to implement it or how it can help. I copy the attribute (it this case Foo), which is in sessionScope into the layout tile. can see it, but I cannot get anything to work in the layout jsp itself. I think this is what Mike was saying. Is there any web literature on what a tile controller is, how it works, and how you implement one? Thanks -Original Message- From: David G. Friedman [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 08, 2005 3:36 PM To: Struts Users Mailing List Subject: RE: [Tiles] Ray, If Xinsheng [mike] Huang's suggestion about using the JSP ($) dollar sign notation doesn't work, I'd suggest looking at giving your template a tiles controller so you can set the navi attribute to some object and scope. That way the controller can specify the insert automatically before the tile is rendered and without having to put code into every action, just that one tile's controller class. Regards, David -Original Message- From: Ray Madigan [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 08, 2005 5:18 PM To: Struts Users Mailing List Subject: RE: [Tiles] I have a fairly simple situation where a set of pages are used throughout the application. Based on a set of crriteria known about the user, I want the page to use a set of common tiles to fill some parts of the page, like the header of the page. Other parts of the page are filled with specific tiles relative to what the page is attempting to show. Instead of each of the pages that use the layout setting the attribute, I thought if it was computed in the layout, I would save some management of these entries. -Original Message- From: David G. Friedman [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 08, 2005 1:58 PM To: Struts Users Mailing List Subject: RE: [Tiles] Ray, What architectural problems prevent you from either using a TilesAction, instead of a regular action, or a tiles controller to look those things up and set them for you so the page doesn't need to be 'that smart?' Regards, David -Original Message- From: Ray Madigan [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 08, 2005 5:01 PM To: Struts Users Mailing List Subject: [Tiles] I have beat this situation to death without coming up with an answer. I want to create a tile layout that includes a composed tile in the layout definition. Any suggestions would be appreciated It needs to look like ** OR ** ** **
Re: [ANNOUNCEMENT] Struts Dialogs: DispatchAction on steroids
> I don't understand how you managed to get the page with validate-error > not to make an entry in the browser history. I see you've turned off > automatic validation but closer than that I'm not sure. It seems to be > linked to the no-cache stuff but I didn't think the caching had anything > to do with the browser history. Pretty neat, huh? ;-) Does not look this slick on sucky Opera. I turned validation off, so that action class is called even if input data is not valid. Action must always be called, it does the processing, it is a switchyard between GET and POST, it creates and stores error and clears error messages, and it dispatches the request. No-cache helps to reload a page. You can see in the sample app, that without no-cache setting you need to manually reload a page to see current server standing. So, the page must be always reloaded to keep browser in sync with the server. How exactly the history is kept from growing, is explained further (almost quoting my own article, hence more formal style): DialogAction uses a couple of tricks: First is to serve different content from the same location. And by saying "same" I mean exactly the same, including the number, names, and content of request query parameters. Internet Explorer and Mozilla/Firefox build session history based on resource location. They do not include resources from the same location into the history. For example, Login Control has two pages, "Not Logged In" and "Logged In", each reflecting the web control state. Both pages are served from the same location, which is the action URL. No additional parameters are passed to action to trick the browser into thinking that it is the same page. Another trick is redirection: according to HTTP specs, when a browser is redirected from a POST request, the resource identified by original POST request must not be stored in the session history. Some browsers like Internet Explorer go further and do not cache response for original request even if the request has the GET type. This is how initialization works, it uses GET with init parameter, and then redirects to "clean" action location with no parameter, so browser would not store URL with parameter in the history. Hmm, that seems to work on Firefox too... I should re-read the specs ;) Working together, these tricks result in a neat effect: a browser thinks that it _keeps reloading the same page_. Thus, the browser prevents a user from going back to see the stale data or to resubmit the stale form. If this approach does not work with a particular browser, and the browser accumulates every page in its history, then the application falls back to the Redirect-After-Post pattern. The DialogAction was tested on Windows 2000 with Internet Explorer, Netscape Navigator, Opera, and Firefox (make sure that you use the official release of Firefox, which fixes the bug with no-store cache-control header). Opera is the bad boy, it tries to cache everything. It interprets the HTTP standard differently from Internet Explorer and Firefox, and does not reload a page when a user navigates back, even if page is marked as "no-store". Thus, it is possible to resubmit a stale form from Opera. Sucky, sucky Opera. For the record: I did not invent anything here. I mean, I did, I reinvented the wheel, because after I came up with these tricks, I googled specifically for this kind of stuff, and found several sites, which use these tricks too. Still, it is not commonplace. Michael. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [ANNOUNCEMENT] Struts Dialogs: DispatchAction on steroids
Well I've read it now ;) I see you've based the Action around the Post-Redirect-Get pattern. I use it all the time. It's good. I don't understand how you managed to get the page with validate-error not to make an entry in the browser history. I see you've turned off automatic validation but closer than that I'm not sure. It seems to be linked to the no-cache stuff but I didn't think the caching had anything to do with the browser history. Adam On 08/06/05 15:54 Michael Jouravlev wrote: Adam, did you manage to read the full description DialogAction? ;-) I know, I know, that the first paragraph is very generic, but that is what the action does. Can you suggest some better wording? I would appreciate if you tried the examples, especially the one called Login Control. I guess I should hide SelectAction in the shadows, because the real deal is the DialogAction. On the other hand, I don't think that it makes sense to create a whole project out of one action. I will submit it as a patch in Bugzilla, and will hope that Struts committers find this class worth including in main Struts library. Because that is what I actually want, to share the joy ;-) Michael. On 6/8/05, Adam Hardy <[EMAIL PROTECTED]> wrote: Michael, I too like Jack concentrated on SelectAction, purely because it was first in the text. Looking at your description of DialogAction, I read the first paragraph about DialogAction and didn't feel it was worth reading further - having read about SelectAction (on the basis of your name) I then read that desc of DialogAction and came across some amazingly non-descriptive stuff like "accepting input data, dispatching submit event to a > > method, generating error messages and rendering a view" (hmm, sounds like my hello world servlet) And then I stopped reading :O From looking further at the description, it does look interesting, but hey, this is the internet - 4 seconds and I'm gone! ;) On 08/06/05 07:08 Michael Jouravlev wrote: You do understand that SelectAction is actually just a helper, and the real story is DialogAction, do you? Have you seen the Login Control example? On 6/7/05, Dakota Jack <[EMAIL PROTECTED]> wrote: SelectAction is really old news and is what all the apps that use multiple select image buttons do only with a lot less bloating of the code See http://www.michaelmcgrady.com/button/ On 6/7/05, Michael Jouravlev <[EMAIL PROTECTED]> wrote: Struts Dialogs is an extension of Struts actions that provides an improved user experience along with event-based programming model. Struts Dialogs currently consists of two action classes: SelectAction and DialogAction. SelectAction SelectAction is an abstract Action that dispatches an HTTP form submission event to a handler method. The purpose of this class is processing submission of HTML forms. Unlike DispatchAction and LookupDispatchAction, which correlate value attribute of submit form element with handler method, SelectAction uses name attribute. This allows to display a user-friendly caption on a submit button. Also, it is possible to change button caption without rebuilding the application. DialogAction DialogAction is an abstract Action that provides basic dialog functions, like accepting input data, dispatching submit event to a method, generating error messages and rendering a view. DialogAction allows to create robust user inteface and provides simple event-based programming model. DialogAction incorporates several innovative design decisions not previously used in Struts. Some of them are already implemented in other frameworks, like Ruby on Rails or JSF. Other features are unique to DialogAction. The cornerstone concept of DialogAction is separation of input and output processes. This solves several issues, related to HTML form input, like double submit problem, annoying POSTDATA messages, bad usability when Reload, Back and Forward buttons are used. DialogAction defines three different modes of operation: * action initialization prepares action for use with new set of data; * user input process accepts input data, updates domain model, generates error messages; * view rendering process generates a result page. Separation of input and output improves usability and user experience: * Any page can be reloaded without resending input information to the server. * As a consequence, an application does not have to cope with double submits. * Another consequence is that a user does not see "Do you want to resend POSTDATA?" message. * Using Back and Forward buttons is safe, because only result pages are browsed. - Documents, files, samples - Online samples: http://www.superinterface.com/strutsdialog Documentataion: http://wiki.java.net/bin/view/Projects/StrutsDialogs If you cannot see pictures on SelectAction and DialogAction pages, you might need to register and login to java.net. Bu
RE: [Tiles]
Ray, If Xinsheng [mike] Huang's suggestion about using the JSP ($) dollar sign notation doesn't work, I'd suggest looking at giving your template a tiles controller so you can set the navi attribute to some object and scope. That way the controller can specify the insert automatically before the tile is rendered and without having to put code into every action, just that one tile's controller class. Regards, David -Original Message- From: Ray Madigan [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 08, 2005 5:18 PM To: Struts Users Mailing List Subject: RE: [Tiles] I have a fairly simple situation where a set of pages are used throughout the application. Based on a set of crriteria known about the user, I want the page to use a set of common tiles to fill some parts of the page, like the header of the page. Other parts of the page are filled with specific tiles relative to what the page is attempting to show. Instead of each of the pages that use the layout setting the attribute, I thought if it was computed in the layout, I would save some management of these entries. -Original Message- From: David G. Friedman [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 08, 2005 1:58 PM To: Struts Users Mailing List Subject: RE: [Tiles] Ray, What architectural problems prevent you from either using a TilesAction, instead of a regular action, or a tiles controller to look those things up and set them for you so the page doesn't need to be 'that smart?' Regards, David -Original Message- From: Ray Madigan [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 08, 2005 5:01 PM To: Struts Users Mailing List Subject: [Tiles] I have beat this situation to death without coming up with an answer. I want to create a tile layout that includes a composed tile in the layout definition. Any suggestions would be appreciated It needs to look like ** OR ** ** **
Re: Struts 1.2.7 JAR files different from Commons JAR files
> i noticed that the Struts 1.2.7 distribution includes many JAR files > with the same name as the Jakarta Commons project JAR files. > however, i discovered that there are real differences between them. > for example, there are a lot more classes in the Struts > commons-fileupload.jar than in the Commons' commons-fileupload.jar I think (not sure) their versions are different. Take a look at the dependencies section in the struts release page[1] and see if they are the same ;-) 1- http://struts.apache.org/userGuide/release-notes.html Dorileo
RE: [Tiles]
I have a fairly simple situation where a set of pages are used throughout the application. Based on a set of crriteria known about the user, I want the page to use a set of common tiles to fill some parts of the page, like the header of the page. Other parts of the page are filled with specific tiles relative to what the page is attempting to show. Instead of each of the pages that use the layout setting the attribute, I thought if it was computed in the layout, I would save some management of these entries. -Original Message- From: David G. Friedman [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 08, 2005 1:58 PM To: Struts Users Mailing List Subject: RE: [Tiles] Ray, What architectural problems prevent you from either using a TilesAction, instead of a regular action, or a tiles controller to look those things up and set them for you so the page doesn't need to be 'that smart?' Regards, David -Original Message- From: Ray Madigan [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 08, 2005 5:01 PM To: Struts Users Mailing List Subject: [Tiles] I have beat this situation to death without coming up with an answer. I want to create a tile layout that includes a composed tile in the layout definition. Any suggestions would be appreciated It needs to look like ** OR ** ** **
Struts 1.2.7 JAR files different from Commons JAR files
hihi all, i noticed that the Struts 1.2.7 distribution includes many JAR files with the same name as the Jakarta Commons project JAR files. however, i discovered that there are real differences between them. for example, there are a lot more classes in the Struts commons-fileupload.jar than in the Commons' commons-fileupload.jar prior to this, i was under the impression that JAR files with the 'commons' prefix was handled/controlled by the Jakarta Commons project. however, now that i discovered Struts has it's own special versions of these 'commons' JAR files, does this mean i am stuck with these versions? (ie. should not update them with Jakarta Commons ones) the reason this is important is because i'm in the process of migrating from TC 4.1.24 to TC 5.5.9 and in this process it would be nice to have the latest and greatest version of everything. i am planning to use the Tomcat/shared/lib to centralize all the JAR files (ie. one copy of each for entire servlet container instead of having a copy in each webapp/WEB-INF/lib) for all my web applications, and as such i got the latest 'commons' jars from the Jakarta Commons project like beanutils, digester, collections, etc. but now that i got the latest Struts version it has thrown a monkey wrench into this plan and i'm confused as to what is going on wrt these 'commons' JAR files i would greatly appreciate any advice on this matter! please and thanks in advance, woodchuck __ Discover Yahoo! Get on-the-go sports scores, stock quotes, news and more. Check it out! http://discover.yahoo.com/mobile.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Test whether an application resource is empty
I'm still spinning my wheels on this -- does anyone have any ideas? Quick synopsis: I have localized i18n messages defined in my tiles definitions which are sometimes empty. I need to test that the value associated with a given key is not empty before I proceed with further processing. I can test that the key is non-empty, but I haven't yet figured out how to test the same thing for the value. If anyone could help, I'd really appreciate it. Thanks! Chris -Original Message- From: Chris Loschen Sent: Wednesday, June 08, 2005 1:12 PM To: Struts Users Mailing List Subject: Test whether an application resource is empty Hi all, I'm using struts 1.1. I have localized application resources keys defined in my tiles definition file. In my JSP, I use the tiles attribute and then display the localized message using the key. However, in some cases, the localized value is empty: there is no value for that particular locale or that particular instance. In those cases, I want to avoid writing out the key at all, but I'm having trouble figuring out how to make that test. Specifically, I have tiles defs like this: Etc. And the localized values are something like tiles.main.admin.manageHierarchy.businessStruc.add.directionToUser= (so no value for that key). In my JSP, I've tried several ways to test whether the key value is null or the length is 0, but none of them have worked yet. For example: <% if(directionToUser != null && directionToUser.length()>0){ %> <% }%> Problem here is that directionToUser is the key, not the value, so it's never null, and I get the empty div tags I'm trying to avoid. So I tried variations like this: That one returned "Define tag can contain only one of name attribute, value attribute, or body content". I've tried lots of variations similar to that, but haven't struck upon the right one yet. This SEEMS like something which should be pretty simple, but I'm missing something. Any suggestions? Thanks! Chris Loschen ___ Siebel IT'S ALL ABOUT THE CUSTOMER Visit www.siebel.com This e-mail message is for the sole use of the intended recipient(s) and contains confidential and/or privileged information belonging to Siebel Systems, Inc. or its customers or partners. Any unauthorized review, use, copying, disclosure or distribution of this message is strictly prohibited. If you are not an intended recipient of this message, please contact the sender by reply e-mail and destroy all soft and hard copies of the message and any attachments. Thank you for your cooperation. ___ Siebel IT'S ALL ABOUT THE CUSTOMER Visit www.siebel.com This e-mail message is for the sole use of the intended recipient(s) and contains confidential and/or privileged information belonging to Siebel Systems, Inc. or its customers or partners. Any unauthorized review, use, copying, disclosure or distribution of this message is strictly prohibited. If you are not an intended recipient of this message, please contact the sender by reply e-mail and destroy all soft and hard copies of the message and any attachments. Thank you for your cooperation. ___ Siebel IT'S ALL ABOUT THE CUSTOMER Visit www.siebel.com This e-mail message is for the sole use of the intended recipient(s) and contains confidential and/or privileged information belonging to Siebel Systems, Inc. or its customers or partners. Any unauthorized review, use, copying, disclosure or distribution of this message is strictly prohibited. If you are not an intended recipient of this message, please contact the sender by reply e-mail and destroy all soft and hard copies of the message and any attachments. Thank you for your cooperation. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [Tiles]
header is defined in the page that implements the layout. I don't every page to add the line to compute this attribute if I don't have to. Thanks -Original Message- From: Xinsheng [mike] Huang [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 08, 2005 1:57 PM To: Struts Users Mailing List Subject: Re: [Tiles] use the "navi" is defined in tiles definition file like "header" does. Ray Madigan <[EMAIL PROTECTED]> wrote:I have beat this situation to death without coming up with an answer. I want to create a tile layout that includes a composed tile in the layout definition. Any suggestions would be appreciated It needs to look like ** OR ** outputs the correct page --> ** ** Xinsheng [Mike] Huang SCJP -- Sun Certified Programmer for Java 2 Platform SCJD -- Sun Certified Developer for Java 2 Platform SCEA -- Sun Certified Enterprise Architect for J2EE 410-790-7462(C) __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [Tiles]
Ray, What architectural problems prevent you from either using a TilesAction, instead of a regular action, or a tiles controller to look those things up and set them for you so the page doesn't need to be 'that smart?' Regards, David -Original Message- From: Ray Madigan [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 08, 2005 5:01 PM To: Struts Users Mailing List Subject: [Tiles] I have beat this situation to death without coming up with an answer. I want to create a tile layout that includes a composed tile in the layout definition. Any suggestions would be appreciated It needs to look like ** OR ** ** **
Re: [Tiles]
use the "navi" is defined in tiles definition file like "header" does. Ray Madigan <[EMAIL PROTECTED]> wrote:I have beat this situation to death without coming up with an answer. I want to create a tile layout that includes a composed tile in the layout definition. Any suggestions would be appreciated It needs to look like ** OR ** outputs the correct page --> ** ** Xinsheng [Mike] Huang SCJP -- Sun Certified Programmer for Java 2 Platform SCJD -- Sun Certified Developer for Java 2 Platform SCEA -- Sun Certified Enterprise Architect for J2EE 410-790-7462(C) __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
[Tiles]
I have beat this situation to death without coming up with an answer. I want to create a tile layout that includes a composed tile in the layout definition. Any suggestions would be appreciated It needs to look like ** OR ** ** **
RE: Please reply to the mailing list, not to the person
Execuse me Wendy if you are she and not he, I've never known anyone called Wendy (Internet troubles);-( Dorileo "David G. Friedman" <[EMAIL PROTECTED]> 08/06/2005 14:19 Favor responder a "Struts Users Mailing List" Para "Struts Users Mailing List" cc Assunto RE: Please reply to the mailing list, not to the person Wendy is my sister's name. If you're expecting her to be a he and not a she, think again. :) -David, a man with a SISTER named Wendy. LOL -Original Message- From: Abdullah Jibaly [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 08, 2005 2:16 PM To: Struts Users Mailing List Subject: RE: Please reply to the mailing list, not to the person I'm pretty sure it's Mrs/Ms Smoak since Wendy is usually a female name (please correct me if I'm wrong Wendy) :) -Abdullah -Original Message- From: Leandro_Dorileo/[EMAIL PROTECTED] [mailto:Leandro_Dorileo/[EMAIL PROTECTED] Sent: Wednesday, June 08, 2005 12:57 PM To: user@struts.apache.org Subject: Re: Please reply to the mailing list, not to the person Agreed to everything, but perhaps we can think more about what Mr. Smoak said "get more personal replies", personal replies are good because you can see in your mailbox that there is a reply especially to you and that would be good you read that (it's only my opinion and I even do that), but we could think of centralize the questions and answers in the list, then with this in your mind you'll always send the mails to the list. This could be a convention "I'll always send my mails to the list, cause if I do send it privately I can forget to also send it to the list" ;-) Dorileo - 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]
user@struts.apache.org
> If use the tag like this > > message="#{messages['lcrArsNplNode.nplNumberNotMatch']}" > server="true" client="true" /> > > I need implement the server side validation ? or this is inside de shale? All validations can be used on the server side too (if you have all required jar files). __ Verschicken Sie romantische, coole und witzige Bilder per SMS! Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Nested properties in DynaActionForm
But I set up iterationLength as a HashMap; I thought BeanUtils could handle maps, so it'd do getIterationLength.get("time"). Perhaps I'm mixing up BeanUtils and JSTL semantics. L. Hubert Rabago wrote: Nested properties with DynaActionForms actually require you to nest objects. :) Using a property name like "iterationLength.time" would be like saying "getIterationLength().getTime()", and this is what BeanUtils would try to do. Hubert On 6/7/05, Laurie Harper <[EMAIL PROTECTED]> wrote: I'm probably missing something really obvious but I've been fiddling about with this for a while now. Maybe someone can spot what I'm doing wrong... I'm using DynaActionForms in my Struts app and I'd like to be able to reference a property like this: I tried a form declaration like this: but I get an error during request processing that 'iterationLength' is not a valid property. So then I tried: Struts appears to be trying to cope with this: DEBUG [http8080-Processor24] org.apache.commons.beanutils.BeanUtils - setProperty(DynaActionForm[dynaClass=ProjectEdit,startDate=,owner=,mode=,description=,iterationLength={},endDate=,status=,name=,doSave=], iterationLength.time, [1]) DEBUG [http8080-Processor24] org.apache.commons.beanutils.BeanUtils - Target bean = {} DEBUG [http8080-Processor24] org.apache.commons.beanutils.BeanUtils - Target name = time So it's getting the empty map as the target bean on which to set a property 'time'. But when I fetch the map from the form in my action, it's empty. Is there a way to do this? The reason I want to be able to write the property as "iterationLength.time", rather than collapsing it to 'iterationLengthTime' or something is for consistency with when I'm accesing the same property in other beans which aren't dynamically generated. Thanks, L. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] Re: Please reply to the mailing list, not to the person
On 6/8/05, Wendy Smoak <[EMAIL PROTECTED]> wrote: > > How about... top posting and NOT trimming the previous post? ;) > I'm not sure I've encountered an email app where top posting was not the default. It'll probably be hard to convert entire populations to put their replies at the bottom if the app they're using keeps insisting they put their replies at the top. Personally, I hate it when I open a reply message and don't see anything the sender wrote, only to realize later I had to hit PgDn five times (all the while carefully guarding the end of the lines that begin with ">") to start reading the actual reply of the sender. :) Hubert - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to get posted data into a nested object ?
Hubert Rabago <[EMAIL PROTECTED]> wrote on 08/06/2005 02:15:20 PM: > I would think so. I'm not as familiar with the internals of BeanUtils > as I'd like to be, but since your form is in request scope, that means > it'll create a new instance upon submission. From that, it'll call > getDependent(). If that returns null, I'm not sure what BeanUtils > would do. I'd bet it'd just throw an error, and if I had time I'd > like to see if I can win that bet. This is exactly what I have coded... public DependentVO getDependent() { if (dependent == null) { dependent = new DependentVO(); } return dependent; } It works like a charm... gotta run a demo in 8 minutes... Damn I hate those close deadlines ! - Glenn
Re: Please reply to the mailing list, not to the person
David G. Friedman wrote: Wendy is my sister's name. If you're expecting her to be a he and not a she, think again. :) I thought something was strange about him. Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Please reply to the mailing list, not to the person
Wendy is my sister's name. If you're expecting her to be a he and not a she, think again. :) -David, a man with a SISTER named Wendy. LOL -Original Message- From: Abdullah Jibaly [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 08, 2005 2:16 PM To: Struts Users Mailing List Subject: RE: Please reply to the mailing list, not to the person I'm pretty sure it's Mrs/Ms Smoak since Wendy is usually a female name (please correct me if I'm wrong Wendy) :) -Abdullah -Original Message- From: Leandro_Dorileo/[EMAIL PROTECTED] [mailto:Leandro_Dorileo/[EMAIL PROTECTED] Sent: Wednesday, June 08, 2005 12:57 PM To: user@struts.apache.org Subject: Re: Please reply to the mailing list, not to the person Agreed to everything, but perhaps we can think more about what Mr. Smoak said "get more personal replies", personal replies are good because you can see in your mailbox that there is a reply especially to you and that would be good you read that (it's only my opinion and I even do that), but we could think of centralize the questions and answers in the list, then with this in your mind you'll always send the mails to the list. This could be a convention "I'll always send my mails to the list, cause if I do send it privately I can forget to also send it to the list" ;-) Dorileo - 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: Please reply to the mailing list, not to the person
I'm pretty sure it's Mrs/Ms Smoak since Wendy is usually a female name (please correct me if I'm wrong Wendy) :) -Abdullah -Original Message- From: Leandro_Dorileo/[EMAIL PROTECTED] [mailto:Leandro_Dorileo/[EMAIL PROTECTED] Sent: Wednesday, June 08, 2005 12:57 PM To: user@struts.apache.org Subject: Re: Please reply to the mailing list, not to the person Agreed to everything, but perhaps we can think more about what Mr. Smoak said "get more personal replies", personal replies are good because you can see in your mailbox that there is a reply especially to you and that would be good you read that (it's only my opinion and I even do that), but we could think of centralize the questions and answers in the list, then with this in your mind you'll always send the mails to the list. This could be a convention "I'll always send my mails to the list, cause if I do send it privately I can forget to also send it to the list" ;-) Dorileo - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to get posted data into a nested object ?
I would think so. I'm not as familiar with the internals of BeanUtils as I'd like to be, but since your form is in request scope, that means it'll create a new instance upon submission. From that, it'll call getDependent(). If that returns null, I'm not sure what BeanUtils would do. I'd bet it'd just throw an error, and if I had time I'd like to see if I can win that bet. Hubert On 6/8/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Is this the only way to do it ? > I have always never coded anything additional in the getter/setter > methods. > > - Glenn > > > > > Hubert Rabago <[EMAIL PROTECTED]> > 07/06/2005 05:42 PM > Please respond to > "Struts Users Mailing List" > > > To > Struts Users Mailing List > cc > > Subject > Re: How to get posted data into a nested object ? > > > > > > > It's not clear within your error at which point the error is > occurring. The problem could be that when BeanUtils tries to populate > the firstName field of the dependent bean, dependent is null. Maybe > you need to modify your form so that getDependent() always returns a > valid DependentVO object, instantiating one as needed. > > Hubert - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Please reply to the mailing list, not to the person
Agreed to everything, but perhaps we can think more about what Mr. Smoak said "get more personal replies", personal replies are good because you can see in your mailbox that there is a reply especially to you and that would be good you read that (it's only my opinion and I even do that), but we could think of centralize the questions and answers in the list, then with this in your mind you'll always send the mails to the list. This could be a convention "I'll always send my mails to the list, cause if I do send it privately I can forget to also send it to the list" ;-) Dorileo
Re: [OT] Re: Please reply to the mailing list, not to the person
hehe, i see your point. but i'm generally neutral on the top posting issue. it's nice because everything can be found in one post, esp. if you haven't been following and just jumped in to the latest post. but if you have been following the thread, then it's unnecessary. some threads take on a life of their own and spawn tangents at different places and times -- branching like crazy. *those* ones are fun to follow. someone frantically snuffing out fires at the tips of each growing branch ;) woodchuck --- Wendy Smoak <[EMAIL PROTECTED]> wrote: > woodchuck wrote: > > > while we're on the subject of mailing list rules/etiquette/pet > peeves: > > How about... top posting and NOT trimming the previous post? ;) > __ Discover Yahoo! Find restaurants, movies, travel and more fun for the weekend. Check it out! http://discover.yahoo.com/weekend.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Test whether an application resource is empty
Hi all, I'm using struts 1.1. I have localized application resources keys defined in my tiles definition file. In my JSP, I use the tiles attribute and then display the localized message using the key. However, in some cases, the localized value is empty: there is no value for that particular locale or that particular instance. In those cases, I want to avoid writing out the key at all, but I'm having trouble figuring out how to make that test. Specifically, I have tiles defs like this: Etc. And the localized values are something like tiles.main.admin.manageHierarchy.businessStruc.add.directionToUser= (so no value for that key). In my JSP, I've tried several ways to test whether the key value is null or the length is 0, but none of them have worked yet. For example: <% if(directionToUser != null && directionToUser.length()>0){ %> <% }%> Problem here is that directionToUser is the key, not the value, so it's never null, and I get the empty div tags I'm trying to avoid. So I tried variations like this: That one returned "Define tag can contain only one of name attribute, value attribute, or body content". I've tried lots of variations similar to that, but haven't struck upon the right one yet. This SEEMS like something which should be pretty simple, but I'm missing something. Any suggestions? Thanks! Chris Loschen ___ Siebel IT'S ALL ABOUT THE CUSTOMER Visit www.siebel.com This e-mail message is for the sole use of the intended recipient(s) and contains confidential and/or privileged information belonging to Siebel Systems, Inc. or its customers or partners. Any unauthorized review, use, copying, disclosure or distribution of this message is strictly prohibited. If you are not an intended recipient of this message, please contact the sender by reply e-mail and destroy all soft and hard copies of the message and any attachments. Thank you for your cooperation.
RE: access session object
According to their front page, tomcat 5.5.9 supporst the 2.4 servlet spec and the 2.0 JSP spec. http://jakarta.apache.org/tomcat/ See the little chart halfway down the first page. -David -Original Message- From: Tony Smith [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 08, 2005 1:03 PM To: Struts Users Mailing List; atta-ur rehman Subject: Re: access session object Thanks you the post. I need to access fields in the object stored in sessioin. I was thinking about using the . Any way, does tomcat 5.0 supports 2.4 servlet specs? --- atta-ur rehman <[EMAIL PROTECTED]> wrote: > if you're running servlet container that supports > 2.4 servlet specs > and you web app is also configured to be of version > 2.4, thru > element in your xml: > > ${myobject} > > in your JSP should print it. in scriptlets: > > <%=session.getAttribute("myobject")%> > > should work. > > "session" is reference to current session is > available for all the JSPs. > > > HTH. > > ATTA > P.S By the way, and no offence please, this isn't a > Struts question as > much as a JSP question. > > On 6/7/05, Tony Smith <[EMAIL PROTECTED]> wrote: > > Hi: > > > > In my Action class, I stored a object in session > with > > > > HttpSession session = request.getSession(); > > session.setAttribute("myobject", object); > > > > How can I access this object from jsp? > > > > Thanks, > > > > > > > > > > __ > > Yahoo! Mail > > Stay connected, organized, and protected. Take the > tour: > > http://tour.mail.yahoo.com/mailtour.html > > > > > > > - > > To unsubscribe, e-mail: > [EMAIL PROTECTED] > > For additional commands, e-mail: > [EMAIL PROTECTED] > > > > > > - > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > > __ Discover Yahoo! Find restaurants, movies, travel and more fun for the weekend. Check it out! http://discover.yahoo.com/weekend.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: access session object
Thanks you the post. I need to access fields in the object stored in sessioin. I was thinking about using the . Any way, does tomcat 5.0 supports 2.4 servlet specs? --- atta-ur rehman <[EMAIL PROTECTED]> wrote: > if you're running servlet container that supports > 2.4 servlet specs > and you web app is also configured to be of version > 2.4, thru > element in your xml: > > ${myobject} > > in your JSP should print it. in scriptlets: > > <%=session.getAttribute("myobject")%> > > should work. > > "session" is reference to current session is > available for all the JSPs. > > > HTH. > > ATTA > P.S By the way, and no offence please, this isn't a > Struts question as > much as a JSP question. > > On 6/7/05, Tony Smith <[EMAIL PROTECTED]> wrote: > > Hi: > > > > In my Action class, I stored a object in session > with > > > > HttpSession session = request.getSession(); > > session.setAttribute("myobject", object); > > > > How can I access this object from jsp? > > > > Thanks, > > > > > > > > > > __ > > Yahoo! Mail > > Stay connected, organized, and protected. Take the > tour: > > http://tour.mail.yahoo.com/mailtour.html > > > > > > > - > > To unsubscribe, e-mail: > [EMAIL PROTECTED] > > For additional commands, e-mail: > [EMAIL PROTECTED] > > > > > > - > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > > __ Discover Yahoo! Find restaurants, movies, travel and more fun for the weekend. Check it out! http://discover.yahoo.com/weekend.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: AW: No action instance for path /Admin could be created
Shailesh, I had a whole set of questions written down before I saw the REAL problem. Prepare yourself, it's one of those "DUH!" answers because it was a simple typing mistake. You listed your action like this: Your forwards should use PATH, not TYPE. There is no java class "/admin.jsp" so OF COURSE your application server CAN'T instantiate it: it's a path, not a class! You still need to fix your SECOND major problem: Your execute() method signature is wrong. You listed it as: public ActionForward execute(ActionMapping map, ActionForm form, HttpServletRequest req, HttpServletResponse res) throws IOException, ServletException ^^ There is no action.execute() method with that signature. So, fixing your forwards would likely result in YOUR version of action.execute() NEVER running. It would probably default to a blank page since the plain action.execute() method that Struts calls returns nothing. The one signature for execute() that you can use for v1.2 (your struts-config.xml lists you as using v1.2) is: public ActionForward execute(ActionMapping mapping, ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws java.lang.Exception Technically, there is another action.execute() signature BUT it isn't invoked from a webapp. Good luck! Regards, David -Original Message- From: shailesh agarwal [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 08, 2005 6:47 AM To: Struts Users Mailing List Subject: Re: AW: No action instance for path /Admin could be created Yes, It extends org.apache.struts.Action class. I am putting files that I have used: struts-config.xml http://jakarta.apache.org/struts/dtds/struts-config_1_2.dtd";> AdminAction class is with in classes/shailesh package shailesh; import org.apache.struts.action.*; import javax.servlet.http.*; import java.io.*; import javax.servlet.ServletException; class AdminAction extends org.apache.struts.action.Action { String target=null; public ActionForward execute(ActionMapping map, ActionForm form, HttpServletRequest req, HttpServletResponse res) throws IOException, ServletException{ target="x"; return(map.findForward(target)); } } Shailesh Agarwal - How much free photo storage do you get? Store your friends n family photos for FREE with Yahoo! Photos. http://in.photos.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] Re: Please reply to the mailing list, not to the person
woodchuck wrote: > while we're on the subject of mailing list rules/etiquette/pet peeves: How about... top posting and NOT trimming the previous post? ;) At least trim your posts. Please, do it for the archives if nothing else. There are so many posts that have the previous two, three, and more posts in their entirety hanging below them. We don't need to see the whole thing again, really! And I'll steal Simon's sigline... -- Wendy Smoak A. Because it breaks the logical sequence of discussion Q. Why is top posting bad? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Highly dynamic forms
The section I was refering you to is the Hand Cranking the lazy List in the Action Form. This is a small section squeezed in between lazy list information. This does not require any other class but the ActionForm. All that is needed is to add code to grow the list and to get the proper objects back. - Glenn Stéphane Zuckerman <[EMAIL PROTECTED]> 08/06/2005 12:09 PM Please respond to "Struts Users Mailing List" To Struts Users Mailing List cc Subject Re: Highly dynamic forms [EMAIL PROTECTED] a écrit : > http://wiki.apache.org/struts/StrutsCatalogLazyList > Look at the section: Hand Cranking lazy List in the ActionForm. > This is possible with the version you are currently using. Actually, the LazyValidatorForm class only exists since struts 1.2.6, that is why I was asking for a solution under Struts 1.2.4. Moreover, the use I have of LazyList is so small that I don't think that upgrading my version of commons-collection just for this one piece of code is relevant... I have my own LazyList implementation, which is doing what I am expecting of it. When we need a more complete/complex use of lazy objects, I'll upgrade. :-) That doesn't solve my problem, though. I do have radio buttons working from a lazy list, something like [ [value, [radio1,radio2,radio3]], [value, [radio1,radio2]] ] In the end then, I manage to get the attribute value from a radio input, but when I try with checkboxes, I fail to retrieve the String[] object... Well, I'll manage, eventually. -- Stéphane Zuckerman - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[OT] Re: Please reply to the mailing list, not to the person
while we're on the subject of mailing list rules/etiquette/pet peeves: i despise ppl who purposely post messages that are future dated so they remain at the top of your inbox messages list. this is the worst offense imho. i promptly delete these without hesitation. woodchuck --- Michael Jouravlev <[EMAIL PROTECTED]> wrote: > Your essay confirms that people, especially programmers, don't read. > Isn't most of this is in the mailing list rules? I would like to add > something too. I hate emails, especally short ones, with huge > boilerplate content like this: > > === cut here === > This e mail is from ... > > The contents of this email and any attachments are confidential to > the > intended recipient. They may not be disclosed to or used by or copied > in any way by anyone other than the intended recipient. If this email > is received in error, please contact ... quoting the name of the > sender and the email address to which it has been sent and then > delete > it. > > Please note that neither ... nor the sender accept any responsibility > for viruses and it is your responsibility to scan or otherwise check > this email and any attachments. > > ... is a ... registered in ... which provides services from offices > in > ... . A list of members is open for inspection at its registered > office and principal place of business ... . Partner denotes member > of a limited liability partnership. > > For further information, please refer to > === cut here === > > One who came up with this kind of safe harbor statements, is my > personal enemy. Entropy cannot be reduced, but in our efforts to keep > it from growing ;) > > Michael. > __ Discover Yahoo! Stay in touch with email, IM, photo sharing and more. Check it out! http://discover.yahoo.com/stayintouch.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Highly dynamic forms
[EMAIL PROTECTED] a écrit : http://wiki.apache.org/struts/StrutsCatalogLazyList Look at the section: Hand Cranking lazy List in the ActionForm. This is possible with the version you are currently using. Actually, the LazyValidatorForm class only exists since struts 1.2.6, that is why I was asking for a solution under Struts 1.2.4. Moreover, the use I have of LazyList is so small that I don't think that upgrading my version of commons-collection just for this one piece of code is relevant... I have my own LazyList implementation, which is doing what I am expecting of it. When we need a more complete/complex use of lazy objects, I'll upgrade. :-) That doesn't solve my problem, though. I do have radio buttons working from a lazy list, something like [ [value, [radio1,radio2,radio3]], [value, [radio1,radio2]] ] In the end then, I manage to get the attribute value from a radio input, but when I try with checkboxes, I fail to retrieve the String[] object... Well, I'll manage, eventually. -- Stéphane Zuckerman - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Please reply to the mailing list, not to the person
On 6/8/05, Hubert Rabago <[EMAIL PROTECTED]> wrote: > In a matter of a few minutes, I suddenly got three offline messages > with follow up questions. I usually don't mind, though each time I > reply to such messages, I include the text below. In this case, I > thought I'd share these thoughts with the rest of the list. Your essay confirms that people, especially programmers, don't read. Isn't most of this is in the mailing list rules? I would like to add something too. I hate emails, especally short ones, with huge boilerplate content like this: === cut here === This e mail is from ... The contents of this email and any attachments are confidential to the intended recipient. They may not be disclosed to or used by or copied in any way by anyone other than the intended recipient. If this email is received in error, please contact ... quoting the name of the sender and the email address to which it has been sent and then delete it. Please note that neither ... nor the sender accept any responsibility for viruses and it is your responsibility to scan or otherwise check this email and any attachments. ... is a ... registered in ... which provides services from offices in ... . A list of members is open for inspection at its registered office and principal place of business ... . Partner denotes member of a limited liability partnership. For further information, please refer to === cut here === One who came up with this kind of safe harbor statements, is my personal enemy. Entropy cannot be reduced, but in our efforts to keep it from growing ;) Michael. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Please reply to the mailing list, not to the person
Yes, that happens with gmail users. Usually though, the first reply shows *both* struts list and the gmail address, and if I reply to that and they reply back, then it's just the gmail address. With the three I refer to, they all just went to me. If you three are reading this, btw, I'm still finding time to respond. No, really, I am. Hubert On 6/8/05, Wendy Smoak <[EMAIL PROTECTED]> wrote: > From: "Hubert Rabago" <[EMAIL PROTECTED]> > > In a matter of a few minutes, I suddenly got three offline messages > > with follow up questions. I usually don't mind, though each time I > > reply to such messages, I include the text below. In this case, I > > thought I'd share these thoughts with the rest of the list. > > Hubert, when I reply to one of your messages, the 'To:' line comes up with > both the Struts list _and_ you personally. It happens (to me) with several > people on the list, but not everyone. I don't know if it's something on my > end, or something in the messages you're sending, but that might be why you > get more personal replies than you want. > > -- > Wendy Smoak > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: validation -- best practices
Suzanne Rizzo wrote: I don't know if this is a good practice or not, but my app uses two entries in struts-config. One with validate="true" and one with validate="false". I 've never actually used the validate="true" in my code; I have an action superclass that checks for the request type. If it's a GET, I do anything I need to then forward to the JSP. If it's a POST, I run validation manually then continue on. (I POST all form submissions out of habit.) It's a little more work in the code, I suppose, but since it's a superclass I don't really think about it anymore. That might be another way around the issue without any link fixup/etc. as long as you're POSTing to the same action that shows the form. Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: validation -- best practices
I don't know if this is a good practice or not, but my app uses two entries in struts-config. One with validate="true" and one with validate="false". When linking to the page for the first time, I link to the action with the validation turned off. When submitting the form, I submit to the action with the validation turned on. This way I can use a struts action instead of a jsp for the initial page, but the initial page doesn't show errors before the user gets a chance to enter information. Peter Maas <[EMAIL PROTECTED]> 06/08/2005 08:28 AM Please respond to "Struts Users Mailing List" To Struts Users Mailing List cc Subject RE: validation -- best practices I also perform client side validation, however what I don't want is validation BEFORE the user actually got a change to enter data... which is what happens now... On Wed, 2005-06-08 at 07:45 -0400, Kalyanasundaram, Arun Sakthi (Cognizant) wrote: > Hi Peter, > > The validation that is basically performed in the approach you have > specified is client side validation. > > Please elaborate more why you want to make a server hit before the data > is validated and corrected in Client side itself. > > Thanks and Regards, > Arun Sakthi > -Original Message- > From: Peter Maas [mailto:[EMAIL PROTECTED] > Sent: Wednesday, June 08, 2005 5:08 PM > To: Struts Users Mailing List > Subject: validation -- best practices > > I have a question about the validation in struts. > > Imagine that we have: > > - jsp page containing the form to be validated > - formbean extending from ValidatorForm > - action to be executed on submit > - validation rules using the validation plugin > > If we put the 'validate' attribute to true in the struts-config and call > the action the form is validated correctly... but even before actually > submitting data! > > I know this can be avoided by directy calling the jsp, but especially in > the case of 'retrofitting' an application by adding validation to form > this quite often needs refactoring of links and forwards... > > What would be the way to do this? > > -- Ing. P.F.M. Maas M.A. Application Architect / Streaming Noterik Multimedia BV Prins Hendrikkade 120 1011 AM Amsterdam The Netherlands Tel: +31 (0)205929966 (office) Tel: +31 (0)205929973 (direct line) Fax: +31 (0)204688405 Web: www.noterik.nl -- Take a look at our streaming solutions: http://www.streamedit.com/demo.html Get firefox: http://www.mozilla.org/products/firefox/ --- :wq! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Please reply to the mailing list, not to the person
Wendy Smoak wrote: Hubert, when I reply to one of your messages, the 'To:' line comes up with both the Struts list _and_ you personally. It happens (to me) with several people on the list, but not everyone. I don't know if it's something on my end, or something in the messages you're sending, but that might be why you get more personal replies than you want. If you're not hitting "Reply All" then your email client is either ignoring or doing the wrong thing with the "Reply-To" header, at least in Hubert's case. Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Please reply to the mailing list, not to the person
From: "Hubert Rabago" <[EMAIL PROTECTED]> > In a matter of a few minutes, I suddenly got three offline messages > with follow up questions. I usually don't mind, though each time I > reply to such messages, I include the text below. In this case, I > thought I'd share these thoughts with the rest of the list. Hubert, when I reply to one of your messages, the 'To:' line comes up with both the Struts list _and_ you personally. It happens (to me) with several people on the list, but not everyone. I don't know if it's something on my end, or something in the messages you're sending, but that might be why you get more personal replies than you want. -- Wendy Smoak - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Please reply to the mailing list, not to the person
Minor additions : Hubert Rabago wrote: 1) People on the list help each other out voluntarily. So thank the people that help you, even if they help you off-line. If they help you a LOT, thank them even more, especially for off-topic or RTFM/STFW answers, even MORE especially if you ask a lot of them. One or two dumb questions is fine, we all flail looking stuff up sometimes. Otherwise read ESR's "How to ask smart questions" essay. Or you will be invoiced. 5) The most important reason is to share the solution with the rest of the community. Discussing solutions offline cuts off the rest of the community from it. Someone else might be interested in the solution, if not at the moment, then at some future time when they search the archives. This extends to solving the problem yourself--saying "Never mind, fixed it" or nothing at all doesn't help future archive searchers; at least throw a little blurb in giving (at least) minor details Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How do I use JAAS(JbossSX) in Struts?
It does protect it! As your error message showed. The struts protection centres around the container's security. Struts calls request.getRoles() (or similar) to find out if you are in that role. Since you do not have that URL in your web.xml constraints, the container doesn't force you to log in. Therefore the container cannot provide struts with any role info, since you are not authenticated. Secondly, and I think this is your problem, the container may not give any authentication information to any requests which are outside its security constraints even if you have previously authenticated. However I am not sure about that. I know the servlet spec treats SSL constraints in this way. Try it and see. Adam On 08/06/05 13:26 marc wrote: No /HelpDesk/bruger/* in web.xml should not protect /DB/home. But roles="admin" in when the user has the admin role, should protect it. Should't ?? Marc Adam Hardy wrote: I don't know! It's not clear what you want. Let me turn the question round: in your web.xml why do you think that protecting /HelpDesk/bruger/* should also protect /DB/home? Adam - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Please reply to the mailing list, not to the person
In a matter of a few minutes, I suddenly got three offline messages with follow up questions. I usually don't mind, though each time I reply to such messages, I include the text below. In this case, I thought I'd share these thoughts with the rest of the list. - - - - There are very good reasons to send messages (including follow up questions) to the list, and not to the person. 1) People on the list help each other out voluntarily. No one here is required to help out. We all do this out of the kindness of our hearts, to make the community better, because we want to share what we know, or because we're bored with what we're doing at the moment (or many other reasons). Singling out someone puts more responsibility on them than we should. A person may not mind at all, but we should still avoid doing it. If you get a reply through the list, your best bet is to post follow up questions to the list as well. 2) The person you're sending the email to may no longer be available. Because we do this voluntarily, the person you singled out may suddenly be unavailable due to any number of reasons, such as work, family, etc. Even if the person was willing, if s/he is unavailable, you'd be stuck with no response and nowhere to go. Oh, except back to the list, of course, which is where you should've gone to in the first place. 3) Someone else may have an alternative solution. It may or may not be better, it may or may not be more appropriate, but if you never give them the chance to reply, you'll never know. There have been several instances where the one posting the question changed strategies entirely based on input from the community, sometimes from someone who wasn't originally responding to the question. 4) The struts user list is newbie-friendly, and you shouldn't be afraid of asking newbie questions. In fact, some people may be wanting to give back to the list by answering questions but are unable to reply to the tougher ones and are looking for easy questions to begin with. 5) The most important reason is to share the solution with the rest of the community. Discussing solutions offline cuts off the rest of the community from it. Someone else might be interested in the solution, if not at the moment, then at some future time when they search the archives. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [ANNOUNCEMENT] Struts Dialogs: DispatchAction on steroids
Adam, did you manage to read the full description DialogAction? ;-) I know, I know, that the first paragraph is very generic, but that is what the action does. Can you suggest some better wording? I would appreciate if you tried the examples, especially the one called Login Control. I guess I should hide SelectAction in the shadows, because the real deal is the DialogAction. On the other hand, I don't think that it makes sense to create a whole project out of one action. I will submit it as a patch in Bugzilla, and will hope that Struts committers find this class worth including in main Struts library. Because that is what I actually want, to share the joy ;-) Michael. On 6/8/05, Adam Hardy <[EMAIL PROTECTED]> wrote: > Michael, > > I too like Jack concentrated on SelectAction, purely because it was > first in the text. > > Looking at your description of DialogAction, I read the first paragraph > about DialogAction and didn't feel it was worth reading further - having > read about SelectAction (on the basis of your name) I then read that > desc of DialogAction and came across some amazingly non-descriptive > stuff like "accepting input data, dispatching submit event to a > > > method, generating error messages and rendering a view" (hmm, > sounds like my hello world servlet) > > And then I stopped reading :O > > From looking further at the description, it does look interesting, but > hey, this is the internet - 4 seconds and I'm gone! ;) > > On 08/06/05 07:08 Michael Jouravlev wrote: > > You do understand that SelectAction is actually just a helper, and the > > real story is DialogAction, do you? Have you seen the Login Control > > example? > > > > On 6/7/05, Dakota Jack <[EMAIL PROTECTED]> wrote: > > > >>SelectAction is really old news and is what all the apps that use > >>multiple select image buttons do only with a lot less bloating of the > >>code See http://www.michaelmcgrady.com/button/ > >> > >> > >> > >>On 6/7/05, Michael Jouravlev <[EMAIL PROTECTED]> wrote: > >> > >>>Struts Dialogs is an extension of Struts actions that provides an > >>>improved user experience along with event-based programming model. > >>> > >>>Struts Dialogs currently consists of two action classes: SelectAction > >>>and DialogAction. > >>> > >>> > >>>SelectAction > >>> > >>> > >>>SelectAction is an abstract Action that dispatches an HTTP form > >>>submission event to a handler method. > >>> > >>>The purpose of this class is processing submission of HTML forms. > >>>Unlike DispatchAction and LookupDispatchAction, which correlate value > >>>attribute of submit form element with handler method, SelectAction > >>>uses name attribute. This allows to display a user-friendly caption on > >>>a submit button. Also, it is possible to change button caption without > >>>rebuilding the application. > >>> > >>> > >>>DialogAction > >>> > >>> > >>>DialogAction is an abstract Action that provides basic dialog > >>>functions, like accepting input data, dispatching submit event to a > >>>method, generating error messages and rendering a view. DialogAction > >>>allows to create robust user inteface and provides simple event-based > >>>programming model. > >>> > >>>DialogAction incorporates several innovative design decisions not > >>>previously used in Struts. Some of them are already implemented in > >>>other frameworks, like Ruby on Rails or JSF. Other features are unique > >>>to DialogAction. > >>> > >>>The cornerstone concept of DialogAction is separation of input and > >>>output processes. This solves several issues, related to HTML form > >>>input, like double submit problem, annoying POSTDATA messages, bad > >>>usability when Reload, Back and Forward buttons are used. > >>> > >>>DialogAction defines three different modes of operation: > >>> > >>>* action initialization prepares action for use with new set of data; > >>>* user input process accepts input data, updates domain model, > >>>generates error messages; > >>>* view rendering process generates a result page. > >>> > >>>Separation of input and output improves usability and user experience: > >>> > >>>* Any page can be reloaded without resending input information to > >>>the server. > >>>* As a consequence, an application does not have to cope with > >>>double submits. > >>>* Another consequence is that a user does not see "Do you want to > >>>resend POSTDATA?" message. > >>>* Using Back and Forward buttons is safe, because only result > >>>pages are browsed. > >>> > >>>- > >>>Documents, files, samples > >>>- > >>> > >>>Online samples: > >>> http://www.superinterface.com/strutsdialog > >>> > >>>Documentataion: > >>> http://wiki.java.net/bin/view/Projects/StrutsDialogs > >>> If you cannot see pictures on SelectAction and DialogAction pages, > >>> you might need to register and login to java.net. But it should > >>> work without logging in. > >>> >
RE: Howto put current users into the application context?
That's not the problem. Where do you get your ApplicationContext map from? Clearly not from SessionBindingEvent. So stick another Observer pattern to notify your application context?!? Regards, Nils -Original Message- From: delbd [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 08, 2005 3:56 PM To: Struts Users Mailing List Subject: Re: Howto put current users into the application context? Le Mercredi 8 Juin 2005 15:44, Nils Liebelt a écrit : > Hi all, > > I want to show list of currently logged in users. Now in my idea this is > something which should belong into application context. Putting it in there > Is not too difficult. I do it in my extended ActionServlet. But how do I > get it outta there? What listeners do I use in order to get notified when a > session var unbinds also nowing where to find ApplicationContext Map? > put an object implementing HttpSessionBindingListener in the sessions attributes to get notified when session invalidates or times out. > > GreetZ > > Nils > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] -- David Delbecq Royal Meteorological Institute of Belgium - Is there life after /sbin/halt -p? - 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: Howto put current users into the application context?
That's not the problem. Where do you get your ApplicationContext map from? Clearly not from SessionBindingEvent. So stick another Observer pattern to notify your application context?!? Regards, Nils -Original Message- From: delbd [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 08, 2005 3:56 PM To: Struts Users Mailing List Subject: Re: Howto put current users into the application context? Le Mercredi 8 Juin 2005 15:44, Nils Liebelt a écrit : > Hi all, > > I want to show list of currently logged in users. Now in my idea this is > something which should belong into application context. Putting it in there > Is not too difficult. I do it in my extended ActionServlet. But how do I > get it outta there? What listeners do I use in order to get notified when a > session var unbinds also nowing where to find ApplicationContext Map? > put an object implementing HttpSessionBindingListener in the sessions attributes to get notified when session invalidates or times out. > > GreetZ > > Nils > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] -- David Delbecq Royal Meteorological Institute of Belgium - Is there life after /sbin/halt -p? - 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: ActionForm::reset method
So where is the proper place to prepopulate fields? [I know I am a noob] On 6/8/05, Hubert Rabago <[EMAIL PROTECTED]> wrote: > Yes. Is this causing a problem for you? Please note that reset() is > not where you should be prepopulating fields. As it says in the > javadoc: > > "In practice, the only properties that need to be reset are those > which represent checkboxes on a session-scoped form." > > ... and ... > > "You mainly need to worry about setting checkbox values to false; most > of the time you can leave this method unimplemented." > > Hubert > > > On 6/8/05, Janek Ziniewicz <[EMAIL PROTECTED]> wrote: > > My app contains a few forms. Each form has one ActionForm and one > > Action class associated. Each time page with form is displayed I see > > that ActionForm::reset method is displayed. After submitting I can see > > that reset method is launched again, and right after that > > ActionForm::execute. > > > > Is it proper behaviour? > > > > -- > > Pozdrawiam, > > Janek Ziniewicz > > gg: 902858 > > irc.freenode.net: #gore, #dub > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > -- Pozdrawiam, Janek Ziniewicz gg: 902858 irc.freenode.net: #gore, #dub - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: ActionForm::reset method
Yes. Is this causing a problem for you? Please note that reset() is not where you should be prepopulating fields. As it says in the javadoc: "In practice, the only properties that need to be reset are those which represent checkboxes on a session-scoped form." ... and ... "You mainly need to worry about setting checkbox values to false; most of the time you can leave this method unimplemented." Hubert On 6/8/05, Janek Ziniewicz <[EMAIL PROTECTED]> wrote: > My app contains a few forms. Each form has one ActionForm and one > Action class associated. Each time page with form is displayed I see > that ActionForm::reset method is displayed. After submitting I can see > that reset method is launched again, and right after that > ActionForm::execute. > > Is it proper behaviour? > > -- > Pozdrawiam, > Janek Ziniewicz > gg: 902858 > irc.freenode.net: #gore, #dub > > - > 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: Sorry I deleted replies by accident. How do you dynamically set one of the options in a select as selected
To do this, prepopulate an instance of the form bean that the form will be using, and set the value of the select field to the value of the option you want selected. Hubert On 6/8/05, Harland, David <[EMAIL PROTECTED]> wrote: > Sorry I deleted replies by accident > > I have created an array several namevalue objects and put them in the > request object for the html:options to use. > > How do I flag one of those options to be selected. > > Many thanks > > Dave. > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: DynaActionForm / BeanUtils usage issue
As you've seen, the dynaClass is required before you use a DynaActionForm. The dynaClass is what tells BeanUtils what properties your DynaActionForm has. To create a DynaActionForm with the DynaClass initialized, call formBeanConfig.createActionForm(). You can get a formBeanConfig instance through ModuleUtils.getInstance().getModuleConfig(request).findFormBeanConfig("formName"). Hubert On 6/7/05, Laurie Harper <[EMAIL PROTECTED]> wrote: > Code in a unit test: > >DyanActionForm form = new DynaActionForm(); >BeanUtils.copyProperties(bean, form); > > This results in a NullPointerException when BeanUtils calls > form.getDynaClass().getProperties() (or something like that). > > BeanUtils is expecting dynaClass to be set, but DynaActionFrom gives me > no way to set it, unless I create a sub-class. I had to single step > through the BeanUtils code to figure out what was causing the NPE > (complicated by the fact that BeanUtils 1.7.0 has an incorrect version > listed in it's manifest :=( ). > > DynaActionFrom should probably either be abstract or provide a setter > for dynaClass, given that it's currently impossible to create a valid > instance without sub-classing. > > I'll file a bug report against BeanUtils to use guards around uses of > getDynaClass() if we can't agree a way to ensure it's unnessesary. Can > Struts do one of the following: > > - make DynaActionForm abstract > - make the default constuctor require an initialization value for dynaClass > > I'm guessing the answer is no (for backwards compatibility reasons, > although maybe not if a DynaActionFrom w/out dynaClass set is always > invalid). In that case BeanUtils will need to be fixed. > > Ugly way to spend an evening, this :-) > > L. > > > - > 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: Nested properties in DynaActionForm
Nested properties with DynaActionForms actually require you to nest objects. :) Using a property name like "iterationLength.time" would be like saying "getIterationLength().getTime()", and this is what BeanUtils would try to do. Hubert On 6/7/05, Laurie Harper <[EMAIL PROTECTED]> wrote: > I'm probably missing something really obvious but I've been fiddling > about with this for a while now. Maybe someone can spot what I'm doing > wrong... > > I'm using DynaActionForms in my Struts app and I'd like to be able to > reference a property like this: > > > > I tried a form declaration like this: > > > > > > but I get an error during request processing that 'iterationLength' is > not a valid property. So then I tried: > > > > > > Struts appears to be trying to cope with this: > > DEBUG [http8080-Processor24] org.apache.commons.beanutils.BeanUtils - > setProperty(DynaActionForm[dynaClass=ProjectEdit,startDate=,owner=,mode=,description=,iterationLength={},endDate=,status=,name=,doSave=], > iterationLength.time, [1]) > DEBUG [http8080-Processor24] org.apache.commons.beanutils.BeanUtils - >Target bean = {} > DEBUG [http8080-Processor24] org.apache.commons.beanutils.BeanUtils - >Target name = time > > So it's getting the empty map as the target bean on which to set a > property 'time'. But when I fetch the map from the form in my action, > it's empty. > > Is there a way to do this? The reason I want to be able to write the > property as "iterationLength.time", rather than collapsing it to > 'iterationLengthTime' or something is for consistency with when I'm > accesing the same property in other beans which aren't dynamically > generated. > > Thanks, > > L. > > > - > 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: Howto put current users into the application context?
Le Mercredi 8 Juin 2005 15:44, Nils Liebelt a écrit : > Hi all, > > I want to show list of currently logged in users. Now in my idea this is > something which should belong into application context. Putting it in there > Is not too difficult. I do it in my extended ActionServlet. But how do I > get it outta there? What listeners do I use in order to get notified when a > session var unbinds also nowing where to find ApplicationContext Map? > put an object implementing HttpSessionBindingListener in the sessions attributes to get notified when session invalidates or times out. > > GreetZ > > Nils > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] -- David Delbecq Royal Meteorological Institute of Belgium - Is there life after /sbin/halt -p? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: help needed with RowSetDynaClass
If you knew the underlying data type associated with each of the ((DynaProperty)col).getName() calls in your example then you could create the input type appropriate to that data type. So, you would also need to expose the underlying datatypes to the JSP so that it could conditionally create the appropriate input type for each column. Some issues with this: * Should the presentation layer really *know* about the underlying datatypes, Your example passes a disconnected recordset to the presentation layer so the JSP would need to know something about how that data is stored in the underlying RDBMS. * The conditional logic in the presentation tier might get quite messy - in terms of psuedo code it might look something like this: if type is boolean then create radio buttons else if type is string then create text input else if etc etc But if this is what you _have_ to do then you could try this: * Get the metadata from the underlying resultset and make this available to your JSP alongside the "rowSet" e.g. request.setAttribute("rowSetColumns", rs.getMetaData()); Then either: * Write a custom tag which encapsulates the logic required to interrogate the metadata and creates the appropriate control type OR * Use JSTL conditional tags or Struts logic tags to apply this logic in-place within the JSP. -Original Message- From: Javier Santos Martin-Moreno [mailto:[EMAIL PROTECTED] Sent: 08 June 2005 14:27 To: user@struts.apache.org Subject: help needed with RowSetDynaClass Hello all, I am writing a jsp that retrieves a row of a table in my database and allows the user to modify the fields using a form. For example, if I have the following table in my database: NAME GENDER John Male Ann Female and the following code in my action class ... RowSetDynaClass rowSet = dao.getUserData("John"); request.setAttribute("rowSet", rowSet); ... I would like to display in my jsp a form with a text field containing "John" and a two radio buttons labelled "male" (selected) and "female", so that these values can be modified, and a submit button to update the database. This is the piece of code of my jsp displaying the fields of the form: However, this way all the fields must be the same type (text in this case) and have the same attributes (i.e. same size). I would like to know if there is any method to be able to choose the type of input field (text, select, checkbox, radio) or the attributes (size, maxlength for text) for each field of the database. Any suggestions? Thanks in advance, Javier - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] If you are not an intended recipient of this e-mail, please notify the sender, delete it and do not read, act upon, print, disclose, copy, retain or redistribute it. Click here for important additional terms relating to this e-mail. http://www.ml.com/email_terms/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Howto put current users into the application context?
Hi all, I want to show list of currently logged in users. Now in my idea this is something which should belong into application context. Putting it in there Is not too difficult. I do it in my extended ActionServlet. But how do I get it outta there? What listeners do I use in order to get notified when a session var unbinds also nowing where to find ApplicationContext Map? GreetZ Nils - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Howto put current users into the application context?
Hi all, I want to show list of currently logged in users. Now in my idea this is something which should belong into application context. Putting it in there Is not too difficult. I do it in my extended ActionServlet. But how do I get it outta there? What listeners do I use in order to get notified when a session var unbinds also nowing where to find ApplicationContext Map? GreetZ Nils - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Error messages in login page doesn't show up
I solved it, removing redirect="true" from the action-mapping tag in struts-config.xml solved it. Ian. On 6/8/05, Ian van der Neut <[EMAIL PROTECTED]> wrote: > Hello all, > > I have a little problem with displaying an "Invalid login" message on > my login page. I am using tomcat 5.0.28 and struts 1.2.4 > > I have a login.jsp that looks like this: > > > > > > > > > > > > > > > > In my ActionForm, the validate method looks like this: > > public ActionErrors validate(ActionMapping mapping, HttpServletRequest > request) { > ActionErrors errors = new ActionErrors(); > if (userName == null || userName.length() == 0) { > errors.add("username", new > ActionMessage("errors.username.required")); > } > if (password == null || password.length() == 0) { > errors.add("password", new > ActionMessage("errors.password.required")); > } > return errors; > } > > When I leave username or password fields empty, I get the proper error > messages as I expect, however, in my Action class "LoginAction" I have > the following code to handel illegal logins: > > if (user != null) { > fwd = mapping.findForward(SUCCESS); > session.setAttribute("userName", userName); > session.setAttribute("user", user); > } else { > ActionMessages errors = new ActionMessages(); > errors.add(ActionMessages.GLOBAL_MESSAGE, new > > ActionMessage("errors.invalidlogin")); > saveMessages(request, errors); > fwd = mapping.findForward(ERROR); > log.info(userName + " tried to login with invalid credentials."); > } > > I have the "errors.invalidlogin" in application.properties file: > errors.invalidlogin=Invalid username and password combination. > (Other messages in that file are displayed properly, so the file is > read and found by struts and the servlet container.) > > My struts-config.xml has these relevant tags: > > > > > > > >type="my.package.LoginAction" > name="LoginForm" > scope="session" > input="/login.jsp"> > > > > > Does anybody have a clue as to what I am doing wrong? As far as I can > see, I'm doing everything the way it is described in the jakarta > o'reilly book (Cavaness). > > Thank you all very much in advance for any input, > > Ian. > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Problem with logic:iterate Tag
I am populating following simple List in action class and putting that in form class. private List getSystemTableList(ConfWizardBean confwizbean, HttpSession session){ ArrayList outerList = new ArrayList(); for (int i = 0; i < 2; i++) { ArrayList innerList = new ArrayList(); innerList.add(0,"Ist Column"); innerList.add(1,"2nd Column"); innerList.add(2,"3rd column"); innerList.add(3,"4th Column"); outerList.add(innerList); } return outerList; } relevant JSP code is as follows <%-- Iterate through the system list --%> I am trying to print the above list in Jsp page but it always print the value "4th Column" in all the four columns of HTML. Somehow it always uses the offset=3. What I am doing wrong here?. Deepak
help needed with RowSetDynaClass
Hello all, I am writing a jsp that retrieves a row of a table in my database and allows the user to modify the fields using a form. For example, if I have the following table in my database: NAME GENDER John Male Ann Female and the following code in my action class ... RowSetDynaClass rowSet = dao.getUserData("John"); request.setAttribute("rowSet", rowSet); ... I would like to display in my jsp a form with a text field containing "John" and a two radio buttons labelled "male" (selected) and "female", so that these values can be modified, and a submit button to update the database. This is the piece of code of my jsp displaying the fields of the form: However, this way all the fields must be the same type (text in this case) and have the same attributes (i.e. same size). I would like to know if there is any method to be able to choose the type of input field (text, select, checkbox, radio) or the attributes (size, maxlength for text) for each field of the database. Any suggestions? Thanks in advance, Javier - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Best Place for config values
I agree, my stratagey is a separate XML config file. I've also gotten in the habit of using Digester to read it. Makes life easier. -- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com On Wed, June 8, 2005 8:44 am, Leandro_Dorileo/[EMAIL PROTECTED] said: >>Whats the best place / access method to storing and retriving config > attributes like administrator email addresses >and directories to store > uploaded files in a multi-tiered webapp, web.xml? Resources file? Both > servlets and non >servlets need to access these values. Opinions greatly > appreciated. > > I wouldn't like to have this kind of config into web.xml, I normally put > it into an apart XML or in a propertie file, this way I have an > implementation independent of everything. > > > Dorilêo > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Jim Coble/Libraries/Provost/Academic/Univ/Duke is out of the office.
I will be out of the office starting 06/08/2005 and will not return until 06/13/2005. I will respond to your message when I return. If you need assistance on CIT-related matters in the meantime, you can email [EMAIL PROTECTED] or call 919-660-5806. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: validation -- best practices
Peter- I assume you have redirected your forms submittal to your customised Validator? e.g. tag displays "onSubmit=return validateMyForm(this)" Martin- - Original Message - From: "Peter Maas" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" Sent: Wednesday, June 08, 2005 8:28 AM Subject: RE: validation -- best practices I also perform client side validation, however what I don't want is validation BEFORE the user actually got a change to enter data... which is what happens now... On Wed, 2005-06-08 at 07:45 -0400, Kalyanasundaram, Arun Sakthi (Cognizant) wrote: Hi Peter, The validation that is basically performed in the approach you have specified is client side validation. Please elaborate more why you want to make a server hit before the data is validated and corrected in Client side itself. Thanks and Regards, Arun Sakthi -Original Message- From: Peter Maas [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 08, 2005 5:08 PM To: Struts Users Mailing List Subject: validation -- best practices I have a question about the validation in struts. Imagine that we have: - jsp page containing the form to be validated - formbean extending from ValidatorForm - action to be executed on submit - validation rules using the validation plugin If we put the 'validate' attribute to true in the struts-config and call the action the form is validated correctly... but even before actually submitting data! I know this can be avoided by directy calling the jsp, but especially in the case of 'retrofitting' an application by adding validation to form this quite often needs refactoring of links and forwards... What would be the way to do this? -- Ing. P.F.M. Maas M.A. Application Architect / Streaming Noterik Multimedia BV Prins Hendrikkade 120 1011 AM Amsterdam The Netherlands Tel: +31 (0)205929966 (office) Tel: +31 (0)205929973 (direct line) Fax: +31 (0)204688405 Web: www.noterik.nl -- Take a look at our streaming solutions: http://www.streamedit.com/demo.html Get firefox: http://www.mozilla.org/products/firefox/ --- :wq! - 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: Best Place for config values
>Whats the best place / access method to storing and retriving config attributes like administrator email addresses >and directories to store uploaded files in a multi-tiered webapp, web.xml? Resources file? Both servlets and non >servlets need to access these values. Opinions greatly appreciated. I wouldn't like to have this kind of config into web.xml, I normally put it into an apart XML or in a propertie file, this way I have an implementation independent of everything. Dorilêo
Re: Error Handling Strategy
>In my new application design I am employeeing this strategy and using >custom ExceptionHandler classes to catch, log, and redirect the user >to the appropriate pages. In my Exception classes, instead of a >non-localized string as the exception message, I use a message key >which I can then retrieve and translate into a localized string for >the end user. This has two main benefits: you are forced to actually >THINK about your error messages as you need to look them up in a >properties file and they can be organized somewhat categorically AND >you don't have to write two different error messages for both the >developer and the end user. If the developer wants more information, >he can look at the error log for the stack trace. Can anyone tell me >why this isn't a good idea? I've done exactly this way, I wrote my own ExceptionHandler and my own Exception(it's by now SisprevException:), and do everything there, for database errors(SQLException) I have a XML wich has every Oracle erros that can perhaps happen, then I test if this is a SQLException and call a method wich will handle my logic(read XML, identify the error and get the proper message), if its any other exception I handle diferently, of course I don't handle every kind of exception just those that I perhaps will get :) Like you said it really has benefits, I don't have anyone try and catch through my source, some times I have try and finally to release resources in case of an Exception. Dorilêo - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Pb with html:link
> > Do try with the attribute flush to true. You got it! Thanks a lot, I was going mad for such a little problem. Jean-Marie > JM Tinghir <[EMAIL PROTECTED]> > 08/06/2005 08:02 AM > Please respond to > "Struts Users Mailing List" > > To > Struts Users Mailing List > cc > > Subject > Re: Pb with html:link > > > Yes I did. > I have a in it that works correctly. > > Jean-Marie Tinghir > > 2005/6/8, Chris Loschen <[EMAIL PROTECTED]>: > > Did you include a taglib reference in headerRecherche.jsp? Something > > like this: > > > > <%@ page language="java"%> > > <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> > > <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%> > > <%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic"%> > > > > In this case, you need the html taglib for your html:link to work. > > > > Hope that helps! > > > > Chris Loschen > > > > -Original Message- > > From: JM Tinghir [mailto:[EMAIL PROTECTED] > > Sent: Wednesday, June 08, 2005 3:39 AM > > To: Struts Users Mailing List > > Subject: Pb with html:link > > > > Hello, > > I have a JSP (resultat.jsp) in which there's : > > Suppression > > This is working perfectly. > > > > This JSP includes another one : > > > > This is still working perfectly. > > > > But when I put the html:link in the headerRecherche.jsp , I get a > > NullPointerException... > > And this is not working perfectly anymore! ;-) > > > > In my struts-config.xml, I have : > > > path="/suppression" > > forward="/jsp/suppression.jsp"/> > > > > Thanks for your help. > > > > Jean-Marie Tinghir > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > ___ > > Siebel > > IT'S ALL ABOUT THE CUSTOMER > > Visit www.siebel.com > > > > This e-mail message is for the sole use of the intended recipient(s) and > contains confidential and/or privileged information belonging to Siebel > Systems, Inc. or its customers or partners. Any unauthorized review, use, > copying, disclosure or distribution of this message is strictly > prohibited. If you are not an intended recipient of this message, please > contact the sender by reply e-mail and destroy all soft and hard copies of > the message and any attachments. Thank you for your cooperation. > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How do I use JAAS(JbossSX) in Struts?
No /HelpDesk/bruger/* in web.xml should not protect /DB/home. But roles="admin" in when the user has the admin role, should protect it. Should't ?? Marc Adam Hardy wrote: I don't know! It's not clear what you want. Let me turn the question round: in your web.xml why do you think that protecting /HelpDesk/bruger/* should also protect /DB/home? Adam - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: validation -- best practices
I also perform client side validation, however what I don't want is validation BEFORE the user actually got a change to enter data... which is what happens now... On Wed, 2005-06-08 at 07:45 -0400, Kalyanasundaram, Arun Sakthi (Cognizant) wrote: > Hi Peter, > > The validation that is basically performed in the approach you have > specified is client side validation. > > Please elaborate more why you want to make a server hit before the data > is validated and corrected in Client side itself. > > Thanks and Regards, > Arun Sakthi > -Original Message- > From: Peter Maas [mailto:[EMAIL PROTECTED] > Sent: Wednesday, June 08, 2005 5:08 PM > To: Struts Users Mailing List > Subject: validation -- best practices > > I have a question about the validation in struts. > > Imagine that we have: > > - jsp page containing the form to be validated > - formbean extending from ValidatorForm > - action to be executed on submit > - validation rules using the validation plugin > > If we put the 'validate' attribute to true in the struts-config and call > the action the form is validated correctly... but even before actually > submitting data! > > I know this can be avoided by directy calling the jsp, but especially in > the case of 'retrofitting' an application by adding validation to form > this quite often needs refactoring of links and forwards... > > What would be the way to do this? > > -- Ing. P.F.M. Maas M.A. Application Architect / Streaming Noterik Multimedia BV Prins Hendrikkade 120 1011 AM Amsterdam The Netherlands Tel: +31 (0)205929966 (office) Tel: +31 (0)205929973 (direct line) Fax: +31 (0)204688405 Web: www.noterik.nl -- Take a look at our streaming solutions: http://www.streamedit.com/demo.html Get firefox: http://www.mozilla.org/products/firefox/ --- :wq! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Pb with html:link
Just as a double check Jean Marie. You need to have the taglibs in both the resultat.jsp and the headerRecherche.jsp. This is how I do my include: Do try with the attribute flush to true. - Glenn JM Tinghir <[EMAIL PROTECTED]> 08/06/2005 08:02 AM Please respond to "Struts Users Mailing List" To Struts Users Mailing List cc Subject Re: Pb with html:link Yes I did. I have a in it that works correctly. Jean-Marie Tinghir 2005/6/8, Chris Loschen <[EMAIL PROTECTED]>: > Did you include a taglib reference in headerRecherche.jsp? Something > like this: > > <%@ page language="java"%> > <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> > <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%> > <%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic"%> > > In this case, you need the html taglib for your html:link to work. > > Hope that helps! > > Chris Loschen > > -Original Message- > From: JM Tinghir [mailto:[EMAIL PROTECTED] > Sent: Wednesday, June 08, 2005 3:39 AM > To: Struts Users Mailing List > Subject: Pb with html:link > > Hello, > I have a JSP (resultat.jsp) in which there's : > Suppression > This is working perfectly. > > This JSP includes another one : > > This is still working perfectly. > > But when I put the html:link in the headerRecherche.jsp , I get a > NullPointerException... > And this is not working perfectly anymore! ;-) > > In my struts-config.xml, I have : > path="/suppression" > forward="/jsp/suppression.jsp"/> > > Thanks for your help. > > Jean-Marie Tinghir > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > ___ > Siebel > IT'S ALL ABOUT THE CUSTOMER > Visit www.siebel.com > > This e-mail message is for the sole use of the intended recipient(s) and contains confidential and/or privileged information belonging to Siebel Systems, Inc. or its customers or partners. Any unauthorized review, use, copying, disclosure or distribution of this message is strictly prohibited. If you are not an intended recipient of this message, please contact the sender by reply e-mail and destroy all soft and hard copies of the message and any attachments. Thank you for your cooperation. > > - > 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 get posted data into a nested object ?
Is this the only way to do it ? I have always never coded anything additional in the getter/setter methods. - Glenn Hubert Rabago <[EMAIL PROTECTED]> 07/06/2005 05:42 PM Please respond to "Struts Users Mailing List" To Struts Users Mailing List cc Subject Re: How to get posted data into a nested object ? It's not clear within your error at which point the error is occurring. The problem could be that when BeanUtils tries to populate the firstName field of the dependent bean, dependent is null. Maybe you need to modify your form so that getDependent() always returns a valid DependentVO object, instantiating one as needed. Hubert On 6/7/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Hello, > > Short description: > - > How do I get posted data into a bean within the form bean ? > > The JSP has this code. > "${dependentForm.dependent.firstName}"/> > > The page is posted and I get this error: > [07/06/05 15:15:22:743 EDT] 6aa06aa0 WebGroup E SRVE0026E: [Servlet > Error]-[BeanUtils.populate]: java.lang.IllegalArgumentException: No bean > specified > > Really I'm getting exasperated trying to get this working. > All of the examples I've found deal with collections or simply getting the > data onto the page. > I need to pick it up from the page. > > > Long Description: > - > My form bean contains a value object. > public class DependentForm extends ActionForm { >private ImageButtonBean addButton = new ImageButtonBean(); >private ImageButtonBean cancelButton = new ImageButtonBean(); >private DependentVO dependent; > ... > > public class DependentVO extends Dependent { > ... > > public class Dependent extends People { > ... > > public class People { >private Date dateOfBirth; >private int employeeNumber; >private String firstName; >private String lastName; >private String relationshipCode; >private String sexTypeCode; >private String smokerIndicator; > > The JSP has this code. > "${dependentForm.dependent.firstName}"/> > > TIA, > Glenn > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Pb with html:link
Yes I did. I have a in it that works correctly. Jean-Marie Tinghir 2005/6/8, Chris Loschen <[EMAIL PROTECTED]>: > Did you include a taglib reference in headerRecherche.jsp? Something > like this: > > <%@ page language="java"%> > <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> > <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%> > <%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic"%> > > In this case, you need the html taglib for your html:link to work. > > Hope that helps! > > Chris Loschen > > -Original Message- > From: JM Tinghir [mailto:[EMAIL PROTECTED] > Sent: Wednesday, June 08, 2005 3:39 AM > To: Struts Users Mailing List > Subject: Pb with html:link > > Hello, > I have a JSP (resultat.jsp) in which there's : > Suppression > This is working perfectly. > > This JSP includes another one : > > This is still working perfectly. > > But when I put the html:link in the headerRecherche.jsp , I get a > NullPointerException... > And this is not working perfectly anymore! ;-) > > In my struts-config.xml, I have : > path="/suppression" > forward="/jsp/suppression.jsp"/> > > Thanks for your help. > > Jean-Marie Tinghir > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > ___ > Siebel > IT'S ALL ABOUT THE CUSTOMER > Visit www.siebel.com > > This e-mail message is for the sole use of the intended recipient(s) and > contains confidential and/or privileged information belonging to Siebel > Systems, Inc. or its customers or partners. Any unauthorized review, use, > copying, disclosure or distribution of this message is strictly prohibited. > If you are not an intended recipient of this message, please contact the > sender by reply e-mail and destroy all soft and hard copies of the message > and any attachments. Thank you for your cooperation. > > - > 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: Pb with html:link
Did you include a taglib reference in headerRecherche.jsp? Something like this: <%@ page language="java"%> <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%> <%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic"%> In this case, you need the html taglib for your html:link to work. Hope that helps! Chris Loschen -Original Message- From: JM Tinghir [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 08, 2005 3:39 AM To: Struts Users Mailing List Subject: Pb with html:link Hello, I have a JSP (resultat.jsp) in which there's : Suppression This is working perfectly. This JSP includes another one : This is still working perfectly. But when I put the html:link in the headerRecherche.jsp , I get a NullPointerException... And this is not working perfectly anymore! ;-) In my struts-config.xml, I have : Thanks for your help. Jean-Marie Tinghir - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] ___ Siebel IT'S ALL ABOUT THE CUSTOMER Visit www.siebel.com This e-mail message is for the sole use of the intended recipient(s) and contains confidential and/or privileged information belonging to Siebel Systems, Inc. or its customers or partners. Any unauthorized review, use, copying, disclosure or distribution of this message is strictly prohibited. If you are not an intended recipient of this message, please contact the sender by reply e-mail and destroy all soft and hard copies of the message and any attachments. Thank you for your cooperation. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to get posted data into a nested object ?
Thanks for the warning ! Not all of the properties are shown to the user. The date gets formatted based on a locale. I will certainly look into the FormDef. - Glenn Hubert Rabago <[EMAIL PROTECTED]> 07/06/2005 05:43 PM Please respond to "Struts Users Mailing List" To Struts Users Mailing List cc Subject Re: How to get posted data into a nested object ? By the way, I should warn you that using Date and int fields on a form bean (which is what you're essentially doing) can lead to problems when the user types in invalid data. Maybe you'd be interested in something like FormDef? http://formdef.dev.java.net Hubert On 6/7/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Hello, > > Short description: > - > How do I get posted data into a bean within the form bean ? > > The JSP has this code. > "${dependentForm.dependent.firstName}"/> > > The page is posted and I get this error: > [07/06/05 15:15:22:743 EDT] 6aa06aa0 WebGroup E SRVE0026E: [Servlet > Error]-[BeanUtils.populate]: java.lang.IllegalArgumentException: No bean > specified > > Really I'm getting exasperated trying to get this working. > All of the examples I've found deal with collections or simply getting the > data onto the page. > I need to pick it up from the page. > > > Long Description: > - > My form bean contains a value object. > public class DependentForm extends ActionForm { >private ImageButtonBean addButton = new ImageButtonBean(); >private ImageButtonBean cancelButton = new ImageButtonBean(); >private DependentVO dependent; > ... > > public class DependentVO extends Dependent { > ... > > public class Dependent extends People { > ... > > public class People { >private Date dateOfBirth; >private int employeeNumber; >private String firstName; >private String lastName; >private String relationshipCode; >private String sexTypeCode; >private String smokerIndicator; > > The JSP has this code. > "${dependentForm.dependent.firstName}"/> > > TIA, > Glenn > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Failed Validation Prolbem
Hello, I have been puzzled by this problem for a while. I inherited a Struts application which regularly sets collections as request attributes and accesses them in jsps. I tried to add Validation to this app using Validator framework and let the jsp be reloaded if something goes wrong. Two things I can't figure out how to handle are: 1. I can only set one jsp for the input property of action mapping and I don't want to use an action here. 2. The request scope attribute is lost after reloading. Do I have to change the scope to session for all of them? Thank you and any help is very much appreciated! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: validation -- best practices
Hi Peter, The validation that is basically performed in the approach you have specified is client side validation. Please elaborate more why you want to make a server hit before the data is validated and corrected in Client side itself. Thanks and Regards, Arun Sakthi -Original Message- From: Peter Maas [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 08, 2005 5:08 PM To: Struts Users Mailing List Subject: validation -- best practices I have a question about the validation in struts. Imagine that we have: - jsp page containing the form to be validated - formbean extending from ValidatorForm - action to be executed on submit - validation rules using the validation plugin If we put the 'validate' attribute to true in the struts-config and call the action the form is validated correctly... but even before actually submitting data! I know this can be avoided by directy calling the jsp, but especially in the case of 'retrofitting' an application by adding validation to form this quite often needs refactoring of links and forwards... What would be the way to do this? -- Ing. P.F.M. Maas M.A. Application Architect / Streaming Noterik Multimedia BV Prins Hendrikkade 120 1011 AM Amsterdam The Netherlands Tel: +31 (0)205929966 (office) Tel: +31 (0)205929973 (direct line) Fax: +31 (0)204688405 Web: www.noterik.nl -- Take a look at our streaming solutions: http://www.streamedit.com/demo.html Get firefox: http://www.mozilla.org/products/firefox/ --- :wq! - 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]
Sorry I deleted replies by accident. How do you dynamically set one of the options in a select as selected
Sorry I deleted replies by accident I have created an array several namevalue objects and put them in the request object for the html:options to use. How do I flag one of those options to be selected. Many thanks Dave. This e mail is from DLA Piper Rudnick Gray Cary UK LLP. The contents of this email and any attachments are confidential to the intended recipient. They may not be disclosed to or used by or copied in any way by anyone other than the intended recipient. If this email is received in error, please contact DLA Piper Rudnick Gray Cary UK LLP on +44 (0) 8700 11 quoting the name of the sender and the email address to which it has been sent and then delete it. Please note that neither DLA Piper Rudnick Gray Cary UK LLP nor the sender accept any responsibility for viruses and it is your responsibility to scan or otherwise check this email and any attachments. DLA Piper Rudnick Gray Cary UK LLP is a limited liability partnership registered in England and Wales (registered number OC307847) which provides services from offices in England, Belgium, Germany and the People's Republic of China. A list of members is open for inspection at its registered office and principal place of business 3 Noble Street, London EC2V 7EE. Partner denotes member of a limited liability partnership. DLA Piper Rudnick Gray Cary UK LLP is regulated by the Law Society and is a member of DLA Piper Rudnick Gray Cary, a global legal services organisation, the members of which are separate and distinct legal entities. For further information, please refer to www.dlapiper.com.
validation -- best practices
I have a question about the validation in struts. Imagine that we have: - jsp page containing the form to be validated - formbean extending from ValidatorForm - action to be executed on submit - validation rules using the validation plugin If we put the 'validate' attribute to true in the struts-config and call the action the form is validated correctly... but even before actually submitting data! I know this can be avoided by directy calling the jsp, but especially in the case of 'retrofitting' an application by adding validation to form this quite often needs refactoring of links and forwards... What would be the way to do this? -- Ing. P.F.M. Maas M.A. Application Architect / Streaming Noterik Multimedia BV Prins Hendrikkade 120 1011 AM Amsterdam The Netherlands Tel: +31 (0)205929966 (office) Tel: +31 (0)205929973 (direct line) Fax: +31 (0)204688405 Web: www.noterik.nl -- Take a look at our streaming solutions: http://www.streamedit.com/demo.html Get firefox: http://www.mozilla.org/products/firefox/ --- :wq! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
How do you dynamically set one of the options in a select as selected
I have created an array several namevalue objects and put them in the request object for the html:options to use. How do I flag one of those options to be selected. Many thanks Dave. This e mail is from DLA Piper Rudnick Gray Cary UK LLP. The contents of this email and any attachments are confidential to the intended recipient. They may not be disclosed to or used by or copied in any way by anyone other than the intended recipient. If this email is received in error, please contact DLA Piper Rudnick Gray Cary UK LLP on +44 (0) 8700 11 quoting the name of the sender and the email address to which it has been sent and then delete it. Please note that neither DLA Piper Rudnick Gray Cary UK LLP nor the sender accept any responsibility for viruses and it is your responsibility to scan or otherwise check this email and any attachments. DLA Piper Rudnick Gray Cary UK LLP is a limited liability partnership registered in England and Wales (registered number OC307847) which provides services from offices in England, Belgium, Germany and the People's Republic of China. A list of members is open for inspection at its registered office and principal place of business 3 Noble Street, London EC2V 7EE. Partner denotes member of a limited liability partnership. DLA Piper Rudnick Gray Cary UK LLP is regulated by the Law Society and is a member of DLA Piper Rudnick Gray Cary, a global legal services organisation, the members of which are separate and distinct legal entities. For further information, please refer to www.dlapiper.com.
Re: AW: No action instance for path /Admin could be created
Yes, It extends org.apache.struts.Action class. I am putting files that I have used: struts-config.xml http://jakarta.apache.org/struts/dtds/struts-config_1_2.dtd";> AdminAction class is with in classes/shailesh package shailesh; import org.apache.struts.action.*; import javax.servlet.http.*; import java.io.*; import javax.servlet.ServletException; class AdminAction extends org.apache.struts.action.Action { String target=null; public ActionForward execute(ActionMapping map, ActionForm form, HttpServletRequest req, HttpServletResponse res) throws IOException, ServletException{ target="x"; return(map.findForward(target)); } } Shailesh Agarwal - How much free photo storage do you get? Store your friends n family photos for FREE with Yahoo! Photos. http://in.photos.yahoo.com
ActionForm::reset method
My app contains a few forms. Each form has one ActionForm and one Action class associated. Each time page with form is displayed I see that ActionForm::reset method is displayed. After submitting I can see that reset method is launched again, and right after that ActionForm::execute. Is it proper behaviour? -- Pozdrawiam, Janek Ziniewicz gg: 902858 irc.freenode.net: #gore, #dub - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Error messages in login page doesn't show up
Hello all, I have a little problem with displaying an "Invalid login" message on my login page. I am using tomcat 5.0.28 and struts 1.2.4 I have a login.jsp that looks like this: In my ActionForm, the validate method looks like this: public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) { ActionErrors errors = new ActionErrors(); if (userName == null || userName.length() == 0) { errors.add("username", new ActionMessage("errors.username.required")); } if (password == null || password.length() == 0) { errors.add("password", new ActionMessage("errors.password.required")); } return errors; } When I leave username or password fields empty, I get the proper error messages as I expect, however, in my Action class "LoginAction" I have the following code to handel illegal logins: if (user != null) { fwd = mapping.findForward(SUCCESS); session.setAttribute("userName", userName); session.setAttribute("user", user); } else { ActionMessages errors = new ActionMessages(); errors.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage("errors.invalidlogin")); saveMessages(request, errors); fwd = mapping.findForward(ERROR); log.info(userName + " tried to login with invalid credentials."); } I have the "errors.invalidlogin" in application.properties file: errors.invalidlogin=Invalid username and password combination. (Other messages in that file are displayed properly, so the file is read and found by struts and the servlet container.) My struts-config.xml has these relevant tags: Does anybody have a clue as to what I am doing wrong? As far as I can see, I'm doing everything the way it is described in the jakarta o'reilly book (Cavaness). Thank you all very much in advance for any input, Ian. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: No action instance for path /Admin could be created
Did you check, that your own Action extends the org.apache.struts.action.Action class? HTH John -Ursprüngliche Nachricht- Von: shailesh agarwal [mailto:[EMAIL PROTECTED] Gesendet: Mittwoch, 8. Juni 2005 12:25 An: user@struts.apache.org Betreff: No action instance for path /Admin could be created type Status report message No action instance for path /Admin could be created description The server encountered an internal error (No action instance for path /Admin could be created) that prevented it from fulfilling this request. i am facing these problem I have properly configured struts-config.xml my action file is properly compiled Please help Shailesh Agarwal - Free antispam, antivirus and 1GB to save all your messages Only in Yahoo! Mail: http://in.mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How do you write a regular expression for allowing single quotes in a word
\' should work Thanks Guru - As dark as the inside of a needle -Brodsky - Original Message - From: "Harland, David" <[EMAIL PROTECTED]> To: Sent: Wednesday, June 08, 2005 1:07 PM Subject: How do you write a regular expression for allowing single quotes in a word How do you write a regular expression for allowing single quotes in a word eg. O'reilly Many thanks Dave. This e mail is from DLA Piper Rudnick Gray Cary UK LLP. The contents of this email and any attachments are confidential to the intended recipient. They may not be disclosed to or used by or copied in any way by anyone other than the intended recipient. If this email is received in error, please contact DLA Piper Rudnick Gray Cary UK LLP on +44 (0) 8700 11 quoting the name of the sender and the email address to which it has been sent and then delete it. Please note that neither DLA Piper Rudnick Gray Cary UK LLP nor the sender accept any responsibility for viruses and it is your responsibility to scan or otherwise check this email and any attachments. DLA Piper Rudnick Gray Cary UK LLP is a limited liability partnership registered in England and Wales (registered number OC307847) which provides services from offices in England, Belgium, Germany and the People's Republic of China. A list of members is open for inspection at its registered office and principal place of business 3 Noble Street, London EC2V 7EE. Partner denotes member of a limited liability partnership. DLA Piper Rudnick Gray Cary UK LLP is regulated by the Law Society and is a member of DLA Piper Rudnick Gray Cary, a global legal services organisation, the members of which are separate and distinct legal entities. For further information, please refer to www.dlapiper.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
No action instance for path /Admin could be created
type Status report message No action instance for path /Admin could be created description The server encountered an internal error (No action instance for path /Admin could be created) that prevented it from fulfilling this request. i am facing these problem I have properly configured struts-config.xml my action file is properly compiled Please help Shailesh Agarwal - Free antispam, antivirus and 1GB to save all your messages Only in Yahoo! Mail: http://in.mail.yahoo.com
Re: How do I use JAAS(JbossSX) in Struts?
I don't know! It's not clear what you want. Let me turn the question round: in your web.xml why do you think that protecting /HelpDesk/bruger/* should also protect /DB/home? Adam PS: as an OO developer, your action class's name "ToDBAction" makes me writhe in agony - hoping I'm not being patronising - before you write an app that does more than "hello world", you should check out the commonest design patterns and start using a decent naming and coding convention - to avoid pain later. On 08/06/05 10:03 marc wrote: Sorry the late reply, had som problems with me mailserver last night. * Why do I need the /DB/home url in web.xml. Is't this enough /HelpDesk/bruger/* in the ? Marc Adam Hardy wrote: You need to put that /DB/home url pattern in your web.xml otherwise the servlet container won't force you to login when requesting it. Adam On 07/06/05 13:02 marc wrote: Ok seems like it is not working well at all. Me login is logging me in ok. But it seems like neither me web.xml or my struts actions is looking in me roles. I have a admin user wdkmaol, that has the admin role. To test things I made this code in the login action: ** Subject testsub = lc.getSubject(); Set testset = testsub.getPrincipals(); Iterator ite = testset.iterator(); while (ite.hasNext()){ System.out.println("CYKLE CYKLE: "+ite.next().toString()); } *** This prints out: *** CYKLE CYKLE: wdkmaol CYKLE CYKLE: Roles(members:admin) *** So I should be in the right role. Then I put this in me web.xml: *** Secure Content /HelpDesk/bruger/* admin NONE *** But there is no problem going to /HelpDesk/bruger/adduser, as the admin. Last but not least I didt this in some action's to test: *** *** When I try to access this it comes back with: *** User is not authorized to access action /DB/home *** Even thow Im in the admin role. Im I missing something?? - 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 do you write a regular expression for allowing single quotes in a word
How do you write a regular expression for allowing single quotes in a word eg. O'reilly Many thanks Dave. This e mail is from DLA Piper Rudnick Gray Cary UK LLP. The contents of this email and any attachments are confidential to the intended recipient. They may not be disclosed to or used by or copied in any way by anyone other than the intended recipient. If this email is received in error, please contact DLA Piper Rudnick Gray Cary UK LLP on +44 (0) 8700 11 quoting the name of the sender and the email address to which it has been sent and then delete it. Please note that neither DLA Piper Rudnick Gray Cary UK LLP nor the sender accept any responsibility for viruses and it is your responsibility to scan or otherwise check this email and any attachments. DLA Piper Rudnick Gray Cary UK LLP is a limited liability partnership registered in England and Wales (registered number OC307847) which provides services from offices in England, Belgium, Germany and the People's Republic of China. A list of members is open for inspection at its registered office and principal place of business 3 Noble Street, London EC2V 7EE. Partner denotes member of a limited liability partnership. DLA Piper Rudnick Gray Cary UK LLP is regulated by the Law Society and is a member of DLA Piper Rudnick Gray Cary, a global legal services organisation, the members of which are separate and distinct legal entities. For further information, please refer to www.dlapiper.com.
Re: Question about property files
It also works as follows; I have an entry within the struts config file that looks like; And within the package "com.mycompany.resources" i have the resource files; ApplicationResources.properties ApplicationResources_nl.properties This works for me but i know that the application's classpath should be used like McDonnell said. But i can't recall if they automatically are loaded and how the entry should be in the struts config file if that location is used. On 6/8/05, Paul Goepfert <[EMAIL PROTECTED]> wrote: > Just a quick question, I have written a message resource foor part of > my application. I have added the message-resource to my struts > configuration. However when I run my web app the properties file is not > loaded. I know its the location. Here is my question, where in the > web app directory structure do I place the propperties file? I am > asking on this list because it iis an entry in the struuts-config file. > > -Paul > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- JL [JavaLists dot com] The mailing list resource for Java developers http://www.javalists.com/ [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How do I use JAAS(JbossSX) in Struts?
Sorry the late reply, had some problems with me mail server. Yeah I got the . Why do I need Shouldn't this /HelpDesk/bruger/* in me web.xml, just restrict me to all under this? Marc Vance Karimi wrote: I'm presuming you also have the following in your web.xml: Admin user allowed to invoke all methods admin to define the security roles used? If you change your action path to reflect the url pattern for the 'admin' role secured resource, it should certainly work and should not require the role attribute like this: Vance -Original Message- From: news [mailto:[EMAIL PROTECTED] On Behalf Of marc Sent: Tuesday, 7 June 2005 8:03 PM To: user@struts.apache.org Subject: Re: How do I use JAAS(JbossSX) in Struts? Ok seems like it is not working well at all. Me login is logging me in ok. But it seems like neither me web.xml or my struts actions is looking in me roles. I have a admin user wdkmaol, that has the admin role. To test things I made this code in the login action: ** Subject testsub = lc.getSubject(); Set testset = testsub.getPrincipals(); Iterator ite = testset.iterator(); while (ite.hasNext()){ System.out.println("CYKLE CYKLE: "+ite.next().toString()); } *** This prints out: *** CYKLE CYKLE: wdkmaol CYKLE CYKLE: Roles(members:admin) *** So I should be in the right role. Then I put this in me web.xml: *** Secure Content /HelpDesk/bruger/* admin NONE *** But there is no problem going to /HelpDesk/bruger/adduser, as the admin. Last but not least I didt this in some action's to test: *** *** When I try to access this it comes back with: *** User is not authorized to access action /DB/home *** Even thow Im in the admin role. Im I missing something?? I followed this howto, to get it work: http://www.javaworld.com/javaforums/showflat.php?Cat=2&Board=JavaSecurity&; Number=2500&page=0&view=collapsed&sb=5&o=&fpart=1 Vance Karimi wrote: I use xdoclet and since Struts 1.1 you can do something like this in your Action class where you can specify the list of Roles that have access to this action. /** * @struts.action * name="CustomerCreateForm" * path="/operator/customers/customer/CustomerAddAction" * input="/operator/customers/customer/CustomerCreatePage.jsp" * scope="request" * validate="true" * roles = "Admin,Operator" ... However I have settled for declarative security with JBossSX and define the context relative URLs to protect with specified roles in my web.xml. But I presume you are doing this anyway if using JBossSX. -Original Message- From: news [mailto:[EMAIL PROTECTED] On Behalf Of marc Sent: Friday, 3 June 2005 10:03 PM To: user@struts.apache.org Subject: Re: How do I use JAAS(JbossSX) in Struts? Yeah looks cool and works with Velocity. I'm working on getting it to work in me project. But I still need to have access controls on me different action's. Vance Karimi wrote: Have a look at the Struts Menu plugin http://struts-menu.sourceforge.net/ - 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 do I use JAAS(JbossSX) in Struts?
Sorry the late reply, had som problems with me mailserver last night. * Why do I need the /DB/home url in web.xml. Is't this enough /HelpDesk/bruger/* in the ? Marc Adam Hardy wrote: You need to put that /DB/home url pattern in your web.xml otherwise the servlet container won't force you to login when requesting it. Adam On 07/06/05 13:02 marc wrote: Ok seems like it is not working well at all. Me login is logging me in ok. But it seems like neither me web.xml or my struts actions is looking in me roles. I have a admin user wdkmaol, that has the admin role. To test things I made this code in the login action: ** Subject testsub = lc.getSubject(); Set testset = testsub.getPrincipals(); Iterator ite = testset.iterator(); while (ite.hasNext()){ System.out.println("CYKLE CYKLE: "+ite.next().toString()); } *** This prints out: *** CYKLE CYKLE: wdkmaol CYKLE CYKLE: Roles(members:admin) *** So I should be in the right role. Then I put this in me web.xml: *** Secure Content /HelpDesk/bruger/* admin NONE *** But there is no problem going to /HelpDesk/bruger/adduser, as the admin. Last but not least I didt this in some action's to test: *** *** When I try to access this it comes back with: *** User is not authorized to access action /DB/home *** Even thow Im in the admin role. Im I missing something?? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: access session object
if you're running servlet container that supports 2.4 servlet specs and you web app is also configured to be of version 2.4, thru element in your xml: ${myobject} in your JSP should print it. in scriptlets: <%=session.getAttribute("myobject")%> should work. "session" is reference to current session is available for all the JSPs. HTH. ATTA P.S By the way, and no offence please, this isn't a Struts question as much as a JSP question. On 6/7/05, Tony Smith <[EMAIL PROTECTED]> wrote: > Hi: > > In my Action class, I stored a object in session with > > HttpSession session = request.getSession(); > session.setAttribute("myobject", object); > > How can I access this object from jsp? > > Thanks, > > > > > __ > Yahoo! Mail > Stay connected, organized, and protected. Take the tour: > http://tour.mail.yahoo.com/mailtour.html > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [ANNOUNCEMENT] Struts Dialogs: DispatchAction on steroids
Michael, I too like Jack concentrated on SelectAction, purely because it was first in the text. Looking at your description of DialogAction, I read the first paragraph about DialogAction and didn't feel it was worth reading further - having read about SelectAction (on the basis of your name) I then read that desc of DialogAction and came across some amazingly non-descriptive stuff like "accepting input data, dispatching submit event to a > > method, generating error messages and rendering a view" (hmm, sounds like my hello world servlet) And then I stopped reading :O From looking further at the description, it does look interesting, but hey, this is the internet - 4 seconds and I'm gone! ;) On 08/06/05 07:08 Michael Jouravlev wrote: You do understand that SelectAction is actually just a helper, and the real story is DialogAction, do you? Have you seen the Login Control example? On 6/7/05, Dakota Jack <[EMAIL PROTECTED]> wrote: SelectAction is really old news and is what all the apps that use multiple select image buttons do only with a lot less bloating of the code See http://www.michaelmcgrady.com/button/ On 6/7/05, Michael Jouravlev <[EMAIL PROTECTED]> wrote: Struts Dialogs is an extension of Struts actions that provides an improved user experience along with event-based programming model. Struts Dialogs currently consists of two action classes: SelectAction and DialogAction. SelectAction SelectAction is an abstract Action that dispatches an HTTP form submission event to a handler method. The purpose of this class is processing submission of HTML forms. Unlike DispatchAction and LookupDispatchAction, which correlate value attribute of submit form element with handler method, SelectAction uses name attribute. This allows to display a user-friendly caption on a submit button. Also, it is possible to change button caption without rebuilding the application. DialogAction DialogAction is an abstract Action that provides basic dialog functions, like accepting input data, dispatching submit event to a method, generating error messages and rendering a view. DialogAction allows to create robust user inteface and provides simple event-based programming model. DialogAction incorporates several innovative design decisions not previously used in Struts. Some of them are already implemented in other frameworks, like Ruby on Rails or JSF. Other features are unique to DialogAction. The cornerstone concept of DialogAction is separation of input and output processes. This solves several issues, related to HTML form input, like double submit problem, annoying POSTDATA messages, bad usability when Reload, Back and Forward buttons are used. DialogAction defines three different modes of operation: * action initialization prepares action for use with new set of data; * user input process accepts input data, updates domain model, generates error messages; * view rendering process generates a result page. Separation of input and output improves usability and user experience: * Any page can be reloaded without resending input information to the server. * As a consequence, an application does not have to cope with double submits. * Another consequence is that a user does not see "Do you want to resend POSTDATA?" message. * Using Back and Forward buttons is safe, because only result pages are browsed. - Documents, files, samples - Online samples: http://www.superinterface.com/strutsdialog Documentataion: http://wiki.java.net/bin/view/Projects/StrutsDialogs If you cannot see pictures on SelectAction and DialogAction pages, you might need to register and login to java.net. But it should work without logging in. Source code for DialogAction and amples is located at: Folder: https://easywizard.dev.java.net/servlets/ProjectDocumentList?folderID=3494&expandFolder=3494&folderID=3494 File name: strutsdialog.zip Michael Jouravlev. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- "You can lead a horse to water but you cannot make it float on its back." ~Dakota Jack~ - 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 do you dynamically create a select with one of the options selected
Dave, You can use the select and options tags provided in the struts-html taglib Example : Regards, Abhinav -Original Message- From: Harland, David [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 08, 2005 1:22 PM To: user@struts.apache.org Subject: How do you dynamically create a select with one of the options selected How do you dynamically create a select with options for example from a DB and flag one of the options to be selected. The only way I can think of is to write my own tag. Regards Dave. This e mail is from DLA Piper Rudnick Gray Cary UK LLP. The contents of this email and any attachments are confidential to the intended recipient. They may not be disclosed to or used by or copied in any way by anyone other than the intended recipient. If this email is received in error, please contact DLA Piper Rudnick Gray Cary UK LLP on +44 (0) 8700 11 quoting the name of the sender and the email address to which it has been sent and then delete it. Please note that neither DLA Piper Rudnick Gray Cary UK LLP nor the sender accept any responsibility for viruses and it is your responsibility to scan or otherwise check this email and any attachments. DLA Piper Rudnick Gray Cary UK LLP is a limited liability partnership registered in England and Wales (registered number OC307847) which provides services from offices in England, Belgium, Germany and the People's Republic of China. A list of members is open for inspection at its registered office and principal place of business 3 Noble Street, London EC2V 7EE. Partner denotes member of a limited liability partnership. DLA Piper Rudnick Gray Cary UK LLP is regulated by the Law Society and is a member of DLA Piper Rudnick Gray Cary, a global legal services organisation, the members of which are separate and distinct legal entities. For further information, please refer to www.dlapiper.com. *** CAUTION - Disclaimer ** This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely for the use of the addressee(s). If you are not the intended recipient, please notify the sender by e-mail and delete the original message. Further, you are not to copy, disclose, or distribute this e-mail or its contents to any other person and any such actions are unlawful. This e-mail may contain viruses. Infosys has taken every reasonable precaution to minimize this risk, but is not liable for any damage you may sustain as a result of any virus in this e-mail. You should carry out your own virus checks before opening the e-mail or attachment. Infosys reserves the right to monitor and review the content of all messages sent to or from this e-mail address. Messages sent to or from this e-mail address may be stored on the Infosys e-mail system. ***INFOSYS End of Disclaimer INFOSYS*** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
How do you dynamically create a select with one of the options selected
How do you dynamically create a select with options for example from a DB and flag one of the options to be selected. The only way I can think of is to write my own tag. Regards Dave. This e mail is from DLA Piper Rudnick Gray Cary UK LLP. The contents of this email and any attachments are confidential to the intended recipient. They may not be disclosed to or used by or copied in any way by anyone other than the intended recipient. If this email is received in error, please contact DLA Piper Rudnick Gray Cary UK LLP on +44 (0) 8700 11 quoting the name of the sender and the email address to which it has been sent and then delete it. Please note that neither DLA Piper Rudnick Gray Cary UK LLP nor the sender accept any responsibility for viruses and it is your responsibility to scan or otherwise check this email and any attachments. DLA Piper Rudnick Gray Cary UK LLP is a limited liability partnership registered in England and Wales (registered number OC307847) which provides services from offices in England, Belgium, Germany and the People's Republic of China. A list of members is open for inspection at its registered office and principal place of business 3 Noble Street, London EC2V 7EE. Partner denotes member of a limited liability partnership. DLA Piper Rudnick Gray Cary UK LLP is regulated by the Law Society and is a member of DLA Piper Rudnick Gray Cary, a global legal services organisation, the members of which are separate and distinct legal entities. For further information, please refer to www.dlapiper.com.
Pb with html:link
Hello, I have a JSP (resultat.jsp) in which there's : Suppression This is working perfectly. This JSP includes another one : This is still working perfectly. But when I put the html:link in the headerRecherche.jsp , I get a NullPointerException... And this is not working perfectly anymore! ;-) In my struts-config.xml, I have : Thanks for your help. Jean-Marie Tinghir - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Question about property files
The properties file should be in the application's classpath, typically under WEB-INF/classes -Original Message- From: Paul Goepfert [mailto:[EMAIL PROTECTED] Sent: 08 June 2005 07:03 To: user@struts.apache.org Subject: Question about property files Just a quick question, I have written a message resource foor part of my application. I have added the message-resource to my struts configuration. However when I run my web app the properties file is not loaded. I know its the location. Here is my question, where in the web app directory structure do I place the propperties file? I am asking on this list because it iis an entry in the struuts-config file. -Paul - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] If you are not an intended recipient of this e-mail, please notify the sender, delete it and do not read, act upon, print, disclose, copy, retain or redistribute it. Click here for important additional terms relating to this e-mail. http://www.ml.com/email_terms/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]