RE: Logout in a container-managed security environment
Hi, I am not sure how Container-managed login security will affect Struts loginform and loginaction. How do you forward to the main screen after login in this case? bye, Mohan -Original Message- From: Eddie Bush [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 24, 2002 10:43 PM To: Struts Users Mailing List Subject: Re: Logout in a container-managed security environment It all falls under Container-Managed Authentication. It's just a different authentication method. FORM-based authentication is what you see ... on a lot of sites :-) (either that or custom [roll-your-own] authentication) where you get the login prompt in the form of an actual page. The keys are: - submit to action=j_security_check - field named j_username - field named j_password You would configure your security-constraints the same way you do now. This is a servlet specification thing. The only thing that you (should) have to change is the type of authentication (there is additional configuration for form-based auth - must specify login page and error page). Apart from the minor differences in configuration, it really is as straight-forward as the above. Note that you'll have to configure a realm for the container to lookup the users in. This could be a flat-file, a DBMS, or JNDI resource. Of course, you could probably roll your own here too (Tomcat lets you anyway), so you're not really constrained to using only those provided. For more information on realms, see your servlet container's user guide - that is container specific (the configuration is anyway). Oh, nevermind - you had to do that for BASIC as well - duh. Ok :-) That's really it. Here is my form-based auth config - it should look strikingly similar to what you already have ;-) login-config auth-methodFORM/auth-method form-login-config form-login-page/member/login/cmaLogin.jsp/form-login-page form-error-page/member/login/error.jsp/form-error-page /form-login-config /login-config I reference Jason Hunter's book Java Servlet Programming, and also Hans Bergsten's book Java Server Pages (both from O'Reilly). Both of them include information on this topic. I think I tend to refer to Hans' book more often though ... though I'm not sure why :-) I think it's because that's the one I have it bookmarked in. You should also be able to reference the servlet specification itself. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Tiles extend
Thanks Devin It's a solution, but if I put in the inherited definition an attribute with a the null value (put name=menu value=null /) it must work, isn't it? I think this is a bug of the distribution that it'll be repaired in next build. Best regards - Miguel Ángel Medina López Logic Factory: www.logic-factory.com Granada - España - Original Message - From: Richards, Devin N (Devin) [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Tuesday, September 24, 2002 8:54 PM Subject: RE: Tiles extend we just created a JSP that contained only a nbsp; and passed that in place of the null. -Devin -Original Message- From: Miguel Angel Medina Lopez [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 24, 2002 2:44 PM To: Struts Users Mailing List Subject: Re: Tiles extend Thank you Padma I have resolved the problem. I'm using EasyStruts for JBuilder and the source code for the tiles-defs.xml when I extend a definitions put the attribute path=, then the class you say detect that the path isn't null. I have edited the file and erase this attribute, and it's work. Sorry. Now, I have a new error extending tiles definitions. I want to override an attribute with the value null, so isn't appear in the definitive page. The code: definition name=privado.default path=/WEB-INF/paginas/plantillas/plantillaPrivada.jsp put name=menu value=/WEB-INF/paginas/comunes/menuPrivado.jsp / put name=cabecera value=/WEB-INF/paginas/comunes/cabeceraPrivado.jsp / /definition definition name=privado.error extends=privado.default put name=menu value=null / /definition With this the application use the value of the parent.If the value of the attribute is a real JSP, not the null value, it's works fine. Can you help me. Thank you - Miguel Ángel Medina López Logic Factory: www.logic-factory.com Granada - España - Original Message - From: Padma Ginnaram [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Sent: Tuesday, September 24, 2002 6:46 PM Subject: RE: Tiles extend I had a simillar problem using tiles(version prior to 1.1) and enclosed is an email discussing the issue. See if this fix works for you. - Padma -Original Message- From: Miguel Angel Medina Lopez [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 24, 2002 12:30 PM To: Struts Users Mailing List Subject: Tiles extend Hi all: I'm developing my first aplication with struts and tiles. I define the tiles in a XML file and I wanted to extend a definition. In the documentation said when I extend a definition only must fill the attributes name and extends, but not path because it's extended. However when I did that an error occur (Cannot get request dispatcher for path). If I put the same path in both definitions it works fine. Is it a bug or always a must fill the path attribute. I'm using Struts 1.1 beta2. Thank you - Miguel Ángel Medina López Logic Factory: www.logic-factory.com Granada - España -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- -- -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Struts tags for display a collection of views
Excuse me I do not understand the direction of your answer. I already read documentation about tags offered by struts. For displaying a list of objects it seems that there are two possible choices logic:iterate and nested tags. The problem that I meet today in the construction of my page to displaying data several similar sights seemed me common. This is why I sought of the assistance on this forum. I find interessant very to be able to exchange our knowledge, and our experiments that makes it possible to reduce times of development considerably. I know that the tutoriaux ones and documentation exist but the examples given are often simple. On the other hand the users of Struts like you and me, build more complex cases. Sandra, -Original Message- From: Galbreath, Mark [mailto:[EMAIL PROTECTED]] Sent: 24 September 2002 19:10 To: 'Struts Users Mailing List' Subject: RE: Struts tags for display a collection of views This would require a tutorial (or two). I would suggest you do one, then ask a question. Mark -Original Message- From: Heligon Sandra [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 24, 2002 12:10 PM Hi, I don't know HTML/Struts tags very well, I would like to know if it is possible to display this kind of view: Previous | | Next | | | (body) | | | In fact I have to display a list that can have a large size and multiple views are required. The buttons Previous and next all to navigate from one view to another. Could you explain me how this type of views is managed ? Thanks a lot -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Accessing the Commons Logging Interface
Hi all, In Struts 1.1b2, how do I access the Commons Logging Interface from withing a Struts Plug-In? 1. The chapter in the User Guide is still [TO DO] 2. It seems that the log static member field from within ActionServlet is not public. 3. I have not found any getLog member function anywhere... Seems like a missing feature... Any ideas? Thanks! Tal Rotbart -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Logging with Struts on RI: was Redirected to index.jsp unexpectedly
Folks Know I can't expect people on mailing lists to solve all my problems but I was surprised that nobody could help with logging issue below. Has anyone used Struts successfully with the Sun J2EE Reference Implementation (1.3.1)? Does anyone know where the logs should be? Thanks. In message [EMAIL PROTECTED], Geoff Seel [EMAIL PROTECTED] writes Joe Thanks for suggestions. Have put sys-outs into TopLevelAction and even logs and a sys-out into a version of ActionServlet but don't see anything in logs. Using Sun RI 1.3.1, which I thought was Tomcat based, expected to find output in catalina.date.log. Anyone know where log stuff should be appearing? -- Geoff Seel Voice: +44 (0)20-8296-0684 Financial Object Toolkits Ltd. Mobile: 0797-688-0668 54, Berrylands Road,Fax:+44 (0)870-054-7931 Surbiton, e-mail: [EMAIL PROTECTED] Surrey KT5 8PD WWW:www.foto.co.uk United Kingdom -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Logging with Struts on RI: was Redirected to index.jsp unexpectedly
Standard output should be in stdout.log, in $CATALINA_HOME/logs... The logs with the dates are when the commons logging interface is used, methinks. Tal - Original Message - From: Geoff Seel [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wednesday, September 25, 2002 11:19 AM Subject: Logging with Struts on RI: was Redirected to index.jsp unexpectedly Folks Know I can't expect people on mailing lists to solve all my problems but I was surprised that nobody could help with logging issue below. Has anyone used Struts successfully with the Sun J2EE Reference Implementation (1.3.1)? Does anyone know where the logs should be? Thanks. In message [EMAIL PROTECTED], Geoff Seel [EMAIL PROTECTED] writes Joe Thanks for suggestions. Have put sys-outs into TopLevelAction and even logs and a sys-out into a version of ActionServlet but don't see anything in logs. Using Sun RI 1.3.1, which I thought was Tomcat based, expected to find output in catalina.date.log. Anyone know where log stuff should be appearing? -- Geoff Seel Voice: +44 (0)20-8296-0684 Financial Object Toolkits Ltd. Mobile: 0797-688-0668 54, Berrylands Road,Fax:+44 (0)870-054-7931 Surbiton, e-mail: [EMAIL PROTECTED] Surrey KT5 8PD WWW:www.foto.co.uk United Kingdom -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Help needed with ActionForm Bean
thanks for your reply, perhaps there's something I've haven't understand: I'd like to display in my select dropdown data that come from a database... where should I get this data from the DB this should be done before the call of the getXXX method of the ActionForm when. Should I use an action where I get data from the DB and forward it to the action associated with the jsp page containing the form?? is it the way to do it? Vincent Galbreath, Mark wrote: It's magic. Seriously, your getters and setters in your ActionForm bean correspond to the HTML input fields in your JSP. So if you have a select dropdown in the JSP called state, in some HTML form for collecting personal information you could have private state = ; public void setState( String state) { this.state = state; } public String getState() { return state; } in your Action form. In order to make Struts aware of this bean, you must declare in your struts-config.xml file and have an action path mapped from your JSP to an Action class that will manipulate the bean values that are set by Struts: form-bean name=PersonalInfoForm type=com.whatever.PersonInfoForm / action path=/personalInfo type=com.whatever.GetPersonalInfoAction name=PersonalInfoForm scope=session validate=true parameter=isNew forward name=success path=/personalInfo.jsp / forward name=error path=/errors.jsp / /action So this associates your bean with your JSP and your ActionClass. When your user goes to http://yoursite/personalInfo.do (depending on the mapping in your web.xml), personalInfo.jsp will be invoked and the rendered HTML displayed. After the user fills out the form and submits (for example, the form action is /reviewPersonalInfo which will display everything the user just entered), the following action path is invoked: action path=/reviewPersonalInfo type=com.whatever.SavePersonalInfoAction name=PersonalInfoForm input=/PersonalInfo.jsp scope=session validate=true parameter=isError forward name=success path=/reviewPersonalInfo.jsp / forward name=error path=/personalInfo.jsp / /action and reviewPersonalInfo.jsp will appear to display the information contained in your bean through the use of Struts tags. At this point you can also access the bean's state in your Action class through the form object to save it to a database or whatever. Okay? Mark (That should have earned me a few [OT/FRIDAY] msgs, eh?) -Original Message- From: Vincent Berruchon [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 24, 2002 11:19 AM Hi, I'm still newie and really confused on how to get HTML form filled with struts... I want to fill a select input in a form in one of my JSP. So I've write an ActionForm Bean with the get and set methods for each properties corresponding to an input on the form. But I don't know where these set methods are (or should) be called to fill actionForm properties before the calls to the get methods? Can someone help us? -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Logout in a container-managed security environment -- Follow-up
All: Just to close the loop: The 404 not-found error I was receiving was coming from the Apache webserver; when I switched to using the Tomcat servlet container standalone, FORM-based authentication -- set up as per the advice of those of you who replied -- worked properly. I *thought* that I had Apache configured to pass everything through to Tomcat, but obviously, I have something wrong in my Apache configuration. I'll take a look at that in the near future. Thanks again, -- Charlie -Original Message- From: Charles McClain [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 24, 2002 7:10 PM To: Struts User Mailing List Subject: Logout in a container-managed security environment -- Follow-up All: I received several replies to my original question, all of which indicated that, in order to do a forceful logout, I needed to use FORM-based CMA rather than BASIC. One of the replies recommended an article on the topic, which I downloaded and read. I implemented FORM-based authentication, making the changes to my web.xml, indicating the login form and error page, etc. The container (Tomcat 4.0) seems to know that I want FORM-based authentication, since it pops up my login page. I did, by the way, include the fields j_username and j_password, and my form action is j_security_check, as per the instructions. However, when I press the submit button, my browser gives me a 404 not-found error on the (nonexistent, of course) page j_security_check. I've checked the Apache and Tomcat logs, and one of the Tomcat logs tells me that it has Configured an authenticator for method FORM, but it still seems to be looking for a page by that name rather than invoking the method. Anyone have any ideas? Charles McClain Phone: 603.659.2046 email:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Logout in a container-managed security environment -- Follow-up
Charles, The thing to keep in mind is that you cannot call the login page directly. Rather, you have to call a protected page, which will trigger the login page, then will post to the j_security_check, and the container will then forward to the protected page if the user authenticated correctly. It seems that most containers do not register the j_security_check directly, but rather look for it once a protected resource has been requested. HTH, James -Original Message- From: Charles McClain [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 24, 2002 6:10 PM To: Struts User Mailing List Subject: Logout in a container-managed security environment -- Follow-up All: I received several replies to my original question, all of which indicated that, in order to do a forceful logout, I needed to use FORM-based CMA rather than BASIC. One of the replies recommended an article on the topic, which I downloaded and read. I implemented FORM-based authentication, making the changes to my web.xml, indicating the login form and error page, etc. The container (Tomcat 4.0) seems to know that I want FORM-based authentication, since it pops up my login page. I did, by the way, include the fields j_username and j_password, and my form action is j_security_check, as per the instructions. However, when I press the submit button, my browser gives me a 404 not-found error on the (nonexistent, of course) page j_security_check. I've checked the Apache and Tomcat logs, and one of the Tomcat logs tells me that it has Configured an authenticator for method FORM, but it still seems to be looking for a page by that name rather than invoking the method. Anyone have any ideas? Charles McClain Phone: 603.659.2046 email:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:struts-user- [EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Accessing the Commons Logging Interface
import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; In your class: static private Log log = LogFactory.getLog(MyClass.class); Corneil du Plessis Technical Specialist Internet Development Retail Channels Standard Bank Direct +27 (11) 636-2210 Mobile +27 (83) 442-9221 ICQ# 66747137 -Original Message- From: Tal Rotbart [mailto:[EMAIL PROTECTED]] Sent: 25 September, 2002 09:47 To: Struts Users Mailing List Subject: Accessing the Commons Logging Interface Hi all, In Struts 1.1b2, how do I access the Commons Logging Interface from withing a Struts Plug-In? 1. The chapter in the User Guide is still [TO DO] 2. It seems that the log static member field from within ActionServlet is not public. 3. I have not found any getLog member function anywhere... Seems like a missing feature... Any ideas? Thanks! Tal Rotbart -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] __ Disclaimer and confidentiality note Everything in this e-mail and any attachments relating to the official business of Standard Bank Group Limited is proprietary to the company. It is confidential, legally privileged and protected by law. Standard Bank does not own and endorse any other content. Views and opinions are those of the sender unless clearly stated as being that of Standard Bank. The person addressed in the e-mail is the sole authorised recipient. Please notify the sender immediately if it has unintentionally reached you and do not read, disclose or use the content in any way. Standard Bank can not assure that the integrity of this communication has been maintained nor that it is free of errors, virus, interception or interference. __ -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
url parameters not being copied to form bean
I'm not sure why but I have parameters that are not being copied to my form bean. The url written on the page is correct but when the link is followed only the parameter specified in the global forward (action=choose) is copied to the bean and (selected=N) is not. Surely it's a subtle error somewhere but can anyone suggest what exactly? I've successfully done this in other applications and this is the first time it's not worked. Thanks Rob I have a little something like the following to write my link. html:form action=foo nested:iterate parameter=items nested:link forward=viewitem paramId=selected paramName=ItemForm paramProperty=itemId Item nested:write property=itemId/ /nested:link /nested:iterate /html:form My form-bean looks like so: form-bean name=ItemForm type=web.ItemForm/ My global-forward looks like so: forward name=viewitem path=/do/viewitem?action=choose/ My action mapping looks like so: action path=/viewitem type=web.ItemAction name=ItemForm input=/WEB-INF/pages/chooseitem.jsp validate=true scope=session /action -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Logout in a container-managed security environment
Mohan: I just finished setting up container-managed FORM-based authentication and getting it working, based on advice from several people on this mailing list. I'll pass on what I learned, and others can add to it or correct my advice. I'm assuming that you know how to set up container-managed FORM-based authentication, and that your question only applies to its relationship to Struts. If that is not the case, you can review the replies I received to my original posting, or write back and I will provide detail. Container-managed FORM-based authentication is separate and apart from the Struts framework, and indeed can be applied to an application that is not based on Struts. When you set up FORM-based authentication, you specify a login page and login error page. When the user enters a URL that falls within the security-constraint and web-resource-collection you specified in your web.xml, the container takes over and pops up the login page you specified in your login-config entry. Assuming that your login page form specifies j_security_check as the action, when the user hits the submit button, control passes back to the container, which validates j_username and j_password against the container's security realm; if they are valid, then the container passes control to the welcome-page specified in your web.xml. If they are invalid, the container passes control the error page you specified. Since this validation is performed by the container, you do NOT want a Struts ActionForm associated with the login page, nor do you want an Action associated with it. If you have prep work you need performed, you should perform it in the Action associated with your welcome page. It will get performed when the login passes the container's validation and the container passes control to your welcome page. It IS useful, however, to have a global-forward back to the login page, so that your login error page can direct the user back to the login page, to re-login after an error, and so that, after he logs out, your logout confirmation page can direct him back to the login page. Also, your login page and login error page may contain Struts tags. Since I'm still in the process of converting my app over to FORM-based authentication, I haven't completely worked out the interaction between the container and Struts as far as subsequent login-checking is concerned. I don't think you need to check the user's login status on your JSPs and in your actions, because I think the container will force the user to the login page if he tries to enter the app in the middle via a bookmark or something. I will be testing this in the near future. However, I do know that you can gain access to the username and/or role via the Jakarta Taglib request library; for example, I originally converted my app to container-managed BASIC authentication expressly so that I could use the req:isUserInRole tag to vary menu and screen content based on the user's role. I apologize for my incomplete knowledge, and as I said, I encourage others to correct or add to what I have written, but since no one else has yet replied to you, I figured you'd rather have some reply than none. I'll be smarter in a few days, after I've had a chance to fully integrate the container-managed FORM-based authentication facility and do all my testing. -- Charlie -Original Message- From: Mohan Radhakrishnan [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 25, 2002 3:09 AM To: 'Struts Users Mailing List' Subject: RE: Logout in a container-managed security environment Hi, I am not sure how Container-managed login security will affect Struts loginform and loginaction. How do you forward to the main screen after login in this case? bye, Mohan -Original Message- From: Eddie Bush [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 24, 2002 10:43 PM To: Struts Users Mailing List Subject: Re: Logout in a container-managed security environment It all falls under Container-Managed Authentication. It's just a different authentication method. FORM-based authentication is what you see ... on a lot of sites :-) (either that or custom [roll-your-own] authentication) where you get the login prompt in the form of an actual page. The keys are: - submit to action=j_security_check - field named j_username - field named j_password You would configure your security-constraints the same way you do now. This is a servlet specification thing. The only thing that you (should) have to change is the type of authentication (there is additional configuration for form-based auth - must specify login page and error page). Apart from the minor differences in configuration, it really is as straight-forward as the above. Note that you'll have to configure a realm for the container to lookup the users in. This could be a flat-file, a DBMS, or JNDI resource. Of course, you could probably roll your own here too (Tomcat lets you anyway), so
Container Managed Security With ActionForms
After reviewing the archives on the subject of Container Managed Security I've concluded using ActionForms with CMS is not possible. However, I would like to ask the gurus of this list if in fact this is possible. Here is what I want to do... 1. Login form that submits to an ActionForm for validation. 2. After validation occurs send it to CMS. 3a. If CMS successfully authenticates a user, forward to an Action for post-processing. 3b. If CMS fails to authenticate, display error on Login page. Is this possible?
Help needed uploading files
Hello, I know this has been discussed before but the struts site seems to be playing up and I cant get into it to search the list. Anyway I am having problems getting files to upload to my server. The problem I have is when I read from the InputStream opened from the Request I get -1. In other words there is nothing to read. Is there anything I have to configure with Struts so that the files in the HTML page are uploaded properly. At the moment it seems as if they are not arriving correctly to the server. (I have ENCTYPE set to multipart etc). Thanks. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Struts tags for display a collection of views
I think you're talking about paging through a dataset a certain number of records at a time. If I'm right then we're talking about some sort of collection with a class or set of classes whose mission in life is to provide meta-data about the collection like Page 5 of 6, current selection is Record #34, etc. It's a pattern, though I'm not sure what you'd call it other than paging, though unfortunately paging makes people think of little electronic devices that annoy people automatically, so there should be a better word for it. Bottom line-- what you're talking about is something you could handle on the front end (in Javascript or some other scripting language) or the back end (in your Java classes that make up and service your Model), depending on your preferences/strengths. What Struts provides you is the framework for passing the data between the front and back end that shields you as much as possible from the details of how the servlet container works. Sometimes you'll get rather curt answers if it sounds like you're expecting Struts to provide features that are more high-level than that of a webapp framework. Don't take it personally, there are a *lot* of postings on this newsgroup, and most of them could be handled by the posters themselves if they simply read and understood the documentation more carefully. -JT -Original Message- From: Heligon Sandra [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 25, 2002 12:35 AM To: 'Struts Users Mailing List' Subject: RE: Struts tags for display a collection of views Excuse me I do not understand the direction of your answer. I already read documentation about tags offered by struts. For displaying a list of objects it seems that there are two possible choices logic:iterate and nested tags. The problem that I meet today in the construction of my page to displaying data several similar sights seemed me common. This is why I sought of the assistance on this forum. I find interessant very to be able to exchange our knowledge, and our experiments that makes it possible to reduce times of development considerably. I know that the tutoriaux ones and documentation exist but the examples given are often simple. On the other hand the users of Struts like you and me, build more complex cases. Sandra, -Original Message- From: Galbreath, Mark [mailto:[EMAIL PROTECTED]] Sent: 24 September 2002 19:10 To: 'Struts Users Mailing List' Subject: RE: Struts tags for display a collection of views This would require a tutorial (or two). I would suggest you do one, then ask a question. Mark -Original Message- From: Heligon Sandra [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 24, 2002 12:10 PM Hi, I don't know HTML/Struts tags very well, I would like to know if it is possible to display this kind of view: Previous | | Next | | | (body) | | | In fact I have to display a list that can have a large size and multiple views are required. The buttons Previous and next all to navigate from one view to another. Could you explain me how this type of views is managed ? Thanks a lot -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: indexed attribute for html tags
The documentation is not so clear on this. Basically, what happens in the case you cite is that a request parameter will be sent to the Action class you're submitting the form to that would look like ?id[34].propertyName= if it were on a query string. If that doesn't make sense to you, you need to dig a bit deeper and figure out how HTTP requests and responses work. If it does make sense, you can see for yourself what I'm talking about by spitting out the parameters when your Action class is invoked by the controller and when your JSP receives the request object back from the backend. Then you can see how all the info is passed back and forth. -Original Message- From: deepank [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 24, 2002 9:40 PM To: Struts Users Mailing List Subject: indexed attribute for html tags I would like to use indexed attribute for some html tags to handle dynamic html input elements (the number of input elements in the form is not fixed) i have read the struts user guide, but unable understand what this means. This is given for almost all html input tags indexed - Valid only inside of logic:iterate tag. If true then name of the html tag will be rendered as id[34].propertyName. Number in brackets will be generated for every iteration and taken from ancestor logic:iterate tag. (RT EXPR) WHAT DOES id[34].propertyName MEAN can somebody give me an example how to use this attribute. how will the property of a form bean and its corresponding getter/setter method look like if i want to use the indexed attribute. for example i have this in my jsp logic:iterate id=reviewer name=revFormTeamVO property=reviewers html:text indexed=true property=mail_id_v size=10 value=//TD /logic:iterate i have the form bean property mail_id_v declared as private String[] mail_id_v; public String getMail_id_v(int index) { return this.mail_id_v[index]; } public void setMail_id_v(int index, String mail_id_v) { this.mail_id_v[index] = mail_id_v; } But this does not work, i get an error, No getter method for property mail_id_v any help will be appreciated Deepank
Tiles error (Help)
I am using Tiles and when I run my application I have the following error: javax.servlet.ServletException: Can't get definitions factory from context. javax.servlet.ServletException: Can't get definitions factory from context. at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp l.java:471) at org.apache.jsp.index$jsp._jspService(index$jsp.java:96) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107) I work with Struts1.1b2, my config file is the following: servlet servlet-nameaction/servlet-name servlet-classorg.apache.struts.action.ActionServlet/servlet-class init-param param-namedefinitions-config/param-name param-value/WEB-INF/tiles-defs.xml/param-value /init-param init-param param-namedefinitions-parser-validate/param-name param-valuetrue/param-value /init-param init-param param-namevalidate/param-name param-valuetrue/param-value /init-param init-param param-namedefinitions-debug/param-name param-value1/param-value /init-param init-param param-namedebug/param-name param-value2/param-value /init-param init-param param-nameconfig/param-name param-value/WEB-INF/struts-config.xml/param-value /init-param load-on-startup2/load-on-startup /servlet What does it mean ? Thanks, Sandra -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: test.tomcat.41 failing due to LogService class
Yes, try a Tomcat mailing list for help for starters :) The test which is failing is one of the targets in the *struts* build.xml. Does anybody run (and pass) the test targets when building struts from source? Brian
Error in setting up title attribute in html text....
html:text title=FirstName property=nominatorFirstName size=16 maxlength=20 styleId=nominatorFirstName/ I am getting this error when I compile...Any suggestions? Error(34): Attribute: title is not a valid attribute name -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Logout in a container-managed security environment -- Follow-up
Yeah, that's right, but I think there is something special to to be done so that you get j_security_check to be recognized by Apache as something it needs to send to Tomcat. James Higginbotham wrote: Charles, The thing to keep in mind is that you cannot call the login page directly. Rather, you have to call a protected page, which will trigger the login page, then will post to the j_security_check, and the container will then forward to the protected page if the user authenticated correctly. It seems that most containers do not register the j_security_check directly, but rather look for it once a protected resource has been requested. HTH, James -- Eddie Bush -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Excuse me !
: 90% of the people ask questions on mail list and : reply to rehearsed answers. What are you talking about? Tom Veldhouse - Original Message - From: Zahid Rahman [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Tuesday, September 24, 2002 8:51 PM Subject: Excuse me ! snip -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
[OT] Commons Validator JavaDoc
Does anyone have the URL for the Validator JavaDoc on jakarta.apache.org? Jerry Jalenak Web Publishing LabOne, Inc. 10101 Renner Blvd. Lenexa, KS 66219 (913) 577-1496 [EMAIL PROTECTED] This transmission (and any information attached to it) may be confidential and is intended solely for the use of the individual or entity to which it is addressed. If you are not the intended recipient or the person responsible for delivering the transmission to the intended recipient, be advised that you have received this transmission in error and that any use, dissemination, forwarding, printing, or copying of this information is strictly prohibited. If you have received this transmission in error, please immediately notify LabOne at (800)388-4675. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
[Validator] What the #@$!!@# am I doing wrong?
Guys? Anyone? I'm really stuck here, and I hate to be a bother, but can anyone tell me why this doesn't work? previous-post I've got the following in my application-rules.xml file: ?xml version=1.0 encoding=ISO-8859-1? !--DOCTYPE form-validation PUBLIC -//Apache Software Foundation//DTD Struts Validator Rules Configuration 1.1//EN http://jakarta.apache.org/struts/dtds/validator-rules_1_1.dtd-- form-validation global constant name=dollarAmount value=^[0-9,.]+ / /global formset form name=/InsertAction field property=policyAmount depends=required,mask msg name=mask key=errors.invalid.character / arg0 key=InsertForm.policyAmount.displayname / var var-namemask/var-name var-value${dollarAmount}/var-value /var /field /form /formset /form-validation I've got 'errors.invalid.character' in my ApplicationResources.properties. When I enter the value 10 in the policyAmount field, Validator tells me I've got invalid characters in the field. Why? Am I just not getting the regular expression support in Validator? /previous-post Jerry Jalenak Web Publishing LabOne, Inc. 10101 Renner Blvd. Lenexa, KS 66219 (913) 577-1496 [EMAIL PROTECTED] Jerry Jalenak Web Publishing LabOne, Inc. 10101 Renner Blvd. Lenexa, KS 66219 (913) 577-1496 [EMAIL PROTECTED] This transmission (and any information attached to it) may be confidential and is intended solely for the use of the individual or entity to which it is addressed. If you are not the intended recipient or the person responsible for delivering the transmission to the intended recipient, be advised that you have received this transmission in error and that any use, dissemination, forwarding, printing, or copying of this information is strictly prohibited. If you have received this transmission in error, please immediately notify LabOne at (800)388-4675. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: [ANNOUNCE] StrutsTestCase v1.9 Released
Did you know that JSP PRO has nothing to do with announcements to this list? The person who wrote JSP PRO has an email address that originates from acm.org. -Original Message- From: Zahid Rahman [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 24, 2002 12:05 PM To: Struts Users Mailing List Subject: Re: [ANNOUNCE] StrutsTestCase v1.9 Released I asked because the email address originated from acm.org hence I asked for clarification. Different email lists work in different ways. I know with some email lists, if you wish to follow the progress of a particular project then you can simply choose to subscribe to announcements only. Best Regards, Zahid - Original Message - From: James Mitchell [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Tuesday, September 24, 2002 4:47 PM Subject: RE: [ANNOUNCE] StrutsTestCase v1.9 Released No, anyone can make an announcement to this list. It is typically done with [ANN] or [ANNOUNCEMENT] It's about proper etiquette when sending e-mail to large volumes of subscribers and isn't specific to this list, Jakarta, or even Apache. Is this the first time you've see an [ANNOUNCEMENT]? James Mitchell Software Engineer\Struts Evangelist Struts-Atlanta, the Open Minded Developer Network http://www.open-tools.org/struts-atlanta -Original Message- From: Zahid Rahman [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 24, 2002 10:12 AM To: Struts Users Mailing List; [EMAIL PROTECTED] Subject: Re: [ANNOUNCE] StrutsTestCase v1.9 Released I noticed that you have ANNOUNCEMENT as your subject header. Are you the official Struts organiser ? I am only really interested in announcements and I delete the rest ,hence I would like to make sure. Cheers, - Original Message - From: Deryl Seale [EMAIL PROTECTED] To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Tuesday, September 24, 2002 2:15 PM Subject: [ANNOUNCE] StrutsTestCase v1.9 Released StrutsTestCase v1.9 improves support for Struts 1.1b2 (including support for testing Tiles and sub-applications), provides several requested enhancements, and fixes many reported defects. The project home page can be found here: http://strutstestcase.sourceforge.net Notes for this release can be found here: http://sourceforge.net/project/shownotes.php?release_id=112307 Questions and comments are always welcome! Deryl Seale - [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Firewall and Struts inhibit CSS references
The only thing you have to worry about is how your users browsers are constructing the request for the css file. Here's some help from Ted: * Use rewrite to reference HTML assets * The Struts html:rewrite tag can convert a context-relative URI into a base URI that can be used to access style sheets, JavaScripts, images and other HTML assets. For example, LINK rel=stylesheet type=text/css HREF=html:rewrite page='/assets/styles/base.css'/ If you wanted to hedge your bets about where the style sheets will be located, an ActionForward may also be used. LINK rel=stylesheet type=text/css HREF=html:rewrite forward='baseStyle'/ Likewise, references to JavaScripts, as well as URIs to be processed by JavaScripts, can be rendered this way. SCRIPT language='javascript' SRC='html:rewrite page=/assets/scripts/remote.js/' /SCRIPT SCRIPT !-- function doScript(aScript) aBase = 'html:rewrite forward=scriptPreview/'; HC_doOpenRemote(aBase + '?script=' + aScript); } // -- /SCRIPT In the latter example, we retrieve the base URI for the JavaScript function from an ActionForward and then append the script number based to the function. This type of function would usually be called from a hyperlink like this: A HREF='javascript:doScript(10011)'10011/A that was generated using JSP code like this: A HREF='javascript:doScript(bean:write name=row property=script/)' bean:write name=row property=script/ /A Since we are calling a JavaScript function, we did not bother with a html:link tag to provide URL encoding. The hyperlink will be handled client-side so maintaining the session is not an issue. The URI generated by the rewrite tag, and subsequently used by the Javascript, will be URL encoded, so that the session will be maintained if cookies are not present. HTH - Ted. James Mitchell Software Engineer\Struts Evangelist Struts-Atlanta, the Open Minded Developer Network http://www.open-tools.org/struts-atlanta -Original Message- From: Afshartous, Nick [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 24, 2002 10:18 PM To: 'Struts Users Mailing List' Subject: RE: Firewall and Struts inhibit CSS references From: James Mitchell [mailto:[EMAIL PROTECTED]] The request made by the browser for the text file /strutstest/css/adm_01.css is handled by your web server. It never even makes it to the servlet container, much less the struts action servlet. Would it be possible that somehow the environment of the servlet or container indirectly affects the processing of the CSS link ref ? I'm asking this because when the file has a .html suffix it works fine, but with a .jsp suffix the CSS file is not applied. Also, when the URL path to the page is requested (i.e. .../test.jsp) it works fine. Its only when an action forwards to the .jsp file that the CSS file is not found/applied to the .jsp. You should consult the firewall documentation or try a bit more debugging with your firewall software. I run a very restrictive firewall on my home server and it handles .css just fine. The firewall in our case is not at the server end. The user's machine is behind a firewall looking at the outside world where the server is. When the user's machine is not behind a firewall the CSS file is applied to the .jsp and the page is rendered fine. Thanks for any info. Nick -Original Message- From: Eddie Bush [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 24, 2002 12:33 PM To: Struts Users Mailing List Subject: Re: Firewall and Struts inhibit CSS references Pardon, but I think your subject is misleading. Struts is doing nothing to inhibit your CSS references. Your firewall I don't know about - that's a different story. This is definitely not a Struts issue though :-) Afshartous, Nick wrote: We have run into an issue with references to CSS files. The references have this form link rel=STYLESHEET type=text/css href=/strutstest/css/adm_01.css We have set up the application in our DMZ and the pages are rendered fine for us, however for one of our customers who is viewing from behind a firewall, the stylesheets are not being found/applied. We have tested the pages via a non-Struts servlet and that works fine for the customer, so somehow the combination of Struts and the external firewall are causing the problem. If anyone has any suggestions please let me know, thanks. -- Nick -- Eddie Bush -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
strut 1.02 does not support title/alt attribute in text field. how can i fix that?
html:text title=FirstName property=nominatorFirstName size=16 maxlength=20 styleId=nominatorFirstName/ I am getting this error when I compile...Any suggestions? Error(34): Attribute: title is not a valid attribute name -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Logout in a container-managed security environment
There are *many* posts on precisely how CMA works on this list and on others (tomcat-user being one). I'll give a quick overview and you can STMA for additional comments. - login forced when user request restricted resource - forwards to request resource on authentication - shows error page on failed authentication - unable to directly implement a let-based login - CMA login form may not be called directly - CMA login form only invoked when restricted resource is requested You *can* work-around the force-based login, and provide a redirect to wherever you wish in the process. What I have done to implement this is: - Two login forms - one submits to j_security_check - NEVER call this form directly! ONLY The container may invoke it! - grabs credentials out of session and fills out form - contains javascript for auto-submit if required data present - one submits to a struts action (non-restricted) - copies request parameters to session - REDIRECTS to a restricted redirect action - Call the non-CMA form directly - User submits form/Action does it's thing - Redirect action is restricted, so it invokes CMA login form - Once authenticated the user goes to the Redirect action - cleans up the session (remove credentials we put there earlier) , if present - grabs a parameter indicating the path to redirect to - redirects the user Voila! It's absolutely *essential* to have redirects where I specified (in contrast to forwards), as you will not acheive the desired behavior (invoking CMA) if you do not. The specification allows you to forward anywhere you want to without the container caring where you are forwarding to (this is why you can put your pages under WEB-INF). The end result is that if you wish to let your users login before requesting a restricted resource, you can. If they don't, and they access a restricted resource, they are prompted to. It's really not that bad :-) Mohan Radhakrishnan wrote: Hi, I am not sure how Container-managed login security will affect Struts loginform and loginaction. How do you forward to the main screen after login in this case? bye, Mohan -- Eddie Bush -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: [Validator] What the #@$!!@# am I doing wrong?
Never mind. This is what happens when you look at old documentation. On Dave's web site, in the doc for Validator, there is an example of defining a constant like this - constant name=myConstant value=myValue / This does not work! The correct format (from Chuck's book) is constant constant-namemyConstant/constant-name constant-valuemyValue/constant-value /constant which works like it should. Just another one of those 'gotcha's ' that crops up every once in awhile. Jerry -Original Message- From: Jerry Jalenak [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 24, 2002 4:14 PM To: '[EMAIL PROTECTED]' Subject: [Validator] What the #@$!!@# am I doing wrong? Guys? Anyone? I'm really stuck here, and I hate to be a bother, but can anyone tell me why this doesn't work? previous-post I've got the following in my application-rules.xml file: ?xml version=1.0 encoding=ISO-8859-1? !--DOCTYPE form-validation PUBLIC -//Apache Software Foundation//DTD Struts Validator Rules Configuration 1.1//EN http://jakarta.apache.org/struts/dtds/validator-rules_1_1.dtd-- form-validation global constant name=dollarAmount value=^[0-9,.]+ / /global formset form name=/InsertAction field property=policyAmount depends=required,mask msg name=mask key=errors.invalid.character / arg0 key=InsertForm.policyAmount.displayname / var var-namemask/var-name var-value${dollarAmount}/var-value /var /field /form /formset /form-validation I've got 'errors.invalid.character' in my ApplicationResources.properties. When I enter the value 10 in the policyAmount field, Validator tells me I've got invalid characters in the field. Why? Am I just not getting the regular expression support in Validator? /previous-post Jerry Jalenak Web Publishing LabOne, Inc. 10101 Renner Blvd. Lenexa, KS 66219 (913) 577-1496 [EMAIL PROTECTED] This transmission (and any information attached to it) may be confidential and is intended solely for the use of the individual or entity to which it is addressed. If you are not the intended recipient or the person responsible for delivering the transmission to the intended recipient, be advised that you have received this transmission in error and that any use, dissemination, forwarding, printing, or copying of this information is strictly prohibited. If you have received this transmission in error, please immediately notify LabOne at (800)388-4675. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] This transmission (and any information attached to it) may be confidential and is intended solely for the use of the individual or entity to which it is addressed. If you are not the intended recipient or the person responsible for delivering the transmission to the intended recipient, be advised that you have received this transmission in error and that any use, dissemination, forwarding, printing, or copying of this information is strictly prohibited. If you have received this transmission in error, please immediately notify LabOne at (800)388-4675. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Accessing the Commons Logging Interface
Before You Start If you're planning to use Log4J as your logging implementation, grab a fresh copy of commons-logging from the commons site and install it. There were issues with the JAR included in the 1.1 bx distributions that cause ... problems :-) Doing the Nasty With commons-logging: package com.foo; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; public class Bar { private static Log log = LogFactory.getLog(Bar.class); public void baz() { ... if (log.isDebugEnabled()) log.debug(W00T!); } } That really is it. There is some property config you could possibly need if you're using Log4J under JDK1.4. You didn't say much about your environment, so I'll leave this out for now. Tal Rotbart wrote: Hi all, In Struts 1.1b2, how do I access the Commons Logging Interface from withing a Struts Plug-In? 1. The chapter in the User Guide is still [TO DO] 2. It seems that the log static member field from within ActionServlet is not public. 3. I have not found any getLog member function anywhere... Seems like a missing feature... Any ideas? Thanks! Tal Rotbart -- Eddie Bush -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
AccessControlException in Digester.getParser
Hi there, can someone give me a hint where I can start searching the reason for this exception (see full exception stack below)? I tried to install the struts examples from struts 1.0.2. As far as I understand, it is throwed because of access permission restrictions. I already tried to put a grant codeBase file:/- { permission java.security.AllPermission; } into the policy file, but nothing happened. I have Tomcat 4.0.4 installed and Xerces 2.1.0 on a Debian Linux system. Classpath is correct, Tomcat runs without any other problems. Has anyone an idea? Starting service Tomcat-Standalone Apache Tomcat/4.0.4 register('-//Apache Software Foundation//DTD Struts Configuration 1.0//EN', 'jar:file:/var/cache/tomcat4/Standalone/development.local/struts-blank/WEB-INF/lib/struts.jar!/org/apache/struts/resources/struts-config_1_0.dtd' register('-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN', 'jar:file:/var/cache/tomcat4/Standalone/development.local/struts-blank/WEB-INF/lib/struts.jar!/org/apache/struts/resources/web-app_2_2.dtd' register('-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN', 'jar:file:/var/cache/tomcat4/Standalone/development.local/struts-blank/WEB-INF/lib/struts.jar!/org/apache/struts/resources/web-app_2_3.dtd' Digester.getParser: java.security.AccessControlException: access denied (java.lang.RuntimePermission getClassLoader) at java.security.AccessControlContext.checkPermission(AccessControlContext.java:267) at java.security.AccessController.checkPermission(AccessController.java:394) at java.lang.SecurityManager.checkPermission(SecurityManager.java:540) at java.lang.ClassLoader.getParent(ClassLoader.java:687) at org.apache.catalina.loader.WebappClassLoader.toString(WebappClassLoader.java:888) at java.lang.String.valueOf(String.java:1942) at java.lang.StringBuffer.append(StringBuffer.java:365) at javax.xml.parsers.FactoryFinder.findJarServiceProvider(Unknown Source) at javax.xml.parsers.FactoryFinder.find(Unknown Source) at javax.xml.parsers.SAXParserFactory.newInstance(Unknown Source) at org.apache.struts.digester.Digester.getParser(Digester.java:275) at org.apache.struts.digester.Digester.parse(Digester.java:755) at org.apache.struts.action.ActionServlet.initMapping(ActionServlet.java:1332) at org.apache.struts.action.ActionServlet.init(ActionServlet.java:466) at javax.servlet.GenericServlet.init(GenericServlet.java:258) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:918) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:810) at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3279) at org.apache.catalina.core.StandardContext.start(StandardContext.java:3421) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:785) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:478) at org.apache.catalina.core.StandardHost.install(StandardHost.java:738) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:324) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:389) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:232) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:155) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1131) at org.apache.catalina.core.StandardHost.start(StandardHost.java:638) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1123) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:343) at org.apache.catalina.core.StandardService.start(StandardService.java:388) at org.apache.catalina.core.StandardServer.start(StandardServer.java:506) at org.apache.catalina.startup.Catalina.start(Catalina.java:781) at org.apache.catalina.startup.Catalina.execute(Catalina.java:681) at org.apache.catalina.startup.Catalina.process(Catalina.java:179) at java.lang.reflect.Method.invoke(Native Method) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:243) Thanks, Jan -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: PropertyUtils.copyProperties
Help. Can't get this to work. I've got a 'view' object Company ... trying to populate a DynaForm? Is that possible? CompanyView view = service.getCompany(Integer.valueOf(1)); DynaActionForm dynaForm = (DynaActionForm) form; System.err.println(view.getName()); --- Gives me CIBC PropertyUtils.copyProperties(dynaForm, view); System.err.println(dynaForm.getName()); Gives me null; Actually, I'd love to be able to do this straight from an EJB. Ideas? -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
problem getting indexed property values
Hello, I'm having a hard time getting the value of an indexed property to my Action classes. Essentially, on my JSP I've got html:select property=nestedClass.nestedBeans[x].value size=1 html:options ... / /html:select where nestedClass is (of course) a nested class within my ActionForm class, and nestedBeans is an array of beans with an attribute value. What's perplexing to me is that the correct values are coming up in my JSP page (so my syntax must be correct). After I submit the form, though, every bean in nestedBeans is reset to 'null'. I have a custom reset function in the ActionForm, and it does not reset nestedClass or any of it's values. Has anyone run into similar problems? I can include code if it would help. Thanks in advance, Matt -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: form submission problem
You're using windows? There's a bug in 4.1.10. Update to 4.1.12 (there is a security bug in earlier versions too). -Mensaje original- De: Steve Vanspall [mailto:[EMAIL PROTECTED]] Enviado el: miércoles, 25 de septiembre de 2002 7:35 Para: Struts User Mailing List Asunto: form submission problem Hi, I have a fairly new problem with one of my JSP's. I recently changed to Tomcat 4.1.10, now all of a sudden, this one page doesn't work properly. I try, using Javacript to set the value of a hidden input type=hidden name=action field when an input type=image button is pushed, this part works fine, have checked the value after it is set. However it is not passing the value through to the request. Instead when I do a request.getParameter(action) all I get is a blank String. All my other pages that do this, are working fine. The tags are placed properly withink the form tags. Has anyone else has a similar problem with just one page. Any help would be appreciated Regards Steve -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Struts Validator
I have the following in my validation.xml file. I want to set the arg0 value to a parameter that was passed in via a POSTed form. If someone enters an invalid email, I'd like to say [EMAIL PROTECTED] is an invalid email address. Is this possible? form name=registrationForm field property=email depends=required,email arg0 key=registrationForm.email resource=false / /field field property=password depends=required arg0 key=prompt.password / /field field property=password2 depends=required arg0 key=prompt.password2 / /field field property=fullName depends=required arg0 key=prompt.fullName / /field /form __ Michael Blake Day Nextel Communications, Inc. email: [EMAIL PROTECTED] desk: 678.966.4792 -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Validator and DynaValidatorForm
I'm using the DynaForm / Validator stuff for the first time, I've always written out the Forms and Actions before. Everything seems in place but the Validator never catches an error and the submit always succeeds. from struts-config.xml: form-bean name=testbean dynamic=true type=org.apache.struts.validator.DynaValidatorForm form-property name=tname type=java.lang.String/ form-property name=tage type=java.lang.String/ form-property name=tphone type=java.lang.String/ /form-bean and action path=/testformSubmit name=testbean type=ActionTest input=/WEB-INF/jsp/testform.jsp scope=request parameter=test validate=true forward name=success path=/pages/Welcome.jsp/ /action and plug-in className=org.apache.struts.validator.ValidatorPlugIn set-property property=pathnames value=/WEB-INF/validator-rules.xml,/WEB-INF/validator.xml / /plug-in from validation.xml: formset form name=testbean field property=tage depends=required,integer /field /form /formset I've tried various things in validation as far as changing up arg0 settings. I'm very unclear on what the arg# settings are for though -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Logging with Struts on RI: was Redirected to index.jsp unexpectedly
Assuming it follows what Tomcat lays out, you could find them in $TOMCAT_HOME/log -- er ... whatever your top-level directory is :-) Sorry, I use Tomcat. I can't speak to the Sun RI ... sure thought Tomcat was the RI. Geoff Seel wrote: Folks Know I can't expect people on mailing lists to solve all my problems but I was surprised that nobody could help with logging issue below. Has anyone used Struts successfully with the Sun J2EE Reference Implementation (1.3.1)? Does anyone know where the logs should be? Thanks. In message [EMAIL PROTECTED], Geoff Seel [EMAIL PROTECTED] writes Joe Thanks for suggestions. Have put sys-outs into TopLevelAction and even logs and a sys-out into a version of ActionServlet but don't see anything in logs. Using Sun RI 1.3.1, which I thought was Tomcat based, expected to find output in catalina.date.log. Anyone know where log stuff should be appearing? -- Eddie Bush -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Logging with Struts on RI: was Redirected to index.jsp unexpectedly
On Wednesday 25 September 2002 04:19 am, Geoff Seel wrote: Folks Know I can't expect people on mailing lists to solve all my problems but I was surprised that nobody could help with logging issue below. Has anyone used Struts successfully with the Sun J2EE Reference Implementation (1.3.1)? Does anyone know where the logs should be? Thanks. In message [EMAIL PROTECTED], Geoff Seel [EMAIL PROTECTED] writes Joe Thanks for suggestions. Have put sys-outs into TopLevelAction and even logs and a sys-out into a version of ActionServlet but don't see anything in logs. Using Sun RI 1.3.1, which I thought was Tomcat based, expected to find output in catalina.date.log. Anyone know where log stuff should be appearing? Sorry, I use Resin, but just because it's a mistake I've made: are you sure that there are write permissions on the log directory? Steve -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Logout in a container-managed security environment -- Follow-up
I had the same problem and did the following .. form method=POST action='%= response.encodeURL(j_security_check) %' trtd colspan=2/td/tr trtdbean:message key=login.page.form.email.label//tdtdinput type=text name=j_username/td/tr trtdbean:message key=login.page.form.password.label//tdtdinput type=password name=j_password/td/tr trtd colspan=2html:submitbean:message key=login.page.form.submit.label//html:submit/td/tr /form -Original Message- From: Eddie Bush [mailto:[EMAIL PROTECTED]] Sent: September 25, 2002 11:03 AM To: Struts Users Mailing List Subject: Re: Logout in a container-managed security environment -- Follow-up Charles, I don't remember the solution to this. The guys on tomcat-user will probably tell you to search the archive. The issue that arises (using Apache/TC) is that you have to map things you want the servlet container to be responsible for (unless you use mod_webapp; I do not recommend this approach - stick with jk). Play around with adding a mapping for j_security_check. When you figure it out, please post it here or directly to me :-) I'll squirrel it off somewhere so I have it for reference the next time someone asks. You might *try* looking through the TC docs before you start aimlessly trying different mappings. I seem to recall Remmy changed the docs up a bit, and they looked much better - but I honestly do not recall if the solution to this problem is included nowadays. Sorry I wasn't more help. Charles McClain wrote: All: I received several replies to my original question, all of which indicated that, in order to do a forceful logout, I needed to use FORM-based CMA rather than BASIC. One of the replies recommended an article on the topic, which I downloaded and read. I implemented FORM-based authentication, making the changes to my web.xml, indicating the login form and error page, etc. The container (Tomcat 4.0) seems to know that I want FORM-based authentication, since it pops up my login page. I did, by the way, include the fields j_username and j_password, and my form action is j_security_check, as per the instructions. However, when I press the submit button, my browser gives me a 404 not-found error on the (nonexistent, of course) page j_security_check. I've checked the Apache and Tomcat logs, and one of the Tomcat logs tells me that it has Configured an authenticator for method FORM, but it still seems to be looking for a page by that name rather than invoking the method. Anyone have any ideas? Charles McClain Phone: 603.659.2046 email:[EMAIL PROTECTED] -- Eddie Bush -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Struts and Together CC
Has anyone try to deploy a struts app on Together CC 6.0 with struts plugin? When doing it, my ApplicationResource.properties file does not get place in the WAR file. any ideas? thanks in advanced. -gus -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Help needed with ActionForm Bean
Try pre-populating the form i.e create the form, set its variables, put it into the request, forward to the JSP. For instance you have: PageA.jsp ProcessPageA_Action.java ActionFormA.java In the Action before you display PageA.jsp, create an instance of the ActionFormA class, set the select box variable and whatever else you need. Then put the ActionFormA object into the session/request under the key you specified in the struts-config.xml. When PageA.jsp loads, Struts will find the FormBean in the session/request using the key in the struts-config.xml and populate the JSP from those values. - Original Message - From: Vincent Berruchon [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Wednesday, September 25, 2002 12:02 PM Subject: Re: Help needed with ActionForm Bean thanks for your reply, perhaps there's something I've haven't understand: I'd like to display in my select dropdown data that come from a database... where should I get this data from the DB this should be done before the call of the getXXX method of the ActionForm when. Should I use an action where I get data from the DB and forward it to the action associated with the jsp page containing the form?? is it the way to do it? Vincent Galbreath, Mark wrote: It's magic. Seriously, your getters and setters in your ActionForm bean correspond to the HTML input fields in your JSP. So if you have a select dropdown in the JSP called state, in some HTML form for collecting personal information you could have private state = ; public void setState( String state) { this.state = state; } public String getState() { return state; } in your Action form. In order to make Struts aware of this bean, you must declare in your struts-config.xml file and have an action path mapped from your JSP to an Action class that will manipulate the bean values that are set by Struts: form-bean name=PersonalInfoForm type=com.whatever.PersonInfoForm / action path=/personalInfo type=com.whatever.GetPersonalInfoAction name=PersonalInfoForm scope=session validate=true parameter=isNew forward name=success path=/personalInfo.jsp / forward name=error path=/errors.jsp / /action So this associates your bean with your JSP and your ActionClass. When your user goes to http://yoursite/personalInfo.do (depending on the mapping in your web.xml), personalInfo.jsp will be invoked and the rendered HTML displayed. After the user fills out the form and submits (for example, the form action is /reviewPersonalInfo which will display everything the user just entered), the following action path is invoked: action path=/reviewPersonalInfo type=com.whatever.SavePersonalInfoAction name=PersonalInfoForm input=/PersonalInfo.jsp scope=session validate=true parameter=isError forward name=success path=/reviewPersonalInfo.jsp / forward name=error path=/personalInfo.jsp / /action and reviewPersonalInfo.jsp will appear to display the information contained in your bean through the use of Struts tags. At this point you can also access the bean's state in your Action class through the form object to save it to a database or whatever. Okay? Mark (That should have earned me a few [OT/FRIDAY] msgs, eh?) -Original Message- From: Vincent Berruchon [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 24, 2002 11:19 AM Hi, I'm still newie and really confused on how to get HTML form filled with struts... I want to fill a select input in a form in one of my JSP. So I've write an ActionForm Bean with the get and set methods for each properties corresponding to an input on the form. But I don't know where these set methods are (or should) be called to fill actionForm properties before the calls to the get methods? Can someone help us? -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: [OT] Commons Validator JavaDoc
I haven't managed to find any. - Original Message - From: Jerry Jalenak [EMAIL PROTECTED] Does anyone have the URL for the Validator JavaDoc on jakarta.apache.org? Jerry Jalenak Web Publishing LabOne, Inc. 10101 Renner Blvd. Lenexa, KS 66219 (913) 577-1496 [EMAIL PROTECTED] This transmission (and any information attached to it) may be confidential and is intended solely for the use of the individual or entity to which it is addressed. If you are not the intended recipient or the person responsible for delivering the transmission to the intended recipient, be advised that you have received this transmission in error and that any use, dissemination, forwarding, printing, or copying of this information is strictly prohibited. If you have received this transmission in error, please immediately notify LabOne at (800)388-4675. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: [OT] Commons Validator JavaDoc
I can only find this... http://cvs.apache.org/viewcvs.cgi/*checkout*/jakarta-commons/validator/src/s hare/org/apache/commons/validator/package.html?rev=1.1content-type=text/pla in James Mitchell Software Engineer\Struts Evangelist Struts-Atlanta, the Open Minded Developer Network http://www.open-tools.org/struts-atlanta -Original Message- From: Jerry Jalenak [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 25, 2002 1:13 PM To: '[EMAIL PROTECTED]' Subject: [OT] Commons Validator JavaDoc Does anyone have the URL for the Validator JavaDoc on jakarta.apache.org? Jerry Jalenak Web Publishing LabOne, Inc. 10101 Renner Blvd. Lenexa, KS 66219 (913) 577-1496 [EMAIL PROTECTED] This transmission (and any information attached to it) may be confidential and is intended solely for the use of the individual or entity to which it is addressed. If you are not the intended recipient or the person responsible for delivering the transmission to the intended recipient, be advised that you have received this transmission in error and that any use, dissemination, forwarding, printing, or copying of this information is strictly prohibited. If you have received this transmission in error, please immediately notify LabOne at (800)388-4675. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: The right place/time to clean up a session before session tim e out, or user logoff
I think I may have been a little unclear in my explanation. I have a system of object for security checking. The only object that is used in the web part of my application is a proxy to my User objects. This proxy also implements the HttpSessionBindingListener interface. In the valueUnbound() method, I call to my logic bean that handles the logout actions with a reference to the proxied object. This is the only place I call the logout logic from with the web portion of the application. The (struts based) LogoutAction I created does nothing but invalidate the session. This causes the valueUnbound method to be called. This chains to the logout logic. When the session times out on its own, the valueUnbound method is also called, hence, the logout logic again is called. Sorry if I didn't explain that clearly before. _ Jason, Your solution covers the log off case. How about session time out, say, a user leave a page of the application and browse another site. There isn't log off action in this case.
Re: Login/logon form details
I received this email so I thought somebody else may have the same problem. I have taken out their identity because the person sent me a direct email. - Original Message - From: Zahid Rahman [EMAIL PROTECTED] Sent: Wednesday, September 25, 2002 6:39 PM Subject: Re: Login/logon form Yes of course. Please read these instructions before you follow them. Steps to follow :- click on the JSP link on the page www.wrox.com. You will find it among the links which can be barely seen on the top half of the page. It is directly under the C# symbol. You will be taken to a list of books on JSPs. The seventh title on the list is the book you want (JSP Second Edition). If you press download then it will take you to the download page. You can then either choose to download with or without registering. I have downloaded without registering. The files are called 4958-src.zip and 4958-war.zip -This file contains the war files for the whole book including the one you want. This is another useful link for webbing with JSP servlets. www.jspinsider.com - Original Message - Sent: Wednesday, September 25, 2002 1:25 PM Subject: Login/logon form Hi, I am searching a complete example of Struts with Login/Logon from. In a previous message you spoke about Download chapter 21 of JSP PRO second edition from www.wrox.com. I gone on the site but I don't know how download this chapter, could you give me additional information. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Struts and Together CC
During the build process some IDEs will copy your .properties files (JBuilder) and some will not (NetBeans). That may be what's happening. For more reasons than I can list here, I would say that you are better off using Ant to deploy your app. My #1 reason..more control. Just my $0.02 James Mitchell Software Engineer\Struts Evangelist Struts-Atlanta, the Open Minded Developer Network http://www.open-tools.org/struts-atlanta -Original Message- From: Gus Delgado [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 25, 2002 1:33 PM To: Struts Users Mailing List Subject: Struts and Together CC Has anyone try to deploy a struts app on Together CC 6.0 with struts plugin? When doing it, my ApplicationResource.properties file does not get place in the WAR file. any ideas? thanks in advanced. -gus -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Validator and DynaValidatorForm
While I can't help you with the DynaValidator stuff, the arg0, arg1 are used to pass strings into your error messages. For example the error message for maxlength is errors.maxlength={0} can not be greater then {1} characters. arg0 is replaced for the {0} and likewise with arg1 for {1} Thus when you have the following in your validation.xml: fieldproperty=lastName depends=required,maxlength arg0 key=registrationForm.lastname.displayname/ arg1 name=maxlength key=${var:maxlength} resource=false/ var var-namemaxlength/var-name var-value10/var-value /var /field and your ApplicationResources.properties: registrationForm.lastname.displayname=Last name Your error message would be Last name can not be greater then 10 characters. This was taken from the struts-validator.war in 1.1-b2 -Devin -Original Message- From: John Nicholas [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 25, 2002 11:42 AM To: Struts Users Mailing List Subject: Validator and DynaValidatorForm I'm using the DynaForm / Validator stuff for the first time, I've always written out the Forms and Actions before. Everything seems in place but the Validator never catches an error and the submit always succeeds. from struts-config.xml: form-bean name=testbean dynamic=true type=org.apache.struts.validator.DynaValidatorForm form-property name=tname type=java.lang.String/ form-property name=tage type=java.lang.String/ form-property name=tphone type=java.lang.String/ /form-bean and action path=/testformSubmit name=testbean type=ActionTest input=/WEB-INF/jsp/testform.jsp scope=request parameter=test validate=true forward name=success path=/pages/Welcome.jsp/ /action and plug-in className=org.apache.struts.validator.ValidatorPlugIn set-property property=pathnames value=/WEB-INF/validator-rules.xml,/WEB-INF/validator.xml / /plug-in from validation.xml: formset form name=testbean field property=tage depends=required,integer /field /form /formset I've tried various things in validation as far as changing up arg0 settings. I'm very unclear on what the arg# settings are for though -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: problem getting indexed property values
if you *really* want to do it this way, you need to have an embedded scriptlet: html:select property=nestedClass.nestedBeans[% request.getParameter(index) %].value size=1 or something like that better is to refer to a unique property of the action form which is the selected item, and a collection that houses a copy of the list of objects that possess the property like this: html:select name=nestedClass property=nestedBeanValue html:options collection=nestedBeans property=value labelProperty=label/ /html:select if you're wedded to index, make it a property of your objects in the list -JT -Original Message- From: Matt Sales [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 25, 2002 10:27 AM To: Struts Users Mailing List Subject: problem getting indexed property values Hello, I'm having a hard time getting the value of an indexed property to my Action classes. Essentially, on my JSP I've got html:select property=nestedClass.nestedBeans[x].value size=1 html:options ... / /html:select where nestedClass is (of course) a nested class within my ActionForm class, and nestedBeans is an array of beans with an attribute value. What's perplexing to me is that the correct values are coming up in my JSP page (so my syntax must be correct). After I submit the form, though, every bean in nestedBeans is reset to 'null'. I have a custom reset function in the ActionForm, and it does not reset nestedClass or any of it's values. Has anyone run into similar problems? I can include code if it would help. Thanks in advance, Matt -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Logout in a container-managed security environment
Charles McClain wrote: Mohan: I just finished setting up container-managed FORM-based authentication and getting it working, based on advice from several people on this mailing list. I'll pass on what I learned, and others can add to it or correct my advice. I'm assuming that you know how to set up container-managed FORM-based authentication, and that your question only applies to its relationship to Struts. If that is not the case, you can review the replies I received to my original posting, or write back and I will provide detail. Container-managed FORM-based authentication is separate and apart from the Struts framework, and indeed can be applied to an application that is not based on Struts. When you set up FORM-based authentication, you specify a login page and login error page. When the user enters a URL that falls within the security-constraint and web-resource-collection you specified in your web.xml, the container takes over and pops up the login page you specified in your login-config entry. Assuming that your login page form specifies j_security_check as the action, when the user hits the submit button, control passes back to the container, which validates j_username and j_password against the container's security realm; if they are valid, then the container passes control to the welcome-page specified in your web.xml. If they are invalid, the container passes control the error page you specified. Since this validation is performed by the container, you do NOT want a Struts ActionForm associated with the login page, nor do you want an Action associated with it. If you have prep work you need performed, you should perform it in the Action associated with your welcome page. It will get performed when the login passes the container's validation and the container passes control to your welcome page. You could get creative in your approach to this. If my other post ever hits the list you'll see an outline for how you can do so. I *believe* I, at one point, had my login/error pages specified as actions, actually. I ... can't recall why I went back to JSPs. I think I was having some stupid errors that had to do with my tripping through my config (accidental key-in errors) - I believe you should be able to use actions to refer to your login/error pages. Try it :-) If it doesn't work, scratch it. It IS useful, however, to have a global-forward back to the login page, so that your login error page can direct the user back to the login page, to re-login after an error, and so that, after he logs out, your logout confirmation page can direct him back to the login page. Also, your login page and login error page may contain Struts tags. You really should have no direct reference to the CMA-oriented login page whatsoever. You do not have the ability to invoke it directly. Since I'm still in the process of converting my app over to FORM-based authentication, I haven't completely worked out the interaction between the container and Struts as far as subsequent login-checking is concerned. I don't think you need to check the user's login status on your JSPs and in your actions, because I think the container will force the user to the login page if he tries to enter the app in the middle via a bookmark or something. I will be testing this in the near future. However, I do know that you can gain access to the username and/or role via the Jakarta Taglib request library; for example, I originally converted my app to container-managed BASIC authentication expressly so that I could use the req:isUserInRole tag to vary menu and screen content based on the user's role. Yes, this is one of the biggest benefits (that I see) of CMA over roll-your-own approaches. There are, however, roll-your-own approaches which can provide this same functionality. You could take a look at securityfilter.sourceforge.net for one possible alternative. It requires a container to be servlet spec 2.3 compliant (filters are a 2.3 thing), but allows you to actually include your realm in your application - and would be a container-independent realm solution. Most containers will let you roll-your-own realm (I believe - I know for certain Tomcat does, and understand that others will, as well). Whichever way you go, it's still make-based login (authentication is done by the container, in response to the user requesting a restricted resource). To get let-based logins, you have to either do something creative, as I've suggested, or resort to implementing your own security (authentication) service. Of course, if you implement your own ... I'm not aware of how you could override isUserInRole() etc. I think there are approaches to this using Filters though. I apologize for my incomplete knowledge, and as I said, I encourage others to correct or add to what I have written, but since no one else has yet replied to you, I figured you'd rather have some reply than none. I'll be smarter in a few
RE: [OT] Commons Validator JavaDoc
Thanks. Not quite what I'm looking for... I need to find the javadoc for the methods used by the 'field' class. I'm hoping there is a way to access other form fields other than the one being validated. I've got a situation where I only need to validate required fields IF a checkbox is selected; otherwise, I don't care Jerry -Original Message- From: James Mitchell [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 25, 2002 12:48 PM To: Struts Users Mailing List Subject: RE: [OT] Commons Validator JavaDoc I can only find this... http://cvs.apache.org/viewcvs.cgi/*checkout*/jakarta-commons/v alidator/src/s hare/org/apache/commons/validator/package.html?rev=1.1content -type=text/pla in James Mitchell Software Engineer\Struts Evangelist Struts-Atlanta, the Open Minded Developer Network http://www.open-tools.org/struts-atlanta -Original Message- From: Jerry Jalenak [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 25, 2002 1:13 PM To: '[EMAIL PROTECTED]' Subject: [OT] Commons Validator JavaDoc Does anyone have the URL for the Validator JavaDoc on jakarta.apache.org? Jerry Jalenak Web Publishing LabOne, Inc. 10101 Renner Blvd. Lenexa, KS 66219 (913) 577-1496 [EMAIL PROTECTED] This transmission (and any information attached to it) may be confidential and is intended solely for the use of the individual or entity to which it is addressed. If you are not the intended recipient or the person responsible for delivering the transmission to the intended recipient, be advised that you have received this transmission in error and that any use, dissemination, forwarding, printing, or copying of this information is strictly prohibited. If you have received this transmission in error, please immediately notify LabOne at (800)388-4675. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] This transmission (and any information attached to it) may be confidential and is intended solely for the use of the individual or entity to which it is addressed. If you are not the intended recipient or the person responsible for delivering the transmission to the intended recipient, be advised that you have received this transmission in error and that any use, dissemination, forwarding, printing, or copying of this information is strictly prohibited. If you have received this transmission in error, please immediately notify LabOne at (800)388-4675. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
[OT] Test - Disregard
Please disregard this. My mail has been misbehaving badly the last couple of days, and I'm wondering of things have finally gone ka-put. -- Eddie Bush -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: [OT] Commons Validator JavaDoc
Jerry, Did you see this? http://home.earthlink.net/~dwinterfeldt/overview.html#comparingTwoFields This helped me in writing a validator to check that one entered date was later than another entered date. Dave Derry - Original Message - From: Jerry Jalenak [EMAIL PROTECTED] Thanks. Not quite what I'm looking for... I need to find the javadoc for the methods used by the 'field' class. I'm hoping there is a way to access other form fields other than the one being validated. I've got a situation where I only need to validate required fields IF a checkbox is selected; otherwise, I don't care Jerry -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Adding html attributes in strut 1.02 for 508 complaint
1.02 strut-html tagl lib is missing some of the attributes that are required for our application to be 508 complaint. Can I directly insert attributes into the strut-html and reuse them...I tried to put alt in html text but its fails. I tried to put title attribute in strut-html.tld inside text emelemt and that woks fine. Any suggestions? -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: [OT] Commons Validator JavaDoc
Yeah, I have - it's a great example on how to write a custom validation method. I'm trying to see if I can directly access additional form fields without having to specify each on as a var.../var in my application-rules.xml. Jerry -Original Message- From: Dave Derry [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 25, 2002 1:39 PM To: Struts Users Mailing List Subject: Re: [OT] Commons Validator JavaDoc Jerry, Did you see this? http://home.earthlink.net/~dwinterfeldt/overview.html#comparin gTwoFields This helped me in writing a validator to check that one entered date was later than another entered date. Dave Derry - Original Message - From: Jerry Jalenak [EMAIL PROTECTED] Thanks. Not quite what I'm looking for... I need to find the javadoc for the methods used by the 'field' class. I'm hoping there is a way to access other form fields other than the one being validated. I've got a situation where I only need to validate required fields IF a checkbox is selected; otherwise, I don't care Jerry -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] This transmission (and any information attached to it) may be confidential and is intended solely for the use of the individual or entity to which it is addressed. If you are not the intended recipient or the person responsible for delivering the transmission to the intended recipient, be advised that you have received this transmission in error and that any use, dissemination, forwarding, printing, or copying of this information is strictly prohibited. If you have received this transmission in error, please immediately notify LabOne at (800)388-4675. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Struts Authentication Filter
hello all, I am attempting to write an Authentication Filter (Servlet Filter) for my Stuts App. It is pretty simple so far. it just checks to see if a User has Authenticated yet (from the session), and if not calls sendRedirect on the response. code and xml below public void doFilter... ... HttpSession session = request.getSession(); if(!SecurityManager.isUserAuthenticated(session)) response.sendRedirect(login.do); else chain.doFilter(request, response); filter filter-nameauthenticationFilter/filter-name filter-classAuthenticationFilter/filter-class /filter filter-mapping filter-nameauthenticationFilter/filter-name url-pattern/*/url-pattern /filter-mapping my question, is how i can give the filter a list of pages that are unathenticated. and to entend that idea, a list of pages that can only be authenticated by an admin. i have seen that the FilterConfig can be used to get init parameters, but these only seem to be single values. not a list of potential URLs does any one have a solution to this problem? thanks, mark -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: [OT] Commons Validator JavaDoc
So are you wanting to do validation that involves more than two fields? Or just trying to get away from specifying the otehr field(s) as var elements. I can't see any way to do that other than having a validator that is specific to a particular form fieldso that it knows the other fields that aree involved. The drawback to that is that you would have to write one for each field to be validated! Dave D - Original Message - From: Jerry Jalenak [EMAIL PROTECTED] Yeah, I have - it's a great example on how to write a custom validation method. I'm trying to see if I can directly access additional form fields without having to specify each on as a var.../var in my application-rules.xml. Jerry -Original Message- From: Dave Derry [mailto:[EMAIL PROTECTED]] Jerry, Did you see this? http://home.earthlink.net/~dwinterfeldt/overview.html#comparin gTwoFields This helped me in writing a validator to check that one entered date was later than another entered date. Dave Derry - Original Message - From: Jerry Jalenak [EMAIL PROTECTED] Thanks. Not quite what I'm looking for... I need to find the javadoc for the methods used by the 'field' class. I'm hoping there is a way to access other form fields other than the one being validated. I've got a situation where I only need to validate required fields IF a checkbox is selected; otherwise, I don't care Jerry -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] This transmission (and any information attached to it) may be confidential and is intended solely for the use of the individual or entity to which it is addressed. If you are not the intended recipient or the person responsible for delivering the transmission to the intended recipient, be advised that you have received this transmission in error and that any use, dissemination, forwarding, printing, or copying of this information is strictly prohibited. If you have received this transmission in error, please immediately notify LabOne at (800)388-4675. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: [OT] Commons Validator JavaDoc
At 02:07 PM 9/25/2002, [EMAIL PROTECTED] wrote: Does anyone have the URL for the Validator JavaDoc on jakarta.apache.org? On the todo list for the proposed Validator 1.0 release is a lot more documentation, included JavaDoc. I'm hoping to have 1.0 ready for 1 November, assuming the release plan is approved. James -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: [OT] Commons Validator JavaDoc
That's the same conclusion that I've come to. The situation is thus - if a user clicks a checkbox 'on', then I need to validate as many as three other fields that are under the checkbox, otherwise I don't care. The approach I'm taking is to write a validation method for each checkbox, passing the other fields in as var's. In the validation method I can check to see if the checkbox is 'on' - if it is then I can check the other fields. Ugly, but I think it will work (unless someone else has a better idea! :-)) On an aside (and thank you James for the doc update), does anyone know where the getActionError method that used to be in ValidatorUtils got moved to? I can't seem to find it anyplace under commons.Validator. Jerry -Original Message- From: Dave Derry [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 25, 2002 2:12 PM To: Struts Users Mailing List Subject: Re: [OT] Commons Validator JavaDoc So are you wanting to do validation that involves more than two fields? Or just trying to get away from specifying the otehr field(s) as var elements. I can't see any way to do that other than having a validator that is specific to a particular form fieldso that it knows the other fields that aree involved. The drawback to that is that you would have to write one for each field to be validated! Dave D - Original Message - From: Jerry Jalenak [EMAIL PROTECTED] Yeah, I have - it's a great example on how to write a custom validation method. I'm trying to see if I can directly access additional form fields without having to specify each on as a var.../var in my application-rules.xml. Jerry -Original Message- From: Dave Derry [mailto:[EMAIL PROTECTED]] Jerry, Did you see this? http://home.earthlink.net/~dwinterfeldt/overview.html#comparin gTwoFields This helped me in writing a validator to check that one entered date was later than another entered date. Dave Derry - Original Message - From: Jerry Jalenak [EMAIL PROTECTED] Thanks. Not quite what I'm looking for... I need to find the javadoc for the methods used by the 'field' class. I'm hoping there is a way to access other form fields other than the one being validated. I've got a situation where I only need to validate required fields IF a checkbox is selected; otherwise, I don't care Jerry -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] This transmission (and any information attached to it) may be confidential and is intended solely for the use of the individual or entity to which it is addressed. If you are not the intended recipient or the person responsible for delivering the transmission to the intended recipient, be advised that you have received this transmission in error and that any use, dissemination, forwarding, printing, or copying of this information is strictly prohibited. If you have received this transmission in error, please immediately notify LabOne at (800)388-4675. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] This transmission (and any information attached to it) may be confidential and is intended solely for the use of the individual or entity to which it is addressed. If you are not the intended recipient or the person responsible for delivering the transmission to the intended recipient, be advised that you have received this transmission in error and that any use, dissemination, forwarding, printing, or copying of this information is strictly prohibited. If you have received this transmission in error, please immediately notify LabOne at (800)388-4675. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: [OT] Commons Validator JavaDoc
Never mind - found it under StrutsValidatorUtil Jerry -Original Message- From: Jerry Jalenak [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 25, 2002 2:25 PM To: 'Struts Users Mailing List' Subject: RE: [OT] Commons Validator JavaDoc That's the same conclusion that I've come to. The situation is thus - if a user clicks a checkbox 'on', then I need to validate as many as three other fields that are under the checkbox, otherwise I don't care. The approach I'm taking is to write a validation method for each checkbox, passing the other fields in as var's. In the validation method I can check to see if the checkbox is 'on' - if it is then I can check the other fields. Ugly, but I think it will work (unless someone else has a better idea! :-)) On an aside (and thank you James for the doc update), does anyone know where the getActionError method that used to be in ValidatorUtils got moved to? I can't seem to find it anyplace under commons.Validator. Jerry -Original Message- From: Dave Derry [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 25, 2002 2:12 PM To: Struts Users Mailing List Subject: Re: [OT] Commons Validator JavaDoc So are you wanting to do validation that involves more than two fields? Or just trying to get away from specifying the otehr field(s) as var elements. I can't see any way to do that other than having a validator that is specific to a particular form fieldso that it knows the other fields that aree involved. The drawback to that is that you would have to write one for each field to be validated! Dave D - Original Message - From: Jerry Jalenak [EMAIL PROTECTED] Yeah, I have - it's a great example on how to write a custom validation method. I'm trying to see if I can directly access additional form fields without having to specify each on as a var.../var in my application-rules.xml. Jerry -Original Message- From: Dave Derry [mailto:[EMAIL PROTECTED]] Jerry, Did you see this? http://home.earthlink.net/~dwinterfeldt/overview.html#comparin gTwoFields This helped me in writing a validator to check that one entered date was later than another entered date. Dave Derry - Original Message - From: Jerry Jalenak [EMAIL PROTECTED] Thanks. Not quite what I'm looking for... I need to find the javadoc for the methods used by the 'field' class. I'm hoping there is a way to access other form fields other than the one being validated. I've got a situation where I only need to validate required fields IF a checkbox is selected; otherwise, I don't care Jerry -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] This transmission (and any information attached to it) may be confidential and is intended solely for the use of the individual or entity to which it is addressed. If you are not the intended recipient or the person responsible for delivering the transmission to the intended recipient, be advised that you have received this transmission in error and that any use, dissemination, forwarding, printing, or copying of this information is strictly prohibited. If you have received this transmission in error, please immediately notify LabOne at (800)388-4675. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] This transmission (and any information attached to it) may be confidential and is intended solely for the use of the individual or entity to which it is addressed. If you are not the intended recipient or the person responsible for delivering the transmission to the intended recipient, be advised that you have received this transmission in error and that any use, dissemination, forwarding, printing, or copying of this information is strictly prohibited. If you have received this transmission in error, please immediately notify LabOne at (800)388-4675. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] This transmission (and any information attached to it) may be confidential and is intended solely for the use of the individual or entity to which it is addressed. If you are not the intended recipient or the person responsible for delivering the transmission to the intended recipient, be advised that you have received this transmission in error and that any use, dissemination, forwarding, printing, or copying of this
Re: Struts Authentication Filter
Have you had a chance to use http://securityfilter.sourceforge.net/ If not, check it out. I have not used it yet, but it seems like a tremendous effort on the part of Max Cooper and the community. Let us know how it works out for you if you use it. - Original Message - From: Mark Silva [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wednesday, September 25, 2002 3:03 PM Subject: Struts Authentication Filter hello all, I am attempting to write an Authentication Filter (Servlet Filter) for my Stuts App. It is pretty simple so far. it just checks to see if a User has Authenticated yet (from the session), and if not calls sendRedirect on the response. code and xml below public void doFilter... ... HttpSession session = request.getSession(); if(!SecurityManager.isUserAuthenticated(session)) response.sendRedirect(login.do); else chain.doFilter(request, response); filter filter-nameauthenticationFilter/filter-name filter-classAuthenticationFilter/filter-class /filter filter-mapping filter-nameauthenticationFilter/filter-name url-pattern/*/url-pattern /filter-mapping my question, is how i can give the filter a list of pages that are unathenticated. and to entend that idea, a list of pages that can only be authenticated by an admin. i have seen that the FilterConfig can be used to get init parameters, but these only seem to be single values. not a list of potential URLs does any one have a solution to this problem? thanks, mark -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
DynaForm
This should be an easy one ... What types can a DynaForm support? ( ie. String, Integer, BigDecimal, etc) - I assume anything that can be converted to a String ( toString ) If I have a DynaForm form-property as follows form-property name=marketingToolId type=java.lang.Integer/ how do I get that to display in a text field? .. like html:text property=marketingToolId size=16 maxlength=16/ further .. how can I access this? ... like ... (Integer)form.get(marketingToolId) Thanks. Darren. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
form validation text coloring question
I would like to have our form change text color of field labels to red if they are required fields that were not filled out when the form was submitted (a common feature of forms). Currently, we are doing custom validation that sets a flag. The JSP checks this flag in logic:present tags and creates the a font/font wrapper around the field label that sets the text color to red. This is quite cumbersome as it puts a lot of logic tags into the code. The html:errors does not work since it just adds additional text and it can't wrap existing text. What solutions have folks come up with for this problem? thx andy -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Struts Authentication Filter
Container Managed Authentication does this for you declareivley in web.xml. Explained in http://edocs.bea.com/wls/docs61/webapp/web_xml.html , part of Servlet spec, see part on security or http://www.amazon.com/exec/obidos/tg/detail/-/1930110596/qid=1032983452/sr=1-1/ref=sr_1_1/103-2679655-4178264?v=glance hth, V. Mark Silva wrote: hello all, I am attempting to write an Authentication Filter (Servlet Filter) for my Stuts App. It is pretty simple so far. it just checks to see if a User has Authenticated yet (from the session), and if not calls sendRedirect on the response. code and xml below public void doFilter... ... HttpSession session = request.getSession(); if(!SecurityManager.isUserAuthenticated(session)) response.sendRedirect(login.do); else chain.doFilter(request, response); filter filter-nameauthenticationFilter/filter-name filter-classAuthenticationFilter/filter-class /filter filter-mapping filter-nameauthenticationFilter/filter-name url-pattern/*/url-pattern /filter-mapping my question, is how i can give the filter a list of pages that are unathenticated. and to entend that idea, a list of pages that can only be authenticated by an admin. i have seen that the FilterConfig can be used to get init parameters, but these only seem to be single values. not a list of potential URLs does any one have a solution to this problem? thanks, mark -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: [OT] Excuse me !
Get that damn fool off THIS line! -Original Message- From: James Mitchell [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 24, 2002 10:00 PM Let's take this offline guys. -Original Message- From: Zahid Rahman [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 24, 2002 9:51 PM I happen to know three different architectures for web applications. Yes, I know Branching statements is an old fashioned saying. With regard to race! The very first time I logged on, my account was impersonated!!! Although I originate from the UK. I pointed out to a Pakistani company that I am a Pakistani. The Pakistani firm replied their account have been impersonated too. 90% of the people ask questions on mail list and reply to rehearsed answers. I have done the crawling and now I am in the process of walking just about to run. With regard to Bank --- Their cake and they will have to eat it! The question was an attitude test i.e. Know your enemy! - Original Message - From: Peter A. J. Pilgrim [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wednesday, September 25, 2002 2:26 AM Subject: Re: This guy from the bank raised a question ? Zahid Rahman wrote: Eddie Bush wrote that the designer of the architecture, Craig R. McClannahan is present on this line. I was on the websphere line and Don Carlos, from DB.COM was talking about it. So I mentioned it. Although this late in the day, because I catching up 2500 emails after configuring my SOHO network for ADSL, I will respond Well it isn't surprised that you got DISSED in the end. And your type of attitude stinks to the extreme. This is the 21st century mate, we are using the Internet a form that makes culture and race and dare I say colour very transparent. This is the great equaliser or super highway isn't it. I dont appreciate your patronising talks on race or culture and for the record, slavery (in the United States at least) was banned over hundred years ago. What do you do about the back button on the browser ? The answer being nothing. Your prose reveals your inexperience and ineptitude in all things HTML / HTTP and Java Server side technologies to the real experts on the list, the technologists who have and are living at the bleeding bloody edge. You should really calm down and spend time learning the technology better. How it works? Why people use it? How people used it to solve real problems? What are trying to solve? Does the technology fit the bill, is it the right solution? You cannot pick up this information , no I say, knowledge from a quick read of marketing department sales broshures. You cannot get it right, if you repeat the latest business lingo in terms of ..., in terms . Your project will fail if simply dont understand the mode (as in the french meaning fashion). This is open source dealing with real people with real life. This is where real cultural diversity is truly happening, fool. This is where the real synergies are? This is not human resources department. This is not a boardroom meeting of stuffy highly over-paid executives, although I'd gladly accept the wages from those guys. This is the boiler room or the mechanics garage or the engineering facility where people get their hands routinely dirty. Learn to crawl, before you walk, before you run. PS: And this from a ex-Deutsche bank employmee. It really does show that DB.com still don't know their left hand from their right foot, but there you go. It happens, if the belief, culture and the motivation stagnates, and you lay off the really brillaint IT people in your organisation. -- Peter Pilgrim +-\ +-+++++ Java Technologist | | | ||||| 'n' Shine | O | | || --+| ---+ /\| ._ / | | \ \ || / \ | | \ \ | |+-- || ---+ A new day /_ _\ Up| | | | | ||||| is coming ||+-+ +-+ +-+++++ home page=http://www.xenonsoft.demon.co.uk/; / -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: EJB / was Struts and high performance sites
I have also heard good things about JDO but have not had the time to check it out (other than reading a couple of articles in Java Pro. As far as picking the right database goes, you are spot on that one! Even the right database version matters. The old VoiceStream ecommerce site was on MS SQL Server 6.0 and performance SUCKED. When we created the new site for T-Mobile (good-bye Jamie Lee, hello Kathy!), we chose Oracle 8i (just upgraded to 9i) and performance improved by a factor of 2. An additional comment on EJB performance. As is (regrettably) sometimes my style, I was a little harsh. EJBs, like any code in any language - even the Struts core classes, can be coded abysmally and badly design algorithms can slow execution of any routine/method to a crawl. Further, the efficiency of the container is also critical. For example, we started this project using JRun 3.1 and a documented memory leak kept forcing us to reboot the server every 24 hours (session beans were not being garbage collected; Allair says this has been fixed in 4.0). The ever-decreasing amount of available memory made the app run at a snail's pace towards the end of these cycles. We changed to BEA's WebLogic 6.1SP2 and the app flies again - we have only needed to reboot the server to accomodate new builds. Mark -Original Message- From: Peter A. J. Pilgrim [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 24, 2002 10:29 PM Galbreath, Mark wrote: Check out http://shop.t-mobile.com dude - the entire site is a Struts + EJB app. If your EJBs didn't scale, you did not know what you were doing. Mark I would also say that you pick right database tables to make entity beans in the first place. This is where the performance probably failed. You can make SessionBeans pass back RowSet, or HashSet or DataTransferMaps of the rows of the database table instead. Especially in a shopping web app. Other people have advocate JDO as a replacement for EntityBeans and I think this technology also works, but I am not sure if it is distributed or supports the type of transactions that J2EE / JTA fully endorses. Couple of books EJB Design Patterns F.Marinescu and Mr Grand Java Enterprise Patterns spring to mind. -Original Message- From: V. Cekvenich [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 24, 2002 7:26 AM They are hype marketed as such. Most newer developers try them, as I did when I was new, but in production they did not scale, so we removed them. On new sites I skip the writing them part, since people would only remove them in production. (some management that take EJB to production are so upset that they go to the cached .NET ADO, so I steer my client's clear). -- Peter Pilgrim +-\ +-+++++ Java Technologist | | | ||||| 'n' Shine | O | | || --+| ---+ /\| ._ / | | \ \ || / \ | | \ \ | |+-- || ---+ A new day /_ _\ Up| | | | | ||||| is coming ||+-+ +-+ +-+++++ home page=http://www.xenonsoft.demon.co.uk/; / -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: DynaForm
Also ... I'm getting this error I have this in my struts-config.xml form-property name=reps type=java.util.HashMap/ and this in my code ... dynaForm.set(reps, Foo Bar, 1); dynaForm.set(reps, Bar Foo, 2); and get this error ... java.lang.NullPointerException: No mapped value for 'reps(Foo Bar)' What gives? -Original Message- From: Darren Hill [mailto:[EMAIL PROTECTED]] Sent: September 25, 2002 3:44 PM To: 'Struts Users Mailing List' Subject: DynaForm This should be an easy one ... What types can a DynaForm support? ( ie. String, Integer, BigDecimal, etc) - I assume anything that can be converted to a String ( toString ) If I have a DynaForm form-property as follows form-property name=marketingToolId type=java.lang.Integer/ how do I get that to display in a text field? .. like html:text property=marketingToolId size=16 maxlength=16/ further .. how can I access this? ... like ... (Integer)form.get(marketingToolId) Thanks. Darren. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Logout in a container-managed security environment
Eddie: Thanks for adding on to my reply. As regards your statement in reference to role-based menu and screen variation, Yes, this is one of the biggest benefits (that I see) of CMA over 'roll-your-own' approaches, let me add another consideration: I've worked on a number of commercial webapps that had roll-your-own authentication embedded throughout the application. Invariably, business clients who purchase these webapps want to wrap them in their own portal or otherwise re-brand them.. As I'm sure you know, portal or wrapper-application users will almost always have already been authenticated, and it simply isn't an option for the webapp being wrapped to require a 2nd login. Depending on the specifics of the roll-your-own authentication scheme and how it's embedded, it can be VERY difficult to pass the portal's or wrapper's user object -- and possibly role object -- through to the wrapped application and not force the user to re-login. Since you as a software vendor can never know to whom you're going to be selling your app, you can't know in advance what portal or wrapper-application authentication schemes you're going to have to adapt to. If you use CMA, however: -- You can transparently adapt to whatever percentage of portals or wrappers also use CMA; -- You can cite industry literature recommending CMA as the preferred authentication method, making your position much more defensible; -- Even if, worst case, you have to adapt to the portal's or wrapper-application's authentication scheme, the fact that there are standards for CMA make it likely that you will have to do less work than if you invent your own authentication and role scheme. -Original Message- From: Eddie Bush [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 25, 2002 2:11 PM To: Struts Users Mailing List Subject: Re: Logout in a container-managed security environment Charles McClain wrote: Mohan: I just finished setting up container-managed FORM-based authentication and getting it working, based on advice from several people on this mailing list. I'll pass on what I learned, and others can add to it or correct my advice. I'm assuming that you know how to set up container-managed FORM-based authentication, and that your question only applies to its relationship to Struts. If that is not the case, you can review the replies I received to my original posting, or write back and I will provide detail. Container-managed FORM-based authentication is separate and apart from the Struts framework, and indeed can be applied to an application that is not based on Struts. When you set up FORM-based authentication, you specify a login page and login error page. When the user enters a URL that falls within the security-constraint and web-resource-collection you specified in your web.xml, the container takes over and pops up the login page you specified in your login-config entry. Assuming that your login page form specifies j_security_check as the action, when the user hits the submit button, control passes back to the container, which validates j_username and j_password against the container's security realm; if they are valid, then the container passes control to the welcome-page specified in your web.xml. If they are invalid, the container passes control the error page you specified. Since this validation is performed by the container, you do NOT want a Struts ActionForm associated with the login page, nor do you want an Action associated with it. If you have prep work you need performed, you should perform it in the Action associated with your welcome page. It will get performed when the login passes the container's validation and the container passes control to your welcome page. You could get creative in your approach to this. If my other post ever hits the list you'll see an outline for how you can do so. I *believe* I, at one point, had my login/error pages specified as actions, actually. I ... can't recall why I went back to JSPs. I think I was having some stupid errors that had to do with my tripping through my config (accidental key-in errors) - I believe you should be able to use actions to refer to your login/error pages. Try it :-) If it doesn't work, scratch it. It IS useful, however, to have a global-forward back to the login page, so that your login error page can direct the user back to the login page, to re-login after an error, and so that, after he logs out, your logout confirmation page can direct him back to the login page. Also, your login page and login error page may contain Struts tags. You really should have no direct reference to the CMA-oriented login page whatsoever. You do not have the ability to invoke it directly. Since I'm still in the process of converting my app over to FORM-based authentication, I haven't completely worked out the interaction between the container and Struts as far as subsequent login-checking is concerned. I
Re: Logging with Struts on RI: was Redirected to index.jsp unexpectedly
Thanks Eddie and other guys. Set up a stand-alone Tomcat and everything works, not only logging but the Struts app itself (till it tries to access an EJB!). Exactly the same war file fails in RI, Maybe it's because I was trying to deploy via the deploytool, tomorrow I'll see if I can deploy directly. In message [EMAIL PROTECTED], Eddie Bush [EMAIL PROTECTED] writes Assuming it follows what Tomcat lays out, you could find them in $TOMCAT_HOME/log -- er ... whatever your top-level directory is :-) Sorry, I use Tomcat. I can't speak to the Sun RI ... sure thought Tomcat was the RI. Geoff Seel wrote: Folks Know I can't expect people on mailing lists to solve all my problems but I was surprised that nobody could help with logging issue below. Has anyone used Struts successfully with the Sun J2EE Reference Implementation (1.3.1)? Does anyone know where the logs should be? Thanks. -- Geoff Seel Voice: +44 (0)20-8296-0684 Financial Object Toolkits Ltd. Mobile: 0797-688-0668 54, Berrylands Road,Fax:+44 (0)870-054-7931 Surbiton, e-mail: [EMAIL PROTECTED] Surrey KT5 8PD WWW:www.foto.co.uk United Kingdom -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
[AGAIN] DynaActionForm
This should be an easy one ... What types can a DynaActionForm support? ( ie. String, Integer, BigDecimal, etc) - I assume anything that can be converted to a String ( toString ) If I have a DynaActionForm form-property as follows form-property name=marketingToolId type=java.lang.Integer/ how do I get that to display in a text field? .. like html:text property=marketingToolId size=16 maxlength=16/ further .. how can I access this? ... like ... (Integer)form.get(marketingToolId) Thanks. Darren. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: [OT] Excuse me !
Just Put this guy on you go right to trash can list, i have. and i feel really good about it :) Dan Jaffa - Original Message - From: Galbreath, Mark [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Sent: Wednesday, September 25, 2002 10:10 AM Subject: RE: [OT] Excuse me ! Get that damn fool off THIS line! -Original Message- From: James Mitchell [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 24, 2002 10:00 PM Let's take this offline guys. -Original Message- From: Zahid Rahman [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 24, 2002 9:51 PM I happen to know three different architectures for web applications. Yes, I know Branching statements is an old fashioned saying. With regard to race! The very first time I logged on, my account was impersonated!!! Although I originate from the UK. I pointed out to a Pakistani company that I am a Pakistani. The Pakistani firm replied their account have been impersonated too. 90% of the people ask questions on mail list and reply to rehearsed answers. I have done the crawling and now I am in the process of walking just about to run. With regard to Bank --- Their cake and they will have to eat it! The question was an attitude test i.e. Know your enemy! - Original Message - From: Peter A. J. Pilgrim [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wednesday, September 25, 2002 2:26 AM Subject: Re: This guy from the bank raised a question ? Zahid Rahman wrote: Eddie Bush wrote that the designer of the architecture, Craig R. McClannahan is present on this line. I was on the websphere line and Don Carlos, from DB.COM was talking about it. So I mentioned it. Although this late in the day, because I catching up 2500 emails after configuring my SOHO network for ADSL, I will respond Well it isn't surprised that you got DISSED in the end. And your type of attitude stinks to the extreme. This is the 21st century mate, we are using the Internet a form that makes culture and race and dare I say colour very transparent. This is the great equaliser or super highway isn't it. I dont appreciate your patronising talks on race or culture and for the record, slavery (in the United States at least) was banned over hundred years ago. What do you do about the back button on the browser ? The answer being nothing. Your prose reveals your inexperience and ineptitude in all things HTML / HTTP and Java Server side technologies to the real experts on the list, the technologists who have and are living at the bleeding bloody edge. You should really calm down and spend time learning the technology better. How it works? Why people use it? How people used it to solve real problems? What are trying to solve? Does the technology fit the bill, is it the right solution? You cannot pick up this information , no I say, knowledge from a quick read of marketing department sales broshures. You cannot get it right, if you repeat the latest business lingo in terms of ..., in terms . Your project will fail if simply dont understand the mode (as in the french meaning fashion). This is open source dealing with real people with real life. This is where real cultural diversity is truly happening, fool. This is where the real synergies are? This is not human resources department. This is not a boardroom meeting of stuffy highly over-paid executives, although I'd gladly accept the wages from those guys. This is the boiler room or the mechanics garage or the engineering facility where people get their hands routinely dirty. Learn to crawl, before you walk, before you run. PS: And this from a ex-Deutsche bank employmee. It really does show that DB.com still don't know their left hand from their right foot, but there you go. It happens, if the belief, culture and the motivation stagnates, and you lay off the really brillaint IT people in your organisation. -- Peter Pilgrim +-\ +-+++++ Java Technologist | | | ||||| 'n' Shine | O | | || --+| ---+ /\| ._ / | | \ \ || / \ | | \ \ | |+-- || ---+ A new day /_ _\ Up| | | | | ||||| is coming ||+-+ +-+ +-+++++ home page=http://www.xenonsoft.demon.co.uk/; / -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail:
RE: [OT] Excuse me !
I did, but he keeps popping up in others' responses to his inane nonsense. -Original Message- From: Daniel Jaffa [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 25, 2002 4:35 PM Just Put this guy on you go right to trash can list, i have. and i feel really good about it :) Dan Jaffa - Original Message - From: Galbreath, Mark [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Sent: Wednesday, September 25, 2002 10:10 AM Subject: RE: [OT] Excuse me ! Get that damn fool off THIS line! -Original Message- From: James Mitchell [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 24, 2002 10:00 PM Let's take this offline guys. -Original Message- From: Zahid Rahman [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 24, 2002 9:51 PM I happen to know three different architectures for web applications. Yes, I know Branching statements is an old fashioned saying. With regard to race! The very first time I logged on, my account was impersonated!!! Although I originate from the UK. I pointed out to a Pakistani company that I am a Pakistani. The Pakistani firm replied their account have been impersonated too. 90% of the people ask questions on mail list and reply to rehearsed answers. I have done the crawling and now I am in the process of walking just about to run. With regard to Bank --- Their cake and they will have to eat it! The question was an attitude test i.e. Know your enemy! - Original Message - From: Peter A. J. Pilgrim [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wednesday, September 25, 2002 2:26 AM Subject: Re: This guy from the bank raised a question ? Zahid Rahman wrote: Eddie Bush wrote that the designer of the architecture, Craig R. McClannahan is present on this line. I was on the websphere line and Don Carlos, from DB.COM was talking about it. So I mentioned it. Although this late in the day, because I catching up 2500 emails after configuring my SOHO network for ADSL, I will respond Well it isn't surprised that you got DISSED in the end. And your type of attitude stinks to the extreme. This is the 21st century mate, we are using the Internet a form that makes culture and race and dare I say colour very transparent. This is the great equaliser or super highway isn't it. I dont appreciate your patronising talks on race or culture and for the record, slavery (in the United States at least) was banned over hundred years ago. What do you do about the back button on the browser ? The answer being nothing. Your prose reveals your inexperience and ineptitude in all things HTML / HTTP and Java Server side technologies to the real experts on the list, the technologists who have and are living at the bleeding bloody edge. You should really calm down and spend time learning the technology better. How it works? Why people use it? How people used it to solve real problems? What are trying to solve? Does the technology fit the bill, is it the right solution? You cannot pick up this information , no I say, knowledge from a quick read of marketing department sales broshures. You cannot get it right, if you repeat the latest business lingo in terms of ..., in terms . Your project will fail if simply dont understand the mode (as in the french meaning fashion). This is open source dealing with real people with real life. This is where real cultural diversity is truly happening, fool. This is where the real synergies are? This is not human resources department. This is not a boardroom meeting of stuffy highly over-paid executives, although I'd gladly accept the wages from those guys. This is the boiler room or the mechanics garage or the engineering facility where people get their hands routinely dirty. Learn to crawl, before you walk, before you run. PS: And this from a ex-Deutsche bank employmee. It really does show that DB.com still don't know their left hand from their right foot, but there you go. It happens, if the belief, culture and the motivation stagnates, and you lay off the really brillaint IT people in your organisation. -- Peter Pilgrim +-\ +-+++++ Java Technologist | | | ||||| 'n' Shine | O | | || --+| ---+ /\| ._ / | | \ \ || / \ | | \ \ | |+-- || ---+ A new day /_ _\ Up| | | | | ||||| is coming ||+-+ +-+ +-+++++ home page=http://www.xenonsoft.demon.co.uk/; / -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional
Re: Struts Authentication Filter
You can use the filter mapping, eg all the pages that need authetication are under admin, so i just put that in filter mapping, and to verify that he is an admin use the isuserinrole, or something like that... At 12:03 PM 9/25/2002 -0700, you wrote: hello all, I am attempting to write an Authentication Filter (Servlet Filter) for my Stuts App. It is pretty simple so far. it just checks to see if a User has Authenticated yet (from the session), and if not calls sendRedirect on the response. code and xml below public void doFilter... ... HttpSession session = request.getSession(); if(!SecurityManager.isUserAuthenticated(session)) response.sendRedirect(login.do); else chain.doFilter(request, response); filter filter-nameauthenticationFilter/filter-name filter-classAuthenticationFilter/filter-class /filter filter-mapping filter-nameauthenticationFilter/filter-name url-pattern/*/url-pattern /filter-mapping my question, is how i can give the filter a list of pages that are unathenticated. and to entend that idea, a list of pages that can only be authenticated by an admin. i have seen that the FilterConfig can be used to get init parameters, but these only seem to be single values. not a list of potential URLs does any one have a solution to this problem? thanks, mark -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Testing ...
Hi .. I've posted about 12 questions in the last week. Answered about 5-6 .. is this getting through ... I get no reponses. Not even a 'get lost' ;) D. -Original Message- From: Darren Hill [mailto:[EMAIL PROTECTED]] Sent: September 25, 2002 4:34 PM To: 'Struts Users Mailing List' Subject: [AGAIN] DynaActionForm This should be an easy one ... What types can a DynaActionForm support? ( ie. String, Integer, BigDecimal, etc) - I assume anything that can be converted to a String ( toString ) If I have a DynaActionForm form-property as follows form-property name=marketingToolId type=java.lang.Integer/ how do I get that to display in a text field? .. like html:text property=marketingToolId size=16 maxlength=16/ further .. how can I access this? ... like ... (Integer)form.get(marketingToolId) Thanks. Darren. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Struts Authentication Filter
Several options: 1. use the filter-mapping element to map your filter to the url patterns you want protected. I haven't tried multiple mappings but I put all protected pages under a /secure directory and mapped it like this: filter-mapping filter-nameauthenticationFilter/filter-name url-pattern/secure/*/url-pattern /filter-mapping 2. use the filter's init parameter but put a comma delimited list of pages in it. then parse the list in your filter: (i think something like this) filter filter-nameauthenticationFilter/filter-name filter-classAuthenticationFilter/filter-class init-param param-namefiles/param-name param-value/myjsp.jsp,/secure/file2.jsp/param-value init-param /filter 3. use the init param to tell your filter the location of a file that contains the list of urls to protect. Then your filter would read the file and act like number 2. Personally, I would go with number 1. Dave From: Mark Silva [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: Struts Authentication Filter Date: Wed, 25 Sep 2002 12:03:53 -0700 hello all, I am attempting to write an Authentication Filter (Servlet Filter) for my Stuts App. It is pretty simple so far. it just checks to see if a User has Authenticated yet (from the session), and if not calls sendRedirect on the response. code and xml below public void doFilter... ... HttpSession session = request.getSession(); if(!SecurityManager.isUserAuthenticated(session)) response.sendRedirect(login.do); else chain.doFilter(request, response); filter filter-nameauthenticationFilter/filter-name filter-classAuthenticationFilter/filter-class /filter filter-mapping filter-nameauthenticationFilter/filter-name url-pattern/*/url-pattern /filter-mapping my question, is how i can give the filter a list of pages that are unathenticated. and to entend that idea, a list of pages that can only be authenticated by an admin. i have seen that the FilterConfig can be used to get init parameters, but these only seem to be single values. not a list of potential URLs does any one have a solution to this problem? thanks, mark -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] _ Send and receive Hotmail on your mobile device: http://mobile.msn.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Testing ...
get lost :) sorry couldnt resist :) Not an expert, but I think the dynaActionForm uses the commons beanutil package and there is a list of converters and you can create you own and register them, i read this awhile ago in the api, http://jakarta.apache.org/commons/beanutils/api/index.html hope it helps, if it doesnt I will get lost :) tiago At 04:50 PM 9/25/2002 -0400, you wrote: Hi .. I've posted about 12 questions in the last week. Answered about 5-6 .. is this getting through ... I get no reponses. Not even a 'get lost' ;) D. -Original Message- From: Darren Hill [mailto:[EMAIL PROTECTED]] Sent: September 25, 2002 4:34 PM To: 'Struts Users Mailing List' Subject: [AGAIN] DynaActionForm This should be an easy one ... What types can a DynaActionForm support? ( ie. String, Integer, BigDecimal, etc) - I assume anything that can be converted to a String ( toString ) If I have a DynaActionForm form-property as follows form-property name=marketingToolId type=java.lang.Integer/ how do I get that to display in a text field? .. like further .. how can I access this? ... like ... (Integer)form.get(marketingToolId) Thanks. Darren. -- To unsubscribe, e-mail: For additional commands, e-mail: -- To unsubscribe, e-mail: For additional commands, e-mail: -- To unsubscribe, e-mail: For additional commands, e-mail: -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Struts Authentication Filter
Mark, Check out my SecurityFilter project: http://securityfilter.sourceforge.net/ The other alternative that I would suggest is using container-managed security. SecurityFilter is designed to mimic container managed security, so it is easy to switch back and forth if you aren't ready to decide which approach to take. The behavior is essentially the same, and the config file format is also extremely similar (so you can cut and paste your security settings between the two when switching). -Max - Original Message - From: Mark Silva [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wednesday, September 25, 2002 12:03 PM Subject: Struts Authentication Filter hello all, I am attempting to write an Authentication Filter (Servlet Filter) for my Stuts App. It is pretty simple so far. it just checks to see if a User has Authenticated yet (from the session), and if not calls sendRedirect on the response. code and xml below public void doFilter... ... HttpSession session = request.getSession(); if(!SecurityManager.isUserAuthenticated(session)) response.sendRedirect(login.do); else chain.doFilter(request, response); filter filter-nameauthenticationFilter/filter-name filter-classAuthenticationFilter/filter-class /filter filter-mapping filter-nameauthenticationFilter/filter-name url-pattern/*/url-pattern /filter-mapping my question, is how i can give the filter a list of pages that are unathenticated. and to entend that idea, a list of pages that can only be authenticated by an admin. i have seen that the FilterConfig can be used to get init parameters, but these only seem to be single values. not a list of potential URLs does any one have a solution to this problem? thanks, mark -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Testing ...
If you had searched the archive you would see what Papa Strut says about using DynaActionForm and why you would always use String. Please STFA more thoroughly before 'getting lost' ;) James Mitchell Software Engineer\Struts Evangelist Struts-Atlanta, the Open Minded Developer Network http://www.open-tools.org/struts-atlanta -Original Message- From: Darren Hill [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 25, 2002 4:51 PM To: 'Struts Users Mailing List' Subject: Testing ... Hi .. I've posted about 12 questions in the last week. Answered about 5-6 .. is this getting through ... I get no reponses. Not even a 'get lost' ;) D. -Original Message- From: Darren Hill [mailto:[EMAIL PROTECTED]] Sent: September 25, 2002 4:34 PM To: 'Struts Users Mailing List' Subject: [AGAIN] DynaActionForm This should be an easy one ... What types can a DynaActionForm support? ( ie. String, Integer, BigDecimal, etc) - I assume anything that can be converted to a String ( toString ) If I have a DynaActionForm form-property as follows form-property name=marketingToolId type=java.lang.Integer/ how do I get that to display in a text field? .. like html:text property=marketingToolId size=16 maxlength=16/ further .. how can I access this? ... like ... (Integer)form.get(marketingToolId) Thanks. Darren. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: multiple sub projects
I think the current best practice is to have Ant or some build tool manage the files and eliminate redundancy. 1.1 Final will likely not have property or config inheritance, as far as I know... -Original Message- From: Anthony Martin [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 24, 2002 10:52 AM To: Struts User List (E-mail) Subject: RE: multiple sub projects I just split up my struts-config.xml into two. Now actions specific to a sub-project are in their own struts-config file. But I don't like having to repeat the form-beans in the second file. We use the same forms for both projects. There are one or two forms that are in one and not the other, but for the most part, this makes it redundant. If I leave out the form-beans in the sub-project struts-config file, I get error 400. Is there a fix for this in the future, or is this something we'll just have to live with? Anthony Anything is better than IE, and you can quote me on that. - Wil Wheaton. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: multiple sub projects
This is one of the pices of sub-apps that some of us dislike :-) I believe it was Martin Cooper who responded to me by saying that they wanted to see how people were using sub-apps before they made any decisions about changing behavior. The behavior he and I discussed (and what it sounds as though you would like, as well) would be for the default sub-app to be treated as a framework on which the other modules were hung. This view holds the default sub-application as the final place to go for config data. So, if it were adopted at-large, your application would look for it's configuration first in the sub-app config and then go to the default sub-app before deciding something was in error. There are many reasons this should be done, I believe. For one, it helps normalize things such as actions and global forwards, so you really only have to have one copy of actions that only need one copy. Otherwise, you would, at minimum, have a reference to one action class in N different modules. I haven't looked, but I strongly suspicion that each sub-app would actually have it's own instance of the action class in question. That seems wasteful to me. Would you like to start thinking about data-sources? :-) Think about your pool configuration and how you have no good way to set limits on it now. Personally, I think the intelligent thing to do (IMHO) is to have the default sub-app act like that framework above, and have all sub-apps seek their config in their own config-space, but also then go check the default sub-app config-space. In other words: Make the configuration present in the default sub-app global to all sub-apps. I hope the committers agree with me on this! Anthony Martin wrote: I just split up my struts-config.xml into two. Now actions specific to a sub-project are in their own struts-config file. But I don't like having to repeat the form-beans in the second file. We use the same forms for both projects. There are one or two forms that are in one and not the other, but for the most part, this makes it redundant. If I leave out the form-beans in the sub-project struts-config file, I get error 400. Is there a fix for this in the future, or is this something we'll just have to live with? Anthony Anything is better than IE, and you can quote me on that. - Wil Wheaton. -- Eddie Bush -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: multiple sub projects
I think Eddie's right, with the only question being do you have levels of inheritance? Does /foo/bar/baz app inherit first from /foo/bar or does it just get /foo? On the other hand, if this question were seen as more a distraction than a useful discussion, I'd say table it for 1.1, and use the algorithm Eddie suggests. The way I manage the classes right now is to have the different sub-apps be part of one package structure, so that a common set can be reused by others sub-apps, and I do the same with jsps, using the contextRelative attribute of the forward node in struts-config-xxx.xml with relative links to shared jsps. Images, css and js files are referred to using property keys, so the only things I'm really duplicating are properties and struts-config.xml settings. I looked back through the mail archive and the reason for keeping the properties configs totally separate was to avoid serious problems with the complexity of cross-dependencies. My take is that if your sub-apps are being used to maintain separate, subtly different versions of a large application, the problems with sub-app redundancy outweigh the worries of cross-dependencies. Especially so once you have a product working for one client, and a second wants almost the same thing-- it would be nice to extend/reuse the first version without touching the code/JSPs/media that are working already. Basically, it makes the framework much more scalable in a certain, important way to institute some mechanism that allows for property/config inheritance. Lots of people are going to implement their own home-grown mechanisms to do the same thing at build time otherwise. My 2c. -JT -Original Message- From: Eddie Bush [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 25, 2002 2:50 PM To: Struts Users Mailing List Subject: Re: multiple sub projects This is one of the pices of sub-apps that some of us dislike :-) I believe it was Martin Cooper who responded to me by saying that they wanted to see how people were using sub-apps before they made any decisions about changing behavior. The behavior he and I discussed (and what it sounds as though you would like, as well) would be for the default sub-app to be treated as a framework on which the other modules were hung. This view holds the default sub-application as the final place to go for config data. So, if it were adopted at-large, your application would look for it's configuration first in the sub-app config and then go to the default sub-app before deciding something was in error. There are many reasons this should be done, I believe. For one, it helps normalize things such as actions and global forwards, so you really only have to have one copy of actions that only need one copy. Otherwise, you would, at minimum, have a reference to one action class in N different modules. I haven't looked, but I strongly suspicion that each sub-app would actually have it's own instance of the action class in question. That seems wasteful to me. Would you like to start thinking about data-sources? :-) Think about your pool configuration and how you have no good way to set limits on it now. Personally, I think the intelligent thing to do (IMHO) is to have the default sub-app act like that framework above, and have all sub-apps seek their config in their own config-space, but also then go check the default sub-app config-space. In other words: Make the configuration present in the default sub-app global to all sub-apps. I hope the committers agree with me on this! Anthony Martin wrote: I just split up my struts-config.xml into two. Now actions specific to a sub-project are in their own struts-config file. But I don't like having to repeat the form-beans in the second file. We use the same forms for both projects. There are one or two forms that are in one and not the other, but for the most part, this makes it redundant. If I leave out the form-beans in the sub-project struts-config file, I get error 400. Is there a fix for this in the future, or is this something we'll just have to live with? Anthony Anything is better than IE, and you can quote me on that. - Wil Wheaton. -- Eddie Bush -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
all this traffic
Hello all, A couple of days away from my computer has resulted in 473 unread postings. It's a bit frustrating trying to use a high traffic mailing list like this one. Here are some suggestions: - Have a struts-answers mailing list. If I found a discussion interesting - such as the one on container managed security - I could simply forward it to the answers list. The cost of asking a question could be to compile the answers and submit it to the list. This could be a cheap way of getting better documentation. - A struts-beginners list might be a good idea too. Sometimes the blind are not all that bad at leading the blind. - One could also consider having a struts-tags list. With JSF coming, there are going to be more people that are not interested in the Struts tags. Jonas -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: all this traffic
You could also try unsubscribing when you are going to be away. Or simply hold your shift key, highlight the lot, and delete. Why should the list have to be inconvenienced because you lack management skills? -Original Message- From: Jonas Björnerstedt [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 25, 2002 6:43 PM To: Struts Users Mailing List Subject: all this traffic Hello all, A couple of days away from my computer has resulted in 473 unread postings. It's a bit frustrating trying to use a high traffic mailing list like this one. Here are some suggestions: - Have a struts-answers mailing list. If I found a discussion interesting - such as the one on container managed security - I could simply forward it to the answers list. The cost of asking a question could be to compile the answers and submit it to the list. This could be a cheap way of getting better documentation. - A struts-beginners list might be a good idea too. Sometimes the blind are not all that bad at leading the blind. - One could also consider having a struts-tags list. With JSF coming, there are going to be more people that are not interested in the Struts tags. Jonas -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: all this traffic/Unsubscribe
Ha!! I did try unsubscribing and it didn't work.I have been trying to find the 1 person who can help me with this.I have send blank email messages to the [EMAIL PROTECTED] ,[EMAIL PROTECTED] and [EMAIL PROTECTED] on Eddie Bush's suggestion. From: Galbreath, Mark [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Subject: RE: all this traffic Date: Wed, 25 Sep 2002 18:42:00 -0400 You could also try unsubscribing when you are going to be away. Or simply hold your shift key, highlight the lot, and delete. Why should the list have to be inconvenienced because you lack management skills? -Original Message- From: Jonas Björnerstedt [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 25, 2002 6:43 PM To: Struts Users Mailing List Subject: all this traffic Hello all, A couple of days away from my computer has resulted in 473 unread postings. It's a bit frustrating trying to use a high traffic mailing list like this one. Here are some suggestions: - Have a struts-answers mailing list. If I found a discussion interesting - such as the one on container managed security - I could simply forward it to the answers list. The cost of asking a question could be to compile the answers and submit it to the list. This could be a cheap way of getting better documentation. - A struts-beginners list might be a good idea too. Sometimes the blind are not all that bad at leading the blind. - One could also consider having a struts-tags list. With JSF coming, there are going to be more people that are not interested in the Struts tags. Jonas -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] _ Join the worlds largest e-mail service with MSN Hotmail. http://www.hotmail.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: all this traffic
I don't think high traffic lists are efficient for several reasons: - Questions are repeated, partly because it is hard to find the answers in the archives. - One reason why there are a lot of questions is that documentation is lacking. What I wanted to suggest was one method of collecting answers in a cheap fashion. - I realize that pressing delete is easy. The cost of pressing delete however is missing all the relevant discussions. - High traffic can also make people rude. Jonas -Original Message- From: Galbreath, Mark [mailto:[EMAIL PROTECTED]] Sent: den 26 september 2002 00:42 To: 'Struts Users Mailing List' Subject: RE: all this traffic You could also try unsubscribing when you are going to be away. Or simply hold your shift key, highlight the lot, and delete. Why should the list have to be inconvenienced because you lack management skills? -Original Message- From: Jonas Björnerstedt [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 25, 2002 6:43 PM To: Struts Users Mailing List Subject: all this traffic Hello all, A couple of days away from my computer has resulted in 473 unread postings. It's a bit frustrating trying to use a high traffic mailing list like this one. Here are some suggestions: - Have a struts-answers mailing list. If I found a discussion interesting - such as the one on container managed security - I could simply forward it to the answers list. The cost of asking a question could be to compile the answers and submit it to the list. This could be a cheap way of getting better documentation. - A struts-beginners list might be a good idea too. Sometimes the blind are not all that bad at leading the blind. - One could also consider having a struts-tags list. With JSF coming, there are going to be more people that are not interested in the Struts tags. Jonas -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: all this traffic/Unsubscribe
Something must be wrong with the listserver, then. I frequently unsubscribe/resubscribe to this list without a problem. Perhaps one of the list owners will read this and look into it. -Original Message- From: Vijay Balakrishnan [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 25, 2002 6:53 PM To: [EMAIL PROTECTED] Subject: RE: all this traffic/Unsubscribe Ha!! I did try unsubscribing and it didn't work.I have been trying to find the 1 person who can help me with this.I have send blank email messages to the [EMAIL PROTECTED] ,[EMAIL PROTECTED] and [EMAIL PROTECTED] on Eddie Bush's suggestion. From: Galbreath, Mark [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Subject: RE: all this traffic Date: Wed, 25 Sep 2002 18:42:00 -0400 You could also try unsubscribing when you are going to be away. Or simply hold your shift key, highlight the lot, and delete. Why should the list have to be inconvenienced because you lack management skills? -Original Message- From: Jonas Bjornerstedt [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 25, 2002 6:43 PM To: Struts Users Mailing List Subject: all this traffic Hello all, A couple of days away from my computer has resulted in 473 unread postings. It's a bit frustrating trying to use a high traffic mailing list like this one. Here are some suggestions: - Have a struts-answers mailing list. If I found a discussion interesting - such as the one on container managed security - I could simply forward it to the answers list. The cost of asking a question could be to compile the answers and submit it to the list. This could be a cheap way of getting better documentation. - A struts-beginners list might be a good idea too. Sometimes the blind are not all that bad at leading the blind. - One could also consider having a struts-tags list. With JSF coming, there are going to be more people that are not interested in the Struts tags. Jonas -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] _ Join the world's largest e-mail service with MSN Hotmail. http://www.hotmail.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: all this traffic
Remember that Struts is still in beta; documentation always lags behind development. I think it's a tribute to the quality and utility of Struts that there are so many subscribers and participants to the list. I have found very few threads on the list that are not useful or at least interesting. I admit, however, that at times I am overwhelmed and just have to delete 100 messages and pick up the conversation from there. -Original Message- From: Jonas Björnerstedt [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 25, 2002 7:02 PM To: Struts Users Mailing List Subject: RE: all this traffic I don't think high traffic lists are efficient for several reasons: - Questions are repeated, partly because it is hard to find the answers in the archives. - One reason why there are a lot of questions is that documentation is lacking. What I wanted to suggest was one method of collecting answers in a cheap fashion. - I realize that pressing delete is easy. The cost of pressing delete however is missing all the relevant discussions. - High traffic can also make people rude. Jonas -Original Message- From: Galbreath, Mark [mailto:[EMAIL PROTECTED]] Sent: den 26 september 2002 00:42 To: 'Struts Users Mailing List' Subject: RE: all this traffic You could also try unsubscribing when you are going to be away. Or simply hold your shift key, highlight the lot, and delete. Why should the list have to be inconvenienced because you lack management skills? -Original Message- From: Jonas Björnerstedt [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 25, 2002 6:43 PM To: Struts Users Mailing List Subject: all this traffic Hello all, A couple of days away from my computer has resulted in 473 unread postings. It's a bit frustrating trying to use a high traffic mailing list like this one. Here are some suggestions: - Have a struts-answers mailing list. If I found a discussion interesting - such as the one on container managed security - I could simply forward it to the answers list. The cost of asking a question could be to compile the answers and submit it to the list. This could be a cheap way of getting better documentation. - A struts-beginners list might be a good idea too. Sometimes the blind are not all that bad at leading the blind. - One could also consider having a struts-tags list. With JSF coming, there are going to be more people that are not interested in the Struts tags. Jonas -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: all this traffic
I think the archive has a wealth of information. It would be great if it was organized such that, it was very easy to search for the needed information. In fact a lot of the documentation needs would be reduced if only the archive was better organized. Some of the things that could be done is classification of information in the archives, having a single solution page for a question that has been asked multiple times, maybe requiring a certain template for all posts made to the list, so that the posts could be more easily classified etc. -Original Message- From: Galbreath, Mark [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 25, 2002 6:02 PM To: 'Struts Users Mailing List' Subject: RE: all this traffic Remember that Struts is still in beta; documentation always lags behind development. I think it's a tribute to the quality and utility of Struts that there are so many subscribers and participants to the list. I have found very few threads on the list that are not useful or at least interesting. I admit, however, that at times I am overwhelmed and just have to delete 100 messages and pick up the conversation from there. -Original Message- From: Jonas Björnerstedt [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 25, 2002 7:02 PM To: Struts Users Mailing List Subject: RE: all this traffic I don't think high traffic lists are efficient for several reasons: - Questions are repeated, partly because it is hard to find the answers in the archives. - One reason why there are a lot of questions is that documentation is lacking. What I wanted to suggest was one method of collecting answers in a cheap fashion. - I realize that pressing delete is easy. The cost of pressing delete however is missing all the relevant discussions. - High traffic can also make people rude. Jonas -Original Message- From: Galbreath, Mark [mailto:[EMAIL PROTECTED]] Sent: den 26 september 2002 00:42 To: 'Struts Users Mailing List' Subject: RE: all this traffic You could also try unsubscribing when you are going to be away. Or simply hold your shift key, highlight the lot, and delete. Why should the list have to be inconvenienced because you lack management skills? -Original Message- From: Jonas Björnerstedt [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 25, 2002 6:43 PM To: Struts Users Mailing List Subject: all this traffic Hello all, A couple of days away from my computer has resulted in 473 unread postings. It's a bit frustrating trying to use a high traffic mailing list like this one. Here are some suggestions: - Have a struts-answers mailing list. If I found a discussion interesting - such as the one on container managed security - I could simply forward it to the answers list. The cost of asking a question could be to compile the answers and submit it to the list. This could be a cheap way of getting better documentation. - A struts-beginners list might be a good idea too. Sometimes the blind are not all that bad at leading the blind. - One could also consider having a struts-tags list. With JSF coming, there are going to be more people that are not interested in the Struts tags. Jonas -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: all this traffic
I fully agree. There is a LOT of interesting reading, and I also press delete at times. The project has a lot of documentation and tutorials given that it is a beta. As we can all see, there are a lot of questions being posed. What I wanted to suggest was a cheap way to sift out/compile the answers. It would be nice to have better searching etc, but this takes some effort. In some sense I think the person who asked the question is the one who can best summarize the answers obtained, simply by the fact that he posed the question. I did not mean to start a long thread on this, it was simply a suggestion. Jonas -Original Message- From: Galbreath, Mark [mailto:[EMAIL PROTECTED]] Sent: den 26 september 2002 01:02 To: 'Struts Users Mailing List' Subject: RE: all this traffic Remember that Struts is still in beta; documentation always lags behind development. I think it's a tribute to the quality and utility of Struts that there are so many subscribers and participants to the list. I have found very few threads on the list that are not useful or at least interesting. I admit, however, that at times I am overwhelmed and just have to delete 100 messages and pick up the conversation from there. -Original Message- From: Jonas Björnerstedt [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 25, 2002 7:02 PM To: Struts Users Mailing List Subject: RE: all this traffic I don't think high traffic lists are efficient for several reasons: - Questions are repeated, partly because it is hard to find the answers in the archives. - One reason why there are a lot of questions is that documentation is lacking. What I wanted to suggest was one method of collecting answers in a cheap fashion. - I realize that pressing delete is easy. The cost of pressing delete however is missing all the relevant discussions. - High traffic can also make people rude. Jonas -Original Message- From: Galbreath, Mark [mailto:[EMAIL PROTECTED]] Sent: den 26 september 2002 00:42 To: 'Struts Users Mailing List' Subject: RE: all this traffic You could also try unsubscribing when you are going to be away. Or simply hold your shift key, highlight the lot, and delete. Why should the list have to be inconvenienced because you lack management skills? -Original Message- From: Jonas Björnerstedt [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 25, 2002 6:43 PM To: Struts Users Mailing List Subject: all this traffic Hello all, A couple of days away from my computer has resulted in 473 unread postings. It's a bit frustrating trying to use a high traffic mailing list like this one. Here are some suggestions: - Have a struts-answers mailing list. If I found a discussion interesting - such as the one on container managed security - I could simply forward it to the answers list. The cost of asking a question could be to compile the answers and submit it to the list. This could be a cheap way of getting better documentation. - A struts-beginners list might be a good idea too. Sometimes the blind are not all that bad at leading the blind. - One could also consider having a struts-tags list. With JSF coming, there are going to be more people that are not interested in the Struts tags. Jonas -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: [OT] Commons Validator JavaDoc
At 04:40 PM 9/25/2002, [EMAIL PROTECTED] wrote: Yeah, I have - it's a great example on how to write a custom validation method. I'm trying to see if I can directly access additional form fields without having to specify each on as a var.../var in my application-rules.xml. Jerry Just added to validator, you can get access to the form from a validation rule by putting Validator in the method signature. For example: public static boolean validateLastNameIsBob(Object bean, Field field, Validator validator) { Object form = validator.getResource(validator.BEAN_KEY); String lastName = ValidatorUtil.getValueAsString(form, lastName); if (lastName.equals(Bob) return true; return false; } If you look in the unit tests for Validator, you can see a requiredif validation I wrote that does generic cross-field validations (i.e., last name is required if first name is filled in). I'll be submitting as an enhancement for Struts Validator soon. James James -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
[OT] RE: all this traffic
You get right to the point don't you Mark :-) ? I think online forums are much easier to use than mailing lists because they're easier to search for previous questions and you can easily ignore uninteresting topics. However, one practice I like is the use of [OT] to designate clearly off topic threads like this one. I filter those mails to a different folder for convenience; I wish more people used that convention. Ironically this thread is only increasing the amount of traffic. Dave From: Galbreath, Mark [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Subject: RE: all this traffic Date: Wed, 25 Sep 2002 18:42:00 -0400 You could also try unsubscribing when you are going to be away. Or simply hold your shift key, highlight the lot, and delete. Why should the list have to be inconvenienced because you lack management skills? -Original Message- From: Jonas Björnerstedt [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 25, 2002 6:43 PM To: Struts Users Mailing List Subject: all this traffic Hello all, A couple of days away from my computer has resulted in 473 unread postings. It's a bit frustrating trying to use a high traffic mailing list like this one. Here are some suggestions: - Have a struts-answers mailing list. If I found a discussion interesting - such as the one on container managed security - I could simply forward it to the answers list. The cost of asking a question could be to compile the answers and submit it to the list. This could be a cheap way of getting better documentation. - A struts-beginners list might be a good idea too. Sometimes the blind are not all that bad at leading the blind. - One could also consider having a struts-tags list. With JSF coming, there are going to be more people that are not interested in the Struts tags. Jonas -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] _ Join the worlds largest e-mail service with MSN Hotmail. http://www.hotmail.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: form submission problem - Problem Solved
Thanks Miguel, that wasn't the problem, but thanks anyway. As I suspected, the problem was very small and very simple, and I proceeded to kick myself several times when I found it So thanks Mugeul and Andrew for your help - Original Message - From: Miguel Angel Mulero Martinez [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wednesday, September 25, 2002 10:52 PM Subject: RE: form submission problem You're using windows? There's a bug in 4.1.10. Update to 4.1.12 (there is a security bug in earlier versions too). -Mensaje original- De: Steve Vanspall [mailto:[EMAIL PROTECTED]] Enviado el: miércoles, 25 de septiembre de 2002 7:35 Para: Struts User Mailing List Asunto: form submission problem Hi, I have a fairly new problem with one of my JSP's. I recently changed to Tomcat 4.1.10, now all of a sudden, this one page doesn't work properly. I try, using Javacript to set the value of a hidden input type=hidden name=action field when an input type=image button is pushed, this part works fine, have checked the value after it is set. However it is not passing the value through to the request. Instead when I do a request.getParameter(action) all I get is a blank String. All my other pages that do this, are working fine. The tags are placed properly withink the form tags. Has anyone else has a similar problem with just one page. Any help would be appreciated Regards Steve -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: [OT][WORKFLOW] Any best practice for back, save,continu e buttons?
I have found web sites that use javascript for security. Noticed it when trying to access a page. Turned off javascript, no more security. Andrew Hill [EMAIL PROTECTED] 09/24/02 11:16AM Id be dead without JS, and I think people would be silly to disable it, but cookies is another matter. I can understand folk disabling those... -Original Message- From: Eddie Bush [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 24, 2002 22:10 To: Struts Users Mailing List Subject: Re: [OT][WORKFLOW] Any best practice for back, save, continu e buttons? Yes, it does! I can vouch for it! I personally know two (highly educated) people that refuse to allow them. They are ignorant about them, of course, but that doesn't change the fact that people *do* disable cookies/JavaScript! Now, if I know two people, then how many more people are there out there that are doing this? Sorry to disagree - I view it as a fact of life. Having said that though, I don't not use JavaScript because of it. That's yet another opportunity to control things - it certainly does have applicability. Galbreath, Mark wrote: Ahhh yes, the bane of web app developers! I solved this problem with JavaScript and cookies - no browser back operations allowed! And spare me the what if JavaScript is turned off noise - it just doesn't happen in the REAL world. Mark -Original Message- From: Andrew Hill [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 24, 2002 3:02 AM (Incidentally, using the browsers back button in such a case results in a rather bad case of server state confusion!) -- Eddie Bush -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: [OT][WORKFLOW] Any best practice for back, save,continu e buttons?
ROFL! -Original Message- From: Steven Banks [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 25, 2002 19:54 To: [EMAIL PROTECTED] Subject: RE: [OT][WORKFLOW] Any best practice for back, save,continu e buttons? I have found web sites that use javascript for security. Noticed it when trying to access a page. Turned off javascript, no more security. Andrew Hill [EMAIL PROTECTED] 09/24/02 11:16AM Id be dead without JS, and I think people would be silly to disable it, but cookies is another matter. I can understand folk disabling those... -Original Message- From: Eddie Bush [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 24, 2002 22:10 To: Struts Users Mailing List Subject: Re: [OT][WORKFLOW] Any best practice for back, save, continu e buttons? Yes, it does! I can vouch for it! I personally know two (highly educated) people that refuse to allow them. They are ignorant about them, of course, but that doesn't change the fact that people *do* disable cookies/JavaScript! Now, if I know two people, then how many more people are there out there that are doing this? Sorry to disagree - I view it as a fact of life. Having said that though, I don't not use JavaScript because of it. That's yet another opportunity to control things - it certainly does have applicability. Galbreath, Mark wrote: Ahhh yes, the bane of web app developers! I solved this problem with JavaScript and cookies - no browser back operations allowed! And spare me the what if JavaScript is turned off noise - it just doesn't happen in the REAL world. Mark -Original Message- From: Andrew Hill [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 24, 2002 3:02 AM (Incidentally, using the browsers back button in such a case results in a rather bad case of server state confusion!) -- Eddie Bush -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Using Struts for JMX web client
Hi, I need to develop a Web client for a JMX application so that users can admin the JMX application remotely. I would like to know if I should use Struts as the web framework. My understanding is each page has a Form Bean, but there are MBeans in the JMX application. So are they redundant? will it be unnecessary overhead? Or they are for different purpose? Or should I just use the JMX tag library here: http://www.servletsuite.com/servlets/jmxtag.htm Thanks for any help. __ Do you Yahoo!? Yahoo! News - Today's headlines http://news.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Using Struts for JMX web client
Yep. Different purpose. The ActionForm exists to capture the text input of a user from the submitted request parameters, and should there be validation errors the form can be presented to users again (with appropriate error messages) and the fields will contain the information that the user had typed in previously. ActionForms are useful for one or two other things as well, but they are distinctly a part of the view and not the model. -Original Message- From: Takumi Fujiwara [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 26, 2002 11:58 To: [EMAIL PROTECTED] Subject: Using Struts for JMX web client Hi, I need to develop a Web client for a JMX application so that users can admin the JMX application remotely. I would like to know if I should use Struts as the web framework. My understanding is each page has a Form Bean, but there are MBeans in the JMX application. So are they redundant? will it be unnecessary overhead? Or they are for different purpose? Or should I just use the JMX tag library here: http://www.servletsuite.com/servlets/jmxtag.htm Thanks for any help. __ Do you Yahoo!? Yahoo! News - Today's headlines http://news.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
How to return changes made on a JSP iteration of object properties to the Action Class
Hello, I am creating an ArrayList of GridDetermination objects in session scope. I sent this to a JSP which displays the arraylist properties. I then can make changes to a property and hit submit, but when the action gets the arraylist back (via the session.getAttribute) the changes are not there. The ArrayList is the same as when I sent it. Is there a step in the JSP that I am missing, like a setProperty, etc..., that will store the changes into the ArrayList in the session scope? Can anyone tell me how I can send an ArrayList of objects, iterate through it to create a table on the web page, allow changes to each property, then return that change to the Action class where I can perform operations based upon the change? Thanks in advance! example of my JSP iterate: logic:iterate id=gridDeterminations name=%= Constants.GRID_DETERMINATIONS_ARRAY_LIST % scope=session type=com.coramhc.common.GridDeterminations tdbean:write name=gridDeterminations property=messageCode filter=true/ /td tdbean:write name=gridDeterminations property=messageDesc filter=true/ /td tdbean:write name=gridDeterminations property=messageSeverity filter=true/ /td td html:select property=processResp size=1 html:option value=/html:option html:option value=CMPLDCMPLD/html:option html:option value=OISOIS/html:option html:option value=RDARDA/html:option html:option value=BMABMA/html:option html:option value=PMAPMA/html:option html:option value=DENDEN/html:option /html:select /td td html:radio property=overrideInd value=A/Approve html:radio property=overrideInd value=D/Deny /td td /td /font /tr /logic:iterate -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]