[OT?] Testing with Fit
hi, did anyone played with FIT (FrameworkForIntegratedTest) http://fit.c2.com/ for (struts-) acceptance test? Cheers, Matthias - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Struts tiles and html frames.
What are advantages of tiles over html frames? Brati Sankar Ghosh Tata Consultancy Services Mailto: [EMAIL PROTECTED] Website: http://www.tcs.com DISCLAIMER: The information contained in this message is intended only and solely for the addressed individual or entity indicated in this message and for the exclusive use of the said addressed individual or entity indicated in this message (or responsible for delivery of the message to such person) and may contain legally privileged and confidential information belonging to Tata Consultancy Services. It must not be printed, read, copied, disclosed, forwarded, distributed or used (in whatsoever manner) by any person other than the addressee. Unauthorized use, disclosure or copying is strictly prohibited and may constitute unlawful act and can possibly attract legal action, civil and/or criminal. The contents of this message need not necessarily reflect or endorse the views of Tata Consultancy Services on any subject matter. Any action taken or omitted to be taken based on this message is entirely at your risk and neither the originator of this message nor Tata Consultancy Services takes any responsibility or liability towards the same. Opinions, conclusions and any other information contained in this message that do not relate to the official business of Tata Consultancy Services shall be understood as neither given nor endorsed by Tata Consultancy Services or any affiliate of Tata Consultancy Services. If you have received this message in error, you should destroy this message and may please notify the sender by e-mail. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [OT] Struts Users BOF in London in Monday 7th June 2004
Final Call! UK Struts Users We have more people (including myself) who are meeting for informal drinks on Monday 7th June 2004 19:15 GMT @ Waxy O'Connor (Irish Pub) in central London, the West End. Peter Pilgrim / CSFB Tim Penhey Niall Pemberton ( Mike Raath / Bar Cap ) Charles Cordingley If there's anyone else interested please contact me off-list. This is sort of pre-Java One warm-up for me. So it does not have to be about exclusive talk about Struts. Any aspect of J2EE would do. -- Peter Pilgrim Operations/IT - Credit Suisse First Boston, 10 South Colonnade, London E14 4QJ, United Kingdom Tel: +44 (0)207 883 4447 == This message is for the sole use of the intended recipient. If you received this message in error please delete it and notify us. If this message was misdirected, CSFB does not waive any confidentiality or privilege. CSFB retains and monitors electronic communications sent through its network. Instructions transmitted over this system are not binding on CSFB until they are confirmed by us. Message transmission is not guaranteed to be secure. == - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
converting bean:write to c:out
hi, i am converting some of the jsp's to jstl. how do i convert this line to jstl: bean:write name=info property=value(email)/ where getValue is defined as HashMap values = new HashMap(); . public String get(String name){ String value = (String) values.get(name); return value; } hoping for your immediate response. thanks a lot. -richard
odd errors certainly related to Tiles and/or Struts, occurs only with Mozilla
Hello all, I have a webApp using Struts and Tiles. I have a strange log occurring when I request pages using action and Tiles, but only if the browser is Mozilla (I tested with IE and Opera, it's fine). This error appeared recently, it did not just appear because I started using Tiles and Struts' actions. I goggled on the error, but I couldn't find anything helpful. If a tag is missing an attribute somewhere (as the log suggests), I don't understand why the errors occurs only with Mozilla. Any help would be really appreciated. If any piece of code apart from the log below could help, please ask, I don't know what could be relevant. -- Seb' The log is the following : org.apache.jasper.JasperException: Error - tag.getAsString : component context is not defined. Check tag syntax at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper. java:254) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:29 5) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appli cationFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFi lterChain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperVa lve.java:256) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext .invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java :480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextVa lve.java:191) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext .invokeNext(StandardPipeline.java:643) at org.jboss.web.tomcat.security.JBossSecurityMgrRealm.invoke(JBossSecuri tyMgrRealm.java:220) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext .invokeNext(StandardPipeline.java:641) at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve. java:246) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext .invokeNext(StandardPipeline.java:641) at org.jboss.web.tomcat.tc4.statistics.ContainerStatsValve.invoke(Contain erStatsValve.java:76) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext .invokeNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java :480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2 417) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.ja va:180) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext .invokeNext(StandardPipeline.java:643) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcher Valve.java:171) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext .invokeNext(StandardPipeline.java:641) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.ja va:172) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext .invokeNext(StandardPipeline.java:641) at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(Security AssociationValve.java:65) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext .invokeNext(StandardPipeline.java:641) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:5 77) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext .invokeNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java :480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValv e.java:174) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext .invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java :480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:197 ) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java: 781) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proces sConnection(Http11Protocol.java:549) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java: 605) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPo ol.java:677) at
converting bean:write to c:out
hi, i am converting some of the jsp's to jstl. how do i convert this line to jstl: bean:write name=info property=value(email)/ where getValue is defined as HashMap values = new HashMap(); . public String get(String name){ String value = (String) values.get(name); return value; } hoping for your immediate response. thanks a lot. -richard - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Taglib: how do you call a method like java.util.List.size() from the property of a tag?
Hi Riyad, here is a simple example: bean:size name=userList id=userListSize/ logic:greaterThan name=userListSize value=20 /logic:graterThan BTW, you are doing a very good job on MyEclipseIDE Team! Henrique Viecili - Original Message - From: Riyad Kalla To: Struts Users Mailing List Sent: Saturday, June 05, 2004 9:15 PM Subject: Taglib: how do you call a method like java.util.List.size() from the property of a tag? I'm trying to do something like: logic:greaterThan name=userList property=size value=20 !-- Display paging controls -- /logic:greaterThan but I'm obviously getting an exception on size because it doesn't follow JB naming conventions. How do I call this method? Do I NEED to use EL for this? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Checking a default option in radio
Or do it in the reset() method. -- James Mitchell Software Engineer / Open Source Evangelist EdgeTech, Inc. 678.910.8017 AIM: jmitchtx - Original Message - From: James Mitchell [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Monday, June 07, 2004 7:35 AM Subject: Re: Checking a default option in radio In the action leading to that page, check to see if that property is set, if not, set it to the value you wish to be the default. -- James Mitchell Software Engineer / Open Source Evangelist EdgeTech, Inc. 678.910.8017 AIM: jmitchtx - Original Message - From: Satish Kataria [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, June 07, 2004 7:09 AM Subject: Checking a default option in radio Hi, Can I select a particular option as the default option in a set of radio buttons. If yes, then what is the way of doing it using nested:radio tag. Any code snippet will be very helpful Thanks, Satish - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[SOLVED] troubles using Html:rewrite (jsessionId and Apache)
After some Google / Apache list archives search, i solved my problem (and notice it was full of topic on this list ;-) For other peoples having same troubles : I've added mod_rewrite to my apache (compile with --enable-module=rewrite) I've set this rule in httpd.conf : RewriteEngine on RewriteRule ^([^;]*);jsessionid=.*$ /usr/local/tomcat/webapps$1 Nico. Hi all, I've got some troubles using html:rewrite on a Tomcat(4.1.30)/Apache(2.0.49) server: My tiles base layout uses html:rewrite to include a link to the CSS stylesheet : style type=text/css !-- @import url(html:rewrite page=/style/main.css /); -- /style On first access to the page, rewrite adds jsessionId to the URL : @import url(webapp/style/main.css;jsessionid=D0E15B858C994EC33A72CD826BED3C0C); As Apache is configured to handle static files (via JK config), it seems it doesn't like the jsessionId. How can I configure apache / JK to work fine with this ? or How can I use html:rewrite not to add jsessionId ? Nico. Our name has changed. Please update your address book to the following format: [EMAIL PROTECTED]. This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
include action into jsp page
I want to include an action in a jsp page, something like jsp:include page=/myaction.do /. How can I do? Cerchi un laboratorio fotografico aperto 24 ore su 24? Stampa le tue foto digitali su Kataweb e le ricevi a domicilio in 48 ore. http://www.kataweb.it/foto - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: odd errors certainly related to Tiles and/or Struts, occurs o nly with Mozilla
Hi, A little more information. My investigation lead me to the conclusion that this error is somehow related to Tiles includes. When requesting the page with mozilla, I noticed there is a delay between the time the text is visible and the time the browser stop loading and the error is logged on the server. It might not be relevant though... I reproduced the bug with the minimum code. I'm using a Struts action forwarding to a Tiles def, my struts-config has the following code : action forward=tilesDef.pageModel.test path=/login / The Tiles def is as follow in the Tiles-def.xml file : definition name=tilesDef.pageModel.test path=/layout/pageModelTest.jsp put name=pageFooter value=/footer.jsp / /definition The pageModelTest.jsp page : %@ taglib uri=/WEB-INF/struts-html.tld prefix=html % %@ taglib uri=/WEB-INF/struts-tiles.tld prefix=tiles % html:html head html:base / /head body topmargin=0 leftmargin=0 bgcolor=#FF table border=0 cellspacing=0 cellpadding=0 tr tdtiles:insert attribute=pageFooter flush=true //td td width=1img src= width=1 height=1/td /tr /table /body /html:html Note : the bug does not appear when pageModelTest.jsp does not contain the tiles:insert tag. The footer.jsp page : brbr centeriCopyright my company/i/center Note : the bug does not appear when I directly request footer.jsp. I'm completely clueless on the subject now... :( Please help, -- Seb' -Message d'origine- De : Lesaint Sébastien Envoyé : lundi 7 juin 2004 12:50 À : [EMAIL PROTECTED] Objet : odd errors certainly related to Tiles and/or Struts, occurs only with Mozilla Hello all, I have a webApp using Struts and Tiles. I have a strange log occurring when I request pages using action and Tiles, but only if the browser is Mozilla (I tested with IE and Opera, it's fine). This error appeared recently, it did not just appear because I started using Tiles and Struts' actions. I goggled on the error, but I couldn't find anything helpful. If a tag is missing an attribute somewhere (as the log suggests), I don't understand why the errors occurs only with Mozilla. Any help would be really appreciated. If any piece of code apart from the log below could help, please ask, I don't know what could be relevant. -- Seb' The log is the following : org.apache.jasper.JasperException: Error - tag.getAsString : component context is not defined. Check tag syntax at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper. java:254) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:29 5) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appli cationFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFi lterChain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperVa lve.java:256) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext .invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java :480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextVa lve.java:191) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext .invokeNext(StandardPipeline.java:643) at org.jboss.web.tomcat.security.JBossSecurityMgrRealm.invoke(JBossSecuri tyMgrRealm.java:220) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext .invokeNext(StandardPipeline.java:641) at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve. java:246) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext .invokeNext(StandardPipeline.java:641) at org.jboss.web.tomcat.tc4.statistics.ContainerStatsValve.invoke(Contain erStatsValve.java:76) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext .invokeNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java :480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2 417) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.ja va:180) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext .invokeNext(StandardPipeline.java:643) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcher Valve.java:171) at
RE: include action into jsp page
Hi, I had the same problem. I solved it by using Tiles definitions. jsp:include will not work. There is some ugly work-around though, but my advice is to use Tiles event if it requires some time to understand and use. -- Seb' -Message d'origine- De : Marco Rossi [mailto:[EMAIL PROTECTED] Envoyé : lundi 7 juin 2004 08:56 À : [EMAIL PROTECTED] Objet : include action into jsp page I want to include an action in a jsp page, something like jsp:include page=/myaction.do /. How can I do? Cerchi un laboratorio fotografico aperto 24 ore su 24? Stampa le tue foto digitali su Kataweb e le ricevi a domicilio in 48 ore. http://www.kataweb.it/foto - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: odd errors certainly related to Tiles and/or Struts, occurs o nly with Mozilla
Lesaint Sébastien wrote: Hi, A little more information. My investigation lead me to the conclusion that this error is somehow related to Tiles includes. When requesting the page with mozilla, I noticed there is a delay between the time the text is visible and the time the browser stop loading and the error is logged on the server. It might not be relevant though... I reproduced the bug with the minimum code. I'm using a Struts action forwarding to a Tiles def, my struts-config has the following code : action forward=tilesDef.pageModel.test path=/login / try action forward=/login path=tilesDef.pageModel.test/ Wolfgang The Tiles def is as follow in the Tiles-def.xml file : definition name=tilesDef.pageModel.test path=/layout/pageModelTest.jsp put name=pageFooter value=/footer.jsp / /definition The pageModelTest.jsp page : %@ taglib uri=/WEB-INF/struts-html.tld prefix=html % %@ taglib uri=/WEB-INF/struts-tiles.tld prefix=tiles % html:html head html:base / /head body topmargin=0 leftmargin=0 bgcolor=#FF table border=0 cellspacing=0 cellpadding=0 tr tdtiles:insert attribute=pageFooter flush=true //td td width=1img src= width=1 height=1/td /tr /table /body /html:html Note : the bug does not appear when pageModelTest.jsp does not contain the tiles:insert tag. The footer.jsp page : brbr centeriCopyright my company/i/center Note : the bug does not appear when I directly request footer.jsp. I'm completely clueless on the subject now... :( Please help, - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: caching data in application server and EJB usage
And why don´t you cache it in Oracle? Isn´t it enough? -Mensaje original- De: Zhang, Larry (L.) [mailto:[EMAIL PROTECTED] Enviado el: lunes, 07 de junio de 2004 15:54 Para: Struts Users Mailing List Asunto: caching data in application server and EJB usage I have a Oracle table that contains more than 1 rows and this table is almost a read-only table -- meaning that our web application uses this table just for read purposes. Since accessing the data in this table is frequent, so we decided to do some sort of caching so that the performance is meet. We cache the data from this table to application server's memory. My question is that in this case can we use EJB somehow to achieve the same goal? We select this because caching the data in the memory is memory expensive and our system has some memory constraints. Can you also discuss the pros and cons of using EJB and pure Java object caching (of data to application server). Thanks for your answers. Larry Zhang - 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: Front Controller?
Model 2 / MVC / Front Controller are all the same thing. Hmm... No, they are not. Front Controller and MVC are similar, but are NOT the same design patterns! Front Controller is used for a sequence of predefined steps (like a check out on amazon). MVC is used for separation of Model (data handling), View (presentation handling), Conroller (where to go). Whatever it is, those 2 design patterns are not the same. In Struts the Front Controller is the ActionServlet, it receives/handles/dispatches every single request that comes into your web app. You write actions that are like units of functionality, then specify in a mapping file the relationship between URLs and the Action, then depending on where the user is going, the ActionServlet will call the appropriate Action at the appropriate time to handle the user's request. Are you suggesting that Struts gives you the ability to specify a sequence of actions? If so, I am not following how one would do that. From what I understand Struts would give you the ability to specify where each action ends up, and in that sense you ARE specifying a sequence of actions. Is that what you mean? Thanks, Yaakov. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: html:link and map of request parameters
Here's how I do it: (This demonstrates both static and dynamic values for use with the html:link) ... ... jsp:useBean id=myLinkParams class=java.util.HashMap/ c:set target=${myLinkParams} property=id value=${dto.id}/ c:set target=${myLinkParams} property=type value=edit/ ...later down the page... html:link action=/manageUserAccount name=myLinkParams bean:message key=edit.user.link.text/ /html:link ... ... -- James Mitchell Software Engineer / Open Source Evangelist EdgeTech, Inc. 678.910.8017 AIM: jmitchtx - Original Message - From: Nicolas De Loof [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Monday, June 07, 2004 11:31 AM Subject: html:link and map of request parameters Hi, What is the 'cleaner' way to define and populate a map to be used with html:link tags ? Notice I can use JSTL. Nico. Our name has changed. Please update your address book to the following format: [EMAIL PROTECTED]. This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
R: Front Controller?
Hi, I think that MVC and Front Controller are slightly different because MVC (or Model 2) is an architectural pattern and Front Controller is a design pattern. Front Controller design pattern is a possible solution for the Controller element inside the MVC pattern. BR Amleto -Messaggio originale- Da: Chaikin, Yaakov Y (US SSA) [mailto:[EMAIL PROTECTED] Inviato: lunedì 7 giugno 2004 18.13 A: Struts Users Mailing List Oggetto: RE: Front Controller? Model 2 / MVC / Front Controller are all the same thing. Hmm... No, they are not. Front Controller and MVC are similar, but are NOT the same design patterns! Front Controller is used for a sequence of predefined steps (like a check out on amazon). MVC is used for separation of Model (data handling), View (presentation handling), Conroller (where to go). Whatever it is, those 2 design patterns are not the same. In Struts the Front Controller is the ActionServlet, it receives/handles/dispatches every single request that comes into your web app. You write actions that are like units of functionality, then specify in a mapping file the relationship between URLs and the Action, then depending on where the user is going, the ActionServlet will call the appropriate Action at the appropriate time to handle the user's request. Are you suggesting that Struts gives you the ability to specify a sequence of actions? If so, I am not following how one would do that. From what I understand Struts would give you the ability to specify where each action ends up, and in that sense you ARE specifying a sequence of actions. Is that what you mean? Thanks, Yaakov. - 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: caching data in application server and EJB usage
If you cache in the oracle you still need a connection to it to get the data when running Java. Please remember that I want to ask if we can use EJB replacing the pure Java object caching... -Original Message- From: Jose Ramon Diaz [mailto:[EMAIL PROTECTED] Sent: Monday, June 07, 2004 10:12 AM To: 'Struts Users Mailing List' Subject: RE: caching data in application server and EJB usage And why don´t you cache it in Oracle? Isn´t it enough? -Mensaje original- De: Zhang, Larry (L.) [mailto:[EMAIL PROTECTED] Enviado el: lunes, 07 de junio de 2004 15:54 Para: Struts Users Mailing List Asunto: caching data in application server and EJB usage I have a Oracle table that contains more than 1 rows and this table is almost a read-only table -- meaning that our web application uses this table just for read purposes. Since accessing the data in this table is frequent, so we decided to do some sort of caching so that the performance is meet. We cache the data from this table to application server's memory. My question is that in this case can we use EJB somehow to achieve the same goal? We select this because caching the data in the memory is memory expensive and our system has some memory constraints. Can you also discuss the pros and cons of using EJB and pure Java object caching (of data to application server). Thanks for your answers. Larry Zhang - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
R: Front Controller?
Hi, Struts contains a Front Controller implementation! Anyway, if you want to see the Front Controller design pattern and others please visit http://www.corej2eepatterns.com/index.htm BR Amleto -Messaggio originale- Da: Chaikin, Yaakov Y (US SSA) [mailto:[EMAIL PROTECTED] Inviato: lunedì 7 giugno 2004 18.30 A: Struts Users Mailing List Oggetto: RE: Front Controller? Hi, I think that MVC and Front Controller are slightly different because MVC (or Model 2) is an architectural pattern and Front Controller is a design pattern. Front Controller design pattern is a possible solution for the Controller element inside the MVC pattern. Right. So, is there an existing implementation of this somewhere or I would have write my own. Thanks, Yaakov. BR Amleto -Messaggio originale- Da: Chaikin, Yaakov Y (US SSA) [mailto:[EMAIL PROTECTED] Inviato: lunedì 7 giugno 2004 18.13 A: Struts Users Mailing List Oggetto: RE: Front Controller? Model 2 / MVC / Front Controller are all the same thing. Hmm... No, they are not. Front Controller and MVC are similar, but are NOT the same design patterns! Front Controller is used for a sequence of predefined steps (like a check out on amazon). MVC is used for separation of Model (data handling), View (presentation handling), Conroller (where to go). Whatever it is, those 2 design patterns are not the same. In Struts the Front Controller is the ActionServlet, it receives/handles/dispatches every single request that comes into your web app. You write actions that are like units of functionality, then specify in a mapping file the relationship between URLs and the Action, then depending on where the user is going, the ActionServlet will call the appropriate Action at the appropriate time to handle the user's request. Are you suggesting that Struts gives you the ability to specify a sequence of actions? If so, I am not following how one would do that. From what I understand Struts would give you the ability to specify where each action ends up, and in that sense you ARE specifying a sequence of actions. Is that what you mean? Thanks, Yaakov. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Front Controller?
Struts contains a Front Controller implementation! Could you point me to a particular class? Or are you saying that the default class is already following Front Controller? Thanks, Yaakov. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
R: Front Controller?
Hi, Front Controller design pattern contains several collaborations and strategies in order to implements the pattern. See the link that i sent you before in order to understand what i mean. Anyway, the FrontController class inside Struts is the ActionServlet class and the ApplicationController is RequestProcessor class. BR Amleto -Messaggio originale- Da: Chaikin, Yaakov Y (US SSA) [mailto:[EMAIL PROTECTED] Inviato: lunedì 7 giugno 2004 18.44 A: Struts Users Mailing List Oggetto: RE: Front Controller? Struts contains a Front Controller implementation! Could you point me to a particular class? Or are you saying that the default class is already following Front Controller? Thanks, Yaakov. - 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: Front Controller?
And note, that there is a *new* Processor-Clazz in /contrib, which implements http://jakarta.apache.org/commons/sandbox/chain/ Cheers! -Original Message- From: Amleto Di Salle [mailto:[EMAIL PROTECTED] Sent: Monday, June 07, 2004 6:53 PM To: 'Struts Users Mailing List' Subject: R: Front Controller? Hi, Front Controller design pattern contains several collaborations and strategies in order to implements the pattern. See the link that i sent you before in order to understand what i mean. Anyway, the FrontController class inside Struts is the ActionServlet class and the ApplicationController is RequestProcessor class. BR Amleto -Messaggio originale- Da: Chaikin, Yaakov Y (US SSA) [mailto:[EMAIL PROTECTED] Inviato: lunedì 7 giugno 2004 18.44 A: Struts Users Mailing List Oggetto: RE: Front Controller? Struts contains a Front Controller implementation! Could you point me to a particular class? Or are you saying that the default class is already following Front Controller? Thanks, Yaakov. - 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: converting bean:write to c:out
c:out value=${info.value.email}/ -- or -- c:out value=${info.value['email']}/ Richard Raquepo wrote: hi, i am converting some of the jsp's to jstl. how do i convert this line to jstl: bean:write name=info property=value(email)/ where getValue is defined as HashMap values = new HashMap(); . public String get(String name){ String value = (String) values.get(name); return value; } hoping for your immediate response. thanks a lot. -richard - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: file upload problem(illegal argument)
What is the type of the property in your form? It should be org.apache.struts.upload.FormFile. swarna wrote: Hi, I am trying to do file upload using struts1.1. I am getting illegal argument type exception(stack trace attached below). I am struggling to fix this since three days. I would really appreciate any kind of help. I am using web logic 8.1, eclipse and java for my development. I created a form with property type FormFile. jsp with input field html:file property=theFile/ and a submit buttonhtml:submit/. In action class I am just getting the file with form.getTheFile() method. but the problem is that when I hit submit button I am getting the following exception: Error HTTP BEA-101017 [ServletContext(id=314 99063,name=cms-int-20040605,context-path=/cms-int-20040605)] Root cause of Servl etException. java.lang.IllegalArgumentException: argument type mismatch at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces sorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.apache.commons.beanutils.PropertyUtils.setSimpleProperty(Property Utils.java:1789) at org.apache.commons.beanutils.PropertyUtils.setNestedProperty(Property Utils.java:1684) at org.apache.commons.beanutils.PropertyUtils.setProperty(PropertyUtils. java:1713) at org.apache.commons.beanutils.BeanUtils.setProperty(BeanUtils.java:101 9) at org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:808) at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:1252) at org.apache.struts.action.RequestProcessor.processPopulate(RequestProc essor.java:821) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.ja va:254) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:148 2) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run (ServletStubImpl.java:971) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm pl.java:402) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm pl.java:305) at weblogic.servlet.internal.WebAppServletContext$ServletInvocationActio n.run(WebAppServletContext.java:6350) at weblogic.security.acl.internal.AuthenticatedSubject.doAs(Authenticate dSubject.java:317) at weblogic.security.service.SecurityManager.runAs(SecurityManager.java: 118) at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppSe rvletContext.java:3635) at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestIm pl.java:2585) at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197) at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170) Any help would be greately appreciated. thanks - Do you Yahoo!? Friends. Fun. Try the all-new Yahoo! Messenger - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: converting bean:write to c:out
Well, sort of. In the typical example of a mapped property (like the one Richard provided), the map itself isn't exposed as a JavaBean property, so JSTL can't get at the information it contains: private final Map values = new HashMap(); public void setValue(String key, Object value) { values.put(key, value); } public Object getValue(String key) { return values.get(key); } So, in order for JSTL to get at that information, you have to expose the map as a JavaBean property. For example, by adding a method like: public Map getValues() { return values; } Then JSTL can be used like: c:out value=${info.values.email}/ Quoting Bill Siggelkow [EMAIL PROTECTED]: c:out value=${info.value.email}/ -- or -- c:out value=${info.value['email']}/ Richard Raquepo wrote: hi, i am converting some of the jsp's to jstl. how do i convert this line to jstl: bean:write name=info property=value(email)/ where getValue is defined as HashMap values = new HashMap(); . public String get(String name){ String value = (String) values.get(name); return value; } hoping for your immediate response. thanks a lot. -richard -- Kris Schneider mailto:[EMAIL PROTECTED] D.O.Tech http://www.dotech.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tiles: Use layout definitions from config within jsp?
I've always used tile definitions exclusively defined in tiles-defs.xml in the past. Now, I would like to have some pages where I put the tiles:insert commands directly into the JSP. However, I'd like to use my existing layout definitions from the config file rather than re-definiting them in the JSP or a JSP include file. For example: tiles-defs.xml -- definition name=my.layout path=/layouts/my_layout.jsp extends=master.layout put name=header value=/tiles/header.jsp / put name=content value= / put name=footer value=/tiles/footer.jsp / /definition in my jsp - tiles:insert page=my.layout flush=true tiles:put name=content type=String My content here /tiles:put /tiles:insert This would allow me to take advantage of my existing layout definitions and layering that I have setup, while allowing a few JSP pages to have more control over the content population. This way, I wouldn't have to :put the header, footer, etc every time because it would be defined by the layout or one of the parent layouts. Is this possible? (More explanation for those who are curious about the context...) - I'm converting an existing web application to use tiles. In some of the JSP pages, logic in the page decides to hide everything except for a table containing content (for printing, etc) - including all navigation and layout structure. So, I would like to use tiles:insert in the JSP itself, and switch which layout I use and which pieces get populated based on the logic within the JSP page itself. Also, a number of JSPs will need to populate about 4 or 5 separate tiles into the layout, and it's much easier to define the content in the JSP itself, rather than split it into 4 or 5 separate files to be included into the layout. For example: tiles:insert page=my.layout flush=true tiles:put name=head type=String Stuff that belongs in the head of the document, like meta tags /tiles:put tiles:put name=onload type=String some javascript which should be inserted into the body's onload tag /tiles:put tiles:put name=content type=String My content here /tiles:put /tiles:insert Make sense? Thanks, Matt Kruse
Re: converting bean:write to c:out
Oops -- you're right Kris -- thanks for the clarification. Kris Schneider wrote: Well, sort of. In the typical example of a mapped property (like the one Richard provided), the map itself isn't exposed as a JavaBean property, so JSTL can't get at the information it contains: private final Map values = new HashMap(); public void setValue(String key, Object value) { values.put(key, value); } public Object getValue(String key) { return values.get(key); } So, in order for JSTL to get at that information, you have to expose the map as a JavaBean property. For example, by adding a method like: public Map getValues() { return values; } Then JSTL can be used like: c:out value=${info.values.email}/ Quoting Bill Siggelkow [EMAIL PROTECTED]: c:out value=${info.value.email}/ -- or -- c:out value=${info.value['email']}/ Richard Raquepo wrote: hi, i am converting some of the jsp's to jstl. how do i convert this line to jstl: bean:write name=info property=value(email)/ where getValue is defined as HashMap values = new HashMap(); . public String get(String name){ String value = (String) values.get(name); return value; } hoping for your immediate response. thanks a lot. -richard - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [struts] Digest Number 3955
Hi CAn anyone of you tell me the reason for the following error. javax.servlet.ServletException: Cannot find bean org.apache.struts.taglib.html.BEAN in any scope org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:867) org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:800) org.apache.jsp.jsp.index_jsp._jspService(index_jsp.java:84) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133) javax.servlet.http.HttpServlet.service(HttpServlet.java:856) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:311) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248) javax.servlet.http.HttpServlet.service(HttpServlet.java:856) On 7 Jun 2004 07:40:36 -, [EMAIL PROTECTED] wrote: Yahoo! Groups Sponsor ~-- Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar. Now with Pop-Up Blocker. Get it for free! http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/5cFolB/TM ~- There are 14 messages in this issue. Topics in this digest: 1. Re: Struts dyanmic master detail form From: nikhil walvekar [EMAIL PROTECTED] 2. Front Controller? From: Chaikin, Yaakov Y (US SSA) [EMAIL PROTECTED] 3. Re: Taglib: how do you call a method like java.util.List.size() from the property of a tag? From: Joe Germuska [EMAIL PROTECTED] 4. Re: Taglib: how do you call a method like java.util.List.size() from the property of a tag? From: Riyad Kalla [EMAIL PROTECTED] 5. Re: [Raw newbie] Struts/JSTL - A cople of urgent question (Message resources) From: Riyad Kalla [EMAIL PROTECTED] 6. Re: Front Controller? From: Riyad Kalla [EMAIL PROTECTED] 7. Re: [Raw newbie] Struts/JSTL - A cople of urgent question (Message resources) From: Joe Germuska [EMAIL PROTECTED] 8. RE: [OT] EJB/Struts Design Question From: Robert Taylor [EMAIL PROTECTED] 9. html:link to anchor in same fil (gettin action name in .jsp) From: [EMAIL PROTECTED] 10. file upload problem(illegal argument) From: swarna [EMAIL PROTECTED] 11. Re: file upload problem(illegal argument) From: atta-ur rehman [EMAIL PROTECTED] 12. Re: the difference between struts with JSTL tags and struts-el tags From: [EMAIL PROTECTED] 13. RE: Reload Ressources on the fly From: Sanoj, Antony (IE10) [EMAIL PROTECTED] 14. RE: Multiple Databases. From: Thiharie Rajesh [EMAIL PROTECTED] Message: 1 Date: Sun, 6 Jun 2004 11:06:03 +0100 (BST) From: nikhil walvekar [EMAIL PROTECTED] Subject: Re: Struts dyanmic master detail form Hi Shoaib, We have done such thing, for client side u need to have addNew row javascript. mapping those fields to form what you can do is you can have arrays declared in form bean, in your jsp when you write logic:iterate id=someId name=formBean property=yourArray type=classOfObjectInArray html:text name=someId property=objectProperty/ instead of this now here you specifiy indexed=true html:text indexed=true name=someId property=objectProperty/ /logic:iterate it will generate html code like (suppose you have got two objects in array) input type=text name=someId[0].objectProperty input type=text name=someId[1].objectProperty Now when you submit this form these fields are mapped to respective objects in array. This will solve your problem, now main code that you have to write is javascript for adding row. Now is this javascript you should increment index for field like this, if you add one row to above list (from javascript) it should look like input type=text name=someId[0].objectProperty input type=text name=someId[1].objectProperty input type=text name=someId[2].objectProperty That javascript should be able to increment this id. Instead of arrays you can also use arrayList but there are some other things that you have to do , you can try this. If you need some more help you can contact me. [EMAIL PROTECTED] wrote: Dear All, we are trying to create a master detail form, where in rows can be added dynamically on the client side can any body please tell me how to do it. We cant use arrays of objects of line items beacus its size has to be fixed.If we use Map we are not able to do the validations.Please guide . Regards Shoaib
Issue with the application context and web server alias names
I've seen something like this posted, but with no answers. I have an issue where I have an alias for an application. For eg. www.company.com/home/appname is an alias for www.company.com/appname, where appname is the context name of my app. When I use the html form tag in my app as follows: html:form action='view.do' What gets renderred is: form action='/appname/view.do' That links to: www.company.com/appname/view.do. The bad thing about that is that I need to have the /home in there. It's a long story why, but it needs to be there. Is there a way to configure struts to not append the context name? That would allow the form tag to render as: form action='view.do' which doesn't have a forward slash, then everything works fine, because it will submit to www.company.com/home/appname/view.do. Thanks, Frank... __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
Re: odd errors certainly related to Tiles and/or Struts, occurs o nly with Mozilla
Lesaint Sébastien wrote: Thanks for your answer, but it doesn't make sense. I tried it though, it doesn't work :) I can't call http://www.myserver.com/webApp/login.do anymore if I use it. It has to go through an action. action path=/login type=org.your.package.YourAction name=someForm scope=request validate=false forward name=toLogin path=tilesDef.pageModel.test/ /action in YourAction you have to return to: return(mapping.FindForward(toLogin)); -Message d'origine- De : Johannes Wolfgang Woger [mailto:[EMAIL PROTECTED] Envoyé : lundi 7 juin 2004 17:04 À : Struts Users Mailing List Objet : Re: odd errors certainly related to Tiles and/or Struts, occurs o nly with Mozilla Lesaint Sébastien wrote: Hi, A little more information. My investigation lead me to the conclusion that this error is somehow related to Tiles includes. When requesting the page with mozilla, I noticed there is a delay between the time the text is visible and the time the browser stop loading and the error is logged on the server. It might not be relevant though... I reproduced the bug with the minimum code. I'm using a Struts action forwarding to a Tiles def, my struts-config has the following code : action forward=tilesDef.pageModel.test path=/login / try action forward=/login path=tilesDef.pageModel.test/ Wolfgang The Tiles def is as follow in the Tiles-def.xml file : definition name=tilesDef.pageModel.test path=/layout/pageModelTest.jsp put name=pageFooter value=/footer.jsp / /definition The pageModelTest.jsp page : %@ taglib uri=/WEB-INF/struts-html.tld prefix=html % %@ taglib uri=/WEB-INF/struts-tiles.tld prefix=tiles % html:html head html:base / /head body topmargin=0 leftmargin=0 bgcolor=#FF table border=0 cellspacing=0 cellpadding=0 tr tdtiles:insert attribute=pageFooter flush=true //td td width=1img src= width=1 height=1/td /tr /table /body /html:html Note : the bug does not appear when pageModelTest.jsp does not contain the tiles:insert tag. The footer.jsp page : brbr centeriCopyright my company/i/center Note : the bug does not appear when I directly request footer.jsp. I'm completely clueless on the subject now... :( Please help, - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
logic:iterate beans and el
'bean1' is a bean created by logic:iterate and contains 'myHashMap'. I am trying to access the 'key' property of the bean so that i can set the property -'prop1'. setting the value of 'prop1' changes the value returned from the getter for 'prop2'. I have tried the following but it sets 'prop1' to the string literal pageScope.bean1.key instead of the evaluated expression for the bean. i am new to struts with el so any help is greatly appreciated. perhaps it is just a simple config error on my part.. logic:iterate id=bean1 name=aForm property=myHashMap jsp:setProperty name=aForm property=prop1 value=${pageScope.bean1.key}/ bean:write name=aForm property=prop2/ /logic:iterate - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
html:link problem ? Not able to lookup public property of bean
All, My code uses the html:link in the following way:- html:link forward=genFwd paramId=target paramName=menu paramProperty=name paramScope=session bean:write name=menu property=displayText scope=session / /html:link As per my understanding, it should produce a href=someurl?target= /a where, = session.getAttribute(menu).getName() [by reflection] = session.getAttribute(menu).getDisplayText() [by reflection] But for some reason, I am getting an No getter method name for bean menu error. I printed out the bean and it is the correct object that I am expecting has the getName() and getDisplayText() methods (they are public). After tracing the source code, it looks like the PropertyUtils class that resolves the methods is not able to find them by reflection is throwing an exception. I would appreciate your help ASAP. Thanks Ashwin. __ Do you Yahoo!? Friends. Fun. Try the all-new Yahoo! Messenger. http://messenger.yahoo.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
OT: Hibernate Session to User Session
I was reading in the Hibernate forums that when you have a WebApp DAO Hibernate DB design, and you open/close each Hibernate session at every single DAO method call (what I do now) its actually quite expensive, and is suggested that you attempt to maintain a Hibernate Session in conjunction with a user Session to increase performance. I had a question for anyone that has done this (without using SpringFramework). My gut-reaction to this was to add a HttpSessionListener to my webapp that created and stored a Hibernate session in the user's session, and then close it when the Session expired... will this not work? Anyone else have a good solution for this? TIA, Riyad - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Issue with the application context and web server alias names
I've seen something like this posted, but with no answers. I have an issue where I have an alias for an application. For eg. www.company.com/home/appname is an alias for www.company.com/appname, where appname is the context name of my app. When I use the html form tag in my app as follows: html:form action='view.do' What gets renderred is: form action='/appname/view.do' That links to: www.company.com/appname/view.do. The bad thing about that is that I need to have the /home in there. It's a long story why, but it needs to be there. Is there a way to configure struts to not append the context name? That would allow the form tag to render as: form action='view.do' which doesn't have a forward slash, then everything works fine, because it will submit to www.company.com/home/appname/view.do. Thanks, Frank... __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
Issue with the application context and web server alias names
I've seen something like this posted, but with no answers. I have an issue where I have an alias for an application. For eg. www.company.com/home/appname is an alias for www.company.com/appname, where appname is the context name of my app. When I use the html form tag in my app as follows: html:form action='view.do' What gets renderred is: form action='/appname/view.do' That links to: www.company.com/appname/view.do. The bad thing about that is that I need to have the /home in there. It's a long story why, but it needs to be there. Is there a way to configure struts to not append the context name? That would allow the form tag to render as: form action='view.do' which doesn't have a forward slash, then everything works fine, because it will submit to www.company.com/home/appname/view.do. Thanks, Frank... - Do you Yahoo!? Friends. Fun. Try the all-new Yahoo! Messenger
RE: [struts] Digest Number 3955
This usually occurs when you try to use form elements outside of the form tags. Make sure all your pulldowns and checkboxes are used inside an html:form tag. Ciao, Ricardo -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, June 07, 2004 9:04 AM To: [EMAIL PROTECTED] Subject: Re: [struts] Digest Number 3955 Hi CAn anyone of you tell me the reason for the following error. javax.servlet.ServletException: Cannot find bean org.apache.struts.taglib.html.BEAN in any scope org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:867) org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:800) org.apache.jsp.jsp.index_jsp._jspService(index_jsp.java:84) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133) javax.servlet.http.HttpServlet.service(HttpServlet.java:856) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:311) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248) javax.servlet.http.HttpServlet.service(HttpServlet.java:856) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[OT] JBoss EJBs or Hibernate
Hi All! I just wanted a view of people in the industry on their preferences for PERSISTENCE, and if possible, WHY! I intend to run everything in the same JVM and most likely be using JBOSS. TIA, Kunal - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: OT: Hibernate Session to User Session
Riyad Kalla wrote: I was reading in the Hibernate forums that when you have a WebApp DAO Hibernate DB design, and you open/close each Hibernate session at every single DAO method call (what I do now) its actually quite expensive, and is suggested that you attempt to maintain a Hibernate Session in conjunction with a user Session to increase performance. I had a question for anyone that has done this (without using SpringFramework). My gut-reaction to this was to add a HttpSessionListener to my webapp that created and stored a Hibernate session in the user's session, and then close it when the Session expired... will this not work? Anyone else have a good solution for this? TIA, Riyad - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Hi. Thisis not a Hibernate forum... Anyway: If you read the docs, you will find good practice not to hold a long during hibernate session. You would get problems with synchronisation and consistent hibernate session states, furthermore this would result in too many open sessions. (Good point for denial of service-attack...) I prefer using hibernate sessions hold in a ThreadLocal, which is really nice because you do not have to get HibernmateSession through all of your method signatures. The Session is opened at beginning of the Request and closed at the end. I close it in a ServletFilter, so i can do within Srtruts whatever i want (declarative Exception handling...) and i can be sure it is always closed. This way i also can track the max parallel open Hibernate Sessions, which tells a lot over server load. Regards Axel - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] JBoss EJBs or Hibernate
Kunal H. Parikh wrote: Hi All! I just wanted a view of people in the industry on their preferences for PERSISTENCE, and if possible, WHY! I intend to run everything in the same JVM and most likely be using JBOSS. TIA, Kunal - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Hi Kunal, i had some projects with JBoss CMP and some with Hibernate, and i dont see any reasons for using EJB if i don't want to distribute Beans over different servers. Hibernate is quick, easy to maintain and you have all possibilities you like, from an own query lanbguage over building criterias with objects down to using raw sql. If you want all of this features with cmp ejb, you have to use JBoss specifical, non standard practices, which makes it really hard to switch the Container on a later point of the project. With Hibernate you simply take your persistent-jars and throw them intoi another container or runtime, and it will still work. Regards Axel - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[ANNOUNCE] Struts Console v4.7 - GUI tool
Struts Console version 4.7 is now available. http://www.jamesholmes.com/struts/ Download Now: http://www.jamesholmes.com/struts/struts-console-4.7.zip -- OR -- http://www.jamesholmes.com/struts/struts-console-4.7.tar.gz --- BIG ENHANCEMENT --- Updated the Eclipse plugins to support changing output options from the preferences dialog. --- BIG ENHANCEMENT --- Struts Console is FREE software. Changes with Struts Console v4.7 *) Added ability to turn off configuration file validation in Eclipse 3.0 plugin. *) Added ability to configure Pretty Output options from Eclipse plugins. Thanks, -James [EMAIL PROTECTED] http://www.jamesholmes.com/struts/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
how to check if html:errors will display anything
How can I check if the html:errors tag will display anything down inside my jsp page? I have the html:errors tag inside a table tag and I don't want the table generated at all if there aren't any errors to display. Thanks, Brian Barnett
Re: logic:iterate beans and el
found out that in tomcat 4.1, el can ONLY be used inside of the jstl tags. downloading tomcat 5 right now.. pls [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] 'bean1' is a bean created by logic:iterate and contains 'myHashMap'. I am trying to access the 'key' property of the bean so that i can set the property -'prop1'. setting the value of 'prop1' changes the value returned from the getter for 'prop2'. I have tried the following but it sets 'prop1' to the string literal pageScope.bean1.key instead of the evaluated expression for the bean. i am new to struts with el so any help is greatly appreciated. perhaps it is just a simple config error on my part.. logic:iterate id=bean1 name=aForm property=myHashMap jsp:setProperty name=aForm property=prop1 value=${pageScope.bean1.key}/ bean:write name=aForm property=prop2/ /logic:iterate - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Single ActionForm accross multiple Actions
Hi All! I want to maintain a single ActionForm across multiple Actions. I want to get the info from the user in a step-by-step manner, but only wanna talk to the SessionBean at the end when they hit confirm. The alternative that I can think of is writing a JavaBean with all the properties, and pass the JavaBean around as a session attribute. Any one have a better solution ? TIA, Kunal - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: how to check if html:errors will display anything
Great question, I solved this by checking if Globals.ERROR_KEY was null or not, but I still wanted something more, because I set aside a small margin in the top of my page for global errors, like System errors... and I only wanted to display the margin IF there were some ActionMessages.GLOBAL_MESSAGE messages in the ActionMessages object, but I didn't find a quick way to check this. However if you just want to check for any errors at all, this should do the trick: logic:notEmpty name=%= Globals.ERROR_KEY % /logic:notEmpty Barnett, Brian W. wrote: How can I check if the html:errors tag will display anything down inside my jsp page? I have the html:errors tag inside a table tag and I don't want the table generated at all if there aren't any errors to display. Thanks, Brian Barnett - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Single ActionForm accross multiple Actions
Kunal, You could add a 'state' property to the form, that the first action can set to 'STARTED' and the last action can set to 'FINISHED' or something like that, then in your reset() method you could do something like: reset() { if(state == Constants.FINISHED) { // reset all vars } } and you could stick the form in the session scope. I think some of the more weathered Struts people here might have a better suggestion though. Kunal H. Parikh wrote: Hi All! I want to maintain a single ActionForm across multiple Actions. I want to get the info from the user in a step-by-step manner, but only wanna talk to the SessionBean at the end when they hit confirm. The alternative that I can think of is writing a JavaBean with all the properties, and pass the JavaBean around as a session attribute. Any one have a better solution ? TIA, Kunal - 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: Hibernate Session to User Session
Wouldn't that be pretty resource intensive since it would basically mean that you have a database connection for every user session in your app. Typically that is pretty bad and getting a new connection from a connection pool is usually pretty quick. I'm unfamiliar with how hibernate manges sessions and connections so let me know if I'm wrong. I'm looking at using Hibernate in my struts actions, but also in my ejbs so of course I wouldn't be able to tie hibernate sessions with http sessions. Thanks, BAL - Original Message - From: Riyad Kalla [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Monday, June 07, 2004 7:13 PM Subject: OT: Hibernate Session to User Session I was reading in the Hibernate forums that when you have a WebApp DAO Hibernate DB design, and you open/close each Hibernate session at every single DAO method call (what I do now) its actually quite expensive, and is suggested that you attempt to maintain a Hibernate Session in conjunction with a user Session to increase performance. I had a question for anyone that has done this (without using SpringFramework). My gut-reaction to this was to add a HttpSessionListener to my webapp that created and stored a Hibernate session in the user's session, and then close it when the Session expired... will this not work? Anyone else have a good solution for this? TIA, Riyad - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: how to check if html:errors will display anything
Barnett, take a look at html:errors tag source to see how it generates html, then you know what to do. -D - Original Message - From: Barnett, Brian W. [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, June 07, 2004 6:05 PM Subject: how to check if html:errors will display anything How can I check if the html:errors tag will display anything down inside my jsp page? I have the html:errors tag inside a table tag and I don't want the table generated at all if there aren't any errors to display. Thanks, Brian Barnett - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [ANNOUNCE] Struts Console v4.7 - GUI tool
James, Does the pretty printing option work in netbeans? Nathan On Jun 7, 2004, at 3:20 PM, James Holmes wrote: Struts Console version 4.7 is now available. http://www.jamesholmes.com/struts/ Download Now: http://www.jamesholmes.com/struts/struts-console-4.7.zip -- OR -- http://www.jamesholmes.com/struts/struts-console-4.7.tar.gz --- BIG ENHANCEMENT --- Updated the Eclipse plugins to support changing output options from the preferences dialog. --- BIG ENHANCEMENT --- Struts Console is FREE software. Changes with Struts Console v4.7 *) Added ability to turn off configuration file validation in Eclipse 3.0 plugin. *) Added ability to configure Pretty Output options from Eclipse plugins. Thanks, -James [EMAIL PROTECTED] http://www.jamesholmes.com/struts/ - 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: Hibernate Session to User Session
Brian, I agree that sounds very expensive, I don't know how Hibernate works yet so I didn't know what a Hibernate Session really consists of to know if that was as resource intensive as it sounded. If this is the case, then I suppose using the HibernateUtil that I am using now from the Hibernate docs is probably the way to go (does the ThreadLocal business) Brian Alexander Lee wrote: Wouldn't that be pretty resource intensive since it would basically mean that you have a database connection for every user session in your app. Typically that is pretty bad and getting a new connection from a connection pool is usually pretty quick. I'm unfamiliar with how hibernate manges sessions and connections so let me know if I'm wrong. I'm looking at using Hibernate in my struts actions, but also in my ejbs so of course I wouldn't be able to tie hibernate sessions with http sessions. Thanks, BAL - Original Message - From: Riyad Kalla [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Monday, June 07, 2004 7:13 PM Subject: OT: Hibernate Session to User Session I was reading in the Hibernate forums that when you have a WebApp DAO Hibernate DB design, and you open/close each Hibernate session at every single DAO method call (what I do now) its actually quite expensive, and is suggested that you attempt to maintain a Hibernate Session in conjunction with a user Session to increase performance. I had a question for anyone that has done this (without using SpringFramework). My gut-reaction to this was to add a HttpSessionListener to my webapp that created and stored a Hibernate session in the user's session, and then close it when the Session expired... will this not work? Anyone else have a good solution for this? TIA, Riyad - 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]
[PATCH] for DynaActionForm set(String, int, Object)
This adds default resizing of array or java.util.List properties Btw. I don't know why ClassCastException is catched if the type is explicitly checked using instanceof Index: DynaActionForm.java === RCS file: /home/cvspublic/jakarta-struts/src/share/org/apache/struts/action/DynaActionForm.java,v retrieving revision 1.15 diff -u -r1.15 DynaActionForm.java --- DynaActionForm.java 24 Apr 2004 06:37:00 - 1.15 +++ DynaActionForm.java 8 Jun 2004 04:06:27 - @@ -447,25 +447,39 @@ * exists, but is not indexed * @exception IndexOutOfBoundsException if the specified index * is outside the range of the underlying property + * @exception UnsupportedOperationException if the specified property + * does not support setting a value to the specified index */ public void set(String name, int index, Object value) { -Object prop = dynaValues.get(name); -if (prop == null) { -throw new NullPointerException -(No indexed value for ' + name + [ + index + ]'); -} else if (prop.getClass().isArray()) { -Array.set(prop, index, value); -} else if (prop instanceof List) { -try { -((List) prop).set(index, value); -} catch (ClassCastException e) { -throw new ConversionException(e.getMessage()); -} -} else { -throw new IllegalArgumentException -(Non-indexed property for ' + name + [ + index + ]'); -} + Object prop = dynaValues.get(name); + if (prop == null) { + throw new NullPointerException + (No indexed value for ' + name + [ + index + ]'); + } else if (prop.getClass().isArray()) { + int length = Array.getLength(prop); + if (length = index) { + Object tmp = Array.newInstance(prop.getClass().getComponentType(), index + 1); + if (length 0) + System.arraycopy(prop, 0, tmp, 0, length); + prop = tmp; + dynaValues.put(name, prop); + } + Array.set(prop, index, value); + } else if (prop instanceof List) { + try { + List list = (List) prop; + for (int i = list.size(); i = index; i++) { + list.add(null); + } + list.set(index, value); + } catch (ClassCastException e) { + throw new ConversionException(e.getMessage()); + } + } else { + throw new IllegalArgumentException + (Non-indexed property for ' + name + [ + index + ]'); + } } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Hibernate Session to User Session
It's not very process intensive if you are using a connection pool where it just hands you an already-open connection. Hibernate can use a few different connection pools including JCS, C3P0, OSCache, etc. Regards, David -Original Message- From: Riyad Kalla [mailto:[EMAIL PROTECTED] Sent: Monday, June 07, 2004 7:14 PM To: Struts Users Mailing List Subject: OT: Hibernate Session to User Session I was reading in the Hibernate forums that when you have a WebApp DAO Hibernate DB design, and you open/close each Hibernate session at every single DAO method call (what I do now) its actually quite expensive, and is suggested that you attempt to maintain a Hibernate Session in conjunction with a user Session to increase performance. I had a question for anyone that has done this (without using SpringFramework). My gut-reaction to this was to add a HttpSessionListener to my webapp that created and stored a Hibernate session in the user's session, and then close it when the Session expired... will this not work? Anyone else have a good solution for this? TIA, Riyad - 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]
user defined beans in form bean
how to handle user defined beans if we are using them in form beans. see the following code. Im looking for the jsp code in struts to define the text fields pls send me the code. with thnx. class MyBean { private String firstName; private String lastName; public void setFirstName(String strFirstName){ this.firstName=strFirstName; } public String getFirstName(){ return this.firstName; } public void setLastName(String strLastName){ this.lastName=strLastName; } public String getLastName(){ return this.lastName; } } FormBean : public class MyForm extends ActionForm { private MyBean mybean; private String ssno; public void setMybean(MyBean mybean){ this.mybean=mybean; } public MyBean getMybean(){ return this.mybean; } public void setSsno(String ssno){ this.ssno=ssno; } public String getSsno(){ return this.ssno; } } JSP: First Name : input type=text name=txtFirstName Last Name : input type=text name=txtLastName SSNo : input type=text name=txtSSNo - Do you Yahoo!? Friends. Fun. Try the all-new Yahoo! Messenger
RE: user defined beans in form bean
Hi, You can use struts nested tags to retrieve the beans stored in the action form. Code snippet is as follows nested:root name=MyForm nested:nest property=MyBean nested:write property=firstName/ /nested:nest property=MyBean /nested:root name=MyForm Thanks, Satish -Original Message- From: Jannu Winod [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 08, 2004 9:40 AM To: Struts Users Mailing List Subject: user defined beans in form bean how to handle user defined beans if we are using them in form beans. see the following code. Im looking for the jsp code in struts to define the text fields pls send me the code. with thnx. class MyBean { private String firstName; private String lastName; public void setFirstName(String strFirstName){ this.firstName=strFirstName; } public String getFirstName(){ return this.firstName; } public void setLastName(String strLastName){ this.lastName=strLastName; } public String getLastName(){ return this.lastName; } } FormBean : public class MyForm extends ActionForm { private MyBean mybean; private String ssno; public void setMybean(MyBean mybean){ this.mybean=mybean; } public MyBean getMybean(){ return this.mybean; } public void setSsno(String ssno){ this.ssno=ssno; } public String getSsno(){ return this.ssno; } } JSP: First Name : input type=text name=txtFirstName Last Name : input type=text name=txtLastName SSNo : input type=text name=txtSSNo - Do you Yahoo!? Friends. Fun. Try the all-new Yahoo! Messenger - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
ValidatorForm vs ValidatorActionForm
hi, What's the use of ValidatorActionForm when ValidatorForm is already there? --- regards Navjot Singh Net4India Ltd. Politicians are like diapers and need to be changed for same reason. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
reg tiles
im forwarding to a jsp page from the action class say processAction-fwd-result.jsp. result.jsp is with tiles. say using some template and header/menubar/footer. im going to display the result in the body-content page. do i need to use a seperate jsp for the that or can i show them at the result.jsp directly.. result.jsp is like this. tiles:insert page=/layouts/storefrontDefaultLayout.jsp flush=true tiles:put name=header value=/common/header.jsp / tiles:put name=menubar value=/common/menubar.jsp / !-- do i need to use separate jsp for this. tiles:put name=body-content value=/index-body.jsp / -- tiles:put name=copyright value=/common/copyright.jsp / /tiles:insert - Do you Yahoo!? Friends. Fun. Try the all-new Yahoo! Messenger
RE: Tiles: Use layout definitions from config within jsp?
I just posted about this a few days ago... You should read section 4.1.1 of the Tiles Advanced Features (link at bottom of the page of the struts site, section on the Tiles User Guide) which gives examples like so: %@ taglib uri=/WEB-INF/tiles.tld prefix=tiles % tiles:definition id=definitionName page=/layouts/myLayout.jsp tiles:put name=title value=Page Title / tiles:put name=header value=/tiles/header.jsp / tiles:put name=footer value=/tiles/footer.jsp / tiles:put name=menu value=/tiles/menu.jsp / tiles:put name=body value=/tiles/helloBody.jsp / /tiles:definition I do something like that for my welcome.jsp index page. Regard,s David -Original Message- From: Kruse, Matt [mailto:[EMAIL PROTECTED] Sent: Monday, June 07, 2004 1:51 PM To: Struts Users Mailing List (E-mail) Subject: Tiles: Use layout definitions from config within jsp? I've always used tile definitions exclusively defined in tiles-defs.xml in the past. Now, I would like to have some pages where I put the tiles:insert commands directly into the JSP. However, I'd like to use my existing layout definitions from the config file rather than re-definiting them in the JSP or a JSP include file. For example: tiles-defs.xml -- definition name=my.layout path=/layouts/my_layout.jsp extends=master.layout put name=header value=/tiles/header.jsp / put name=content value= / put name=footer value=/tiles/footer.jsp / /definition in my jsp - tiles:insert page=my.layout flush=true tiles:put name=content type=String My content here /tiles:put /tiles:insert This would allow me to take advantage of my existing layout definitions and layering that I have setup, while allowing a few JSP pages to have more control over the content population. This way, I wouldn't have to :put the header, footer, etc every time because it would be defined by the layout or one of the parent layouts. Is this possible? (More explanation for those who are curious about the context...) - I'm converting an existing web application to use tiles. In some of the JSP pages, logic in the page decides to hide everything except for a table containing content (for printing, etc) - including all navigation and layout structure. So, I would like to use tiles:insert in the JSP itself, and switch which layout I use and which pieces get populated based on the logic within the JSP page itself. Also, a number of JSPs will need to populate about 4 or 5 separate tiles into the layout, and it's much easier to define the content in the JSP itself, rather than split it into 4 or 5 separate files to be included into the layout. For example: tiles:insert page=my.layout flush=true tiles:put name=head type=String Stuff that belongs in the head of the document, like meta tags /tiles:put tiles:put name=onload type=String some javascript which should be inserted into the body's onload tag /tiles:put tiles:put name=content type=String My content here /tiles:put /tiles:insert Make sense? Thanks, Matt Kruse - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: ValidatorForm vs ValidatorActionForm
http://wiki.apache.org/struts/ValidatorActionForms -Original Message- From: Navjot Singh [mailto:[EMAIL PROTECTED] Sent: Tuesday, 8 June 2004 14:48 To: Struts Users Mailing List Subject: ValidatorForm vs ValidatorActionForm hi, What's the use of ValidatorActionForm when ValidatorForm is already there? --- regards Navjot Singh Net4India Ltd. Politicians are like diapers and need to be changed for same reason. - 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: ValidatorForm vs ValidatorActionForm
Navjot, One validates based upon the action mapping so you can make /update.do and /create.do use the same Action class but have different validation rules. The other is based on the form itself so any Actions using that form would have the exact same validation methods. Regards, David -Original Message- From: Navjot Singh [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 08, 2004 12:48 AM To: Struts Users Mailing List Subject: ValidatorForm vs ValidatorActionForm hi, What's the use of ValidatorActionForm when ValidatorForm is already there? --- regards Navjot Singh Net4India Ltd. Politicians are like diapers and need to be changed for same reason. - 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: user defined beans in form bean
html:text property=myBean.firstName/ html:text property=myBean.lastName/ ... Jannu Winod wrote: how to handle user defined beans if we are using them in form beans. see the following code. Im looking for the jsp code in struts to define the text fields pls send me the code. with thnx. class MyBean { private String firstName; private String lastName; public void setFirstName(String strFirstName){ this.firstName=strFirstName; } public String getFirstName(){ return this.firstName; } public void setLastName(String strLastName){ this.lastName=strLastName; } public String getLastName(){ return this.lastName; } } FormBean : public class MyForm extends ActionForm { private MyBean mybean; private String ssno; public void setMybean(MyBean mybean){ this.mybean=mybean; } public MyBean getMybean(){ return this.mybean; } public void setSsno(String ssno){ this.ssno=ssno; } public String getSsno(){ return this.ssno; } } JSP: First Name : input type=text name=txtFirstName Last Name : input type=text name=txtLastName SSNo : input type=text name=txtSSNo - Do you Yahoo!? Friends. Fun. Try the all-new Yahoo! Messenger - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [ANNOUNCE] Struts Console v4.7 - GUI tool
Git r dun! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]