Tomcat3.3 Struts1.0 = Segmentation violation ?
Hello, I've got a struts 1.0 application on a tomcat 3.3, but I've got a FATAL ERROR when I trying to access an action. The form associed to this action is stocked in session and contain about 20 fields. The application crash on Tomcat 3.3 / Solaris 8 W2K. The application work fine on Tomcat 3.2 / Solaris 8 W2K Here the Solaris 8 error message: EmbededTomcat: Startup time 41 2002-02-04 17:30:26 - SessionIdGenerator: Created random class java.security.SecureRandom 2002-02-04 17:30:41 - DecodeInterceptor: Charset from session ISO-8859-1 2002-02-04 17:30:44 - DecodeInterceptor: Charset from session ISO-8859-1 SIGSEGV 11 segmentation violation si_signo [11]: SEGV si_errno [0]: si_code [1]: SEGV_MAPERR [addr: 0x19de000] stackpointer=F910EF58 SeedGenerator Thread (TID:0xd03d58, sys_thread_t:0xd03c90, state:CW, thread_t: t@31, threadID:0xf8d81d78, stack_bottom:0xf8d82000, stack_size:0x2) prio=1 [1] java.lang.Object.wait(Object.java:424) Thanks Emmanuel - Yahoo! Mail -- Une adresse @yahoo.fr gratuite et en français !
changing regexp in default validation
Hi struts users. I'm posting a question on struts validator. Well, as you all know, the struts validator implements an email validation which is defined in the org.apache...StrutsValidator validateEmail() method. (Sorry if the names are not 100% equals to the original ones). Anyway this method uses a jakarta regexp string to validate the email. So now let's suppose i want to change that validation string, as it considers not valid some email addresses which are valid for me. i.e: [EMAIL PROTECTED] I have the validation strings who considers the above email as valid but i cannot figure out where it must be inserted in the validator.xml file to, tell the validateEmail() method to use it insted of the default one. Can someone help me ? Thanx everyone. Ivan. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Tomcat3.3 Struts1.0 = Segmentation violation ?
Here another error message under Tomcat 3.3 / Struts 1.0. Location: /basepat/saisiefiche2.jspErreur interne de servlet:java.lang.VerifyError: (class: saisiefiche2_1, method: _jspService signature: (Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V) Illegal target of jump or branch at java.lang.Class.newInstance0(Native Method) at java.lang.Class.newInstance(Class.java:237) at org.apache.tomcat.facade.ServletHandler.getServlet(Unknown Source) at org.apache.tomcat.facade.ServletHandler.preInit(Unknown Source) at org.apache.tomcat.facade.ServletHandler.init(Unknown Source) at org.apache.tomcat.facade.ServletHandler.service(Unknown Source) at org.apache.tomcat.facade.RequestDispatcherImpl.doForward(Unknown Source) at org.apache.tomcat.facade.RequestDispatcherImpl.forward(Unknown Source) at org.apache.struts.action.ActionServlet.processValidate(ActionServlet.java:2149) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1564) at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:491) at javax.servlet.http.HttpServlet.service(HttpServlet.java) at javax.servlet.http.HttpServlet.service(HttpServlet.java) at org.apache.tomcat.facade.ServletHandler.doService(Unknown Source)at org.apache.tomcat.core.Handler.invoke(Unknown Source)at org.apache.tomcat.core.Handler.service(Unknown Source) at org.apache.tomcat.facade.ServletHandler.service(Unknown Source) at org.apache.tomcat.core.ContextManager.internalService(Unknown Source)at org.apache.tomcat.core.ContextManager.service(Unknown Source)at org.apache.tomcat.modules.server.Http10Interceptor.processConnection(Unknown Source) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(Unknown Source) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(Unknown Source) at java.lang.Thread.run(Thread.java:484) --- emmanuel.boudrant a écrit : Hello, I've got a struts 1.0 application on a tomcat 3.3, but I've got a FATAL ERROR when I trying to access an action. The form associed to this action is stocked in session and contain about 20 fields. The application crash on Tomcat 3.3 / Solaris 8 W2K. The application work fine on Tomcat 3.2 / Solaris 8 W2K Here the Solaris 8 error message: EmbededTomcat: Startup time 41 2002-02-04 17:30:26 - SessionIdGenerator: Created random class java.security.SecureRandom 2002-02-04 17:30:41 - DecodeInterceptor: Charset from session ISO-8859-1 2002-02-04 17:30:44 - DecodeInterceptor: Charset from session ISO-8859-1 SIGSEGV 11 segmentation violation si_signo [11]: SEGV si_errno [0]: si_code [1]: SEGV_MAPERR [addr: 0x19de000] stackpointer=F910EF58 SeedGenerator Thread (TID:0xd03d58, sys_thread_t:0xd03c90, state:CW, thread_t: t@31, threadID:0xf8d81d78, stack_bottom:0xf8d82000, stack_size:0x2) prio=1 [1] java.lang.Object.wait(Object.java:424) Thanks Emmanuel- Yahoo! Mail -- Une adresse @yahoo.fr gratuite et en français ! - Yahoo! Mail -- Une adresse @yahoo.fr gratuite et en français !
Re: Tiles Vs Templates
If you use only features from Template, then use only Templates. If you use some Tiles advanced features, then use Tiles. Generally, if you have a very large project with many pages, use Tiles. Tiles allow to build pages by assembling small pieces (Tiles). Usually, you use a layout (or template) to build pages. With Tiles, and its definition concept, you can build all your pages in a centralized xml pages. Furthermore, you avoid repeated work by using an inheritance mechanism. Also, you can use a definition name as the target of a Struts forward. The definition file can be split in several sub-file There are others interesting features in Tiles that you will discover if you play a bit with Tiles. Cedric Sriram Nookala wrote: I'm trying to get some information in order to make a choice between struts templates and Tiles for our UI design and templating. Where would you choose one over the other, and what does Tiles offer you that Templates doesn't? thanks, sriram -- 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]
AW: [Off Topic] get/set method generation
eclipse from ibm does it too!!! -Ursprüngliche Nachricht- Von: Sey, Francois [mailto:[EMAIL PROTECTED]] Gesendet: Freitag, 1. Februar 2002 16:22 An: 'Struts Users Mailing List' Betreff: RE: [Off Topic] get/set method generation OptimalJ does that too. http://javacentral.compuware.com/ Francois -Original Message- From: João Paulo G. Batistella [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 31, 2002 6:57 PM To: Struts Users Mailing List Subject: [Off Topic] get/set method generation Anyboy knows a tool for generating get/set methods from a list of attributes?? An example: I have private String name; private int number; And I would like to generate: public String getName(); public void setName( String name ) ; public int getNumber(); public void setNumber( number ); Thanks -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Thread Safety Question (was Formatting Dates, Integers...)
Do you know what the problem was that made your use of format objects non-thread safe? -Original Message- From: Jeff Martin [mailto:[EMAIL PROTECTED]] Sent: Monday, February 04, 2002 5:56 PM To: Struts Users Mailing List Subject: RE: Formatting Dates, Integers... Be very careful about using DateFormatter's that way. I learned a hard lesson in a previous project that DateFormater (and even just the format method) is not thread safe. Jeff __ Do You Yahoo!? Send FREE Valentine eCards with Yahoo! Greetings! http://greetings.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
AW: Struts/Tiles and nightly build features
Hi, what do you mean with custom renderers that serve up different views depending on the browser type? Do you have an example? By the way. For what do I need the input-parameter? Many Thanks! -Ursprüngliche Nachricht- Von: Sean Willson [mailto:[EMAIL PROTECTED]] Gesendet: Donnerstag, 31. Januar 2002 16:50 An: Struts Users Betreff: Struts/Tiles and nightly build features Hello All, Had a question about the latest nightly and some changes/functionality that was removed or missing. I am currently using Tiles and Struts (build from 11/9/2001) to manage the View portion of our website. We have custom renderers that serve up different views depending on the browser type you are coming in with. Anyhow, in our struts config file we often use the action input=some.tile.property.here ... /action In the old releases this worked fine, but in the latest release it appears that the action servlet that Tiles uses isn't answering the calls to the getInput() command called on mapping any longer, the ActionConfig is now. Is this feature gone or are they planning on returning it? Basically, I guess I just want to know if the Tiles template will continue to be integrated into struts as deeply as it was in the past. I am also trying to get a feel for if I have to modify the code myself, which we have yet to do, or if I can rely on the standard builds. Thanks for the help everyone ... Sean P.S. Hopefully when we release, which should be soon, I can give a more detailed look at what we did and what we may be able to contribute back to struts or jakarta. -- 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]
AW: ResultSet and ListObject - List Screens
WHERE do I find that taglib? Thanks! -Ursprungliche Nachricht- Von: Matt Raible [mailto:[EMAIL PROTECTED]] Gesendet: Donnerstag, 31. Januar 2002 22:21 An: [EMAIL PROTECTED] Betreff: ResultSet and ListObject - List Screens I am looking to (hopefully) use Ed Hill's Display Tag Library to do sorting, alternate colored rows, and pagination of my list screens. Other alternatives I've seen are HTMLTables and JSTL's forEach tag. What I'm wondering is if there are any utilities that anyone knows of to copy a ResultSet into a ListObject (I've seen Ed's tag use them, as well as the Nested Tag). Even better, I'd love to use Simper in association with one of these. Thanks, Matt Links to above references: Display Tag: http://edhill.its.uiowa.edu/display-examples/ HTMLTable Tag: http://english.yuriy-zubarev.com/index.jsp JSTL Iterator Tag: http://jakarta.apache.org/taglibs/doc/standard-doc/standard-ea3/IteratorTag_ FunctionalDescription_2_EAI.html Simper: http://netmeme.org/simper/ __ Do You Yahoo!? Great stuff seeking new owners in Yahoo! Auctions! http://auctions.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: How to put useBean data in HTML attribute?
You can also use the paramId and paramName attributes : logic:iterate name=users property=userList id=currentUser html:link href=admin_userForm.jsp paramId=user_id paramName=currentUser bean:write name='currentUser'/ /html:link br /logic:iterate HTH olivier - Original Message - From: Richard Yee [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Tuesday, February 05, 2002 7:30 AM Subject: Re: How to put useBean data in HTML attribute? Cody, You can't nest tags - you can't have one tag inside the 's of another tag. To do what you want, try this: logic:iterate name=myBean property=userList id=currentUser % String ref = admin_userForm.jsp?user_id= + currentUser; % html:link href=%= ref %%= currentUser %/html:linkbr /logic:iterate -Richard logic:iterate name=users property=userList id=currentUser html:link href=admin_userForm.jsp?user_id=%= currentUser %%= currentUser %/html:linkbr /logic:iterate At 11:37 PM 2/4/2002 -0600, you wrote: Could someone please shed some light on the following? What would be the solution for an attempt like this? Consider this code snippet that has an obviously incorrect syntax: logic:iterate name=users property=userList id=currentUser html:link href=admin_userForm.jsp?user_id=bean:write name='currentUser'/bean:write name='currentUser'//html:linkbr /logic:iterate I am trying to set a URL paramer with bean data (admin_userForm.jsp?user_id =bean:write name='currentUser'/), but because it is inside of an HTML attribute, it is not working. I end up with an uninterpereted param value of user_id=bean:write name='currentUser'/. I know it's just a syntax issue. I can think of a better way to do it, but not without introducing java code into the page. What is the more elegant Struts-centric way to do this? - Cody The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer. -- 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: RE: [Fwd: Re: Hi....]]
I think he means that you should avoid as much as possible writing code (of any sort : tags, scriptlets, etc...) in your JSPs, and rather put this code in your Action classes / business logic classes - Original Message - From: Jay Sissom [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Tuesday, February 05, 2002 12:29 AM Subject: Re: RE: [Fwd: Re: Hi]] I don't agree. If you need to use scriptlets in your JSPs and you use them over and over on many pages, the scriptlet should be a tag. The tag can be reused on many pages, the scriptlet can't. Please explain why This is a bad habit. Only do it if you must. Should we only re-use code if we must? Is re-use of code a bad habit. :) Jay - Original Message - From: Vic Cekvenich [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, January 30, 2002 2:48 PM Subject: [Fwd: RE: [Fwd: Re: Hi]] The thing on tags is do not use to many tags. Try to avoid writing tags. Somehow, the example app on struts has a custom tag and people like to learn how to write tags, and so there are lots of tags in Struts. This is a bad habit. Only do it if you must. Try to do as little code as possible in presentation/view/jsp. So to me, tags and Struts framework are 2 different things, but bellow is a good book anyway. Vic Original Message Subject: RE: [Fwd: Re: Hi] Date: Wed, 30 Jan 2002 18:49:35 +0100 From: Lacerda, Wellington (AFIS) [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] Organization: Basebeans.com To: 'Struts Users Mailing List' [EMAIL PROTECTED] Newsgroups: Struts Another book with a lot of information on Struts is JSP and Tag Libraries for Web Development, available at Amazon and BN. Check the publisher's page at: http://www.newriders.com/books/title.cfm?isbn=0735710953. It is heavily focused on Tag Libraries and Struts is discussed on the light of that. Wellington -Original Message- From: Vic Cekvenich [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 30, 2002 6:39 PM To: [EMAIL PROTECTED] Subject: [Fwd: Re: Hi] Newsgroups: Struts @ news.basebeans.com References: [EMAIL PROTECTED] One Struts book at http://www.basebeans.com/book.jsp Amir N. Nashat wrote: Hi Chetan, There are no books available at this time though 2 are currently being written that I know of. However, they will not be available for a while. The best place to start is to go to the website jakarata.apache.org and search under struts. there is A LOT of good information there. Also, another very good site is www.husted.com. Ted(who runs the site) is very knowledgeable in this field and posts to this mailing list very often. Hope that helps. amir [EMAIL PROTECTED] 10:38:51 PM 01/29/02 I'm just a newbie to Struts and find it very interesting, I just want to ask where is it best to start learning struts from... Is there a book out there that I can buy Thankz Chetan -- 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/Tiles and nightly build features
Since the nightly builds archives on Jakarta are on a short leash now, if anyone needs a Nightly Build JAR that will work with Tiles and the V/S Toolkit et cetera, there's one here. http://husted.com/struts/resources/struts_1_1a.zip Ted Husted wrote: The functionality will be restored, but for the time being to use Tiles you will have to roll back to a nightly build prior to 15 January. The same goes for the new Velocity/Struts toolkit. There were some changes to the ActionServlet, and some of the higher level compatibility issues need to be resolved. Virtually all typical applications should run just fine, but the changes Tiles makes are atypical. -- Ted Husted, Husted dot Com, Fairport NY USA. -- Java Web Development with Struts. -- Tel +1 585 737-3463. -- Web http://www.husted.com/struts/ Sean Willson wrote: Hello All, Had a question about the latest nightly and some changes/functionality that was removed or missing. I am currently using Tiles and Struts (build from 11/9/2001) to manage the View portion of our website. We have custom renderers that serve up different views depending on the browser type you are coming in with. Anyhow, in our struts config file we often use the action input=some.tile.property.here ... /action In the old releases this worked fine, but in the latest release it appears that the action servlet that Tiles uses isn't answering the calls to the getInput() command called on mapping any longer, the ActionConfig is now. Is this feature gone or are they planning on returning it? Basically, I guess I just want to know if the Tiles template will continue to be integrated into struts as deeply as it was in the past. I am also trying to get a feel for if I have to modify the code myself, which we have yet to do, or if I can rely on the standard builds. Thanks for the help everyone ... Sean P.S. Hopefully when we release, which should be soon, I can give a more detailed look at what we did and what we may be able to contribute back to struts or jakarta. -- 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] -- Ted Husted, Husted dot Com, Fairport NY USA. -- Java Web Development with Struts. -- Tel +1 585 737-3463. -- Web http://www.husted.com/struts/ -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: changing regexp in default validation
Hi Ivan, I had this problem too... The source of the problem lies in the Jakarta RegExp implementation that Struts Validator uses. I ended up downloading the source to RegExp and stepping through the code. To bypass the problem, I replaced the RegExp regular expression handler with Jakarta ORO. This now works fine for me. Le me know if you want me to post the files I've changed to you. I'm using Struts Validator20010702. Regards Andy - Original Message - From: Ivan Siviero [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Tuesday, February 05, 2002 9:20 AM Subject: changing regexp in default validation Hi struts users. I'm posting a question on struts validator. Well, as you all know, the struts validator implements an email validation which is defined in the org.apache...StrutsValidator validateEmail() method. (Sorry if the names are not 100% equals to the original ones). Anyway this method uses a jakarta regexp string to validate the email. So now let's suppose i want to change that validation string, as it considers not valid some email addresses which are valid for me. i.e: [EMAIL PROTECTED] I have the validation strings who considers the above email as valid but i cannot figure out where it must be inserted in the validator.xml file to, tell the validateEmail() method to use it insted of the default one. Can someone help me ? Thanx everyone. Ivan. -- 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 runtime expression tag.
having the following forward defined as you mentioned forward name=membership path=/membership.do/ you can as well use it in your html:link html:link forward=/membership paramId=id paramName=formBean paramProperty=idMembership/html:link Patrick Matt Raible wrote: Unfortunately, you cannot nest tags within each other. You best best is to put a global forward in your struts-config.xml, such as: forward name=membership path=/membership.do/ And then write your a href as follows: a href=html:rewrite forward='membership'/?id=bean:write name='formBean' property='id'/Membership/a OR, I think you can do it this way: html:link page=/membership.do paramId=id paramName=formBean paramProperty=idMembership/html:link Also, I think it's good practice to have all your links go to forwards rather than pages. This way, if you ever need to change your action mapping (from say *.do to /do/*), you can do it by only touching the web.xml and struts-config.xml. HTH, Matt --- Victor Hadianto [EMAIL PROTECTED] wrote: Hi list, I wonder if I'm doing something really wrong here, this is what I want to do: html:link page=/membership.do?id=bean:write name='formBean' property='id'/Membership/html:link Struts ignores the bean:write tag altogether. I have to use a normal a href tag for example: a href/context/membership.do?id=bean:write name='formBean' property='id'/Membership/a to get this to work. Now the obvious problem is using the a href tag I have to include the context. Very annoying. Did I do something really wrong here? Regards, -- Victor Hadianto --- Remember, in 2039, MOUSSE PASTA will be available ONLY by prescription!! -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] __ Do You Yahoo!? Great stuff seeking new owners in Yahoo! Auctions! http://auctions.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: RE: [Fwd: Re: Hi....]]
Hi, The problem with too many tags is one of maintenance. Each tag you write becomes part of your bespoke project 'language'. With large groups producing many tens or hundreds of tags it can become a nightmare for new staff. Far better to stick to the core tags, and struggle not to add many new ones of your own. Think of it another way, each tag is exactly like you adding to html for your own project. Remember the horror of IE v's Netscape when html diverged - that is exactly what a project is doing by writing their own tags. New project members will hate it. BUT, some ten or so custom tags will make your project a joy and there is no downside. OTOH, if its your project, and you don't have to worry about maintenance (!) then do anything you want. Jonathan Message History From: Olivier Dinocourt [EMAIL PROTECTED] on 05/02/2002 11:07 CET Please respond to Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] cc: Subject: Re: RE: [Fwd: Re: Hi]] I think he means that you should avoid as much as possible writing code (of any sort : tags, scriptlets, etc...) in your JSPs, and rather put this code in your Action classes / business logic classes - Original Message - From: Jay Sissom [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Tuesday, February 05, 2002 12:29 AM Subject: Re: RE: [Fwd: Re: Hi]] I don't agree. If you need to use scriptlets in your JSPs and you use them over and over on many pages, the scriptlet should be a tag. The tag can be reused on many pages, the scriptlet can't. Please explain why This is a bad habit. Only do it if you must. Should we only re-use code if we must? Is re-use of code a bad habit. :) Jay - Original Message - From: Vic Cekvenich [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, January 30, 2002 2:48 PM Subject: [Fwd: RE: [Fwd: Re: Hi]] The thing on tags is do not use to many tags. Try to avoid writing tags. Somehow, the example app on struts has a custom tag and people like to learn how to write tags, and so there are lots of tags in Struts. This is a bad habit. Only do it if you must. Try to do as little code as possible in presentation/view/jsp. So to me, tags and Struts framework are 2 different things, but bellow is a good book anyway. Vic Original Message Subject: RE: [Fwd: Re: Hi] Date: Wed, 30 Jan 2002 18:49:35 +0100 From: Lacerda, Wellington (AFIS) [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] Organization: Basebeans.com To: 'Struts Users Mailing List' [EMAIL PROTECTED] Newsgroups: Struts Another book with a lot of information on Struts is JSP and Tag Libraries for Web Development, available at Amazon and BN. Check the publisher's page at: http://www.newriders.com/books/title.cfm?isbn=0735710953. It is heavily focused on Tag Libraries and Struts is discussed on the light of that. Wellington -Original Message- From: Vic Cekvenich [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 30, 2002 6:39 PM To: [EMAIL PROTECTED] Subject: [Fwd: Re: Hi] Newsgroups: Struts @ news.basebeans.com References: [EMAIL PROTECTED] One Struts book at http://www.basebeans.com/book.jsp Amir N. Nashat wrote: Hi Chetan, There are no books available at this time though 2 are currently being written that I know of. However, they will not be available for a while. The best place to start is to go to the website jakarata.apache.org and search under struts. there is A LOT of good information there. Also, another very good site is www.husted.com. Ted(who runs the site) is very knowledgeable in this field and posts to this mailing list very often. Hope that helps. amir [EMAIL PROTECTED] 10:38:51 PM 01/29/02 I'm just a newbie to Struts and find it very interesting, I just want to ask where is it best to start learning struts from... Is there a book out there that I can buy Thankz Chetan -- 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:
ActionErrors within frames manually forwarded
Hi, I've spent some time checking the list for this issue, but I could only find related topics, that didn't really help. In case that this has been answered before, please ignore it and send me a link. I think that there must be something I've missed when using the Struts validation feature within frames. In short: I'm trying to manually retrieve and forward the ActionErrors within a frame definition page (which is the input page for a mapping). But those manually set request parameters are gone when I access them. The situation is as follows: The page myframe.jsp consists of two frames: mynavigation.jsp and myContent.jsp. myContent.jsp is the JSP that is validated. In case that a validation error (ActionError) occurs, the follwoing (relevant) events occur (correct me if I'm wrong) - Struts puts the ActionErrors I created within validate into the request - a forward to the input page is done as defined in the struts-config (in my case the action entry is: action path=/myContentActionPath type=some.SomeAction name=contentForm scope=session validate=true input=/myframe.jsp forward name=back path=/somePrev.jsp/ forward name=next path=/someNext.jsp/ /action so it leads to the frame page. - within the myframe.jsp, two new requests are created: one for each frame But I think I should still be able to access the request with the ActionErrors within the frame definition page. So in myframe.jsp I could do something like: myframe.jsp: %@ page language=java % %@ taglib uri=/WEB-INF/struts-html.tld prefix=html % html:html head html:base/ titleMyTitle/title meta http-equiv=Content-Type content=text/html; charset=iso-8859-1 /head frameset cols=150,* frameborder=no border=0 framespacing=0 frame src=myNavigation.jsp NAME=Menue frame src=myContent.jsp?manuallySetParam=html:errors property=myErrorProperty/ NAME=content /frameset noframes /noframes /html:html in order to retrieve the ActionError String for property myErrorProperty within the content page: myContent.jsp: ... P %= request.getParameter(manuallySetParam) % /P This - I agree - doesn't look elegant, but at least it should work. If I have the input page defined as a pure jsp (no frames), the html:errors are retrieved as expected. Are there any ideas, why the parameter manuallySetParam does not contain the error message of key myErrorProperty ? Help and/or design suggestions greatly appreciated! Thanks in advance, Holger Keine verlorenen Lotto-Quittungen, keine vergessenen Gewinne mehr! Beim WEB.DE Lottoservice: http://tippen2.web.de/?x=13 -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Database Servlet
Hello, I apologize if my question sounds naive but I really need your help on this. I have a servlet that during initialization parses an .xml file using Digester. Then I access the data in my jsps through JavaBeans. What I need to do, is to have my main page which displays the data from the .xml to be updated with the new data each time the .xml is modified. In order to do this, do I have to put the code of the init() method of my servlet in the Action class of the main page or is it a more elegant way to do this? Thank you in advance, Konstantina -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Configuring iPlanet 4.1 E.E.
Hi, I am trying to configure iPlanet 4.1 Enterprise Edition to run Struts. But am not able to do so for the custom tag libraries. Please help. Its damn urgent. Thanks in advance. Jayanta Roy -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
JRun/JNDI Question
JRun's documentation sucks and it's code examples use deprecated methods. Does anybody know the correct means to get a JNDI reference to an EJB home interface from a servlet? I've tried most everything, but what I got before pulling the rest of my hair out and quitting is a servlet containing, in part: Context jndiContext = getInitialContext(); Object ref = jndiContext.lookup( java:comp/env/ejb/CustomerHome); * * * public static Context getInitialContext() throws NamingException { Properties p = new Properties(); p.setProperty( Context.PROVIDER_URL, ejipt://192.168.0.1:8100); p.setProperty( Context.INITIAL_CONTEXT_FACTORY, allair.ejipt.ContextFactory); return new InitialContext( p); } The PROVIDER_URL is the port for my JRun Server. The INITIAL_CONTEXT_FACTORY is what the documentation says is correct, although there is an InitialContextFactory class in another package. And the JNDI lookup is in the recommended form. I've also tried the put() method of Property. No matter what, ref is always null. A couple of interesting things: (1) I am not getting a NullPointerException (nor any other error) when calling the servlet from a browser - just a page with some test HTML output from a PrintWriter() statement prior to the JNDI lookup; (2) assert always throws a NullPointerException: assert ref == null; assert ref != null; assert ref.equals( null); I know this is happening because the Rams lost the SB...Appreciate any insight(s) you guys may have. Mark
Re: JRun/JNDI Question
Have a look at: http://www.javaworld.com/javaworld/javatips/jw-javatip118.html (it should maybe help you (???)) -- C. Bouessay Galbreath, Mark wrote: JRun's documentation sucks and it's code examples use deprecated methods. Does anybody know the correct means to get a JNDI reference to an EJB home interface from a servlet? I've tried most everything, but what I got before pulling the rest of my hair out and quitting is a servlet containing, in part: Context jndiContext = getInitialContext(); Object ref = jndiContext.lookup( java:comp/env/ejb/CustomerHome); * * * public static Context getInitialContext() throws NamingException { Properties p = new Properties(); p.setProperty( Context.PROVIDER_URL, ejipt://192.168.0.1:8100); p.setProperty( Context.INITIAL_CONTEXT_FACTORY, allair.ejipt.ContextFactory); return new InitialContext( p); } The PROVIDER_URL is the port for my JRun Server. The INITIAL_CONTEXT_FACTORY is what the documentation says is correct, although there is an InitialContextFactory class in another package. And the JNDI lookup is in the recommended form. I've also tried the put() method of Property. No matter what, ref is always null. A couple of interesting things: (1) I am not getting a NullPointerException (nor any other error) when calling the servlet from a browser - just a page with some test HTML output from a PrintWriter() statement prior to the JNDI lookup; (2) assert always throws a NullPointerException: assert ref == null; assert ref != null; assert ref.equals( null); I know this is happening because the Rams lost the SB...Appreciate any insight(s) you guys may have. Mark -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: JRun/JNDI Question
This looks promising - thanks! It also looks like the delegate design pattern, for those interested in the general practice of decoupling application modules. Mark -Original Message- From: Christian Bouessay [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 05, 2002 8:44 AM Have a look at: http://www.javaworld.com/javaworld/javatips/jw-javatip118.html (it should maybe help you (???)) -- C. Bouessay Galbreath, Mark wrote: JRun's documentation sucks and it's code examples use deprecated methods. Does anybody know the correct means to get a JNDI reference to an EJB home interface from a servlet? I've tried most everything, but what I got before pulling the rest of my hair out and quitting is a servlet containing, in part: Context jndiContext = getInitialContext(); Object ref = jndiContext.lookup( java:comp/env/ejb/CustomerHome); * * * public static Context getInitialContext() throws NamingException { Properties p = new Properties(); p.setProperty( Context.PROVIDER_URL, ejipt://192.168.0.1:8100); p.setProperty( Context.INITIAL_CONTEXT_FACTORY, allair.ejipt.ContextFactory); return new InitialContext( p); } The PROVIDER_URL is the port for my JRun Server. The INITIAL_CONTEXT_FACTORY is what the documentation says is correct, although there is an InitialContextFactory class in another package. And the JNDI lookup is in the recommended form. I've also tried the put() method of Property. No matter what, ref is always null. A couple of interesting things: (1) I am not getting a NullPointerException (nor any other error) when calling the servlet from a browser - just a page with some test HTML output from a PrintWriter() statement prior to the JNDI lookup; (2) assert always throws a NullPointerException: assert ref == null; assert ref != null; assert ref.equals( null); I know this is happening because the Rams lost the SB...Appreciate any insight(s) you guys may have. Mark -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
using logic:iterate to display collection and build html:input fields
I am trying to use logic:iterate to display a collection of data and also build a dynamic list of html:text input fields. Here's my code logic:iterate id=transactionAmountBoundary name=createTransactionAmountBoundariesForm property=transactionAmountBoundaries indexId=x tr td class=subHeading bean:write name=transactionAmountBoundary property=transactionDescription filter=true/ /td td class=subHeading html:text name=createTransactionAmountBoundariesForm property=minValue%=x% size=10 maxlength=10 / /td td class=subHeading html:text name=createTransactionAmountBoundariesForm property=maxValue%=x% size=10 maxlength=10 / /td /tr /logic:iterate The transactionDescription appears fine. But the problem is getting the minValue and maxValue text fields to appear in HTML as minValue1, minValue2, etc.. and maxValue1, maxValue2 This code give me an error: javax.servlet.ServletException: No getter method for property minValue of bean createTransactionAmountBoundariesForm When I didn't have the %=x% code, the HTML generated had all the records with same code: name=minValue and name=maxValue Does anyone have any suggestions? -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Tiles Vs Templates
I'm going with Tiles.. they are totally compatible and make better use of XML to layout tiles.. That reduced my object count significantly. Cheers, Jon Sriram Nookala wrote: I'm trying to get some information in order to make a choice between struts templates and Tiles for our UI design and templating. Where would you choose one over the other, and what does Tiles offer you that Templates doesn't? thanks, sriram -- 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]
No getter method for property... but present
Hi, in my bean i have among others: public void setEconomicActivities(String newEconomicActivities) public List getEconomicActivities() public void setDomains(String newDomains) public List getDomains() Both setters perform a tokenizer operation on the provided string, and both getters return the result of that operation. When i iterate over the domains there is no problem, but when i try to do the same... the same way... for economic activities i get a: 'no getter method for property ... in bean ...' logic:notEmpty name=experience property=domains scope=page logic:iterate id=activityDomain name=experience property=domains scope=page type=blabla bean:write name=activityDomain property=description scope=page/ /logic:iterate /logic:notEmpty logic:notEmpty name=experience property=economicActivities scope=page logic:iterate id=economicActivity name=experience property=economicActivities scope=page type=blabla bean:write name=economicActivity property=description scope=page/ /logic:iterate /logic:notEmpty any ideas what could be the cause of this? When i rename the setter method for economicActivities to economicActivity the exception is not thrown... Is it because the setter get a String and the getter return a list ? but howcome then that the domains getter and setter work well and do practically the same thing? any hints or try-outs ? Tom. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: J2EE BluePrints and Struts
Oleg had a pager as part of his BeanFactory, but that was never made part of the framework. Perhaps he will get back to that after the ServiceManager work (Go Oleg!). Generally, these type of model-centric patterns do not need be a part of the core framework. The framework provides places where you can plug into the model (Actions). And ways to pass control back and forth between the View (struts-config elements). But the implementation of something like paging is an excercise left to the developer. A patterns-based approach to paging might be something I would put into the optional Scaffold package, which has a number of implementation-pattern type classes. SIROLLI PIERRE wrote: --- Reçu de RVIDOI.SIROLLPI 62607 05/02/02 09.26 Ted, I wrote an implementation of the page by page iterator J2EE design pattern. Is this pattern already implemented in Struts ? Pierre Date: Mon, 4 Feb 2002 06:07:20 -0500 Subject: Re: J2EE BluePrints and Struts This type of message can also be posted to the USER list, since it does not involve the present or future development of Struts. But anyway, the Blueprints are just that -- plans. Struts implements many of the patterns and strategies described in the BluePrints and in Core J2EE Patterns http://www.amazon.com/exec/obidos/ISBN=0130648841/hitchhikeguidetoA/ But was doing so before each of these were released, based on prior patterns literature. In fact, Struts code was used as the example implementation for Synchronizer Token strategy. Working from the Core J2EE Patterns terminology, Struts employs a number of cataloged patterns, including Service to Worker (ActionServlet, Action classes, ContextHelper), Front Controller, Singleton (ActionServlet), Dispatcher, View Helper, Session Facade, Singleton (Action classes), Value Objects (ActionForm, ActionErrors), View Helper (ActionForm, ContextHelper, tag extensions), Composite View (Template and Tiles taglibs), Synchronizer Token (Action class methods). -- Ted Husted, Husted dot Com, Fairport NY USA. -- Java Web Development with Struts. -- Tel +1 585 737-3463. -- Web http://www.husted.com/struts/ [EMAIL PROTECTED] wrote: Hi, I am new to this framework and to this list. Can anybody tell me how this framework differs from the Sun's framework J2EE BluePrints ? What is the strength of the framework when compared to the BluePrints? If there are any articles available, please let me know. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] 05/02/02 09.26 Envoyé à - - husted(a)apache.org - struts-dev(a)jakarta.apache.org -- Ted Husted, Husted dot Com, Fairport NY USA. -- Java Web Development with Struts. -- Tel +1 585 737-3463. -- Web http://www.husted.com/struts/ -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: No getter method for property... but present
You are using List for get and String for set method. You should use the same type for both methods. JP public void setEconomicActivities(String newEconomicActivities) public List getEconomicActivities() public void setDomains(String newDomains) public List getDomains() Tom Goemaes wrote: Hi, in my bean i have among others: public void setEconomicActivities(String newEconomicActivities) public List getEconomicActivities() public void setDomains(String newDomains) public List getDomains() Both setters perform a tokenizer operation on the provided string, and both getters return the result of that operation. When i iterate over the domains there is no problem, but when i try to do the same... the same way... for economic activities i get a: 'no getter method for property ... in bean ...' logic:notEmpty name=experience property=domains scope=page logic:iterate id=activityDomain name=experience property=domains scope=page type=blabla bean:write name=activityDomain property=description scope=page/ /logic:iterate /logic:notEmpty logic:notEmpty name=experience property=economicActivities scope=page logic:iterate id=economicActivity name=experience property=economicActivities scope=page type=blabla bean:write name=economicActivity property=description scope=page/ /logic:iterate /logic:notEmpty any ideas what could be the cause of this? When i rename the setter method for economicActivities to economicActivity the exception is not thrown... Is it because the setter get a String and the getter return a list ? but howcome then that the domains getter and setter work well and do practically the same thing? any hints or try-outs ? Tom. -- 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: Importing CSV and VCF files
I had to build a data import using CSV-based import files. I relied strongly on the StringTokenizer class to break out all the various values. Did you have something specific you were wondering about? - Original Message - From: Matt Raible [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Monday, February 04, 2002 7:48 PM Subject: Importing CSV and VCF files Does anyone know of any examples to import CSV files into a database using Java? Like Yahoo does with Addresses? What about importing a VCF file? Any links, suggestions are appreciated, Matt __ Do You Yahoo!? Great stuff seeking new owners in Yahoo! Auctions! http://auctions.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: No getter method for property... but present
but it work fine for public void setDomains(String newDomains) public List getDomains() how do you explain that ? You are using List for get and String for set method. You should use the same type for both methods. JP public void setEconomicActivities(String newEconomicActivities) public List getEconomicActivities() public void setDomains(String newDomains) public List getDomains() -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: use of logic:iterate on variable columns and rows?
Hello Leo, Try using the nested eXtension (or MonkeyStruts as it is also called) it could solve your problems... Best of luck, Darryl -Original Message- From: Leo Li [SMTP:[EMAIL PROTECTED]] Sent: Wednesday, December 19, 2001 2:32 PM To: [EMAIL PROTECTED] Subject: use of logic:iterate on variable columns and rows? My application need to display a table with the variable column and row. I have tried to use nested logic:iterate but it won't work. logic:iterate id=col_ name=matrix tr logic:iterate id=row_ name=col_ td bean:write name=row_ property=item/ /td /logic:iterate /tr /logic:iterate Could someone help me? Thanks __ Do You Yahoo!? Check out Yahoo! Shopping and Yahoo! Auctions for all of your unique holiday gifts! Buy at http://shopping.yahoo.com or bid at http://auctions.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Importing CSV and VCF files
On Tue, 5 Feb 2002, John M. Corro wrote: I had to build a data import using CSV-based import files. I relied strongly on the StringTokenizer class to break out all the various values. Did you have something specific you were wondering about? I found a great csv parser at http://ostermiller.org/utils/ that deals with empty fields, microsoft broken files, etc. dave - Original Message - From: Matt Raible [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Monday, February 04, 2002 7:48 PM Subject: Importing CSV and VCF files Does anyone know of any examples to import CSV files into a database using Java? Like Yahoo does with Addresses? What about importing a VCF file? Any links, suggestions are appreciated, Matt __ Do You Yahoo!? Great stuff seeking new owners in Yahoo! Auctions! http://auctions.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- Dave Weis I believe there are more instances of the abridgement [EMAIL PROTECTED] of the freedom of the people by gradual and silent encroachments of those in power than by violent and sudden usurpations.- James Madison -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Trouble to getParameter sended with HTTP-GET
Hi, I can catch the parameter if it is send by HTTP-POST but I can't catch the parameter added to the end of the URI. Does someone have any example for catching HTTP-GET paramater using STRUTS. Thanks a lot, ___ Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français ! Yahoo! Mail : http://fr.mail.yahoo.fr -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re[2]: J2EE BluePrints and Struts
Hello Ted, Tuesday, February 05, 2002, 4:58:37 PM, you wrote: TH Oleg had a pager as part of his BeanFactory, but that was never made TH part of the framework. Perhaps he will get back to that after the TH ServiceManager work (Go Oleg!). Pager bean is already ok and I can commit it to the repository anytime. But I think that it is not struts-related stuff and can be used with any project - so is it right to commit pager bean to the struts repository? There is one reason only to do so - struts has not any pager code now... 8) TH Generally, these type of model-centric patterns do not need be a part of TH the core framework. The framework provides places where you can plug TH into the model (Actions). And ways to pass control back and forth TH between the View (struts-config elements). But the implementation of TH something like paging is an excercise left to the developer. TH A patterns-based approach to paging might be something I would put into TH the optional Scaffold package, which has a number of TH implementation-pattern type classes. -- Best regards, Olegmailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Newbie question: Application Flow in Struts
Hello all, I have a few questions, grey areas, when it comes to application flow in STRUTS. I have read many articles but there are still certain areas I am not comfortable with namely the backend. So let me tell what I think I know and then someone can tell me how I went wrong. When you Submit your HTTP request from the browser it gets handled by the Controller Servlet. This servlet knows to instanciate the proper formBean configured in the xml file. The proper action class's perform() method is called with the previous mentioned formBean as a parameter. This is when I get a little confused. In each of your action classes you initiate the logic to update your MODEL. So for example, myAction.perform() will instanciate/use some business objects to update the state information in the system. Since the perform() method returns and ActionForward object to the controller which I assume the controller will use to show a certain page which is based on a formBean. When should I update/instanciate/set that formBean so that the page that uses it will show the correct info? Should that be taken care of by the MODEL, either an EJB or just a regular bean, or in the Action class itself? thanks, matt lobur __ Do You Yahoo!? Send FREE Valentine eCards with Yahoo! Greetings! http://greetings.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: J2EE BluePrints and Struts
Well, we should commit it ~someplace~ :-) It should probably go to Taglibs, but if you are not up for that right now, we could just park it under Contrib, or in the Scaffold package. I'd be happy to help propose it to Taglibs, but Cedric and I should finish doing that with Tiles first. -T. Oleg V Alexeev wrote: Hello Ted, Tuesday, February 05, 2002, 4:58:37 PM, you wrote: TH Oleg had a pager as part of his BeanFactory, but that was never made TH part of the framework. Perhaps he will get back to that after the TH ServiceManager work (Go Oleg!). Pager bean is already ok and I can commit it to the repository anytime. But I think that it is not struts-related stuff and can be used with any project - so is it right to commit pager bean to the struts repository? There is one reason only to do so - struts has not any pager code now... 8) TH Generally, these type of model-centric patterns do not need be a part of TH the core framework. The framework provides places where you can plug TH into the model (Actions). And ways to pass control back and forth TH between the View (struts-config elements). But the implementation of TH something like paging is an excercise left to the developer. TH A patterns-based approach to paging might be something I would put into TH the optional Scaffold package, which has a number of TH implementation-pattern type classes. -- Best regards, Olegmailto:[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: How to put useBean data in HTML attribute?
OK. I knew it COULD be done that way, but I keep reading in all my books that it is not good design to put Java code in your JSP. I guess a certain amount of it is necessary from timr to time. Thanks! I will do this. - Cody Richard Yee [EMAIL PROTECTED] on 02/05/2002 12:30:18 AM Please respond to Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] cc: Subject: Re: How to put useBean data in HTML attribute? Cody, You can't nest tags - you can't have one tag inside the 's of another tag. To do what you want, try this: logic:iterate name=myBean property=userList id=currentUser % String ref = admin_userForm.jsp?user_id= + currentUser; % html:link href=%= ref %%= currentUser %/html:linkbr /logic:iterate -Richard logic:iterate name=users property=userList id=currentUser html:link href=admin_userForm.jsp?user_id=%= currentUser %%= currentUser %/html:linkbr /logic:iterate At 11:37 PM 2/4/2002 -0600, you wrote: Could someone please shed some light on the following? What would be the solution for an attempt like this? Consider this code snippet that has an obviously incorrect syntax: logic:iterate name=users property=userList id=currentUser html:link href=admin_userForm.jsp?user_id=bean:write name='currentUser'/bean:write name='currentUser'//html:linkbr /logic:iterate I am trying to set a URL paramer with bean data (admin_userForm.jsp?user_id =bean:write name='currentUser'/), but because it is inside of an HTML attribute, it is not working. I end up with an uninterpereted param value of user_id=bean:write name='currentUser'/. I know it's just a syntax issue. I can think of a better way to do it, but not without introducing java code into the page. What is the more elegant Struts-centric way to do this? - Cody The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer. -- 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] The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: OReilly Struts book
Great!! 1. IMO it's better to cover Struts 1.1 as I see in your TOC there is a just and appendix for changes in 1.1. 2. Are you going to cover some design patterns related to J2EE+EJB in reference to Struts? 3. An Order Entry/Shopping Cart application would be more usable and popular than Banking. 4. What about XML/Wap in view components? 5. What about extending Struts (Workflow, Service Manager, Data Formatting, ...)? Hertzel - Original Message - From: Chuck Cavaness [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Sent: Tuesday, January 29, 2002 7:57 PM Subject: RE: OReilly Struts book Thanks for the input; all of it is right on track of what others have been mentioning. I plan to tackle many of the more finer-grained issues like request versus session storage, when to forward versus redirect, wizards, etc... I'm going to try to wrap them into real-world, albeit small, examples. As with any book, the problem boils down to space and time. I'm sure that Ted and the other Author doing the Struts book for Wiley are going through the same issues right now. In the end, I won't be able to cover every single topic that involes Struts or web development. It's just not possible to do so. What I have to do is to hit all of the major topics and as many of the smaller ones that I can. OReilly books tend to be more for the intermediate or advanced, rather than the absolute beginner. That's tough because it always leaves a group out, but as someone mentioned to me earlier, you have to cut the line somewhere. Tiles will definitely be a topic and topics like the Struts Console from James Holmes deserve some coverage. The IDE topic is an interesting one and definitely worthy, but it's a question of how do I cover all of the possible IDE's that people use. For example, here at my company, people create, edit, and debug Struts with everything from JBuilder5, SlickEdit, TextPad, vi, and several more. These guys are all good and have excellent debugging skills. I believe that it's true that using an IDE and stepping through code will save debugging time. However, we also don't force a standard IDE down someone's throat as long as they can code and debug fast with good quality. So that one scares me a little. I might be able to select a few IDE's, but someone will always get left out. The good news is that I'm still flushing out about half of the chapters and sections, so nothing is out at this point. Chuck -Original Message- From: Sandeep Takhar [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 29, 2002 9:49 AM To: Struts Users Mailing List Subject: RE: OReilly Struts book this looks quite impressive. Some thoughts... The examples that you give should be more than just a banking application I think. I believe you should have some value-add in the book. For example -- when to use session storage vs request storage. I know there are new featues such as forwarding actionforms (I think there is something mentioned about this.) It would be nice to know a practical example of using this. I like what you are doing with security and exceptions. two other people mentioned having something about tiles and something about using ide's. This has my vote as well. I think that you should have as many references to other complimentary books. Is the EJB section as complete as it can be? How about team based development. Setting up sandboxes, issues with config files. Are you using tomcat for examples? How about some configuration issues with other containers. I am thinking of weblogic... Which tools to use for developing with custom tags (I have hear of ultradev and it's add-ons is good). Other tools -- There have been numerous mentioned in this list -- there was one today about tables and another about struts code generators etc. I also think you should keep in close contact with who the developers are -- I bet they have some great ideas on what to document -- what to expect etc. just some thoughts Sandeep -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Boost Struts with XSLT and XML - JavaWorld.com
I have messed with both Cocoon using XML / XSLT extensively to render views to varying devices and also use the Struts Tiles framework to do the same. I found Cocoon very powerful for static XML documents but as soon as I started trying to hook dynamic content in (forms, JSP's, Servlets, Struts), and NOT through XSP, I was hitting walls daily. However, in Struts I was able to write a custom Tiles FactorySet which looked at the incoming UserAgent and then applied certain rules against that to select the factory. Once that was selected you could write a factory file to have custom JSP's render as the output to actions. I don't explain it all that well but it is actually rather nice. I suggest using this mechanism if you are using Struts and want custom views for each device type. We actually use this user agent mapping factory in every website we develop in our lab. Sean P.S. I am working on getting this submitted back to Jakarta or at least Open Source it ... getting the company to do it isn't all that easy. Matt Raible wrote: Hmmm, I read everyone's posts, and they are somewhat inspiring. I'd like to see examples of using Xalan to get my struts message bundle, or other messag bundles. I'm sure I could spend an hour and figure this out, but if anyone has ready examples, links, send them my way! XForms - I'm excited about these, but I think it'll be awhile before the browser's support them. #3 is probably from my own experience. I spent a week trying to develop a XML/XSL framework using JSPs to emit XML, XSL and the JSTL to do the transformation. My JSPs became very small and nice, but it seemed I was spending a lot of time writing the XSL and trying to get it to work properly. I've had a lot of experience with writing HTML and JSPs, and so I bagged the whole idea and recommended we just use JSP/HTML with Tiles and CSS. I know that my client will get more value from my time with this approach. The reason my client wanted to use XML/XSL was to easily adapt the UI for other devices. I think this is a great reason, but it almost seems simpler to me to separate my HTML client from my WAP client and develop entirely new JSPs for the WAP client. Of course, working with a limited budget and a small development team (1) - there's not much time for learning curve. Matt -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Transaction control tokens?
Hi! All I am having problems using Transaction control tokens. I am not sure I am using it in the right manner. This is what I am using in the perform method of my action. saveToken(request) ; if (!isTokenValid(request)){ /* specific piece of working code */ } resetToken(request); I believe the transactional token is used to validate that the user does not submit the same form twice. A common problem is web applications. The above piece of my code is not helping me do that. Any help on that issue will be great? Thanks...Harshal. -Original Message- From: Ted Husted [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 05, 2002 10:05 AM To: Struts Users Mailing List Subject: Re: J2EE BluePrints and Struts Well, we should commit it ~someplace~ :-) It should probably go to Taglibs, but if you are not up for that right now, we could just park it under Contrib, or in the Scaffold package. I'd be happy to help propose it to Taglibs, but Cedric and I should finish doing that with Tiles first. -T. Oleg V Alexeev wrote: Hello Ted, Tuesday, February 05, 2002, 4:58:37 PM, you wrote: TH Oleg had a pager as part of his BeanFactory, but that was never made TH part of the framework. Perhaps he will get back to that after the TH ServiceManager work (Go Oleg!). Pager bean is already ok and I can commit it to the repository anytime. But I think that it is not struts-related stuff and can be used with any project - so is it right to commit pager bean to the struts repository? There is one reason only to do so - struts has not any pager code now... 8) TH Generally, these type of model-centric patterns do not need be a part of TH the core framework. The framework provides places where you can plug TH into the model (Actions). And ways to pass control back and forth TH between the View (struts-config elements). But the implementation of TH something like paging is an excercise left to the developer. TH A patterns-based approach to paging might be something I would put into TH the optional Scaffold package, which has a number of TH implementation-pattern type classes. -- Best regards, Olegmailto:[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] CONFIDENTIALITY NOTICE: This E-Mail is intended only for the use of the individual or entity to which it is addressed and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you have received this communication in error, please do not distribute and delete the original message. Please notify the sender by E-Mail at the address shown. Thank you for your compliance. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: J2EE BluePrints and Struts
Or, I guess the Commons -- there's a tag, but it's mostly a JavaBean, yes? And of course, everything we're saying about Oleg's would also go for Pierre's, if he would like to donate it to the cause. If the two implementations are sufficient differently, and each would work better under different circumstnaces, perhaps we could offer them together. -T. Ted Husted wrote: Well, we should commit it ~someplace~ :-) It should probably go to Taglibs, but if you are not up for that right now, we could just park it under Contrib, or in the Scaffold package. I'd be happy to help propose it to Taglibs, but Cedric and I should finish doing that with Tiles first. -T. Oleg V Alexeev wrote: Hello Ted, Tuesday, February 05, 2002, 4:58:37 PM, you wrote: TH Oleg had a pager as part of his BeanFactory, but that was never made TH part of the framework. Perhaps he will get back to that after the TH ServiceManager work (Go Oleg!). Pager bean is already ok and I can commit it to the repository anytime. But I think that it is not struts-related stuff and can be used with any project - so is it right to commit pager bean to the struts repository? There is one reason only to do so - struts has not any pager code now... 8) TH Generally, these type of model-centric patterns do not need be a part of TH the core framework. The framework provides places where you can plug TH into the model (Actions). And ways to pass control back and forth TH between the View (struts-config elements). But the implementation of TH something like paging is an excercise left to the developer. TH A patterns-based approach to paging might be something I would put into TH the optional Scaffold package, which has a number of TH implementation-pattern type classes. -- Best regards, Olegmailto:[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] -- Ted Husted, Husted dot Com, Fairport NY USA. -- Java Web Development with Struts. -- Tel +1 585 737-3463. -- Web http://www.husted.com/struts/ -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: error display
You need to use the html:errors tag. This will display all of the errors that you returned from the validate function of your action form. -Original Message- From: Henry Lu [mailto:[EMAIL PROTECTED]] Sent: Monday, February 04, 2002 7:30 AM To: Struts Users Mailing List Subject: error display WHen there is error in the validate() function, my jsp page only displays ul /ulhr Why? How to let the page display the message specified in the validate() function? --- Henry Lu MCITphone: (734) 936-2063 University of Michigan Medical Center fax: (734) 763-4372 -- 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: Importing CSV and VCF files
This is what I was looking for - thanks! Matt --- Dave Weis [EMAIL PROTECTED] wrote: On Tue, 5 Feb 2002, John M. Corro wrote: I had to build a data import using CSV-based import files. I relied strongly on the StringTokenizer class to break out all the various values. Did you have something specific you were wondering about? I found a great csv parser at http://ostermiller.org/utils/ that deals with empty fields, microsoft broken files, etc. dave - Original Message - From: Matt Raible [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Monday, February 04, 2002 7:48 PM Subject: Importing CSV and VCF files Does anyone know of any examples to import CSV files into a database using Java? Like Yahoo does with Addresses? What about importing a VCF file? Any links, suggestions are appreciated, Matt __ Do You Yahoo!? Great stuff seeking new owners in Yahoo! Auctions! http://auctions.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- Dave Weis I believe there are more instances of the abridgement [EMAIL PROTECTED] of the freedom of the people by gradual and silent encroachments of those in power than by violent and sudden usurpations.- James Madison -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] __ Do You Yahoo!? Send FREE Valentine eCards with Yahoo! Greetings! http://greetings.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: AW: Struts/Tiles and nightly build features
It is a entension that we wrote to Tiles to allow custom rendering via routing actions to different views based on the incoming browser type (User-Agent). It is not open source yet ... still working on that. You would use the input parameter of an action to redirect to a certain view when an error occurs in the validation of the form. When an ActionError is returned at that level it never makes it to the Action, it goes back to the input JSP specified in the action mapping. Sean Dirk Storck wrote: Hi, what do you mean with custom renderers that serve up different views depending on the browser type? Do you have an example? By the way. For what do I need the input-parameter? Many Thanks -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Boost Struts with XSLT and XML - JavaWorld.com
Sean Willson wrote: P.S. I am working on getting this submitted back to Jakarta or at least Open Source it ... getting the company to do it isn't all that easy. I certainly hope you are successful! The Velocity guys are also looking at ways XML/XSLT can be integrated into their applications, in response tot this same article. With a flexible front controller, like, say, Struts, this is not an either/or decisions. You can have your pick of presentation devices, and choose the right tool for each job :) I hear that the Maverick framework plays well with XSLT too. http://mav.sourceforge.net -- Ted Husted, Husted dot Com, Fairport NY USA. -- Java Web Development with Struts. -- Tel +1 585 737-3463. -- Web http://www.husted.com/struts/ -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Forms question
Sorry if this is either obvious or one of those questions which crops up regularly (although I haven't picked up on an answer for it in the archive). I have a lookup form which is going to produce a variable number of results (for example, matching phone numbers which start with the digit '2'). I can get the results displayed on the page no problem using the logic:iterate. However, what I now need to do is have these results displayed as a second form, in order to allow the user to select one or more phone numbers.( I'll then need to return to an original page, filling in the selected numbers to an existing form - but I'll cross that particular bridge when I come to it). The thing that's puzzling me at the moment is how do I construct the ActionForm class to cope with a variable number of results? I haven't been using struts for too long (it shows huh!) and up until now every ActionForm I've created has had a 1-1 mapping with the form within the jsp. all advice appreciated, apologies again if it's a dumb question. regards, steve __ Steve Earl InfoGain Limited -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: OReilly Struts book
I'm definitely going to cover some design patterns/strategies related to Struts and EJB. I've been working on an a Struts/EJB application for over a year now and have learned a great deal about how to approach this, so this should be valuable to others. Brian Keeton and I just finished an EJB 2.0 for Que and I will include some ideas we discovered while writing that as well. Someone did point out to me however that obviously not everyone is using EJB and I should give focus to that as well. The banking example is only used in chapter 3, which is an overview of Struts. From the point on, I plan to use other examples. Right now, I'm in the B2B world where orders, items, catalogs, and customers are important. So I might use that domain. Hopefully, I can use various real domains to bring something for everyone. Since I first posted the initial TOC, I've added several new chapters and taken away some. One of the ones that everyone has asked for is a chapter on alternatives to JSP. So a chapter on XML/XSLT or something along these lines will probably make it in. The new features like multiple sub-apps, workflow, role-based actions, etc... definitely will make it in. I'm not sure where at in the book, but for sure will be very important. Chuck -Original Message- From: Hertzel Karbasi - OPTinity eBusiness Solutions [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 05, 2002 10:11 AM To: Struts Users Mailing List Subject: Re: OReilly Struts book Great!! 1. IMO it's better to cover Struts 1.1 as I see in your TOC there is a just and appendix for changes in 1.1. 2. Are you going to cover some design patterns related to J2EE+EJB in reference to Struts? 3. An Order Entry/Shopping Cart application would be more usable and popular than Banking. 4. What about XML/Wap in view components? 5. What about extending Struts (Workflow, Service Manager, Data Formatting, ...)?
jbuilder jsp and struts tags
Was wondering if anyone has been able to set break points in jbuilder6 for struts tags when debugging jsp. I can set a breakpoint on a regular jsp tag but not in a struts one e.g. html:text -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
[OT] Publishing an Application
I'm looking for a good tool for publishing an application. It should compare the source directory to the target and only move files that have changed. I'd also like an option to skip certain files, i.e. web.xml. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Forms question
The nested extension at http://www.keyboardmonkey.com/struts/index.html will solve your problem. - Original Message - From: Steve Earl [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Tuesday, February 05, 2002 10:35 AM Subject: Forms question Sorry if this is either obvious or one of those questions which crops up regularly (although I haven't picked up on an answer for it in the archive). I have a lookup form which is going to produce a variable number of results (for example, matching phone numbers which start with the digit '2'). I can get the results displayed on the page no problem using the logic:iterate. However, what I now need to do is have these results displayed as a second form, in order to allow the user to select one or more phone numbers.( I'll then need to return to an original page, filling in the selected numbers to an existing form - but I'll cross that particular bridge when I come to it). The thing that's puzzling me at the moment is how do I construct the ActionForm class to cope with a variable number of results? I haven't been using struts for too long (it shows huh!) and up until now every ActionForm I've created has had a 1-1 mapping with the form within the jsp. all advice appreciated, apologies again if it's a dumb question. regards, steve __ Steve Earl InfoGain Limited -- 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[2]: J2EE BluePrints and Struts
Hello Ted, Tuesday, February 05, 2002, 6:20:19 PM, you wrote: TH Or, I guess the Commons -- there's a tag, but it's mostly a JavaBean, TH yes? It is not tag - it is bean only. Developer can set properties and read page count, iterator with page labels and so all. To generate actual pager at JSP-page developer can use logic:iterate and so all. TH And of course, everything we're saying about Oleg's would also go for TH Pierre's, if he would like to donate it to the cause. TH If the two implementations are sufficient differently, and each would TH work better under different circumstnaces, perhaps we could offer them TH together. TH -T. -- Best regards, Olegmailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Newbie question: Application Flow in Struts
Hi, I can't remember where I read this, but it was in the struts docn or code someplace. You struts config has something like: form-beans form-beanname=adminForm type=com.foo.AdminForm / /form-beans !-- == Action Mapping Definitions == -- action-mappings !-- load jsp page, which does a search action (.do) which forwards back to jsp page to show results-- action path=/jsp/adminaction type=com.foo.AdminAction name=adminForm scope=request input=/jsp/adminsrch.jsp validate=true forward name=success path=/jsp/adminsrch.jsp?action=results/ forward name=displayrow path=/jsp/adminview.jsp/ /action OK, so when you browse to /jsp/adminsrch.jsp Struts knows that the form bean associated with this page will be called adminForm because of the name=adminForm input=/jsp/adminsrch.jsp and the form defn form-beanname=adminForm type=com.foo.AdminForm / So struts creates a form objects and sets it up (reset). You could also create it in the preceding action option, using com.foo.AdminForm next_form = new com.foo.AdminForm(); next_form.setSomething(blah); request.setAttribute(adminForm, next_form); and then forward to /jsp/adminsrch.jsp So the answer is, the controller will instantiate the form if you go to the jsp, OR you can set it up yourself and populate it. Jonathan = For struts code generation with EJB support visit: http://www.faraway.co.uk/tallsoft/lowroad/ Message History From: matt lobur [EMAIL PROTECTED] on 05/02/2002 06:48 PST Please respond to Struts Users Mailing List [EMAIL PROTECTED] To: [EMAIL PROTECTED] cc: Subject: Newbie question: Application Flow in Struts Hello all, I have a few questions, grey areas, when it comes to application flow in STRUTS. I have read many articles but there are still certain areas I am not comfortable with namely the backend. So let me tell what I think I know and then someone can tell me how I went wrong. When you Submit your HTTP request from the browser it gets handled by the Controller Servlet. This servlet knows to instanciate the proper formBean configured in the xml file. The proper action class's perform() method is called with the previous mentioned formBean as a parameter. This is when I get a little confused. In each of your action classes you initiate the logic to update your MODEL. So for example, myAction.perform() will instanciate/use some business objects to update the state information in the system. Since the perform() method returns and ActionForward object to the controller which I assume the controller will use to show a certain page which is based on a formBean. When should I update/instanciate/set that formBean so that the page that uses it will show the correct info? Should that be taken care of by the MODEL, either an EJB or just a regular bean, or in the Action class itself? thanks, matt lobur __ Do You Yahoo!? Send FREE Valentine eCards with Yahoo! Greetings! http://greetings.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Wizard Interface question
I am trying to develop an interface for entering data for one object across multiple forms as in a wizard interface. Can anyone describe the best way to approach the design of this type of functionality. I was thinking that the actionforms would be stored in the user session until a submit to database or a cancel is requested. Is this the best way to handle this? Thanks, Pete Serafin -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Wizard Interface question
Peter, Actually, for wizards I have usually just created a single large actionForm that has all the fields for all pages of the wizard and I just have it in the request. I use hidden fields on other pages of the wizard to carry the values from page to page. That way the page designer can dynamically move fields to any page they want without modifying the layout of the actionForm. regards, Stephen Owens Corner Software -Original Message- From: Pete Serafin [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 05, 2002 10:53 AM To: [EMAIL PROTECTED] Subject: Wizard Interface question I am trying to develop an interface for entering data for one object across multiple forms as in a wizard interface. Can anyone describe the best way to approach the design of this type of functionality. I was thinking that the actionforms would be stored in the user session until a submit to database or a cancel is requested. Is this the best way to handle this? Thanks, Pete Serafin -- 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] Publishing an Application
On Tue, 5 Feb 2002, Brad Rhoads wrote: I'm looking for a good tool for publishing an application. It should compare the source directory to the target and only move files that have changed. I'd also like an option to skip certain files, i.e. web.xml. I use rsync, it's fast and has quite a bit of intelligence. dave -- Dave Weis I believe there are more instances of the abridgement [EMAIL PROTECTED] of the freedom of the people by gradual and silent encroachments of those in power than by violent and sudden usurpations.- James Madison -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
PROBLEMS with uploading a file!
Hi, i have build a upload form, action and jsp like the example. At the jsp I also add some other things like title, and so on. If I send the form without uploading a file I get the following exception. CAN someone tell me why? ava] [EmbeddedTomcatSX] [ServletException in:/show/SelectionBoxes.do?actionPath=/showArticleList] MultipartIterator: no multipart request data sent' ava] [EmbeddedTomcatSX] javax.servlet.ServletException: MultipartIterator: no multipart request data sent ava] [EmbeddedTomcatSX] at org.apache.struts.upload.MultipartIterator.parseRequest(MultipartIterator.ja va:342) ava] [EmbeddedTomcatSX] at org.apache.struts.upload.MultipartIterator.init(MultipartIterator.java:152 ) ava] [EmbeddedTomcatSX] at org.apache.struts.upload.DiskMultipartRequestHandler.handleRequest(DiskMulti partRequestHandler.java:65) ava] [EmbeddedTomcatSX] at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:694) ava] [EmbeddedTomcatSX] at org.apache.struts.action.ActionServlet.processPopulate(ActionServlet.java:19 94) ava] [EmbeddedTomcatSX] at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1497) ava] [EmbeddedTomcatSX] at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:505) ava] [EmbeddedTomcatSX] at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) ava] [EmbeddedTomcatSX] at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) ava] [EmbeddedTomcatSX] at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405) ava] [EmbeddedTomcatSX] at org.apache.tomcat.core.Handler.service(Handler.java:287) ava] [EmbeddedTomcatSX] at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372) ava] [EmbeddedTomcatSX] at org.apache.tomcat.facade.RequestDispatcherImpl.doInclude(RequestDispatcherIm pl.java:400) ava] [EmbeddedTomcatSX] at org.apache.tomcat.facade.RequestDispatcherImpl.include(RequestDispatcherImpl .java:270) ava] [EmbeddedTomcatSX] at org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:414) ava] [EmbeddedTomcatSX] at org.apache.struts.taglib.tiles.InsertTag$InsertHandler.doEndTag(InsertTag.ja va:733) ava] [EmbeddedTomcatSX] at org.apache.struts.taglib.tiles.InsertTag.doEndTag(InsertTag.java:368) ava] [EmbeddedTomcatSX] at common._0002fcommon_0002fsidebarTempl_0002ejspsidebarTempl_jsp_0._jspService (_0002fcommon_0002fsidebarTempl_0002ejspsidebarTempl_jsp_0.java:120) ava] [EmbeddedTomcatSX] at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119) ava] [EmbeddedTomcatSX] at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) ava] [EmbeddedTomcatSX] at org.apache.jasper.servlet.JspServlet$JspCountedServlet.service(JspServlet.ja va:130) ava] [EmbeddedTomcatSX] at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) ava] [EmbeddedTomcatSX] at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja va:282) ava] [EmbeddedTomcatSX] at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:429) ava] [EmbeddedTomcatSX] at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:500) ava] [EmbeddedTomcatSX] at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) ava] [EmbeddedTomcatSX] at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405) ava] [EmbeddedTomcatSX] at org.apache.tomcat.core.Handler.service(Handler.java:287) ava] [EmbeddedTomcatSX] at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372) ava] [EmbeddedTomcatSX] at org.apache.tomcat.facade.RequestDispatcherImpl.doInclude(RequestDispatcherIm pl.java:400) ava] [EmbeddedTomcatSX] at org.apache.tomcat.facade.RequestDispatcherImpl.include(RequestDispatcherImpl .java:270) ava] [EmbeddedTomcatSX] at org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:414) ava] [EmbeddedTomcatSX] at org.apache.struts.taglib.tiles.InsertTag$InsertHandler.doEndTag(InsertTag.ja va:733) ava] [EmbeddedTomcatSX] at org.apache.struts.taglib.tiles.InsertTag.doEndTag(InsertTag.java:368) ava] [EmbeddedTomcatSX] at _0002fShowArticleList_0002ejspShowArticleList_jsp_0._jspService(_0002fShowAr ticleList_0002ejspShowArticleList_jsp_0.java:221) ava] [EmbeddedTomcatSX] at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119) ava] [EmbeddedTomcatSX] at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) ava] [EmbeddedTomcatSX] at org.apache.jasper.servlet.JspServlet$JspCountedServlet.service(JspServlet.ja va:130) ava] [EmbeddedTomcatSX] at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) ava] [EmbeddedTomcatSX] at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja va:282) ava] [EmbeddedTomcatSX] at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:429) ava] [EmbeddedTomcatSX] at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:500) ava] [EmbeddedTomcatSX] at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) ava]
Option list selects all options when displayed
I was displaying an option list for a HTML select tag. My code is as follows: html:select size=10 property=allRoles multiple=yes html:options property=allRoles/ /html:select The options list displayed as documented except with all options selected. The HTML options list does not select the items when shown. How can I diselected the options? Your help is much appreciated. Chong -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: [OT] Publishing an Application
That looks like what I need except I didn't find a build for NT. I found an old note about compiling the source that said the app may or may not actually work when recieving files on NT. -Original Message- From: Dave Weis [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 05, 2002 10:00 AM To: Struts Users Mailing List; [EMAIL PROTECTED] Subject: Re: [OT] Publishing an Application On Tue, 5 Feb 2002, Brad Rhoads wrote: I'm looking for a good tool for publishing an application. It should compare the source directory to the target and only move files that have changed. I'd also like an option to skip certain files, i.e. web.xml. I use rsync, it's fast and has quite a bit of intelligence. dave -- Dave Weis I believe there are more instances of the abridgement [EMAIL PROTECTED] of the freedom of the people by gradual and silent encroachments of those in power than by violent and sudden usurpations.- James Madison -- 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: Wizard Interface question
Pete Serafin wrote: I am trying to develop an interface for entering data for one object across multiple forms as in a wizard interface. Can anyone describe the best way to approach the design of this type of functionality. Doubt that there is any one right way, but webAppWriter keeps everything in a database, and uses many different forms, one for each of the CRUD operations for each of the three tables it maintains (App, Tables, Fields). Lots of forms, but each only has to do one thing. This approach allows anyone to start or stop anywhere within the process, and their state is always intact and can be picked up at any stage within the process. Oddly enough, this same thing is true of each of the applications it produces, though I never thought of them as Wizard forms before. To be a wizard, all it takes is some result that happens after the data is sucked in. It would seem that this is much more scalable than sticking everything in a session, but it was also a lot easier for me to do this way. It seems to be the way Expresso is designed to work. Plus, users would go nuts if they had to get everything done in a session. Does it work ? Has about 9 months without a problem, though only since posting on the struts resource page has it been getting heavy use. I was thinking that the actionforms would be stored in the user session until a submit to database or a cancel is requested. Is this the best way to handle this? Thanks, Pete Serafin -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- Pete Carapetyan http://datafundamentals.com Java Development Services Open standards technology for commercial profitability -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Wizard Interface question
I dont think this approach will work if you need transactional control across the different tabs of the wizard. For example if it is a registration wizard that collects contact info and billing info on different tabs, using different forms and commiting to the database will leave you with a lot of problems. We use a single form and store it in the session rather than the request eliminating the need for the hidden variables as proposed by somebody else. I notice that this is what you originally proposed. This approach works very well for us (thought there is a bit of clean-up at the cancel or submit) -Original Message- From: Pete Carapetyan [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 05, 2002 10:22 AM To: Struts Users Mailing List Subject: Re: Wizard Interface question Pete Serafin wrote: I am trying to develop an interface for entering data for one object across multiple forms as in a wizard interface. Can anyone describe the best way to approach the design of this type of functionality. Doubt that there is any one right way, but webAppWriter keeps everything in a database, and uses many different forms, one for each of the CRUD operations for each of the three tables it maintains (App, Tables, Fields). Lots of forms, but each only has to do one thing. This approach allows anyone to start or stop anywhere within the process, and their state is always intact and can be picked up at any stage within the process. Oddly enough, this same thing is true of each of the applications it produces, though I never thought of them as Wizard forms before. To be a wizard, all it takes is some result that happens after the data is sucked in. It would seem that this is much more scalable than sticking everything in a session, but it was also a lot easier for me to do this way. It seems to be the way Expresso is designed to work. Plus, users would go nuts if they had to get everything done in a session. Does it work ? Has about 9 months without a problem, though only since posting on the struts resource page has it been getting heavy use. I was thinking that the actionforms would be stored in the user session until a submit to database or a cancel is requested. Is this the best way to handle this? Thanks, Pete Serafin -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- Pete Carapetyan http://datafundamentals.com Java Development Services Open standards technology for commercial profitability -- 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]
Changing ActionForms in an Action
Can an Action class perform() forward a different ActionForm to the forwarded jsp than the one it receives? Lets say I have a customerSelectList.jsp where the user selects a customer to edit and a CustomerSelectActionForm is passed to an Action. The Action retrieves the customer recond from a Model . The Action forwards to a cusomerEditForm.jsp which needs to read from a CustomerEditActionForm. Can the Action populate and forward a CustomerEditActionForm? (Yes I know the Action can stuff anything into the session or request but this is kind of a non-standard way for a jsp to access its form isn't it?). I have accomplished this in the past by having Action A forward to an Action B which is setup in struts-config to received the new form class. But that is not the best way is it? -- -- - Rick Holland OO/Distributed Systems Consultant - ObjectAge Inc. - [EMAIL PROTECTED] Logic is a wreath of pretty flowers, that smell bad -- -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Wizard Interface question
Jakkampudi, ChandraseKhar wrote: I dont think this approach will work if you need transactional control across the different tabs of the wizard. For example if it is a registration wizard that collects contact info and billing info on different tabs, using different forms and commiting to the database will leave you with a lot of problems. Perhaps I do not understand what you are saying, but Expresso does this all day every day, and it has worked like a charm for (years?). When you create a registration app with webAppWriter, for example, you can have any number of tables as registration requirements, and each have it's own CRUD views separately maintained, or alternatively, one set of MVC CRUD views for the whole thing, while still maintaining each table as a separate registration requirement. If you don't believe it, go to webAppWriter.com and create a registration app. Takes about 10 minutes, plus a few minutes to wait for the zip file in your email. There are also tutorials on how to set up a quick Expresso test installation, so you won't mess with your existing apps or app server. Results, not theory about what won't work and why. But then again, if you can shoot holes in it, that is fine too. We use a single form and store it in the session rather than the request eliminating the need for the hidden variables as proposed by somebody else. I notice that this is what you originally proposed. This approach works very well for us (thought there is a bit of clean-up at the cancel or submit) -Original Message- From: Pete Carapetyan [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 05, 2002 10:22 AM To: Struts Users Mailing List Subject: Re: Wizard Interface question Pete Serafin wrote: I am trying to develop an interface for entering data for one object across multiple forms as in a wizard interface. Can anyone describe the best way to approach the design of this type of functionality. Doubt that there is any one right way, but webAppWriter keeps everything in a database, and uses many different forms, one for each of the CRUD operations for each of the three tables it maintains (App, Tables, Fields). Lots of forms, but each only has to do one thing. This approach allows anyone to start or stop anywhere within the process, and their state is always intact and can be picked up at any stage within the process. Oddly enough, this same thing is true of each of the applications it produces, though I never thought of them as Wizard forms before. To be a wizard, all it takes is some result that happens after the data is sucked in. It would seem that this is much more scalable than sticking everything in a session, but it was also a lot easier for me to do this way. It seems to be the way Expresso is designed to work. Plus, users would go nuts if they had to get everything done in a session. Does it work ? Has about 9 months without a problem, though only since posting on the struts resource page has it been getting heavy use. I was thinking that the actionforms would be stored in the user session until a submit to database or a cancel is requested. Is this the best way to handle this? Thanks, Pete Serafin -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- Pete Carapetyan http://datafundamentals.com Java Development Services Open standards technology for commercial profitability -- 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] -- Pete Carapetyan http://datafundamentals.com Java Development Services Open standards technology for commercial profitability -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: [OT] Publishing an Application
On Tue, 5 Feb 2002, Brad Rhoads wrote: That looks like what I need except I didn't find a build for NT. I found an old note about compiling the source that said the app may or may not actually work when recieving files on NT. Microsoft had something like application manager or similar to push web apps out on nt, but I'm not sure how tied in it is to their stuff. dave -Original Message- From: Dave Weis [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 05, 2002 10:00 AM To: Struts Users Mailing List; [EMAIL PROTECTED] Subject: Re: [OT] Publishing an Application On Tue, 5 Feb 2002, Brad Rhoads wrote: I'm looking for a good tool for publishing an application. It should compare the source directory to the target and only move files that have changed. I'd also like an option to skip certain files, i.e. web.xml. I use rsync, it's fast and has quite a bit of intelligence. dave -- Dave Weis I believe there are more instances of the abridgement [EMAIL PROTECTED] of the freedom of the people by gradual and silent encroachments of those in power than by violent and sudden usurpations.- James Madison -- 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] -- Dave Weis I believe there are more instances of the abridgement [EMAIL PROTECTED] of the freedom of the people by gradual and silent encroachments of those in power than by violent and sudden usurpations.- James Madison -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Logic:iterate
Hi, I have a logic:iterate tag, where I'm trying to create indexed html:texts . this part if fine... My problem is that the labels for each field are also part of my bean being iterated (internationalization and type of text I'm asking the user... just in case you're wandering). But, I just realized that bean:write does not accept the indexed=true attribute... Any Ideas how to overcome this limitation? Regards, Marcelo. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: jbuilder jsp and struts tags
No, I have not. My understanding is that you need Enterprise to debug JSPs. If you find out please let me know. From: Ben Kafka [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: jbuilder jsp and struts tags Date: Tue, 5 Feb 2002 08:35:51 -0700 Was wondering if anyone has been able to set break points in jbuilder6 for struts tags when debugging jsp. I can set a breakpoint on a regular jsp tag but not in a struts one e.g. html:text -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] _ 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]
RE: Formatting Dates, Integers...
NO! Either create the simple date format for each user;s session public final static String UNIVERSAL_DATE_FORMAT_KEY= UNIVERSAL_DATE_FORMAT session.setAttribute( UNIVERSAL_DATE_FORMAT_KEY, new SimpleDateFormat( -MM-dd ) ); or put it in the application context. -- Peter Pilgrim ++44 (0)207-545-9923 Swamped under electionic mails Message History From: [EMAIL PROTECTED] on 04/02/2002 18:34 EST Please respond to Struts Users Mailing List [EMAIL PROTECTED] To: [EMAIL PROTECTED] cc: Subject: RE: Formatting Dates, Integers... So is the answser to create global Format object and synchronize access? -Original Message- From: Jeff Martin [mailto:[EMAIL PROTECTED]] Sent: Monday, February 04, 2002 5:56 PM To: Struts Users Mailing List Subject: RE: Formatting Dates, Integers... Be very careful about using DateFormatter's that way. I learned a hard lesson in a previous project that DateFormater (and even just the format method) is not thread safe. Jeff -- This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Possible to configure NetBeans to use TomCat 4?
Does anyone know how to configure NetBeans for using TomCat 4 instead of the old TomCat? Thanks, - Cody The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: error display
I did. I include html:errors/ in a jsp file. But when validate() function finds error, the jsp page displays something like: ul /ulhr on the screen. Why? --- Henry Lu MCITphone: (734) 936-2063 University of Michigan Medical Center fax: (734) 763-4372 On Tue, 5 Feb 2002, Robert Scaduto wrote: You need to use the html:errors tag. This will display all of the errors that you returned from the validate function of your action form. -Original Message- From: Henry Lu [mailto:[EMAIL PROTECTED]] Sent: Monday, February 04, 2002 7:30 AM To: Struts Users Mailing List Subject: error display WHen there is error in the validate() function, my jsp page only displays ul /ulhr Why? How to let the page display the message specified in the validate() function? --- Henry Lu MCITphone: (734) 936-2063 University of Michigan Medical Center fax: (734) 763-4372 -- 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: How to put useBean data in HTML attribute?
# Richard Yee [EMAIL PROTECTED] on 02/05/2002 12:30:18 AM # To do what you want, try this: # logic:iterate name=myBean property=userList id=currentUser # % String ref = admin_userForm.jsp?user_id= + currentUser; % # html:link href=%= ref %%= currentUser %/html:linkbr # /logic:iterate How about logic:iterate name=myBean property=userList id=currentUser html:link href=admin_userForm.jsp paramName=currentUser paramId=user_id bean:write name=currentUser/ /html:link br /logic:iterate Pavel -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: error display
On Tue, Feb 05, 2002 at 12:12:40PM -0500, Henry Lu wrote: # I did. I include # # html:errors/ # # in a jsp file. But when validate() function finds error, the jsp page # displays something like: # # ul # /ulhr # # on the screen. # # Why? Have you provided the messages for all the keys inserted into ActionErrors? I experienced the same behavior when I forgot to include them. Pavel -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Design question about ActionForm's validate method
Hi, I've stumbled across a subtle problem/design question that I don't see mentioned in the documentation. The ActionForm's validate method can be configured to verify form data from a page and generate error messages which may then be displayed on the page for the user to see. This works fine when the user has accessed the page by specifying a JSP file in the URL. When the user accesses the page by calling the Action directly though, the validate method is called before the user ever sees the page, much less inputs valid data to the form. This leads to an unfortunate display of unwarranted error messages. It would be nice if the documentation would provide a rule such as: If one plans on the user calling the Action directly in the URL then one should not use the automatic validation provided by ActionForm. Further, as having two different procedures to generate a page can lead to subtle errors, one should decide whether a page will be accessed as a JSP or as an Action and design for the one scenario. The simplest (and safest) design rule will be to access all pages through either one mechanism or the other. Comments? Sid Stuart
Re: Changing ActionForms in an Action
On Tue, Feb 05, 2002 at 09:29:38AM -0700, Ace wrote: # Can an Action class perform() forward a different ActionForm to the # forwarded jsp # than the one it receives? [...] # (Yes I know the Action can stuff anything into # the session # or request but this is kind of a non-standard way for a jsp to access # its form isn't it?). you can put the entire ActionForm into request attribute with the same name you wrote in form-bean in struts-config.xml You don't need to add any extra code in the JSP. struts-config: form-bean name=myForm type=...MyForm/ ... action path=/blah name=myForm scope=request .../ action: request.setAttribute (myForm, new MyForm (name)); jsp: html:form action=/blah html:text property=name/ /html:form Pavel -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Thread Safety Question (was Formatting Dates, Integers...)
Any use of java.text.DateFormat (or its subclasses) format method is thread unsafe (quite to my surprise). The problem comes from DateFormat holding an instance of a Calendar to help it break the java.util.Date into pieces. When a second thread calls format() while another thread is still in format(), it naturally starts poking the new month/day/etc into the [same!] calendar, overwriting what the first thread put there [and is still using]. It goes downhill from there. I got anything from garbled/mixed dates to NullPointerExceptions, depending on when and where the two threads were. Jeff -Original Message- From: Keith Bacon [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 05, 2002 5:12 AM To: Struts Users Mailing List Subject: Thread Safety Question (was Formatting Dates, Integers...) Do you know what the problem was that made your use of format objects non-thread safe? -Original Message- From: Jeff Martin [mailto:[EMAIL PROTECTED]] Sent: Monday, February 04, 2002 5:56 PM To: Struts Users Mailing List Subject: RE: Formatting Dates, Integers... Be very careful about using DateFormatter's that way. I learned a hard lesson in a previous project that DateFormater (and even just the format method) is not thread safe. Jeff -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Could not locate TLD META-INF/taglib.tld --Again
I am getting the message: Could not locate TLD META-INF/taglib.tld when trying to compile a project in Forte v3. This problem has been reported before and the solution suggested by Andy Noble doesn't seem to be working for me. I have the TLD's in WEB-INF directory and open the appropriate TLD's before compiling as suggested, but still get the error message. Anyone have an answer? Bob Williams -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Next release of Struts
Struts is really picking up momentum, being written about in the new Java TOols for XP and on the boards over at The Serverside and elsewhere. I'd like to point more people to oward it, but there is so much required functionality that is only in the nightly builds. Is there a timeline/target for the next release of struts, with the current functionality? Is there a discussion going on about this somewhere that I am missing? Adam -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Wizard Interface question
I never said that the approach you outlined will not work. What I said was it will probably not work if you need transactional control. Let me clarify. Consider the case of a wizard interface where you have contact info on one form (or tab if you will) and billing info on another tab. Now storing just the contact info in the db when the first form is submitted will leave your database in an inconsistent state if the user does not complete the second form and cancels out of the registration. Storing the information in the session will allow you to have all the required data even if the UI designers decide to move fields around in the tabs. All of the data can be written to the database on the final submit. If you mean a temporary database that holds the data from each form and then you update all of your required data at one time on the final submit then obviously your approach will work also. In that case your temp db (I am assuming this is maintained by the webAppWriter) is just replacing the session. PS: I have not used either Expresso or webAppWriter which explains why I say probably and I think in my emails. -Original Message- From: Pete Carapetyan [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 05, 2002 10:44 AM To: Struts Users Mailing List Subject: Re: Wizard Interface question Jakkampudi, ChandraseKhar wrote: I dont think this approach will work if you need transactional control across the different tabs of the wizard. For example if it is a registration wizard that collects contact info and billing info on different tabs, using different forms and commiting to the database will leave you with a lot of problems. Perhaps I do not understand what you are saying, but Expresso does this all day every day, and it has worked like a charm for (years?). When you create a registration app with webAppWriter, for example, you can have any number of tables as registration requirements, and each have it's own CRUD views separately maintained, or alternatively, one set of MVC CRUD views for the whole thing, while still maintaining each table as a separate registration requirement. If you don't believe it, go to webAppWriter.com and create a registration app. Takes about 10 minutes, plus a few minutes to wait for the zip file in your email. There are also tutorials on how to set up a quick Expresso test installation, so you won't mess with your existing apps or app server. Results, not theory about what won't work and why. But then again, if you can shoot holes in it, that is fine too. We use a single form and store it in the session rather than the request eliminating the need for the hidden variables as proposed by somebody else. I notice that this is what you originally proposed. This approach works very well for us (thought there is a bit of clean-up at the cancel or submit) -Original Message- From: Pete Carapetyan [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 05, 2002 10:22 AM To: Struts Users Mailing List Subject: Re: Wizard Interface question Pete Serafin wrote: I am trying to develop an interface for entering data for one object across multiple forms as in a wizard interface. Can anyone describe the best way to approach the design of this type of functionality. Doubt that there is any one right way, but webAppWriter keeps everything in a database, and uses many different forms, one for each of the CRUD operations for each of the three tables it maintains (App, Tables, Fields). Lots of forms, but each only has to do one thing. This approach allows anyone to start or stop anywhere within the process, and their state is always intact and can be picked up at any stage within the process. Oddly enough, this same thing is true of each of the applications it produces, though I never thought of them as Wizard forms before. To be a wizard, all it takes is some result that happens after the data is sucked in. It would seem that this is much more scalable than sticking everything in a session, but it was also a lot easier for me to do this way. It seems to be the way Expresso is designed to work. Plus, users would go nuts if they had to get everything done in a session. Does it work ? Has about 9 months without a problem, though only since posting on the struts resource page has it been getting heavy use. I was thinking that the actionforms would be stored in the user session until a submit to database or a cancel is requested. Is this the best way to handle this? Thanks, Pete Serafin -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- Pete Carapetyan http://datafundamentals.com Java Development Services Open standards technology for commercial profitability -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL
Re: error display
Here is my code: errors.add(ActionErrors.GLOBAL_ERROR, new ActionError(error.id.required, id=123)); Could you send me part of your code? Thanks, --- Henry Lu MCITphone: (734) 936-2063 University of Michigan Medical Center fax: (734) 763-4372 On Tue, 5 Feb 2002, Pavel Nejedly wrote: On Tue, Feb 05, 2002 at 12:12:40PM -0500, Henry Lu wrote: # I did. I include # # html:errors/ # # in a jsp file. But when validate() function finds error, the jsp page # displays something like: # # ul # /ulhr # # on the screen. # # Why? Have you provided the messages for all the keys inserted into ActionErrors? I experienced the same behavior when I forgot to include them. Pavel -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Wizard Interface question
All that is not necessary. You can have the ActionForm bean placed in session scope, and allow different JSP pages to fill out the properties. This is configured in the struts config file. Taylor -Original Message- From: Stephen Owens [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 05, 2002 9:55 AM To: Struts Users Mailing List Subject: RE: Wizard Interface question Peter, Actually, for wizards I have usually just created a single large actionForm that has all the fields for all pages of the wizard and I just have it in the request. I use hidden fields on other pages of the wizard to carry the values from page to page. That way the page designer can dynamically move fields to any page they want without modifying the layout of the actionForm. regards, Stephen Owens Corner Software -Original Message- From: Pete Serafin [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 05, 2002 10:53 AM To: [EMAIL PROTECTED] Subject: Wizard Interface question I am trying to develop an interface for entering data for one object across multiple forms as in a wizard interface. Can anyone describe the best way to approach the design of this type of functionality. I was thinking that the actionforms would be stored in the user session until a submit to database or a cancel is requested. Is this the best way to handle this? Thanks, Pete Serafin -- 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: Design question about ActionForm's validate method
Direct the user to an action that isn't the action associated with the page in question, even if all that action does is forward to the JSP page. Generally the action's associated with a JSP page get called from that JSP page. ActionA forwards to B.JSP, B.JSP submits to ActionB and so on... Alternately provide a hidden form variable in your page, in your validation method, check for it, if it's not there, don't continue validating as the user did not just submit the page. Robert Nocera New England Open Solutions www.neosllc.com You supply the vision, we'll do the rest. -Original Message- From: Sid Stuart [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 05, 2002 12:25 PM To: Struts Users Mailing List Subject: Design question about ActionForm's validate method Hi, I've stumbled across a subtle problem/design question that I don't see mentioned in the documentation. The ActionForm's validate method can be configured to verify form data from a page and generate error messages which may then be displayed on the page for the user to see. This works fine when the user has accessed the page by specifying a JSP file in the URL. When the user accesses the page by calling the Action directly though, the validate method is called before the user ever sees the page, much less inputs valid data to the form. This leads to an unfortunate display of unwarranted error messages. It would be nice if the documentation would provide a rule such as: If one plans on the user calling the Action directly in the URL then one should not use the automatic validation provided by ActionForm. Further, as having two different procedures to generate a page can lead to subtle errors, one should decide whether a page will be accessed as a JSP or as an Action and design for the one scenario. The simplest (and safest) design rule will be to access all pages through either one mechanism or the other. Comments? Sid Stuart -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Design question about ActionForm's validate method
I made this same 'mistake'. Actions MUST only be called when a form is submitted. Never to generate the JSP. Thats why they are called actions. Or two put it another way, you do need several URL's a) URL to JSP on a GET b) URL to action the POST The easiert way to do it is to have all forwards going directly to the JSP, and all actions in the pages going to .do. At first it seems rubish, but then you hopefully buy into the model view controller idea. i.e NO business logic in the page and it all starts to make perfect sence. But you really do have to buy into it otherwise you are fighting urge to ditch it all and go back to brilliant servlets, nice and easy, total power etc etc. Jonathan Message History From: Sid Stuart [EMAIL PROTECTED] on 05/02/2002 09:24 PST Please respond to Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] cc: Subject: Design question about ActionForm's validate method Hi, I've stumbled across a subtle problem/design question that I don't see mentioned in the documentation. The ActionForm's validate method can be configured to verify form data from a page and generate error messages which may then be displayed on the page for the user to see. This works fine when the user has accessed the page by specifying a JSP file in the URL. When the user accesses the page by calling the Action directly though, the validate method is called before the user ever sees the page, much less inputs valid data to the form. This leads to an unfortunate display of unwarranted error messages. It would be nice if the documentation would provide a rule such as: If one plans on the user calling the Action directly in the URL then one should not use the automatic validation provided by ActionForm. Further, as having two different procedures to generate a page can lead to subtle errors, one should decide whether a page will be accessed as a JSP or as an Action and design for the one scenario. The simplest (and safest) design rule will be to access all pages through either one mechanism or the other. Comments? Sid Stuart -- This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Could not locate TLD META-INF/taglib.tld --Again
Please ignore this message! I found the errorjust DUMB! bob - Original Message - From: Bob Williams [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Tuesday, February 05, 2002 11:27 AM Subject: Could not locate TLD META-INF/taglib.tld --Again I am getting the message: Could not locate TLD META-INF/taglib.tld when trying to compile a project in Forte v3. This problem has been reported before and the solution suggested by Andy Noble doesn't seem to be working for me. I have the TLD's in WEB-INF directory and open the appropriate TLD's before compiling as suggested, but still get the error message. Anyone have an answer? Bob Williams -- 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: error display
On Tue, Feb 05, 2002 at 12:30:25PM -0500, Henry Lu wrote: # Here is my code: # errors.add(ActionErrors.GLOBAL_ERROR, # new ActionError(error.id.required, id=123)); then you have to provide message for the key error.id.required. check the content of the file you specified as application parameter of the ActionServlet. eg. if you have servlet servlet-nameaction/servlet-name servlet-classorg.apache.struts.action.ActionServlet/servlet-class init-param param-nameapplication/param-name param-valuemy.Msg/param-value then the properties file should be one of WEB-INF/classes/my/Msg.properties, WEB-INF/classes/my/Msg_xx.properties or WEB-INF/classes/my/Msg_xx_YY.properties where xx_YY is the current locale the appropriate properties file should contain error.id.required=You must supply a valid id. or something like this. Does it help? # Could you send me part of your code? it looks the same... :) Pavel -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: J2EE BluePrints and Struts
Looks good. I like the command to iteration set up. Would a page object help? I realize that this would sort of be an iterator of iterators. Also, does making the contstuctor public make sense? Ususally the command acts as the factory for the iterator. An alternative is the builder pattern: The PageDirector calls addElement to the PageIteratorBuilder. When complete, call getIterator, which detaches the Iterator and returns it. It really depends on whether you want the Iterator to be updatable or not. You may want to have a non updatable one, and then an updatable one that extends it. SIROLLI PIERRE wrote: --- Reçu de RVIDOI.SIROLLPI 62607 05/02/02 16.05 Please find attached an UML representation of the implementation of the page by page iterator. It provides places where you can plug into the model (execute(), fetchsize)and the rest (eg the utility layer movecursor,size.. ) is left to the implementation. Pierre -- Date: Tue, 5 Feb 2002 08:58:37 -0500 Subject: Re: J2EE BluePrints and Struts Oleg had a pager as part of his BeanFactory, but that was never made part of the framework. Perhaps he will get back to that after the ServiceManager work (Go Oleg!). Generally, these type of model-centric patterns do not need be a part of the core framework. The framework provides places where you can plug into the model (Actions). And ways to pass control back and forth between the View (struts-config elements). But the implementation of something like paging is an excercise left to the developer. A patterns-based approach to paging might be something I would put into the optional Scaffold package, which has a number of implementation-pattern type classes. SIROLLI PIERRE wrote: --- Reçu de RVIDOI.SIROLLPI 62607 05/02/02 09.26 Ted, I wrote an implementation of the page by page iterator J2EE design pattern. Is this pattern already implemented in Struts ? Pierre Date: Mon, 4 Feb 2002 06:07:20 -0500 Subject: Re: J2EE BluePrints and Struts This type of message can also be posted to the USER list, since it does not involve the present or future development of Struts. But anyway, the Blueprints are just that -- plans. Struts implements many of the patterns and strategies described in the BluePrints and in Core J2EE Patterns http://www.amazon.com/exec/obidos/ISBN=0130648841/hitchhikeguidetoA/ But was doing so before each of these were released, based on prior patterns literature. In fact, Struts code was used as the example implementation for Synchronizer Token strategy. Working from the Core J2EE Patterns terminology, Struts employs a number of cataloged patterns, including Service to Worker (ActionServlet, Action classes, ContextHelper), Front Controller, Singleton (ActionServlet), Dispatcher, View Helper, Session Facade, Singleton (Action classes), Value Objects (ActionForm, ActionErrors), View Helper (ActionForm, ContextHelper, tag extensions), Composite View (Template and Tiles taglibs), Synchronizer Token (Action class methods). -- Ted Husted, Husted dot Com, Fairport NY USA. -- Java Web Development with Struts. -- Tel +1 585 737-3463. -- Web http://www.husted.com/struts/ [EMAIL PROTECTED] wrote: Hi, I am new to this framework and to this list. Can anybody tell me how this framework differs from the Sun's framework J2EE BluePrints ? What is the strength of the framework when compared to the BluePrints? If there are any articles available, please let me know. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] 05/02/02 09.26 Envoyé à - - husted(a)apache.org - struts-dev(a)jakarta.apache.org -- Ted Husted, Husted dot Com, Fairport NY USA. -- Java Web Development with Struts. -- Tel +1 585 737-3463. -- Web http://www.husted.com/struts/ 05/02/02 16.05 Envoyé à --- - husted(a)apache.org CC: - struts-user(a)jakarta.apache.org -- 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: Wizard Interface question / Hi Taylor
Hi Taylor, are you the Taylor that used to work for Brightstar in Dallas - Original Message - From: Taylor Cowan [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Tuesday, February 05, 2002 12:33 PM Subject: RE: Wizard Interface question All that is not necessary. You can have the ActionForm bean placed in session scope, and allow different JSP pages to fill out the properties. This is configured in the struts config file. Taylor -Original Message- From: Stephen Owens [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 05, 2002 9:55 AM To: Struts Users Mailing List Subject: RE: Wizard Interface question Peter, Actually, for wizards I have usually just created a single large actionForm that has all the fields for all pages of the wizard and I just have it in the request. I use hidden fields on other pages of the wizard to carry the values from page to page. That way the page designer can dynamically move fields to any page they want without modifying the layout of the actionForm. regards, Stephen Owens Corner Software -Original Message- From: Pete Serafin [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 05, 2002 10:53 AM To: [EMAIL PROTECTED] Subject: Wizard Interface question I am trying to develop an interface for entering data for one object across multiple forms as in a wizard interface. Can anyone describe the best way to approach the design of this type of functionality. I was thinking that the actionforms would be stored in the user session until a submit to database or a cancel is requested. Is this the best way to handle this? Thanks, Pete Serafin -- 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] _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Jsp in another Jsp using struts
Hi Can anyone tell me how can i include a jsp page into another jsp using struts??? thanks in advance Kalpana -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Jsp in another Jsp using struts
You dont need struts for this. Just use %@ include file=xxx.jsp % wherever you want to insert your JSP file. -Original Message- From: Kalpana RamiReddy [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 05, 2002 11:54 AM To: Struts Users Mailing List Subject: Jsp in another Jsp using struts Hi Can anyone tell me how can i include a jsp page into another jsp using struts??? thanks in advance Kalpana -- 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: Design question about ActionForm's validate method
I'm fairly new to struts (well, about 24 hours actually) and this message touches on a concept that I've having trouble grasping. Are you saying that your site should never allow the user to navigate to a URL that maps to an Action unless you are submitting a form? This is my example and although it's actually working in practice it doesn't really feel right to me and doesn't conform to above rule. I hope I've included enough detail and would appreciate any clues on good design. 1. User goes to the home page and clicks on a Find a client link. 2. This link points to /find/client.do which is defined as an ActionMapping as follows: action path=/find/client type=mysite.actions.FindClientAction name=clientFindForm scope=request input=/pages/findclient.jsp forward name=newsearch path=/pages/findClient.jsp/ /action 3. The code in FindClientAction ensures that the user is authenticated and then populates some request scoped attributes that enabled /pages/findClient.jsp to function correctly. /pagesfindClient.jsp displays a form to allow the user to enter search criteria. 4. The submit action for the form in /pages/findClient.jsp is /find/getresults which is defined as an ActionMapping as follows: action path=/find/clientresults type=mysite.actions.FindClientResultsAction name=clientFindForm scope=request input=/pages/findclient.jsp forward name=success path=/pages/findClientResults.jsp/ /action 5. The code in FindClientResultsAction examines the contents of the clientFindForm and contstructs a SQL statement to retrieve the correct data. 6. /pages/findClientResults.jsp renders the results from the database. Matt. -Original Message- From: Jonathan Gibbons [mailto:[EMAIL PROTECTED]] Sent: 05 February 2002 17:44 To: Struts Users Mailing List Subject: Re: Design question about ActionForm's validate method I made this same 'mistake'. Actions MUST only be called when a form is submitted. Never to generate the JSP. Thats why they are called actions. Or two put it another way, you do need several URL's a) URL to JSP on a GET b) URL to action the POST The easiert way to do it is to have all forwards going directly to the JSP, and all actions in the pages going to .do. At first it seems rubish, but then you hopefully buy into the model view controller idea. i.e NO business logic in the page and it all starts to make perfect sence. But you really do have to buy into it otherwise you are fighting urge to ditch it all and go back to brilliant servlets, nice and easy, total power etc etc. Jonathan Message History From: Sid Stuart [EMAIL PROTECTED] on 05/02/2002 09:24 PST Please respond to Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] cc: Subject: Design question about ActionForm's validate method Hi, I've stumbled across a subtle problem/design question that I don't see mentioned in the documentation. The ActionForm's validate method can be configured to verify form data from a page and generate error messages which may then be displayed on the page for the user to see. This works fine when the user has accessed the page by specifying a JSP file in the URL. When the user accesses the page by calling the Action directly though, the validate method is called before the user ever sees the page, much less inputs valid data to the form. This leads to an unfortunate display of unwarranted error messages. It would be nice if the documentation would provide a rule such as: If one plans on the user calling the Action directly in the URL then one should not use the automatic validation provided by ActionForm. Further, as having two different procedures to generate a page can lead to subtle errors, one should decide whether a page will be accessed as a JSP or as an Action and design for the one scenario. The simplest (and safest) design rule will be to access all pages through either one mechanism or the other. Comments? Sid Stuart -- This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. -- 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: Wizard Interface question / Hi Taylor
--- Guillaume Labelle [EMAIL PROTECTED] wrote: Hi Taylor, are you the Taylor that used to work for Brightstar in Dallas - Original Message - From: Taylor Cowan [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Tuesday, February 05, 2002 12:33 PM Subject: RE: Wizard Interface question All that is not necessary. You can have the ActionForm bean placed in session scope, and allow different JSP pages to fill out the properties. This is configured in the struts config file. Taylor -Original Message- From: Stephen Owens [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 05, 2002 9:55 AM To: Struts Users Mailing List Subject: RE: Wizard Interface question Peter, Actually, for wizards I have usually just created a single large actionForm that has all the fields for all pages of the wizard and I just have it in the request. I use hidden fields on other pages of the wizard to carry the values from page to page. That way the page designer can dynamically move fields to any page they want without modifying the layout of the actionForm. regards, Stephen Owens Corner Software -Original Message- From: Pete Serafin [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 05, 2002 10:53 AM To: [EMAIL PROTECTED] Subject: Wizard Interface question I am trying to develop an interface for entering data for one object across multiple forms as in a wizard interface. Can anyone describe the best way to approach the design of this type of functionality. I was thinking that the actionforms would be stored in the user session until a submit to database or a cancel is requested. Is this the best way to handle this? Thanks, Pete Serafin -- 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] _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] __ Do You Yahoo!? Send FREE Valentine eCards with Yahoo! Greetings! http://greetings.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Wizard Interface question
Taylor, Just to clarify. Putting the ActionForm in the session is simpler, but it doesn't scale as well because your session grows. It also is one more thing to worry about if you have multiple application servers and you need to support failover. So, while I agree that session beans are an option, I think in general you should avoid them where you can. regards, Stephen Owens Corner Software -Original Message- From: Taylor Cowan [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 05, 2002 12:33 PM To: Struts Users Mailing List Subject: RE: Wizard Interface question All that is not necessary. You can have the ActionForm bean placed in session scope, and allow different JSP pages to fill out the properties. This is configured in the struts config file. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Thread Safety Question (was Formatting Dates, Integers...)
Very interesting, thank you Jeff. I am using an instance of the date format class as a private member variable in one of my buisiness objects. Each client request has one of these business objects created and placed into the session for use, as mentioned previously I too use a new getter method to provide formated dates to my jsp's. I believe this use is thread safe in that I am not creating any new threads in my app. Some developers have mentioned that the DateFormat objects are heavy weight(too heavy for each client session?). Should the date format object only have local scope in a method or be a globaly syncronized object for all to use? -Original Message- From: Jeff Martin [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 05, 2002 12:26 PM To: Struts Users Mailing List Subject: RE: Thread Safety Question (was Formatting Dates, Integers...) Any use of java.text.DateFormat (or its subclasses) format method is thread unsafe (quite to my surprise). The problem comes from DateFormat holding an instance of a Calendar to help it break the java.util.Date into pieces. When a second thread calls format() while another thread is still in format(), it naturally starts poking the new month/day/etc into the [same!] calendar, overwriting what the first thread put there [and is still using]. It goes downhill from there. I got anything from garbled/mixed dates to NullPointerExceptions, depending on when and where the two threads were. Jeff -Original Message- From: Keith Bacon [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 05, 2002 5:12 AM To: Struts Users Mailing List Subject: Thread Safety Question (was Formatting Dates, Integers...) Do you know what the problem was that made your use of format objects non-thread safe? -Original Message- From: Jeff Martin [mailto:[EMAIL PROTECTED]] Sent: Monday, February 04, 2002 5:56 PM To: Struts Users Mailing List Subject: RE: Formatting Dates, Integers... Be very careful about using DateFormatter's that way. I learned a hard lesson in a previous project that DateFormater (and even just the format method) is not thread safe. Jeff -- 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: error display
Here is my ApplicationResource.properties file used ./classes directory errors.header=ul errors.footer=/ulhr errors.id.required=id is required. --- Here is my validate() function if (id == null || id.equals(123) == false) { errors.add(ActionErrors.GLOBAL_ERROR, new ActionError(error.id.required, id=123)); } --- Here is my jsp file h1Hello, STRUTS! Enter ID:/h1 hr html:errors / html:form action=/saveIdForm --- Did I miss something? Thanks, --- Henry Lu MCITphone: (734) 936-2063 University of Michigan Medical Center fax: (734) 763-4372 On Tue, 5 Feb 2002, Pavel Nejedly wrote: On Tue, Feb 05, 2002 at 12:30:25PM -0500, Henry Lu wrote: # Here is my code: # errors.add(ActionErrors.GLOBAL_ERROR, # new ActionError(error.id.required, id=123)); then you have to provide message for the key error.id.required. check the content of the file you specified as application parameter of the ActionServlet. eg. if you have servlet servlet-nameaction/servlet-name servlet-classorg.apache.struts.action.ActionServlet/servlet-class init-param param-nameapplication/param-name param-valuemy.Msg/param-value then the properties file should be one of WEB-INF/classes/my/Msg.properties, WEB-INF/classes/my/Msg_xx.properties or WEB-INF/classes/my/Msg_xx_YY.properties where xx_YY is the current locale the appropriate properties file should contain error.id.required=You must supply a valid id. or something like this. Does it help? # Could you send me part of your code? it looks the same... :) Pavel -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Next release of Struts
Yes, we are pretty much at feature lock, and working toward a release candidate. Mostly documentation and testing of the newest features. Adam wrote: Struts is really picking up momentum, being written about in the new Java TOols for XP and on the boards over at The Serverside and elsewhere. I'd like to point more people to oward it, but there is so much required functionality that is only in the nightly builds. Is there a timeline/target for the next release of struts, with the current functionality? Is there a discussion going on about this somewhere that I am missing? Adam -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- Ted Husted, Husted dot Com, Fairport NY USA. -- Java Web Development with Struts. -- Tel +1 585 737-3463. -- Web http://www.husted.com/struts/ -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Jsp in another Jsp using struts
I want to add a jsp page as a footer/bottom to every other Jsp pages but %@ include file=xxx.jsp % is used at the top i guess??? Thanks in advance Kalpana On Tue, 05 Feb 2002 Jakkampudi, ChandraseKhar wrote : You dont need struts for this. Just use %@ include file=xxx.jsp % wherever you want to insert your JSP file. -Original Message- From: Kalpana RamiReddy [mailto:[EMAIL PROTECTED] m] Sent: Tuesday, February 05, 2002 11:54 AM To: Struts Users Mailing List Subject: Jsp in another Jsp using struts Hi Can anyone tell me how can i include a jsp page into another jsp using struts??? thanks in advance Kalpana -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:struts-user-unsubscrib- [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: error display
You have a typo. Change your validate to new ActionError(errors.id.required, id=123)); or your ApplicationResources.properties to error.id.required= blah Note the 's' at the end of errors in your applicationresources file -Original Message- From: Henry Lu [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 05, 2002 12:03 PM To: Pavel Nejedly Cc: Struts Users Mailing List Subject: Re: error display Here is my ApplicationResource.properties file used ./classes directory errors.header=ul errors.footer=/ulhr errors.id.required=id is required. --- Here is my validate() function if (id == null || id.equals(123) == false) { errors.add(ActionErrors.GLOBAL_ERROR, new ActionError(error.id.required, id=123)); } --- Here is my jsp file h1Hello, STRUTS! Enter ID:/h1 hr html:errors / html:form action=/saveIdForm --- Did I miss something? Thanks, --- Henry Lu MCITphone: (734) 936-2063 University of Michigan Medical Center fax: (734) 763-4372 On Tue, 5 Feb 2002, Pavel Nejedly wrote: On Tue, Feb 05, 2002 at 12:30:25PM -0500, Henry Lu wrote: # Here is my code: # errors.add(ActionErrors.GLOBAL_ERROR, # new ActionError(error.id.required, id=123)); then you have to provide message for the key error.id.required. check the content of the file you specified as application parameter of the ActionServlet. eg. if you have servlet servlet-nameaction/servlet-name servlet-classorg.apache.struts.action.ActionServlet/servlet-class init-param param-nameapplication/param-name param-valuemy.Msg/param-value then the properties file should be one of WEB-INF/classes/my/Msg.properties, WEB-INF/classes/my/Msg_xx.properties or WEB-INF/classes/my/Msg_xx_YY.properties where xx_YY is the current locale the appropriate properties file should contain error.id.required=You must supply a valid id. or something like this. Does it help? # Could you send me part of your code? it looks the same... :) Pavel -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Jsp in another Jsp using struts
I think you want to use templates. That should solve your problem Jeff Krueger -Original Message- From: Kalpana RamiReddy [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 05, 2002 11:01 AM To: Struts Users Mailing List Subject: RE: Jsp in another Jsp using struts I want to add a jsp page as a footer/bottom to every other Jsp pages but %@ include file=xxx.jsp % is used at the top i guess??? Thanks in advance Kalpana On Tue, 05 Feb 2002 Jakkampudi, ChandraseKhar wrote : You dont need struts for this. Just use %@ include file=xxx.jsp % wherever you want to insert your JSP file. -Original Message- From: Kalpana RamiReddy [mailto:[EMAIL PROTECTED] m] Sent: Tuesday, February 05, 2002 11:54 AM To: Struts Users Mailing List Subject: Jsp in another Jsp using struts Hi Can anyone tell me how can i include a jsp page into another jsp using struts??? thanks in advance Kalpana -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:struts-user-unsubscrib- [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: Jsp in another Jsp using struts
If you want to include the file as a footer consider using the template taglibs. Include can be used anywhere not just at the top but for your problem using templates would be a better idea. -Original Message- From: Kalpana RamiReddy [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 05, 2002 12:01 PM To: Struts Users Mailing List Subject: RE: Jsp in another Jsp using struts I want to add a jsp page as a footer/bottom to every other Jsp pages but %@ include file=xxx.jsp % is used at the top i guess??? Thanks in advance Kalpana On Tue, 05 Feb 2002 Jakkampudi, ChandraseKhar wrote : You dont need struts for this. Just use %@ include file=xxx.jsp % wherever you want to insert your JSP file. -Original Message- From: Kalpana RamiReddy [mailto:[EMAIL PROTECTED] m] Sent: Tuesday, February 05, 2002 11:54 AM To: Struts Users Mailing List Subject: Jsp in another Jsp using struts Hi Can anyone tell me how can i include a jsp page into another jsp using struts??? thanks in advance Kalpana -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:struts-user-unsubscrib- [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: error display
On Tue, Feb 05, 2002 at 01:03:18PM -0500, Henry Lu wrote: # Here is my ApplicationResource.properties file used ./classes # directory # # errors.header=ul # errors.footer=/ulhr # errors.id.required=id is required. # --- # Here is my validate() function # # if (id == null || id.equals(123) == false) { # errors.add(ActionErrors.GLOBAL_ERROR, # new ActionError(error.id.required, id=123)); # } # --- you have mis-spelled the error key - in ApplicationResource.properties you have 'errors', but in the form only 'error'. Btw. I suggest you put the error message inside li/li, so that 1) you have correct html 2) if there were more errors, the would have their own lines in the list Pavel -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Jsp in another Jsp using struts
could u please explain me how to use templates... Thanks in advance Kalpana On Tue, 05 Feb 2002 Jakkampudi, ChandraseKhar wrote : If you want to include the file as a footer consider using the template taglibs. Include can be used anywhere not just at the top but for your problem using templates would be a better idea. -Original Message- From: Kalpana RamiReddy [mailto:[EMAIL PROTECTED] m] Sent: Tuesday, February 05, 2002 12:01 PM To: Struts Users Mailing List Subject: RE: Jsp in another Jsp using struts I want to add a jsp page as a footer/bottom to every other Jsp pages but %@ include file=xxx.jsp % is used at the top i guess??? Thanks in advance Kalpana On Tue, 05 Feb 2002 Jakkampudi, ChandraseKhar wrote : You dont need struts for this. Just use %@ include file=xxx.jsp % wherever you want to insert your JSP file. -Original Message- From: Kalpana RamiReddy [mailto:[EMAIL PROTECTED] co- m] Sent: Tuesday, February 05, 2002 11:54 AM To: Struts Users Mailing List Subject: Jsp in another Jsp using struts Hi Can anyone tell me how can i include a jsp page into another jsp using struts??? thanks in advance Kalpana -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:struts-user-unsubscr- ib- [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:struts-user-unsubscrib- [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: Wizard Interface question
Stephen, Session persistence across app servers would be an issue anyways if you put anything in the session would it not? So are you suggesting that if a project might migrate from single app server to multiple, then nothing should be in session scope? If atleast some objects are stored in session, then the solution that allows all app servers to access the same session should take care of everything. We haven't used multiple app servers and we are in the early stages of development on our project so I would really appreciate any feedback -Original Message- From: Stephen Owens [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 05, 2002 12:02 PM To: Struts Users Mailing List Subject: RE: Wizard Interface question Taylor, Just to clarify. Putting the ActionForm in the session is simpler, but it doesn't scale as well because your session grows. It also is one more thing to worry about if you have multiple application servers and you need to support failover. So, while I agree that session beans are an option, I think in general you should avoid them where you can. regards, Stephen Owens Corner Software -Original Message- From: Taylor Cowan [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 05, 2002 12:33 PM To: Struts Users Mailing List Subject: RE: Wizard Interface question All that is not necessary. You can have the ActionForm bean placed in session scope, and allow different JSP pages to fill out the properties. This is configured in the struts config file. -- 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: error display
Great! It works now! Thank you very much! --- Henry Lu MCITphone: (734) 936-2063 University of Michigan Medical Center fax: (734) 763-4372 On Tue, 5 Feb 2002, Jakkampudi, ChandraseKhar wrote: You have a typo. Change your validate to new ActionError(errors.id.required, id=123)); or your ApplicationResources.properties to error.id.required= blah Note the 's' at the end of errors in your applicationresources file -Original Message- From: Henry Lu [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 05, 2002 12:03 PM To: Pavel Nejedly Cc: Struts Users Mailing List Subject: Re: error display Here is my ApplicationResource.properties file used ./classes directory errors.header=ul errors.footer=/ulhr errors.id.required=id is required. --- Here is my validate() function if (id == null || id.equals(123) == false) { errors.add(ActionErrors.GLOBAL_ERROR, new ActionError(error.id.required, id=123)); } --- Here is my jsp file h1Hello, STRUTS! Enter ID:/h1 hr html:errors / html:form action=/saveIdForm --- Did I miss something? Thanks, --- Henry Lu MCITphone: (734) 936-2063 University of Michigan Medical Center fax: (734) 763-4372 On Tue, 5 Feb 2002, Pavel Nejedly wrote: On Tue, Feb 05, 2002 at 12:30:25PM -0500, Henry Lu wrote: # Here is my code: # errors.add(ActionErrors.GLOBAL_ERROR, # new ActionError(error.id.required, id=123)); then you have to provide message for the key error.id.required. check the content of the file you specified as application parameter of the ActionServlet. eg. if you have servlet servlet-nameaction/servlet-name servlet-classorg.apache.struts.action.ActionServlet/servlet-class init-param param-nameapplication/param-name param-valuemy.Msg/param-value then the properties file should be one of WEB-INF/classes/my/Msg.properties, WEB-INF/classes/my/Msg_xx.properties or WEB-INF/classes/my/Msg_xx_YY.properties where xx_YY is the current locale the appropriate properties file should contain error.id.required=You must supply a valid id. or something like this. Does it help? # Could you send me part of your code? it looks the same... :) Pavel -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- 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: Jsp in another Jsp using struts
This link should help you http://jakarta.apache.org/struts/api-1.0/org/apache/struts/taglib/template/p ackage-summary.html#package_description -Original Message- From: Kalpana RamiReddy [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 05, 2002 12:11 PM To: Struts Users Mailing List Subject: RE: Jsp in another Jsp using struts could u please explain me how to use templates... Thanks in advance Kalpana On Tue, 05 Feb 2002 Jakkampudi, ChandraseKhar wrote : If you want to include the file as a footer consider using the template taglibs. Include can be used anywhere not just at the top but for your problem using templates would be a better idea. -Original Message- From: Kalpana RamiReddy [mailto:[EMAIL PROTECTED] m] Sent: Tuesday, February 05, 2002 12:01 PM To: Struts Users Mailing List Subject: RE: Jsp in another Jsp using struts I want to add a jsp page as a footer/bottom to every other Jsp pages but %@ include file=xxx.jsp % is used at the top i guess??? Thanks in advance Kalpana On Tue, 05 Feb 2002 Jakkampudi, ChandraseKhar wrote : You dont need struts for this. Just use %@ include file=xxx.jsp % wherever you want to insert your JSP file. -Original Message- From: Kalpana RamiReddy [mailto:[EMAIL PROTECTED] co- m] Sent: Tuesday, February 05, 2002 11:54 AM To: Struts Users Mailing List Subject: Jsp in another Jsp using struts Hi Can anyone tell me how can i include a jsp page into another jsp using struts??? thanks in advance Kalpana -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:struts-user-unsubscr- ib- [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:struts-user-unsubscrib- [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]
bean passing
I'm new to Struts, but have read most of the doc and examples. One basic thing that I can't quite put a finger on: how do you pass all these beans around that are consumed by the jsp's? For example, say you have a bean containing user's search results. Your display page only shows 10 at a time, and uses next and previous buttons. So, you have to persist the results from page to page. Obviously, you could explicitly add the bean to the session in the action.perform(), then reference the bean with tags using session scope. This is essentially the same way you'd do it even if you weren't using Struts. So, is there a mechanism in Struts that I should be using instead? Either it is simpler than I thought, or I am missing something obvious. Thanks, Mike -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Wizard Interface question
Well there's two issues there. The first is scalability, obviously keeping your session small helps you scale, so it's a good thing for that reason. The second is session persistence. I guess my position on it is that anything you have to persist complicates the design and slows the application down. So, even if the application server can completely transparently handle the session persistence for your actionForm you still incur a speed penalty for having it there. And, in general it forces you to think about the persistence characteristics of your actionForms, which is an issue you don't have if they're not in the session. So, on balance, unless there's a good reason to put something in the session I don't. I'm curious to hear any other perspectives on this issue as well. regards, Stephen Owens Corner Software -Original Message- From: Jakkampudi, ChandraseKhar [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 05, 2002 1:14 PM To: 'Struts Users Mailing List' Subject: RE: Wizard Interface question Stephen, Session persistence across app servers would be an issue anyways if you put anything in the session would it not? So are you suggesting that if a project might migrate from single app server to multiple, then nothing should be in session scope? If atleast some objects are stored in session, then the solution that allows all app servers to access the same session should take care of everything. We haven't used multiple app servers and we are in the early stages of development on our project so I would really appreciate any feedback -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]