[MessageResources] - in my Action: getResources(request) returns null
Hi, I can't find the answer to this anywhere but apologies if I missed something obvious I have the default ApplicationResources.properties in my web.xml in my action class, I've tried: MessageResources messages = getResources(request); // returns null MessageResources messages = getResources(request, Action.MESSAGES_KEY); // returns null MessageResources messages = getResources(request, application); // returns null MessageResources messages = getResources(request, ApplicationResources); // returns null however, the deprecated MessageResources messages = getResources(); returns what I want! is this a bug or am I doing something wrong? thanks in advance Alex __ Do You Yahoo!? Everything you'll ever need on one web page from News and Sport to Email and Music Charts http://uk.my.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: [MessageResources] - in my Action: getResources(request) returns null
What's the name of the properties file? Let's say ApplicationResources.properties This file has to be placed in the web-inf/classes directory. At 08:10 03.10.2002 +0100, Alex Birch wrote: Hi, I can't find the answer to this anywhere but apologies if I missed something obvious I have the default ApplicationResources.properties in my web.xml in my action class, I've tried: MessageResources messages = getResources(request); // returns null MessageResources messages = getResources(request, Action.MESSAGES_KEY); // returns null MessageResources messages = getResources(request, application); // returns null MessageResources messages = getResources(request, ApplicationResources); // returns null however, the deprecated MessageResources messages = getResources(); returns what I want! is this a bug or am I doing something wrong? thanks in advance Alex __ Do You Yahoo!? Everything you'll ever need on one web page from News and Sport to Email and Music Charts http://uk.my.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: [MessageResources] - in my Action: getResources(request) returns null
it's in WEB-INF/classes called ApplicationResources.properties it works when I use bean:message key=prompt.login/ so I know it's loaded ok it also works when I call the deprecated getResources()... just when I add the request param or the request and key param I get null but getResources is deprecated so I don't want to use that! Alex --- Thomas Eichberger [EMAIL PROTECTED] wrote: What's the name of the properties file? Let's say ApplicationResources.properties This file has to be placed in the web-inf/classes directory. At 08:10 03.10.2002 +0100, Alex Birch wrote: Hi, I can't find the answer to this anywhere but apologies if I missed something obvious I have the default ApplicationResources.properties in my web.xml in my action class, I've tried: MessageResources messages = getResources(request); // returns null MessageResources messages = getResources(request, Action.MESSAGES_KEY); // returns null MessageResources messages = getResources(request, application); // returns null MessageResources messages = getResources(request, ApplicationResources); // returns null however, the deprecated MessageResources messages = getResources(); returns what I want! is this a bug or am I doing something wrong? thanks in advance Alex __ Do You Yahoo!? Everything you'll ever need on one web page from News and Sport to Email and Music Charts http://uk.my.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] __ Do You Yahoo!? Everything you'll ever need on one web page from News and Sport to Email and Music Charts http://uk.my.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: [ANNOUNCE] Struts Console v2.2.1
Hi James, It's great. But using it with Netbeans 3.4, when I open a new config file, the window doesn't dock into the editor. Could you pls make it docked as default behavior? Thanks very much. -CH -Original Message- From: James Holmes [mailto:[EMAIL PROTECTED]] Sent: Thursday, October 03, 2002 2:02 AM To: Struts Users Mailing List Subject: [ANNOUNCE] Struts Console v2.2.1 Struts Console version 2.2.1 is now available. http://www.jamesholmes.com/struts/ Download Now: http://www.jamesholmes.com/struts/struts-console-2.2.1.zip -- OR -- http://www.jamesholmes.com/struts/struts-console-2.2.1.tar.gz Struts Console is FREE software. This release is a bug fix release and does not introduce any new functionality. Changes with Struts Console v2.2.1 *) Reverse amp; change as it was not a bug and the change created a bug. *) Update Pretty Output option to properly escape entity attributes (ie. , , , ). Thanks, -james [EMAIL PROTECTED] http://www.jamesholmes.com/struts/ __ Do you Yahoo!? New DSL Internet Access from SBC Yahoo! http://sbc.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: [Tiles] Conditional menu items. Help !!!!
Hello, There is several solutions to have different menu for different users or profile. You need to have some logic that select or build the menu according to the current user profile. Solution 1: * Create an action with one forward for each possible menu. The action checks the user profile, and call forward to appropriate menu. * Create one tiles definition for each possible menu * Associate forwards to definitions * Call the action each time you need to render the menu Solution 2: * Create one action that build dynamically the menu definition to be rendered * Action push the definition in request session (see examples in tiles-doc/test) * Action do its forward, which will use the pushed definition Solution 3: * Associate a controller to your menu definition * This controller build/modify the list of menu item Hope this help, Cedric LFung wrote: Hi. I'am using tiles from struts 1.1b1 and I need to add some menu items only for specific users. Then my action forward take this sample path = forward.common.users.home this is a define that use some default menu, now for example, some special users use this same menu, in fact the hole template, but with only a few more items in the menu. Supose I have some bean loeded in the action that tells me if the agregate menu items need to be displayed. Any idea. Thanks in advance. LFung. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: How do you pass a variable controllerClass name to the classicLayout.jspin Tiles?
It is because the controllerClass attribute is not specified as rtexpr in the tiles tld file. You can change the declaration to true and it should work. This is probably a bug ! Cedric Lou Morin wrote: I'm trying to pass the controller name from the tiles definition to the classicLayout.jsp. The value does get passed to classicLayout.jsp ... but, the tiles:insert tag has a problem with it because the %=myController% does not get substituded ... does anybody know how to get around this problem? Thanks, Lou - In tiles-def.xml: definition name=ysw.mainLayout path=/layouts/classicLayout.jsp put name=title value=Testing Title / put name=header value=/tiles/common/header.jsp / put name=menu value=ysw.menu.bar / put name=body value=/jsp/welcome.jsp / put name=footer value=/tiles/common/footer.jsp / put name=controller value=com.ysw.admin.MyTileController / /definition - In classicLayout.jsp: logic:present name=controller tiles:useAttribute id=myController name=controller classname=java.lang.String/ tiles:insert attribute='body' controllerClass=%=myController% /tiles:insert /logic:present logic:notPresent name=controller tiles:insert attribute='body' /tiles:insert /logic:notPresent -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: What mechanisms do Tiles use for layout
In the tiles examples, there is several layouts: some use tables, other use div. As David says, Tiles doesn't care about your layout. You can reuse existing layouts, or define your own as you want. The layout is just a jsp page containing insert tag where you want to insert sub-tiles. You can use any html or jsp tags to arrange your layout. Cedric Steinar Bang wrote: What mechanism(s) do Tiles use for layout? Does it use HTML tables? Does it use a combination of div, span and CSS? Or can it use either, depending on the capabilities of the client browser? Thanx! - Steinar -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
[OT] Character Based User Interface
we have some customers who still prefer having a character based user interface (i.e. VT-emulation on unix systems). reasons: speed of data entry, used to etc. as we have to respect the customers reasons and don't want to start some philosophic discussion about (dis)advantages of GUI, HTML or VT we are looking for a lite weight solutions to add a VT capability to our java applications. Does anybody of you hav experiences with this kind of user interface for a java system? Where can I find information about possible solutions? Does anybody of you have a struts application which has a co-existing character based user interface? tia rene -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Newbie: problem with tiles definitions
Hi all, I just started working with tiles and struts. I have the following files xmls in the web-inf directory. I am working with the example given in the site http://www.javaworld.com/javaworld/jw-01-2002/jw-0104-tilestrut.html When I try to access the jsp files, there seems to be no problem. When I access a.do, I get the following error with tomcat ( 4.0.1 ) type : Status report message : Servlet action is currently unavailable description : The requested service (Servlet action is currently unavailable) is not currently available. Thanks in advance. -Bharathi === File : struts-config.xml ?xml version=1.0 encoding=ISO-8859-1 ? !DOCTYPE struts-config PUBLIC -//Apache Software Foundation//DTD Struts Configuration 1.1//EN http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd; struts-config plug-in className=org.apache.struts.tiles.TilesPlugin set-property property=definitions-config value=/WEB-INF/tileDefinitions.xml / set-property property=definitions-debug value=0 / set-property property=definitions-parser-details value=0 / set-property property=definitions-parser-validate value=true / /plug-in action-mappings action path=/a type=DoFirst forward name=success path=aDef/ /action action path=/b type=DoFirst forward name=success path=bDef/ /action action path=/c type=DoFirst forward name=success path=cDef/ /action /action-mappings /struts-config File web.xml ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.2//EN http://java.sun.com/j2ee/dtds/web-app_2_2.dtd; web-app servlet servlet-nameaction/servlet-name servlet-class org.apache.struts.tiles.ActionComponentServlet /servlet-class init-param param-namedefinitions-config/param-name param-value/WEB-INF/tileDefinitions.xml/param-value /init-param init-param param-nameapplication/param-name param-valueApplicationResources/param-value /init-param init-param param-nameconfig/param-name param-value/WEB-INF/struts-config.xml/param-value /init-param init-param param-namedebug/param-name param-value2/param-value /init-param init-param param-namedetail/param-name param-value2/param-value /init-param init-param param-namevalidate/param-name param-valuetrue/param-value /init-param load-on-startup2/load-on-startup /servlet !-- Standard Action Servlet Mapping -- servlet-mapping servlet-nameaction/servlet-name url-pattern*.do/url-pattern /servlet-mapping !-- The Welcome File List -- !-- Struts Tag Library Descriptor -- taglib taglib-uri /WEB-INF/struts-bean.tld/taglib-uri taglib-location /WEB-INF/struts-bean.tld /taglib-location /taglib taglib taglib-uri/WEB-INF/struts-tiles.tld/taglib-uri taglib-location/WEB-INF/struts-tiles.tld/taglib-location /taglib /web-app === File : tileDefinitions.xml ?xml version=1.0 encoding=ISO-8859-1? component-definitions definition name=aDef path=/layout.jsp put name=header value=/header.jsp/ put name=footer value=/footer.jsp/ put name=body value=/aBody.jsp/ /definition definition name=bDef path=/layout.jsp put name=header value=/header.jsp/ put name=footer value=/footer.jsp/ put name=body value=/bBody.jsp/ /definition definition name=cDef path=/layout.jsp put name=header value=/header.jsp/ put name=footer value=/footer.jsp/ put name=body value=/cBody.jsp/ /definition /component-definitions Regards, Bharathi A Block of granite on the pathway is an obstacle for the weak but a stepping stone for the strong - Do you Yahoo!? New DSL Internet Access from SBC Yahoo!
Re: Newbie: problem with tiles definitions
Hello, Does your action exist ? Try to access the action directly from the browser, does it works ? Cedric S.Bharathi wrote: Hi all, I just started working with tiles and struts. I have the following files xmls in the web-inf directory. I am working with the example given in the site http://www.javaworld.com/javaworld/jw-01-2002/jw-0104-tilestrut.html When I try to access the jsp files, there seems to be no problem. When I access a.do, I get the following error with tomcat ( 4.0.1 ) type : Status report message : Servlet action is currently unavailable description : The requested service (Servlet action is currently unavailable) is not currently available. Thanks in advance. -Bharathi === File : struts-config.xml ?xml version=1.0 encoding=ISO-8859-1 ? !DOCTYPE struts-config PUBLIC -//Apache Software Foundation//DTD Struts Configuration 1.1//EN http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd; struts-config plug-in className=org.apache.struts.tiles.TilesPlugin set-property property=definitions-config value=/WEB-INF/tileDefinitions.xml / set-property property=definitions-debug value=0 / set-property property=definitions-parser-details value=0 / set-property property=definitions-parser-validate value=true / /plug-in action-mappings action path=/a type=DoFirst forward name=success path=aDef/ /action action path=/b type=DoFirst forward name=success path=bDef/ /action action path=/c type=DoFirst forward name=success path=cDef/ /action /action-mappings /struts-config File web.xml ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.2//EN http://java.sun.com/j2ee/dtds/web-app_2_2.dtd; web-app servlet servlet-nameaction/servlet-name servlet-class org.apache.struts.tiles.ActionComponentServlet /servlet-class init-param param-namedefinitions-config/param-name param-value/WEB-INF/tileDefinitions.xml/param-value /init-param init-param param-nameapplication/param-name param-valueApplicationResources/param-value /init-param init-param param-nameconfig/param-name param-value/WEB-INF/struts-config.xml/param-value /init-param init-param param-namedebug/param-name param-value2/param-value /init-param init-param param-namedetail/param-name param-value2/param-value /init-param init-param param-namevalidate/param-name param-valuetrue/param-value /init-param load-on-startup2/load-on-startup /servlet !-- Standard Action Servlet Mapping -- servlet-mapping servlet-nameaction/servlet-name url-pattern*.do/url-pattern /servlet-mapping !-- The Welcome File List -- !-- Struts Tag Library Descriptor -- taglib taglib-uri /WEB-INF/struts-bean.tld/taglib-uri taglib-location /WEB-INF/struts-bean.tld /taglib-location /taglib taglib taglib-uri/WEB-INF/struts-tiles.tld/taglib-uri taglib-location/WEB-INF/struts-tiles.tld/taglib-location /taglib /web-app === File : tileDefinitions.xml ?xml version=1.0 encoding=ISO-8859-1? component-definitions definition name=aDef path=/layout.jsp put name=header value=/header.jsp/ put name=footer value=/footer.jsp/ put name=body value=/aBody.jsp/ /definition definition name=bDef path=/layout.jsp put name=header value=/header.jsp/ put name=footer value=/footer.jsp/ put name=body value=/bBody.jsp/ /definition definition name=cDef path=/layout.jsp put name=header value=/header.jsp/ put name=footer value=/footer.jsp/ put name=body value=/cBody.jsp/ /definition /component-definitions Regards, Bharathi A Block of granite on the pathway is an obstacle for the weak but a stepping stone for the strong - Do you Yahoo!? New DSL Internet Access from SBC Yahoo! -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Setting the input from within the ActionForm in Struts 1.1 no longer allowed?
Hi Using 1.0 I had a situation where I used to dynamically set the input from within my ActionForm. In 1.1 (b2) this is no longer possible, since the configuration of the object is frozen. An IllegalStateException is thrown and my app no longer works as required. What is the suggested way to get around this? Should I reconfigure my app so I don't dynamically set the input, or is there another way in Struts 1.1 to dynamically set the input? TIA, Karim
Re: Where do you convert (form) strings to other data types?
Hi David, that's indeed another approach and it sounds like a very nice one. Would you share your code (tags and FormDate class) with this list? It would help me for sure! Thanks in advance. Regards, Ronald Rotteveel - Original Message - From: David Whitmarsh [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wednesday, October 02, 2002 10:38 PM Subject: Re: Where do you convert (form) strings to other data types? -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Can't retrieve definition for form null
On Wed, Oct 02, 2002 at 10:54:21PM -0400, Doug Dates wrote: I tried html:form action=test.do and html:form action=/test, I got same error. I guess I am trying to call the form with a null value. But I can't understand in which case, form can be null. Are you sure your form bean class is included in your project? Try setting the Struts debug level higher so that you can see at least a stack trace in your container's log. S. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Problem with JDBC Connector 2 driver
My app still hangs once in a while. I am supsecting the problem comes from the JDBC driver becuase it only stalls on the pages that need database access. Would anybody please tell me if you have experieneced the same problem with using Linux, mysql, and Connector 2 driver. Thanks! Billy Ng
Populate form with ActionForm
Hi all: I have an action that populate an ActionForm, when finish it forward to a page that have a html form. Now I want to populate the input fields with the value of the ActionForm. I have tried with different approaches but neither works. Somebody have a solution? Thank You in advance. MAML -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
threading question
Hello, Quick Struts/servlet threading question: If many classes extended the following 'AbstractAction' class (eg, 'ConcreteAction'), would use of the 'testString' member variable be threadsafe? public abstract class AbstractAction extends Action{ protected String testString; public ActionForward perform( ActionMapping map,ActionForm form,HttpServletRequest req,HttpServletResponse res){ testString = req.getParameter(myParam); // other common processing return process(map,form,req,res); } public abstract ActionForward process( ActionMapping map,ActionForm form,HttpServletRequest req,HttpServletResponse res); } public class ConcreteAction extends AbstractAction{ public ActionForward process( ActionMapping map,ActionForm form,HttpServletRequest req,HttpServletResponse res){ // do something with testString... // return an ActionForward object... } } I was strictly thinking of using the protected members on a per-request basis, always initializing them in the AbstractAction's perform() method. Furthermore, if use of testString is OK, wouldn't it be OK to have a member vars of type HttpRequest, etc. and set it/them in AbstractAction's perform(), thereby avoiding all the associated parameter passing? Using Struts 1.0.2 if that makes any difference. Thanks, Scott Esbrook Software Developer Compuware Corporation The contents of this e-mail are intended for the named addressee only. It contains information that may be confidential. Unless you are the named addressee or an authorized designee, you may not copy or use it, or disclose it to anyone else. If you received it in error please notify us immediately and then destroy it. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Populate form with ActionForm
Put a action in the middle. The action puts the bean in the request of the second jsp. If the second jsp populates a form with this bean, you can pass the actionform to the request instead of the bean and struts will populate the form for you. The only requisite is that the action associated with the form uses the actionform that you put in the request. Regards. -Mensaje original- De: Miguel Angel Medina Lopez [mailto:[EMAIL PROTECTED]] Enviado el: jueves, 03 de octubre de 2002 13:53 Para: Struts Users Mailing List Asunto: Populate form with ActionForm Hi all: I have an action that populate an ActionForm, when finish it forward to a page that have a html form. Now I want to populate the input fields with the value of the ActionForm. I have tried with different approaches but neither works. Somebody have a solution? Thank You in advance. MAML -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: threading question
Of course, if you have several objects of ConcreteAction, every object has its own testString. So if each object has only one thread attached to it, the access to testString is thread-safe. You could put a counter to see how many ConcreteAction objects there are: class ConcreteAction { static int counter = 0; { ++counter; System.out.println( + counter ); } At 07:45 03.10.2002 -0400, Esbrook, Scott wrote: Hello, Quick Struts/servlet threading question: If many classes extended the following 'AbstractAction' class (eg, 'ConcreteAction'), would use of the 'testString' member variable be threadsafe? public abstract class AbstractAction extends Action{ protected String testString; public ActionForward perform( ActionMapping map,ActionForm form,HttpServletRequest req,HttpServletResponse res){ testString = req.getParameter(myParam); // other common processing return process(map,form,req,res); } public abstract ActionForward process( ActionMapping map,ActionForm form,HttpServletRequest req,HttpServletResponse res); } public class ConcreteAction extends AbstractAction{ public ActionForward process( ActionMapping map,ActionForm form,HttpServletRequest req,HttpServletResponse res){ // do something with testString... // return an ActionForward object... } } I was strictly thinking of using the protected members on a per-request basis, always initializing them in the AbstractAction's perform() method. Furthermore, if use of testString is OK, wouldn't it be OK to have a member vars of type HttpRequest, etc. and set it/them in AbstractAction's perform(), thereby avoiding all the associated parameter passing? Using Struts 1.0.2 if that makes any difference. Thanks, Scott Esbrook Software Developer Compuware Corporation The contents of this e-mail are intended for the named addressee only. It contains information that may be confidential. Unless you are the named addressee or an authorized designee, you may not copy or use it, or disclose it to anyone else. If you received it in error please notify us immediately and then destroy it. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: How can I get a value from a Javascript for a formbean?
Use the attached JavaScript file for your codebase and call the appropriate function based on the user's action (onChange(), delete, submite, etc.). It's self-evident what values need to be passed. Mark -Original Message- From: Vernon Wu [mailto:[EMAIL PROTECTED]] Sent: Wednesday, October 02, 2002 9:42 PM To: [EMAIL PROTECTED] Subject: How can I get a value from a Javascript for a formbean? I have two selected lists in a form. The data in the second list will change accordingly when the selected item in the first list is changed. My question is how to get the second selected item for the formbean. I use a framworks similar with Struts. Here is the code segment: select name=field01 onchange=SetField02() option %= Pform.field01SelectionAttr(-1) % value=-1-1/option option %= Pform.field01SelectionAttr(0) % value=00/option option %= Pform.field01SelectionAttr(1) % value=11/option option %= Pform.field01SelectionAttr(2) % value=22/option /select select name=field02 option value=0 selected /option /select script language=javascript function SetField02(){ //... return ; } /script -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] selectlist.js Description: Binary data -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: [OT] Character Based User Interface
How can you connect a VT terminal to a website? Wouldn't you have to use Lynx? -Original Message- From: [EMAIL PROTECTED] Sent: Thursday, October 03, 2002 6:35 AM we have some customers who still prefer having a character based user interface (i.e. VT-emulation on unix systems). reasons: speed of data entry, used to etc. as we have to respect the customers reasons and don't want to start some philosophic discussion about (dis)advantages of GUI, HTML or VT we are looking for a lite weight solutions to add a VT capability to our java applications. Does anybody of you hav experiences with this kind of user interface for a java system? Where can I find information about possible solutions? Does anybody of you have a struts application which has a co-existing character based user interface? tia rene -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Populate form with ActionForm
You must use a: req.setAttribute(formname,form) in the middle action. Formname is the name you give to the form in the struts-config.xml file, and form is the ActionForm you will use to populate the jsp. If this don't work, put here the struts-config.xml and the middle action. Regards. Miguel -Mensaje original- De: Miguel Angel Medina Lopez [mailto:[EMAIL PROTECTED]] Enviado el: jueves, 03 de octubre de 2002 14:36 Para: Miguel Angel Mulero Martinez; Struts Users Mailing List Asunto: Re: Populate form with ActionForm Thanks, but I thisk I'm doing that. My Action populate the actionForm and put it in the request, then forward to a JSP that must use the actionForm to populate the html form. That is the definition of the actions of this scenario: action path=/detallesEntidad parameter=detalles type=com.action.VehiculoAction scope=request attribute=entidadForm forward name=siguiente path=/formularioDetalles.jsp redirect=false / /action action path=/modificarEntidad parameter=modificar type=com.action.VehiculoAction name=vehiculoForm scope=request input=/formularioDetalles.jsp/ And the JSP form tag is: html:form enctype=multipart/form-data method=post action=/modificarEntidad.do I have followed the struts example, but the html form isn't populate. What's the matter? Thank You - Original Message - From: Miguel Angel Mulero Martinez [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED]; Miguel Angel Medina Lopez [EMAIL PROTECTED] Sent: Thursday, October 03, 2002 1:51 PM Subject: RE: Populate form with ActionForm Put a action in the middle. The action puts the bean in the request of the second jsp. If the second jsp populates a form with this bean, you can pass the actionform to the request instead of the bean and struts will populate the form for you. The only requisite is that the action associated with the form uses the actionform that you put in the request. Regards. -Mensaje original- De: Miguel Angel Medina Lopez [mailto:[EMAIL PROTECTED]] Enviado el: jueves, 03 de octubre de 2002 13:53 Para: Struts Users Mailing List Asunto: Populate form with ActionForm Hi all: I have an action that populate an ActionForm, when finish it forward to a page that have a html form. Now I want to populate the input fields with the value of the ActionForm. I have tried with different approaches but neither works. Somebody have a solution? Thank You in advance. MAML -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: threading question
Yes. As a non-static instance variable, each thread would have it's own reference and be able to set and maintain it's value separately from any other thread. Mark -Original Message- From: Esbrook, Scott [mailto:[EMAIL PROTECTED]] Sent: Thursday, October 03, 2002 7:45 AM Quick Struts/servlet threading question: If many classes extended the following 'AbstractAction' class (eg, 'ConcreteAction'), would use of the 'testString' member variable be threadsafe? public abstract class AbstractAction extends Action{ protected String testString; public ActionForward perform( ActionMapping map,ActionForm form,HttpServletRequest req,HttpServletResponse res){ testString = req.getParameter(myParam); // other common processing return process(map,form,req,res); } public abstract ActionForward process( ActionMapping map,ActionForm form,HttpServletRequest req,HttpServletResponse res); } public class ConcreteAction extends AbstractAction{ public ActionForward process( ActionMapping map,ActionForm form,HttpServletRequest req,HttpServletResponse res){ // do something with testString... // return an ActionForward object... } } I was strictly thinking of using the protected members on a per-request basis, always initializing them in the AbstractAction's perform() method. Furthermore, if use of testString is OK, wouldn't it be OK to have a member vars of type HttpRequest, etc. and set it/them in AbstractAction's perform(), thereby avoiding all the associated parameter passing? Using Struts 1.0.2 if that makes any difference. Thanks, Scott Esbrook Software Developer Compuware Corporation -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Where's the form-bean???
Hi Jason, Thanks for the reply. You've got it right in what I'm doing. However I think I could describe the problem more simply. The problem is that when validation fails and I'm forwarded back to the Action specified by the mapping's input attribute, the form that is passed in to Action.perform() is null. I'm puzzled because when the Action then forwards to the .JSP page, all the form values are populated. Thanks, -Jeff -Original Message- From: Taylor, Jason [mailto:[EMAIL PROTECTED]] Sent: Wednesday, October 02, 2002 5:05 PM To: 'Struts Users Mailing List' Subject: RE: Where's the form-bean??? I think I understand what you're doing, but feel free to ignore me if not. What I often do is to present availXXX object arrays to the front-end via request/session attributes that the front-end developer knows is meant to be a read-only informational array shared between different actions or action forms as the case may be. These availXXX arrays are typically used to populate selection boxes or to generate lists that are used as entry points into actions on specific items in the availXXX array. The downside of my approach is you don't have the presence of the availXXX arrays specified in the config file. On the other hand, if you're running into scenarios where you need the array even when the form isn't present, this is something you could try... -Original Message- From: Lowe, Jeff [mailto:[EMAIL PROTECTED]] Sent: Wednesday, October 02, 2002 1:35 PM To: 'Struts Users Mailing List' Subject: Where's the form-bean??? I'm using two select boxes to implement the user selection metaphor where one contains available choices, and the other contains selected choices. If the form does not pass validation, I need to repopulate the selected choices from the array of its values, contained in the form bean. This is done in the action class that sets up all the data for the form. After I submit and validation fails, Struts forwards back to the input url, which is an action class. The problem is that the form object passed into perform() is null, so I can't get the array of values. What has me vexed is that after perform() forwards to the .jsp, all the form elements are populated as they were prior to submit, so the populated form exists, it's just not being passed in to perform(). I tried adding the name=formName attribute to the mapping, but then Struts tries to validate the form on the GET, as shown by the debug log below: -Processing a GET for /standards/curriculum-coverage-form -Looking for ActionForm bean under attribute 'curriculumCoverageReport' -Creating new ActionForm instance of class '...standards.CurriculumCoverageReportForm' -Storing instance under attribute 'curriculumCoverageReport' in scope 'request' -Populating bean properties from this request -Validating input form properties -No input form, but validation returned errors Any insight into this would be greatly appreciated. The mapping is shown below. Thanks, -Jeff action path=/standards/party-resources-form type=...standards.PartyResourcesReportAction scope=request parameter=form forward name=success path=standards/party-resources-form.jsp/ /action action path=/standards/party-resources-exec type=...standards.PartyResourcesReportAction name=partyResourcesReport scope=request parameter=exec input=/standards/party-resources-form.action forward name=success path=standards/party-resources-exec.jsp/ /action -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Newbie: problem with tiles definitions
How do you access an Action class directly from a browser? -Original Message- From: Cedric Dumoulin [mailto:[EMAIL PROTECTED]] Sent: Thursday, October 03, 2002 5:32 AM Does your action exist ? Try to access the action directly from the browser, does it works ? -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: unable to unsubscribe.
This is the Hotel California list. You can check in, but can never leave. (And we've already sold your email address to WorldPorn Marketing.) -Original Message- From: Eddie Bush [mailto:[EMAIL PROTECTED]] Sent: Thursday, October 03, 2002 12:30 AM 1 - Send the mail you sent 2 - Await a confirmation mail from each list 3 - Reply to the message (don't need to alter a thing) 4 - Await a message stating you've been removed -- Eddie Bush -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Populate form with ActionForm
You must set your form bean into request request.setattribute(Any Name, formBeanObject); and don't forget to define your formBeanObject in your struts-config.xml eg form-bean name=InsertUpdateResDepositForm type=CLASS NAME / action path=/InsertReserveDeposit name=InsertUpdateResDepositForm type=ActionClassName scope=request input=/AddReserveDeposit.jsp validate=true forward name=addPagepath=A.jsp / /action -- De: Miguel Angel Medina Lopez [mailto:[EMAIL PROTECTED]] Enviado el: jueves, 03 de octubre de 2002 14:36 Para: Miguel Angel Mulero Martinez; Struts Users Mailing List Asunto: Re: Populate form with ActionForm Thanks, but I thisk I'm doing that. My Action populate the actionForm and put it in the request, then forward to a JSP that must use the actionForm to populate the html form. That is the definition of the actions of this scenario: action path=/detallesEntidad parameter=detalles type=com.action.VehiculoAction scope=request attribute=entidadForm forward name=siguiente path=/formularioDetalles.jsp redirect=false / /action action path=/modificarEntidad parameter=modificar type=com.action.VehiculoAction name=vehiculoForm scope=request input=/formularioDetalles.jsp/ And the JSP form tag is: html:form enctype=multipart/form-data method=post action=/modificarEntidad.do I have followed the struts example, but the html form isn't populate. What's the matter? Thank You - Original Message - From: Miguel Angel Mulero Martinez [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED]; Miguel Angel Medina Lopez [EMAIL PROTECTED] Sent: Thursday, October 03, 2002 1:51 PM Subject: RE: Populate form with ActionForm Put a action in the middle. The action puts the bean in the request of the second jsp. If the second jsp populates a form with this bean, you can pass the actionform to the request instead of the bean and struts will populate the form for you. The only requisite is that the action associated with the form uses the actionform that you put in the request. Regards. -Mensaje original- De: Miguel Angel Medina Lopez [mailto:[EMAIL PROTECTED]] Enviado el: jueves, 03 de octubre de 2002 13:53 Para: Struts Users Mailing List Asunto: Populate form with ActionForm Hi all: I have an action that populate an ActionForm, when finish it forward to a page that have a html form. Now I want to populate the input fields with the value of the ActionForm. I have tried with different approaches but neither works. Somebody have a solution? Thank You in advance. MAML -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: [OT] Character Based User Interface
This MVC (Struts) you can access your model (beans) via a console application, or JTable Swing (directly or via SOAP). The point of MVC is to reuse components, and have a disposable presentation layer. An easy solution would be JTable with beans. Else you have to write a console (system main (String[] arg) ui. .V [EMAIL PROTECTED] wrote: we have some customers who still prefer having a character based user interface (i.e. VT-emulation on unix systems). reasons: speed of data entry, used to etc. as we have to respect the customers reasons and don't want to start some philosophic discussion about (dis)advantages of GUI, HTML or VT we are looking for a lite weight solutions to add a VT capability to our java applications. Does anybody of you hav experiences with this kind of user interface for a java system? Where can I find information about possible solutions? Does anybody of you have a struts application which has a co-existing character based user interface? tia rene -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
set ContentType to application/msword
I am trying to let user to open the HTML with MS Word. I changed the content type to ContentType=application/msword in the jsp, but it still did not bring up the Word. Does Struts set the content type to text/html somewhere? Thanks! Billy Ng
RE: Wrapping the controller?
Your right. I would like to subclass it. Should I subclass the controller or provide a new RequestProcessor?? I am doing this just to add some logging lines into it -Original Message- From: David Graham [mailto:[EMAIL PROTECTED]] Sent: Wednesday, October 02, 2002 3:00 PM To: [EMAIL PROTECTED] Subject: Re: Wrapping the controller? You don't want to wrap the controller you want to subclass it and override the process method or provide your own RequestProcessor. You could also put a filter in front of the controller but this requires a servlet 2.3 compliant container. Dave From: Smith, Johnathan M. [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: '[EMAIL PROTECTED]' [EMAIL PROTECTED] Subject: Wrapping the controller? Date: Wed, 2 Oct 2002 14:54:25 -0400 I have to wrap the controller to add some logging code into it. Can someone please maybe send me a sample on how should I do it? -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] _ Join the world's largest e-mail service with MSN Hotmail. http://www.hotmail.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: [Nested] Getting value from parent during iteration
This might be a suggested enhancement ala propertyValue=../foo for the nested:equal and all like comparative tags. Post it on the dev board. I could see where it would be useful for sure. Brandon Goodin Phase Web and Multimedia P (406) 862-2245 F (406) 862-0354 [EMAIL PROTECTED] http://www.phase.ws -Original Message- From: Sri Sankaran [mailto:[EMAIL PROTECTED]] Sent: Wednesday, October 02, 2002 7:52 AM To: Struts-User Subject: [Nested] Getting value from parent during iteration Using Struts 1.0.2 and Nested extension The value attribute doesn't support the nested syntax of walking up a tree a la ../foo. How is this result achieved? In my JSP I have the following nested:root name=dependencies nested:iterate property=types nested:equal property=name value=../currentType Do stuff /nested:equal /nested:iterate /nested:root class DepBean { // available with session key 'dependencies' private String currentType; private Collection types; public String getCurrentType() { return currentType; } public Collection getTypes() { return types; } ... } public class DepType { private String name; public String getName() { return name; } ... } Even if I resort to specifying the value using a scriptlet, how can I get at the DepBean without having % DepBean foo = (DepBean)session.getAttribute(dependencies); String currentType = foo.getCurrentType(); % and changing the nested:equal to nested:equal property=name value=%=currentType% Is this my only option? Sri -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
SV: set ContentType to application/msword
How are you setting it in the jsp? Using meta http-equiv=Content-Type...? Try using %@ page contentType=application/msword % instead. That works for me (with a different ContentType since I'm creating excel-data). -Ursprungligt meddelande- Från: Billy Ng [mailto:[EMAIL PROTECTED]] Skickat: den 3 oktober 2002 16:00 Till: Struts Users Mailing List Ämne: set ContentType to application/msword I am trying to let user to open the HTML with MS Word. I changed the content type to ContentType=application/msword in the jsp, but it still did not bring up the Word. Does Struts set the content type to text/html somewhere? Thanks! Billy Ng -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Display Tag Library
Has anyone been successful in using the display tag lib? http://edhill.its.uiowa.edu/display-0.8/ It's a great tool, one piece that's not working is the export... The CSV export exports the entire HTML, and Excel export exports everything in one cell. Anyone had this problem before? Also, for sorting numbers, does the underlying data be of type double, int, etc? Or can it be String and use Decorators to override the functionality so it'sint getNumber() ? Thanks a lot. Dean Chen -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Help with Struts + DB Access
Wendy - One approach I've used is: - Create (as it looks like you have) your form bean (that you refer to as the ActionForm extention) so you can set/get the properties using a collection. (eg, setDropdownValues(Collection values), etc.) - In your Action class, have it call what I'll refer to as a 'facade' class that manages retrieving the values. - The 'facade' class should provide a simple method such as facade.getValues() that returns the Collection as you need to set it in the form bean. - The Action class code would look like: formBean.setDropdownValues( facade.getValues() ); This simplifies maintenance of the Action class - not matter what for the values take, the Action class is unaffected. - Then in your facade class, have it coordinate the gathering of the data. It's requirements may be: - perform a getAttribute against the ServletContext to see if the values are stored there already - If the values aren't there, use the DAO to retrieve them - Potentially have it check time of day and periodically refresh the values stored in the servlet context - In addition, have the 'facade' catch any database access exceptions and 'rethrow' them as some sort of Application exception (eg, DropDownException would likely be an awful name, but you get the idea). This ensures that the Action class (the Controller in the MVC architecture of Struts) can manage the exception and redirect processing appropriately. Since the 'facade' hides the database access, the Action class shouldn't be catching JDBC exceptions. This allows you to isolate any changes in business logic or data access down in either the facade or the DAO. The facade simply presents the data in the format that the form bean wants it. I've identified using a Collection to pass values, but it could just as easily be a HashMap or whatever you might need. Best of luck - Kevin - Kevin Bedell author, Struts Kickstart - SAMS Publishing [EMAIL PROTECTED] on 10/02/2002 07:56:54 PM Please respond to Struts Users Mailing List [EMAIL PROTECTED] To:[EMAIL PROTECTED] cc: (bcc: Kevin Bedell/Systems/USHO/SunLife) Subject:Help with Struts + DB Access I'm trying to put a select list on my page. The contents of the list need to come from the database. I have a DAO layer, so I'm doing okay isolating the database access, but I'm still not quite sure when to retrieve the values and where to put them. In most of the examples I look at, and the struts-example webapp is no different, when you get down to the details, it'll say something like: In real life, these would be loaded from a database Well, that's in the 'subscription.jsp' page, and I *know* that in real life it wouldn't be loaded from the database *there*! I'm reading the docs for the html:collection and there are so many combinations of attributes that I'm still a bit confused. So far I've worked out that I can: 1. Put a Collection in some scope, as the example does. 2. Put a method in my ActionForm extension that returns a Collection There are probably more. Can someone give me some guidance on which method of supplying choices for a select list might work best for me? I'd like to get them into application scope if possible-- once they're loaded they're good forever and can be shared among sessions. (They change infrequently, and can wait for a restart on maintenance weekend to load the new values.) Thanks! -- Wendy in Chandler, AZ -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] --- This e-mail message (including attachments, if any) is intended for the use of the individual or entity to which it is addressed and may contain information that is privileged, proprietary , confidential and exempt from disclosure. If you are not the intended recipient, you are notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify the sender and erase this e-mail message immediately. --- -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Basic Templating Recommendations?
I've tried asking this a few times, but I think I haven't been clear. I need a simple way to have requests converted into calls to Tiles definitions. So, requests like /pages/pageone.thtml, would get turned into a call to the tile pageone. /pages/main/pagetwo.thtml = main.pageone, etc. I thought creating an Action that would figure out the defintion based on the request URI, using the ideas in org.apache.struts.tiles.actions.DefinitionDispatcherAction. However, I've just read that you can't have multiple servlet-mappings. Also, I feel that my approach isn't great. Please, I know people must be doing something for the many generic html pages on their dynamic sites, ideas? Thank you, A. -- Adam Sherman Software Developer Teach and Travel Inc. +1.613.241.3103 -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: [OT] Character Based User Interface
I haven't coded anything for a specific terminal emulation, but I try to design my systems so that the view doesn't matter. I follow common J2EE design patterns and implement a business delegate that returns data that can be used by a character-based interface, a Swing GUI, a struts application and probably anything else. I normally create simplistic character-based (or simple web forms) front-ends before I decide on a final view. As far as links for specific VT implementations in Java, I have none. Good luck, John - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, October 03, 2002 5:34 AM Subject: [OT] Character Based User Interface we have some customers who still prefer having a character based user interface (i.e. VT-emulation on unix systems). reasons: speed of data entry, used to etc. as we have to respect the customers reasons and don't want to start some philosophic discussion about (dis)advantages of GUI, HTML or VT we are looking for a lite weight solutions to add a VT capability to our java applications. Does anybody of you hav experiences with this kind of user interface for a java system? Where can I find information about possible solutions? Does anybody of you have a struts application which has a co-existing character based user interface? tia rene -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
EL in Struts
Hi guys, I've been switching alot of my struts stuff to JSTL so that I can use the EL functionality. But I still want to use the Struts Framework. Any ideas if Struts will incorporate EL anytime soon? -Tim -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: EL in Struts
It already has... check the contrib folder on the nigtly :-)) Brandon Goodin Phase Web and Multimedia P (406) 862-2245 F (406) 862-0354 [EMAIL PROTECTED] http://www.phase.ws -Original Message- From: Chen, Gin [mailto:[EMAIL PROTECTED]] Sent: Thursday, October 03, 2002 8:24 AM To: 'Struts Users Mailing List' Subject: EL in Struts Hi guys, I've been switching alot of my struts stuff to JSTL so that I can use the EL functionality. But I still want to use the Struts Framework. Any ideas if Struts will incorporate EL anytime soon? -Tim -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Wrapping the controller?
I overrode RequestProcessor for logging. Mark -Original Message- From: Smith, Johnathan M. [mailto:[EMAIL PROTECTED]] Sent: Thursday, October 03, 2002 9:49 AM Your right. I would like to subclass it. Should I subclass the controller or provide a new RequestProcessor?? I am doing this just to add some logging lines into it -Original Message- From: David Graham [mailto:[EMAIL PROTECTED]] Sent: Wednesday, October 02, 2002 3:00 PM To: [EMAIL PROTECTED] Subject: Re: Wrapping the controller? You don't want to wrap the controller you want to subclass it and override the process method or provide your own RequestProcessor. You could also put a filter in front of the controller but this requires a servlet 2.3 compliant container. Dave From: Smith, Johnathan M. [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: '[EMAIL PROTECTED]' [EMAIL PROTECTED] Subject: Wrapping the controller? Date: Wed, 2 Oct 2002 14:54:25 -0400 I have to wrap the controller to add some logging code into it. Can someone please maybe send me a sample on how should I do it? -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] _ Join the world's largest e-mail service with MSN Hotmail. http://www.hotmail.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Basic Templating Recommendations?
I don't understand what you are asking. With struts you can specify the template you want to use by placing a tiles definition in the forward mappings. It will map you request url to a definition. Just make sure that everything is happening through struts controller and map you forward to tiles definitions. Have you tried nesting definition in your tiles-def or using the inheritance feature? Brandon Goodin Phase Web and Multimedia P (406) 862-2245 F (406) 862-0354 [EMAIL PROTECTED] http://www.phase.ws -Original Message- From: Adam Sherman [mailto:[EMAIL PROTECTED]] Sent: Thursday, October 03, 2002 8:18 AM To: Struts Users Mailing List Subject: Basic Templating Recommendations? I've tried asking this a few times, but I think I haven't been clear. I need a simple way to have requests converted into calls to Tiles definitions. So, requests like /pages/pageone.thtml, would get turned into a call to the tile pageone. /pages/main/pagetwo.thtml = main.pageone, etc. I thought creating an Action that would figure out the defintion based on the request URI, using the ideas in org.apache.struts.tiles.actions.DefinitionDispatcherAction. However, I've just read that you can't have multiple servlet-mappings. Also, I feel that my approach isn't great. Please, I know people must be doing something for the many generic html pages on their dynamic sites, ideas? Thank you, A. -- Adam Sherman Software Developer Teach and Travel Inc. +1.613.241.3103 -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: threading question
Absolutely right, Jerry! Ironically, I was just writing a non-Struts helper class to make a credit card validation method thread safe and I was not Thinking-in-Struts mode. The no-instance variables rule is one of the first things learned when starting out with Struts! The variable should be limited to local scope or different threads are going to jeopardize the integrity of the variable state because the Action class is, in essence, static (singleton). Better get a second cup of coffee...is it Friday yet??? Mark -Original Message- From: Dave Derry [mailto:[EMAIL PROTECTED]] Sent: Thursday, October 03, 2002 9:48 AM To: Struts Users Mailing List Subject: Re: threading question Had your coffee yet this morning Mark? I don't think you read this very closely. Unless I am sorely mistaken (and it wouldn't be the first time!), it has been pointed out many times on this list that only one instance of each Action class will created, and cached by the ActionServlet. They must therefore be thread-safe, and any instance variables are a big no-no. If I am wrong about this, please let me know because that would certainly simplify the task that I am currently engaged in! ;-) Dave Derry - Original Message - From: Galbreath, Mark [EMAIL PROTECTED] Yes. As a non-static instance variable, each thread would have it's own reference and be able to set and maintain it's value separately from any other thread. Mark -Original Message- From: Esbrook, Scott [mailto:[EMAIL PROTECTED]] Sent: Thursday, October 03, 2002 7:45 AM Quick Struts/servlet threading question: If many classes extended the following 'AbstractAction' class (eg, 'ConcreteAction'), would use of the 'testString' member variable be threadsafe? public abstract class AbstractAction extends Action{ protected String testString; public ActionForward perform( ActionMapping map,ActionForm form,HttpServletRequest req,HttpServletResponse res){ testString = req.getParameter(myParam); // other common processing return process(map,form,req,res); } public abstract ActionForward process( ActionMapping map,ActionForm form,HttpServletRequest req,HttpServletResponse res); } public class ConcreteAction extends AbstractAction{ public ActionForward process( ActionMapping map,ActionForm form,HttpServletRequest req,HttpServletResponse res){ // do something with testString... // return an ActionForward object... } } I was strictly thinking of using the protected members on a per-request basis, always initializing them in the AbstractAction's perform() method. Furthermore, if use of testString is OK, wouldn't it be OK to have a member vars of type HttpRequest, etc. and set it/them in AbstractAction's perform(), thereby avoiding all the associated parameter passing? Using Struts 1.0.2 if that makes any difference. Thanks, Scott Esbrook Software Developer Compuware Corporation -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: threading question
Sorry, Dave. Derry, not Jerry. (Man, I knew I shouldn't have drank that second bottle of cough syrup!) -Original Message- From: Dave Derry [mailto:[EMAIL PROTECTED]] Sent: Thursday, October 03, 2002 9:48 AM To: Struts Users Mailing List Subject: Re: threading question Had your coffee yet this morning Mark? I don't think you read this very closely. Unless I am sorely mistaken (and it wouldn't be the first time!), it has been pointed out many times on this list that only one instance of each Action class will created, and cached by the ActionServlet. They must therefore be thread-safe, and any instance variables are a big no-no. If I am wrong about this, please let me know because that would certainly simplify the task that I am currently engaged in! ;-) Dave Derry - Original Message - From: Galbreath, Mark [EMAIL PROTECTED] Yes. As a non-static instance variable, each thread would have it's own reference and be able to set and maintain it's value separately from any other thread. Mark -Original Message- From: Esbrook, Scott [mailto:[EMAIL PROTECTED]] Sent: Thursday, October 03, 2002 7:45 AM Quick Struts/servlet threading question: If many classes extended the following 'AbstractAction' class (eg, 'ConcreteAction'), would use of the 'testString' member variable be threadsafe? public abstract class AbstractAction extends Action{ protected String testString; public ActionForward perform( ActionMapping map,ActionForm form,HttpServletRequest req,HttpServletResponse res){ testString = req.getParameter(myParam); // other common processing return process(map,form,req,res); } public abstract ActionForward process( ActionMapping map,ActionForm form,HttpServletRequest req,HttpServletResponse res); } public class ConcreteAction extends AbstractAction{ public ActionForward process( ActionMapping map,ActionForm form,HttpServletRequest req,HttpServletResponse res){ // do something with testString... // return an ActionForward object... } } I was strictly thinking of using the protected members on a per-request basis, always initializing them in the AbstractAction's perform() method. Furthermore, if use of testString is OK, wouldn't it be OK to have a member vars of type HttpRequest, etc. and set it/them in AbstractAction's perform(), thereby avoiding all the associated parameter passing? Using Struts 1.0.2 if that makes any difference. Thanks, Scott Esbrook Software Developer Compuware Corporation -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: set ContentType to application/msword
Haven't done this, but me thinks you will have to override setContentType() of ActionServlet. Mark -Original Message- From: Billy Ng [mailto:[EMAIL PROTECTED]] Sent: Thursday, October 03, 2002 10:00 AM I am trying to let user to open the HTML with MS Word. I changed the content type to ContentType=application/msword in the jsp, but it still did not bring up the Word. Does Struts set the content type to text/html somewhere? Thanks! Billy Ng -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Populate form with ActionForm
Thanks, That was the problem, I had not set the bean with the method request.setattribute. I thought that the framework did it for me. Thanks Miguel Angel Molero too for his explication about. MAML - Original Message - From: [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Cc: Struts Users Mailing List [EMAIL PROTECTED] Sent: Thursday, October 03, 2002 3:21 PM Subject: RE: Populate form with ActionForm You must set your form bean into request request.setattribute(Any Name, formBeanObject); and don't forget to define your formBeanObject in your struts-config.xml eg form-bean name=InsertUpdateResDepositForm type=CLASS NAME / action path=/InsertReserveDeposit name=InsertUpdateResDepositForm type=ActionClassName scope=request input=/AddReserveDeposit.jsp validate=true forward name=addPagepath=A.jsp / /action -- De: Miguel Angel Medina Lopez [mailto:[EMAIL PROTECTED]] Enviado el: jueves, 03 de octubre de 2002 14:36 Para: Miguel Angel Mulero Martinez; Struts Users Mailing List Asunto: Re: Populate form with ActionForm Thanks, but I thisk I'm doing that. My Action populate the actionForm and put it in the request, then forward to a JSP that must use the actionForm to populate the html form. That is the definition of the actions of this scenario: action path=/detallesEntidad parameter=detalles type=com.action.VehiculoAction scope=request attribute=entidadForm forward name=siguiente path=/formularioDetalles.jsp redirect=false / /action action path=/modificarEntidad parameter=modificar type=com.action.VehiculoAction name=vehiculoForm scope=request input=/formularioDetalles.jsp/ And the JSP form tag is: html:form enctype=multipart/form-data method=post action=/modificarEntidad.do I have followed the struts example, but the html form isn't populate. What's the matter? Thank You - Original Message - From: Miguel Angel Mulero Martinez [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED]; Miguel Angel Medina Lopez [EMAIL PROTECTED] Sent: Thursday, October 03, 2002 1:51 PM Subject: RE: Populate form with ActionForm Put a action in the middle. The action puts the bean in the request of the second jsp. If the second jsp populates a form with this bean, you can pass the actionform to the request instead of the bean and struts will populate the form for you. The only requisite is that the action associated with the form uses the actionform that you put in the request. Regards. -Mensaje original- De: Miguel Angel Medina Lopez [mailto:[EMAIL PROTECTED]] Enviado el: jueves, 03 de octubre de 2002 13:53 Para: Struts Users Mailing List Asunto: Populate form with ActionForm Hi all: I have an action that populate an ActionForm, when finish it forward to a page that have a html form. Now I want to populate the input fields with the value of the ActionForm. I have tried with different approaches but neither works. Somebody have a solution? Thank You in advance. MAML -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: EL in Struts
ooh! thanks eddie and brandon and mostly david. :) this will make Struts so much more fun. -Tim -Original Message- From: Eddie Bush [mailto:[EMAIL PROTECTED]] Sent: Thursday, October 03, 2002 10:37 AM To: Struts Users Mailing List Subject: Re: EL in Struts It's been done. Grab a nightly - I *think* it's there now. If not, grab CVS and compile your little heart away! (and give kudos to David M. Karr - who contributed the taglib) You're looking for struts-el, btw. You can find it in top-level-struts/contrib/struts-el (that's in CVS). I'm not sure 100% if/how/where it lives in the nightly, but I believe it does. Try it, you'll like it! Chen, Gin wrote: Hi guys, I've been switching alot of my struts stuff to JSTL so that I can use the EL functionality. But I still want to use the Struts Framework. Any ideas if Struts will incorporate EL anytime soon? -Tim -- Eddie Bush -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Wrapping the controller?
Sounds like the best idea to me. The servlet delegates processing to its RequestProcessor so it makes sense to subclass the RequestProcessor instead of the servlet. I think it would be pretty easy to add the logging. Override a processor method put a logging statment in, call super.process*(). Dave From: Galbreath, Mark [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Subject: RE: Wrapping the controller? Date: Thu, 3 Oct 2002 10:33:23 -0400 I overrode RequestProcessor for logging. Mark -Original Message- From: Smith, Johnathan M. [mailto:[EMAIL PROTECTED]] Sent: Thursday, October 03, 2002 9:49 AM Your right. I would like to subclass it. Should I subclass the controller or provide a new RequestProcessor?? I am doing this just to add some logging lines into it -Original Message- From: David Graham [mailto:[EMAIL PROTECTED]] Sent: Wednesday, October 02, 2002 3:00 PM To: [EMAIL PROTECTED] Subject: Re: Wrapping the controller? You don't want to wrap the controller you want to subclass it and override the process method or provide your own RequestProcessor. You could also put a filter in front of the controller but this requires a servlet 2.3 compliant container. Dave From: Smith, Johnathan M. [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: '[EMAIL PROTECTED]' [EMAIL PROTECTED] Subject: Wrapping the controller? Date: Wed, 2 Oct 2002 14:54:25 -0400 I have to wrap the controller to add some logging code into it. Can someone please maybe send me a sample on how should I do it? -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] _ Join the world's largest e-mail service with MSN Hotmail. http://www.hotmail.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] _ Join the worlds largest e-mail service with MSN Hotmail. http://www.hotmail.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
html:file tag
Hello, I'm having trouble with the html:file tag... Here's a snippet of my jsp: html:form method=POST action=/saveAction.do enctype=multipart/form-data html:file property=file/ ... /html:form I've also tried the html:file tag using the accepts attribute, accepts=java.io.File, and accepts=java.io.String, with, of course, the corresponding property in the actionForm set to the correct type. Every time the form is submitted, I get a Servlet Exception: BeanUtils.populate and ArgumentTypeMismatchException. Am I missing something here? Should the type of the upload actionForm property be File? String? something else? If anyone knows of any documentation out there about this, I'd appreciate it. Thanks, Matt -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: EL in Struts
-Original Message- From: Chen, Gin [mailto:[EMAIL PROTECTED]] Sent: Thursday, October 03, 2002 7:24 AM To: 'Struts Users Mailing List' Subject: EL in Struts Hi guys, I've been switching alot of my struts stuff to JSTL so that I can use the EL functionality. But I still want to use the Struts Framework. Any ideas if Struts will incorporate EL anytime soon? Good timing. Read the note I wrote yesterday, titled [ANNOUNCEMENT] Struts-EL contrib library (Struts JSTL). -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: [OT] Mail list gone whack-o?
-Original Message- From: Eddie Bush [mailto:[EMAIL PROTECTED]] Sent: Thursday, October 03, 2002 7:56 AM To: Struts Users List Subject: [OT] Mail list gone whack-o? I keep getting (several!) messages (one for each I send, I believe) that say my mail wasn't delivered - but it sure shows up on the list! What's up? Any clue? Just like most mailing lists, when you write a note on struts-user, the mailing list software actually sends that note you wrote to all of the subscribers, sort of from you, and sort of from the mailing list. If there's something wrong with one or more subscribers, like they have vacation on, or their server is down, or they got dotbombed, the mail will bounce, all the way back to you. It makes it look like your note failed to get to the list, but that's not the case. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
[TILES] Frame's src attrib has html not a url
Using Struts 1.0.2 and Tiles extension The page I am developing consists of frames. Upon display, all the frames display a 404 error. Looking at the source of the HTML, I find that the src attribute doesn't point to a URL but contains the contents of the file at that url. My frameset page: frameset rows=10%, 80%, 10% frameset cols=50%, 50% frame src='tiles:get name=title/' name=title frame src='tiles:get name=help/' name=help /frameset frame src='tiles:get name=body/' name=body frame src='tiles:get name=navigation/' name=nav /frameset My tile definitions contains definition name=qsWizard path=/framedWizardLayout.jsp put name=title value=qsTitle.jsp/ put name=help value=qsHelp.jsp/ put name=body value=/ put name=navigationvalue=/ /definition definition name=BasicWizardPage extends=qsWizard put name=navigation value=workflow/nav.jsp/ /definition !-- Disclaimer page -- definition name=Disclaimer extends=BasicWizardPage put name=bodyvalue=workflow/disclaimer/disclaimerBody.jsp/ /definition The page I am invoking is Disclaimer. What am I doing wrong? Sri
Re: threading question
U...that's Dave...but that's all right. Go get that second cup of coffee! ;-)) Dave Derry - Original Message - From: Galbreath, Mark [EMAIL PROTECTED] Absolutely right, Jerry! Ironically, I was just writing a non-Struts helper class to make a credit card validation method thread safe and I was not Thinking-in-Struts mode. The no-instance variables rule is one of the first things learned when starting out with Struts! The variable should be limited to local scope or different threads are going to jeopardize the integrity of the variable state because the Action class is, in essence, static (singleton). Better get a second cup of coffee...is it Friday yet??? Mark -Original Message- From: Dave Derry [mailto:[EMAIL PROTECTED]] Had your coffee yet this morning Mark? I don't think you read this very closely. Unless I am sorely mistaken (and it wouldn't be the first time!), it has been pointed out many times on this list that only one instance of each Action class will created, and cached by the ActionServlet. They must therefore be thread-safe, and any instance variables are a big no-no. If I am wrong about this, please let me know because that would certainly simplify the task that I am currently engaged in! ;-) Dave Derry -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: [OT] Mail list gone whack-o?
I'm seeing the same behavior but I don't know what the problem is. robert -Original Message- From: Eddie Bush [mailto:[EMAIL PROTECTED]] Sent: Thursday, October 03, 2002 10:56 AM To: Struts Users List Subject: [OT] Mail list gone whack-o? I keep getting (several!) messages (one for each I send, I believe) that say my mail wasn't delivered - but it sure shows up on the list! What's up? Any clue? Thanks! -- Eddie Bush -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
DynaActionForm and hashmap property
Hi All, My question is in regard to submitting a JSP form that contains form fields displayed by iterating over a hashmap. I have defined a DynaActionForm in my Struts-config file in which, besides numerous String properties, I have one hashmap. form-bean name=profileform dynamic=true type=org.apache.struts.action.DynaActionForm form-property name= type=java.util.String / form-property name=userFields type=java.util.HashMap / /form-bean Using the profileForm.set() method in my ShowAction for displaying the fields in my JSP form is working fine, including for the hashmap: ShowAction code Fragment: HashMap userFields = new HashMap(); [...builds a dynamic set of user field names and field values...] profileForm.set(userFields, userFields); JSP code fragment: logic:iterate id=userField name=profileform property=userFields tr th align=left bean:write name=userField property=key/ /th td align=left html:text name=userField property=value/ /td /tr /logic:iterate Whereas the theory behind handling the String form fields (dynamic setters and getters) seems very straightforward, I don't understand how the dynamic form handles the hashmap fields (if it is handling them at all?) on submit. How do I access the edited hashmap field values for updating my business objects within the SaveAction? Copying from the successful processing of the form String fields, I have tried in the SaveAction: HashMap userFields = (HashMap)profileForm.get(userFields); but NullPointerExceptions thrown while trying to access 'userFields' lead me to believe that I am not getting my desired results. Any guidance would be greatly appreciated. Thanks, Susan -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Basic Templating Recommendations?
Phase Web and Multimedia wrote: I don't understand what you are asking. With struts you can specify the template you want to use by placing a tiles definition in the forward mappings. It will map you request url to a definition. Just make sure that everything is happening through struts controller and map you forward to tiles definitions. Have you tried nesting definition in your tiles-def or using the inheritance feature? Basically, I've got a bunch of pages in a site that are static. I need a simple way to template them. I would like to use Tiles, but I don't want to have links to tiles?def=main.index and such. I want links to look like below. So, I'm asking about recommendations to do simple templating of static content, in conjunction with a dynamic site built using Struts. (So I want to reuse the tiles.) Thanks for your help, A. I've tried asking this a few times, but I think I haven't been clear. I need a simple way to have requests converted into calls to Tiles definitions. So, requests like /pages/pageone.thtml, would get turned into a call to the tile pageone. /pages/main/pagetwo.thtml = main.pageone, etc. I thought creating an Action that would figure out the defintion based on the request URI, using the ideas in org.apache.struts.tiles.actions.DefinitionDispatcherAction. However, I've just read that you can't have multiple servlet-mappings. Also, I feel that my approach isn't great. Please, I know people must be doing something for the many generic html pages on their dynamic sites, ideas? -- Adam Sherman Software Developer Teach and Travel Inc. +1.613.241.3103 -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: [OT] Mail list gone whack-o?
Yes, I've noticed it too. James Mitchell On Thu, 03 October 2002, Eddie Bush wrote: Message-Id: [EMAIL PROTECTED] List-Help: mailto:[EMAIL PROTECTED] List-Unsubscribe: mailto:[EMAIL PROTECTED] From: Eddie Bush [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] List-Id: Struts Users Mailing List struts-user.jakarta.apache.org X-Accept-Language: en-us, en Date: Thu, 03 Oct 2002 09:56:15 -0500 Received: (cpmta 26780 invoked from network); 3 Oct 2002 08:08:33 -0700 Received: from 192.18.49.131 (HELO nagoya.betaversion.org) by smtp.c003.snv.cp.net (209.228.32.211) with SMTP; 3 Oct 2002 08:08:33 -0700 Received: (qmail 1633 invoked by uid 97); 3 Oct 2002 14:55:28 - Received: (qmail 1615 invoked by uid 98); 3 Oct 2002 14:55:28 - Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm X-Antivirus: nagoya (v4218 created Aug 14 2002) User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.9) Gecko/20020513 Content-Type: text/plain; charset=us-ascii; format=flowed X-Received: 3 Oct 2002 15:08:33 GMT List-Post: mailto:[EMAIL PROTECTED] Subject: [OT] Mail list gone whack-o? X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N List-Subscribe: mailto:[EMAIL PROTECTED] Precedence: bulk Delivered-To: [EMAIL PROTECTED] Delivered-To: mailing list [EMAIL PROTECTED] Return-Path: [EMAIL PROTECTED] Content-Transfer-Encoding: 7BIT MIME-Version: 1.0 To: Struts Users List [EMAIL PROTECTED] I keep getting (several!) messages (one for each I send, I believe) that say my mail wasn't delivered - but it sure shows up on the list! What's up? Any clue? Thanks! -- Eddie Bush -- To unsubscribe, e-mail: lt;mailto:[EMAIL PROTECTED]gt; For additional commands, e-mail: lt;mailto:[EMAIL PROTECTED]gt; -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
EL and the developer's roadmap
OK, I'll bite. What does EL stand for? From what I'm hearing, there seems to be a current trend of moving away from Struts taglibs if there is a JSTL tag that has the same functionality. I admit that makes me a bit nervous as a newbie. I'm still learning the struts tags! The Goodwill book has an excellent appendix with _examples_ of individual tag usage. Now I guess I will have to get a book on JSTL book as well. Is there a Struts roadmap available anywhere? Sometimes I feel I am always running to to catch up in Struts. Mastered ActionForms? oops gotta learn DynaActionForms! Learned how to validate in the action class? , ha! better learn Dyna*Valid* stuff. Mastered struts-logic? no! learn JSTL! I know I don't have to use all new features but I would like have a little warning about what may be coming down the road. That is where a roadmap would come in very handy. I could know which technologies to watch and which to ignore in the short term. Thanks for listening. -- Vincent Stoessel Linux Systems Developer vincent xaymaca.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: html:file tag
What I do: JSP file: html:form method=post action=/upload enctype=multipart/form-data table border=0 cellpadding=0 cellspacing=0 width=100% tr td colspan=5html:file property=theFile //td img src=picts/blind.gif width=30 height=1 border=0 tdhtml:submit value= Go //td /tr /table /html:form UploadActionForm: protected FormFile theFile; with get/set methods UploadAction:perform: if ( file != null ) { ... stream = file.getInputStream(); zipFile = new File( user.path, user.kurzname + -upload.zip ); bos = new BufferedOutputStream( new FileOutputStream( zipFile ) ); int bytesRead = 0; int count = 0; byte[] buffer = new byte[ 8192 ]; while ( ( bytesRead = stream.read( buffer, 0, 8192 ) ) != -1 ) { bos.write(buffer, 0, bytesRead); count += bytesRead; and so on... At 11:09 03.10.2002 -0400, Matt Sales wrote: Hello, I'm having trouble with the html:file tag... Here's a snippet of my jsp: enctype=multipart/form-data ... I've also tried the tag using the accepts attribute, accepts=java.io.File, and accepts=java.io.String, with, of course, the corresponding property in the actionForm set to the correct type. Every time the form is submitted, I get a Servlet Exception: BeanUtils.populate and ArgumentTypeMismatchException. Am I missing something here? Should the type of the upload actionForm property be File? String? something else? If anyone knows of any documentation out there about this, I'd appreciate it. Thanks, Matt -- To unsubscribe, e-mail: For additional commands, e-mail:
Re: threading question
On Thu, 3 Oct 2002, Esbrook, Scott wrote: Date: Thu, 3 Oct 2002 07:45:21 -0400 From: Esbrook, Scott [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: '[EMAIL PROTECTED]' [EMAIL PROTECTED] Subject: threading question Hello, Quick Struts/servlet threading question: If many classes extended the following 'AbstractAction' class (eg, 'ConcreteAction'), would use of the 'testString' member variable be threadsafe? As others eventually drank enough coffee to figure out :-), the testString instance in your example below is *not* threadsafe if you expect to store per-request state information in it. The general rule is that you can use *local* variables for this sort of thing (because they get created on the stack for each thread), but not instance or static variables. Remember that Struts will create only one instance of each ConcreteAction for a given action path, so multiple simultaneous requests to the same Action will share that instance (and therefore the instance variable). Craig public abstract class AbstractAction extends Action{ protected String testString; public ActionForward perform( ActionMapping map,ActionForm form,HttpServletRequest req,HttpServletResponse res){ testString = req.getParameter(myParam); // other common processing return process(map,form,req,res); } public abstract ActionForward process( ActionMapping map,ActionForm form,HttpServletRequest req,HttpServletResponse res); } public class ConcreteAction extends AbstractAction{ public ActionForward process( ActionMapping map,ActionForm form,HttpServletRequest req,HttpServletResponse res){ // do something with testString... // return an ActionForward object... } } I was strictly thinking of using the protected members on a per-request basis, always initializing them in the AbstractAction's perform() method. Furthermore, if use of testString is OK, wouldn't it be OK to have a member vars of type HttpRequest, etc. and set it/them in AbstractAction's perform(), thereby avoiding all the associated parameter passing? Using Struts 1.0.2 if that makes any difference. Thanks, Scott Esbrook Software Developer Compuware Corporation The contents of this e-mail are intended for the named addressee only. It contains information that may be confidential. Unless you are the named addressee or an authorized designee, you may not copy or use it, or disclose it to anyone else. If you received it in error please notify us immediately and then destroy it. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Populate form with ActionForm
On Thu, 3 Oct 2002, Miguel Angel Medina Lopez wrote: Date: Thu, 3 Oct 2002 13:53:09 +0200 From: Miguel Angel Medina Lopez [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED], Miguel Angel Medina Lopez [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: Populate form with ActionForm Hi all: I have an action that populate an ActionForm, when finish it forward to a page that have a html form. Now I want to populate the input fields with the value of the ActionForm. I have tried with different approaches but neither works. Somebody have a solution? The standard struts-example application describes how I approach this sort of thing. Consider when you select the Edit your user registration profile option after logging in: * The /editRegistration action is called, which looks stuff up in the database and preloads the form bean, and forwards to ... * The registration.jsp page, which displays the existing database info that was preloaded, and submits changes to ... * The /saveRegistration action, which updates the database to reflect the modified data entered on the form. Thank You in advance. MAML Craig -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: [OT] Mail list gone whack-o?
Yeah - you're exactly right, David. I hadn't thought of it that way. I think what made it seem odd to me is that it was from [EMAIL PROTECTED], which, I believe, is the server running the list - right? I don't know what made me think that now - but it's an impression I've had, I suppose. shrug/ Ok - just curious why my inbox was filling up with bounces that (I thought) shouldn't be there. I suppose you're probably correct though :-/ ... yeah - just went back and examined the headers in the response and I believe you're right. Sorry for the traffic! I had good intentions :-) (Informing of a problem) Karr, David wrote: -Original Message- From: Eddie Bush [mailto:[EMAIL PROTECTED]] Sent: Thursday, October 03, 2002 7:56 AM To: Struts Users List Subject: [OT] Mail list gone whack-o? I keep getting (several!) messages (one for each I send, I believe) that say my mail wasn't delivered - but it sure shows up on the list! What's up? Any clue? Just like most mailing lists, when you write a note on struts-user, the mailing list software actually sends that note you wrote to all of the subscribers, sort of from you, and sort of from the mailing list. If there's something wrong with one or more subscribers, like they have vacation on, or their server is down, or they got dotbombed, the mail will bounce, all the way back to you. It makes it look like your note failed to get to the list, but that's not the case. -- Eddie Bush -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Wrapping the controller?
David Graham wrote: Sounds like the best idea to me. ... unless you're on a container supporting servlet spec 2.3 :-) In that case, use a filter ;-) and be independent of Struts and compliant with any server you choose to run on. The servlet delegates processing to its RequestProcessor so it makes sense to subclass the RequestProcessor instead of the servlet. I think it would be pretty easy to add the logging. Override a processor method put a logging statment in, call super.process*(). Dave -- Eddie Bush -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: html:file tag
At 11:09 AM -0400 2002/10/03, Matt Sales wrote: Hello, I'm having trouble with the html:file tag... Here's a snippet of my jsp: html:form method=POST action=/saveAction.do enctype=multipart/form-data html:file property=file/ ... /html:form I've also tried the html:file tag using the accepts attribute, accepts=java.io.File, and accepts=java.io.String, with, of course, the corresponding property in the actionForm set to the correct type. Every time the form is submitted, I get a Servlet Exception: BeanUtils.populate and ArgumentTypeMismatchException. Am I missing something here? Should the type of the upload actionForm property be File? String? something else? something else: org.apache.struts.upload.FormFile Struts uses a user-configurable implementation of type org.apache.struts.upload.MultipartRequestHandler as a factory which produces an implementation of FormFile from the HttpServletRequest. You rarely have to worry about this detail, but you can set an alternative MultipartRequestHandler in the controller section of your struts-config.xml file. All you really care about is that when you get the ActionForm in your Action, it has a property of type FormFile. Hope that helps. Joe -- -- * Joe Germuska{ [EMAIL PROTECTED] } It's pitiful, sometimes, if they've got it bad. Their eyes get glazed, they go white, their hands tremble As I watch them I often feel that a dope peddler is a gentleman compared with the man who sells records. --Sam Goody, 1956 -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: unable to unsubscribe.
LOL James Mitchell - Original Message - From: Galbreath, Mark [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Sent: Thursday, October 03, 2002 9:12 AM Subject: RE: unable to unsubscribe. This is the Hotel California list. You can check in, but can never leave. (And we've already sold your email address to WorldPorn Marketing.) -Original Message- From: Eddie Bush [mailto:[EMAIL PROTECTED]] Sent: Thursday, October 03, 2002 12:30 AM 1 - Send the mail you sent 2 - Await a confirmation mail from each list 3 - Reply to the message (don't need to alter a thing) 4 - Await a message stating you've been removed -- Eddie Bush -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: html:file tag
There is an example application included in the Struts distribution showing how to upload files - or at least there was. It's probably still there, though I haven't looked recently. Best of luck - Kevin shamelessplug It's also covered in my book :-) with a sample application provided. (you did ask where it's documented...) /shamelessplug Kevin Bedell author, Struts Kickstart - SAMS Publishing Matt Sales [EMAIL PROTECTED] on 10/03/2002 11:09:36 AM Please respond to Struts Users Mailing List [EMAIL PROTECTED] To:Struts Users Mailing List [EMAIL PROTECTED] cc: (bcc: Kevin Bedell/Systems/USHO/SunLife) Subject:html:file tag Hello, I'm having trouble with the html:file tag... Here's a snippet of my jsp: html:form method=POST action=/saveAction.do enctype=multipart/form-data html:file property=file/ ... /html:form I've also tried the html:file tag using the accepts attribute, accepts=java.io.File, and accepts=java.io.String, with, of course, the corresponding property in the actionForm set to the correct type. Every time the form is submitted, I get a Servlet Exception: BeanUtils.populate and ArgumentTypeMismatchException. Am I missing something here? Should the type of the upload actionForm property be File? String? something else? If anyone knows of any documentation out there about this, I'd appreciate it. Thanks, Matt -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] --- This e-mail message (including attachments, if any) is intended for the use of the individual or entity to which it is addressed and may contain information that is privileged, proprietary , confidential and exempt from disclosure. If you are not the intended recipient, you are notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify the sender and erase this e-mail message immediately. --- -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: struts-config.xml question
Victor and Emmanuel, thanks for your answers. With them, and the later discussion on similar topics I think I understand. Part of my confusion comes from a bug I've not been able to repeat. At one point in time I changed the 'attribute' property to 'name' and my application stopped working. It seems that I had done something else (not sure what) and the problem had nothing to do with using 'name'. I've just tried to repeat it in isolation and I can't. Again, thanks. Kevin. __ Do you Yahoo!? New DSL Internet Access from SBC Yahoo! http://sbc.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: EL and the developer's roadmap
-Original Message- From: Vincent Stoessel [mailto:[EMAIL PROTECTED]] Sent: Thursday, October 03, 2002 8:31 AM To: Struts Users Subject: EL and the developer's roadmap OK, I'll bite. What does EL stand for? From what I'm hearing, there seems to be a current trend of moving away from Struts taglibs if there is a JSTL tag that has the same functionality. I admit that makes me a bit nervous as a newbie. I'm still learning the struts tags! The Goodwill book has an excellent appendix with _examples_ of individual tag usage. Now I guess I will have to get a book on JSTL book as well. Is there a Struts roadmap available anywhere? Sometimes I feel I am always running to to catch up in Struts. Mastered ActionForms? oops gotta learn DynaActionForms! Learned how to validate in the action class? , ha! better learn Dyna*Valid* stuff. Mastered struts-logic? no! learn JSTL! I know I don't have to use all new features but I would like have a little warning about what may be coming down the road. That is where a roadmap would come in very handy. I could know which technologies to watch and which to ignore in the short term. Thanks for listening. I wouldn't go so far as to call it a movement away from using Struts tags. I'm an individual. I had an idea to combine the Struts tag library with the JSTL EL engine (which stands for expression language). I wrote the library and contributed it. Some people want to experiment with JSTL while using Struts, which I think is a good idea. Now, I would definitely say there is a trend towards using the EL syntax, as the JSP 2.0 specification will allow that syntax, both in attribute values, and in general content. There is only one constant, and that is change. If you are determined to keep track of the latest developments in everything you're involved with, it will definitely be a challenge. My advice is to pick the areas you want to concentrate on. Determine areas that you PLAN to ignore, at least while it's on the bleeding edge. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Using a default entry with LookupDispatchAction ???
I am currently using LookupDispatchAction to handle all of the various submit buttons on my form. But when this particular webpage is first invoked, I would like to first pre-populate it with values. So I want to use the same Action (Form bean) to handle pre-populating the webpage and then handling the later user modifications (after they have pressed any one of the submit buttons). I am thinking that I will probably need to use an HTML link to invoke it. I was experimenting with something along these lines: html:link page=/overview.do?action=initializeOverview/html:link where this method would simply be included in the getKeyMethodMap. protected Map getKeyMethodMap() { Map map = new HashMap(); map.put(button.save.borrower1, saveBorrower1); map.put(button.save.borrower2, saveBorrower2); map.put(initialize, initialize); return map; } But have not gotten this to work yet. Any help would be appreciated thanks, Norman -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: EL and the developer's roadmap
Sometimes I feel I am always running to to catch up in Struts. Mastered ActionForms? oops gotta learn DynaActionForms! Learned how to validate in the action class? , ha! better learn Dyna*Valid* stuff. Mastered struts-logic? no! learn JSTL! I feel the same way. :) I was trying to get a good start in 1.0 before going to 1.1, and I just discovered that I must already be using 1.1 since LabelValueBean works. (I think James Mitchell converted me with the new struts-example putting jsp's under WEB-INF. Thanks! That has to be the least painful conversion I've ever been through. :) For some reason I thought Struts 1.1 required JSP 1.2. I'm now looking for a Contants class or a VERSION variable somewhere. Is there a way for me to know for sure what version of Struts I'm using? Compare the file sizes? (It's 327 kb.) -- Wendy Smoak http://sourceforge.net/projects/unidbtags
Re: EL and the developer's roadmap
I'm with you Vincent! I am really enjoying getting into Struts, but wow, the new stuff comes up fast! I just got a copy of Goodwill's book last week, and am looking forward to other references coming out next month. I can't wait until I don't feel like such a newbie! A roadmap is a very handy idea, but by nature open source projects may not be conducive to one. Susan Vincent Stoessel [EMAIL PROTECTED] 10/03/2002 11:30 AM Please respond to Struts Users Mailing List To: Struts Users [EMAIL PROTECTED] cc: Subject:EL and the developer's roadmap OK, I'll bite. What does EL stand for? From what I'm hearing, there seems to be a current trend of moving away from Struts taglibs if there is a JSTL tag that has the same functionality. I admit that makes me a bit nervous as a newbie. I'm still learning the struts tags! The Goodwill book has an excellent appendix with _examples_ of individual tag usage. Now I guess I will have to get a book on JSTL book as well. Is there a Struts roadmap available anywhere? Sometimes I feel I am always running to to catch up in Struts. Mastered ActionForms? oops gotta learn DynaActionForms! Learned how to validate in the action class? , ha! better learn Dyna*Valid* stuff. Mastered struts-logic? no! learn JSTL! I know I don't have to use all new features but I would like have a little warning about what may be coming down the road. That is where a roadmap would come in very handy. I could know which technologies to watch and which to ignore in the short term. Thanks for listening. -- Vincent Stoessel Linux Systems Developer vincent xaymaca.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: EL and the developer's roadmap
On Thu, 3 Oct 2002, Vincent Stoessel wrote: Date: Thu, 03 Oct 2002 11:30:35 -0400 From: Vincent Stoessel [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users [EMAIL PROTECTED] Subject: EL and the developer's roadmap OK, I'll bite. What does EL stand for? The acronym EL stands for expression language -- one of the very cool features in JSTL 1.0 (and JSP 2.0 will let you use it anywhere in your pages, even in template text). From what I'm hearing, there seems to be a current trend of moving away from Struts taglibs if there is a JSTL tag that has the same functionality. I admit that makes me a bit nervous as a newbie. I'm still learning the struts tags! The Goodwill book has an excellent appendix with _examples_ of individual tag usage. Now I guess I will have to get a book on JSTL book as well. Is there a Struts roadmap available anywhere? Sometimes I feel I am always running to to catch up in Struts. Mastered ActionForms? oops gotta learn DynaActionForms! Learned how to validate in the action class? , ha! better learn Dyna*Valid* stuff. Mastered struts-logic? no! learn JSTL! We haven't formally discussed it on the STRUTS-DEV list yet, but I would assume that future versions of Struts will feature the use of the standard tags (JSTL now, JavaServer Faces when it's available) as the recommended approach for new apps. That being said, there are thousands of apps using the existing Struts tags, so they are not going to go away any time soon. I know I don't have to use all new features but I would like have a little warning about what may be coming down the road. That is where a roadmap would come in very handy. I could know which technologies to watch and which to ignore in the short term. Thanks for listening. The current and upcoming technologies I would definitely pay attention to for Struts related stuff: * Servlet 2.3 and 2.4 (especially filters and event listeners) * JSP Standard Tag Library (JSTL 1.0) and the recently added struts-el library in the contrib directory of the nightly builds that adds EL-compatible evaluations to existing Struts tags * JSP 2.0 (lots and lots of really cool things, including EL expressions everywhere and the ability to create custom tags out of chunks of JSP code) * JavaServer Faces (JSR-127) for user interface components * Portlet API (JSR-168) for writing portlets that can be run in any conforming portal server * JAXP/1.2 (part of the Java Web Services Developer Pack and Java XML Pack from java.sun.com) for the latest additions to XML parsing and transformations (JSTL includes lots of good tags for XML processing) * JAX-RPC/1.0 (part of the Java Web Services Developer Pack and Java XML Pack from java.sun.com) for integrating SOAP-based web services that can utilize the same business logic components as your Struts-based web applications do -- a reward for people who follow good MVC-oriented architecture principles :-) Much of this stuff is still in the future. If you're just starting out, don't feel shy about learning the existing Struts tag library and using it -- you've got lots of company. But, plan on migrating to standards based technologies as they become available to you in the future, to gain the benefits of competition between vendors on how well they implemented those technologies (all the while secure in the knowledge that your app will be portable). -- Vincent Stoessel Linux Systems Developer vincent xaymaca.com Craig -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: [TILES] Frame's src attrib has html not a url
You should provide the attribute value as a String, not as its content to the frame: frame src='tiles:getAsString name=body/' name=body Also remember that you can only use valid url here, not tiles definitions. This is because the url is interpreted by the client browser, not on the server. Cedric Sri Sankaran wrote: Using Struts 1.0.2 and Tiles extension The page I am developing consists of frames. Upon display, all the frames display a 404 error. Looking at the source of the HTML, I find that the src attribute doesn't point to a URL but contains the contents of the file at that url. My frameset page: frameset rows=10%, 80%, 10% frameset cols=50%, 50% frame src='tiles:get name=title/' name=title frame src='tiles:get name=help/' name=help /frameset frame src='tiles:get name=body/' name=body frame src='tiles:get name=navigation/' name=nav /frameset My tile definitions contains definition name=qsWizard path=/framedWizardLayout.jsp put name=title value=qsTitle.jsp/ put name=help value=qsHelp.jsp/ put name=body value=/ put name=navigationvalue=/ /definition definition name=BasicWizardPage extends=qsWizard put name=navigation value=workflow/nav.jsp/ /definition !-- Disclaimer page -- definition name=Disclaimer extends=BasicWizardPage put name=bodyvalue=workflow/disclaimer/disclaimerBody.jsp/ /definition The page I am invoking is Disclaimer. What am I doing wrong? Sri -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: threading question
Yeah, and now I'm W-I-R-E-D. :-0 -Original Message- From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]] Sent: Thursday, October 03, 2002 11:35 AM As others eventually drank enough coffee to figure out :-), -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Problem with Jrun
Hello, I'm running Jrun 3.1 (latest patch) on WinXP Pro with IIS. I have had this config for 2+ years and it works great. Lately I have been playing with Struts 1.1 beta. After intalling the struts example app, I get the following error when loading the index.jsp page. 500 Internal Server Error PRE B/strutsexample/:/B Exception thrown processing JSP page. java.lang.NoClassDefFoundError at org.apache.struts.taglib.bean.MessageTag.doStartTag(MessageTag.java:295) at jrun__index2ejspa._jspService(jrun__index2ejspa.java:58) at allaire.jrun.jsp.HttpJSPServlet.service(HttpJSPServlet.java:39) at allaire.jrun.jsp.JSPServlet.service(JSPServlet.java:228) at allaire.jrun.jsp.JSPServlet.service(JSPServlet.java:196) at allaire.jrun.servlet.JRunSE.service(JRunSE.java:1417) at allaire.jrun.session.JRunSessionService.service(JRunSessionService.java:1106) at allaire.jrun.servlet.JRunSE.runServlet(JRunSE.java:1271) at allaire.jrun.servlet.JRunRequestDispatcher.forward(JRunRequestDispatcher.java:89) at allaire.jrun.file.FileServlet.service(FileServlet.java:178) at allaire.jrun.servlet.JRunServletPool.service(JRunServletPool.java:90) at allaire.jrun.servlet.JRunSE.service(JRunSE.java:1417) at allaire.jrun.session.JRunSessionService.service(JRunSessionService.java:1106) at allaire.jrun.servlet.JRunSE.runServlet(JRunSE.java:1271) at allaire.jrun.servlet.JRunRequestDispatcher.forward(JRunRequestDispatcher.java:89) at allaire.jrun.servlet.JRunSE.service(JRunSE.java:1557) at allaire.jrun.servlet.JRunSE.service(JRunSE.java:1547) at allaire.jrun.servlet.JvmContext.dispatch(JvmContext.java:364) at allaire.jrun.jrpp.ProxyEndpoint.run(ProxyEndpoint.java:388) at allaire.jrun.ThreadPool.run(ThreadPool.java:272) at allaire.jrun.WorkerThread.run(WorkerThread.java:75) /PRE I do NOT have any struts.jar files in any location other then the WEB-INF/lib for the application. (along with all the COMMONS*.jars) I've read and search all over to no avail. I installed Struts .9 while back, and i remember it worked fine. Thanks in advance for any ideas, George [EMAIL PROTECTED] __ Do you Yahoo!? New DSL Internet Access from SBC Yahoo! http://sbc.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: EL and the developer's roadmap
First time I've heard of EL too. Where can I get more info? -Original Message- From: Karr, David [mailto:[EMAIL PROTECTED]] Sent: Thursday, October 03, 2002 12:06 PM To: 'Struts Users Mailing List' Subject: RE: EL and the developer's roadmap -Original Message- From: Vincent Stoessel [mailto:[EMAIL PROTECTED]] Sent: Thursday, October 03, 2002 8:31 AM To: Struts Users Subject: EL and the developer's roadmap OK, I'll bite. What does EL stand for? From what I'm hearing, there seems to be a current trend of moving away from Struts taglibs if there is a JSTL tag that has the same functionality. I admit that makes me a bit nervous as a newbie. I'm still learning the struts tags! The Goodwill book has an excellent appendix with _examples_ of individual tag usage. Now I guess I will have to get a book on JSTL book as well. Is there a Struts roadmap available anywhere? Sometimes I feel I am always running to to catch up in Struts. Mastered ActionForms? oops gotta learn DynaActionForms! Learned how to validate in the action class? , ha! better learn Dyna*Valid* stuff. Mastered struts-logic? no! learn JSTL! I know I don't have to use all new features but I would like have a little warning about what may be coming down the road. That is where a roadmap would come in very handy. I could know which technologies to watch and which to ignore in the short term. Thanks for listening. I wouldn't go so far as to call it a movement away from using Struts tags. I'm an individual. I had an idea to combine the Struts tag library with the JSTL EL engine (which stands for expression language). I wrote the library and contributed it. Some people want to experiment with JSTL while using Struts, which I think is a good idea. Now, I would definitely say there is a trend towards using the EL syntax, as the JSP 2.0 specification will allow that syntax, both in attribute values, and in general content. There is only one constant, and that is change. If you are determined to keep track of the latest developments in everything you're involved with, it will definitely be a challenge. My advice is to pick the areas you want to concentrate on. Determine areas that you PLAN to ignore, at least while it's on the bleeding edge. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
DynaFormAction problem
Hi everybody, I have this action !-- Editar institucion -- actionpath=/editarInstitucion type=co.com.proveedores.EditarInstitucionAction attribute=institucionForm scope=request validate=false forward name=success path=/editarInstitucion.jsp/ /action and this form-bean... !-- Institucion form bean -- form-bean name=institucionForm type=org.apache.struts.action.DynaActionForm form-property name=action type=java.lang.String/ form-property name=id type=java.lang.String/ form-property name=name type=java.lang.String/ /form-bean in EditarInstitucionAction I have this... if(form==null){ DynaActionForm institucionForm = new DynaActionForm(); PropertyUtils.setSimpleProperty(institucionForm, action, crear); PropertyUtils.setSimpleProperty(institucionForm, codigo, -1); request.setAttribute(mapping.getAttribute(),institucionForm); } return (mapping.findForward(success)); then in editarInstitucion.jsp I have logic:equal name=institucionForm property=action scope=request value=crear titlebean:message key=editarInstitucion.titulo.crear//title /logic:equal logic:equal name=institucionForm property=action scope=request value=modificar titlebean:message key=editarInstitucion.titulo.modificar//title /logic:equal I get this Exception java.lang.NullPointerException at org.apache.commons.beanutils.PropertyUtils.setSimpleProperty(PropertyUtils.java:1548) at co.com.proveedores.EditarInstitucionAction.execute(EditarInstitucionAction.java:104) If I make this changes... if(form==null){ DynaActionForm institucionForm = new DynaActionForm(); request.setAttribute(mapping.getAttribute(),institucionForm); } return (mapping.findForward(success)); I get this Exception javax.servlet.ServletException: Exception accessing property action for bean institucionForm: java.lang.NullPointerException at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:494) at org.apache.jsp.editarInstitucion_jsp._jspService(editarInstitucion_jsp.java:93) Am I using wrong DynaFormAction? Is there any other way to use it? Thanks in advance, -- Germán Leonardo Largo Urrea Medellín, Colombia -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Should I use a persistence layer?
Hi, For an web application, is there a way for a user to paginate through (similar to google) a lot of data across multiple browser windows. The usual way of paginating with session scope works fine. However, if a user has 2 windows open on the same application. When he/she queries on one, then queries on another, and then comes back to the first window and click Next, he/she will get bad results. Does this lead to EJB or any other persistence layers? Thanks, Dean Chen -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: [TILES] Frame's src attrib has html not a url
Thanks that did it. While I understand what you are saying about needing a valid URL, wouldn't that always be the case. For example, in my case, when the 'Disclaimer' page is invoked, the tileDefinitions shows that it extends the BasicWizardPage which extends qsWizard. The value of 'body' is evaluates to 'workflow/disclaimer/disclaimerBody.jsp' -- an actual file. That's why it works. Do I understand the process correctly? To be more correct, should my frame element be frame src='%=request.getContextPath()%tiles:getAsString name=body/' name=body Sri -Original Message- From: Cedric Dumoulin [mailto:[EMAIL PROTECTED]] Sent: Thursday, October 03, 2002 12:17 PM To: Struts Users Mailing List Subject: Re: [TILES] Frame's src attrib has html not a url You should provide the attribute value as a String, not as its content to the frame: frame src='tiles:getAsString name=body/' name=body Also remember that you can only use valid url here, not tiles definitions. This is because the url is interpreted by the client browser, not on the server. Cedric Sri Sankaran wrote: Using Struts 1.0.2 and Tiles extension The page I am developing consists of frames. Upon display, all the frames display a 404 error. Looking at the source of the HTML, I find that the src attribute doesn't point to a URL but contains the contents of the file at that url. My frameset page: frameset rows=10%, 80%, 10% frameset cols=50%, 50% frame src='tiles:get name=title/' name=title frame src='tiles:get name=help/' name=help /frameset frame src='tiles:get name=body/' name=body frame src='tiles:get name=navigation/' name=nav /frameset My tile definitions contains definition name=qsWizard path=/framedWizardLayout.jsp put name=title value=qsTitle.jsp/ put name=help value=qsHelp.jsp/ put name=body value=/ put name=navigationvalue=/ /definition definition name=BasicWizardPage extends=qsWizard put name=navigation value=workflow/nav.jsp/ /definition !-- Disclaimer page -- definition name=Disclaimer extends=BasicWizardPage put name=bodyvalue=workflow/disclaimer/disclaimerBody.jsp/ /definition The page I am invoking is Disclaimer. What am I doing wrong? Sri -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Problem with Jrun
Hi some times jrun does not pick jar files from web-inf/lib just try to set the class path in jrun and test, i had some different problem with jsp not getting compiled.. Ashish --- DjTweed [EMAIL PROTECTED] wrote: Hello, I'm running Jrun 3.1 (latest patch) on WinXP Pro with IIS. I have had this config for 2+ years and it works great. Lately I have been playing with Struts 1.1 beta. After intalling the struts example app, I get the following error when loading the index.jsp page. 500 Internal Server Error PRE B/strutsexample/:/B Exception thrown processing JSP page. java.lang.NoClassDefFoundError at org.apache.struts.taglib.bean.MessageTag.doStartTag(MessageTag.java:295) at jrun__index2ejspa._jspService(jrun__index2ejspa.java:58) at allaire.jrun.jsp.HttpJSPServlet.service(HttpJSPServlet.java:39) at allaire.jrun.jsp.JSPServlet.service(JSPServlet.java:228) at allaire.jrun.jsp.JSPServlet.service(JSPServlet.java:196) at allaire.jrun.servlet.JRunSE.service(JRunSE.java:1417) at allaire.jrun.session.JRunSessionService.service(JRunSessionService.java:1106) at allaire.jrun.servlet.JRunSE.runServlet(JRunSE.java:1271) at allaire.jrun.servlet.JRunRequestDispatcher.forward(JRunRequestDispatcher.java:89) at allaire.jrun.file.FileServlet.service(FileServlet.java:178) at allaire.jrun.servlet.JRunServletPool.service(JRunServletPool.java:90) at allaire.jrun.servlet.JRunSE.service(JRunSE.java:1417) at allaire.jrun.session.JRunSessionService.service(JRunSessionService.java:1106) at allaire.jrun.servlet.JRunSE.runServlet(JRunSE.java:1271) at allaire.jrun.servlet.JRunRequestDispatcher.forward(JRunRequestDispatcher.java:89) at allaire.jrun.servlet.JRunSE.service(JRunSE.java:1557) at allaire.jrun.servlet.JRunSE.service(JRunSE.java:1547) at allaire.jrun.servlet.JvmContext.dispatch(JvmContext.java:364) at allaire.jrun.jrpp.ProxyEndpoint.run(ProxyEndpoint.java:388) at allaire.jrun.ThreadPool.run(ThreadPool.java:272) at allaire.jrun.WorkerThread.run(WorkerThread.java:75) /PRE I do NOT have any struts.jar files in any location other then the WEB-INF/lib for the application. (along with all the COMMONS*.jars) I've read and search all over to no avail. I installed Struts .9 while back, and i remember it worked fine. Thanks in advance for any ideas, George [EMAIL PROTECTED] __ Do you Yahoo!? New DSL Internet Access from SBC Yahoo! http://sbc.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] = A$HI$H __ Do you Yahoo!? New DSL Internet Access from SBC Yahoo! http://sbc.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: EL and the developer's roadmap
-Original Message- From: Galbreath, Mark [mailto:[EMAIL PROTECTED]] Sent: Thursday, October 03, 2002 9:55 AM To: 'Struts Users Mailing List' Subject: RE: EL and the developer's roadmap First time I've heard of EL too. Where can I get more info? You can first read the JSTL specification, which you can download from http://java.sun.com/products/jsp/jstl/. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Wrapping the controller?
I does see where in the ActionServlet it calls the RequestProcessor -Original Message- From: David Graham [mailto:[EMAIL PROTECTED]] Sent: Thursday, October 03, 2002 11:05 AM To: [EMAIL PROTECTED] Subject: RE: Wrapping the controller? Sounds like the best idea to me. The servlet delegates processing to its RequestProcessor so it makes sense to subclass the RequestProcessor instead of the servlet. I think it would be pretty easy to add the logging. Override a processor method put a logging statment in, call super.process*(). Dave From: Galbreath, Mark [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Subject: RE: Wrapping the controller? Date: Thu, 3 Oct 2002 10:33:23 -0400 I overrode RequestProcessor for logging. Mark -Original Message- From: Smith, Johnathan M. [mailto:[EMAIL PROTECTED]] Sent: Thursday, October 03, 2002 9:49 AM Your right. I would like to subclass it. Should I subclass the controller or provide a new RequestProcessor?? I am doing this just to add some logging lines into it -Original Message- From: David Graham [mailto:[EMAIL PROTECTED]] Sent: Wednesday, October 02, 2002 3:00 PM To: [EMAIL PROTECTED] Subject: Re: Wrapping the controller? You don't want to wrap the controller you want to subclass it and override the process method or provide your own RequestProcessor. You could also put a filter in front of the controller but this requires a servlet 2.3 compliant container. Dave From: Smith, Johnathan M. [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: '[EMAIL PROTECTED]' [EMAIL PROTECTED] Subject: Wrapping the controller? Date: Wed, 2 Oct 2002 14:54:25 -0400 I have to wrap the controller to add some logging code into it. Can someone please maybe send me a sample on how should I do it? -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] _ Join the world's largest e-mail service with MSN Hotmail. http://www.hotmail.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] _ Join the world's largest e-mail service with MSN Hotmail. http://www.hotmail.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: EL and the developer's roadmap
On Thu, 3 Oct 2002, Galbreath, Mark wrote: Date: Thu, 3 Oct 2002 12:54:54 -0400 From: Galbreath, Mark [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Subject: RE: EL and the developer's roadmap First time I've heard of EL too. Where can I get more info? The best place would be the JSTL related info at: http://java.sun.com/products/jsp/jstl/index.html or one of the books about JSTL. Craig -Original Message- From: Karr, David [mailto:[EMAIL PROTECTED]] Sent: Thursday, October 03, 2002 12:06 PM To: 'Struts Users Mailing List' Subject: RE: EL and the developer's roadmap -Original Message- From: Vincent Stoessel [mailto:[EMAIL PROTECTED]] Sent: Thursday, October 03, 2002 8:31 AM To: Struts Users Subject: EL and the developer's roadmap OK, I'll bite. What does EL stand for? From what I'm hearing, there seems to be a current trend of moving away from Struts taglibs if there is a JSTL tag that has the same functionality. I admit that makes me a bit nervous as a newbie. I'm still learning the struts tags! The Goodwill book has an excellent appendix with _examples_ of individual tag usage. Now I guess I will have to get a book on JSTL book as well. Is there a Struts roadmap available anywhere? Sometimes I feel I am always running to to catch up in Struts. Mastered ActionForms? oops gotta learn DynaActionForms! Learned how to validate in the action class? , ha! better learn Dyna*Valid* stuff. Mastered struts-logic? no! learn JSTL! I know I don't have to use all new features but I would like have a little warning about what may be coming down the road. That is where a roadmap would come in very handy. I could know which technologies to watch and which to ignore in the short term. Thanks for listening. I wouldn't go so far as to call it a movement away from using Struts tags. I'm an individual. I had an idea to combine the Struts tag library with the JSTL EL engine (which stands for expression language). I wrote the library and contributed it. Some people want to experiment with JSTL while using Struts, which I think is a good idea. Now, I would definitely say there is a trend towards using the EL syntax, as the JSP 2.0 specification will allow that syntax, both in attribute values, and in general content. There is only one constant, and that is change. If you are determined to keep track of the latest developments in everything you're involved with, it will definitely be a challenge. My advice is to pick the areas you want to concentrate on. Determine areas that you PLAN to ignore, at least while it's on the bleeding edge. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Multiple selected for html:select
I have two collections, 1 is of managers that need to be preselected and the other is managers that can be selected from. Here is my jsp code: html:select property=managers[0].id size=4 multiple=true html:options collection=managerList property=person_id labelProperty=person.name / /html:select 'managers' is a Vector in a DynaActionForm, and managerList is of type List, not sure if this matter. However, this works, but obviously only creates 1 selected option, as seen below: select name=managers[0].id multiple=multiple size=4 option value=266Gurpreet Singh/option option value=267James Eberhardt/option option value=268John Fairbanks/option option value=269Kevin Stork/option option value=277Steve Goguen/option option value=365 selected=selectedSusan Rogers/option /select What I want is for multiple managers to be selected, as below: select name=managers[0].id multiple=multiple size=4 option value=266Gurpreet Singh/option option value=267James Eberhardt/option option value=268John Fairbanks/option option value=269 selected=selectedKevin Stork/option option value=365 selected=selectedSusan Rogers/option /select Note, the bottom two are selected. What do I put in the html:select to make this work? Thanks, Kurt Madel Programmer, CSMi (703) 823-4300 ext. 170 -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Multiple selected for html:select
The property attribute of the html:select must allow for capturing multiple items. It should be a collection. Take a peek at html-select.jsp that is part of the struts-exercise-taglib application that ships with Struts. html:select property=foo size=4 multiple=true html:options collection=managerList property=person_id labelProperty=person.name / /html:select Form bean -- private String[] foo; public void setFoo(String[] in) { foo = in; } public String[] getFoo() { return foo; } Sri -Original Message- From: Madel,Kurt [mailto:[EMAIL PROTECTED]] Sent: Thursday, October 03, 2002 2:14 PM To: '[EMAIL PROTECTED]' Subject: Multiple selected for html:select I have two collections, 1 is of managers that need to be preselected and the other is managers that can be selected from. Here is my jsp code: html:select property=managers[0].id size=4 multiple=true html:options collection=managerList property=person_id labelProperty=person.name / /html:select 'managers' is a Vector in a DynaActionForm, and managerList is of type List, not sure if this matter. However, this works, but obviously only creates 1 selected option, as seen below: select name=managers[0].id multiple=multiple size=4 option value=266Gurpreet Singh/option option value=267James Eberhardt/option option value=268John Fairbanks/option option value=269Kevin Stork/option option value=277Steve Goguen/option option value=365 selected=selectedSusan Rogers/option /select What I want is for multiple managers to be selected, as below: select name=managers[0].id multiple=multiple size=4 option value=266Gurpreet Singh/option option value=267James Eberhardt/option option value=268John Fairbanks/option option value=269 selected=selectedKevin Stork/option option value=365 selected=selectedSusan Rogers/option /select Note, the bottom two are selected. What do I put in the html:select to make this work? Thanks, Kurt Madel Programmer, CSMi (703) 823-4300 ext. 170 -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Where's the form-bean???
Hi Jeff, Is that because your Action is populating the form before forwarding to the page? And if not, what exactly is your Action doing? Brian Lowe, Jeff [EMAIL PROTECTED] 10/03/02 07:22am Hi Jason, Thanks for the reply. You've got it right in what I'm doing. However I think I could describe the problem more simply. The problem is that when validation fails and I'm forwarded back to the Action specified by the mapping's input attribute, the form that is passed in to Action.perform() is null. I'm puzzled because when the Action then forwards to the .JSP page, all the form values are populated. Thanks, -Jeff -Original Message- From: Taylor, Jason [ mailto:[EMAIL PROTECTED]] Sent: Wednesday, October 02, 2002 5:05 PM To: 'Struts Users Mailing List' Subject: RE: Where's the form-bean??? I think I understand what you're doing, but feel free to ignore me if not. What I often do is to present availXXX object arrays to the front-end via request/session attributes that the front-end developer knows is meant to be a read-only informational array shared between different actions or action forms as the case may be. These availXXX arrays are typically used to populate selection boxes or to generate lists that are used as entry points into actions on specific items in the availXXX array. The downside of my approach is you don't have the presence of the availXXX arrays specified in the config file. On the other hand, if you're running into scenarios where you need the array even when the form isn't present, this is something you could try... -Original Message- From: Lowe, Jeff [ mailto:[EMAIL PROTECTED]] Sent: Wednesday, October 02, 2002 1:35 PM To: 'Struts Users Mailing List' Subject: Where's the form-bean??? I'm using two select boxes to implement the user selection metaphor where one contains available choices, and the other contains selected choices. If the form does not pass validation, I need to repopulate the selected choices from the array of its values, contained in the form bean. This is done in the action class that sets up all the data for the form. After I submit and validation fails, Struts forwards back to the input url, which is an action class. The problem is that the form object passed into perform() is null, so I can't get the array of values. What has me vexed is that after perform() forwards to the .jsp, all the form elements are populated as they were prior to submit, so the populated form exists, it's just not being passed in to perform(). I tried adding the name=formName attribute to the mapping, but then Struts tries to validate the form on the GET, as shown by the debug log below: -Processing a GET for /standards/curriculum-coverage-form -Looking for ActionForm bean under attribute 'curriculumCoverageReport' -Creating new ActionForm instance of class '...standards.CurriculumCoverageReportForm' -Storing instance under attribute 'curriculumCoverageReport' in scope 'request' -Populating bean properties from this request -Validating input form properties -No input form, but validation returned errors Any insight into this would be greatly appreciated. The mapping is shown below. Thanks, -Jeff action path=/standards/party-resources-form type=...standards.PartyResourcesReportAction scope=request parameter=form forward name=success path=standards/party-resources-form.jsp/ /action action path=/standards/party-resources-exec type=...standards.PartyResourcesReportAction name=partyResourcesReport scope=request parameter=exec input=/standards/party-resources-form.action forward name=success path=standards/party-resources-exec.jsp/ /action -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Making the checkbox selected by default.
Hi All, How do I make a checkbox selected by default ? I'm using struts' checkbox tag in my application. I couldn't find any fields in the corresponding tag. Please help.. Thankx in advance.. -Sanjeev -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Making the checkbox selected by default.
You can use multicheckbox to accomplish that. Check the docs. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Sanjeev Sent: Thursday, October 03, 2002 12:44 PM To: Struts Users Mailing List Subject: Making the checkbox selected by default. Hi All, How do I make a checkbox selected by default ? I'm using struts' checkbox tag in my application. I couldn't find any fields in the corresponding tag. Please help.. Thankx in advance.. -Sanjeev -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Making the checkbox selected by default.
It'll appear checked if the value of the property attribute (from your form-bean) matches the value of the value attribute. html:checkbox property=color value=red/ This checkbox will appear selected if getColor() returns red. Sri -Original Message- From: Sanjeev [mailto:[EMAIL PROTECTED]] Sent: Thursday, October 03, 2002 2:44 PM To: Struts Users Mailing List Subject: Making the checkbox selected by default. Hi All, How do I make a checkbox selected by default ? I'm using struts' checkbox tag in my application. I couldn't find any fields in the corresponding tag. Please help.. Thankx in advance.. -Sanjeev -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: EL and the developer's roadmap
Have you been filtering my posts again, Mark?! Galbreath, Mark wrote: First time I've heard of EL too. Where can I get more info? -- Eddie Bush -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Should I use a persistence layer?
Yes. The standard approach is to only keep in memory results that are currently on the page. Have a persistence layer (either EJB or O/R mapping tool, or a combination of the two) page the results for you. i.e., you give it search criteria, sort criteria, a begin index, and an end index, and it gives you back the results. This solves two problems: The one you are encountering with bad results with two different windows, and the memory problems associated with very large result sets. There are examples of this sort of implementation out there; sorry I can't provide links. :( peace, Joe -Original Message- From: Chen, Dean (Zhun) [mailto:[EMAIL PROTECTED]] Sent: Thursday, October 03, 2002 10:13 AM To: 'Struts Users Mailing List' Subject: Should I use a persistence layer? Hi, For an web application, is there a way for a user to paginate through (similar to google) a lot of data across multiple browser windows. The usual way of paginating with session scope works fine. However, if a user has 2 windows open on the same application. When he/she queries on one, then queries on another, and then comes back to the first window and click Next, he/she will get bad results. Does this lead to EJB or any other persistence layers? Thanks, Dean Chen -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Should I use a persistence layer?
If they have 2 windows open they're likely to be in 2 different sessions. Besides, how often do you think your users will do this? I don't know of any persistence layer that solves this problem. Dave From: Chen, Dean (Zhun) [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Subject: Should I use a persistence layer? Date: Thu, 3 Oct 2002 13:13:04 -0400 Hi, For an web application, is there a way for a user to paginate through (similar to google) a lot of data across multiple browser windows. The usual way of paginating with session scope works fine. However, if a user has 2 windows open on the same application. When he/she queries on one, then queries on another, and then comes back to the first window and click Next, he/she will get bad results. Does this lead to EJB or any other persistence layers? Thanks, Dean Chen -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] _ Chat with friends online, try MSN Messenger: http://messenger.msn.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Multiple selected for html:select
I solved this, not sure if it is good practice, but this might be useful to others. Below you will see that I am working with the managers Vector that contains Person objects. I changed the select part to: html:select property=managers size=4 multiple=true And, added the following to my Person class: public String toString() { return _id.toString(); } Person.id is what I want to compare to managerList.person_id, and this works! managers is still a Vector in a DynaActionForm. Finally, I am starting to pick this stuff up. -Original Message- From: Madel,Kurt [mailto:[EMAIL PROTECTED]] Sent: Thursday, October 03, 2002 2:14 PM To: '[EMAIL PROTECTED]' Subject: Multiple selected for html:select I have two collections, 1 is of managers that need to be preselected and the other is managers that can be selected from. Here is my jsp code: html:select property=managers[0].id size=4 multiple=true html:options collection=managerList property=person_id labelProperty=person.name / /html:select 'managers' is a Vector in a DynaActionForm, and managerList is of type List, not sure if this matter. However, this works, but obviously only creates 1 selected option, as seen below: select name=managers[0].id multiple=multiple size=4 option value=266Gurpreet Singh/option option value=267James Eberhardt/option option value=268John Fairbanks/option option value=269Kevin Stork/option option value=277Steve Goguen/option option value=365 selected=selectedSusan Rogers/option /select What I want is for multiple managers to be selected, as below: select name=managers[0].id multiple=multiple size=4 option value=266Gurpreet Singh/option option value=267James Eberhardt/option option value=268John Fairbanks/option option value=269 selected=selectedKevin Stork/option option value=365 selected=selectedSusan Rogers/option /select Note, the bottom two are selected. What do I put in the html:select to make this work? Thanks, Kurt Madel Programmer, CSMi (703) 823-4300 ext. 170 -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: [OT] Mail list gone whack-o?
+1 are we being bugged? -Original Message- From: James Mitchell [mailto:[EMAIL PROTECTED]] Sent: Thursday, October 03, 2002 8:30 AM To: [EMAIL PROTECTED] Subject: Re: [OT] Mail list gone whack-o? Yes, I've noticed it too. James Mitchell On Thu, 03 October 2002, Eddie Bush wrote: Message-Id: [EMAIL PROTECTED] List-Help: mailto:[EMAIL PROTECTED] List-Unsubscribe: mailto:[EMAIL PROTECTED] From: Eddie Bush [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] List-Id: Struts Users Mailing List struts-user.jakarta.apache.org X-Accept-Language: en-us, en Date: Thu, 03 Oct 2002 09:56:15 -0500 Received: (cpmta 26780 invoked from network); 3 Oct 2002 08:08:33 -0700 Received: from 192.18.49.131 (HELO nagoya.betaversion.org) by smtp.c003.snv.cp.net (209.228.32.211) with SMTP; 3 Oct 2002 08:08:33 -0700 Received: (qmail 1633 invoked by uid 97); 3 Oct 2002 14:55:28 - Received: (qmail 1615 invoked by uid 98); 3 Oct 2002 14:55:28 - Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm X-Antivirus: nagoya (v4218 created Aug 14 2002) User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.9) Gecko/20020513 Content-Type: text/plain; charset=us-ascii; format=flowed X-Received: 3 Oct 2002 15:08:33 GMT List-Post: mailto:[EMAIL PROTECTED] Subject: [OT] Mail list gone whack-o? X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N List-Subscribe: mailto:[EMAIL PROTECTED] Precedence: bulk Delivered-To: [EMAIL PROTECTED] Delivered-To: mailing list [EMAIL PROTECTED] Return-Path: [EMAIL PROTECTED] Content-Transfer-Encoding: 7BIT MIME-Version: 1.0 To: Struts Users List [EMAIL PROTECTED] I keep getting (several!) messages (one for each I send, I believe) that say my mail wasn't delivered - but it sure shows up on the list! What's up? Any clue? Thanks! -- Eddie Bush -- To unsubscribe, e-mail: lt;mailto:[EMAIL PROTECTED]gt; For additional commands, e-mail: lt;mailto:[EMAIL PROTECTED]gt; -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: [OT] Mail list gone whack-o?
Hrm, not the first time its happened in the past couple of months or so.. -Original Message- From: Taylor, Jason [mailto:[EMAIL PROTECTED]] Sent: 03 October 2002 19:54 To: 'Struts Users Mailing List' Subject: RE: [OT] Mail list gone whack-o? +1 are we being bugged? -Original Message- From: James Mitchell [mailto:[EMAIL PROTECTED]] Sent: Thursday, October 03, 2002 8:30 AM To: [EMAIL PROTECTED] Subject: Re: [OT] Mail list gone whack-o? Yes, I've noticed it too. James Mitchell On Thu, 03 October 2002, Eddie Bush wrote: Message-Id: [EMAIL PROTECTED] List-Help: mailto:[EMAIL PROTECTED] List-Unsubscribe: mailto:[EMAIL PROTECTED] From: Eddie Bush [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] List-Id: Struts Users Mailing List struts-user.jakarta.apache.org X-Accept-Language: en-us, en Date: Thu, 03 Oct 2002 09:56:15 -0500 Received: (cpmta 26780 invoked from network); 3 Oct 2002 08:08:33 -0700 Received: from 192.18.49.131 (HELO nagoya.betaversion.org) by smtp.c003.snv.cp.net (209.228.32.211) with SMTP; 3 Oct 2002 08:08:33 -0700 Received: (qmail 1633 invoked by uid 97); 3 Oct 2002 14:55:28 - Received: (qmail 1615 invoked by uid 98); 3 Oct 2002 14:55:28 - Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm X-Antivirus: nagoya (v4218 created Aug 14 2002) User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.9) Gecko/20020513 Content-Type: text/plain; charset=us-ascii; format=flowed X-Received: 3 Oct 2002 15:08:33 GMT List-Post: mailto:[EMAIL PROTECTED] Subject: [OT] Mail list gone whack-o? X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N List-Subscribe: mailto:[EMAIL PROTECTED] Precedence: bulk Delivered-To: [EMAIL PROTECTED] Delivered-To: mailing list [EMAIL PROTECTED] Return-Path: [EMAIL PROTECTED] Content-Transfer-Encoding: 7BIT MIME-Version: 1.0 To: Struts Users List [EMAIL PROTECTED] I keep getting (several!) messages (one for each I send, I believe) that say my mail wasn't delivered - but it sure shows up on the list! What's up? Any clue? Thanks! -- Eddie Bush -- To unsubscribe, e-mail: lt;mailto:[EMAIL PROTECTED]gt; For additional commands, e-mail: lt;mailto:[EMAIL PROTECTED]gt; -- To unsubscribe, e-mail: mailto:struts-user-[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.393 / Virus Database: 223 - Release Date: 30/09/2002 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.393 / Virus Database: 223 - Release Date: 30/09/2002 -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: EL and the developer's roadmap
Hi Mark, You might want to check out Shawn Bayern's new book: JSTL in action, Manning ISBN: 1-930110-52-9 It's kind of geared towards beginners (which I know your not) but the information in it is great even for people who have worked with taglibs for a while now. Check out Shawn's website for more info. http://www.jstlbook.com -Tim -Original Message- From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]] Sent: Thursday, October 03, 2002 1:37 PM To: Struts Users Mailing List Subject: RE: EL and the developer's roadmap On Thu, 3 Oct 2002, Galbreath, Mark wrote: Date: Thu, 3 Oct 2002 12:54:54 -0400 From: Galbreath, Mark [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Subject: RE: EL and the developer's roadmap First time I've heard of EL too. Where can I get more info? The best place would be the JSTL related info at: http://java.sun.com/products/jsp/jstl/index.html or one of the books about JSTL. Craig -Original Message- From: Karr, David [mailto:[EMAIL PROTECTED]] Sent: Thursday, October 03, 2002 12:06 PM To: 'Struts Users Mailing List' Subject: RE: EL and the developer's roadmap -Original Message- From: Vincent Stoessel [mailto:[EMAIL PROTECTED]] Sent: Thursday, October 03, 2002 8:31 AM To: Struts Users Subject: EL and the developer's roadmap OK, I'll bite. What does EL stand for? From what I'm hearing, there seems to be a current trend of moving away from Struts taglibs if there is a JSTL tag that has the same functionality. I admit that makes me a bit nervous as a newbie. I'm still learning the struts tags! The Goodwill book has an excellent appendix with _examples_ of individual tag usage. Now I guess I will have to get a book on JSTL book as well. Is there a Struts roadmap available anywhere? Sometimes I feel I am always running to to catch up in Struts. Mastered ActionForms? oops gotta learn DynaActionForms! Learned how to validate in the action class? , ha! better learn Dyna*Valid* stuff. Mastered struts-logic? no! learn JSTL! I know I don't have to use all new features but I would like have a little warning about what may be coming down the road. That is where a roadmap would come in very handy. I could know which technologies to watch and which to ignore in the short term. Thanks for listening. I wouldn't go so far as to call it a movement away from using Struts tags. I'm an individual. I had an idea to combine the Struts tag library with the JSTL EL engine (which stands for expression language). I wrote the library and contributed it. Some people want to experiment with JSTL while using Struts, which I think is a good idea. Now, I would definitely say there is a trend towards using the EL syntax, as the JSP 2.0 specification will allow that syntax, both in attribute values, and in general content. There is only one constant, and that is change. If you are determined to keep track of the latest developments in everything you're involved with, it will definitely be a challenge. My advice is to pick the areas you want to concentrate on. Determine areas that you PLAN to ignore, at least while it's on the bleeding edge. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Wrapping the controller?
On Thu, 3 Oct 2002, Smith, Johnathan M. wrote: Date: Thu, 3 Oct 2002 13:32:10 -0400 From: Smith, Johnathan M. [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: RE: Wrapping the controller? I does see where in the ActionServlet it calls the RequestProcessor In any 1.1 version of Struts, look at the process() method of ActionServlet: getRequestProcessor(getApplicationConfig(request)).process (request, response); which calls getRequestProcessor() to get the right RequestProcessor instance for the current sub-app module, then calls its process() method. Craig -Original Message- From: David Graham [mailto:[EMAIL PROTECTED]] Sent: Thursday, October 03, 2002 11:05 AM To: [EMAIL PROTECTED] Subject: RE: Wrapping the controller? Sounds like the best idea to me. The servlet delegates processing to its RequestProcessor so it makes sense to subclass the RequestProcessor instead of the servlet. I think it would be pretty easy to add the logging. Override a processor method put a logging statment in, call super.process*(). Dave From: Galbreath, Mark [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Subject: RE: Wrapping the controller? Date: Thu, 3 Oct 2002 10:33:23 -0400 I overrode RequestProcessor for logging. Mark -Original Message- From: Smith, Johnathan M. [mailto:[EMAIL PROTECTED]] Sent: Thursday, October 03, 2002 9:49 AM Your right. I would like to subclass it. Should I subclass the controller or provide a new RequestProcessor?? I am doing this just to add some logging lines into it -Original Message- From: David Graham [mailto:[EMAIL PROTECTED]] Sent: Wednesday, October 02, 2002 3:00 PM To: [EMAIL PROTECTED] Subject: Re: Wrapping the controller? You don't want to wrap the controller you want to subclass it and override the process method or provide your own RequestProcessor. You could also put a filter in front of the controller but this requires a servlet 2.3 compliant container. Dave From: Smith, Johnathan M. [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: '[EMAIL PROTECTED]' [EMAIL PROTECTED] Subject: Wrapping the controller? Date: Wed, 2 Oct 2002 14:54:25 -0400 I have to wrap the controller to add some logging code into it. Can someone please maybe send me a sample on how should I do it? -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] _ Join the world's largest e-mail service with MSN Hotmail. http://www.hotmail.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] _ Join the world's largest e-mail service with MSN Hotmail. http://www.hotmail.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Tiles and Internationaliation
Hi, I am quite new to tiles stuff (only 1 and an half day experience, switching from Struts templates...) For the moment, I am just trying to insert internationalized messages in tiles and the only way I found to do this is: tiles:insert definition=portal.mainMenu tiles:put name=title valuebean:message key=help.stateProv.name//value /tiles:put /tiles:insert which doesn't satisfy me... I would like to be able to write instead: tiles:insert definition=portal.mainMenu tiles:put name=title value=help.stateProv.name/ /tiles:insert Could you please tell me if this is possible? Thanks in advance for your answer. Vince -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Should I use a persistence layer?
Thanks for this, what good persistence layers are there? Is there something that works with struts and is simple? Dean Chen -Original Message- From: Joe Barefoot [mailto:[EMAIL PROTECTED]] Sent: Thursday, October 03, 2002 2:41 PM To: Struts Users Mailing List Subject: RE: Should I use a persistence layer? Yes. The standard approach is to only keep in memory results that are currently on the page. Have a persistence layer (either EJB or O/R mapping tool, or a combination of the two) page the results for you. i.e., you give it search criteria, sort criteria, a begin index, and an end index, and it gives you back the results. This solves two problems: The one you are encountering with bad results with two different windows, and the memory problems associated with very large result sets. There are examples of this sort of implementation out there; sorry I can't provide links. :( peace, Joe -Original Message- From: Chen, Dean (Zhun) [mailto:[EMAIL PROTECTED]] Sent: Thursday, October 03, 2002 10:13 AM To: 'Struts Users Mailing List' Subject: Should I use a persistence layer? Hi, For an web application, is there a way for a user to paginate through (similar to google) a lot of data across multiple browser windows. The usual way of paginating with session scope works fine. However, if a user has 2 windows open on the same application. When he/she queries on one, then queries on another, and then comes back to the first window and click Next, he/she will get bad results. Does this lead to EJB or any other persistence layers? Thanks, Dean Chen -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
DynaFormAction problem
Hi everybody, I have this action !-- Editar institucion -- actionpath=/editarInstitucion type=co.com.proveedores.EditarInstitucionAction attribute=institucionForm scope=request validate=false forward name=success path=/editarInstitucion.jsp/ /action and this form-bean... !-- Institucion form bean -- form-bean name=institucionForm type=org.apache.struts.action.DynaActionForm form-property name=action type=java.lang.String/ form-property name=id type=java.lang.String/ form-property name=name type=java.lang.String/ /form-bean in EditarInstitucionAction I have this... if(form==null){ DynaActionForm institucionForm = new DynaActionForm(); PropertyUtils.setSimpleProperty(institucionForm, action, crear); PropertyUtils.setSimpleProperty(institucionForm, codigo, -1); request.setAttribute(mapping.getAttribute(),institucionForm); } return (mapping.findForward(success)); then in editarInstitucion.jsp I have logic:equal name=institucionForm property=action scope=request value=crear titlebean:message key=editarInstitucion.titulo.crear//title /logic:equal logic:equal name=institucionForm property=action scope=request value=modificar titlebean:message key=editarInstitucion.titulo.modificar//title /logic:equal I get this Exception java.lang.NullPointerException at org.apache.commons.beanutils.PropertyUtils.setSimpleProperty(PropertyUtils.java:1548) at co.com.proveedores.EditarInstitucionAction.execute(EditarInstitucionAction.java:104) If I make this changes... if(form==null){ DynaActionForm institucionForm = new DynaActionForm(); request.setAttribute(mapping.getAttribute(),institucionForm); } return (mapping.findForward(success)); I get this Exception javax.servlet.ServletException: Exception accessing property action for bean institucionForm: java.lang.NullPointerException at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:494) at org.apache.jsp.editarInstitucion_jsp._jspService(editarInstitucion_jsp.java:93) What I'm doing wrong? Is there any other way to use DynaFormAction? Thanks in advance, -- Germán Leonardo Largo Urrea Medellín, Colombia -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Wrapping the controller?
Look in your web.xml file. Mark -Original Message- From: Smith, Johnathan M. [mailto:[EMAIL PROTECTED]] Sent: Thursday, October 03, 2002 1:32 PM To: [EMAIL PROTECTED] Subject: RE: Wrapping the controller? I does see where in the ActionServlet it calls the RequestProcessor -Original Message- From: David Graham [mailto:[EMAIL PROTECTED]] Sent: Thursday, October 03, 2002 11:05 AM To: [EMAIL PROTECTED] Subject: RE: Wrapping the controller? Sounds like the best idea to me. The servlet delegates processing to its RequestProcessor so it makes sense to subclass the RequestProcessor instead of the servlet. I think it would be pretty easy to add the logging. Override a processor method put a logging statment in, call super.process*(). Dave From: Galbreath, Mark [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Subject: RE: Wrapping the controller? Date: Thu, 3 Oct 2002 10:33:23 -0400 I overrode RequestProcessor for logging. Mark -Original Message- From: Smith, Johnathan M. [mailto:[EMAIL PROTECTED]] Sent: Thursday, October 03, 2002 9:49 AM Your right. I would like to subclass it. Should I subclass the controller or provide a new RequestProcessor?? I am doing this just to add some logging lines into it -Original Message- From: David Graham [mailto:[EMAIL PROTECTED]] Sent: Wednesday, October 02, 2002 3:00 PM To: [EMAIL PROTECTED] Subject: Re: Wrapping the controller? You don't want to wrap the controller you want to subclass it and override the process method or provide your own RequestProcessor. You could also put a filter in front of the controller but this requires a servlet 2.3 compliant container. Dave From: Smith, Johnathan M. [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: '[EMAIL PROTECTED]' [EMAIL PROTECTED] Subject: Wrapping the controller? Date: Wed, 2 Oct 2002 14:54:25 -0400 I have to wrap the controller to add some logging code into it. Can someone please maybe send me a sample on how should I do it? -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] _ Join the world's largest e-mail service with MSN Hotmail. http://www.hotmail.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] _ Join the world's largest e-mail service with MSN Hotmail. http://www.hotmail.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: [OT] Should I use a persistence layer?
I've been playing around with Hibernate (http://hibernate.sourceforge.net) on personal project and it seems to be pretty easy to work with and has good performance. --Kevin -Original Message- From: Chen, Dean (Zhun) [mailto:[EMAIL PROTECTED]] Sent: Thursday, October 03, 2002 3:25 PM To: 'Struts Users Mailing List' Subject: RE: Should I use a persistence layer? Thanks for this, what good persistence layers are there? Is there something that works with struts and is simple? Dean Chen -Original Message- From: Joe Barefoot [mailto:[EMAIL PROTECTED]] Sent: Thursday, October 03, 2002 2:41 PM To: Struts Users Mailing List Subject: RE: Should I use a persistence layer? Yes. The standard approach is to only keep in memory results that are currently on the page. Have a persistence layer (either EJB or O/R mapping tool, or a combination of the two) page the results for you. i.e., you give it search criteria, sort criteria, a begin index, and an end index, and it gives you back the results. This solves two problems: The one you are encountering with bad results with two different windows, and the memory problems associated with very large result sets. There are examples of this sort of implementation out there; sorry I can't provide links. :( peace, Joe -Original Message- From: Chen, Dean (Zhun) [mailto:[EMAIL PROTECTED]] Sent: Thursday, October 03, 2002 10:13 AM To: 'Struts Users Mailing List' Subject: Should I use a persistence layer? Hi, For an web application, is there a way for a user to paginate through (similar to google) a lot of data across multiple browser windows. The usual way of paginating with session scope works fine. However, if a user has 2 windows open on the same application. When he/she queries on one, then queries on another, and then comes back to the first window and click Next, he/she will get bad results. Does this lead to EJB or any other persistence layers? Thanks, Dean Chen -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Should I use a persistence layer?
If they have 2 windows open they're likely to be in 2 different sessions. Not 'likely', only possibly. Most users are familiar with the new window concept, which in most browsers (IE for sure) retains the current session. A user will quickly realize it is faster to do a new window than having to open the browser again, go to the app. log in, etc. Frequent users often have multiple windows open that are part of the same session. Navigating search results in both of them is less likely though. :) Besides, how often do you think your users will do this? Good point. I don't know of any persistence layer that solves this problem. There's certainly not an out-of-the-box solution for this available. However, your UI framework and persistence layer can work in combination; the UI only retains results that are currently viewable, and goes back to the persistence layer to fetch for each pagination link. This means, of course, that you have to retain all search and sort criteria as well as the indices of the result set you are viewing in the UI layer so the information can be transmitted. Dave From: Chen, Dean (Zhun) [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Subject: Should I use a persistence layer? Date: Thu, 3 Oct 2002 13:13:04 -0400 Hi, For an web application, is there a way for a user to paginate through (similar to google) a lot of data across multiple browser windows. The usual way of paginating with session scope works fine. However, if a user has 2 windows open on the same application. When he/she queries on one, then queries on another, and then comes back to the first window and click Next, he/she will get bad results. Does this lead to EJB or any other persistence layers? Thanks, Dean Chen -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] _ Chat with friends online, try MSN Messenger: http://messenger.msn.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]