log4j - urgent
hi all! i am using log4j in my application but am a bit confused about it. what r the steps to use log4j in my application. why do we need to create log4jservlet class in the application. is it necessary? if no, why do we create it? also, how does logfactory get to know that we are using log4j in the application thanks Regards, Abhimanyu Koul FinEng Solutions (P) Ltd. Mobile : +91 9819510090
RE: log4j - urgent
hi; i think u don't need such a specific log4jservlet servlet. you can use any servlet to initialize log4j here is a filter to init logger, you will need a logger property file in that case. public void doFilter( ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain ) throws IOException, ServletException { if (isInitialized) { filterChain.doFilter(servletRequest, servletResponse); return; } String file = _filterConfig.getInitParameter (log4j-init-file); if(file != null) { File f = new File(file); if (f.exists()) { if (s_logger.isInfoEnabled()) { s_logger.info(Reading logger property +file); } PropertyConfigurator.configure(file); } -Original Message- From: Abhimanyu Koul [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 14, 2006 9:12 AM To: Struts Mailing list Subject: log4j - urgent hi all! i am using log4j in my application but am a bit confused about it. what r the steps to use log4j in my application. why do we need to create log4jservlet class in the application. is it necessary? if no, why do we create it? also, how does logfactory get to know that we are using log4j in the application thanks Regards, Abhimanyu Koul FinEng Solutions (P) Ltd. Mobile : +91 9819510090 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: log4j - urgent
thanks, but the question is why do we need log4jservlet. why do we code it? Regards, Abhimanyu Koul FinEng Solutions (P) Ltd. Mobile : +91 9819510090 - Original Message - From: abdurrahman sahin [EMAIL PROTECTED] To: 'Struts Users Mailing List' user@struts.apache.org Sent: Wednesday, June 14, 2006 11:49 AM Subject: RE: log4j - urgent hi; i think u don't need such a specific log4jservlet servlet. you can use any servlet to initialize log4j here is a filter to init logger, you will need a logger property file in that case. public void doFilter( ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain ) throws IOException, ServletException { if (isInitialized) { filterChain.doFilter(servletRequest, servletResponse); return; } String file = _filterConfig.getInitParameter (log4j-init-file); if(file != null) { File f = new File(file); if (f.exists()) { if (s_logger.isInfoEnabled()) { s_logger.info(Reading logger property +file); } PropertyConfigurator.configure(file); } -Original Message- From: Abhimanyu Koul [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 14, 2006 9:12 AM To: Struts Mailing list Subject: log4j - urgent hi all! i am using log4j in my application but am a bit confused about it. what r the steps to use log4j in my application. why do we need to create log4jservlet class in the application. is it necessary? if no, why do we create it? also, how does logfactory get to know that we are using log4j in the application thanks Regards, Abhimanyu Koul FinEng Solutions (P) Ltd. Mobile : +91 9819510090 - 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: log4j - urgent
Hi Koul, If you wanna simply use log4j in Struts application. You can just import log4j and create a Logger instance in your source files, something like: import org.apache.log4j.Logger; Logger logger = Logger.getLogger(YourClassName.class); ... Then you can just use logger to log your information, something like: ... logger.debug(debug); logger.info(info); ... Application servers also use log4j such as Tomcat, JBoss. You can configure log4j for server log as well Wish it helps On 6/14/06, Abhimanyu Koul [EMAIL PROTECTED] wrote: hi all! i am using log4j in my application but am a bit confused about it. what r the steps to use log4j in my application. why do we need to create log4jservlet class in the application. is it necessary? if no, why do we create it? also, how does logfactory get to know that we are using log4j in the application thanks Regards, Abhimanyu Koul FinEng Solutions (P) Ltd. Mobile : +91 9819510090 -- = The world will be ended if love is everywhere. Shawzi
Pass dates between two windows
Hi, I have a form bean than it's use in two windows. Per example: window1. html:button: search Employers window2 list Employers html:select property=employers html:button close The button search Employers open the window 2. Here, the user select employers of a list and close the windows to save the dates. Then, i need show, per example, in a label, into the first window the employers select by the user. How can i do it? Thank you very much. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Pass dates between two windows
Hello, Jose! Depending on your application requirement, you should choose one of the following solutions: 1. in window2: after the user selects some employers, save the selected employers in DB and in window1 retrieve the saved employers from the DB. 2. in form-bean put a property: selectedEmployers = array of the IDs of employers. In window2, after the user selects the employers, the selectedEmployers array gets populated with the IDs of the employers selected. Back in window1, you have now the IDs of the selected employers so, making a simple query to the DB, you can get the info needed for each ID from selectedEmployers. Hope it helps, Emilia -Original Message- From: José María Tristán [mailto:[EMAIL PROTECTED] Sent: woensdag 14 juni 2006 8:30 To: user@struts.apache.org Subject: Pass dates between two windows Hi, I have a form bean than it's use in two windows. Per example: window1. html:button: search Employers window2 list Employers html:select property=employers html:button close The button search Employers open the window 2. Here, the user select employers of a list and close the windows to save the dates. Then, i need show, per example, in a label, into the first window the employers select by the user. How can i do it? Thank you very much. - 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]
[shale] using the eclipse ide (maybe ith ant or maven2)
i wanted start programming with shale... so i tried to integrate the shale blank war into eclipse as a new tomcat project because i was not able to configure maven2 and shale into eclipse i'm using ant. in the web-inf/src folder is my build.xml wich is working... project name=BuildProject basedir=../ default=build path id=build.classpath pathelement path=classes / pathelement path=lib/commons-beanutils.jar / pathelement path=lib/commons-chain.jar / pathelement path=lib/commons-codec.jar / pathelement path=lib/commons-collections.jar / pathelement path=lib/commons-digester.jar / pathelement path=lib/commons-el.jar / pathelement path=lib/commons-fileupload.jar / pathelement path=lib/commons-logging.jar / pathelement path=lib/commons-validator.jar / pathelement path=lib/jakarta-oro.jar / pathelement path=lib/jstl-api.jar / pathelement path=lib/jstl-impl.jar / pathelement path=lib/myfaces-api.jar / pathelement path=lib/myfaces-impl.jar / pathelement path=lib/shale-core.jar / pathelement path=src/servlet-api.jar / pathelement path=${classpath} / /path target name=build delete dir=/${basedir}/../work/ mkdir dir=/${basedir}/../work/ delete dir=${basedir}/classes/ mkdir dir=${basedir}/classes/ javac srcdir=src destdir=classes debug=true debuglevel=lines,vars,source compilerarg value=-Xlint:unchecked/ classpath refid=build.classpath / /javac /target /project problem or questions... is it possible to compile the jsp files too if some files are unchecked during compiling, what can i do anybody other solutions - maven2 + eclipse plugin - if so maybe give an packed archive with his eclipse project stephan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Pass dates between two windows
Very thanks Emilia. I use the second option, work whith form-bean. Is possible show in the firs windows the selected employers and don't refresh all the window?. Thank you. -Mensaje original- De: Emilia Ipate [mailto:[EMAIL PROTECTED] Enviado el: miércoles, 14 de junio de 2006 8:49 Para: Struts Users Mailing List Asunto: RE: Pass dates between two windows Hello, Jose! Depending on your application requirement, you should choose one of the following solutions: 1. in window2: after the user selects some employers, save the selected employers in DB and in window1 retrieve the saved employers from the DB. 2. in form-bean put a property: selectedEmployers = array of the IDs of employers. In window2, after the user selects the employers, the selectedEmployers array gets populated with the IDs of the employers selected. Back in window1, you have now the IDs of the selected employers so, making a simple query to the DB, you can get the info needed for each ID from selectedEmployers. Hope it helps, Emilia -Original Message- From: José María Tristán [mailto:[EMAIL PROTECTED] Sent: woensdag 14 juni 2006 8:30 To: user@struts.apache.org Subject: Pass dates between two windows Hi, I have a form bean than it's use in two windows. Per example: window1. html:button: search Employers window2 list Employers html:select property=employers html:button close The button search Employers open the window 2. Here, the user select employers of a list and close the windows to save the dates. Then, i need show, per example, in a label, into the first window the employers select by the user. How can i do it? Thank you very much. - 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: Pass dates between two windows
Yes, Jose, it is possible! But then you won't have 2 actions! Here a detailed explaination of the solutons I see now: A. use the form-bean with an selectedEmplyers array as I have explained in the previous mail, but this involves having 2 requests to the server. Here is the requests chain for this solution: 1. Browser: in window1, user presses the button search Employes and so he requets the window2 from the serve 2. Server: the server gets the request for window2 and sends to the client (browser) the response (the rendered html window2) 3. Browser: in window2, the user selects the employees and presses submit 4. Server: the server populates the array selectedEmplyers from the form-bean and send back the response (= the rendared html window1 with the info about the selected employers) 5. Browser: window1 appears correctly! Conclusions: As you see, you have to interact 2 times with the server = you have to refresh window1 B. If you do not want to interact one more time with the server to render window1 again, you should do all the selecting stuff on the browser, using javascript. But, I cannot help you more as I do have a clear idea of what you want to do: do you have a pop-up there? Or what exactly? If you could give me more info, maybe I could help! Have fun, Emilia -Original Message- From: José María Tristán [mailto:[EMAIL PROTECTED] Sent: woensdag 14 juni 2006 9:25 To: 'Struts Users Mailing List' Subject: RE: Pass dates between two windows Very thanks Emilia. I use the second option, work whith form-bean. Is possible show in the firs windows the selected employers and don't refresh all the window?. Thank you. -Mensaje original- De: Emilia Ipate [mailto:[EMAIL PROTECTED] Enviado el: miércoles, 14 de junio de 2006 8:49 Para: Struts Users Mailing List Asunto: RE: Pass dates between two windows Hello, Jose! Depending on your application requirement, you should choose one of the following solutions: 1. in window2: after the user selects some employers, save the selected employers in DB and in window1 retrieve the saved employers from the DB. 2. in form-bean put a property: selectedEmployers = array of the IDs of employers. In window2, after the user selects the employers, the selectedEmployers array gets populated with the IDs of the employers selected. Back in window1, you have now the IDs of the selected employers so, making a simple query to the DB, you can get the info needed for each ID from selectedEmployers. Hope it helps, Emilia -Original Message- From: José María Tristán [mailto:[EMAIL PROTECTED] Sent: woensdag 14 juni 2006 8:30 To: user@struts.apache.org Subject: Pass dates between two windows Hi, I have a form bean than it's use in two windows. Per example: window1. html:button: search Employers window2 list Employers html:select property=employers html:button close The button search Employers open the window 2. Here, the user select employers of a list and close the windows to save the dates. Then, i need show, per example, in a label, into the first window the employers select by the user. How can i do it? Thank you very much. - 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]
eclipse ide help needed
Hello I am using eclipse ide for developing my project .How can I use an already existing modules functionality into my module. with regards Mano
Re: log4j - urgent
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Abhimanyu Koul wrote: but the question is why do we need log4jservlet. why do we code it? You really don't need such a servlet. You need it if you decide to configure log4j programmatically. If you decide you do not need such a servlet (i never needed one) you just have to put log4j.properties and log4j.jar in your classpath. - - Chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.2.1 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFEj8fbkv8rKBUE/T4RAtA5AJoDpY5TQKMczFR61Z4U9souArx+DwCeNa5A sp0YZcyjntGJSk8qabSDvhY= =x/Vl -END PGP SIGNATURE- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
on image: Reset
Hi, I want to add an image that works as a reset button - I got: html:img src=cancel.gif onclick=document.myForm.reset(); border=0 / Unfortunatelly, this only works initially - when the user has submitted the page once it doesn't seem to work anymore. Any idea, what's wrong? Thx, Marcus - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Display of the processing message when the page is submitted
hi there is a small requirement - when the form is submitted at the time of processing a dialogbox should be shown with the processing message and the dialogbox should be closed when the processing of the request is completed. Can this be possible. Thanks Regards - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Why doesn't struts-config.xml read my action class?
I have created a new action class and written: /** * Add Editors to Domains * * @struts.action name=domainAdminEditorForm path=/admin/domainAdminEditor scope=request parameter=method * * @struts.action-forward name=domainAdminEditor.page path=.domainAdminEditor * * @author Shervin Asgari * */ In the beginning, and in tiles-def I have: definition name=.domainAdminEditor extends=.tiles-adminpage put name=content value=/website/domainEditor.jsp / /definition But in my struts-config.xml file which is build, the new forwarding doesnt appear. Have I forgotten something?? -- Shervin Asgari - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem with logic:iterate and List of Strings
I actually found the page you were mentioning before. But that doesn't resolve my problem: In Dynamic Indexes for Indexed Properties there is an example for using a text-field to alter a String value: html:text name=stringbean property='%= labelValue[ + ctr + ].label %' / Looks very nice, but the textfield accesses the getter and setter of the LabelValueBean that is returned from the StrinBean. My Bean just returns the the String-object that has actually no getter and setter for it's value. I hope that could clarify myy problem ;) Greetings, Florian Zitat von Rahul Akolkar [EMAIL PROTECTED]: [Zitattext verstecken] On 6/13/06, Florian Barth [EMAIL PROTECTED] wrote: Hi folks! I'm having a little problem with a jsp. My FormBean has a List of Strings as value. Now I would like to iterate over the elements of that list, creating a text-field for every element the list contains. At the moment I can online write out the elements using this code-snippet: logic:iterate name=FormBean property=stringList id=str bean:write name=str / /logig:iterate Just putting in html:text name=str property=fooBar doesn't work, because the str-String-Object doesn't have getter or setter for it's value, so I didn't find an substitute for fooBar that works. I pretty sure that there is an easier way than writing a wrapper for String with getter and setter. snip/ http://struts.apache.org/struts-action/struts-taglib/indexedprops.html -Rahul I searched the Mailing-List and googled around a bit, but didn't find something useful. Hope you can help me, Thank you very much, Regards, Florian - 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: Pass dates between two windows
Again, very thanks I think that the second option es better that our needs. When the uses press teh button search a pop-up it's open. This pop-up contains the list whith the employers and a close button. The fist windows is always visible and it's possible to interact whith the controls. When the user close the pop-up i like show in the first windows the selection. I don't know how I can use javascript to capture the dates in the pop-up and show in the firs window when the user press close. Thank you very much. -Mensaje original- De: Emilia Ipate [mailto:[EMAIL PROTECTED] Enviado el: miércoles, 14 de junio de 2006 9:57 Para: Struts Users Mailing List Asunto: RE: Pass dates between two windows Yes, Jose, it is possible! But then you won't have 2 actions! Here a detailed explaination of the solutons I see now: A. use the form-bean with an selectedEmplyers array as I have explained in the previous mail, but this involves having 2 requests to the server. Here is the requests chain for this solution: 1. Browser: in window1, user presses the button search Employes and so he requets the window2 from the serve 2. Server: the server gets the request for window2 and sends to the client (browser) the response (the rendered html window2) 3. Browser: in window2, the user selects the employees and presses submit 4. Server: the server populates the array selectedEmplyers from the form-bean and send back the response (= the rendared html window1 with the info about the selected employers) 5. Browser: window1 appears correctly! Conclusions: As you see, you have to interact 2 times with the server = you have to refresh window1 B. If you do not want to interact one more time with the server to render window1 again, you should do all the selecting stuff on the browser, using javascript. But, I cannot help you more as I do have a clear idea of what you want to do: do you have a pop-up there? Or what exactly? If you could give me more info, maybe I could help! Have fun, Emilia -Original Message- From: José María Tristán [mailto:[EMAIL PROTECTED] Sent: woensdag 14 juni 2006 9:25 To: 'Struts Users Mailing List' Subject: RE: Pass dates between two windows Very thanks Emilia. I use the second option, work whith form-bean. Is possible show in the firs windows the selected employers and don't refresh all the window?. Thank you. -Mensaje original- De: Emilia Ipate [mailto:[EMAIL PROTECTED] Enviado el: miércoles, 14 de junio de 2006 8:49 Para: Struts Users Mailing List Asunto: RE: Pass dates between two windows Hello, Jose! Depending on your application requirement, you should choose one of the following solutions: 1. in window2: after the user selects some employers, save the selected employers in DB and in window1 retrieve the saved employers from the DB. 2. in form-bean put a property: selectedEmployers = array of the IDs of employers. In window2, after the user selects the employers, the selectedEmployers array gets populated with the IDs of the employers selected. Back in window1, you have now the IDs of the selected employers so, making a simple query to the DB, you can get the info needed for each ID from selectedEmployers. Hope it helps, Emilia -Original Message- From: José María Tristán [mailto:[EMAIL PROTECTED] Sent: woensdag 14 juni 2006 8:30 To: user@struts.apache.org Subject: Pass dates between two windows Hi, I have a form bean than it's use in two windows. Per example: window1. html:button: search Employers window2 list Employers html:select property=employers html:button close The button search Employers open the window 2. Here, the user select employers of a list and close the windows to save the dates. Then, i need show, per example, in a label, into the first window the employers select by the user. How can i do it? Thank you very much. - 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]
Error using validator
Hello, I'm trying to use validator framework but the aplication don't works. In the struts-config.xml i have: form-bean name=seguimientoComercialForm type=org.apache.struts.action.ValidatorForm/ then mapping: action path=/coffeenet/SeguimientoComercial/IndexSeguiComer type=seda.coffeenet.SeguimientoComercial.struts.action.IndexSeguiComerActio n name=seguimientoComercialForm scope=session validate=false forward name=success path=/tiles/pages/coffeenet/SeguimientoComercial/SolicitarSeguimientoComerc ial.jsp / /action And the plugin: plug-in className=org.apache.struts.validator.ValidatorPlugIn set-property property=pathnames value=/WEB-INF/validator-rules.xml,/WEB- INF/validation.xml / /plug-in My validation.xml: !DOCTYPE form-validation PUBLIC -//Apache Software Foundation//DTD Commons Validator Rules Configuration 1.0//EN http://jakarta.apache.org/commons/dtds/validator_1_0.dtd; form-validationglobal / formset form name=seguimientoComercialForm field property=unidades depends=required arg0 key=label.unidades/ /field /form /formset /form-validation I don't know that it's necessary extend the seguimientoComercialForm to ValidatorForm. This way formed i don't work it. The error: java.lang.NullPointerException seda.coffeenet.SeguimientoComercial.struts.action.IndexSeguiComerAction.exe cute(IndexSeguiComerAction.java:25) org.apache.struts.action.RequestProcessor.processActionPerform(RequestProce ssor.java:484) org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274 ) org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482) org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525) javax.servlet.http.HttpServlet.service(HttpServlet.java:709) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1 069) org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcess or.java:274) org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProce ssor.java:455) org.apache.struts.tiles.TilesRequestProcessor.processForwardConfig(TilesReq uestProcessor.java:320) org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:279 ) org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482) org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525) javax.servlet.http.HttpServlet.service(HttpServlet.java:709) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) org.displaytag.filter.ResponseOverrideFilter.doFilter(ResponseOverrideFilte r.java:87) Thank you very much - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
How can I transfer a file to a struts based web application from a java application
Hi, I have a struts 1.1 application with an Action that processes a file obtained using an ActionForm containing a org.apache.struts.upload.FormFile parameter, I want to use this action from a java application and would be really grateful if someone could give me pointers on how to do this using URLConnection. I've used URLConnection before, it's just the file transfer that has me stumped. Thanks in advance Steve - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Default value for text field
How can I specify a default value for a text field and also read it from application resources. I dont want to read it from form bean though. regards, Pankaj - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Default value for text field
input name=someName value=fmt:message key=AppProperties.defaultText / type=text I think this might work. If it doesn't you may have to change the to ' Shervin Asgari - System Consultant M: +47 918 64 148, @: [EMAIL PROTECTED] Linpro AS - Leading on LinuxTel: +47 21 54 41 00/02 Vitaminveien 1AFax: +47 21 54 41 01 PB 4 Grefsen, 0409 OsloWWW: http://www.linpro.no/ Pankaj Gupta wrote: How can I specify a default value for a text field and also read it from application resources. I dont want to read it from form bean though. regards, Pankaj - 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]
evaluating list backed action form value in javascript
Hi, I am using a list backed action form and need some advice on how to get the value from the html:text box so I can do some logic with it in a javascript function. In my case I have the following: html:text property=%=benefits[+index.intValue()+].value% size=20 onblur=%=jsFunction%/ My jsFunction is as follows: bean:define id=jsFunction javascript:calculate('%=benefits[ + index.intValue() + ].value%', 'bean:write name=benefit property=benMaxRange/', 'bean:write name=benefit property=benMinRange/', 'bean:write name=benefit property=benRange/', 'bean:write name=benefit property=label/') /bean:define The problem I am having is how to get the actual value entered in the text box and pass this into the function (i.e 12000 instead of what is actually being sent which is %=benefits[0].value%). So it would be the parameter %=benefits[ + index.intValue() + ].value% of the calculate function. Thanks in adavce Faisal - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Why doesn't struts-config.xml read my action class?
Shervin Asgari ha scritto: Have I forgotten something?? Did you run XDoclet??? I am asking this because it seems that you wrote some XDoclet tags. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
ajax:autocomplete tag
Hi, I am a newbie in ajax. I want to use ajax in my application. Let me explain my requirement : when I enter a character in the text field i have to call an action. Inside my action i have to load all the users and send it back to jsp so that I can display. I am able to call the action class from my jsp. But my problem is how will I set the list of users to response.Can anyone help me please What to do in my action to show the Userlist in jsp ? Please it is very urgent Here is my jsp code : form action=taskSave input id=username name=username type=text size=30 class=form-autocomplete / /form ajax:autocomplete baseUrl=/enterpriseUI/userAjaxComplete.do source=username target=username parameters=username={username} className=testcomplete minimumCharacters=1/ Here is my Action class code : public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) { logger.info(** Inside ajaxAutoCompleteAction ** ); try{ ArrayList usersList = (ArrayList)UserManager.loadAll(); // return new AjaxXmlBuilder().addItems(usersList, model, make).toString(); }catch(BusinessObjectException e){ e.printStackTrace(); } return mapping.findForward(success); } Thanks in advance Sony Thomas - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Why doesn't struts-config.xml read my action class?
Hm...Maybe I should explain better. I have already a full working application, with a couple of action classes and a few jsp pages. I wanted to add one more action class and one more jsp page, but suddenly it didn't work, and I can't remember if I have forgotten to do something. I thought I was runnign XDoclet. How can I check this? Shervin Antonio Petrelli wrote: Shervin Asgari ha scritto: Have I forgotten something?? Did you run XDoclet??? I am asking this because it seems that you wrote some XDoclet tags. - 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: ajax:autocomplete tag
Check this: http://java.sun.com/developer/EJTechTips/2005/tt1122.html This has a simple example on how to return the list of employee(Ajax way). Note: This does not use the tags you mentioned. But would give one more perspective. Ignore if does not help. Chandra -Original Message- From: Sony Thomas [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 14, 2006 4:39 PM To: user@struts.apache.org Subject: ajax:autocomplete tag Hi, I am a newbie in ajax. I want to use ajax in my application. Let me explain my requirement : when I enter a character in the text field i have to call an action. Inside my action i have to load all the users and send it back to jsp so that I can display. I am able to call the action class from my jsp. But my problem is how will I set the list of users to response.Can anyone help me please What to do in my action to show the Userlist in jsp ? Please it is very urgent Here is my jsp code : form action=taskSave input id=username name=username type=text size=30 class=form-autocomplete / /form ajax:autocomplete baseUrl=/enterpriseUI/userAjaxComplete.do source=username target=username parameters=username={username} className=testcomplete minimumCharacters=1/ Here is my Action class code : public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) { logger.info(** Inside ajaxAutoCompleteAction ** ); try{ ArrayList usersList = (ArrayList)UserManager.loadAll(); // return new AjaxXmlBuilder().addItems(usersList, model, make).toString(); }catch(BusinessObjectException e){ e.printStackTrace(); } return mapping.findForward(success); } Thanks in advance Sony Thomas - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[OT] Re: Why doesn't struts-config.xml read my action class?
Shervin Asgari ha scritto: I thought I was runnign XDoclet. How can I check this? XDoclet is a tool that must be run at build time! So you need to execute it before you deploy your webapp. Anyway I am not a wizard with XDoclet and this is not the right list to ask (sorry). Ciao Antonio - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Error using validator
José María Tristán wrote: Hello, I'm trying to use validator framework but the aplication don't works. In the struts-config.xml i have: form-bean name=seguimientoComercialForm type=org.apache.struts.action.ValidatorForm/ Your form-bean should be referencing your own class (like mypkg.form.SeguimientoComercialForm) that itself extends ValidatorForm. Then you define all the properties in there: package mypkg.form; import org.apache.struts.validator.ValidatorForm; // note the package! public class SeguimientoComercialForm extends ValidatorForm { private String unidades; public void setUnidades( String unidades ) { this.unidades = unidades; } public String getUnidades() { return this.unidades; } } form-bean name=seguimientoComercialForm type=mypkg.form.SeguimientoComercialForm/ Double-check your XML for typos in the package/class name! - Scott - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem with logic:iterate and List of Strings
Florian Barth wrote: Looks very nice, but the textfield accesses the getter and setter of the LabelValueBean that is returned from the StrinBean. My Bean just returns the the String-object that has actually no getter and setter for it's value. Let me get this straight: you're iterating over a list of strings and you want to create a textbox for each one, but they're not linked to an ActionForm bean? c:forEach items=${listOstrings} var=s input type=text name=${s} /c:forEach If they're not fields in an ActionForm I'm not sure how you're going to be able to use the Struts form beans. Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[OT] Re: Why doesn't struts-config.xml read my action class?
Shervin Asgari wrote: I thought I was runnign XDoclet. How can I check this? Look at your console when you run the Ant build. Look at your Ant build file. Remember what you do when you build the project and see if at any time you run XDoclet. Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Error using validator
José María Tristán wrote: java.lang.NullPointerException seda.coffeenet.SeguimientoComercial.struts.action.IndexSeguiComerAction.exe cute(IndexSeguiComerAction.java:25) I would start by looking at IndexSeguiComerAction.java line 25. Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem with logic:iterate and List of Strings
The list of strings is actually part of an ActionForm. On load of display I kinda like to decompose the list to a bunch of text-fields, that are recomposed to a list of string on submit c:forEach items=${listOstrings} var=s input type=text name=${s} /c:forEach I'll try this, maybe the value of the String could be added by value = ${s}, right? Thank you Dave Newton schrieb: Florian Barth wrote: Looks very nice, but the textfield accesses the getter and setter of the LabelValueBean that is returned from the StrinBean. My Bean just returns the the String-object that has actually no getter and setter for it's value. Let me get this straight: you're iterating over a list of strings and you want to create a textbox for each one, but they're not linked to an ActionForm bean? c:forEach items=${listOstrings} var=s input type=text name=${s} /c:forEach If they're not fields in an ActionForm I'm not sure how you're going to be able to use the Struts form beans. Dave - 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: ajax:autocomplete tag
Hi You are not setting any values in the request - How can the list be populated if you don't supply any values Hermod -Original Message- From: Sony Thomas [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 14, 2006 1:09 PM To: user@struts.apache.org Subject: ajax:autocomplete tag Hi, I am a newbie in ajax. I want to use ajax in my application. Let me explain my requirement : when I enter a character in the text field i have to call an action. Inside my action i have to load all the users and send it back to jsp so that I can display. I am able to call the action class from my jsp. But my problem is how will I set the list of users to response.Can anyone help me please What to do in my action to show the Userlist in jsp ? Please it is very urgent Here is my jsp code : form action=taskSave input id=username name=username type=text size=30 class=form-autocomplete / /form ajax:autocomplete baseUrl=/enterpriseUI/userAjaxComplete.do source=username target=username parameters=username={username} className=testcomplete minimumCharacters=1/ Here is my Action class code : public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) { logger.info(** Inside ajaxAutoCompleteAction ** ); try{ ArrayList usersList = (ArrayList)UserManager.loadAll(); // return new AjaxXmlBuilder().addItems(usersList, model, make).toString(); }catch(BusinessObjectException e){ e.printStackTrace(); } return mapping.findForward(success); } Thanks in advance Sony Thomas - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * This email with attachments is solely for the use of the individual or entity to whom it is addressed. Please also be aware that the DnB NOR Group cannot accept any payment orders or other legally binding correspondence with customers as a part of an email. This email message has been virus checked by the anti virus programs used in the DnB NOR Group. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: ajax:autocomplete tag
Hi Hermod, I am setting the value entered in the textbox parameters=username={username} username is my textfield name. The problem is How will I return the username list back to jsp from action. It is very very urgent. can anyone help me please sony [EMAIL PROTECTED] wrote: Hi You are not setting any values in the request - How can the list be populated if you don't supply any values Hermod -Original Message- From: Sony Thomas [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 14, 2006 1:09 PM To: user@struts.apache.org Subject: ajax:autocomplete tag Hi, I am a newbie in ajax. I want to use ajax in my application. Let me explain my requirement : when I enter a character in the text field i have to call an action. Inside my action i have to load all the users and send it back to jsp so that I can display. I am able to call the action class from my jsp. But my problem is how will I set the list of users to response.Can anyone help me please What to do in my action to show the Userlist in jsp ? Please it is very urgent Here is my jsp code : form action=taskSave input id=username name=username type=text size=30 class=form-autocomplete / /form ajax:autocomplete baseUrl=/enterpriseUI/userAjaxComplete.do source=username target=username parameters=username={username} className=testcomplete minimumCharacters=1/ Here is my Action class code : public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) { logger.info(** Inside ajaxAutoCompleteAction ** ); try{ ArrayList usersList = (ArrayList)UserManager.loadAll(); // return new AjaxXmlBuilder().addItems(usersList, model, make).toString(); }catch(BusinessObjectException e){ e.printStackTrace(); } return mapping.findForward(success); } Thanks in advance Sony Thomas - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * This email with attachments is solely for the use of the individual or entity to whom it is addressed. Please also be aware that the DnB NOR Group cannot accept any payment orders or other legally binding correspondence with customers as a part of an email. This email message has been virus checked by the anti virus programs used in the DnB NOR Group. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - 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: ajax:autocomplete tag
Hi That was what I ment - You don't return any values from your action. You need to write the values to the response (supplied by the action), and then return null. The documentation at http://ajaxtags.sourceforge.net shows you how, or search for Struts and returning a file for instance. Hermod -Original Message- From: Sony Thomas [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 14, 2006 1:55 PM To: Struts Users Mailing List Subject: Re: ajax:autocomplete tag Hi Hermod, I am setting the value entered in the textbox parameters=username={username} username is my textfield name. The problem is How will I return the username list back to jsp from action. It is very very urgent. can anyone help me please sony [EMAIL PROTECTED] wrote: Hi You are not setting any values in the request - How can the list be populated if you don't supply any values Hermod -Original Message- From: Sony Thomas [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 14, 2006 1:09 PM To: user@struts.apache.org Subject: ajax:autocomplete tag Hi, I am a newbie in ajax. I want to use ajax in my application. Let me explain my requirement : when I enter a character in the text field i have to call an action. Inside my action i have to load all the users and send it back to jsp so that I can display. I am able to call the action class from my jsp. But my problem is how will I set the list of users to response.Can anyone help me please What to do in my action to show the Userlist in jsp ? Please it is very urgent Here is my jsp code : form action=taskSave input id=username name=username type=text size=30 class=form-autocomplete / /form ajax:autocomplete baseUrl=/enterpriseUI/userAjaxComplete.do source=username target=username parameters=username={username} className=testcomplete minimumCharacters=1/ Here is my Action class code : public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) { logger.info(** Inside ajaxAutoCompleteAction ** ); try{ ArrayList usersList = (ArrayList)UserManager.loadAll(); // return new AjaxXmlBuilder().addItems(usersList, model, make).toString(); }catch(BusinessObjectException e){ e.printStackTrace(); } return mapping.findForward(success); } Thanks in advance Sony Thomas - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * This email with attachments is solely for the use of the individual or entity to whom it is addressed. Please also be aware that the DnB NOR Group cannot accept any payment orders or other legally binding correspondence with customers as a part of an email. This email message has been virus checked by the anti virus programs used in the DnB NOR Group. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - 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]
Reg: Display of Processing message in Struts Application
hi I am developing an struts application in which the user enters some information in screen A. After processing this information, I display the same screen A or may be another screen B. But the processing sometimes takes a while, so I want to display a dialogbox on the screen A that says Please wait... or Processing. In the interim, I'll do the processing while that screen is displayed, then automatically switch to screen A/B when ready. I need to process the information on the server and pass it to the client when it's ready. How can I do this? Can this be done? If so can I get some solution of how this can be done. Thanks Regards Shasi Rekha - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] Re: Why doesn't struts-config.xml read my action class?
Yes I run XDoclet. Because all of my other forwards are working correctly. It is only this one that seems to not work. What I have done to come around this issue is including data in an already existing actionform class. This is not feasible, but works temporary until I figure out what I am missing. It is so easy to become blind when looking at your own code :) I am sure it is something minor I have forgot to do. Shervin Asgari - System Consultant M: +47 918 64 148, @: [EMAIL PROTECTED] Linpro AS - Leading on LinuxTel: +47 21 54 41 00/02 Vitaminveien 1AFax: +47 21 54 41 01 PB 4 Grefsen, 0409 OsloWWW: http://www.linpro.no/ Dave Newton wrote: Shervin Asgari wrote: I thought I was runnign XDoclet. How can I check this? Look at your console when you run the Ant build. Look at your Ant build file. Remember what you do when you build the project and see if at any time you run XDoclet. Dave - 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] Re: Why doesn't struts-config.xml read my action class?
Shervin Asgari wrote: Yes I run XDoclet. Because all of my other forwards are working correctly. But they already existed, and this is a new one. Are you certain you are running it again to capture the new class's annotations? Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem with logic:iterate and List of Strings
I tried to do it with your piece of code, but that didn't quite work I think one solution would be to write a StringWrapper with a String-Value and the according getter/setter (e.g. getVal, setVal) and fill the list with this StringWrappers instead of Strings, so html:text name=stringWrapper value = val / will work But I really dislik changing my data-structure because of some gui-problems Ideas anyone ? ;) Florian Barth schrieb: The list of strings is actually part of an ActionForm. On load of display I kinda like to decompose the list to a bunch of text-fields, that are recomposed to a list of string on submit c:forEach items=${listOstrings} var=s input type=text name=${s} /c:forEach I'll try this, maybe the value of the String could be added by value = ${s}, right? Thank you Dave Newton schrieb: Florian Barth wrote: Looks very nice, but the textfield accesses the getter and setter of the LabelValueBean that is returned from the StrinBean. My Bean just returns the the String-object that has actually no getter and setter for it's value. Let me get this straight: you're iterating over a list of strings and you want to create a textbox for each one, but they're not linked to an ActionForm bean? c:forEach items=${listOstrings} var=s input type=text name=${s} /c:forEach If they're not fields in an ActionForm I'm not sure how you're going to be able to use the Struts form beans. Dave - 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: ajax:autocomplete tag
You can forward to a JSP from your action rather than coding tags into your action, then generate XML in your JSP rather than HTML. Your JSP (aside from taglib directives etc) may look like this: ?xml version=1.0 encoding=UTF-8? ajax-response response c:forEach var=user items=${requestScope.users} item namec:out value=${user.userName}//name valuec:out value=${user.id}//value /item /c:forEach /response /ajax-response -Adam -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 14, 2006 8:01 AM To: user@struts.apache.org Subject: RE: ajax:autocomplete tag Hi That was what I ment - You don't return any values from your action. You need to write the values to the response (supplied by the action), and then return null. The documentation at http://ajaxtags.sourceforge.net shows you how, or search for Struts and returning a file for instance. Hermod -Original Message- From: Sony Thomas [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 14, 2006 1:55 PM To: Struts Users Mailing List Subject: Re: ajax:autocomplete tag Hi Hermod, I am setting the value entered in the textbox parameters=username={username} username is my textfield name. The problem is How will I return the username list back to jsp from action. It is very very urgent. can anyone help me please sony [EMAIL PROTECTED] wrote: Hi You are not setting any values in the request - How can the list be populated if you don't supply any values Hermod -Original Message- From: Sony Thomas [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 14, 2006 1:09 PM To: user@struts.apache.org Subject: ajax:autocomplete tag Hi, I am a newbie in ajax. I want to use ajax in my application. Let me explain my requirement : when I enter a character in the text field i have to call an action. Inside my action i have to load all the users and send it back to jsp so that I can display. I am able to call the action class from my jsp. But my problem is how will I set the list of users to response.Can anyone help me please What to do in my action to show the Userlist in jsp ? Please it is very urgent Here is my jsp code : form action=taskSave input id=username name=username type=text size=30 class=form-autocomplete / /form ajax:autocomplete baseUrl=/enterpriseUI/userAjaxComplete.do source=username target=username parameters=username={username} className=testcomplete minimumCharacters=1/ Here is my Action class code : public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) { logger.info(** Inside ajaxAutoCompleteAction ** ); try{ ArrayList usersList = (ArrayList)UserManager.loadAll(); // return new AjaxXmlBuilder().addItems(usersList, model, make).toString(); }catch(BusinessObjectException e){ e.printStackTrace(); } return mapping.findForward(success); } Thanks in advance Sony Thomas - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * This email with attachments is solely for the use of the individual or entity to whom it is addressed. Please also be aware that the DnB NOR Group cannot accept any payment orders or other legally binding correspondence with customers as a part of an email. This email message has been virus checked by the anti virus programs used in the DnB NOR Group. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - 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: html:image with LookupDispatchAction
need hep with this please. Thanks. From: fea jabi [EMAIL PROTECTED] Reply-To: Struts Users Mailing List user@struts.apache.org To: user@struts.apache.org Subject: html:image with LookupDispatchAction Date: Tue, 13 Jun 2006 14:48:39 -0400 Trying to use html:image with LookupDispathAction. how to use this? Using 1.2.7 of struts Getting error Request[/DispatchAction] does not contain handler parameter named 'method'. This may be caused by whitespace in the label text. fmt:message var=copyImgVar key=lbl.copy bundle=${appbundle}/ html:image src=images/copy.gif property=method value=${copyImgVar} / struts-config: action path=/DispatchAcctAction type=com.DispatchAcctAction name=AcctForm scope=session parameter=method forward name=successAcct path=/PrepareCustAction.do redirect=false/ /action what am I missing here? Thanks. _ Express yourself instantly with MSN Messenger! Download today - it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Dont just search. Find. Check out the new MSN Search! http://search.msn.click-url.com/go/onm00200636ave/direct/01/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Default value for text field
Please tell me in Struts context. What do I need to write in my html:text tag? Shervin Asgari wrote: input name=someName value=fmt:message key=AppProperties.defaultText / type=text I think this might work. If it doesn't you may have to change the to ' Shervin Asgari - System Consultant M: +47 918 64 148, @: [EMAIL PROTECTED] Linpro AS - Leading on LinuxTel: +47 21 54 41 00/02 Vitaminveien 1AFax: +47 21 54 41 01 PB 4 Grefsen, 0409 OsloWWW: http://www.linpro.no/ Pankaj Gupta wrote: How can I specify a default value for a text field and also read it from application resources. I dont want to read it from form bean though. regards, Pankaj - 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: [shale] using the eclipse ide (maybe ith ant or maven2)
On 6/14/06, stephan opitz [EMAIL PROTECTED] wrote: i wanted start programming with shale... so i tried to integrate the shale blank war into eclipse as a new tomcat project because i was not able to configure maven2 and shale into eclipse i'm using ant. If you'd like to try Maven 2 again, we have an archetype in the sandbox. Follow the instructions here for 'mvn archetype:create ... ': http://svn.apache.org/repos/asf/struts/sandbox/trunk/archetypes/shale-blank/README.txt Then change into your new project directory and run 'mvn eclipse:eclipse'. I don't use Eclipse, but it works great for IDEA ('mvn idea:idea'). HTH, -- Wendy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Problem whith values of a form-bean
Hello: I hava a html:select optionscollection: html:select property=unidades multiple=true size=6 styleClass=control html:optionsCollection property=unidadesSelect/ /html:select and in the form-bean the method: public void setUnidades(String[] unidades){ this.unidades = unidades; } public String[] getUnidades(){ return unidades; } Before that the jsp is load I set a value for fault(setUnidades(Ud.)). When the user not select any value the method getUnidades return me the value Ud when in the list is not select any value. Why? Thank you very much. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [newb question] Turning on DEBUG level logging
Ok. I've included the log4j.jar in my WEB-INF/lib directory and created a log4j.xml file based on an example I found online (rather then a log4j.properties file). The application deploys error free and executes - however my log files are not created. I can think of two reasons this could be happening: 1) Log4j is not creating the log directory, thus it can't create the log file; or 2) I'm missing the piece to connect my application to log4j. In my code, I create a variable using the following statement: protected static Log log = LogFactory.getLog(ControllerServlet.class); Now is that enough for commons-logging and log4j to create the log file they need, or am I missing another piece somewhere? Below is the log4j.xml properties file. I'm using a relative path to specify a directory for the log files (i.e. log/uwaf-event.log). Given that I'm using Tomcat 5.5 as my app server - where will it try to create my log files? In my webapps/myapp folder, or in the Catalina_home/bin directory? Thanks, Darren -Original Message- From: Dave Newton [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 13, 2006 2:18 PM To: Struts Users Mailing List Subject: Re: [newb question] Turning on DEBUG level logging Darren Hall wrote: So essentially, I should download Log4J, include the jar in my classpath and create a Log4J.xml file. Correct? Most people use the properties file, but the XML config gives you more power. I've always handled XML config init programmatically; I don't know if it works automagically. Dave - 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: Error using validator
Yes, in this line I pass a String to a method set of the form-bean. I suppose that it's owed that the form-bean It does not exist. -Mensaje original- De: Dave Newton [mailto:[EMAIL PROTECTED] Enviado el: miércoles, 14 de junio de 2006 13:36 Para: Struts Users Mailing List Asunto: Re: Error using validator José María Tristán wrote: java.lang.NullPointerException seda.coffeenet.SeguimientoComercial.struts.action.IndexSeguiComerAction.exe cute(IndexSeguiComerAction.java:25) I would start by looking at IndexSeguiComerAction.java line 25. Dave - 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: log4j - urgent
(continued from previous msg) HERE is the log4j.xml file I'm using (I forgot to include it in my last message). ?xml version=1.0 encoding=UTF-8 ? !DOCTYPE log4j:configuration SYSTEM log4j.dtd log4j:configuration xmlns:log4j=http://jakarta.apache.org/log4j/; appender name=event_file class=org.apache.log4j.DailyFileAppender param name=Threshold value=DEBUG/ param name=File value=log/uwaf-event.log/ param name=Append value=true/ layout class=org.apache.log4j.PatternLayout param name=ConversionPattern value=%d %-5p [%c] %m%n/ /layout /appender appender name=error_file class=org.apache.log4j.DailyFileAppender param name=Threshold value=INFO/ param name=File value=log/uwaf-error.log/ param name=Append value=true/ layout class=org.apache.log4j.PatternLayout param name=ConversionPattern value=%d %-5p [%c] %m%n/ /layout /appender appender name=console class=org.apache.log4j.ConsoleAppender param name=Target value=System.out/ param name=Threshold value=INFO/ layout class=org.apache.log4j.PatternLayout param name=ConversionPattern value=%d{ABSOLUTE} %-5p [%c{1}] %m%n/ /layout /appender appender name=ASYNC class=org.apache.log4j.AsyncAppender appender-ref ref=event_file/ appender-ref ref=error_file/ /appender !-- Setup the Root category -- root appender-ref ref=ASYNC/ /root /log4j:configuration -Original Message- From: Li [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 14, 2006 2:27 AM To: Struts Users Mailing List Subject: Re: log4j - urgent Hi Koul, If you wanna simply use log4j in Struts application. You can just import log4j and create a Logger instance in your source files, something like: import org.apache.log4j.Logger; Logger logger = Logger.getLogger(YourClassName.class); ... Then you can just use logger to log your information, something like: ... logger.debug(debug); logger.info(info); ... Application servers also use log4j such as Tomcat, JBoss. You can configure log4j for server log as well Wish it helps On 6/14/06, Abhimanyu Koul [EMAIL PROTECTED] wrote: hi all! i am using log4j in my application but am a bit confused about it. what r the steps to use log4j in my application. why do we need to create log4jservlet class in the application. is it necessary? if no, why do we create it? also, how does logfactory get to know that we are using log4j in the application thanks Regards, Abhimanyu Koul FinEng Solutions (P) Ltd. Mobile : +91 9819510090 -- = The world will be ended if love is everywhere. Shawzi - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [newb question] Turning on DEBUG level logging
[REPOST under correct thread] (continued from previous msg) HERE is the log4j.xml file I'm using (I forgot to include it in my last message). Also, I'vd tried creating the logs directory under the [CATALINA_HOME]/bin directory, and still no log files have been created. ?xml version=1.0 encoding=UTF-8 ? !DOCTYPE log4j:configuration SYSTEM log4j.dtd log4j:configuration xmlns:log4j=http://jakarta.apache.org/log4j/; appender name=event_file class=org.apache.log4j.DailyFileAppender param name=Threshold value=DEBUG/ param name=File value=log/uwaf-event.log/ param name=Append value=true/ layout class=org.apache.log4j.PatternLayout param name=ConversionPattern value=%d %-5p [%c] %m%n/ /layout /appender appender name=error_file class=org.apache.log4j.DailyFileAppender param name=Threshold value=INFO/ param name=File value=log/uwaf-error.log/ param name=Append value=true/ layout class=org.apache.log4j.PatternLayout param name=ConversionPattern value=%d %-5p [%c] %m%n/ /layout /appender appender name=console class=org.apache.log4j.ConsoleAppender param name=Target value=System.out/ param name=Threshold value=INFO/ layout class=org.apache.log4j.PatternLayout param name=ConversionPattern value=%d{ABSOLUTE} %-5p [%c{1}] %m%n/ /layout /appender appender name=ASYNC class=org.apache.log4j.AsyncAppender appender-ref ref=event_file/ appender-ref ref=error_file/ /appender !-- Setup the Root category -- root appender-ref ref=ASYNC/ /root /log4j:configuration -Original Message- From: Dave Newton [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 13, 2006 2:18 PM To: Struts Users Mailing List Subject: Re: [newb question] Turning on DEBUG level logging Darren Hall wrote: So essentially, I should download Log4J, include the jar in my classpath and create a Log4J.xml file. Correct? Most people use the properties file, but the XML config gives you more power. I've always handled XML config init programmatically; I don't know if it works automagically. Dave - 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: ajax:autocomplete tag
Thanks for all who helped me to solve this problem. I made it work in my application. Once again thanks a lot sony :-) Samere, Adam J wrote: You can forward to a JSP from your action rather than coding tags into your action, then generate XML in your JSP rather than HTML. Your JSP (aside from taglib directives etc) may look like this: ?xml version=1.0 encoding=UTF-8? ajax-response response c:forEach var=user items=${requestScope.users} item namec:out value=${user.userName}//name valuec:out value=${user.id}//value /item /c:forEach /response /ajax-response -Adam -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 14, 2006 8:01 AM To: user@struts.apache.org Subject: RE: ajax:autocomplete tag Hi That was what I ment - You don't return any values from your action. You need to write the values to the response (supplied by the action), and then return null. The documentation at http://ajaxtags.sourceforge.net shows you how, or search for Struts and returning a file for instance. Hermod -Original Message- From: Sony Thomas [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 14, 2006 1:55 PM To: Struts Users Mailing List Subject: Re: ajax:autocomplete tag Hi Hermod, I am setting the value entered in the textbox parameters=username={username} username is my textfield name. The problem is How will I return the username list back to jsp from action. It is very very urgent. can anyone help me please sony [EMAIL PROTECTED] wrote: Hi You are not setting any values in the request - How can the list be populated if you don't supply any values Hermod -Original Message- From: Sony Thomas [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 14, 2006 1:09 PM To: user@struts.apache.org Subject: ajax:autocomplete tag Hi, I am a newbie in ajax. I want to use ajax in my application. Let me explain my requirement : when I enter a character in the text field i have to call an action. Inside my action i have to load all the users and send it back to jsp so that I can display. I am able to call the action class from my jsp. But my problem is how will I set the list of users to response.Can anyone help me please What to do in my action to show the Userlist in jsp ? Please it is very urgent Here is my jsp code : form action=taskSave input id=username name=username type=text size=30 class=form-autocomplete / /form ajax:autocomplete baseUrl=/enterpriseUI/userAjaxComplete.do source=username target=username parameters=username={username} className=testcomplete minimumCharacters=1/ Here is my Action class code : public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) { logger.info(** Inside ajaxAutoCompleteAction ** ); try{ ArrayList usersList = (ArrayList)UserManager.loadAll(); // return new AjaxXmlBuilder().addItems(usersList, model, make).toString(); }catch(BusinessObjectException e){ e.printStackTrace(); } return mapping.findForward(success); } Thanks in advance Sony Thomas - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * This email with attachments is solely for the use of the individual or entity to whom it is addressed. Please also be aware that the DnB NOR Group cannot accept any payment orders or other legally binding correspondence with customers as a part of an email. This email message has been virus checked by the anti virus programs used in the DnB NOR Group. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: ApplicationResources vs. MessageResources
On 6/13/06, Eric Rank [EMAIL PROTECTED] wrote: I know that ApplicationResources and MessageResources do similar things, but I'm confused about how to understand their individual roles 1. What are the similarities and differences between MessageResources and ApplicationResources in a struts app? Unless I'm not answering the right question... nothing. It's just the name of your resource bundle, you can name it whatever you want. It seems that in earlier Struts example apps, the file was called ApplicationResources.properties, and now it's MessageResources.properties. 2. What is the best way to specify that a struts app use these bundles? (web.xml, struts-config.xml, specify a bundle when using a jsp tag, etc.) I've never done anything other than: (struts-config.xml) !-- == Message Resources Definitions == -- !-- This is the location of the ApplicationResources.properties file -- message-resources parameter=ApplicationResources null=false / (web.xml) !-- For JSTL's fmt:message tag -- context-param param-namejavax.servlet.jsp.jstl.fmt.localizationContext/param-name param-valueApplicationResources/param-value /context-param And you can see I'm using the old name... this app has been around for a few years. ;) 3. Bonus question: When internationalizing, do the extra xxx_[lng,locale].properties files need to be specified in the web.xml / struts-config.xml files for each additional language / locale? No. You just specify the 'bundle name' and the right one will get selected based on the user's locale. -- Wendy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
How to implement autorefresh?
I need to call a method from the action class that periodically refreshes my page in struts application automatically. Can someone please suggest how to do it? regards, Pankaj - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to implement autorefresh?
You should use javascript to post your form from time to time using the function window.setInterval(function, milliseconds) that you can read about at http://www.w3.org/TR/Window/#timers. If ou don't want the flickering effect that it causes, you could also use Ajax with the timer. On 6/14/06, Pankaj Gupta [EMAIL PROTECTED] wrote: I need to call a method from the action class that periodically refreshes my page in struts application automatically. Can someone please suggest how to do it? regards, Pankaj - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Cassio Santos Pereira - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [shale] using the eclipse ide (maybe ith ant or maven2)
From: Wendy Smoak [EMAIL PROTECTED] On 6/14/06, stephan opitz wrote: i wanted start programming with shale... so i tried to integrate the shale blank war into eclipse as a new tomcat project because i was not able to configure maven2 and shale into eclipse i'm using ant. If you'd like to try Maven 2 again, we have an archetype in the sandbox. Follow the instructions here for 'mvn archetype:create ... ': DME.txt Then change into your new project directory and run 'mvn eclipse:eclipse'. I don't use Eclipse, but it works great for IDEA ('mvn idea:idea'). I've just started using this plugin http://maven.apache.org/eclipse-plugin.html. You can generate the eclipse project files using mvn eclipse:eclipse. After the plugin is installed, you have set the maven repository for each new workspace under the preferences. The maven eclipse:eclipse goal will generate a .classpath file that points the the maven repository. You still have to create a variable for M2_REPO under the project library tab to the maven repository. Gary HTH, -- Wendy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: log4j - urgent
Darren Hall wrote: (continued from previous msg) HERE is the log4j.xml file I'm using (I forgot to include it in my last message). Whew, I knew there was a reason I almost always use the properties file. Java + XML: Like crack for people that like to type. Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [newb question] Turning on DEBUG level logging
Darren Hall asked: I've included the log4j.jar in my WEB-INF/lib directory and created a log4j.xml file based on an example I found online (rather then a log4j.properties file). The application deploys error free and executes - however my log files are not created. I can think of two reasons this could be happening: 1) Log4j is not creating the log directory, thus it can't create the log file; or The directory needs to exist. Log4j won't create it for you. Do you see your log output on the console? Below is the log4j.xml properties file. I'm using a relative path to specify a directory for the log files (i.e. log/uwaf-event.log). Given that I'm using Tomcat 5.5 as my app server - where will it try to create my log files? In my webapps/myapp folder, or in the Catalina_home/bin directory? It will probably be relative to the current working directory where you start Tomcat. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [newb question] Turning on DEBUG level logging
Hey George, Interesting problem with that console... I'm deploying my war file through Tomcat 5.5 manager (web based interface). Since Tomcat is running as a service on Windows, there really is no console per se. In the past, I've started tomcat from the command line, and I was able to see output in the console, however this time, I've installed Tomcat using the Apache installer and had it set itself up as a Windows service, so I'm not starting it from the command line any longer. Therefore, I can't see any console output from Tomcat. I'm leaning towards throwing away the log4j.xml file I'm currently using and trying to use a much simpler one for now - just to get some kind of output. I'll let you know how I make out. Thanks, Darren -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 14, 2006 10:40 AM To: user@struts.apache.org Subject: RE: [newb question] Turning on DEBUG level logging Darren Hall asked: I've included the log4j.jar in my WEB-INF/lib directory and created a log4j.xml file based on an example I found online (rather then a log4j.properties file). The application deploys error free and executes - however my log files are not created. I can think of two reasons this could be happening: 1) Log4j is not creating the log directory, thus it can't create the log file; or The directory needs to exist. Log4j won't create it for you. Do you see your log output on the console? Below is the log4j.xml properties file. I'm using a relative path to specify a directory for the log files (i.e. log/uwaf-event.log). Given that I'm using Tomcat 5.5 as my app server - where will it try to create my log files? In my webapps/myapp folder, or in the Catalina_home/bin directory? It will probably be relative to the current working directory where you start Tomcat. - 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]
web.xml specifications from 2.4 to 2.3
Hi all, I need some advice here. I have developed my application using 2.4 specifications but the deployment server is only up to 2.3 specifications. So i have to make some changes in web.xml as the following. !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd; webapp ... /webapp When i run the web application, bean:define id=biz_link type=String name=Biz_Bean property=business_id/ html:link action=/viewBiz/ViewBusinessDetail?business_id=${biz_link} The code was rendered in the html as http://./viewBiz/ViewBusinessDetail?business_id=${biz_link} It works fine in 2.4 specifications. Is there something that i should declare in the web.xml(2.3) ? Appreciate any help
Re: [newb question] Turning on DEBUG level logging
Darren Hall wrote: I'm not starting it from the command line any longer. Therefore, I can't see any console output from Tomcat. Try using a ConsoleAppender and tail -f the log file in the tomcat log directory. Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: web.xml specifications from 2.4 to 2.3
chuanjiang lo wrote: bean:define id=biz_link type=String name=Biz_Bean property=business_id/ html:link action=/viewBiz/ViewBusinessDetail?business_id=${biz_link} You need to use the EL-enabled tag libs (struts-el or something like that) when you don't have JSP 2.0 available. Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: web.xml specifications from 2.4 to 2.3
On 6/14/06, Dave Newton [EMAIL PROTECTED] wrote: chuanjiang lo wrote: bean:define id=biz_link type=String name=Biz_Bean property=business_id/ html:link action=/viewBiz/ViewBusinessDetail?business_id=${biz_link} You need to use the EL-enabled tag libs (struts-el or something like that) when you don't have JSP 2.0 available. snip/ Indeed: http://struts.apache.org/struts-action/struts-el/index.html -Rahul Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: web.xml specifications from 2.4 to 2.3
i have some other pages that uses c:if and etc etc.. I've read on the net and realize that the 2.3 specifications supports only JSTL 1.0 and it would not evaluate the EL expressions. So how do i make it evaluate the EL expression without changing my implementation. On 6/14/06, Rahul Akolkar [EMAIL PROTECTED] wrote: On 6/14/06, Dave Newton [EMAIL PROTECTED] wrote: chuanjiang lo wrote: bean:define id=biz_link type=String name=Biz_Bean property=business_id/ html:link action=/viewBiz/ViewBusinessDetail?business_id=${biz_link} You need to use the EL-enabled tag libs (struts-el or something like that) when you don't have JSP 2.0 available. snip/ Indeed: http://struts.apache.org/struts-action/struts-el/index.html -Rahul Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: web.xml specifications from 2.4 to 2.3
You need to use the 1.0 JSTL implementation as you said. Your taglib directives will then need to use the 1.0 uri, for example: [EMAIL PROTECTED] uri=http://java.sun.com/jstl/core; prefix=c % (no /jsp/ in the path) -Adam -Original Message- From: chuanjiang lo [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 14, 2006 11:33 AM To: Struts Users Mailing List Subject: Re: web.xml specifications from 2.4 to 2.3 i have some other pages that uses c:if and etc etc.. I've read on the net and realize that the 2.3 specifications supports only JSTL 1.0 and it would not evaluate the EL expressions. So how do i make it evaluate the EL expression without changing my implementation. On 6/14/06, Rahul Akolkar [EMAIL PROTECTED] wrote: On 6/14/06, Dave Newton [EMAIL PROTECTED] wrote: chuanjiang lo wrote: bean:define id=biz_link type=String name=Biz_Bean property=business_id/ html:link action=/viewBiz/ViewBusinessDetail?business_id=${biz_link} You need to use the EL-enabled tag libs (struts-el or something like that) when you don't have JSP 2.0 available. snip/ Indeed: http://struts.apache.org/struts-action/struts-el/index.html -Rahul Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - The information contained in this message may be privileged, confidential, and protected from disclosure. If the reader of this message is not the intended recipient, or any employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution, or copying of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately by replying to the message and deleting it from your computer. Thank you. Paychex, Inc. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: evaluating list backed action form value in javascript
Ok, I tried the following which was using a input tag as normal: input type=text name=%=value[+index.intValue()+].value% size=20 onblur=calculate(this.value, 'bean:write name=benefit property=benMaxRange/', 'bean:write name=benefit property=benMinRange/', 'bean:write name=benefit property=benRange/', 'bean:write name=benefit property=label/')/ The this.value parameter passes the correct value to my javascript function and I can submit it to the action class. However I now run into a issue when I try to load the data back into the form as I have lost all my values. They come back from the DB ok but are lost in creating the tag. I have also tried it with value= in the input tag but then this does not submit the values correctly. So I had to take the value= out to get it to submit correctly. If I had html:text property=%=benefits[+index.intValue()+].value% size=20 onblur=%=jsFunction%/ then this brings back the correct value to display however then I am back at the problem I started with which is how to pass the value of the element to the JS function. Is there anyway I can pass bean:write name=benefit property=benMaxRange/ as a parameter to a function into the html:text tag onblur event of struts without using the bean define tag -Original Message- From: Shoukat, Faisal Sent: 14 June 2006 11:51 To: 'Struts Users Mailing List' Subject: evaluating list backed action form value in javascript Hi, I am using a list backed action form and need some advice on how to get the value from the html:text box so I can do some logic with it in a javascript function. In my case I have the following: html:text property=%=benefits[+index.intValue()+].value% size=20 onblur=%=jsFunction%/ My jsFunction is as follows: bean:define id=jsFunction javascript:calculate('%=benefits[ + index.intValue() + ].value%', 'bean:write name=benefit property=benMaxRange/', 'bean:write name=benefit property=benMinRange/', 'bean:write name=benefit property=benRange/', 'bean:write name=benefit property=label/') /bean:define The problem I am having is how to get the actual value entered in the text box and pass this into the function (i.e 12000 instead of what is actually being sent which is %=benefits[0].value%). So it would be the parameter %=benefits[ + index.intValue() + ].value% of the calculate function. Thanks in adavce Faisal - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Customizing message translation
I'd like to expand the message translation with a few things. I was wondering where I should look for plugging in my own processing of keys-message text. Thanks, Scott - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Default value for text field
Pankaj Gupta wrote: Please tell me in Struts context. What do I need to write in my html:text tag? input name=someName value=fmt:message key=AppProperties.defaultText / type=text Not sure how well that works... if you're using a JSP 2.4-compliant container and the JSTL (which you would need to above to use fmt:), you could use this: %@ taglib uri=http://java.sun.com/jsp/jstl/core; prefix=c % %@ taglib uri=http://java.sun.com/jsp/jstl/fmt; prefix=fmt % %@ taglib uri=/tags/struts-html prefix=html % . html:form action=/myAction c:set var=value c:choose c:when test=${empty myForm.someName} fmt:message key=AppProperties.defaultText / /c:when c:otherwise ${myForm.someName} /c:otherwise /c:choose /c:set html:text property=someName value=${value} / . /html:form - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Pass dates between two windows
José María Tristán wrote: Again, very thanks I think that the second option es better that our needs. When the uses press teh button search a pop-up it's open. This pop-up contains the list whith the employers and a close button. The fist windows is always visible and it's possible to interact whith the controls. When the user close the pop-up i like show in the first windows the selection. I don't know how I can use javascript to capture the dates in the pop-up and show in the firs window when the user press close. Here's what I do (or did, only did this kind of thing once for a proof of concept :) 1) In the main window, create a form to manage the state of the child (popup) window: form name=childForm input type=hidden name=childClosed value=false / input type=hidden name=date value= / /form 2) In the main window, add a listener to the body tag to listen for focus events: body onfocus=onFocusBody() 3) In the main window, write the function to take action when the child is closed: script type=text/javascript function onFocusBody() { if ( document.childForm.childClosed.value == true ) { document.childForm.childClosed.value = false; // Indicate that we noticed the child was closed // Update your document structure here using 'document.childForm.date.value' // . } } /script 4) In the child window, add an event for the close button that copies the date value to the main window before closing: button onclick=onButtonClose()Close/button 5) And write the function in the child window: script type=text/javascript function onButtonClose() { window.opener.document.childForm.childClosed.value = true; // Indicate to parent that the child's no longer open window.opener.document.childForm.date.value = myDateForm.date.value; // Copy from child to parent window.close(); } /script Have fun, Scott - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Problem with multiple windows
Hello I read through several discussions about this problem but havent come to a conclusion on how to resolve it. A very simple explanation of my problem I have two JSP pages. On page 1 - several account numbers are displayed. When a user selects a particular account, in my action class, I'm getting all the addresses associated with the account. All these address information is stored in beans (AddressBeans) and the beans are stored in an arraylist and the arraylist is part of my actionForm. Then the control is forwarded to my second jsp page, where I get this arraylist, iterate through it, get the individual address beans and display the information. On this page, for each address bean, I'm having some textboxes to capture information for that particular address. So I'm using indexed property. I submit the form and everything works fine. The problem comes when I open a new window from the first one. An example scenario - 1) On the first JSP page, I open an account which has say 2 Address Beans - so the second JSP page is displayed with 2 Address Beans. The arrayList property of the actionForm has 2 elements. 2) From this page - I open a link in a new window which takes me back to Page 1. Here I select another account which has say 1 Address Bean. The second page is opened and 1 address bean info is displayed. Now the arraylist property of ActionForm has been overridden and has 1 element. 3) Now I come back to my first window, where I was displaying 2 AddressBeans, fill in the information for the textboxes for each addressbean and click on submit and then I get this error javax.servlet.ServletException: BeanUtils.populate root cause java.lang.IndexOutOfBoundsException: Index: 1, Size: 1 Which is understandable. When ActionForm tries to fill the indexed properties for the 2 Addressbeans in the list, it finds only one element in the list. First of all, is my understanding of this problem correct. Secondly what is the best way for me to handle this problem. I've read people talk about overriding RequestProcessor class and create a new action form instance everytime. Any suggestions will be appreciated. Thanks -- Notice: This e-mail message, together with any attachments, contains information of Merck Co., Inc. (One Merck Drive, Whitehouse Station, New Jersey, USA 08889), and/or its affiliates (which may be known outside the United States as Merck Frosst, Merck Sharp Dohme or MSD and in Japan, as Banyu) that may be confidential, proprietary copyrighted and/or legally privileged. It is intended solely for the use of the individual or entity named on this message. If you are not the intended recipient, and have received this message in error, please notify us immediately by reply e-mail and then delete it from your system. -- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: accssing object in JSP
One option might be a static HashTable in some class... key the table by some calculated ID representing the request.. for that, see the RequestHelpers.generateGUID() method in Java Web Parts: http://javawebparts.sourceforge.net/javadocs/javawebparts/request/RequestHelpers.html (http://javawebparts.sourceforge.net) Then, store your bean under that key. Then, you can retrieve it in your JSP. Problems with this: * Using a synchronized collection will obviously have performance implications. Synchronization isn't the killer it used to be, so you may find it's not much of a problem, but you'll definitely want to be careful * Take care to remove the item from the collection at the end of your JSP, otherwise you'll run out of memory at some point since it'll just keep growing with each request. Maybe no boom today. Boom tomorrow, there's always boom tomorrow (http://www.ao.com/~regan/quotes/Science_Fiction.html). Frank Scott Van Wart wrote: Sonu S wrote: I can not store bean in request or session or any scope (design issues...) If you can't store the bean in any scope, then you really have no way of getting anything from the action to the jsp... I see no solution to your problem with this constraint. - Scott - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com AIM: fzammetti Yahoo: fzammetti MSN: [EMAIL PROTECTED] Java Web Parts - http://javawebparts.sourceforge.net Supplying the wheel, so you don't have to reinvent it! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[shale] component id + clay templates
If a have a shared html template how can I parameterize component ids such that the template can be used more than once within the view? For example, if I have a input id=myField jsfid=inputText type=text value=@binding/ within a reusable template, and I used the template twice in a view, I would get an error because the of duplicate ids in the faces tree. can I simply change to input id=@id jsfid=inputText type=text value=@binding/ in the template and specify two different @ids in the template client to resolve this? better yet can I change to input id=@idPrefixMyField jsfid=inputText type=text value=@binding/ and specify 1 @idPrefix so that I can have multiple inputs within the template and still be okay? Like input id=@idPrefixMyField jsfid=inputText type=text value=@binding/ input id=@idPrefixMyField2 jsfid=inputText type=text value=@binding2/ I ask this only because I think in the past the jsfid id was handled differently than other attributes (for example the symbol replacement happenend after the value was bound to the component). Just wanted to make sure that the id symbol replacement will happen before binding to the component. Thanks, Ryan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: accssing object in JSP
Frank W. Zammetti wrote: One option might be a static HashTable in some class... key the table by some calculated ID representing the request.. for that, see the RequestHelpers.generateGUID() method in Java Web Parts: Scott Van Wart wrote: Sonu S wrote: I can not store bean in request or session or any scope (design issues...) If you can't store the bean in any scope, then you really have no way of getting anything from the action to the jsp... I see no solution to your problem with this constraint. That sounds nasty... no offense Frank, but I hope we both misinterpreted his original message! :) - Scott - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [shale] using the eclipse ide (maybe ith ant or maven2)
hello it works in eclipse... next important problem is... i can define lifecycles like compile package cargo:start etc.. if i do this in eclipse it does not work... compile works but if i use package or cargo:start eclipse throws [ERROR] project-execute : org.apache.struts.ShaleShop:ShaleShop:war:1.0-SNAPSHOT ( task-segment: [package] ) why? stephan 2006/6/14, Gary VanMatre [EMAIL PROTECTED]: From: Wendy Smoak [EMAIL PROTECTED] On 6/14/06, stephan opitz wrote: i wanted start programming with shale... so i tried to integrate the shale blank war into eclipse as a new tomcat project because i was not able to configure maven2 and shale into eclipse i'm using ant. If you'd like to try Maven 2 again, we have an archetype in the sandbox. Follow the instructions here for 'mvn archetype:create ... ': DME.txt Then change into your new project directory and run 'mvn eclipse:eclipse'. I don't use Eclipse, but it works great for IDEA ('mvn idea:idea'). I've just started using this plugin http://maven.apache.org/eclipse-plugin.html. You can generate the eclipse project files using mvn eclipse:eclipse. After the plugin is installed, you have set the maven repository for each new workspace under the preferences. The maven eclipse:eclipse goal will generate a .classpath file that points the the maven repository. You still have to create a variable for M2_REPO under the project library tab to the maven repository. Gary HTH, -- Wendy - 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]
[shale] Backing view
Newbie, I'm using Shale with tiger. JSP, subscribe (example from somewhere) that does a save. All this works fine, but I made a change so that the return should send it to a Success page. navigation-rule from-view-id/subscribe.jsp/from-view-id navigation-case from-outcomesuccess/from-outcome to-view-id/success.jsp/to-view-id /navigation-case /navigation-rule I kept getting a 500 error: 12:11:39,292 ERROR [faces]:253 - Servlet.service() for servlet faces threw exception java.lang.IllegalStateException: No WebApplicationContext found: no ContextLoaderListener registered? I then created a Success bean @Bean(name=success, scope= Scope.SESSION) @View public class Success { } And then everything worked. Do I always need a View behind my jsp's or am I doing something wrong? @Bean(name=subscrHandler, scope = Scope.REQUEST) public class SubscriberHandler { @Value(#{subscribe}) private Subscriber subscriber; public void setSubscriber(Subscriber subscriber) { this.subscriber = subscriber; } public String saveSubscriber( ) { subscriber.save( ); return success; } } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Customizing message translation
Struts uses MessagesResources to perform the key--text translation. The default implementation used is PropertyMessageResources (both in the org.apache.struts.util package). If you want to use your own MessageResources implementation then you need to create two classes - the custom implementation and a factory (MessageResourceFactory implementation) which creates an instance of that implementation. Then you configure struts with the name of the factory: http://struts.apache.org/struts-action/userGuide/configuration.html#resources_config Niall On 6/14/06, Scott Van Wart [EMAIL PROTECTED] wrote: I'd like to expand the message translation with a few things. I was wondering where I should look for plugging in my own processing of keys-message text. Thanks, Scott - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
SV: [shale] using the eclipse ide (maybe ith ant or maven2)
Hi The problem lies with the eclipse plugin and the maven embedder. This is fixed in the next version of the plugin Hermod -Opprinnelig melding- Fra: stephan opitz [mailto:[EMAIL PROTECTED] Sendt: 14. juni 2006 19:16 Til: Struts Users Mailing List Emne: Re: [shale] using the eclipse ide (maybe ith ant or maven2) hello it works in eclipse... next important problem is... i can define lifecycles like compile package cargo:start etc.. if i do this in eclipse it does not work... compile works but if i use package or cargo:start eclipse throws [ERROR] project-execute : org.apache.struts.ShaleShop:ShaleShop:war:1.0-SNAPSHOT ( task-segment: [package] ) why? stephan 2006/6/14, Gary VanMatre [EMAIL PROTECTED]: From: Wendy Smoak [EMAIL PROTECTED] On 6/14/06, stephan opitz wrote: i wanted start programming with shale... so i tried to integrate the shale blank war into eclipse as a new tomcat project because i was not able to configure maven2 and shale into eclipse i'm using ant. If you'd like to try Maven 2 again, we have an archetype in the sandbox. Follow the instructions here for 'mvn archetype:create ... ': DME.txt Then change into your new project directory and run 'mvn eclipse:eclipse'. I don't use Eclipse, but it works great for IDEA ('mvn idea:idea'). I've just started using this plugin http://maven.apache.org/eclipse-plugin.html. You can generate the eclipse project files using mvn eclipse:eclipse. After the plugin is installed, you have set the maven repository for each new workspace under the preferences. The maven eclipse:eclipse goal will generate a .classpath file that points the the maven repository. You still have to create a variable for M2_REPO under the project library tab to the maven repository. Gary HTH, -- Wendy - 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: [shale] Backing view
On 6/14/06, Marty Phee [EMAIL PROTECTED] wrote: Newbie, I'm using Shale with tiger. JSP, subscribe (example from somewhere) that does a save. All this works fine, but I made a change so that the return should send it to a Success page. navigation-rule from-view-id/subscribe.jsp/from-view-id navigation-case from-outcomesuccess/from-outcome to-view-id/success.jsp/to-view-id /navigation-case /navigation-rule I kept getting a 500 error: 12:11:39,292 ERROR [faces]:253 - Servlet.service() for servlet faces threw exception java.lang.IllegalStateException: No WebApplicationContext found: no ContextLoaderListener registered? I then created a Success bean @Bean(name=success, scope= Scope.SESSION) @View public class Success { } And then everything worked. Do I always need a View behind my jsp's or am I doing something wrong? @Bean(name=subscrHandler, scope = Scope.REQUEST) public class SubscriberHandler { @Value(#{subscribe}) private Subscriber subscriber; public void setSubscriber(Subscriber subscriber) { this.subscriber = subscriber; } public String saveSubscriber( ) { subscriber.save( ); return success; } } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] It is supposed to always be optional to have a backing bean behind a JSP view. Could you please post the entire stack trace for the IllegalStateException you encountered? Craig
Re: accssing object in JSP
Oh, I agree... this is only the kind of solution I'd dream up with some crazy requirement, as there seems to be in the OP :) I can't imagine what design criteria would say you can't put an object in ANY scope! But, if that's the case, it's time for some creative/wacky (depending on your point of view) ideas :) Frank Scott Van Wart wrote: Frank W. Zammetti wrote: One option might be a static HashTable in some class... key the table by some calculated ID representing the request.. for that, see the RequestHelpers.generateGUID() method in Java Web Parts: Scott Van Wart wrote: Sonu S wrote: I can not store bean in request or session or any scope (design issues...) If you can't store the bean in any scope, then you really have no way of getting anything from the action to the jsp... I see no solution to your problem with this constraint. That sounds nasty... no offense Frank, but I hope we both misinterpreted his original message! :) - Scott - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com AIM: fzammetti Yahoo: fzammetti MSN: [EMAIL PROTECTED] Java Web Parts - http://javawebparts.sourceforge.net Supplying the wheel, so you don't have to reinvent it! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [newb question] Turning on DEBUG level logging
I tried that. There is no output from log4j to the daily catalina.log files. However, taking another path, I created a new (and much simpler) log4j.xml file. Using this new file, I now see the following log file created 'C:\Program Files\Apache Group\Tomcat 5.5\logs\uwaf-debug.log'. So... progress! However, the log file contains nothing. None of my info or debug statements were printed to the file. It's blank. What did I do wrong now? Any ideas?? Thanks, Darren (log4j.xml) ?xml version=1.0 encoding=UTF-8 ? !DOCTYPE log4j:configuration SYSTEM log4j.dtd log4j:configuration xmlns:log4j=http://jakarta.apache.org/log4j/; appender name=DEBUG class=org.apache.log4j.FileAppender param name=File value=logs/uwaf-debug.log / param name=Threshold value=DEBUG / layout class=org.apache.log4j.PatternLayout param name=ConversionPattern value=%d{ISO8601} %-5p %c - %m%n/ /layout /appender logger name=com.uwaf level value=debug/ appender-ref ref=DEBUG/ /logger /log4j:configuration -Original Message- From: Dave Newton [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 14, 2006 11:19 AM To: Struts Users Mailing List Subject: Re: [newb question] Turning on DEBUG level logging Darren Hall wrote: I'm not starting it from the command line any longer. Therefore, I can't see any console output from Tomcat. Try using a ConsoleAppender and tail -f the log file in the tomcat log directory. Dave - 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: [shale] Backing view
Here you go. Again this is Shale with Tiger. 13:27:47,796 ERROR [faces]:253 - Servlet.service() for servlet faces threw exception java.lang.IllegalStateException: No WebApplicationContext found: no ContextLoaderListener registered? at org.springframework.web.jsf.FacesContextUtils.getRequiredWebApplicationContext(FacesContextUtils.java:78) at org.springframework.web.jsf.DelegatingVariableResolver.getWebApplicationContext(DelegatingVariableResolver.java:134) at org.springframework.web.jsf.DelegatingVariableResolver.resolveVariable(DelegatingVariableResolver.java:112) at org.apache.shale.spring.WebApplicationContextVariableResolver.resolveVariable(WebApplicationContextVariableResolver.java:87) at org.apache.shale.view.faces.ViewViewHandler.setupViewController(ViewViewHandler.java:285) at org.apache.shale.view.faces.ViewViewHandler.createView(ViewViewHandler.java:130) at org.apache.shale.tiles.TilesViewHandler.createView(TilesViewHandler.java:184) at org.apache.myfaces.application.NavigationHandlerImpl.handleNavigation(NavigationHandlerImpl.java:145) at org.apache.shale.dialog.faces.DialogNavigationHandler.handleNavigation(DialogNavigationHandler.java:196) at org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:84) at javax.faces.component.UICommand.broadcast(UICommand.java:106) at javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:90) at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:164) at org.apache.myfaces.lifecycle.LifecycleImpl.invokeApplication(LifecycleImpl.java:316) at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:86) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:106) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.apache.shale.faces.ShaleApplicationFilter.doFilter(ShaleApplicationFilter.java:275) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684) at java.lang.Thread.run(Thread.java:595) Succes.jsp !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.0 Transitional//EN HTML HEADTITLERejected!/TITLE /HEAD BODY CENTER TABLE BORDER=5 TRTH CLASS=TITLESuccess!/TH/TR /TABLE H2You have been successfully registered./H2 /CENTER /BODY/HTML It is supposed to always be optional to have a backing bean behind a JSP view. Could you please post the entire stack trace for the IllegalStateException you encountered? Craig - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [newb question] Turning on DEBUG level logging
I'm working on getting logging up on struts with Log4J right now as well. I'm also new to struts. I am using the following log4j.xml file (in my WEB-INF/classes) directory and getting a log file successfully. My XML: ?xml version=1.0 encoding=UTF-8 ? !DOCTYPE log4j:configuration SYSTEM log4j.dtd log4j:configuration xmlns:log4j=http://jakarta.apache.org/log4j/; appender name=appender class=org.apache.log4j.DailyRollingFileAppender param name=File value=logs/my_log_file.log/ param name=Append value=true/ param name=DatePattern value='.'-MM-dd / layout class=org.apache.log4j.PatternLayout param name=ConversionPattern value=%-5p - %d{MM/dd/ HH:mm:ss.SSS} - [%t] - %m%n/ /layout /appender root priority value =debug/ appender-ref ref=appender/ /root /log4j:configuration The File param contains a relative path to the log file. My tomcat server seems to want to put $TOMCAT_HOME in front of that. I'm seeing my log file appear in the standard tomcat logs directory using the above XML. I'm using Tomcat 5.5 on windows and log4j 1.2.13 by the way. One question I wanted to throw out here was how to strip all the tomcat rubbish from the log file and have it only log messages I write from my application. I'm getting things like: DEBUG - 06/14/2006 14:24:45.823 - [ContainerBackgroundProcessor[StandardEngine[Catalina]]] - Start expire sessions StandardManager at 1150309485823 sessioncount 1 DEBUG - 06/14/2006 14:24:45.823 - [ContainerBackgroundProcessor[StandardEngine[Catalina]]] - End expire sessions StandardManager processingTime 0 expired sessions: 0 and DEBUG - 06/14/2006 14:23:45.697 - [Thread-1] - [SetNextRule]{form-validation/formset} Call org.apache.commons.validator.ValidatorResources.addFormSet(FormSet: language=null country=null variant=null Form: LogonForm Field: key = userid property = userid indexedProperty = null indexedListProperty = null depends = required page = 0 fieldOrder = 0 Vars: I'm lots of other things that I did not put into the log file myself (141,300 lines when I empty the log file and just turn on tomcat... some of which are whitespace). I guess I'm looking for a way to turn off struts and tomcat logging. Anyone have any thoughts? Cheers, R Darren Hall wrote: I tried that. There is no output from log4j to the daily catalina.log files. However, taking another path, I created a new (and much simpler) log4j.xml file. Using this new file, I now see the following log file created 'C:\Program Files\Apache Group\Tomcat 5.5\logs\uwaf-debug.log'. So... progress! However, the log file contains nothing. None of my info or debug statements were printed to the file. It's blank. What did I do wrong now? Any ideas?? Thanks, Darren (log4j.xml) ?xml version=1.0 encoding=UTF-8 ? !DOCTYPE log4j:configuration SYSTEM log4j.dtd log4j:configuration xmlns:log4j=http://jakarta.apache.org/log4j/; appender name=DEBUG class=org.apache.log4j.FileAppender param name=File value=logs/uwaf-debug.log / param name=Threshold value=DEBUG / layout class=org.apache.log4j.PatternLayout param name=ConversionPattern value=%d{ISO8601} %-5p %c - %m%n/ /layout /appender logger name=com.uwaf level value=debug/ appender-ref ref=DEBUG/ /logger /log4j:configuration -Original Message- From: Dave Newton [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 14, 2006 11:19 AM To: Struts Users Mailing List Subject: Re: [newb question] Turning on DEBUG level logging Darren Hall wrote: I'm not starting it from the command line any longer. Therefore, I can't see any console output from Tomcat. Try using a ConsoleAppender and tail -f the log file in the tomcat log directory. Dave - 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 implement autorefresh?
Cassio Pereira wrote: You should use javascript to post your form from time to time using the function window.setInterval(function, milliseconds) that you can read about at http://www.w3.org/TR/Window/#timers. If ou don't want the flickering effect that it causes, you could also use Ajax with the timer. There's also the meta tag, that can be used to refresh a page automatically. This technique is discouraged, though. See: http://en.wikipedia.org/wiki/META_refresh -Dave On 6/14/06, Pankaj Gupta [EMAIL PROTECTED] wrote: I need to call a method from the action class that periodically refreshes my page in struts application automatically. Can someone please suggest how to do it? regards, Pankaj - 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: [shale] Backing view
Comments interspersed below. On 6/14/06, Marty Phee [EMAIL PROTECTED] wrote: Here you go. Again this is Shale with Tiger. 13:27:47,796 ERROR [faces]:253 - Servlet.service() for servlet faces threw exception java.lang.IllegalStateException: No WebApplicationContext found: no ContextLoaderListener registered? at org.springframework.web.jsf.FacesContextUtils.getRequiredWebApplicationContext (FacesContextUtils.java:78) at org.springframework.web.jsf.DelegatingVariableResolver.getWebApplicationContext (DelegatingVariableResolver.java:134) at org.springframework.web.jsf.DelegatingVariableResolver.resolveVariable( DelegatingVariableResolver.java:112) at org.apache.shale.spring.WebApplicationContextVariableResolver.resolveVariable (WebApplicationContextVariableResolver.java:87) at Hmm ... interesting that Spring is involved here too. Are you using the Spring integration to create managed beans from the Spring bean factory? I've tested Spring integration and Tiger-based managed beans separately, but never tried them together. org.apache.shale.view.faces.ViewViewHandler.setupViewController( ViewViewHandler.java:285) at org.apache.shale.view.faces.ViewViewHandler.createView( ViewViewHandler.java:130) at org.apache.shale.tiles.TilesViewHandler.createView(TilesViewHandler.java :184) at org.apache.myfaces.application.NavigationHandlerImpl.handleNavigation( NavigationHandlerImpl.java:145) at org.apache.shale.dialog.faces.DialogNavigationHandler.handleNavigation( DialogNavigationHandler.java:196) at org.apache.myfaces.application.ActionListenerImpl.processAction( ActionListenerImpl.java:84) at javax.faces.component.UICommand.broadcast(UICommand.java:106) at javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:90) at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:164) at org.apache.myfaces.lifecycle.LifecycleImpl.invokeApplication( LifecycleImpl.java:316) at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:86) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:106) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter( ApplicationFilterChain.java:252) at org.apache.catalina.core.ApplicationFilterChain.doFilter( ApplicationFilterChain.java:173) at org.apache.shale.faces.ShaleApplicationFilter.doFilter( ShaleApplicationFilter.java:275) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter( ApplicationFilterChain.java:202) at org.apache.catalina.core.ApplicationFilterChain.doFilter( ApplicationFilterChain.java:173) at org.apache.catalina.core.StandardWrapperValve.invoke( StandardWrapperValve.java:213) at org.apache.catalina.core.StandardContextValve.invoke( StandardContextValve.java:178) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java :126) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java :105) at org.apache.catalina.core.StandardEngineValve.invoke( StandardEngineValve.java:107) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java :148) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection (Http11BaseProtocol.java:664) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket( PoolTcpEndpoint.java:527) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt( LeaderFollowerWorkerThread.java:80) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run( ThreadPool.java:684) at java.lang.Thread.run(Thread.java:595) Succes.jsp !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.0 Transitional//EN HTML HEADTITLERejected!/TITLE /HEAD BODY CENTER TABLE BORDER=5 TRTH CLASS=TITLESuccess!/TH/TR /TABLE H2You have been successfully registered./H2 /CENTER /BODY/HTML I notice that this page doesn't actually have any JSF components in it. Could you try an experiment and add f:view/ (and the appropriate taglib directive) to make this into a JSF page? Craig
Re: [shale] Backing view
On 6/14/06, Marty Phee [EMAIL PROTECTED] wrote: Here you go. Again this is Shale with Tiger. 13:27:47,796 ERROR [faces]:253 - Servlet.service() for servlet faces threw exception java.lang.IllegalStateException: No WebApplicationContext found: no ContextLoaderListener registered? ... org.apache.shale.spring.WebApplicationContextVariableResolver.resolveVariable(WebApplicationContextVariableResolver.java:87) This looks similar to the problems a couple of other people have had when they are not using Spring, but still include shale-spring.jar in WEB-INF/lib. This might help: http://www.nabble.com/Re%3A-Shale-Clay%3A-Are-managed-beans-mandatory-in-xml-view--p1873169.html If you're not using Spring and Tiles, try removing the shale-spring and shale-tiles jars from your application. (Assuming they're in WEB-INF/lib now, but it looks like they are from the stack trace.) -- Wendy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: web.xml specifications from 2.4 to 2.3
You can't do it without changing your JSPs. It isn't as simple as wrapping everything with c:out value=${someVariable}/ as JSP tags cannot be nested within attributes. Also, to my knowledge there is no way to just include some jar file to enable EL exprs. A suggestion too, your code: bean:define id=biz_link type=String name=Biz_Bean property=business_id/ html:link action=/viewBiz/ViewBusinessDetail?business_id=${biz_link} can be rewritten as: html-el:link action=/viewBiz/ViewBusinessDetail?business_id=${Biz_Bean.business_id}/ HTH, -ed On 6/14/06, chuanjiang lo [EMAIL PROTECTED] wrote: i have some other pages that uses c:if and etc etc.. I've read on the net and realize that the 2.3 specifications supports only JSTL 1.0 and it would not evaluate the EL expressions. So how do i make it evaluate the EL expression without changing my implementation. On 6/14/06, Rahul Akolkar [EMAIL PROTECTED] wrote: On 6/14/06, Dave Newton [EMAIL PROTECTED] wrote: chuanjiang lo wrote: bean:define id=biz_link type=String name=Biz_Bean property=business_id/ html:link action=/viewBiz/ViewBusinessDetail?business_id=${biz_link} You need to use the EL-enabled tag libs (struts-el or something like that) when you don't have JSP 2.0 available. snip/ Indeed: http://struts.apache.org/struts-action/struts-el/index.html -Rahul Dave - 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]
Advanced MessageProperties file
I'm working on a slightly more flexible way of getting messages out of the .properties file, and am posting this to the list for a few reasons: 1) To make sure it hasn't already been done 2) To see if it's useful to anyone else 3) If this is the right approach to whatever it is I seem to think I'm doing While already supporting the {0}, {1}, ... parameter replacement, I've added key parameters to it, such as: some.message=This is a {some.other.message}. some.other.message=somewhat long {yet.another.message} yet.another.message=message So when you retrieved some.message, you would end up with This is a somewhat long message. Couple of other things I'm interested in adding include case sensitivity (so the first letter of a message will be capitalized, otherwise lowercase unless it's an acronym, etc.) and recursion detection (to prevent one={two}, two={one}). Does this sound like something you might like to see in Struts, or a worse solution to an already-solved problem? ;) Thanks, Scott - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [shale] Backing view
Removed spring and it works. Thanks for the pointer. So, if I use spring you must have managed beans for all JSP's? Not sure if Im actually going to use spring. Wendy Smoak wrote: On 6/14/06, Marty Phee [EMAIL PROTECTED] wrote: Here you go. Again this is Shale with Tiger. 13:27:47,796 ERROR [faces]:253 - Servlet.service() for servlet faces threw exception java.lang.IllegalStateException: No WebApplicationContext found: no ContextLoaderListener registered? ... org.apache.shale.spring.WebApplicationContextVariableResolver.resolveVariable(WebApplicationContextVariableResolver.java:87) This looks similar to the problems a couple of other people have had when they are not using Spring, but still include shale-spring.jar in WEB-INF/lib. This might help: http://www.nabble.com/Re%3A-Shale-Clay%3A-Are-managed-beans-mandatory-in-xml-view--p1873169.html If you're not using Spring and Tiles, try removing the shale-spring and shale-tiles jars from your application. (Assuming they're in WEB-INF/lib now, but it looks like they are from the stack trace.) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [shale] Backing view
I tried every permutation last night and couldn't get it to work without the managed bean. f:view included. Thanks for the pointers. Seems to be with spring. I removed it and it works now. Craig McClanahan wrote: Comments interspersed below. On 6/14/06, Marty Phee [EMAIL PROTECTED] wrote: Here you go. Again this is Shale with Tiger. 13:27:47,796 ERROR [faces]:253 - Servlet.service() for servlet faces threw exception java.lang.IllegalStateException: No WebApplicationContext found: no ContextLoaderListener registered? at org.springframework.web.jsf.FacesContextUtils.getRequiredWebApplicationContext (FacesContextUtils.java:78) at org.springframework.web.jsf.DelegatingVariableResolver.getWebApplicationContext (DelegatingVariableResolver.java:134) at org.springframework.web.jsf.DelegatingVariableResolver.resolveVariable( DelegatingVariableResolver.java:112) at org.apache.shale.spring.WebApplicationContextVariableResolver.resolveVariable (WebApplicationContextVariableResolver.java:87) at Hmm ... interesting that Spring is involved here too. Are you using the Spring integration to create managed beans from the Spring bean factory? I've tested Spring integration and Tiger-based managed beans separately, but never tried them together. org.apache.shale.view.faces.ViewViewHandler.setupViewController( ViewViewHandler.java:285) at org.apache.shale.view.faces.ViewViewHandler.createView( ViewViewHandler.java:130) at org.apache.shale.tiles.TilesViewHandler.createView(TilesViewHandler.java :184) at org.apache.myfaces.application.NavigationHandlerImpl.handleNavigation( NavigationHandlerImpl.java:145) at org.apache.shale.dialog.faces.DialogNavigationHandler.handleNavigation( DialogNavigationHandler.java:196) at org.apache.myfaces.application.ActionListenerImpl.processAction( ActionListenerImpl.java:84) at javax.faces.component.UICommand.broadcast(UICommand.java:106) at javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:90) at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:164) at org.apache.myfaces.lifecycle.LifecycleImpl.invokeApplication( LifecycleImpl.java:316) at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:86) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:106) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter( ApplicationFilterChain.java:252) at org.apache.catalina.core.ApplicationFilterChain.doFilter( ApplicationFilterChain.java:173) at org.apache.shale.faces.ShaleApplicationFilter.doFilter( ShaleApplicationFilter.java:275) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter( ApplicationFilterChain.java:202) at org.apache.catalina.core.ApplicationFilterChain.doFilter( ApplicationFilterChain.java:173) at org.apache.catalina.core.StandardWrapperValve.invoke( StandardWrapperValve.java:213) at org.apache.catalina.core.StandardContextValve.invoke( StandardContextValve.java:178) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java :126) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java :105) at org.apache.catalina.core.StandardEngineValve.invoke( StandardEngineValve.java:107) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java :148) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection (Http11BaseProtocol.java:664) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket( PoolTcpEndpoint.java:527) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt( LeaderFollowerWorkerThread.java:80) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run( ThreadPool.java:684) at java.lang.Thread.run(Thread.java:595) Succes.jsp !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.0 Transitional//EN HTML HEADTITLERejected!/TITLE /HEAD BODY CENTER TABLE BORDER=5 TRTH CLASS=TITLESuccess!/TH/TR /TABLE H2You have been successfully registered./H2 /CENTER /BODY/HTML I notice that this page doesn't actually have any JSF components in it. Could you try an experiment and add f:view/ (and the appropriate taglib directive) to make this into a JSF page? Craig - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [shale] Backing view
On 6/14/06, Marty Phee [EMAIL PROTECTED] wrote: Removed spring and it works. Thanks for the pointer. So, if I use spring you must have managed beans for all JSP's? Not sure if Im actually going to use spring. It appears that this is the effective state of the current implementation. But I consider that a bug -- it should be possible to use this combination of stuff together, without any requirement that a view controller exist for each page. It would help us make sure this gets attention if you could file a bug report documenting your experiences with this, and then note the workaround (removing Spring) that made it work for you in the short term. http://issues.apache.org/struts/ Craig Wendy Smoak wrote: On 6/14/06, Marty Phee [EMAIL PROTECTED] wrote: Here you go. Again this is Shale with Tiger. 13:27:47,796 ERROR [faces]:253 - Servlet.service() for servlet faces threw exception java.lang.IllegalStateException: No WebApplicationContext found: no ContextLoaderListener registered? ... org.apache.shale.spring.WebApplicationContextVariableResolver.resolveVariable (WebApplicationContextVariableResolver.java:87) This looks similar to the problems a couple of other people have had when they are not using Spring, but still include shale-spring.jar in WEB-INF/lib. This might help: http://www.nabble.com/Re%3A-Shale-Clay%3A-Are-managed-beans-mandatory-in-xml-view--p1873169.html If you're not using Spring and Tiles, try removing the shale-spring and shale-tiles jars from your application. (Assuming they're in WEB-INF/lib now, but it looks like they are from the stack trace.) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [shale] Backing view
Done: http://issues.apache.org/struts/browse/SHALE-192 Craig McClanahan wrote: On 6/14/06, Marty Phee [EMAIL PROTECTED] wrote: Removed spring and it works. Thanks for the pointer. So, if I use spring you must have managed beans for all JSP's? Not sure if Im actually going to use spring. It appears that this is the effective state of the current implementation. But I consider that a bug -- it should be possible to use this combination of stuff together, without any requirement that a view controller exist for each page. It would help us make sure this gets attention if you could file a bug report documenting your experiences with this, and then note the workaround (removing Spring) that made it work for you in the short term. http://issues.apache.org/struts/ Craig - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
how many active sessions are in the system
Is there anyway in J2EE to get how many active sessions are in the system? Thanks in advance. __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
RE: [newb question] Turning on DEBUG level logging
I'm not sure about using 'DEBUG' as the name of an appender. Why not try something like 'logfile'? I'm not very familiar with configuring Log4j using XML. A simple .properties file has always done everything I need. -Original Message- From: Darren Hall [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 14, 2006 2:24 PM To: 'Struts Users Mailing List' Subject: RE: [newb question] Turning on DEBUG level logging I tried that. There is no output from log4j to the daily catalina.log files. However, taking another path, I created a new (and much simpler) log4j.xml file. Using this new file, I now see the following log file created 'C:\Program Files\Apache Group\Tomcat 5.5\logs\uwaf-debug.log'. So... progress! However, the log file contains nothing. None of my info or debug statements were printed to the file. It's blank. What did I do wrong now? Any ideas?? Thanks, Darren (log4j.xml) ?xml version=1.0 encoding=UTF-8 ? !DOCTYPE log4j:configuration SYSTEM log4j.dtd log4j:configuration xmlns:log4j=http://jakarta.apache.org/log4j/; appender name=DEBUG class=org.apache.log4j.FileAppender param name=File value=logs/uwaf-debug.log / param name=Threshold value=DEBUG / layout class=org.apache.log4j.PatternLayout param name=ConversionPattern value=%d{ISO8601} %-5p %c - %m%n/ /layout /appender logger name=com.uwaf level value=debug/ appender-ref ref=DEBUG/ /logger /log4j:configuration -Original Message- From: Dave Newton [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 14, 2006 11:19 AM To: Struts Users Mailing List Subject: Re: [newb question] Turning on DEBUG level logging Darren Hall wrote: I'm not starting it from the command line any longer. Therefore, I can't see any console output from Tomcat. Try using a ConsoleAppender and tail -f the log file in the tomcat log directory. Dave - 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 many active sessions are in the system
Hey Carl- if you contextObject.getManager().getActiveSessions() you should be able to get the count of Active Sessions.. Anyone else Martin-- * This email message and any files transmitted with it contain confidential information intended only for the person(s) to whom this email message is addressed. If you have received this email message in error, please notify the sender immediately by telephone or email and destroy the original message without making a copy. Thank you. - Original Message - From: Carl Smith [EMAIL PROTECTED] To: Struts Users Mailing List user@struts.apache.org Sent: Wednesday, June 14, 2006 4:35 PM Subject: how many active sessions are in the system Is there anyway in J2EE to get how many active sessions are in the system? Thanks in advance. __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
changing scope of custom JSTL class variables
I'm maintaining and upgrading an existing Struts application (written by someone else long ago, with no chance of contacting the authors). I just discovered that our custom tag class variables have global scope - when a tag class (derived from javax.servlet.jsp.tagext.TagSupport) is used, an instance of that class is created - but then reused, rather than having a new instance created every time the tag is used in a JSP page. This puzzles and troubles me - it means that getters and setters are dealing with global values, rather than session values, and could lead to real trouble when we have enough users that 2 or more are using pages with the same tags at the same time. Is there some configuration issue I'm missing? I know that you can declare variable scope for form beans - is there a way to do this with custom tag classes? Thanks! Calvin Dodge Prosocial Applications, Inc. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: changing scope of custom JSTL class variables
On 6/14/06, Calvin G. Dodge [EMAIL PROTECTED] wrote: I'm maintaining and upgrading an existing Struts application (written by someone else long ago, with no chance of contacting the authors). I just discovered that our custom tag class variables have global scope - when a tag class (derived from javax.servlet.jsp.tagext.TagSupport) is used, an instance of that class is created - but then reused, rather than having a new instance created every time the tag is used in a JSP page. This puzzles and troubles me - it means that getters and setters are dealing with global values, rather than session values, and could lead to real trouble when we have enough users that 2 or more are using pages with the same tags at the same time. Is there some configuration issue I'm missing? I know that you can declare variable scope for form beans - is there a way to do this with custom tag classes? The lifecycle of custom tag instances (Struts or JSTL or otherwise) is driven by the JSP Specification, and is version dependent. For JSP 2.0, the container is allowed to reuse tag instances ... but it will have called release() on the old usage first. For JSP = 2.0, tag instances are created for each use. Thanks! Calvin Dodge Prosocial Applications, Inc. Craig
Re: [newb question] Turning on DEBUG level logging
George/Darren public class SomeAction extends Action { ActionForward execute(.. { //get a category static Category cat = Category.getInstance(StrutsServletClass.class.getName()); // From here on, log away! Methods are: cat.debug(your_message_string), // cat.info(...), cat.warn(...), cat.error(...), cat.fatal(...) cat.debug(You are inside execute method!!); } //end init then look at the uwaf-debug.log HTH Martin-- * This email message and any files transmitted with it contain confidential information intended only for the person(s) to whom this email message is addressed. If you have received this email message in error, please notify the sender immediately by telephone or email and destroy the original message without making a copy. Thank you. - Original Message - From: [EMAIL PROTECTED] To: user@struts.apache.org Sent: Wednesday, June 14, 2006 5:12 PM Subject: RE: [newb question] Turning on DEBUG level logging I'm not sure about using 'DEBUG' as the name of an appender. Why not try something like 'logfile'? I'm not very familiar with configuring Log4j using XML. A simple .properties file has always done everything I need. -Original Message- From: Darren Hall [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 14, 2006 2:24 PM To: 'Struts Users Mailing List' Subject: RE: [newb question] Turning on DEBUG level logging I tried that. There is no output from log4j to the daily catalina.log files. However, taking another path, I created a new (and much simpler) log4j.xml file. Using this new file, I now see the following log file created 'C:\Program Files\Apache Group\Tomcat 5.5\logs\uwaf-debug.log'. So... progress! However, the log file contains nothing. None of my info or debug statements were printed to the file. It's blank. What did I do wrong now? Any ideas?? Thanks, Darren (log4j.xml) ?xml version=1.0 encoding=UTF-8 ? !DOCTYPE log4j:configuration SYSTEM log4j.dtd log4j:configuration xmlns:log4j=http://jakarta.apache.org/log4j/; appender name=DEBUG class=org.apache.log4j.FileAppender param name=File value=logs/uwaf-debug.log / param name=Threshold value=DEBUG / layout class=org.apache.log4j.PatternLayout param name=ConversionPattern value=%d{ISO8601} %-5p %c - %m%n/ /layout /appender logger name=com.uwaf level value=debug/ appender-ref ref=DEBUG/ /logger /log4j:configuration -Original Message- From: Dave Newton [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 14, 2006 11:19 AM To: Struts Users Mailing List Subject: Re: [newb question] Turning on DEBUG level logging Darren Hall wrote: I'm not starting it from the command line any longer. Therefore, I can't see any console output from Tomcat. Try using a ConsoleAppender and tail -f the log file in the tomcat log directory. Dave - 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]
pls help
hi, pls help me solve the following. 1)paging using struts 2) need to open a popup window within another pop up window. regards ceena Send instant messages to your online friends http://in.messenger.yahoo.com Stay connected with your friends even when away from PC. Link: http://in.mobile.yahoo.com/new/messenger/
Re: pls help
Hello Ceena, These requirements are not Struts specific. 1. paging using struts Ans: I believe that you are trying to develop pagination in your screens. This totally depends on your business requirement. 2) need to open a popup window within another pop up window. Ans: This is Javascript logic. Kindly state us the problem for which we can suggest solution. If you give very high level one word requirements, no one would be able to give suggestions / advice. Thanks and regards, Pazhanikanthan. P (Paz) Consultant for AXA, HCL Australia Services Pty. Ltd. Off : +61-3-9618-4085 Mob : +61-0411-354-838 Ceena Bose [EMAIL PROTECTED] 15/06/2006 09:52 AM Please respond to Struts Users Mailing List To: user@struts.apache.org cc: Subject:pls help hi, pls help me solve the following. 1)paging using struts 2) need to open a popup window within another pop up window. regards ceena Send instant messages to your online friends http://in.messenger.yahoo.com Stay connected with your friends even when away from PC. Link: http://in.mobile.yahoo.com/new/messenger/ _ This e-mail has been scanned for viruses by MCI's Internet Managed Scanning Services - powered by MessageLabs. For further information visit http://www.mci.com * Important Note This email (including any attachments) contains information which is confidential and may be subject to legal privilege. If you are not the intended recipient you must not use, distribute or copy this email. If you have received this email in error please notify the sender immediately and delete this email. Any views expressed in this email are not necessarily the views of AXA. Thank you. **
Re: Display of the processing message when the page is submitted
You could probably include some Javascript in an onSubmit event to open a new window as your dialogbox, and a corresponding piece of Javascript in the resulting page to close the dialogbox window. I generally try to avoid Javascript, so I'm not aware of any such functionality being provided by struts. -- Stephen Souness Shasirekha Engala wrote: hi there is a small requirement - when the form is submitted at the time of processing a dialogbox should be shown with the processing message and the dialogbox should be closed when the processing of the request is completed. Can this be possible. Thanks Regards - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]