Re: Hi....
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]
RE: Hi....
Thankz Amir... -Original Message- From: Amir N. Nashat [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 30, 2002 10:20 AM To: [EMAIL PROTECTED] Subject: Re: Hi 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]
Re: OReilly Struts book
I'd be interested in those reviews as well. Dave Derry [EMAIL PROTECTED] - Original Message - From: Amitkumar J Malhotra [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Tuesday, January 29, 2002 10:13 PM Subject: RE: OReilly Struts book Has anyone tried Professional JSP Site Design if yes then please give me you reviews at my email id -- [EMAIL PROTECTED] any replies will be appreciated rgds amit -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Problem With Forwarding to a non-HTML file
Sending a redirect to the PDF file might work better for your situation. -Max - Original Message - From: Mark Woon [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Tuesday, January 29, 2002 11:28 PM Subject: Problem With Forwarding to a non-HTML file Hi all. I'm using an Action to figure out which document I need to serve, and the document could be a pdf file. The problem is that when I forward to a PDF file, the browser still thinks that it's on the action (get.do), and tries to save the file as get.do. I've set the content-type so it'll spawn the right app, but is there a way to specify the name with which the file gets saved under? Thanks, -Mark -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Hi....
Thankz Luis, thats definitely a great help -Original Message- From: Luis M. Rosso [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 30, 2002 1:56 PM To: Struts Users Mailing List Subject: Re: Hi Hi Chetan, in my case, the following article, which includes samples and appears in the Resources section of Struts' site, was VERY USEFUL as the FIRST or second step in learning Struts: http://developer.bluestone.com/scripts/SaISAPI.dll/StrutsTrailMap.class/stru ts-trailmap/default.htm Hope it helps Luis - Original Message - From: Amir N. Nashat [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, January 30, 2002 5:19 AM Subject: Re: Hi 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]
Re: RES: Tool for Building Visual Java Server Pages
[EMAIL PROTECTED] (Rubens Gama) wrote: Well, dreamweaver also have support struts,now.. But it still have problems related to nested tags... Is this an extension, or a new version? Is so, what version? Duncan Harris ~~~ Hartford, Cheshire, U.K., Tel: 07968 060418 Looking for STRUTS contract work in the U.K. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RES: RES: Tool for Building Visual Java Server Pages
Extension called 'cpwr_optimalj_jsp.mxp'. Do you know? -Mensagem original- De: Duncan Harris [mailto:[EMAIL PROTECTED]] Enviada em: quarta-feira, 30 de janeiro de 2002 11:23 Para: [EMAIL PROTECTED] Assunto: Re: RES: Tool for Building Visual Java Server Pages [EMAIL PROTECTED] (Rubens Gama) wrote: Well, dreamweaver also have support struts,now.. But it still have problems related to nested tags... Is this an extension, or a new version? Is so, what version? Duncan Harris ~~~ Hartford, Cheshire, U.K., Tel: 07968 060418 Looking for STRUTS contract work in the U.K. -- 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: I need help with struts html tags example
Did you set up your struts-config.xml. It appears that it did not find the configuration. _ Send and receive Hotmail on your mobile device: http://mobile.msn.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Form bean and class instance question
Em Ter, 2002-01-29 às 17:48, Bryan P. Glennon escreveu: I must be missing something... I have a class, Foo, whose data I want to display in a form. I have defined an action (NavigateAction) that is invoked when the user makes a selection which will move him/her to the page to disply Foo. This action locates the correct instance of Foo and puts it in a session attribute. I also have a form bean (FooBean) that is associated with the FooAction. This action populates FooBean from information in the Foo object. Right now, I have pretty much duplicated the public interface from Foo in FooBean. It seems like there must be a better way to do this. Anyone care to enlighten me? Take a look at XDoclet[1]. If you code your application The XDoclet Way, it should take care of generating much of your code, including Struts form classes. -- Ja ne, Pazu mailto: [EMAIL PROTECTED] Anime Gaiden: de fãs para fãs, sempre. signature.asc Description: This is a digitally signed message part
Re: Problem With Forwarding to a non-HTML file
Em Qua, 2002-01-30 às 05:28, Mark Woon escreveu: I'm using an Action to figure out which document I need to serve, and the document could be a pdf file. The problem is that when I forward to a PDF file, the browser still thinks that it's on the action (get.do), and tries to save the file as get.do. I've set the content-type so it'll spawn the right app, but is there a way to specify the name with which the file gets saved under? Do not use forward, but a redirect. If you're using the jsp:forward tag, remember to add the redirect=true attribute. -- Ja ne, Pazu mailto: [EMAIL PROTECTED] Anime Gaiden: de fãs para fãs, sempre. signature.asc Description: This is a digitally signed message part
container managed security and login action?
Has anyone been able to capture login information in a struts action and then send it on for j2ee container managed security. I currently have a struts application that uses j2ee container managed security. New requirements state that the password is to be stored in encrypted form which means I will need to take the users password and encrypt it before sending on the the j2ee container for authentication. Has anyone done this? Can this be done? Hints? Tips? Examples? Thanks, Michelle -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Weblogic 61.sp2 struts-html.tld
Hi All, It would appear that the FormTag does not have a title attribute. WebLogic will not deploy Struts apps as the struts-html.tld has a title attribute for the form tag. Is this a bug in Struts. It looks like it...if so can it be fixed in the nightly build? I'm guessing it's just the tld that needs fixing. Any other suggestions. Jon. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: How to perform junit testing of Struts classes?
Hi Michael, Try http://strutstestcase.sourceforge.net/ Jon. -Original Message- From: Michael Mehrle [mailto:[EMAIL PROTECTED]] Sent: 30 January 2002 05:18 To: Struts Users Mailing List Subject: How to perform junit testing of Struts classes? Of course I can imagine writing a junit test suite on my own, but I was wondering if there's something a bit more 'true and tested' out there. Anybody found the holy gral of testing struts code? ;-) -- 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: container managed security and login action?
Hi Michelle, You may need to look at JAAS for this, see: http://java.sun.com/products/jaas/ Alternatively your container may provide bespoke hooks. Jon. -Original Message- From: Michelle Popovits [mailto:[EMAIL PROTECTED]] Sent: 30 January 2002 15:01 To: '[EMAIL PROTECTED]' Subject: container managed security and login action? Has anyone been able to capture login information in a struts action and then send it on for j2ee container managed security. I currently have a struts application that uses j2ee container managed security. New requirements state that the password is to be stored in encrypted form which means I will need to take the users password and encrypt it before sending on the the j2ee container for authentication. Has anyone done this? Can this be done? Hints? Tips? Examples? Thanks, Michelle -- 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: Hi....
Chetan, There is at least one book available on the Struts framework out called Struts Fast Track by Vic Cekvenich. You can check it out on Amazon at http://www.amazon.com/exec/obidos/ASIN/0971661901/qid=1012403446/sr=8-1/ref=sr_8_3_1/102-2150136-4095349. I own this book and personally don't care for the way the information is presented (sorry Vic). It seems to be missing key points and leaves a lot to intrepretation. You should make your own judgement of course. There's apparently another book planned for May release by James Goodwill (also info available on Amazon). A week or so ago, there was a posting about the TOC for a O'Reilly book on struts which looks good, but it will probably be a while.. search the archive for more info. Personally, I've found the information on http://www.husted.com/struts/ and the Bluestone site (already mentioned) to be great resources. This mailing list is also a huge asset. I've been lurking for several months and have learned quite a bit from the people here. If I were doing it all over again.. I'd skip the book and stick to the on-line resources. The framework is evolving pretty fast and print formats will have a difficult time keeping up. Best of luck, Shawn. -Original Message- From: Chetan Khimjee [EMAIL PROTECTED] Date: Wed Jan 30 02:19:07 GMT-06:00 2002 To: 'Struts Users Mailing List' [EMAIL PROTECTED] Subject: RE: Hi Thankz Amir... -Original Message- From: Amir N. Nashat [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 30, 2002 10:20 AM To: [EMAIL PROTECTED] Subject: Re: Hi 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]
Prepopulate radio button
How can I prepopulate the radio buttons with the value coming from database and also be able to reselect a different value when I am submitting the form again. My scenario is I have a save task where I save the value selected for radio button to the database. I come back again and retrieve this value from database and need to prepopulate it on the form . Then I can also change the value of radio button and resubmit the form. Thanks, Verizon e-biz Gang Gao -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
3rd order lookups using Application level Arraylist beans and bean:write
Fellow users: I have been using struts now for a short time and I am impressed, however I am wondering if I am making a mountain out of a mole hill here and was wanting a bit of assistance. My particular issue is that I have a third order normalized table using integers as the ids for the primary keys: target cdtp_list cdtp ---- pk target_idpk cdtp_id cdtp_id --- pk target_id --- attrib1 --cdtp_name attrib2primarydescription attrib3 The way I am representing this in the bean layers is I have a target_form which extends the actionform bean and includes a reference to a targetBean as per the nested extension (Jan 19th nightly build) The targetBean includes an ArrayList variable called CDTPs which is exposed as an Object[] (struts limitation??? I believe based on the nested extension authors example) public Object [] getCDTPs(); see footnote 1 Additionally I have application scoped collections (beans) which contains the full list of cdtps (and other lookup lists) used for select options etc. Now in my page which displays the target for editing shows the text fields for the standard attributes and the select options lists for the fields which are foreign keys to things like status. no problem with this (as per following example) nested:select property=target_source_id size=1 html:options collection=sources property=target_source_id labelProperty=target_source / /nested:select However with this cdtp listing I am listing all possibilities as radio buttons, but I only know what the ID is from the nested target. I would like to lookup the CDTP_name (and description if necessary) based off the id I have at the time. My current method of doing this is a bit messy but works. bean:define id=CDTPArray name=cdtps type=java.util.ArrayList/ nested:iterate property=CDTPs indexId=i tr td width=33% bean:define id=current name=i type=java.lang.Integer/ %= ((application.data.CDTP) CDTPArray.get(current.intValue())).getCdtp() % /td td width=33%nested:radio property=primary value=Y //td td width=33%nested:radio property=primary value=N //td /tr /nested:iterate Now this seams bit complicated for what I want to do which is something like bean:write name=cdtps[i] property=cdtp / which would write the following ((application.data.CDTP)cdtps.get(i)).getCdtp() now is there a simple way of doing this or do we need a new tag which would do the following bean:collectionLookup collection=cdtp type=application.data.CDTP property=cdtp / footnote 1 I am also exposing the ArrayList itself as a different property name for use in a factory method when a new target is created. This method iterates though the list of cdtps and creates a new relation object which is added to the ArrayList holding the relations nested within the target Thanks Christopher Falling Software Engineer Consultant, Discovery IS AstraZeneca, RD Boston Discovery Information Systems AstraZeneca RD Boston - Waltham 35 Gatehouse Drive Waltham, MA 02451 Local x4730 Tel: +01 781 839 4730 [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
examples of struts templates struts templates Vs Tiles
I'm looking for good examples of using struts templates for building a UI. I'm trying to figure out how to display the current tab as selected using templates, haven't found any example that helps me do that. Also, is Tiles the recommended way of templating screens or should Struts templates suffice? thanks, sriram -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: examples of struts templates struts templates Vs Tiles
Hi Sriram, I'm not quite sure, but you can try here http://www.netstore.ch/mesi/strutsTutorial/index.html bye - Original Message - From: Sriram Nookala [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wednesday, January 30, 2002 5:34 PM Subject: examples of struts templates struts templates Vs Tiles I'm looking for good examples of using struts templates for building a UI. I'm trying to figure out how to display the current tab as selected using templates, haven't found any example that helps me do that. Also, is Tiles the recommended way of templating screens or should Struts templates suffice? 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]
Re: Prepopulate radio button
[EMAIL PROTECTED] wrote: How can I prepopulate the radio buttons with the value coming from database and also be able to reselect a different value when I am submitting the form again. Most of the time I try to just sit and watch as everyone asks these very specific questions with very specific answers. Good thing in every way, of course. But every once in a couple of weeks it seems reasonable to let people know they have an option, such as Expresso, (there are probably others) that encapsulate so much of this functionality for them, within a working framework. You still get all the flexibility, all the source code, you just don't have to do everything from scratch. Like any framework, it has it's benefits, drawbacks, politics etc. But a small and friendly group, and a solid code base. You might actually be surprised if you haven't seen it yet. And my own tool webAppWriter which will generate your basic GUIs and controllers for you, 33 working samples on my site you can download etc. Which isn't to say that reinventing everything your own way isn't better, because it probably is. Just an option to know about. Expresso at jcorporate.com webAppWriter at webAppWriter.com We are ALWAYS looking out for new contributors/users to add to our mix. My scenario is I have a save task where I save the value selected for radio button to the database. I come back again and retrieve this value from database and need to prepopulate it on the form . Then I can also change the value of radio button and resubmit the form. Thanks, Verizon e-biz Gang Gao -- 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]
Taglib parse error
I've suddenly started receiving a parse error : null when I try to access any page that contains a reference to struts logic tld. Any ideas guys/gals? The only thing I've changed recently is changing struts-confix.xml and web.xml to reference dtd's on my own system. Please Help! Jin -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
[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]
Re: RES: Tool for Building Visual Java Server Pages
Hi Duncan, Actually Dreamweaver doesn't per se.. However those clever taglib chaps have built an extension. Go over to the Apache taglib site and check out the CTLX project. It uses Dreamweaver's extention capabilities to add taglibs... if you can add taglibs you can add struts. U better have Dreamweaver UltraDev 4.0.. It works pretty well. Cheers, Jon Duncan Harris wrote: [EMAIL PROTECTED] (Rubens Gama) wrote: Well, dreamweaver also have support struts,now.. But it still have problems related to nested tags... Is this an extension, or a new version? Is so, what version? Duncan Harris +AH4AfgB+AH4AfgB+AH4AfgB+AH4AfgB+AH4AfgB+AH4AfgB+AH4AfgB+AH4AfgB+AH4AfgB+AH4AfgB+AH4AfgB+AH4AfgB+AH4AfgB+AH4AfgB+AH4- Hartford, Cheshire, U.K., Tel: 07968 060418 Looking for STRUTS contract work in the U.K. -- 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: [Fwd: Re: Hi....]
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]
Beginner question: Actions for Multi-frame page
Hello all, My name is Matt Lobur and i am new to the STRUTS framework. My question involves submition of a form in a multiple frame page. If i sumbit a form in 1 frame but the information submitted will effect many of the frames in my page, how would I refesh the other pages because the information they display has just been changed? thanks, Matt Lobur __ 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]
RE: Beginner question: Actions for Multi-frame page
Matt, Due to the fact that the HTTP protocol is stateless, once the other frames in your page are loaded, the only way to refresh them after the submission of your form is through some javascript that is activated by the resulting page of the submission in the frame that has changed. This is above Struts. Wellington -Original Message- From: matt lobur [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 30, 2002 7:08 PM To: Struts Users Mailing List Subject: Beginner question: Actions for Multi-frame page Hello all, My name is Matt Lobur and i am new to the STRUTS framework. My question involves submition of a form in a multiple frame page. If i sumbit a form in 1 frame but the information submitted will effect many of the frames in my page, how would I refesh the other pages because the information they display has just been changed? thanks, Matt Lobur __ 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]
Beanutils.populate()
Is there any way to have Beanutils.populate call a setter method with a date signature on a bean? I'm trying to populate a bean with *lots* of properties, some of which are dates stored in string format. My source bean has dates in date objects. Target bean fields/methods: String endDate = null; public String getEndDate().. public void setEndDate(String endDate) public void setEndDate(Date d_endDate) Source bean fields/methods: Date endDate = null; public Date getEndDate().. public void setEndDate(Date endDate)
RE: Beginner question: Actions for Multi-frame page
Better said, some sort of script (or applet? brrr) activated by that. Wellington -Original Message- From: Lacerda, Wellington (AFIS) Sent: Wednesday, January 30, 2002 7:15 PM To: 'Struts Users Mailing List' Subject: RE: Beginner question: Actions for Multi-frame page Matt, Due to the fact that the HTTP protocol is stateless, once the other frames in your page are loaded, the only way to refresh them after the submission of your form is through some javascript that is activated by the resulting page of the submission in the frame that has changed. This is above Struts. Wellington -Original Message- From: matt lobur [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 30, 2002 7:08 PM To: Struts Users Mailing List Subject: Beginner question: Actions for Multi-frame page Hello all, My name is Matt Lobur and i am new to the STRUTS framework. My question involves submition of a form in a multiple frame page. If i sumbit a form in 1 frame but the information submitted will effect many of the frames in my page, how would I refesh the other pages because the information they display has just been changed? thanks, Matt Lobur __ 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] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Basic (esoteric) Question
Thanks, David...very interesting. Too often, I think, Java programmers take error handling for granted and do not think past the compiler objecting to an unhandled possible error condition by insisting that the exception be thrown or caught. I think it's clear that the decision to declare an exception thrown in the method signature is much less costly than a try-catch-throw new block. And I'd be willing to bet even fewer consider alternative error handling than the try-catch block. It's clear this can have a major impact of the performance of an application. This just came into my head as I was sitting here coding yesterday morning. I turned to several of my colleagues and asked if anyone knew the performance ramifications of throws vs. try-catch and no one did. Looking at the Java exception handling mechanism from the JVM level is fascinating. Mark -Original Message- From: David Hamilton [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 30, 2002 5:28 AM To: Struts Users Mailing List Subject: Re: Basic (esoteric) Question Mark, From what Bill Venners says in 'Inside the Java2 Virtual Machine', the handling sequence goes like this: The JVM searches the class exception table for an entry that included the current program counter (PC) location. If found the associated handler is called. If not entry is found, the top frame is popped off the stack, and the search is repeated for the newly current PC location. Popping the stack will have minimal overhead (since it occurs at the end of every method call). This suggests that the overhead of throwing an exception will be * Cost of object creation of exception * Cost of searching the exception tables (proportional to the number of exception handlers in the class X number of methods between thrower and catcher) I don't know what the relative contribution of these parts would be, but my guess would be that the object creation overhead would generally (VM dependant of course) be noticeably greater. [Second bit assumes all methods are in the same class - but the principle is similar across many classes] As an aside, a quick quote from a JavaWorld article on performance: Since exception handling shouldn't be done on a speed-critical path, this doesn't bother me and I haven't benchmarked it. I.E. Exceptions should be used to handle exceptional conditions (non-standard program flows). If this is part of your standard program flow, you should probably be looking at a rework to return an error code rather than throwing an exception. david - Original Message - From: Galbreath, Mark [EMAIL PROTECTED] To: Servlets (E-mail) [EMAIL PROTECTED]; J2ee (E-mail) [EMAIL PROTECTED]; Struts (E-mail) [EMAIL PROTECTED] Sent: Tuesday, January 29, 2002 4:46 PM Subject: Basic (esoteric) Question Does anybody know of any design considerations that would affect the performance of a method that declares a throws in its signature vs. an exception that is either caught or thrown new in the try-catch block? Mark -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: initializing html:select
Like I said, it can take a real time expression. So you can do html:select property=selectProperty value=%=(String)request.getAttribute(xyz)% html:options property=values labelProperty=names/ /html:select You have to have scriptlets or expressions to set the value dynamically. -Original Message- From: Robert Tyler Retzlaff [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 30, 2002 2:25 PM To: [EMAIL PROTECTED] Subject: Re: initializing html:select Yes, but what I'm after is being able to dynamically set the initial values. I have an object in the request upon which the initial value depends. So specifying it in the value parameter (unless I used code in the jsp page) isn't any good and initializing it at declaration doesn't help me either because I don't have access to the object in the request. Any other solutions? You can set the value paramater like this html:select property=selectProperty value=two html:options property=values labelProperty=names/ /html:select Value can take a real time expression. Unfortunately, it currently works only if you dont have multiple set to true. It should work in your case. -Original Message- From: Robert Tyler Retzlaff [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 30, 2002 2:01 PM To: [EMAIL PROTECTED] Subject: initializing html:select How do you initialize the html:select to a particular option so that it appears to be the default when the form is loaded. .. my ActionForm class private String selectProperty; private String[] values = { +1, +2 }; private String[] names = { One, Two }; .. setter/getters public void reset( .., ..) { selectProperty = values[1]; } .. my form.jsp html:select property=selectProperty html:options property=values labelProperty=names/ /html:select When the form loads I still end up with the selection box displaying One as opposed to Two is there a way to do what I would like to accomplish? Also, I've hard coded the arrays of values and names into the form which I don't like I would like to extract them from an object I have stored in the request how might that be achieved? Thanks rob -- 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]
[ANNOUNCE] StrutsTestCase v1.6 Released
After a long, long hiatus (thanks mostly to a bunch of scumbag movers who took over a month to deliver my worldly possessions!), I have released a new version of StrutsTestCase. StrutsTestCase v1.6 fixes several bugs, improves support for Struts 1.0.1 and the Servlet 2.3 specification, and provides several new and requested features. The project home page can be found here: http://strutstestcase.sourceforge.net Notes for this release can be found here: https://sourceforge.net/project/shownotes.php?release_id=72737 Questions and comments are always welcome! Deryl Seale - [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: initializing html:select
I know it can take a realtime expression, but that means unpacking my nested bean from the request and then calling methods from it. This kind of ``code'' I would like to avoid having been placed inside the .jsp. I could create a custom tag that outputted the property I was interested in but writing a tag for that purpose sucks and I'm not even sure if it would work to initialize a parameter in a struts tag. Also I could use the jsp:useBean .. and then bean:getProperty .. tag to set the value on a non-struts form element but for reasons I don't understand it doesn't work inside struts form element tags. There must be another way or am I dreaming when striving for a script free page? Thanks Like I said, it can take a real time expression. So you can do html:select property=selectProperty value=%=(String)request.getAttribute(xyz)% html:options property=values labelProperty=names/ /html:select You have to have scriptlets or expressions to set the value dynamically. -Original Message- From: Robert Tyler Retzlaff [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 30, 2002 2:25 PM To: [EMAIL PROTECTED] Subject: Re: initializing html:select Yes, but what I'm after is being able to dynamically set the initial values. I have an object in the request upon which the initial value depends. So specifying it in the value parameter (unless I used code in the jsp page) isn't any good and initializing it at declaration doesn't help me either because I don't have access to the object in the request. Any other solutions? You can set the value paramater like this html:select property=selectProperty value=two html:options property=values labelProperty=names/ /html:select Value can take a real time expression. Unfortunately, it currently works only if you dont have multiple set to true. It should work in your case. -Original Message- From: Robert Tyler Retzlaff [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 30, 2002 2:01 PM To: [EMAIL PROTECTED] Subject: initializing html:select How do you initialize the html:select to a particular option so that it appears to be the default when the form is loaded. .. my ActionForm class private String selectProperty; private String[] values = { +1, +2 }; private String[] names = { One, Two }; .. setter/getters public void reset( .., ..) { selectProperty = values[1]; } .. my form.jsp html:select property=selectProperty html:options property=values labelProperty=names/ /html:select When the form loads I still end up with the selection box displaying One as opposed to Two is there a way to do what I would like to accomplish? Also, I've hard coded the arrays of values and names into the form which I don't like I would like to extract them from an object I have stored in the request how might that be achieved? Thanks rob -- 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: initializing html:select
That would be great, but how do you get a reference to the form bean? Or perhaps I misunderstand. Thanks A much better way to do it is set the value in your form bean in your *action* before you forward to the page, thus having it dynamic, but not resorting to scriptlets. Cheers, Dave Jakkampudi, ChandraseKhar [EMAIL PROTECTED] on 01/30/2002 03:31:44 PM Please respond to Struts Users Mailing List [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] cc:(bcc: David Hay/Lex/Lexmark) Subject: RE: initializing html:select Like I said, it can take a real time expression. So you can do html:select property=selectProperty value=%=(String)request.getAttribute(xyz)% html:options property=values labelProperty=names/ /html:select You have to have scriptlets or expressions to set the value dynamically. -Original Message- From: Robert Tyler Retzlaff [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 30, 2002 2:25 PM To: [EMAIL PROTECTED] Subject: Re: initializing html:select Yes, but what I'm after is being able to dynamically set the initial values. I have an object in the request upon which the initial value depends. So specifying it in the value parameter (unless I used code in the jsp page) isn't any good and initializing it at declaration doesn't help me either because I don't have access to the object in the request. Any other solutions? You can set the value paramater like this html:select property=selectProperty value=two html:options property=values labelProperty=names/ /html:select Value can take a real time expression. Unfortunately, it currently works only if you dont have multiple set to true. It should work in your case. -Original Message- From: Robert Tyler Retzlaff [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 30, 2002 2:01 PM To: [EMAIL PROTECTED] Subject: initializing html:select How do you initialize the html:select to a particular option so that it appears to be the default when the form is loaded. .. my ActionForm class private String selectProperty; private String[] values = { +1, +2 }; private String[] names = { One, Two }; .. setter/getters public void reset( .., ..) { selectProperty = values[1]; } .. my form.jsp html:select property=selectProperty html:options property=values labelProperty=names/ /html:select When the form loads I still end up with the selection box displaying One as opposed to Two is there a way to do what I would like to accomplish? Also, I've hard coded the arrays of values and names into the form which I don't like I would like to extract them from an object I have stored in the request how might that be achieved? Thanks rob -- 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: initializing html:select
check the perform() method signature of your action - it has the ActionForm associated with it. You can then cast it into the appropriate form: public ActionForward perform(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { ReportForm rform = (ReportForm) form; //do whatever with your form bean... . } Check out the examples - they all do it this way... Cheers, Dave Robert Tyler Retzlaff [EMAIL PROTECTED] on 01/30/2002 03:46:55 PM Please respond to Struts Users Mailing List [EMAIL PROTECTED] To: [EMAIL PROTECTED] cc:(bcc: David Hay/Lex/Lexmark) Subject: Re: initializing html:select That would be great, but how do you get a reference to the form bean? Or perhaps I misunderstand. Thanks A much better way to do it is set the value in your form bean in your *action* before you forward to the page, thus having it dynamic, but not resorting to scriptlets. Cheers, Dave Jakkampudi, ChandraseKhar [EMAIL PROTECTED] on 01/30/2002 03:31:44 PM Please respond to Struts Users Mailing List [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] cc:(bcc: David Hay/Lex/Lexmark) Subject: RE: initializing html:select Like I said, it can take a real time expression. So you can do html:select property=selectProperty value=%=(String)request.getAttribute(xyz)% html:options property=values labelProperty=names/ /html:select You have to have scriptlets or expressions to set the value dynamically. -Original Message- From: Robert Tyler Retzlaff [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 30, 2002 2:25 PM To: [EMAIL PROTECTED] Subject: Re: initializing html:select Yes, but what I'm after is being able to dynamically set the initial values. I have an object in the request upon which the initial value depends. So specifying it in the value parameter (unless I used code in the jsp page) isn't any good and initializing it at declaration doesn't help me either because I don't have access to the object in the request. Any other solutions? You can set the value paramater like this html:select property=selectProperty value=two html:options property=values labelProperty=names/ /html:select Value can take a real time expression. Unfortunately, it currently works only if you dont have multiple set to true. It should work in your case. -Original Message- From: Robert Tyler Retzlaff [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 30, 2002 2:01 PM To: [EMAIL PROTECTED] Subject: initializing html:select How do you initialize the html:select to a particular option so that it appears to be the default when the form is loaded. .. my ActionForm class private String selectProperty; private String[] values = { +1, +2 }; private String[] names = { One, Two }; .. setter/getters public void reset( .., ..) { selectProperty = values[1]; } .. my form.jsp html:select property=selectProperty html:options property=values labelProperty=names/ /html:select When the form loads I still end up with the selection box displaying One as opposed to Two is there a way to do what I would like to accomplish? Also, I've hard coded the arrays of values and names into the form which I don't like I would like to extract them from an object I have stored in the request how might that be achieved? Thanks rob -- 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] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Need help with html:link and passing parameters on the querystring
Hi Kevin: Here is how I used the html:link, but it is used with a bean. This code: html:link page=/delete.do?type=user paramId=userName paramName=userSearchResults paramProperty=userNameDelete/html:link produces: http://protege:8080/physiome/delete.do?type=useruserName=JFERNANDEZ basically, it assigns a parmeter called userName the values of the property (parameProperty) from the bean (paramName). If you want to have more than one dynamic parameter then you will have to use a Map (in the html:link documentation). Maybe you could add the request.getParameter() to a bean (using a struts tag?) before using the html:link? -Fred -Original Message- From: Kevin J. Turner [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 30, 2002 3:40 PM To: Struts Users Mailing List Subject: Need help with html:link and passing parameters on the querystring I am trying to use the Struts tag, html:link, but I don't think I understand its usage. Basically all I want to do is create a link to a page in my application and one or more dynamic parameters in the query string. The non-Struts JSP link went something like this: a href= http://localhost:8080/myapp/foo.jsp?service=%= request.getParameter(service_name http://localhost:8080/myapp/foo.jsp?service=%= request.getParameter(service_name) %Service/a I am trying to figure out the Struts equivalent but I am not having any luck. I tried something like this: html:link page=/foo.jsp?service=%= request.getParameter(service) %Service/html:link ... but it doesn't like the usage of the request.getParameter(). Can anyone help? I read the Struts documentation and browsed the struts-example app code but I'm still not getting this. K. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Problem With Forwarding to a non-HTML file
I've been working on this a little. You can add a header: Content-Disposition: attachment; filename=mypdf.pdf Seems to work on ie 5.5, haven't tested other browsers. -Original Message- From: Mark Woon [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 30, 2002 11:22 AM To: Struts Users Mailing List Subject: Re: Problem With Forwarding to a non-HTML file Sorry, I guess I should also have added that PDF files are ocassionally generated on the fly., in which case there's really nothing to redirect or forward to. Is there anything I can do in these situations? Max Cooper wrote: Sending a redirect to the PDF file might work better for your situation. -Max - Original Message - From: Mark Woon [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Tuesday, January 29, 2002 11:28 PM Subject: Problem With Forwarding to a non-HTML file Hi all. I'm using an Action to figure out which document I need to serve, and the document could be a pdf file. The problem is that when I forward to a PDF file, the browser still thinks that it's on the action (get.do), and tries to save the file as get.do. I've set the content-type so it'll spawn the right app, but is there a way to specify the name with which the file gets saved under? Thanks, -Mark -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- ~~Mark Woon~~~ If you're not part of the solution, you're part of the precipitate. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Examples needed
It would be nice if the Struts online documentation included examples for all their tag libraries. Hint. Hint.
Internationalization issue
HI, Our application is a web application. Now everything is in English like displaying the forms, user inputting the data, storing the data in DB and displaying the results of the user request, properties file etc are in English. If I want to make my application to accept the input and display the output in the different languages like Japenese what are the things I need to make to my existing application,DB. Can any one suggest me any material or site which gives me the settings or the things to be made for making use of our application in different languages??? Thanks in advance, Yug *** This e-mail (including any attachments) is intended for the sole use of the intended recipient/s and may contain material that is CONFIDENTIAL AND PRIVATE COMPANY INFORMATION. Any review or reliance by others or copying or distribution or forwarding of any or all of the contents in this message is STRICTLY PROHIBITED. If you are not the intended recipeint,please contact the sender by e-mail and delete all copies; your co-operation in this regard is appreciated. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
No method matching flushBuffer() found in classorg.apache.jasper.runtime.JspWriterImpl
Hello: I am migrating an application from tomcat 3.2 to 3.3. But I got an exception like: 2002-01-30 10:59:44 - Ctx() : Exception in R( + /agent.jsp + null) - org.apache.jasper.JasperException: Unable to compile /var/spool/tomcat3/DEFAULT/ROOT/mailagent_1.java:284: No method matching flushBuffer() found in class org.apache.jasper.runtime.JspWriterImpl. ((org.apache.jasper.runtime.JspWriterImpl)out).flushBuffer(); ^ 1 error at org.apache.tomcat.facade.JasperLiaison.javac(JspInterceptor.java) at org.apache.tomcat.facade.JasperLiaison.processJspFile(JspInterceptor.java) at org.apache.tomcat.facade.JspInterceptor.requestMap(JspInterceptor.java) at org.apache.tomcat.core.ContextManager.processRequest(ContextManager.java) at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java) at org.apache.tomcat.core.ContextManager.service(ContextManager.java) at org.apache.tomcat.modules.server.Http10Interceptor.processConnection(Http10Interceptor.java) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java) at java.lang.Thread.run(Thread.java:484) I updated my servlet.jar to 2.2, but it still doesn't work . Could you help? urgent! -- Chenfu Wang, Software Engineer Teraflops Ltd, Member of Elektrobit Group Mobile: +358 (0)40 030 8805, Fax: +358 (0)3 225 8484 http://www.teraflops.com/, http://www.elektrobit.com/ -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
bug with the select tag value attribute?
I have noticed that the value attribute of the select tag, which is said to be a run-time expression in the struts tag documentation, does not seem to work that way. I have the following select statement: html:select property=%= OrganizationForm.PARENT_ORG_ID % value=%=OrganizationForm.PARENT_ORG_ID % html:options collection=%= Constants.ORG_LIST % property=%= Constants.SELECT_VALUE % labelProperty=%= Constants.SELECT_LONG_NAME %/ /html:select where I want to use the same variable to initialize the select statement, and also to get set by the selected value after the user makes a selection. This does not work. I always get the first item in the list. However, if I substitute this: html:select property=%= OrganizationForm.PARENT_ORG_ID % value=24 html:options collection=%= Constants.ORG_LIST % property=%= Constants.SELECT_VALUE % labelProperty=%= Constants.SELECT_LONG_NAME %/ /html:select where 24 is one of the valid ids, it correctly selects the option that cooresponds to 24. Am I doing something wrong, is this a bug in the tag, or perhaps a bug in the documentation? -- Larry Maturo [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
prepopulate radio buttons?
How can I prepopulate the radio buttons with the value coming from database and also be able to reselect a different value when I am submitting the form again. My scenario is I have a save task where I save the value selected for radio button to the database. I come back again and retrieve this value from database and need to prepopulate it on the form . Then I can also change the value of radio button and resubmit the form. Thanks, Humera Arshi HQMO3A67 972-507-1163 -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Struts with dynamically generated contenct?
Has anyone used Struts in an environment where some of pages are dynamically generated. In this case an action would write the html directly to the output stream instead of forwarding to a jsp. Anything to consider here? Is it still advantageous to use Struts in this kind of situation? Are there any particular supporting Struts technologies that I should look closer into? Michelle -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Stupid Tiles Question
Sorry for this stupid tiles question, but I need to make sure I understand this. When I tried tiles, it appeared to severely affect performance. This seemed to be because a new JSP was *constructed* on each request and then *compiled* before finally being run, which then served up the HTML to the client. Is this correct? Is this performance hit the price to be paid for the flexibility? Does this scale for thousands of users? Thanks Andy _ Join the worlds largest e-mail service with MSN Hotmail. http://www.hotmail.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Non-Struts Related JS Question
this should work: a href=javascript:void openWidgetWindow() - Original Message - From: John M. Corro [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, January 29, 2002 9:31 AM Subject: Non-Struts Related JS Question Does anyone know how to call a javascript function from an html link w/o causing the parent page to reload, but still having the cursor change to a pointing finger when it goes over the link? I'm trying to implement the following basic situationuser clicks on a link, a child window pops up w/ a listing of widgets, user clicks on a widget, and a value is passed back to the parent page. I've been able to get everything working (popup window, widget listing, return value, etc) w/ an anchor tag like this... a onclick=openWidgetWindow()Click here to see a listing of Widgets/a However, one thing w/ this is that the mouse cursor doesn't change to a pointing finger when it goes over the link because I don't have the href attribute set. I can manipulate the stylesheet settings so that it looks like a regular link (underline, same color as all links), but the cursor never changes to a pointing finger to indicate to the user that it's just a plain old link to click on. When I try putting in the href attribute, the page tries to reload (don't want that happening). I've tried a variety of dummy values for the href (pound sign '#', blank, etc), but every value I've tried seems to make the page reload. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Common classes, where should they go.
Hi We have two Struts applications (front end back end) that share several classes. Where should we put them in the Tomcat folders so that both applications can 'see' them? Any help/advice will be much appreciated. TIA Lyndon Smith PS. We also have a similar problem with the tlds for common tags that we have created.
pre-select problem with html:options
Hi all, I've written an input form that uses a multiple html:select. The user selects the options they want and these options are subsequently inserted into the database. The problem is, that due to an apparent limitation of the html:select value property, if I want to use it to update the database, that is, I want the user to both be able to de-select existing selections as well as select new ones, I don't seem to be able to. This is due to the fact that the value field can only take a single value! That is, I can set the value to -1, so that each pre-selected field is set to -1, but if these are re-selected I have no way of telling which record was re-selected! And if it was de-selected I can't tell which record I should delete! I want to be able to pass a Collection object bean to the value field instead, so that all values in the Collection object are pre-selected so that these values are also meaningful when passed back to my Action (or not). I would love some feedback from anyone that may have a work-around for this, if not it is a serious limitation of the html:select tag. regards, Paul
Re: Problem With Forwarding to a non-HTML file
[EMAIL PROTECTED] (Mark Woon) wrote: Sorry, I guess I should also have added that PDF files are ocassionally generated on the fly., in which case there's really nothing to redirect or forward to. Is there anything I can do in these situations? The Inland Revenue site in the UK does this, if you fancy filling in a dummy tax return to see how it works... :-) http://www.inlandrevenue.gov.uk/ If you are interested you must go to the Self assessment then after creating a new forms log-in, select download and print locally. When I used to do CGI I used to do things with the extra path to fool the browser: /cgi-bin/genpdf.exe/docname.pdf I think maybe something similar is possible with servlets. Duncan Harris ~~~ Hartford, Cheshire, U.K., Tel: 07968 060418 Looking for STRUTS contract work in the U.K. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Examples needed
Not necessarily documented in the tag library, but working examples are in the samples bundled in the distro. Of course, one could make the friendly arguement that energies used complaining why something isn't right are better spent making it so (hint, hint : ) - Original Message - From: Kevin J. Turner [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wednesday, January 30, 2002 3:03 PM Subject: Examples needed It would be nice if the Struts online documentation included examples for all their tag libraries. Hint. Hint. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Struts with dynamically generated contenct?
There was something posted within the last day or so regarding an XML/XSLT struts modification, similar to the cocoon idea. http://www.openroad.ca/opencode/stxx/documentation.html Because JSPs are so flexible, I just leave struts as it is and do this in the JSP: %=content% -Original Message- From: mpopovits.rm [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 29, 2002 12:37 PM To: [EMAIL PROTECTED] Subject: Struts with dynamically generated contenct? Has anyone used Struts in an environment where some of pages are dynamically generated. In this case an action would write the html directly to the output stream instead of forwarding to a jsp. Anything to consider here? Is it still advantageous to use Struts in this kind of situation? Are there any particular supporting Struts technologies that I should look closer into? Michelle -- 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: container managed security and login action?
After a hard day of work I have solved this...see my documentation below. -Michelle J2EE Container Authentication and Struts Overview There was a need to provide a custom handler of the user authentication information (userid, password) prior to container authentication. This includes changing the values of the users password prior to authentication. The Problem In this particular case it was a new requirement that the users password would be stored in an encrypted format, which meant that the password would have to be encrypted before sending to the container for authentication. Original State A Struts application with J2EE Container Authentication was previously developed and working. This involved the use of form-based login where the jsp contained the j_security_check form which submitted the necessary authication parameters (j_username, j_password). The issue with this is that because the jsp was posting the page directly to the container there was no means to intervene and provide the necessary pre-processing. We would need to capture the user entered password and encrypt it before passing it on to the container for authentication. Changes Required 2 New Classes were required LoginForm.java - Struts Form, which would contain the attributes userid and password and the corresponding getter/setter methods. LoginAction.java - Struts Action class, which would provide the hook for the developer to add custom logic prior to authentication as well as modifying the values sent to the container. More details below. 1 JSP to be modified Login.jsp - Remove the j_security_check from the form and set it up as a standard Struts page (name the action and form parameters anything you like). Modify the Struts config to add the section for the Login Action and Form(standard struts action) Security related modifications - Ensure that the LoginAction is not secured in the web.xml otherwise you will not be able to post your login page to this action. Because I set my web.xml to constrain all *.do and *.jsp urls, I added a new mapping to my action servlet and associated *.auth to it. Then I modified the Login.jsp and instead of using /login.do I used /login.auth. In order to pass along the userid and the password to the container I needed to setup a request dispatcher in the login action with the appropriate parameters set (see example below) and forward the request on. public ActionForward perform( ActionMapping aMapping, ActionForm aForm, HttpServletRequest aRequest, HttpServletResponse aResponse) throws java.io.IOException, javax.servlet.ServletException { LoginForm form = (LoginForm) aForm; String request = j_security_check?j_username= + URLEncoder.encode(form.getUserid()) + j_password= + URLEncoder.encode(form.getPassword()); RequestDispatcher rd = aRequest.getRequestDispatcher(request); rd.forward(aRequest, aResponse); return null; } Summary It works great! I wished I had done it sooner. -Original Message- From: Michelle Popovits [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 30, 2002 10:01 AM To: '[EMAIL PROTECTED]' Subject: container managed security and login action? Has anyone been able to capture login information in a struts action and then send it on for j2ee container managed security. I currently have a struts application that uses j2ee container managed security. New requirements state that the password is to be stored in encrypted form which means I will need to take the users password and encrypt it before sending on the the j2ee container for authentication. Has anyone done this? Can this be done? Hints? Tips? Examples? Thanks, Michelle -- 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]
post-authentication processing?
The next step... A challenge with container managed authentication is that you generally can't predict what url the user originally requested and thus can not do any post-authentication processing. Let's say whenever a user successfully logs in I want to log to an audit trail. I could do this if I was manually authentication because that would be centrally controlled. With container auth. the user can specify one of any number of urls in the system and the container would automatically display the login page and after a successful authentication send them on to their original destination. So my question is, is there anything in the J2EE spec that would allow post processing of a user that was container authenticated? Thanks, Michelle -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
No execute method in Action class.
I'm developing an application in Forte, and I've mounted the struts.jar file. When I derive my action class I go to have Forte automatically generate the code for the 'execute' method, and it's not there. At first I thought maybe I had the wrong binary release. I went to download the current version, but when I went to extract the struts.jar I found files have the same timestamp. I was wondering if there is something I can do other than building the dist from the source. Bradley M. Handy Programmer/Analyst II Spring Arbor University http://www.arbor.edu/ mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: opening with MS-EXCEL
Create a Test.jsp as follows and run it. It will open Excel in a browser. HTH! !DOCTYPE HTML PUBLIC -//IETF//DTD HTML//EN HTML HEAD TitleExcel Format/Title % response.setContentType(application/vnd.ms-excel); response.setHeader(Content-Disposition,inline ); ServletOutputStream outStream = response.getOutputStream(); PrintWriter pw = response.getWriter(); pw.println(HTML); pw.println(HEAD); pw.println(/HEAD); pw.println(BODY); pw.println(TABLE border=0 cellpadding=0 cellspacing=0); pw.println(TR); pw.println(TDCustom Reports Process - xxx Report/TD!--- Cell : A1 ---); pw.println(TD/TD!--- Cell : B1 ---); pw.println(/TR); pw.println(TR); pw.println(TDSelection Criteria/TD!--- Cell : A2 ---); pw.println(TDnbsp;/TD!--- Cell : B2 ---); pw.println(/TR); pw.println(/TABLE); pw.println(pThis is a testbr); pw.println(/BODY); pw.println(/HTML); pw.println(Testing$$$); pw.flush(); pw.close(); % /BODY /HTML -- Original Message -- Hi Can anyone send me a sample code for opening an MS-EXCEL using struts . ... or some tips on how/where to set the content-type ,etc Thanks Regards, Syed Niaz -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] Ajay Chitre Diligent Team, Inc. (Where Diligent People Work as a Team) http://www.DiligentTeam.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
MultipartRequestWrapper.getParameter()
I am using Struts 1.0. According to the Javadoc, the MultipartRequestWrapper.getParameter() method does the following: /** * Attempts to get a parameter for this request. It first looks in the * underlying HttpServletRequest object for the parameter, and if that * doesn't exist it looks for the parameters retrieved from the multipart * request */ And the source code does this by first checking request.getParameter() and then (optionally) checking parameters.get(). However, the parameters Map field is never initialized to include the parameters from a multipart request. Is this a known bug, or am I missing something? Thanks. - Brian -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: opening with MS-EXCEL
Someplace at the end of your Action Class you could set the mime type and: String contentType = application/xls; //i believe this is the correct mime type for excel byte[] fromDB = lobHandler.getByteStreamFromDB(); if (contentType.equals(text/richtext)) response.setContentType(contentType); javax.servlet.ServletOutputStream out = response.getOutputStream(); //out.write((byte[]) request.getAttribute(binaryData));// where data is byte[] containing the filedata out.write(fromDB); out.flush(); out.close(); return null; --- Syed Niaz [EMAIL PROTECTED] wrote: Hi Can anyone send me a sample code for opening an MS-EXCEL using struts . ... or some tips on how/where to set the content-type ,etc Thanks Regards, Syed Niaz -- 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]
Re: opening with MS-EXCEL
Syed Niaz wrote: Hi Can anyone send me a sample code for opening an MS-EXCEL using struts . ... or some tips on how/where to set the content-type ,etc You can either use: request.setContentType(application/msexcel); in your Action (or a scriptlet), or %@ page contentType=application/msexcel % in your JSP page. -Mark -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
prepopulate radio buttons
How can I prepopulate the radio buttons with the value coming from database and also be able to reselect a different value when I am submitting the form again. My scenario is I have a save task where I save the value selected for radio button to the database. I come back again and retrieve this value from database and need to prepopulate it on the form . Then I can also change the value of radio button and resubmit the form. Thanks, Humera Arshi HQMO3A67 972-507-1163 -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Two dimentional Array problem
Hi Struts form class which returns the two dimentional array, Could any one tell me the tag librarry to render the values. public Object[][] getCellValues() thanks manju __ 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]
Re: opening with MS-EXCEL
Here's a code sample that I pulled from one of our actions that does that very thing. I didn't write, but I know that it works fine. Chuck // create the label and value StringBuffers StringBuffer labels = new StringBuffer(); StringBuffer values = new StringBuffer(); // This calls a local method to populate the labels and values StringBuffers. // I didn't include it here, but remember that you have to use something like // a comma-delimeter between values createOrderCSV( view, labels, values, userLocale ) ; // Create a write PrintWriter out = response.getWriter(); response.setContentType(application/MS-Excel); // output the info to user out.println( labels.toString() ); out.println( values.toString() ); At 02:34 PM 1/29/2002 +, you wrote: Hi Can anyone send me a sample code for opening an MS-EXCEL using struts . ... or some tips on how/where to set the content-type ,etc Thanks Regards, Syed Niaz -- 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 use strus HTML tags when i have a collection of items to be displayed
Srinivas, This has come up a little while ago and I've added to the nested extension to allow for it. The problem is, is that if you have other nested tags inside an iterate tag or similar, they will work on a property returned from that object from the list etc. What was needed was to access the object itself. This was just not possible in the original tags or otherwise. To allow this I've added the ability to access the current object from a parent. Using ./ or this/ as the child tag's property, you will access the parent object itself. So if it's a string, you can write it out, make it an input field etc. For example... nested:iterate property=stringList nested:text property=this/ / /nested:iterate ...will loop through an array of Strings and make text inputs for them. There is one specific detail to get this working properly. In your bean, you have to provide the more literal form of indexed setter property, rather than the collection form used for the getter. Example where I'm setting the value back to my ArrayList... public void setStringList(int index, String str) { myList.set(index, str); } My getter remains unchanged as the collection form... public ArrayList getStringList() { return myList; } This is all because the system which sets it wont be pulling out the collection, making the modifications, and then returning it altered. It will leave everything up to you. This is still good however. This functionality is in the nightly build from the 23rd of Jan, or you can download an updated jar from the site. http://www.keyboardmonkey.com/struts As a small disclaimer, the ArrayList getter shown above is only possible with a nightly build. Users of Struts 1.0/1.01 will need to return an Object array as in arrayList.toArray(). Hope this does what you're after. Arron. srinivas wrote: hi Arron, Thank you very much for the advice. It fits to our problem but i am faced with another one. I d'ont no how to generate input fields(text or select) when the bean return's an array of Strings. I did not get the idea how i can iterate through the array of Strings and generate an input field with value equal to the contents of the String. i d'ont have control over the action beans as they are generated from XML Schema. I use castor source generation to generate a java class out of XML schema and then use it in ActionForm. Thank u once again. Srinivas -Original Message- From: Arron Bates [mailto:[EMAIL PROTECTED]] Sent: Monday, January 28, 2002 5:43 AM To: Struts Users Mailing List Subject: Re: how to use strus HTML tags when i have a collection of items to be displayed The nested extension. Go here to learn how... http://www.keyboardmonkey.com/struts It's in the nightly build or you can pick up the library from the page above. Will be in Struts 1.1 Arron. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Two dimentional Array problem
I don't think that there is one. Or at least in Struts. The two dimensional array bean property is not a part of the bean spec. You could probably hack the iterate tag and write it yourself, it will have all the logic there to show you how to do the looping etc. Arron. manjunatha honnappa wrote: Hi Struts form class which returns the two dimentional array, Could any one tell me the tag librarry to render the values. public Object[][] getCellValues() thanks manju __ 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 use strus HTML tags when i have a collection of items to be displayed
Hi Arron, I used the ./ and this/ as the property name and i get an error: No getter method for property shares1[0].computer[1].options. of bean serviceForm now it tries to append a . to the property. If necessary i can mail u all the source files. regards, srinivas -Original Message- From: Arron Bates [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 31, 2002 1:08 AM To: Struts Users Mailing List Cc: srinivas Subject: Re: how to use strus HTML tags when i have a collection of items to be displayed Srinivas, This has come up a little while ago and I've added to the nested extension to allow for it. The problem is, is that if you have other nested tags inside an iterate tag or similar, they will work on a property returned from that object from the list etc. What was needed was to access the object itself. This was just not possible in the original tags or otherwise. To allow this I've added the ability to access the current object from a parent. Using ./ or this/ as the child tag's property, you will access the parent object itself. So if it's a string, you can write it out, make it an input field etc. For example... nested:iterate property=stringList nested:text property=this/ / /nested:iterate ...will loop through an array of Strings and make text inputs for them. There is one specific detail to get this working properly. In your bean, you have to provide the more literal form of indexed setter property, rather than the collection form used for the getter. Example where I'm setting the value back to my ArrayList... public void setStringList(int index, String str) { myList.set(index, str); } My getter remains unchanged as the collection form... public ArrayList getStringList() { return myList; } This is all because the system which sets it wont be pulling out the collection, making the modifications, and then returning it altered. It will leave everything up to you. This is still good however. This functionality is in the nightly build from the 23rd of Jan, or you can download an updated jar from the site. http://www.keyboardmonkey.com/struts As a small disclaimer, the ArrayList getter shown above is only possible with a nightly build. Users of Struts 1.0/1.01 will need to return an Object array as in arrayList.toArray(). Hope this does what you're after. Arron. srinivas wrote: hi Arron, Thank you very much for the advice. It fits to our problem but i am faced with another one. I d'ont no how to generate input fields(text or select) when the bean return's an array of Strings. I did not get the idea how i can iterate through the array of Strings and generate an input field with value equal to the contents of the String. i d'ont have control over the action beans as they are generated from XML Schema. I use castor source generation to generate a java class out of XML schema and then use it in ActionForm. Thank u once again. Srinivas -Original Message- From: Arron Bates [mailto:[EMAIL PROTECTED]] Sent: Monday, January 28, 2002 5:43 AM To: Struts Users Mailing List Subject: Re: how to use strus HTML tags when i have a collection of items to be displayed The nested extension. Go here to learn how... http://www.keyboardmonkey.com/struts It's in the nightly build or you can pick up the library from the page above. Will be in Struts 1.1 Arron. -- 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: Stupid Tiles Question
I've noticed that the initial compile takes longer, but once the JSP is compiled, the performance cost should dwindle. The best thing is to run your own load tests, since a number of factors can affect performance and scalabilty. It sounds like something else is wrong here. Andy Noble wrote: Sorry for this stupid tiles question, but I need to make sure I understand this. When I tried tiles, it appeared to severely affect performance. This seemed to be because a new JSP was *constructed* on each request and then *compiled* before finally being run, which then served up the HTML to the client. Is this correct? Is this performance hit the price to be paid for the flexibility? Does this scale for thousands of users? Thanks Andy _ Join the worlds largest e-mail service with MSN Hotmail. http://www.hotmail.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Canceling of forms using Struts
The simplest thing to reset is to do an actual redirect, rather than a forward. This would clear all the request parameters, including the cancel one. forward name=return path=/admin/admin.jsp redirect=true/ or have an actual one for cancel forward name=cancel path=/admin/admin.jsp redirect=true/ -- Ted Husted, Husted dot Com, Fairport NY USA. -- Java Web Development with Struts. -- Tel +1 585 737-3463. -- Web http://www.husted.com/struts/ Brown, Alex wrote: Hello, Using the STRUTS framework, a user can use html:cancel/ to cancel forms. As I understand it, this action places a value as a request parameter with the name of the constant at org.apache.struts.taglib.html.Constants.CANCEL_PROPERTY. If I use this cancel button for navigation and I redirect lets say to the return forward I have set up: actionpath = /admin/user_save type = com.blah.actions.SaveUserAction name = userForm scope = request input = /admin/user.jsp validate = true forward name=return path=/admin/admin.jsp/ forward name=failure path=/admin/user.jsp/ forward name=success path=/admin/users_list.do/ /action The cancel parameter is active throughout the entire transaction. Each page therefore performs the canceling return action all the way up to the top. Is there a way to reset this canceling action (i.e. Parameter) so that I can make it stop where I want it? So: user_save: Cancels form Form action looks at the return value The user is redirected to the return page and processing stops I can do this with custom tags, but I thought using cancel would be easier. Any thoughts? Thanks :-) -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: how to use strus HTML tags when i have a collection of items to be displayed
Did you download a new version of the nested extension?... It was only added on the 23rd of January. I'm quite certain this is the reason for this error. It's trying to step back through the parent tag and tries to append an empty property, hence the dot on the end. Arron. srinivas wrote: Hi Arron, I used the ./ and this/ as the property name and i get an error: No getter method for property shares1[0].computer[1].options. of bean serviceForm now it tries to append a . to the property. If necessary i can mail u all the source files. regards, srinivas -Original Message- From: Arron Bates [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 31, 2002 1:08 AM To: Struts Users Mailing List Cc: srinivas Subject: Re: how to use strus HTML tags when i have a collection of items to be displayed Srinivas, This has come up a little while ago and I've added to the nested extension to allow for it. The problem is, is that if you have other nested tags inside an iterate tag or similar, they will work on a property returned from that object from the list etc. What was needed was to access the object itself. This was just not possible in the original tags or otherwise. To allow this I've added the ability to access the current object from a parent. Using ./ or this/ as the child tag's property, you will access the parent object itself. So if it's a string, you can write it out, make it an input field etc. For example... nested:iterate property=stringList nested:text property=this/ / /nested:iterate ...will loop through an array of Strings and make text inputs for them. There is one specific detail to get this working properly. In your bean, you have to provide the more literal form of indexed setter property, rather than the collection form used for the getter. Example where I'm setting the value back to my ArrayList... public void setStringList(int index, String str) { myList.set(index, str); } My getter remains unchanged as the collection form... public ArrayList getStringList() { return myList; } This is all because the system which sets it wont be pulling out the collection, making the modifications, and then returning it altered. It will leave everything up to you. This is still good however. This functionality is in the nightly build from the 23rd of Jan, or you can download an updated jar from the site. http://www.keyboardmonkey.com/struts As a small disclaimer, the ArrayList getter shown above is only possible with a nightly build. Users of Struts 1.0/1.01 will need to return an Object array as in arrayList.toArray(). Hope this does what you're after. Arron. srinivas wrote: hi Arron, Thank you very much for the advice. It fits to our problem but i am faced with another one. I d'ont no how to generate input fields(text or select) when the bean return's an array of Strings. I did not get the idea how i can iterate through the array of Strings and generate an input field with value equal to the contents of the String. i d'ont have control over the action beans as they are generated from XML Schema. I use castor source generation to generate a java class out of XML schema and then use it in ActionForm. Thank u once again. Srinivas -Original Message- From: Arron Bates [mailto:[EMAIL PROTECTED]] Sent: Monday, January 28, 2002 5:43 AM To: Struts Users Mailing List Subject: Re: how to use strus HTML tags when i have a collection of items to be displayed The nested extension. Go here to learn how... http://www.keyboardmonkey.com/struts It's in the nightly build or you can pick up the library from the page above. Will be in Struts 1.1 Arron. -- 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 use strus HTML tags when i have a collection of items to be displayed
hi arron, it worked. thank you very very much. regards, srinivas -Original Message- From: Arron Bates [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 31, 2002 2:12 AM To: Struts Users Mailing List Cc: srinivas Subject: Re: how to use strus HTML tags when i have a collection of items to be displayed Did you download a new version of the nested extension?... It was only added on the 23rd of January. I'm quite certain this is the reason for this error. It's trying to step back through the parent tag and tries to append an empty property, hence the dot on the end. Arron. srinivas wrote: Hi Arron, I used the ./ and this/ as the property name and i get an error: No getter method for property shares1[0].computer[1].options. of bean serviceForm now it tries to append a . to the property. If necessary i can mail u all the source files. regards, srinivas -Original Message- From: Arron Bates [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 31, 2002 1:08 AM To: Struts Users Mailing List Cc: srinivas Subject: Re: how to use strus HTML tags when i have a collection of items to be displayed Srinivas, This has come up a little while ago and I've added to the nested extension to allow for it. The problem is, is that if you have other nested tags inside an iterate tag or similar, they will work on a property returned from that object from the list etc. What was needed was to access the object itself. This was just not possible in the original tags or otherwise. To allow this I've added the ability to access the current object from a parent. Using ./ or this/ as the child tag's property, you will access the parent object itself. So if it's a string, you can write it out, make it an input field etc. For example... nested:iterate property=stringList nested:text property=this/ / /nested:iterate ...will loop through an array of Strings and make text inputs for them. There is one specific detail to get this working properly. In your bean, you have to provide the more literal form of indexed setter property, rather than the collection form used for the getter. Example where I'm setting the value back to my ArrayList... public void setStringList(int index, String str) { myList.set(index, str); } My getter remains unchanged as the collection form... public ArrayList getStringList() { return myList; } This is all because the system which sets it wont be pulling out the collection, making the modifications, and then returning it altered. It will leave everything up to you. This is still good however. This functionality is in the nightly build from the 23rd of Jan, or you can download an updated jar from the site. http://www.keyboardmonkey.com/struts As a small disclaimer, the ArrayList getter shown above is only possible with a nightly build. Users of Struts 1.0/1.01 will need to return an Object array as in arrayList.toArray(). Hope this does what you're after. Arron. srinivas wrote: hi Arron, Thank you very much for the advice. It fits to our problem but i am faced with another one. I d'ont no how to generate input fields(text or select) when the bean return's an array of Strings. I did not get the idea how i can iterate through the array of Strings and generate an input field with value equal to the contents of the String. i d'ont have control over the action beans as they are generated from XML Schema. I use castor source generation to generate a java class out of XML schema and then use it in ActionForm. Thank u once again. Srinivas -Original Message- From: Arron Bates [mailto:[EMAIL PROTECTED]] Sent: Monday, January 28, 2002 5:43 AM To: Struts Users Mailing List Subject: Re: how to use strus HTML tags when i have a collection of items to be displayed The nested extension. Go here to learn how... http://www.keyboardmonkey.com/struts It's in the nightly build or you can pick up the library from the page above. Will be in Struts 1.1 Arron. -- 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]
Anyway to pass a parameter with the struts-config.xml file to an action?
Hi Is there anyway in the struts-config.xml file to specify a parameter and its value to be passed to an action, ie I am looking for something like parameter name=action value=new actionpath=/listNewDepartments type=com.bogusdomain.bogusproject.ListDepartments name=departmentsForm forward name=success path=/WEB-INF/pages/department.jsp/ parameter name=action value=new /action Is there some mechanism to do this using the struts-config.xml file? -- Cheers Tony - _ 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]
Cookies
Hi, Setting a cookie in a servlet, chaining to another servlet and trying to read the cookie for display in a Struts based JSP page. The first time the cookie is set, when I try and read it, it doesnt exist. Second time I set it, the value is set to the first value. Third time, it has the second value... Whats going on here? How do I get the current value as opposed to the previous ones? -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Cookies
When you set a cookie it is only a 'suggestion' to the client. When you read a cookie it is coming back from the client for the current request. 1. client requests page 1 2. set cookie in first servlet 3. chain to second servlet Here you will not see the cookie because the client has yet to see it. Any cookies you read will come from from the client prior to step 1. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 30, 2002 5:36 PM To: [EMAIL PROTECTED] Subject: Cookies Hi, Setting a cookie in a servlet, chaining to another servlet and trying to read the cookie for display in a Struts based JSP page. The first time the cookie is set, when I try and read it, it doesnt exist. Second time I set it, the value is set to the first value. Third time, it has the second value... Whats going on here? How do I get the current value as opposed to the previous ones? -- 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: Cookies
Well, heres my problem. I have a servlet that takes in a form, parses the data and then forwards off to another site. Before it posts, it puts the users ID (encrypted) into a cookie and sets it. That site then does its little thing and does a HTTP post BACK to my site. requesting a file /return.do, which then tries to re-read the cookie. But it doesnt exist. How do I get around this? -Original Message- From: Tingleff, Sam [mailto:[EMAIL PROTECTED]] Sent: Thursday, 31 January 2002 12:44 To: 'Struts Users Mailing List' Subject: RE: Cookies When you set a cookie it is only a 'suggestion' to the client. When you read a cookie it is coming back from the client for the current request. 1. client requests page 1 2. set cookie in first servlet 3. chain to second servlet Here you will not see the cookie because the client has yet to see it. Any cookies you read will come from from the client prior to step 1. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 30, 2002 5:36 PM To: [EMAIL PROTECTED] Subject: Cookies Hi, Setting a cookie in a servlet, chaining to another servlet and trying to read the cookie for display in a Struts based JSP page. The first time the cookie is set, when I try and read it, it doesnt exist. Second time I set it, the value is set to the first value. Third time, it has the second value... Whats going on here? How do I get the current value as opposed to the previous ones? -- 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 use strus HTML tags when i have a collection of items to be displayed
My pleasure. Arron. srinivas wrote: hi arron, it worked. thank you very very much. regards, srinivas -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
No execute method in Action class.
I'm developing an application in Forte, and I've mounted the struts.jar file. When I derive my action class I go to have Forte automatically generate the code for the 'execute' method, and it's not there. At first I thought maybe I had the wrong binary release. I went to download the current version, but when I went to extract the struts.jar I found files have the same timestamp. I was wondering if there is something I can do other than building the dist from the source. Bradley M. Handy Programmer/Analyst II Spring Arbor University http://www.arbor.edu/ mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Cookies
The cookies have to come from the browser. So, like Sam said below: You have to set the cookie(s) then send a redirect to the browser giving the url to the other site, causing the cookies to get sent to the browser first (make sure and set the cookies before calling response.sendRedirect()) and then the browser makes the request to the other site. The other site would then have to send a redirect back to your site, causing the request to come from the original browser, and therefore returning you the cookies. Hope this helps -Chris Murphy -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 30, 2002 7:56 PM To: [EMAIL PROTECTED] Subject: RE: Cookies Well, heres my problem. I have a servlet that takes in a form, parses the data and then forwards off to another site. Before it posts, it puts the users ID (encrypted) into a cookie and sets it. That site then does its little thing and does a HTTP post BACK to my site. requesting a file /return.do, which then tries to re-read the cookie. But it doesnt exist. How do I get around this? -Original Message- From: Tingleff, Sam [mailto:[EMAIL PROTECTED]] Sent: Thursday, 31 January 2002 12:44 To: 'Struts Users Mailing List' Subject: RE: Cookies When you set a cookie it is only a 'suggestion' to the client. When you read a cookie it is coming back from the client for the current request. 1. client requests page 1 2. set cookie in first servlet 3. chain to second servlet Here you will not see the cookie because the client has yet to see it. Any cookies you read will come from from the client prior to step 1. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: initializing html:select
Perhaps I misunderstand the flow of events that occur but aren't the bean propertys populated prior to the Actions form method being called? Is the flow of execution between the form, form-bean and action explained somewhere in the struts documentation? If so where? Thanks for your patience and help rob check the perform() method signature of your action - it has the ActionForm associated with it. You can then cast it into the appropriate form: public ActionForward perform(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { ReportForm rform = (ReportForm) form; //do whatever with your form bean... . } Check out the examples - they all do it this way... Cheers, Dave Robert Tyler Retzlaff [EMAIL PROTECTED] on 01/30/2002 03:46:55 PM Please respond to Struts Users Mailing List [EMAIL PROTECTED] To: [EMAIL PROTECTED] cc:(bcc: David Hay/Lex/Lexmark) Subject: Re: initializing html:select That would be great, but how do you get a reference to the form bean? Or perhaps I misunderstand. Thanks A much better way to do it is set the value in your form bean in your *action* before you forward to the page, thus having it dynamic, but not resorting to scriptlets. Cheers, Dave Jakkampudi, ChandraseKhar [EMAIL PROTECTED] on 01/30/2002 03:31:44 PM Please respond to Struts Users Mailing List [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] cc:(bcc: David Hay/Lex/Lexmark) Subject: RE: initializing html:select Like I said, it can take a real time expression. So you can do html:select property=selectProperty value=%=(String)request.getAttribute(xyz)% html:options property=values labelProperty=names/ /html:select You have to have scriptlets or expressions to set the value dynamically. -Original Message- From: Robert Tyler Retzlaff [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 30, 2002 2:25 PM To: [EMAIL PROTECTED] Subject: Re: initializing html:select Yes, but what I'm after is being able to dynamically set the initial values. I have an object in the request upon which the initial value depends. So specifying it in the value parameter (unless I used code in the jsp page) isn't any good and initializing it at declaration doesn't help me either because I don't have access to the object in the request. Any other solutions? You can set the value paramater like this html:select property=selectProperty value=two html:options property=values labelProperty=names/ /html:select Value can take a real time expression. Unfortunately, it currently works only if you dont have multiple set to true. It should work in your case. -Original Message- From: Robert Tyler Retzlaff [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 30, 2002 2:01 PM To: [EMAIL PROTECTED] Subject: initializing html:select How do you initialize the html:select to a particular option so that it appears to be the default when the form is loaded. .. my ActionForm class private String selectProperty; private String[] values = { +1, +2 }; private String[] names = { One, Two }; .. setter/getters public void reset( .., ..) { selectProperty = values[1]; } .. my form.jsp html:select property=selectProperty html:options property=values labelProperty=names/ /html:select When the form loads I still end up with the selection box displaying One as opposed to Two is there a way to do what I would like to accomplish? Also, I've hard coded the arrays of values and names into the form which I don't like I would like to extract them from an object I have stored in the request how might that be achieved? Thanks rob -- 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] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional
Re: Anyway to pass a parameter with the struts-config.xml file to an action?
taken from: http://husted.com/about/scaffolding/catalog.htm action path=/Entry type=org.wxxi.polls.http.Client name=pollForm validate=false parameter=input forward name=continue path=/WEB-INF/pages/Entry.jsp/ /action and just use mapping.getParameter() - Original Message - From: Antony Stace [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, January 30, 2002 5:04 PM Subject: Anyway to pass a parameter with the struts-config.xml file to an action? Hi Is there anyway in the struts-config.xml file to specify a parameter and its value to be passed to an action, ie I am looking for something like parameter name=action value=new actionpath=/listNewDepartments type=com.bogusdomain.bogusproject.ListDepartments name=departmentsForm forward name=success path=/WEB-INF/pages/department.jsp/ parameter name=action value=new /action Is there some mechanism to do this using the struts-config.xml file? -- Cheers Tony - _ 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] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: opening with MS-EXCEL
Check out: http://www.servletsuite.com/servlets/exceltag.htm Its a custom tag library for excel. -Rakesh [EMAIL PROTECTED] www.ayilliath.8m.com --- - Original Message - From: Ajay Chitre [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Thursday, January 31, 2002 3:49 AM Subject: RE: opening with MS-EXCEL Create a Test.jsp as follows and run it. It will open Excel in a browser. HTH! !DOCTYPE HTML PUBLIC -//IETF//DTD HTML//EN HTML HEAD TitleExcel Format/Title % response.setContentType(application/vnd.ms-excel); response.setHeader(Content-Disposition,inline ); ServletOutputStream outStream = response.getOutputStream(); PrintWriter pw = response.getWriter(); pw.println(HTML); pw.println(HEAD); pw.println(/HEAD); pw.println(BODY); pw.println(TABLE border=0 cellpadding=0 cellspacing=0); pw.println(TR); pw.println(TDCustom Reports Process - xxx Report/TD!--- Cell : A1 ---); pw.println(TD/TD!--- Cell : B1 ---); pw.println(/TR); pw.println(TR); pw.println(TDSelection Criteria/TD!--- Cell : A2 ---); pw.println(TDnbsp;/TD!--- Cell : B2 ---); pw.println(/TR); pw.println(/TABLE); pw.println(pThis is a testbr); pw.println(/BODY); pw.println(/HTML); pw.println(Testing$$$); pw.flush(); pw.close(); % /BODY /HTML -- Original Message -- Hi Can anyone send me a sample code for opening an MS-EXCEL using struts . ... or some tips on how/where to set the content-type ,etc Thanks Regards, Syed Niaz -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] Ajay Chitre Diligent Team, Inc. (Where Diligent People Work as a Team) http://www.DiligentTeam.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]
Connection Pooling
Hi, I'm using Struts connection pooling in my Struts application. If the database goes offline temporarily the only way I know of to re-establish the pool is to stop and start the application server (in this case WebSphere 3.5.5 which is quite a tedious process!). Is there a smarter way to recover from this situation or is this the only option available? Thanks, Andrew. -- __ Your favorite stores, helpful shopping tools and great gift ideas. Experience the convenience of buying online with Shop@Netscape! http://shopnow.netscape.com/ Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.com/ -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Connection Pooling
Have you tried Poolman to do your connection pooling? It provides a way to specify a validation query which periodically checks to see if the database is still accessible. If it doesn't, it'll keep trying to connect to the database until it comes back up. The url is www.codestudio.com - Original Message - From: Andrew Myers [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, January 30, 2002 7:57 PM Subject: Connection Pooling Hi, I'm using Struts connection pooling in my Struts application. If the database goes offline temporarily the only way I know of to re-establish the pool is to stop and start the application server (in this case WebSphere 3.5.5 which is quite a tedious process!). Is there a smarter way to recover from this situation or is this the only option available? Thanks, Andrew. -- __ Your favorite stores, helpful shopping tools and great gift ideas. Experience the convenience of buying online with Shop@Netscape! http://shopnow.netscape.com/ Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.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: Anyway to pass a parameter with the struts-config.xml file to an action?
per the ActionMapping api... Additional properties can be added by a subclass, simply by providing appropriate public getter and setter methods. you can use (for example)... set-property property=foo value=test / ...as long as the subclass has getFoo/setFoo methods defined, you tell struts to use it via the mapping init param for the controller servlet, then in your action you cast the ActionMapping back to your subclass giving you access to property value(s)... unlike the parameter property, there's no limit to the number of set-property name/value pairs you can add to your application... hth, dave -Original Message- From: Antony Stace [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 30, 2002 7:05 PM To: [EMAIL PROTECTED] Subject: Anyway to pass a parameter with the struts-config.xml file to an action? Hi Is there anyway in the struts-config.xml file to specify a parameter and its value to be passed to an action, ie I am looking for something like parameter name=action value=new actionpath=/listNewDepartments type=com.bogusdomain.bogusproject.ListDepartments name=departmentsForm forward name=success path=/WEB-INF/pages/department.jsp/ parameter name=action value=new /action Is there some mechanism to do this using the struts-config.xml file? -- Cheers Tony - _ 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] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Validate question - forwarding to action rather than input jsp page
Hi I want to use the validate functionality in a Form. What I want to know is if an non empty ActionErrors object is returned does it always get forwarded to a jsp page? I actually want it rather than getting forwarded to a jsp page to be forwarded to an action. Can I do this somehow using the validate functionalty in the Form? -- Cheers Tony - _ 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]
Re: Problem With Forwarding to a non-HTML file
try something like this; it will open the pdf viewer in your browser public class ShowDocumentAction extends BasicAction { public ActionForward perform(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { HttpSession session = request.getSession(); try { Object object = session.getAttribute(BlobObject); if (object != null) { DocumentDetailModel detailModel = (DocumentDetailModel)object; ByteArrayOutputStream baos = new ByteArrayOutputStream(); Document document = new Document(); PdfWriter.getInstance(document, baos);// Using the library of Bruno Lowagie to convert xml to PDF Parser parser = ParserFactory.makeParser(org.apache.xerces.parsers.SAXParser); parser.setDocumentHandler(new SAXiTextHandler(document)); ByteArrayInputStream stream = new ByteArrayInputStream(detailModel.getDetail()); // this is an array of byte InputSource inputSource = new InputSource(stream); parser.parse(inputSource); response.setContentType(application/pdf); response.setContentLength(baos.size()); ServletOutputStream out = response.getOutputStream(); baos.writeTo(out); out.flush(); } } catch (Exception ex) { } return ; } } Best regards, Thierry - Original Message - From: Duncan Harris [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, January 30, 2002 10:18 PM Subject: Re: Problem With Forwarding to a non-HTML file [EMAIL PROTECTED] (Mark Woon) wrote: Sorry, I guess I should also have added that PDF files are ocassionally generated on the fly., in which case there's really nothing to redirect or forward to. Is there anything I can do in these situations? The Inland Revenue site in the UK does this, if you fancy filling in a dummy tax return to see how it works... :-) http://www.inlandrevenue.gov.uk/ If you are interested you must go to the Self assessment then after creating a new forms log-in, select download and print locally. When I used to do CGI I used to do things with the extra path to fool the browser: /cgi-bin/genpdf.exe/docname.pdf I think maybe something similar is possible with servlets. Duncan Harris ~~~ Hartford, Cheshire, U.K., Tel: 07968 060418 Looking for STRUTS contract work in the U.K. -- 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: lost form data when validate returns errors
Re: lost form data when validate returns errors Ted Husted wrote: Dan Tanner wrote: I'm having the problem of losing form data when my action class returns errors. The error displays properly, but I lose all the form data. If you are talking about form data that is generated by an Action, and not passed back through the HTTP request, then you may need to specify an Action for the input property, so it can generate it again, instead of going straight back to the JSP. If this happens then all the user data will be lost which the user may have entered. What is the best way of passing this data to the action which generates the page. Any valid data the user entered into the form I want to keep and have this valid data used to partially populate the form. -- Cheers Tony - _ 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]