RE: How to return changes made on a JSP iteration of object properties to the Action Class
http://www.husted.com/struts/tips/006.html Joe -Original Message- From: mail [mailto:[EMAIL PROTECTED]] Sent: Thursday, 26 September 2002 4:37 PM To: [EMAIL PROTECTED] Subject: How to return changes made on a JSP iteration of object properties to the Action Class Hello, I am creating an ArrayList of GridDetermination objects in session scope. I sent this to a JSP which displays the arraylist properties. I then can make changes to a property and hit submit, but when the action gets the arraylist back (via the session.getAttribute) the changes are not there. The ArrayList is the same as when I sent it. Is there a step in the JSP that I am missing, like a setProperty, etc..., that will store the changes into the ArrayList in the session scope? Can anyone tell me how I can send an ArrayList of objects, iterate through it to create a table on the web page, allow changes to each property, then return that change to the Action class where I can perform operations based upon the change? Thanks in advance! example of my JSP iterate: logic:iterate id=gridDeterminations name=%= Constants.GRID_DETERMINATIONS_ARRAY_LIST % scope=session type=com.coramhc.common.GridDeterminations tdbean:write name=gridDeterminations property=messageCode filter=true/ /td tdbean:write name=gridDeterminations property=messageDesc filter=true/ /td tdbean:write name=gridDeterminations property=messageSeverity filter=true/ /td td html:select property=processResp size=1 html:option value=/html:option html:option value=CMPLDCMPLD/html:option html:option value=OISOIS/html:option html:option value=RDARDA/html:option html:option value=BMABMA/html:option html:option value=PMAPMA/html:option html:option value=DENDEN/html:option /html:select /td td html:radio property=overrideInd value=A/Approve html:radio property=overrideInd value=D/Deny /td td /td /font /tr /logic:iterate -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: How to return changes made on a JSP iteration of object properties to the Action Class
Hi , First when you set the arrayList to the form bean and use struts iterate tag then you can display the result. When you want to reconstruct the ArrayList back you need to write String[] , int[] or long[] data memebers and getters and setters methods in you form bean. Struts does not call setArrayList () method on the form bean when you submit the page. Form these you need to reconstruct the ArraryList it is better to do in the Action Class. Rgds C.Bhaskaran -Original Message- From: mail [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 26, 2002 12:07 PM To: [EMAIL PROTECTED] Subject: How to return changes made on a JSP iteration of object properties to the Action Class Hello, I am creating an ArrayList of GridDetermination objects in session scope. I sent this to a JSP which displays the arraylist properties. I then can make changes to a property and hit submit, but when the action gets the arraylist back (via the session.getAttribute) the changes are not there. The ArrayList is the same as when I sent it. Is there a step in the JSP that I am missing, like a setProperty, etc..., that will store the changes into the ArrayList in the session scope? Can anyone tell me how I can send an ArrayList of objects, iterate through it to create a table on the web page, allow changes to each property, then return that change to the Action class where I can perform operations based upon the change? Thanks in advance! example of my JSP iterate: logic:iterate id=gridDeterminations name=%= Constants.GRID_DETERMINATIONS_ARRAY_LIST % scope=session type=com.coramhc.common.GridDeterminations tdbean:write name=gridDeterminations property=messageCode filter=true/ /td tdbean:write name=gridDeterminations property=messageDesc filter=true/ /td tdbean:write name=gridDeterminations property=messageSeverity filter=true/ /td td html:select property=processResp size=1 html:option value=/html:option html:option value=CMPLDCMPLD/html:option html:option value=OISOIS/html:option html:option value=RDARDA/html:option html:option value=BMABMA/html:option html:option value=PMAPMA/html:option html:option value=DENDEN/html:option /html:select /td td html:radio property=overrideInd value=A/Approve html:radio property=overrideInd value=D/Deny /td td /td /font /tr /logic:iterate -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] **Disclaimer** Information contained in this E-MAIL being proprietary to Wipro Limited is 'privileged' and 'confidential' and intended for use only by the individual or entity to which it is addressed. You are notified that any use, copying or dissemination of the information contained in the E-MAIL in any manner whatsoever is strictly prohibited. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
DynaValidatorActionForm - List - nested:iterate: TROUBLE
Hi, I'm exploring the new features of Struts 1.1 (using b2 release) and got stuck on the use of the combination DynaValidatorActionForm - List - nested tags (iterate, write). CASE I am trying to build a search list page. The search is a form with (for simplicity) one 'html:text' input field and a search button. The results of the search need to be displayed on the same page and be part of the same form. This list of results will be displayed as: a checkbox in the first column and a range of properties of the objects (e.g. Books) in the resultset in subsequent columns. The user will be allowed to select multiple items from the list for further processing. Think of a list of books, the user selects the books he/she wants and they are added to the shoppingcart. I would like to use a DynaValidatorActionForm with form-bean properties 'title' (java.lang.String) and 'books' (java.util.List). The search action handler uses the input from the title field to fetch the books from the database and sets this list of books in the 'books' field of the DynaValidatorActionForm. PROBLEM Doing the first search and display the results is no problem but on a new search request, the form can not be processed. I get a java.lang.NullPointerException: No indexed value for 'books[n]' (n being the size of the resultset of the first search). What could be the problem? -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Tiles error (Help)
Try to use org.apache.struts.tiles.ActionComponentServlet for the action servlet. --- Heligon Sandra [EMAIL PROTECTED] wrote: I am using Tiles and when I run my application I have the following error: javax.servlet.ServletException: Can't get definitions factory from context. javax.servlet.ServletException: Can't get definitions factory from context. at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp l.java:471) at org.apache.jsp.index$jsp._jspService(index$jsp.java:96) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107) I work with Struts1.1b2, my config file is the following: servlet servlet-nameaction/servlet-name servlet-classorg.apache.struts.action.ActionServlet/servlet-class init-param param-namedefinitions-config/param-name param-value/WEB-INF/tiles-defs.xml/param-value /init-param init-param param-namedefinitions-parser-validate/param-name param-valuetrue/param-value /init-param init-param param-namevalidate/param-name param-valuetrue/param-value /init-param init-param param-namedefinitions-debug/param-name param-value1/param-value /init-param init-param param-namedebug/param-name param-value2/param-value /init-param init-param param-nameconfig/param-name param-value/WEB-INF/struts-config.xml/param-value /init-param load-on-startup2/load-on-startup /servlet What does it mean ? Thanks, Sandra -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] = Alex __ Do you Yahoo!? New DSL Internet Access from SBC Yahoo! http://sbc.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Tiles error (Help)
Hi, I had the same problem. That was the error I could see in the browser. But in my app logs I found more details. I just forgot to close some tag in my struts-config file. I corrected that and it works nicely again. Maybe that is your problem too? Darek Wednesday, September 25, 2002, 3:48:19 PM, you wrote: HS I am using Tiles and when I run my application HS I have the following error: HS javax.servlet.ServletException: Can't get definitions factory from HS context. HS javax.servlet.ServletException: Can't get definitions factory from HS context. HS at HS org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp HS l.java:471) HS at org.apache.jsp.index$jsp._jspService(index$jsp.java:96) HS at HS org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107) HS I work with Struts1.1b2, my config file is the following: [snip] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Disabling jsessionid parameter in Struts forms
Hi! I'm using Struts 1.02. When using the html:form tag, and whenever the session is cookie disabled, Struts automatically puts a jsessionid=... in the URL string for cookie-disabled session tracking. I dont want have the jsessionid=... in the URL, but I do want to keep using the Struts taglib. Does anyone know how to diable the jsessionid=... in the URL ? Thanks! Ori. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Disabling jsessionid parameter in Struts forms
2002. szeptember 26. 11:42 dátummal Ori Tend ezt írtad: When using the html:form tag, and whenever the session is cookie disabled, Struts automatically puts a jsessionid=... in the URL string for cookie-disabled session tracking. I dont want have the jsessionid=... in the URL, but I do want to keep using the Struts taglib. Does anyone know how to diable the jsessionid=... in the URL ? Enable cookies in your browser. If you don't have the jsesisonid appended AND cookies enbled, you have to authorize yourself for each request and I guess this isn't what you want. Tib -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Disabling jsessionid parameter in Struts forms
Thanks for the reply! I'm not sure I understand.. if I use in my JSP the standard form tag I dont get this jsessionid parameter when browsing to the page. Is there a way to use struts' html:form tag and not get this jsessionid? I suspect that the jsessionid is added to the url by calling EncodeURL() at the struts taglib. I know that this may introduce problems to cookie-disabled visitors, but I don't want the jsessionid to appear. Thanks! -Original Message- From: Gemes Tibor [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 26, 2002 10:50 AM To: Struts Users Mailing List Subject: Re: Disabling jsessionid parameter in Struts forms 2002. szeptember 26. 11:42 dátummal Ori Tend ezt írtad: When using the html:form tag, and whenever the session is cookie disabled, Struts automatically puts a jsessionid=... in the URL string for cookie-disabled session tracking. I dont want have the jsessionid=... in the URL, but I do want to keep using the Struts taglib. Does anyone know how to diable the jsessionid=... in the URL ? Enable cookies in your browser. If you don't have the jsesisonid appended AND cookies enbled, you have to authorize yourself for each request and I guess this isn't what you want. Tib -- 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: Disabling jsessionid parameter in Struts forms
You are correct about encodeURL() - this is when the sessionId is appended. The sessionId is part of the servlet API session tracking mechanism , and as you have noticed is appended to the URL when not using cookies. (When using cookies it is instead stored in a cookie). If you do not include the sessionId , you will not be able to make much use of session scope in your website (as each request will get a new session). If you dont need to use session scope to keep track of anything, this probably won't be a problem (I think - unless struts itself needs it for certain things?). As for actually disabling the appending of sessionId I am afraid I have no idea how you might achieve it with regards to the struts tags. -Original Message- From: Ori Tend [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 26, 2002 17:59 To: 'Struts Users Mailing List' Subject: RE: Disabling jsessionid parameter in Struts forms Thanks for the reply! I'm not sure I understand.. if I use in my JSP the standard form tag I dont get this jsessionid parameter when browsing to the page. Is there a way to use struts' html:form tag and not get this jsessionid? I suspect that the jsessionid is added to the url by calling EncodeURL() at the struts taglib. I know that this may introduce problems to cookie-disabled visitors, but I don't want the jsessionid to appear. Thanks! -Original Message- From: Gemes Tibor [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 26, 2002 10:50 AM To: Struts Users Mailing List Subject: Re: Disabling jsessionid parameter in Struts forms 2002. szeptember 26. 11:42 dátummal Ori Tend ezt írtad: When using the html:form tag, and whenever the session is cookie disabled, Struts automatically puts a jsessionid=... in the URL string for cookie-disabled session tracking. I dont want have the jsessionid=... in the URL, but I do want to keep using the Struts taglib. Does anyone know how to diable the jsessionid=... in the URL ? Enable cookies in your browser. If you don't have the jsesisonid appended AND cookies enbled, you have to authorize yourself for each request and I guess this isn't what you want. Tib -- 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: Disabling jsessionid parameter in Struts forms
2002. szeptember 26. 11:59 dátummal Ori Tend ezt írtad: Thanks for the reply! I'm not sure I understand.. if I use in my JSP the standard form tag I dont get this jsessionid parameter when browsing to the page. Is there a way to use struts' html:form tag and not get this jsessionid? If you use FORM based auth and disable cookies and don't use the EncodeURL() you have to reauthenticate yourself for every request. I can see the jsessionid appended only on the first page after the login page if I have cookies enabled. I suspect that the jsessionid is added to the url by calling EncodeURL() at the struts taglib. I know that this may introduce problems to cookie-disabled visitors, but I don't want the jsessionid to appear. Create a filter which processes the output and cut off from jsessionid to the first ; in each page for each occurence of jsessionid. If you insist. Why does it bother you? Tib -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Struts and high performance sites revisited
Ok, so we got it nailed down these statements... - The Struts Controller doesn't add more overhead than a high performance site should be able to handle. In the regard flexibility contra performance, using the controller makes your application manageable with negligible overhead. - There was also the everlasting discussion on EJB's be or not to be. I think that there are loads of variables that affects the choices of the design and that there still remains some issues with EJB's. However when only using stateless session beans with DAO's I think that the scalability-flexability-performance goes hand in hand and makes a preferrable design choice. Anyone disagrees? Would be nice to hear your opinions. - But what was not discussed was the overhead of custom tags. This seems to be a question much avoided everywhere. When talking about flexability. Oh yes, use them. They makes your pages much easier to build and manage. They also makes for a great design of the application. BUT (capital letters), what about the performance overhead of the tags? When designing a web site where the absolute focus is to be able to handle as many transactions as possible to a low cost. Doesn't custom tags become very expensive to use in a case like this? There must have been extensive testing made on this. Does anyone have any facts or thoughts on this? Tired of all the SPAM in your inbox? Switch to LYCOS MAIL PLUS http://www.mail.lycos.com/brandPage.shtml?pageId=plus -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Uploading files with DynaForm
Hello, Is there anyway of uploading files with a DynaForm. If so what do I have to do to get it to work. I have form uploading working in the usual way (as per the struts-upload example) but havent been able to reproduce the effect with DynaForm. Thanks -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Scheduled Jobs
Hi! In my struts app I have to do some cleanup jobs in my database that I like to start regularly. What's the best way to realize such schedules jobs in a struts app? Thanks in advance. gus -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
How to configure multiple Message Resources in Struts 1.0
Hi Is it possible to setup another message resources file in Struts 1.0? I need this because I want to display errors in a different way for a certain part of the application. Basically I do not want the Validation errors: Please correct the ff... heading. Since this is displayed automatically, the only way to get around this issues is use another message resources properties (at least that what it looks like to me). Now how do I setup another message resources and how to I go about accessing it in my form bean? Thanks in advance, Karim
Re: Scheduled Jobs
hello gus, you can find my resume as attachment for the jobs you are looking at ;-) - Original Message - From: gus [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, September 26, 2002 3:24 PM Subject: Scheduled Jobs Hi! In my struts app I have to do some cleanup jobs in my database that I like to start regularly. What's the best way to realize such schedules jobs in a struts app? Thanks in advance. gus -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Scheduled Jobs
Hi, you may define some thread to be started while the app init process. Works nicely for us. Two classes are required. 1. Simple init servlet that will be plugged into web.xml (similar to the way that struts action servlet is plugged) In the 'init' method you could start your thread daemon. You could also pass some parameters this way. Stop the thread in the 'destroy' method. Because this solution works with threads, I would advise to put some flag there if it has already been started or not, to make sure there is only 1 instance of your thread. 2. The thread class. It could be parametrized (see above), for example JNDI resource name for database, interval, etc ... We sceptic about such solution, but it really works nicely when we tried it. Another solution. You could create some servlet that does cleanup job, and periodically call it with cron. I would advise 'curl' as your http client - works on Unixes and Windows. It's very nice, free, single file program. That solution is platform dependent, ie. different way of configuring cron, and different versions of your http client are required. Is anybody using different solution? Darek Thursday, September 26, 2002, 11:54:27 AM, you wrote: g Hi! g In my struts app I have to do some cleanup jobs in my database that I g like to start regularly. What's the best way to realize such schedules g jobs in a struts app? g Thanks in advance. ggus -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Scheduled Jobs
Hi Gus, I don't think this is a Struts issues (Struts doesn't have any Job Scheduling facilities) You might want to take a look at: http://www.part.net/quartz.html. Or do a search on the www.theserverside.com for 'job schedule' - loads of stuff. Jon Ridgway -Original Message- From: gus [mailto:[EMAIL PROTECTED]] Sent: 26 September 2002 10:54 To: [EMAIL PROTECTED] Subject: Scheduled Jobs Hi! In my struts app I have to do some cleanup jobs in my database that I like to start regularly. What's the best way to realize such schedules jobs in a struts app? Thanks in advance. gus -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] The contents of this email are intended only for the named addressees and may contain confidential and/or privileged material. If received in error please contact UPCO on +44 (0) 113 201 0600 and then delete the entire e-mail from your system. Unauthorised review, distribution, disclosure or other use of this information could constitute a breach of confidence. Your co-operation in this matter is greatly appreciated. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Value selection
Hi, Is it possible to display these values from a bean ? I have two sets of methods according to the bean spec., one dealing with a java.util.Collection and the other with a single value. SELECT class=list multiple size=2 name=applications OPTION value=ALL ALL /OPTION OPTION value='1' selectedApplication1/OPTION OPTION value='2'Application2/OPTION OPTION value='3'Application3/OPTION The selected values should go back into the same bean. Do I have to use a 'ActionForm' and populate my DTO from it? Will the bean have the selected values automatically ? The suggested answer http://www.husted.com/struts/tips/006.html .I didn't understand this. bye, Mohan -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Value selection
Mohan, One way to do this is to have your action form contain the Collection of options which you wish to display and an array of Strings which represent the values selected by the user. The Collection of options could be a collection of LabelValue beans. Using your example we would have the following in the action form: Collection applicationOptions; String[] applications; You could use the following syntax to render your application options: html:select property=applications multiple=true size=2 html:optionsCollection property=applicationOptions label=label value=value/ /html:select If applicationOptions doesn't change over the life of the application, then you could initialize this collection at application start up and place it in the ServletContext where it would be available to all users. If you do this there a a couple ways in which you could retrieve them. 1. You could have a set up action populate the action form with the applicationOptions that exist in the ServletContext. This way you wouldn't have to manage a separate attribute key for the applicationOptions. 2. You could simply use a separate attribute key to store and retrieve the applicationOptions from the appropriate scope. robert -Original Message- From: Mohan Radhakrishnan [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 26, 2002 6:30 AM To: 'Struts Users Mailing List' Subject: Value selection Hi, Is it possible to display these values from a bean ? I have two sets of methods according to the bean spec., one dealing with a java.util.Collection and the other with a single value. SELECT class=list multiple size=2 name=applications OPTION value=ALL ALL /OPTION OPTION value='1' selectedApplication1/OPTION OPTION value='2'Application2/OPTION OPTION value='3'Application3/OPTION The selected values should go back into the same bean. Do I have to use a 'ActionForm' and populate my DTO from it? Will the bean have the selected values automatically ? The suggested answer http://www.husted.com/struts/tips/006.html .I didn't understand this. bye, Mohan -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: all this traffic
Okay, I didn't understand compile. You mean compilation, as in aggregation, or collecting the answers to a question like a thread in a newsgroup? That would take an agreed upon tag library somewhat like a DTD and everyone would have to abide by its definitions. Not a bad idea at all, but I think with the trouble we had just agreeing on [OT], [FRIDAY], [BEER], [42], etc., that it would be more effort than it's worth. And I say that only because discussion threads for an emerging technology outlive their usefulness in a very short time. Mark -Original Message- From: Jonas Björnerstedt [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 25, 2002 7:30 PM To: Struts Users Mailing List Subject: RE: all this traffic I fully agree. There is a LOT of interesting reading, and I also press delete at times. The project has a lot of documentation and tutorials given that it is a beta. As we can all see, there are a lot of questions being posed. What I wanted to suggest was a cheap way to sift out/compile the answers. It would be nice to have better searching etc, but this takes some effort. In some sense I think the person who asked the question is the one who can best summarize the answers obtained, simply by the fact that he posed the question. I did not mean to start a long thread on this, it was simply a suggestion. Jonas -Original Message- From: Galbreath, Mark [mailto:[EMAIL PROTECTED]] Sent: den 26 september 2002 01:02 To: 'Struts Users Mailing List' Subject: RE: all this traffic Remember that Struts is still in beta; documentation always lags behind development. I think it's a tribute to the quality and utility of Struts that there are so many subscribers and participants to the list. I have found very few threads on the list that are not useful or at least interesting. I admit, however, that at times I am overwhelmed and just have to delete 100 messages and pick up the conversation from there. -Original Message- From: Jonas Björnerstedt [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 25, 2002 7:02 PM To: Struts Users Mailing List Subject: RE: all this traffic I don't think high traffic lists are efficient for several reasons: - Questions are repeated, partly because it is hard to find the answers in the archives. - One reason why there are a lot of questions is that documentation is lacking. What I wanted to suggest was one method of collecting answers in a cheap fashion. - I realize that pressing delete is easy. The cost of pressing delete however is missing all the relevant discussions. - High traffic can also make people rude. Jonas -Original Message- From: Galbreath, Mark [mailto:[EMAIL PROTECTED]] Sent: den 26 september 2002 00:42 To: 'Struts Users Mailing List' Subject: RE: all this traffic You could also try unsubscribing when you are going to be away. Or simply hold your shift key, highlight the lot, and delete. Why should the list have to be inconvenienced because you lack management skills? -Original Message- From: Jonas Björnerstedt [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 25, 2002 6:43 PM To: Struts Users Mailing List Subject: all this traffic Hello all, A couple of days away from my computer has resulted in 473 unread postings. It's a bit frustrating trying to use a high traffic mailing list like this one. Here are some suggestions: - Have a struts-answers mailing list. If I found a discussion interesting - such as the one on container managed security - I could simply forward it to the answers list. The cost of asking a question could be to compile the answers and submit it to the list. This could be a cheap way of getting better documentation. - A struts-beginners list might be a good idea too. Sometimes the blind are not all that bad at leading the blind. - One could also consider having a struts-tags list. With JSF coming, there are going to be more people that are not interested in the Struts tags. Jonas -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Struts and high performance sites revisited
a. Stateless session beans are fine until you need transactional boundaries to protect data integrity. If you want to improve performance of the app, design a persistent cache for immutable data (or data that rarely changes) to reduce trips to the data store. b. There is no overhead for custom tags except for the initial compilation of the JSP into an object. The only exception here is, obviously, you inundate a JSP with tags. Then you will get the same performance hit you get when having a class method with a poorly-design looping or conditional algorithm. Design, design, design. You skip or shortchange the design phase (should be at least 30 percent of your project), you get what you deserve. -Original Message- From: David Zimmerman [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 26, 2002 5:43 AM To: [EMAIL PROTECTED] Subject: Struts and high performance sites revisited Ok, so we got it nailed down these statements... - The Struts Controller doesn't add more overhead than a high performance site should be able to handle. In the regard flexibility contra performance, using the controller makes your application manageable with negligible overhead. - There was also the everlasting discussion on EJB's be or not to be. I think that there are loads of variables that affects the choices of the design and that there still remains some issues with EJB's. However when only using stateless session beans with DAO's I think that the scalability-flexability-performance goes hand in hand and makes a preferrable design choice. Anyone disagrees? Would be nice to hear your opinions. - But what was not discussed was the overhead of custom tags. This seems to be a question much avoided everywhere. When talking about flexability. Oh yes, use them. They makes your pages much easier to build and manage. They also makes for a great design of the application. BUT (capital letters), what about the performance overhead of the tags? When designing a web site where the absolute focus is to be able to handle as many transactions as possible to a low cost. Doesn't custom tags become very expensive to use in a case like this? There must have been extensive testing made on this. Does anyone have any facts or thoughts on this? Tired of all the SPAM in your inbox? Switch to LYCOS MAIL PLUS http://www.mail.lycos.com/brandPage.shtml?pageId=plus -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: all this traffic
Note I removed the [OT]. :-) I think this is right on topic because there have been many complaints from all level of users about the difficulty of finding useful information in the archive. If the archive was better managed, list traffic could be substantially reduced. For that matter, just having the URL attached as part of the signature would probably greatly reduce traffic (and would remove the I didn't know there was an archive, or I didn't know how to find it excuses. But the idea of tagging questions and responses with some pre-defined elements is intriguing and certainly would add value to the archive. -Original Message- From: David Graham [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 25, 2002 7:59 PM To: [EMAIL PROTECTED] Subject: [OT] RE: all this traffic You get right to the point don't you Mark :-) ? I think online forums are much easier to use than mailing lists because they're easier to search for previous questions and you can easily ignore uninteresting topics. However, one practice I like is the use of [OT] to designate clearly off topic threads like this one. I filter those mails to a different folder for convenience; I wish more people used that convention. Ironically this thread is only increasing the amount of traffic. Dave From: Galbreath, Mark [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Subject: RE: all this traffic Date: Wed, 25 Sep 2002 18:42:00 -0400 You could also try unsubscribing when you are going to be away. Or simply hold your shift key, highlight the lot, and delete. Why should the list have to be inconvenienced because you lack management skills? -Original Message- From: Jonas Bjornerstedt [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 25, 2002 6:43 PM To: Struts Users Mailing List Subject: all this traffic Hello all, A couple of days away from my computer has resulted in 473 unread postings. It's a bit frustrating trying to use a high traffic mailing list like this one. Here are some suggestions: - Have a struts-answers mailing list. If I found a discussion interesting - such as the one on container managed security - I could simply forward it to the answers list. The cost of asking a question could be to compile the answers and submit it to the list. This could be a cheap way of getting better documentation. - A struts-beginners list might be a good idea too. Sometimes the blind are not all that bad at leading the blind. - One could also consider having a struts-tags list. With JSF coming, there are going to be more people that are not interested in the Struts tags. Jonas -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] _ Join the world's largest e-mail service with MSN Hotmail. http://www.hotmail.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Need Help Fast
This is not really a struts question but I am using struts a maybe someone can help. I system has allot of state dropdown's so I I made a tag for the programmers to insert into the JSP pages. The Tag builds a ArrayList with the states in it and then saves the states as a attribute in the pageContext. But I don't know if this is the best way to do it. Is it anyway to tell this code only to run one time and then stay in member? Below is my sample code: Please help me out public int doStartTag() throws JspException { java.util.ArrayList states = new java.util.ArrayList(); states.add(new com.ubspw.cdd.common.LabelValueBean(-Select One-, )); states.add(new com.ubspw.cdd.common.LabelValueBean(AK, AK)); states.add(new com.ubspw.cdd.common.LabelValueBean(AL, AL)); states.add(new com.ubspw.cdd.common.LabelValueBean(AR, AR)); states.add(new com.ubspw.cdd.common.LabelValueBean(AZ, AZ)); states.add(new com.ubspw.cdd.common.LabelValueBean(CA, CA)); states.add(new com.ubspw.cdd.common.LabelValueBean(CO, CO)); states.add(new com.ubspw.cdd.common.LabelValueBean(CT, CT)); states.add(new com.ubspw.cdd.common.LabelValueBean(DC, DC)); states.add(new com.ubspw.cdd.common.LabelValueBean(DE, DE)); states.add(new com.ubspw.cdd.common.LabelValueBean(FL, FL)); states.add(new com.ubspw.cdd.common.LabelValueBean(GA, GA)); states.add(new com.ubspw.cdd.common.LabelValueBean(HI, HI)); states.add(new com.ubspw.cdd.common.LabelValueBean(IA, IA)); states.add(new com.ubspw.cdd.common.LabelValueBean(ID, ID)); states.add(new com.ubspw.cdd.common.LabelValueBean(IL, IL)); states.add(new com.ubspw.cdd.common.LabelValueBean(IN, IN)); states.add(new com.ubspw.cdd.common.LabelValueBean(KS, KS)); states.add(new com.ubspw.cdd.common.LabelValueBean(KY, KY)); states.add(new com.ubspw.cdd.common.LabelValueBean(LA, LA)); states.add(new com.ubspw.cdd.common.LabelValueBean(MA, MA)); states.add(new com.ubspw.cdd.common.LabelValueBean(MD, MD)); states.add(new com.ubspw.cdd.common.LabelValueBean(ME, ME)); states.add(new com.ubspw.cdd.common.LabelValueBean(MI, MI)); states.add(new com.ubspw.cdd.common.LabelValueBean(MN, MN)); states.add(new com.ubspw.cdd.common.LabelValueBean(MO, MO)); states.add(new com.ubspw.cdd.common.LabelValueBean(MS, MS)); states.add(new com.ubspw.cdd.common.LabelValueBean(MT, MT)); states.add(new com.ubspw.cdd.common.LabelValueBean(NC, NC)); states.add(new com.ubspw.cdd.common.LabelValueBean(ND, ND)); states.add(new com.ubspw.cdd.common.LabelValueBean(NE, NE)); states.add(new com.ubspw.cdd.common.LabelValueBean(NH, NH)); states.add(new com.ubspw.cdd.common.LabelValueBean(NJ, NJ)); states.add(new com.ubspw.cdd.common.LabelValueBean(NM, NM)); states.add(new com.ubspw.cdd.common.LabelValueBean(NV, NV)); states.add(new com.ubspw.cdd.common.LabelValueBean(NY, NY)); states.add(new com.ubspw.cdd.common.LabelValueBean(OH, OH)); states.add(new com.ubspw.cdd.common.LabelValueBean(OK, OK)); states.add(new com.ubspw.cdd.common.LabelValueBean(OR, OR)); states.add(new com.ubspw.cdd.common.LabelValueBean(PA, PA)); states.add(new com.ubspw.cdd.common.LabelValueBean(PR, PR)); states.add(new com.ubspw.cdd.common.LabelValueBean(RI, RI)); states.add(new com.ubspw.cdd.common.LabelValueBean(SC, SC)); states.add(new com.ubspw.cdd.common.LabelValueBean(SD, SD)); states.add(new com.ubspw.cdd.common.LabelValueBean(TN, TN)); states.add(new com.ubspw.cdd.common.LabelValueBean(TX, TX)); states.add(new com.ubspw.cdd.common.LabelValueBean(UT, UT)); states.add(new com.ubspw.cdd.common.LabelValueBean(VA, VA)); states.add(new com.ubspw.cdd.common.LabelValueBean(VI, VI)); states.add(new com.ubspw.cdd.common.LabelValueBean(VT, VT)); states.add(new com.ubspw.cdd.common.LabelValueBean(WA, WA)); states.add(new com.ubspw.cdd.common.LabelValueBean(WI, WI)); states.add(new com.ubspw.cdd.common.LabelValueBean(WV, WV)); states.add(new com.ubspw.cdd.common.LabelValueBean(WY, WY)); pageContext.setAttribute(selectStates, states); return (EVAL_BODY_INCLUDE); } -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: [OT] JavaScript
My favorite is the website that requires a login and password written with JavaScript on the same HTML/JSP page. Doh! -Original Message- From: Andrew Hill [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 25, 2002 11:00 PM ROFL! -Original Message- From: Steven Banks [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 25, 2002 19:54 I have found web sites that use javascript for security. Noticed it when trying to access a page. Turned off javascript, no more security. Andrew Hill [EMAIL PROTECTED] 09/24/02 11:16AM Id be dead without JS, and I think people would be silly to disable it, but cookies is another matter. I can understand folk disabling those... -Original Message- From: Eddie Bush [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 24, 2002 22:10 Yes, it does! I can vouch for it! I personally know two (highly educated) people that refuse to allow them. They are ignorant about them, of course, but that doesn't change the fact that people *do* disable cookies/JavaScript! Now, if I know two people, then how many more people are there out there that are doing this? Sorry to disagree - I view it as a fact of life. Having said that though, I don't not use JavaScript because of it. That's yet another opportunity to control things - it certainly does have applicability. Galbreath, Mark wrote: Ahhh yes, the bane of web app developers! I solved this problem with JavaScript and cookies - no browser back operations allowed! And spare me the what if JavaScript is turned off noise - it just doesn't happen in the REAL world. Mark -Original Message- From: Andrew Hill [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 24, 2002 3:02 AM (Incidentally, using the browsers back button in such a case results in a rather bad case of server state confusion!) -- Eddie Bush -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Struts and high performance sites revisited
You skip or shortchange the design phase (should be at least 30 percent of your project), you get what you deserve. Amen my brotha'! Preach on! robert -Original Message- From: David Zimmerman [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 26, 2002 5:43 AM To: [EMAIL PROTECTED] Subject: Struts and high performance sites revisited Ok, so we got it nailed down these statements... - The Struts Controller doesn't add more overhead than a high performance site should be able to handle. In the regard flexibility contra performance, using the controller makes your application manageable with negligible overhead. - There was also the everlasting discussion on EJB's be or not to be. I think that there are loads of variables that affects the choices of the design and that there still remains some issues with EJB's. However when only using stateless session beans with DAO's I think that the scalability-flexability-performance goes hand in hand and makes a preferrable design choice. Anyone disagrees? Would be nice to hear your opinions. - But what was not discussed was the overhead of custom tags. This seems to be a question much avoided everywhere. When talking about flexability. Oh yes, use them. They makes your pages much easier to build and manage. They also makes for a great design of the application. BUT (capital letters), what about the performance overhead of the tags? When designing a web site where the absolute focus is to be able to handle as many transactions as possible to a low cost. Doesn't custom tags become very expensive to use in a case like this? There must have been extensive testing made on this. Does anyone have any facts or thoughts on this? Tired of all the SPAM in your inbox? Switch to LYCOS MAIL PLUS http://www.mail.lycos.com/brandPage.shtml?pageId=plus -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Struts and high performance sites revisited
Hi I've recently been struggling with performance issues related to tags, especially where there are large number in some of our pages. The biggest improvment we got was by switching application servers. Specifically by upgrading to the latest Tomcat 4.1.11. The difference in response is incredible. So it would seem that the major issue is with the type of code generated by the servlet engine. We spent some time looking at the generated code, the major issue being that every tag reference is created as a new object. There must be better way to do this. Until this point I was wrongly assuming that the tags were run as just method calls on one instance. will JSTL improve on this ? :-) Tom Lister * 020 7612 3030 * [EMAIL PROTECTED] -Original Message- From: David Zimmerman [mailto:[EMAIL PROTECTED]] Sent: 26 September 2002 10:43 To: [EMAIL PROTECTED] Subject: Struts and high performance sites revisited Ok, so we got it nailed down these statements... - The Struts Controller doesn't add more overhead than a high performance site should be able to handle. In the regard flexibility contra performance, using the controller makes your application manageable with negligible overhead. - There was also the everlasting discussion on EJB's be or not to be. I think that there are loads of variables that affects the choices of the design and that there still remains some issues with EJB's. However when only using stateless session beans with DAO's I think that the scalability-flexability-performance goes hand in hand and makes a preferrable design choice. Anyone disagrees? Would be nice to hear your opinions. - But what was not discussed was the overhead of custom tags. This seems to be a question much avoided everywhere. When talking about flexability. Oh yes, use them. They makes your pages much easier to build and manage. They also makes for a great design of the application. BUT (capital letters), what about the performance overhead of the tags? When designing a web site where the absolute focus is to be able to handle as many transactions as possible to a low cost. Doesn't custom tags become very expensive to use in a case like this? There must have been extensive testing made on this. Does anyone have any facts or thoughts on this? Tired of all the SPAM in your inbox? Switch to LYCOS MAIL PLUS http://www.mail.lycos.com/brandPage.shtml?pageId=plus -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] *** This communication (including any attachments) contains confidential information. If you are not the intended recipient and you have received this communication in error, you should destroy it without copying, disclosing or otherwise using its contents. Please notify the sender immediately of the error. Internet communications are not necessarily secure and may be intercepted or changed after they are sent. Abbey National Treasury Services plc does not accept liability for any loss you may suffer as a result of interception or any liability for such changes. If you wish to confirm the origin or content of this communication, please contact the sender by using an alternative means of communication. This communication does not create or modify any contract and, unless otherwise stated, is not intended to be contractually binding. Abbey National Treasury Services plc. Registered Office: Abbey National House, 2 Triton Square, Regents Place, London NW1 3AN. Registered in England under Company Registration Number: 2338548. Regulated by the Financial Services Authority (FSA). *** -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Need Help Fast
Retrieve you states when the application starts up. Either init Servlet or ServletContextListener. Place collection of states in ServletContext where they will be available to all users for the life time of the application. Use logic:iterate .../ to render the states. robert -Original Message- From: Smith, Johnathan M. [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 26, 2002 8:13 AM To: 'Struts Users Mailing List' Subject: Need Help Fast This is not really a struts question but I am using struts a maybe someone can help. I system has allot of state dropdown's so I I made a tag for the programmers to insert into the JSP pages. The Tag builds a ArrayList with the states in it and then saves the states as a attribute in the pageContext. But I don't know if this is the best way to do it. Is it anyway to tell this code only to run one time and then stay in member? Below is my sample code: Please help me out public int doStartTag() throws JspException { java.util.ArrayList states = new java.util.ArrayList(); states.add(new com.ubspw.cdd.common.LabelValueBean(-Select One-, )); states.add(new com.ubspw.cdd.common.LabelValueBean(AK, AK)); states.add(new com.ubspw.cdd.common.LabelValueBean(AL, AL)); states.add(new com.ubspw.cdd.common.LabelValueBean(AR, AR)); states.add(new com.ubspw.cdd.common.LabelValueBean(AZ, AZ)); states.add(new com.ubspw.cdd.common.LabelValueBean(CA, CA)); states.add(new com.ubspw.cdd.common.LabelValueBean(CO, CO)); states.add(new com.ubspw.cdd.common.LabelValueBean(CT, CT)); states.add(new com.ubspw.cdd.common.LabelValueBean(DC, DC)); states.add(new com.ubspw.cdd.common.LabelValueBean(DE, DE)); states.add(new com.ubspw.cdd.common.LabelValueBean(FL, FL)); states.add(new com.ubspw.cdd.common.LabelValueBean(GA, GA)); states.add(new com.ubspw.cdd.common.LabelValueBean(HI, HI)); states.add(new com.ubspw.cdd.common.LabelValueBean(IA, IA)); states.add(new com.ubspw.cdd.common.LabelValueBean(ID, ID)); states.add(new com.ubspw.cdd.common.LabelValueBean(IL, IL)); states.add(new com.ubspw.cdd.common.LabelValueBean(IN, IN)); states.add(new com.ubspw.cdd.common.LabelValueBean(KS, KS)); states.add(new com.ubspw.cdd.common.LabelValueBean(KY, KY)); states.add(new com.ubspw.cdd.common.LabelValueBean(LA, LA)); states.add(new com.ubspw.cdd.common.LabelValueBean(MA, MA)); states.add(new com.ubspw.cdd.common.LabelValueBean(MD, MD)); states.add(new com.ubspw.cdd.common.LabelValueBean(ME, ME)); states.add(new com.ubspw.cdd.common.LabelValueBean(MI, MI)); states.add(new com.ubspw.cdd.common.LabelValueBean(MN, MN)); states.add(new com.ubspw.cdd.common.LabelValueBean(MO, MO)); states.add(new com.ubspw.cdd.common.LabelValueBean(MS, MS)); states.add(new com.ubspw.cdd.common.LabelValueBean(MT, MT)); states.add(new com.ubspw.cdd.common.LabelValueBean(NC, NC)); states.add(new com.ubspw.cdd.common.LabelValueBean(ND, ND)); states.add(new com.ubspw.cdd.common.LabelValueBean(NE, NE)); states.add(new com.ubspw.cdd.common.LabelValueBean(NH, NH)); states.add(new com.ubspw.cdd.common.LabelValueBean(NJ, NJ)); states.add(new com.ubspw.cdd.common.LabelValueBean(NM, NM)); states.add(new com.ubspw.cdd.common.LabelValueBean(NV, NV)); states.add(new com.ubspw.cdd.common.LabelValueBean(NY, NY)); states.add(new com.ubspw.cdd.common.LabelValueBean(OH, OH)); states.add(new com.ubspw.cdd.common.LabelValueBean(OK, OK)); states.add(new com.ubspw.cdd.common.LabelValueBean(OR, OR)); states.add(new com.ubspw.cdd.common.LabelValueBean(PA, PA)); states.add(new com.ubspw.cdd.common.LabelValueBean(PR, PR)); states.add(new com.ubspw.cdd.common.LabelValueBean(RI, RI)); states.add(new com.ubspw.cdd.common.LabelValueBean(SC, SC)); states.add(new com.ubspw.cdd.common.LabelValueBean(SD, SD)); states.add(new com.ubspw.cdd.common.LabelValueBean(TN, TN)); states.add(new com.ubspw.cdd.common.LabelValueBean(TX, TX)); states.add(new com.ubspw.cdd.common.LabelValueBean(UT, UT)); states.add(new com.ubspw.cdd.common.LabelValueBean(VA, VA)); states.add(new com.ubspw.cdd.common.LabelValueBean(VI, VI)); states.add(new com.ubspw.cdd.common.LabelValueBean(VT, VT)); states.add(new
RE: Need Help Fast
Hello, One possible solution: Put the ArrayList in application context and put a check in doStartTag()'s beginning to determine whether the list of states can be found in application context. Instead of: pageContext.setAttribute(selectStates, states); Put it like this: pageContext.setAttribute(selectStates, states, PageContext.APPLICATION_SCOPE); And in the beginning of doStartTag(): Object o = pageContext.getAttribute(selectStates, PageContext.APPLICATION_SCOPE); if (o == null) { ...do what your current code does... } else { ...do nothing... } But why do this in a tag at all? If your list of states never changes, you might as well initialize it in an init() method somewhere. T: Ville Peurala -Original Message- From: Smith, Johnathan M. [mailto:[EMAIL PROTECTED]] Sent: 26. syyskuuta 2002 15:13 To: 'Struts Users Mailing List' Subject: Need Help Fast This is not really a struts question but I am using struts a maybe someone can help. I system has allot of state dropdown's so I I made a tag for the programmers to insert into the JSP pages. The Tag builds a ArrayList with the states in it and then saves the states as a attribute in the pageContext. But I don't know if this is the best way to do it. Is it anyway to tell this code only to run one time and then stay in member? Below is my sample code: Please help me out public int doStartTag() throws JspException { java.util.ArrayList states = new java.util.ArrayList(); states.add(new com.ubspw.cdd.common.LabelValueBean(-Select One-, )); states.add(new com.ubspw.cdd.common.LabelValueBean(AK, AK)); states.add(new com.ubspw.cdd.common.LabelValueBean(AL, AL)); states.add(new com.ubspw.cdd.common.LabelValueBean(AR, AR)); states.add(new com.ubspw.cdd.common.LabelValueBean(AZ, AZ)); states.add(new com.ubspw.cdd.common.LabelValueBean(CA, CA)); states.add(new com.ubspw.cdd.common.LabelValueBean(CO, CO)); states.add(new com.ubspw.cdd.common.LabelValueBean(CT, CT)); states.add(new com.ubspw.cdd.common.LabelValueBean(DC, DC)); states.add(new com.ubspw.cdd.common.LabelValueBean(DE, DE)); states.add(new com.ubspw.cdd.common.LabelValueBean(FL, FL)); states.add(new com.ubspw.cdd.common.LabelValueBean(GA, GA)); states.add(new com.ubspw.cdd.common.LabelValueBean(HI, HI)); states.add(new com.ubspw.cdd.common.LabelValueBean(IA, IA)); states.add(new com.ubspw.cdd.common.LabelValueBean(ID, ID)); states.add(new com.ubspw.cdd.common.LabelValueBean(IL, IL)); states.add(new com.ubspw.cdd.common.LabelValueBean(IN, IN)); states.add(new com.ubspw.cdd.common.LabelValueBean(KS, KS)); states.add(new com.ubspw.cdd.common.LabelValueBean(KY, KY)); states.add(new com.ubspw.cdd.common.LabelValueBean(LA, LA)); states.add(new com.ubspw.cdd.common.LabelValueBean(MA, MA)); states.add(new com.ubspw.cdd.common.LabelValueBean(MD, MD)); states.add(new com.ubspw.cdd.common.LabelValueBean(ME, ME)); states.add(new com.ubspw.cdd.common.LabelValueBean(MI, MI)); states.add(new com.ubspw.cdd.common.LabelValueBean(MN, MN)); states.add(new com.ubspw.cdd.common.LabelValueBean(MO, MO)); states.add(new com.ubspw.cdd.common.LabelValueBean(MS, MS)); states.add(new com.ubspw.cdd.common.LabelValueBean(MT, MT)); states.add(new com.ubspw.cdd.common.LabelValueBean(NC, NC)); states.add(new com.ubspw.cdd.common.LabelValueBean(ND, ND)); states.add(new com.ubspw.cdd.common.LabelValueBean(NE, NE)); states.add(new com.ubspw.cdd.common.LabelValueBean(NH, NH)); states.add(new com.ubspw.cdd.common.LabelValueBean(NJ, NJ)); states.add(new com.ubspw.cdd.common.LabelValueBean(NM, NM)); states.add(new com.ubspw.cdd.common.LabelValueBean(NV, NV)); states.add(new com.ubspw.cdd.common.LabelValueBean(NY, NY)); states.add(new com.ubspw.cdd.common.LabelValueBean(OH, OH)); states.add(new com.ubspw.cdd.common.LabelValueBean(OK, OK)); states.add(new com.ubspw.cdd.common.LabelValueBean(OR, OR)); states.add(new com.ubspw.cdd.common.LabelValueBean(PA, PA)); states.add(new com.ubspw.cdd.common.LabelValueBean(PR, PR)); states.add(new com.ubspw.cdd.common.LabelValueBean(RI, RI)); states.add(new com.ubspw.cdd.common.LabelValueBean(SC, SC)); states.add(new com.ubspw.cdd.common.LabelValueBean(SD, SD)); states.add(new com.ubspw.cdd.common.LabelValueBean(TN, TN)); states.add(new
FW: [ANNOYANCE] Administrator message to the Sender
Anybody else getting this on every post? This is most annoying. -Original Message- From: Tuominen Janne [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 26, 2002 8:25 AM To: Galbreath, Mark Subject: Administrator message to the Sender Novossa on useita Janne Tuominen-nimisiä henkilöitä: - Tuominen Janne E, hän ei työskentele Novossa enää. - Tuominen Janne K, hän on tuotepäällikkönä Novo Extend oy:ssä Tampereella ja hänen sähköpostiosoitteensa on: [EMAIL PROTECTED] (muuttuu) Jos tunnistat näistä vastaanottajan, jolle viesti oli tarkoitettu, niin lähetä se uudelleen ao. henkilön osoitteella. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: [OT] JavaScript
Would you believe Ive seen sites for (supposedly) professional (web design some more!) companies that will put up a prompt when you hit the site to ask your name simply so they can then say on their main page: Welcome name to our website... Or some such nonsense. Yep. Ill sure use these guys to do my website. They know the best way to leverage JavaScript. ...A pity I cant remember which site it was. Would give you a laugh methinks. -Original Message- From: Galbreath, Mark [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 26, 2002 20:16 To: 'Struts Users Mailing List' Subject: RE: [OT] JavaScript My favorite is the website that requires a login and password written with JavaScript on the same HTML/JSP page. Doh! -Original Message- From: Andrew Hill [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 25, 2002 11:00 PM ROFL! -Original Message- From: Steven Banks [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 25, 2002 19:54 I have found web sites that use javascript for security. Noticed it when trying to access a page. Turned off javascript, no more security. Andrew Hill [EMAIL PROTECTED] 09/24/02 11:16AM Id be dead without JS, and I think people would be silly to disable it, but cookies is another matter. I can understand folk disabling those... -Original Message- From: Eddie Bush [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 24, 2002 22:10 Yes, it does! I can vouch for it! I personally know two (highly educated) people that refuse to allow them. They are ignorant about them, of course, but that doesn't change the fact that people *do* disable cookies/JavaScript! Now, if I know two people, then how many more people are there out there that are doing this? Sorry to disagree - I view it as a fact of life. Having said that though, I don't not use JavaScript because of it. That's yet another opportunity to control things - it certainly does have applicability. Galbreath, Mark wrote: Ahhh yes, the bane of web app developers! I solved this problem with JavaScript and cookies - no browser back operations allowed! And spare me the what if JavaScript is turned off noise - it just doesn't happen in the REAL world. Mark -Original Message- From: Andrew Hill [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 24, 2002 3:02 AM (Incidentally, using the browsers back button in such a case results in a rather bad case of server state confusion!) -- Eddie Bush -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: [ANNOYANCE] Administrator message to the Sender
Nope. Looks like youve got a secret admirer. ;-) -Original Message- From: Galbreath, Mark [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 26, 2002 20:29 To: Struts (E-mail) Subject: FW: [ANNOYANCE] Administrator message to the Sender Anybody else getting this on every post? This is most annoying. -Original Message- From: Tuominen Janne [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 26, 2002 8:25 AM To: Galbreath, Mark Subject: Administrator message to the Sender Novossa on useita Janne Tuominen-nimisiä henkilöitä: - Tuominen Janne E, hän ei työskentele Novossa enää. - Tuominen Janne K, hän on tuotepäällikkönä Novo Extend oy:ssä Tampereella ja hänen sähköpostiosoitteensa on: [EMAIL PROTECTED] (muuttuu) Jos tunnistat näistä vastaanottajan, jolle viesti oli tarkoitettu, niin lähetä se uudelleen ao. henkilön osoitteella. -- 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: [ANNOYANCE] Administrator message to the Sender
The content of this message is in Finnish and means that Janne Tuominen has subscribed to this list with e-mail address [EMAIL PROTECTED], but does not work in Novogroup anymore. So, [EMAIL PROTECTED] should be deleted from Struts user list. T: Ville Peurala -Original Message- From: Andrew Hill [mailto:[EMAIL PROTECTED]] Sent: 26. syyskuuta 2002 15:37 To: Struts Users Mailing List Subject: RE: [ANNOYANCE] Administrator message to the Sender Nope. Looks like youve got a secret admirer. ;-) -Original Message- From: Galbreath, Mark [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 26, 2002 20:29 To: Struts (E-mail) Subject: FW: [ANNOYANCE] Administrator message to the Sender Anybody else getting this on every post? This is most annoying. -Original Message- From: Tuominen Janne [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 26, 2002 8:25 AM To: Galbreath, Mark Subject: Administrator message to the Sender Novossa on useita Janne Tuominen-nimisiä henkilöitä: - Tuominen Janne E, hän ei työskentele Novossa enää. - Tuominen Janne K, hän on tuotepäällikkönä Novo Extend oy:ssä Tampereella ja hänen sähköpostiosoitteensa on: [EMAIL PROTECTED] (muuttuu) Jos tunnistat näistä vastaanottajan, jolle viesti oli tarkoitettu, niin lähetä se uudelleen ao. henkilön osoitteella. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Struts and high performance sites revisited
I've always wondered the same. I haven't found a definitive answer, but there's a lot of good info referenced in an old posting from Ted Husted: http://www.mail-archive.com/struts-user@jakarta.apache.org/msg14397.html Paul -Original Message- From: David Zimmerman [mailto:[EMAIL PROTECTED]] Sent: September 26, 2002 5:43 AM To: [EMAIL PROTECTED] Subject: Struts and high performance sites revisited Ok, so we got it nailed down these statements... - The Struts Controller doesn't add more overhead than a high performance site should be able to handle. In the regard flexibility contra performance, using the controller makes your application manageable with negligible overhead. - There was also the everlasting discussion on EJB's be or not to be. I think that there are loads of variables that affects the choices of the design and that there still remains some issues with EJB's. However when only using stateless session beans with DAO's I think that the scalability-flexability-performance goes hand in hand and makes a preferrable design choice. Anyone disagrees? Would be nice to hear your opinions. - But what was not discussed was the overhead of custom tags. This seems to be a question much avoided everywhere. When talking about flexability. Oh yes, use them. They makes your pages much easier to build and manage. They also makes for a great design of the application. BUT (capital letters), what about the performance overhead of the tags? When designing a web site where the absolute focus is to be able to handle as many transactions as possible to a low cost. Doesn't custom tags become very expensive to use in a case like this? There must have been extensive testing made on this. Does anyone have any facts or thoughts on this? Tired of all the SPAM in your inbox? Switch to LYCOS MAIL PLUS http://www.mail.lycos.com/brandPage.shtml?pageId=plus -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: [OT] JavaScript
NOSCRIPTPlease turn javascript back on/NOSCRIPT Galbreath, Mark wrote:My favorite is the website that requires a login and password written with JavaScript on the same HTML/JSP page. Doh! -Original Message- From: Andrew Hill [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 25, 2002 11:00 PM ROFL! -Original Message- From: Steven Banks [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 25, 2002 19:54 I have found web sites that use javascript for security. Noticed it when trying to access a page. Turned off javascript, no more security. Andrew Hill 09/24/02 11:16AM Id be dead without JS, and I think people would be silly to disable it, but cookies is another matter. I can understand folk disabling those... -Original Message- From: Eddie Bush [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 24, 2002 22:10 Yes, it does! I can vouch for it! I personally know two (highly educated) people that refuse to allow them. They are ignorant about them, of course, but that doesn't change the fact that people *do* disable cookies/JavaScript! Now, if I know two people, then how many more people are there out there that are doing this? Sorry to disagree - I view it as a fact of life. Having said that though, I don't not use JavaScript because of it. That's yet another opportunity to control things - it certainly does have applicability. Galbreath, Mark wrote: Ahhh yes, the bane of web app developers! I solved this problem with JavaScript and cookies - no browser back operations allowed! And spare me the what if JavaScript is turned off noise - it just doesn't happen in the REAL world. Mark -Original Message- From: Andrew Hill [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 24, 2002 3:02 AM (Incidentally, using the browsers back button in such a case results in a rather bad case of server state confusion!) -- Eddie Bush -- To unsubscribe, e-mail: For additional commands, e-mail: - Do you Yahoo!? New DSL Internet Access from SBC Yahoo!
initilaizing form bean values
hi, i have form bean for which i would like to initialize some fields with values before displaying the jsp. for example if i have something like this in my jsp, how can i initialize this input field from my Action class with a value that i get from the database html:text property=mail_id /, this should display some initial data any help will be apprecaited Deepank
RE: initilaizing form bean values
Use the form's reset() method (as described in the docs and examples) -Devin -Original Message- From: deepank [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 26, 2002 9:16 AM To: Struts Users Mailing List Subject: initilaizing form bean values hi, i have form bean for which i would like to initialize some fields with values before displaying the jsp. for example if i have something like this in my jsp, how can i initialize this input field from my Action class with a value that i get from the database html:text property=mail_id /, this should display some initial data any help will be apprecaited Deepank -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: [OT] Commons Validator JavaDoc
Cool! This is exactly what I'm looking for! Jerry -Original Message- From: James Turner [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 25, 2002 6:50 PM To: Struts Users Mailing List Subject: Re: [OT] Commons Validator JavaDoc At 04:40 PM 9/25/2002, [EMAIL PROTECTED] wrote: Yeah, I have - it's a great example on how to write a custom validation method. I'm trying to see if I can directly access additional form fields without having to specify each on as a var.../var in my application-rules.xml. Jerry Just added to validator, you can get access to the form from a validation rule by putting Validator in the method signature. For example: public static boolean validateLastNameIsBob(Object bean, Field field, Validator validator) { Object form = validator.getResource(validator.BEAN_KEY); String lastName = ValidatorUtil.getValueAsString(form, lastName); if (lastName.equals(Bob) return true; return false; } If you look in the unit tests for Validator, you can see a requiredif validation I wrote that does generic cross-field validations (i.e., last name is required if first name is filled in). I'll be submitting as an enhancement for Struts Validator soon. James James -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] This transmission (and any information attached to it) may be confidential and is intended solely for the use of the individual or entity to which it is addressed. If you are not the intended recipient or the person responsible for delivering the transmission to the intended recipient, be advised that you have received this transmission in error and that any use, dissemination, forwarding, printing, or copying of this information is strictly prohibited. If you have received this transmission in error, please immediately notify LabOne at (800)388-4675. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Unit testing a struts application
Hi all, I am searching for possible improvements on my development process. One of greatest things i've found is XP. I liked it very much. One of XP rules is about unit testing. So follows my question : How can i unit test a struts app? I heard about Cactus (another Jakarta project). Does someone here have experience using it? All kind of use cases would be a plus. Best regards, Daniel. __ Do you Yahoo!? New DSL Internet Access from SBC Yahoo! http://sbc.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Need Help Fast
Can you please send me a sample of a better way -Original Message- From: Ville Peurala [mailto: Sent: Thursday, September 26, 2002 8:26 AM To: Struts Users Mailing List Subject: RE: Need Help Fast Hello, One possible solution: Put the ArrayList in application context and put a check in doStartTag()'s beginning to determine whether the list of states can be found in application context. Instead of: pageContext.setAttribute(selectStates, states); Put it like this: pageContext.setAttribute(selectStates, states, PageContext.APPLICATION_SCOPE); And in the beginning of doStartTag(): Object o = pageContext.getAttribute(selectStates, PageContext.APPLICATION_SCOPE); if (o == null) { ...do what your current code does... } else { ...do nothing... } But why do this in a tag at all? If your list of states never changes, you might as well initialize it in an init() method somewhere. T: Ville Peurala -Original Message- From: Smith, Johnathan M. [mailto:[EMAIL PROTECTED]] Sent: 26. syyskuuta 2002 15:13 To: 'Struts Users Mailing List' Subject: Need Help Fast This is not really a struts question but I am using struts a maybe someone can help. I system has allot of state dropdown's so I I made a tag for the programmers to insert into the JSP pages. The Tag builds a ArrayList with the states in it and then saves the states as a attribute in the pageContext. But I don't know if this is the best way to do it. Is it anyway to tell this code only to run one time and then stay in member? Below is my sample code: Please help me out public int doStartTag() throws JspException { java.util.ArrayList states = new java.util.ArrayList(); states.add(new com.ubspw.cdd.common.LabelValueBean(-Select One-, )); states.add(new com.ubspw.cdd.common.LabelValueBean(AK, AK)); states.add(new com.ubspw.cdd.common.LabelValueBean(AL, AL)); states.add(new com.ubspw.cdd.common.LabelValueBean(AR, AR)); states.add(new com.ubspw.cdd.common.LabelValueBean(AZ, AZ)); states.add(new com.ubspw.cdd.common.LabelValueBean(CA, CA)); states.add(new com.ubspw.cdd.common.LabelValueBean(CO, CO)); states.add(new com.ubspw.cdd.common.LabelValueBean(CT, CT)); states.add(new com.ubspw.cdd.common.LabelValueBean(DC, DC)); states.add(new com.ubspw.cdd.common.LabelValueBean(DE, DE)); states.add(new com.ubspw.cdd.common.LabelValueBean(FL, FL)); states.add(new com.ubspw.cdd.common.LabelValueBean(GA, GA)); states.add(new com.ubspw.cdd.common.LabelValueBean(HI, HI)); states.add(new com.ubspw.cdd.common.LabelValueBean(IA, IA)); states.add(new com.ubspw.cdd.common.LabelValueBean(ID, ID)); states.add(new com.ubspw.cdd.common.LabelValueBean(IL, IL)); states.add(new com.ubspw.cdd.common.LabelValueBean(IN, IN)); states.add(new com.ubspw.cdd.common.LabelValueBean(KS, KS)); states.add(new com.ubspw.cdd.common.LabelValueBean(KY, KY)); states.add(new com.ubspw.cdd.common.LabelValueBean(LA, LA)); states.add(new com.ubspw.cdd.common.LabelValueBean(MA, MA)); states.add(new com.ubspw.cdd.common.LabelValueBean(MD, MD)); states.add(new com.ubspw.cdd.common.LabelValueBean(ME, ME)); states.add(new com.ubspw.cdd.common.LabelValueBean(MI, MI)); states.add(new com.ubspw.cdd.common.LabelValueBean(MN, MN)); states.add(new com.ubspw.cdd.common.LabelValueBean(MO, MO)); states.add(new com.ubspw.cdd.common.LabelValueBean(MS, MS)); states.add(new com.ubspw.cdd.common.LabelValueBean(MT, MT)); states.add(new com.ubspw.cdd.common.LabelValueBean(NC, NC)); states.add(new com.ubspw.cdd.common.LabelValueBean(ND, ND)); states.add(new com.ubspw.cdd.common.LabelValueBean(NE, NE)); states.add(new com.ubspw.cdd.common.LabelValueBean(NH, NH)); states.add(new com.ubspw.cdd.common.LabelValueBean(NJ, NJ)); states.add(new com.ubspw.cdd.common.LabelValueBean(NM, NM)); states.add(new com.ubspw.cdd.common.LabelValueBean(NV, NV)); states.add(new com.ubspw.cdd.common.LabelValueBean(NY, NY)); states.add(new com.ubspw.cdd.common.LabelValueBean(OH, OH)); states.add(new com.ubspw.cdd.common.LabelValueBean(OK, OK)); states.add(new com.ubspw.cdd.common.LabelValueBean(OR, OR)); states.add(new com.ubspw.cdd.common.LabelValueBean(PA, PA)); states.add(new com.ubspw.cdd.common.LabelValueBean(PR, PR)); states.add(new com.ubspw.cdd.common.LabelValueBean(RI, RI)); states.add(new
Re: all this traffic
Is what you want already on jguru.com. - Original Message - From: Galbreath, Mark [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Sent: Thursday, September 26, 2002 8:05 AM Subject: RE: all this traffic Note I removed the [OT]. :-) I think this is right on topic because there have been many complaints from all level of users about the difficulty of finding useful information in the archive. If the archive was better managed, list traffic could be substantially reduced. For that matter, just having the URL attached as part of the signature would probably greatly reduce traffic (and would remove the I didn't know there was an archive, or I didn't know how to find it excuses. But the idea of tagging questions and responses with some pre-defined elements is intriguing and certainly would add value to the archive. -Original Message- From: David Graham [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 25, 2002 7:59 PM To: [EMAIL PROTECTED] Subject: [OT] RE: all this traffic You get right to the point don't you Mark :-) ? I think online forums are much easier to use than mailing lists because they're easier to search for previous questions and you can easily ignore uninteresting topics. However, one practice I like is the use of [OT] to designate clearly off topic threads like this one. I filter those mails to a different folder for convenience; I wish more people used that convention. Ironically this thread is only increasing the amount of traffic. Dave From: Galbreath, Mark [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Subject: RE: all this traffic Date: Wed, 25 Sep 2002 18:42:00 -0400 You could also try unsubscribing when you are going to be away. Or simply hold your shift key, highlight the lot, and delete. Why should the list have to be inconvenienced because you lack management skills? -Original Message- From: Jonas Bjornerstedt [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 25, 2002 6:43 PM To: Struts Users Mailing List Subject: all this traffic Hello all, A couple of days away from my computer has resulted in 473 unread postings. It's a bit frustrating trying to use a high traffic mailing list like this one. Here are some suggestions: - Have a struts-answers mailing list. If I found a discussion interesting - such as the one on container managed security - I could simply forward it to the answers list. The cost of asking a question could be to compile the answers and submit it to the list. This could be a cheap way of getting better documentation. - A struts-beginners list might be a good idea too. Sometimes the blind are not all that bad at leading the blind. - One could also consider having a struts-tags list. With JSF coming, there are going to be more people that are not interested in the Struts tags. Jonas -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] _ Join the world's largest e-mail service with MSN Hotmail. http://www.hotmail.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: initilaizing form bean values
You must call an Action before, this action will put the bean in the request scope with the name you defined for it in struts-config.xml. req.setAttribute(name,bean); Regards. -Mensaje original- De: deepank [mailto:[EMAIL PROTECTED]] Enviado el: jueves, 26 de septiembre de 2002 15:16 Para: Struts Users Mailing List Asunto: initilaizing form bean values hi, i have form bean for which i would like to initialize some fields with values before displaying the jsp. for example if i have something like this in my jsp, how can i initialize this input field from my Action class with a value that i get from the database html:text property=mail_id /, this should display some initial data any help will be apprecaited Deepank -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: initilaizing form bean values
I dont know how this will help. I have a form with several records, i have an edit buuton for each record. If a user cliks the edit button i go back to the action class. here i would like to pick up data from the database, this data i want to display in the fields of the form(JSP) for the user to edit. i have this code in the action as usual if (mapping.getAttribute() != null) { if (request.equals(mapping.getScope())) request.removeAttribute(mapping.getAttribute()); else session.removeAttribute(mapping.getAttribute()); } this removes the previous form bean instance. SHOULD I REMOVE THIS CODE and use setter methods to prepopulate the form bean fields in the action class. Deepank - Original Message - From: Richards, Devin N (Devin) [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Thursday, September 26, 2002 6:42 PM Subject: RE: initilaizing form bean values Use the form's reset() method (as described in the docs and examples) -Devin -Original Message- From: deepank [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 26, 2002 9:16 AM To: Struts Users Mailing List Subject: initilaizing form bean values hi, i have form bean for which i would like to initialize some fields with values before displaying the jsp. for example if i have something like this in my jsp, how can i initialize this input field from my Action class with a value that i get from the database html:text property=mail_id /, this should display some initial data any help will be apprecaited Deepank -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Struts and high performance sites revisited
Tom, I totally agree - its all in how the server gen's the code, for the most part. The rest is related to the spec itself and how much it allows app servers to optimize. There was a discussion about the thread safety of JSP tags a little while ago. Here is what I wrote up: http://www.mail-archive.com/struts-user@jakarta.apache.org/msg39324.html The reason I bring this email up, is that I have listed a section from the JSP spec where they discuss that a JSP tag should remain dedicated to the page: The JSP page implementation class instantiates a tag handler object, or reuses an existing tag handler object, for each action in the JSP page. This means that app servers *could* start pooling these tags to reduce the overall creation and garbage collection. I'd be interested in someone who would benchmark the differences using something that is open source (like Jasper), which could be quickly modified to use Doug Lea's object pooling or something similar and compared. James -Original Message- From: Lister, Tom (ANTS) [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 26, 2002 7:22 AM To: 'Struts Users Mailing List' Subject: RE: Struts and high performance sites revisited Hi I've recently been struggling with performance issues related to tags, especially where there are large number in some of our pages. The biggest improvment we got was by switching application servers. Specifically by upgrading to the latest Tomcat 4.1.11. The difference in response is incredible. So it would seem that the major issue is with the type of code generated by the servlet engine. We spent some time looking at the generated code, the major issue being that every tag reference is created as a new object. There must be better way to do this. Until this point I was wrongly assuming that the tags were run as just method calls on one instance. will JSTL improve on this ? :-) Tom Lister * 020 7612 3030 * [EMAIL PROTECTED] -Original Message- From: David Zimmerman [mailto:[EMAIL PROTECTED]] Sent: 26 September 2002 10:43 To: [EMAIL PROTECTED] Subject: Struts and high performance sites revisited Ok, so we got it nailed down these statements... - The Struts Controller doesn't add more overhead than a high performance site should be able to handle. In the regard flexibility contra performance, using the controller makes your application manageable with negligible overhead. - There was also the everlasting discussion on EJB's be or not to be. I think that there are loads of variables that affects the choices of the design and that there still remains some issues with EJB's. However when only using stateless session beans with DAO's I think that the scalability-flexability-performance goes hand in hand and makes a preferrable design choice. Anyone disagrees? Would be nice to hear your opinions. - But what was not discussed was the overhead of custom tags. This seems to be a question much avoided everywhere. When talking about flexability. Oh yes, use them. They makes your pages much easier to build and manage. They also makes for a great design of the application. BUT (capital letters), what about the performance overhead of the tags? When designing a web site where the absolute focus is to be able to handle as many transactions as possible to a low cost. Doesn't custom tags become very expensive to use in a case like this? There must have been extensive testing made on this. Does anyone have any facts or thoughts on this? Tired of all the SPAM in your inbox? Switch to LYCOS MAIL PLUS http://www.mail.lycos.com/brandPage.shtml?pageId=plus -- To unsubscribe, e-mail: mailto:struts-user- [EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] ** * This communication (including any attachments) contains confidential information. If you are not the intended recipient and you have received this communication in error, you should destroy it without copying, disclosing or otherwise using its contents. Please notify the sender immediately of the error. Internet communications are not necessarily secure and may be intercepted or changed after they are sent. Abbey National Treasury Services plc does not accept liability for any loss you may suffer as a result of interception or any liability for such changes. If you wish to confirm the origin or content of this communication, please contact the sender by using an alternative means of communication. This communication does not create or modify any contract and, unless otherwise stated, is not intended to be contractually binding. Abbey National Treasury Services plc. Registered Office: Abbey National House, 2 Triton Square, Regents Place, London NW1 3AN.
Re: Unit testing a struts application
Cactus works great with Struts. Just go to there web page http://jakarta.apache.org/cactus/index.html and check out the documentation examples. Join their user list, check the archives and if you still have questions ask the Cactus user group. You will also need to know all about JUnit - http://junit.org/index.htm Jim From: Daniel H. F. e Silva [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Unit testing a struts application Date: Thu, 26 Sep 2002 06:14:13 -0700 (PDT) Hi all, I am searching for possible improvements on my development process. One of greatest things i've found is XP. I liked it very much. One of XP rules is about unit testing. So follows my question : How can i unit test a struts app? I heard about Cactus (another Jakarta project). Does someone here have experience using it? All kind of use cases would be a plus. Best regards, Daniel. __ Do you Yahoo!? New DSL Internet Access from SBC Yahoo! http://sbc.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] Jim Young Northern Objects Inc. 905 781-7019 _ 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]
Startup Problem
Hi All, Here i'm facing serious problem.. I already configured test application in Struts. But when I configure my original Application i face serious problem.. I got an error like No action instance for path /login could be created The server encountered an internal error (No action instance for path /login could be created) that prevented it from fulfilling this request. I gave my code here struts-config.xml ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE struts-config PUBLIC -//Apache Software Foundation//DTD Struts Configuration 1.0//EN http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd; struts-config form-beans form-bean name=loginForm type=com..login.LoginForm/ /form-beans global-forwards forward name=error path=/login.jsp/ /global-forwards action-mappings actionpath=/login type=com.login.LoginAction name=loginForm scope=request input=/login.jsp forward name=success path=/home.jsp/ /action /action-mappings /struts-config web.xml - ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.2//EN http://java.sun.com/j2ee/dtds/web-app_2_2.dtd; web-app !-- Action Servlet Configuration -- servlet servlet-nameaction/servlet-name servlet-classorg.apache.struts.action.ActionServlet/servlet-class init-param param-nameapplication/param-name param-valuecom.openwave.careertracks.ApplicationResources/param-value /init-param init-param param-nameconfig/param-name param-value/WEB-INF/struts-config.xml/param-value /init-param init-param param-namedebug/param-name param-value2/param-value /init-param init-param param-namedetail/param-name param-value2/param-value /init-param init-param param-namevalidate/param-name param-valuetrue/param-value /init-param load-on-startup1/load-on-startup /servlet !-- Action Servlet Mapping -- servlet-mapping servlet-nameaction/servlet-name url-pattern*.do/url-pattern /servlet-mapping !-- The Welcome File List -- welcome-file-list welcome-filelogin.jsp/welcome-file /welcome-file-list !-- Application Tag Library Descriptor -- taglib taglib-uri/WEB-INF/app.tld/taglib-uri taglib-location/WEB-INF/app.tld/taglib-location /taglib !-- Struts Tag Library Descriptors -- taglib taglib-uri/WEB-INF/struts-bean.tld/taglib-uri taglib-location/WEB-INF/struts-bean.tld/taglib-location /taglib taglib taglib-uri/WEB-INF/struts-html.tld/taglib-uri taglib-location/WEB-INF/struts-html.tld/taglib-location /taglib taglib taglib-uri/WEB-INF/struts-logic.tld/taglib-uri taglib-location/WEB-INF/struts-logic.tld/taglib-location /taglib /web-app login.jsp --- % taglib uri='/WEB-INF/struts-template.tld' prefix='template' % template:insert template='/logintemplate.jsp' template:put name='title' content='Strus' direct='true'/ template:put name='header' content='/header.htm' / template:put name='content' content='/login.htm'/ template:put name='footer' content='/footer.htm' / /template:insert login.html form table align=center cellpadding=0 cellspacing=0 td class=text11boldnbsp;nbsp;nbsp;Username:nbsp;nbsp;input class=inbox type=text name=userName value= size=15/td /tr tr/tr tr td class=text11boldnbsp;nbsp;nbsp;Password:nbsp;nbsp;input class=inbox type=password name=password size=15 a href=login.doimg src=images/login_button.gif border=0/a/td/table /form Please help where i made a mistake.. Thanx in Advance
RE: initilaizing form bean values
This has been discussed several times on this list. Please do a _little_ homework before posting. Sorry to be so harsh. One solution: Create a set-up action which when invoked retrieves the required values from the data store, populates your form, and then forwards to the page where the data is rendered. robert -Original Message- From: deepank [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 26, 2002 9:16 AM To: Struts Users Mailing List Subject: initilaizing form bean values hi, i have form bean for which i would like to initialize some fields with values before displaying the jsp. for example if i have something like this in my jsp, how can i initialize this input field from my Action class with a value that i get from the database html:text property=mail_id /, this should display some initial data any help will be apprecaited Deepank -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Struts tags for display a collection of views [paging design pattern]
Paging is the good term to describe what I want to do. I don't work directly with a dataset because I use an back-end application server that works on the database. So I receive a list of JavaBean that I would like to display in JSP pages. I found a little description of the paging pattern but I would like to know if someone has created an application with paging that use Struts tags (logic:iterate) or nested tags. You speak about the documentation but I think that an example allows to understand a documentation well. Sandra -Original Message- From: Taylor, Jason [mailto:[EMAIL PROTECTED]] Sent: 25 September 2002 16:31 To: 'Struts Users Mailing List' Subject: RE: Struts tags for display a collection of views I think you're talking about paging through a dataset a certain number of records at a time. If I'm right then we're talking about some sort of collection with a class or set of classes whose mission in life is to provide meta-data about the collection like Page 5 of 6, current selection is Record #34, etc. It's a pattern, though I'm not sure what you'd call it other than paging, though unfortunately paging makes people think of little electronic devices that annoy people automatically, so there should be a better word for it. Bottom line-- what you're talking about is something you could handle on the front end (in Javascript or some other scripting language) or the back end (in your Java classes that make up and service your Model), depending on your preferences/strengths. What Struts provides you is the framework for passing the data between the front and back end that shields you as much as possible from the details of how the servlet container works. Sometimes you'll get rather curt answers if it sounds like you're expecting Struts to provide features that are more high-level than that of a webapp framework. Don't take it personally, there are a *lot* of postings on this newsgroup, and most of them could be handled by the posters themselves if they simply read and understood the documentation more carefully. -JT -Original Message- From: Heligon Sandra [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 25, 2002 12:35 AM To: 'Struts Users Mailing List' Subject: RE: Struts tags for display a collection of views Excuse me I do not understand the direction of your answer. I already read documentation about tags offered by struts. For displaying a list of objects it seems that there are two possible choices logic:iterate and nested tags. The problem that I meet today in the construction of my page to displaying data several similar sights seemed me common. This is why I sought of the assistance on this forum. I find interessant very to be able to exchange our knowledge, and our experiments that makes it possible to reduce times of development considerably. I know that the tutoriaux ones and documentation exist but the examples given are often simple. On the other hand the users of Struts like you and me, build more complex cases. Sandra, -Original Message- From: Galbreath, Mark [mailto:[EMAIL PROTECTED]] Sent: 24 September 2002 19:10 To: 'Struts Users Mailing List' Subject: RE: Struts tags for display a collection of views This would require a tutorial (or two). I would suggest you do one, then ask a question. Mark -Original Message- From: Heligon Sandra [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 24, 2002 12:10 PM Hi, I don't know HTML/Struts tags very well, I would like to know if it is possible to display this kind of view: Previous | | Next | | | (body) | | | In fact I have to display a list that can have a large size and multiple views are required. The buttons Previous and next all to navigate from one view to another. Could you explain me how this type of views is managed ? Thanks a lot -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: initilaizing form bean values
I would use your setter methods to initialize the bean in the reset method rather then removing it from scope. We have several forms which we pre-populate from a single-sign-on database so that the user does not have to type in their name, address etc. We have one action that displays the form and another that processes it (sometimes they are the same action class, with different parameters.) When the Action to display the form is called we use the setter methods in the form bean's reset() to get data from the DB and then display it. -Devin -Original Message- From: deepank [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 26, 2002 9:29 AM To: Struts Users Mailing List Subject: Re: initilaizing form bean values I dont know how this will help. I have a form with several records, i have an edit buuton for each record. If a user cliks the edit button i go back to the action class. here i would like to pick up data from the database, this data i want to display in the fields of the form(JSP) for the user to edit. i have this code in the action as usual if (mapping.getAttribute() != null) { if (request.equals(mapping.getScope())) request.removeAttribute(mapping.getAttribute()); else session.removeAttribute(mapping.getAttribute()); } this removes the previous form bean instance. SHOULD I REMOVE THIS CODE and use setter methods to prepopulate the form bean fields in the action class. Deepank - Original Message - From: Richards, Devin N (Devin) [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Thursday, September 26, 2002 6:42 PM Subject: RE: initilaizing form bean values Use the form's reset() method (as described in the docs and examples) -Devin -Original Message- From: deepank [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 26, 2002 9:16 AM To: Struts Users Mailing List Subject: initilaizing form bean values hi, i have form bean for which i would like to initialize some fields with values before displaying the jsp. for example if i have something like this in my jsp, how can i initialize this input field from my Action class with a value that i get from the database html:text property=mail_id /, this should display some initial data any help will be apprecaited Deepank -- 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: Need Help Fast
Essentially, he is saying you can rewrite your doStartTag method to be something like: private List _states = null; public int doStartTag() throws JspException { if (_states == null) { _states = new java.util.ArrayList(); _states.add(new com.ubspw.cdd.common.LabelValueBean(-Select One-, )); _states.add(new com.ubspw.cdd.common.LabelValueBean(AK,AK)); _states.add(new com.ubspw.cdd.common.LabelValueBean(AL,AL)); _states.add(new com.ubspw.cdd.common.LabelValueBean(AR,AR)); ... ... } pageContext.setAttribute(selectStates, _states); return (EVAL_BODY_INCLUDE); } this way, states will only be set up the first time doStartTag is called. --- - Nayan Hajratwala - Chikli Consulting LLC - http://www.chikli.com -Original Message- From: Smith, Johnathan M. [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 26, 2002 9:14 AM To: 'Struts Users Mailing List' Cc: '[EMAIL PROTECTED]' Subject: RE: Need Help Fast Can you please send me a sample of a better way -Original Message- From: Ville Peurala [mailto: Sent: Thursday, September 26, 2002 8:26 AM To: Struts Users Mailing List Subject: RE: Need Help Fast Hello, One possible solution: Put the ArrayList in application context and put a check in doStartTag()'s beginning to determine whether the list of states can be found in application context. Instead of: pageContext.setAttribute(selectStates, states); Put it like this: pageContext.setAttribute(selectStates, states, PageContext.APPLICATION_SCOPE); And in the beginning of doStartTag(): Object o = pageContext.getAttribute(selectStates, PageContext.APPLICATION_SCOPE); if (o == null) { ...do what your current code does... } else { ...do nothing... } But why do this in a tag at all? If your list of states never changes, you might as well initialize it in an init() method somewhere. T: Ville Peurala -Original Message- From: Smith, Johnathan M. [mailto:[EMAIL PROTECTED]] Sent: 26. syyskuuta 2002 15:13 To: 'Struts Users Mailing List' Subject: Need Help Fast This is not really a struts question but I am using struts a maybe someone can help. I system has allot of state dropdown's so I I made a tag for the programmers to insert into the JSP pages. The Tag builds a ArrayList with the states in it and then saves the states as a attribute in the pageContext. But I don't know if this is the best way to do it. Is it anyway to tell this code only to run one time and then stay in member? Below is my sample code: Please help me out public int doStartTag() throws JspException { java.util.ArrayList states = new java.util.ArrayList(); states.add(new com.ubspw.cdd.common.LabelValueBean(-Select One-, )); states.add(new com.ubspw.cdd.common.LabelValueBean(AK, AK)); states.add(new com.ubspw.cdd.common.LabelValueBean(AL, AL)); states.add(new com.ubspw.cdd.common.LabelValueBean(AR, AR)); states.add(new com.ubspw.cdd.common.LabelValueBean(AZ, AZ)); states.add(new com.ubspw.cdd.common.LabelValueBean(CA, CA)); states.add(new com.ubspw.cdd.common.LabelValueBean(CO, CO)); states.add(new com.ubspw.cdd.common.LabelValueBean(CT, CT)); states.add(new com.ubspw.cdd.common.LabelValueBean(DC, DC)); states.add(new com.ubspw.cdd.common.LabelValueBean(DE, DE)); states.add(new com.ubspw.cdd.common.LabelValueBean(FL, FL)); states.add(new com.ubspw.cdd.common.LabelValueBean(GA, GA)); states.add(new com.ubspw.cdd.common.LabelValueBean(HI, HI)); states.add(new com.ubspw.cdd.common.LabelValueBean(IA, IA)); states.add(new com.ubspw.cdd.common.LabelValueBean(ID, ID)); states.add(new com.ubspw.cdd.common.LabelValueBean(IL, IL)); states.add(new com.ubspw.cdd.common.LabelValueBean(IN, IN)); states.add(new com.ubspw.cdd.common.LabelValueBean(KS, KS)); states.add(new com.ubspw.cdd.common.LabelValueBean(KY, KY)); states.add(new com.ubspw.cdd.common.LabelValueBean(LA, LA)); states.add(new com.ubspw.cdd.common.LabelValueBean(MA, MA)); states.add(new com.ubspw.cdd.common.LabelValueBean(MD, MD)); states.add(new com.ubspw.cdd.common.LabelValueBean(ME, ME)); states.add(new com.ubspw.cdd.common.LabelValueBean(MI, MI)); states.add(new com.ubspw.cdd.common.LabelValueBean(MN, MN)); states.add(new com.ubspw.cdd.common.LabelValueBean(MO, MO)); states.add(new com.ubspw.cdd.common.LabelValueBean(MS, MS)); states.add(new com.ubspw.cdd.common.LabelValueBean(MT, MT)); states.add(new com.ubspw.cdd.common.LabelValueBean(NC, NC));
RE: How to configure multiple Message Resources in Struts 1.0
Or you could just take the 1.0 version and customize the source to do what you want. That's one of the perks with having the source code ;) Hava a good one!! James Mitchell Software Engineer\Struts Evangelist Struts-Atlanta, the Open Minded Developer Network http://www.open-tools.org/struts-atlanta -Original Message- From: Karim Saloojee [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 26, 2002 5:59 AM To: [EMAIL PROTECTED] Subject: How to configure multiple Message Resources in Struts 1.0 Hi Is it possible to setup another message resources file in Struts 1.0? I need this because I want to display errors in a different way for a certain part of the application. Basically I do not want the Validation errors: Please correct the ff... heading. Since this is displayed automatically, the only way to get around this issues is use another message resources properties (at least that what it looks like to me). Now how do I setup another message resources and how to I go about accessing it in my form bean? Thanks in advance, Karim -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: all this traffic
- One reason why there are a lot of questions is that documentation is lacking. What I wanted to suggest was one method of collecting answers in a cheap fashion. Hell no! The main reason why there are a lot of questions is because people expect their breakfast to be spoonfed to them. If people would just spend 15 minutes researching their question/issue before sending out that how do I type 'a' with a keyboard type of a question, the traffic would be much less. Usually mailing list operators solve this problem by separating mailing lists to a newbie list and a list for more experienced users. struts-user-beginner struts-user -TPP -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: all this traffic
+1 James Mitchell Software Engineer\Struts Evangelist Struts-Atlanta, the Open Minded Developer Network http://www.open-tools.org/struts-atlanta -Original Message- From: Tero P Paananen [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 26, 2002 10:14 AM To: Struts Users Mailing List Subject: RE: all this traffic - One reason why there are a lot of questions is that documentation is lacking. What I wanted to suggest was one method of collecting answers in a cheap fashion. Hell no! The main reason why there are a lot of questions is because people expect their breakfast to be spoonfed to them. If people would just spend 15 minutes researching their question/issue before sending out that how do I type 'a' with a keyboard type of a question, the traffic would be much less. Usually mailing list operators solve this problem by separating mailing lists to a newbie list and a list for more experienced users. struts-user-beginner struts-user -TPP -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: all this traffic
Usually mailing list operators solve this problem by separating mailing lists to a newbie list and a list for more experienced users. struts-user-beginner struts-user Which was one thing he originally suggested... =p /me Doesn't care so much, I simply don't have enough time to read all this stuff, I usually scroll by to see what catches my eye, otherwise I select all and delete. :) -Chris -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Distinct case in validate() with a form used in several page
I'd like to use an actionFormBean with a few JSP form page. But I'll have to treat different cases in the validate of my actionFormBean... So in validate(), I was thinking about looking at the name of the input JSP with ActionMapping.getInput() ( or perhaps the name of the current action to choose the right case, /w getType() ). Is it an acceptable way to do that? I coulds also use an property of the formBean perhaps... Thanks -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Distinct case in validate() with a form used in several page
Couldn't you create your actionFormBean and then create sub-classes for each different type of validation? Might give you a cleaner solution. Jim From: Vincent Berruchon [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: Distinct case in validate() with a form used in several page Date: Thu, 26 Sep 2002 16:35:06 +0200 I'd like to use an actionFormBean with a few JSP form page. But I'll have to treat different cases in the validate of my actionFormBean... So in validate(), I was thinking about looking at the name of the input JSP with ActionMapping.getInput() ( or perhaps the name of the current action to choose the right case, /w getType() ). Is it an acceptable way to do that? I coulds also use an property of the formBean perhaps... Thanks -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] Jim Young Northern Objects Inc. 905 781-7019 _ Join the worlds largest e-mail service with MSN Hotmail. http://www.hotmail.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
ActionForm
Hi, i have a Form (ActionForm) in wich i have a list that is feeded from my database. When i validate with the validate method in the ActionForm and an error is found, i cannot see the form again because it tells me that my bean (that contain the list) is not found... I use struts 1.1b2, is the validator a solution for my problem? Is there any other way of doing such a thing? Thanks, Nicolas -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Need Help Fast
Ive done this, everyone is overcomplicating it greatly... Lookup.getData() gets an ArrayList of states. This array list is loaded through an XML file that loads upon boot and puts it in a static variable. This XML file can load it from itself or from the database. It does all the .add() .add() .add() etc. This should NOT be done in a jsp tag. Done once and pulled from static method like below. Nice and simple. Here's the JSP code. % pageContext.setAttribute(allUnitedStates, Lookup.getData(Constant.GLOBAL.UNITED_STATES)); % bean:message key=prompt.state/ html:select property=state size=1 html:option value=/html:option html:options name=allUnitedStates labelName=allUnitedStates/ /html:select - Original Message - From: Hajratwala, Nayan (N.) [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Sent: Thursday, September 26, 2002 9:41 AM Subject: RE: Need Help Fast Essentially, he is saying you can rewrite your doStartTag method to be something like: private List _states = null; public int doStartTag() throws JspException { if (_states == null) { _states = new java.util.ArrayList(); _states.add(new com.ubspw.cdd.common.LabelValueBean(-Select One-, )); _states.add(new com.ubspw.cdd.common.LabelValueBean(AK,AK)); _states.add(new com.ubspw.cdd.common.LabelValueBean(AL,AL)); _states.add(new com.ubspw.cdd.common.LabelValueBean(AR,AR)); ... ... } pageContext.setAttribute(selectStates, _states); return (EVAL_BODY_INCLUDE); } this way, states will only be set up the first time doStartTag is called. --- - Nayan Hajratwala - Chikli Consulting LLC - http://www.chikli.com -Original Message- From: Smith, Johnathan M. [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 26, 2002 9:14 AM To: 'Struts Users Mailing List' Cc: '[EMAIL PROTECTED]' Subject: RE: Need Help Fast Can you please send me a sample of a better way -Original Message- From: Ville Peurala [mailto: Sent: Thursday, September 26, 2002 8:26 AM To: Struts Users Mailing List Subject: RE: Need Help Fast Hello, One possible solution: Put the ArrayList in application context and put a check in doStartTag()'s beginning to determine whether the list of states can be found in application context. Instead of: pageContext.setAttribute(selectStates, states); Put it like this: pageContext.setAttribute(selectStates, states, PageContext.APPLICATION_SCOPE); And in the beginning of doStartTag(): Object o = pageContext.getAttribute(selectStates, PageContext.APPLICATION_SCOPE); if (o == null) { ...do what your current code does... } else { ...do nothing... } But why do this in a tag at all? If your list of states never changes, you might as well initialize it in an init() method somewhere. T: Ville Peurala -Original Message- From: Smith, Johnathan M. [mailto:[EMAIL PROTECTED]] Sent: 26. syyskuuta 2002 15:13 To: 'Struts Users Mailing List' Subject: Need Help Fast This is not really a struts question but I am using struts a maybe someone can help. I system has allot of state dropdown's so I I made a tag for the programmers to insert into the JSP pages. The Tag builds a ArrayList with the states in it and then saves the states as a attribute in the pageContext. But I don't know if this is the best way to do it. Is it anyway to tell this code only to run one time and then stay in member? Below is my sample code: Please help me out public int doStartTag() throws JspException { java.util.ArrayList states = new java.util.ArrayList(); states.add(new com.ubspw.cdd.common.LabelValueBean(-Select One-, )); states.add(new com.ubspw.cdd.common.LabelValueBean(AK, AK)); states.add(new com.ubspw.cdd.common.LabelValueBean(AL, AL)); states.add(new com.ubspw.cdd.common.LabelValueBean(AR, AR)); states.add(new com.ubspw.cdd.common.LabelValueBean(AZ, AZ)); states.add(new com.ubspw.cdd.common.LabelValueBean(CA, CA)); states.add(new com.ubspw.cdd.common.LabelValueBean(CO, CO)); states.add(new com.ubspw.cdd.common.LabelValueBean(CT, CT)); states.add(new com.ubspw.cdd.common.LabelValueBean(DC, DC)); states.add(new com.ubspw.cdd.common.LabelValueBean(DE, DE)); states.add(new com.ubspw.cdd.common.LabelValueBean(FL, FL)); states.add(new com.ubspw.cdd.common.LabelValueBean(GA, GA)); states.add(new com.ubspw.cdd.common.LabelValueBean(HI, HI)); states.add(new com.ubspw.cdd.common.LabelValueBean(IA, IA)); states.add(new com.ubspw.cdd.common.LabelValueBean(ID, ID)); states.add(new com.ubspw.cdd.common.LabelValueBean(IL, IL)); states.add(new com.ubspw.cdd.common.LabelValueBean(IN, IN)); states.add(new com.ubspw.cdd.common.LabelValueBean(KS, KS)); states.add(new com.ubspw.cdd.common.LabelValueBean(KY, KY)); states.add(new com.ubspw.cdd.common.LabelValueBean(LA, LA)); states.add(new com.ubspw.cdd.common.LabelValueBean(MA, MA)); states.add(new
DTD
I'm new to this list, so forgive me if this question has been posted recently. Yesterday my Struts application stopped working. I finally traced the problem to the following line in struts-config.xml: !DOCTYPE struts-config PUBLIC -//Apache Software Foundation//DTD Struts Configuration 1.1//EN http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd; Apparantly the Apache domain was unavailable for awhile on the web and this caused the parser to hang. (I was surprised not to see any mention of this anywhere. I would have thought that Struts apps all around the world would have stopped working.) To fix the problem I placed a copy of struts-config_1_0.dtd in the same directory as struts-config.xml and changed the reference to: !DOCTYPE struts-config SYSTEM struts-config_1_0.dtd When I start the application, I get a parser error stating that it can't find the resource in the directory that the VM (i.e. Weblogic) was started from. According to the XML spec, the SYSTEM specifier should tell the parser to look for the resource in a path relative to struts-config.xml, in this case - the same directory. Anyone have any insight into this? Thanks, -Jeff Jeff Lowe Software Architect CELT Corporation 199 Forest St. Marlboro, MA 01752 508-624-4474 x1237 [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Unit testing a struts application
Also for unit testing actions out-of-container, take a look at StrutsTestCase : http://strutstestcase.sourceforge.net/. One approach that is also commendable for unit testing - regardless of servlet framework used - is to keep as much code as possible out of container-dependent objects. For instance, if you can have a Struts Action class delegate work to a regular java object with non-container parameters passed, rather than doing that work in the action itself, than the code that does the work can be more easily tested with vanilla Junit. For in-container testing, which we have used a lot for acceptance tests as opposed to unit tests, Cactus as recommended by Jim comes up a lot. We use HttpUnit: http://httpunit.sourceforge.net/. We also ended up wrapping HttpUnit with a somewhat simpler API that is on sourceforge as well: http://jwebunit.sourceforge.net/. Jim Weaver Software Developer - ThoughtWorks Jim Young northernobjects@hTo: [EMAIL PROTECTED] otmail.com cc: Subject: Re: Unit testing a struts application 09/26/2002 06:28 AM Please respond to Struts Users Mailing List Cactus works great with Struts. Just go to there web page http://jakarta.apache.org/cactus/index.html and check out the documentation examples. Join their user list, check the archives and if you still have questions ask the Cactus user group. You will also need to know all about JUnit - http://junit.org/index.htm Jim From: Daniel H. F. e Silva [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Unit testing a struts application Date: Thu, 26 Sep 2002 06:14:13 -0700 (PDT) Hi all, I am searching for possible improvements on my development process. One of greatest things i've found is XP. I liked it very much. One of XP rules is about unit testing. So follows my question : How can i unit test a struts app? I heard about Cactus (another Jakarta project). Does someone here have experience using it? All kind of use cases would be a plus. Best regards, Daniel. __ Do you Yahoo!? New DSL Internet Access from SBC Yahoo! http://sbc.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] Jim Young Northern Objects Inc. 905 781-7019 _ 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: Distinct case in validate() with a form used in several page
I use the DynaValidatorActionForm and identify the validation routines in the validation.xml by the action mapping and it works quite nicely. Is this an acceptible way? It works well for me. This is essentially what you would be doing except you will have some logic in the form which determines which routines get called. robert -Original Message- From: Vincent Berruchon [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 26, 2002 10:35 AM To: Struts Users Mailing List Subject: Distinct case in validate() with a form used in several page I'd like to use an actionFormBean with a few JSP form page. But I'll have to treat different cases in the validate of my actionFormBean... So in validate(), I was thinking about looking at the name of the input JSP with ActionMapping.getInput() ( or perhaps the name of the current action to choose the right case, /w getType() ). Is it an acceptable way to do that? I coulds also use an property of the formBean perhaps... 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: ActionForm
I just ran into a similar problem where I have a set up action which populates the form (in request scope) and forwards to the .jsp page. When validation failed, I had my input attribute set to the .jsp page and was getting the behavior your described. I changed the input attribute to be the action mapping of the set up action and the problem went away. If you think about it, it makes sense. The set up action stores the list/options data in the request scope. Once the page is render, then its gone. If you try to access the page directly without going through the set up action, then the form never gets populated with the data. By setting the input attribute to the set up action action mapping, the data is retrieved and populated and therefore can be rendered to the screen. robert -Original Message- From: Desjardins, Nicolas [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 26, 2002 10:42 AM To: 'Struts Users Mailing List' Subject: ActionForm Hi, i have a Form (ActionForm) in wich i have a list that is feeded from my database. When i validate with the validate method in the ActionForm and an error is found, i cannot see the form again because it tells me that my bean (that contain the list) is not found... I use struts 1.1b2, is the validator a solution for my problem? Is there any other way of doing such a thing? Thanks, Nicolas -- 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]
Problem viewing web from outside company -- UnknownHostException
Hello all. I have a struts-driven web working under Tomcat 4.0.4, Struts 1.0. All is well from within my company on any given machine but when I access the web from outside the company I get an java.net.UnknownHostException error. The problem seems to be in a struts forward command. This forward command resolves, in the struts config file, to a call to my servlet, which consults the database, and sends me on to a jsp page. If I use a jsp include tag to a simple jsp page, it works. But when I make a struts include, like the following: bean:include forward=Home_News id=homeNews / ... that's when it fails. Home_News resolves to a servlet call, like the following: forward name=Home_News path=/NavigateGetNews?action=searchamp;entity=news redirect=false/ ... I get a java.net.UnknownHostException error: javax.servlet.ServletException: Exception opening resource http://adsl.mubimedia.com:8080/do/NavigateGetNews?action=searchentity=news: java.net.UnknownHostException: adsl.mubimedia.com Does this ring a bell for anyone? This address, http://adsl.mubimedia.com is unreachable from within the company which seems to be the problem . It seems to be trying to make the call to the servlet with the WHOLE address, when it should be making it relative to the application, right? Anyway, I am baffled. Why is it when you include a normal .jsp page it doesn't ALSO try to load it from adsl.mubimedia.com? It's got me swinging ... Much help appreciated, Bob [EMAIL PROTECTED] all. I have a struts-driven web working under Tomcat 4.0.4, Struts 1.0. All is well from within my company on any given machine but when I access the web from outside the company I get an java.net.UnknownHostException error. The problem seems to be in a struts forward command. This forward command resolves, in the struts config file, to a call to my servlet, which consults the database, and sends me on to a jsp page. If I use a jsp include tag to a simple jsp page, it works. But when I make a struts include, like the following: bean:include forward=Home_News id=homeNews / ... that's when it fails. Home_News resolves to a servlet call, like the following: forward name=Home_News path=/NavigateGetNews?action=searchamp;entity=news redirect=false/ ... I get a java.net.UnknownHostException error: javax.servlet.ServletException: Exception opening resource http://adsl.mubimedia.com:8080/do/NavigateGetNews?action=searchentity=news: java.net.UnknownHostException: adsl.mubimedia.com Does this ring a bell for anyone? This address, http://adsl.mubimedia.com is unreachable from within the company which seems to be the problem . It seems to be trying to make the call to the servlet with the WHOLE address, when it should be making it relative to the application, right? Anyway, I am baffled. Why is it when you include a normal .jsp page it doesn't ALSO try to load it from adsl.mubimedia.com? It's got me swinging ... Much help appreciated, Bob [EMAIL PROTECTED] Ferran Parra Departament de Noves Tecnologies MUBIMEDIA S.L. -- [EMAIL PROTECTED] Mallorca, 20 275, 1r 2a 08008 BARCELONA T. (+34) 93 215 21 91 F. (+34) 93 215 41 21
RE: Unit testing a struts application
I totally agree with this approach. Here is how I abstract Struts away from http: http://www.mail-archive.com/struts-user@jakarta.apache.org/msg40143.html This way, I can test as close to the protocol as possible, allowing me to remove the protocol-specific issues. Then if a bug comes up, I can determine if its in the JSP/field bindings/HTML, the action logic, or the business tier using my various tests to quickly narrow down the issue. You can then supplement with in-container testing as desired. James -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 26, 2002 9:47 AM To: Struts Users Mailing List Subject: Re: Unit testing a struts application Also for unit testing actions out-of-container, take a look at StrutsTestCase : http://strutstestcase.sourceforge.net/. One approach that is also commendable for unit testing - regardless of servlet framework used - is to keep as much code as possible out of container-dependent objects. For instance, if you can have a Struts Action class delegate work to a regular java object with non-container parameters passed, rather than doing that work in the action itself, than the code that does the work can be more easily tested with vanilla Junit. For in-container testing, which we have used a lot for acceptance tests as opposed to unit tests, Cactus as recommended by Jim comes up a lot. We use HttpUnit: http://httpunit.sourceforge.net/. We also ended up wrapping HttpUnit with a somewhat simpler API that is on sourceforge as well: http://jwebunit.sourceforge.net/. Jim Weaver Software Developer - ThoughtWorks Jim Young northernobjects@hTo: [EMAIL PROTECTED] otmail.com cc: Subject: Re: Unit testing a struts application 09/26/2002 06:28 AM Please respond to Struts Users Mailing List Cactus works great with Struts. Just go to there web page http://jakarta.apache.org/cactus/index.html and check out the documentation examples. Join their user list, check the archives and if you still have questions ask the Cactus user group. You will also need to know all about JUnit - http://junit.org/index.htm Jim From: Daniel H. F. e Silva [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Unit testing a struts application Date: Thu, 26 Sep 2002 06:14:13 -0700 (PDT) Hi all, I am searching for possible improvements on my development process. One of greatest things i've found is XP. I liked it very much. One of XP rules is about unit testing. So follows my question : How can i unit test a struts app? I heard about Cactus (another Jakarta project). Does someone here have experience using it? All kind of use cases would be a plus. Best regards, Daniel. __ Do you Yahoo!? New DSL Internet Access from SBC Yahoo! http://sbc.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] Jim Young Northern Objects Inc. 905 781-7019 _ 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:struts-user- [EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL
[OT][WORKFLOW] Any best practice for back, save, continue buttons?
I'm thinking about a design where I maintain a URL stack in a session variable that stores where a user has been, so that clicking a back button (not the browser's) will take a user to the right place. It would work like this: Click a Continue button - Push a new URL onto the stack, and take the user to that page Click a Save button - Leave the stack alone, and return the user to the same page Click a Back button - Pop a URL from the stack and take the user to the URL on the top of the stack. Click a Done button - Clear the stack. This would happen when you click a link on a top nav bar or the finish button in a wizard, for example. These would be the basic types of navigation. The actual labels on the buttons or links could be whatever you want. For example, you could have a Continue button labeled Save that takes the user to another page. Has anyone tried something like this with good or bad results? Thanks, Dan -- To unsubscribe, e-mail: For additional commands, e-mail: tsdok
Re: Scheduled Jobs
Personally, I'd use cron. If you're not on a Un*x box then that's not an option - I would think Windoze would provide something analagous though ... The process cron kicks off could be any executable file, so you aren't even tied to doing it in Java. For my $0.02, you could probably whip together a simple Perl script that did what you needed, and save some overhead. gus wrote: Hi! In my struts app I have to do some cleanup jobs in my database that I like to start regularly. What's the best way to realize such schedules jobs in a struts app? Thanks in advance. gus -- Eddie Bush -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Strut application with support for portal like behavior
Use Tiles, along with Strutsthen you can have Portal like behaviour for your application. -Original Message- From: Anil Kumar [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 24, 2002 7:50 AM To: [EMAIL PROTECTED] Subject: Strut application with support for portal like behavior I am trying to use Strut application framework. I need a portal like behavior in my application I want to know whether the Strut application framework have a support for Portal - or can it be use to support portal like behavior ie ; Here is the brief description of my problem :- - I have a main page having data from 3 different .jsps(ie these jsps are included in the main jsp page) - - If I click on the submit button on one of the jsp page - I want to move to the next screen on that jsp - while preserving the other 2 jsps data - as we get the behaviour in Portal. I tried using ActionMapping.findforward() I just get the data from the new forwarded page and 2 old jsp pages data is overridden I tried using ActionMapping.setInclude(...) - but still the same behaviour - need some help in this regard -Anil === _ Send and receive Hotmail on your mobile device: http://mobile.msn.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] tsdok -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: [OT][WORKFLOW] Any best practice for back, save, continue buttons?
Yeah, I used it in a login handler that I wrote for struts, where: If (not logged in) (push requested url on stack in session) ) login.jsp form hidden value = requestStack.first It's detailed in Java E-Commerce from Wrox publishing | -Original Message- | From: Dan Cancro [mailto:[EMAIL PROTECTED]] | Sent: Monday, September 23, 2002 8:43 PM | To: '[EMAIL PROTECTED]' | Subject: [OT][WORKFLOW] Any best practice for back, save, continue | buttons? | | I'm thinking about a design where I maintain a URL stack in a session | variable that stores where a user has been, so that clicking a back | button | (not the browser's) will take a user to the right place. It would work | like | this: | | Click a Continue button - Push a new URL onto the stack, and take the | user to that page | Click a Save button - Leave the stack alone, and return the user to | the same page | Click a Back button - Pop a URL from the stack and take the user to | the URL on the top of the stack. | Click a Done button - Clear the stack. This would happen when you | click a link on a top nav bar or the finish button in a wizard, for | example. | | These would be the basic types of navigation. The actual labels on the | buttons or links could be whatever you want. For example, you could have | a | Continue button labeled Save that takes the user to another page. | | Has anyone tried something like this with good or bad results? | | Thanks, | Dan | | -- | To unsubscribe, e-mail: mailto:struts-user- | [EMAIL PROTECTED] | For additional commands, e-mail: mailto:struts-user- | [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] tsdok -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: [OT][WORKFLOW] Any best practice for back, save, continue buttons?
Im using something a little more complex that is a bit similar. I store some information into a uniquely identified object in the session , this includes the ActionForm the user is currently editing a url to resume editing this, then I forward to another page where the user can edit something else (perhaps a detail record). The user can repeat this process to stack to any number of levels. When an operation is complete the user is returned to the form they were previously editing (the actionForm having been preserved in the session) to continue editing it in the state is was before they diverted. (Incidentally, using the browsers back button in such a case results in a rather bad case of server state confusion!) -Original Message- From: Jacob Hookom [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 24, 2002 14:56 To: 'Struts Users Mailing List' Subject: RE: [OT][WORKFLOW] Any best practice for back, save, continue buttons? Yeah, I used it in a login handler that I wrote for struts, where: If (not logged in) (push requested url on stack in session) ) login.jsp form hidden value = requestStack.first It's detailed in Java E-Commerce from Wrox publishing | -Original Message- | From: Dan Cancro [mailto:[EMAIL PROTECTED]] | Sent: Monday, September 23, 2002 8:43 PM | To: '[EMAIL PROTECTED]' | Subject: [OT][WORKFLOW] Any best practice for back, save, continue | buttons? | | I'm thinking about a design where I maintain a URL stack in a session | variable that stores where a user has been, so that clicking a back | button | (not the browser's) will take a user to the right place. It would work | like | this: | | Click a Continue button - Push a new URL onto the stack, and take the | user to that page | Click a Save button - Leave the stack alone, and return the user to | the same page | Click a Back button - Pop a URL from the stack and take the user to | the URL on the top of the stack. | Click a Done button - Clear the stack. This would happen when you | click a link on a top nav bar or the finish button in a wizard, for | example. | | These would be the basic types of navigation. The actual labels on the | buttons or links could be whatever you want. For example, you could have | a | Continue button labeled Save that takes the user to another page. | | Has anyone tried something like this with good or bad results? | | Thanks, | Dan | | -- | To unsubscribe, e-mail: mailto:struts-user- | [EMAIL PROTECTED] | For additional commands, e-mail: mailto:struts-user- | [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] tsdok -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: [OT][WORKFLOW] Any best practice for back, save, continue buttons?
Dan, I did something in the past related to this, before Struts was available (I think). It required new instances of an action to be created for each jump with return, which cluttered the session but enabled these actions to store state about the process. Anyway, the one thing I learned, no matter what approach I take, is that the state of where the user is - be it the page, step, next step, where you came from, etc. should be in the form as a hidden field (i.e. dealt with in request scope) whenever possible. This allows the server to always stay in sync with the user, no matter if they use the back button or open a new browser window and start a new wizard, since the previous form has its wizard state, such as its current page, in the HTML and not on the server side where it can get out of sync. Stacks on the server side are painful and never work, but lists with an index to the current location in the wizard that are always sent to the action in the request (via a hidden variable in the form) work best. HTH, James -Original Message- From: Dan Cancro [mailto:[EMAIL PROTECTED]] Sent: Monday, September 23, 2002 8:43 PM To: '[EMAIL PROTECTED]' Subject: [OT][WORKFLOW] Any best practice for back, save, continue buttons? I'm thinking about a design where I maintain a URL stack in a session variable that stores where a user has been, so that clicking a back button (not the browser's) will take a user to the right place. It would work like this: Click a Continue button - Push a new URL onto the stack, and take the user to that page Click a Save button - Leave the stack alone, and return the user to the same page Click a Back button - Pop a URL from the stack and take the user to the URL on the top of the stack. Click a Done button - Clear the stack. This would happen when you click a link on a top nav bar or the finish button in a wizard, for example. These would be the basic types of navigation. The actual labels on the buttons or links could be whatever you want. For example, you could have a Continue button labeled Save that takes the user to another page. Has anyone tried something like this with good or bad results? Thanks, Dan -- To unsubscribe, e-mail: mailto:struts-user- [EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] tsdok -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: How to configure multiple Message Resources in Struts 1.0
Yep I could customise the source to make pizza as well ; ) What I want to know is can the source make pizza currently and how do I configure multiple flavours of pizza? Substitute pizza with message resource bundles. TIA - Original Message - From: James Mitchell [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Thursday, September 26, 2002 3:55 PM Subject: RE: How to configure multiple Message Resources in Struts 1.0 Or you could just take the 1.0 version and customize the source to do what you want. That's one of the perks with having the source code ;) Hava a good one!! James Mitchell Software Engineer\Struts Evangelist Struts-Atlanta, the Open Minded Developer Network http://www.open-tools.org/struts-atlanta -Original Message- From: Karim Saloojee [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 26, 2002 5:59 AM To: [EMAIL PROTECTED] Subject: How to configure multiple Message Resources in Struts 1.0 Hi Is it possible to setup another message resources file in Struts 1.0? I need this because I want to display errors in a different way for a certain part of the application. Basically I do not want the Validation errors: Please correct the ff... heading. Since this is displayed automatically, the only way to get around this issues is use another message resources properties (at least that what it looks like to me). Now how do I setup another message resources and how to I go about accessing it in my form bean? Thanks in advance, Karim -- 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: Scheduled Jobs
On the windoze side, you can use Scheduled Tasks. From there just point to a .bat file and you are free to do anything your little heart desires. James Mitchell Software Engineer\Struts Evangelist Struts-Atlanta, the Open Minded Developer Network http://www.open-tools.org/struts-atlanta -Original Message- From: Eddie Bush [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 26, 2002 11:25 AM To: Struts Users Mailing List Subject: Re: Scheduled Jobs Personally, I'd use cron. If you're not on a Un*x box then that's not an option - I would think Windoze would provide something analagous though ... The process cron kicks off could be any executable file, so you aren't even tied to doing it in Java. For my $0.02, you could probably whip together a simple Perl script that did what you needed, and save some overhead. gus wrote: Hi! In my struts app I have to do some cleanup jobs in my database that I like to start regularly. What's the best way to realize such schedules jobs in a struts app? Thanks in advance. gus -- Eddie Bush -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
[OT][WORKFLOW] Any best practice for back, save, continue buttons?
I'm thinking about a design where I maintain a URL stack in a session variable that stores where a user has been, so that clicking a back button (not the browser's) will take a user to the right place. It would work like this: Click a Continue button - Push a new URL onto the stack, and take the user to that page Click a Save button - Leave the stack alone, and return the user to the same page Click a Back button - Pop a URL from the stack and take the user to the URL on the top of the stack. Click a Done button - Clear the stack. This would happen when you click a link on a top nav bar or the finish button in a wizard, for example. These would be the basic types of navigation. The actual labels on the buttons or links could be whatever you want. For example, you could have a Continue button labeled Save that takes the user to another page. Has anyone tried something like this with good or bad results? Thanks, Dan -- To unsubscribe, e-mail: For additional commands, e-mail: tsdok -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Strut application with support for portal like behavior
Use Tiles, along with Strutsthen you can have Portal like behaviour for your application. -Original Message- From: Anil Kumar [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 24, 2002 7:50 AM To: [EMAIL PROTECTED] Subject: Strut application with support for portal like behavior I am trying to use Strut application framework. I need a portal like behavior in my application I want to know whether the Strut application framework have a support for Portal - or can it be use to support portal like behavior ie ; Here is the brief description of my problem :- - I have a main page having data from 3 different .jsps(ie these jsps are included in the main jsp page) - - If I click on the submit button on one of the jsp page - I want to move to the next screen on that jsp - while preserving the other 2 jsps data - as we get the behaviour in Portal. I tried using ActionMapping.findforward() I just get the data from the new forwarded page and 2 old jsp pages data is overridden I tried using ActionMapping.setInclude(...) - but still the same behaviour - need some help in this regard -Anil === _ Send and receive Hotmail on your mobile device: http://mobile.msn.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] tsdok -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: [OT][WORKFLOW] Any best practice for back, save, continue buttons?
Yeah, I used it in a login handler that I wrote for struts, where: If (not logged in) (push requested url on stack in session) ) login.jsp form hidden value = requestStack.first It's detailed in Java E-Commerce from Wrox publishing | -Original Message- | From: Dan Cancro [mailto:[EMAIL PROTECTED]] | Sent: Monday, September 23, 2002 8:43 PM | To: '[EMAIL PROTECTED]' | Subject: [OT][WORKFLOW] Any best practice for back, save, continue | buttons? | | I'm thinking about a design where I maintain a URL stack in a session | variable that stores where a user has been, so that clicking a back | button | (not the browser's) will take a user to the right place. It would work | like | this: | | Click a Continue button - Push a new URL onto the stack, and take the | user to that page | Click a Save button - Leave the stack alone, and return the user to | the same page | Click a Back button - Pop a URL from the stack and take the user to | the URL on the top of the stack. | Click a Done button - Clear the stack. This would happen when you | click a link on a top nav bar or the finish button in a wizard, for | example. | | These would be the basic types of navigation. The actual labels on the | buttons or links could be whatever you want. For example, you could have | a | Continue button labeled Save that takes the user to another page. | | Has anyone tried something like this with good or bad results? | | Thanks, | Dan | | -- | To unsubscribe, e-mail: mailto:struts-user- | [EMAIL PROTECTED] | For additional commands, e-mail: mailto:struts-user- | [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] tsdok -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: [OT][WORKFLOW] Any best practice for back, save, continue buttons?
Im using something a little more complex that is a bit similar. I store some information into a uniquely identified object in the session , this includes the ActionForm the user is currently editing a url to resume editing this, then I forward to another page where the user can edit something else (perhaps a detail record). The user can repeat this process to stack to any number of levels. When an operation is complete the user is returned to the form they were previously editing (the actionForm having been preserved in the session) to continue editing it in the state is was before they diverted. (Incidentally, using the browsers back button in such a case results in a rather bad case of server state confusion!) -Original Message- From: Jacob Hookom [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 24, 2002 14:56 To: 'Struts Users Mailing List' Subject: RE: [OT][WORKFLOW] Any best practice for back, save, continue buttons? Yeah, I used it in a login handler that I wrote for struts, where: If (not logged in) (push requested url on stack in session) ) login.jsp form hidden value = requestStack.first It's detailed in Java E-Commerce from Wrox publishing | -Original Message- | From: Dan Cancro [mailto:[EMAIL PROTECTED]] | Sent: Monday, September 23, 2002 8:43 PM | To: '[EMAIL PROTECTED]' | Subject: [OT][WORKFLOW] Any best practice for back, save, continue | buttons? | | I'm thinking about a design where I maintain a URL stack in a session | variable that stores where a user has been, so that clicking a back | button | (not the browser's) will take a user to the right place. It would work | like | this: | | Click a Continue button - Push a new URL onto the stack, and take the | user to that page | Click a Save button - Leave the stack alone, and return the user to | the same page | Click a Back button - Pop a URL from the stack and take the user to | the URL on the top of the stack. | Click a Done button - Clear the stack. This would happen when you | click a link on a top nav bar or the finish button in a wizard, for | example. | | These would be the basic types of navigation. The actual labels on the | buttons or links could be whatever you want. For example, you could have | a | Continue button labeled Save that takes the user to another page. | | Has anyone tried something like this with good or bad results? | | Thanks, | Dan | | -- | To unsubscribe, e-mail: mailto:struts-user- | [EMAIL PROTECTED] | For additional commands, e-mail: mailto:struts-user- | [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] tsdok -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: [OT][WORKFLOW] Any best practice for back, save, continue buttons?
Dan, I did something in the past related to this, before Struts was available (I think). It required new instances of an action to be created for each jump with return, which cluttered the session but enabled these actions to store state about the process. Anyway, the one thing I learned, no matter what approach I take, is that the state of where the user is - be it the page, step, next step, where you came from, etc. should be in the form as a hidden field (i.e. dealt with in request scope) whenever possible. This allows the server to always stay in sync with the user, no matter if they use the back button or open a new browser window and start a new wizard, since the previous form has its wizard state, such as its current page, in the HTML and not on the server side where it can get out of sync. Stacks on the server side are painful and never work, but lists with an index to the current location in the wizard that are always sent to the action in the request (via a hidden variable in the form) work best. HTH, James -Original Message- From: Dan Cancro [mailto:[EMAIL PROTECTED]] Sent: Monday, September 23, 2002 8:43 PM To: '[EMAIL PROTECTED]' Subject: [OT][WORKFLOW] Any best practice for back, save, continue buttons? I'm thinking about a design where I maintain a URL stack in a session variable that stores where a user has been, so that clicking a back button (not the browser's) will take a user to the right place. It would work like this: Click a Continue button - Push a new URL onto the stack, and take the user to that page Click a Save button - Leave the stack alone, and return the user to the same page Click a Back button - Pop a URL from the stack and take the user to the URL on the top of the stack. Click a Done button - Clear the stack. This would happen when you click a link on a top nav bar or the finish button in a wizard, for example. These would be the basic types of navigation. The actual labels on the buttons or links could be whatever you want. For example, you could have a Continue button labeled Save that takes the user to another page. Has anyone tried something like this with good or bad results? Thanks, Dan -- To unsubscribe, e-mail: mailto:struts-user- [EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] tsdok -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
using tiles and j_security_check
Hello, I am using tomcat's realm authentication to protect my struts 1.1 app. The actual form is constructed using tiles. This works fine for the most part but occasionaly I will submit the login form and get stuck at a blank page with a url of http:/mysite/j_security_check Usually I have to retry it a few times and then it will work. Has anyone seen this behavior? Should I feed tiles a plain html and not use tiles for that? I am also looking to see if this could be some kind of session problem. Of course the first time this problem showed up was when I was demoing my struts app in front of the suits. argh! -- Vincent Stoessel Linux Systems Developer vincent xaymaca.com smime.p7s Description: S/MIME Cryptographic Signature
Re: Startup Problem
check the package name form-beans form-bean name=loginForm type=com..login.LoginForm/ /form-beans [EMAIL PROTECTED] 09/26/02 12:13 PM Hi All, Here i'm facing serious problem.. I already configured test application in Struts. But when I configure my original Application i face serious problem.. I got an error like No action instance for path /login could be created The server encountered an internal error (No action instance for path /login could be created) that prevented it from fulfilling this request. I gave my code here struts-config.xml ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE struts-config PUBLIC -//Apache Software Foundation//DTD Struts Configuration 1.0//EN http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd; struts-config form-beans form-bean name=loginForm type=com..login.LoginForm/ /form-beans global-forwards forward name=error path=/login.jsp/ /global-forwards action-mappings actionpath=/login type=com.login.LoginAction name=loginForm scope=request input=/login.jsp forward name=success path=/home.jsp/ /action /action-mappings /struts-config web.xml - ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.2//EN http://java.sun.com/j2ee/dtds/web-app_2_2.dtd; web-app !-- Action Servlet Configuration -- servlet servlet-nameaction/servlet-name servlet-classorg.apache.struts.action.ActionServlet/servlet-class init-param param-nameapplication/param-name param-valuecom.openwave.careertracks.ApplicationResources/param-value /init-param init-param param-nameconfig/param-name param-value/WEB-INF/struts-config.xml/param-value /init-param init-param param-namedebug/param-name param-value2/param-value /init-param init-param param-namedetail/param-name param-value2/param-value /init-param init-param param-namevalidate/param-name param-valuetrue/param-value /init-param load-on-startup1/load-on-startup /servlet !-- Action Servlet Mapping -- servlet-mapping servlet-nameaction/servlet-name url-pattern*.do/url-pattern /servlet-mapping !-- The Welcome File List -- welcome-file-list welcome-filelogin.jsp/welcome-file /welcome-file-list !-- Application Tag Library Descriptor -- taglib taglib-uri/WEB-INF/app.tld/taglib-uri taglib-location/WEB-INF/app.tld/taglib-location /taglib !-- Struts Tag Library Descriptors -- taglib taglib-uri/WEB-INF/struts-bean.tld/taglib-uri taglib-location/WEB-INF/struts-bean.tld/taglib-location /taglib taglib taglib-uri/WEB-INF/struts-html.tld/taglib-uri taglib-location/WEB-INF/struts-html.tld/taglib-location /taglib taglib taglib-uri/WEB-INF/struts-logic.tld/taglib-uri taglib-location/WEB-INF/struts-logic.tld/taglib-location /taglib /web-app login.jsp --- %@ taglib uri='/WEB-INF/struts-template.tld' prefix='template' % template:insert template='/logintemplate.jsp' template:put name='title' content='Strus' direct='true'/ template:put name='header' content='/header.htm' / template:put name='content' content='/login.htm'/ template:put name='footer' content='/footer.htm' / /template:insert login.html form table align=center cellpadding=0 cellspacing=0 td class=text11bold***Username:**input class=inbox type=text name=userName value= size=15/td /tr tr/tr tr td class=text11bold***Password:**input class=inbox type=password name=password size=15 a href=login.doimg src=images/login_button.gif border=0/a/td/table /form Please help where i made a mistake.. Thanx in Advance -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: using tiles and j_security_check
Vincent Stoessel wrote: Hello, I am using tomcat's realm authentication to protect my struts 1.1 app. The actual form is constructed using tiles. This works fine for the most part but occasionaly I will submit the login form and get stuck at a blank page with a url of http:/mysite/j_security_check Odd - can't imagine what it could be. I would be inclined to say it's a server issue, but I have nothing to substantiate that. Having j_security_check appear in the address bar indicates to me that things are processing right. What is your server setup? Did you demo under a different setup than you developed under? Usually I have to retry it a few times and then it will work. Has anyone seen this behavior? Should I feed tiles a plain html and not use tiles for that? I am also looking to see if this could be some kind of session problem. Of course the first time this problem showed up was when I was demoing my struts app in front of the suits. argh! D'oh! That ... sucks :-O -- Eddie Bush -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Startup Problem
I wouldn't hazard a guess, personally. When the app is loaded and initializes it should spit out a stack trace (this is obviously a mistake in your config file). Find that trace and you'll find your problem. Kalaiselvan wrote: Hi All, Here i'm facing serious problem.. I already configured test application in Struts. But when I configure my original Application i face serious problem.. I got an error like No action instance for path /login could be created The server encountered an internal error (No action instance for path /login could be created) that prevented it from fulfilling this request. -- Eddie Bush -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: multiple sub projects
What about situations where a common .jsp file is used as a target for forward by multiple sub-applications? action path=/bar type=com.trams.struts.BarAction name=barForm scope=request forward name=success path=../success.jsp / forward name=reload path=/bar.jsp / /action In this case, I have a sub-app called foo and the url to hit the above action is /myApp/foo/bar.do. A .jsp exists in the root of the context called myApp/success.jsp for when there's a successful bar action. Now, the forward actually constructs a success mapping of /myApp/foo/../success.jsp which works, but doesn't smell right. Maybe what we need is a new attribute in the forward / tag in addition to path called contextPath so a forward could look like this: forward name=success contextPath=/success.jsp / forward name=reload path=/bar.jsp / If added, one could even go as far as to express this: forward name=success contextPath=/success.jsp / forward name=reload contextPath=/foo/bar.jsp / Anthony Welcome to \Itchy and Scratchy Land\, where nothing could possibleye go wrong ... hmm ... that's the first thing that's ever gone wrong. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: [OT] Disabling jsessionid parameter in Struts forms
We use resin and according to http://www.caucho.com/resin/ref/app-config.xtp#session-config you can indepently turn off either cookie sessions or url-sessions. I'm not 100% sure what effect this will have but it sounds like it might solve your problem. Gemes Tibor [EMAIL PROTECTED] 09/26/02 02:11AM 2002. szeptember 26. 11:59 dátummal Ori Tend ezt írtad: Thanks for the reply! I'm not sure I understand.. if I use in my JSP the standard form tag I dont get this jsessionid parameter when browsing to the page. Is there a way to use struts' html:form tag and not get this jsessionid? If you use FORM based auth and disable cookies and don't use the EncodeURL() you have to reauthenticate yourself for every request. I can see the jsessionid appended only on the first page after the login page if I have cookies enabled. I suspect that the jsessionid is added to the url by calling EncodeURL() at the struts taglib. I know that this may introduce problems to cookie-disabled visitors, but I don't want the jsessionid to appear. Create a filter which processes the output and cut off from jsessionid to the first ; in each page for each occurence of jsessionid. If you insist. Why does it bother you? Tib
RE: DTD
Hi Jeff: It appears you have a mismatch of identifier (1.1) with DTD (1.0) in your !DOCTYPE tag. Change your identifier to 1.0 to be consistent with the DTD URL and then your app should work whether the struts site is up or not. (Assuming your app is a Struts 1.0 app) The ActionServlet will use the DTD in the struts.jar if it recognizes the identifier. That's what we've been doing with Struts 1.1 successfully on a server with no web access. Good luck, Steve -Original Message- From: Lowe, Jeff [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 26, 2002 7:49 AM To: 'Struts Users Mailing List' Subject: DTD I'm new to this list, so forgive me if this question has been posted recently. Yesterday my Struts application stopped working. I finally traced the problem to the following line in struts-config.xml: !DOCTYPE struts-config PUBLIC -//Apache Software Foundation//DTD Struts Configuration 1.1//EN http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd; Apparantly the Apache domain was unavailable for awhile on the web and this caused the parser to hang. (I was surprised not to see any mention of this anywhere. I would have thought that Struts apps all around the world would have stopped working.) To fix the problem I placed a copy of struts-config_1_0.dtd in the same directory as struts-config.xml and changed the reference to: !DOCTYPE struts-config SYSTEM struts-config_1_0.dtd When I start the application, I get a parser error stating that it can't find the resource in the directory that the VM (i.e. Weblogic) was started from. According to the XML spec, the SYSTEM specifier should tell the parser to look for the resource in a path relative to struts-config.xml, in this case - the same directory. Anyone have any insight into this? Thanks, -Jeff Jeff Lowe Software Architect CELT Corporation 199 Forest St. Marlboro, MA 01752 508-624-4474 x1237 [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: multiple sub projects
try forward name=blah contextRelative=true path=/random.jsp -Original Message- From: Anthony Martin [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 26, 2002 9:50 AM To: Struts User List (E-mail) Subject: Re: multiple sub projects What about situations where a common .jsp file is used as a target for forward by multiple sub-applications? action path=/bar type=com.trams.struts.BarAction name=barForm scope=request forward name=success path=../success.jsp / forward name=reload path=/bar.jsp / /action In this case, I have a sub-app called foo and the url to hit the above action is /myApp/foo/bar.do. A .jsp exists in the root of the context called myApp/success.jsp for when there's a successful bar action. Now, the forward actually constructs a success mapping of /myApp/foo/../success.jsp which works, but doesn't smell right. Maybe what we need is a new attribute in the forward / tag in addition to path called contextPath so a forward could look like this: forward name=success contextPath=/success.jsp / forward name=reload path=/bar.jsp / If added, one could even go as far as to express this: forward name=success contextPath=/success.jsp / forward name=reload contextPath=/foo/bar.jsp / Anthony Welcome to \Itchy and Scratchy Land\, where nothing could possibleye go wrong ... hmm ... that's the first thing that's ever gone wrong. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Startup Problem
LOOK AT YOUR CONSOLE!! -Original Message- From: Kalaiselvan [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 26, 2002 6:32 AM To: Struts Users Mailing List Subject: Startup Problem Hi All, Here i'm facing serious problem.. I already configured test application in Struts. But when I configure my original Application i face serious problem.. I got an error like No action instance for path /login could be created The server encountered an internal error (No action instance for path /login could be created) that prevented it from fulfilling this request. I gave my code here struts-config.xml ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE struts-config PUBLIC -//Apache Software Foundation//DTD Struts Configuration 1.0//EN http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd; struts-config form-beans form-bean name=loginForm type=com..login.LoginForm/ /form-beans global-forwards forward name=error path=/login.jsp/ /global-forwards action-mappings actionpath=/login type=com.login.LoginAction name=loginForm scope=request input=/login.jsp forward name=success path=/home.jsp/ /action /action-mappings /struts-config web.xml - ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.2//EN http://java.sun.com/j2ee/dtds/web-app_2_2.dtd; web-app !-- Action Servlet Configuration -- servlet servlet-nameaction/servlet-name servlet-classorg.apache.struts.action.ActionServlet/servlet-class init-param param-nameapplication/param-name param-valuecom.openwave.careertracks.ApplicationResources/param-value /init-param init-param param-nameconfig/param-name param-value/WEB-INF/struts-config.xml/param-value /init-param init-param param-namedebug/param-name param-value2/param-value /init-param init-param param-namedetail/param-name param-value2/param-value /init-param init-param param-namevalidate/param-name param-valuetrue/param-value /init-param load-on-startup1/load-on-startup /servlet !-- Action Servlet Mapping -- servlet-mapping servlet-nameaction/servlet-name url-pattern*.do/url-pattern /servlet-mapping !-- The Welcome File List -- welcome-file-list welcome-filelogin.jsp/welcome-file /welcome-file-list !-- Application Tag Library Descriptor -- taglib taglib-uri/WEB-INF/app.tld/taglib-uri taglib-location/WEB-INF/app.tld/taglib-location /taglib !-- Struts Tag Library Descriptors -- taglib taglib-uri/WEB-INF/struts-bean.tld/taglib-uri taglib-location/WEB-INF/struts-bean.tld/taglib-location /taglib taglib taglib-uri/WEB-INF/struts-html.tld/taglib-uri taglib-location/WEB-INF/struts-html.tld/taglib-location /taglib taglib taglib-uri/WEB-INF/struts-logic.tld/taglib-uri taglib-location/WEB-INF/struts-logic.tld/taglib-location /taglib /web-app login.jsp --- %@ taglib uri='/WEB-INF/struts-template.tld' prefix='template' % template:insert template='/logintemplate.jsp' template:put name='title' content='Strus' direct='true'/ template:put name='header' content='/header.htm' / template:put name='content' content='/login.htm'/ template:put name='footer' content='/footer.htm' / /template:insert login.html form table align=center cellpadding=0 cellspacing=0 td class=text11boldnbsp;nbsp;nbsp;Username:nbsp;nbsp;input class=inbox type=text name=userName value= size=15/td /tr tr/tr tr td class=text11boldnbsp;nbsp;nbsp;Password:nbsp;nbsp;input class=inbox type=password name=password size=15 a href=login.doimg src=images/login_button.gif border=0/a/td/table /form Please help where i made a mistake.. Thanx in Advance
Re: multiple sub projects
I believe what you're trying to do is covered by the contextRelative attribute of the forward. Have you tried setting 'contextRelative=true' on a forward? What it does is tell Struts Interpret this as though it's relative to the APPLICATION context (not module context). I know this works for global forwards, and I believe it would also work for a local one. Note that by specifying contextRelative=true you must provide a path which is, in fact, relative to the application and not the module :-) Anthony Martin wrote: What about situations where a common .jsp file is used as a target for forward by multiple sub-applications? -- Eddie Bush -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Startup Problem
I see that the package name for your LoginForm has .. in it form-bean name=loginForm type=com..login.LoginForm/ [EMAIL PROTECTED] 09/26/02 13:13 PM Hi All, Here i'm facing serious problem.. I already configured test application in Struts. But when I configure my original Application i face serious problem.. I got an error like No action instance for path /login could be created The server encountered an internal error (No action instance for path /login could be created) that prevented it from fulfilling this request. I gave my code here struts-config.xml ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE struts-config PUBLIC -//Apache Software Foundation//DTD Struts Configuration 1.0//EN http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd; struts-config form-beans form-bean name=loginForm type=com..login.LoginForm/ /form-beans global-forwards forward name=error path=/login.jsp/ /global-forwards action-mappings actionpath=/login type=com.login.LoginAction name=loginForm scope=request input=/login.jsp forward name=success path=/home.jsp/ /action /action-mappings /struts-config web.xml - ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.2//EN http://java.sun.com/j2ee/dtds/web-app_2_2.dtd; web-app !-- Action Servlet Configuration -- servlet servlet-nameaction/servlet-name servlet-classorg.apache.struts.action.ActionServlet/servlet-class init-param param-nameapplication/param-name param-valuecom.openwave.careertracks.ApplicationResources/param-value /init-param init-param param-nameconfig/param-name param-value/WEB-INF/struts-config.xml/param-value /init-param init-param param-namedebug/param-name param-value2/param-value /init-param init-param param-namedetail/param-name param-value2/param-value /init-param init-param param-namevalidate/param-name param-valuetrue/param-value /init-param load-on-startup1/load-on-startup /servlet !-- Action Servlet Mapping -- servlet-mapping servlet-nameaction/servlet-name url-pattern*.do/url-pattern /servlet-mapping !-- The Welcome File List -- welcome-file-list welcome-filelogin.jsp/welcome-file /welcome-file-list !-- Application Tag Library Descriptor -- taglib taglib-uri/WEB-INF/app.tld/taglib-uri taglib-location/WEB-INF/app.tld/taglib-location /taglib !-- Struts Tag Library Descriptors -- taglib taglib-uri/WEB-INF/struts-bean.tld/taglib-uri taglib-location/WEB-INF/struts-bean.tld/taglib-location /taglib taglib taglib-uri/WEB-INF/struts-html.tld/taglib-uri taglib-location/WEB-INF/struts-html.tld/taglib-location /taglib taglib taglib-uri/WEB-INF/struts-logic.tld/taglib-uri taglib-location/WEB-INF/struts-logic.tld/taglib-location /taglib /web-app login.jsp --- %@ taglib uri='/WEB-INF/struts-template.tld' prefix='template' % template:insert template='/logintemplate.jsp' template:put name='title' content='Strus' direct='true'/ template:put name='header' content='/header.htm' / template:put name='content' content='/login.htm'/ template:put name='footer' content='/footer.htm' / /template:insert login.html form table align=center cellpadding=0 cellspacing=0 td class=text11bold***Username:**input class=inbox type=text name=userName value= size=15/td /tr tr/tr tr td class=text11bold***Password:**input class=inbox type=password name=password size=15 a href=login.doimg src=images/login_button.gif border=0/a/td/table /form Please help where i made a mistake.. Thanx in Advance -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: multiple sub projects
Pardon me if this questions seems a bit daft, but what does using multiple sub-applications buy you other than splitting the app. into logical chunks, each with its own config file? -Original Message- From: Eddie Bush [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 26, 2002 10:23 AM To: Struts Users Mailing List Subject: Re: multiple sub projects I believe what you're trying to do is covered by the contextRelative attribute of the forward. Have you tried setting 'contextRelative=true' on a forward? What it does is tell Struts Interpret this as though it's relative to the APPLICATION context (not module context). I know this works for global forwards, and I believe it would also work for a local one. Note that by specifying contextRelative=true you must provide a path which is, in fact, relative to the application and not the module :-) Anthony Martin wrote: What about situations where a common .jsp file is used as a target for forward by multiple sub-applications? -- Eddie Bush -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
[OT] Bad case of the hiccups?
I'm getting multiple copies of some messages. I know they're the same message because of the timestamp. Is anyone else experiencing this? I'm guessing this is a continuation of the problems we had yesterday ... -- Eddie Bush -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Logout in a container-managed security environment -- Follow-up
All: I made the original post in this thread, and thanks to the replies I received, was able to implement FORM-based CMA in my application. As you can see in the message below, I was left with one residual problem: Although FORM-based CMA worked fine in a standalone Tomcat environment, when I switched to an integrated Apache-Tomcat environment, I got a 404 not-found error from Apache for j_security_check; in other words, Apache never passed this request through to Tomcat. Again thanks to several replies I received, I've been able to resolve this problem. Eddie Bush, in particular, was helpful and asked me to post the solution on this list when I found it. So here goes. Bear in mind that, in the example below, ebps is the name of my application domain. The solution involved modifying Tomcat's mod_jk.conf file. The original set of mappings in mod_jk.conf for my application context was: JkMount /ebps/servlet/* ajp13 JkMount /ebps/*.jsp ajp13 JkMount /ebps/ ajp13 JkMount /ebps/*.do ajp13 On spec, I tried adding various mappings that assigned j_security_check to the ajp13 worker. The mapping that worked is: JkMount /ebps/* ajp13 .which in effect maps ALL requests to the ajp13 worker. I've done some light testing, and there do not seem to be any adverse side effects to including this mapping, but I do have to caution everyone that I haven't yet done through testing. -Original Message- From: Charles McClain [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 25, 2002 8:18 AM To: 'Struts Users Mailing List' Subject: RE: Logout in a container-managed security environment -- Follow-up All: Just to close the loop: The 404 not-found error I was receiving was coming from the Apache webserver; when I switched to using the Tomcat servlet container standalone, FORM-based authentication -- set up as per the advice of those of you who replied -- worked properly. I *thought* that I had Apache configured to pass everything through to Tomcat, but obviously, I have something wrong in my Apache configuration. I'll take a look at that in the near future. Thanks again, -- Charlie -Original Message- From: Charles McClain [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 24, 2002 7:10 PM To: Struts User Mailing List Subject: Logout in a container-managed security environment -- Follow-up All: I received several replies to my original question, all of which indicated that, in order to do a forceful logout, I needed to use FORM-based CMA rather than BASIC. One of the replies recommended an article on the topic, which I downloaded and read. I implemented FORM-based authentication, making the changes to my web.xml, indicating the login form and error page, etc. The container (Tomcat 4.0) seems to know that I want FORM-based authentication, since it pops up my login page. I did, by the way, include the fields j_username and j_password, and my form action is j_security_check, as per the instructions. However, when I press the submit button, my browser gives me a 404 not-found error on the (nonexistent, of course) page j_security_check. I've checked the Apache and Tomcat logs, and one of the Tomcat logs tells me that it has Configured an authenticator for method FORM, but it still seems to be looking for a page by that name rather than invoking the method. Anyone have any ideas? Charles McClain Phone: 603.659.2046 email:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
cancel and session-scope form
Hi there, How can I prevent a cancel button from populating the form bean? Normally this isn't a problem, except that my form bean is in session-scope (for an wizard-like implementation). I've considered reconfiguring it so that the form stays in request-scope for each page in the wizard. I would then instantiate the form in session-scope myself and manage the copying of form fields from each page manually depending on if the user submitted or cancelled. But I was hoping for a simpler solution. thanks, Angie -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: multiple sub projects
That's a very good question. Personally, I see added overhead (necessity for multiple instances of certain things to be loaded) in the current implementation. The positive side is that I can configure each module with it's own look and feel - and tell which one I am in. You're right though, the biggest thing is that you can multi-task the development better because of having a configuration file for each module. That was the primary goal, I believe. They did a good job of accomplishing that. I *really like* the sub-app idea, but I think that it needs to be taken further. Having the default sub-app act as a global sub-app (which the others could share the config of) would, I believe, be ideal. Yes, you can get away from duplicate effort by having your build concatenate property files and the like, but, unless I miss my guess, you're necessitating the instantiation of unnecessary objects --- one of which could be a pretty big thing: data-source. I don't personally use the Struts-configured data-source, so it's not an issue to me, but, by partitioning into sub-apps you would have to define a data-source for each module that needed data access. Unfortunately, as I see it, doing this blows all kinds of holes in pool management strategies. How do you possibly configure the pool so that you're not asking for connections you don't have enough licenses to cover, for example? If for only pieces of the configuration, I believe the next logical step is to evolve the default sub-app into a global sub-app, which would get checked for config objects, absent those same objects in the current module. Yes, I'm talking about module inheritence. I wouldn't think it would be that difficult do implement -- the current module's config is placed in request scope, and the default sub-app's config is placed in application scope. You'd just have to refactor things to check one - then the other - before deciding things didn't exist. Joe Barefoot wrote: Pardon me if this questions seems a bit daft, but what does using multiple sub-applications buy you other than splitting the app. into logical chunks, each with its own config file? -- Eddie Bush -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: [OT] Bad case of the hiccups?
+1 -Original Message- From: Eddie Bush [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 26, 2002 1:33 PM To: Struts Users List Subject: [OT] Bad case of the hiccups? I'm getting multiple copies of some messages. I know they're the same message because of the timestamp. Is anyone else experiencing this? I'm guessing this is a continuation of the problems we had yesterday ... -- Eddie Bush -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: multiple sub projects
My interest in multiple sub-apps is more related to maintenence and post-launch life cycle issues. Modular development is nice, but to me fine-grained control of override behavior for every aspect of the deployed application is crucial-- that way I can add functionality or upgrade any feature of an application without touching any of the original version's code/media/configuration, while keeping it all in one deployment unit. This makes it possible to more organically migrate (or rollback) from one version to another. It also reduces the amount of duplicated code/JSPs/media/etc drastically when closely similar versions can share things. -Original Message- From: Joe Barefoot [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 26, 2002 10:20 AM To: Struts Users Mailing List Subject: RE: multiple sub projects Pardon me if this questions seems a bit daft, but what does using multiple sub-applications buy you other than splitting the app. into logical chunks, each with its own config file? -Original Message- From: Eddie Bush [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 26, 2002 10:23 AM To: Struts Users Mailing List Subject: Re: multiple sub projects I believe what you're trying to do is covered by the contextRelative attribute of the forward. Have you tried setting 'contextRelative=true' on a forward? What it does is tell Struts Interpret this as though it's relative to the APPLICATION context (not module context). I know this works for global forwards, and I believe it would also work for a local one. Note that by specifying contextRelative=true you must provide a path which is, in fact, relative to the application and not the module :-) Anthony Martin wrote: What about situations where a common .jsp file is used as a target for forward by multiple sub-applications? -- Eddie Bush -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
bean:write formatKey doesn't work with Strings?
I have been looking into the formatKey option of the bean:write tag. I have format.creditlimit=$###,###,##0.00 in my property file. My jsp has the following: bean:write name=responseBean property=creditLimit formatKey=format.creditlimit/ I am trying to work only with strings between by controller and view, so I originally had the getCreditLimit() method return a String. This did not work, the string was not formatted in the resulting html. ex. 006500 However, when I changed getCreditLimit to return an int, then the formatting was applied. ex. $6,500 I understand why bean:write formatter would expect a number. Is there a way to still use Strings in your getters and setters of your form beans when you want to use the format features of bean:write? Felicia Morycz EDS Solutions Consulting phone: +01-614-823-4720 mailto:[EMAIL PROTECTED] www.eds.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: multiple sub projects
Thanks for the evaluation. I'm going to have to politely disagree with your assessment that you can multi-task the development better because of having a configuration file for each module. Unless you're in an environment without source control, I don't buy the argument that maintaining multiple config files is easier than just one. We were doing exactly this at my last gig, by using an Ant task to push our multiple config files into a single struts-config.xml, and, quite frankly, it was just a pain in the ass. I'd rather just use logical divisions within a single config file to group actions that belong together. That way I only have to have one config file open if I'm making spot changes in different parts of the application, and I also don't have to worry about which sub-app I'm in or transfering to a different sub-app, regarding the URLs in my JSPs. Judging from the traffic on the list, using multiple sub-apps. creates more confusion than it does clarity, which is what I believe was its original intent. Of course, if it works for you and your team, that's all that matters. :) peace, Joe -Original Message- From: Eddie Bush [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 26, 2002 10:48 AM To: Struts Users Mailing List Subject: Re: multiple sub projects That's a very good question. Personally, I see added overhead (necessity for multiple instances of certain things to be loaded) in the current implementation. The positive side is that I can configure each module with it's own look and feel - and tell which one I am in. You're right though, the biggest thing is that you can multi-task the development better because of having a configuration file for each module. That was the primary goal, I believe. They did a good job of accomplishing that. I *really like* the sub-app idea, but I think that it needs to be taken further. Having the default sub-app act as a global sub-app (which the others could share the config of) would, I believe, be ideal. Yes, you can get away from duplicate effort by having your build concatenate property files and the like, but, unless I miss my guess, you're necessitating the instantiation of unnecessary objects --- one of which could be a pretty big thing: data-source. I don't personally use the Struts-configured data-source, so it's not an issue to me, but, by partitioning into sub-apps you would have to define a data-source for each module that needed data access. Unfortunately, as I see it, doing this blows all kinds of holes in pool management strategies. How do you possibly configure the pool so that you're not asking for connections you don't have enough licenses to cover, for example? If for only pieces of the configuration, I believe the next logical step is to evolve the default sub-app into a global sub-app, which would get checked for config objects, absent those same objects in the current module. Yes, I'm talking about module inheritence. I wouldn't think it would be that difficult do implement -- the current module's config is placed in request scope, and the default sub-app's config is placed in application scope. You'd just have to refactor things to check one - then the other - before deciding things didn't exist. Joe Barefoot wrote: Pardon me if this questions seems a bit daft, but what does using multiple sub-applications buy you other than splitting the app. into logical chunks, each with its own config file? -- Eddie Bush -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: [OT] Bad case of the hiccups?
a BIG YES ! I thought it must be my ISP but obviously not Regards, Michael - Original Message - From: Eddie Bush [EMAIL PROTECTED] To: Struts Users List [EMAIL PROTECTED] Sent: Thursday, September 26, 2002 7:32 PM Subject: [OT] Bad case of the hiccups? I'm getting multiple copies of some messages. I know they're the same message because of the timestamp. Is anyone else experiencing this? I'm guessing this is a continuation of the problems we had yesterday ... -- Eddie Bush -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Please help with iteration problem
I am trying to nest iterate tags. I've tried logic:iterate nested:iterate and c:forEach without success. Here's what I want to do. logic:iterate name=routes id=route type=RouteBean write stuff about the route. logic:iterate name=route property=segments id=segment type=SegmentBean write stuff about the segment /logic:iterate /logic:iterate routes points to a java.util.List of RouteBeans. Each RouteBean has a method, getSegments() that returns a java.util.List of SegmentBeans. I've looked at the documents and examples for the nested tag, but I don't see anything about this type of nesting. I don't have a monkey with a single bunch of bananas, instead I simply have a java.util.List of bunches, each of which has a java.util.List of bananas. I'd really appreciate any help ya'll can give me. I'm up for using any tag type (struts-logic, struts-nested, or JSTL). I'd just rather not fall back on scriptlets if I can help it. Thanks, Michael Bowman -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Storing a bean in my FormBean
My FormBean has a property that is a custom type (com.mycompany.myclass). I have added this property to my form definition in struts-config. My ActionClass does a request.setAttribute("beanname",instanceOfmyclass);. Back on my jsp, it is really easy to bean:write from my instanceOfclass. The question is, how can I then put instanceOfmyclass back into my FormBean as a property so subsequent calls to the ActionClass can access it? Thanks alot, Glen Roberts -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
options
I have a bean called dataImportBean in my session. It has a property called labelTypes which is an ArrayList, and it has some LabelValueBean objects. I want to put each of the LabelValueBeans in a html:options, but all I tried failed. Can any help me with this ? Thanks Jeff -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]