How to format the decimal
Dear All, I want to keep all the numeric in my system with 2 decimal places only. What is the best way to do it? I try to get a DecimalFormat instance in the page (as a getter method of the action class), but it looks like stupid. I think I should miss some places in the document but I can't find related information by myself. Please help, any suggestions are welcome. Regards, Zheng Shuai
Re: Extending DynaValidatorForm
On 6/8/07, David Durham, Jr. <[EMAIL PROTECTED]> wrote: On 6/8/07, Ambaris Mohanty <[EMAIL PROTECTED]> wrote: > Please someone send me the sample code for extending DynaValidatorForm and > implementing the reset method. I have no idea on how to do it. Please help. > I'm using struts 1.2.9. > Thank you, HTML has the concept of a reset button: http://www.w3.org/TR/html401/interact/forms.html#reset-button ... Hmm, guess you were asking about extending DynaValidatorForm. I must have been thinking of some other question that was similar to this one. Anyway, a DynaValidatorForm is a DynaBean, so you can call set("propertyName", "reset Value") from your reset override method. These API versions aren't exact, but I don't think these classes have changed much: http://struts.apache.org/1.3.8/apidocs/org/apache/struts/validator/DynaValidatorForm.html http://jakarta.apache.org/commons/beanutils/commons-beanutils-1.6.1/docs/api/org/apache/commons/beanutils/DynaBean.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[S2] Possible Bug in FileUploadInterceptor
There appears to me to be an annoying bug or what I believe to be a bug in the FileUploadInterceptor. On line 311, if the file does not pass the file validation the error message is retrieved as such: String errMsg = getTextMessage("struts.messages.error.file.too.large", new Object[]{inputName, file.getName(), "" + file.length()}, locale); The issue that I have with this is that file.length has been converted to a String. This now makes it impossible to format it as a number in your message. struts.messages.error.file.too.large=You attempted to upload a {2,number} byte file. A rather insignificant issue, but one that would be nice to see fixed in the future. Thanks! - ***Note:The information contained in this message may be privileged and confidential and protected from disclosure. If the reader of this message is not the intended recipient, or an 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 the Sender immediately by replying to the message and deleting it from your computer. Thank you. Premier Inc.
Alternate way to get to value in an iteration
Hello! Normally with struts2, I would iterate through a list like: But now I need to be able to use the headline and summary values in another tag. The following doesn't work, but I need to get to something like it: The problem is that I need to pass the headline and summary values through to another tag (specifically, as part of a jMaki argument list). Any ideas on how to do this? Thanks! -Michael -- http://mbowman.net - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Elements in collection = null in Struts 2 view
I will answer myself!!! The problem was that I was using a wrong ognl expression to access the iterator element. The correct expression would be "#tel", not "tel". Nicolás Pace On 6/7/07, Nicolás Pace <[EMAIL PROTECTED]> wrote: Hi everyone! Description: The problem is that when i debug this webapp, inside the servlet i can see the elements inside de modelo.Telefonos collection, but the jsp can't. In the jsp, the collection only have null's, but the correct number of them. (if the collection has 3 elements, there are 3 nulls inside it) :S The database also contains those elements. Thanks in advance Nicolás Pace Struts version: 2.0.6 Hibernate version: 3.1.3 or 3.2 Mapping documents: -Modelo.hbm.xml--- http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd";> --- ---Telefono.hbm.xml http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd";> Code between sessionFactory.openSession() and session.close(): Using OpenSessionInView pattern with ServletFilter suggested here ModeloAction.java public class ModeloAction extends ActionSupport { private Modelo modelo; ... execute() { modelo = (Modelo) s.get(Modelo.class, id); modelo.getTelefonos().size(); modelo.getDomicilios().size(); modelo.getCaracteristicas().size(); modelo.getGrupoFamiliar().size(); modelo.getHabilidades().size(); modelo.getHorariosDisponibles().size(); modelo.getObservaciones().size(); modelo.getRestricciones().size(); } } Modelo.jsp: ... ... Full stack trace of any exception that occurs: Name and version of the database you are using:mysql The generated SQL (show_sql=true): Hibernate: select modelo0_.id as id16_1_, modelo0_.apellido as apellido16_1_, modelo0_.nombre as nombre16_1_, modelo0_.fechaNacimiento as fechaNac4_16_1_, modelo0_.foto as foto16_1_, modelo0_.turno as turno16_1_, modelo0_.escuela as escuela16_1_, telefonos1_.model_id as model1_3_, telefono2_.id as telefono2_3_, telefono2_.id as id9_0_, telefono2_.numero as numero9_0_ from Modelo modelo0_ left outer join modelo_telefono telefonos1_ on modelo0_.id=telefonos1_.model_id left outer join Telefono telefono2_ on telefonos1_.telefono_id=telefono2_.id where modelo0_.id=? Hibernate: select domicilios0_.model_id as model1_1_, domicilios0_.dom_id as dom2_1_, domicilio1_.dom_id as dom1_3_0_, domicilio1_.calle as calle3_0_, domicilio1_.numero as numero3_0_, domicilio1_.departamento as departam4_3_0_, domicilio1_.ciudad as ciudad3_0_ from modelo_domicilio domicilios0_ left outer join Domicilio domicilio1_ on domicilios0_.dom_id=domicilio1_.dom_id where domicilios0_.model_id=? Hibernate: select caracteris0_.model_id as model1_1_, caracteris0_.carac_id as carac2_1_, caracteris1_.carac_id as carac1_4_0_, caracteris1_.nombre as nombre4_0_ from modelo_caracteristica caracteris0_ left outer join CaracteristicaFisica caracteris1_ on caracteris0_.carac_id=caracteris1_.carac_id where caracteris0_.model_id=? Hibernate: select grupofamil0_.grupoFamiliar_id as grupoFam1_1_, grupofamil0_.model_id as model2_1_, modelo1_.id as id16_0_, modelo1_.apellido as apellido16_0_, modelo1_.nombre as nombre16_0_, modelo1_.fechaNacimiento as fechaNac4_16_0_, modelo1_.foto as foto16_0_, modelo1_.turno as turno16_0_, modelo1_.escuela as escuela16_0_ from modelo_grupoFamiliar grupofamil0_ left outer join Modelo modelo1_ on grupofamil0_.model_id=modelo1_.id where grupofamil0_.grupoFamiliar_id=? Hibernate: select habilidade0_.model_id as model1_1_, habilidade0_.habilidad_id as habilidad2_1_, habilidad1_.id as id7_0_, habilidad1_.nombre as nombre7_0_ from modelo_habilidad habilidade0_ left outer join Habilidad habilidad1_ on habilidade0_.habilidad_id=habilidad1_.id where habilidade0_.model_id=? Hibernate: select horariosdi0_.model_id as model1_1_, horariosdi0_.franja_id as franja2_1_, franjahora1_.id as id6_0_, franjahora1_.dia as dia6_0_, franjahora1_.horaInicio as horaInicio6_0_, franjahora1_.horaFin as horaFin6_0_ from modelo_horarioDisponible horariosdi0_ left outer join FranjaHoraria franjahora1_ on horariosdi0_.franja_id=franjahora1_.id where horariosdi0_.model_id=? Hibernate: select observacio0_.model_id as model1_1_, observacio0_.observacion_id as observac2_1_, observacio1_.id as id8_0_, observacio1_.nombre as nombre8_0_ from modelo_observacion observacio0_ left outer join Observacion observacio1_ on observacio0_.observacion_id=observacio1_.id where observacio0_.model_id=? Hibernate: select restriccio0_.model_id as model1_1_, restriccio0_.restricciones_id as restricc2_1_, restriccio1_.id as id5_0_, restriccio1_.nombre as nombre5_0_ from modelo_restriccion restriccio0_ left outer join Restriccion restriccio1_ on restriccio0_.restricciones_id=restriccio1_.id where restriccio0_.model_id=? ---
[S2] Accessing Parameters In the Properties File
I really like how I can access the field name and use it in forming the error message for validations. Such as: err.msg.requiredstring =$\{getText('label.' + fieldName)} is required. Where the validation framework passes a variable called "fieldName". I would like to use this same appraoch for other messages that generated using parameters that were passed in. I am betting there is a way to do this, I just do not know how to reference them. For example, I would like to do something like: myProperty=$\{getText('label.' + {0})} is required. Does anyone know how this would be accomplished or how to reference the values that are passed in? Thanks in Advance! - ***Note:The information contained in this message may be privileged and confidential and protected from disclosure. If the reader of this message is not the intended recipient, or an 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 the Sender immediately by replying to the message and deleting it from your computer. Thank you. Premier Inc.
[S2] The question now is about
I had some problems with and the people of this list was very kind to clear it out. Now I am struggling to make work the way it should, but I am not having success. This is the code: autoridade.sexo is of type String. Struts version is 2.0.6 I tried replacing %{autoridade.sexo} with F or M to see it working, but it didn´t. Then I found this thread: http://forums.opensymphony.com/thread.jspa?messageID=29105熱 and changed to %{'F'} or %{'M'} and it did work ok. But how can I make it work with the data that autoridade.sexo holds? Thank you all, -- Rafael Dittberner - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [S2] issues
Yes. Looking at the data I´ve found out that in the case of Cargo the highest codObjeto is 100, while in the case of Orgao codObjeto goes beyond 1500. I think I´m going to use your solution as well. But is this the correct behaviour or is it a bug? Thank you Marco. Rafael Dittberner Marco Carnevale escreveu: I encountered a similar issue before as well. I ended up always using the toString method. (Don't forget to check for null) What I found was that when the Integers we small (5, 50, 100, ect...) the select box would match it correctly. However when the id was a larger Integer such as 1 the select would not match it correctly without the toString. Is this the case with your data in the example that you gave? Marco On 6/8/07, Rafael Dittberner <[EMAIL PROTECTED]> wrote: They are both Integer. Rafael Dittberner Vincent Lin escreveu: > What is the data type of autoridade.orgao.codObjeto and > autoridade.cargo.codObjeto? > > On 6/7/07, Rafael Dittberner <[EMAIL PROTECTED]> wrote: >> >> This is my code: >> >> > listKey="codObjeto" listValue="nome" label="Orgão" >> value="%{autoridade.orgao.codObjeto.toString()}" /> >> >> > listKey="codObjeto" listValue="nome" label="Cargo" >> value="%{autoridade.cargo.codObjeto}" /> >> >> Someone please explain to me why in the first one i had to use >> toString() to make it work, but the second one works perfectly as is? >> >> -- >> Rafael Dittberner >> Brasília (DF) - Brasil >> >> - >> 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: autocompleter y multipart/form-data
You will have to take a look at Dojo's documentation. That form is submitted using dojo.io.bind, and I don't think it supports multiparts musachy On 6/8/07, Nicolás Pace <[EMAIL PROTECTED]> wrote: Hello When I setup my form with encoding=multiaprt/form-data, the autocompleter tag stops working. When i trace the problem, it seems that no parameters are sent. Any suggestion? Thanks Nickoar - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- "Hey you! Would you help me to carry the stone?" Pink Floyd
Re: [S2] issues
I encountered a similar issue before as well. I ended up always using the toString method. (Don't forget to check for null) What I found was that when the Integers we small (5, 50, 100, ect...) the select box would match it correctly. However when the id was a larger Integer such as 1 the select would not match it correctly without the toString. Is this the case with your data in the example that you gave? Marco On 6/8/07, Rafael Dittberner <[EMAIL PROTECTED]> wrote: They are both Integer. Rafael Dittberner Vincent Lin escreveu: > What is the data type of autoridade.orgao.codObjeto and > autoridade.cargo.codObjeto? > > On 6/7/07, Rafael Dittberner <[EMAIL PROTECTED]> wrote: >> >> This is my code: >> >> > listKey="codObjeto" listValue="nome" label="Orgão" >> value="%{autoridade.orgao.codObjeto.toString()}" /> >> >> > listKey="codObjeto" listValue="nome" label="Cargo" >> value="%{autoridade.cargo.codObjeto}" /> >> >> Someone please explain to me why in the first one i had to use >> toString() to make it work, but the second one works perfectly as is? >> >> -- >> Rafael Dittberner >> Brasília (DF) - Brasil >> >> - >> 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: [S2] issues
They are both Integer. Rafael Dittberner Vincent Lin escreveu: What is the data type of autoridade.orgao.codObjeto and autoridade.cargo.codObjeto? On 6/7/07, Rafael Dittberner <[EMAIL PROTECTED]> wrote: This is my code: Someone please explain to me why in the first one i had to use toString() to make it work, but the second one works perfectly as is? -- Rafael Dittberner Brasília (DF) - Brasil - 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: Extending DynaValidatorForm
On 6/8/07, Ambaris Mohanty <[EMAIL PROTECTED]> wrote: Please someone send me the sample code for extending DynaValidatorForm and implementing the reset method. I have no idea on how to do it. Please help. I'm using struts 1.2.9. Thank you, HTML has the concept of a reset button: http://www.w3.org/TR/html401/interact/forms.html#reset-button As stated in the link above, when a user activates a reset control, the form values are set to their *inital values*. This may not be the reset behavior that you're looking for. One way to implement a reset button that "clears" form element values is with JavaScript. You might do something like: Reset function resetForm() { // acquire form reference, e.g. var myForm = document.forms['myForm']; // loop through elements for(var i = 0; i < myForm.elements.length; i++) { // check element type and implement reset // your code goes here } } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: FormFile: Catching IllegalArgumentException
Vincent Lin wrote: Do you have this setting in your form? enctype="multipart/form-data" As mentioned, submissions via the form in the web page work fine. The issue is that if someone bypasses the form and POSTs an (invalid) non-multipart request that puts some random string in the parameter that the application expects to contain a file, this triggers an internal server error. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
autocompleter y multipart/form-data
Hello When I setup my form with encoding=multiaprt/form-data, the autocompleter tag stops working. When i trace the problem, it seems that no parameters are sent. Any suggestion? Thanks Nickoar - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: FormFile: Catching IllegalArgumentException
Do you have this setting in your form? enctype="multipart/form-data" On 6/8/07, Eric Jain <[EMAIL PROTECTED]> wrote: I have a form with a FormFile field, which works great, except that when someone submits a plain string for this field (e.g. a spammer crawling the site and doing random submissions) I get an ugly stack trace logged... I wonder is there a way to catch this? 2007-06-08 16:04 org.apache.commons.beanutils.PropertyUtils ERROR: Method invocation failed. java.lang.IllegalArgumentException: argument type mismatch at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.apache.commons.beanutils.PropertyUtilsBean.invokeMethod( PropertyUtilsBean.java:1773) at org.apache.commons.beanutils.PropertyUtilsBean.setSimpleProperty( PropertyUtilsBean.java:1759) at org.apache.commons.beanutils.PropertyUtilsBean.setNestedProperty( PropertyUtilsBean.java:1648) at org.apache.commons.beanutils.PropertyUtilsBean.setProperty( PropertyUtilsBean.java:1677) at org.apache.commons.beanutils.BeanUtilsBean.setProperty(BeanUtilsBean.java :1022) at org.apache.commons.beanutils.BeanUtilsBean.populate( BeanUtilsBean.java:811) at org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java :298) at org.apache.struts.util.RequestUtils.populate(RequestUtils.java :451) at org.apache.struts.chain.commands.servlet.PopulateActionForm.populate( PopulateActionForm.java:45) at org.apache.struts.chain.commands.AbstractPopulateActionForm.execute( AbstractPopulateActionForm.java:57) at org.apache.struts.chain.commands.ActionCommandBase.execute( ActionCommandBase.java:48) at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java :190) at org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java :304) at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java :190) at org.apache.struts.chain.ComposableRequestProcessor.process( ComposableRequestProcessor.java:280) at org.apache.struts.action.ActionServlet.process( ActionServlet.java:1858) at org.apache.struts.action.ActionServlet.doPost( ActionServlet.java:459) at javax.servlet.http.HttpServlet.service(HttpServlet.java:709) ... - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
FormFile: Catching IllegalArgumentException
I have a form with a FormFile field, which works great, except that when someone submits a plain string for this field (e.g. a spammer crawling the site and doing random submissions) I get an ugly stack trace logged... I wonder is there a way to catch this? 2007-06-08 16:04 org.apache.commons.beanutils.PropertyUtils ERROR: Method invocation failed. java.lang.IllegalArgumentException: argument type mismatch at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.apache.commons.beanutils.PropertyUtilsBean.invokeMethod(PropertyUtilsBean.java:1773) at org.apache.commons.beanutils.PropertyUtilsBean.setSimpleProperty(PropertyUtilsBean.java:1759) at org.apache.commons.beanutils.PropertyUtilsBean.setNestedProperty(PropertyUtilsBean.java:1648) at org.apache.commons.beanutils.PropertyUtilsBean.setProperty(PropertyUtilsBean.java:1677) at org.apache.commons.beanutils.BeanUtilsBean.setProperty(BeanUtilsBean.java:1022) at org.apache.commons.beanutils.BeanUtilsBean.populate(BeanUtilsBean.java:811) at org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:298) at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:451) at org.apache.struts.chain.commands.servlet.PopulateActionForm.populate(PopulateActionForm.java:45) at org.apache.struts.chain.commands.AbstractPopulateActionForm.execute(AbstractPopulateActionForm.java:57) at org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:48) at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190) at org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:304) at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190) at org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:280) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1858) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:459) at javax.servlet.http.HttpServlet.service(HttpServlet.java:709) ... - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: I am Unable To access servlet.getServletContext().getAttribte("") in sessionDestroy() method
What type is the variable servlet?extend HttpServlet? >Hashtable userList = >(Hashtable)servlet.getServletContext().getAttribute("userList"); in this code,two possible can throw the java.lang.NullPointerException, 1,the variable servlet is null; 2,the returned type is null by method getServletContext is invoked.if true,you should overwrite the method. - QianFei Xu -> Subject: I am Unable To access servlet.getServletContext().getAttribte("") in sessionDestroy() method> Date: Fri, 8 Jun 2007 15:45:45 +0530> From: [EMAIL PROTECTED]> To: user@struts.apache.org> > > > > Hi Community,> > > > In my login action when ever a user logs in I am putting his> user id in hash table like this> > > > Hashtable findUser = new Hashtable();> > userList.put("username",username); > > servlet.getServletContext().setAttribute("userList",userList);> > > > > > now I want to remove this user when his session expires in> sessionDestroyed() method of HttpSessionListener> > > > HttpSession session = sessionEvent.getSession();> > String user = (String) session.getAttribute("username");> > > > Hashtable userList = (Hashtable)> servlet.getServletContext().getAttribute("userList");> > userList.remove(user)> > > > > > but I am getting NullPointerException in the following line> > > > Hashtable userList = (Hashtable)> servlet.getServletContext().getAttribute("userList");> > > > > > Please help me out> > > > Regards,> > Sreenivasula Reddy A> > > > > > > > DISCLAIMER:> ---> > The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only.> It shall not attach any liability on the originator or HCL or its affiliates. Any views or opinions presented in > this email are solely those of the author and may not necessarily reflect the opinions of HCL or its affiliates.> Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of > this message without the prior written consent of the author of this e-mail is strictly prohibited. If you have > received this email in error please delete it and notify the sender immediately. Before opening any mail and > attachments please check them for viruses and defect.> > --- _ Play free games, earn tickets, get cool prizes! Join Live Search Club. http://club.live.com/home.aspx?icid=CLUB_wlmailtextlink
How to obtain ObjectFactory for custom requirement
Hi, I want object factory in my server startup process but ObjectFactory.getObjectFactory() returns null. Actually I need this in one of the my server startup thread. Please advice. -- View this message in context: http://www.nabble.com/How-to-obtain-ObjectFactory-for-custom-requirement-tf3889320.html#a11025089 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[OT AGAIN] Re: I am Unable To access servlet.getServletContext().getAttribte("") in sessionDestroy() method
2007/6/8, Srinivasula Reddy A , Bangalore <[EMAIL PROTECTED]>: Hashtable userList = (Hashtable) servlet.getServletContext().getAttribute("userList"); Probably "servlet" is null... Antonio - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
I am Unable To access servlet.getServletContext().getAttribte("") in sessionDestroy() method
Hi Community, In my login action when ever a user logs in I am putting his user id in hash table like this Hashtable findUser = new Hashtable(); userList.put("username",username); servlet.getServletContext().setAttribute("userList",userList); now I want to remove this user when his session expires in sessionDestroyed() method of HttpSessionListener HttpSession session = sessionEvent.getSession(); String user = (String) session.getAttribute("username"); Hashtable userList = (Hashtable) servlet.getServletContext().getAttribute("userList"); userList.remove(user) but I am getting NullPointerException in the following line Hashtable userList = (Hashtable) servlet.getServletContext().getAttribute("userList"); Please help me out Regards, Sreenivasula Reddy A DISCLAIMER: --- The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only. It shall not attach any liability on the originator or HCL or its affiliates. Any views or opinions presented in this email are solely those of the author and may not necessarily reflect the opinions of HCL or its affiliates. Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of this message without the prior written consent of the author of this e-mail is strictly prohibited. If you have received this email in error please delete it and notify the sender immediately. Before opening any mail and attachments please check them for viruses and defect. ---
Re: Cannot access request variable in stack context from jsp
That's right!!! Thanks Aram Aram Mkhitaryan wrote: > > Hi, > > Try > > Best, > Aram > > Aram Mkhitaryan > > 52, 25 Lvovyan, Yerevan 375000, Armenia > > Mobile: +374 91 518456 > E-mail: [EMAIL PROTECTED] > > -- View this message in context: http://www.nabble.com/Cannot-access-request-variable-in-stack-context-from-jsp-tf3888285.html#a11023805 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Extending DynaValidatorForm
Please someone send me the sample code for extending DynaValidatorForm and implementing the reset method. I have no idea on how to do it. Please help. I'm using struts 1.2.9. Thank you, AM -Original Message- From: Ambaris Mohanty [mailto:[EMAIL PROTECTED] Sent: Friday, June 08, 2007 2:25 PM To: 'Struts Users Mailing List' Subject: Extending DynaValidatorForm Can anyone send me sample code for extending DynaValidatorForm and implementing reset() method that will clear the text fields on reset. Thank you, AM - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How Can I Upgrade My Dev Environment
The only real change you need is to use the v2.4 DTD in web.xml. There are some structural changes from DTD for 2.3, so make those, and you're in business. You might also consider if you are using JSTL 1.0 the upgrade to 1.1 (also a different taglib uri). You might upgrade Struts at the same time. Take all the pain at once, but implement one change at a time and get each change working before continuing. If the app isn't too big and/or too messy, and things don't go totally haywire, should not be a difficult an upgrade. - Ray Clough Srinivasula Reddy A , Bangalore wrote: > > > Hi Struts Community, > > > > Currently we are using struts 1.2, jdk1.4, JBoss 4, eclipse > 3.1 as our development environment. Now we need some listeners for our > application. > > > > How I can upgrade my development environment to support listeners (which > are in servlet specification 2.4) > > > > Already 10% of our development is over. So based on this suggest me good > choice > > > > > > Regards, > > Sreenivasula Reddy A > > > > DISCLAIMER: > --- > > The contents of this e-mail and any attachment(s) are confidential and > intended for the named recipient(s) only. > It shall not attach any liability on the originator or HCL or its > affiliates. Any views or opinions presented in > this email are solely those of the author and may not necessarily reflect > the opinions of HCL or its affiliates. > Any form of reproduction, dissemination, copying, disclosure, > modification, distribution and / or publication of > this message without the prior written consent of the author of this > e-mail is strictly prohibited. If you have > received this email in error please delete it and notify the sender > immediately. Before opening any mail and > attachments please check them for viruses and defect. > > --- > -- View this message in context: http://www.nabble.com/How-Can-I-Upgrade-My-Dev-Environment-tf3887819.html#a11022915 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [OT] Re: How Can I Upgrade My Dev Environment
Guru I asked my hr currently we are having recruitment in embedded systems -Original Message- From: Srinivasula Reddy A , Bangalore [mailto:[EMAIL PROTECTED] Sent: Friday, June 08, 2007 2:15 PM To: Struts Users Mailing List Subject: RE: [OT] Re: How Can I Upgrade My Dev Environment Yaa I am able to deploy -Original Message- From: Raghupathy, Gurumoorthy [mailto:[EMAIL PROTECTED] Sent: Friday, June 08, 2007 1:44 PM To: Struts Users Mailing List Subject: RE: [OT] Re: How Can I Upgrade My Dev Environment You already have the environment to work on servlet 2.4 spec . have you tried to write the code and deploy it to jboss ? if you are not able to to then send us more details -Original Message- From: Antonio Petrelli [mailto:[EMAIL PROTECTED] Sent: 08 June 2007 08:40 To: Struts Users Mailing List Subject: [OT] Re: How Can I Upgrade My Dev Environment 2007/6/8, Srinivasula Reddy A , Bangalore <[EMAIL PROTECTED]>: > Currently we are using struts 1.2, jdk1.4, JBoss 4, eclipse > 3.1 as our development environment. Now we need some listeners for our > application. > How I can upgrade my development environment to support listeners (which > are in servlet specification 2.4) JBoss 4 supports Servlet 2.4 so what's the problem? - 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] DISCLAIMER: --- The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only. It shall not attach any liability on the originator or HCL or its affiliates. Any views or opinions presented in this email are solely those of the author and may not necessarily reflect the opinions of HCL or its affiliates. Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of this message without the prior written consent of the author of this e-mail is strictly prohibited. If you have received this email in error please delete it and notify the sender immediately. Before opening any mail and attachments please check them for viruses and defect. --- - 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]
Extending DynaValidatorForm
Can anyone send me sample code for extending DynaValidatorForm and implementing reset() method that will clear the text fields on reset. Thank you, AM
RE: [OT] Re: How Can I Upgrade My Dev Environment
Yaa I am able to deploy -Original Message- From: Raghupathy, Gurumoorthy [mailto:[EMAIL PROTECTED] Sent: Friday, June 08, 2007 1:44 PM To: Struts Users Mailing List Subject: RE: [OT] Re: How Can I Upgrade My Dev Environment You already have the environment to work on servlet 2.4 spec . have you tried to write the code and deploy it to jboss ? if you are not able to to then send us more details -Original Message- From: Antonio Petrelli [mailto:[EMAIL PROTECTED] Sent: 08 June 2007 08:40 To: Struts Users Mailing List Subject: [OT] Re: How Can I Upgrade My Dev Environment 2007/6/8, Srinivasula Reddy A , Bangalore <[EMAIL PROTECTED]>: > Currently we are using struts 1.2, jdk1.4, JBoss 4, eclipse > 3.1 as our development environment. Now we need some listeners for our > application. > How I can upgrade my development environment to support listeners (which > are in servlet specification 2.4) JBoss 4 supports Servlet 2.4 so what's the problem? - 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] DISCLAIMER: --- The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only. It shall not attach any liability on the originator or HCL or its affiliates. Any views or opinions presented in this email are solely those of the author and may not necessarily reflect the opinions of HCL or its affiliates. Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of this message without the prior written consent of the author of this e-mail is strictly prohibited. If you have received this email in error please delete it and notify the sender immediately. Before opening any mail and attachments please check them for viruses and defect. --- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [OT] Re: How Can I Upgrade My Dev Environment
You already have the environment to work on servlet 2.4 spec . have you tried to write the code and deploy it to jboss ? if you are not able to to then send us more details -Original Message- From: Antonio Petrelli [mailto:[EMAIL PROTECTED] Sent: 08 June 2007 08:40 To: Struts Users Mailing List Subject: [OT] Re: How Can I Upgrade My Dev Environment 2007/6/8, Srinivasula Reddy A , Bangalore <[EMAIL PROTECTED]>: > Currently we are using struts 1.2, jdk1.4, JBoss 4, eclipse > 3.1 as our development environment. Now we need some listeners for our > application. > How I can upgrade my development environment to support listeners (which > are in servlet specification 2.4) JBoss 4 supports Servlet 2.4 so what's the problem? - 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: Cannot access request variable in stack context from jsp
Hi, Try Best, Aram Aram Mkhitaryan 52, 25 Lvovyan, Yerevan 375000, Armenia Mobile: +374 91 518456 E-mail: [EMAIL PROTECTED]
Cannot access request variable in stack context from jsp
I'm trying to access a variable in stack context form jsp using the struts tag . The struts debug tag (in struts2) shows me that the key "request" has this array/map of values: {javax.servlet.include.servlet_path=/console/Menu.jsp, struts.request_uri=/console/View.action, struts.view_uri=/console/View.jsp, [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], javax.servlet.include.request_uri=/console/Menu2.jsp, javax.servlet.include.context_path=/} but if I try to write the value of struts.view_uri in the jsp using the tag nothing appears. I've also tried to use without results. Am i using in a wrong way the ognl syntax? Thanks. -- View this message in context: http://www.nabble.com/Cannot-access-request-variable-in-stack-context-from-jsp-tf3888285.html#a11022155 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Displaytag reading column titles from application resources file
OK, the solution with i18nResourceProvider in displaytag.properties works PERFECT for Struts 1 - but in Struts 2 I have a trouble - it doesn't work. Any suggestions? -- View this message in context: http://www.nabble.com/Displaytag-reading-column-titles-from-application-resources-file-tf431017.html#a11021977 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[OT] Re: How Can I Upgrade My Dev Environment
2007/6/8, Srinivasula Reddy A , Bangalore <[EMAIL PROTECTED]>: Currently we are using struts 1.2, jdk1.4, JBoss 4, eclipse 3.1 as our development environment. Now we need some listeners for our application. How I can upgrade my development environment to support listeners (which are in servlet specification 2.4) JBoss 4 supports Servlet 2.4 so what's the problem? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[S2] DataVision plugin beta1 released
Hi all... this is just a quick note to announce the first beta release of a new Struts2 plugin, the DataVision plugin. This plugin provides support for the popular open-source reporting package DataVision. It can be downloaded from here: http://code.google.com/p/struts2datavisionplugin You'll find, in addition to the plugin itself, an example webapp that demonstrates it in action. Included in the plugin JAR is documentation, and I suggest checking it out. The summary page (index.html) lays it all out pretty well (I hope!) Being a beta, I welcome feedback of course and thank anyone who tries it in advance. Take care, Frank -- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com AIM/Yahoo: fzammetti MSN: [EMAIL PROTECTED] Author of "Practical Ajax Projects With Java Technology" (2006, Apress, ISBN 1-59059-695-1) and "JavaScript, DOM Scripting and Ajax Projects" (2007, Apress, ISBN 1-59059-816-4) 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]