RE: Auto execution of an action on page display
Small point but I think the restrictions on welcome-file depends on the app server / web container that you are using. I've noticed this restriction with jboss/jetty myself but welcome-file-list welcome-filewelcome.do/welcome-file /welcome-file-list works with exteNd. Not sure if I am getting away with it on this platform or its a bug in other platforms. Quentin -Original Message- From: Karr, David [mailto:[EMAIL PROTECTED]] Sent: 29 January 2003 18:48 To: Struts Users Mailing List Subject: RE: Auto execution of an action on page display The welcome page of a web application has to be a physical file, and not the path to a Struts action, so the common convention for making sure every real page is fronted by an action is to have the index.jsp welcome page immediately do a forward (and nothing else) to a main action. -Original Message- From: Howard Roark [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 29, 2003 10:28 AM To: [EMAIL PROTECTED] Subject: Auto execution of an action on page display I'm a newbie to Struts, and would like to know if its possible for Struts to automatically execute an Action upon the display of the initial page? I would like to avoid having the user click on something to initiate certain user-specific house-keeping tasks, if possible. TIA. HR P.S. Initiating this action as part of the Login action is not possible, since this application does not require the use of a login process. __ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Automatic refresh - IS THIS POSSIBLE?
Valli I've done something similar before in an intranet application, outside of struts. I had a page that displayed Please Wait and in that page I used meta HTTP-EQUIV=Refresh specifying the URL of the servlet that took a long time to run. I used a low refresh time (0 perhaps) and it seemed to work ok. Check out the meta element in some HTML reference. However you are of course wasting time here with all these requests. It worked ok on an intranet for me, not sure about an internet app. Perhaps there's a better way. Still there's no reason why you couldn't use this technique with struts. Quentin -Original Message- From: Sowbhagya Valli Suryadevara [mailto:[EMAIL PROTECTED]] Sent: 30 January 2003 10:57 To: 'Struts Users Mailing List' Subject: Automatic refresh - IS THIS POSSIBLE? HI, We are using the struts tiles framework in our project. There is a particular request that consumes a lot of time (20 seconds). Instead of showing a blank page is it possible to show a Please Wait message while the processing is happening in the background. Then when the processing is over the page should come up automatically. IS THIS POSSIBLE? Valli - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Automatic refresh - IS THIS POSSIBLE?
Cool Much more complete answer than mine but still not a great idea, and has the same downsides as the meta tag stuff, unless I am missing the point. The processing servlet, the process that takes a long time, is only fired off once the user has downloaded the please wait page and executed the java script. Perhaps I am worrying over nothing but what would be real nice is to be able to fire off the long job first, then display the message, then somehow connect up to the long job. Perhaps you could do something with threads to fire off the long job. or maybe I am making this just a little too complex! Quentin -Original Message- From: Roger Fortier [mailto:[EMAIL PROTECTED]] Sent: 30 January 2003 14:21 To: 'Struts Users Mailing List'; [EMAIL PROTECTED] Subject: RE: Automatic refresh - IS THIS POSSIBLE? Check out this article from JavaPro magazine. Send Users a Browser Message http://www.javapro.com Click Archives, then select the January 2001 issue from the archives. -Original Message- From: Sowbhagya Valli Suryadevara [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 30, 2003 5:57 AM To: 'Struts Users Mailing List' Subject: Automatic refresh - IS THIS POSSIBLE? HI, We are using the struts tiles framework in our project. There is a particular request that consumes a lot of time (20 seconds). Instead of showing a blank page is it possible to show a Please Wait message while the processing is happening in the background. Then when the processing is over the page should come up automatically. IS THIS POSSIBLE? Valli - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [OT] VOTE to help Naveen.Dhotre Unsubscribe permanently
-1 { It wouldn't be nice to come back from holiday, no matter how long, and find the entire struts community wants rid of you ;-) } -Original Message- From: Simon Kelly [mailto:[EMAIL PROTECTED]] Sent: 29 January 2003 10:59 To: Struts Users Mailing List Subject: Re: [OT] VOTE to help Naveen.Dhotre Unsubscribe permanently Haven't got a clue who Naveen is, but I am a sheep B+4 - Original Message - From: Ronald Mathies [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wednesday, January 29, 2003 11:56 AM Subject: Re: [OT] VOTE to help Naveen.Dhotre Unsubscribe permanently +3 - Original Message - From: K.Viswanathan [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wednesday, January 29, 2003 11:58 AM Subject: Re: [OT] VOTE to help Naveen.Dhotre Unsubscribe permanently +2 - Original Message - From: PILGRIM, Peter, FM [EMAIL PROTECTED] To: Struts Users Mailing List (E-mail) [EMAIL PROTECTED] Sent: Wednesday, January 29, 2003 4:06 PM Subject: [OT] VOTE to help Naveen.Dhotre Unsubscribe permanently Naveen is just like Aerosmith always on permanent vacation. Can we not help to alleviate her suffering. Can I get witness on this? +1 from me. -- Peter Pilgrim, Struts/J2EE Consultant, RBoS FM, Risk IT Tel: +44 (0)207-375-4923 Visit our Internet site at http://www.rbsmarkets.com This e-mail is intended only for the addressee named above. As this e-mail may contain confidential or privileged information, if you are not the named addressee, you are not authorised to retain, read, copy or disseminate this message or any part of it. The Royal Bank of Scotland plc is registered in Scotland No 90312 Registered Office: 36 St Andrew Square, Edinburgh EH2 2YB Regulated by the Financial Services Authority - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: what does RT Expr mean
Run Time expression. i.e. evaluated at run time. Quentin -Original Message- From: Sundar Narasimhan [mailto:[EMAIL PROTECTED]] Sent: 29 January 2003 14:27 To: [EMAIL PROTECTED] Subject: what does RT Expr mean In the bottom of the documentation on the attributes of several tags I see [RT Expr].. what does that mean? Is it documented anywhere? Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tiles errorPage
Christoph I developed my last struts application using tiles for the first time. I found that jsp pages with errors didn't display any exceptions under exteNd App Server 3.7. However the same ear deployed to jboss/jetty behaved as I would have expected. I ended up developing against jboss even though my target platform was exteNd. Not sure if this is the same problem or not. To be honest it could have been my mistake, but jboss was available so I ran with that until I had my code clean. Regards Quentin -Original Message- From: Christoph Rooms [mailto:[EMAIL PROTECTED]] Sent: 27 January 2003 14:33 To: [EMAIL PROTECTED] Subject: Tiles errorPage hi, When there is an error on a JSP that is within a Tile. I don't see the exception ... If I forward to this JSP directly, the error is displayed as it should on the ErrorPage ... Anyone ? thanks, Christoph Christoph Rooms TAM + 32 475 531 529 Novell Positioned as a Leader in Analyst Firm's Metadirectory Magic Quadrant Novell is the first, and thus far only, company to enter the Leader Quadrant of Gartner's Metadirectory Services Magic Quadrant. Leaders are vendors who are performing well today, have a clear vision of market direction, and are actively building competencies to sustain their leadership position in the market. Read more and find out how to access the report at www.novell.com/news/press/archive/2002/08/pr02058.html -- 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: dynamic local message / dynamic error codes
Marcus Localisation is done as per the rest of the app. So for me I have: ExceedsAvailable=Exceeds available quantity ({0}) in ApplicationResources.properties and ExceedsAvailable=Quantita` disponibile superata ({0}) in ApplicationResources_it.properties The dynamic message would be something like: errors.add(amount,new ActionError(ExceedsAvailable, new Integer(productinfo.getAvailableToOrder()) )); there's a whole set of add methods to accomodate different numbers of parameters. Regards Quentin -Original Message- From: Marcus Biel [mailto:[EMAIL PROTECTED]] Sent: 26 November 2002 13:52 To: [EMAIL PROTECTED] Subject: dynamic local message / dynamic error codes Somewhere along the way I've read that you can display dynamic localized messages, by using adding brakets {} to your message and to add a parameter to this message in your action. Unfortunately I forgot where I found this. Can anyone explain to me how to create dynamic localized messages - for example adding specific error codes ? thx, marcus -- 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: Calling a JSP from a tile.
Rossel I am no tiles guru but I think you should take a step back and think of why it is that you want to have a jsp that is both called as a tile and as a standalone page. Once I started using tiles I created a single definition that does the html stuff. The rest of my jsp's are only every used to output bits of a page. Regards Quentin -Original Message- From: ROSSEL Olivier [mailto:[EMAIL PROTECTED]] Sent: 19 November 2002 15:22 To: '[EMAIL PROTECTED]' Subject: Calling a JSP from a tile. A JSP usually have a html:html main tag. This tag is supposed (mainly) to provide a html tag in the output. But if you call this JSP from a tile, you get an html tag in the middle of your tile. Of course you do not want that. Can the tag html:html check if a html has already been opened, and decide not to output its (unneeded) html tag. This way, the JSP could be content-aware: if it's alone, it manages everything, if it's inside a tile, it outputs only its body code. ---cut here--- This e-mail is intended only for the above addressee. It may contain privileged information. If you are not the addressee you must not copy, distribute, disclose or use any of the information in it. If you have received it in error please delete it and immediately notify the sender. Security Notice: all e-mail, sent to or from this address, may be accessed by someone other than the recipient, for system management and security reasons. This access is controlled under Regulation of Investigatory Powers Act 2000, Lawful Business Practises. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: iterate tag - can you set an increment?
Andy How about logic:iterate id=idx name=myBean property=array scope=session indexId=index tr logic:iterate id=idrow name=myBean property=array scope=session offset=index length=2 tdbean:write name=idrow property=long_desc//td /logic:iterate /tr /logic:iterate Quentin -Original Message- From: Andy Kriger [mailto:[EMAIL PROTECTED]] Sent: 19 November 2002 16:44 To: Struts Users Mailing List Subject: iterate tag - can you set an increment? Is there any way to set an iteration increment on the iterate tag? For example, iterate through the array returning every 2nd item. If not, can anyone tell me how I might do this without resorting to scriplets (or only using them minimally)? Here's the code I'm trying to use. The first TD is the long_desc field of array[idx] in myBean. How can I increment idx so I can get the next item? (maybe I'm being slow since I haven't had my coffee yet) logic:iterate id=idx name=myBean property=array scope=session tr tdbean:write name=idx property=long_desc//td tdbean:write name=??? property=long_desc//td /tr /logic:iterate thx andy -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: [Struts Tip] #15 Use chained exceptions. Design consideration.
Exception handling in Java is neat when we know what we are doing. However junior developers often find themselves with exceptions that they aren't really expecting and don't know what to do with. With no direction from others its all to easy to use System.out and I have even seen: catch(Exception e) { } I think this is why the C# guys made their exceptions more like our runtime exceptions. You don't have the explicit declaration of what exceptions are thrown but it doesn't force inexperienced developers to end up writing stuff that we wouldn't want them to do. All interesting stuff but not sure what it has to do with struts. Quentin -Original Message- From: Andrew Hill [mailto:[EMAIL PROTECTED]] Sent: 18 November 2002 12:04 To: Struts Users Mailing List Subject: RE: [Struts Tip] #15 Use chained exceptions. Design consideration. IMHO 2 traces in the log are better than 0 - the important thing is that you have something you can look at when debugging. It is of course important that the business object still throws the exception even if it logged it (which is indeed what you are doing). (Ive had the misfortune to have to use objects developed by a third party that log (often to System.out) exceptions they generate and then dont throw an exception back at my code - just return a null or something equally useless. Its a real pain I can tell you...) Of course components using your object will (should!) probably want to throw their own exceptions too that nest that thrown by the object as they will want to record information about their state and what they were doing when the thrown excrements trajectory caused it to collide with their rotary atmospheric impeller... (And thats info that the business object won't have but that you will also want for debugging) -Original Message- From: RODRIGO CARVALHO DOS SANTOS [mailto:[EMAIL PROTECTED]] Sent: Monday, November 18, 2002 20:56 To: 'Struts Users Mailing List' Subject: [Struts Tip] #15 Use chained exceptions. Design consideration. Hi Ted and all in the list, I´m using ChainedExceptions in my applications, but in my case the Business Object is using the logger from Log4J. When an exception occurs, the Business Object logs a message before throwing a new exception with the original exception chained. I think this is important for application traceability, the object does not depend on others layers to log his own problems. If my Business Object is a component, maybe the component user will log the stack trace, having some redundancy of information. I would like to hear from the group opnions about this design approach. Rodrigo Santos. Brazil. BCP Telecomunicações. -Mensagem original- De: Ted Husted [mailto:[EMAIL PROTECTED]] Enviada em: domingo, 17 de novembro de 2002 22:47 Para: [EMAIL PROTECTED] Assunto: [Struts Tip] #15 Use chained exceptions Many Java mavens recommend that business objects throw their own exceptions. Internally, a component may catching a SQL or IO exception, but what we really need to tell the user is that a data access error occurred. Of course, at the same time, you do not want to sacrifice any detail from the original exception. Retaining detail from the exception can especially important in a layered, multi-tiered, or multi-platform application.. The business component may not have direct access to the log, and the exception is its only way of telling us what went wrong. [more ... http://husted.com/struts/tips/015.html] -- 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: Opening PDF file: Problem and Solution
Neil I wonder if your image/jpeg files displayed ok in Netscape? Its a couple of years ago, nothing to do with struts, but I had a servlet, serving up images, that was not setting the image type correctly. I was serving jpegs, giff etc. but the servlet had hardcoded image/gif. Internet explorer somehow just coped with it and displayed the images. IE seemed either very lax about it or really smart depending on your point of view. Netscape 4.7 just wouldn't display anything. Regards Quentin -Original Message- From: Neil Carusetta [mailto:ncarusetta;computer-guidance.com] Sent: 14 November 2002 15:47 To: [EMAIL PROTECTED] Subject: Opening PDF file: Problem and Solution Has anyone had any difficulties with opening a PDF file byte stream in a browser using sub-apps? We got it working but are still unclear as to exactly the reason. Up front I'll mention that we are using sub-applications. We had an action which places a PDF file in the form of a byte[] out on the ServletOutputStream. For some reason the file would not display in the Acrobat plugin. The IE dialog to open or save the file would instead appear. At this point we were able to save the PDF to the client machine, but still remained with the problem of not being able to view the PDF in IE. Now trying this same thing using just a default app worked fine. But we had to make it work using a sub-app. Now comes the confusing part. Streaming out JPEG and Word files worked just fine in our sub-app. Of course, for all three files we are setting the appropriate contentType on the response. We then thought that there might be a problem with the sub-app's configuration. We noticed that in the struts config file, through the controller element, we were setting the contentType to text/html. For some reason, removing the contentType allowed the stream to be opened in Acrobat. It seems that the contentType setting in the sub-app was overriding that for application/pdf but not for image/jpeg or application/msword. Does anyone know why this would be the case? Best of luck, Neil Carusetta CGC Scottsdale, AZ -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
RE: actions only for html:form ?
Mohan I think what you want to do is to setup an action mapping something like: action path=mainscreen type=your.class.goes.here forward name=success path=loggoff path here / /action Then create an action class and do what you want in the execute method. Regards Quentin -Original Message- From: Mohan Radhakrishnan [mailto:MohanR;hclcomnet.co.in] Sent: 31 October 2002 10:23 To: 'Struts Users Mailing List' Subject: actions only for html:form ? Hi, a href=mainscreen.jsp/a I am trying to find out how to use the above href representation to fire an action. I need to fire an action for reload,logoff etc. Sorry if this is too elementary. The html:form tag has an action. How do I fire an action for logging off if I have an image as a menu? Do I just specify a href=logoff.jsp/a ? A bit of explanation would really help. A use case that is related is this. 1. User presses reload button. 2. If fires a reload action.This action does something useful. 3. Forwards to the same page. Thanks, Mohan -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
RE: actions only for html:form ?
Mohan Sorry should have been more explicit. You would then want a line like : a href=logoff.do -Original Message- From: Mohan Radhakrishnan [mailto:MohanR;hclcomnet.co.in] Sent: 31 October 2002 10:38 To: 'Struts Users Mailing List' Subject: RE: actions only for html:form ? Hi, I am doing things like that. mainscreen is my main page. The mapping should be like this. Isn't it? action path=logoff type=your.class.goes.here forward name=success path=login path here / /action Will my href be a href=logoff.jsp/a this? But logoff doesn't have any JSP? It should be the login.jsp ? A use case that is related is this. 1. User presses reload button. 2. If fires a reload action.This action does something useful. 3. Forwards to the same page. Thanks, Mohan -Original Message- From: Quentin.Cope [mailto:Quentin.Cope;cpg-logistics.com] Sent: Thursday, October 31, 2002 4:00 PM To: Struts Users Mailing List Subject: RE: actions only for html:form ? Mohan I think what you want to do is to setup an action mapping something like: action path=mainscreen type=your.class.goes.here forward name=success path=loggoff path here / /action Then create an action class and do what you want in the execute method. Regards Quentin -Original Message- From: Mohan Radhakrishnan [mailto:MohanR;hclcomnet.co.in] Sent: 31 October 2002 10:23 To: 'Struts Users Mailing List' Subject: actions only for html:form ? Hi, a href=mainscreen.jsp/a I am trying to find out how to use the above href representation to fire an action. I need to fire an action for reload,logoff etc. Sorry if this is too elementary. The html:form tag has an action. How do I fire an action for logging off if I have an image as a menu? Do I just specify a href=logoff.jsp/a ? A bit of explanation would really help. A use case that is related is this. 1. User presses reload button. 2. If fires a reload action.This action does something useful. 3. Forwards to the same page. Thanks, Mohan -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org