Clarification Reg bean:include
Hi all, Is bean:include thread safe? In our proj we were using bean:include to include alternative jsp's based on some conditions thru action class But when Concurrent users were acessing the system the application didnt respond We changed our logic by replacing bean:include with logic:equal and jsp:include in jsp files Thanks & regards Sajith __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
Clarification Reg input tag in struts-config.xmlfile
Hi all, Is there any way to dynamically control the input tag in struts-config xml file from formbean's validate method Thanks & regards Sajith - Start your day with Yahoo! - make it your home page
Re: Multiple file upload
Parsing the data from the request is all handled for you by Struts. You just get a bunch of java.io.File objects to work with. L. C.F. Scheidecker Antunes wrote: Thanks that's what I thought regarding the form. But what I really want is to know how to separate them when they are uploaded. Files are uploaded like email mime attachments. So there is a begining and end of each file. Therefore, how do you separate them? I image that you would have to create a FormBean to accept n file inputs and then get the content to each one separately and assign them to a stream class. Checking for each input whether it is null or not. Laurie Harper wrote: C.F. Scheidecker Antunes wrote: Is there any way to perform multiple file uploads using Jakarta Commons Upload on a Struts application? Is there any howto on this issu? Just use multiple file inputs on the form. There's no way to provide a single 'select multiple files to upload' widget, if that's what you're asking; HTML only provides the single-file form input. But there's nothing to stop you having more than one of them on a page. L. -- Laurie Harper Open Source advocate, Java geek: http://www.holoweb.net/laurie Founder, Zotech Software: http://www.zotechsoftware.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Multiple file upload
Thanks that's what I thought regarding the form. But what I really want is to know how to separate them when they are uploaded. Files are uploaded like email mime attachments. So there is a begining and end of each file. Therefore, how do you separate them? I image that you would have to create a FormBean to accept n file inputs and then get the content to each one separately and assign them to a stream class. Checking for each input whether it is null or not. Laurie Harper wrote: C.F. Scheidecker Antunes wrote: Is there any way to perform multiple file uploads using Jakarta Commons Upload on a Struts application? Is there any howto on this issu? Just use multiple file inputs on the form. There's no way to provide a single 'select multiple files to upload' widget, if that's what you're asking; HTML only provides the single-file form input. But there's nothing to stop you having more than one of them on a page. L. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Displaying errors for all except one key
Yes, I wouldn't be able to get away with the empty tag -- it would create a great big red box on my page which wouldn't be acceptable. I'm working on extending html:messages, and it's working quite well (and surprisingly easily) so far. I'll do some more testing tomorrow and if all goes well, I'll post what I've done. Again, thank you very much for your help. Chris -Original Message- From: Kishore Senji [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 16, 2005 1:08 PM To: Struts Users Mailing List Subject: Re: Displaying errors for all except one key On 8/16/05, Chris Loschen <[EMAIL PROTECTED]> wrote: > Thank you very much for the idea. I'm starting to wrestle with it. > > My first instinct is that I'm going to need to extend html:messages > because the JSP solution below wouldn't work (I think!) with the HTML > structure -- in other words, I'm going to end up with a new > for every new error instead of the single div and ul for the whole set > that I need. But I couldn't rearrange it either because then if I have > only the error I want to exclude, I still get the (now empty) . > Does that sound right? If you have the something like this in your jsp, even if you have only one error that you would want to exculde you will be left with only a If you don't like to display the empty div when there are no errors, you would have to do some processing of the "properties" to see if you have atleast one other property other than the one that you want to exclude then only show the div and the errors. But anyway, is showing an empty div that big of an issue? > I'm tracking down the appropriate source code so that I can look at > the messages tag. I'm thinking that what I need to do is simply > iterate through my errors, copy each one that isn't in my excluded > list (for now, only one, but might grow later) to a new collection, > and then pass that new collection to super along with the appropriate > arguments. Does that sound reasonable, or am I missing something? There is no super method in HtmlMessages tag that can take the collection of errors and iterate. You would have to override the doStartTag of the HtmlMessages tag and create the iterator excluding the errors that you don't want to see. > > Thanks again for your help. > > Chris > > -Original Message- > From: Kishore Senji [mailto:[EMAIL PROTECTED] > Sent: Monday, August 15, 2005 6:15 PM > To: Struts Users Mailing List > Subject: Re: Displaying errors for all except one key > > I believe the reason that the Validator errors are missing is that > Validator keys the errors with the property name of the form field. > And so, if you say that just show the errors whose property is > "ActionErrors.GLOBAL_ERROR" you would definitely miss out on the > Validator errors. It has nothing to do with the usage of the > deprecated ActionError and I believe you would still run in to this > problem even if you use ActionMessage > > There are two options. > > 1) Extend html:messages to shown messages for all but a given property > 2) > In the JSP you would follow the following steps > > ActionErrors actionErrors = (ActionErrors) > RequestUtils.getInstance().getActionErrors(pageContext, > Globals.ERROR_KEY); > Iterator errors = actionErrors.properties(); > pageContext.setAttribute("errors", errors); name="errors"> > value="<%=RIGHT_PANE_THRESHOLD_PROPERTY%>" type="java.lang.String"> > >property="<%=property%>"> > > > > > > > Basically, you would be iterating over all the properties and showing > the errors to all but the property that you don't want to show the > errors for. [Note: one thing to note would be, I don't know if the > ordering of the errors will be the same of that you would get if you > leave the iteration to the html:messages.] > > On 8/15/05, Chris Loschen <[EMAIL PROTECTED]> wrote: > > Does anyone have some ideas for me? Thank you! > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > ___ > Siebel > IT'S ALL ABOUT THE CUSTOMER > Visit www.siebel.com > > This e-mail message is for the sole use of the intended recipient(s) and contains confidential and/or privileged information belonging to Siebel Systems, Inc. or its customers or partners. Any unauthorized review, use, copying, disclosure or distribution of this message is strictly prohibited. If you are not an intended recipient of this message, please contact the sender by reply e-mail and destroy all soft and hard copies of the message and any attachments. Thank you for your cooperation. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional comman
Re: [OT] Tomcat, JAAS and Kerberos
Wendy Smoak on 16/08/05 17:26, wrote: The User and Role classes are more or less simple DTOs, one User object for the user and x Role objects for each role the User is in. This is where I'm stuck. Right now I'm playing with extending Krb5LoginModule, just wrapping it and passing through all the method calls except 'commit' where I'll need to add more Principals (Users & Roles) to the Subject. I think. It made sense yesterday... Does that sound remotely correct? Yes that's more or less what I did when writing a JBoss login module. Unfortunately the JBoss stuff was really still in beta and I had to do a fair amount of debugging to work out how to make it work. Good luck Adam - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
JasperReports issue
Hi everyone. What is the best approach to configure and manage reports using jasperreports? I don't know if I have to implement a Controller, or an extension point of DispatchAction, or if I have to implement it on a servlet directly. Best Regards Rafael Mauricio Nami - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
html:messages
Greetings, I am unable to find a solution... even after searching... and waiting for the espresso to kick in. I have messages and would like to determine the number of messages in the bean. If there is more than one message format the output as a list or else just display the message. Unable to come up with something. This is what I am currently using: Any ideas would be greatly appreciated ! - Glenn
Re: scope="request" attribute in action mapping
Joe Smith wrote the following on 8/15/2005 7:30 PM: When I put scope="request" in action mappings, I got the following HTTP 500 error. But if i take it out, then everything is fine. any ideas?? [Servlet Error]-[Cannot find bean logonForm in any scope]: javax.servlet.jsp.JspException: Cannot find bean logonForm in any scope struts-config.xml = I bet you also have another mapping that you are calling somewhere along that puts a logonForm in Session scope? Where is the actual error occuring? Are you getting that error on the page that uses the above action mapping OR on the resulting jsp (success.jsp) ? -- Rick - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Displaying errors for all except one key
On 8/16/05, Chris Loschen <[EMAIL PROTECTED]> wrote: > Thank you very much for the idea. I'm starting to wrestle with it. > > My first instinct is that I'm going to need to extend html:messages > because the JSP solution below wouldn't work (I think!) with the HTML > structure -- in other words, I'm going to end up with a new > for every new error instead of the single div and ul for the whole set > that I need. But I couldn't rearrange it either because then if I have > only the error I want to exclude, I still get the (now empty) . > Does that sound right? If you have the something like this in your jsp, even if you have only one error that you would want to exculde you will be left with only a If you don't like to display the empty div when there are no errors, you would have to do some processing of the "properties" to see if you have atleast one other property other than the one that you want to exclude then only show the div and the errors. But anyway, is showing an empty div that big of an issue? > I'm tracking down the appropriate source code so that I can look at the > messages tag. I'm thinking that what I need to do is simply iterate > through my errors, copy each one that isn't in my excluded list (for > now, only one, but might grow later) to a new collection, and then pass > that new collection to super along with the appropriate arguments. Does > that sound reasonable, or am I missing something? There is no super method in HtmlMessages tag that can take the collection of errors and iterate. You would have to override the doStartTag of the HtmlMessages tag and create the iterator excluding the errors that you don't want to see. > > Thanks again for your help. > > Chris > > -Original Message- > From: Kishore Senji [mailto:[EMAIL PROTECTED] > Sent: Monday, August 15, 2005 6:15 PM > To: Struts Users Mailing List > Subject: Re: Displaying errors for all except one key > > I believe the reason that the Validator errors are missing is that > Validator keys the errors with the property name of the form field. > And so, if you say that just show the errors whose property is > "ActionErrors.GLOBAL_ERROR" you would definitely miss out on the > Validator errors. It has nothing to do with the usage of the deprecated > ActionError and I believe you would still run in to this problem even if > you use ActionMessage > > There are two options. > > 1) Extend html:messages to shown messages for all but a given property > 2) > In the JSP you would follow the following steps > > ActionErrors actionErrors = (ActionErrors) > RequestUtils.getInstance().getActionErrors(pageContext, > Globals.ERROR_KEY); > Iterator errors = actionErrors.properties(); > pageContext.setAttribute("errors", errors); name="errors"> > value="<%=RIGHT_PANE_THRESHOLD_PROPERTY%>" type="java.lang.String"> > >property="<%=property%>"> > > > > > > > Basically, you would be iterating over all the properties and showing > the errors to all but the property that you don't want to show the > errors for. [Note: one thing to note would be, I don't know if the > ordering of the errors will be the same of that you would get if you > leave the iteration to the html:messages.] > > On 8/15/05, Chris Loschen <[EMAIL PROTECTED]> wrote: > > Does anyone have some ideas for me? Thank you! > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > ___ > Siebel > IT'S ALL ABOUT THE CUSTOMER > Visit www.siebel.com > > This e-mail message is for the sole use of the intended recipient(s) and > contains confidential and/or privileged information belonging to Siebel > Systems, Inc. or its customers or partners. Any unauthorized review, use, > copying, disclosure or distribution of this message is strictly prohibited. > If you are not an intended recipient of this message, please contact the > sender by reply e-mail and destroy all soft and hard copies of the message > and any attachments. Thank you for your cooperation. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem with Html File Object
Pramod wrote: I am facing a problem with html file object. Can we assign value to file object externally ?. I'm not sure what it is you want to do; if you're asking if it's possible to pre-populate a file input with a file to upload if the user doesn't change it, the answer is no: browsers will not let you do that (I think I heard that Opera may, but it's the exception). L. -- Laurie Harper Open Source advocate, Java geek: http://www.holoweb.net/laurie Founder, Zotech Software: http://www.zotechsoftware.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: scope="request" attribute in action mapping
Hard to tell what's going wrong without the full stack trace. Where, exactly, is the error raised? L. Joe Smith wrote: When I put scope="request" in action mappings, I got the following HTTP 500 error. But if i take it out, then everything is fine. any ideas?? [Servlet Error]-[Cannot find bean logonForm in any scope]: javax.servlet.jsp.JspException: Cannot find bean logonForm in any scope struts-config.xml = -- Laurie Harper Open Source advocate, Java geek: http://www.holoweb.net/laurie Founder, Zotech Software: http://www.zotechsoftware.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: accessing variables using logic:iterate
Thanks a lot. Got it. As you said, the naming conventions were followed, but I made a typo in the property attribute. Sorry for the trouble. Jay On 8/16/05, Dave Newton <[EMAIL PROTECTED]> wrote: > Jay Sheth wrote: > > >HI, > >When i do : > > > > > > > > > >it says not getter for employeeName in bean rtsummary. > >'recurringTaskSummary' is a vector and not a bean. > >I tried using the attribute type="SpRecurringTaskSummary" but got the > >same error. > > > >I think I am missing the big picture or something basic in logic:iterate. > > > > > (1) The 'type' attribute expects a full classname, but that's probably > not relevant here. > (2) What he was saying was that the Vector's objects must follow > JavaBean naming conventions. > > Dave > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Multiple file upload
C.F. Scheidecker Antunes wrote: Is there any way to perform multiple file uploads using Jakarta Commons Upload on a Struts application? Is there any howto on this issu? Just use multiple file inputs on the form. There's no way to provide a single 'select multiple files to upload' widget, if that's what you're asking; HTML only provides the single-file form input. But there's nothing to stop you having more than one of them on a page. L. -- Laurie Harper Open Source advocate, Java geek: http://www.holoweb.net/laurie Founder, Zotech Software: http://www.zotechsoftware.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Displaying errors for all except one key
Thank you very much for the idea. I'm starting to wrestle with it. My first instinct is that I'm going to need to extend html:messages because the JSP solution below wouldn't work (I think!) with the HTML structure -- in other words, I'm going to end up with a new for every new error instead of the single div and ul for the whole set that I need. But I couldn't rearrange it either because then if I have only the error I want to exclude, I still get the (now empty) . Does that sound right? I'm tracking down the appropriate source code so that I can look at the messages tag. I'm thinking that what I need to do is simply iterate through my errors, copy each one that isn't in my excluded list (for now, only one, but might grow later) to a new collection, and then pass that new collection to super along with the appropriate arguments. Does that sound reasonable, or am I missing something? Thanks again for your help. Chris -Original Message- From: Kishore Senji [mailto:[EMAIL PROTECTED] Sent: Monday, August 15, 2005 6:15 PM To: Struts Users Mailing List Subject: Re: Displaying errors for all except one key I believe the reason that the Validator errors are missing is that Validator keys the errors with the property name of the form field. And so, if you say that just show the errors whose property is "ActionErrors.GLOBAL_ERROR" you would definitely miss out on the Validator errors. It has nothing to do with the usage of the deprecated ActionError and I believe you would still run in to this problem even if you use ActionMessage There are two options. 1) Extend html:messages to shown messages for all but a given property 2) In the JSP you would follow the following steps ActionErrors actionErrors = (ActionErrors) RequestUtils.getInstance().getActionErrors(pageContext, Globals.ERROR_KEY); Iterator errors = actionErrors.properties(); pageContext.setAttribute("errors", errors); Basically, you would be iterating over all the properties and showing the errors to all but the property that you don't want to show the errors for. [Note: one thing to note would be, I don't know if the ordering of the errors will be the same of that you would get if you leave the iteration to the html:messages.] On 8/15/05, Chris Loschen <[EMAIL PROTECTED]> wrote: > Does anyone have some ideas for me? Thank you! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] ___ Siebel IT'S ALL ABOUT THE CUSTOMER Visit www.siebel.com This e-mail message is for the sole use of the intended recipient(s) and contains confidential and/or privileged information belonging to Siebel Systems, Inc. or its customers or partners. Any unauthorized review, use, copying, disclosure or distribution of this message is strictly prohibited. If you are not an intended recipient of this message, please contact the sender by reply e-mail and destroy all soft and hard copies of the message and any attachments. Thank you for your cooperation. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] Tomcat, JAAS and Kerberos
From: "Adam Hardy" <[EMAIL PROTECTED]> if you set up tomcat to use the JAAS realm, then tomcat will set up a LoginContext, which is what you configure by pointing it to your LoginModule(s). You either code your LoginModule or perhaps use the Sun one you mention (if the code does what it's meant to), you just need to configure it with the right options. Thanks! I finally managed to get the Tomcat 5.0 'jsp-examples' webapp to use Kerberos for authentication: http://wiki.wsmoak.net/cgi-bin/wiki.pl?TomcatJspExamples It's very much a hack-- in my environment, Sun's LoginModule only comes back with a single KerberosPrincipal, so I had to add user@ as a 'role' in the webapp's web.xml to allow access. The User and Role classes are more or less simple DTOs, one User object for the user and x Role objects for each role the User is in. This is where I'm stuck. Right now I'm playing with extending Krb5LoginModule, just wrapping it and passing through all the method calls except 'commit' where I'll need to add more Principals (Users & Roles) to the Subject. I think. It made sense yesterday... Does that sound remotely correct? Getting the classes all in the classpath is obviously important, and depending on how tomcat does it, you might need to jar them up seperately from your app and put them in the internal tomcat lib dir. Interesting note... on http://jakarta.apache.org/tomcat/tomcat-5.0-doc/realm-howto.html#JAASRealm the 'useContextClassLoader' attribute seems to work *backwards*. If you set it to true... Tomcat will not find a LoginModule implementation in WEB-INF/lib, you have to put it in /server/lib. I think the attribute name should really be 'useContainerClassLoader. (This only applies to your own LoginModule implementation-- it can find Sun's Krb5LoginModule regardless.) I *still* cannot believe no one else has done this yet. If they have, Google doesn't know about it. I can't even find a commercial implementation. -- Wendy Smoak - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: accessing variables using logic:iterate
Jay Sheth wrote: HI, When i do : it says not getter for employeeName in bean rtsummary. 'recurringTaskSummary' is a vector and not a bean. I tried using the attribute type="SpRecurringTaskSummary" but got the same error. I think I am missing the big picture or something basic in logic:iterate. (1) The 'type' attribute expects a full classname, but that's probably not relevant here. (2) What he was saying was that the Vector's objects must follow JavaBean naming conventions. Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: accessing variables using logic:iterate
HI, When i do : it says not getter for employeeName in bean rtsummary. 'recurringTaskSummary' is a vector and not a bean. I tried using the attribute type="SpRecurringTaskSummary" but got the same error. I think I am missing the big picture or something basic in logic:iterate. Thanks, Jay On 8/16/05, Stéphane Zuckerman <[EMAIL PROTECTED]> wrote: > Hi Jay, > > session.setAttribute("recurringTaskSummary",v_recurringTaskSummary), > > > SpRecurringTaskSummary [...] has certain variables such as > > EmployeeName, EmployeeRef etc. > > > > I am using logic:iterate as follows: > > > > > > > > > > The output is name of objects. However I want to somehow access the > > variables employeename, employeeref etc. How do I do that ? > > Just do something like : > > > > > > Don't forget to use the bean naming conventions, though. > > -- > Stéphane ZUCKERMAN > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: accessing variables using logic:iterate
Stéphane Zuckerman wrote: I am using logic:iterate as follows: The output is name of objects. However I want to somehow access the variables employeename, employeeref etc. How do I do that ? Don't forget to use the bean naming conventions, though. As a followup, you may want to consider switching to JSTL for straight-forward tasks such as this: where functionality is duplicated between the Struts tags and JSTL it's generally recommended to go the JSTL route. It's a trivial switch to make, and can be done mechanically in most cases. Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Struts weaknesses question
Developers who are really busy don't have time to give a fancy name to something that already has a name. Looks like there are enough idiots out there who have lot of time in their hands to rename things that already have names. This would spread their name and popularity among the developer community??? POJO? WTF??? -Original Message- From: Ted Husted [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 16, 2005 7:02 AM To: Struts Users Mailing List Subject: Re: Struts weaknesses question On 8/15/05, Frank W. Zammetti <[EMAIL PROTECTED]> wrote: > The latest buzzword being tossed around lately is RIA, Rich Internet > Applications. Some of us laugh at the term because we've been doing > RIA's for 5+ years now and never thought to attach a special term to it > :) But I digress... Continuing the digression theme ... Buzzword would be one categorization, but "pattern name" might be another. Many people used Facade and Composite, et al, for years before the GOF gave them names. Ditto for POJO. To name a thing is to own a thing. Of late, we've come to own POJOs, Ajax, and RIAs. :) -Ted. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: accessing variables using logic:iterate
Hi Jay, session.setAttribute("recurringTaskSummary",v_recurringTaskSummary), SpRecurringTaskSummary [...] has certain variables such as EmployeeName, EmployeeRef etc. I am using logic:iterate as follows: The output is name of objects. However I want to somehow access the variables employeename, employeeref etc. How do I do that ? Just do something like : Don't forget to use the bean naming conventions, though. -- Stéphane ZUCKERMAN - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] Tomcat, JAAS and Kerberos
Hi Wendy, if you set up tomcat to use the JAAS realm, then tomcat will set up a LoginContext, which is what you configure by pointing it to your LoginModule(s). You either code your LoginModule or perhaps use the Sun one you mention (if the code does what it's meant to), you just need to configure it with the right options. The User and Role classes are more or less simple DTOs, one User object for the user and x Role objects for each role the User is in. Getting the classes all in the classpath is obviously important, and depending on how tomcat does it, you might need to jar them up seperately from your app and put them in the internal tomcat lib dir. HTH Adam C.F. Scheidecker Antunes on 13/08/05 00:54, wrote: Wendy, Check out this article on JAAS with LDAP. I am sure that it might not be as hard to use Kerberos. I've seen an example of the userClassNames and roleClassNames somewhere this week. Let me see if I find it and I will forward it to you. The article on JAAS is at: http://www.theserverside.com/articles/article.tss?l=Pramati-JAAS Wendy Smoak wrote: As I mentioned earlier today, we've licensed a (Struts-based, so I'm not *entirely* off topic) third-party webapp that comes pre-configured to do LDAP authentication. We, of course, do not have LDAP. We have Kerberos. Easy enough, I thought... surely there's a KerberosRealm I can configure and plug in. Apparently not. I can successfully authenticate with Kerberos at the command line using the code in the tutorial: http://java.sun.com/j2se/1.5.0/docs/guide/security/jgss/tutorials/AcnOnly.html I can not, however, figure out what I'm supposed to do to fit that part into the Catalina JAASRealm, as described here: http://jakarta.apache.org/tomcat/tomcat-5.0-doc/realm-howto.html#JAASRealm The first thing it says is "Write your own LoginModule". (Frightening... *I* have to talk to the Kerberos service?) But there's already com.sun.security.auth.module.Krb5LoginModule which is used in the tutorial, so maybe not. I have that in $CATALINA_HOME/conf/jaas.config with JAVA_OPTS set properly. And that's about as far as I can get. When I go to configure server.xml, it wants class names for users and roles: Even if I write a couple of classes and fill in the blanks, I don't see what's ever going to instantiate them. What am I missing? This can't be as hard as I'm making it. Thanks, Wendy Smoak - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] Re: How JSESSIONID is passes
I was thinking of that too.. He did say in his initail post: "I'm keep on calling this action for different condition".. so the clue maybe hidden in that.. But then again, having been up since 3am, I perhaps shouldn't be posting to any lists..;) Geeta Dave Newton <[EMAIL PROTECTED]> wrote on 08/16/2005 11:21:36 AM: > > > Which makes me wonder why the original poster was continually getting > new sessions; seems weird. > > Dave
Re: Can nested tile layouts be done?
I was able to get it working now. Thanks. On 8/16/05, [EMAIL PROTECTED] < [EMAIL PROTECTED]> wrote: > > It can get a little difficult to keep up with. > > Basically, you have to know the Hierarchy of your tile and call the top > most one. In this case, you would call .base which would intern call > myEndUserPage.page1 and finally myEndUserPage.jsp. to change to > another.jsp you would call .anotherPage in your action forward. Nesting > tiles can be very useful when switching components of a tile, but can > quickly become a headache when changing tiles in both layouts. I use the > nested for menus only and have been debating on switching to struts menu > because of the complexity. The only thing that has prevented me from doing > this is waiting to see if I can jump to JSF or AJAX/D-HTML instead. > > > [image: Inactive hide details for Daniel Hannum <[EMAIL PROTECTED]>]Daniel > Hannum <[EMAIL PROTECTED]> > > > > *Daniel Hannum <[EMAIL PROTECTED]>* > > 08/15/2005 04:55 PM Please respond to > "Struts Users Mailing List" < > user@struts.apache.org> > > > To > > Struts Users Mailing List > cc > > > Subject > > Re: Can nested tile layouts be done? > Thanks, I think this is better. I still must be missing something about > how > Tiles works internally, though. > > In my app, the tiles definition for the end user page (the one that > defines > "body") is called "endUserPage.tiles" and Tiles is smart enough to handle > requests for "endUserPage.jsp" in the correct "tiled" way. You have this > arranged differently, where the end user page definition has a more > cryptic > name (.myEndUserPage.page1) and is referenced by .base. > > If I do it your way, then, how does Tiles know which URL to map to the > tile > layout we just produced? I just implemented my layout the way you've > described, but now I don't know what URL to request because > tiles-config.xmlno longer contains URLs. > > > Thanks for your help > Dan > > On 8/15/05, [EMAIL PROTECTED] < > [EMAIL PROTECTED]> wrote: > > > > OK, I see: > > > > Your definition would need to extend .sublayout.. > > > > > > /layout/layout > > /layout/layout2 > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > [image: Inactive hide details for Daniel Hannum <[EMAIL PROTECTED]>]Daniel > > > Hannum <[EMAIL PROTECTED]> > > > > > > > > *Daniel Hannum <[EMAIL PROTECTED]>* > > > > 08/15/2005 03:51 PM Please respond to > > "Struts Users Mailing List" < > > user@struts.apache.org> > > > > > > To > > > > Struts Users Mailing List > > cc > > > > > > Subject > > > > Re: Can nested tile layouts be done? > > This still isn't working for me. I need to tweak your example because > the > > value of "body" changes for each page. So if I add one more definition > to > > my > > tiles-config.xml for an actual end-user page that a user would point a > > browser to: > > > > > > > > > > > > It's not clear which of your definitions I should extend. If I extend > > .base > > (the logical choice), I get the same behavior where the layout.jsp is > > rendered and layout2.jsp is substituted in, but no substitutions are > made > > inside the layout2.jsp. If I extend .sublayout, I get even weirder > > behavior > > where it appears to render layout2.jsp but makes no substitutions at > all. > > > > I looked at the Tiles examples and they don't seem to define individual > > pages in the tiles-config.xml, as I did above. Could that be my problem? > > > > Dan > > > > On 8/15/05, [EMAIL PROTECTED] < > > [EMAIL PROTECTED]> wrote: > > > > > > Yes, this can be done. The VBox example is a good example of this. > > > > > > Basically it is laid out as follows. > > > > > > /layout/layout > > > /layout/layout2 > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > you can then substitute out different components of each section based > > > on > > > what you are doing. > > > > > > > > > > > > > > > [image: Inactive hide details for Daniel Hannum < > [EMAIL PROTECTED]>]Daniel > > > > > Hannum <[EMAIL PROTECTED]> > > > > > > > > > > > > *Daniel Hannum <[EMAIL PROTECTED]>* > > > > > > 08/15/2005 02:18 PM Please respond to > > > "Struts Users Mailing List" < > > > user@struts.apache.org> > > > > > > > > > To > > > > > > user@struts.apache.org > > > cc > > > > > > > > > Subject > > > > > > Can nested tile layouts be done? > > > Hi everyone, I have a question about nesting layouts with Struts > > > tiles. I've seen this sort of thing discussed in the past, but in > > > searching I didn't see an example that I could apply to my situation, > > > nor did I see a good solution. > > > > > > Executive summary: > > > > > > What I want to do is have a simple layout containing two tiles, both > > > of which are JSP's. Howe
accessing variables using logic:iterate
Hi, Currently I have a action class which does session.setAttribute("recurringTaskSummary",v_recurringTaskSummary), where v_recurringTaskSummary is a vector of type SpRecurringTaskSummary which has certain variables such as EmployeeName, EmployeeRef etc. I am using logic:iterate as follows: The output is name of objects. However I want to somehow access the variables employeename, employeeref etc. How do I do that ? Thanks, Jay - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] Re: How JSESSIONID is passes
[EMAIL PROTECTED] wrote: You are quite right; I was being sloppy.. Should have added the "if there's no current session" bit.. thanks for the catch.. Which makes me wonder why the original poster was continually getting new sessions; seems weird. Dave Dave Newton <[EMAIL PROTECTED]> wrote on 08/16/2005 10:54:39 AM: [EMAIL PROTECTED] wrote: HttpSession Session=request.getSession(true); The "true" means create a new session. For which J2EE versions is that correct? In my 1.3 JavaDocs it says: "Returns the current |HttpSession| associated with this request or, if if there is no current session and |create| is true, returns a new session."
Re: [OT] Re: How JSESSIONID is passes
You are quite right; I was being sloppy.. Should have added the "if there's no current session" bit.. thanks for the catch.. Geeta Dave Newton <[EMAIL PROTECTED]> wrote on 08/16/2005 10:54:39 AM: > [EMAIL PROTECTED] wrote: > > >HttpSession Session=request.getSession(true); > > > >The "true" means create a new session. > > > > > For which J2EE versions is that correct? In my 1.3 JavaDocs it says: > > "Returns the current |HttpSession| associated with this request or, if > if there is no current session and |create| is true, returns a new session." > > Dave > > > -- > This message has been scanned for viruses and > dangerous content by MailScanner, and is > believed to be clean. > > > CONFIDENTIALITY NOTICE:This email is intended solely for the person > or entity to which it is addressed and may contain confidential > and/or protected health information. Any duplication, > dissemination, action taken in reliance upon, or other use of this > information by persons or entities other than the intended recipient > is prohibited and may violate applicable laws. If this email has > been received in error, please notify the sender and delete the > information from your system. The views expressed in this email are > those of the sender and may not necessarily represent the views of > IntelliCare.
[OT] Re: How JSESSIONID is passes
[EMAIL PROTECTED] wrote: HttpSession Session=request.getSession(true); The "true" means create a new session. For which J2EE versions is that correct? In my 1.3 JavaDocs it says: "Returns the current |HttpSession| associated with this request or, if if there is no current session and |create| is true, returns a new session." Dave
Re: null pointer exception
I'm really not sure I see what it is you are trying to do. I don't see any submit buttons in your jsp...so I don't see what is being submitted on a form click. Also I don't see you writing to any fields that will get submitted to your bean. There is also no attempt to pull anything out of your form bean in the Action. I don't mean to sound condescending, but I am wondering if you have had much experience with Struts? If not...you should find a good book (there are many good recommendations in the list archives) and if so...you may be a little confused about how a form bean works (you should take another look at this). I only say this because the list is not the quickest way to get answers about the basics of Struts. There are many good tutorials/books out there that will get you up to speed much faster than we can. As far as why you get the last seqNo...your loop creates a new instance of HashMap every time through and assigns it to the "key" key. Every time you do that you overwrite it, so the only one that actually stays in the session is the last one. Then you pull it out of session in your action and it is the only one there, so it is the one you get. razmaspaz On 8/16/05, Balkan Guler <[EMAIL PROTECTED]> wrote: > Thanks > I changed it to session.setAttribute and fixed it, > But now I have another problem even I push the edit link of the second or > third or any row, > the "projectname" and "seqno" of the last row is sent to the action. > What can I do? > > On 8/15/05, Michael Rasmussen <[EMAIL PROTECTED]> wrote: > > > > Balkan, > > > > which line is line 26 in edit action? Can you provide the entire stack > > trace? > > > > Off hand I would guess that your call to request.getAttribute("key") > > is returning null...I don't see any other likely suspects. > > > > Your JSP does this: > > > > pageContext.setAttribute("key",key); what is pageContext? > > > > if you are putting a variable in page scope, it will not be available > > for the action when you repost to the server...you have a new page > > scope (which is different from request scope) when you come back to > > the server. If you want a variable to live across multiple trips to > > the server, try putting it in the session. > > > > On 8/15/05, Balkan Guler <[EMAIL PROTECTED]> wrote: > > > hello, > > > I have a action form operForm and List operMenus field. operMenu is an > > > other class that has some field. > > > I am listing all of the operMenu objects and their fields. > > > At the end of the each row I have an edit link that sends, its row's > > primary > > > key to an action. > > > operMenu class has two primary key and I instantiate a hashmap and put > > the > > > primary keys into hashmap. > > > In action class I want to get the hashmap but I am taking null pointer > > > exception. > > > > > property="operMenus"> > > > > > > > property > > > =" compositeId.projectname"/> > > > > property > > > ="compositeId.seqno"/> > > > > > property ="parentseqno"/> > > > > property > > > ="groupseqno"/> > > > > > > > > > <%java.util.HashMap key = new java.util.HashMap(); > > > key.put("projectname", projectName); > > > key.put("seqno", seqNo); > > > pageContext.setAttribute("key",key);%> > > > > > paramId="index" paramName="key">Edit > > > > > > > > > -* > > > editAction::: > > > public ActionForward execute(ActionMapping mapping, ActionForm form, > > > HttpServletRequest request, HttpServletResponse response) throws > > Exception { > > > > > > java.util.HashMap keymap = (java.util.HashMap > > )request.getAttribute("key"); > > > > > > String projectname = (String)keymap.get("projectname"); > > > String seqno = (String)keymap.get("seqno"); > > > > > > System.out.println(projectname); > > > return mapping.findForward(FORWARD_detail); > > > } > > > And the error message: > > > java.lang.NullPointerException > > > at actions.editAction.execute(editAction.java:26) > > > What is the problem?? > > > > > > > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts weaknesses question
On Tue, August 16, 2005 7:01 am, Ted Husted said: > On 8/15/05, Frank W. Zammetti <[EMAIL PROTECTED]> wrote: >> The latest buzzword being tossed around lately is RIA, Rich Internet >> Applications. Some of us laugh at the term because we've been doing >> RIA's for 5+ years now and never thought to attach a special term to it >> :) But I digress... > > Continuing the digression theme ... Buzzword would be one > categorization, but "pattern name" might be another. Many people used > Facade and Composite, et al, for years before the GOF gave them names. > Ditto for POJO. To name a thing is to own a thing. Of late, we've come > to own POJOs, Ajax, and RIAs. :) Fair point... I guess I'm just annoyed that *I* didn't come up with a name for it :) I'm quite sure I wasn't the first, but I did an app that would very clearly be called an RIA today just over 6 years ago as of two weeks ago... didn't use AJAX as we know it today but did use a hidden frame to receive XML-based responses which were then inserted into pre-loaded HTML pages, so the server never rendered a full page except when the app was first loaded, all 20+ pages (screens) of the app were in the browser throughout the lifetime of the app, data was just inserted, fields enabled/disabled, and different screens shown... the app is IE-only, but not because any IE-specific features were used, just because the layout as speced makes it look, feel and work almost exactly like a VB-based app, and that was far easier to accomplish when cross-browser concerns aren't in play. Like I said, I'm sure I wasn't the first, but clearly I had an opportunity to come up with a name. I missed the chance :) > -Ted. Frank - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How JSESSIONID is passes
Hi Senthilrajan: As Hermod mentioned in his note, your session problems are caused because you have (from your previous note): HttpSession Session=request.getSession(true); The "true" means create a new session. So instead use: HttpSession Session=request.getSession(false); or just: HttpSession Session=request.getSession(); and your problem will disappear. Regards, Geeta "Senthilrajan VS" <[EMAIL PROTECTED]> wrote on 08/16/2005 07:54:10 AM: > Hi all, > > How Jsessionid is passed in the struts application and I don't have > any control for that. how to avoid that. In my application I am > facing the problem in the session it is creating the new session for > every request. Is this problem related to Jsessionid? > > > Thanks & Regards, > SenthilRajan VS > -- > This message has been scanned for viruses and > dangerous content by MailScanner, and is > believed to be clean. > > > CONFIDENTIALITY NOTICE:This email is intended solely for the person > or entity to which it is addressed and may contain confidential > and/or protected health information. Any duplication, > dissemination, action taken in reliance upon, or other use of this > information by persons or entities other than the intended recipient > is prohibited and may violate applicable laws. If this email has > been received in error, please notify the sender and delete the > information from your system. The views expressed in this email are > those of the sender and may not necessarily represent the views of > IntelliCare.
RE: Merging form properties
I couldn't find any utility method to only copy non-null properties from the form bean. I tried your suggestion to describe() the formbean then filter out the nulls, then populate() the destination formbean. That worked for formbeans which do not have nested indexed formbeans. A describe() of the nested formbean collection puts the toString() representation of the Collection into the Map, thus losing the collection object. So finally, I created a mergeBean(srcBean, destBean) method to copy non-null properties and call a similar mergeBean() on each of the nested formbeans. M> -Original Message- From: news [mailto:[EMAIL PROTECTED] On Behalf Of Laurie Harper Sent: 29 July 2005 03:59 To: user@struts.apache.org Subject: Re: Merging form properties Wendy Smoak wrote: > From: "Dave Newton" <[EMAIL PROTECTED]> > >> if in the getPropertyDescriptors method you checked the values for >> null and only returned those that weren't null would this work? > > > That's what I was thinking... but looking at the BeanInfo interface, you > don't have access to the bean itself, so as Laurie said you would have > to know in advance which properties to expose. Never mind, then. :) > > You should probably ask on commons-user... I bet there's a simple way to > do this. (The next thing that comes to mind is subclassing > BeanUtilsBean and overriding the copyProperty method to make it ignore > properties for which the incoming value is null. Would that work?) For what it's worth, I think I just realized I need to solve the same problem, so I'll try and remember to post here if I come up with a nice solution. If you get anything from commons-user drop me a note ;-) L. -- Laurie, Open Source advocate, Java geek and novice blogger: http://www.holoweb.net/laurie - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- The contents of this e-mail are intended for the named addressee only. It contains information that may be confidential. Unless you are the named addressee or an authorized designee, you may not copy or use it, or disclose it to anyone else. If you received it in error please notify us immediately and then destroy it. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Error: java.lang.ClassCastException: org.apache.struts.taglib .htm l.MessagesTei
Nick! Big Big Big thanks to you that was the problem! Now everything is working fine. Thanks to Laurie too for trying hard to help me. Christian -Original Message- From: Nick Heudecker [mailto:[EMAIL PROTECTED] Sent: August 15, 2005 11:17 PM To: Struts Users Mailing List Subject: Re: Error: java.lang.ClassCastException: org.apache.struts.taglib .htm l.MessagesTei This error is caused by a jsp-api.jar in your application. On 8/15/05, Laurie Harper <[EMAIL PROTECTED]> wrote: > You said you were using Struts 1.2.7. I'm guessing those 1.1 TLDs are > declaring the TEI class Tomcat's failing to load in the old location. Try > using the TLDs (and other configuration files) that correspond to the > Struts release you're using. > > L. > > Christian Dionne wrote: > > > Hi Laurie, > > > > Thanks for your answer. I did a quick search to find if that > > was my problem and unfortunately it isn't. I don't have any other > > copy of struts.jar in any other directory than in my project directory > > (WEB-INF/lib)... > > > > Here is the struts structure I have: > > WEB-INF/struts-bean-1.1.tld > > WEB-INF/struts-bean.tld > > WEB-INF/struts-html-1.1.tld > > WEB-INF/struts-html.tld > > WEB-INF/struts-logic-1.1.tld > > WEB-INF/struts-logic.tld > > WEB-INF/struts-nested-1.1.tld > > WEB-INF/struts-nested.tld > > WEB-INF/struts-tiles-1.1.tld > > WEB-INF/struts-tiles.tld > > WEB-INF/lib/struts.jar > > > > I just hope this ok. Thanks again for helping me. This is really strange > > since I have been able to use struts without any problem on older Tomcat > > version. > > > > Thanks, > > Christian Dionne > > > > -Original Message- > > From: news [mailto:[EMAIL PROTECTED] On Behalf Of Laurie Harper > > Sent: August 15, 2005 1:30 PM > > To: user@struts.apache.org > > Subject: Re: Error: java.lang.ClassCastException: > > org.apache.struts.taglib.htm l.MessagesTei > > > > You probably have multiple copies of the struts jar on you application's > > class path. Make sure that struts.jar only exists in your WEB-INF/lib > > directory and not elsewhere in whatever application server or servlet > > container you're using. Assuming you're using Tomcat, look for copies of > > struts.jar in common/lib, shared/lib, etc. > > > > L. > > > > Christian Dionne wrote: > > > >>Hi! > >> > >>I'm using Tomcat 5.5.9 with Struts 1.2.7. I am trying to convert my > >>application that was working > >>fine with Tomcat 5.0.30. I mostly fixed everything except that now I am > >>getting this error. > >> > >>This occurs when parsing a .jsp file that includes a struts .tld. > >> > >>Any idea how to fix this? I saw a lot of similar post on the internet > > > > about > > > >>this problem > >>but no solution. > >> > >>org.apache.jasper.JasperException: Failed to load or instantiate > >>TagExtraInfo class: org.apache.struts.taglib.html.MessagesTei > >> > >> > > > > org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler. > > > >>java:50) > >> > >> > > > > org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407 > > > >>) > >> > >> > > > > org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:279 > > > >>) > >> > >> > > > > org.apache.jasper.compiler.TagLibraryInfoImpl.createTagInfo(TagLibraryInfoIm > > > >>pl.java:422) > >> > >> > > > > org.apache.jasper.compiler.TagLibraryInfoImpl.parseTLD(TagLibraryInfoImpl.ja > > > >>va:248) > >> > >> > > > > org.apache.jasper.compiler.TagLibraryInfoImpl.(TagLibraryInfoImpl.java > > > >>:162) > >> > >>org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:418) > >> org.apache.jasper.compiler.Parser.parseDirective(Parser.java:483) > >> org.apache.jasper.compiler.Parser.parseElements(Parser.java:1543) > >> org.apache.jasper.compiler.Parser.parse(Parser.java:126) > >> > >> > > > > org.apache.jasper.compiler.ParserController.doParse(ParserController.java:21 > > > >>1) > >> > >> > > > > org.apache.jasper.compiler.ParserController.parse(ParserController.java:100) > > > >> org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:146) > >> org.apache.jasper.compiler.Compiler.compile(Compiler.java:286) > >> org.apache.jasper.compiler.Compiler.compile(Compiler.java:267) > >> org.apache.jasper.compiler.Compiler.compile(Compiler.java:255) > >> > >> > > > > org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:5 > > > >>56) > >> > >> > > > > org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2 > > > >>93) > >> > >>org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291) > >> org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241) > >> javax.servlet.http.HttpServlet.service(HttpServlet.java:802) > >> > >> > >>root cause > >> > >>java.lang.ClassCastException: org.apache.struts.taglib.html.MessagesTei > >> > >> > > > > org.apache.jasper.compiler.TagLibraryInfoImpl.createTagInfo(TagLibraryInfoIm > > > >>pl.java:420) > >> > >> > > > >
RE: Struts weaknesses question
For those who may want to see an event model built on top of Struts I suggest that they look at the code base generated by Common-Controls: http://www.common-controls.com The software may be considered as two interrelated parts: View and Control. The control is built on Struts with events that are defined by the view but can be independently defined with a little effort. The view is based on a set of rich custom tags. It may be a way station to something more like JSF but for the moment it has proven to be very useful to us in building faux RIA's. Bob N- -Original Message- From: Frank W. Zammetti [mailto:[EMAIL PROTECTED] Sent: Monday, August 15, 2005 10:17 PM To: Struts Users Mailing List Subject: Re: Struts weaknesses question The latest buzzword being tossed around lately is RIA, Rich Internet Applications. Some of us laugh at the term because we've been doing RIA's for 5+ years now and never thought to attach a special term to it :) But I digress... It's true that Struts doesn't have any built-in provisions for event-driven web development, but it does nothing to stop you from implementing it yourself. I mean, in the end, ASP.Net, JSF, Shale, the work of Michael Jouravlev, and all the other contenders are doing exactly that... it's still HTTP underneath it all. What does the event-driven model offer you? It allows you to build webapps that are much more like fat-client apps in terms of how they work and how the user interacts with it. We're far enough along in things that we can now differentiate two types of webapps... one is the "classic" model, as I like to call it... this is the "fill in some form fields, click a button, wait for a new page to appear" model. This served us well for a couple of years, but even from the beginning you could see that is was a step back from what we were used to in terms of native apps. There just wasn't much choice... we didn't yet know how to do anything else! Now we're moving on to the RIA's... these are applications that don't necessarily flow from page to page, instead the user can navigate them at will, more or less. "Events" that occur on the client-side don't automatically have to result in a whole new page being rendered (and this DOES NOT require AJAX, the other buzzword of the day, although it is one good way to achieve the result). As I said at the beginning, Struts doesn't offer this capability natively, but it does nothing to stop you from doing it yourself. At the end of the day, an event-driven model is more about a conceptual approach than it is concrete techniques. Don't view your webapp as a series of pages. Instead, view it as a collection of loosely-coupled "services" that you nit together to form a whole. You've probably heaard the term SOA, Service-Oriented Architecture... usually this refers to Web Services, but you can create a SOA-based single application just as well. Web development is going to continue to march more and more towards the RIA model of things. It's pretty much inevitable in my view. People are just now putting forth a number of different ways to get there, and it will be interesting to see which ones survive the shakedown period... I'm not sure it's fair to say that Struts lack of a true event model is a weakness... it simply wasn't a coherent concept when Struts was created. Frank Yuniar Setiawan wrote: > Hi there, > I've just read "Struts in Action" and found that one of struts > weakness is "no event model", means "Struts is tightly coupled with > the request-response model used by HTTP, this can be restricting to > developers used to finely grained events" > I've found all about this event model in JSF too. What I don't really > understand is, why do we really need event model for web application? > Isn't it suitable for desktop application? do we expected to code web > application like VB or delphi or others? > What's event model offered? > Thanks in advance > YNR > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Can nested tile layouts be done?
It can get a little difficult to keep up with. Basically, you have to know the Hierarchy of your tile and call the top most one. In this case, you would call .base which would intern call myEndUserPage.page1 and finally myEndUserPage.jsp. to change to another.jsp you would call .anotherPage in your action forward. Nesting tiles can be very useful when switching components of a tile, but can quickly become a headache when changing tiles in both layouts. I use the nested for menus only and have been debating on switching to struts menu because of the complexity. The only thing that has prevented me from doing this is waiting to see if I can jump to JSF or AJAX/D-HTML instead. Daniel Hannum <[EMAIL PROTECTED]> Daniel Hannum <[EMAIL PROTECTED]> 08/15/2005 04:55 PM Please respond to "Struts Users Mailing List" To Struts Users Mailing List cc Subject Re: Can nested tile layouts be done? Thanks, I think this is better. I still must be missing something about how Tiles works internally, though. In my app, the tiles definition for the end user page (the one that defines "body") is called "endUserPage.tiles" and Tiles is smart enough to handle requests for "endUserPage.jsp" in the correct "tiled" way. You have this arranged differently, where the end user page definition has a more cryptic name (.myEndUserPage.page1) and is referenced by .base. If I do it your way, then, how does Tiles know which URL to map to the tile layout we just produced? I just implemented my layout the way you've described, but now I don't know what URL to request because tiles-config.xmlno longer contains URLs. Thanks for your help Dan On 8/15/05, [EMAIL PROTECTED] < [EMAIL PROTECTED]> wrote: > > OK, I see: > > Your definition would need to extend .sublayout.. > > > /layout/layout > /layout/layout2 > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > [image: Inactive hide details for Daniel Hannum <[EMAIL PROTECTED]>]Daniel > Hannum <[EMAIL PROTECTED]> > > > > *Daniel Hannum <[EMAIL PROTECTED]>* > > 08/15/2005 03:51 PM Please respond to > "Struts Users Mailing List" < > user@struts.apache.org> > > > To > > Struts Users Mailing List > cc > > > Subject > > Re: Can nested tile layouts be done? > This still isn't working for me. I need to tweak your example because the > value of "body" changes for each page. So if I add one more definition to > my > tiles-config.xml for an actual end-user page that a user would point a > browser to: > > > > > > It's not clear which of your definitions I should extend. If I extend > .base > (the logical choice), I get the same behavior where the layout.jsp is > rendered and layout2.jsp is substituted in, but no substitutions are made > inside the layout2.jsp. If I extend .sublayout, I get even weirder > behavior > where it appears to render layout2.jsp but makes no substitutions at all. > > I looked at the Tiles examples and they don't seem to define individual > pages in the tiles-config.xml, as I did above. Could that be my problem? > > Dan > > On 8/15/05, [EMAIL PROTECTED] < > [EMAIL PROTECTED]> wrote: > > > > Yes, this can be done. The VBox example is a good example of this. > > > > Basically it is laid out as follows. > > > > /layout/layout > > /layout/layout2 > > > > > > > > > > > > > > > > > > > > > > > > you can then substitute out different components of each section based > on > > what you are doing. > > > > > > > > > > [image: Inactive hide details for Daniel Hannum <[EMAIL PROTECTED]>]Daniel > > > Hannum <[EMAIL PROTECTED]> > > > > > > > > *Daniel Hannum <[EMAIL PROTECTED]>* > > > > 08/15/2005 02:18 PM Please respond to > > "Struts Users Mailing List" < > > user@struts.apache.org> > > > > > > To > > > > user@struts.apache.org > > cc > > > > > > Subject > > > > Can nested tile layouts be done? > > Hi everyone, I have a question about nesting layouts with Struts > > tiles. I've seen this sort of thing discussed in the past, but in > > searching I didn't see an example that I could apply to my situation, > > nor did I see a good solution. > > > > Executive summary: > > > > What I want to do is have a simple layout containing two tiles, both > > of which are JSP's. However, one of those JSP's is actually another > > layout JSP, which itself contains tile placeholders. I can get Struts > > Tiles to do the substitutions for the first layout, but it seems to > > treat my second layout as a simple JSP and does not do further tiles > > substitutions in the second layout. > > > > Detailed description: > > > > We have two separate applications that share a common track bar at the > > top of the screen. Beyond that they are completely separate. So, we > > have a layout containing "trackbar" and "trackcontent". Trackbar is a > > common jsp as you can see below. Trackconten
How JSESSIONID is passes
Hi all, How Jsessionid is passed in the struts application and I don't have any control for that. how to avoid that. In my application I am facing the problem in the session it is creating the new session for every request. Is this problem related to Jsessionid? Thanks & Regards, SenthilRajan VS
Fwd: null pointer exception
Thanks I changed it to session.setAttribute and fixed it, But now I have another problem even I push the edit link of the second or third or any row, the "projectname" and "seqno" of the last row is sent to the action. What can I do? On 8/15/05, Michael Rasmussen <[EMAIL PROTECTED]> wrote: > > Balkan, > > which line is line 26 in edit action? Can you provide the entire stack > trace? > > Off hand I would guess that your call to request.getAttribute("key") > is returning null...I don't see any other likely suspects. > > Your JSP does this: > > pageContext.setAttribute("key",key); what is pageContext? > > if you are putting a variable in page scope, it will not be available > for the action when you repost to the server...you have a new page > scope (which is different from request scope) when you come back to > the server. If you want a variable to live across multiple trips to > the server, try putting it in the session. > > On 8/15/05, Balkan Guler <[EMAIL PROTECTED]> wrote: > > hello, > > I have a action form operForm and List operMenus field. operMenu is an > > other class that has some field. > > I am listing all of the operMenu objects and their fields. > > At the end of the each row I have an edit link that sends, its row's > primary > > key to an action. > > operMenu class has two primary key and I instantiate a hashmap and put > the > > primary keys into hashmap. > > In action class I want to get the hashmap but I am taking null pointer > > exception. > > > property="operMenus"> > > > > property > > =" compositeId.projectname"/> > > property > > ="compositeId.seqno"/> > > > property ="parentseqno"/> > > property > > ="groupseqno"/> > > > > > > <%java.util.HashMap key = new java.util.HashMap(); > > key.put("projectname", projectName); > > key.put("seqno", seqNo); > > pageContext.setAttribute("key",key);%> > > > paramId="index" paramName="key">Edit > > > > > > -* > > editAction::: > > public ActionForward execute(ActionMapping mapping, ActionForm form, > > HttpServletRequest request, HttpServletResponse response) throws > Exception { > > > > java.util.HashMap keymap = (java.util.HashMap > )request.getAttribute("key"); > > > > String projectname = (String)keymap.get("projectname"); > > String seqno = (String)keymap.get("seqno"); > > > > System.out.println(projectname); > > return mapping.findForward(FORWARD_detail); > > } > > And the error message: > > java.lang.NullPointerException > > at actions.editAction.execute(editAction.java:26) > > What is the problem?? > > > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
Re: Struts weaknesses question
On 8/15/05, Frank W. Zammetti <[EMAIL PROTECTED]> wrote: > The latest buzzword being tossed around lately is RIA, Rich Internet > Applications. Some of us laugh at the term because we've been doing > RIA's for 5+ years now and never thought to attach a special term to it > :) But I digress... Continuing the digression theme ... Buzzword would be one categorization, but "pattern name" might be another. Many people used Facade and Composite, et al, for years before the GOF gave them names. Ditto for POJO. To name a thing is to own a thing. Of late, we've come to own POJOs, Ajax, and RIAs. :) -Ted. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
SV: Populate drop down box
Hi Use : html:optionsCollection name="MakeCollectionFormBean" property="values" label="label" value="label" /> >From the docs: This tag operates on a collection of beans, where each bean has a label property and a value property. The actual names of these properties can be configured using the label and value attributes of this tag. Use for instance ArrayList for MakeCollectionFormBean, not an ActionForm Hermod -Opprinnelig melding- Fra: Gooshy GooSHY [mailto:[EMAIL PROTECTED] Sendt: 16. august 2005 11:11 Til: user@struts.apache.org Emne: Populate drop down box Hi, I'm pretty new to struts and haven't been using it for very long. I have spent the past few days trawling though web sites and usenet trying to find the answer to my problem below. If anyone can help it would be much appreciated. I am trying to find an example of code that will populate a collection within a form bean and then forward it on to a jsp where the drop down box will have the contents of the collection. I have got the gist of how this is done but can't quite get the syntax correct. I have the following in my forwarded JSP: MakeCollectionFormBean is set up to only contain a getter and setter for my Vector collections as shown below: import java.util.Vector; import org.apache.struts.action.ActionForm; public class MakeCollectionFormBean extends ActionForm { private Vector makes; public Vector getMakes() { return makes; } public void setMakes(Vector makes) { this.makes = makes; } } My Vector contains LabelValueBean objects. If anyone can help with what should go where it would be really helpfull. Thanks Scott. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * This email with attachments is solely for the use of the individual or entity to whom it is addressed. Please also be aware that the DnB NOR Group cannot accept any payment orders or other legally binding correspondence with customers as a part of an email. This email message has been virus checked by the virus programs used in the DnB NOR Group. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
SV: Session Problem
Hi Yes, indeed this will happen: use geSession() or getSession(false), also avoid redirect combined with this. Hermod -Opprinnelig melding- Fra: Senthilrajan VS [mailto:[EMAIL PROTECTED] Sendt: 16. august 2005 11:08 Til: Sturts Mailing list Emne: Session Problem Hi all, I am having serious session problem in some of the browsers(Not all). I'm using struts. In the Action class I am using HttpSession Session=request.getSession(true); to get the session and I'm keep on calling this action for different condition. The problem is For each request it is creating the new session and I'm not able to get the session values. Please help me to come out of this problem Thanks & Regards, SenthilRajan VS * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * This email with attachments is solely for the use of the individual or entity to whom it is addressed. Please also be aware that the DnB NOR Group cannot accept any payment orders or other legally binding correspondence with customers as a part of an email. This email message has been virus checked by the virus programs used in the DnB NOR Group. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Problem with Html File Object
Hi All, I am facing a problem with html file object. Can we assign value to file object externally ?. Thanks in Advance Pramod.
Populate drop down box
Hi, I'm pretty new to struts and haven't been using it for very long. I have spent the past few days trawling though web sites and usenet trying to find the answer to my problem below. If anyone can help it would be much appreciated. I am trying to find an example of code that will populate a collection within a form bean and then forward it on to a jsp where the drop down box will have the contents of the collection. I have got the gist of how this is done but can't quite get the syntax correct. I have the following in my forwarded JSP: MakeCollectionFormBean is set up to only contain a getter and setter for my Vector collections as shown below: import java.util.Vector; import org.apache.struts.action.ActionForm; public class MakeCollectionFormBean extends ActionForm { private Vector makes; public Vector getMakes() { return makes; } public void setMakes(Vector makes) { this.makes = makes; } } My Vector contains LabelValueBean objects. If anyone can help with what should go where it would be really helpfull. Thanks Scott. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Session Problem
Hi all, I am having serious session problem in some of the browsers(Not all). I'm using struts. In the Action class I am using HttpSession Session=request.getSession(true); to get the session and I'm keep on calling this action for different condition. The problem is For each request it is creating the new session and I'm not able to get the session values. Please help me to come out of this problem Thanks & Regards, SenthilRajan VS
[OT] ConvertUtils Mess
I am using my custom converters to convert from String to Date, we are using Quartz as well, which also does the same with its own DateConverters. Unfortunately my date formats and quartz date formats are different. Initially my idea was to register the converters as a part of plugin, which has already been discussed over in this forum. Now with quartz changing the converters in the middle of running application, I have to re-register the converters every time I want to use them, the problem however is that I still can not say with surety which converters would be used where. Has any one ever came across such a scenario and if yes, what is the solution? Thanks and Regards, Nitish Kumar