html:select multiple=true and ActionForm
I've looked in the archives and googled but haven't come up with a solution yet. I have a html:select multiple=true form element. When the form is submitted what setter should be called in the ActionForm? My form 8---8--- html:select property=selectedProductValues multiple=true html:options property=selectedProductValues labelProperty=selectedProductValues / /html:select 8---8--- my ActionForm ( not working ) 8---8--- public final class ProductsForm extends ActionForm { private ArrayList selectedProductValues = null; public void setSelectedProductValues(ArrayList selectedProductValues) { this.selectedProductValues = selectedProductValues; } public String[] getSelectedProductValues() { return this.selectedProductValues; } } 8---8--- Thanks for any help... - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: html:select multiple=true and ActionForm
Minor correction: public String[] getSelectedProductValues() should be public ArrayList getSelectedProductValues() Ian Joyce Internet Systems Programmer/Analyst American Academy of Family Physicians Research and Information Services Interactive Media 11400 Tomahawk Creek Parkway Leawood, KS 66211-2672 Phone: 800-274-2237 ext 4219 Fax: 913-906-6271 E-mail: [EMAIL PROTECTED] [EMAIL PROTECTED] 09/18/03 01:06 AM I've looked in the archives and googled but haven't come up with a solution yet. I have a html:select multiple=true form element. When the form is submitted what setter should be called in the ActionForm? My form 8---8--- html:select property=selectedProductValues multiple=true html:options property=selectedProductValues labelProperty=selectedProductValues / /html:select 8---8--- my ActionForm ( not working ) 8---8--- public final class ProductsForm extends ActionForm { private ArrayList selectedProductValues = null; public void setSelectedProductValues(ArrayList selectedProductValues) { this.selectedProductValues = selectedProductValues; } public String[] getSelectedProductValues() { return this.selectedProductValues; } } 8---8--- Thanks for any help... - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
calls each method twice , logging everthing twice?
hi, we are using jdeveloper as ide , and struts as framework ,, I dont know when it is started but in debug mode it calls each method twice (calls action class execute method twice ) and struts gives followig message after calling my first action class (loginAction) ,, it seccessfull execute and fiinds mapping for the login,, but gives the following message while sending response to the client, is there anybody encountered with this problem ? here is the STRUTS log info, as you can see it does processActionForward twice [INFO] RequestProcessor - -Processing a 'POST' for path '/Login' [INFO] RequestProcessor - -Processing a 'POST' for path '/Login' processActionForward(/pages/bireysel/common/welcome.jsp, false) processActionForward(/pages/bireysel/common/welcome.jsp, false) ERROR on the browser: java.lang.NullPointerException org.apache.struts.tiles.ComponentDefinition org.apache.struts.tiles.xmlDefinition.FactorySet.getDefinition(java.lang.String, javax.servlet.ServletRequest, javax.servlet.ServletContext) FactorySet.java:156 org.apache.struts.tiles.ComponentDefinition org.apache.struts.tiles.definition.ComponentDefinitionsFactoryWrapper.getDefinition(java.lang.String, javax.servlet.ServletRequest, javax.servlet.ServletContext) ComponentDefinitionsFactoryWrapper.java:56 boolean org.apache.struts.tiles.TilesRequestProcessor.processTilesDefinition(java.lang.String, boolean, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) TilesRequestProcessor.java:175 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [OT] M7 Development tool
The management is not bad here (actually their damn good compared to most places), just not very keen on forking out the dosh unless its absolutely necessary. Unfortunately we are a small company and not some cashed up behemoth than can play at being a sheltered workshop, so while I like to whinge and moan its not really like theres much choice. If we want to ship the product on time and make the sales then the only way is through hard work and long hours. If we dont then its game over already as some other company will step up to put in the hard yards and get the deals instead... :-( To be honest Id die of boredom in a 925 job with no stress... ;- As for that article: snip programmers making $70,000 a year /snip 70k US? For a programmer? What a joke! Little wonder all those jobs are going overseas... You could get 3 or 4 of us for that price (and we work twice the hours (and hence have twice the experience imho)) and probably a good 30 skilled programmers in Chennai (who from what Ive heard work even longer hours). -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Thursday, 18 September 2003 04:04 To: Struts Users Mailing List Subject: RE: [OT] M7 Development tool Perhaps you would be interested in reading Union Now? by Warren Keuffel at http://www.sdmagazine.com/ or read the print version of the October issue. Bad Managment makes workers Unionize. Andrew Hill andrew.david.hil [EMAIL PROTECTED]To Struts Users Mailing List 09/17/03 02:42 PM [EMAIL PROTECTED] cc Please respond to Subject Struts Users RE: [OT] M7 Development tool Mailing List [EMAIL PROTECTED] rta.apache.org ouch! Why the smeg does every damn tool have to cost several months salary? Cant see mgmt springing for it then when they can just have us work till 4 or 5 am every day week atfer week in a row. :-( Oh well. thank God (or IBM at least) for Eclipse and extra thanks to the struts team without whose most excellent framework Id be doing OutOfBoundsException hours a day instead of a mere 18 or so... -Original Message- From: Barry Volpe [mailto:[EMAIL PROTECTED] Sent: Thursday, 18 September 2003 03:34 To: Struts Users Mailing List Subject: Re: [OT] M7 Development tool cool but a few thousand dollars! - Original Message - From: Andrew Hill [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wednesday, September 17, 2003 12:15 PM Subject: RE: [OT] M7 Development tool Thanks :-) snip M7 lets you develop web applications in record time by assembling applications visually from existing database schemas, Java components and web services /snip Funny how the words record time stand out when one is reading them at 3:30 AM ;- I reckon I'll have to check this out when I get time. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Thursday, 18 September 2003 03:11 To: Struts Users Mailing List Subject: RE: [OT] M7 Development tool Andrew: Sorry about not including the URL http://www.m7.com/ It is an IDE with repository, workflow designer and other stuff. Will know more after I go through the tutorial. I guess that it could be considered a CASE tool from what I have seen so far. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: calls each method twice , logging everthing twice?
It looks as though the browser is sending two requests for the page. Not familiar with tiles so am not sure about the exception your getting though. -Original Message- From: Seyhan BASMACI (Internet Yazilimlari Yetkilisi) [mailto:[EMAIL PROTECTED] Sent: Thursday, 18 September 2003 14:26 To: Struts Users Mailing List Subject: calls each method twice , logging everthing twice? hi, we are using jdeveloper as ide , and struts as framework ,, I dont know when it is started but in debug mode it calls each method twice (calls action class execute method twice ) and struts gives followig message after calling my first action class (loginAction) ,, it seccessfull execute and fiinds mapping for the login,, but gives the following message while sending response to the client, is there anybody encountered with this problem ? here is the STRUTS log info, as you can see it does processActionForward twice [INFO] RequestProcessor - -Processing a 'POST' for path '/Login' [INFO] RequestProcessor - -Processing a 'POST' for path '/Login' processActionForward(/pages/bireysel/common/welcome.jsp, false) processActionForward(/pages/bireysel/common/welcome.jsp, false) ERROR on the browser: java.lang.NullPointerException org.apache.struts.tiles.ComponentDefinition org.apache.struts.tiles.xmlDefinition.FactorySet.getDefinition(java.lang.Str ing, javax.servlet.ServletRequest, javax.servlet.ServletContext) FactorySet.java:156 org.apache.struts.tiles.ComponentDefinition org.apache.struts.tiles.definition.ComponentDefinitionsFactoryWrapper.getDef inition(java.lang.String, javax.servlet.ServletRequest, javax.servlet.ServletContext) ComponentDefinitionsFactoryWrapper.java:56 boolean org.apache.struts.tiles.TilesRequestProcessor.processTilesDefinition(java.la ng.String, boolean, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) TilesRequestProcessor.java:175 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [OT] M7 Development tool
Second that Andrew, here, u'll be lucky enough to get a RM50k a year job programming. 1USD = RM3.8. -Original Message- From: Andrew Hill [mailto:[EMAIL PROTECTED] Sent: Thursday, September 18, 2003 2:40 PM To: Struts Users Mailing List Subject: RE: [OT] M7 Development tool The management is not bad here (actually their damn good compared to most places), just not very keen on forking out the dosh unless its absolutely necessary. Unfortunately we are a small company and not some cashed up behemoth than can play at being a sheltered workshop, so while I like to whinge and moan its not really like theres much choice. If we want to ship the product on time and make the sales then the only way is through hard work and long hours. If we dont then its game over already as some other company will step up to put in the hard yards and get the deals instead... :-( To be honest Id die of boredom in a 925 job with no stress... ;- As for that article: snip programmers making $70,000 a year /snip 70k US? For a programmer? What a joke! Little wonder all those jobs are going overseas... You could get 3 or 4 of us for that price (and we work twice the hours (and hence have twice the experience imho)) and probably a good 30 skilled programmers in Chennai (who from what Ive heard work even longer hours). -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Thursday, 18 September 2003 04:04 To: Struts Users Mailing List Subject: RE: [OT] M7 Development tool Perhaps you would be interested in reading Union Now? by Warren Keuffel at http://www.sdmagazine.com/ or read the print version of the October issue. Bad Managment makes workers Unionize. Andrew Hill andrew.david.hil [EMAIL PROTECTED] To Struts Users Mailing List 09/17/03 02:42 PM [EMAIL PROTECTED] cc Please respond to Subject Struts Users RE: [OT] M7 Development tool Mailing List [EMAIL PROTECTED] rta.apache.org ouch! Why the smeg does every damn tool have to cost several months salary? Cant see mgmt springing for it then when they can just have us work till 4 or 5 am every day week atfer week in a row. :-( Oh well. thank God (or IBM at least) for Eclipse and extra thanks to the struts team without whose most excellent framework Id be doing OutOfBoundsException hours a day instead of a mere 18 or so... -Original Message- From: Barry Volpe [mailto:[EMAIL PROTECTED] Sent: Thursday, 18 September 2003 03:34 To: Struts Users Mailing List Subject: Re: [OT] M7 Development tool cool but a few thousand dollars! - Original Message - From: Andrew Hill [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wednesday, September 17, 2003 12:15 PM Subject: RE: [OT] M7 Development tool Thanks :-) snip M7 lets you develop web applications in record time by assembling applications visually from existing database schemas, Java components and web services /snip Funny how the words record time stand out when one is reading them at 3:30 AM ;- I reckon I'll have to check this out when I get time. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Thursday, 18 September 2003 03:11 To: Struts Users Mailing List Subject: RE: [OT] M7 Development tool Andrew: Sorry about not including the URL http://www.m7.com/ It is an IDE with repository, workflow designer and other stuff. Will know more after I go through the tutorial. I guess that it could be considered a CASE tool from what I have seen so far. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Is it possible to remove *.do or /do/* from the URL
On Wed, 17 Sep 2003, Matt Raible wrote: Date: Wed, 17 Sep 2003 19:50:42 -0500 From: Matt Raible [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: '[EMAIL PROTECTED]' [EMAIL PROTECTED] Subject: Is it possible to remove *.do or /do/* from the URL First of all: 1. Is it possible to remove the *.do or /do/* from the path and make all requests /* go to the Action Servlet? While it is technically feasible to create a servlet mapping that does this, you're going to be really unhappy with the results in most cases. Just for one example, consider the fact that a /* mapping overrides the default *.jsp mapping, meaning that you would not be able to use JSP pages at all in such an environment. 2. If so, will this mess up any image or css or script files? If the image or CSS files are local to your webapp, they will be screwed up by such a mapping. What if they're on an external webserver and that webserver knows that /images goes one place and /scripts goes another? IMHO, nobody should really be giving a rip what the URL says in a web *application* (as opposed to a web site). For those that still do, I've found that the best strategy is to hide the actual URLs being used from the user. Two easy strategies to make this happen: * Have your app open a window that doesn't have a Location bar, so your users are not constantly distracted by the submit URLs. * Have your app create a frameset with a single frame in it, so that the displayed location never changes. The important principle here is Web Application != Web Site. If your users feel compelled to use bookmarks and the back button in your webapps, despite efforts to train them correctly, this is a pretty good sign that you have not provided enough suitable navigation controls in your basic UI. Thanks, Matt Craig - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: calls each method twice , logging everthing twice?
also struts log following message error: compiler message file broken: key=compiler.err.sun.io.MalformedInputException arguments=null, null, null, null, null, null, null 1 error -Original Message- From: Andrew Hill [mailto:[EMAIL PROTECTED] Sent: Thursday, September 18, 2003 9:45 AM To: Struts Users Mailing List Subject: RE: calls each method twice , logging everthing twice? It looks as though the browser is sending two requests for the page. Not familiar with tiles so am not sure about the exception your getting though. -Original Message- From: Seyhan BASMACI (Internet Yazilimlari Yetkilisi) [mailto:[EMAIL PROTECTED] Sent: Thursday, 18 September 2003 14:26 To: Struts Users Mailing List Subject: calls each method twice , logging everthing twice? hi, we are using jdeveloper as ide , and struts as framework ,, I dont know when it is started but in debug mode it calls each method twice (calls action class execute method twice ) and struts gives followig message after calling my first action class (loginAction) ,, it seccessfull execute and fiinds mapping for the login,, but gives the following message while sending response to the client, is there anybody encountered with this problem ? here is the STRUTS log info, as you can see it does processActionForward twice [INFO] RequestProcessor - -Processing a 'POST' for path '/Login' [INFO] RequestProcessor - -Processing a 'POST' for path '/Login' processActionForward(/pages/bireysel/common/welcome.jsp, false) processActionForward(/pages/bireysel/common/welcome.jsp, false) ERROR on the browser: java.lang.NullPointerException org.apache.struts.tiles.ComponentDefinition org.apache.struts.tiles.xmlDefinition.FactorySet.getDefinition(java.lang.Str ing, javax.servlet.ServletRequest, javax.servlet.ServletContext) FactorySet.java:156 org.apache.struts.tiles.ComponentDefinition org.apache.struts.tiles.definition.ComponentDefinitionsFactoryWrapper.getDef inition(java.lang.String, javax.servlet.ServletRequest, javax.servlet.ServletContext) ComponentDefinitionsFactoryWrapper.java:56 boolean org.apache.struts.tiles.TilesRequestProcessor.processTilesDefinition(java.la ng.String, boolean, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) TilesRequestProcessor.java:175 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
IMP :: Defining a single parameter when returning Collection of F orm Beans as Request Attribute
Hi, I am returning a collection of Form Beans form where I iterate and get the results of my serach page. This collection I put into the request attribute. However, I have some common attributes like page no which are not bean parameters but are one single value for the whole search page like a parameter called pageNo. Now when I use the html:hidden, it requires the property=pageNo to be a bean parameter !! And gives error when I pass this as request object. As under :: html:hidden property=pageNo value=%=Integer.parseInt((String)request.getAttribute(pageNo))% Anybody can give ideas for this: Another Design Issue : Search Results page, how to return the set of Form Beans ? Whats the best approach. Thanks for your advice !! Yogesh DISCLAIMER: The information in this message is confidential and may be legally privileged. It is intended solely for the addressee. Access to this message by anyone else is unauthorised. If you are not the intended recipient, any disclosure, copying, or distribution of the message, or any action or omission taken by you in reliance on it, is prohibited and may be unlawful. Please immediately contact the sender if you have received this message in error. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: calls each method twice , logging everthing twice?
please check that you are not submitting the form twice using java script or so. one in onSubmit handler and other progrmatically using form.submit(); Thanks, -- Saravanan Raju Sr.Analyst SYNTEL (India) Ltd. Chennai Development Centre Tel: +91-44-22301101 (Board) Extn : 202 Fax: +91-44-22300369 e-mail : mailto:[EMAIL PROTECTED] Website: http://www.syntelinc.com -- -Original Message- From: Andrew Hill [SMTP:[EMAIL PROTECTED] Sent: Thursday, September 18, 2003 12:15 PM To: Struts Users Mailing List Subject: RE: calls each method twice , logging everthing twice? It looks as though the browser is sending two requests for the page. Not familiar with tiles so am not sure about the exception your getting though. -Original Message- From: Seyhan BASMACI (Internet Yazilimlari Yetkilisi) [mailto:[EMAIL PROTECTED] Sent: Thursday, 18 September 2003 14:26 To: Struts Users Mailing List Subject: calls each method twice , logging everthing twice? hi, we are using jdeveloper as ide , and struts as framework ,, I dont know when it is started but in debug mode it calls each method twice (calls action class execute method twice ) and struts gives followig message after calling my first action class (loginAction) ,, it seccessfull execute and fiinds mapping for the login,, but gives the following message while sending response to the client, is there anybody encountered with this problem ? here is the STRUTS log info, as you can see it does processActionForward twice [INFO] RequestProcessor - -Processing a 'POST' for path '/Login' [INFO] RequestProcessor - -Processing a 'POST' for path '/Login' processActionForward(/pages/bireysel/common/welcome.jsp, false) processActionForward(/pages/bireysel/common/welcome.jsp, false) ERROR on the browser: java.lang.NullPointerException org.apache.struts.tiles.ComponentDefinition org.apache.struts.tiles.xmlDefinition.FactorySet.getDefinition(java.lang.S tr ing, javax.servlet.ServletRequest, javax.servlet.ServletContext) FactorySet.java:156 org.apache.struts.tiles.ComponentDefinition org.apache.struts.tiles.definition.ComponentDefinitionsFactoryWrapper.getD ef inition(java.lang.String, javax.servlet.ServletRequest, javax.servlet.ServletContext) ComponentDefinitionsFactoryWrapper.java:56 boolean org.apache.struts.tiles.TilesRequestProcessor.processTilesDefinition(java. la ng.String, boolean, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) TilesRequestProcessor.java:175 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Confidential: This electronic message and all contents contain information from Syntel, Inc. which may be privileged, confidential or otherwise protected from disclosure. The information is intended to be for the addressee only. If you are not the addressee, any disclosure, copy, distribution or use of the contents of this message is prohibited. If you have received this electronic message in error, please notify the sender immediately and destroy the original message and all copies. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Problem recognising button property in action
Thanks for your help The problem is that the setter for setButtonCreate never gets called in the form bean even if I have a value set. I have now found a workround for this problem, as follows: In the action execute ... if (isButton( request, buttonCreate ) ) { LOG.debug( createReport ); serviceRequest( form ); forward=mapping.findForward( IConstants.SUCCESS_KEY ); } else { // No buttons pressed // Fill in all the data needed for the view // in the ActionForm. initialiseForm( (ReportForm) form ); forward=mapping.findForward( IConstants.SUCCESS_KEY ); } ''' And new method... public boolean isButton( HttpServletRequest request, String name ) { // True if the request parameter name is not null boolean state = (request.getParameter( name ) != null); if (state) LOG.debug( Button +name+ pressed. ); return state; } This basically reads the parameter directly from the request, bypassing struts, it's a bit manual, but that's fine by me because it works. Cheers. Bruce On Thu, 18 Sep 2003, hari_s wrote: You can try give your html:submit a value html:submit value=submit property=buttonCreate /,html:submit value=cancel property=buttonCreate / And in your action class put code to arrange mapping for every submit value You you can try something like this yourFormBean frm=( yourFormBean)form; if(frm.getButtonCreate().equals(submit)) return mapping.findForward(.and so on) of course you have to make setter and getter method for your submit property... -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Bruce James Sent: Wednesday, September 17, 2003 4:54 PM To: [EMAIL PROTECTED] Subject: Problem recognising button property in action Hi, I'm having a particularly frustrating time trying to get my struts app to recognise which button has been pressed. I've stripped it down a bit to only one submit button with one property and getter setters for it. The problem I have is that the property specified in the html:submit tag doesn't seem to have its setter method called. I know the ReportForm is having other setters called, as I can see them in the log, but the setButtonCreate setter never gets called. I know about DispatchAction etc, but would prefer not to use them right now, as this should work (so I've read elsewhere). Any ideas? Thanks, Bruce Code snippets follow. jsp snippet html:submit property=buttonCreate titleKey=help.CreateReportbean:message key=text.CreateReport//html:submit struts-config snippet action path=/loginProcess type=com.comtelco.central.reporting.web.action.LoginAction name=loginForm input=/templates/login.jsp scope=request validate=true exception type=com.comtelco.central.reporting.exception.AuthorisationException key=err.authorisation scope=request path=/action/login / exception type=com.comtelco.central.reporting.exception.InvalidLoginException key=err.invalidlogin path=/action/login scope=request / forward name=Success redirect=true path=/action/mainmenu / forward name=Failure redirect=true path=/action/login / /action ReportForm snippet // Buttons public void setButtonCreate( java.lang.String buttonCreate ) { LOG.debug( setBCreate ); this.buttonCreate = buttonCreate; } public String getButtonCreate( ) { LOG.debug( getBCreate ); return buttonCreate; } public boolean isButtonCreate() { // buttonCreate return (buttonCreate != null); } Report Action snippet if (((ReportForm) form).isButtonCreate() ) { LOG.debug( createReport ); serviceRequest( form ); forward=mapping.findForward( IConstants.SUCCESS_KEY ); } else { // No buttons pressed // Fill in all the data needed for the view // in the ActionForm. initialiseForm( (ReportForm) form ); forward=mapping.findForward( IConstants.SUCCESS_KEY ); } -- Bruce James mailto: [EMAIL PROTECTED] 07973 114881 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JSTL bean:define copy translation
Try c:set var=myVar%=JemosConstants.DATA_ %/c:set c:set var=userBean value=${sessionScope[myVar]}/ Adam On 09/17/2003 08:02 PM seloha . wrote: From: seloha . [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: JSTL bean:define copy translation Date: Tue, 16 Sep 2003 12:26:02 +0100 I am using struts-el and trying to translate the following bean:define (i.e. copy an existing bean) into JSTL with no success: bean:define id=userBean name='%= JemosConstants.DATA_USER_DATA %' type=org.jemos.core.framework.ejbs.valueobject.PeopleValue / JemosConstants.DATA_USER_DATA is a session object. The form bean is an org.apache.struts.validator.DynaValidatorForm. Any help appreciated, Thanks Paul _ Find a cheaper internet access deal - choose one to suit you. http://www.msn.co.uk/internetaccess - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Solution: c:set var=userBean value=${sessionScope.DATA_USER_DATA} / may need to change scope (e.g. requestScope, etc.) accordingly _ Tired of 56k? Get a FREE BT Broadband connection http://www.msn.co.uk/specials/btbroadband - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- struts 1.1 + tomcat 4.1.27 + java 1.4.2 Linux 2.4.20 RH9 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Validation Failed error message
I get a 'Validation Failed' error message when I run my code... I suspect that my naming convention for the getters and setters methods in my ActionForm class may not be correct... I think it is the contactId param that must be causing the problem. What should the getters and setters for contactId be called? // This is my ActionForm class package com.db.gcp.lemweb.blotter.contacts; import javax.servlet.http.HttpServletRequest; import org.apache.struts.action.*; //--- // Author: Mehran Zonouzi // Date: 15/09/2003 // Purpose: This bean saves the param values that are to be // used with the EditContactAction class // public final class EditContactForm extends ActionForm { private String page = null; private String contactId = null; // The usual getter and setter methods for beans public String getContactId(){ return (this.contactId); } public void setContactId(String contactId){ this.contactId = contactId; } public String getPage(){ return (this.page); } public void setPage(String page){ this.page = page; } // This method performs the form validation public ActionErrors validate(ActionMapping mapping, HttpServletRequest request){ ActionErrors errors = new ActionErrors() ; if ( page == null || .equals(page)){ errors.add(page, new ActionError(error.page)); } if ( contactId == null || .equals(contactId)){ errors.add(contactid, new ActionError(error.contactid)); } return errors; } } -- This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
org.apache.commons.digester.Digester error
Hi All, I am using struts and jstl on tomcat. But when I start the tomcat I always get this error. Even though my application works fine. I would like to know what these error and how to get rid of them Sep 18, 2003 2:47:53 PM org.apache.commons.digester.Digester error SEVERE: Parse Error at line 6 column 19: Document root element taglib, must ma tch DOCTYPE root null. org.xml.sax.SAXParseException: Document root element taglib, must match DOCTYP E root null. at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Er rorHandlerWrapper.java:232) at org.apache.xerces.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper. java:173) at org.apache.xerces.impl.XMLErrorReporter.reportError(XMLErrorReporter. java:362) at org.apache.xerces.impl.XMLErrorReporter.reportError(XMLErrorReporter. java:296) at org.apache.xerces.impl.dtd.XMLDTDValidator.rootElementSpecified(XMLDT Thanks and Regards Deepak - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: calls each method twice , logging everthing twice?
I had a similar bug in IE6 where I had a submit button that invoked a js method that did some stuff and then called form.submit(). In IE5 Id only have one submission, but in 6 it would do the submission from my call to submit() AND do the submit buttons submit as well. -Original Message- From: Raju, Saravanan [mailto:[EMAIL PROTECTED] Sent: Thursday, 18 September 2003 16:09 To: Struts Users Mailing List Subject: RE: calls each method twice , logging everthing twice? please check that you are not submitting the form twice using java script or so. one in onSubmit handler and other progrmatically using form.submit(); Thanks, -- Saravanan Raju Sr.Analyst SYNTEL (India) Ltd. Chennai Development Centre Tel: +91-44-22301101 (Board) Extn : 202 Fax: +91-44-22300369 e-mail : mailto:[EMAIL PROTECTED] Website: http://www.syntelinc.com -- -Original Message- From: Andrew Hill [SMTP:[EMAIL PROTECTED] Sent: Thursday, September 18, 2003 12:15 PM To: Struts Users Mailing List Subject: RE: calls each method twice , logging everthing twice? It looks as though the browser is sending two requests for the page. Not familiar with tiles so am not sure about the exception your getting though. -Original Message- From: Seyhan BASMACI (Internet Yazilimlari Yetkilisi) [mailto:[EMAIL PROTECTED] Sent: Thursday, 18 September 2003 14:26 To: Struts Users Mailing List Subject: calls each method twice , logging everthing twice? hi, we are using jdeveloper as ide , and struts as framework ,, I dont know when it is started but in debug mode it calls each method twice (calls action class execute method twice ) and struts gives followig message after calling my first action class (loginAction) ,, it seccessfull execute and fiinds mapping for the login,, but gives the following message while sending response to the client, is there anybody encountered with this problem ? here is the STRUTS log info, as you can see it does processActionForward twice [INFO] RequestProcessor - -Processing a 'POST' for path '/Login' [INFO] RequestProcessor - -Processing a 'POST' for path '/Login' processActionForward(/pages/bireysel/common/welcome.jsp, false) processActionForward(/pages/bireysel/common/welcome.jsp, false) ERROR on the browser: java.lang.NullPointerException org.apache.struts.tiles.ComponentDefinition org.apache.struts.tiles.xmlDefinition.FactorySet.getDefinition(java.lang.S tr ing, javax.servlet.ServletRequest, javax.servlet.ServletContext) FactorySet.java:156 org.apache.struts.tiles.ComponentDefinition org.apache.struts.tiles.definition.ComponentDefinitionsFactoryWrapper.getD ef inition(java.lang.String, javax.servlet.ServletRequest, javax.servlet.ServletContext) ComponentDefinitionsFactoryWrapper.java:56 boolean org.apache.struts.tiles.TilesRequestProcessor.processTilesDefinition(java. la ng.String, boolean, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) TilesRequestProcessor.java:175 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Confidential: This electronic message and all contents contain information from Syntel, Inc. which may be privileged, confidential or otherwise protected from disclosure. The information is intended to be for the addressee only. If you are not the addressee, any disclosure, copy, distribution or use of the contents of this message is prohibited. If you have received this electronic message in error, please notify the sender immediately and destroy the original message and all copies. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Template Method Design
Hi, I have a requirement. Anybody has created an abstract action class that extends Action. It makes the perform method as final. And creates an abstract method satPerform that has to implemented by the classes extending thus providing sort of a base class. The intention behind is to take care of exception handling in the abstract class and rest in the child classes. Action perform() Abstract Class extends Action final perform(), abstract satPerform() SatAction extends Abstract - satPerform(). The pattern is Template Method Design. If anybody has used such approach, please share the details. If somebody could shed some light in this topic i would be grateful. Vijay K. Hegde Software Engineer Infosys Technologies Limited, Hyderabad * (040) 2300 5222 extn 23239 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: calls each method twice , logging everthing twice?
onSubmit=return false; in form tag should solve the problem. Thanks, -- Saravanan Raju Sr.Analyst -Original Message- From: Andrew Hill [SMTP:[EMAIL PROTECTED] Sent: Thursday, September 18, 2003 2:57 PM To: Struts Users Mailing List Subject: RE: calls each method twice , logging everthing twice? I had a similar bug in IE6 where I had a submit button that invoked a js method that did some stuff and then called form.submit(). In IE5 Id only have one submission, but in 6 it would do the submission from my call to submit() AND do the submit buttons submit as well. -Original Message- From: Raju, Saravanan [mailto:[EMAIL PROTECTED] Sent: Thursday, 18 September 2003 16:09 To: Struts Users Mailing List Subject: RE: calls each method twice , logging everthing twice? please check that you are not submitting the form twice using java script or so. one in onSubmit handler and other progrmatically using form.submit(); Thanks, -- Saravanan Raju Sr.Analyst -Original Message- From: Andrew Hill [SMTP:[EMAIL PROTECTED] Sent: Thursday, September 18, 2003 12:15 PM To: Struts Users Mailing List Subject:RE: calls each method twice , logging everthing twice? It looks as though the browser is sending two requests for the page. Not familiar with tiles so am not sure about the exception your getting though. -Original Message- From: Seyhan BASMACI (Internet Yazilimlari Yetkilisi) [mailto:[EMAIL PROTECTED] Sent: Thursday, 18 September 2003 14:26 To: Struts Users Mailing List Subject: calls each method twice , logging everthing twice? hi, we are using jdeveloper as ide , and struts as framework ,, I dont know when it is started but in debug mode it calls each method twice (calls action class execute method twice ) and struts gives followig message after calling my first action class (loginAction) ,, it seccessfull execute and fiinds mapping for the login,, but gives the following message while sending response to the client, is there anybody encountered with this problem ? here is the STRUTS log info, as you can see it does processActionForward twice [INFO] RequestProcessor - -Processing a 'POST' for path '/Login' [INFO] RequestProcessor - -Processing a 'POST' for path '/Login' processActionForward(/pages/bireysel/common/welcome.jsp, false) processActionForward(/pages/bireysel/common/welcome.jsp, false) ERROR on the browser: java.lang.NullPointerException org.apache.struts.tiles.ComponentDefinition org.apache.struts.tiles.xmlDefinition.FactorySet.getDefinition(java.lang.S tr ing, javax.servlet.ServletRequest, javax.servlet.ServletContext) FactorySet.java:156 org.apache.struts.tiles.ComponentDefinition org.apache.struts.tiles.definition.ComponentDefinitionsFactoryWrapper.getD ef inition(java.lang.String, javax.servlet.ServletRequest, javax.servlet.ServletContext) ComponentDefinitionsFactoryWrapper.java:56 boolean org.apache.struts.tiles.TilesRequestProcessor.processTilesDefinition(java. la ng.String, boolean, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) TilesRequestProcessor.java:175 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Confidential: This electronic message and all contents contain information from Syntel, Inc. which may be privileged, confidential or otherwise protected from disclosure. The information is intended to be for the addressee only. If you are not the addressee, any disclosure, copy, distribution or use of the contents of this message is prohibited. If you have received this electronic message in error, please notify the sender immediately and destroy the original message and all copies. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Confidential: This electronic message and all contents contain information from Syntel, Inc. which may be privileged, confidential or otherwise protected from disclosure. The information is intended to be for the addressee only. If you are not the addressee, any disclosure, copy, distribution or use of
Forwarding openNewWindow
Hi to all, I´d like to forward to an jsp-page which will be opened in a new window. How can I manage that in struts-config.xml ? I can´t use javascript to open the new window because the user is pressing a struts-submit button and not a normal link. Hope anybody can help me, bye, Manuel Lenz - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Template Method Design
Take a look at Chapter 10 - Exception Handling in Programming Jakarta Struts by chuck cavaness.. i think you'll find this very helpful. I've implement this with Action but ill soon need to do the same for Dispatch Action too... has anyone done likewise for Dispatch and other such actions? From: Vijay K Hegde [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: Template Method Design Date: Thu, 18 Sep 2003 15:01:59 +0530 Hi, I have a requirement. Anybody has created an abstract action class that extends Action. It makes the perform method as final. And creates an abstract method satPerform that has to implemented by the classes extending thus providing sort of a base class. The intention behind is to take care of exception handling in the abstract class and rest in the child classes. Action perform() Abstract Class extends Action final perform(), abstract satPerform() SatAction extends Abstract - satPerform(). The pattern is Template Method Design. If anybody has used such approach, please share the details. If somebody could shed some light in this topic i would be grateful. Vijay K. Hegde Software Engineer Infosys Technologies Limited, Hyderabad * (040) 2300 5222 extn 23239 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Add photos to your e-mail with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Template Method Design
I use the technique of finalising execute (1.1 equivelent of perform) and having it do the lions share of the work for things. For example in a crud action most of the work is occuring in execute and the subclasses just do those things that are specific to the record type in question... I find it works *very* well, and indeed I would suggest that for all but the most trivial apps your wasting a lot of your own time by having any concrete action class do ALL the work when you could be using inheritance and an abstract superclass 'template' to take care of the generic stuff. (Incidentally one thing Ive found useful when doing things this way is to have the superclass execute method create an 'ActionContext' bean that encapsulates the four parameters that get passed to execute, and then you pass that to your subclasses. Saves a lot of time, and gives you a spot you can add extra stuff to later instead of having to change lots of method signatures.) In terms of exception handling though, you may be better off using the struts ExceptionHandler feature for dealing with exceptions thrown by actions. -Original Message- From: Vijay K Hegde [mailto:[EMAIL PROTECTED] Sent: Thursday, 18 September 2003 17:32 To: Struts Users Mailing List Subject: Template Method Design Hi, I have a requirement. Anybody has created an abstract action class that extends Action. It makes the perform method as final. And creates an abstract method satPerform that has to implemented by the classes extending thus providing sort of a base class. The intention behind is to take care of exception handling in the abstract class and rest in the child classes. Action perform() Abstract Class extends Action final perform(), abstract satPerform() SatAction extends Abstract - satPerform(). The pattern is Template Method Design. If anybody has used such approach, please share the details. If somebody could shed some light in this topic i would be grateful. Vijay K. Hegde Software Engineer Infosys Technologies Limited, Hyderabad * (040) 2300 5222 extn 23239 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
offtopic idea 876 external javadoc
hi, Sorry for the offtopic. But can any one using IDEA build 876 tell me how to associate external java docs Regds Ashwani Kalra This message contains information that may be privileged or confidential and is the property of the Cap Gemini Ernst Young Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorised to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.
I webshpere Struts
Is there anybody working on struts -- websphere server architecture i have few queries regarding deploying the complete module using JSp-- structs -- sessionbeans --- entitybeans --- Database architecture it's not getting deployed properly... can anyone guide me to get the proper link on this... thanks abhijeet - Original Message - From: Andrew Hill [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Thursday, September 18, 2003 2:56 PM Subject: RE: calls each method twice , logging everthing twice? I had a similar bug in IE6 where I had a submit button that invoked a js method that did some stuff and then called form.submit(). In IE5 Id only have one submission, but in 6 it would do the submission from my call to submit() AND do the submit buttons submit as well. -Original Message- From: Raju, Saravanan [mailto:[EMAIL PROTECTED] Sent: Thursday, 18 September 2003 16:09 To: Struts Users Mailing List Subject: RE: calls each method twice , logging everthing twice? please check that you are not submitting the form twice using java script or so. one in onSubmit handler and other progrmatically using form.submit(); Thanks, -- Saravanan Raju Sr.Analyst SYNTEL (India) Ltd. Chennai Development Centre Tel: +91-44-22301101 (Board) Extn : 202 Fax: +91-44-22300369 e-mail : mailto:[EMAIL PROTECTED] Website: http://www.syntelinc.com -- -Original Message- From: Andrew Hill [SMTP:[EMAIL PROTECTED] Sent: Thursday, September 18, 2003 12:15 PM To: Struts Users Mailing List Subject: RE: calls each method twice , logging everthing twice? It looks as though the browser is sending two requests for the page. Not familiar with tiles so am not sure about the exception your getting though. -Original Message- From: Seyhan BASMACI (Internet Yazilimlari Yetkilisi) [mailto:[EMAIL PROTECTED] Sent: Thursday, 18 September 2003 14:26 To: Struts Users Mailing List Subject: calls each method twice , logging everthing twice? hi, we are using jdeveloper as ide , and struts as framework ,, I dont know when it is started but in debug mode it calls each method twice (calls action class execute method twice ) and struts gives followig message after calling my first action class (loginAction) ,, it seccessfull execute and fiinds mapping for the login,, but gives the following message while sending response to the client, is there anybody encountered with this problem ? here is the STRUTS log info, as you can see it does processActionForward twice [INFO] RequestProcessor - -Processing a 'POST' for path '/Login' [INFO] RequestProcessor - -Processing a 'POST' for path '/Login' processActionForward(/pages/bireysel/common/welcome.jsp, false) processActionForward(/pages/bireysel/common/welcome.jsp, false) ERROR on the browser: java.lang.NullPointerException org.apache.struts.tiles.ComponentDefinition org.apache.struts.tiles.xmlDefinition.FactorySet.getDefinition(java.lang.S tr ing, javax.servlet.ServletRequest, javax.servlet.ServletContext) FactorySet.java:156 org.apache.struts.tiles.ComponentDefinition org.apache.struts.tiles.definition.ComponentDefinitionsFactoryWrapper.getD ef inition(java.lang.String, javax.servlet.ServletRequest, javax.servlet.ServletContext) ComponentDefinitionsFactoryWrapper.java:56 boolean org.apache.struts.tiles.TilesRequestProcessor.processTilesDefinition(java. la ng.String, boolean, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) TilesRequestProcessor.java:175 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Confidential: This electronic message and all contents contain information from Syntel, Inc. which may be privileged, confidential or otherwise protected from disclosure. The information is intended to be for the addressee only. If you are not the addressee, any disclosure, copy, distribution or use of the contents of this message is prohibited. If you have received this electronic message in error, please notify the sender immediately and destroy the original message and all copies. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For
Evil characters causing mischief in textarea and value attribute contents
We have some screens that allow users to edit some stuff stored in the db, and some of this stuff includes such characters as or \ or whatever, and also some of them have xml tags as there contents. When rendering such fields we are hitting some problems. ie: if the value is something like: my cats name is snowflake we end up with: input name=fieldname value=my cats name is snowflake/ ...which of course is not very good. Another one is textareas containing /textarea! Whats the technique for handling this nicely? Obviously I need to escape these somehow. What do I need to consider? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Confused - Scaffold and Action Mapping
1. The .article.Menu tile uses the menuForm bean. 2. Check the import statement at the top of the file =:0) It's just a static String. HTH, Ted. Caroline Jen wrote: I have problem to understand the action mapping shown below: code: - action path=/Menu name=menuForm type=org.apache.struts.scaffold.ExistsAttributeAction parameter=application;HOURS forward name=success path=.article.Menu/ forward name=failure path=/do/MenuCreate/ /action - It looks to me that 1. menuForm is the logical name for the form bean as given in the form-bean segment of the struts-config.xml file. Question 1: What is the rational of having 'menuForm' in the org.apache.struts.scaffold folder in ActionMapping? 2. the action that is going to be executed is the ExistsAttributeAction in the org.apache.struts.scaffold folder. If the condition returned in that action is 'success', the article.Menu tile will render the next page. The code of ExistsAttributeAction.java shows: mapping.findForward(Tokens.SUCCESS); Question 2: Where can I find Tokens.SUCCESS maps to 'success'? Thank you for your help. __ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Ted Husted, Junit in Action - http://www.manning.com/massol/, Struts in Action - http://husted.com/struts/book.html, JSP Site Design - http://www.amazon.com/exec/obidos/ISBN=1861005512. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: I webshpere Struts
I've just started developing a new project using Websphere IDE but the application will run on Weblogic. We're using the TestServer that comes with Websphere and we're having the same problem with the Database access, using entity beans. Eventhough the server has the JNDI names configured properly, I keep getting an exception saying that the JNDI name can't be found. I manage to call the session beans in my web module but no entity beans. Is there anybody using this arquitecture? Thanks Rben Carvalho -Mensagem original- De: Abhijeet Mahalkar [mailto:[EMAIL PROTECTED] Enviada: qui 18-09-2003 11:29 Para: Struts Users Mailing List Cc: Assunto: I webshpere Struts Is there anybody working on struts -- websphere server architecture i have few queries regarding deploying the complete module using JSp-- structs -- sessionbeans --- entitybeans --- Database architecture it's not getting deployed properly... can anyone guide me to get the proper link on this... thanks abhijeet - Original Message - From: Andrew Hill [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Thursday, September 18, 2003 2:56 PM Subject: RE: calls each method twice , logging everthing twice? I had a similar bug in IE6 where I had a submit button that invoked a js method that did some stuff and then called form.submit(). In IE5 Id only have one submission, but in 6 it would do the submission from my call to submit() AND do the submit buttons submit as well. -Original Message- From: Raju, Saravanan [mailto:[EMAIL PROTECTED] Sent: Thursday, 18 September 2003 16:09 To: Struts Users Mailing List Subject: RE: calls each method twice , logging everthing twice? please check that you are not submitting the form twice using java script or so. one in onSubmit handler and other progrmatically using form.submit(); Thanks, -- Saravanan Raju Sr.Analyst SYNTEL (India) Ltd. Chennai Development Centre Tel: +91-44-22301101 (Board) Extn : 202 Fax: +91-44-22300369 e-mail : mailto:[EMAIL PROTECTED] Website: http://www.syntelinc.com -- -Original Message- From: Andrew Hill [SMTP:[EMAIL PROTECTED] Sent: Thursday, September 18, 2003 12:15 PM To: Struts Users Mailing List Subject: RE: calls each method twice , logging everthing twice? It looks as though the browser is sending two requests for the page. Not familiar with tiles so am not sure about the exception your getting though. -Original Message- From: Seyhan BASMACI (Internet Yazilimlari Yetkilisi) [mailto:[EMAIL PROTECTED] Sent: Thursday, 18 September 2003 14:26 To: Struts Users Mailing List Subject: calls each method twice , logging everthing twice? hi, we are using jdeveloper as ide , and struts as framework ,, I dont know when it is started but in debug mode it calls each method twice (calls action class execute method twice ) and struts gives followig message after calling my first action class (loginAction) ,, it seccessfull execute and fiinds mapping for the login,, but gives the following message while sending response to the client, is there anybody encountered with this problem ? here is the STRUTS log info, as you can see it does processActionForward twice [INFO] RequestProcessor - -Processing a 'POST' for path '/Login' [INFO] RequestProcessor - -Processing a 'POST' for path '/Login' processActionForward(/pages/bireysel/common/welcome.jsp, false) processActionForward(/pages/bireysel/common/welcome.jsp, false) ERROR on the browser: java.lang.NullPointerException org.apache.struts.tiles.ComponentDefinition org.apache.struts.tiles.xmlDefinition.FactorySet.getDefinition(java.lang.S tr ing, javax.servlet.ServletRequest, javax.servlet.ServletContext) FactorySet.java:156 org.apache.struts.tiles.ComponentDefinition org.apache.struts.tiles.definition.ComponentDefinitionsFactoryWrapper.getD ef inition(java.lang.String, javax.servlet.ServletRequest, javax.servlet.ServletContext) ComponentDefinitionsFactoryWrapper.java:56
Re: struts-faces
Likewise, if anyone really wanted throwaway, non-threadsafe Actions, there's a nice technique that Maverick uses. A regular singleton Action is used as a wrapper. When execute is called, the wrapper instantiates a new instance of the desired type and returns the outcome of its execute. But the ActionForm technique Greg describes would be an even better way to create throwaway Actions. Gregory Seidman wrote: On Wed, Sep 17, 2003 at 01:14:27PM +0200, Adam Hardy wrote: } I remember a while ago in one of these architecture- theme emails you } discussed the OO nature of struts it had been said that the } action-form class and the action class broke the OO encapsulation } principle, by having data in one and functionality in another. You said } if you were going to design struts again, you would probably address this. [...] This is a quibble. If you want to put your functionality into your ActionForm class, go ahead. Create an abstract ActionForm subclass that has a takeAction() pure virtual method in it (with appropriate arguments). Create an Action class which does nothing more than cast to your ActionForm subclass and call takeAction(). There you go, functionality in the same class that holds the data. } Adam --Greg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Ted Husted, Junit in Action - http://www.manning.com/massol/, Struts in Action - http://husted.com/struts/book.html, JSP Site Design - http://www.amazon.com/exec/obidos/ISBN=1861005512. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: offtopic idea 876 external javadoc
I am facing this error while deploying the Session bean into Webshpere is any body working on webshepere can u help me ? please thanks regards ABhijeet [*Error] /UserGrpMasterJar(Class: indus.coll.ejb.usergroupmaster.UserGroupHome): CHKJ2907E: Type indus.coll.ejb.usergroupmaster.UserGroupHome, or one of its supertypes, cannot be reflected. Check the classpath. - Original Message - From: Kalra, Ashwani [EMAIL PROTECTED] To: Struts (E-mail) [EMAIL PROTECTED] Sent: Thursday, September 18, 2003 4:00 PM Subject: offtopic idea 876 external javadoc hi, Sorry for the offtopic. But can any one using IDEA build 876 tell me how to associate external java docs Regds Ashwani Kalra This message contains information that may be privileged or confidential and is the property of the Cap Gemini Ernst Young Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorised to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: struts-faces
Craig R. McClanahan wrote: // Return an Action for processing a logon public Action getLogon() { return new Action() { public String invoke() { return logon(); } } } Very cool technique =:) But this has to be the coolest trick yet: // Add an error message FacesContext.getCurrentInstance().addMessage(...); Hey, why bother passing around a context when you can get the thread to do it? Quite fancy =:) http://java.sun.com/webservices/docs/1.2/api/javax/faces/context/FacesContext.html -Ted. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: struts-faces
Of course theres an even simpler way to get fresh actions each time - just a few lines change in your request processor. Have it return a new instance each time and dont bother with caching it... -Original Message- From: Ted Husted [mailto:[EMAIL PROTECTED] Sent: Thursday, 18 September 2003 18:57 To: Struts Users Mailing List Subject: Re: struts-faces Likewise, if anyone really wanted throwaway, non-threadsafe Actions, there's a nice technique that Maverick uses. A regular singleton Action is used as a wrapper. When execute is called, the wrapper instantiates a new instance of the desired type and returns the outcome of its execute. But the ActionForm technique Greg describes would be an even better way to create throwaway Actions. Gregory Seidman wrote: On Wed, Sep 17, 2003 at 01:14:27PM +0200, Adam Hardy wrote: } I remember a while ago in one of these architecture- theme emails you } discussed the OO nature of struts it had been said that the } action-form class and the action class broke the OO encapsulation } principle, by having data in one and functionality in another. You said } if you were going to design struts again, you would probably address this. [...] This is a quibble. If you want to put your functionality into your ActionForm class, go ahead. Create an abstract ActionForm subclass that has a takeAction() pure virtual method in it (with appropriate arguments). Create an Action class which does nothing more than cast to your ActionForm subclass and call takeAction(). There you go, functionality in the same class that holds the data. } Adam --Greg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Ted Husted, Junit in Action - http://www.manning.com/massol/, Struts in Action - http://husted.com/struts/book.html, JSP Site Design - http://www.amazon.com/exec/obidos/ISBN=1861005512. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: I webshpere Struts
I'm using this architecture and everything works... What kind of JNDI name it can't find? Bean or Datasource? Do you really have declared in web.xml and implemented corresponding interfaces (ie. local reference vs local interface)? In case of local, are you using in your code java:comp/env namespace? -juraj. -Original Message- From: Ruben Carvalho [mailto:[EMAIL PROTECTED] Sent: Thursday, September 18, 2003 12:48 PM To: Struts Users Mailing List Subject: RE: I webshpere Struts I've just started developing a new project using Websphere IDE but the application will run on Weblogic. We're using the TestServer that comes with Websphere and we're having the same problem with the Database access, using entity beans. Eventhough the server has the JNDI names configured properly, I keep getting an exception saying that the JNDI name can't be found. I manage to call the session beans in my web module but no entity beans. Is there anybody using this arquitecture? Thanks Rben Carvalho -Mensagem original- De: Abhijeet Mahalkar [mailto:[EMAIL PROTECTED] Enviada: qui 18-09-2003 11:29 Para: Struts Users Mailing List Cc: Assunto: I webshpere Struts Is there anybody working on struts -- websphere server architecture i have few queries regarding deploying the complete module using JSp-- structs -- sessionbeans --- entitybeans --- Database architecture it's not getting deployed properly... can anyone guide me to get the proper link on this... thanks abhijeet - Original Message - From: Andrew Hill [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Thursday, September 18, 2003 2:56 PM Subject: RE: calls each method twice , logging everthing twice? I had a similar bug in IE6 where I had a submit button that invoked a js method that did some stuff and then called form.submit(). In IE5 Id only have one submission, but in 6 it would do the submission from my call to submit() AND do the submit buttons submit as well. -Original Message- From: Raju, Saravanan [mailto:[EMAIL PROTECTED] Sent: Thursday, 18 September 2003 16:09 To: Struts Users Mailing List Subject: RE: calls each method twice , logging everthing twice? please check that you are not submitting the form twice using java script or so. one in onSubmit handler and other progrmatically using form.submit(); Thanks, -- Saravanan Raju Sr.Analyst SYNTEL (India) Ltd. Chennai Development Centre Tel: +91-44-22301101 (Board) Extn : 202 Fax: +91-44-22300369 e-mail : mailto:[EMAIL PROTECTED] Website: http://www.syntelinc.com -- -Original Message- From: Andrew Hill [SMTP:[EMAIL PROTECTED] Sent: Thursday, September 18, 2003 12:15 PM To: Struts Users Mailing List Subject: RE: calls each method twice , logging everthing twice? It looks as though the browser is sending two requests for the page. Not familiar with tiles so am not sure about the exception your getting though. -Original Message- From: Seyhan BASMACI (Internet Yazilimlari Yetkilisi) [mailto:[EMAIL PROTECTED] Sent: Thursday, 18 September 2003 14:26 To: Struts Users Mailing List Subject: calls each method twice , logging everthing twice? hi, we are using jdeveloper as ide , and struts as framework ,, I dont know when it is started but in debug mode it calls each method twice (calls action class execute method twice ) and struts gives followig message after calling my first action class (loginAction) ,, it seccessfull execute and fiinds mapping for the login,, but gives the following message while sending response to the client, is there anybody encountered with this problem ? here is the STRUTS log info, as you can see it does processActionForward twice [INFO] RequestProcessor - -Processing a 'POST' for path '/Login' [INFO] RequestProcessor - -Processing a 'POST' for path '/Login' processActionForward(/pages/bireysel/common/welcome.jsp, false) processActionForward(/pages/bireysel/common/welcome.jsp, false) ERROR on the browser: java.lang.NullPointerException org.apache.struts.tiles.ComponentDefinition
RE: calls each method twice , logging everthing twice?
thanks but it solved just logging part of problem ,, struts logs correctly like this [INFO] RequestProcessor - -Processing a 'POST' for path '/Login' processActionForward(/pages/bireysel/common/welcome.jsp, false) but it gives same error still but ,, I want to say one more thing , it finds correctly actionForward object , inside that object I can see name of the JSP page will be directed, I put a breakpoint to the beginning of JSP page , but it never enters to that jsp ,, gives null pointer exception ,, it throws error while directing to the JSP page, why? -Original Message- From: Raju, Saravanan [mailto:[EMAIL PROTECTED] Sent: Thursday, September 18, 2003 12:46 PM To: Struts Users Mailing List Subject: RE: calls each method twice , logging everthing twice? onSubmit=return false; in form tag should solve the problem. Thanks, -- Saravanan Raju Sr.Analyst -Original Message- From: Andrew Hill [SMTP:[EMAIL PROTECTED] Sent: Thursday, September 18, 2003 2:57 PM To: Struts Users Mailing List Subject: RE: calls each method twice , logging everthing twice? I had a similar bug in IE6 where I had a submit button that invoked a js method that did some stuff and then called form.submit(). In IE5 Id only have one submission, but in 6 it would do the submission from my call to submit() AND do the submit buttons submit as well. -Original Message- From: Raju, Saravanan [mailto:[EMAIL PROTECTED] Sent: Thursday, 18 September 2003 16:09 To: Struts Users Mailing List Subject: RE: calls each method twice , logging everthing twice? please check that you are not submitting the form twice using java script or so. one in onSubmit handler and other progrmatically using form.submit(); Thanks, -- Saravanan Raju Sr.Analyst -Original Message- From: Andrew Hill [SMTP:[EMAIL PROTECTED] Sent: Thursday, September 18, 2003 12:15 PM To: Struts Users Mailing List Subject:RE: calls each method twice , logging everthing twice? It looks as though the browser is sending two requests for the page. Not familiar with tiles so am not sure about the exception your getting though. -Original Message- From: Seyhan BASMACI (Internet Yazilimlari Yetkilisi) [mailto:[EMAIL PROTECTED] Sent: Thursday, 18 September 2003 14:26 To: Struts Users Mailing List Subject: calls each method twice , logging everthing twice? hi, we are using jdeveloper as ide , and struts as framework ,, I dont know when it is started but in debug mode it calls each method twice (calls action class execute method twice ) and struts gives followig message after calling my first action class (loginAction) ,, it seccessfull execute and fiinds mapping for the login,, but gives the following message while sending response to the client, is there anybody encountered with this problem ? here is the STRUTS log info, as you can see it does processActionForward twice [INFO] RequestProcessor - -Processing a 'POST' for path '/Login' [INFO] RequestProcessor - -Processing a 'POST' for path '/Login' processActionForward(/pages/bireysel/common/welcome.jsp, false) processActionForward(/pages/bireysel/common/welcome.jsp, false) ERROR on the browser: java.lang.NullPointerException org.apache.struts.tiles.ComponentDefinition org.apache.struts.tiles.xmlDefinition.FactorySet.getDefinition(java.lang.S tr ing, javax.servlet.ServletRequest, javax.servlet.ServletContext) FactorySet.java:156 org.apache.struts.tiles.ComponentDefinition org.apache.struts.tiles.definition.ComponentDefinitionsFactoryWrapper.getD ef inition(java.lang.String, javax.servlet.ServletRequest, javax.servlet.ServletContext) ComponentDefinitionsFactoryWrapper.java:56 boolean org.apache.struts.tiles.TilesRequestProcessor.processTilesDefinition(java. la ng.String, boolean, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) TilesRequestProcessor.java:175 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Confidential: This electronic message and all contents contain information from Syntel, Inc. which may be privileged, confidential or otherwise protected from disclosure. The information is intended to be for the addressee only. If you are not the addressee, any disclosure, copy, distribution or use of the contents of this message is prohibited. If you have received this electronic
RE: Forwarding openNewWindow
Manuel, can't you just use the target attribute in the form tag to do this? robert -Original Message- From: Manuel Lenz [mailto:[EMAIL PROTECTED] Sent: Thursday, September 18, 2003 6:02 AM To: Struts Users Mailing List Subject: Forwarding openNewWindow Hi to all, I´d like to forward to an jsp-page which will be opened in a new window. How can I manage that in struts-config.xml ? I can´t use javascript to open the new window because the user is pressing a struts-submit button and not a normal link. Hope anybody can help me, bye, Manuel Lenz - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: offtopic idea 876 external javadoc
Please ignore. I got it. -Original Message- From: Kalra, Ashwani [mailto:[EMAIL PROTECTED] Sent: Thursday, September 18, 2003 4:00 PM To: Struts (E-mail) Subject: offtopic idea 876 external javadoc hi, Sorry for the offtopic. But can any one using IDEA build 876 tell me how to associate external java docs Regds Ashwani Kalra This message contains information that may be privileged or confidential and is the property of the Cap Gemini Ernst Young Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorised to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message. This message contains information that may be privileged or confidential and is the property of the Cap Gemini Ernst Young Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorised to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
apache-like logs
Hi, Is there a way to make tomcat generating apache-like logs? In order to use a tool like awstats to publish server activities statistics? Thanks, Frederic - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Evil characters causing mischief in textarea and value attribute contents
Hi Andrew, I thought, man, you don't know that? Hahaha - and then I realised I don't know either. I just checked my app to make sure it's not happening to me too, and it's not. I have stuff like snowflake in the database and it gets encoded automatically into value=a html-busting quot;characterquot; via html:text. Presumably html:textarea is the same. If you have bean:write you can add filter=true. Adam On 09/18/2003 12:36 PM Andrew Hill wrote: We have some screens that allow users to edit some stuff stored in the db, and some of this stuff includes such characters as or \ or whatever, and also some of them have xml tags as there contents. When rendering such fields we are hitting some problems. ie: if the value is something like: my cats name is snowflake we end up with: input name=fieldname value=my cats name is snowflake/ ...which of course is not very good. Another one is textareas containing /textarea! Whats the technique for handling this nicely? Obviously I need to escape these somehow. What do I need to consider? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- struts 1.1 + tomcat 4.1.27 + java 1.4.2 Linux 2.4.20 RH9 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Ted Husted: html:optionsCollection Map
Dear Ted, I am trying to get my html:optionsCollection to work with a TreeMap. I don't know if this is possible but on the Struts API page for the class OptionsCollectionTag I read the following: The collection may be an array of objects, a Collection, an Enumeration, an Iterator, or a Map. ( http://jakarta.apache.org/struts/api/org/apache/struts/taglib/html/Opti onsCollectionTag.html) Since TreeMap implements SortedMap which is a subinterface of Map, TreeMap should work fine, right? However, when the page is loaded I get the folloing error text: HTTP ERROR: 500 No getter method available for property label for bean under name 1=LabelValueBean[Label 1, Value 1] Can anyone explain this error message? This seems strange to me. The returntype in my ActionFormBean is TreeMap and the code snippet where I build up the TreeMap is like this: eventGroups = new TreeMap(); eventGroups.put( new String( 1 ), new LabelValueBean( Label 1, Value 1 ) ); eventGroups.put( new String( 2 ), new LabelValueBean( Label 2, Value 2 ) ); eventGroups.put( new String( 3 ), new LabelValueBean( Label 3, Value 3 ) ); ((EventGroupBean)form).setEventGroups( eventGroups ); ( Best regards Lasse - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Send an input
Hi, How do i send an input to one of my get methods in Formbean from my JSP... It is something like i have String of 10 chars and i want only the first five chars. This input will be send by jsp. Based on the input my get method should return a value. I was using something like this and it was working fine with jdk131_03 bean:write name=user property=username[1]/ The same is not working with other versions of JDK. Thanks Naveen - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[OT] RE: Connection Pooling
Can any one explain,What does one mean by Connection Pooling? Is it advisable to prcatice Connection Pooling and if so,in WHAT CIRCUMSTANCES and Is there any aspect which should be kept in mind/taken care of while using Connection Pooing how connection pooling changes the working of an Web Application or J2EE architecture. Wa off topic STFW 4 Connection Pooling http://www.google.com/search?hl=enie=UTF-8oe=UTF-8q=connection+pooling This message and its contents (to include attachments) are the property of Kmart Corporation (Kmart) and may contain confidential and proprietary information. You are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on information contained herein is strictly prohibited. Unauthorized use of information contained herein may subject you to civil and criminal prosecution and penalties. If you are not the intended recipient, you should delete this message immediately. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Struts module and behind WEB-INF both
In my application I am trying to implement the struts module by splitting the struts-config.xml Just the was SwitchAction does I wanted to do the same. What have I done in one of my action class: I call: RequestUtils.selectModule(); Then crate an object of the type ActionForward and return this object. But thios does not work because the path of my jsp was: (/WEB-INF/pages/iny/INY0110S.jsp) but it searches for the path /iny/WEB-INF/pages/iny/INY0110S.jsp which it did not find so an error. Do the modules and hiding of pages (behind WEB-INF)don't work simultaneously? Regards, Puneet Agarwal Tata Consultancy Services, C-56, Phase - II, NOIDA 201305 (India) Phone: +91-120-2461001, 2, 7, 8, 9, 12, 13 (Ext. 1044) FAX : +91-120-246 1521 Struts ... Action ... Struts in Action ... Action in Struts ... DISCLAIMER: The information contained in this message is intended only and solely for the addressed individual or entity indicated in this message and for the exclusive use of the said addressed individual or entity indicated in this message (or responsible for delivery of the message to such person) and may contain legally privileged and confidential information belonging to Tata Consultancy Services. It must not be printed, read, copied, disclosed, forwarded, distributed or used (in whatsoever manner) by any person other than the addressee. Unauthorized use, disclosure or copying is strictly prohibited and may constitute unlawful act and can possibly attract legal action, civil and/or criminal. The contents of this message need not necessarily reflect or endorse the views of Tata Consultancy Services on any subject matter. Any action taken or omitted to be taken based on this message is entirely at your risk and neither the originator of this message nor Tata Consultancy Services takes any responsibility or liability towards the same. Opinions, conclusions and any other information contained in this message that do not relate to the official business of Tata Consultancy Services shall be understood as neither given nor endorsed by Tata Consultancy Services or any affiliate of Tata Consultancy Services. If you have received this message in error, you should destroy this message and may please notify the sender by e-mail. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: I webshpere Struts
I think everything is configured properly. When I ask for a JNDI name starting with java:comp/env/--- I always get that --- wasn't found. Can I ask you for a bit of your web.xml where you define an entity and a session bean and a bit of your ejb.xml with the same? Thanks a lot. Rben -Mensagem original- De: Kazda Juraj [mailto:[EMAIL PROTECTED] Enviada: qui 18-09-2003 12:09 Para: Struts Users Mailing List Cc: Assunto: RE: I webshpere Struts I'm using this architecture and everything works... What kind of JNDI name it can't find? Bean or Datasource? Do you really have declared in web.xml and implemented corresponding interfaces (ie. local reference vs local interface)? In case of local, are you using in your code java:comp/env namespace? -juraj. -Original Message- From: Ruben Carvalho [mailto:[EMAIL PROTECTED] Sent: Thursday, September 18, 2003 12:48 PM To: Struts Users Mailing List Subject: RE: I webshpere Struts I've just started developing a new project using Websphere IDE but the application will run on Weblogic. We're using the TestServer that comes with Websphere and we're having the same problem with the Database access, using entity beans. Eventhough the server has the JNDI names configured properly, I keep getting an exception saying that the JNDI name can't be found. I manage to call the session beans in my web module but no entity beans. Is there anybody using this arquitecture? Thanks Rben Carvalho -Mensagem original- De: Abhijeet Mahalkar [mailto:[EMAIL PROTECTED] Enviada: qui 18-09-2003 11:29 Para: Struts Users Mailing List Cc: Assunto: I webshpere Struts Is there anybody working on struts -- websphere server architecture i have few queries regarding deploying the complete module using JSp-- structs -- sessionbeans --- entitybeans --- Database architecture it's not getting deployed properly... can anyone guide me to get the proper link on this... thanks abhijeet - Original Message - From: Andrew Hill [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Thursday, September 18, 2003 2:56 PM Subject: RE: calls each method twice , logging everthing twice? I had a similar bug in IE6 where I had a submit button that invoked a js method that did some stuff and then called form.submit(). In IE5 Id only have one submission, but in 6 it would do the submission from my call to submit() AND do the submit buttons submit as well. -Original Message- From: Raju, Saravanan [mailto:[EMAIL PROTECTED] Sent: Thursday, 18 September 2003 16:09 To: Struts Users Mailing List Subject: RE: calls each method twice , logging everthing twice? please check that you are not submitting the form twice using java script or so. one in onSubmit handler and other progrmatically using form.submit(); Thanks, -- Saravanan Raju Sr.Analyst SYNTEL (India) Ltd. Chennai Development Centre Tel: +91-44-22301101 (Board) Extn : 202 Fax: +91-44-22300369 e-mail : mailto:[EMAIL PROTECTED] Website: http://www.syntelinc.com -- -Original Message- From: Andrew Hill [SMTP:[EMAIL PROTECTED] Sent: Thursday, September 18, 2003 12:15 PM To: Struts Users Mailing List Subject: RE: calls each method twice , logging everthing twice? It looks as though the browser is sending two requests for the page. Not familiar with tiles so am not sure about the exception your getting though. -Original Message- From: Seyhan BASMACI (Internet Yazilimlari Yetkilisi) [mailto:[EMAIL PROTECTED] Sent:
RE: Evil characters causing mischief in textarea and value attribute contents
Cheers. Im not actually using jsp in this case, but rather modifying the contents of an org.w3c.dom.Document tree and Im using a rather niave homebrew serialiser to render the xhtml to the response stream. (as the one in xerces turned out to be more than a bit inflexible when it came to extending it to handle some PIs I needed to interpret at render time (which do happen to requestdispatcher includes)). I'll guess go and rip apart bean-write and get my serialiser (or my renderers) to do what it does and see how it goes. -Original Message- From: Adam Hardy [mailto:[EMAIL PROTECTED] Sent: Thursday, 18 September 2003 19:38 To: Struts Users Mailing List Subject: Re: Evil characters causing mischief in textarea and value attribute contents Hi Andrew, I thought, man, you don't know that? Hahaha - and then I realised I don't know either. I just checked my app to make sure it's not happening to me too, and it's not. I have stuff like snowflake in the database and it gets encoded automatically into value=a html-busting quot;characterquot; via html:text. Presumably html:textarea is the same. If you have bean:write you can add filter=true. Adam On 09/18/2003 12:36 PM Andrew Hill wrote: We have some screens that allow users to edit some stuff stored in the db, and some of this stuff includes such characters as or \ or whatever, and also some of them have xml tags as there contents. When rendering such fields we are hitting some problems. ie: if the value is something like: my cats name is snowflake we end up with: input name=fieldname value=my cats name is snowflake/ ...which of course is not very good. Another one is textareas containing /textarea! Whats the technique for handling this nicely? Obviously I need to escape these somehow. What do I need to consider? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- struts 1.1 + tomcat 4.1.27 + java 1.4.2 Linux 2.4.20 RH9 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: I webshpere Struts
Thanks for reply This is my ejb-jar.xml. where i have class SettingsPK which contains 3 field which i want to use as my primary key. do I need to specify following tag for all 3 Fields? prim-key-classindus.security.setting.SettingsPK/prim-key-class And one more quetion what is the purpose of this tag? why do we specify abstract schema to it ? abstract-schema-namecol_mst_settings2/abstract-schema-name Please guide me... thanks Abhijeet XML is as below... ?xml version=1.0 encoding=UTF-8? !DOCTYPE ejb-jar PUBLIC -//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN http://java.sun.com/dtd/ejb-jar_2_0.dtd; ejb-jar id=ejb-jar_ID descriptionSettings Entity Bean/description display-nameSettings Entity Bean/display-name enterprise-beans entity id=ContainerManagedEntity_1 descriptionSettings Entity Bean CMP 2.0/description display-nameSettings Entity Bean CMP 2.0/display-name ejb-namecol_mst_settings/ejb-name homeindus.security.setting.SettingEntityHome/home remoteindus.security.setting.SettingEntityRemote/remote ejb-classindus.security.setting.SettingEntityBean/ejb-class persistence-typeContainer/persistence-type prim-key-classindus.security.setting.SettingsPK/prim-key-class reentrantFalse/reentrant cmp-version2.x/cmp-version abstract-schema-namecol_mst_settings2/abstract-schema-name cmp-field id=CMPAttribute_1 field-nameorgcode/field-name /cmp-field cmp-field id=CMPAttribute_2 field-nameconditiontype/field-name /cmp-field cmp-field id=CMPAttribute_3 field-namecondition/field-name /cmp-field cmp-field id=CMPAttribute_4 field-namedesc/field-name /cmp-field cmp-field id=CMPAttribute_5 field-namevaluetype/field-name /cmp-field cmp-field id=CMPAttribute_6 field-namevalue/field-name /cmp-field cmp-field id=CMPAttribute_7 field-namefromvalue/field-name /cmp-field cmp-field id=CMPAttribute_8 field-nametovalue/field-name /cmp-field cmp-field id=CMPAttribute_9 field-namefield1/field-name /cmp-field cmp-field id=CMPAttribute_10 field-namefield2/field-name /cmp-field cmp-field id=CMPAttribute_11 field-namefeild3/field-name /cmp-field cmp-field id=CMPAttribute_12 field-nameallowupdate/field-name /cmp-field cmp-field id=CMPAttribute_13 field-nameuserid/field-name /cmp-field cmp-field id=CMPAttribute_14 field-nameupdtimestamp/field-name /cmp-field /entity /enterprise-beans assembly-descriptor id=AssemblyDescriptor_1 method-permission id=MethodPermission_1 descriptionGenerated unchecked method permission/description unchecked/unchecked method id=MethodElement_1 descriptionGenerated method element for all methods/description ejb-namecol_mst_settings/ejb-name method-name*/method-name /method /method-permission /assembly-descriptor /ejb-jar - Original Message - From: Ruben Carvalho [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Thursday, September 18, 2003 5:17 PM Subject: RE: I webshpere Struts I think everything is configured properly. When I ask for a JNDI name starting with java:comp/env/--- I always get that --- wasn't found. Can I ask you for a bit of your web.xml where you define an entity and a session bean and a bit of your ejb.xml with the same? Thanks a lot. Rben -Mensagem original- De: Kazda Juraj [mailto:[EMAIL PROTECTED] Enviada: qui 18-09-2003 12:09 Para: Struts Users Mailing List Cc: Assunto: RE: I webshpere Struts I'm using this architecture and everything works... What kind of JNDI name it can't find? Bean or Datasource? Do you really have declared in web.xml and implemented corresponding interfaces (ie. local reference vs local interface)? In case of local, are you using in your code java:comp/env namespace? -juraj. -Original Message- From: Ruben Carvalho [mailto:[EMAIL PROTECTED] Sent: Thursday, September 18, 2003 12:48 PM To: Struts Users Mailing List Subject: RE: I webshpere Struts I've just started developing a new project using Websphere IDE but the application will run on Weblogic. We're using the TestServer that comes with Websphere and we're having the same problem with the Database access, using entity beans. Eventhough the server has the JNDI names configured properly, I keep getting an exception saying that the JNDI name can't be found. I manage to call the session beans in my web module but no entity beans. Is there anybody using this arquitecture? Thanks Rben Carvalho -Mensagem original- De: Abhijeet Mahalkar [mailto:[EMAIL PROTECTED] Enviada: qui 18-09-2003 11:29 Para: Struts Users Mailing List Cc: Assunto: I webshpere Struts Is there anybody working on
RE: Forwarding openNewWindow
There exists no target-attribute for struts submit-button. Does anybody know a solution? Manuel |-+ | || | || | || | |Robert Taylor | | |[EMAIL PROTECTED] | | |18.09.2003 13:19| | |Bitte antworten an Struts | | |Users Mailing List | | || |-+ | | | | An: Struts Users Mailing List [EMAIL PROTECTED] | | Kopie: | | Thema: RE: Forwarding openNewWindow | | Manuel, can't you just use the target attribute in the form tag to do this? robert -Original Message- From: Manuel Lenz [mailto:[EMAIL PROTECTED] Sent: Thursday, September 18, 2003 6:02 AM To: Struts Users Mailing List Subject: Forwarding openNewWindow Hi to all, I´d like to forward to an jsp-page which will be opened in a new window. How can I manage that in struts-config.xml ? I can´t use javascript to open the new window because the user is pressing a struts-submit button and not a normal link. Hope anybody can help me, bye, Manuel Lenz - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Reuse of JSP's and relative links
Just so I'm clear, the problem is you have 2 different actions that link to the same jsp and your intent is to have the jsp map to itself under BOTH paths? That's an interesting question, you could probably use the href attribute instead of the action attribute... Href=show.do instead of action=show.do -Original Message- From: Anders [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 17, 2003 10:08 AM To: [EMAIL PROTECTED] Subject: Reuse of JSP's and relative links Hi, How can i get html:link to use relative links? I'm trying to reuse actions and JSP several places under different paths. My problem is: The user enters through /secure/articles/Show.do and it displays the page with articles. The links on the page lets you go to the next page and read the full article. I then use the same action class for /secure/news/Show.do, and want to use the same JSP's. It all works fine until the user clicks a link which directs him to /secure/articles/Show.do?page=2 . How can i make html:link use relative paths? I would like to specify html:link action=Show.do?page=2 and that would lead to /secure/news/Show.do because the originating url said so. Thanks, Anders, -- Anders Rene Sveen +47-9244-3820 [EMAIL PROTECTED] -- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This message and its contents (to include attachments) are the property of Kmart Corporation (Kmart) and may contain confidential and proprietary information. You are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on information contained herein is strictly prohibited. Unauthorized use of information contained herein may subject you to civil and criminal prosecution and penalties. If you are not the intended recipient, you should delete this message immediately. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
CHKJ2907E: Type *** cannot be reflected. Check the classpath. IN WEBSPHERE
hi ALL , When I run the simple Session bean with struts i get the following error the same is for Entity bean.. this is the log output of ejbDeploy tool specifed by IBM websphere... and this error is coming for each class Home , remote , Action , Bean and some custom classes.. I have action class in different packege and other in different is that affecting me? Will anybody help me out? Validation of UserGrpMasterJar by Map Validator is complete. All known proble [*Error] /UserGrpMasterJar(Class: indus.coll.ejb.usergroupmaster.ZTSL_UserGroupSessionBean): CHKJ2907E: Type indus.coll.ejb.usergroupmaster.ZTSL_UserGroupSessionBean, or one of its supertypes, cannot be reflected. Check the classpath. - Original Message - From: Abhijeet Mahalkar [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Thursday, September 18, 2003 5:32 PM Subject: Re: I webshpere Struts Thanks for reply This is my ejb-jar.xml. where i have class SettingsPK which contains 3 field which i want to use as my primary key. do I need to specify following tag for all 3 Fields? prim-key-classindus.security.setting.SettingsPK/prim-key-class And one more quetion what is the purpose of this tag? why do we specify abstract schema to it ? abstract-schema-namecol_mst_settings2/abstract-schema-name Please guide me... thanks Abhijeet XML is as below... ?xml version=1.0 encoding=UTF-8? !DOCTYPE ejb-jar PUBLIC -//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN http://java.sun.com/dtd/ejb-jar_2_0.dtd; ejb-jar id=ejb-jar_ID descriptionSettings Entity Bean/description display-nameSettings Entity Bean/display-name enterprise-beans entity id=ContainerManagedEntity_1 descriptionSettings Entity Bean CMP 2.0/description display-nameSettings Entity Bean CMP 2.0/display-name ejb-namecol_mst_settings/ejb-name homeindus.security.setting.SettingEntityHome/home remoteindus.security.setting.SettingEntityRemote/remote ejb-classindus.security.setting.SettingEntityBean/ejb-class persistence-typeContainer/persistence-type prim-key-classindus.security.setting.SettingsPK/prim-key-class reentrantFalse/reentrant cmp-version2.x/cmp-version abstract-schema-namecol_mst_settings2/abstract-schema-name cmp-field id=CMPAttribute_1 field-nameorgcode/field-name /cmp-field cmp-field id=CMPAttribute_2 field-nameconditiontype/field-name /cmp-field cmp-field id=CMPAttribute_3 field-namecondition/field-name /cmp-field cmp-field id=CMPAttribute_4 field-namedesc/field-name /cmp-field cmp-field id=CMPAttribute_5 field-namevaluetype/field-name /cmp-field cmp-field id=CMPAttribute_6 field-namevalue/field-name /cmp-field cmp-field id=CMPAttribute_7 field-namefromvalue/field-name /cmp-field cmp-field id=CMPAttribute_8 field-nametovalue/field-name /cmp-field cmp-field id=CMPAttribute_9 field-namefield1/field-name /cmp-field cmp-field id=CMPAttribute_10 field-namefield2/field-name /cmp-field cmp-field id=CMPAttribute_11 field-namefeild3/field-name /cmp-field cmp-field id=CMPAttribute_12 field-nameallowupdate/field-name /cmp-field cmp-field id=CMPAttribute_13 field-nameuserid/field-name /cmp-field cmp-field id=CMPAttribute_14 field-nameupdtimestamp/field-name /cmp-field /entity /enterprise-beans assembly-descriptor id=AssemblyDescriptor_1 method-permission id=MethodPermission_1 descriptionGenerated unchecked method permission/description unchecked/unchecked method id=MethodElement_1 descriptionGenerated method element for all methods/description ejb-namecol_mst_settings/ejb-name method-name*/method-name /method /method-permission /assembly-descriptor /ejb-jar - Original Message - From: Ruben Carvalho [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Thursday, September 18, 2003 5:17 PM Subject: RE: I webshpere Struts I think everything is configured properly. When I ask for a JNDI name starting with java:comp/env/--- I always get that --- wasn't found. Can I ask you for a bit of your web.xml where you define an entity and a session bean and a bit of your ejb.xml with the same? Thanks a lot. Rben -Mensagem original- De: Kazda Juraj [mailto:[EMAIL PROTECTED] Enviada: qui 18-09-2003 12:09 Para: Struts Users Mailing List Cc: Assunto: RE: I webshpere Struts I'm using this architecture and everything works... What kind of JNDI name it can't find? Bean or Datasource? Do you really have
RE: Forwarding openNewWindow
The target goes on the form tag -Original Message- From: Manuel Lenz [mailto:[EMAIL PROTECTED] Sent: Thursday, 18 September 2003 20:15 To: Struts Users Mailing List Subject: RE: Forwarding openNewWindow There exists no target-attribute for struts submit-button. Does anybody know a solution? Manuel |-+ | || | || | || | |Robert Taylor | | |[EMAIL PROTECTED] | | |18.09.2003 13:19| | |Bitte antworten an Struts | | |Users Mailing List | | || |-+ --- -| | | | An: Struts Users Mailing List [EMAIL PROTECTED] | | Kopie: | | Thema: RE: Forwarding openNewWindow | --- -| Manuel, can't you just use the target attribute in the form tag to do this? robert -Original Message- From: Manuel Lenz [mailto:[EMAIL PROTECTED] Sent: Thursday, September 18, 2003 6:02 AM To: Struts Users Mailing List Subject: Forwarding openNewWindow Hi to all, I´d like to forward to an jsp-page which will be opened in a new window. How can I manage that in struts-config.xml ? I can´t use javascript to open the new window because the user is pressing a struts-submit button and not a normal link. Hope anybody can help me, bye, Manuel Lenz - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Forwarding openNewWindow
Is the Struts submit button in a form? If so the following code will do what you want. If not, then why are you using a submit button? html:form action= target= /html:form robert -Original Message- From: Manuel Lenz [mailto:[EMAIL PROTECTED] Sent: Thursday, September 18, 2003 8:15 AM To: Struts Users Mailing List Subject: RE: Forwarding openNewWindow There exists no target-attribute for struts submit-button. Does anybody know a solution? Manuel |-+ | || | || | || | |Robert Taylor | | |[EMAIL PROTECTED] | | |18.09.2003 13:19| | |Bitte antworten an Struts | | |Users Mailing List | | || |-+ - ---| | | | An: Struts Users Mailing List [EMAIL PROTECTED] | | Kopie: | | Thema: RE: Forwarding openNewWindow | - ---| Manuel, can't you just use the target attribute in the form tag to do this? robert -Original Message- From: Manuel Lenz [mailto:[EMAIL PROTECTED] Sent: Thursday, September 18, 2003 6:02 AM To: Struts Users Mailing List Subject: Forwarding openNewWindow Hi to all, I´d like to forward to an jsp-page which will be opened in a new window. How can I manage that in struts-config.xml ? I can´t use javascript to open the new window because the user is pressing a struts-submit button and not a normal link. Hope anybody can help me, bye, Manuel Lenz - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: CHKJ2907E: Type *** cannot be reflected. Check the classpath. IN WEBSPHERE
hi ALL , I have no entry for any of my bean in the web.xml is that is MUST ? When I run the simple Session bean with struts i get the following error the same is for Entity bean.. this is the log output of ejbDeploy tool specifed by IBM websphere... and this error is coming for each class Home , remote , Action , Bean and some custom classes.. I have action class in different packege and other in different is that affecting me? Will anybody help me out? Validation of UserGrpMasterJar by Map Validator is complete. All known proble [*Error] /UserGrpMasterJar(Class: indus.coll.ejb.usergroupmaster.ZTSL_UserGroupSessionBean): CHKJ2907E: Type indus.coll.ejb.usergroupmaster.ZTSL_UserGroupSessionBean, or one of its supertypes, cannot be reflected. Check the classpath. - Original Message - From: Abhijeet Mahalkar [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Thursday, September 18, 2003 5:32 PM Subject: Re: I webshpere Struts Thanks for reply This is my ejb-jar.xml. where i have class SettingsPK which contains 3 field which i want to use as my primary key. do I need to specify following tag for all 3 Fields? prim-key-classindus.security.setting.SettingsPK/prim-key-class And one more quetion what is the purpose of this tag? why do we specify abstract schema to it ? abstract-schema-namecol_mst_settings2/abstract-schema-name Please guide me... thanks Abhijeet XML is as below... ?xml version=1.0 encoding=UTF-8? !DOCTYPE ejb-jar PUBLIC -//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN http://java.sun.com/dtd/ejb-jar_2_0.dtd; ejb-jar id=ejb-jar_ID descriptionSettings Entity Bean/description display-nameSettings Entity Bean/display-name enterprise-beans entity id=ContainerManagedEntity_1 descriptionSettings Entity Bean CMP 2.0/description display-nameSettings Entity Bean CMP 2.0/display-name ejb-namecol_mst_settings/ejb-name homeindus.security.setting.SettingEntityHome/home remoteindus.security.setting.SettingEntityRemote/remote ejb-classindus.security.setting.SettingEntityBean/ejb-class persistence-typeContainer/persistence-type prim-key-classindus.security.setting.SettingsPK/prim-key-class reentrantFalse/reentrant cmp-version2.x/cmp-version abstract-schema-namecol_mst_settings2/abstract-schema-name cmp-field id=CMPAttribute_1 field-nameorgcode/field-name /cmp-field cmp-field id=CMPAttribute_2 field-nameconditiontype/field-name /cmp-field cmp-field id=CMPAttribute_3 field-namecondition/field-name /cmp-field cmp-field id=CMPAttribute_4 field-namedesc/field-name /cmp-field cmp-field id=CMPAttribute_5 field-namevaluetype/field-name /cmp-field cmp-field id=CMPAttribute_6 field-namevalue/field-name /cmp-field cmp-field id=CMPAttribute_7 field-namefromvalue/field-name /cmp-field cmp-field id=CMPAttribute_8 field-nametovalue/field-name /cmp-field cmp-field id=CMPAttribute_9 field-namefield1/field-name /cmp-field cmp-field id=CMPAttribute_10 field-namefield2/field-name /cmp-field cmp-field id=CMPAttribute_11 field-namefeild3/field-name /cmp-field cmp-field id=CMPAttribute_12 field-nameallowupdate/field-name /cmp-field cmp-field id=CMPAttribute_13 field-nameuserid/field-name /cmp-field cmp-field id=CMPAttribute_14 field-nameupdtimestamp/field-name /cmp-field /entity /enterprise-beans assembly-descriptor id=AssemblyDescriptor_1 method-permission id=MethodPermission_1 descriptionGenerated unchecked method permission/description unchecked/unchecked method id=MethodElement_1 descriptionGenerated method element for all methods/description ejb-namecol_mst_settings/ejb-name method-name*/method-name /method /method-permission /assembly-descriptor /ejb-jar - Original Message - From: Ruben Carvalho [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Thursday, September 18, 2003 5:17 PM Subject: RE: I webshpere Struts I think everything is configured properly. When I ask for a JNDI name starting with java:comp/env/--- I always get that --- wasn't found. Can I ask you for a bit of your web.xml where you define an entity and a session bean and a bit of your ejb.xml with the same? Thanks a lot. Rben -Mensagem original- De: Kazda Juraj [mailto:[EMAIL PROTECTED] Enviada: qui 18-09-2003 12:09 Para: Struts Users Mailing List Cc: Assunto: RE: I webshpere Struts I'm using this architecture and everything works... What kind
Re: [SCAFFOLD] How get session in ProcessActionHelp class
I will check that. Thanks Ted. - Original Message - From: Ted Husted [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wednesday, September 17, 2003 4:09 PM Subject: Re: [SCAFFOLD] How get session in ProcessActionHelp class The ProcessAction is designed to pass the ActionForm object down to the business layer. The simplest thing is to make the object part of the ActionForm. The best place to do something like that is the reset method. It is passed the HttpServletRequest, so you have access to just about everything public in the application. Just put a bookId property on your ActionForm and populate it through reset. For examples, see the reset method of the BaseForm in the same package. HTH, Ted. Lázaro Miguel Fung wrote: Hi. How I can get a session object in a ProcessActionHelp class, I have this session object: bookId How I can use this session inside a ProcessAction. TIA LFung - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Ted Husted, Junit in Action - http://www.manning.com/massol/, Struts in Action - http://husted.com/struts/book.html, JSP Site Design - http://www.amazon.com/exec/obidos/ISBN=1861005512. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Need some help
Ruben, After many trials, I finally got the page attribute to work. This is what I did. I am using a DynaValidatorForm so I created my own Form class and extended DynaValidatorForm. I only have one method in there; the validator method. Here is a copy of my source code public class ReviewRecordForm extends DynaValidatorForm { public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) { String screen = request.getParameter(page); //set page property in form this.setPage(Integer.parseInt(request.getParameter(page))); //Call the Validator Framework ActionErrors errors = super.validate(mapping,request); return errors; } } In my validation.xml file, I added the page=X attribute to the field property line. (Where X is the page number). Here is a sample from my validation.xml file: field property=phaseSelected depends=required,isNotSelectOption page=0 arg0 key=label.revRec.phase/ /field field property=dispositionSelected depends=required,isNotSelectOption page=3 arg0 key=label.revRec.disposition/ /field I wrote the isNotSelectOption validation rule. I hope this helps Natalie Ruben Carvalho wrote: Did anyone work with Struts validation and the page attribute in the field tag? To validate different parts of the form? I'm really stucked in a moment and I can't get out of it. Thank you, Rúben Carvalho - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Multipage JDBC result
What database are you using ? We use the MySQL database and have effectively used the limit clause to work with a limited set of records. we just store the query condition in the forms and work with that in every page. - Navneet [EMAIL PROTECTED] said the following on 18/09/2003 1:56 AM: It seems that it pulled the whole JDBC resultset into the memory at one time(correct me if I am wrong at this point) since my data sets will be very huge, I don't think it is a good idea to pull down all the data to the session for paging. Any better solution /examples? very appreciated!! Julie Andrew Kuzmin [EMAIL PROTECTED] 09/16/03 09:12 AM Please respond to Struts Users Mailing List To: Struts Users Mailing List [EMAIL PROTECTED] cc: Subject:Re: Multipage JDBC result Hi, see this link http://jakarta.apache.org/struts/faqs/newbie.html#pager -- Andrew Kuzmin http://www.java201.com - Original Message - From: Jonathan Hawkins [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Tuesday, September 16, 2003 3:39 PM Subject: Multipage JDBC result Howdy, Any tips as to where I can find code examples of how to break down a large JDBC result into say 25 rows per page? Jon Hawkins - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] = = = = = = = = = == = = = = = == = = = = = = = == = = = = = == = = = = This transmittal and any attachments may contain confidential, privileged or sensitive information and is solely for the use of the intended recipient. If you are not intended recipient, you are hereby notified that you have received this transmittal and any such attachments in error and any review, dissemination, distribution or copying thereof is strictly prohibited. If you have received this transmittal and any attachments in error please notify the sender and immediately destroy the message and all its attachments. Any opinions herein expressed may be those of the author and not necessarily of Mizuho Corporate Bank, Ltd (the Bank). The Bank accepts no responsibility for the accuracy or completeness of any information herein contained. = = = = = = = = = == = = = = = == = = = = = = = == = = = = = == = = = = - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] OutOfMemoryError when I have plenty of heap
Casey, No problem. Good luck, and let us know when you figure out what the problem is. I know how annoying these problems can be -- I was once at a company where this problem sneaked passed QA, and those were some stressful days :-). Kito D. Mann Author, JSF in Action JSF FAQ: http://www.jsfcentral.com At 03:50 PM 9/17/2003 -0400, Casey Forbes wrote: Hi Kito, Thank you. This is worth looking at (plus the link looks interesting). I've got a lot of classes that from JSP compilation. I also have lots and lots of sun.reflect.GeneratedMethodAccessor classes (from Digester and PropertyUtils I guess) and lots of _xsl._ caucho_0anonymous__xsl classes from Resin's XSLT engine. I'm also looking at Daniel's suggestion about hitting the open files limit (which I can easily increase if it turns out to be the cause) Casey On Wed, 17 Sep 2003, Kito D. Mann said: Casey, If you're using JSP, and you have a large number of pages running in a single VM, you may be filling up the permanent generation area of the VM's memory. This is a fixed amount of memory dedicated to classes, methods, and so on (reflective data). Since JSPs are compiled into classes, it's actually possible to fill up this area of memory and consequently get an OutOfMemoryError. You can, of course, increase the size -- see http://java.sun.com/docs/hotspot/gc1.4.2/ for details. How many JSPs does At 08:21 AM 9/17/2003 -0400, you wrote: Hi everyone, There are many smart people on this list and I haven't been able to get anywhere with this problem, so... I'm running 12 Struts-based apps under Resin 2 on a Linux box. (I don't believe that this is a Struts problem - this is just some background for you) Every few days (sometimes this will happen after 2 days, sometimes 5 or 6) I get an OutOfMemory error which stops the JVM... I have plenty of room in the heap (the machine has 1 GB or RAM and I have the max heap size -Xmx set to 896 MB) Just before it dies there are a few attempts to free more memory. From the GC log: Full GC 227765K-132728K(274140K), 3.2615930 secs Full GC 132729K-132728K(274140K), 2.5218730 secs Full GC 132803K-120231K(274140K), 3.1998370 secs OutOfMemoryError As you can see - I'm only using 132 MB after the first GC which leaves plenty Runtime.freeMemory() etc. returns similar results.. Does anybody have any ideas? I don't even know where to look next... It doesn't look like a profiler would help me here since I don't have tons of objects filling up my memory. Thanks, Casey Kito D. Mann Author, JSF in Action JSF FAQ: http://www.jsfcentral.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RESOLVED -- :RE: calls each method twice , logging everthing twice?
hi, finally I solved the problem, error reason - missing definitions for the plug-in tags inside struts-config.xml file , there was a missing definition for the plugin tags, missing parameter set-property property=definitions-config value=/WEB-INF/tiles-defs.xml/ /*** plugin tags plug-in className=org.apache.struts.tiles.TilesPlugin set-property property=definitions-debug value=0/ set-property property=definitions-config value=/WEB-INF/tiles-defs.xml/ /plug-in !-- end comment if struts1.0.x -- plug-in className=org.apache.struts.validator.ValidatorPlugIn set-property property=pathnames value=/WEB-INF/validator-rules.xml,/WEB-INF/validation.xml/ /plug-in /// /** error on the browser / following error on the browser, never calls JSP page,, ERROR on the browser: java.lang.NullPointerException org.apache.struts.tiles.ComponentDefinition org.apache.struts.tiles.xmlDefinition.FactorySet.getDefinition(java.lang.S tr ing, javax.servlet.ServletRequest, javax.servlet.ServletContext) FactorySet.java:156 org.apache.struts.tiles.ComponentDefinition org.apache.struts.tiles.definition.ComponentDefinitionsFactoryWrapper.getD ef inition(java.lang.String, javax.servlet.ServletRequest, javax.servlet.ServletContext) ComponentDefinitionsFactoryWrapper.java:56 boolean org.apache.struts.tiles.TilesRequestProcessor.processTilesDefinition(java.. la ng.String, boolean, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) TilesRequestProcessor.java:175 //// -Original Message- From: Seyhan BASMACI (Internet Yazilimlari Yetkilisi) Sent: Thursday, September 18, 2003 2:17 PM To: Struts Users Mailing List Subject: RE: calls each method twice , logging everthing twice? thanks but it solved just logging part of problem ,, struts logs correctly like this [INFO] RequestProcessor - -Processing a 'POST' for path '/Login' processActionForward(/pages/bireysel/common/welcome.jsp, false) but it gives same error still but ,, I want to say one more thing , it finds correctly actionForward object , inside that object I can see name of the JSP page will be directed, I put a breakpoint to the beginning of JSP page , but it never enters to that jsp ,, gives null pointer exception ,, it throws error while directing to the JSP page, why? -Original Message- From: Raju, Saravanan [mailto:[EMAIL PROTECTED] Sent: Thursday, September 18, 2003 12:46 PM To: Struts Users Mailing List Subject: RE: calls each method twice , logging everthing twice? onSubmit=return false; in form tag should solve the problem. Thanks, -- Saravanan Raju Sr.Analyst -Original Message- From: Andrew Hill [SMTP:[EMAIL PROTECTED] Sent: Thursday, September 18, 2003 2:57 PM To: Struts Users Mailing List Subject: RE: calls each method twice , logging everthing twice? I had a similar bug in IE6 where I had a submit button that invoked a js method that did some stuff and then called form.submit(). In IE5 Id only have one submission, but in 6 it would do the submission from my call to submit() AND do the submit buttons submit as well. -Original Message- From: Raju, Saravanan [mailto:[EMAIL PROTECTED] Sent: Thursday, 18 September 2003 16:09 To: Struts Users Mailing List Subject: RE: calls each method twice , logging everthing twice? please check that you are not submitting the form twice using java script or so. one in onSubmit handler and other progrmatically using form.submit(); Thanks, -- Saravanan Raju Sr.Analyst -Original Message- From: Andrew Hill [SMTP:[EMAIL PROTECTED] Sent: Thursday, September 18, 2003 12:15 PM To: Struts Users Mailing List Subject:RE: calls each method twice , logging everthing twice? It looks as though the browser is sending two requests for the page. Not familiar with tiles so am not sure about the exception your getting though. -Original Message- From: Seyhan BASMACI (Internet Yazilimlari Yetkilisi) [mailto:[EMAIL PROTECTED] Sent: Thursday, 18 September 2003 14:26 To: Struts Users Mailing List Subject: calls each method twice , logging everthing twice? hi, we are using jdeveloper as ide , and struts as framework ,, I dont know when it is started but in debug mode it calls each method twice (calls action class execute method twice ) and struts gives followig message after calling my first action class (loginAction) ,, it seccessfull execute and fiinds mapping for the login,, but gives the following message while sending response to the client, is there anybody encountered
AW: Forwarding openNewWindow
Hallo Manuel, I also have ths same problem. How did you solve it? Sam -Ursprüngliche Nachricht- Von: Manuel Lenz [mailto:[EMAIL PROTECTED] Gesendet: Donnerstag, 18. September 2003 12:02 An: Struts Users Mailing List Betreff: Forwarding openNewWindow Hi to all, I´d like to forward to an jsp-page which will be opened in a new window. How can I manage that in struts-config.xml ? I can´t use javascript to open the new window because the user is pressing a struts-submit button and not a normal link. Hope anybody can help me, bye, Manuel Lenz - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Is it possible to remove *.do or /do/* from the URL
I agree with you - however, it's a marketing thing. The project I'm on has implemented a lot of folder/index.html (with meta-refresh) so that marketing materials have pretty URLs. I was simply hoping to accomplish this without doing anything extra - so http://site.com/do/activities can be put into marketing materials as http://site.com/activities. Maybe we could have marketing use http://site.com/activities/index.html and then use a filter (mapped to *.html) to do a redirect to http://site.com/do/activities. Matt -Original Message- From: Craig R. McClanahan [mailto:[EMAIL PROTECTED] Sent: Thursday, September 18, 2003 1:26 AM To: Struts Users Mailing List Subject: Re: Is it possible to remove *.do or /do/* from the URL The important principle here is Web Application != Web Site. If your users feel compelled to use bookmarks and the back button in your webapps, despite efforts to train them correctly, this is a pretty good sign that you have not provided enough suitable navigation controls in your basic UI. Craig - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Ted Husted: html:optionsCollection Map
From looking at the source, when given a java.util.Map, OptionsCollectionTag iterates through the entrySet, not the keySet or the values collection. Therefore, when the label and value of each bean is dereferenced, the properties must be relative to a Map.Entry bean. It looks as if you wrote your tag assuming that it would iterate through the values collection. Given the signature of Map.Entry, you could dereference a nested property beginning with value -- that is, something like html:optionsCollection name=yourMapName label=value.label value=value.value .../ Joe and where At 13:46 +0200 9/18/03, Lars Bergström wrote: Dear Ted, I am trying to get my html:optionsCollection to work with a TreeMap. I don't know if this is possible but on the Struts API page for the class OptionsCollectionTag I read the following: The collection may be an array of objects, a Collection, an Enumeration, an Iterator, or a Map. ( http://jakarta.apache.org/struts/api/org/apache/struts/taglib/html/Opti onsCollectionTag.html) Since TreeMap implements SortedMap which is a subinterface of Map, TreeMap should work fine, right? However, when the page is loaded I get the folloing error text: HTTP ERROR: 500 No getter method available for property label for bean under name 1=LabelValueBean[Label 1, Value 1] Can anyone explain this error message? This seems strange to me. The returntype in my ActionFormBean is TreeMap and the code snippet where I build up the TreeMap is like this: eventGroups = new TreeMap(); eventGroups.put( new String( 1 ), new LabelValueBean( Label 1, Value 1 ) ); eventGroups.put( new String( 2 ), new LabelValueBean( Label 2, Value 2 ) ); eventGroups.put( new String( 3 ), new LabelValueBean( Label 3, Value 3 ) ); ((EventGroupBean)form).setEventGroups( eventGroups ); ( Best regards Lasse - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- -- Joe Germuska [EMAIL PROTECTED] http://blog.germuska.com If nature worked that way, the universe would crash all the time. --Jaron Lanier - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[repost] Special view information - ActionForm or request?
Sorry for the repost. Has this already been discussed? I couldn't find it in the archives. Original message: Sometimes views need special information to display correctly, like a bean with the values needed to render a dropdown list. Is it considered a Struts best-practice to include this information in the ActionForm or should the Action which prepares this information store the information in the request instead? Thanks, Matt - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Is it possible to remove *.do or /do/* from the URL
How about a hack: *.jsp It looks as jsp on top but it's a do. Or you can even say *.asp, or anything. Just pick a word marketing likes. .V Matt Raible wrote: I agree with you - however, it's a marketing thing. The project I'm on has implemented a lot of folder/index.html (with meta-refresh) so that marketing materials have pretty URLs. I was simply hoping to accomplish this without doing anything extra - so http://site.com/do/activities can be put into marketing materials as http://site.com/activities. Maybe we could have marketing use http://site.com/activities/index.html and then use a filter (mapped to *.html) to do a redirect to http://site.com/do/activities. Matt -Original Message- From: Craig R. McClanahan [mailto:[EMAIL PROTECTED] Sent: Thursday, September 18, 2003 1:26 AM To: Struts Users Mailing List Subject: Re: Is it possible to remove *.do or /do/* from the URL The important principle here is Web Application != Web Site. If your users feel compelled to use bookmarks and the back button in your webapps, despite efforts to train them correctly, this is a pretty good sign that you have not provided enough suitable navigation controls in your basic UI. Craig - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Antwort: AW: Forwarding openNewWindow
Hi, I didn´t solve the problem, yet. Of course you can do target = to the Form-Tag. But in my application the following site is displayed in the same window. Tomorrow I will do some further tests. Manuel |-+ | || | || | || | |[EMAIL PROTECTED]| | |18.09.2003 16:08| | |Bitte antworten an Struts Users| | |Mailing List | | || |-+ | | | | An: [EMAIL PROTECTED] | | Kopie: | | Thema: AW: Forwarding openNewWindow | | Hallo Manuel, I also have ths same problem. How did you solve it? Sam -Ursprüngliche Nachricht- Von: Manuel Lenz [mailto:[EMAIL PROTECTED] Gesendet: Donnerstag, 18. September 2003 12:02 An: Struts Users Mailing List Betreff: Forwarding openNewWindow Hi to all, I´d like to forward to an jsp-page which will be opened in a new window. How can I manage that in struts-config.xml ? I can´t use javascript to open the new window because the user is pressing a struts-submit button and not a normal link. Hope anybody can help me, bye, Manuel Lenz - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
REPOST: IMP :: Defining a single parameter when returning Collect ion of F orm Beans as Request Attribute
Hi, I am returning a collection of Form Beans form where I iterate and get the results of my serach page. This collection I put into the request attribute. However, I have some common attributes like page no which are not bean parameters but are one single value for the whole search page like a parameter called pageNo. Now when I use the html:hidden, it requires the property=pageNo to be a bean parameter !! And gives error when I pass this as request object. As under :: html:hidden property=pageNo value=%=Integer.parseInt((String)request.getAttribute(pageNo))% Anybody can give ideas for this: Another Design Issue : Search Results page, how to return the set of Form Beans ? Whats the best approach. When the validate method fails, it is able to read any attributes which were being picked from the request.getAttribute() call. Thanks for your advice !! Yogesh DISCLAIMER: The information in this message is confidential and may be legally privileged. It is intended solely for the addressee. Access to this message by anyone else is unauthorised. If you are not the intended recipient, any disclosure, copying, or distribution of the message, or any action or omission taken by you in reliance on it, is prohibited and may be unlawful. Please immediately contact the sender if you have received this message in error. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] DISCLAIMER: The information in this message is confidential and may be legally privileged. It is intended solely for the addressee. Access to this message by anyone else is unauthorised. If you are not the intended recipient, any disclosure, copying, or distribution of the message, or any action or omission taken by you in reliance on it, is prohibited and may be unlawful. Please immediately contact the sender if you have received this message in error. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] RE: Connection Pooling
Were the google resources no good? The DBCP front page also gives a good, though concise definition. Basically, if you have an app with more than 1 or 2 users you should definitely use it. Also, see post called Re: Connection Pooling by Kwok Peng Tuck earlier this week. Matt - Original Message - From: Mainguy, Mike [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Sent: Thursday, September 18, 2003 7:45 AM Subject: [OT] RE: Connection Pooling Can any one explain,What does one mean by Connection Pooling? Is it advisable to prcatice Connection Pooling and if so,in WHAT CIRCUMSTANCES and Is there any aspect which should be kept in mind/taken care of while using Connection Pooing how connection pooling changes the working of an Web Application or J2EE architecture. Wa off topic STFW 4 Connection Pooling http://www.google.com/search?hl=enie=UTF-8oe=UTF-8q=connection+pooling This message and its contents (to include attachments) are the property of Kmart Corporation (Kmart) and may contain confidential and proprietary information. You are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on information contained herein is strictly prohibited. Unauthorized use of information contained herein may subject you to civil and criminal prosecution and penalties. If you are not the intended recipient, you should delete this message immediately. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Need some help
Dear Natalie, 10 thank yous for your help. The problem was I wasn't calling the super.validate() method. You don't really need to set the page attribute inside your validate method. Your validate method has to look like this: public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) { return super.validate(mapping,request); } Now, inside every JSP you want to use with the form, you only have to set the property page: html:hidden property=page value=0 html:hidden property=page value=1 html:hidden property=page value=2 depending on witch JSP you are, 1st, 2nd or 3rd. Of course you can do it inside an Action too. As soon as I saw your validate method I slapped my front and said 3 bad words :) Many thanks again for your help. Ruben Carvalho -Mensagem original- De: Natalie D Rassmann [mailto:[EMAIL PROTECTED] Enviada: qui 18-09-2003 14:26 Para: Struts Users Mailing List Cc: Assunto: Re: Need some help Ruben, After many trials, I finally got the page attribute to work. This is what I did. I am using a DynaValidatorForm so I created my own Form class and extended DynaValidatorForm. I only have one method in there; the validator method. Here is a copy of my source code public class ReviewRecordForm extends DynaValidatorForm { public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) { String screen = request.getParameter(page); //set page property in form this.setPage(Integer.parseInt(request.getParameter(page))); //Call the Validator Framework ActionErrors errors = super.validate(mapping,request); return errors; } } In my validation.xml file, I added the page=X attribute to the field property line. (Where X is the page number). Here is a sample from my validation.xml file: field property=phaseSelected depends=required,isNotSelectOption page=0 arg0 key=label.revRec.phase/ /field field property=dispositionSelected depends=required,isNotSelectOption page=3 arg0 key=label.revRec.disposition/ /field I wrote the isNotSelectOption validation rule. I hope this helps Natalie Ruben Carvalho wrote: Did anyone work with Struts validation and the page attribute in the field tag? To validate different parts of the form? I'm really stucked in a moment and I can't get out of it. Thank you, Rben Carvalho - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: apache-like logs
Take a look at jakarta commons logging. - Original Message - From: Frédéric Dreier [EMAIL PROTECTED] To: struts user [EMAIL PROTECTED] Sent: Thursday, September 18, 2003 7:32 AM Subject: apache-like logs Hi, Is there a way to make tomcat generating apache-like logs? In order to use a tool like awstats to publish server activities statistics? Thanks, Frederic - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: org.apache.commons.digester.Digester error
It sounds like you might have installed the JSTL correctly. Did you copy the appropriate JARS into your WEB-INF/lib directory and the TLDs into your WEB-INF directory? I believe this is all that is required for installation. Also make sure that you are referring to the TLDs correctly if you also added them to web.xml (although this step is not necessary). Does that help? Matt - Original Message - From: deepaksawdekar [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Thursday, September 18, 2003 5:22 AM Subject: org.apache.commons.digester.Digester error Hi All, I am using struts and jstl on tomcat. But when I start the tomcat I always get this error. Even though my application works fine. I would like to know what these error and how to get rid of them Sep 18, 2003 2:47:53 PM org.apache.commons.digester.Digester error SEVERE: Parse Error at line 6 column 19: Document root element taglib, must ma tch DOCTYPE root null. org.xml.sax.SAXParseException: Document root element taglib, must match DOCTYP E root null. at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Er rorHandlerWrapper.java:232) at org.apache.xerces.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper. java:173) at org.apache.xerces.impl.XMLErrorReporter.reportError(XMLErrorReporter. java:362) at org.apache.xerces.impl.XMLErrorReporter.reportError(XMLErrorReporter. java:296) at org.apache.xerces.impl.dtd.XMLDTDValidator.rootElementSpecified(XMLDT Thanks and Regards Deepak - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Validation Failed error message
I'm not sure I understand the problem here, can you send the full error message you are receiving? Your getters and setters are correct for the contactId parameter. FYI here are some useful links for more information about correct JavaBeans naming conventions. http://jakarta.apache.org/commons/beanutils/api/org/apache/commons/beanutils/package-summary.html#overview (this is documentation for the beanutils subproject in commons, look at the bullets) http://java.sun.com/products/javabeans/docs/spec.html One thing that does look suspicious is this line of code from your validate method: errors.add(contactid, new ActionError(error.contactid)); I would guess you should be doing errors.add(contactId, new ActionError(error.contactid)); note that contactId is not contactid. Matt - Original Message - From: Mehran Zonouzi [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, September 18, 2003 5:11 AM Subject: Validation Failed error message I get a 'Validation Failed' error message when I run my code... I suspect that my naming convention for the getters and setters methods in my ActionForm class may not be correct... I think it is the contactId param that must be causing the problem. What should the getters and setters for contactId be called? // This is my ActionForm class package com.db.gcp.lemweb.blotter.contacts; import javax.servlet.http.HttpServletRequest; import org.apache.struts.action.*; //-- - // Author: Mehran Zonouzi // Date: 15/09/2003 // Purpose: This bean saves the param values that are to be // used with the EditContactAction class //-- -- public final class EditContactForm extends ActionForm { private String page = null; private String contactId = null; // The usual getter and setter methods for beans public String getContactId(){ return (this.contactId); } public void setContactId(String contactId){ this.contactId = contactId; } public String getPage(){ return (this.page); } public void setPage(String page){ this.page = page; } // This method performs the form validation public ActionErrors validate(ActionMapping mapping, HttpServletRequest request){ ActionErrors errors = new ActionErrors() ; if ( page == null || .equals(page)){ errors.add(page, new ActionError(error.page)); } if ( contactId == null || .equals(contactId)){ errors.add(contactid, new ActionError(error.contactid)); } return errors; } } -- This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: REPOST: IMP :: Defining a single parameter when returning Collection of F orm Beans as Request Attribute
If you are using html:hidden then the hidden parameter you are passing MUST be a property of the form bean. A simple work-around is to just use input type=hidden directly instead of using the Struts HTML taglib. Search results is a long discussion, and I'm not sure what the best practices are. There's no info in the archives? Matt - Original Message - From: Chawla, Yogesh [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Sent: Thursday, September 18, 2003 10:45 AM Subject: REPOST: IMP :: Defining a single parameter when returning Collection of F orm Beans as Request Attribute Hi, I am returning a collection of Form Beans form where I iterate and get the results of my serach page. This collection I put into the request attribute. However, I have some common attributes like page no which are not bean parameters but are one single value for the whole search page like a parameter called pageNo. Now when I use the html:hidden, it requires the property=pageNo to be a bean parameter !! And gives error when I pass this as request object. As under :: html:hidden property=pageNo value=%=Integer.parseInt((String)request.getAttribute(pageNo))% Anybody can give ideas for this: Another Design Issue : Search Results page, how to return the set of Form Beans ? Whats the best approach. When the validate method fails, it is able to read any attributes which were being picked from the request.getAttribute() call. Thanks for your advice !! Yogesh DISCLAIMER: The information in this message is confidential and may be legally privileged. It is intended solely for the addressee. Access to this message by anyone else is unauthorised. If you are not the intended recipient, any disclosure, copying, or distribution of the message, or any action or omission taken by you in reliance on it, is prohibited and may be unlawful. Please immediately contact the sender if you have received this message in error. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] DISCLAIMER: The information in this message is confidential and may be legally privileged. It is intended solely for the addressee. Access to this message by anyone else is unauthorised. If you are not the intended recipient, any disclosure, copying, or distribution of the message, or any action or omission taken by you in reliance on it, is prohibited and may be unlawful. Please immediately contact the sender if you have received this message in error. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Searching info
Hallo everybody, I am about to implement a view of a huge list of names. two requirements: - the user can browse the list by alphabetic index - the user can adjust the number of names displayed on each page I would be thankful for any links, snippets or design patterns to get started. Thanks, Peter _ Get your own *FREE* family web site ParentShack - the easiest way to build a web site for your child http://www.parentshack.com/go?2 . - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Antwort: AW: Forwarding openNewWindow
Can you please state, in more detail and clarity, what you are trying to accomplish? robert -Original Message- From: Manuel Lenz [mailto:[EMAIL PROTECTED] Sent: Thursday, September 18, 2003 10:41 AM To: Struts Users Mailing List Subject: Antwort: AW: Forwarding openNewWindow Hi, I didn´t solve the problem, yet. Of course you can do target = to the Form-Tag. But in my application the following site is displayed in the same window. Tomorrow I will do some further tests. Manuel |-+ | || | || | || | |[EMAIL PROTECTED]| | |18.09.2003 16:08| | |Bitte antworten an Struts Users| | |Mailing List | | || |-+ - ---| | | | An: [EMAIL PROTECTED] | | Kopie: | | Thema: AW: Forwarding openNewWindow | - ---| Hallo Manuel, I also have ths same problem. How did you solve it? Sam -Ursprüngliche Nachricht- Von: Manuel Lenz [mailto:[EMAIL PROTECTED] Gesendet: Donnerstag, 18. September 2003 12:02 An: Struts Users Mailing List Betreff: Forwarding openNewWindow Hi to all, I´d like to forward to an jsp-page which will be opened in a new window. How can I manage that in struts-config.xml ? I can´t use javascript to open the new window because the user is pressing a struts-submit button and not a normal link. Hope anybody can help me, bye, Manuel Lenz - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Searching info
Peter, Take a look at the Value List Handler pattern from the Core J2EE Patterns - Best Practices and Design Strategies book by Alur, Crupi and Malks. -Original Message- From: Peter Eichenauer [mailto:[EMAIL PROTECTED] Sent: Thursday, September 18, 2003 10:50 AM To: [EMAIL PROTECTED] Subject: Searching info Hallo everybody, I am about to implement a view of a huge list of names. two requirements: - the user can browse the list by alphabetic index - the user can adjust the number of names displayed on each page I would be thankful for any links, snippets or design patterns to get started. Thanks, Peter _ Get your own *FREE* family web site ParentShack - the easiest way to build a web site for your child http://www.parentshack.com/go?2 . - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
logic:messagePresent issue
Hi folks, If I have the following arrangement in the same page: logic:messagesPresent message=false do stuff for errors /logic:messagesPresent logic:messagesPresent message=true do stuff for messages /logic:messagesPresent If an action posts a message using the saveMessages(request, messages) and no errors have been posted (ala saveErrors()) the rendered page includes both the error and message section. It appears that the container, (in this case Tomcat 4.1.27) is reusing the tag in such a fashion that if I have messages, both errors and message will be shown even if I do not have errors. Is it possible that the MessagePresentTag is not cleaning up sufficiently to allows distinction between message=true and message=false? To work around this problem I had to make the first one logic:messagesPresent with no message=??? this way I get a different instance of the the tag handler created by the container. Anthony
RE: Tool to diagnose J2EE/Struts/Oracle problem
Amin: Yes we have have multiple users using sqlplus and everything works ok. SO the database is find. Somehow, the I think the problem is either in the JVM provided with Weblogic or the Oracle drivers because even though the oracle connections are ideled, they cannot be reused. Can you tell me what do you mean by 'hibernate' site. Are you referring to the Oracle site? Regards, Stella Auyeung EDS Digital Enablement - Saginaw 6200 State Street, Suite 1 Saginaw, MI 48603 * phone: 989-497-5766 (8-399) * pager: 989-201-1030 * mailto:[EMAIL PROTECTED] -Original Message- From: Mohd Amin Mohd Din [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 17, 2003 11:07 PM To: 'Struts Users Mailing List' Subject: RE: Tool to diagnose J2EE/Struts/Oracle problem Is your oracle database configured properly? Try connecting multiple users using oem or sqlplus to rule out is the issue is from the database. I had a max cursor reached error before which was attributed to not closing the preparedstatement. Another thing you may try is to use the latest JDBC drivers. There are some issues with 9.0.3 and below drivers, found out on hibernate site. Amin -Original Message- From: Au-Yeung, Stella H [mailto:[EMAIL PROTECTED] Sent: Thursday, September 18, 2003 10:52 AM To: Struts Users Mailing List Subject: Tool to diagnose J2EE/Struts/Oracle problem I am havng a No resource Available problem with my J2EE/Struts/Oracle application. It is saying I don't have any more Oracle connections available. Even I am closing the result set, statement and connection, I am still running into the problem. When I use the Oracle DBA monitor tool, it shows that I have 10 'inactive' connection but then my app will give the 'no resource available' error. So it looks like somehow it is not reusing those inactive connections. Does Gabage Collection release those connections? Does anyone have this problem before? So I am looking for a better 'tool' to find out why GC doesn't release those connections or if those 10 'inactive' connections are actually available to be re-used. Can someone give me a suggestion on this tool or how to troubleshoot the problem? Thanks Stella - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tool to diagnose J2EE/Struts/Oracle problem
Matt: You mentioned the following: Garbage collection does not release database connections. IN that case, do you know who releases the connections and make it available for re-use after conn.close() has been done. It sounds like you must have read from somewhere that said GC doesn't release connections. Stella -Original Message- From: Sgarlata Matt [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 17, 2003 10:56 PM To: Struts Users Mailing List Subject: Re: Tool to diagnose J2EE/Struts/Oracle problem You should investigate using connection pooling, such as is offered by the DBCP project, which is a Jakarta Commons subproject. Garbage collection does not release database connections. I'm not sure on all the details why not, but there are other reasons to use connection pooling such as performance. - Original Message - From: Au-Yeung, Stella H [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wednesday, September 17, 2003 10:52 PM Subject: Tool to diagnose J2EE/Struts/Oracle problem I am havng a No resource Available problem with my J2EE/Struts/Oracle application. It is saying I don't have any more Oracle connections available. Even I am closing the result set, statement and connection, I am still running into the problem. When I use the Oracle DBA monitor tool, it shows that I have 10 'inactive' connection but then my app will give the 'no resource available' error. So it looks like somehow it is not reusing those inactive connections. Does Gabage Collection release those connections? Does anyone have this problem before? So I am looking for a better 'tool' to find out why GC doesn't release those connections or if those 10 'inactive' connections are actually available to be re-used. Can someone give me a suggestion on this tool or how to troubleshoot the problem? Thanks Stella - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tool to diagnose J2EE/Struts/Oracle problem
Hi again Stella, Let me start by saying that I am also using Struts and Oracle, so we have a similar setup. We were experiencing the same problems you were experiencing until we set up connection pooling. I highly recommend that you develop your app using the org.apache.commons.dbcp.AbandonedObjectPool because it is the only way to make sure you are dealing with connections correctly. To use connections properly you must close them when you are done and this class makes sure you do, otherwise it starts throwing exceptions. For more information, see http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples-howto.html#Database%20Connection%20Pool%20(DBCP)%20Configurations in the section called Preventing db connection pool leaks. For production we are using the pool that comes with Oracle's application server, release 2. Also, additional comments to your specific questions are below. - Original Message - From: Au-Yeung, Stella H [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Sent: Thursday, September 18, 2003 12:10 PM Subject: RE: Tool to diagnose J2EE/Struts/Oracle problem Matt: You mentioned the following: Garbage collection does not release database connections. IN that case, do you know who releases the connections and make it available for re-use after conn.close() has been done. It sounds like you must have read from somewhere that said GC doesn't release connections. To the best of my knowledge conn.close() should close the connection so that it no longer displays as a used connection in Oracle. However, if your app is like mine probably a dozen or so connections are opened for each Action that is performed, so it's hard to ensure you are closing all connections correctly. This is where the AbandonedObjectPool I discussed earlier comes into play. The GC won't call conn.close() for you, and you probably just forgot to close connections in a few places. Even after practicing for weeks I still forget to close connections weekly and AbandonedObjectPool comes to the rescue :) Stella -Original Message- From: Sgarlata Matt [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 17, 2003 10:56 PM To: Struts Users Mailing List Subject: Re: Tool to diagnose J2EE/Struts/Oracle problem You should investigate using connection pooling, such as is offered by the DBCP project, which is a Jakarta Commons subproject. Garbage collection does not release database connections. I'm not sure on all the details why not, but there are other reasons to use connection pooling such as performance. - Original Message - From: Au-Yeung, Stella H [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wednesday, September 17, 2003 10:52 PM Subject: Tool to diagnose J2EE/Struts/Oracle problem I am havng a No resource Available problem with my J2EE/Struts/Oracle application. It is saying I don't have any more Oracle connections available. Even I am closing the result set, statement and connection, I am still running into the problem. When I use the Oracle DBA monitor tool, it shows that I have 10 'inactive' connection but then my app will give the 'no resource available' error. So it looks like somehow it is not reusing those inactive connections. Does Gabage Collection release those connections? Does anyone have this problem before? So I am looking for a better 'tool' to find out why GC doesn't release those connections or if those 10 'inactive' connections are actually available to be re-used. Can someone give me a suggestion on this tool or how to troubleshoot the problem? Thanks Stella - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: struts-faces
On Thu, 18 Sep 2003, Ted Husted wrote: Date: Thu, 18 Sep 2003 07:05:44 -0400 From: Ted Husted [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: Re: struts-faces Craig R. McClanahan wrote: // Return an Action for processing a logon public Action getLogon() { return new Action() { public String invoke() { return logon(); } } } Very cool technique =:) Anonymous inner classes have some mind-bending capabilities :-). But this has to be the coolest trick yet: // Add an error message FacesContext.getCurrentInstance().addMessage(...); Hey, why bother passing around a context when you can get the thread to do it? Quite fancy =:) It's definitely cute, but there's a tradeoff. The FacesContext implementation has to use a ThreadLocal variable (or something equivalent) in order to keep trace of the current FacesContext instance for each webapp, so there's a (small but real) performance difference between calling getCurrentInstance() and passing the current context on the stack. In general, we have tried to pass the context when it was easily available, but not stressed over using getCurrentInstance() in other cases. One might think about applying this design pattern to something like commons-chain as well (to avoid passing on the Context object). That would work if there was only one chain being processed per thread, which may or may not be practical (it is for JavaServer Faces because there's only one FacesContext instance per request processing thread). http://java.sun.com/webservices/docs/1.2/api/javax/faces/context/FacesContext.html -Ted. Craig - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Is it possible to remove *.do or /do/* from the URL
On Thu, 18 Sep 2003, Vic Cekvenich wrote: Date: Thu, 18 Sep 2003 10:39:51 -0400 From: Vic Cekvenich [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Re: Is it possible to remove *.do or /do/* from the URL How about a hack: *.jsp It looks as jsp on top but it's a do. Or you can even say *.asp, or anything. Just pick a word marketing likes. Using the same extension for both JSP pages and the action invocation will cause grief, but any combination of different values would at least work. .V Craig - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [repost] Special view information - ActionForm or request?
I also would like other's opinion on this. Right now, use a service locator style class to stuff all my lookup stuff into the request object manually. I have, however, used collections in the formbeans for this. I can't, off the top of my head, think of any significant advantages to using a form bean. One disadvantage, however, is you can only have 1 form bean per action, so lookups across multiple actions will need to have duplicate code. -Original Message- From: Sgarlata Matt [mailto:[EMAIL PROTECTED] Sent: Thursday, September 18, 2003 10:15 AM To: Struts Users Mailing List Subject: [repost] Special view information - ActionForm or request? Sorry for the repost. Has this already been discussed? I couldn't find it in the archives. Original message: Sometimes views need special information to display correctly, like a bean with the values needed to render a dropdown list. Is it considered a Struts best-practice to include this information in the ActionForm or should the Action which prepares this information store the information in the request instead? Thanks, Matt - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This message and its contents (to include attachments) are the property of Kmart Corporation (Kmart) and may contain confidential and proprietary information. You are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on information contained herein is strictly prohibited. Unauthorized use of information contained herein may subject you to civil and criminal prosecution and penalties. If you are not the intended recipient, you should delete this message immediately. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Is it possible to remove *.do or /do/* from the URL
Hmmm, that could be entertaining... Change the extension to .asp and sell it to a microsoft shop... -Original Message- From: Craig R. McClanahan [mailto:[EMAIL PROTECTED] Sent: Thursday, September 18, 2003 12:34 PM To: Struts Users Mailing List Subject: Re: Is it possible to remove *.do or /do/* from the URL On Thu, 18 Sep 2003, Vic Cekvenich wrote: Date: Thu, 18 Sep 2003 10:39:51 -0400 From: Vic Cekvenich [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Re: Is it possible to remove *.do or /do/* from the URL How about a hack: *.jsp It looks as jsp on top but it's a do. Or you can even say *.asp, or anything. Just pick a word marketing likes. Using the same extension for both JSP pages and the action invocation will cause grief, but any combination of different values would at least work. .V Craig - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This message and its contents (to include attachments) are the property of Kmart Corporation (Kmart) and may contain confidential and proprietary information. You are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on information contained herein is strictly prohibited. Unauthorized use of information contained herein may subject you to civil and criminal prosecution and penalties. If you are not the intended recipient, you should delete this message immediately. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [repost] Special view information - ActionForm or request?
Good points. Originally I was leaning towards including everything in my form beans. We are using nothing but dynamic form beans in my app, so using this style the form-beans section of your struts-config file essentially becomes documentation for your JSP authors. However, lately I've been thinking it's better to store things in the request and your post gives some good reasons for that. I'm wondering how the best way to document this stuff for a JSP author would be; javadoc doesn't apply here ;) I will have to look into the service locator pattern. That could be of some help. Thanks, Matt - Original Message - From: Mainguy, Mike [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Sent: Thursday, September 18, 2003 12:35 PM Subject: RE: [repost] Special view information - ActionForm or request? I also would like other's opinion on this. Right now, use a service locator style class to stuff all my lookup stuff into the request object manually. I have, however, used collections in the formbeans for this. I can't, off the top of my head, think of any significant advantages to using a form bean. One disadvantage, however, is you can only have 1 form bean per action, so lookups across multiple actions will need to have duplicate code. -Original Message- From: Sgarlata Matt [mailto:[EMAIL PROTECTED] Sent: Thursday, September 18, 2003 10:15 AM To: Struts Users Mailing List Subject: [repost] Special view information - ActionForm or request? Sorry for the repost. Has this already been discussed? I couldn't find it in the archives. Original message: Sometimes views need special information to display correctly, like a bean with the values needed to render a dropdown list. Is it considered a Struts best-practice to include this information in the ActionForm or should the Action which prepares this information store the information in the request instead? Thanks, Matt - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This message and its contents (to include attachments) are the property of Kmart Corporation (Kmart) and may contain confidential and proprietary information. You are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on information contained herein is strictly prohibited. Unauthorized use of information contained herein may subject you to civil and criminal prosecution and penalties. If you are not the intended recipient, you should delete this message immediately. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Send an input
Hi, How do i send an input to one of my get methods in Formbean from my JSP... It is something like i have String of 10 chars and i want only the first five chars. This input will be send by jsp. Based on the input my get method should return a value. I was using something like this and it was working fine with jdk131_03 bean:write name=user property=username[1]/ The same is not working with other versions of JDK. Thanks Naveen - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Is it possible to remove *.do or /do/* from the URL
On Thu, 18 Sep 2003, Mainguy, Mike wrote: Date: Thu, 18 Sep 2003 12:36:39 -0400 From: Mainguy, Mike [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Subject: RE: Is it possible to remove *.do or /do/* from the URL Hmmm, that could be entertaining... Change the extension to .asp and sell it to a microsoft shop... That's why URLs don't really mean anything in terms of the implementing technology. For example, you could just as easily map to *.html as well. :-) Craig - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Evil characters causing mischief in textarea and value attrib ute contents
Not 100% certain, but, I believe the default for the HTML form property tags was to *not* filter (i.e., filter=false) in Struts 1.0 and that was changed to default to do filtering (i.e., filter=true) in Struts 1.1. I am certain that the default for 1.1 is to do filtering. Original post did not say which version of Struts was being used. If my recollection of 1.0 behavior is correct, then that could explain the difference in behavior described here for similar JSP logic. In that case, you simply need to explicitly set filtering on in all your Struts 1.0 html:xxx form property tags. The filter utility function (can't recall from memory the class name/package, but, check the source for the html:xxx tags to find where it is defined in Struts sources) converts the quote character and less-than and greater-than characters to their character entity equivalents. FYI, Van Mike Van Riper mailto:[EMAIL PROTECTED] http://www.baychi.org/bof/struts/ -Original Message- From: Adam Hardy [mailto:[EMAIL PROTECTED] Sent: Thursday, September 18, 2003 4:38 AM To: Struts Users Mailing List Subject: Re: Evil characters causing mischief in textarea and value attribute contents Hi Andrew, I thought, man, you don't know that? Hahaha - and then I realised I don't know either. I just checked my app to make sure it's not happening to me too, and it's not. I have stuff like snowflake in the database and it gets encoded automatically into value=a html-busting quot;characterquot; via html:text. Presumably html:textarea is the same. If you have bean:write you can add filter=true. Adam On 09/18/2003 12:36 PM Andrew Hill wrote: We have some screens that allow users to edit some stuff stored in the db, and some of this stuff includes such characters as or \ or whatever, and also some of them have xml tags as there contents. When rendering such fields we are hitting some problems. ie: if the value is something like: my cats name is snowflake we end up with: input name=fieldname value=my cats name is snowflake/ ...which of course is not very good. Another one is textareas containing /textarea! Whats the technique for handling this nicely? Obviously I need to escape these somehow. What do I need to consider? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- struts 1.1 + tomcat 4.1.27 + java 1.4.2 Linux 2.4.20 RH9 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
design question regarding multiple submit buttons
I'm building a small web application (which I expect to grow into something more) to allow co-workers to do some data entry. I'm more of a database guy, but would like to understand and learn the possibilities of utilizing web services. And, have a question about using multiple submit buttons. I am following the advice from http://husted.com/struts/tips/002.html and have 2 buttons ADD and DONE. The form allows a user to input an address (there are typically several) to the Action which updates the database, calls the reset method on the form, then redirects the user to the same form so they can input another address. When they have no more addresses to enter, they should hit DONE to move on to the next form. However, when DONE is selected, the form calls the validate method, which of course fails because the fields are empty. My question is regarding the design. Is this type of circular design ok, meaning it won't bite me later. If so, how should I implement it? Do I code in fake entries to the DONE button then ignore it in the action (is this possible)? Can I turn off validation for the DONE button? Do I add a new form to the jsp and add the DONE button to it? or, maybe I didn't set up the dispatch action correctly. I expect to use this same type of logic several times in the app, so I want to make sure I go about it the correct way. If someone could point me in the right direction, I would appreciate it. Thank you, David
RE: design question regarding multiple submit buttons
David wrote: When they have no more addresses to enter, they should hit DONE to move on to the next form. However, when DONE is selected, the form calls the validate method, which of course fails because the fields are empty. I think validation is on by default, so you may want to turn it off and call validate() manually when appropriate. (IE, from the 'add' method but not from the 'done' method.) Also take a look at LookupDispatchAction (Tip #3). -- Wendy Smoak Applications Systems Analyst, Sr. Arizona State University, PA, IRM - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [repost] Special view information - ActionForm or request?
I don't have a very strong opinion, but for form *choices*, I've always preferred to put them into some page-accessible context before dispatching to a page. I wrote a class called DigestingPlugIn which was added to Struts after the 1.1 release which is designed to make it easy to put a menu like this into the application context so that it's always available to all your pages, even if they don't go through an action before display. Of course, if the choices are dynamic and specific to the request or the session, this doesn't work, but for things like sharing a menu of states or countries, it works pretty well. If you aren't comfortable using unreleased Struts code, you can get a library version of this class from http://demo.jgsullivan.com/struts/ Another alternative for request/session-specific options would be to extend the OptionsCollection tag to be smarter about how it gets the collection for iteration -- this would allow you to route people directly to the JSP without needing to go through an action class. We've been having a vigorous discussion over the last couple of days about the best way to prefill form *values* in a pre-validation context, and to be honest, I feel like this is a use case which Struts doesn't address very well. It feels clumsy to fool around with creating an ActionForm and populating it on the way to the view; should I just get over that? Or is this something about Struts that deserves a closer look with an eye towards addressing the use case more directly? I've been meaning to search the archives to see what discussions have come up, but since I'm sending this message, I guess I'll just dump it out there and see what people think... Joe At 12:35 -0400 9/18/03, Mainguy, Mike wrote: I also would like other's opinion on this. Right now, use a service locator style class to stuff all my lookup stuff into the request object manually. I have, however, used collections in the formbeans for this. I can't, off the top of my head, think of any significant advantages to using a form bean. One disadvantage, however, is you can only have 1 form bean per action, so lookups across multiple actions will need to have duplicate code. -Original Message- From: Sgarlata Matt [mailto:[EMAIL PROTECTED] Sent: Thursday, September 18, 2003 10:15 AM To: Struts Users Mailing List Subject: [repost] Special view information - ActionForm or request? Sorry for the repost. Has this already been discussed? I couldn't find it in the archives. Original message: Sometimes views need special information to display correctly, like a bean with the values needed to render a dropdown list. Is it considered a Struts best-practice to include this information in the ActionForm or should the Action which prepares this information store the information in the request instead? Thanks, Matt - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This message and its contents (to include attachments) are the property of Kmart Corporation (Kmart) and may contain confidential and proprietary information. You are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on information contained herein is strictly prohibited. Unauthorized use of information contained herein may subject you to civil and criminal prosecution and penalties. If you are not the intended recipient, you should delete this message immediately. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- -- Joe Germuska [EMAIL PROTECTED] http://blog.germuska.com If nature worked that way, the universe would crash all the time. --Jaron Lanier - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Is it possible to remove *.do or /do/* from the URL
I use .Whatever, where that is some marketing term that is acceptable. At 10:39 AM 9/18/2003 -0400, Vic Cekvenich wrote: How about a hack: *.jsp It looks as jsp on top but it's a do. Or you can even say *.asp, or anything. Just pick a word marketing likes. .V Matt Raible wrote: I agree with you - however, it's a marketing thing. The project I'm on has implemented a lot of folder/index.html (with meta-refresh) so that marketing materials have pretty URLs. I was simply hoping to accomplish this without doing anything extra - so http://site.com/do/activities can be put into marketing materials as http://site.com/activities. Maybe we could have marketing use http://site.com/activities/index.html and then use a filter (mapped to *.html) to do a redirect to http://site.com/do/activities. Matt -Original Message- From: Craig R. McClanahan [mailto:[EMAIL PROTECTED] Sent: Thursday, September 18, 2003 1:26 AM To: Struts Users Mailing List Subject: Re: Is it possible to remove *.do or /do/* from the URL The important principle here is Web Application != Web Site. If your users feel compelled to use bookmarks and the back button in your webapps, despite efforts to train them correctly, this is a pretty good sign that you have not provided enough suitable navigation controls in your basic UI. Craig - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] LEGAL NOTICE This electronic mail transmission and any accompanying documents contain information belonging to the sender which may be confidential and legally privileged. This information is intended only for the use of the individual or entity to whom this electronic mail transmission was sent as indicated above. If you are not the intended recipient, any disclosure, copying, distribution, or action taken in reliance on the contents of the information contained in this transmission is strictly prohibited. If you have received this transmission in error, please delete the message. Thank you - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [repost] Special view information - ActionForm or request?
As far as the forms are concerned, I whole-heartedly agree that the current notion of populating the form one the way to getting mapped to the view seems pretty clumsy. I would almost advocate having the forms to be pulled (as above) out of some persistant service thingy (highly technical term). Of course, it would then require that we have some sort of populate or load method that will do something before we process anything. It seems also like a variation of how the dispatchaction works would be kinda cool. Allowing, either based on URL or some other request info, you to determine if you are doing a read or a write before you even get to the action would be the better way to go. Of course, that's just my perspective, but, your notion of the clumsiness of stuffing data into the form in the Action (especially after the request data has already been stuffed in there once) struck a chord with me. Evidently the development in struts is a little more active than I thought, I may have to start pulling down snapshots... -Original Message- From: Joe Germuska [mailto:[EMAIL PROTECTED] Sent: Thursday, September 18, 2003 1:29 PM To: Struts Users Mailing List Subject: RE: [repost] Special view information - ActionForm or request? I don't have a very strong opinion, but for form *choices*, I've always preferred to put them into some page-accessible context before dispatching to a page. I wrote a class called DigestingPlugIn which was added to Struts after the 1.1 release which is designed to make it easy to put a menu like this into the application context so that it's always available to all your pages, even if they don't go through an action before display. Of course, if the choices are dynamic and specific to the request or the session, this doesn't work, but for things like sharing a menu of states or countries, it works pretty well. If you aren't comfortable using unreleased Struts code, you can get a library version of this class from http://demo.jgsullivan.com/struts/ Another alternative for request/session-specific options would be to extend the OptionsCollection tag to be smarter about how it gets the collection for iteration -- this would allow you to route people directly to the JSP without needing to go through an action class. We've been having a vigorous discussion over the last couple of days about the best way to prefill form *values* in a pre-validation context, and to be honest, I feel like this is a use case which Struts doesn't address very well. It feels clumsy to fool around with creating an ActionForm and populating it on the way to the view; should I just get over that? Or is this something about Struts that deserves a closer look with an eye towards addressing the use case more directly? I've been meaning to search the archives to see what discussions have come up, but since I'm sending this message, I guess I'll just dump it out there and see what people think... Joe At 12:35 -0400 9/18/03, Mainguy, Mike wrote: I also would like other's opinion on this. Right now, use a service locator style class to stuff all my lookup stuff into the request object manually. I have, however, used collections in the formbeans for this. I can't, off the top of my head, think of any significant advantages to using a form bean. One disadvantage, however, is you can only have 1 form bean per action, so lookups across multiple actions will need to have duplicate code. -Original Message- From: Sgarlata Matt [mailto:[EMAIL PROTECTED] Sent: Thursday, September 18, 2003 10:15 AM To: Struts Users Mailing List Subject: [repost] Special view information - ActionForm or request? Sorry for the repost. Has this already been discussed? I couldn't find it in the archives. Original message: Sometimes views need special information to display correctly, like a bean with the values needed to render a dropdown list. Is it considered a Struts best-practice to include this information in the ActionForm or should the Action which prepares this information store the information in the request instead? Thanks, Matt - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This message and its contents (to include attachments) are the property of Kmart Corporation (Kmart) and may contain confidential and proprietary information. You are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on information contained herein is strictly prohibited. Unauthorized use of information contained herein may subject you to civil and criminal prosecution and penalties. If you are not the intended recipient, you should delete this message immediately. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands,
Re: Multipage JDBC result
we are using orcale 8i, maybe it is the time to migrate to MySQL??:P thank you! Navneet Karnani [EMAIL PROTECTED] Sent by: news [EMAIL PROTECTED] 09/18/03 09:24 AM Please respond to Struts Users Mailing List To: [EMAIL PROTECTED] cc: Subject:Re: Multipage JDBC result What database are you using ? We use the MySQL database and have effectively used the limit clause to work with a limited set of records. we just store the query condition in the forms and work with that in every page. - Navneet [EMAIL PROTECTED] said the following on 18/09/2003 1:56 AM: It seems that it pulled the whole JDBC resultset into the memory at one time(correct me if I am wrong at this point) since my data sets will be very huge, I don't think it is a good idea to pull down all the data to the session for paging. Any better solution /examples? very appreciated!! Julie Andrew Kuzmin [EMAIL PROTECTED] 09/16/03 09:12 AM Please respond to Struts Users Mailing List To: Struts Users Mailing List [EMAIL PROTECTED] cc: Subject:Re: Multipage JDBC result Hi, see this link http://jakarta.apache.org/struts/faqs/newbie.html#pager -- Andrew Kuzmin http://www.java201.com - Original Message - From: Jonathan Hawkins [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Tuesday, September 16, 2003 3:39 PM Subject: Multipage JDBC result Howdy, Any tips as to where I can find code examples of how to break down a large JDBC result into say 25 rows per page? Jon Hawkins - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] = = = = = = = = = == = = = = = == = = = = = = = == = = = = = == = = = = This transmittal and any attachments may contain confidential, privileged or sensitive information and is solely for the use of the intended recipient. If you are not intended recipient, you are hereby notified that you have received this transmittal and any such attachments in error and any review, dissemination, distribution or copying thereof is strictly prohibited. If you have received this transmittal and any attachments in error please notify the sender and immediately destroy the message and all its attachments. Any opinions herein expressed may be those of the author and not necessarily of Mizuho Corporate Bank, Ltd (the Bank). The Bank accepts no responsibility for the accuracy or completeness of any information herein contained. = = = = = = = = = == = = = = = == = = = = = = = == = = = = = == = = = = - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Return/Setting Forms with Arrays?
I am having a issues and maybe you can help me we are using struts 1.0.2 and I am building a contact system. The user can search for contacts and then I will bring back as many contacts as the search will find in a list but each contact can have 1 - X phones, pages and fax numbers so I dont know how to do this in struts 1.0.2. Also after clicking on the summary line the user can bring up the contact information and once again I have to display all the information and give them a way to change it. Can you please give me some tips or sample?? thanks Please do not transmit orders or instructions regarding a UBS account by email. The information provided in this email or any attachments is not an official transaction confirmation or account statement. For your protection, do not include account numbers, Social Security numbers, credit card numbers, passwords or other non-public information in your email. Because the information contained in this message may be privileged, confidential, proprietary or otherwise protected from disclosure, please notify us immediately by replying to this message and deleting it from your computer if you have received this communication in error. Thank you. UBS Financial Services Inc. UBS International Inc. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Is it possible to remove *.do or /do/* from the URL
hehe, if you want to get them worried use *.exe ;-) -Original Message- From: Micael [mailto:[EMAIL PROTECTED] Sent: Friday, 19 September 2003 01:33 To: Struts Users Mailing List; [EMAIL PROTECTED] Subject: Re: Is it possible to remove *.do or /do/* from the URL I use .Whatever, where that is some marketing term that is acceptable. At 10:39 AM 9/18/2003 -0400, Vic Cekvenich wrote: How about a hack: *.jsp It looks as jsp on top but it's a do. Or you can even say *.asp, or anything. Just pick a word marketing likes. .V Matt Raible wrote: I agree with you - however, it's a marketing thing. The project I'm on has implemented a lot of folder/index.html (with meta-refresh) so that marketing materials have pretty URLs. I was simply hoping to accomplish this without doing anything extra - so http://site.com/do/activities can be put into marketing materials as http://site.com/activities. Maybe we could have marketing use http://site.com/activities/index.html and then use a filter (mapped to *.html) to do a redirect to http://site.com/do/activities. Matt -Original Message- From: Craig R. McClanahan [mailto:[EMAIL PROTECTED] Sent: Thursday, September 18, 2003 1:26 AM To: Struts Users Mailing List Subject: Re: Is it possible to remove *.do or /do/* from the URL The important principle here is Web Application != Web Site. If your users feel compelled to use bookmarks and the back button in your webapps, despite efforts to train them correctly, this is a pretty good sign that you have not provided enough suitable navigation controls in your basic UI. Craig - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] LEGAL NOTICE This electronic mail transmission and any accompanying documents contain information belonging to the sender which may be confidential and legally privileged. This information is intended only for the use of the individual or entity to whom this electronic mail transmission was sent as indicated above. If you are not the intended recipient, any disclosure, copying, distribution, or action taken in reliance on the contents of the information contained in this transmission is strictly prohibited. If you have received this transmission in error, please delete the message. Thank you - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [repost] Special view information - ActionForm or request?
Sorry for jumping in, but I've been lurking on this thread and I use this pattern quite frequently. SetupAction === page === ProcessAction === page I have a dynamic form defined in my struts config file and mapped to both SetupAction and ProcessAction. I don't have to manually create the form because Struts does this for me. Its actually very simple: In SetupAction: ActionForward forward = mapping.findForward(success); DynaBean input = (DynaBean)form; // populate input return forward Upon validation failure, my ProcessAction input attribute is set to the action mapping for SetupAction. I can see how this could be seen as a bit of a hack, but its just using the existing framework to meet my requirements. If the data to display is static I just place it in ServletContext when the application starts up and there is no need to necessarily have a SetupAction. Upon validation, you can simply forward directly to the input page. How is that clumsy? Am I missing something? robert -Original Message- From: Mainguy, Mike [mailto:[EMAIL PROTECTED] Sent: Thursday, September 18, 2003 1:44 PM To: 'Struts Users Mailing List' Subject: RE: [repost] Special view information - ActionForm or request? As far as the forms are concerned, I whole-heartedly agree that the current notion of populating the form one the way to getting mapped to the view seems pretty clumsy. I would almost advocate having the forms to be pulled (as above) out of some persistant service thingy (highly technical term). Of course, it would then require that we have some sort of populate or load method that will do something before we process anything. It seems also like a variation of how the dispatchaction works would be kinda cool. Allowing, either based on URL or some other request info, you to determine if you are doing a read or a write before you even get to the action would be the better way to go. Of course, that's just my perspective, but, your notion of the clumsiness of stuffing data into the form in the Action (especially after the request data has already been stuffed in there once) struck a chord with me. Evidently the development in struts is a little more active than I thought, I may have to start pulling down snapshots... -Original Message- From: Joe Germuska [mailto:[EMAIL PROTECTED] Sent: Thursday, September 18, 2003 1:29 PM To: Struts Users Mailing List Subject: RE: [repost] Special view information - ActionForm or request? I don't have a very strong opinion, but for form *choices*, I've always preferred to put them into some page-accessible context before dispatching to a page. I wrote a class called DigestingPlugIn which was added to Struts after the 1.1 release which is designed to make it easy to put a menu like this into the application context so that it's always available to all your pages, even if they don't go through an action before display. Of course, if the choices are dynamic and specific to the request or the session, this doesn't work, but for things like sharing a menu of states or countries, it works pretty well. If you aren't comfortable using unreleased Struts code, you can get a library version of this class from http://demo.jgsullivan.com/struts/ Another alternative for request/session-specific options would be to extend the OptionsCollection tag to be smarter about how it gets the collection for iteration -- this would allow you to route people directly to the JSP without needing to go through an action class. We've been having a vigorous discussion over the last couple of days about the best way to prefill form *values* in a pre-validation context, and to be honest, I feel like this is a use case which Struts doesn't address very well. It feels clumsy to fool around with creating an ActionForm and populating it on the way to the view; should I just get over that? Or is this something about Struts that deserves a closer look with an eye towards addressing the use case more directly? I've been meaning to search the archives to see what discussions have come up, but since I'm sending this message, I guess I'll just dump it out there and see what people think... Joe At 12:35 -0400 9/18/03, Mainguy, Mike wrote: I also would like other's opinion on this. Right now, use a service locator style class to stuff all my lookup stuff into the request object manually. I have, however, used collections in the formbeans for this. I can't, off the top of my head, think of any significant advantages to using a form bean. One disadvantage, however, is you can only have 1 form bean per action, so lookups across multiple actions will need to have duplicate code. -Original Message- From: Sgarlata Matt [mailto:[EMAIL PROTECTED] Sent: Thursday, September 18, 2003 10:15 AM To: Struts Users Mailing List Subject: [repost] Special view information - ActionForm or request? Sorry for the repost. Has
[OT] Introduction to JDO by Ron Hitchens: 6:30pm on October 1st i n Mountain View
The next meeting of the Silicon Valley Struts User BOF will be held at VeriSign in Mountain View on Wednesday, October 1st. You must arrive between 6:30 and 7:00pm to register with VeriSign security as a guest. Ron Hitchens, a Bay Area computer consultant, will present an introduction to JDO. The Java Data Objects (JDO) API is a standard interface-based Java model abstraction of persistence, developed as Java Specification Request 12 under the auspices of the Java Community Process. Please refer to the online announcement for further details and directions to the meeting site: http://www.baychi.org/bof/struts/20031001a/ It is important that I get an accurate headcount in advance for meeting facility planning purposes. So, please RSVP for the meeting by sending an email to me with Struts User October Meeting as the subject. Thanks, Van Mike Van Riper mailto:[EMAIL PROTECTED] http://www.baychi.org/bof/struts/ P.S. The slides and example source code from last month's presentation (i.e., Introduction to Hibernate by Norman Klein) are available for download here: http://www.baychi.org/bof/struts/20030903/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Multipage JDBC result
Julie, In Oracle, you can also limit the # of records returned and the the starting point using rownum. Your JDBC driver can also limit the # of ResultSets. Check the JavaDoc. Regards, Richard -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Thursday, September 18, 2003 10:48 AM To: Struts Users Mailing List Subject: Re: Multipage JDBC result we are using orcale 8i, maybe it is the time to migrate to MySQL??:P thank you! Navneet Karnani [EMAIL PROTECTED] Sent by: news [EMAIL PROTECTED] 09/18/03 09:24 AM Please respond to Struts Users Mailing List To: [EMAIL PROTECTED] cc: Subject:Re: Multipage JDBC result What database are you using ? We use the MySQL database and have effectively used the limit clause to work with a limited set of records. we just store the query condition in the forms and work with that in every page. - Navneet [EMAIL PROTECTED] said the following on 18/09/2003 1:56 AM: It seems that it pulled the whole JDBC resultset into the memory at one time(correct me if I am wrong at this point) since my data sets will be very huge, I don't think it is a good idea to pull down all the data to the session for paging. Any better solution /examples? very appreciated!! Julie Andrew Kuzmin [EMAIL PROTECTED] 09/16/03 09:12 AM Please respond to Struts Users Mailing List To: Struts Users Mailing List [EMAIL PROTECTED] cc: Subject:Re: Multipage JDBC result Hi, see this link http://jakarta.apache.org/struts/faqs/newbie.html#pager -- Andrew Kuzmin http://www.java201.com - Original Message - From: Jonathan Hawkins [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Tuesday, September 16, 2003 3:39 PM Subject: Multipage JDBC result Howdy, Any tips as to where I can find code examples of how to break down a large JDBC result into say 25 rows per page? Jon Hawkins - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] = = = = = = = = = == = = = = = == = = = = = = = == = = = = = == = = = = This transmittal and any attachments may contain confidential, privileged or sensitive information and is solely for the use of the intended recipient. If you are not intended recipient, you are hereby notified that you have received this transmittal and any such attachments in error and any review, dissemination, distribution or copying thereof is strictly prohibited. If you have received this transmittal and any attachments in error please notify the sender and immediately destroy the message and all its attachments. Any opinions herein expressed may be those of the author and not necessarily of Mizuho Corporate Bank, Ltd (the Bank). The Bank accepts no responsibility for the accuracy or completeness of any information herein contained. = = = = = = = = = == = = = = = == = = = = = = = == = = = = = == = = = = - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [repost] Special view information - ActionForm or request?
- Original Message - From: Mainguy, Mike [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Sent: Thursday, September 18, 2003 1:44 PM Subject: RE: [repost] Special view information - ActionForm or request? As far as the forms are concerned, I whole-heartedly agree that the current notion of populating the form one the way to getting mapped to the view seems pretty clumsy. I would almost advocate having the forms to be pulled (as above) out of some persistant service thingy (highly technical term). Of course, it would then require that we have some sort of populate or load method that will do something before we process anything. It seems also like a variation of how the dispatchaction works would be kinda cool. Allowing, either based on URL or some other request info, you to determine if you are doing a read or a write before you even get to the action would be the better way to go. This discussion is getting me to thinking that in addition to the notion of an ActionForm we need a parallel formalized java bean that is in charge of non-form information that a view needs. Perhaps this object could be called an ActionView. This could be documented with types in the struts-config file and would provide not only a convenient API for JSP developers but would also improve the documentation of how data gets transferred from the Java to JSP layer. I can't decide if the ActionView should be populated before the execution of an Action, after the execution of an Action, or during the execution of an Action. I guess the most flexible would be for it to be populated during the execution of the Action. The ActionView could be saved to the request or session with a saveActionView() method. To configure the behavior of the saveActionView() method the action element in struts-config could be extended with viewBeanName and viewBeanScope attributes which would mirror the name and scope attributes for ActionForms. Another random thought is that ActionView should probably be an interface so an existing JavaBean can be used if desired. If an existing JavaBean does not exist, one could be configured similarly to DynaActionForms in struts config in a view-beans section that had syntax nearly identical to that of form-beans. Of course, that's just my perspective, but, your notion of the clumsiness of stuffing data into the form in the Action (especially after the request data has already been stuffed in there once) struck a chord with me. 100% agree. ActionForm feels like it is doing double-duty if you stuff things like java.util.List into it. ActionForm should really only have boolean and String values since these are the only values that can be automatically pulled from the request parameters. Evidently the development in struts is a little more active than I thought, I may have to start pulling down snapshots... -Original Message- From: Joe Germuska [mailto:[EMAIL PROTECTED] Sent: Thursday, September 18, 2003 1:29 PM To: Struts Users Mailing List Subject: RE: [repost] Special view information - ActionForm or request? I don't have a very strong opinion, but for form *choices*, I've always preferred to put them into some page-accessible context before dispatching to a page. I wrote a class called DigestingPlugIn which was added to Struts after the 1.1 release which is designed to make it easy to put a menu like this into the application context so that it's always available to all your pages, even if they don't go through an action before display. Of course, if the choices are dynamic and specific to the request or the session, this doesn't work, but for things like sharing a menu of states or countries, it works pretty well. If you aren't comfortable using unreleased Struts code, you can get a library version of this class from http://demo.jgsullivan.com/struts/ Another alternative for request/session-specific options would be to extend the OptionsCollection tag to be smarter about how it gets the collection for iteration -- this would allow you to route people directly to the JSP without needing to go through an action class. We've been having a vigorous discussion over the last couple of days about the best way to prefill form *values* in a pre-validation context, and to be honest, I feel like this is a use case which Struts doesn't address very well. It feels clumsy to fool around with creating an ActionForm and populating it on the way to the view; should I just get over that? Or is this something about Struts that deserves a closer look with an eye towards addressing the use case more directly? I've been meaning to search the archives to see what discussions have come up, but since I'm sending this message, I guess I'll just dump it out there and see what people think... Joe At 12:35 -0400 9/18/03, Mainguy, Mike wrote: I also would like other's opinion on this. Right now, use a service locator style class
Re: [repost] Special view information - ActionForm or request?
- Original Message - From: Robert Taylor [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Thursday, September 18, 2003 2:02 PM Subject: RE: [repost] Special view information - ActionForm or request? Sorry for jumping in, but I've been lurking on this thread and I use this pattern quite frequently. SetupAction === page === ProcessAction === page I have a dynamic form defined in my struts config file and mapped to both SetupAction and ProcessAction. I don't have to manually create the form because Struts does this for me. Its actually very simple: In SetupAction: ActionForward forward = mapping.findForward(success); DynaBean input = (DynaBean)form; // populate input return forward Upon validation failure, my ProcessAction input attribute is set to the action mapping for SetupAction. I can see how this could be seen as a bit of a hack, but its just using the existing framework to meet my requirements. I don't understand this approach. If you need special info in the view you first call a SetupAction and then have that action forward to a ProcessAction? I thought this wouldn't work because the form bean is recreated with each pass through the ActionServlet. Maybe it does work if the form bean is in session scope? Also, this sounds like action chaining to me, which is not considered a Struts best practice. If the data to display is static I just place it in ServletContext when the application starts up and there is no need to necessarily have a SetupAction. I think this is a standard approach and that it is considered a Struts best practice. Upon validation, you can simply forward directly to the input page. How is that clumsy? Am I missing something? robert - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Is it possible to remove *.do or /do/* from the URL
The reason I don't like extension mapping is because I think path-mapping (/do/*) is cleaner. Also, I like using path-mapping b/c then we can add parameters and they look like regular URLs. For example - extension mapping: http://site.com/activities.do?activity=fishing or http://site.com/activities.do?fishing path-mapping: http://site.com/do/activities/fishing And then in our activities action, we can do a check (request.getPathInfo()) to see if we should serve up the fishing page vs. the general activities one. Thanks to all for your opinions and practices. Matt -Original Message- From: Micael [mailto:[EMAIL PROTECTED] Sent: Thursday, September 18, 2003 11:33 AM To: Struts Users Mailing List; [EMAIL PROTECTED] Subject: Re: Is it possible to remove *.do or /do/* from the URL I use .Whatever, where that is some marketing term that is acceptable. At 10:39 AM 9/18/2003 -0400, Vic Cekvenich wrote: How about a hack: *.jsp It looks as jsp on top but it's a do. Or you can even say *.asp, or anything. Just pick a word marketing likes. .V Matt Raible wrote: I agree with you - however, it's a marketing thing. The project I'm on has implemented a lot of folder/index.html (with meta-refresh) so that marketing materials have pretty URLs. I was simply hoping to accomplish this without doing anything extra - so http://site.com/do/activities can be put into marketing materials as http://site.com/activities. Maybe we could have marketing use http://site.com/activities/index.html and then use a filter (mapped to *.html) to do a redirect to http://site.com/do/activities. Matt -Original Message- From: Craig R. McClanahan [mailto:[EMAIL PROTECTED] Sent: Thursday, September 18, 2003 1:26 AM To: Struts Users Mailing List Subject: Re: Is it possible to remove *.do or /do/* from the URL The important principle here is Web Application != Web Site. If your users feel compelled to use bookmarks and the back button in your webapps, despite efforts to train them correctly, this is a pretty good sign that you have not provided enough suitable navigation controls in your basic UI. Craig - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] LEGAL NOTICE This electronic mail transmission and any accompanying documents contain information belonging to the sender which may be confidential and legally privileged. This information is intended only for the use of the individual or entity to whom this electronic mail transmission was sent as indicated above. If you are not the intended recipient, any disclosure, copying, distribution, or action taken in reliance on the contents of the information contained in this transmission is strictly prohibited. If you have received this transmission in error, please delete the message. Thank you - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [repost] Special view information - ActionForm or request?
I don't understand this approach. If you need special info in the view you first call a SetupAction and then have that action forward to a ProcessAction? Nope. SetupAction forwards to a page; not an action. Maybe it does work if the form bean is in session scope? It works if your form bean is in request scope too. I rarely put my form beans in session scope. Also, this sounds like action chaining to me, which is not considered a Struts best practice. No again. This is not chaining actions. I think you misunderstood. I go from a SetupAction to a page which renders the view. Then, when a user submits the form for processing it goes to ProcessAction. Both SetupAction and ProcessAction use the same form. When a validation error occurs, then the user is forwarded to SetupAction. The form remains in the request and any special data that needs to be retrieved is populated in the form by SetupAction and forwarded to the page where the original user input along with any validation errors are displayed. robert -Original Message- From: Sgarlata Matt [mailto:[EMAIL PROTECTED] Sent: Thursday, September 18, 2003 2:19 PM To: Struts Users Mailing List Subject: Re: [repost] Special view information - ActionForm or request? - Original Message - From: Robert Taylor [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Thursday, September 18, 2003 2:02 PM Subject: RE: [repost] Special view information - ActionForm or request? Sorry for jumping in, but I've been lurking on this thread and I use this pattern quite frequently. SetupAction === page === ProcessAction === page I have a dynamic form defined in my struts config file and mapped to both SetupAction and ProcessAction. I don't have to manually create the form because Struts does this for me. Its actually very simple: In SetupAction: ActionForward forward = mapping.findForward(success); DynaBean input = (DynaBean)form; // populate input return forward Upon validation failure, my ProcessAction input attribute is set to the action mapping for SetupAction. I can see how this could be seen as a bit of a hack, but its just using the existing framework to meet my requirements. I don't understand this approach. If you need special info in the view you first call a SetupAction and then have that action forward to a ProcessAction? I thought this wouldn't work because the form bean is recreated with each pass through the ActionServlet. Maybe it does work if the form bean is in session scope? Also, this sounds like action chaining to me, which is not considered a Struts best practice. If the data to display is static I just place it in ServletContext when the application starts up and there is no need to necessarily have a SetupAction. I think this is a standard approach and that it is considered a Struts best practice. Upon validation, you can simply forward directly to the input page. How is that clumsy? Am I missing something? robert - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Simple Tiles Controller not working!
Trying to implement example from: http://www.theserverside.com/resources/articles/Tiles101/article.html Getting the following error: ** Exception in:/tiles/penguinview.jsp] null ** Basically trying to put a hashtable in request and tiles context cannot display in jsp: public class LoadUserCategoriesController extends Action implements Controller{ public void perform(ComponentContext tilesContext, HttpServletRequest request, HttpServletResponse response, ServletContext servletContext)throws ServletException, IOException{ Hashtable penguins = new Hashtable(20); penguins.put(name,Name); penguins.put(price,Price); request.setAttribute(penguinOfTheDay, penguins); tilesContext.putAttribute(penguinOfTheDay, penguins); } } In tiles-def.xml definition name=.penguin.view path=/tiles/penguinview.jsp controllerClass =com.childrencare.LoadUserCategoriesController/ In penguinview.jsp: c:out value=${penguinOfTheDay.name}/ In myjsp: tiles:insert definition=.penguin.view flush=true / If I remove the controllerClass in the definiton the page does not return null Exception (no error); Looks like controllerClass is not getting called or I am not passing the correct object? Thanks, Barry
Passing an input from jsp using bean:write tag
Hi, How do i send an input to one of my get methods in Formbean from my JSP... It is something like i have String of 10 chars and i want only the first five chars. This input will be send by jsp. Based on the input my get method should return a value. I was using something like this and it was working fine with jdk131_03 bean:write name=user property=username[1]/ The same is not working with other versions of JDK. Thanks Naveen - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: design question regarding multiple submit buttons
thanks for the advice, Wendy. its up and running :) -Original Message- From: Wendy Smoak [mailto:[EMAIL PROTECTED] Sent: Thursday, September 18, 2003 12:22 PM To: Struts Users Mailing List Subject: RE: design question regarding multiple submit buttons David wrote: When they have no more addresses to enter, they should hit DONE to move on to the next form. However, when DONE is selected, the form calls the validate method, which of course fails because the fields are empty. I think validation is on by default, so you may want to turn it off and call validate() manually when appropriate. (IE, from the 'add' method but not from the 'done' method.) Also take a look at LookupDispatchAction (Tip #3). -- Wendy Smoak Applications Systems Analyst, Sr. Arizona State University, PA, IRM - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tool to diagnose J2EE/Struts/Oracle problem
Matt, However, if your app is like mine probably a dozen or so connections are opened for each Action that is performed, so it's hard to ensure you are closing all connections correctly. Do you really have that many nested result sets? If not, then you could reuse the same connections for some of your queries. Reagards, Richard -Original Message- From: Sgarlata Matt [mailto:[EMAIL PROTECTED] Sent: Thursday, September 18, 2003 9:26 AM To: Struts Users Mailing List Subject: Re: Tool to diagnose J2EE/Struts/Oracle problem Hi again Stella, Let me start by saying that I am also using Struts and Oracle, so we have a similar setup. We were experiencing the same problems you were experiencing until we set up connection pooling. I highly recommend that you develop your app using the org.apache.commons.dbcp.AbandonedObjectPool because it is the only way to make sure you are dealing with connections correctly. To use connections properly you must close them when you are done and this class makes sure you do, otherwise it starts throwing exceptions. For more information, see http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples-how to.html#Database%20Connection%20Pool%20(DBCP)%20Configurations in the section called Preventing db connection pool leaks. For production we are using the pool that comes with Oracle's application server, release 2. Also, additional comments to your specific questions are below. - Original Message - From: Au-Yeung, Stella H [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Sent: Thursday, September 18, 2003 12:10 PM Subject: RE: Tool to diagnose J2EE/Struts/Oracle problem Matt: You mentioned the following: Garbage collection does not release database connections. IN that case, do you know who releases the connections and make it available for re-use after conn.close() has been done. It sounds like you must have read from somewhere that said GC doesn't release connections. To the best of my knowledge conn.close() should close the connection so that it no longer displays as a used connection in Oracle. However, if your app is like mine probably a dozen or so connections are opened for each Action that is performed, so it's hard to ensure you are closing all connections correctly. This is where the AbandonedObjectPool I discussed earlier comes into play. The GC won't call conn.close() for you, and you probably just forgot to close connections in a few places. Even after practicing for weeks I still forget to close connections weekly and AbandonedObjectPool comes to the rescue :) Stella -Original Message- From: Sgarlata Matt [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 17, 2003 10:56 PM To: Struts Users Mailing List Subject: Re: Tool to diagnose J2EE/Struts/Oracle problem You should investigate using connection pooling, such as is offered by the DBCP project, which is a Jakarta Commons subproject. Garbage collection does not release database connections. I'm not sure on all the details why not, but there are other reasons to use connection pooling such as performance. - Original Message - From: Au-Yeung, Stella H [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wednesday, September 17, 2003 10:52 PM Subject: Tool to diagnose J2EE/Struts/Oracle problem I am havng a No resource Available problem with my J2EE/Struts/Oracle application. It is saying I don't have any more Oracle connections available. Even I am closing the result set, statement and connection, I am still running into the problem. When I use the Oracle DBA monitor tool, it shows that I have 10 'inactive' connection but then my app will give the 'no resource available' error. So it looks like somehow it is not reusing those inactive connections. Does Gabage Collection release those connections? Does anyone have this problem before? So I am looking for a better 'tool' to find out why GC doesn't release those connections or if those 10 'inactive' connections are actually available to be re-used. Can someone give me a suggestion on this tool or how to troubleshoot the problem? Thanks Stella - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]