RE: redirect=true ActionErrors
Hi Hubert, It would be nice if I get those subclasses to add to my app. Please point me to location of the patches. Also a write up for usage of those classes. Thanks Manjunath -Original Message- From: Hubert Rabago [mailto:[EMAIL PROTECTED] Sent: Monday, February 02, 2004 10:29 PM To: Struts Users Mailing List Subject: RE: redirect=true ActionErrors Manjunath, The patch was just submitted and Ted Husted indicated he will look at it, but just because someone submits a patch doesn't mean it gets committed (I would hope not!). If it doesn't and you still need it, I can help you add some subclasses to your project to make it work for you. - Hubert --- Manjunath Bhat [EMAIL PROTECTED] wrote: Hi Thanks for the reply. My first concerns is with the action errors display on the web page, which is lost due to redirect=true, since it is bound to the request. I looked into transaction token, but its does not solve error display. I am thinking of using it somewhere else in my app. Thanks for the info I was going through the link provided by you, where the patch for ActionForward is being addressed. Please let me know which build of struts should I use to check the new implementation. Manjunath/ -Original Message- From: Hubert Rabago [mailto:[EMAIL PROTECTED] Sent: Thursday, January 29, 2004 1:33 PM To: Struts Users Mailing List Subject: Re: redirect=true ActionErrors There's no built-in support for this in the current version of Struts. I'm currently working on a patch which would support this (http://issues.apache.org/bugzilla/show_bug.cgi?id=866), but of course there's no guarantee that the patch (or something like it) will make it to a struts release. In the meantime, you may want to look into using struts' transaction tokens to allow you to detect double submissions when the user clicks refresh. If you're aching for this enhancement for your app, let me know and I'll send you some Struts subclasses that you can incorporate in your current project. (It's 2 AM my time, though, so I may not get back to you right away.) - Hubert --- Manjunath Bhat [EMAIL PROTECTED] wrote: The errors that I populated in ActionErrors in my action classes are not displayed in page if I use redirect=true. I am using redirect=true to handle user clicking refresh button. If I use redirect=false the ActionErrors are displayed. But I don't want to use redirect=false. Is there any work around for this problem? TIA Majnunath __ Do you Yahoo!? Yahoo! SiteBuilder - Free web site building tool. Try it! http://webhosting.yahoo.com/ps/sb/ - 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]CVS client
List Mailbox wrote: You can also enable icons that show which files have been changed locally in the Navigator or Package Explorer - under Window | Preferences | Workbench | Label Decorations. Cal www.calandva.com Ah, that is great. Thanks! I'd never noticed that option before, and it's very helpful. -n. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: web spider
I would be interested to see how you have set it up :) thanks Chris -Original Message- From: Tomeu Vizoso [mailto:[EMAIL PROTECTED] Sent: 30 January 2004 10:03 To: 'Struts Users Mailing List' Subject: RE: web spider Hi, I'm using a custom solution using Websphinx as the spider and Lucene as the indexing and search engine. This results in an all-java solution that can be deployed in any hosting provider. It requires very very little coding, request if you want to see our code. I'm right now having some problems with session handling, but don't expect to be real show-stoppers. Regards, Tomeu Vizoso -Mensagem original- De: Franck Lefebure [mailto:[EMAIL PROTECTED] Enviada: quinta-feira, 22 de Janeiro de 2004 16:34 Para: Struts Users Mailing List Assunto: Re: web spider Le Thursday, January 22, 2004 11:15 AM, McCormack, Chris [EMAIL PROTECTED] m'a, d'une plume avisee, ecrit: Hello all Has anyone tried to successfully spider their struts website using any open-source/free spider app ? No problem with htdig -- Franck Lefebure - 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] *** This e-mail and its attachments are confidential and are intended for the above named recipient only. If this has come to you in error, please notify the sender immediately and delete this e-mail from your system. You must take no action based on this, nor must you copy or disclose it or any part of its contents to any person or organisation. Statements and opinions contained in this email may not necessarily represent those of Littlewoods. Please note that e-mail communications may be monitored. The registered office of Littlewoods Limited and its subsidiaries is 100 Old Hall Street, Liverpool, L70 1AB. Registered number of Littlewoods Limited is 262152. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT]CVS client
Another nice option is SmartCVS (http://www.smartcvs.com). It is a pure Java GUI app that is available as a free version or a reasonably priced commercial version (with more features). One especially nice thing about SmartCVS is that it is easy to setup for CVS over SSH access. I don't mind setting up keys for traditional CVS over SSH access, but SmartCVS is very easy to setup for folks who don't want to mess with SSH key setup (I think it just remembers the password you type in, rather than using keys). However, I generally use WinCVS, and put the directory with cvs.exe in my path so that I can use it from the command line, too. I have Cygwin installed (without installing the cvs package, since WinCVS's cvs in is my path) and use its ssh client for CVS over SSH (may require some additional setup so it finds your SSH keys). I also use IntelliJ IDEA's CVS features. Each client (WinCVS GUI, cvs command line, IDEA) is useful in certain situations. Specifically, WinCVS's flatten and show committable files only feature is nice for committing a bunch of files that I changed in different directories. The command line is nice for updates and tagging when you are already at the command line to run Ant builds, etc. IDEA's client is nice when I am using the IDE. -Max - Original Message - From: Ramadoss Chinnakuzhandai [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, February 03, 2004 12:17 PM Subject: [OT]CVS client Hi, can anybody suggest me any better CVS client other than WinCVS and JCVS? Tnx in advance, -Ramadoss - 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: Basic Tiles question!
tiles:insert attribute=content / On 5 Feb 2004, at 06:47, Anand Stephen wrote: Any idea what would cause this exception? 500 Servlet Exception java.lang.NullPointerException at org.apache.struts.taglib.tiles.InsertTag.processName(InsertTag.java: 528) at org.apache.struts.taglib.tiles.InsertTag.createTagHandler(InsertTag.jav a :487) at org.apache.struts.taglib.tiles.InsertTag.doStartTag(InsertTag.java:445) thank you, -- a -tiles-def.xml ?xml version=1.0 encoding=UTF-8? !-- -- !DOCTYPE tiles-definitions PUBLIC -//Apache Software Foundation//DTD Tiles Configuration 1.1//EN http://jakarta.apache.org/struts/dtds/tiles-config_1_1.dtd; tiles-definitions definition name=mainlayout page=/site/search/tiles/text_1.jsp put name=content value=/site/search/tiles/text.jsp/ /definition /tiles-definitions --- end tiles-def.xml -- --- Struts-config.xml - plug-in className=org.apache.struts.tiles.TilesPlugin set-property property=definitions-config value=/WEB-INF/tiles-def.xml l / set-property property=moduleAware value=true / set-property property=definitions-debug value=1/ set-property property=definitions-parser-validate value=true / /plug-in --- end struts config -- the jsp %@ taglib uri=/WEB-INF/tlds/tiles.tld prefix=tiles % html head title testing. /title /head body tiles:get name=content/ /body /html -- end jsp --- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: web spider
we hope you can share it here. thanks, Richard - Original Message - From: McCormack, Chris [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Thursday, February 05, 2004 5:19 PM Subject: RE: web spider I would be interested to see how you have set it up :) thanks Chris -Original Message- From: Tomeu Vizoso [mailto:[EMAIL PROTECTED] Sent: 30 January 2004 10:03 To: 'Struts Users Mailing List' Subject: RE: web spider Hi, I'm using a custom solution using Websphinx as the spider and Lucene as the indexing and search engine. This results in an all-java solution that can be deployed in any hosting provider. It requires very very little coding, request if you want to see our code. I'm right now having some problems with session handling, but don't expect to be real show-stoppers. Regards, Tomeu Vizoso -Mensagem original- De: Franck Lefebure [mailto:[EMAIL PROTECTED] Enviada: quinta-feira, 22 de Janeiro de 2004 16:34 Para: Struts Users Mailing List Assunto: Re: web spider Le Thursday, January 22, 2004 11:15 AM, McCormack, Chris [EMAIL PROTECTED] m'a, d'une plume avisee, ecrit: Hello all Has anyone tried to successfully spider their struts website using any open-source/free spider app ? No problem with htdig -- Franck Lefebure - 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] *** This e-mail and its attachments are confidential and are intended for the above named recipient only. If this has come to you in error, please notify the sender immediately and delete this e-mail from your system. You must take no action based on this, nor must you copy or disclose it or any part of its contents to any person or organisation. Statements and opinions contained in this email may not necessarily represent those of Littlewoods. Please note that e-mail communications may be monitored. The registered office of Littlewoods Limited and its subsidiaries is 100 Old Hall Street, Liverpool, L70 1AB. Registered number of Littlewoods Limited is 262152. - 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: Technical question about Struts Workflow Extension
Hi, We have just created an account with source forge for the workflow extension project and will be transferring the source code etc. to that account in the next couple of days. So we are just in early stages of code transfer. But regarding your question. As you said,most of the workflow information can be made available for reading atleast.And I had came across similar problem and mr.Matthias bauer had replied that it was just overlooked.As this extension was developed/modified as and when the requirements arose, it does not have all required extension points and public API. So that is the first task I am going to undertake.To see what parts of workflow can be made public and where all extension points are possible so that users can customise behaviour of the workflow. And I am planning a next release very soon ,But have no definite schedule.But I am really looking forward to getting more such ideas /requests so that the next version can be designed keeping into view all of this. And your requirement has just given me the idea for next immediate release.First thing I can do is to atleast make all Workflow state available in readOnly mode so that existing users can access use this functionality without breaking any of the workflow logic. Any ideas/suggestions are welcome. I am forwarding this mail to struts user list so that others can also contribute to this discussion. regards, Shirish. -Original Message- From: Ignacio Cruzado Nuño [mailto:[EMAIL PROTECTED] Sent: Thursday, February 05, 2004 8:51 AM To: Sakhare, Shirishchandra Subject: Technical question about Struts Workflow Extension Dear Struts Workflow Extension team: I'm Ignacio Cruzado, from Spain, computer programmer who works on Tecsidel SA (a programming company) as a computer consultant. Matthias Bauer gave me your email address in order to redirect this technical question... I hope to be writing to the right person (I'm sorry if you are not this one!). We are using struts workflow extension (SWE) in our development, and we would like to access the mapping information that SWE clases manage (the dependencies modelled in the struts-config.xml file). In your Workflow scope web page you only provide information about the Primary Workflow and it's state. I would find very valuable to have methods to access also to the dependencies of the actual state: nextState, prevState, isEndWorkflow and so on... I have been studying the source code of SWE and I have found out that this information is managed by the SWE, but not published (most methods and data structure that manage the mapping are on the private/protecthed/package scope, instead of the public scope (where I would love to found them!). Why SWE API design doesn't publish that information? Is there a technical reason for that? I'm talking about just readding (get) not establishing or manipulating (set) that information. I know that we can change the source code, in order to open that information, but before doing this I would like to ask you to put much more getter methods in order to ask the SWE about the workflow mapping that the developer has established, and get more information about the actual state of the workflow. Are you working on that? Is a new release of the SWE scheduled? Is it going to have new functionallity in the way I'm asking for? Best regards, Ignacio Ignacio Cruzado Nuño Tecsidel S.A. Parque Tecnológico de Boecillo, Parcela 114 47151 Boecillo (Valladolid) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
REPOST: newbie - How to generate form controls dynamically in struts
Reposting my query since nobody answered it... -Original Message- From: Sudip Kumar Bhattacharya [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 04, 2004 4:45 PM To: Struts Users Mailing List Subject: newbie - How to generate form controls dynamically in struts Hi friends, I need to create some controls dynamically which should be struts enabled. Sample output code is as follows. How can I use some collection/array to store the information, and then render the html:fields, so that they are handled by struts like normal hardcoded controls? I have seen some logic:iterator samples using bean:message tags in them, but I could not find any sample that demonstrates outputting struts html controls using an iterator. --- TR TDEnglish taken for 9th grade credit/TD TDhtml:radio value=1 property=eng9//TD TDhtml:radio value=2 property=eng9//TD TDhtml:radio value=1 property=eng9_grade//TD TDhtml:radio value=2 property=eng9_grade//TD TDhtml:radio value=3 property=eng9_grade//TD TDhtml:radio value=4 property=eng9_grade//TD TDhtml:radio value=5 property=eng9_grade//TD TDhtml:radio value=1 property=eng9a//TD TDhtml:radio value=2 property=eng9a//TD TDhtml:checkbox value=3 property=eng9h//TD /TR TR TDEnglish taken for 10th grade credit/TD TDhtml:radio value=1 property=eng10//TD TDhtml:radio value=2 property=eng10//TD TDhtml:radio value=1 property=eng10_grade//TD TDhtml:radio value=2 property=eng10_grade//TD TDhtml:radio value=3 property=eng10_grade//TD TDhtml:radio value=4 property=eng10_grade//TD TDhtml:radio value=5 property=eng10_grade//TD TDhtml:radio value=1 property=eng10a//TD TDhtml:radio value=2 property=eng10a//TD TDhtml:checkbox value=3 property=eng10h//TD /TR - Thanks in advance Sudip - 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: Hi
Hi Umesh A - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: global data objects -- best practices?
Ooofff ... off-by-one error warning ... :-) Quoting Craig R. McClanahan [EMAIL PROTECTED]: If you are in a Servlet 2.4 environment, use a ServletContextListener -- this is exactly what they are defined to do. Your contextInitialized() method is called once, before any requests are accepted by the app, and contextDestroyed() is called exactly once when the app is removed (or the server is shut down). This actually works from Servlet 2.3 onward. If you are in a Servlet 2.3 environment, use a Struts PlugIn. Under most scenarios, this will have the same effect (as long as you set the load-on-startup attribute in web.xml); however servlet containers are allowed to unload and reload a servlet during the lifetime of an application, which would cause the initialization to be redone at reload. Fortunately, containers don't tend to do that -- especially not to a servlet that will get invoked as often as the Struts controller servlet does. This advice actually applies to Servlet 2.2 platforms, before ServletContextListener was part of the standard Servlet spec. Craig McClanahan Craig - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: REPOST: newbie - How to generate form controls dynamically in struts
Have you looked at the tutorials on the Keyboard Monkey site? It may prove helpful. (Concerns nested form beans. You may be able to make use of these techniques to implement it?) http://www.keyboardmonkey.com/next/index.jsp Although in this case based on your sample output you could probably manage using simple iteration and a collection in the form field. Worth taking a look at the nested tutorials though. -Original Message- From: Sudip Kumar Bhattacharya [mailto:[EMAIL PROTECTED] Sent: Thursday, 5 February 2004 19:50 To: Struts Users Mailing List Subject: REPOST: newbie - How to generate form controls dynamically in struts Reposting my query since nobody answered it... -Original Message- From: Sudip Kumar Bhattacharya [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 04, 2004 4:45 PM To: Struts Users Mailing List Subject: newbie - How to generate form controls dynamically in struts Hi friends, I need to create some controls dynamically which should be struts enabled. Sample output code is as follows. How can I use some collection/array to store the information, and then render the html:fields, so that they are handled by struts like normal hardcoded controls? I have seen some logic:iterator samples using bean:message tags in them, but I could not find any sample that demonstrates outputting struts html controls using an iterator. --- TR TDEnglish taken for 9th grade credit/TD TDhtml:radio value=1 property=eng9//TD TDhtml:radio value=2 property=eng9//TD TDhtml:radio value=1 property=eng9_grade//TD TDhtml:radio value=2 property=eng9_grade//TD TDhtml:radio value=3 property=eng9_grade//TD TDhtml:radio value=4 property=eng9_grade//TD TDhtml:radio value=5 property=eng9_grade//TD TDhtml:radio value=1 property=eng9a//TD TDhtml:radio value=2 property=eng9a//TD TDhtml:checkbox value=3 property=eng9h//TD /TR TR TDEnglish taken for 10th grade credit/TD TDhtml:radio value=1 property=eng10//TD TDhtml:radio value=2 property=eng10//TD TDhtml:radio value=1 property=eng10_grade//TD TDhtml:radio value=2 property=eng10_grade//TD TDhtml:radio value=3 property=eng10_grade//TD TDhtml:radio value=4 property=eng10_grade//TD TDhtml:radio value=5 property=eng10_grade//TD TDhtml:radio value=1 property=eng10a//TD TDhtml:radio value=2 property=eng10a//TD TDhtml:checkbox value=3 property=eng10h//TD /TR - Thanks in advance Sudip - 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: Hi
Can any body make me aware about StrutsEJB Umesh A -Original Message- From: A Umesh Sent: Thursday, February 05, 2004 5:31 PM To: Struts Users Mailing List Subject: RE: Hi Hi Umesh A - 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: Hi
G'day -Original Message- From: A Umesh [mailto:[EMAIL PROTECTED] Sent: Thursday, 5 February 2004 20:01 To: Struts Users Mailing List Subject: RE: Hi Hi Umesh A - 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: Hi
Ya same to u Umesh A Software Engineer First American Interactive Division Unit 1, Level 1, Explorer Building International TechPark, Whitefield Road Bangalore 560 066. INDIA Phone : 91 80 5115 6050 Extn. 4032 Fax: 91 80 841 1858 Email id: [EMAIL PROTECTED] -Original Message- From: Andrew Hill [mailto:[EMAIL PROTECTED] Sent: Thursday, February 05, 2004 5:34 PM To: Struts Users Mailing List Subject: RE: Hi G'day -Original Message- From: A Umesh [mailto:[EMAIL PROTECTED] Sent: Thursday, 5 February 2004 20:01 To: Struts Users Mailing List Subject: RE: Hi Hi Umesh A - 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]
AW: REPOST: newbie - How to generate form controls dynamically in struts
Hi, use the iterator tag in this way: logic:iterator name=myForm property=myBean id=list html:radio name=myForm property=myPropertyOfSelectedValue idName=list value=id bean:write name=list property=name/ /html:radio /logic:iterator Regards, Frank -Ursprungliche Nachricht- Von: Sudip Kumar Bhattacharya [mailto:[EMAIL PROTECTED] Gesendet: Donnerstag, 5. Februar 2004 12:50 An: Struts Users Mailing List Betreff: REPOST: newbie - How to generate form controls dynamically in struts Reposting my query since nobody answered it... -Original Message- From: Sudip Kumar Bhattacharya [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 04, 2004 4:45 PM To: Struts Users Mailing List Subject: newbie - How to generate form controls dynamically in struts Hi friends, I need to create some controls dynamically which should be struts enabled. Sample output code is as follows. How can I use some collection/array to store the information, and then render the html:fields, so that they are handled by struts like normal hardcoded controls? I have seen some logic:iterator samples using bean:message tags in them, but I could not find any sample that demonstrates outputting struts html controls using an iterator. --- TR TDEnglish taken for 9th grade credit/TD TDhtml:radio value=1 property=eng9//TD TDhtml:radio value=2 property=eng9//TD TDhtml:radio value=1 property=eng9_grade//TD TDhtml:radio value=2 property=eng9_grade//TD TDhtml:radio value=3 property=eng9_grade//TD TDhtml:radio value=4 property=eng9_grade//TD TDhtml:radio value=5 property=eng9_grade//TD TDhtml:radio value=1 property=eng9a//TD TDhtml:radio value=2 property=eng9a//TD TDhtml:checkbox value=3 property=eng9h//TD /TR TR TDEnglish taken for 10th grade credit/TD TDhtml:radio value=1 property=eng10//TD TDhtml:radio value=2 property=eng10//TD TDhtml:radio value=1 property=eng10_grade//TD TDhtml:radio value=2 property=eng10_grade//TD TDhtml:radio value=3 property=eng10_grade//TD TDhtml:radio value=4 property=eng10_grade//TD TDhtml:radio value=5 property=eng10_grade//TD TDhtml:radio value=1 property=eng10a//TD TDhtml:radio value=2 property=eng10a//TD TDhtml:checkbox value=3 property=eng10h//TD /TR - Thanks in advance Sudip - 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]
FW: Custom solution with Spider and Search
Hi, I was not sure if it was of interest for the mailing list community. Here you have what I've done till now. It's incomplete but perhaps it serves as a starting point. Regards, Tomeu -Mensagem original- De: Tomeu Vizoso [mailto:[EMAIL PROTECTED] Enviada: quarta-feira, 4 de Fevereiro de 2004 11:17 Para: 'BaTien Duong' Assunto: RE: Custom solution with Spider and Search Hi BaTien, I hope it helps. Take in account that it's only in it's start. Perhaps it will help you to start. Regards, Tomeu - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Form populate
Title: Form populate Hi all, This may have been discussed earlier.. but i couldnt find any useful way to solve the problem... here it goes.. I have a form with text fields which i am populating in the constructor and in the jsp it works fine.. just printing the default values. But in the action class of the form i try to change these values using the setter methodsd but the new values are not updated in the jsp.. All i want to do is to change the values of form of the JSP from the action class i was trying //- change the values of the form if (request.equals(mapping.getScope())) { request.setAttribute(mapping.getAttribute(), regform); // - how to send this form to the jsp It is taking the default values. } Hope i am clear here!! Thanks regards, N Sudhakar This e-mail and any files transmitted with it are for the sole use of the intended recipient(s) and may contain confidential and privileged information. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message. Any unauthorised review, use, disclosure, dissemination, forwarding, printing or copying of this email or any action taken in reliance on this e-mail is strictly prohibited and may be unlawful. Visit us at http://www.cognizant.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
FW: Custom solution with Spider and Search
Sorry, something ate the attachments. Four classes follow. You can find easily the websphinx and lucene packages easily on the net. package foo.common; import java.io.IOException; import java.net.MalformedURLException; import org.apache.lucene.document.DateField; import org.apache.lucene.document.Document; import org.apache.lucene.document.Field; import org.apache.lucene.index.IndexWriter; import websphinx.DownloadParameters; import websphinx.Element; import websphinx.Link; import websphinx.Page; public class Crawler extends websphinx.Crawler { private IndexWriter writer; public Crawler(IndexWriter writer, String docroot) { super(); try { this.setRoot(new Link(docroot)); } catch (MalformedURLException e) { this.setRoot(null); } this.writer = writer; this.setSynchronous(true); this.setDomain(Crawler.SERVER); DownloadParameters dp = new DownloadParameters(); dp.changeMaxThreads(1); this.setDownloadParameters(dp); } public void visit(Page p) { boolean index = false; index(p); } public void index(Page p) { StringBuffer contents = new StringBuffer(); Document doc = new Document(); doc.add(Field.Text(url, p.getURL().toString())); doc.add( Field.Keyword( modified, DateField.timeToString(p.getLastModified(; if (p.getTitle() != null) { doc.add(Field.Text(title, p.getTitle())); } Element[] elements = p.getElements(); for (int i = 0; i elements.length; i++) { if (elements[i].getTagName().equalsIgnoreCase(meta)) { String name = elements[i].getHTMLAttribute(name, ); String content = elements[i].getHTMLAttribute(content, ); if (!name.equals()) { doc.add(Field.Text(name, content)); } } } try { writer.addDocument(doc); } catch (IOException e) { throw new RuntimeException(e.toString()); } } public void noindex(Page p) { System.out.println(Skipping...); } public boolean shouldVisit(Link l) { if(l.getURL().toString().indexOf(setLanguage) -1) return false; return true; } } package foo.common; import java.io.File; import java.io.IOException; import org.apache.lucene.analysis.standard.StandardAnalyzer; import org.apache.lucene.index.IndexWriter; public class Indexer { public static void index() throws IOException { index(en); index(pt); } public static void index(String languageId) throws IOException { IndexWriter writer = new IndexWriter( new File(temp/ + languageId), new StandardAnalyzer(), true); Crawler crawler = new Crawler( writer, http://zanserver:8080/eloja-tomeu/catalog/welcome.do?hasFlash=nolangua geId= + languageId); crawler.run(); writer.close(); } } package foo.catalog; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.lucene.analysis.standard.StandardAnalyzer; import org.apache.lucene.document.Document; import org.apache.lucene.queryParser.QueryParser; import org.apache.lucene.search.Hits; import org.apache.lucene.search.IndexSearcher; import org.apache.lucene.search.Query; import org.apache.lucene.store.Directory; import org.apache.lucene.store.FSDirectory; import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionForward; import org.apache.struts.action.ActionMapping; import pt.co.zan.eloja.common.LocaleHolder; import pt.co.zan.struts.eloja.common.BaseAction; public class SearchProductAction extends BaseAction { public ActionForward execute( ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse
RE: Form populate
Form populate var first_name=document.CandidateForm.first_name.value; u have to get the value of the form from jsp like this only -Original Message- From: Namasivayam, Sudhakar (Cognizant) [mailto:[EMAIL PROTECTED] Sent: Thursday, February 05, 2004 6:04 PM To: [EMAIL PROTECTED] Subject: Form populate Hi all, This may have been discussed earlier.. but i couldnt find any useful way to solve the problem... here it goes.. I have a form with text fields which i am populating in the constructor and in the jsp it works fine.. just printing the default values. But in the action class of the form i try to change these values using the setter methodsd but the new values are not updated in the jsp.. All i want to do is to change the values of form of the JSP from the action class i was trying //- change the values of the form if (request.equals(mapping.getScope())) { request.setAttribute(mapping.getAttribute(), regform); // - how to send this form to the jsp It is taking the default values. } Hope i am clear here!! Thanks regards, N Sudhakar
duplicate form object
im new, i have 2 subscriptionForm objects instead of a single OID. The trace below involves these activities: 1. subscription.jsp is submitted and handled by subscriptionForm whose configuration includes: name=subscriptionForm scope=session 2. a forward occurs on name success and the config codes for the action actionpath=/saveSubscription to forward to path=/Welcome.do/ 3. the forward action for path=/Welcome has attribute name=subscriptionForm and attribute parameter=/Welcome.jsp The Problem - There should only be 1 subscription object but there are 2 different ones : - one at step 1 - another one at step 3 Why the duplication? In step 3, in Welcome.jsp, when i say: pHavObj: %=subscription.toString()% why don't i reference the same Form object created in the subscription.jsp at step 1? - Gorey Details 1. webapps\struts-blank\subscription.jsp %@ taglib uri=/WEB-INF/struts-bean.tld prefix=bean % %@ taglib uri=/WEB-INF/struts-html.tld prefix=html % ... jsp:useBean id=subscription scope=session class=com.borneo.beans.SubscriptionForm / 2. struts-config.xml actionpath=/saveSubscription type=com.borneo.beans.SaveSubscriptionAction name=subscriptionForm scope=session validate=true input=subscription forward name=successpath=/Welcome.do/ forward name=subscriptionpath=/subscription.jsp/ !-- forward name=success path=/Welcome/ -- /action action path=/Welcome name=subscriptionForm type=org.apache.struts.actions.ForwardAction parameter=/Welcome.jsp / 3. Welcome.jsp %@ taglib uri=/tags/struts-bean prefix=bean % %@ taglib uri=/tags/struts-html prefix=html % %@ taglib uri=/tags/struts-logic prefix=logic % html:html locale=true head titlebean:message key=welcome.title//title html:base/ /head body bgcolor=white !--jsp:useBean id=subscription scope=session class=com.borneo.beans.SubscriptionForm /-- logic:notPresent name=org.apache.struts.action.MESSAGE scope=application font color=red ERROR: Application resources not loaded -- check servlet container logs for error messages. /font /logic:notPresent h3bean:message key=welcome.heading//h3 pbean:message key=welcome.message//p a href='jsp:getProperty name=subscription property=jnlpaddr/ 'Launch JWS App./a pHavObj: %=subscription.toString()% /p /body -- StdOut from prints that prove 2 different objects on the server OID : [EMAIL PROTECTED] URL to Bean prop jnlpaddr : file:/G:/jakarta-tomcat-5.0.16/work/Catalina/localhost/struts-blank/A022B619 DD01CCEpoll.jnlp on IE Launch JWS App. HavObj: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Form populate
granted your struts-config is setup properly to use your bean and it extends actionForm, then why don't you just use the reference that is passed in to the execute method? if( form instanceof myForm ){ myForm mf = (myForm)form; mf.setXXX( Steelers rule ); } You don't need to worry about setting it to a scope - Struts takes care of that for you. -Ben From: Namasivayam, Sudhakar (Cognizant) [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Form populate Date: Thu, 5 Feb 2004 18:03:32 +0530 Hi all, This may have been discussed earlier.. but i couldnt find any useful way to solve the problem... here it goes.. I have a form with text fields which i am populating in the constructor and in the jsp it works fine.. just printing the default values. But in the action class of the form i try to change these values using the setter methodsd but the new values are not updated in the jsp.. All i want to do is to change the values of form of the JSP from the action class i was trying //- change the values of the form if (request.equals(mapping.getScope())) { request.setAttribute(mapping.getAttribute(), regform); // - how to send this form to the jsp It is taking the default values. } Hope i am clear here!! Thanks regards, N Sudhakar InterScan_Disclaimer.txt - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Find high-speed net deals comparison-shop your local providers here. https://broadband.msn.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
STC - How Can I test multiple Actions in same method
Hi, StrutsTestCase documentation says we can test multiple Actions in same method, by calling setRequestPathInfo() and actionPerform() multiple times within the same method. I am also calling clearRequestparameters() after every perform method. But I am unable to execute the second Action. Below is my code : addRequestParameter(j_username, rkulkarni); addRequestParameter(j_password, webconnect); addRequestParameter(mode, q1Ra04kE3cDo); setRequestPathInfo(/login); actionPerform(); // I am able to execute till here this.clearRequestParameters(); setRequestPathInfo(/authenticateUser); // unable to execute actionPerform(); this.clearRequestParameters(); setRequestPathInfo(/logout); actionPerform(); this.verifyForward(logoutsuccess); } TIA, Ravi kulkarni.
Can't make html:checkbox CHECKED by default
Hello, I am using html:checkbox Struts tag, but I am unable to set it to a CHECKED state by default (I read the docs). This is what I am using now: html:checkbox property=foo value=true Is 'value' not the attribute I should use for that? Which attribute should I use then? Any help would be appreciated. Thanks, Otis Get your own 800 number Voicemail, fax, email, and a lot more http://www.ureach.com/reg/tag - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[a little bit OT]struts and velocity
Hi I've tried to install velocity with struts. I followed the installation instructions from velocity. Put velocity-1.3.1.jar and velocity-tools-1.1-beta1.jar in my lib. copied toolbox.xml and velocity.properties in my WEB-INF canged web.xml to snip servlet servlet-namevelocity/servlet-name servlet-classorg.apache.velocity.tools.view.servlet.VelocityViewServlet/servlet-class init-param param-nametoolbox/param-name param-value/WEB-INF/toolbox.xml/param-value /init-param load-on-startup10/load-on-startup /servlet ... servlet-mapping servlet-namevelocity/servlet-name url-pattern*.vm/url-pattern /servlet-mapping /snip and I've writen the following velocitypage: html head titleFirst Velocitypage/title /head body #set ($hello=Dies ist meine erste Velocitypage) $hellobr/ $msg.get(hello)br/ $msg.exists(hello)br/ /body /html velocityservlet renders $hello but it did not find the message the ressources to the messages is right, I've tested it with a JSP Any suggestions? Kind regards, Markus - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Can't make html:checkbox CHECKED by default
The checkbox will display a value depending on the value of the 'foo' property of your form bean. To make the value checked set the value on the form bean before displaying the page. Paul -Original Message- From: otisg [mailto:[EMAIL PROTECTED] Sent: 05 February 2004 12:58 To: [EMAIL PROTECTED] Subject: Can't make html:checkbox CHECKED by default Hello, I am using html:checkbox Struts tag, but I am unable to set it to a CHECKED state by default (I read the docs). This is what I am using now: html:checkbox property=foo value=true Is 'value' not the attribute I should use for that? Which attribute should I use then? Any help would be appreciated. Thanks, Otis Get your own 800 number Voicemail, fax, email, and a lot more http://www.ureach.com/reg/tag - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] ** Axios Email Confidentiality Footer Privileged/Confidential Information may be contained in this message. If you are not the addressee indicated in this message (or responsible for delivery of the message to such person), you may not copy or deliver this message to anyone. In such case, you should destroy this message, and notify us immediately. If you or your employer does not consent to Internet email messages of this kind, please advise us immediately. Opinions, conclusions and other information expressed in this message are not given or endorsed by my Company or employer unless otherwise indicated by an authorised representative independent of this message. WARNING: While Axios Systems Ltd takes steps to prevent computer viruses from being transmitted via electronic mail attachments we cannot guarantee that attachments do not contain computer virus code. You are therefore strongly advised to undertake anti virus checks prior to accessing the attachment to this electronic mail. Axios Systems Ltd grants no warranties regarding performance use or quality of any attachment and undertakes no liability for loss or damage howsoever caused. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: duplicate form object
jsp:useBean id=subscription scope=session class=com.borneo.beans.SubscriptionForm / This creates a new SubscriptionForm object because no object exists in session scope(or any scope) referenced by the name subcription. Struts uses a different id. I think it depends on the version of Struts you're using as to what this id is... something like org.apache.struts.action[s].ActionForm[s] - I'm not real sure. Anyways, based on your code below, it should be using the same formBean. But, you'll have to try a little different approach if you want to prove it. -Ben From: rob rowntree [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: duplicate form object Date: Thu, 5 Feb 2004 04:40:20 -0800 im new, i have 2 subscriptionForm objects instead of a single OID. The trace below involves these activities: 1. subscription.jsp is submitted and handled by subscriptionForm whose configuration includes: name=subscriptionForm scope=session 2. a forward occurs on name success and the config codes for the action actionpath=/saveSubscription to forward to path=/Welcome.do/ 3. the forward action for path=/Welcome has attribute name=subscriptionForm and attribute parameter=/Welcome.jsp The Problem - There should only be 1 subscription object but there are 2 different ones : - one at step 1 - another one at step 3 Why the duplication? In step 3, in Welcome.jsp, when i say: pHavObj: %=subscription.toString()% why don't i reference the same Form object created in the subscription.jsp at step 1? - Gorey Details 1. webapps\struts-blank\subscription.jsp %@ taglib uri=/WEB-INF/struts-bean.tld prefix=bean % %@ taglib uri=/WEB-INF/struts-html.tld prefix=html % ... jsp:useBean id=subscription scope=session class=com.borneo.beans.SubscriptionForm / 2. struts-config.xml actionpath=/saveSubscription type=com.borneo.beans.SaveSubscriptionAction name=subscriptionForm scope=session validate=true input=subscription forward name=successpath=/Welcome.do/ forward name=subscriptionpath=/subscription.jsp/ !-- forward name=success path=/Welcome/ -- /action action path=/Welcome name=subscriptionForm type=org.apache.struts.actions.ForwardAction parameter=/Welcome.jsp / 3. Welcome.jsp %@ taglib uri=/tags/struts-bean prefix=bean % %@ taglib uri=/tags/struts-html prefix=html % %@ taglib uri=/tags/struts-logic prefix=logic % html:html locale=true head titlebean:message key=welcome.title//title html:base/ /head body bgcolor=white !--jsp:useBean id=subscription scope=session class=com.borneo.beans.SubscriptionForm /-- logic:notPresent name=org.apache.struts.action.MESSAGE scope=application font color=red ERROR: Application resources not loaded -- check servlet container logs for error messages. /font /logic:notPresent h3bean:message key=welcome.heading//h3 pbean:message key=welcome.message//p a href='jsp:getProperty name=subscription property=jnlpaddr/ 'Launch JWS App./a pHavObj: %=subscription.toString()% /p /body -- StdOut from prints that prove 2 different objects on the server OID : [EMAIL PROTECTED] URL to Bean prop jnlpaddr : file:/G:/jakarta-tomcat-5.0.16/work/Catalina/localhost/struts-blank/A022B619 DD01CCEpoll.jnlp on IE Launch JWS App. HavObj: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Get a FREE online virus check for your PC here, from McAfee. http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
repost: validator retrieving data
I'm sorry but nobody answered my question... Could somebody help me? I'm using validator for my pages. Searching the mailing list I found that I should use 2 actions: If there are 2 actions, one to prepare the page and one to process the user input, we define the input attribute value of the process action mapping to be the URL of the prepare action. I think it's right, but now I have this problem: The prepare page retrieves data from the db. If validation fails, the user is forwarded from the process action to the prepare action. In this case I don't want to retrieve data from the db, but leave what the user entered before. In other words I want to retrieve data only if the user asked for the prepare action, not when he is redirected to the prepare action from the input property of process action. Is there a way to do that? The only way i found is an hidden field, but I don't like it... - 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: Re-populating form after validate fails
I finally figured this out. It was a stupid mistake. I had html:text property=username value= /. The value= overrides what was in the bean. Once I removed this, problem solved. Paul Barry wrote: If validate fails, your action won't even be processed. You can't use any of the forwards that you may set up for your action, because your action never executes, you can't do a mapping.findForward(failure). Once validate fails, it forwards to the input. The struts example has validate=false (it uses the default) for the LogonAction. It uses the validator to validate the form, so that is a different example. I found the answer to my extra credit question, you can use input=forwardName in your action if you have inputForward set to true in your controller config. I have this set up, but it doesn't change any thing. Here is the log of what happens when I fill in a username and no password: Processing a 'POST' for path '/myaccount/loginAction' Storing ActionForm bean instance in scope 'request' under attribute key 'LoginForm' Populating bean properties from this request Validating input form properties Validation failed, returning to 'myaccount/login' processForwardConfig(ForwardConfig[name=myaccount/login,path=/myaccount/login.do,redirect=false,contextRelative=false]) Processing a 'POST' for path '/myaccount/login' Storing ActionForm bean instance in scope 'request' under attribute key 'LoginForm' Populating bean properties from this request Looking for Action instance for class myapp.struts.actions.ForwardAction Returning existing Action instance From toString in my ForwardAction - Path=[/WEB-INF/jsp/myaccount/login.jsp],Form=[Username=sdfdsf,Password=] processForwardConfig(ForwardConfig[name=null,path=/WEB-INF/jsp/myaccount/login.jsp,redirect=false,contextRelative=true]) I have removed all the info from these messages to make it easier to read. All of these messages are DEBUG messages that come from the RequestProcessor, except the toString that I am printing out near the end. This all looks like exactly what I would want to happen. The original POST goes to loginAction, the validate method is called and fails, so it forwards to myaccount/login. The form is stored in the request scope. When I call the toString method after the form has been populated, you can see the username property is populated. This makes sense. The request was forwarded from the original action to this action. The request parameters are still the same as the original request, so when the form is populated, the username field is populated. What doesn't make sense to me is that when I look at my form on the HTML page (which is /WEB-INF/jsp/myaccount/login.jsp in this case), the username property is not populated. This doesn't make sense to me. The html:form tag should see that the form property for username is populated, so therefore the 'html:test property=username' field should be populated with that value. What am I missing here? Subject: Re: Re-populating form after validate fails From: [EMAIL PROTECTED] Date: Wed, 4 Feb 2004 12:50:17 +1100 To: Struts Users Mailing List [EMAIL PROTECTED] oops, you could be right. I left that out when I was genericising my action tag... just trying to make it more generic. However, my point is still that when validate fails then the errors will not be empty... that is where your action tells struts to forward as: forward = mapping.findForward(failure); and in your struts entry you can see (in my example) that failure is defined as the same form (but it could be anything) an example of this is in the sample struts project in the struts tutorial where the login screen forwards to welcome if login was okay, or back to login if it failed. so I'm not sure if the input parameter is responsible for the forward... it could be the default? Cheers, Heya Gosper CSC Australia 212 Northbourne Ave, Braddon ACT 2612 Ph: +61 (0) 2 6246 8155 Fax: +61 (0) 2 62468100 MOB: 0401 611779 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Re-populating form after validate fails
I've seen this happen a couple of times with different people (myself included). It seems like the default (expected) behavior is: use the bean value unless it's blank, then use the html i.e. if html= and bean=text it should be the bean value if the bean= and the html=asdasdf then it should be asdasdf. And if you have html=foo and bean=bar then it should be bar. -Original Message- From: Paul Barry [mailto:[EMAIL PROTECTED] Sent: Thursday, February 05, 2004 8:24 AM To: [EMAIL PROTECTED] Subject: Re: Re-populating form after validate fails I finally figured this out. It was a stupid mistake. I had html:text property=username value= /. The value= overrides what was in the bean. Once I removed this, problem solved. Paul Barry wrote: If validate fails, your action won't even be processed. You can't use any of the forwards that you may set up for your action, because your action never executes, you can't do a mapping.findForward(failure). Once validate fails, it forwards to the input. The struts example has validate=false (it uses the default) for the LogonAction. It uses the validator to validate the form, so that is a different example. I found the answer to my extra credit question, you can use input=forwardName in your action if you have inputForward set to true in your controller config. I have this set up, but it doesn't change any thing. Here is the log of what happens when I fill in a username and no password: Processing a 'POST' for path '/myaccount/loginAction' Storing ActionForm bean instance in scope 'request' under attribute key 'LoginForm' Populating bean properties from this request Validating input form properties Validation failed, returning to 'myaccount/login' processForwardConfig(ForwardConfig[name=myaccount/login,path=/myaccount/logi n.do,redirect=false,contextRelative=false]) Processing a 'POST' for path '/myaccount/login' Storing ActionForm bean instance in scope 'request' under attribute key 'LoginForm' Populating bean properties from this request Looking for Action instance for class myapp.struts.actions.ForwardAction Returning existing Action instance From toString in my ForwardAction - Path=[/WEB-INF/jsp/myaccount/login.jsp],Form=[Username=sdfdsf,Password=] processForwardConfig(ForwardConfig[name=null,path=/WEB-INF/jsp/myaccount/log in.jsp,redirect=false,contextRelative=true]) I have removed all the info from these messages to make it easier to read. All of these messages are DEBUG messages that come from the RequestProcessor, except the toString that I am printing out near the end. This all looks like exactly what I would want to happen. The original POST goes to loginAction, the validate method is called and fails, so it forwards to myaccount/login. The form is stored in the request scope. When I call the toString method after the form has been populated, you can see the username property is populated. This makes sense. The request was forwarded from the original action to this action. The request parameters are still the same as the original request, so when the form is populated, the username field is populated. What doesn't make sense to me is that when I look at my form on the HTML page (which is /WEB-INF/jsp/myaccount/login.jsp in this case), the username property is not populated. This doesn't make sense to me. The html:form tag should see that the form property for username is populated, so therefore the 'html:test property=username' field should be populated with that value. What am I missing here? Subject: Re: Re-populating form after validate fails From: [EMAIL PROTECTED] Date: Wed, 4 Feb 2004 12:50:17 +1100 To: Struts Users Mailing List [EMAIL PROTECTED] oops, you could be right. I left that out when I was genericising my action tag... just trying to make it more generic. However, my point is still that when validate fails then the errors will not be empty... that is where your action tells struts to forward as: forward = mapping.findForward(failure); and in your struts entry you can see (in my example) that failure is defined as the same form (but it could be anything) an example of this is in the sample struts project in the struts tutorial where the login screen forwards to welcome if login was okay, or back to login if it failed. so I'm not sure if the input parameter is responsible for the forward... it could be the default? Cheers, Heya Gosper CSC Australia 212 Northbourne Ave, Braddon ACT 2612 Ph: +61 (0) 2 6246 8155 Fax: +61 (0) 2 62468100 MOB: 0401 611779 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - This message and its contents (to include attachments) are the property of Kmart Corporation (Kmart) and may contain confidential
REPOST: GZipping response with Servlet 2.2 / Struts 1.0
Hi everyone, I have read the following reply (rather old) in the archives: In servlet 2.2 environments, you basically won't be able to do this. But in servlet 2.3 environments, you can create a Filter to do the compression for you, on output from either servlets or JSP pages. This was in response to a question about adding GZip compression to a JSP in a Struts environment. I have tried doing a similar thing by extending the ActionServlet class and wrapping the original response in a GZip-compressed response, but without any success: I constantly end up receiving a download dialog on my browser (as if I were sending a zipped file) or getting ClassCastExceptions (with IBM WebSphere classes being expected). I suspect the forward mechanism is the cause to all that. Can you confirm that it is impossible to add such support for compression even by extending the ActionServlet? Would there be any other mechanism to compress the response sent to the client? Any pointers on the web? I am using the servlet 2.2 API on WebSphere 4.0.3. Thanks a lot, Guillaume - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: html:checkbox and struts-EL
You're right, I missed an element: the form is split across several pages (a wizard style form) so I can't reset the checkbox value because I need to mantain the value it had. Anyway your hint on the source location is very useful!! Thank you If you have suggestions about handling such a situation in a different way, please let me know Renato Renato Romano Sistemi e Telematica S.p.A. Calata Grazie - Vial Al Molo Giano 16127 - GENOVA e-mail: [EMAIL PROTECTED] Tel.: 010 2712603 _ -Original Message- From: Karr, David [mailto:[EMAIL PROTECTED] Sent: mercoledì 4 febbraio 2004 20.46 To: Struts Users Mailing List Subject: RE: html:checkbox and struts-EL I have no clue why you think you needed to write a customized checkbox class. It's not clear to me from your description. Having your form in session scope has little to do with it. The reset() method in the ActionForm is used to clear out checkbox values (and others) BEFORE the form is populated from the request. This is so you know that if the parameter associated with the checkbox isn't present, then the checkbox wasn't set. This may be old news to you, but I'm not sure. In any case, each Struts-EL class has an inheritance relationship with the class in the base library. You can view the source code in the CVSweb interface on the jakarta site. -Original Message- From: Renato Romano [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 04, 2004 8:58 AM To: 'Struts Users Mailing List'; [EMAIL PROTECTED] Subject: html:checkbox and struts-EL I'm using a customized version of the checkbox tag that always sets in the property field a value of true or false depending on the state of the checkbox, thus avoiding the noisy problem of not checked tags does not reset the property; this was needed to me because the form is in session scope, and so using the reset form method was not easy. Anyway, I now need to use such a checkbox inside nested/indexed properties, that I access using struts-el. It works fine, but I now think I shoul override the struts-el checkbox tag class to obtain the same behavior that's right ? Is there any class relationship between the struts-el tags and the corresponding struts tags ?? I looked for documentation or javaDoc but couldn't find nothing... Any help is appreciated Renato Renato Romano Sistemi e Telematica S.p.A. Calata Grazie - Vial Al Molo Giano 16127 - GENOVA e-mail: [EMAIL PROTECTED] Tel.: 010 2712603 _ - 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]
Printing nested properties
folder structureHi Folks... I have a situation where I have this model: Customer - name : String - phone : String - addr1 : String: - addr2 : String - sales: Vector (of following classe) Sales - date: Date - paymentMethod: String - value: Double How can I present the properties from sales objects from Vector inside the property sales from bean Customer? I would like to present: customer.getSales().getPaymentMethod() , but I wanna show with bean:write tag... some idea? since now... Thanks Edgar
Re: [OT]CVS client
Well, better is a relative term, but another client you may want to look into for Windows is Tortoise CVS (http://www.tortoisecvs.org), which incorporates CVS functionality into the Windows Explorer shell. HTH, Ian Ramadoss ChinnakuzhandaiTo: [EMAIL PROTECTED] [EMAIL PROTECTED] cc: ister.com Subject: [OT]CVS client 02/03/2004 03:17 PM Please respond to Struts Users Mailing List Hi, can anybody suggest me any better CVS client other than WinCVS and JCVS? Tnx in advance, -Ramadoss - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This transmission may contain information that is privileged, confidential and/or exempt from disclosure under applicable law. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, or use of the information contained herein (including any reliance thereon) is STRICTLY PROHIBITED. If you received this transmission in error, please immediately contact the sender and destroy the material in its entirety, whether in electronic or hard copy format. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How to export the html table contents (records) to an Excel f ile.
Does anybody know if Display Tag' performs 'in memory ' sorting? What I mean is once I give a collection of records to the 'Display Tag' user clicks on column header to sort on, does the 'Display Tag' send a new request to the Action every time or 'Display Tag' sorts the collection by itself using 'In Memory' sorting. Thanking you in advance for your help. -Original Message- From: Andrew Peck [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 04, 2004 7:19 PM To: 'Struts Users Mailing List' Subject: RE: How to export the html table contents (records) to an Excel file. You could try the displaytag tag library on sourcefourge: http://displaytag.sourceforge.net. It includes nice table export functionality for excel, csv and xml. Regards, Andy Peck -Original Message- From: [EMAIL PROTECTED] pache.org [mailto:[EMAIL PROTECTED] akarta.apa che.org]On Behalf Of [EMAIL PROTECTED] Sent: Wednesday, 4 February 2004 8:07 PM To: [EMAIL PROTECTED] Subject: How to export the html table contents (records) to an Excel file. Hi, I have webpage (.jsp) which lists out 4 to 5 records (having say 4 to 5 columns) inside html table tag. This page, has an Export button, at the bottom. On click of this button, I need to export the records (that the current page is displaying) to an .xls (Excel format) file. Shall be greatful if anyone can tip me on this. Thanks, S.Srikanth - 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: REPOST: GZipping response with Servlet 2.2 / Struts 1.0
Le Thursday, February 05, 2004 9:59 AM, BILODEAU Guillaume SOFRECOM [EMAIL PROTECTED] m'a, d'une plume avisee, ecrit: Hi everyone, Would there be any other mechanism to compress the response sent to the client? Hi, My application server (Jrun) is interfaced with Apache, And I use mod_gzip in Apache. configuration is a litthe tricky but it works very well Bye -- Franck Lefebure - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: web spider
Hello, Chris, I would love to see this code. Thanks a million! Michael At 01:19 AM 2/5/2004, you wrote: McCormack, Chris [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: struts-menu from action
Here is the code to create MenuRepository: //Call SQL or Stored Procedure, get roles and prepare list of roles. ArrayList userMenus = new ArrayList(); userMenus.add(TabbedUserSearch); userMenus.add(TabbedAdvSearch); userMenus.add(TabbedLogoff); userMenus.add(TabbedHelp); session.setAttribute(WebConstants.USER_MENUS, userMenus); //End of preparing roles. //Create Menu Repository, stuff it and keep it in session scope. MenuRepository newMenuRep = new MenuRepository(); MenuRepository mrp = (MenuRepository) servlet.getServletContext().getAttribute(MenuRepository.MENU_R EPOSITORY_KEY) ; logDebug.debug(UserInitializationAction: Menu - LoadParam: + mrp.getLoadParam() ); logDebug.debug(UserInitializationAction: Menu - Name: + mrp.getName() ); newMenuRep.addMenuDisplayerMapping( mrp.getMenuDisplayerMapping(DropDown) ); newMenuRep.addMenuDisplayerMapping( mrp.getMenuDisplayerMapping(Simple) ); newMenuRep.addMenuDisplayerMapping( mrp.getMenuDisplayerMapping(CoolMenu) ); newMenuRep.addMenuDisplayerMapping( mrp.getMenuDisplayerMapping(CoolMenu4) ); newMenuRep.addMenuDisplayerMapping( mrp.getMenuDisplayerMapping(MenuForm) ); newMenuRep.addMenuDisplayerMapping( mrp.getMenuDisplayerMapping(ListMenu) ); newMenuRep.addMenuDisplayerMapping( mrp.getMenuDisplayerMapping(TabbedMenu) ); newMenuRep.addMenuDisplayerMapping( mrp.getMenuDisplayerMapping(Velocity) ); Set menuNames = mrp.getMenuNames(); for( int k = 0; k userMenus.size(); k++ ) { String roleName = (String) userMenus.get(k); Iterator iter = menuNames.iterator(); while( iter.hasNext() ) { String menuName = (String) iter.next(); if( roleName.equalsIgnoreCase(menuName) ) { newMenuRep.addMenu( mrp.getMenu(menuName) ); logDebug.debug(UserInitializationAction: MenuNames: + menuName ); } } } session.setAttribute(MenuRepository.MENU_REPOSITORY_KEY, newMenuRep); //End of Menu Repository creation. Now, this new MenuRepository will be used by Struts-Menu to render menus. I hope this helps. Reddy Pingili -Original Message- From: David Erickson [SMTP:[EMAIL PROTECTED] Sent: Wednesday, February 04, 2004 4:57 PM To: Struts Users Mailing List Subject: Re: struts-menu from action You would probably have to do that coding yourself to handle that.. what we implemented is ALL our menus are stored in menu-config.xml and each one has assigned a 'roll' to it and if the user has the roll the menu is shown.. etc -David - Original Message - From: Vijay Kandy [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Sent: Wednesday, February 04, 2004 2:43 PM Subject: struts-menu from action Hello All, I was going through examples of struts-menu and it looks like the menu items are read from menu-config.xml. Is it possible to populate these items an Action class? I would like to get these from Action because the menu items are stored in a database and are retrieved based on whos logged in. Sincerely, Vijay Kandy - 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]
Using the ActionForm in the JSP
Hi everyone, I need to access the ActionForm properties inside the JSP code for the same window. Is there any way to do this? Regarding this I have some doubts about the life cycle of ActionForms 1. When exactly is the ActionForm object instantiated? Is the ActionForm object instantiated only on submit of the corresponding form? or is it instantiated while rendering the page? 2. Also I need to set some properties to default values at instantiation of the ActionForm. Can I simply override the ActionForm constructor in my action-form? That doesnt look like a good strategy since the constructor implementation in the ActionForm does not seem to be made for overriding as it has some code in it ( its simply servlet = null ) so is it wise to simply override it? it seems a bit over smart idea!!! :) Please help me out.. thank you, rahul
RE: repost: validator retrieving data
Hi, You don't need to have two actions but you can have different mappings for the same action class For e.g. action name=formbean path=abcdisplay type=AbcAction.java forward name=success path=jsp name / /action action name=formbean path=abcProcess type=AbcAction.java validate=true input=abcErrorShow forward name=success path=results jsp / /action action name=formbean path=abcErrorShow type=AbcAction.java forward name=success path=jsp name / /action Now in the action class use If(mapping.getPath().equals(abcdisplay)){ Get data from backend } Else if(mapping.getPath().equals(abcProcess)){ Process data from backend } Else if(mapping.getPath().equals(abcProcess)){ Populate data from form bean itself } Regards Anant -Original Message- From: Leonardo Francalanci [mailto:[EMAIL PROTECTED] Sent: Thursday, February 05, 2004 5:44 PM To: [EMAIL PROTECTED] Subject: repost: validator retrieving data I'm sorry but nobody answered my question... Could somebody help me? I'm using validator for my pages. Searching the mailing list I found that I should use 2 actions: If there are 2 actions, one to prepare the page and one to process the user input, we define the input attribute value of the process action mapping to be the URL of the prepare action. I think it's right, but now I have this problem: The prepare page retrieves data from the db. If validation fails, the user is forwarded from the process action to the prepare action. In this case I don't want to retrieve data from the db, but leave what the user entered before. In other words I want to retrieve data only if the user asked for the prepare action, not when he is redirected to the prepare action from the input property of process action. Is there a way to do that? The only way i found is an hidden field, but I don't like it... - 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] Confidentiality Notice 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 confidential or privileged information. If you are not the intended recipient, please notify the sender at Wipro or [EMAIL PROTECTED] immediately and destroy all copies of this message and any attachments. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: repost: validator retrieving data
Sorry there was a typo in last one Hi, You don't need to have two actions but you can have different mappings for the same action class For e.g. action name=formbean path=abcdisplay type=AbcAction.java forward name=success path=jsp name / /action action name=formbean path=abcProcess type=AbcAction.java validate=true input=abcErrorShow forward name=success path=results jsp / /action action name=formbean path=abcErrorShow type=AbcAction.java forward name=success path=jsp name / /action Now in the action class use If(mapping.getPath().equals(abcdisplay)){ Get data from backend } Else if(mapping.getPath().equals(abcProcess)){ Process data from backend } Else if(mapping.getPath().equals(abcErrorShow)){ Populate data from form bean itself } Regards Anant -Original Message- From: Leonardo Francalanci [mailto:[EMAIL PROTECTED] Sent: Thursday, February 05, 2004 5:44 PM To: [EMAIL PROTECTED] Subject: repost: validator retrieving data I'm sorry but nobody answered my question... Could somebody help me? I'm using validator for my pages. Searching the mailing list I found that I should use 2 actions: If there are 2 actions, one to prepare the page and one to process the user input, we define the input attribute value of the process action mapping to be the URL of the prepare action. I think it's right, but now I have this problem: The prepare page retrieves data from the db. If validation fails, the user is forwarded from the process action to the prepare action. In this case I don't want to retrieve data from the db, but leave what the user entered before. In other words I want to retrieve data only if the user asked for the prepare action, not when he is redirected to the prepare action from the input property of process action. Is there a way to do that? The only way i found is an hidden field, but I don't like it... - 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] Confidentiality Notice 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 confidential or privileged information. If you are not the intended recipient, please notify the sender at Wipro or [EMAIL PROTECTED] immediately and destroy all copies of this message and any attachments. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Formating a float
Hi, I´ve been searching the list for any insight about this issue, but found no real solutions. I need to format a float that is shown using: bean:write name=netTotal filter=true format=#,###.00/ but it does not works. I´ve tried with many formats, but none seems to work. There is anything I am doing wrong? I wonder if anyone could point me some docs or anything that might help =) Thanks a lot! Lucas - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: REPOST: GZipping response with Servlet 2.2 / Struts 1.0
Have you posted this to the GZIP Discussion list at [EMAIL PROTECTED] Regards, -Martin - Original Message - From: BILODEAU Guillaume SOFRECOM [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, February 05, 2004 8:59 AM Subject: REPOST: GZipping response with Servlet 2.2 / Struts 1.0 Hi everyone, I have read the following reply (rather old) in the archives: In servlet 2.2 environments, you basically won't be able to do this. But in servlet 2.3 environments, you can create a Filter to do the compression for you, on output from either servlets or JSP pages. This was in response to a question about adding GZip compression to a JSP in a Struts environment. I have tried doing a similar thing by extending the ActionServlet class and wrapping the original response in a GZip-compressed response, but without any success: I constantly end up receiving a download dialog on my browser (as if I were sending a zipped file) or getting ClassCastExceptions (with IBM WebSphere classes being expected). I suspect the forward mechanism is the cause to all that. Can you confirm that it is impossible to add such support for compression even by extending the ActionServlet? Would there be any other mechanism to compress the response sent to the client? Any pointers on the web? I am using the servlet 2.2 API on WebSphere 4.0.3. Thanks a lot, Guillaume - 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: web spider
I think the code you are waiting to see (as am I!) is from Tomeu Vizoso :) Chris -Original Message- From: Michael McGrady [mailto:[EMAIL PROTECTED] Sent: 05 February 2004 14:33 To: Struts Users Mailing List Subject: RE: web spider Hello, Chris, I would love to see this code. Thanks a million! Michael At 01:19 AM 2/5/2004, you wrote: McCormack, Chris [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] *** This e-mail and its attachments are confidential and are intended for the above named recipient only. If this has come to you in error, please notify the sender immediately and delete this e-mail from your system. You must take no action based on this, nor must you copy or disclose it or any part of its contents to any person or organisation. Statements and opinions contained in this email may not necessarily represent those of Littlewoods. Please note that e-mail communications may be monitored. The registered office of Littlewoods Limited and its subsidiaries is 100 Old Hall Street, Liverpool, L70 1AB. Registered number of Littlewoods Limited is 262152. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Using the ActionForm in the JSP
Hi Rahul, I'm kind of a newbie, but I believe that: (1) Assuming that the scope you specified for that bean is request, it's intantiated when rendering the page (I suppose you mean a GET) and every time you do a POST. (2) You can specify a default value inside your JSP, but - almost sure - also through the struts-config file (the initial attribute on the property tag). Hope I'm not giving you more questions than answers. Regards, Freddy. -Mensaje original- De: Rahul Mohan [mailto:[EMAIL PROTECTED] Enviado el: viernes, 09 de enero de 2004 15:47 Para: struts Asunto: Using the ActionForm in the JSP Hi everyone, I need to access the ActionForm properties inside the JSP code for the same window. Is there any way to do this? Regarding this I have some doubts about the life cycle of ActionForms 1. When exactly is the ActionForm object instantiated? Is the ActionForm object instantiated only on submit of the corresponding form? or is it instantiated while rendering the page? 2. Also I need to set some properties to default values at instantiation of the ActionForm. Can I simply override the ActionForm constructor in my action-form? That doesnt look like a good strategy since the constructor implementation in the ActionForm does not seem to be made for overriding as it has some code in it ( its simply servlet = null ) so is it wise to simply override it? it seems a bit over smart idea!!! :) Please help me out.. thank you, rahul --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.459 / Virus Database: 258 - Release Date: 25/02/2003 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.459 / Virus Database: 258 - Release Date: 25/02/2003 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Formating a float
are you using jstl? fmt:formatNumber pattern=#,###.00 value=${netTotal}/ From: Lucas Gonzalez [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: Formating a float Date: Thu, 5 Feb 2004 11:55:18 -0300 Hi, I´ve been searching the list for any insight about this issue, but found no real solutions. I need to format a float that is shown using: bean:write name=netTotal filter=true format=#,###.00/ but it does not works. I´ve tried with many formats, but none seems to work. There is anything I am doing wrong? I wonder if anyone could point me some docs or anything that might help =) Thanks a lot! Lucas - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Learn how to choose, serve, and enjoy wine at Wine @ MSN. http://wine.msn.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
R: repost: validator retrieving data
It seems a good solution, but compared to the hidden field: 1) I have to set up an action just to show the error. With the hidden field I could use 2 action (instead of 3) doing something like if (hiddenpar.isSet()) { leave form as is, we are here because validation failed } else { populate the form from db } 2) I have to hardcode the paths of my actions inside my classes (es: If(mapping.getPath().equals(abcdisplay))) Or am I wrong? Please reply... (and thank you!) -Messaggio originale- Da: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Inviato: giovedi 5 febbraio 2004 15.53 A: [EMAIL PROTECTED] Oggetto: RE: repost: validator retrieving data Sorry there was a typo in last one Hi, You don't need to have two actions but you can have different mappings for the same action class For e.g. action name=formbean path=abcdisplay type=AbcAction.java forward name=success path=jsp name / /action action name=formbean path=abcProcess type=AbcAction.java validate=true input=abcErrorShow forward name=success path=results jsp / /action action name=formbean path=abcErrorShow type=AbcAction.java forward name=success path=jsp name / /action Now in the action class use If(mapping.getPath().equals(abcdisplay)){ Get data from backend } Else if(mapping.getPath().equals(abcProcess)){ Process data from backend } Else if(mapping.getPath().equals(abcErrorShow)){ Populate data from form bean itself } Regards Anant -Original Message- From: Leonardo Francalanci [mailto:[EMAIL PROTECTED] Sent: Thursday, February 05, 2004 5:44 PM To: [EMAIL PROTECTED] Subject: repost: validator retrieving data I'm sorry but nobody answered my question... Could somebody help me? I'm using validator for my pages. Searching the mailing list I found that I should use 2 actions: If there are 2 actions, one to prepare the page and one to process the user input, we define the input attribute value of the process action mapping to be the URL of the prepare action. I think it's right, but now I have this problem: The prepare page retrieves data from the db. If validation fails, the user is forwarded from the process action to the prepare action. In this case I don't want to retrieve data from the db, but leave what the user entered before. In other words I want to retrieve data only if the user asked for the prepare action, not when he is redirected to the prepare action from the input property of process action. Is there a way to do that? The only way i found is an hidden field, but I don't like it... - 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] Confidentiality Notice 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 confidential or privileged information. If you are not the intended recipient, please notify the sender at Wipro or [EMAIL PROTECTED] immediately and destroy all copies of this message and any attachments. - 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: repost: validator retrieving data
I don't know if the proposal of Anant works. I know my proposal works well. You must use the same bean in the page proccess and the page prepare. For e.g. action path=/prepare type= name=bean scope=request forward name=success path=Process.jsp/ /action action path=/process type= name=bean scope=request input=/prepare.jsp validate=true forward name=success path=Main.jsp/ /action Alvaro Martinez - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, February 05, 2004 3:52 PM Subject: RE: repost: validator retrieving data Sorry there was a typo in last one Hi, You don't need to have two actions but you can have different mappings for the same action class For e.g. action name=formbean path=abcdisplay type=AbcAction.java forward name=success path=jsp name / /action action name=formbean path=abcProcess type=AbcAction.java validate=true input=abcErrorShow forward name=success path=results jsp / /action action name=formbean path=abcErrorShow type=AbcAction.java forward name=success path=jsp name / /action Now in the action class use If(mapping.getPath().equals(abcdisplay)){ Get data from backend } Else if(mapping.getPath().equals(abcProcess)){ Process data from backend } Else if(mapping.getPath().equals(abcErrorShow)){ Populate data from form bean itself } Regards Anant -Original Message- From: Leonardo Francalanci [mailto:[EMAIL PROTECTED] Sent: Thursday, February 05, 2004 5:44 PM To: [EMAIL PROTECTED] Subject: repost: validator retrieving data I'm sorry but nobody answered my question... Could somebody help me? I'm using validator for my pages. Searching the mailing list I found that I should use 2 actions: If there are 2 actions, one to prepare the page and one to process the user input, we define the input attribute value of the process action mapping to be the URL of the prepare action. I think it's right, but now I have this problem: The prepare page retrieves data from the db. If validation fails, the user is forwarded from the process action to the prepare action. In this case I don't want to retrieve data from the db, but leave what the user entered before. In other words I want to retrieve data only if the user asked for the prepare action, not when he is redirected to the prepare action from the input property of process action. Is there a way to do that? The only way i found is an hidden field, but I don't like it... - 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] Confidentiality Notice 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 confidential or privileged information. If you are not the intended recipient, please notify the sender at Wipro or [EMAIL PROTECTED] immediately and destroy all copies of this message and any attachments. - 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: Formating a float
Lucas: Inspecting WriteTag.java code i found this: */ protected String formatValue(Object valueToFormat) throws JspException { Format format = null; Object value = valueToFormat; Locale locale = RequestUtils.retrieveUserLocale( pageContext, this.localeKey ); boolean formatStrFromResources = false; String formatString = formatStr; // Return String object as is. if ( value instanceof java.lang.String ) { return (String)value; } else { ... ... Do formatting stuff ... ... May you have netTotal as a String object? -Original Message- From: Lucas Gonzalez [mailto:[EMAIL PROTECTED] Sent: Jueves, 05 de Febrero de 2004 11:55 a.m. To: Struts Users Mailing List Subject: Formating a float Hi, I´ve been searching the list for any insight about this issue, but found no real solutions. I need to format a float that is shown using: bean:write name=netTotal filter=true format=#,###.00/ but it does not works. I´ve tried with many formats, but none seems to work. There is anything I am doing wrong? I wonder if anyone could point me some docs or anything that might help =) Thanks a lot! Lucas - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] NOTA DE CONFIDENCIALIDAD Este mensaje (y sus anexos) es confidencial, esta dirigido exclusivamente a las personas direccionadas en el mail y puede contener informacion (i)de propiedad exclusiva de Interbanking S.A. o (ii) amparada por el secreto profesional. Cualquier opinion en el contenido, es exclusiva de su autor y no representa necesariamente la opinion de Interbanking S.A. El acceso no autorizado, uso, reproduccion, o divulgacion esta prohibido. Interbanking S.A no asumira responsabilidad ni obligacion legal alguna por cualquier informacion incorrecta o alterada contenida en este mensaje. Si usted ha recibido este mensaje por error, le rogamos tenga la amabilidad de destruirlo inmediatamente junto con todas las copias del mismo, notificando al remitente. No debera utilizar, revelar, distribuir, imprimir o copiar este mensaje ni ninguna de sus partes si usted no es el destinatario. Muchas gracias. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Global Variable - SetupServlet
Hi all, I wrote a struts app with database 'driven' forms using iBatis. For this purpose I wrote a 'SetupServlet' which creates some LinkedHashMaps e.g. register == {username=, password=, ..} and sets them into the Servlet Context servletContext.setAttribute(register, register); In the reset() Methode of my RegisterForm.java I do something like that: public class RegisterForm extends ActionForm { Map register = new LinkedHashMap(); : public void reset(ActionMapping arg0, HttpServletRequest arg1) { register = servletContext.getAttribute(register); arg1.setAttribute(regiser,fields); } } And in my register.jsp: logic:iterate id=field name=fields TR TD width=40%bean:write name=field property=key/:/TD TDinput type=text name=field(bean:write name=field property=key /) value=bean:write name=field property=value / class=Feld/TD /TR /logic:iterate Until this point anything works fine I see the form and I can insert data . BUT I can also see the INSERTED data from another machine - as if they where written into the ServletContext?!? What am I doing wrong? OR: What can I do against this really BAD effect? Oliver
RE: Formating a float
Lucas: Inspecting WriteTag.java code i found this: */ protected String formatValue(Object valueToFormat) throws JspException { Format format = null; Object value = valueToFormat; Locale locale = RequestUtils.retrieveUserLocale( pageContext, this.localeKey ); boolean formatStrFromResources = false; String formatString = formatStr; // Return String object as is. if ( value instanceof java.lang.String ) { return (String)value; } else { ... ... Do formatting stuff ... ... May you have netTotal as a String object? -Original Message- From: Lucas Gonzalez [mailto:[EMAIL PROTECTED] Sent: Jueves, 05 de Febrero de 2004 11:55 a.m. To: Struts Users Mailing List Subject: Formating a float Hi, I´ve been searching the list for any insight about this issue, but found no real solutions. I need to format a float that is shown using: bean:write name=netTotal filter=true format=#,###.00/ but it does not works. I´ve tried with many formats, but none seems to work. There is anything I am doing wrong? I wonder if anyone could point me some docs or anything that might help =) Thanks a lot! Lucas - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] NOTA DE CONFIDENCIALIDAD Este mensaje (y sus anexos) es confidencial, esta dirigido exclusivamente a las personas direccionadas en el mail y puede contener informacion (i)de propiedad exclusiva de Interbanking S.A. o (ii) amparada por el secreto profesional. Cualquier opinion en el contenido, es exclusiva de su autor y no representa necesariamente la opinion de Interbanking S.A. El acceso no autorizado, uso, reproduccion, o divulgacion esta prohibido. Interbanking S.A no asumira responsabilidad ni obligacion legal alguna por cualquier informacion incorrecta o alterada contenida en este mensaje. Si usted ha recibido este mensaje por error, le rogamos tenga la amabilidad de destruirlo inmediatamente junto con todas las copias del mismo, notificando al remitente. No debera utilizar, revelar, distribuir, imprimir o copiar este mensaje ni ninguna de sus partes si usted no es el destinatario. Muchas gracias. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How to export the html table contents (records) to an Excel f ile.
By default (no requestURI attribute) sorting just makes another request to the .jsp to do the work - the action isn't executed again. I tend to use a 'redraw' dispatch action so that every server request still goes through an action. Paul -Original Message- From: Desai, Sunny [mailto:[EMAIL PROTECTED] Sent: 05 February 2004 14:28 To: Struts Users Mailing List Subject: RE: How to export the html table contents (records) to an Excel f ile. Does anybody know if Display Tag' performs 'in memory ' sorting? What I mean is once I give a collection of records to the 'Display Tag' user clicks on column header to sort on, does the 'Display Tag' send a new request to the Action every time or 'Display Tag' sorts the collection by itself using 'In Memory' sorting. Thanking you in advance for your help. -Original Message- From: Andrew Peck [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 04, 2004 7:19 PM To: 'Struts Users Mailing List' Subject: RE: How to export the html table contents (records) to an Excel file. You could try the displaytag tag library on sourcefourge: http://displaytag.sourceforge.net. It includes nice table export functionality for excel, csv and xml. Regards, Andy Peck -Original Message- From: [EMAIL PROTECTED] pache.org [mailto:[EMAIL PROTECTED] akarta.apa che.org]On Behalf Of [EMAIL PROTECTED] Sent: Wednesday, 4 February 2004 8:07 PM To: [EMAIL PROTECTED] Subject: How to export the html table contents (records) to an Excel file. Hi, I have webpage (.jsp) which lists out 4 to 5 records (having say 4 to 5 columns) inside html table tag. This page, has an Export button, at the bottom. On click of this button, I need to export the records (that the current page is displaying) to an .xls (Excel format) file. Shall be greatful if anyone can tip me on this. Thanks, S.Srikanth - 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] ** Axios Email Confidentiality Footer Privileged/Confidential Information may be contained in this message. If you are not the addressee indicated in this message (or responsible for delivery of the message to such person), you may not copy or deliver this message to anyone. In such case, you should destroy this message, and notify us immediately. If you or your employer does not consent to Internet email messages of this kind, please advise us immediately. Opinions, conclusions and other information expressed in this message are not given or endorsed by my Company or employer unless otherwise indicated by an authorised representative independent of this message. WARNING: While Axios Systems Ltd takes steps to prevent computer viruses from being transmitted via electronic mail attachments we cannot guarantee that attachments do not contain computer virus code. You are therefore strongly advised to undertake anti virus checks prior to accessing the attachment to this electronic mail. Axios Systems Ltd grants no warranties regarding performance use or quality of any attachment and undertakes no liability for loss or damage howsoever caused. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Array of text fields generated dynamically
http://jakarta.apache.org/struts/faqs/indexedprops.html http://www.developer.com/java/other/article.php/2233591 Also, http://marc.theaimsgroup.com/?l=struts-users=LazyList - Hubert --- Shyam A [EMAIL PROTECTED] wrote: Hi, I have a scenario in my Struts application, where I have an array of text fields grouped by category on a JSP, and these are generated dynamically. eg. Category A text field 1 text field 2 text field 3 Category B text field 1 text field 2 The issue here is how to handle the values of the text fields in my form bean. What I plan to do is to have a String array for the text fields, and also a corresponding array of hidden fields, to identify the category. Is this the best way to handle this situation? Any help/suggustions/pointers will be greatly appreciated. Thanks, Shyam __ Do you Yahoo!? Yahoo! Finance: Get your refund fast by filing online. http://taxes.yahoo.com/filing.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? Yahoo! Finance: Get your refund fast by filing online. http://taxes.yahoo.com/filing.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Array of text fields generated dynamically
From: Shyam A [mailto:[EMAIL PROTECTED] I have a scenario in my Struts application, where I have an array of text fields grouped by category on a JSP, and these are generated dynamically. It looks like a Map to me, with the key being the category, and then a String[] or ArrayList as the value. -- Wendy Smoak Application Systems Analyst, Sr. ASU IA Information Resources Management - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
REPOST: Global Variable - SetupServlet
My mail client seams to make trouble, so I repost my mail. SORRY if you get it twice! -Ursprüngliche Nachricht- Von: Oliver Thiel [mailto:[EMAIL PROTECTED] Gesendet: Donnerstag, 5. Februar 2004 17:06 An: '[EMAIL PROTECTED]' Betreff: Global Variable - SetupServlet Hi all, I wrote a struts app with database driven forms using iBatis. For this purpose I wrote a SetupServlet which creates some LinkedHashMaps e.g. register == {username=, password=, .} and sets them into the Servlet Context servletContext.setAttribute(register, register); In the reset() Methode of my RegisterForm.java I do something like that: public class RegisterForm extends ActionForm { Map register = new LinkedHashMap(); : public void reset(ActionMapping arg0, HttpServletRequest arg1) { register = servletContext.getAttribute(register); arg1.setAttribute(regiser,fields); } } And in my register.jsp: logic:iterate id=field name=fields TR TD width=40%bean:write name=field property=key/:/TD TDinput type=text name=field(bean:write name=field property=key /) value=bean:write name=field property=value / class=Feld/TD /TR /logic:iterate Until this point anything works fine I see the form and I can insert data BUT I can also see the INSERTED data from another machine as if they where written into the ServletContext?!? What am I doing wrong? OR: What can I do against this really BAD effect? Oliver
Fw: repost: validator retrieving data
I don't know if the proposal of Anant works. I know my proposal works well. You must use the same bean in the page proccess and the page prepare. For e.g. action path=/prepare type= name=bean scope=request forward name=success path=Process.jsp/ /action action path=/process type= name=bean scope=request input=/prepare.jsp validate=true forward name=success path=Main.jsp/ /action Alvaro Martinez - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, February 05, 2004 3:52 PM Subject: RE: repost: validator retrieving data Sorry there was a typo in last one Hi, You don't need to have two actions but you can have different mappings for the same action class For e.g. action name=formbean path=abcdisplay type=AbcAction.java forward name=success path=jsp name / /action action name=formbean path=abcProcess type=AbcAction.java validate=true input=abcErrorShow forward name=success path=results jsp / /action action name=formbean path=abcErrorShow type=AbcAction.java forward name=success path=jsp name / /action Now in the action class use If(mapping.getPath().equals(abcdisplay)){ Get data from backend } Else if(mapping.getPath().equals(abcProcess)){ Process data from backend } Else if(mapping.getPath().equals(abcErrorShow)){ Populate data from form bean itself } Regards Anant -Original Message- From: Leonardo Francalanci [mailto:[EMAIL PROTECTED] Sent: Thursday, February 05, 2004 5:44 PM To: [EMAIL PROTECTED] Subject: repost: validator retrieving data I'm sorry but nobody answered my question... Could somebody help me? I'm using validator for my pages. Searching the mailing list I found that I should use 2 actions: If there are 2 actions, one to prepare the page and one to process the user input, we define the input attribute value of the process action mapping to be the URL of the prepare action. I think it's right, but now I have this problem: The prepare page retrieves data from the db. If validation fails, the user is forwarded from the process action to the prepare action. In this case I don't want to retrieve data from the db, but leave what the user entered before. In other words I want to retrieve data only if the user asked for the prepare action, not when he is redirected to the prepare action from the input property of process action. Is there a way to do that? The only way i found is an hidden field, but I don't like it... - 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] Confidentiality Notice 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 confidential or privileged information. If you are not the intended recipient, please notify the sender at Wipro or [EMAIL PROTECTED] immediately and destroy all copies of this message and any attachments. - 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: repost: validator retrieving data
Hi, I haven't understood properly ur workflow, but I'll add my 2 cents since I have encountered similar problems... Is this scenario feasible? 1 - b4 going to screen, u call the setup action which loads the data 2 - setup will redirect to the input page that will submit the form to your concrete action 3 - if validation fails in your concrete action, you will be redirected to the input page in other words, your setup action will be called only when you enter the page for the first time is this acceptable? Regards marco -Original Message- From: Leonardo Francalanci [mailto:[EMAIL PROTECTED] Sent: 05 February 2004 14:44 To: Struts Users Mailing List Subject: R: repost: validator retrieving data It seems a good solution, but compared to the hidden field: 1) I have to set up an action just to show the error. With the hidden field I could use 2 action (instead of 3) doing something like if (hiddenpar.isSet()) { leave form as is, we are here because validation failed } else { populate the form from db } 2) I have to hardcode the paths of my actions inside my classes (es: If(mapping.getPath().equals(abcdisplay))) Or am I wrong? Please reply... (and thank you!) -Messaggio originale- Da: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Inviato: giovedi 5 febbraio 2004 15.53 A: [EMAIL PROTECTED] Oggetto: RE: repost: validator retrieving data Sorry there was a typo in last one Hi, You don't need to have two actions but you can have different mappings for the same action class For e.g. action name=formbean path=abcdisplay type=AbcAction.java forward name=success path=jsp name / /action action name=formbean path=abcProcess type=AbcAction.java validate=true input=abcErrorShow forward name=success path=results jsp / /action action name=formbean path=abcErrorShow type=AbcAction.java forward name=success path=jsp name / /action Now in the action class use If(mapping.getPath().equals(abcdisplay)){ Get data from backend } Else if(mapping.getPath().equals(abcProcess)){ Process data from backend } Else if(mapping.getPath().equals(abcErrorShow)){ Populate data from form bean itself } Regards Anant -Original Message- From: Leonardo Francalanci [mailto:[EMAIL PROTECTED] Sent: Thursday, February 05, 2004 5:44 PM To: [EMAIL PROTECTED] Subject: repost: validator retrieving data I'm sorry but nobody answered my question... Could somebody help me? I'm using validator for my pages. Searching the mailing list I found that I should use 2 actions: If there are 2 actions, one to prepare the page and one to process the user input, we define the input attribute value of the process action mapping to be the URL of the prepare action. I think it's right, but now I have this problem: The prepare page retrieves data from the db. If validation fails, the user is forwarded from the process action to the prepare action. In this case I don't want to retrieve data from the db, but leave what the user entered before. In other words I want to retrieve data only if the user asked for the prepare action, not when he is redirected to the prepare action from the input property of process action. Is there a way to do that? The only way i found is an hidden field, but I don't like it... - 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] Confidentiality Notice 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 confidential or privileged information. If you are not the intended recipient, please notify the sender at Wipro or [EMAIL PROTECTED] immediately and destroy all copies of this message and any attachments. - 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: html:checkbox and struts-EL
I believe this is typically done by keeping track of the current page number and checking that value in the reset() method. You only reset the fields associated with the given page number. -Original Message- From: Renato Romano [mailto:[EMAIL PROTECTED] Sent: Thursday, February 05, 2004 6:18 AM To: 'Struts Users Mailing List' Subject: RE: html:checkbox and struts-EL You're right, I missed an element: the form is split across several pages (a wizard style form) so I can't reset the checkbox value because I need to mantain the value it had. Anyway your hint on the source location is very useful!! Thank you If you have suggestions about handling such a situation in a different way, please let me know Renato Renato Romano Sistemi e Telematica S.p.A. Calata Grazie - Vial Al Molo Giano 16127 - GENOVA e-mail: [EMAIL PROTECTED] Tel.: 010 2712603 _ -Original Message- From: Karr, David [mailto:[EMAIL PROTECTED] Sent: mercoledì 4 febbraio 2004 20.46 To: Struts Users Mailing List Subject: RE: html:checkbox and struts-EL I have no clue why you think you needed to write a customized checkbox class. It's not clear to me from your description. Having your form in session scope has little to do with it. The reset() method in the ActionForm is used to clear out checkbox values (and others) BEFORE the form is populated from the request. This is so you know that if the parameter associated with the checkbox isn't present, then the checkbox wasn't set. This may be old news to you, but I'm not sure. In any case, each Struts-EL class has an inheritance relationship with the class in the base library. You can view the source code in the CVSweb interface on the jakarta site. -Original Message- From: Renato Romano [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 04, 2004 8:58 AM To: 'Struts Users Mailing List'; [EMAIL PROTECTED] Subject: html:checkbox and struts-EL I'm using a customized version of the checkbox tag that always sets in the property field a value of true or false depending on the state of the checkbox, thus avoiding the noisy problem of not checked tags does not reset the property; this was needed to me because the form is in session scope, and so using the reset form method was not easy. Anyway, I now need to use such a checkbox inside nested/indexed properties, that I access using struts-el. It works fine, but I now think I shoul override the struts-el checkbox tag class to obtain the same behavior that's right ? Is there any class relationship between the struts-el tags and the corresponding struts tags ?? I looked for documentation or javaDoc but couldn't find nothing... Any help is appreciated Renato Renato Romano Sistemi e Telematica S.p.A. Calata Grazie - Vial Al Molo Giano 16127 - GENOVA e-mail: [EMAIL PROTECTED] Tel.: 010 2712603 _ - 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]
R: repost: validator retrieving data
I don't think I made myself clear. I can't set the input of the process action to the jsp of the prepare action because in the prepare action I get data from the db to fill a listbox. If I used your solution in case of a validation error my list box would not be filled. But if I set the input to the prepare action the values the user entered would be resetted to the values in the db. That's way I need to know, in the prepare action, if I'm coming from a validation error or a simple GET. Did I make myself clearer? Thank you -Messaggio originale- Da: Alvaro Martinez [mailto:[EMAIL PROTECTED] Inviato: venerdì 5 dicembre 2003 16.56 A: Struts Users Mailing List Oggetto: Re: repost: validator retrieving data I don't know if the proposal of Anant works. I know my proposal works well. You must use the same bean in the page proccess and the page prepare. For e.g. action path=/prepare type= name=bean scope=request forward name=success path=Process.jsp/ /action action path=/process type= name=bean scope=request input=/prepare.jsp validate=true forward name=success path=Main.jsp/ /action Alvaro Martinez - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, February 05, 2004 3:52 PM Subject: RE: repost: validator retrieving data Sorry there was a typo in last one Hi, You don't need to have two actions but you can have different mappings for the same action class For e.g. action name=formbean path=abcdisplay type=AbcAction.java forward name=success path=jsp name / /action action name=formbean path=abcProcess type=AbcAction.java validate=true input=abcErrorShow forward name=success path=results jsp / /action action name=formbean path=abcErrorShow type=AbcAction.java forward name=success path=jsp name / /action Now in the action class use If(mapping.getPath().equals(abcdisplay)){ Get data from backend } Else if(mapping.getPath().equals(abcProcess)){ Process data from backend } Else if(mapping.getPath().equals(abcErrorShow)){ Populate data from form bean itself } Regards Anant -Original Message- From: Leonardo Francalanci [mailto:[EMAIL PROTECTED] Sent: Thursday, February 05, 2004 5:44 PM To: [EMAIL PROTECTED] Subject: repost: validator retrieving data I'm sorry but nobody answered my question... Could somebody help me? I'm using validator for my pages. Searching the mailing list I found that I should use 2 actions: If there are 2 actions, one to prepare the page and one to process the user input, we define the input attribute value of the process action mapping to be the URL of the prepare action. I think it's right, but now I have this problem: The prepare page retrieves data from the db. If validation fails, the user is forwarded from the process action to the prepare action. In this case I don't want to retrieve data from the db, but leave what the user entered before. In other words I want to retrieve data only if the user asked for the prepare action, not when he is redirected to the prepare action from the input property of process action. Is there a way to do that? The only way i found is an hidden field, but I don't like it... - 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] Confidentiality Notice 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 confidential or privileged information. If you are not the intended recipient, please notify the sender at Wipro or [EMAIL PROTECTED] immediately and destroy all copies of this message and any attachments. - 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: unable to find jakarta-poi jar file from the downloaded .tar file. pls. help me finding the right .zip/.tar file location (link).
srinivas, Since you downloaded the source file, you need to build it. When you build it, it will make the .jar files. If you do not want to build it, then download the binary distribution instead. Rgds, Richard -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 04, 2004 8:50 PM To: [EMAIL PROTECTED] Subject: unable to find jakarta-poi jar file from the downloaded .tar file. pls. help me finding the right .zip/.tar file location (link). hi, i have downloaded poi-src-2.0-final-20040126.tar (5MB) but could not find the required poi*.jar file in the lib folder. pls. help me in locating the right link to the resource. thanks and regards, s.srikanth - 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: Form populate
it works.. thanks ben regards, sudhakar -Original Message- From: Ben Anderson [mailto:[EMAIL PROTECTED] Sent: Thursday, February 05, 2004 6:16 PM To: [EMAIL PROTECTED] Subject: RE: Form populate granted your struts-config is setup properly to use your bean and it extends actionForm, then why don't you just use the reference that is passed in to the execute method? if( form instanceof myForm ){ myForm mf = (myForm)form; mf.setXXX( Steelers rule ); } You don't need to worry about setting it to a scope - Struts takes care of that for you. -Ben From: Namasivayam, Sudhakar (Cognizant) [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Form populate Date: Thu, 5 Feb 2004 18:03:32 +0530 Hi all, This may have been discussed earlier.. but i couldnt find any useful way to solve the problem... here it goes.. I have a form with text fields which i am populating in the constructor and in the jsp it works fine.. just printing the default values. But in the action class of the form i try to change these values using the setter methodsd but the new values are not updated in the jsp.. All i want to do is to change the values of form of the JSP from the action class i was trying //- change the values of the form if (request.equals(mapping.getScope())) { request.setAttribute(mapping.getAttribute(), regform); // - how to send this form to the jsp It is taking the default values. } Hope i am clear here!! Thanks regards, N Sudhakar InterScan_Disclaimer.txt - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Find high-speed 'net deals - comparison-shop your local providers here. https://broadband.msn.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail and any files transmitted with it are for the sole use of the intended recipient(s) and may contain confidential and privileged information. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message. Any unauthorised review, use, disclosure, dissemination, forwarding, printing or copying of this email or any action taken in reliance on this e-mail is strictly prohibited and may be unlawful. Visit us at http://www.cognizant.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Localization questions
I know that struts can handle data formating great between different locales. My question is how and what needs to happen to support double byte languages? How can you create the locale specific properties files? What databases support these characters? nathan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Formating a float
I think the JSTL suggestion was perhaps worth listening to. On 5 Feb 2004, at 17:06, Guillermo Meyer wrote: Lucas: Inspecting WriteTag.java code i found this: */ protected String formatValue(Object valueToFormat) throws JspException { Format format = null; Object value = valueToFormat; Locale locale = RequestUtils.retrieveUserLocale( pageContext, this.localeKey ); boolean formatStrFromResources = false; String formatString = formatStr; // Return String object as is. if ( value instanceof java.lang.String ) { return (String)value; } else { ... ... Do formatting stuff ... ... May you have netTotal as a String object? -Original Message- From: Lucas Gonzalez [mailto:[EMAIL PROTECTED] Sent: Jueves, 05 de Febrero de 2004 11:55 a.m. To: Struts Users Mailing List Subject: Formating a float Hi, I´ve been searching the list for any insight about this issue, but found no real solutions. I need to format a float that is shown using: bean:write name=netTotal filter=true format=#,###.00/ but it does not works. I´ve tried with many formats, but none seems to work. There is anything I am doing wrong? I wonder if anyone could point me some docs or anything that might help =) Thanks a lot! Lucas - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] NOTA DE CONFIDENCIALIDAD Este mensaje (y sus anexos) es confidencial, esta dirigido exclusivamente a las personas direccionadas en el mail y puede contener informacion (i)de propiedad exclusiva de Interbanking S.A. o (ii) amparada por el secreto profesional. Cualquier opinion en el contenido, es exclusiva de su autor y no representa necesariamente la opinion de Interbanking S.A. El acceso no autorizado, uso, reproduccion, o divulgacion esta prohibido. Interbanking S.A no asumira responsabilidad ni obligacion legal alguna por cualquier informacion incorrecta o alterada contenida en este mensaje. Si usted ha recibido este mensaje por error, le rogamos tenga la amabilidad de destruirlo inmediatamente junto con todas las copias del mismo, notificando al remitente. No debera utilizar, revelar, distribuir, imprimir o copiar este mensaje ni ninguna de sus partes si usted no es el destinatario. Muchas gracias. - 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: Global Variable - SetupServlet
Well, you do not seem to copy the register-object. Therefor you basically address the same object via the servlet-context AND the request. That means that everything you do with the object addressed in request1, you do to the object you have in the servlet context. Then you fetch that global object and give it to request2... where (should be obvious why, by now) you will see the stuff done in request1... hth Alexander -Original Message- From: Oliver Thiel [mailto:[EMAIL PROTECTED] Sent: Donnerstag, 5. Februar 2004 17:06 To: [EMAIL PROTECTED] Subject: Global Variable - SetupServlet Hi all, I wrote a struts app with database 'driven' forms using iBatis. For this purpose I wrote a 'SetupServlet' which creates some LinkedHashMaps e.g. register == {username=, password=, ..} and sets them into the Servlet Context servletContext.setAttribute(register, register); In the reset() Methode of my RegisterForm.java I do something like that: public class RegisterForm extends ActionForm { Map register = new LinkedHashMap(); : public void reset(ActionMapping arg0, HttpServletRequest arg1) { register = servletContext.getAttribute(register); arg1.setAttribute(regiser,fields); } } And in my register.jsp: logic:iterate id=field name=fields TR TD width=40%bean:write name=field property=key/:/TD TDinput type=text name=field(bean:write name=field property=key /) value=bean:write name=field property=value / class=Feld/TD /TR /logic:iterate Until this point anything works fine I see the form and I can insert data . BUT I can also see the INSERTED data from another machine - as if they where written into the ServletContext?!? What am I doing wrong? OR: What can I do against this really BAD effect? Oliver - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: REPOST: GZipping response with Servlet 2.2 / Struts 1.0
GZip compression on the web server using mod_gzip seemed like a suitable solution to my problem, but unfortunately it is not usable in our environment: the web server is shared by multiple applications and such a configuration modification would require the approval of all other teams (which would be incredibly lengthy, painful, and would probably end up being rejected). Compression definitely has to be done at a code level. Too bad we don't have servlet filter support... :( Thanks, GB Martin Gainty a écrit : Have you posted this to the GZIP Discussion list at [EMAIL PROTECTED] Regards, -Martin - Original Message - From: BILODEAU Guillaume SOFRECOM [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, February 05, 2004 8:59 AM Subject: REPOST: GZipping response with Servlet 2.2 / Struts 1.0 Hi everyone, I have read the following reply (rather old) in the archives: In servlet 2.2 environments, you basically won't be able to do this. But in servlet 2.3 environments, you can create a Filter to do the compression for you, on output from either servlets or JSP pages. This was in response to a question about adding GZip compression to a JSP in a Struts environment. I have tried doing a similar thing by extending the ActionServlet class and wrapping the original response in a GZip-compressed response, but without any success: I constantly end up receiving a download dialog on my browser (as if I were sending a zipped file) or getting ClassCastExceptions (with IBM WebSphere classes being expected). I suspect the forward mechanism is the cause to all that. Can you confirm that it is impossible to add such support for compression even by extending the ActionServlet? Would there be any other mechanism to compress the response sent to the client? Any pointers on the web? I am using the servlet 2.2 API on WebSphere 4.0.3. Thanks a lot, Guillaume - 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: duplicate form object
I made the suggested changes and still get the same result = there are 2 subscriptionForm beans instead of a single one. The properties set in saveSubscription action are no longer avaiable when the forward to Welcome.jsp occurs. config file now contains form-bean name=subscriptionForm type=com.borneo.beans.SubscriptionForm /form-bean actionpath=/saveSubscription type=com.borneo.beans.SaveSubscriptionAction name=subscriptionForm scope=session validate=true input=/subscription.jsp forward name=successpath=/Welcome.do/ forward name=subscriptionpath=/subscription.jsp/ !-- forward name=success path=/Welcome/ -- /action action path=/Welcome name=subscriptionForm type=org.apache.struts.actions.ForwardAction parameter=/Welcome.jsp / i made the changes as per the reply... JSP's now contain subscription.jsp %@ taglib uri=/WEB-INF/struts-bean.tld prefix=bean % %@ taglib uri=/WEB-INF/struts-html.tld prefix=html % --- I commented the usebean that was pointed out in prev. thread !-- jsp:useBean id=subscription scope=session class=com.borneo.beans.SubscriptionForm /-- Welcome.jsp %@ taglib uri=/tags/struts-bean prefix=bean % %@ taglib uri=/tags/struts-html prefix=html % %@ taglib uri=/tags/struts-logic prefix=logic % html:html locale=true head titlebean:message key=welcome.title//title html:base/ h3bean:message key=welcome.heading//h3 pbean:message key=welcome.message//p a href='bean:write name=subscriptionForm property=jnlpaddr/ 'Launch JWS App./a - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
REPOST: Question on Frames within Tiles
Any suggestions please. Am desperate at this point. Can framesets even be loaded from tiles? -Original Message- From: Mutreja, Shitij [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 04, 2004 2:16 PM To: '[EMAIL PROTECTED]' Subject: Question on Frames within Tiles Is there a good place/article/sample code to check out, for mixing framesets and tiles. The App that I am working on seems to need to use both. Basically, we have to display content such that there are 2 frames, the left one showing some text, while the right one accepts user input. Both these also need to be scrollable separately. My intention is to somehow include these frames within a Body tile. The other issue is that there is also a footer tile, which might need to include a frameset. The reason being the the control buttons need to always be visible(without having to scroll to view them). Here is what i tried: Layout used for the Body: div id=content-well tiles:insert attribute=quiz/ tiles:insert attribute=quizfooter/ /div quiz actually has a value in the tile-defs that points to the quizcontent.jsp shown below: frameset cols=20,720,* frame frameborder=0 frameset cols=360,* frame frameborder=0 src=/practicequizzes/quiz.jsp frame frameborder=0 src=/practicequizzes/quiz.jsp /frameset frame frameborder=0 /frameset The problem with this is that the /practicequizzes/quiz.jsp is never actually sourced and I just see nothing in the body tile. Thanks, Shitij Mutreja Shitij Mutreja The College Board 11911 Freedom Drive, Suite 300 Reston, VA 20190 571.262.5701 (Phone) 703.707.5596 (Fax) [EMAIL PROTECTED] http://www.collegeboard.com/highered/index.html
Tiles And Frames
Is there a good place/article/sample code to check out, for mixing framesets and tiles. The App that I am working on seems to need to use both. Basically, we have to display content such that there are 2 frames, the left one showing some text, while the right one accepts user input. Both these also need to be scrollable separately. Am reposting this question. Sorry am desperate for an answer. Has anyone ever tried using framesets from within tiles instead of the other way around? My intention is to somehow include these frames within a Body tile. The other issue is that there is also a footer tile, which might need to include a frameset. The reason being the the control buttons need to always be visible(without having to scroll to view them). Here is what i tried: Layout used for the Body: div id=content-well tiles:insert attribute=quiz/ tiles:insert attribute=quizfooter/ /div quiz actually has a value in the tile-defs that points to the quizcontent.jsp shown below: frameset cols=20,720,* frame frameborder=0 frameset cols=360,* frame frameborder=0 src=/practicequizzes/quiz.jsp frame frameborder=0 src=/practicequizzes/quiz.jsp /frameset frame frameborder=0 /frameset The problem with this is that the /practicequizzes/quiz.jsp is never actually sourced and I just see nothing in the body tile. Thanks, Shitij Mutreja The College Board 11911 Freedom Drive, Suite 300 Reston, VA 20190 571.262.5701 (Phone) 703.707.5596 (Fax) [EMAIL PROTECTED] http://www.collegeboard.com/highered/index.html
Re: R: repost: validator retrieving data
The values that you read from the DB need to come from somewhere. Perhaps you can store them in a session attribute (then clear it once the form passes validation). Oh, yeah, an action has to prepare them, so maybe you can use the same action, except that before it reads from the DB, it checks if the values are already available from session attributes. - Hubert --- Leonardo Francalanci [EMAIL PROTECTED] wrote: I don't think I made myself clear. I can't set the input of the process action to the jsp of the prepare action because in the prepare action I get data from the db to fill a listbox. If I used your solution in case of a validation error my list box would not be filled. But if I set the input to the prepare action the values the user entered would be resetted to the values in the db. That's way I need to know, in the prepare action, if I'm coming from a validation error or a simple GET. Did I make myself clearer? Thank you -Messaggio originale- Da: Alvaro Martinez [mailto:[EMAIL PROTECTED] Inviato: venerdì 5 dicembre 2003 16.56 A: Struts Users Mailing List Oggetto: Re: repost: validator retrieving data I don't know if the proposal of Anant works. I know my proposal works well. You must use the same bean in the page proccess and the page prepare. For e.g. action path=/prepare type= name=bean scope=request forward name=success path=Process.jsp/ /action action path=/process type= name=bean scope=request input=/prepare.jsp validate=true forward name=success path=Main.jsp/ /action Alvaro Martinez - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, February 05, 2004 3:52 PM Subject: RE: repost: validator retrieving data Sorry there was a typo in last one Hi, You don't need to have two actions but you can have different mappings for the same action class For e.g. action name=formbean path=abcdisplay type=AbcAction.java forward name=success path=jsp name / /action action name=formbean path=abcProcess type=AbcAction.java validate=true input=abcErrorShow forward name=success path=results jsp / /action action name=formbean path=abcErrorShow type=AbcAction.java forward name=success path=jsp name / /action Now in the action class use If(mapping.getPath().equals(abcdisplay)){ Get data from backend } Else if(mapping.getPath().equals(abcProcess)){ Process data from backend } Else if(mapping.getPath().equals(abcErrorShow)){ Populate data from form bean itself } Regards Anant -Original Message- From: Leonardo Francalanci [mailto:[EMAIL PROTECTED] Sent: Thursday, February 05, 2004 5:44 PM To: [EMAIL PROTECTED] Subject: repost: validator retrieving data I'm sorry but nobody answered my question... Could somebody help me? I'm using validator for my pages. Searching the mailing list I found that I should use 2 actions: If there are 2 actions, one to prepare the page and one to process the user input, we define the input attribute value of the process action mapping to be the URL of the prepare action. I think it's right, but now I have this problem: The prepare page retrieves data from the db. If validation fails, the user is forwarded from the process action to the prepare action. In this case I don't want to retrieve data from the db, but leave what the user entered before. In other words I want to retrieve data only if the user asked for the prepare action, not when he is redirected to the prepare action from the input property of process action. Is there a way to do that? The only way i found is an hidden field, but I don't like it... - 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] Confidentiality Notice 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 confidential or privileged information. If you are not the intended recipient, please notify the sender at Wipro or [EMAIL PROTECTED] immediately and destroy all copies of this message and any attachments. - 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]
Fw: repost: validator retrieving data
Well, read this... I don't think I made myself clear. I can't set the input of the process action to the jsp of the prepare action because in the prepare action I get data from the db to fill a listbox. Yes, you can. If I used your solution in case of a validation error my list box would not be filled. When you have a validation error it returns to the page where you filled the list box and these values are the same that the user introduced. But if I set the input to the prepare action the values the user entered would be resetted to the values in the db. No, it doesn't. It stay with the values entered for the user Have you tried it? You must try and then tell me the problem That's way I need to know, in the prepare action, if I'm coming from a validation error or a simple GET. Did I make myself clearer? Thank you -Messaggio originale- Da: Alvaro Martinez [mailto:[EMAIL PROTECTED] Inviato: venerdì 5 dicembre 2003 16.56 A: Struts Users Mailing List Oggetto: Re: repost: validator retrieving data I don't know if the proposal of Anant works. I know my proposal works well. You must use the same bean in the page proccess and the page prepare. For e.g. action path=/prepare type= name=bean scope=request forward name=success path=Process.jsp/ /action action path=/process type= name=bean scope=request input=/prepare.jsp validate=true forward name=success path=Main.jsp/ /action Alvaro Martinez - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, February 05, 2004 3:52 PM Subject: RE: repost: validator retrieving data Sorry there was a typo in last one Hi, You don't need to have two actions but you can have different mappings for the same action class For e.g. action name=formbean path=abcdisplay type=AbcAction.java forward name=success path=jsp name / /action action name=formbean path=abcProcess type=AbcAction.java validate=true input=abcErrorShow forward name=success path=results jsp / /action action name=formbean path=abcErrorShow type=AbcAction.java forward name=success path=jsp name / /action Now in the action class use If(mapping.getPath().equals(abcdisplay)){ Get data from backend } Else if(mapping.getPath().equals(abcProcess)){ Process data from backend } Else if(mapping.getPath().equals(abcErrorShow)){ Populate data from form bean itself } Regards Anant -Original Message- From: Leonardo Francalanci [mailto:[EMAIL PROTECTED] Sent: Thursday, February 05, 2004 5:44 PM To: [EMAIL PROTECTED] Subject: repost: validator retrieving data I'm sorry but nobody answered my question... Could somebody help me? I'm using validator for my pages. Searching the mailing list I found that I should use 2 actions: If there are 2 actions, one to prepare the page and one to process the user input, we define the input attribute value of the process action mapping to be the URL of the prepare action. I think it's right, but now I have this problem: The prepare page retrieves data from the db. If validation fails, the user is forwarded from the process action to the prepare action. In this case I don't want to retrieve data from the db, but leave what the user entered before. In other words I want to retrieve data only if the user asked for the prepare action, not when he is redirected to the prepare action from the input property of process action. Is there a way to do that? The only way i found is an hidden field, but I don't like it... - 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] Confidentiality Notice 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 confidential or privileged information. If you are not the intended recipient, please notify the sender at Wipro or [EMAIL PROTECTED] immediately and destroy all copies of this message and any attachments. - 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
RE: Html:text printing null
Anant, Either set the values of your strings when you declare them to or set them to in the constructor of your FormBean. Rgds, Richard -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 04, 2004 10:42 PM To: [EMAIL PROTECTED] Subject: Html:text printing null Hi, I am facing this problem whenever my form bean element is null html:text prints a null on the text box generated. I want it to print a blank on the screen Thanks for any help Regards Anant Confidentiality Notice 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 confidential or privileged information. If you are not the intended recipient, please notify the sender at Wipro or [EMAIL PROTECTED] immediately and destroy all copies of this message and any attachments. - 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: Formating a float
Ben, Thanks a lot! that got me on the right way... but now I am getting this error: org.apache.jasper.JasperException: In formatNumber, value attribute can not be parsed into java.lang.Number: ${invoice.totalBilling} I´ve tried to find out why is this happening, but the property invoice.totalBilling is correct since bean:write name=invoice property=totalBilling / works fine ( and getTotalBilling returns a double just in case ). Anyone has any clue about this error? Thanks a lot Lucas González - Original Message - From: Ben Anderson [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, February 05, 2004 12:40 PM Subject: RE: Formating a float are you using jstl? fmt:formatNumber pattern=#,###.00 value=${netTotal}/ From: Lucas Gonzalez [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: Formating a float Date: Thu, 5 Feb 2004 11:55:18 -0300 Hi, I´ve been searching the list for any insight about this issue, but found no real solutions. I need to format a float that is shown using: bean:write name=netTotal filter=true format=#,###.00/ but it does not works. I´ve tried with many formats, but none seems to work. There is anything I am doing wrong? I wonder if anyone could point me some docs or anything that might help =) Thanks a lot! Lucas - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Learn how to choose, serve, and enjoy wine at Wine @ MSN. http://wine.msn.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: REPOST: Question on Frames within Tiles
Have to tried using IFRAME instead of FRAMEs... IFRAME will do the trick Anand -Original Message- From: Mutreja, Shitij [mailto:[EMAIL PROTECTED] Sent: Thursday, February 05, 2004 10:08 AM To: 'Struts Users Mailing List' Subject: REPOST: Question on Frames within Tiles Any suggestions please. Am desperate at this point. Can framesets even be loaded from tiles? -Original Message- From: Mutreja, Shitij [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 04, 2004 2:16 PM To: '[EMAIL PROTECTED]' Subject: Question on Frames within Tiles Is there a good place/article/sample code to check out, for mixing framesets and tiles. The App that I am working on seems to need to use both. Basically, we have to display content such that there are 2 frames, the left one showing some text, while the right one accepts user input. Both these also need to be scrollable separately. My intention is to somehow include these frames within a Body tile. The other issue is that there is also a footer tile, which might need to include a frameset. The reason being the the control buttons need to always be visible(without having to scroll to view them). Here is what i tried: Layout used for the Body: div id=content-well tiles:insert attribute=quiz/ tiles:insert attribute=quizfooter/ /div quiz actually has a value in the tile-defs that points to the quizcontent.jsp shown below: frameset cols=20,720,* frame frameborder=0 frameset cols=360,* frame frameborder=0 src=/practicequizzes/quiz.jsp frame frameborder=0 src=/practicequizzes/quiz.jsp /frameset frame frameborder=0 /frameset The problem with this is that the /practicequizzes/quiz.jsp is never actually sourced and I just see nothing in the body tile. Thanks, Shitij Mutreja Shitij Mutreja The College Board 11911 Freedom Drive, Suite 300 Reston, VA 20190 571.262.5701 (Phone) 703.707.5596 (Fax) [EMAIL PROTECTED] http://www.collegeboard.com/highered/index.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Printing nested properties
Hi Friends... I will reply my question, because I get the correct way to solve it: Is very simple: logic:iterate id=customer name=customers logic:iterate id=sale name=customer property=sales do something with beans /logic:iterate /logic:iterate Anyway Thanks and any other idea will be appreciated. regards Edgar Silva - Original Message - From: Edgar Silva [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Thursday, February 05, 2004 11:08 AM Subject: Printing nested properties folder structureHi Folks... I have a situation where I have this model: Customer - name : String - phone : String - addr1 : String: - addr2 : String - sales: Vector (of following classe) Sales - date: Date - paymentMethod: String - value: Double How can I present the properties from sales objects from Vector inside the property sales from bean Customer? I would like to present: customer.getSales().getPaymentMethod() , but I wanna show with bean:write tag... some idea? since now... Thanks Edgar - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: REPOST: GZipping response with Servlet 2.2 / Struts 1.0
Hi, Have u set the http headers properly? If we don't set the headers properly browser will throw up the dialog box saying save/open it. Here is what I tried and what I found working on Tomcat 4.1.29, IE 6.0 Inside doGet() or doPost() - String acceptEncodingHeaderStr = request.getHeader(Accept-Encoding); System.out.println(acceptEncodingHeaderStr : +acceptEncodingHeaderStr); boolean supportGZip = false; if(acceptEncodingHeaderStr != null) { if( (acceptEncodingHeaderStr.toLowerCase().indexOf(gzip)) -1 ) supportGZip = true; } if(supportGZip) { //Sets the proper headers response.setHeader(Content-Encoding, gzip); response.setHeader(Content-Type,text/html); GZIPOutputStream gzos = new GZIPOutputStream(response.getOutputStream()); StringBuffer sb = new StringBuffer(); sb.append(This is thru zipped output stream); gzos.write(sb.toString().getBytes()); gzos.close(); } Thanks Regards, Nirmal -Original Message- From: BILODEAU Guillaume SOFRECOM [mailto:[EMAIL PROTECTED] Sent: Thursday, February 05, 2004 8:55 PM To: Struts Users Mailing List Subject: Re: REPOST: GZipping response with Servlet 2.2 / Struts 1.0 GZip compression on the web server using mod_gzip seemed like a suitable solution to my problem, but unfortunately it is not usable in our environment: the web server is shared by multiple applications and such a configuration modification would require the approval of all other teams (which would be incredibly lengthy, painful, and would probably end up being rejected). Compression definitely has to be done at a code level. Too bad we don't have servlet filter support... :( Thanks, GB Martin Gainty a écrit : Have you posted this to the GZIP Discussion list at [EMAIL PROTECTED] Regards, -Martin - Original Message - From: BILODEAU Guillaume SOFRECOM [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, February 05, 2004 8:59 AM Subject: REPOST: GZipping response with Servlet 2.2 / Struts 1.0 Hi everyone, I have read the following reply (rather old) in the archives: In servlet 2.2 environments, you basically won't be able to do this. But in servlet 2.3 environments, you can create a Filter to do the compression for you, on output from either servlets or JSP pages. This was in response to a question about adding GZip compression to a JSP in a Struts environment. I have tried doing a similar thing by extending the ActionServlet class and wrapping the original response in a GZip-compressed response, but without any success: I constantly end up receiving a download dialog on my browser (as if I were sending a zipped file) or getting ClassCastExceptions (with IBM WebSphere classes being expected). I suspect the forward mechanism is the cause to all that. Can you confirm that it is impossible to add such support for compression even by extending the ActionServlet? Would there be any other mechanism to compress the response sent to the client? Any pointers on the web? I am using the servlet 2.2 API on WebSphere 4.0.3. Thanks a lot, Guillaume - 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]
SOLVED AW: Global Variable - SetupServlet
YES that was quite obvious! But some how I over looked it! But now it works ... THANKS 2 Alexander Regards Oliver -Ursprüngliche Nachricht- Von: Jesse Alexander (KAID 11) [mailto:[EMAIL PROTECTED] Gesendet: Donnerstag, 5. Februar 2004 18:33 An: 'Struts Users Mailing List' Betreff: RE: Global Variable - SetupServlet Well, you do not seem to copy the register-object. Therefor you basically address the same object via the servlet-context AND the request. That means that everything you do with the object addressed in request1, you do to the object you have in the servlet context. Then you fetch that global object and give it to request2... where (should be obvious why, by now) you will see the stuff done in request1... hth Alexander -Original Message- From: Oliver Thiel [mailto:[EMAIL PROTECTED] Sent: Donnerstag, 5. Februar 2004 17:06 To: [EMAIL PROTECTED] Subject: Global Variable - SetupServlet Hi all, I wrote a struts app with database 'driven' forms using iBatis. For this purpose I wrote a 'SetupServlet' which creates some LinkedHashMaps e.g. register == {username=, password=, ..} and sets them into the Servlet Context servletContext.setAttribute(register, register); In the reset() Methode of my RegisterForm.java I do something like that: public class RegisterForm extends ActionForm { Map register = new LinkedHashMap(); : public void reset(ActionMapping arg0, HttpServletRequest arg1) { register = servletContext.getAttribute(register); arg1.setAttribute(regiser,fields); } } And in my register.jsp: logic:iterate id=field name=fields TR TD width=40%bean:write name=field property=key/:/TD TDinput type=text name=field(bean:write name=field property=key /) value=bean:write name=field property=value / class=Feld/TD /TR /logic:iterate Until this point anything works fine I see the form and I can insert data . BUT I can also see the INSERTED data from another machine - as if they where written into the ServletContext?!? What am I doing wrong? OR: What can I do against this really BAD effect? Oliver - 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: REPOST: Question on Frames within Tiles
Thanks so much. will try it out. However there is another issue. How do u communicate between these iframes. For example I have a footer tile that has some control buttons. When I click on one buton, I need to submit the form associated with one of these iframes. -Original Message- From: Anand Patil [mailto:[EMAIL PROTECTED] Sent: Thursday, February 05, 2004 2:27 PM To: Struts Users Mailing List Subject: RE: REPOST: Question on Frames within Tiles Have to tried using IFRAME instead of FRAMEs... IFRAME will do the trick Anand -Original Message- From: Mutreja, Shitij [mailto:[EMAIL PROTECTED] Sent: Thursday, February 05, 2004 10:08 AM To: 'Struts Users Mailing List' Subject: REPOST: Question on Frames within Tiles Any suggestions please. Am desperate at this point. Can framesets even be loaded from tiles? -Original Message- From: Mutreja, Shitij [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 04, 2004 2:16 PM To: '[EMAIL PROTECTED]' Subject: Question on Frames within Tiles Is there a good place/article/sample code to check out, for mixing framesets and tiles. The App that I am working on seems to need to use both. Basically, we have to display content such that there are 2 frames, the left one showing some text, while the right one accepts user input. Both these also need to be scrollable separately. My intention is to somehow include these frames within a Body tile. The other issue is that there is also a footer tile, which might need to include a frameset. The reason being the the control buttons need to always be visible(without having to scroll to view them). Here is what i tried: Layout used for the Body: div id=content-well tiles:insert attribute=quiz/ tiles:insert attribute=quizfooter/ /div quiz actually has a value in the tile-defs that points to the quizcontent.jsp shown below: frameset cols=20,720,* frame frameborder=0 frameset cols=360,* frame frameborder=0 src=/practicequizzes/quiz.jsp frame frameborder=0 src=/practicequizzes/quiz.jsp /frameset frame frameborder=0 /frameset The problem with this is that the /practicequizzes/quiz.jsp is never actually sourced and I just see nothing in the body tile. Thanks, Shitij Mutreja Shitij Mutreja The College Board 11911 Freedom Drive, Suite 300 Reston, VA 20190 571.262.5701 (Phone) 703.707.5596 (Fax) [EMAIL PROTECTED] http://www.collegeboard.com/highered/index.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: duplicate form object
--- I commented the usebean that was pointed out in prev. thread !-- jsp:useBean id=subscription scope=session class=com.borneo.beans.SubscriptionForm /-- No you didn't - you commented out the result of the tag from the rendered html. You need to comment it out in the world of jsp %-- --% Paul -Original Message- From: rob rowntree [mailto:[EMAIL PROTECTED] Sent: 05 February 2004 18:01 To: [EMAIL PROTECTED] Subject: RE: duplicate form object I made the suggested changes and still get the same result = there are 2 subscriptionForm beans instead of a single one. The properties set in saveSubscription action are no longer avaiable when the forward to Welcome.jsp occurs. config file now contains form-bean name=subscriptionForm type=com.borneo.beans.SubscriptionForm /form-bean actionpath=/saveSubscription type=com.borneo.beans.SaveSubscriptionAction name=subscriptionForm scope=session validate=true input=/subscription.jsp forward name=successpath=/Welcome.do/ forward name=subscriptionpath=/subscription.jsp/ !-- forward name=success path=/Welcome/ -- /action action path=/Welcome name=subscriptionForm type=org.apache.struts.actions.ForwardAction parameter=/Welcome.jsp / i made the changes as per the reply... JSP's now contain subscription.jsp %@ taglib uri=/WEB-INF/struts-bean.tld prefix=bean % %@ taglib uri=/WEB-INF/struts-html.tld prefix=html % --- I commented the usebean that was pointed out in prev. thread !-- jsp:useBean id=subscription scope=session class=com.borneo.beans.SubscriptionForm /-- Welcome.jsp %@ taglib uri=/tags/struts-bean prefix=bean % %@ taglib uri=/tags/struts-html prefix=html % %@ taglib uri=/tags/struts-logic prefix=logic % html:html locale=true head titlebean:message key=welcome.title//title html:base/ h3bean:message key=welcome.heading//h3 pbean:message key=welcome.message//p a href='bean:write name=subscriptionForm property=jnlpaddr/ 'Launch JWS App./a - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] ** Axios Email Confidentiality Footer Privileged/Confidential Information may be contained in this message. If you are not the addressee indicated in this message (or responsible for delivery of the message to such person), you may not copy or deliver this message to anyone. In such case, you should destroy this message, and notify us immediately. If you or your employer does not consent to Internet email messages of this kind, please advise us immediately. Opinions, conclusions and other information expressed in this message are not given or endorsed by my Company or employer unless otherwise indicated by an authorised representative independent of this message. WARNING: While Axios Systems Ltd takes steps to prevent computer viruses from being transmitted via electronic mail attachments we cannot guarantee that attachments do not contain computer virus code. You are therefore strongly advised to undertake anti virus checks prior to accessing the attachment to this electronic mail. Axios Systems Ltd grants no warranties regarding performance use or quality of any attachment and undertakes no liability for loss or damage howsoever caused. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
help with xml syntax of JSP with taglibs
Hello... I have a file called /foo/bar.jsp. The file bar.jsp is an XML syntax JSP. The file is only being used by a 'forward' therefore the URL in the browser window stays the same (for example: http://localhost/webapp/index.jsp). index.jsp forwards to /foo/bar.jsp like this: jsp:forward page=/foo.bar.jsp/ Bar.jsp requires the use of a CSS that is located in /css/main.css I refer to the css in the XML JSP like this: link href=/css/main.css rel=stylesheet type=text/css/ The problem is that /css/main.css is not valid! It does not generate the proper path! I have been advised to use this instead: link href=html:rewrite page='/css/main.ss' rel=stylesheet type =text/css/ The problem is that the this does not work since it is not valid XML. Am I missing something here? How do I refer to a stylesheet in a JSP (that will only be used by forward's) and maintain the proper paths Does the html or any other taglib do this for me??? Thanks in advance for the help! TJ Herring [EMAIL PROTECTED] The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: REPOST: Question on Frames within Tiles
I have done this in Internet Explorer. From any frame you can get reference to any frame using 'window.top.document.all.nameofyouriframe'. once you get reference to the iframe , I think you can get reference to the document in it and then the from inside that document. Look @ microsoft's DHTML reference for IFRAME : http://msdn.microsoft.com/workshop/author/dhtml/reference/objects/iframe .asp. ONCE AGAIN, I HAVE TESTED THIS ONLY WITH INTERNET EXPLORER v 6.0 Good Luck Anand -Original Message- From: Mutreja, Shitij [mailto:[EMAIL PROTECTED] Sent: Thursday, February 05, 2004 1:03 PM To: 'Struts Users Mailing List' Subject: RE: REPOST: Question on Frames within Tiles Thanks so much. will try it out. However there is another issue. How do u communicate between these iframes. For example I have a footer tile that has some control buttons. When I click on one buton, I need to submit the form associated with one of these iframes. -Original Message- From: Anand Patil [mailto:[EMAIL PROTECTED] Sent: Thursday, February 05, 2004 2:27 PM To: Struts Users Mailing List Subject: RE: REPOST: Question on Frames within Tiles Have to tried using IFRAME instead of FRAMEs... IFRAME will do the trick Anand -Original Message- From: Mutreja, Shitij [mailto:[EMAIL PROTECTED] Sent: Thursday, February 05, 2004 10:08 AM To: 'Struts Users Mailing List' Subject: REPOST: Question on Frames within Tiles Any suggestions please. Am desperate at this point. Can framesets even be loaded from tiles? -Original Message- From: Mutreja, Shitij [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 04, 2004 2:16 PM To: '[EMAIL PROTECTED]' Subject: Question on Frames within Tiles Is there a good place/article/sample code to check out, for mixing framesets and tiles. The App that I am working on seems to need to use both. Basically, we have to display content such that there are 2 frames, the left one showing some text, while the right one accepts user input. Both these also need to be scrollable separately. My intention is to somehow include these frames within a Body tile. The other issue is that there is also a footer tile, which might need to include a frameset. The reason being the the control buttons need to always be visible(without having to scroll to view them). Here is what i tried: Layout used for the Body: div id=content-well tiles:insert attribute=quiz/ tiles:insert attribute=quizfooter/ /div quiz actually has a value in the tile-defs that points to the quizcontent.jsp shown below: frameset cols=20,720,* frame frameborder=0 frameset cols=360,* frame frameborder=0 src=/practicequizzes/quiz.jsp frame frameborder=0 src=/practicequizzes/quiz.jsp /frameset frame frameborder=0 /frameset The problem with this is that the /practicequizzes/quiz.jsp is never actually sourced and I just see nothing in the body tile. Thanks, Shitij Mutreja Shitij Mutreja The College Board 11911 Freedom Drive, Suite 300 Reston, VA 20190 571.262.5701 (Phone) 703.707.5596 (Fax) [EMAIL PROTECTED] http://www.collegeboard.com/highered/index.html - 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: help with xml syntax of JSP with taglibs
can you use the jstl xml tags to do that? I am guessing you can, but don't have time now to look it up... LArry [EMAIL PROTECTED] 02/05/04 1:57 PM Hello... I have a file called /foo/bar.jsp. The file bar.jsp is an XML syntax JSP. The file is only being used by a 'forward' therefore the URL in the browser window stays the same (for example: http://localhost/webapp/index.jsp). index.jsp forwards to /foo/bar.jsp like this: jsp:forward page=/foo.bar.jsp/ Bar.jsp requires the use of a CSS that is located in /css/main.css I refer to the css in the XML JSP like this: link href=/css/main.css rel=stylesheet type=text/css/ The problem is that /css/main.css is not valid! It does not generate the proper path! I have been advised to use this instead: link href=html:rewrite page='/css/main.ss' rel=stylesheet type =text/css/ The problem is that the this does not work since it is not valid XML. Am I missing something here? How do I refer to a stylesheet in a JSP (that will only be used by forward's) and maintain the proper paths Does the html or any other taglib do this for me??? Thanks in advance for the help! TJ Herring [EMAIL PROTECTED] The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: REPOST: Question on Frames within Tiles
fantastic, the iframes seem to work. One further question though. the response to the form being submitted, is that the struts action class forwards to a tile definition. The problem is that the result just displays within the frame that is submitted. I was hoping that the entire page is replaced with the response. any suggestions?? thanks again. -Original Message- From: Anand Patil [mailto:[EMAIL PROTECTED] Sent: Thursday, February 05, 2004 4:26 PM To: Struts Users Mailing List Subject: RE: REPOST: Question on Frames within Tiles I have done this in Internet Explorer. From any frame you can get reference to any frame using 'window.top.document.all.nameofyouriframe'. once you get reference to the iframe , I think you can get reference to the document in it and then the from inside that document. Look @ microsoft's DHTML reference for IFRAME : http://msdn.microsoft.com/workshop/author/dhtml/reference/objects/iframe .asp. ONCE AGAIN, I HAVE TESTED THIS ONLY WITH INTERNET EXPLORER v 6.0 Good Luck Anand -Original Message- From: Mutreja, Shitij [mailto:[EMAIL PROTECTED] Sent: Thursday, February 05, 2004 1:03 PM To: 'Struts Users Mailing List' Subject: RE: REPOST: Question on Frames within Tiles Thanks so much. will try it out. However there is another issue. How do u communicate between these iframes. For example I have a footer tile that has some control buttons. When I click on one buton, I need to submit the form associated with one of these iframes. -Original Message- From: Anand Patil [mailto:[EMAIL PROTECTED] Sent: Thursday, February 05, 2004 2:27 PM To: Struts Users Mailing List Subject: RE: REPOST: Question on Frames within Tiles Have to tried using IFRAME instead of FRAMEs... IFRAME will do the trick Anand -Original Message- From: Mutreja, Shitij [mailto:[EMAIL PROTECTED] Sent: Thursday, February 05, 2004 10:08 AM To: 'Struts Users Mailing List' Subject: REPOST: Question on Frames within Tiles Any suggestions please. Am desperate at this point. Can framesets even be loaded from tiles? -Original Message- From: Mutreja, Shitij [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 04, 2004 2:16 PM To: '[EMAIL PROTECTED]' Subject: Question on Frames within Tiles Is there a good place/article/sample code to check out, for mixing framesets and tiles. The App that I am working on seems to need to use both. Basically, we have to display content such that there are 2 frames, the left one showing some text, while the right one accepts user input. Both these also need to be scrollable separately. My intention is to somehow include these frames within a Body tile. The other issue is that there is also a footer tile, which might need to include a frameset. The reason being the the control buttons need to always be visible(without having to scroll to view them). Here is what i tried: Layout used for the Body: div id=content-well tiles:insert attribute=quiz/ tiles:insert attribute=quizfooter/ /div quiz actually has a value in the tile-defs that points to the quizcontent.jsp shown below: frameset cols=20,720,* frame frameborder=0 frameset cols=360,* frame frameborder=0 src=/practicequizzes/quiz.jsp frame frameborder=0 src=/practicequizzes/quiz.jsp /frameset frame frameborder=0 /frameset The problem with this is that the /practicequizzes/quiz.jsp is never actually sourced and I just see nothing in the body tile. Thanks, Shitij Mutreja Shitij Mutreja The College Board 11911 Freedom Drive, Suite 300 Reston, VA 20190 571.262.5701 (Phone) 703.707.5596 (Fax) [EMAIL PROTECTED] http://www.collegeboard.com/highered/index.html - 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: REPOST: Question on Frames within Tiles
Make the submitting form's target=_top Anand -Original Message- From: Mutreja, Shitij [mailto:[EMAIL PROTECTED] Sent: Thursday, February 05, 2004 2:08 PM To: 'Struts Users Mailing List' Subject: RE: REPOST: Question on Frames within Tiles fantastic, the iframes seem to work. One further question though. the response to the form being submitted, is that the struts action class forwards to a tile definition. The problem is that the result just displays within the frame that is submitted. I was hoping that the entire page is replaced with the response. any suggestions?? thanks again. -Original Message- From: Anand Patil [mailto:[EMAIL PROTECTED] Sent: Thursday, February 05, 2004 4:26 PM To: Struts Users Mailing List Subject: RE: REPOST: Question on Frames within Tiles I have done this in Internet Explorer. From any frame you can get reference to any frame using 'window.top.document.all.nameofyouriframe'. once you get reference to the iframe , I think you can get reference to the document in it and then the from inside that document. Look @ microsoft's DHTML reference for IFRAME : http://msdn.microsoft.com/workshop/author/dhtml/reference/objects/iframe .asp. ONCE AGAIN, I HAVE TESTED THIS ONLY WITH INTERNET EXPLORER v 6.0 Good Luck Anand -Original Message- From: Mutreja, Shitij [mailto:[EMAIL PROTECTED] Sent: Thursday, February 05, 2004 1:03 PM To: 'Struts Users Mailing List' Subject: RE: REPOST: Question on Frames within Tiles Thanks so much. will try it out. However there is another issue. How do u communicate between these iframes. For example I have a footer tile that has some control buttons. When I click on one buton, I need to submit the form associated with one of these iframes. -Original Message- From: Anand Patil [mailto:[EMAIL PROTECTED] Sent: Thursday, February 05, 2004 2:27 PM To: Struts Users Mailing List Subject: RE: REPOST: Question on Frames within Tiles Have to tried using IFRAME instead of FRAMEs... IFRAME will do the trick Anand -Original Message- From: Mutreja, Shitij [mailto:[EMAIL PROTECTED] Sent: Thursday, February 05, 2004 10:08 AM To: 'Struts Users Mailing List' Subject: REPOST: Question on Frames within Tiles Any suggestions please. Am desperate at this point. Can framesets even be loaded from tiles? -Original Message- From: Mutreja, Shitij [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 04, 2004 2:16 PM To: '[EMAIL PROTECTED]' Subject: Question on Frames within Tiles Is there a good place/article/sample code to check out, for mixing framesets and tiles. The App that I am working on seems to need to use both. Basically, we have to display content such that there are 2 frames, the left one showing some text, while the right one accepts user input. Both these also need to be scrollable separately. My intention is to somehow include these frames within a Body tile. The other issue is that there is also a footer tile, which might need to include a frameset. The reason being the the control buttons need to always be visible(without having to scroll to view them). Here is what i tried: Layout used for the Body: div id=content-well tiles:insert attribute=quiz/ tiles:insert attribute=quizfooter/ /div quiz actually has a value in the tile-defs that points to the quizcontent.jsp shown below: frameset cols=20,720,* frame frameborder=0 frameset cols=360,* frame frameborder=0 src=/practicequizzes/quiz.jsp frame frameborder=0 src=/practicequizzes/quiz.jsp /frameset frame frameborder=0 /frameset The problem with this is that the /practicequizzes/quiz.jsp is never actually sourced and I just see nothing in the body tile. Thanks, Shitij Mutreja Shitij Mutreja The College Board 11911 Freedom Drive, Suite 300 Reston, VA 20190 571.262.5701 (Phone) 703.707.5596 (Fax) [EMAIL PROTECTED] http://www.collegeboard.com/highered/index.html - 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: Using Parameter in Action via the struts-config.xml
It worked!!! Thanks a lot Anand -Original Message- From: Gopalakrishnan, Jayesh [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 04, 2004 1:49 PM To: Struts Users Mailing List Subject: RE: Using Parameter in Action via the struts-config.xml There's a mapping.getParameter() method to fetch the parameter value. I remember reading that its mostly used while using LookupDispatchAction. Personally, I have used this parameter attibute to represent a flag/indicator to my action it works fine. -jayash -Original Message- From: Anand Patil [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 04, 2004 1:06 PM To: [EMAIL PROTECTED] Subject: Using Parameter in Action via the struts-config.xml Hi All, The struts configuration DTD supports having a parameter attribute to a action. But how can I get the value specified in the parameter attribute in my action class. Also using set-property inside a action tag does not work? Anyone have any idea about this? Regards Anand Patil - 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 And Frames
For you Tiles devotees out there, I think this would be something that would be really helpful. This is a recurring question. I know! I know! If I have time, I will, after the other stuff. Just a second of this need. At 10:35 AM 2/5/2004, Mutreja, Shitij wrote: Is there a good place/article/sample code to check out, for mixing framesets and tiles. The App that I am working on seems to need to use both. Basically, we have to display content such that there are 2 frames, the left one showing some text, while the right one accepts user input. Both these also need to be scrollable separately. Am reposting this question. Sorry am desperate for an answer. Has anyone ever tried using framesets from within tiles instead of the other way around? My intention is to somehow include these frames within a Body tile. The other issue is that there is also a footer tile, which might need to include a frameset. The reason being the the control buttons need to always be visible(without having to scroll to view them). Here is what i tried: Layout used for the Body: div id=content-well tiles:insert attribute=quiz/ tiles:insert attribute=quizfooter/ /div quiz actually has a value in the tile-defs that points to the quizcontent.jsp shown below: frameset cols=20,720,* frame frameborder=0 frameset cols=360,* frame frameborder=0 src=/practicequizzes/quiz.jsp frame frameborder=0 src=/practicequizzes/quiz.jsp /frameset frame frameborder=0 /frameset The problem with this is that the /practicequizzes/quiz.jsp is never actually sourced and I just see nothing in the body tile. Thanks, Shitij Mutreja The College Board 11911 Freedom Drive, Suite 300 Reston, VA 20190 571.262.5701 (Phone) 703.707.5596 (Fax) [EMAIL PROTECTED] http://www.collegeboard.com/highered/index.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tiles And Frames
According to: http://www.w3.org/TR/REC-html40/present/frames.html 16.2 Layout of frames An HTML document that describes frame layout (called a frameset document) has a different makeup than an HTML document without frames. A standard document has one HEAD section and one BODY. A frameset document has a HEAD, and a FRAMESET in place of the BODY. So, it's not so much a question of doing it within tiles, so much as not allowed by HTML. How you generate your final html is irrelevant (tiles, includes, ssi, tags, etc). What is important is the final product to be read by the browser. - Original Message - From: Michael McGrady [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Thursday, February 05, 2004 5:56 PM Subject: Re: Tiles And Frames For you Tiles devotees out there, I think this would be something that would be really helpful. This is a recurring question. I know! I know! If I have time, I will, after the other stuff. Just a second of this need. At 10:35 AM 2/5/2004, Mutreja, Shitij wrote: Is there a good place/article/sample code to check out, for mixing framesets and tiles. The App that I am working on seems to need to use both. Basically, we have to display content such that there are 2 frames, the left one showing some text, while the right one accepts user input. Both these also need to be scrollable separately. Am reposting this question. Sorry am desperate for an answer. Has anyone ever tried using framesets from within tiles instead of the other way around? My intention is to somehow include these frames within a Body tile. The other issue is that there is also a footer tile, which might need to include a frameset. The reason being the the control buttons need to always be visible(without having to scroll to view them). Here is what i tried: Layout used for the Body: div id=content-well tiles:insert attribute=quiz/ tiles:insert attribute=quizfooter/ /div quiz actually has a value in the tile-defs that points to the quizcontent.jsp shown below: frameset cols=20,720,* frame frameborder=0 frameset cols=360,* frame frameborder=0 src=/practicequizzes/quiz.jsp frame frameborder=0 src=/practicequizzes/quiz.jsp /frameset frame frameborder=0 /frameset The problem with this is that the /practicequizzes/quiz.jsp is never actually sourced and I just see nothing in the body tile. Thanks, Shitij Mutreja The College Board 11911 Freedom Drive, Suite 300 Reston, VA 20190 571.262.5701 (Phone) 703.707.5596 (Fax) [EMAIL PROTECTED] http://www.collegeboard.com/highered/index.html - 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: How to disable a Text Box
Well you can make the textbox readonly. This doesnt allow the user to enter any text and u can read the value of the text box in ur action. Hope it helps Kulkarni -Original Message- From: Sathish Kumar T.K. [mailto:[EMAIL PROTECTED] Sent: Thursday, February 05, 2004 10:55 AM To: Struts Users Mailing List Subject: Re: How to disable a Text Box Hm, use a hidden field along with the disabled text box. Now u can take the value from the hidden field. Something like... html:hidden property=start_date_hidden value=%=start_date%/ Sathish Kumar T.K. - Original Message - From: Ramachandran [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Thursday, February 05, 2004 11:00 AM Subject: How to disable a Text Box Hi All, I am having an text box.At the right side of text box there is link called 'Date Component'.If select the date from that component it will display in taht text box. What i have to do means, i don't allow the user to enter any thing inside that text box. So i gave disabled property. But i was not able to get the request from another page. And also value of date is not entering into database. It is entered as null. So what i have to do. Is there any possibilty in javascript. If any knows, mail me regarding this. html:text property=start_date size=20value=%=start_date%/ A id=anchor1 onclick=cal1.select(document.forms[0].start_date,'anchor1','dd/MMM/'); return false;href=#name=anchor1img src=images/calendar.gif border=0 width='30' height='20' - 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: How to disable a Text Box
yes i done like that only. Now it is working. Thank u... -Original Message- From: Ravi Kulkarni [mailto:[EMAIL PROTECTED] Sent: Friday, February 06, 2004 10:06 AM To: Struts Users Mailing List Subject: RE: How to disable a Text Box Well you can make the textbox readonly. This doesnt allow the user to enter any text and u can read the value of the text box in ur action. Hope it helps Kulkarni -Original Message- From: Sathish Kumar T.K. [mailto:[EMAIL PROTECTED] Sent: Thursday, February 05, 2004 10:55 AM To: Struts Users Mailing List Subject: Re: How to disable a Text Box Hm, use a hidden field along with the disabled text box. Now u can take the value from the hidden field. Something like... html:hidden property=start_date_hidden value=%=start_date%/ Sathish Kumar T.K. - Original Message - From: Ramachandran [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Thursday, February 05, 2004 11:00 AM Subject: How to disable a Text Box Hi All, I am having an text box.At the right side of text box there is link called 'Date Component'.If select the date from that component it will display in taht text box. What i have to do means, i don't allow the user to enter any thing inside that text box. So i gave disabled property. But i was not able to get the request from another page. And also value of date is not entering into database. It is entered as null. So what i have to do. Is there any possibilty in javascript. If any knows, mail me regarding this. html:text property=start_date size=20value=%=start_date%/ A id=anchor1 onclick=cal1.select(document.forms[0].start_date,'anchor1','dd/MMM/'); return false;href=#name=anchor1img src=images/calendar.gif border=0 width='30' height='20' - 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: repost: validator retrieving data
You would have to hard code the values in your action class -Original Message- From: Leonardo Francalanci [mailto:[EMAIL PROTECTED] Sent: Thursday, February 05, 2004 8:14 PM To: Struts Users Mailing List Subject: R: repost: validator retrieving data It seems a good solution, but compared to the hidden field: 1) I have to set up an action just to show the error. With the hidden field I could use 2 action (instead of 3) doing something like if (hiddenpar.isSet()) { leave form as is, we are here because validation failed } else { populate the form from db } 2) I have to hardcode the paths of my actions inside my classes (es: If(mapping.getPath().equals(abcdisplay))) Or am I wrong? Please reply... (and thank you!) -Messaggio originale- Da: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Inviato: giovedi 5 febbraio 2004 15.53 A: [EMAIL PROTECTED] Oggetto: RE: repost: validator retrieving data Sorry there was a typo in last one Hi, You don't need to have two actions but you can have different mappings for the same action class For e.g. action name=formbean path=abcdisplay type=AbcAction.java forward name=success path=jsp name / /action action name=formbean path=abcProcess type=AbcAction.java validate=true input=abcErrorShow forward name=success path=results jsp / /action action name=formbean path=abcErrorShow type=AbcAction.java forward name=success path=jsp name / /action Now in the action class use If(mapping.getPath().equals(abcdisplay)){ Get data from backend } Else if(mapping.getPath().equals(abcProcess)){ Process data from backend } Else if(mapping.getPath().equals(abcErrorShow)){ Populate data from form bean itself } Regards Anant -Original Message- From: Leonardo Francalanci [mailto:[EMAIL PROTECTED] Sent: Thursday, February 05, 2004 5:44 PM To: [EMAIL PROTECTED] Subject: repost: validator retrieving data I'm sorry but nobody answered my question... Could somebody help me? I'm using validator for my pages. Searching the mailing list I found that I should use 2 actions: If there are 2 actions, one to prepare the page and one to process the user input, we define the input attribute value of the process action mapping to be the URL of the prepare action. I think it's right, but now I have this problem: The prepare page retrieves data from the db. If validation fails, the user is forwarded from the process action to the prepare action. In this case I don't want to retrieve data from the db, but leave what the user entered before. In other words I want to retrieve data only if the user asked for the prepare action, not when he is redirected to the prepare action from the input property of process action. Is there a way to do that? The only way i found is an hidden field, but I don't like it... - 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] Confidentiality Notice 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 confidential or privileged information. If you are not the intended recipient, please notify the sender at Wipro or [EMAIL PROTECTED] immediately and destroy all copies of this message and any attachments. - 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] Confidentiality Notice 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 confidential or privileged information. If you are not the intended recipient, please notify the sender at Wipro or [EMAIL PROTECTED] immediately and destroy all copies of this message and any attachments. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]