Using ValidatorFramework for different validation scenarios of same functioanlity/form.
Hi Group, I need a help on general issue which every body would have solved. Generally we'll have four operations like Add, Update, Query and Remove. I believe we can use DispatchAction to handle all these operation in a single action. So for the validation part we are planning to use validator framework. Generally for create we will need to validate all the mandatory fields (not the PK value incase of DB sequence) and for update all the fields including the PK fields(as hidden fields) and for query there may not be any validations and for delete operation we need to validate the PK value alone. I'm not sure whether we can achieve this kind of validation using validator framework or not. Because from my understanding I believe that validator framework would be invoked first and then the Action class. So can we validate the fields on conditional basis? I think we can do this by writing each operation in different action calss. Or is there a better approach for this kind of scenarios. Any help, information, links material would be helpful. If my question is not clear, let me know. Thanks & regards, Anil. Information transmitted by this e-mail is proprietary to Infinite Computer Solutions and / or its Customers and is intended for use only by the individual or the entity to which it is addressed, and may contain information that is privileged, confidential or exempt from disclosure under applicable law. If you are not the intended recipient or it appears that this mail has been forwarded to you without proper authority, you are notified that any use or dissemination of this information in any manner is strictly prohibited. In such cases, please notify us immediately at [EMAIL PROTECTED] and delete this email from your records.
RE: Validation framework for Dynamically added HTML elements?
U can create array and create field as per reqiuirment,but this has limit and here problem is for "arrayindexoutofboundexception" after limit exceeds. Elsewise u can use ajax, put ur form in session and send requeset to an action which will increase the size of array and again put into the session. Then u can dynamically create as many fields u want... -Original Message- From: Mallik [mailto:[EMAIL PROTECTED] Sent: Thursday, September 14, 2006 11:40 AM To: user@struts.apache.org Subject: Validation framework for Dynamically added HTML elements? Hi Friends i have one form where user enter his family details for this i create on row of fields (like name,relationtype,occupation) if user want to add one more relation, he click on addmore button then i provied one more row and user need more, click on addmore and i create another row this way my form will get fields dynamically using javascript createElement() method, now i want to add validation framework for this form how to manage in struts-config.xml ( for each form field we specify or is there any alternative solution for this problem in struts framework please let me know urs Mallik -- View this message in context: http://www.nabble.com/Validation-framework-for-Dynamically-added-HTML-el ements--tf2269760.html#a634 Sent from the Struts - User forum at Nabble.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]
Validation framework for Dynamically added HTML elements?
Hi Friends i have one form where user enter his family details for this i create on row of fields (like name,relationtype,occupation) if user want to add one more relation, he click on addmore button then i provied one more row and user need more, click on addmore and i create another row this way my form will get fields dynamically using javascript createElement() method, now i want to add validation framework for this form how to manage in struts-config.xml ( for each form field we specify or is there any alternative solution for this problem in struts framework please let me know urs Mallik -- View this message in context: http://www.nabble.com/Validation-framework-for-Dynamically-added-HTML-elements--tf2269760.html#a634 Sent from the Struts - User forum at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
report generation
hai, how to generate report whenever click one button. this report has no frame and no button
Re: Submitting forms with javascript in struts [*]
Hello! Unfortunately the last posted solution didn't work either. That's why I'm using another way now to get the form submitted via href and javascript. The javascript function calls the existing submit-button and does a click: document.myform.target="mytarget"; document.myform.myproperty.value="desired_value"; document.myform.myproperty.click(); That's the way it works. Caveat: You have to take care, that the old value of the submit-button has to be written back :-). Kind regards, Andreas Hartmann - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: OT(Open pdf in a frame on a web page)
Hi, Thanks a lot for your help. I have been able to do this much now. I have used an iframe & kept it in a jsp which also shows a button for xls output for the same content. However, my drop down menus go behind this frame. I am not able to get a way to unhide the drop down menu from this frame. Do you have some suggestions for the same? Thanks & Regards, Meenakshi. The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments. WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus/trojan/worms/malicious code transmitted by this email. www.mind-infotech.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DownloadAction and concurrent threads
Hi all, My app needs to allow downloads of relatively large files (10MB). Because Struts can/will reuse Actions for different threads, I'm worried that when multiple requests attempt to download these big files that a single "BigFileDownloadAction" will block until a download is complete thereby slowing all downloads (effectively making them serial). Am I missing something? Thanks, Oliver - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: RE: [Struts 2] link not rending from iterator
Also I just saw that the s:a tag doesn't support the target attribute. I want my link to open in a new window. Shawn On 9/13/06, Garner Shawn <[EMAIL PROTECTED]> wrote: Doesn't the a tag work via XMLHttpRequest instead of normal HttpRequest? I did consult the tag reference before posting. I have it bookmarked. I'm not sure about the differences but I think I'd like to stay with HttpRequest if I can. Shawn -- Forwarded message -- From: "David Friedman" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" Date: Wed, 13 Sep 2006 13:15:06 -0400 Subject: RE: [Struts 2] link not rending from iterator Wouldn't you be better off doing something like this rather than mix an s:url inside an href tag? From: http://struts.apache.org/2.x/tagreference.html#a Regards, David - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: RE: [Struts 2] link not rending from iterator
Doesn't the a tag work via XMLHttpRequest instead of normal HttpRequest? I did consult the tag reference before posting. I have it bookmarked. I'm not sure about the differences but I think I'd like to stay with HttpRequest if I can. Shawn -- Forwarded message -- From: "David Friedman" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" Date: Wed, 13 Sep 2006 13:15:06 -0400 Subject: RE: [Struts 2] link not rending from iterator Wouldn't you be better off doing something like this rather than mix an s:url inside an href tag? From: http://struts.apache.org/2.x/tagreference.html#a Regards, David - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: calling method of a bean from JSP
I thought this is for getting the value of a property ? and how to pass a parameter to the method ? I think I have tried that but does not work.
Re: [Struts 2] link not rending from iterator
On 9/13/06, Garner Shawn <[EMAIL PROTECTED]> wrote: If there is a "getUrl" method on the "downloadsList" object, then try Click to Download If there is not a getUrl method, then it's not clear from where the value is derived. Do I need to assign it to the iterator id and then reference that? No. The properties of downloadsList are made available within the interator block without an additional reference. (It's a bit like "using" from other languages.) -- HTH, Ted. * http://www.husted.com/struts/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: tag library
I see you are using the BETA 1.3.5 version. Since I haven't tried it (I'm on the stable 1.2.9 official current release) so I don't know it's quirks. However, that being said I see you are making a few key mistakes: 1. You are using a 1.3 release but specifying the wrong dtd. This might cause problems. See your doctype mentioned 1_0 not, as I'm expecting 1_3: http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd";> Should be: http://struts.apache.org/dtds/struts-config_1_3.dtd";> 2. If you had the 1_0 above as your doctype, you are clearly using OLD information be it an online article, tutorial, or actual "book." I strongly recommend you look for updated documentation since some methods used in v1.0 are no longer available, i.e. deprecated and probably removed from the code by now (the 1.3.5 beta you are using). 3. Since your error message mentioned the word "modules" you should check the 1.3.5 documentation to see if you are accidentally adding a module to your config when you don't need that additional level of complexity when trying to learn Struts. 4. As you mentioned having WEB-INF/lib/app/RegisterForm.class and WEB-INF/lib/app/RegisterAction.class, I doubt classloading would be the problem, unless you are potentially using the BEA WebLogic(?) server. 5. I did not understand your answer about the form "action" attribute: did you get those error messages about the module being null from leaving the html:form action="register.do" (<-- invalid use) or by setting it to match the action's path attribute from struts-config.xml which in this case would probably be html:form action="/register" ? Regards, David -Original Message- From: David Fonseca Sánchez [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 13, 2006 2:03 PM To: Struts Users Mailing List Subject: Re: tag library The error apears when I access to jsp page where I have the form. In WEB-INF\lib I have the package app (RegisterForm.class and RegisterAction.class), servlet-2_3-fcs-classfiles.zip, struts-taglib-1.3.5.jar and struts-core-1.3.5.jar - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: tag library
The error apears when I access to jsp page where I have the form. In WEB-INF\lib I have the package app (RegisterForm.class and RegisterAction.class), servlet-2_3-fcs-classfiles.zip, struts-taglib-1.3.5.jar and struts-core-1.3.5.jar - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Adding another form fields to validator.xml problem
Are you by any chance using Tomcat? If so try clearing the "work" directory for that webapp in case the compiled object hasn't been updated when your webapp restarts. Regards, David -Original Message- From: Mallik [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 12, 2006 2:37 AM To: user@struts.apache.org Subject: Adding another form fields to validator.xml problem HI friends i am using validator framework for client side validations in my web application i added login page validations in validator.xml file , it working fine the problem starts when i added another collegeForm fields, if i added atleast one field like id the server saying that no service for the path you requesting. why this is? this is my validator.xml file... -- http://jakarta.apache.org/commons/dtds/validator_1_1_3.dtd";> mask ^[0-9a-zA-Z_]*$ minlength 4 maxlength 10 mask ^[0-9a-zA-Z_]*$ minlength 4 maxlength 10 code in struts-config.xml is this is my form field -- like i added for all that form fields please let me know the reason why? or where i went worng ur's Mallik -- View this message in context: http://www.nabble.com/Adding-another-form-fields-to-validator.xml-problem-tf 2256969.html#a6260393 Sent from the Struts - User forum at Nabble.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]
RE: tag library
Was the below error from setting your html:form action to "register.do" or to "/register" which is listed as your struts-config.xml action "path" settting? Regards, David -Original Message- From: David Fonseca Sánchez [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 13, 2006 1:22 PM To: Struts Users Mailing List Subject: Re: tag library The struts-config.html is http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd";> and the error says: excepción org.apache.jasper.JasperException: Module 'null' not found. org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWr apper.java:510) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java: 393) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) causa raíz java.lang.NullPointerException: Module 'null' not found. org.apache.struts.taglib.TagUtils.getModuleConfig(TagUtils.java:743) org.apache.struts.taglib.TagUtils.getModuleConfig(TagUtils.java:723) ... - 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: FormFile arrays
See the documentation on using indexed properties [1] for more details. L. [1] http://struts.apache.org/1.2.x/faqs/indexedprops.html This seems like it should work. I created two accessors to the form that had an index parameter. Struts could not locate the getter. I ended up creating a class like this: public class FormFileWrapper { private FormFile file; public FormFile getFile() { return file; } public void setFile(FormFile file) { this.file = (FormFile)file; } } Created array of of FormFileWrapper called doc[] (and added the corrsponding accessors to the form) the size of the number of documents expected. Then used this jsp: This worked. Thanks for your help! /Jeremiah - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: tag library
The struts-config.html is http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd";> and the error says: excepción org.apache.jasper.JasperException: Module 'null' not found. org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:510) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) causa raíz java.lang.NullPointerException: Module 'null' not found. org.apache.struts.taglib.TagUtils.getModuleConfig(TagUtils.java:743) org.apache.struts.taglib.TagUtils.getModuleConfig(TagUtils.java:723) ... - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [Struts 2] link not rending from iterator
Wouldn't you be better off doing something like this rather than mix an s:url inside an href tag? From: http://struts.apache.org/2.x/tagreference.html#a Regards, David - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: tag library
Did you try making the action "register.do" match an action in your mappings? Did your struts-config.xml list it as "register.do" or perhaps like "/register" ? Regards, David -Original Message- From: David Fonseca Sánchez [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 13, 2006 9:57 AM To: Struts Users Mailing List Subject: Re: tag library Hello Thanks, I'm using struts-html.tld, but when I run the application in Tomcat, an error appear: org.apache.jasper.JasperException: Exception in JSP: /register.jsp:2 1: <%@ taglib uri="/WEB-INF/tlds/struts-html.tld" prefix="html" %> 2: 3: UserName: 4: enter password: 5: re-enter password: Stacktrace: org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWr apper.java:504) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java: 393) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) What is it? and How to solve? 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]
[OT][ANN] REMINDER: JAVAWUG BOF 22 / Sun London / 20 Sept 2006 @ 18:30 / featuring Jason van Zyl, Maven 2.0
Hi ``JAVAWUG'' (The Java Web User Group) is holding the twenty second Birds-of-Feather 22 at the Sun's London Office on Wednesday, 20th September 2006 from 18:30 onwards. For more information http://www.jroller.com/page/javawug?entry=announcement_javabof_xxii_jaso n_van The confirmed speakers are: Jason van Zyl - Architect - Maven 2.0 Jason van Zyl presents the architecture and infrastructure behind the declaration software construction framework called ``Maven''. Jason van Zyl is the Chief Architect and co-founder of ``Mergere, Inc''. Jason co-founded Mergere to deliver an open source-based build platform for dynamic, distributed, enterprise-level Java(TM) projects requiring leading-edge resource orchestration and build management. Jason has over 10 years of enterprise software development experience working primarily for Fortune 500 companies. Jason is heavily involved with open source: he is the lead in the development of several open source projects including Plexus, Modello, and Continuum. Afterwards members can retire to the nearby bar and restuarant (TBA) ... (We will probably get started closer to 7pm to allow members who are out of town to commute in) The address is: Sun Microsystems Ltd. Customer Briefing Centre -- Cheapside Theatre Regis House 45 King William Street London EC4R 9AN Map (http://uk.sun.com/aboutsun/location/map-london-1.html) If you would like to attend : Please REGISTER so that you can be added to the Sun Security Detail. Join the ``http://groups.google.com/group/javawug'' JAVAWUG at Google Groups and Send a mail to the list you are attending http://jroller.com/page/javawug Thanks very much -- Peter Pilgrim UBS Investment Bank, PTS Portal / IT FIRC OPS LDN, 100 Liverpool Street, London EC2M 2RH, United Kingdom +44 (0) 20 75 75692 :: Java EE / E-Commerce / Enterprise Integration / Development :: Visit our website at http://www.ubs.com This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required please request a hard-copy version. This message is provided for informational purposes and should not be construed as a solicitation or offer to buy or sell any securities or related financial instruments. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Trouble with titleKey attribute for Frame and Link elements
David Cagle ha scritto: I was able to find the "org.apache.struts.action.Action.setLocale(HttpServletRequest arg0, Locale arg1)" method and it seems to do the trick. Before I just had "" where "${helpSession.locale}" was the correct locale. Most of the labels were taken care of with that but the titles of the and elements were not getting translated. The Action.setLocale method seems to take care of them. I don't know if you are doing the right thing. Anyway check "LocaleAction" out, it could be useful: http://struts.apache.org/1.x/struts-extras/apidocs/org/apache/struts/actions/LocaleAction.html Ciao Antonio - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts Modules: automatic validation using few resource bundles
On 9/13/06, Jacek Konopelski <[EMAIL PROTECTED]> wrote: Hi All - it's my first mail here but don't be scared ;) Recently I have been doing My best to divide My web application into modules - so My boss could sell main part without addons (modules). I successed in everything except validation... What I have: 0. I'm using: Struts 1.2.2 1.Two struts-config.xml files - main One and the other for My module with such entry:
Re: tag library
Hello Thanks, I'm using struts-html.tld, but when I run the application in Tomcat, an error appear: org.apache.jasper.JasperException: Exception in JSP: /register.jsp:2 1: <%@ taglib uri="/WEB-INF/tlds/struts-html.tld" prefix="html" %> 2: 3: UserName: 4: enter password: 5: re-enter password: Stacktrace: org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:504) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) What is it? and How to solve? Thanks! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Problems with validator framework
what I would do is: 1. keep form properties as String (and consider using DynaValidatorForm) 2. use the "required,float" or "required,int" validation 3. use BeanUtils.populate method to map the form onto a typed object (property names must match) From: Heidy Gutiérrez Guzmán [mailto:[EMAIL PROTECTED] Sent: Wed 13/09/2006 11:13 PM To: user@struts.apache.org Subject: Problems with validator framework Hi I need to validate a form with fields wich data type is "int" and "float" The validation that i use is "required", but that doesn't work. The fields are initilialized with default values (o for int types) and (0.0for float types). Whit string data types, validator works fine. If somebody would help me, i would be grateful ** This message is intended for the addressee named and may contain privileged information or confidential information or both. If you are not the intended recipient please delete it and notify the sender. ** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Problems with validator framework
Hi I need to validate a form with fields wich data type is "int" and "float" The validation that i use is "required", but that doesn't work. The fields are initilialized with default values (o for int types) and (0.0for float types). Whit string data types, validator works fine. If somebody would help me, i would be grateful
[Struts 2] link not rending from iterator
. Click to Download Renders the link as blank but the rest of the vales render fine. And it does print out if I do Click to Download What am I doing wrong to reference the value? Do I need to assign it to the iterator id and then reference that? Shawn - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Trouble with titleKey attribute for Frame and Link elements
Thanks Antonio for the question! I think I figured the problem out last night. I was able to find the "org.apache.struts.action.Action.setLocale(HttpServletRequest arg0, Locale arg1)" method and it seems to do the trick. Before I just had "" where "${helpSession.locale}" was the correct locale. Most of the labels were taken care of with that but the titles of the and elements were not getting translated. The Action.setLocale method seems to take care of them. Thanks once again! -Original Message- From: Antonio Petrelli [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 13, 2006 4:50 AM To: Struts Users Mailing List Subject: Re: Trouble with titleKey attribute for Frame and Link elements David Cagle ha scritto: > Hey everyone! > > I'm having trouble with the 'titleKey' attribute resolving to the correct > translated title when the locale of my web app is something other than > English. I'm currently only using the 'titleKey' on a couple of > and elements, but when I change the locale, the text is always in > English. Is there something that I'm missing, like another tag to add to my > JSP or another attribute? > That's definitely strange... How do you change your locale? - 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: calling method of a bean from JSP
or On 9/12/06, Lixin Chu <[EMAIL PROTECTED]> wrote: Hi, would like to check if there is existing tag available to allow method invocation from JSP directly, something similar to this : "Call JavaBean methods from JSP 2.0 pages " http://www.javaworld.com/javaworld/jw-05-2003/jw-0523-calltag.html thanks lx
Struts Modules: automatic validation using few resource bundles
Hi All - it's my first mail here but don't be scared ;) Recently I have been doing My best to divide My web application into modules - so My boss could sell main part without addons (modules). I successed in everything except validation... What I have: 0. I'm using: Struts 1.2.2 1.Two struts-config.xml files - main One and the other for My module with such entry: parameter="resources.application-order"/>
Re: OT(Open pdf in a frame on a web page)
Hi, You should do something like this, For the link that will generate the PDF Generate Report For the Action/Servlet that generates set the content disposotion to "inline" to get an inline PDF (in the browser itself and not as attachment) response.setHeader("Content-Disposition", "inline; filename=" + filename); If still it doesn't work, it may be problem with the browser , try changing the browser. See also (for content disposition help) http://www.onjava.com/pub/a/onjava/excerpt/jebp_3/index3.html Thanks and Regards, Thomas Joseph Kott Software Pvt. Ltd. | Vallamattom Estate | M.G.Road | Cochin, Kerala - 682015 | India www.kottsoftware.com This email (including any attachments) is subject to copyright, the information in it is confidential, and it is legally privileged. Use of this email or of any information in it other than by the addressee is unauthorized and unlawful. If you are not the intended recipient of the mail, kindly notify the author of the mail and delete the same. It doesn't matter how you were, but rather how you are that decides your future. A right attitude will get you to Success. - Original Message - From: Meenakshi Singh To: 'Thomas Joseph' Sent: Wednesday, September 13, 2006 3:03 PM Subject: RE: OT(Open pdf in a frame on a web page) Hi, We have a requirement wherein we have to open the report in pdf on click of a menu option. From the menu option we r invoking the servlet which is generating the pdf output. Now, on our web page we have a top frame, a side frame & a workarea frame. When I say text is inline in the response then it opens another browser window & opens the pdf in that. What we want is that the pdf report should open in the workarea frame. Would u suggest something regarding this? Thanks & Regards, MS -Original Message- From: Thomas Joseph [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 13, 2006 2:17 PM To: Struts Users Mailing List; [EMAIL PROTECTED] Subject: Re: OT(Open pdf in a frame on a web page) What is preventing you from doing so? Could you please explain more? Thanks and Regards, Thomas Joseph Kott Software Pvt. Ltd. | Vallamattom Estate | M.G.Road | Cochin, Kerala - 682015 | India www.kottsoftware.com This email (including any attachments) is subject to copyright, the information in it is confidential, and it is legally privileged. Use of this email or of any information in it other than by the addressee is unauthorized and unlawful. If you are not the intended recipient of the mail, kindly notify the author of the mail and delete the same. It doesn't matter how you were, but rather how you are that decides your future. A right attitude will get you to Success. - Original Message - From: Meenakshi Singh To: Struts Users Mailing List (E-mail) Sent: Wednesday, September 13, 2006 12:32 PM Subject: OT(Open pdf in a frame on a web page) Hi all, We are wanting to open a PDF file in the same frame within our existing web page.Surely there MUST be a way to do this. Can anybody suggest a way out of this problem. Thanks & Regards, MS "The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments. WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus/trojan/worms/malicious code transmitted by this email. www.mind-infotech.com " - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] "The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments. WARNING: Computer viruses can be transmitted via email. The recipient should check thi
Re: Problem in setting the value of hidden field in JSP
But then how do I do it? I mean how can I assign a hidden field a value of another attribute. Richard Yee <[EMAIL PROTECTED]> 09/13/2006 04:06 PM Please respond to "Struts Users Mailing List" To Struts Users Mailing List cc Subject Re: Problem in setting the value of hidden field in JSP Pankaj, You shouldn't be setting both the value and the property attributes of html:hidden -Richard Pankaj Gupta wrote: > Hi, > > In a JSP, I am iterating over a collection and want to set a hidden field > with the value of one of the properties of the objects contained in > hashtable. I am using the following code for that. Can somebody suggest > what is going wrong. > > > > value="fileActiveStatus"/> > > regards, > Pankaj > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem in setting the value of hidden field in JSP
Pankaj, You shouldn't be setting both the value and the property attributes of html:hidden -Richard Pankaj Gupta wrote: Hi, In a JSP, I am iterating over a collection and want to set a hidden field with the value of one of the properties of the objects contained in hashtable. I am using the following code for that. Can somebody suggest what is going wrong. value="fileActiveStatus"/> regards, Pankaj - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Problem in setting the value of hidden field in JSP
Hi, In a JSP, I am iterating over a collection and want to set a hidden field with the value of one of the properties of the objects contained in hashtable. I am using the following code for that. Can somebody suggest what is going wrong. regards, Pankaj
Re: how to dynamically internationalize login page
leo. Please don't do so. In Struts you can do the language switching with the locale Action. For this you have to provide several resources in the java resourcebundle manner: - provide a file for your message-ressource e.g. resources.properties - provide a file for each language and name it resources_en.properties for english resources_de.properties for german resources_fr.properties for france etc. - struts itsself fetches the right file. You have to do nothing else. Download http://struts-ge-packt.de/download/code.zip for examples. Here you can see how to deal with the most of the actions that are provided with struts. Manfred Struts goes mobile: http://strutsme.org leo mj wrote: > hi all, > > I think some fellow member has asked the same question.But I didn't find any > reply for the old thread. > > So i have a scenario > > I have a login page with > > 1.Username > 2.Password > 3.Language > > Based on the language selected I have to reload the page. > > I have used internationalization techniques like ApplicationResources_de for > german.But this is a scenario where the language to be displayed is > preconfigured using in struts-config.xml. > > But dynamic selection of language,i feel can be done only if > is modified using Action > class. > > I have done the modification using SAX parser and FileWriter.But I need a > more neat way to do so.Is it possible??? > > Regards, > Leo > > > > > > - > Stay in the know. Pulse on the new Yahoo.com. Check it out. > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Trouble with titleKey attribute for Frame and Link elements
David Cagle ha scritto: Hey everyone! I'm having trouble with the 'titleKey' attribute resolving to the correct translated title when the locale of my web app is something other than English. I'm currently only using the 'titleKey' on a couple of and elements, but when I change the locale, the text is always in English. Is there something that I'm missing, like another tag to add to my JSP or another attribute? That's definitely strange... How do you change your locale? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: OT(Open pdf in a frame on a web page)
What is preventing you from doing so? Could you please explain more? Thanks and Regards, Thomas Joseph Kott Software Pvt. Ltd. | Vallamattom Estate | M.G.Road | Cochin, Kerala - 682015 | India www.kottsoftware.com This email (including any attachments) is subject to copyright, the information in it is confidential, and it is legally privileged. Use of this email or of any information in it other than by the addressee is unauthorized and unlawful. If you are not the intended recipient of the mail, kindly notify the author of the mail and delete the same. It doesn't matter how you were, but rather how you are that decides your future. A right attitude will get you to Success. - Original Message - From: Meenakshi Singh To: Struts Users Mailing List (E-mail) Sent: Wednesday, September 13, 2006 12:32 PM Subject: OT(Open pdf in a frame on a web page) Hi all, We are wanting to open a PDF file (using FDF datastream) in the same frame within our existing web page.Surely there MUST be a way to do this. Can anybody suggest a way out of this problem. Thanks & Regards, MS "The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments. WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus/trojan/worms/malicious code transmitted by this email. www.mind-infotech.com " - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: FormFile arrays
try nested tags for file object in jsp and array of formfile for getter and setters mailto:[EMAIL PROTECTED] Sent: Wednesday, September 13, 2006 6:23 AM To: Struts Users Mailing List Subject: Re: FormFile arrays David Grundberg wrote: > You are right about the jakarta commons fileupload and struts, you > can't use commons fileupload in an action, because struts have already > taken care of the multi-part parsing. You do have the option to make a > servlet and commons fileupload, where you will have total control of > the form data. I'm not certain about your way of making the files go > into an array. Is that the way to do it with for example html:text? > One would expect it to work in a similar fashion. > > http://www.jguru.com/faq/view.jsp?EID=915898 > This link suggests that you use the same name all over again for each > entry, like "notworkingfile", "notworkingfile", and so on... > I've done this with html:text and it does work. The catch is that html:file requires the property attribute to be specified. I could make a class with accessors for each FromFile. That seems convoluted.. I'm hoping for a simpler solution then that. I'll post code if I can make this work. > > Jeremiah Johnson skrev: >> I would like to upload multiple files on a single web page by having >> multiple elements. The exact number of these are >> different depending on the user who is using the application. So I >> want to store this in an array (FormFile[]) in order to have N number >> of files uploaded. When I try to use tags in an iterate >> loop (with indexed="true") I get an error about requiring property >> attribute. There's isn't a good way of doing that so I just rendered >> the the HTML with scriplets. It looks something like: >> >> >> >> >> >> >> >> The form has getters and setters for workingfile (of type FormFile) >> and notworkingfile ( of type FormFile[] that is 3 elements). >> workingfile is assigned an instantied object however each element of >> notworkingfile[] is null after submit. >> >> I then attempted to use commons-fileupload-1.1.1 in a struts action >> (struts 1.2.9) to read the uploaded data but it does not recognize >> that any files are being uploaded (including workingfile). I tried >> this code: >> >>List items = new ServletFileUpload( >>new DiskFileItemFactory()).parseRequest(request); >> >> items results in an empty collection (but not null). I've read that >> you can not use commons-fileupload in a struts action which may be >> why that doesn't work. Anyone know how to have variable number of >> file upload boxes? I know I could have properties for each file >> (file1,file2,file3 and so on) instead of array but I'd rather not >> implement it that way. Thanks! >> >> Jeremiah >> >> - >> 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]
how to implement tokens
hai, Thanks for give this idea. I implemented in my action class like this if(isTokenValid(request)) resetToken(request) --- --- saveToken(request).. but no effect on this gomes
RE: empty fields of an input form get default value after submitting
Hi, Since 0 would be the default value for primitive int, you cant do any thing over there. But if you are using Integer object then youc an get null. In the formBean you would have instantiated the fields globally. Check that. Ex : String s = ""; or String s = new String("") ; If so then you got to change it to String s = null; Then you would get it as null. Hope this helps you. Anil. -Original Message- From: Sandra Reichert [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 13, 2006 1:10 PM To: Struts Users Mailing List Subject: empty fields of an input form get default value after submitting Hi, I have an input form in jsp. After submitting empty fields (user entered nothing in input field) are set by default with specific values depending on their data typ. So an empty Integer field is set to 0, an String field to "" an so on. But i want to have a null value for empty fields. Or in other words: How can i decide if for example the 0 is entered by user or the default initialization. Can anybody help Thanks Sandra Reichert - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Information transmitted by this e-mail is proprietary to Infinite Computer Solutions and / or its Customers and is intended for use only by the individual or the entity to which it is addressed, and may contain information that is privileged, confidential or exempt from disclosure under applicable law. If you are not the intended recipient or it appears that this mail has been forwarded to you without proper authority, you are notified that any use or dissemination of this information in any manner is strictly prohibited. In such cases, please notify us immediately at [EMAIL PROTECTED] and delete this email from your records. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
empty fields of an input form get default value after submitting
Hi, I have an input form in jsp. After submitting empty fields (user entered nothing in input field) are set by default with specific values depending on their data typ. So an empty Integer field is set to 0, an String field to "" an so on. But i want to have a null value for empty fields. Or in other words: How can i decide if for example the 0 is entered by user or the default initialization. Can anybody help Thanks Sandra Reichert - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
OT(Open pdf in a frame on a web page)
Hi all, We are wanting to open a PDF file (using FDF datastream) in the same frame within our existing web page.Surely there MUST be a way to do this. Can anybody suggest a way out of this problem. Thanks & Regards, MS The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments. WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus/trojan/worms/malicious code transmitted by this email. www.mind-infotech.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: insertion problem view
Just add forward.setRedirect(true) before u return the forward. "David Friedman" <[EMAIL PROTECTED] .com> To "Struts Users Mailing List" 09/13/2006 10:02 AM cc Subject Please respond to RE: insertion problem view "Struts Users Mailing List" <[EMAIL PROTECTED] he.org> Try struts tokens. -Original Message- From: Gomathi [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 13, 2006 12:33 AM To: Struts Users Mailing List Subject: insertion problem view hai, i am inserting new row into database using struts?Its perfectly inserted. Suppose i am right click the mouse then press refresh again row inserted once again(same value). How to solve this probleem. thanks and advance gomes - 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]