Re: java.lang.OutOfMemoryError: Java heap space
B.Sridhar ha scritto: But when I tried to download the image of 85mb, "out of memory" exception is thrown" and this is the complete trace of that exception... You haven't your 85MB file in your memory, right? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts2 Tiles Integration
Dean Crothers ha scritto: The Struts documentation I'm following doesnt mention a servlet - just the listener and TilesResult? ... SEVERE: Exception sending context initialized event to listener instance of class org.apache.struts2.tiles.StrutsTilesListener java.lang.RuntimeException: Source object must not be null You have to put in "web.xml" the "definitions-config" init parameter, that points to your Tiles definitions xml file or you can use the default name, under /WEB-INF/tiles.xml HTH Antonio - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
java.lang.OutOfMemoryError: Java heap space
Hi I am writing an application in struts for file downloading from the database. I am using struts 1.1 with tomcat5.0 server. File downloading is working fine for images of smaller sizes( i checked utpo 3mb of size). my application should download the files with a maximum 1gb size. But when I tried to download the image of 85mb, "out of memory" exception is thrown" and this is the complete trace of that exception... Oct 19, 2006 4:11:35 PM org.apache.struts.actions.DispatchActiondispatchMethod SEVERE: Dispatch[/pages/DoctorModule/medicalrecord/frame/referencedoc] to method getReportFormat returned an exception java.lang.reflect.InvocationTargetException 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.struts.actions.DispatchAction.dispatchMethod( DispatchAction.java:280) at org.apache.struts.actions.DispatchAction.execute(DispatchAction.java :216) at org.apache.struts.action.RequestProcessor.processActionPerform( RequestProcessor.java:480) at org.apache.struts.action.RequestProcessor.process( RequestProcessor.java:274) at org.apache.struts.action.ActionServlet.process(ActionServlet.java :1420) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:520) at javax.servlet.http.HttpServlet.service(HttpServlet.java:709) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter( ApplicationFilterChain.java:237) at org.apache.catalina.core.ApplicationFilterChain.doFilter( ApplicationFilterChain.java:157) at org.apache.catalina.core.StandardWrapperValve.invoke( StandardWrapperValve.java:214) at org.apache.catalina.core.StandardValveContext.invokeNext( StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke( StandardPipeline.java:520) at org.apache.catalina.core.StandardContextValve.invokeInternal( StandardContextValve.java:198) at org.apache.catalina.core.StandardContextValve.invoke( StandardContextValve.java:152) at org.apache.catalina.core.StandardValveContext.invokeNext( StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke( StandardPipeline.java:520) at org.apache.catalina.core.StandardHostValve.invoke( StandardHostValve.java:137) at org.apache.catalina.core.StandardValveContext.invokeNext( StandardValveContext.java:104) at org.apache.catalina.valves.ErrorReportValve.invoke( ErrorReportValve.java:118) at org.apache.catalina.core.StandardValveContext.invokeNext( StandardValveContext.java:102) at org.apache.catalina.core.StandardPipeline.invoke( StandardPipeline.java:520) at org.apache.catalina.core.StandardEngineValve.invoke( StandardEngineValve.java:109) at org.apache.catalina.core.StandardValveContext.invokeNext( StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke( StandardPipeline.java:520) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929) at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java :160) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java :799) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection (Http11Protocol.java:705) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java :577) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run( ThreadPool.java:683) at java.lang.Thread.run(Unknown Source) Caused by: java.lang.OutOfMemoryError: Java heap space Oct 19, 2006 4:11:35 PM org.apache.struts.action.RequestProcessorprocessException WARNING: Unhandled Exception thrown: class java.lang.IllegalStateException I checked using downloading action example from struts1.2.6, even thats giving the same out of memory exception. Any how my application uses only 1.1. so Please give me some solution for this exception.. -- B.Sridhar
Re: Drag-and-drop struts-aware IDE?
Hi, I agree with ur opinion. I feel that the asp taglibrary is very helpful in using many controls and components in .NET and this is available by default which they do not need to include seperately. Bruno Melloni <[EMAIL PROTECTED]> wrote: We are constantly getting pressure to consider .NET development because it is faster than our traditional J2EE/Struts work. After an in-depth comparison of the two, the main advantage of .NET in regard to "speed of development" seems to be that you can easily drag and drop a few controls, build and presto! You get a running application. I was wondering if there are any *good* IDEs or preferably Eclipse plug-ins that support this type of behavior for a recent version of Struts (1.2.9, 1.3.5, or 2.0.x). I know that IBM's RAD6 is supposed to do this, but apparently it is still hopelessly stuck at Struts 1.1. Any advice would be welcome. - Find out what India is talking about on - Yahoo! Answers India Send FREE SMS to your friend's mobile from Yahoo! Messenger Version 8. Get it NOW
RE: Change an action of a form with javascript
Yes, the typo is ok, document.forms[0] is the only one form. Sorry, but "docuemt" i write this instead of copy-paste. Thank you -Mensaje original- De: Dave Newton [mailto:[EMAIL PROTECTED] Enviado el: jueves, 19 de octubre de 2006 16:32 Para: Struts Users Mailing List Asunto: RE: Change an action of a form with javascript From: José María Tristán [mailto:[EMAIL PROTECTED] > docuemt.forms[0].action = new action; and I call the submit. That's a typo, right? 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: Hosting
you can go for Virtual Dedicated Server (some one call virtual private server), there are many, you can install anything you want ... On 10/20/06, Juan Espinosa <[EMAIL PROTECTED]> wrote: Hi im looking for a hosting company that supports java 1.5, tomcat 5.x (i will upload a struts 2 application) HD:5gb Transfer:30+Gb Anybody has suggestions...??? Thanks Juan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- When we invent time, we invent death.
[ANNOUNCEMENT] New Struts Committer: David DeWolf
Please join us in welcoming David DeWolf as a new Struts committer. David has been very active in the Struts and Tiles communities, providing good discussion and patches to the list and JIRA tickets. He is also a FTP Server and Portals committer, and has been submitting Struts patches since April. We look forward to his help in getting GA releases of Tiles 2 and Struts 2 out the door. Welcome, David! Don - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: struts 1.2.9 and tomcat 5.5
The error occurs when I startup my web app. -Original Message- From: Lixin Chu [mailto:[EMAIL PROTECTED] Sent: Thu 10/19/2006 4:46 PM To: Struts Users Mailing List Subject: Re: struts 1.2.9 and tomcat 5.5 i use TC 5.5 and Struts 1.2.9 w/o problems. but i can not tell what's wrong. when did the error occur ?
RE: Struts2 Tiles Integration
Dave, I get the following error when Tomcat5.5 comes up. I assume its because I'm not telling Tiles where the tiles-def.xml is - but I cant find any documentation specifying how to do this with Struts 2.0.1? The Struts documentation I'm following doesnt mention a servlet - just the listener and TilesResult? SEVERE: Exception sending context initialized event to listener instance of class org.apache.struts2.tiles.StrutsTilesListener java.lang.RuntimeException: Source object must not be null at org.apache.tiles.listener.TilesListener.contextInitialized(TilesListener.java:97) at org.apache.struts2.tiles.StrutsTilesListener.contextInitialized(StrutsTilesListener.java:59) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3763) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4211) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524) at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:904) at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:867) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:474) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1122) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:310) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1021) at org.apache.catalina.core.StandardHost.start(StandardHost.java:718) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442) at org.apache.catalina.core.StandardService.start(StandardService.java:450) at org.apache.catalina.core.StandardServer.start(StandardServer.java:709) at org.apache.catalina.startup.Catalina.start(Catalina.java:551) 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.catalina.startup.Bootstrap.start(Bootstrap.java:294) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432) Caused by: javax.servlet.ServletException: Source object must not be null at org.apache.tiles.listener.TilesListener.initDefinitionsFactory(TilesListener.java:161) at org.apache.tiles.listener.TilesListener.contextInitialized(TilesListener.java:93) ... 25 more Original Message Follows From: "Dave Newton" <[EMAIL PROTECTED]> Reply-To: "Struts Users Mailing List" To: "Struts Users Mailing List" Subject: RE: Struts2 Tiles Integration Date: Thu, 19 Oct 2006 07:12:03 -0400 From: Dean Crothers [mailto:[EMAIL PROTECTED] > What I'd like to know is how do I configure Struts2 to find the > tiles-def.xml? Hmm, I must have missed the listener; I'm using the servlet. What's the symptom? I'm using Tiles with no issues on Struts2. Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Try Search Survival Kits: Fix up your home and better handle your cash with Live Search! http://imagine-windowslive.com/search/kits/default.aspx?kit=improve&locale=en-US&source=hmtagline - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [s2] issue
On 10/19/06, Mark Menard <[EMAIL PROTECTED]> wrote: I'm still curious as to what was causing the NPE with the tag. I have read the Webwork in Action book and I think I'm using it correctly. Just in case this is an issue, I was using the from a decorator template using Sitemesh. I didn't to mention it earlier, but I guess that could be causing the issue. Yes, I'd say that sitemesh could be a likely culprit. We have an action tag in the showcase, and I use one myself, and they seem fine. You might go ahead a file a ticket, citing it as a possible sitemesh issue. If you had a chance to try the tag in your application on a normal page, just a test, that would help determine that it's a sitemesh issue. -Ted. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: struts 1.2.9 and tomcat 5.5
i use TC 5.5 and Struts 1.2.9 w/o problems. but i can not tell what's wrong. when did the error occur ?
RE: struts 1.2.9 and tomcat 5.5
I did as you suggested but am still getting the same error. Any other ideas? -Original Message- From: James Mitchell [mailto:[EMAIL PROTECTED] Sent: Thu 10/19/2006 3:47 PM To: Struts Users Mailing List Subject: Re: struts 1.2.9 and tomcat 5.5 Make sure you don't have an extra copy of struts jar under the shared lib dir. I would also delete the work directory too. -- James Mitchell 678.910.8017 On Oct 19, 2006, at 1:33 PM, Joe Yuen wrote: > > Is there any compatibility issues with struts 1.2.9 and tomcat 5.5. > I upgraded to 5.5 from 5.0.28 and am now getting the following error. > > java.lang.ClassCastException: > org.apache.struts.taglib.logic.IterateTei > org.apache.jasper.compiler.TagLibraryInfoImpl.createTagInfo > (TagLibraryInfoImpl.java:420) > org.apache.jasper.compiler.TagLibraryInfoImpl.parseTLD > (TagLibraryInfoImpl.java:248) > org.apache.jasper.compiler.TagLibraryInfoImpl. > (TagLibraryInfoImpl.java:162) > org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java: > 423) > org.apache.jasper.compiler.Parser.parseDirective(Parser.java:492) > org.apache.jasper.compiler.Parser.parseElements(Parser.java:1552) > org.apache.jasper.compiler.Parser.parse(Parser.java:126) > org.apache.jasper.compiler.ParserController.doParse > (ParserController.java:211) > org.apache.jasper.compiler.ParserController.parse > (ParserController.java:100) > org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:155) > org.apache.jasper.compiler.Compiler.compile(Compiler.java:295) > org.apache.jasper.compiler.Compiler.compile(Compiler.java:276) > org.apache.jasper.compiler.Compiler.compile(Compiler.java:264) > org.apache.jasper.JspCompilationContext.compile > (JspCompilationContext.java:563) > org.apache.jasper.servlet.JspServletWrapper.service > (JspServletWrapper.java:303) > org.apache.jasper.servlet.JspServlet.serviceJspFile > (JspServlet.java:314) > org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264) > javax.servlet.http.HttpServlet.service(HttpServlet.java:802) > > org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doF > ilterInternal(OpenSessionInViewFilter.java:174) > org.springframework.web.filter.OncePerRequestFilter.doFilter > (OncePerRequestFilter.java:77) > > > > I have verified that struts.jar is in C:\Program Files\Apache > Software Foundation\Tomcat 5.5\webapps\Chisq\WEB-INF\lib where I > have installed tomcat. > > Has anyone else run into this problem? > > > Thanks, > -Joe - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Internationalizing an entire Tile
That seems to work pretty well. And it's nice since you only have to include the definitions that override the standard definitions. Thanks for the pointer. (*Chris*) On 10/19/06, Laurie Harper <[EMAIL PROTECTED]> wrote: Chris Pratt wrote: > I have the I18N support for externalizing strings working great in > Struts/Tiles, but we have several Tiles that are all text and it doesn't > really make sense to copy all that text into the resource bundle and > have an > empty Tile that just retrieves the text. I was hoping there was a way > to do > something like define a tile.jsp and tile_fr.jsp and have it pick the right > one automatically, but that doesn't seem to be working. Is there a simple > way to accomplish this? > (*Chris*) I believe Tiles can do this for you, at the expense of a little extra configuration. The only documentation I can find at the moment is from the Struts Tile main project page [1], where it says # Internationalization (i18n) * It is possible to load different tiles according to Locale. * A mechanism similar to Java properties files is used for definitions files: you can have one definition file per Locale. The appropriate definition is loaded according to the current Locale. So I suspect you need localized tiles defs to point to your localized JSPs. Sorry I can't point you at more specific documentation of how this aspect of Tiles works :-( L. [1] http://struts.apache.org/1.3.5/struts-tiles/index.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: struts 1.2.9 and tomcat 5.5
Make sure you don't have an extra copy of struts jar under the shared lib dir. I would also delete the work directory too. -- James Mitchell 678.910.8017 On Oct 19, 2006, at 1:33 PM, Joe Yuen wrote: Is there any compatibility issues with struts 1.2.9 and tomcat 5.5. I upgraded to 5.5 from 5.0.28 and am now getting the following error. java.lang.ClassCastException: org.apache.struts.taglib.logic.IterateTei org.apache.jasper.compiler.TagLibraryInfoImpl.createTagInfo (TagLibraryInfoImpl.java:420) org.apache.jasper.compiler.TagLibraryInfoImpl.parseTLD (TagLibraryInfoImpl.java:248) org.apache.jasper.compiler.TagLibraryInfoImpl. (TagLibraryInfoImpl.java:162) org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java: 423) org.apache.jasper.compiler.Parser.parseDirective(Parser.java:492) org.apache.jasper.compiler.Parser.parseElements(Parser.java:1552) org.apache.jasper.compiler.Parser.parse(Parser.java:126) org.apache.jasper.compiler.ParserController.doParse (ParserController.java:211) org.apache.jasper.compiler.ParserController.parse (ParserController.java:100) org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:155) org.apache.jasper.compiler.Compiler.compile(Compiler.java:295) org.apache.jasper.compiler.Compiler.compile(Compiler.java:276) org.apache.jasper.compiler.Compiler.compile(Compiler.java:264) org.apache.jasper.JspCompilationContext.compile (JspCompilationContext.java:563) org.apache.jasper.servlet.JspServletWrapper.service (JspServletWrapper.java:303) org.apache.jasper.servlet.JspServlet.serviceJspFile (JspServlet.java:314) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doF ilterInternal(OpenSessionInViewFilter.java:174) org.springframework.web.filter.OncePerRequestFilter.doFilter (OncePerRequestFilter.java:77) I have verified that struts.jar is in C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\Chisq\WEB-INF\lib where I have installed tomcat. Has anyone else run into this problem? Thanks, -Joe - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [s2] issue
I have worked around this issue, but moving the generation of the menu to an interceptor. (It makes sense since every page in the application will have a menu.) I'm still curious as to what was causing the NPE with the tag. I have read the Webwork in Action book and I think I'm using it correctly. Just in case this is an issue, I was using the from a decorator template using Sitemesh. I didn't to mention it earlier, but I guess that could be causing the issue. Take care, Mark - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Internationalizing an entire Tile
Chris Pratt wrote: I have the I18N support for externalizing strings working great in Struts/Tiles, but we have several Tiles that are all text and it doesn't really make sense to copy all that text into the resource bundle and have an empty Tile that just retrieves the text. I was hoping there was a way to do something like define a tile.jsp and tile_fr.jsp and have it pick the right one automatically, but that doesn't seem to be working. Is there a simple way to accomplish this? (*Chris*) I believe Tiles can do this for you, at the expense of a little extra configuration. The only documentation I can find at the moment is from the Struts Tile main project page [1], where it says # Internationalization (i18n) * It is possible to load different tiles according to Locale. * A mechanism similar to Java properties files is used for definitions files: you can have one definition file per Locale. The appropriate definition is loaded according to the current Locale. So I suspect you need localized tiles defs to point to your localized JSPs. Sorry I can't point you at more specific documentation of how this aspect of Tiles works :-( L. [1] http://struts.apache.org/1.3.5/struts-tiles/index.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Session based langugeId in MessageResources
Yip, that is what I ended up doing :). I was just hoping there was a way to send the session into the MessageResources as it would save me some time. Now I have to map our language id's to locales, slight headache, but not the end of the world :). Cheers, Simon. -Original Message- From: news [mailto:[EMAIL PROTECTED] On Behalf Of Laurie Harper Sent: Friday, 20 October 2006 10:40 a.m. To: user@struts.apache.org Subject: Re: Session based langugeId in MessageResources Simon Pink wrote: > Hi there, > > Nutshell version: > The problem is that I cannot seem to get access to the session from > within my MessageResources, so I cannot call my 'myWebSession.getLanguageId()' > method. > > Explanation: > I need a MessageResources handler too solve two issues: 1) Pulling > messages from a DB table, and 2) Pulling messages that match a users 'languageId' > which is retrieved from the DB and set into the session when they logon. > Issue number 2 is the tricky one... > > The languageId is an Integer and maps to a language table (e.g.: 1 = > English, 2 = Chinese). We do not use the notion of locales for legacy > reasons. In effect, in the MessageResources.getMessage(Locale locale, > String > key) method, I need to call something like: > Message message = messageFactory.getMessage(new Integer(key), > myWebSession.getLanguageId()); > > Of course it is my class so I can create a method to pass in the > session, but I have make sure the html:errors etc can use my MessageResources class. > Hopefully someone out there will point out that this is a simple > problem, and that I am missing something obvious... It may be a silly question, but why don't you just set up the session locale based on your legacy languageId? Then all the standard i18n infrastructure will just work without any trickery. L. - 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: optionsCollection and messages
Konrad Billewicz wrote: Hello, How to use html:optionsCollection together with struts messages (from ..properties file)? When I'm setting label value for optionsCollection, I'm setting the property which will be printed. Is it possible to set property which will be _key_ of message which will be printed? Something like: (labelKey is not implemented but I would like to get something working like this above) I don't think html:optionsCollection supports anything like that. You need to do the resource bundle lookup in your bean's 'label' property getter. In other words, if you have have label="label" (the default), you need to do the resource bundle lookup in your getLabel() method. L. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Unable to forward to anything but a jsp
Maybe this will help: http://wiki.apache.org/struts/StrutsFileDownload L. Darren Hall wrote: I'm having two issues - 1) I cannot forward (or map) to an individual file - only to a path. I'd like to find a way to be able to forward to a specific file (html, pdf, etc.). Is this a configuration issue? 2) When I execute a forward action in struts config, I can only forward to a jsp file and have it display successfully. I can't forward to any other type of file (html, pdf, etc.) I need to be able to have the user click a link to a pdf file and have the file display in a new browser. Unfortunately, all requests to my domain go through my struts application, so I can't simply do this through apache httpd server - and the pdfs need to exist in my application's domain so they will be crawled by our search functionality and show up in search results. I'm not sure how I can accomplish clicking a link and displaying a pdf file directly given the above two constraints. I'm using struts 1.2.9 apache 2.2 and tomcat 5.5. Can someone please tell me what I'm doing wrong and point me towards a solution? Thanks, Darren - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Session based langugeId in MessageResources
Simon Pink wrote: Hi there, Nutshell version: The problem is that I cannot seem to get access to the session from within my MessageResources, so I cannot call my 'myWebSession.getLanguageId()' method. Explanation: I need a MessageResources handler too solve two issues: 1) Pulling messages from a DB table, and 2) Pulling messages that match a users 'languageId' which is retrieved from the DB and set into the session when they logon. Issue number 2 is the tricky one... The languageId is an Integer and maps to a language table (e.g.: 1 = English, 2 = Chinese). We do not use the notion of locales for legacy reasons. In effect, in the MessageResources.getMessage(Locale locale, String key) method, I need to call something like: Message message = messageFactory.getMessage(new Integer(key), myWebSession.getLanguageId()); Of course it is my class so I can create a method to pass in the session, but I have make sure the html:errors etc can use my MessageResources class. Hopefully someone out there will point out that this is a simple problem, and that I am missing something obvious... It may be a silly question, but why don't you just set up the session locale based on your legacy languageId? Then all the standard i18n infrastructure will just work without any trickery. L. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Textfield problem with pulling value out.
I managed to get the problem working, unfortunately that fix is by doing something that is against best practices (if I understand them correctly). To get this to work what I ended up doing was pulling the results from the search and putting that in the reset of the resultsAction. I am pretty certain your question about the setting the value on the set and not the get hit the nail on the head. I will work on the suggestions that you made and see what progress I can make. Thanks again so much for all the time and effort. On 10/19/06, Adam K <[EMAIL PROTECTED]> wrote: It's more likely that I don't understand. This is my first struts project and I am learning as I go. Here is all of the getters/setters that I have so far. It is quite possible that I am missing some, but the previous page that I created that works used only those listed, and it works fine. The main difference being that the working one only has 1 form on the page, and that I use the reset method to pre-populate the page (which I have since learned is bad, but I haven't gotten back to fixing it). public int getNumProducts() { return numProducts; } public void setNumProducts(int numProducts) { this.numProducts = numProducts; } public int getNumProducts(int index) { if(this.results== null) { this.results = new ArrayList(); } while(index >= this.results.size() +1) { this.results.add(new Product()); } Product p = (Product) results.get(index); return p.getNumProducts(); } On 10/19/06, Puneet Lakhina <[EMAIL PROTECTED]> wrote: > > On 10/20/06, Adam K <[EMAIL PROTECTED]> wrote: > > > > Getter and setter methods for ? (Sorry if it should be obvious but I > want > > to clarify as it isn't obvious to me) > > > for numProducts indexed property. And i dont understand why are you > populating blank values in the getter methods..I mean you should be > doing > that in your setter methods..something like > > public void setNumProducts(int index,String val) { > while(index <= results.size()) { > results.add(new Product()); > } > Product p = (Product)results.get(index); > p.setNumProducts(val); > } > maybe i dont understnad the context of your problem properly, but this > what > i do with indexed properties. > > As far the error message here is what I recieve: > > > > javax.servlet.ServletException: BeanUtils.populate > > org.apache.struts.util.RequestUtils.populate(RequestUtils.java > > :495) > > org.apache.struts.action.RequestProcessor.processPopulate( > > RequestProcessor.java:816) > > org.apache.struts.action.RequestProcessor.process( > > RequestProcessor.java :203) > > org.apache.struts.action.ActionServlet.process( > ActionServlet.java > > :1196) > > org.apache.struts.action.ActionServlet.doPost( > ActionServlet.java > > :432) > > javax.servlet.http.HttpServlet.service (HttpServlet.java:727) > > javax.servlet.http.HttpServlet.service(HttpServlet.java:820) > > com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:73) > > com.sun.enterprise.web.VirtualServerPipeline.invoke ( > > VirtualServerPipeline.java:120) > > org.apache.coyote.tomcat5.CoyoteAdapter.service( > CoyoteAdapter.java > > :231) > > > > com.sun.enterprise.web.connector.grizzly.ProcessorTask.invokeAdapter ( > > ProcessorTask.java:667) > > > > > com.sun.enterprise.web.connector.grizzly.ProcessorTask.processNonBlocked > ( > > ProcessorTask.java:574) > > com.sun.enterprise.web.connector.grizzly.ProcessorTask.process( > > ProcessorTask.java:844) > > > > com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTask > ( > > ReadTask.java:287) > > com.sun.enterprise.web.connector.grizzly.ReadTask.doTask ( > > ReadTask.java:212) > > com.sun.enterprise.web.connector.grizzly.TaskBase.run( > > TaskBase.java:252) > > com.sun.enterprise.web.connector.grizzly.WorkerThread.run( > > WorkerThread.java :75) > > > > *root cause* > > > > java.lang.IndexOutOfBoundsException: Index: 1, Size: 0 > > java.util.ArrayList.RangeCheck(ArrayList.java:546) > > java.util.ArrayList.get(ArrayList.java :321) > > > org.apache.commons.beanutils.PropertyUtilsBean.getIndexedProperty( > > PropertyUtilsBean.java:433) > > > org.apache.commons.beanutils.PropertyUtilsBean.getIndexedProperty( > > PropertyUtilsBean.java :340) > > > org.apache.commons.beanutils.PropertyUtilsBean.getNestedProperty( > > PropertyUtilsBean.java:684) > > org.apache.commons.beanutils.PropertyUtilsBean.getProperty( > > PropertyUtilsBean.java :715) > > org.apache.commons.beanutils.BeanUtilsBean.setProperty( > > BeanUtilsBean.java:884) > > org.apache.commons.beanutils.BeanUtilsBean.populate( > > BeanUtilsBean.java:811) > > org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java > > :298) > > org.apache.struts.util.RequestUtils.
Re: Textfield problem with pulling value out.
It's more likely that I don't understand. This is my first struts project and I am learning as I go. Here is all of the getters/setters that I have so far. It is quite possible that I am missing some, but the previous page that I created that works used only those listed, and it works fine. The main difference being that the working one only has 1 form on the page, and that I use the reset method to pre-populate the page (which I have since learned is bad, but I haven't gotten back to fixing it). public int getNumProducts() { return numProducts; } public void setNumProducts(int numProducts) { this.numProducts = numProducts; } public int getNumProducts(int index) { if(this.results== null) { this.results = new ArrayList(); } while(index >= this.results.size() +1) { this.results.add(new Product()); } Product p = (Product) results.get(index); return p.getNumProducts(); } On 10/19/06, Puneet Lakhina <[EMAIL PROTECTED]> wrote: On 10/20/06, Adam K <[EMAIL PROTECTED]> wrote: > > Getter and setter methods for ? (Sorry if it should be obvious but I want > to clarify as it isn't obvious to me) for numProducts indexed property. And i dont understand why are you populating blank values in the getter methods..I mean you should be doing that in your setter methods..something like public void setNumProducts(int index,String val) { while(index <= results.size()) { results.add(new Product()); } Product p = (Product)results.get(index); p.setNumProducts(val); } maybe i dont understnad the context of your problem properly, but this what i do with indexed properties. As far the error message here is what I recieve: > > javax.servlet.ServletException: BeanUtils.populate > org.apache.struts.util.RequestUtils.populate(RequestUtils.java > :495) > org.apache.struts.action.RequestProcessor.processPopulate( > RequestProcessor.java:816) > org.apache.struts.action.RequestProcessor.process( > RequestProcessor.java:203) > org.apache.struts.action.ActionServlet.process( ActionServlet.java > :1196) > org.apache.struts.action.ActionServlet.doPost(ActionServlet.java > :432) > javax.servlet.http.HttpServlet.service(HttpServlet.java:727) > javax.servlet.http.HttpServlet.service(HttpServlet.java:820) > com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:73) > com.sun.enterprise.web.VirtualServerPipeline.invoke( > VirtualServerPipeline.java:120) > org.apache.coyote.tomcat5.CoyoteAdapter.service( CoyoteAdapter.java > :231) > > com.sun.enterprise.web.connector.grizzly.ProcessorTask.invokeAdapter( > ProcessorTask.java:667) > > com.sun.enterprise.web.connector.grizzly.ProcessorTask.processNonBlocked ( > ProcessorTask.java:574) > com.sun.enterprise.web.connector.grizzly.ProcessorTask.process( > ProcessorTask.java:844) > > com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTask( > ReadTask.java:287) > com.sun.enterprise.web.connector.grizzly.ReadTask.doTask( > ReadTask.java:212) > com.sun.enterprise.web.connector.grizzly.TaskBase.run( > TaskBase.java:252) > com.sun.enterprise.web.connector.grizzly.WorkerThread.run( > WorkerThread.java:75) > > *root cause* > > java.lang.IndexOutOfBoundsException: Index: 1, Size: 0 > java.util.ArrayList.RangeCheck(ArrayList.java:546) > java.util.ArrayList.get(ArrayList.java:321) > org.apache.commons.beanutils.PropertyUtilsBean.getIndexedProperty( > PropertyUtilsBean.java:433) > org.apache.commons.beanutils.PropertyUtilsBean.getIndexedProperty( > PropertyUtilsBean.java:340) > org.apache.commons.beanutils.PropertyUtilsBean.getNestedProperty ( > PropertyUtilsBean.java:684) > org.apache.commons.beanutils.PropertyUtilsBean.getProperty( > PropertyUtilsBean.java:715) > org.apache.commons.beanutils.BeanUtilsBean.setProperty( > BeanUtilsBean.java:884) > org.apache.commons.beanutils.BeanUtilsBean.populate( > BeanUtilsBean.java:811) > org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java > :298) > org.apache.struts.util.RequestUtils.populate(RequestUtils.java > :493) > org.apache.struts.action.RequestProcessor.processPopulate( > RequestProcessor.java:816) > org.apache.struts.action.RequestProcessor.process( > RequestProcessor.java:203) > org.apache.struts.action.ActionServlet.process( ActionServlet.java > :1196) > org.apache.struts.action.ActionServlet.doPost(ActionServlet.java > :432) > javax.servlet.http.HttpServlet.service(HttpServlet.java:727) > javax.servlet.http.HttpServlet.service(HttpServlet.java:820) > com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:73) > com.sun.enterprise.web.VirtualServerPipeline.invoke( > VirtualServerPipeline.java:120) > org.apache.coyote.tomcat5.CoyoteAdapter.service( CoyoteAdapter.j
Re: Textfield problem with pulling value out.
On 10/20/06, Adam K <[EMAIL PROTECTED]> wrote: Getter and setter methods for ? (Sorry if it should be obvious but I want to clarify as it isn't obvious to me) for numProducts indexed property. And i dont understand why are you populating blank values in the getter methods..I mean you should be doing that in your setter methods..something like public void setNumProducts(int index,String val) { while(index <= results.size()) { results.add(new Product()); } Product p = (Product)results.get(index); p.setNumProducts(val); } maybe i dont understnad the context of your problem properly, but this what i do with indexed properties. As far the error message here is what I recieve: javax.servlet.ServletException: BeanUtils.populate org.apache.struts.util.RequestUtils.populate(RequestUtils.java :495) org.apache.struts.action.RequestProcessor.processPopulate( RequestProcessor.java:816) org.apache.struts.action.RequestProcessor.process( RequestProcessor.java:203) org.apache.struts.action.ActionServlet.process(ActionServlet.java :1196) org.apache.struts.action.ActionServlet.doPost(ActionServlet.java :432) javax.servlet.http.HttpServlet.service(HttpServlet.java:727) javax.servlet.http.HttpServlet.service(HttpServlet.java:820) com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:73) com.sun.enterprise.web.VirtualServerPipeline.invoke( VirtualServerPipeline.java:120) org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java :231) com.sun.enterprise.web.connector.grizzly.ProcessorTask.invokeAdapter( ProcessorTask.java:667) com.sun.enterprise.web.connector.grizzly.ProcessorTask.processNonBlocked( ProcessorTask.java:574) com.sun.enterprise.web.connector.grizzly.ProcessorTask.process( ProcessorTask.java:844) com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTask( ReadTask.java:287) com.sun.enterprise.web.connector.grizzly.ReadTask.doTask( ReadTask.java:212) com.sun.enterprise.web.connector.grizzly.TaskBase.run( TaskBase.java:252) com.sun.enterprise.web.connector.grizzly.WorkerThread.run( WorkerThread.java:75) *root cause* java.lang.IndexOutOfBoundsException: Index: 1, Size: 0 java.util.ArrayList.RangeCheck(ArrayList.java:546) java.util.ArrayList.get(ArrayList.java:321) org.apache.commons.beanutils.PropertyUtilsBean.getIndexedProperty( PropertyUtilsBean.java:433) org.apache.commons.beanutils.PropertyUtilsBean.getIndexedProperty( PropertyUtilsBean.java:340) org.apache.commons.beanutils.PropertyUtilsBean.getNestedProperty( PropertyUtilsBean.java:684) org.apache.commons.beanutils.PropertyUtilsBean.getProperty( PropertyUtilsBean.java:715) org.apache.commons.beanutils.BeanUtilsBean.setProperty( BeanUtilsBean.java:884) org.apache.commons.beanutils.BeanUtilsBean.populate( BeanUtilsBean.java:811) org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java :298) org.apache.struts.util.RequestUtils.populate(RequestUtils.java :493) org.apache.struts.action.RequestProcessor.processPopulate( RequestProcessor.java:816) org.apache.struts.action.RequestProcessor.process( RequestProcessor.java:203) org.apache.struts.action.ActionServlet.process(ActionServlet.java :1196) org.apache.struts.action.ActionServlet.doPost(ActionServlet.java :432) javax.servlet.http.HttpServlet.service(HttpServlet.java:727) javax.servlet.http.HttpServlet.service(HttpServlet.java:820) com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:73) com.sun.enterprise.web.VirtualServerPipeline.invoke( VirtualServerPipeline.java:120) org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java :231) com.sun.enterprise.web.connector.grizzly.ProcessorTask.invokeAdapter( ProcessorTask.java:667) com.sun.enterprise.web.connector.grizzly.ProcessorTask.processNonBlocked( ProcessorTask.java:574) com.sun.enterprise.web.connector.grizzly.ProcessorTask.process( ProcessorTask.java:844) com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTask( ReadTask.java:287) com.sun.enterprise.web.connector.grizzly.ReadTask.doTask( ReadTask.java:212) com.sun.enterprise.web.connector.grizzly.TaskBase.run( TaskBase.java:252) com.sun.enterprise.web.connector.grizzly.WorkerThread.run( WorkerThread.java:75) -- Puneet
Hosting
Hi im looking for a hosting company that supports java 1.5, tomcat 5.x (i will upload a struts 2 application) HD:5gb Transfer:30+Gb Anybody has suggestions...??? Thanks Juan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Textfield problem with pulling value out.
Getter and setter methods for ? (Sorry if it should be obvious but I want to clarify as it isn't obvious to me) As far the error message here is what I recieve: javax.servlet.ServletException: BeanUtils.populate org.apache.struts.util.RequestUtils.populate(RequestUtils.java:495) org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.java:816) org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:203) org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196) org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432) javax.servlet.http.HttpServlet.service(HttpServlet.java:727) javax.servlet.http.HttpServlet.service(HttpServlet.java:820) com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:73) com.sun.enterprise.web.VirtualServerPipeline.invoke(VirtualServerPipeline.java:120) org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:231) com.sun.enterprise.web.connector.grizzly.ProcessorTask.invokeAdapter(ProcessorTask.java:667) com.sun.enterprise.web.connector.grizzly.ProcessorTask.processNonBlocked(ProcessorTask.java:574) com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:844) com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTask(ReadTask.java:287) com.sun.enterprise.web.connector.grizzly.ReadTask.doTask(ReadTask.java:212) com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:252) com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:75) *root cause* java.lang.IndexOutOfBoundsException: Index: 1, Size: 0 java.util.ArrayList.RangeCheck(ArrayList.java:546) java.util.ArrayList.get(ArrayList.java:321) org.apache.commons.beanutils.PropertyUtilsBean.getIndexedProperty(PropertyUtilsBean.java:433) org.apache.commons.beanutils.PropertyUtilsBean.getIndexedProperty(PropertyUtilsBean.java:340) org.apache.commons.beanutils.PropertyUtilsBean.getNestedProperty(PropertyUtilsBean.java:684) org.apache.commons.beanutils.PropertyUtilsBean.getProperty(PropertyUtilsBean.java:715) org.apache.commons.beanutils.BeanUtilsBean.setProperty(BeanUtilsBean.java:884) org.apache.commons.beanutils.BeanUtilsBean.populate(BeanUtilsBean.java:811) org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:298) org.apache.struts.util.RequestUtils.populate(RequestUtils.java:493) org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.java:816) org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:203) org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196) org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432) javax.servlet.http.HttpServlet.service(HttpServlet.java:727) javax.servlet.http.HttpServlet.service(HttpServlet.java:820) com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:73) com.sun.enterprise.web.VirtualServerPipeline.invoke(VirtualServerPipeline.java:120) org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:231) com.sun.enterprise.web.connector.grizzly.ProcessorTask.invokeAdapter(ProcessorTask.java:667) com.sun.enterprise.web.connector.grizzly.ProcessorTask.processNonBlocked(ProcessorTask.java:574) com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:844) com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTask(ReadTask.java:287) com.sun.enterprise.web.connector.grizzly.ReadTask.doTask(ReadTask.java:212) com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:252) com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:75)
Re: Passing a parameter into a bean
How about doing a jstl if statement within the index.jsp page. If you need to pass the parameters, then within the if errors put in a hidden field named portal with value of collab, else no hidden value. something like that maybe? On 10/19/06, Perry Minchew <[EMAIL PROTECTED]> wrote: Hi everyone, Another beginner question. I have an index page that currently does nothing but redirect (). However, I need to pass a parameter passed in from the calling page to be transferred to a bean. The parameter is in formal "./index2.jsp?portal=collab". I have created a portalForm with a getter/setter, and public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) { ActionErrors errors = new ActionErrors(); if(getPortal() == null || getPortal().length() < 1) { errors.add("portalNotFound", new ActionMessage("errors.portal.not.supplied")); } return errors; } I would prefer not to make the index page a form with a submit button, because I just want to pass the portal from the parameter into a bean to get validated. If the portal parameter exists, we are good. If it doesn't, I need to redirect to an error page. I just can't figure out how to pass the parameter into the bean and get the bean validated without clicking a submit button. Struts 1.3.5, Tomcat 5.5 Perry Minchew Systems Integrator SPAWAR Systems Charleston Office : (843) 218.7031 Cell : (843) 822.1555 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Textfield problem with pulling value out.
On 10/19/06, Adam K <[EMAIL PROTECTED]> wrote: Here are the 2 get methods that I have. thanks again for all the help. public int getNumProducts() { return numProducts; } public int getNumProducts(int index) { if(this.results== null) { this.results = new ArrayList(); } while(index >= this.results.size()) { this.results.add(new Product()); } Product p = (Product) results.get(index); return p.getNumProducts(); } Sorry i actually meant post your getter and setter methods..coz the setNumProducts is what is probaly causing the problem..and ya post the full exception trace. On 10/19/06, Puneet Lakhina <[EMAIL PROTECTED]> wrote: > > On 10/19/06, Adam K <[EMAIL PROTECTED]> wrote: > > > > Hi all I have been working on this probelm for the past couple of days, > > and > > don't seem to be making any progress on it. I am fairly certain it is a > > problem with my understanding of struts, and as such it makes it quite > > difficult for me to solve the problem myself. > > I am trying to use a textfield and pull values from it. The following > > explains the scenario. User clicks on a page, page loads with a form > that > > has a textfield. User enters search criteria and submits form. This > > works > > fine. Page returns with the search form and textfield, as well as a > > second > > form that displays the results of the search. This also works > fine. The > > user then goes through the results filling in numbers for each result > > indicating how many of each they would like to order and then submit the > > form. This is where the problem results. I end up gettting an error > from > > the page anytime I submit the form where there is 1 or more results. > > Submitting with no results works fine and the page loads correctly. > > Submitting with 1 result errors out with > > > > java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 > > > > Submitting with 10 results errors out with: > > java.lang.IndexOutOfBoundsException: Index: 2, Size: 0 > > > > Submitting with 100 results errors with : > > java.lang.IndexOutOfBoundsException: Index: 6, Size: 0 > > > > Submitting with 200 results errors with : > > java.lang.IndexOutOfBoundsException: Index: 155, Size: 0 > > > > The number seems to be random (I am guessing it is how far into the > > form it gets before the error is encountered) > > > > Any help on this would be much appreciated. > > I am including all the information that I believe to be important but > > would have no problem including more. > > > > In the jsp form there is: > > > > > > > > > cellpadding="0" cellspacing="0"> > > > > > > cellspacing="1" > > cellpadding="1" width="100%" > > > > >> property="searchString" size="30" > > maxlength="30"/> > > > > > Search > > > > colspan="2"> > > > > > > > > > > > > > > > > > > > > Add To Order > > > > > > Product > > Product Desc > > Quantity > > > > > > > > > id="results"> > > > > > /> > > property="description" > > /> > > > indexed="true" /> > > > post the getter method for the numProducts. that might be causing the > problem. > > > > > > > > > > > > > > NO RESULTS > > > > > > > > > > In the action (this action is only for the search results): > > public ActionForward execute(ActionMapping mapping, ActionForm > > form, > > HttpServletRequest request, HttpServletResponse response) throws > > Exception > > { > > SkuSearchForm skuform = (SkuSearchForm) form; > > HttpSession session = request.getSession(); > > User user = new User(); > > Order order = new Order(); > > ArrayList products = new ArrayList(); > > > > ArrayList results = new ArrayList(); > > user = (User)session.getAttribute("User"); > > order = user.getOrder(user.getCurrOrder()); > > products = order.getProducts(); > > int number = 0; > > int count = 0; > > > > Iterator iter = results.iterator(); > > //there is nothing happening in here as there is no results for some > > reason. > > while(iter.hasNext()) > > { > >
Passing a parameter into a bean
Hi everyone, Another beginner question. I have an index page that currently does nothing but redirect (). However, I need to pass a parameter passed in from the calling page to be transferred to a bean. The parameter is in formal "./index2.jsp?portal=collab". I have created a portalForm with a getter/setter, and public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) { ActionErrors errors = new ActionErrors(); if(getPortal() == null || getPortal().length() < 1) { errors.add("portalNotFound", new ActionMessage("errors.portal.not.supplied")); } return errors; } I would prefer not to make the index page a form with a submit button, because I just want to pass the portal from the parameter into a bean to get validated. If the portal parameter exists, we are good. If it doesn't, I need to redirect to an error page. I just can't figure out how to pass the parameter into the bean and get the bean validated without clicking a submit button. Struts 1.3.5, Tomcat 5.5 Perry Minchew Systems Integrator SPAWAR Systems Charleston Office : (843) 218.7031 Cell : (843) 822.1555
Re: Textfield problem with pulling value out.
One other thing I just realized that I should include is the fact that all of my forms are request based, which doesn't allow me to include the form information from one to the next, so to get around that (for more testing) I have included the array in a Session variable so that I can pull it out in the second action. Again thanks for all thoughts/ideas/suggestions On 10/19/06, Adam K <[EMAIL PROTECTED]> wrote: If this is a bad technique I would be more than happy to change it to a more standard technique. Any suggestions on how to improve my code are always welcome. thanks for the suggestions thus far. Adam On 10/19/06, Chris Pratt <[EMAIL PROTECTED] > wrote: > > I don't think I've ever seen that technique before, but you have to > remember > that size() is 1 based and index (or get(index) ) is 0 based. So when > someone calls getNumProducts(5), your while loop fills in indexes 0, 1, > 2, > 3, and 4 (because then index and this.results.size() are both 5), then > you > proceed to ask for results.get(5), which doesn't exist. You should be > able > to change your while list to something like: > > while(index >= this.results.size() + 1) { > this.results.add(new Product()); > } > > (*Chris*) > > On 10/19/06, Adam K < [EMAIL PROTECTED]> wrote: > > > > Here are the 2 get methods that I have. > > > > thanks again for all the help. > > > > > > public int getNumProducts() { > > return numProducts; > > } > > > > > > public int getNumProducts(int index) > > { > > if(this.results== null) > > { > > this.results = new ArrayList(); > > } > > while(index >= this.results.size()) > > { > > this.results.add(new Product()); > > } > > > > Product p = (Product) results.get(index); > > return p.getNumProducts(); > > } > > > > On 10/19/06, Puneet Lakhina < [EMAIL PROTECTED]> wrote: > > > > > > On 10/19/06, Adam K < [EMAIL PROTECTED]> wrote: > > > > > > > > Hi all I have been working on this probelm for the past couple of > > days, > > > > and > > > > don't seem to be making any progress on it. I am fairly certain > it is > > a > > > > problem with my understanding of struts, and as such it makes it > quite > > > > difficult for me to solve the problem myself. > > > > I am trying to use a textfield and pull values from it. The > following > > > > explains the scenario. User clicks on a page, page loads with a > form > > > that > > > > has a textfield. User enters search criteria and submits > form. This > > > > works > > > > fine. Page returns with the search form and textfield, as well as > a > > > > second > > > > form that displays the results of the search. This also works > > > fine. The > > > > user then goes through the results filling in numbers for each > result > > > > indicating how many of each they would like to order and then > submit > > the > > > > form. This is where the problem results. I end up gettting an > error > > > from > > > > the page anytime I submit the form where there is 1 or more > results. > > > > Submitting with no results works fine and the page loads > correctly. > > > > Submitting with 1 result errors out with > > > > > > > > java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 > > > > > > > > Submitting with 10 results errors out with: > > > > java.lang.IndexOutOfBoundsException: Index: 2, Size: 0 > > > > > > > > Submitting with 100 results errors with : > > > > java.lang.IndexOutOfBoundsException: Index: 6, Size: 0 > > > > > > > > Submitting with 200 results errors with : > > > > java.lang.IndexOutOfBoundsException: Index: 155, Size: 0 > > > > > > > > The number seems to be random (I am guessing it is how far into > the > > > > form it gets before the error is encountered) > > > > > > > > Any help on this would be much appreciated. > > > > I am including all the information that I believe to be important > but > > > > would have no problem including more. > > > > > > > > In the jsp form there is: > > > > > > > > > > > > > > > > > > > cellpadding="0" cellspacing="0"> > > > > > > > > > > > > > > cellspacing="1" > > > > cellpadding="1" width="100%" > > > > > > > > > > > > > property="searchString" size="30" > > > > maxlength="30"/> > > > > > > > > > > > Search > > > > > > > > > > colspan="2"> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Add To Order > > > > > > > > > > > > Product > > > > Product Desc > > > > Quantity > > > >
Re: Textfield problem with pulling value out.
If this is a bad technique I would be more than happy to change it to a more standard technique. Any suggestions on how to improve my code are always welcome. thanks for the suggestions thus far. Adam On 10/19/06, Chris Pratt <[EMAIL PROTECTED]> wrote: I don't think I've ever seen that technique before, but you have to remember that size() is 1 based and index (or get(index) ) is 0 based. So when someone calls getNumProducts(5), your while loop fills in indexes 0, 1, 2, 3, and 4 (because then index and this.results.size() are both 5), then you proceed to ask for results.get(5), which doesn't exist. You should be able to change your while list to something like: while(index >= this.results.size() + 1) { this.results.add(new Product()); } (*Chris*) On 10/19/06, Adam K <[EMAIL PROTECTED]> wrote: > > Here are the 2 get methods that I have. > > thanks again for all the help. > > > public int getNumProducts() { > return numProducts; > } > > > public int getNumProducts(int index) > { > if(this.results== null) > { > this.results = new ArrayList(); > } > while(index >= this.results.size()) > { > this.results.add(new Product()); > } > > Product p = (Product) results.get(index); > return p.getNumProducts(); > } > > On 10/19/06, Puneet Lakhina < [EMAIL PROTECTED]> wrote: > > > > On 10/19/06, Adam K <[EMAIL PROTECTED]> wrote: > > > > > > Hi all I have been working on this probelm for the past couple of > days, > > > and > > > don't seem to be making any progress on it. I am fairly certain it is > a > > > problem with my understanding of struts, and as such it makes it quite > > > difficult for me to solve the problem myself. > > > I am trying to use a textfield and pull values from it. The following > > > explains the scenario. User clicks on a page, page loads with a form > > that > > > has a textfield. User enters search criteria and submits form. This > > > works > > > fine. Page returns with the search form and textfield, as well as a > > > second > > > form that displays the results of the search. This also works > > fine. The > > > user then goes through the results filling in numbers for each result > > > indicating how many of each they would like to order and then submit > the > > > form. This is where the problem results. I end up gettting an error > > from > > > the page anytime I submit the form where there is 1 or more results. > > > Submitting with no results works fine and the page loads correctly. > > > Submitting with 1 result errors out with > > > > > > java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 > > > > > > Submitting with 10 results errors out with: > > > java.lang.IndexOutOfBoundsException: Index: 2, Size: 0 > > > > > > Submitting with 100 results errors with : > > > java.lang.IndexOutOfBoundsException: Index: 6, Size: 0 > > > > > > Submitting with 200 results errors with : > > > java.lang.IndexOutOfBoundsException: Index: 155, Size: 0 > > > > > > The number seems to be random (I am guessing it is how far into the > > > form it gets before the error is encountered) > > > > > > Any help on this would be much appreciated. > > > I am including all the information that I believe to be important but > > > would have no problem including more. > > > > > > In the jsp form there is: > > > > > > > > > > > > > > cellpadding="0" cellspacing="0"> > > > > > > > > > > cellspacing="1" > > > cellpadding="1" width="100%" > > > > > > >> > property="searchString" size="30" > > > maxlength="30"/> > > > > > > > > Search > > > > > > > colspan="2"> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Add To Order > > > > > > > > > Product > > > Product Desc > > > Quantity > > > > > > > > > > > > > > id="results"> > > > > > > > > /> > > > > property="description" > > > /> > > > property="numProducts" > > > indexed="true" /> > > > > > > post the getter method for the numProducts. that might be causing the > > problem. > > > > > > > > > > > > > > > > > > > > > > NO > RESULTS > > > > > > > > > > > > > > > In the action (this action is only for the search results): > > > public ActionForward execute(ActionMapping mapping, ActionForm > > >
struts 1.2.9 and tomcat 5.5
Is there any compatibility issues with struts 1.2.9 and tomcat 5.5. I upgraded to 5.5 from 5.0.28 and am now getting the following error. java.lang.ClassCastException: org.apache.struts.taglib.logic.IterateTei org.apache.jasper.compiler.TagLibraryInfoImpl.createTagInfo(TagLibraryInfoImpl.java:420) org.apache.jasper.compiler.TagLibraryInfoImpl.parseTLD(TagLibraryInfoImpl.java:248) org.apache.jasper.compiler.TagLibraryInfoImpl.(TagLibraryInfoImpl.java:162) org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:423) org.apache.jasper.compiler.Parser.parseDirective(Parser.java:492) org.apache.jasper.compiler.Parser.parseElements(Parser.java:1552) org.apache.jasper.compiler.Parser.parse(Parser.java:126) org.apache.jasper.compiler.ParserController.doParse(ParserController.java:211) org.apache.jasper.compiler.ParserController.parse(ParserController.java:100) org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:155) org.apache.jasper.compiler.Compiler.compile(Compiler.java:295) org.apache.jasper.compiler.Compiler.compile(Compiler.java:276) org.apache.jasper.compiler.Compiler.compile(Compiler.java:264) org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:563) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:303) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:174) org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:77) I have verified that struts.jar is in C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\Chisq\WEB-INF\lib where I have installed tomcat. Has anyone else run into this problem? Thanks, -Joe
Re: Textfield problem with pulling value out.
I don't think I've ever seen that technique before, but you have to remember that size() is 1 based and index (or get(index) ) is 0 based. So when someone calls getNumProducts(5), your while loop fills in indexes 0, 1, 2, 3, and 4 (because then index and this.results.size() are both 5), then you proceed to ask for results.get(5), which doesn't exist. You should be able to change your while list to something like: while(index >= this.results.size() + 1) { this.results.add(new Product()); } (*Chris*) On 10/19/06, Adam K <[EMAIL PROTECTED]> wrote: Here are the 2 get methods that I have. thanks again for all the help. public int getNumProducts() { return numProducts; } public int getNumProducts(int index) { if(this.results== null) { this.results = new ArrayList(); } while(index >= this.results.size()) { this.results.add(new Product()); } Product p = (Product) results.get(index); return p.getNumProducts(); } On 10/19/06, Puneet Lakhina <[EMAIL PROTECTED]> wrote: > > On 10/19/06, Adam K <[EMAIL PROTECTED]> wrote: > > > > Hi all I have been working on this probelm for the past couple of days, > > and > > don't seem to be making any progress on it. I am fairly certain it is a > > problem with my understanding of struts, and as such it makes it quite > > difficult for me to solve the problem myself. > > I am trying to use a textfield and pull values from it. The following > > explains the scenario. User clicks on a page, page loads with a form > that > > has a textfield. User enters search criteria and submits form. This > > works > > fine. Page returns with the search form and textfield, as well as a > > second > > form that displays the results of the search. This also works > fine. The > > user then goes through the results filling in numbers for each result > > indicating how many of each they would like to order and then submit the > > form. This is where the problem results. I end up gettting an error > from > > the page anytime I submit the form where there is 1 or more results. > > Submitting with no results works fine and the page loads correctly. > > Submitting with 1 result errors out with > > > > java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 > > > > Submitting with 10 results errors out with: > > java.lang.IndexOutOfBoundsException: Index: 2, Size: 0 > > > > Submitting with 100 results errors with : > > java.lang.IndexOutOfBoundsException: Index: 6, Size: 0 > > > > Submitting with 200 results errors with : > > java.lang.IndexOutOfBoundsException: Index: 155, Size: 0 > > > > The number seems to be random (I am guessing it is how far into the > > form it gets before the error is encountered) > > > > Any help on this would be much appreciated. > > I am including all the information that I believe to be important but > > would have no problem including more. > > > > In the jsp form there is: > > > > > > > > > cellpadding="0" cellspacing="0"> > > > > > > cellspacing="1" > > cellpadding="1" width="100%" > > > > >> property="searchString" size="30" > > maxlength="30"/> > > > > > Search > > > > colspan="2"> > > > > > > > > > > > > > > > > > > > > Add To Order > > > > > > Product > > Product Desc > > Quantity > > > > > > > > > id="results"> > > > > > /> > > property="description" > > /> > > > indexed="true" /> > > > post the getter method for the numProducts. that might be causing the > problem. > > > > > > > > > > > > > > NO RESULTS > > > > > > > > > > In the action (this action is only for the search results): > > public ActionForward execute(ActionMapping mapping, ActionForm > > form, > > HttpServletRequest request, HttpServletResponse response) throws > > Exception > > { > > SkuSearchForm skuform = (SkuSearchForm) form; > > HttpSession session = request.getSession(); > > User user = new User(); > > Order order = new Order(); > > ArrayList products = new ArrayList(); > > > > ArrayList results = new ArrayList(); > > user = (User)session.getAttribute("User"); > > order = user.getOrder(user.getCurrOr
Internationalizing an entire Tile
I have the I18N support for externalizing strings working great in Struts/Tiles, but we have several Tiles that are all text and it doesn't really make sense to copy all that text into the resource bundle and have an empty Tile that just retrieves the text. I was hoping there was a way to do something like define a tile.jsp and tile_fr.jsp and have it pick the right one automatically, but that doesn't seem to be working. Is there a simple way to accomplish this? (*Chris*)
Re: Textfield problem with pulling value out.
Here are the 2 get methods that I have. thanks again for all the help. public int getNumProducts() { return numProducts; } public int getNumProducts(int index) { if(this.results== null) { this.results = new ArrayList(); } while(index >= this.results.size()) { this.results.add(new Product()); } Product p = (Product) results.get(index); return p.getNumProducts(); } On 10/19/06, Puneet Lakhina <[EMAIL PROTECTED]> wrote: On 10/19/06, Adam K <[EMAIL PROTECTED]> wrote: > > Hi all I have been working on this probelm for the past couple of days, > and > don't seem to be making any progress on it. I am fairly certain it is a > problem with my understanding of struts, and as such it makes it quite > difficult for me to solve the problem myself. > I am trying to use a textfield and pull values from it. The following > explains the scenario. User clicks on a page, page loads with a form that > has a textfield. User enters search criteria and submits form. This > works > fine. Page returns with the search form and textfield, as well as a > second > form that displays the results of the search. This also works fine. The > user then goes through the results filling in numbers for each result > indicating how many of each they would like to order and then submit the > form. This is where the problem results. I end up gettting an error from > the page anytime I submit the form where there is 1 or more results. > Submitting with no results works fine and the page loads correctly. > Submitting with 1 result errors out with > > java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 > > Submitting with 10 results errors out with: > java.lang.IndexOutOfBoundsException: Index: 2, Size: 0 > > Submitting with 100 results errors with : > java.lang.IndexOutOfBoundsException: Index: 6, Size: 0 > > Submitting with 200 results errors with : > java.lang.IndexOutOfBoundsException: Index: 155, Size: 0 > > The number seems to be random (I am guessing it is how far into the > form it gets before the error is encountered) > > Any help on this would be much appreciated. > I am including all the information that I believe to be important but > would have no problem including more. > > In the jsp form there is: > > > > cellpadding="0" cellspacing="0"> > > > cellpadding="1" width="100%" > > >property="searchString" size="30" > maxlength="30"/> > > Search > > > > > > > > > > > > Add To Order > > > Product > Product Desc > Quantity > > > > id="results"> > > /> > /> > indexed="true" /> post the getter method for the numProducts. that might be causing the problem. > > > > > > NO RESULTS > > > > > In the action (this action is only for the search results): > public ActionForward execute(ActionMapping mapping, ActionForm > form, > HttpServletRequest request, HttpServletResponse response) throws > Exception > { > SkuSearchForm skuform = (SkuSearchForm) form; > HttpSession session = request.getSession(); > User user = new User(); > Order order = new Order(); > ArrayList products = new ArrayList(); > > ArrayList results = new ArrayList(); > user = (User)session.getAttribute("User"); > order = user.getOrder(user.getCurrOrder()); > products = order.getProducts(); > int number = 0; > int count = 0; > > Iterator iter = results.iterator(); > //there is nothing happening in here as there is no results for some > reason. > while(iter.hasNext()) > { > Product p = (Product) iter.next(); > if(p.getNumProducts() != 0 ) > { > products.add(p); > } > > count++; > } > { > count = 1; > Product p = new Product("TestProd " + > count, "TestDesc"+count + " > " +count, 10, new BigDecimal("101.0")); > products.add(p
Re: Textfield problem with pulling value out.
On 10/19/06, Adam K <[EMAIL PROTECTED]> wrote: Hi all I have been working on this probelm for the past couple of days, and don't seem to be making any progress on it. I am fairly certain it is a problem with my understanding of struts, and as such it makes it quite difficult for me to solve the problem myself. I am trying to use a textfield and pull values from it. The following explains the scenario. User clicks on a page, page loads with a form that has a textfield. User enters search criteria and submits form. This works fine. Page returns with the search form and textfield, as well as a second form that displays the results of the search. This also works fine. The user then goes through the results filling in numbers for each result indicating how many of each they would like to order and then submit the form. This is where the problem results. I end up gettting an error from the page anytime I submit the form where there is 1 or more results. Submitting with no results works fine and the page loads correctly. Submitting with 1 result errors out with java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 Submitting with 10 results errors out with: java.lang.IndexOutOfBoundsException: Index: 2, Size: 0 Submitting with 100 results errors with : java.lang.IndexOutOfBoundsException: Index: 6, Size: 0 Submitting with 200 results errors with : java.lang.IndexOutOfBoundsException: Index: 155, Size: 0 The number seems to be random (I am guessing it is how far into the form it gets before the error is encountered) Any help on this would be much appreciated. I am including all the information that I believe to be important but would have no problem including more. In the jsp form there is: Search Add To Order Product Product Desc Quantity post the getter method for the numProducts. that might be causing the problem. NO RESULTS In the action (this action is only for the search results): public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { SkuSearchForm skuform = (SkuSearchForm) form; HttpSession session = request.getSession(); User user = new User(); Order order = new Order(); ArrayList products = new ArrayList(); ArrayList results = new ArrayList(); user = (User)session.getAttribute("User"); order = user.getOrder(user.getCurrOrder()); products = order.getProducts(); int number = 0; int count = 0; Iterator iter = results.iterator(); //there is nothing happening in here as there is no results for some reason. while(iter.hasNext()) { Product p = (Product) iter.next(); if(p.getNumProducts() != 0 ) { products.add(p); } count++; } { count = 1; Product p = new Product("TestProd " + count, "TestDesc"+count + " " +count, 10, new BigDecimal("101.0")); products.add(p); results.add(p); count++; } order.setProducts(products); order.setOrderId("ID12"); user.changeOrder(order, "ID12"); skuform.setResults(results); return mapping.findForward("success"); } In the form (The methods I thought were appropriate): public void setResults(ArrayList results) { this.results=results; } public ArrayList getResults() { return this.results; } public Product getResult(int index) { if(this.results == null) { this.results = new ArrayList(); } while(index>= this.results.size())
Textfield problem with pulling value out.
Hi all I have been working on this probelm for the past couple of days, and don't seem to be making any progress on it. I am fairly certain it is a problem with my understanding of struts, and as such it makes it quite difficult for me to solve the problem myself. I am trying to use a textfield and pull values from it. The following explains the scenario. User clicks on a page, page loads with a form that has a textfield. User enters search criteria and submits form. This works fine. Page returns with the search form and textfield, as well as a second form that displays the results of the search. This also works fine. The user then goes through the results filling in numbers for each result indicating how many of each they would like to order and then submit the form. This is where the problem results. I end up gettting an error from the page anytime I submit the form where there is 1 or more results. Submitting with no results works fine and the page loads correctly. Submitting with 1 result errors out with java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 Submitting with 10 results errors out with: java.lang.IndexOutOfBoundsException: Index: 2, Size: 0 Submitting with 100 results errors with : java.lang.IndexOutOfBoundsException: Index: 6, Size: 0 Submitting with 200 results errors with : java.lang.IndexOutOfBoundsException: Index: 155, Size: 0 The number seems to be random (I am guessing it is how far into the form it gets before the error is encountered) Any help on this would be much appreciated. I am including all the information that I believe to be important but would have no problem including more. In the jsp form there is: Search Add To Order Product Product Desc Quantity NO RESULTS In the action (this action is only for the search results): public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { SkuSearchForm skuform = (SkuSearchForm) form; HttpSession session = request.getSession(); User user = new User(); Order order = new Order(); ArrayList products = new ArrayList(); ArrayList results = new ArrayList(); user = (User)session.getAttribute("User"); order = user.getOrder(user.getCurrOrder()); products = order.getProducts(); int number = 0; int count = 0; Iterator iter = results.iterator(); //there is nothing happening in here as there is no results for some reason. while(iter.hasNext()) { Product p = (Product) iter.next(); if(p.getNumProducts() != 0 ) { products.add(p); } count++; } { count = 1; Product p = new Product("TestProd " + count, "TestDesc"+count + " " +count, 10, new BigDecimal("101.0")); products.add(p); results.add(p); count++; } order.setProducts(products); order.setOrderId("ID12"); user.changeOrder(order, "ID12"); skuform.setResults(results); return mapping.findForward("success"); } In the form (The methods I thought were appropriate): public void setResults(ArrayList results) { this.results=results; } public ArrayList getResults() { return this.results; } public Product getResult(int index) { if(this.results == null) {
html:multibox
Hi, I have a peculiar requirement . I have 8 check boxes and corresponding 8 text boxes for questions(8 question textboxes) and 8 text boxes for answers(8 answer text boxes).User checks the check box-->enters the question in corresponding question textbox and enters the answer in the corresponding answer textbox. I have to pass the data from and to DB. What is the best way to generate these in Struts? Notice: All email and instant messages (including attachments) sent to or from Franklin Templeton Investments (FTI) personnel may be retained, monitored and/or reviewed by FTI and its agents, or authorized law enforcement personnel, without further notice or consent. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Drag-and-drop struts-aware IDE?
We are constantly getting pressure to consider .NET development because it is faster than our traditional J2EE/Struts work. After an in-depth comparison of the two, the main advantage of .NET in regard to "speed of development" seems to be that you can easily drag and drop a few controls, build and presto! You get a running application. I was wondering if there are any *good* IDEs or preferably Eclipse plug-ins that support this type of behavior for a recent version of Struts (1.2.9, 1.3.5, or 2.0.x). I know that IBM's RAD6 is supposed to do this, but apparently it is still hopelessly stuck at Struts 1.1. Any advice would be welcome.
RE: Change an action of a form with javascript
From: José María Tristán [mailto:[EMAIL PROTECTED] > docuemt.forms[0].action = new action; and I call the submit. That's a typo, right? Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts2 Tiles Integration
Dave Newton wrote: From: Dean Crothers [mailto:[EMAIL PROTECTED] What I'd like to know is how do I configure Struts2 to find the tiles-def.xml? Hmm, I must have missed the listener; I'm using the servlet. The StrutsTiles listener adds some extra feature, such as allowing you to utilize Freemarker templates within tiles and still have access to the Struts tags available when using a freemarker result. What's the symptom? I'm using Tiles with no issues on Struts2. 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: [s2] issue
On 10/18/06 11:17 PM, "Ted Husted" <[EMAIL PROTECTED]> wrote: > (ActionComponent.java:137) > > is > > writer.flush(); > > which implies a problem with the result rather than the action. > > Does the exception go away if executeResult is false? Hi Ted, I removed executeResult from the tag and the NPE is still happening. FYI: I'm using the Struts-2.0.1 all download, with the included Xwork2 jars. Just in case that would impact this. Take care, Mark - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Change an action of a form with javascript
Hello: I have a form whith a default action. When any use pres a button I call to a function on javascript that change the value of action: docuemt.forms[0].action = new action; and I call the submit. But, this return me this error: mensaje No action instance for path /coffeenet/ExistenciasActuales/blank could be created descripción El servidor encontró un error interno (No action instance for path /coffeenet/ExistenciasActuales/blank could be created) que hizo que no pudiera rellenar este requerimiento. When I have two forms, the call to submit is ok. Why? Thank you very much. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Struts2 Tiles Integration
From: Dean Crothers [mailto:[EMAIL PROTECTED] > What I'd like to know is how do I configure Struts2 to find the > tiles-def.xml? Hmm, I must have missed the listener; I'm using the servlet. What's the symptom? I'm using Tiles with no issues on Struts2. Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
optionsCollection and messages
Hello, How to use html:optionsCollection together with struts messages (from .properties file)? When I'm setting label value for optionsCollection, I'm setting the property which will be printed. Is it possible to set property which will be _key_ of message which will be printed? Something like: (labelKey is not implemented but I would like to get something working like this above) Best regards, Konrad - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Struts with hibernate
Please once again check the jar list. Hibernate3.jar file should be there in the list. Session class is available in hibernate3.jar file. Thanks Ashok -Original Message- From: Gomathi [mailto:[EMAIL PROTECTED] Sent: Thursday, October 19, 2006 3:35 PM To: Struts Users Mailing List Subject: reg:Struts with hibernate hai, I am working on struts with hibernate.I included all jar file into libraries. Whenever i am deplyong and execute firstjsp it faces the problem like java.lang.NoClassDefFoundError: org/hibernate/Session action.EmployeeAction.execute(EmployeeAction.java:31) org.apache.struts.action.RequestProcessor.processActionPerform(RequestPr ocessor.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 How to solve this from gomes - This e-mail message may contain privileged and/or confidential information, and is intended to be received only by persons entitled to receive such information. If you have received this e-mail in error, please notify the sender immediately. Please delete it and all attachments from any servers, hard drives or any other media. Other use of this e-mail by you is strictly prohibited. All e-mails and attachments sent and received are subject to monitoring, reading and archival by Monsanto. The recipient of this e-mail is solely responsible for checking for the presence of "Viruses" or other "Malware". Monsanto accepts no liability for any damage caused by any such code transmitted by or accompanying this e-mail or any attachment. - - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
reg:Struts with hibernate
hai, I am working on struts with hibernate.I included all jar file into libraries. Whenever i am deplyong and execute firstjsp it faces the problem like java.lang.NoClassDefFoundError: org/hibernate/Session action.EmployeeAction.execute(EmployeeAction.java:31) org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.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 How to solve this from gomes
test only
test