bean:write and scriptlet write
I have a bean defined on a page. I can write some of the methods using scriptlet code, but not others. However, I can write the others with bean:write. For example, the following code causes a cannot resolve symbol : method getIndexFactor () servlet exception.: %= sortedQueueCursor.getIndexFactor() % But this works on the same page: bean:write name=sortedQueueCursor property=indexFactor/ But I can do the following successfully with the same bean on the same page: %= sortedQueueCursor.getComparatorName() % Both methods return Strings. What am I missing? Thanks
RE: bean:message
Thanks guys. I wasn't aware of the formatKey property. And I'm not aware of what docs to look at to find out more. I looked in Taglib Documentation and scanned the JavaDocs. If there's an obvious place where I should have found this, please enlighten me. I'd like to know more. Thanks again. -Original Message- From: Sri Sankaran [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 20, 2003 1:52 PM To: Struts Users Mailing List Subject: RE: bean:message Because I am competing for the Rube Goldberg award:) Thanks for reminding me to read the docs. Sri -Original Message- From: James Mitchell [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 20, 2003 1:50 PM To: 'Struts Users Mailing List' Subject: RE: bean:message Why don't you just use formatKey? bean:write name=hwa property=placedOnHWATs formatKey=date.digit.format/ -- James Mitchell Software Engineer/Struts Evangelist http://www.open-tools.org/ The man who does not read good books has no advantage over the man who cannot read them. - Mark Twain (1835-1910) -Original Message- From: Sri Sankaran [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 20, 2003 1:38 PM To: Struts Users Mailing List Subject: RE: bean:message You can't nest as you have shown. Here's an alternative: bean:define id=foo bean:message key=date.digit.format/ /bean:define bean:write name=hwa property=placedOnHWATs format=%=foo%/ Sri -Original Message- From: Cohan, Sean [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 20, 2003 1:39 PM To: Struts (E-mail) Subject: bean:message Is it possible to nest a bean:message tag within a bean:write tag? I want to get the format property out of the application.resources file, but I get an jsp.error.unterminated.tag error. Here's how I'm trying to do it: bean:write name=hwa property=placedOnHWATs bean:message key=date.digit.format/ / and in the resource file I have: date.digit.format=format=MM/dd/ Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - 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]
bean:message
Is it possible to nest a bean:message tag within a bean:write tag? I want to get the format property out of the application.resources file, but I get an jsp.error.unterminated.tag error. Here's how I'm trying to do it: bean:write name=hwa property=placedOnHWATs bean:message key=date.digit.format/ / and in the resource file I have: date.digit.format=format=MM/dd/ Thanks.
Multi-Select List Box
If I use a collection to create a multi-select html:select, how do I get the selected items back to my action class? Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Multi-Select List Box
Thanks. -Original Message- From: David Graham [mailto:[EMAIL PROTECTED]] Sent: Saturday, February 01, 2003 11:56 AM To: [EMAIL PROTECTED] Subject: Re: Multi-Select List Box Define a String[] in your form bean with the same name as your select box. David From: Cohan, Sean [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts (E-mail) [EMAIL PROTECTED] Subject: Multi-Select List Box Date: Sat, 1 Feb 2003 11:39:40 -0500 If I use a collection to create a multi-select html:select, how do I get the selected items back to my action class? Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ The new MSN 8: smart spam protection and 2 months FREE* http://join.msn.com/?page=features/junkmail - 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]
Collection within Collection
I have a collection (of ArrayLists) within a collection of (ArrayLists). That is: public class HistoryItemImpl implements HistoryItem { private String objectName; private List deltaList; ... } public class DeltaItemImpl implements DeltaItem { private String columnName; private Object oldValue; private Object newValue; ... } In my action class I call a method that returns a collection of historyItems. I set that in request scope: request.setAttribute(historyItems, historyList); And then iterate though it on me page: logic:iterate id=historyItem name=historyItems type=com.gosps.cbd.util.HistoryItem For each historyItem iteration, I want to iterate though the deltaItems: logic:iterate id=deltaItem name=deltaItems type=com.gosps.cbd.util.DeltaItem How can I do this? How do I refer to the deltaItem collection within each historyItem collection? Thanks. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Collection within Collection
That was quick! Thanks. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 14, 2003 9:57 AM To: [EMAIL PROTECTED] Subject: RE: Collection within Collection Try nested:iterate tag Regards, PQ This Guy Thinks He Knows Everything This Guy Thinks He Knows What He Is Doing -Original Message- From: Cohan, Sean [mailto:[EMAIL PROTECTED]] Sent: January 14, 2003 9:59 AM To: Struts (E-mail) Subject: Collection within Collection I have a collection (of ArrayLists) within a collection of (ArrayLists). That is: public class HistoryItemImpl implements HistoryItem { private String objectName; private List deltaList; ... } public class DeltaItemImpl implements DeltaItem { private String columnName; private Object oldValue; private Object newValue; ... } In my action class I call a method that returns a collection of historyItems. I set that in request scope: request.setAttribute(historyItems, historyList); And then iterate though it on me page: logic:iterate id=historyItem name=historyItems type=com.gosps.cbd.util.HistoryItem For each historyItem iteration, I want to iterate though the deltaItems: logic:iterate id=deltaItem name=deltaItems type=com.gosps.cbd.util.DeltaItem How can I do this? How do I refer to the deltaItem collection within each historyItem collection? Thanks. -- 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: Collection within Collection
Excuse my naiveté, how would I refer to collection within a collection? Thanks -Original Message- From: Mark Galbreath [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 14, 2003 10:20 AM To: 'Struts Users Mailing List' Subject: RE: Collection within Collection You can use the Index property of the iterate tag to iterate through a collection of collections. Mark -Original Message- From: Wendy Smoak [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 14, 2003 10:04 AM I have a collection (of ArrayLists) within a collection of (ArrayLists). In my action class I call a method that returns a collection of historyItems. I set that in request scope: For each historyItem iteration, I want to iterate though the deltaItems: How can I do this? How do I refer to the deltaItem collection within each historyItem collection? Is JSTL an option? You can nest c:forEach tags and iterate through collections of collections. -- Wendy Smoak Applications Systems Analyst, Sr. Arizona State University PA Information Resources Management -- 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: Collection within Collection
I'm lost with this stuff. I can't seem to get it working. I'm getting the following error: [ServletException in:/tiles/cc/cat_history_content.jsp] No selector attribute (cookie/header/name/parameter) was specified' I set my collection in my action class in request attribute: request.setAttribute(historyItems, historyList); Then in my page I have: logic:iterate id=historyItem name=historyItems type=com.gosps.cbd.util.HistoryItem indexId=hiIndex logic:iterate id=deltaItem name=historyItem property=deltaList type=com.gosps.cbd.util.DeltaItem indexId=diIndex bean:write name=deltaItem property=columnName / /logic:iterate /logic:iterate Setting the types to java.util.List doesn't help either. Any ideas. -Original Message- From: Mark Galbreath [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 14, 2003 12:31 PM To: 'Struts Users Mailing List' Subject: RE: Collection within Collection If you have a collection like an ArrayList, every element has an index. At each of these element addresses, you have another ArrayList. With Struts, if you iterate through the parent collection based on the indexId (first element = 0, last element = n-1), you can retrieve the contents of each collection stored at the element index of the collection automatically: logic:iterate name=parentCollection property=parentProperty indexId=parentIndex //arbitrary name id=parent//arbitrary name type=java.util.List logic:iterate name=parent property=childProperty indexId=childIndex //arbitrary name id=child//arbitrary name type=java.util.List bean:write name=child property=_whatever_ / // etc. /logic:iterate /logic:iterate Mark -Original Message- From: Cohan, Sean [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 14, 2003 11:08 AM Excuse my naiveté, how would I refer to collection within a collection? Thanks -- 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: Collection within Collection
Yes, I have the entire historyList printed out in the action class to make sure it has data. The historyList has a length of 9. Each historyItem contains a list of DeltaItems of length 3. The attributes are correct. -Original Message- From: Mark Galbreath [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 14, 2003 3:51 PM To: 'Struts Users Mailing List' Subject: RE: Collection within Collection Do you really have a DeltaItem object with an attribute named columnName? BTW: You don't need the indexId unless you want to specifically access an element (e.g., if( diIndex == 2 ){...}). -Original Message- From: Cohan, Sean [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 14, 2003 3:10 PM I'm lost with this stuff. I can't seem to get it working. I'm getting the following error: [ServletException in:/tiles/cc/cat_history_content.jsp] No selector attribute (cookie/header/name/parameter) was specified' I set my collection in my action class in request attribute: request.setAttribute(historyItems, historyList); Then in my page I have: logic:iterate id=historyItem name=historyItems type=com.gosps.cbd.util.HistoryItem indexId=hiIndex logic:iterate id=deltaItem name=historyItem property=deltaList type=com.gosps.cbd.util.DeltaItem indexId=diIndex bean:write name=deltaItem property=columnName / /logic:iterate /logic:iterate Setting the types to java.util.List doesn't help either. Any ideas. -Original Message- From: Mark Galbreath [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 14, 2003 12:31 PM To: 'Struts Users Mailing List' Subject: RE: Collection within Collection If you have a collection like an ArrayList, every element has an index. At each of these element addresses, you have another ArrayList. With Struts, if you iterate through the parent collection based on the indexId (first element = 0, last element = n-1), you can retrieve the contents of each collection stored at the element index of the collection automatically: logic:iterate name=parentCollection property=parentProperty indexId=parentIndex //arbitrary name id=parent//arbitrary name type=java.util.List logic:iterate name=parent property=childProperty indexId=childIndex //arbitrary name id=child//arbitrary name type=java.util.List bean:write name=child property=_whatever_ / // etc. /logic:iterate /logic:iterate Mark -Original Message- From: Cohan, Sean [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 14, 2003 11:08 AM Excuse my naiveté, how would I refer to collection within a collection? Thanks -- 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: Collection within Collection
I got it working pretty much the way you instructed Mark. Thanks very much!!! My head was getting sore from banging it against the wall. I think, ultimately, it was me not referring to the bean attributes correctly (or something I did wrong, not really sure, but thankful that it's finally working.) -Original Message- From: Mark Galbreath [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 14, 2003 3:51 PM To: 'Struts Users Mailing List' Subject: RE: Collection within Collection Do you really have a DeltaItem object with an attribute named columnName? BTW: You don't need the indexId unless you want to specifically access an element (e.g., if( diIndex == 2 ){...}). -Original Message- From: Cohan, Sean [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 14, 2003 3:10 PM I'm lost with this stuff. I can't seem to get it working. I'm getting the following error: [ServletException in:/tiles/cc/cat_history_content.jsp] No selector attribute (cookie/header/name/parameter) was specified' I set my collection in my action class in request attribute: request.setAttribute(historyItems, historyList); Then in my page I have: logic:iterate id=historyItem name=historyItems type=com.gosps.cbd.util.HistoryItem indexId=hiIndex logic:iterate id=deltaItem name=historyItem property=deltaList type=com.gosps.cbd.util.DeltaItem indexId=diIndex bean:write name=deltaItem property=columnName / /logic:iterate /logic:iterate Setting the types to java.util.List doesn't help either. Any ideas. -Original Message- From: Mark Galbreath [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 14, 2003 12:31 PM To: 'Struts Users Mailing List' Subject: RE: Collection within Collection If you have a collection like an ArrayList, every element has an index. At each of these element addresses, you have another ArrayList. With Struts, if you iterate through the parent collection based on the indexId (first element = 0, last element = n-1), you can retrieve the contents of each collection stored at the element index of the collection automatically: logic:iterate name=parentCollection property=parentProperty indexId=parentIndex //arbitrary name id=parent//arbitrary name type=java.util.List logic:iterate name=parent property=childProperty indexId=childIndex //arbitrary name id=child//arbitrary name type=java.util.List bean:write name=child property=_whatever_ / // etc. /logic:iterate /logic:iterate Mark -Original Message- From: Cohan, Sean [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 14, 2003 11:08 AM Excuse my naiveté, how would I refer to collection within a collection? Thanks -- 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]
Cannot find bean...
I'm struggling with the exception below trying to figure out how to resolve it. It appears when I add the following hidden parameter to the form. html:hidden property=method/ I have the parameter getter and setters in the form class, and as a parameter in the action mapping. Can someone steer me in the right direction? Thanks. Here's the exception org.apache.jasper.JasperException: Cannot find bean org.apache.struts.taglib.html.BEAN in any scope -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Cannot find bean...
Yes, both the form and action classes are in the server lib (and in the calsspath.) -Original Message- From: Sterin, Ilya [mailto:[EMAIL PROTECTED]] Sent: Sunday, January 12, 2003 11:07 AM To: 'Struts Users Mailing List' Subject: RE: Cannot find bean... Well, do you have that class anywhere in the servers lib dir? Ilya -Original Message- From: Cohan, Sean [mailto:[EMAIL PROTECTED]] Sent: Sunday, January 12, 2003 11:05 AM To: Struts (E-mail) Subject: Cannot find bean... I'm struggling with the exception below trying to figure out how to resolve it. It appears when I add the following hidden parameter to the form. html:hidden property=method/ I have the parameter getter and setters in the form class, and as a parameter in the action mapping. Can someone steer me in the right direction? Thanks. Here's the exception org.apache.jasper.JasperException: Cannot find bean org.apache.struts.taglib.html.BEAN in any scope -- 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: Logic Equals and Interface Constants
There are multiple classes that build a collection which is presented on only one jsp. For simplicity, I'll refer to constants in the classes and literals on the one jsp. Then if the constants change, I only have to change them in the interface and jsp. Thanks. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Friday, January 10, 2003 7:31 PM To: [EMAIL PROTECTED] Subject: Re: Logic Equals and Interface Constants Sean == Sean Cohan Cohan writes: Sean I'd like to somehow use some final static int's defined in an interface Sean within logic:equal tags. Something like: Sean logic:equal name=columnType value=DeltaItem.LONGTEXT Sean Can I do this or something like it (e.g., using chars instead of int's)? You'll have to use expression scriptlets for the attribute value. In those expressions, you can produce any Java expression you want. If you want/need to avoid scriptlets, then you'd have to use a more involved process, using Struts-EL, along with a class that uses reflection to load static final constants into a HashMap which can be referenced through the EL. -- === David M. Karr ; Java/J2EE/XML/Unix/C++ [EMAIL PROTECTED] ; SCJP; SCWCD -- 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]
Logic Equals and Interface Constants
I'd like to somehow use some final static int's defined in an interface within logic:equal tags. Something like: logic:equal name=columnType value=DeltaItem.LONGTEXT Can I do this or something like it (e.g., using chars instead of int's)? Thanks. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Iterate Index Evaluation
I need to iterate over a collection and be able to tell whether the current index is odd or even. Any ideas on how I can use the logic tag for this? logic:match name=index value=odd or even? Thanks. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Iterate Index Evaluation
Thanks, but I think there will be a problem with the bean:define since the jsp 1.1 spec does not allow you to use the same bean name more than once in a single page (which is what we would be doing in an iterate tag.) Unless I'm misinterpreting. -Original Message- From: Siggelkow, Bill [mailto:[EMAIL PROTECTED]] Sent: Friday, January 03, 2003 2:49 PM To: 'Struts Users Mailing List' Subject: RE: Iterate Index Evaluation Try something like ... logic:iterate indexId=index ... bean:define id=indexMod2 value='%= index % 2 %'/ logic:equal name=indexMod2 value=0 markup for even row here /logic:equal logic:notEqual name=indexMod2 value=0 markup for odd row here /logic:equal /logic:iterate -Original Message- From: Cohan, Sean [mailto:[EMAIL PROTECTED]] Sent: Friday, January 03, 2003 2:40 PM To: Struts (E-mail) Subject: Iterate Index Evaluation I need to iterate over a collection and be able to tell whether the current index is odd or even. Any ideas on how I can use the logic tag for this? logic:match name=index value=odd or even? Thanks. -- 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: Iterate Index Evaluation
chuckle, chuckle... -Original Message- From: Siggelkow, Bill [mailto:[EMAIL PROTECTED]] Sent: Friday, January 03, 2003 3:43 PM To: 'Struts Users Mailing List' Subject: RE: Iterate Index Evaluation Er ... I think you may be right ... I know it can be done using scriptlet for example: logic:iterate indexId=index ... % if ((index % 2) == 0) {% even row markup here % } else { % odd row markup here % } % /logic:iterate But we all know how evil this is! -Original Message- From: Cohan, Sean [mailto:[EMAIL PROTECTED]] Sent: Friday, January 03, 2003 3:05 PM To: 'Struts Users Mailing List' Subject: RE: Iterate Index Evaluation Thanks, but I think there will be a problem with the bean:define since the jsp 1.1 spec does not allow you to use the same bean name more than once in a single page (which is what we would be doing in an iterate tag.) Unless I'm misinterpreting. -Original Message- From: Siggelkow, Bill [mailto:[EMAIL PROTECTED]] Sent: Friday, January 03, 2003 2:49 PM To: 'Struts Users Mailing List' Subject: RE: Iterate Index Evaluation Try something like ... logic:iterate indexId=index ... bean:define id=indexMod2 value='%= index % 2 %'/ logic:equal name=indexMod2 value=0 markup for even row here /logic:equal logic:notEqual name=indexMod2 value=0 markup for odd row here /logic:equal /logic:iterate -Original Message- From: Cohan, Sean [mailto:[EMAIL PROTECTED]] Sent: Friday, January 03, 2003 2:40 PM To: Struts (E-mail) Subject: Iterate Index Evaluation I need to iterate over a collection and be able to tell whether the current index is odd or even. Any ideas on how I can use the logic tag for this? logic:match name=index value=odd or even? Thanks. -- 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: Iterate Index Evaluation
Thanks very much! I will. -Original Message- From: Siggelkow, Bill [mailto:[EMAIL PROTECTED]] Sent: Friday, January 03, 2003 3:53 PM To: 'Struts Users Mailing List' Subject: RE: Iterate Index Evaluation Strike that ... reverse it! I was able to use the bean:define as follows: logic:iterate indexId=ndx ... bean:define id=tmpMod value=%= String.valueOf(ndx.intValue() % 2) %/ logic:equal name=tmpMod value=0 even markup here /logic:equal logic:notEqual name=tmpMod value=0 odd markup here /logic:notEqual /logic:iterate Give it a try! The expression is still a little wicked but not as evil as the scriptlet. -Original Message- From: Siggelkow, Bill [mailto:[EMAIL PROTECTED]] Sent: Friday, January 03, 2003 3:43 PM To: 'Struts Users Mailing List' Subject: RE: Iterate Index Evaluation Er ... I think you may be right ... I know it can be done using scriptlet for example: logic:iterate indexId=index ... % if ((index % 2) == 0) {% even row markup here % } else { % odd row markup here % } % /logic:iterate But we all know how evil this is! -Original Message- From: Cohan, Sean [mailto:[EMAIL PROTECTED]] Sent: Friday, January 03, 2003 3:05 PM To: 'Struts Users Mailing List' Subject: RE: Iterate Index Evaluation Thanks, but I think there will be a problem with the bean:define since the jsp 1.1 spec does not allow you to use the same bean name more than once in a single page (which is what we would be doing in an iterate tag.) Unless I'm misinterpreting. -Original Message- From: Siggelkow, Bill [mailto:[EMAIL PROTECTED]] Sent: Friday, January 03, 2003 2:49 PM To: 'Struts Users Mailing List' Subject: RE: Iterate Index Evaluation Try something like ... logic:iterate indexId=index ... bean:define id=indexMod2 value='%= index % 2 %'/ logic:equal name=indexMod2 value=0 markup for even row here /logic:equal logic:notEqual name=indexMod2 value=0 markup for odd row here /logic:equal /logic:iterate -Original Message- From: Cohan, Sean [mailto:[EMAIL PROTECTED]] Sent: Friday, January 03, 2003 2:40 PM To: Struts (E-mail) Subject: Iterate Index Evaluation I need to iterate over a collection and be able to tell whether the current index is odd or even. Any ideas on how I can use the logic tag for this? logic:match name=index value=odd or even? Thanks. -- 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] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
TLD in Every Tile?
Is there a way to not have to include the struts and tile tlds in each and every jsp that makeup a layout? Can't we just include it one high level jsp somehow and have it inherited from every other jsp that makes up a particular layout? Thanks. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Index Based Names in Iterate Tag
I want to present a collection of beans using the logic:iterate tag. One of the fields in the collection is another collection of beans. This second collection of beans I want presented in an html select object. In my Action Class, I'd like to iterate through the first collection creating http request attributes, each one containing an instance of the second collection. Something like this: List list = (List) getList(); Iterator it = list.iterator(); for (i=1; it.hasNext(), i++) { MyBean myBean = (MyBean) it.next(); request.setAttribute (select+ i, (List) myBean.getOtherList()); } I want to use the html:options tag to populate the select objects. The collection parameter of html:options will have to the name of the attributes created above (i.e., select1, select2, select3,...) How can I create the collection name in each html:options tag in the jsp? Can I use the indexId of the Iterate tag somehow to create it? For example, something like: table border=0 cellpadding=0 cellspacing=0 logic:iterate ... tr td html:select property=key html:options collection=select + indexOf property=id labelProperty=description / /html:select /td /tr /logic:iterate /table I know my use of indexOf can't be right. I'm just trying to show the idea of what I'm trying to do. Thanks. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Index Based Names in Iterate Tag
Where I say indexOf below, I meant to say indexId. Thanks again. -Original Message- From: Cohan, Sean [mailto:[EMAIL PROTECTED]] Sent: Thursday, November 21, 2002 8:44 AM To: Struts (E-mail) Subject: Index Based Names in Iterate Tag I want to present a collection of beans using the logic:iterate tag. One of the fields in the collection is another collection of beans. This second collection of beans I want presented in an html select object. In my Action Class, I'd like to iterate through the first collection creating http request attributes, each one containing an instance of the second collection. Something like this: List list = (List) getList(); Iterator it = list.iterator(); for (i=1; it.hasNext(), i++) { MyBean myBean = (MyBean) it.next(); request.setAttribute (select+ i, (List) myBean.getOtherList()); } I want to use the html:options tag to populate the select objects. The collection parameter of html:options will have to the name of the attributes created above (i.e., select1, select2, select3,...) How can I create the collection name in each html:options tag in the jsp? Can I use the indexId of the Iterate tag somehow to create it? For example, something like: table border=0 cellpadding=0 cellspacing=0 logic:iterate ... tr td html:select property=key html:options collection=select + indexOf property=id labelProperty=description / /html:select /td /tr /logic:iterate /table I know my use of indexOf can't be right. I'm just trying to show the idea of what I'm trying to do. Thanks. -- 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]
Parameter
I'm in one action class and I'm want to forward to another DispatchAction class. The second DispatchAction class requires a 'method' parameter which is used to determine which method to call within the DispatchAction. How can I set the method parameter in the first action class so it can be used by the DispatchAction? Right now, I trying request.setAttribute(method, getChangesSinceLastCertified) just before forwarding, but I'm getting a HTTP Status 400 - Request[/recertify] does not contain handler parameter named method. Thanks. -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
alt tags error?
Could there a problem with the alt tag for html:image or html:img tags? We see nothing when we hover over them. Thanks. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
html:select / option defaultSelected or selected
Is there any way I can specify the defaultSelected or selected property for an html:select or an html:option? I use the html:options to populate the options with an ArrayList of beans. I need to also specify the value that should be initially selected. Thanks. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
FW: Forwarding Back to one Of Many Pages
No takers on this one??? -Original Message- From: Cohan, Sean [mailto:[EMAIL PROTECTED]] Sent: Thursday, October 10, 2002 4:48 PM To: 'Struts Users Mailing List' Subject: Forwarding Back to one Of Many Pages I'm sure this has been asked before. Several pages can link or forward to my page. My page is mapped to a DispatchAction (because I need to get some initial data and then process the submitted data.) After submitting, the user is forwarded to another 'action succeeded' page. I need to know how to get the user back to whatever page they used to arrive at my initial page. The user could cancel and I would have to get them back to the original page, or the action succeeds and I have to get them back to the original page from the 'action succeeded' page. How can I do this? Lastly, how can I prevent the user from bookmarking the form page or 'action succeeded' page. Or at least, how can I make the bookmark be a page I want it to be (i.e., the initiating page in a chain of pages?) Thanks. -- 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: Forwarding Back to one Of Many Pages
ok, ok. it is almost beer o'clock. thanks. -Original Message- From: Chappell, Simon P [mailto:[EMAIL PROTECTED]] Sent: Friday, October 11, 2002 2:54 PM To: Struts Users Mailing List Subject: RE: Forwarding Back to one Of Many Pages It's Friday afternoon man! Even Mark isn't thinking about Struts over there in Blighty, most likely nursing a warm beer. ;-) A way of knowing where you came from, is to pass a parameter called url that has the value of the page where you came from. But, I want to STRONGLY DISCOURAGE you from doing such a thing. Treat your web app as a state machine and if you know where you are and what your state is, then you'll only ever have to worry about where you can go next and ignore piddly details like where you have just come from. This WORKS VERY WELL, and I just did it so I'm not talking from anywhere south of my neck! :-) Simon - Simon P. Chappell [EMAIL PROTECTED] Java Programming Specialist www.landsend.com Lands' End, Inc. (608) 935-4526 -Original Message- From: Cohan, Sean [mailto:[EMAIL PROTECTED]] Sent: Friday, October 11, 2002 1:48 PM To: '[EMAIL PROTECTED]' Subject: FW: Forwarding Back to one Of Many Pages No takers on this one??? -Original Message- From: Cohan, Sean [mailto:[EMAIL PROTECTED]] Sent: Thursday, October 10, 2002 4:48 PM To: 'Struts Users Mailing List' Subject: Forwarding Back to one Of Many Pages I'm sure this has been asked before. Several pages can link or forward to my page. My page is mapped to a DispatchAction (because I need to get some initial data and then process the submitted data.) After submitting, the user is forwarded to another 'action succeeded' page. I need to know how to get the user back to whatever page they used to arrive at my initial page. The user could cancel and I would have to get them back to the original page, or the action succeeds and I have to get them back to the original page from the 'action succeeded' page. How can I do this? Lastly, how can I prevent the user from bookmarking the form page or 'action succeeded' page. Or at least, how can I make the bookmark be a page I want it to be (i.e., the initiating page in a chain of pages?) Thanks. -- 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]
Forwarding Back to one Of Many Pages
I'm sure this has been asked before. Several pages can link or forward to my page. My page is mapped to a DispatchAction (because I need to get some initial data and then process the submitted data.) After submitting, the user is forwarded to another 'action succeeded' page. I need to know how to get the user back to whatever page they used to arrive at my initial page. The user could cancel and I would have to get them back to the original page, or the action succeeds and I have to get them back to the original page from the 'action succeeded' page. How can I do this? Lastly, how can I prevent the user from bookmarking the form page or 'action succeeded' page. Or at least, how can I make the bookmark be a page I want it to be (i.e., the initiating page in a chain of pages?) Thanks. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: ArrayList in Options
Very cool. Thanks. -Original Message- From: Pavel Kolesnikov [mailto:[EMAIL PROTECTED]] Sent: Wednesday, October 09, 2002 4:19 PM To: Struts Users Mailing List Subject: Re: ArrayList in Options On Wed, 9 Oct 2002, Cohan, Sean wrote: I'll have an ArrayList of beans in my ActionClass. Can I set the ArrayList in the html:options collection property? Yes. The doc says the collection attribute is interpreted as the name of a JSP bean, in some scope. ??? If I can do this, how do I expose this ArrayList to the jsp page and refer to it in the jsp page? Let's suppose beans in your collection have methods getId() and getName(). Then your action class should contain somthing like this: // expose your array list to the request scope request.setAttribute (blah, yourArrayList); Your JSP (forwarded from action class mentioned above): %-- render your select-box using collection from your action --% html:options collection=blah property=id labelProperty=Name / See http://jakarta.apache.org/struts/struts-html.html#options Pavel -- 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: IP Address
Is that the correct method? I get a 'can;t resolve symbol' compiler error. Thanks. -Original Message- From: Emmanuel Boudrant To: Struts Users Mailing List Sent: 9/18/02 6:09 AM Subject: Re: IP Address try this: request.getRemoteXxx(); -emmanuel --- Cohan, Sean [EMAIL PROTECTED] a écrit : How do I get the referrer's IP address in my action class? Thanks. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] ___ Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français ! Yahoo! Mail : http://fr.mail.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]
IP Address
How do I get the referrer's IP address in my action class? Thanks. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Two Phase ActionClass
Craig, in this thread you said I shouldn't have to have hidden fields because the username and password fields should still be set on the form bean associated with loginUser. Do I have to do anything in the Logon action to make these fields available to the loginWarning.jsp (like session.setAttribute(mapping.getAttribute(), form);)? I wasn't doing so. thanks. -Original Message- From: Craig Tataryn [mailto:[EMAIL PROTECTED]] Sent: Monday, September 09, 2002 2:54 PM To: Struts Users Mailing List Subject: Re: Two Phase ActionClass Create hidden fields (html:hidden) on the loginWarning.jsp page with the same name of the username and password fields. So long as they are within the html:form tag as the others, it should pickup the values from the FormBean that were set in login.jsp. Actually, you shouldn't even need the hidden fields, because the username and password fields should still be set on the form bean associated with loginUser. This is the same action you are using for the Continue button. So basically, inside the continue method as well as the continue else branch of showWarningIfNecessary you should be able to dig those values out of the form. Let me know if that works for you, Craig. - Original Message - From: Cohan, Sean [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Sent: Monday, September 09, 2002 2:36 PM Subject: RE: Two Phase ActionClass After clicking on continue on the loginWarning.jsp page, I no longer have the username and password fields that are validated in the validate method of the loginForm. How should I make this available? Thanks. -Original Message- From: Craig Tataryn [mailto:[EMAIL PROTECTED]] Sent: Friday, September 06, 2002 11:01 PM To: [EMAIL PROTECTED] Subject: Re: Two Phase ActionClass Sean, not sure if I would recycle the login page to show the warning, instead I would have another page called loginWarning.jsp which showed them a message and then presented a Continue and Cancel button. The Continue button would send them back to the logon Action class and the Cancel button would simply be a link back to the login.jsp page. However, I would change my Action class to a DispatchAction class and setup things like they have in the DispatchAction API doc, in your case, something like this: action path=/loginUser type=my.package.LoginUserAction name=subscriptionForm scope=request input=/login.jsp parameter=action forward name=warn path=/loginWarning.jsp/ forward success path=afterLogin.jsp/ /action I would then have two jsps, one for logging in (login.jsp) and then the one for warning (loginWarning.jsp), and I would code my DispatachAction class as follows: import org.apache.struts.action.DispatchAction; public class LoginUserAction extends DispatchAction { //have one method named for each possible function name you will be //passing in the action parameter //invoked when our Action class is called with action=showWarningIfNecessary public ActionForward showWarningIfNecessary(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { //if the user is already logged in //return mappings.findForward(warning); //else return mappings.findForward(success); } //invoked when our Action class is called with action=continue public ActionForward continue(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { return mappings.findForward(success); } } In login.jsp, you would have a hidden form field with a name of action and a value of showWarningIfNecessary: html:hidden name=action value=showWarningIfNecessary/ In loginWarning.jsp your continue button could just be a link to: loginUser.do?action=continue (or you could have a hidden field named action like in login.jsp, but the value would be continue) And your cancel button could be a link to: login.jsp If you read the API doc on DispatchAction, this will all make sense. Hope that helped! Craig. From: Cohan, Sean [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Subject: Two Phase ActionClass Date: Fri, 6 Sep 2002 20:14:37 -0400 Within my logon ActionClass, I want to check the user's user id/password and whether they are currently logged on anywhere else. If they are logged on elsewhere, I want to go back to the logon page to warn them and give them a chance to continue or to bail. If they continue, I want to skip over the check whether they are logged on elsewhere. I'm struggling with how from my logon.jsp page I can instruct the logon action to one thing one time and another thing another time. I was thinking maybe the ActionMapping parameter, but I don't really know how to use it. I'm searching. Can someone give me a good way to do what I'm trying
Disable Navigation
For our app, if the user logs in for the first time or if the user's password is 30 days old, we require that they change it immediately logging in. So from the logon action we send them to a password.jsp. But the user should also be able to go to password.jsp anytime after logging in from (just about) any other jsp. For the former case, we would want to disable any navigation on password.jsp. And for the latter case enable the navigation. How can I distinguish when I should disable the navigation? That is, how do I know that they came from the logon action and not some other jsp? Or should I be using two separate password pages? Thanks. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: FW: Disable Navigation
Thanks very much guys. I think I'll have it popup only if thy get there from within the app by their own choosing. And I'll use a logic:present tag to configure the continue / close button. -Original Message- From: Bartley, Chris P [PCS] [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 12, 2002 6:19 PM To: 'Struts Users Mailing List' Subject: RE: FW: Disable Navigation And if you need to have the popup window be a certain size (or with no location bar, buttons, etc) you can open the window with JavaScript. See here for more info: http://developer.irt.org/script/90.htm Your link could then be something like this: a href=javascript:window.open('/pathTo/myAction.do','myPopup','scrollbars=yes ,status=yes,width=300,height=300')Click here to get a popup of results from your action/a You might also look around here for everything you (n)ever wanted to know about windows and javascript: http://developer.irt.org/script/window.htm chris -Original Message- From: Joe Barefoot [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 12, 2002 5:05 PM To: Struts Users Mailing List Subject: RE: FW: Disable Navigation Eddie's technically right, but I think you meant: How do I make one of my links go through an action class and popup the results in a new window? ...and the answer is: a href=/pathTo/myAction.do target=myPopup Click here to get a popup of results from your action/a You can conditionally output a popup or non-popup version of the link using logic:equal or logic:present tags if that's what you want to do. peace, Joe -Original Message- From: Eddie Bush [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 12, 2002 3:02 PM To: Struts Users Mailing List Subject: Re: FW: Disable Navigation Not possible. You'll have to use javascript to do that --- or a target on the link to something other than _top. Regards, Eddie Cohan, Sean wrote: BTW, how do I make the password page popup in a new window from an action class? Thanks. -- 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]
Recognizing Cancel Button over Submit Button
I am sure this a newbie question, but how can I determine that the cancel button (html:cancel) was clicked instead of the submit button (html:submit) using an html:form. They both end up in the same method of my DispatchAction? Thanks. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Recognizing Cancel Button over Submit Button
Thanks, Eddie. It looks exactly what I'm looking for. -Original Message- From: Eddie Bush [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 10, 2002 1:43 PM To: Struts Users Mailing List Subject: Re: Recognizing Cancel Button over Submit Button http://www.husted.com/struts/tips There was a recent commit to make ImageButtonBean a piece of struts. I *think* it will live in o.a.s.util.ImageButtonBean (browse the JAR to find it). I *think* if you look at Ted's tip #1, you'll find what you're looking for. Maybe I misunderstand your requirements though. Regards, Eddie Cohan, Sean wrote: Thanks, but what if I want to use html:image and don't want the bean:message tag to display text on the page? I should have mentioned that in the first email. What I really is two image buttons within the same form. Can I have them go to the same action class where I can know which button was pressed and perform different actions accordingly? -- 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]
Tip #1
Should we be extending ActionForm for this tip? I'm guessing yes since the sample Action code was listed as: String selected = ((myForm) form).getSelected(); if (Constants.CANCEL.equals(selected)) ... -Original Message- From: Eddie Bush [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 10, 2002 1:43 PM To: Struts Users Mailing List Subject: Re: Recognizing Cancel Button over Submit Button http://www.husted.com/struts/tips There was a recent commit to make ImageButtonBean a piece of struts. I *think* it will live in o.a.s.util.ImageButtonBean (browse the JAR to find it). I *think* if you look at Ted's tip #1, you'll find what you're looking for. Maybe I misunderstand your requirements though. Regards, Eddie Cohan, Sean wrote: Thanks, but what if I want to use html:image and don't want the bean:message tag to display text on the page? I should have mentioned that in the first email. What I really is two image buttons within the same form. Can I have them go to the same action class where I can know which button was pressed and perform different actions accordingly? -- 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: Tip #1
NeverMind. Brain freeze. -Original Message- From: Cohan, Sean [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 10, 2002 2:57 PM To: 'Struts Users Mailing List' Subject: Tip #1 Should we be extending ActionForm for this tip? I'm guessing yes since the sample Action code was listed as: String selected = ((myForm) form).getSelected(); if (Constants.CANCEL.equals(selected)) ... -Original Message- From: Eddie Bush [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 10, 2002 1:43 PM To: Struts Users Mailing List Subject: Re: Recognizing Cancel Button over Submit Button http://www.husted.com/struts/tips There was a recent commit to make ImageButtonBean a piece of struts. I *think* it will live in o.a.s.util.ImageButtonBean (browse the JAR to find it). I *think* if you look at Ted's tip #1, you'll find what you're looking for. Maybe I misunderstand your requirements though. Regards, Eddie Cohan, Sean wrote: Thanks, but what if I want to use html:image and don't want the bean:message tag to display text on the page? I should have mentioned that in the first email. What I really is two image buttons within the same form. Can I have them go to the same action class where I can know which button was pressed and perform different actions accordingly? -- 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]
html:image pageKey
I'm having trouble trying to use html:image pagekey=... / Am I using the correct syntax? In my jsp I have: html:image pageKey=login.image/ and in my ApplicationResources.properties I have: login.image=/images/login.gif In my struts_config.xml I have: message-resources parameter=gov.doc.bis.ecass2k.ui.struts.ApplicationResources/ and in my web.xml I have: servlet servlet-nameaction/servlet-name servlet-classorg.apache.struts.action.ActionServlet/servlet-class init-param param-nameapplication/param-name param-valuegov.doc.bis.ecass2k.ui.struts.ApplicationResources/param-value /init-param Thanks. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Two Phase ActionClass
Craig, I greatly appreciate you taking the time to provide such a detailed answer. This is a tremendous help. Thanks. -Original Message- From: Craig Tataryn [mailto:[EMAIL PROTECTED]] Sent: Friday, September 06, 2002 11:01 PM To: [EMAIL PROTECTED] Subject: Re: Two Phase ActionClass Sean, not sure if I would recycle the login page to show the warning, instead I would have another page called loginWarning.jsp which showed them a message and then presented a Continue and Cancel button. The Continue button would send them back to the logon Action class and the Cancel button would simply be a link back to the login.jsp page. However, I would change my Action class to a DispatchAction class and setup things like they have in the DispatchAction API doc, in your case, something like this: action path=/loginUser type=my.package.LoginUserAction name=subscriptionForm scope=request input=/login.jsp parameter=action forward name=warn path=/loginWarning.jsp/ forward success path=afterLogin.jsp/ /action I would then have two jsps, one for logging in (login.jsp) and then the one for warning (loginWarning.jsp), and I would code my DispatachAction class as follows: import org.apache.struts.action.DispatchAction; public class LoginUserAction extends DispatchAction { //have one method named for each possible function name you will be //passing in the action parameter //invoked when our Action class is called with action=showWarningIfNecessary public ActionForward showWarningIfNecessary(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { //if the user is already logged in //return mappings.findForward(warning); //else return mappings.findForward(success); } //invoked when our Action class is called with action=continue public ActionForward continue(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { return mappings.findForward(success); } } In login.jsp, you would have a hidden form field with a name of action and a value of showWarningIfNecessary: html:hidden name=action value=showWarningIfNecessary/ In loginWarning.jsp your continue button could just be a link to: loginUser.do?action=continue (or you could have a hidden field named action like in login.jsp, but the value would be continue) And your cancel button could be a link to: login.jsp If you read the API doc on DispatchAction, this will all make sense. Hope that helped! Craig. From: Cohan, Sean [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Subject: Two Phase ActionClass Date: Fri, 6 Sep 2002 20:14:37 -0400 Within my logon ActionClass, I want to check the user's user id/password and whether they are currently logged on anywhere else. If they are logged on elsewhere, I want to go back to the logon page to warn them and give them a chance to continue or to bail. If they continue, I want to skip over the check whether they are logged on elsewhere. I'm struggling with how from my logon.jsp page I can instruct the logon action to one thing one time and another thing another time. I was thinking maybe the ActionMapping parameter, but I don't really know how to use it. I'm searching. Can someone give me a good way to do what I'm trying to do? Should I go to a different ActionClass instead of trying to use the same one? Also, I was going to return the warning to the user in ActionErrors. Is there a way I can poll the error from the jsp (logic tag?) and then if it's this warning put a yes/no form on the logon page? Or should I warn them on a different page? I do want other ActionErrors to display without the yes/no form (e.g., username required.) Thanks. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] Craig W. Tataryn Programmer/Analyst Compuware _ Chat with friends online, try MSN Messenger: http://messenger.msn.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: Two Phase ActionClass
After clicking on continue on the loginWarning.jsp page, I no longer have the username and password fields that are validated in the validate method of the loginForm. How should I make this available? Thanks. -Original Message- From: Craig Tataryn [mailto:[EMAIL PROTECTED]] Sent: Friday, September 06, 2002 11:01 PM To: [EMAIL PROTECTED] Subject: Re: Two Phase ActionClass Sean, not sure if I would recycle the login page to show the warning, instead I would have another page called loginWarning.jsp which showed them a message and then presented a Continue and Cancel button. The Continue button would send them back to the logon Action class and the Cancel button would simply be a link back to the login.jsp page. However, I would change my Action class to a DispatchAction class and setup things like they have in the DispatchAction API doc, in your case, something like this: action path=/loginUser type=my.package.LoginUserAction name=subscriptionForm scope=request input=/login.jsp parameter=action forward name=warn path=/loginWarning.jsp/ forward success path=afterLogin.jsp/ /action I would then have two jsps, one for logging in (login.jsp) and then the one for warning (loginWarning.jsp), and I would code my DispatachAction class as follows: import org.apache.struts.action.DispatchAction; public class LoginUserAction extends DispatchAction { //have one method named for each possible function name you will be //passing in the action parameter //invoked when our Action class is called with action=showWarningIfNecessary public ActionForward showWarningIfNecessary(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { //if the user is already logged in //return mappings.findForward(warning); //else return mappings.findForward(success); } //invoked when our Action class is called with action=continue public ActionForward continue(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { return mappings.findForward(success); } } In login.jsp, you would have a hidden form field with a name of action and a value of showWarningIfNecessary: html:hidden name=action value=showWarningIfNecessary/ In loginWarning.jsp your continue button could just be a link to: loginUser.do?action=continue (or you could have a hidden field named action like in login.jsp, but the value would be continue) And your cancel button could be a link to: login.jsp If you read the API doc on DispatchAction, this will all make sense. Hope that helped! Craig. From: Cohan, Sean [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Subject: Two Phase ActionClass Date: Fri, 6 Sep 2002 20:14:37 -0400 Within my logon ActionClass, I want to check the user's user id/password and whether they are currently logged on anywhere else. If they are logged on elsewhere, I want to go back to the logon page to warn them and give them a chance to continue or to bail. If they continue, I want to skip over the check whether they are logged on elsewhere. I'm struggling with how from my logon.jsp page I can instruct the logon action to one thing one time and another thing another time. I was thinking maybe the ActionMapping parameter, but I don't really know how to use it. I'm searching. Can someone give me a good way to do what I'm trying to do? Should I go to a different ActionClass instead of trying to use the same one? Also, I was going to return the warning to the user in ActionErrors. Is there a way I can poll the error from the jsp (logic tag?) and then if it's this warning put a yes/no form on the logon page? Or should I warn them on a different page? I do want other ActionErrors to display without the yes/no form (e.g., username required.) Thanks. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] Craig W. Tataryn Programmer/Analyst Compuware _ Chat with friends online, try MSN Messenger: http://messenger.msn.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]
DB hit from ActionForm Validate method
We need to implement '3 strikes and your out' functionality to our logon process. If the user is unsuccessful after 3 logon attempts, we disable their account. I put some of the user id / password functionality in the validate method of the LogonForm class. However, in between each attempt, I need find out what number of logon attempt they are on, and if this is not their 3rd attempt, bump up the logon attempt number. If it's their second attempt and they fail, I need to let them know they only have 1 ore chance to get it right. If they successfully logon, we also need to show them how many attempts it took them to logon the last time their account was accessed. We were thinking we'd store their current and previous logon attempt number in the DB. My question is whether it is acceptable or common practice to access the DB from the validate method or should DB access only be done in the LogonAction class (which means I'd move the perform functionality to the LogonAction class)? Thanks. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Two Phase ActionClass
Within my logon ActionClass, I want to check the user's user id/password and whether they are currently logged on anywhere else. If they are logged on elsewhere, I want to go back to the logon page to warn them and give them a chance to continue or to bail. If they continue, I want to skip over the check whether they are logged on elsewhere. I'm struggling with how from my logon.jsp page I can instruct the logon action to one thing one time and another thing another time. I was thinking maybe the ActionMapping parameter, but I don't really know how to use it. I'm searching. Can someone give me a good way to do what I'm trying to do? Should I go to a different ActionClass instead of trying to use the same one? Also, I was going to return the warning to the user in ActionErrors. Is there a way I can poll the error from the jsp (logic tag?) and then if it's this warning put a yes/no form on the logon page? Or should I warn them on a different page? I do want other ActionErrors to display without the yes/no form (e.g., username required.) Thanks. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Newbie with App Resources
I'm trying retrieve some text from the AppplicationResources.properties file and put it on my index.jsp page. How do I do this? I can't find the answer. Thanks. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Newbie on image
This must be a no-brainer, but I'm not real familiar with where to look for things yet. I'd like to use a gif for a submit pushbutton. I think I use the html:image tag and specify the gif with the src property. Correct? How do I specify what the action should be when clicked - I want it to perform the submit action of the html:form? Thanks. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Ending a Session After Browser Has Gone Away
Is there a way to end a user session if the browser has closed either through user action or non-user actions such as power outages? If not, what are typical ways to get around this? We are talking about allowing the user to login again, checking for a current user session, and if they have one, killing it and starting a new one. Is this a sound approach? Thanks. Sean Cohan Software Performance Systems -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Ending a Session After Browser Has Gone Away
Any suggestions? -Original Message- From: James Mitchell [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 01, 2002 11:34 AM To: Struts Users Mailing List Subject: RE: Ending a Session After Browser Has Gone Away The web being the stateless environment that it is, you have no way know (without using javascript) that a user has closed a browser. I wouldn't advise to doing this anyway, because the user may have more than one window open, so if they close one of them and try to continue using your site, they will be met (rather rudely) with your login screens. I can't speak for other people, but whenever I'm navigating a site that does a shit job of navigation hierarchy, I always use shift+click if I want to keep the current page and not be sent off deep in the site with no hope of finding the original spot that sent me. If the site did as you propose, this would result in a very pissed off user. And you could bet that you'd hear about it (from me at least). Oh well, that's my 2 cents. James Mitchell Software Engineer\Struts Evangelist Struts-Atlanta, the Open Minded Developer Network http://www.open-tools.org/struts-atlanta -Original Message- From: Cohan, Sean [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 01, 2002 11:06 AM To: [EMAIL PROTECTED] Subject: Ending a Session After Browser Has Gone Away Is there a way to end a user session if the browser has closed either through user action or non-user actions such as power outages? If not, what are typical ways to get around this? We are talking about allowing the user to login again, checking for a current user session, and if they have one, killing it and starting a new one. Is this a sound approach? Thanks. Sean Cohan Software Performance Systems -- 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: Ending a Session After Browser Has Gone Away
We must be stateful. This not an internet application (although it will be used across the internet.) It's an enterprise app and we must use state. Also, the users have requested they be able to use multiple browsers and won't want to log into to each one. I looked at HttpSessionBindingListener but didn't get a real good feel for how it can help us when the browser (or I should say when all browsers) have gone away and the user needs to log back in. Note: we flip a logged in flag during the login process to prevent the user from logging in twice. This gets flipped back when the user logs off or the session expires. This flag will prevent the user from logging back in, unless we can somehow get around cases where they've exited without logging out. I'm sure this is an age old browser problem and I'm sure there have been good solutions to getting around this. So I'm hoping someone can steer me in the right direction. Thanks a ton. -Original Message- From: Tony Baity [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 01, 2002 11:45 AM To: Struts Users Mailing List Subject: RE: Ending a Session After Browser Has Gone Away Look in the javadocs for HttpSession and how to use HttpSessionBindingListener . I recommend allowing each browser instance to be allowed to login. Try to be stateless. If you want to do anything at all in the case of session timeout, use the HttpSessionBindingListener Becky Moyer wrote:Just set a short session timeout. 3 minutes of inactivity, session expires. So by the time they reboot, they have to log in again. Yeah, if someone stares at the page for 3 minutes and does something, they have to log in again, but if you're that concerned with sessions getting cleared, then it's not such a big deal. Anything wrong with this? Becky -Original Message- From: Cohan, Sean [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 01, 2002 11:33 AM To: 'Struts Users Mailing List' Subject: RE: Ending a Session After Browser Has Gone Away Any suggestions? -Original Message- From: James Mitchell [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 01, 2002 11:34 AM To: Struts Users Mailing List Subject: RE: Ending a Session After Browser Has Gone Away The web being the stateless environment that it is, you have no way know (without using javascript) that a user has closed a browser. I wouldn't advise to doing this anyway, because the user may have more than one window open, so if they close one of them and try to continue using your site, they will be met (rather rudely) with your login screens. I can't speak for other people, but whenever I'm navigating a site that does a shit job of navigation hierarchy, I always use shift+click if I want to keep the current page and not be sent off deep in the site with no hope of finding the original spot that sent me. If the site did as you propose, this would result in a very pissed off user. And you could bet that you'd hear about it (from me at least). Oh well, that's my 2 cents. James Mitchell Software Engineer\Struts Evangelist Struts-Atlanta, the Open Minded Developer Network http://www.open-tools.org/struts-atlanta -Original Message- From: Cohan, Sean [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 01, 2002 11:06 AM To: [EMAIL PROTECTED] Subject: Ending a Session After Browser Has Gone Away Is there a way to end a user session if the browser has closed either through user action or non-user actions such as power outages? If not, what are typical ways to get around this? We are talking about allowing the user to login again, checking for a current user session, and if they have one, killing it and starting a new one. Is this a sound approach? Thanks. Sean Cohan Software Performance Systems -- 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: For additional commands, e-mail: - Do You Yahoo!? Yahoo! Health - Feel better, live better -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Ending a Session After Browser Has Gone Away
Thanks James for pointing me to the HttpSessionBindingListener. We can use that to 'unlock' the user's login id after the session times out. We still need to come up with a strategy where the user needs to log back in after a pc crash and reboot. Not sure what our session timeout value will be, but if it's say 15 minutes, the user logs in, and the pc crashes (not from our app of course), the user would have to wait say 12 minutes for the session to timeout before their lock would be released and they could log in again. That's why we're thinking of prompting them with a notice that they are currently logged on and do they want to override that earlier logon. -Original Message- From: Tony Baity [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 01, 2002 11:45 AM To: Struts Users Mailing List Subject: RE: Ending a Session After Browser Has Gone Away Look in the javadocs for HttpSession and how to use HttpSessionBindingListener . I recommend allowing each browser instance to be allowed to login. Try to be stateless. If you want to do anything at all in the case of session timeout, use the HttpSessionBindingListener Becky Moyer wrote:Just set a short session timeout. 3 minutes of inactivity, session expires. So by the time they reboot, they have to log in again. Yeah, if someone stares at the page for 3 minutes and does something, they have to log in again, but if you're that concerned with sessions getting cleared, then it's not such a big deal. Anything wrong with this? Becky -Original Message- From: Cohan, Sean [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 01, 2002 11:33 AM To: 'Struts Users Mailing List' Subject: RE: Ending a Session After Browser Has Gone Away Any suggestions? -Original Message- From: James Mitchell [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 01, 2002 11:34 AM To: Struts Users Mailing List Subject: RE: Ending a Session After Browser Has Gone Away The web being the stateless environment that it is, you have no way know (without using javascript) that a user has closed a browser. I wouldn't advise to doing this anyway, because the user may have more than one window open, so if they close one of them and try to continue using your site, they will be met (rather rudely) with your login screens. I can't speak for other people, but whenever I'm navigating a site that does a shit job of navigation hierarchy, I always use shift+click if I want to keep the current page and not be sent off deep in the site with no hope of finding the original spot that sent me. If the site did as you propose, this would result in a very pissed off user. And you could bet that you'd hear about it (from me at least). Oh well, that's my 2 cents. James Mitchell Software Engineer\Struts Evangelist Struts-Atlanta, the Open Minded Developer Network http://www.open-tools.org/struts-atlanta -Original Message- From: Cohan, Sean [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 01, 2002 11:06 AM To: [EMAIL PROTECTED] Subject: Ending a Session After Browser Has Gone Away Is there a way to end a user session if the browser has closed either through user action or non-user actions such as power outages? If not, what are typical ways to get around this? We are talking about allowing the user to login again, checking for a current user session, and if they have one, killing it and starting a new one. Is this a sound approach? Thanks. Sean Cohan Software Performance Systems -- 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: For additional commands, e-mail: - Do You Yahoo!? Yahoo! Health - Feel better, live better -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Ending a Session After Browser Has Gone Away
Sorry Tony. Proper thanks to you. There is a requirement that a user can't log in twice on their workstation or from another workstation. I guess this is to prevent someone else from logging in to the business user's account when they are already logged in. But we don't the legitimate business user to wait till their session expires before they can log in again. We're actually discussing the merits of this requirement as I write. Thanks to you too James. -Original Message- From: James Mitchell [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 01, 2002 3:01 PM To: Struts Users Mailing List Subject: RE: Ending a Session After Browser Has Gone Away Actually, I didn't point you to the session listener, someone else did ;) It sounds like you are having to keep track of users (of your application) and sessions on a one by one basis. So your business requirements state that 'Each user may only be logged in at one time and disallow multiple sessionid per user'? Why would you want to 'lock' the user from the system (if a different session had not expired)? I would think that you only want to monitor it this way to provide additional functionality such as 'Resuming from a saved session' or 'Returning to a previous cart' It would be a little tricky, but I do see merit in it. This way you could prevent someone from using IE to login and then login again in NS (just to make sure no cookies were shared). Well, good luck whatever you decide!!! James Mitchell Software Engineer\Struts Evangelist Struts-Atlanta, the Open Minded Developer Network http://www.open-tools.org/struts-atlanta -Original Message- From: Cohan, Sean [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 01, 2002 2:29 PM To: 'Struts Users Mailing List' Subject: RE: Ending a Session After Browser Has Gone Away Thanks James for pointing me to the HttpSessionBindingListener. We can use that to 'unlock' the user's login id after the session times out. We still need to come up with a strategy where the user needs to log back in after a pc crash and reboot. Not sure what our session timeout value will be, but if it's say 15 minutes, the user logs in, and the pc crashes (not from our app of course), the user would have to wait say 12 minutes for the session to timeout before their lock would be released and they could log in again. That's why we're thinking of prompting them with a notice that they are currently logged on and do they want to override that earlier logon. -Original Message- From: Tony Baity [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 01, 2002 11:45 AM To: Struts Users Mailing List Subject: RE: Ending a Session After Browser Has Gone Away Look in the javadocs for HttpSession and how to use HttpSessionBindingListener . I recommend allowing each browser instance to be allowed to login. Try to be stateless. If you want to do anything at all in the case of session timeout, use the HttpSessionBindingListener Becky Moyer wrote:Just set a short session timeout. 3 minutes of inactivity, session expires. So by the time they reboot, they have to log in again. Yeah, if someone stares at the page for 3 minutes and does something, they have to log in again, but if you're that concerned with sessions getting cleared, then it's not such a big deal. Anything wrong with this? Becky -Original Message- From: Cohan, Sean [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 01, 2002 11:33 AM To: 'Struts Users Mailing List' Subject: RE: Ending a Session After Browser Has Gone Away Any suggestions? -Original Message- From: James Mitchell [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 01, 2002 11:34 AM To: Struts Users Mailing List Subject: RE: Ending a Session After Browser Has Gone Away The web being the stateless environment that it is, you have no way know (without using javascript) that a user has closed a browser. I wouldn't advise to doing this anyway, because the user may have more than one window open, so if they close one of them and try to continue using your site, they will be met (rather rudely) with your login screens. I can't speak for other people, but whenever I'm navigating a site that does a shit job of navigation hierarchy, I always use shift+click if I want to keep the current page and not be sent off deep in the site with no hope of finding the original spot that sent me. If the site did as you propose, this would result in a very pissed off user. And you could bet that you'd hear about it (from me at least). Oh well, that's my 2 cents. James Mitchell Software Engineer\Struts Evangelist Struts-Atlanta, the Open Minded Developer Network http://www.open-tools.org/struts-atlanta -Original Message- From: Cohan, Sean [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 01, 2002 11:06 AM To: [EMAIL PROTECTED] Subject