Action BEFORE a page is constructed?
Action BEFORE a page is constructed? As far as I understood the working of struts, you inherit the FORM and the ACTION classes. The forms are constructed BEFORE a page is shown - if values are already available, they will be shown. AFTER the page is submitted, the ACTION is called with the FORM element filled with the appropriate values. But what do I do to make any data available to the next page? I can do so in the preceeding ACTION. But this means, I have to do so in all preceding actions of this page. This would be a copy of code. So I am simply looking for a way to be called, just BEFORE the page is created. The only mehtod I know, is the Construction of the FORM. But there I do not have any link to the SessionContext which is my main anker element. If anyone has an idea what I am talking about, please help. Thanks Peter [EMAIL PROTECTED]
logic equal
Hi, in my struts-config.xml the fallowing forwards: forward name=Edit path=/verwaltung_2.jsp?action=Edit/ forward name=Create path=/verwaltung_2.jsp?action=Create/ And in the verwaltung_2.jsp I want to do this: logic:equal name=verwaltung_2 property=action scope=request value=Create titlebean:message key=verwaltung.mitarbeiter.titel.create//title /logic:equal logic:equal name=verwaltung_2 property=action scope=request value=Edit titlebean:message key=verwaltung.mitarbeiter.titel.edit//title /logic:equal But I get this error: javax.servlet.ServletException: No bean found under attribute key verwaltung_2 Do any one know what I do wrong? Best regards, Stefan Faist -- hmi-Informatik GmbH Zettachring 6 - D-70567 Stuttgart E-Mail: [EMAIL PROTECTED] http://www.hmi-informatik.de
RE: Action BEFORE a page is constructed?
action path=/prepareorder type=sandwich.web.order.PrepareOrderAction forward name=success path=/order.jsp/ /action If you want to do some preparations before you create the form you can make a new actionclass without a form class. action path=/prepareorder type=sandwich.web.order.PrepareOrderAction forward name=success path=/order.jsp/ /action Now when you want to call you new screen you first call this action wich is not linked to a form, when this action succeeds, you can call you jsp page, wich has a form in it. To fill this form you make an instance of this forms form class and fill it using the set methods. After this you put this form into the session scope. Like this request.getSession().setAttribute(orderForm,orderForm); Now you form will be filled in when it is shown on the screen. -Original Message- From: peter [SMTP:[EMAIL PROTECTED]] Sent: dinsdag 10 juli 2001 8:50 To: [EMAIL PROTECTED] Subject: Action BEFORE a page is constructed? Action BEFORE a page is constructed? As far as I understood the working of struts, you inherit the FORM and the ACTION classes. The forms are constructed BEFORE a page is shown - if values are already available, they will be shown. AFTER the page is submitted, the ACTION is called with the FORM element filled with the appropriate values. But what do I do to make any data available to the next page? I can do so in the preceeding ACTION. But this means, I have to do so in all preceding actions of this page. This would be a copy of code. So I am simply looking for a way to be called, just BEFORE the page is created. The only mehtod I know, is the Construction of the FORM. But there I do not have any link to the SessionContext which is my main anker element. If anyone has an idea what I am talking about, please help. Thanks Peter [EMAIL PROTECTED]
Re: Iterate problem
Hi The parts you show look correct to me. It seems that the problem lies in the code of method OverDueOrderView.getOrderNo(), which you have not copied to the mail. Guido suhas [EMAIL PROTECTED] To: [EMAIL PROTECTED] ltech.com cc: Subject: Iterate problem 10.07.2001 11:55 Please respond to struts-user Hi I have a question My Iterate tag goes like this logic:iterate id=view name=updateOrderForm property=views type =example.testorder.OverDueOrderView tr td html:text property='%= view[ + index+ ]+.orderNo %' / /td td html:text property='%= view[+index+ ]+.salesDiv %' / /td td html:text property='%= view[+index+ ]+.productOrdered %' / /td /tr % index++ ;% /logic:iterate Do I need **IndexId** here as an attribute in the iterate Tag ??? 'cos In my form bean when showing the above table there is a call to public OverDueOrderView getView(int index) { System.out.println( in side the getView of UpdateOrder Form + index); return (OverDueOrderView)views.get(index); } Here I'm getting **in side the getView of UpdateOrder Form 0 ** printed with following error message javax.servlet.ServletException: Exception thrown by getter for view[0].orderNo of bean org.apache.struts.taglib.html.BEAN What can be the problem -- IS it 'cos i'm not specifying indexId attribute in the iterate tag or something else ???
RE: specifying multiple forms in an action mapping
Purely using the struts-config.xml/struts tags, it is not possible to have two forms for one mapping. But why do you need this? I suppose you want one HTML form to populate two form beans, is this right? My suggestion then would be to either give up on this idea or to have a third form that encapsulates the two others, while exposing both set of properties. Fr. -Original Message- From: Grassotti, Michael [mailto:[EMAIL PROTECTED]] Sent: 09 July 2001 22:27 To: [EMAIL PROTECTED] Subject: RE: specifying multiple forms in an action mapping Has anyone gotten back to you on this? I'm having the same problem... -Original Message- From: Narasimhan, Shyamala [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 04, 2001 9:21 AM To: [EMAIL PROTECTED] Subject: specifying multiple forms in an action mapping hi i would like to use two different forms in an action class... kindly advise as to how to specify the action mapping thanks shyamala. The information in this email is confidential and is intended solely for the addressee(s). Access to this email by anyone else is unauthorised. If you are not an intended recipient, you must not read, use or disseminate the information contained in the email. Any views expressed in this message are those of the individual sender, except where the sender specifically states them to be the views of Capco. http://www.capco.com ***
UML diagrams of Struts
How can I get UML diagrams of Struts (specialy the class model diagram) ? Thanks. Bruno Morin
Re: Iterate problem
it is goes something like this . private String orderNo ; public String getOrderNo() { return orderNo ; } - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, July 10, 2001 8:28 AM Subject: Re: Iterate problem Hi The parts you show look correct to me. It seems that the problem lies in the code of method OverDueOrderView.getOrderNo(), which you have not copied to the mail. Guido suhas [EMAIL PROTECTED] To: [EMAIL PROTECTED] ltech.com cc: Subject: Iterate problem 10.07.2001 11:55 Please respond to struts-user Hi I have a question My Iterate tag goes like this logic:iterate id=view name=updateOrderForm property=views type =example.testorder.OverDueOrderView tr td html:text property='%= view[ + index+ ]+.orderNo %' / /td td html:text property='%= view[+index+ ]+.salesDiv %' / /td td html:text property='%= view[+index+ ]+.productOrdered %' / /td /tr % index++ ;% /logic:iterate Do I need **IndexId** here as an attribute in the iterate Tag ??? 'cos In my form bean when showing the above table there is a call to public OverDueOrderView getView(int index) { System.out.println( in side the getView of UpdateOrder Form + index); return (OverDueOrderView)views.get(index); } Here I'm getting **in side the getView of UpdateOrder Form 0 ** printed with following error message javax.servlet.ServletException: Exception thrown by getter for view[0].orderNo of bean org.apache.struts.taglib.html.BEAN What can be the problem -- IS it 'cos i'm not specifying indexId attribute in the iterate tag or something else ???
No Input Attribute...
Hello! I already wrote small struts-applications and never had to fill in an input-Attribute in the struts-config.xml file. Now Struts complains, that the input-attribute is missing: 2001-07-10 01:37:31 - Ctx( /test): 500 R( /test+ /ServiceOrderAction.do + null) No input attribute for mapping path /ServiceOrderAction My struts-config.xml looks like this: ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE struts-config PUBLIC -//Apache Software Foundation//DTD Struts Configuration 1.0//EN http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd; struts-config form-beans type=org.apache.struts.action.ActionFormBean form-bean name=serviceOrderForm type=com.xxx.web.ServiceOrderForm/ /form-beans global-forwards type=org.apache.struts.action.ActionForward forward name=ServiceOrders path=/service-orders.jsp/ /global-forwards action-mappings type=org.apache.struts.action.ActionMapping action path=/ServiceOrderAction type=com.xxx.web.ServiceOrderAction name=serviceOrderForm/ /action-mappings /struts-config What did I miss here? Thanks Helmut Rubasch
Report to Recipient(s)
Incident Information:- Originator:Helmut Rubasch [EMAIL PROTECTED] Recipients:[EMAIL PROTECTED] Subject: No Input Attribute... Message from Helmut Rubasch [EMAIL PROTECTED] was quarantined because it contained banned content.
Re: Iterate problem
Sorry, I'am somewhat at a loss... I had a similar problem, where it helped composing the property-term to a variable first, and using double quotes for the property value: ... td % pVal = view[ + index+ ]+.orderNo; % html:text property=%=pVal% / /td ... but I never understood why (can anybody tell me?) Guido suhas [EMAIL PROTECTED] To: [EMAIL PROTECTED] ltech.com cc: Subject: Re: Iterate problem 10.07.2001 15:02 Please respond to struts-user it is goes something like this . private String orderNo ; public String getOrderNo() { return orderNo ; } - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, July 10, 2001 8:28 AM Subject: Re: Iterate problem Hi The parts you show look correct to me. It seems that the problem lies in the code of method OverDueOrderView.getOrderNo(), which you have not copied to the mail. Guido suhas [EMAIL PROTECTED] To: [EMAIL PROTECTED] ltech.com cc: Subject: Iterate problem 10.07.2001 11:55 Please respond to struts-user Hi I have a question My Iterate tag goes like this logic:iterate id=view name=updateOrderForm property=views type =example.testorder.OverDueOrderView tr td html:text property='%= view[ + index+ ]+.orderNo %' / /td td html:text property='%= view[+index+ ]+.salesDiv %' / /td td html:text property='%= view[+index+ ]+.productOrdered %' / /td /tr % index++ ;% /logic:iterate Do I need **IndexId** here as an attribute in the iterate Tag ??? 'cos In my form bean when showing the above table there is a call to public OverDueOrderView getView(int index) { System.out.println( in side the getView of UpdateOrder Form + index); return (OverDueOrderView)views.get(index); } Here I'm getting **in side the getView of UpdateOrder Form 0 ** printed with following error message javax.servlet.ServletException: Exception thrown by getter for view[0].orderNo of bean org.apache.struts.taglib.html.BEAN What can be the problem -- IS it 'cos i'm not specifying indexId attribute in the iterate tag or something else ???
RE: UML diagrams of Struts
Hi Bruno You could try donwloading a copy of TogetherJ and pointing it at a copy of the source. It will automatically generate a class diagram for you. See www.togethersoft.com Jon. -Original Message- From: MORIN BRUNO [mailto:[EMAIL PROTECTED]] Sent: 10 July 2001 09:23 To: '[EMAIL PROTECTED]' Subject: UML diagrams of Struts How can I get UML diagrams of Struts (specialy the class model diagram) ? Thanks. Bruno Morin
Re: No Input Attribute...
In your struts-config.xml, try changing this : action path=/test/ServiceOrderAction type=com.xxx.web.ServiceOrderAction name=serviceOrderForm/ - Original Message - From: Helmut Rubasch [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, July 10, 2001 3:41 PM Subject: No Input Attribute... Hello! I already wrote small struts-applications and never had to fill in an input-Attribute in the struts-config.xml file. Now Struts complains, that the input-attribute is missing: 2001-07-10 01:37:31 - Ctx( /test): 500 R( /test+ /ServiceOrderAction.do + null) No input attribute for mapping path /ServiceOrderAction My struts-config.xml looks like this: ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE struts-config PUBLIC -//Apache Software Foundation//DTD Struts Configuration 1.0//EN http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd; struts-config form-beans type=org.apache.struts.action.ActionFormBean form-bean name=serviceOrderForm type=com.xxx.web.ServiceOrderForm/ /form-beans global-forwards type=org.apache.struts.action.ActionForward forward name=ServiceOrders path=/service-orders.jsp/ /global-forwards action-mappings type=org.apache.struts.action.ActionMapping action path=/ServiceOrderAction type=com.xxx.web.ServiceOrderAction name=serviceOrderForm/ /action-mappings /struts-config What did I miss here? Thanks Helmut Rubasch
Report to Recipient(s)
Incident Information:- Originator:Pham Thanh Quan [EMAIL PROTECTED] Recipients:[EMAIL PROTECTED] Subject: Re: No Input Attribute... Message from Pham Thanh Quan [EMAIL PROTECTED] was quarantined because it contained banned content.
Re: No Input Attribute...
Hi again! I think i found it myself... its because of the validate-method in the form... Helmut Rubasch At 01:41 7/10/2001 -0700, you wrote: Hello! I already wrote small struts-applications and never had to fill in an input-Attribute in the struts-config.xml file. Now Struts complains, that the input-attribute is missing: 2001-07-10 01:37:31 - Ctx( /test): 500 R( /test+ /ServiceOrderAction.do + null) No input attribute for mapping path /ServiceOrderAction My struts-config.xml looks like this: ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE struts-config PUBLIC -//Apache Software Foundation//DTD Struts Configuration 1.0//EN http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd; struts-config form-beans type=org.apache.struts.action.ActionFormBean form-bean name=serviceOrderForm type=com.xxx.web.ServiceOrderForm/ /form-beans global-forwards type=org.apache.struts.action.ActionForward forward name=ServiceOrders path=/service-orders.jsp/ /global-forwards action-mappings type=org.apache.struts.action.ActionMapping action path=/ServiceOrderAction type=com.xxx.web.ServiceOrderAction name=serviceOrderForm/ /action-mappings /struts-config What did I miss here? Thanks Helmut Rubasch
Report to Recipient(s)
Incident Information:- Originator:Helmut Rubasch [EMAIL PROTECTED] Recipients:[EMAIL PROTECTED] Subject: Re: No Input Attribute... Message from Helmut Rubasch [EMAIL PROTECTED] was quarantined because it contained banned content.
[Fwd: revised struts visual]
Here we go UML diagrams of Struts (specialy the class model diagram) ? this was forwarded on as Jonathan Asbell visual a few day's ago i found it pretty good. All the Best Chuck. Thanks. Bruno Morin -- The views expressed by the sender of this message don't necessarily represent those of Brecon Beacons National Park Authority. This message is intended for the addressee(s) only and is sent in confidence; if you receive it in error, please can you let us know (at [EMAIL PROTECTED]) and then destroy all copies. Nid yw'r farn a fynegir gan anfonwr y neges hon o anghenraid yn adlewyrchu barn Awdurdod Parc Cenedlaethol Bannau Brycheiniog. Neges yw hon a fwriadwyd ar gyfer y derbynnydd/derbynyddion yn unig ac fe'i hanfonir yn gyfrinachol; os ydych yn ei dderbyn mewn camgymeriad, a fyddech gystal â rhoi gwybod i ni (yn [EMAIL PROTECTED]) ac yna dilëwch bob copi. struts_function.gif
Ant build tools - Need to get to grips with.
ANT is part of the Apache Jakarta project i know, and is fast becoming the defacto build tool for Java projects.Pls can anyone suggest a good src other than within netbeans Ant 1.3 manual as it is difficult to print intact and will take a bit of editing.Thus any other src doc's ie. ant's made simple .or ant's for dummies Cheers Chuck -- The views expressed by the sender of this message don't necessarily represent those of Brecon Beacons National Park Authority. This message is intended for the addressee(s) only and is sent in confidence; if you receive it in error, please can you let us know (at [EMAIL PROTECTED]) and then destroy all copies. Nid yw'r farn a fynegir gan anfonwr y neges hon o anghenraid yn adlewyrchu barn Awdurdod Parc Cenedlaethol Bannau Brycheiniog. Neges yw hon a fwriadwyd ar gyfer y derbynnydd/derbynyddion yn unig ac fe'i hanfonir yn gyfrinachol; os ydych yn ei dderbyn mewn camgymeriad, a fyddech gystal rhoi gwybod i ni (yn [EMAIL PROTECTED]) ac yna dilwch bob copi.
Re: Ant build tools - Need to get to grips with.
If anytime use make for build process then Ant is similar to that except Ant is platform independent building process .Same ant build.xml will work on all platforms as it is purely a XML tag based . If u want to know more about Ant then there was a good article on www.JavaWorld.com few days back . Search there Suhas - Original Message - From: Chuck Amadi To: [EMAIL PROTECTED] Sent: Tuesday, July 10, 2001 10:28 AM Subject: Ant build tools - Need to get to grips with. ANT is part of the Apache Jakarta project i know, and is fast becoming the defacto build tool for Java projects.Pls can anyone suggest a good src other than within netbeans Ant 1.3 manual as it is difficult to print intact and will take a bit of editing.Thus any other src doc's ie. ant's made simple .or ant's for dummies Cheers Chuck -- The views expressed by the sender of this message don't necessarily represent those of Brecon Beacons National Park Authority. This message is intended for the addressee(s) only and is sent in confidence; if you receive it in error, please can you let us know (at [EMAIL PROTECTED]) and then destroy all copies. Nid yw'r farn a fynegir gan anfonwr y neges hon o anghenraid yn adlewyrchu barn Awdurdod Parc Cenedlaethol Bannau Brycheiniog. Neges yw hon a fwriadwyd ar gyfer y derbynnydd/derbynyddion yn unig ac fe'i hanfonir yn gyfrinachol; os ydych yn ei dderbyn mewn camgymeriad, a fyddech gystal â rhoi gwybod i ni (yn [EMAIL PROTECTED]) ac yna dilëwch bob copi.
Iterate problem - Any Solutions !!!!!!
I still struggling with iterate problem still . Any solutions . I do have the proper getter methods in the OverDueOrderView . getting Here I'm getting **in side the getView of UpdateOrder Form 0 ** printed with following error message javax.servlet.ServletException: Exception thrown by getter for view[0].orderNo of bean org.apache.struts.taglib.html.BEAN logic:iterate id=view name=updateOrderForm property=views type=example.testorder.OverDueOrderView tr td html:text property='%= view[ + index+ ]+.orderNo %' / /td td html:text property='%= view[+index+ ]+.salesDiv %' / /td td html:text property='%= view[+index+ ]+.productOrdered %' / /td /tr % index++ ;% /logic:iterate - Original Message - From: suhas [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, July 10, 2001 2:02 PM Subject: Re: Iterate problem it is goes something like this . private String orderNo ; public String getOrderNo() { return orderNo ; } - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, July 10, 2001 8:28 AM Subject: Re: Iterate problem Hi The parts you show look correct to me. It seems that the problem lies in the code of method OverDueOrderView.getOrderNo(), which you have not copied to the mail. Guido suhas [EMAIL PROTECTED] To: [EMAIL PROTECTED] ltech.com cc: Subject: Iterate problem 10.07.2001 11:55 Please respond to struts-user Hi I have a question My Iterate tag goes like this logic:iterate id=view name=updateOrderForm property=views type =example.testorder.OverDueOrderView tr td html:text property='%= view[ + index+ ]+.orderNo %' / /td td html:text property='%= view[+index+ ]+.salesDiv %' / /td td html:text property='%= view[+index+ ]+.productOrdered %' / /td /tr % index++ ;% /logic:iterate Do I need **IndexId** here as an attribute in the iterate Tag ??? 'cos In my form bean when showing the above table there is a call to public OverDueOrderView getView(int index) { System.out.println( in side the getView of UpdateOrder Form + index); return (OverDueOrderView)views.get(index); } Here I'm getting **in side the getView of UpdateOrder Form 0 ** printed with following error message javax.servlet.ServletException: Exception thrown by getter for view[0].orderNo of bean org.apache.struts.taglib.html.BEAN What can be the problem -- IS it 'cos i'm not specifying indexId attribute in the iterate tag or something else ???
RE RE: Action BEFORE a page is constructed?
Hello, I did not get it. Rather than directly forwarding to /order I now forward to /prepareorder. Is this right? However, it looks that I still have an error, because the forwarding from one action to another does not work - and even give any helping error message: After the jsp in action tag 1 is submitting its control to the action defined in action tag one it should call the action in action tag 2. But nothing happens. Can you help me? 1 action path=/SperrenIntro name=SperrenIntroForm type=de.bankverlag.www.kivi.control.action.SperrenIntroAction scope=request input=/SperrenIntro.jsp validate=false forward name=ok path=/SperrenFirstLevelSupportSuchkriterienPre/ /action 2 action path=/SperrenFirstLevelSupportSuchkriterienPre type=de.bankverlag.www.kivi.control.action.SperrenFirstLevelSupportSuchkriterienPreAction forward name=success path=/SperrenFirstLevelSupportSuchkriterien.jsp/ /action 3action path=/SperrenFirstLevelSupportSuchkriterien name=SperrenFirstLevelSupportSuchkriterienForm type=de.bankverlag.www.kivi.control.action.SperrenFirstLevelSupportSuchkriterienAction scope=request input=/SperrenFirstLevelSupportSuchkriterien.jsp validate=true forward name=ok path=/SperrenFirstLevelSupportTrefferliste.jsp/ /action previous message for history action path=/prepareorder type=sandwich.web.order.PrepareOrderAction forward name=success path=/order.jsp/ /action If you want to do some preparations before you create the form you can make a new actionclass without a form class. action path=/prepareorder type=sandwich.web.order.PrepareOrderAction forward name=success path=/order.jsp/ /action Now when you want to call you new screen you first call this action wich is not linked to a form, when this action succeeds, you can call you jsp page, wich has a form in it. To fill this form you make an instance of this forms form class and fill it using the set methods. After this you put this form into the session scope. Like this request.getSession().setAttribute(orderForm,orderForm); Now you form will be filled in when it is shown on the screen. -Original Message- From: peter [SMTP:[EMAIL PROTECTED]] Sent: dinsdag 10 juli 2001 8:50 To: [EMAIL PROTECTED] Subject: Action BEFORE a page is constructed? Action BEFORE a page is constructed? As far as I understood the working of struts, you inherit the FORM and the ACTION classes. The forms are constructed BEFORE a page is shown - if values are already available, they will be shown. AFTER the page is submitted, the ACTION is called with the FORM element filled with the appropriate values. But what do I do to make any data available to the next page? I can do so in the preceeding ACTION. But this means, I have to do so in all preceding actions of this page. This would be a copy of code. So I am simply looking for a way to be called, just BEFORE the page is created. The only mehtod I know, is the Construction of the FORM. But there I do not have any link to the SessionContext which is my main anker element. If anyone has an idea what I am talking about, please help. Thanks Peter [EMAIL PROTECTED] -- GMX - Die Kommunikationsplattform im Internet. http://www.gmx.net GMX Tipp: Machen Sie Ihr Hobby zu Geld bei unserem Partner 11! http://profiseller.de/info/index.php3?ac=OM.PS.PS003K00596T0409a
RE: Iterate problem - Any Solutions !!!!!!
Hi Suhas, I seem to remember a problem with arrays being used in this way. Someone on this list created some new indexed tags you can grab from Teds site. Not certain but have a look at: http://www.husted.com/about/struts/resources.htm#contributions Specifically have a look at the Indexed Tags: http://husted.com/about/struts/indexed-tags.htm Jon. -Original Message- From: suhas [mailto:[EMAIL PROTECTED]] Sent: 10 July 2001 15:20 To: [EMAIL PROTECTED] Subject: Iterate problem - Any Solutions !! I still struggling with iterate problem still . Any solutions . I do have the proper getter methods in the OverDueOrderView . getting Here I'm getting **in side the getView of UpdateOrder Form 0 ** printed with following error message javax.servlet.ServletException: Exception thrown by getter for view[0].orderNo of bean org.apache.struts.taglib.html.BEAN logic:iterate id=view name=updateOrderForm property=views type=example.testorder.OverDueOrderView tr td html:text property='%= view[ + index+ ]+.orderNo %' / /td td html:text property='%= view[+index+ ]+.salesDiv %' / /td td html:text property='%= view[+index+ ]+.productOrdered %' / /td /tr % index++ ;% /logic:iterate - Original Message - From: suhas [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, July 10, 2001 2:02 PM Subject: Re: Iterate problem it is goes something like this . private String orderNo ; public String getOrderNo() { return orderNo ; } - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, July 10, 2001 8:28 AM Subject: Re: Iterate problem Hi The parts you show look correct to me. It seems that the problem lies in the code of method OverDueOrderView.getOrderNo(), which you have not copied to the mail. Guido suhas [EMAIL PROTECTED] To: [EMAIL PROTECTED] ltech.com cc: Subject: Iterate problem 10.07.2001 11:55 Please respond to struts-user Hi I have a question My Iterate tag goes like this logic:iterate id=view name=updateOrderForm property=views type =example.testorder.OverDueOrderView tr td html:text property='%= view[ + index+ ]+.orderNo %' / /td td html:text property='%= view[+index+ ]+.salesDiv %' / /td td html:text property='%= view[+index+ ]+.productOrdered %' / /td /tr % index++ ;% /logic:iterate Do I need **IndexId** here as an attribute in the iterate Tag ??? 'cos In my form bean when showing the above table there is a call to public OverDueOrderView getView(int index) { System.out.println( in side the getView of UpdateOrder Form + index); return (OverDueOrderView)views.get(index); } Here I'm getting **in side the getView of UpdateOrder Form 0 ** printed with following error message javax.servlet.ServletException: Exception thrown by getter for view[0].orderNo of bean org.apache.struts.taglib.html.BEAN What can be the problem -- IS it 'cos i'm not specifying indexId attribute in the iterate tag or something else ???
Re: Struts Documentation (*Ted Craig*)
Jonathan Asbell wrote: I wanted to know what you finally decided on regarding my recent documentation submission. Also, I wanted to know if you saw the pictorals and thought they were accurate. We should probably continue this on the DEV list so the threads don't get tangled ;-) On a side note, I have been struggling with a struts component that seems simple, yet I am stuck and cant understand it. My impasse is in the path matching behavior of the servlet. Has anyone implemented the matching on a path regardless of depth. Like in the digester, where you can match on any a tag by using */a. I am finding that Struts is forcing me to specify full paths to my actions, and that there is no way to get the text matching behavior of the Digester or xsl. Is this the case? I've never tried that myself. In general, Struts encourages developers to be explicit regarding entry points to their applications. What are the design benefits of having the application walk up the tree looking for an action to match? Is it you want the option to override calling /login.do by simply defining /account/login.do later? Something similar could be done with a local forward, where each mapping forwards to login but could have different paths specified. (Though, I have the feeling that the problem is that you don't want to specify the paths ;-). -- Ted Husted, Husted dot Com, Fairport NY USA. -- Custom Software ~ Technical Services. -- Tel 716 737-3463. -- http://www.husted.com/about/struts/
Re: Coding paths always from the same perspective ?
The Struts html:link tag offers three distinct advantages 1) It URL encodes the link to retain the actor's session as needed 2) If global forwards are used for all entry points, then different installations of the application can use different servlet paths (/do/action versus /action.do). 3) Links to global forwards can be managed through the struts-config If you need to maintain the session, then yes, use Struts links everywhere (or URL-encode the others yourself ;-). If you want to change between prefix and suffix matching later (/do/ versus .do), then yes, use Struts links and global forwards everywhere. If not, then it's a matter of whether you would like to manage the target of the links through the struts-config. My suggestion would be to define global forwards for all your entry points, and then use those whereever you would use a standard a href= .. link. (An entry point being the target of any hyperlink.) Templates can be a good alternative to framesets, though you should be able to use the Struts html:link tag with framesets too. -- Ted Husted, Husted dot Com, Fairport NY USA. -- Custom Software ~ Technical Services. -- Tel 716 737-3463. -- http://www.husted.com/about/struts/ denis gautier wrote: I'm often confused about the way I should code the paths in my Struts application. I'm trying to write a Struts example application for reuse in my company. I've got problems about URL resolving (relative, absolute, ...) when using framesets along with jsp and other html files. Is there a way to code paths always from the same perspective (preferently from the application root) ? Should I avoid html and framesets (and use templates instead) ? Are the struts tags (everywhere) THE solution ? (I can't find clear rules for coding about all that...) Thanks in advance for your help. Denis.
Re: button instead of link
If you have an image for the button, put it where the bean:message is. If you have i18n images, use the Struts html:img tag instead. If you do not have an image, then use html:form and a hidden field for action with the value create. -- Ted Husted, Husted dot Com, Fairport NY USA. -- Custom Software ~ Technical Services. -- Tel 716 737-3463. -- http://www.husted.com/about/struts/ Stefan Faist wrote: Hi, how can I use a button instead of the fallowing link? html:link page=/editRegistration.do?action=Createbean:message key=index.registration//html:link The button should do the same as the link. Best regards, Stefan
Re: ActionForward snippet can any work out!
Hi, this is my modified ActionForward class that i believe i made a serious bo bo. package classes.org.apache.struts.action; /*Accessing Relational Databases *Struts can define the datasources for an application from within its standard configuration file. A simple JDBC connection pool is also provided. *See The Action Mappings Configuration File section and the Utilities Developer Guide for details. *After the datasource is defined, here is an example of establishing a connection from within a Action perform method.*/ public class ActionForward { public perform(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response){ try { javax.sql.DataSource dataSource = servlet.findDataSource(null); java.sql.Connection myConnection = dataSource.getConnection(); //do what you wish with myConnection } catch (SQLException sqle) { getServlet().log(Connection.process, sqle); } finally { //enclose this in a finally block to make //sure the connection is closed try { myConnection.close(); } catch (SQLException e) { getServlet().log(Connection.close, e); } } } Errors below WEB-INF/classes/org/apache/struts/action/ActionForward.java [10:1] Missing type on declaration public perform(ActionMapping mapping, ^ WEB-INF/classes/org/apache/struts/action/ActionForward.java [35:1] Type expected or missing '}' ^ 2 errors Errors compiling ActionForward. Jon.Ridgway wrote: Hi Bruno You could try donwloading a copy of TogetherJ and pointing it at a copy of the source. It will automatically generate a class diagram for you. See www.togethersoft.com Jon. -Original Message- From: MORIN BRUNO [mailto:[EMAIL PROTECTED]] Sent: 10 July 2001 09:23 To: '[EMAIL PROTECTED]' Subject: UML diagrams of Struts How can I get UML diagrams of Struts (specialy the class model diagram) ? Thanks. Bruno Morin -- The views expressed by the sender of this message don't necessarily represent those of Brecon Beacons National Park Authority. This message is intended for the addressee(s) only and is sent in confidence; if you receive it in error, please can you let us know (at [EMAIL PROTECTED]) and then destroy all copies. Nid yw'r farn a fynegir gan anfonwr y neges hon o anghenraid yn adlewyrchu barn Awdurdod Parc Cenedlaethol Bannau Brycheiniog. Neges yw hon a fwriadwyd ar gyfer y derbynnydd/derbynyddion yn unig ac fe'i hanfonir yn gyfrinachol; os ydych yn ei dderbyn mewn camgymeriad, a fyddech gystal â rhoi gwybod i ni (yn [EMAIL PROTECTED]) ac yna dilëwch bob copi.
RE: Ant build tools - Need to get to grips with.
I use Ant on a regular basis and I've found the O`Reilly java site at www.onjava.com to have a couple of good articles, covering both introductionary and more advanced topics. IBM's developerWorks site mentiones Ant from time to time. BEA's beta release of WLS6.1 has Ant scripts for building examples etc. so it could pay off to watch their developers site (developer.bea.com) as well, even though I couldn't find anything there now.. Quick links: onjava.com: http://www.onjava.com/pub/a/onjava/2001/06/25/antejb.html http://www.onjava.com/pub/a/onjava/2001/02/22/open_source.html ibm: http://www-106.ibm.com/developerworks/library/j-ant/index.html best regards: .trond strømme, software engineer, mogul technology, norway [EMAIL PROTECTED] -Original Message- From: Chuck Amadi [mailto:[EMAIL PROTECTED]] Sent: 10. juli 2001 11:29 To: [EMAIL PROTECTED] Subject: Ant build tools - Need to get to grips with. ANT is part of the Apache Jakarta project i know, and is fast becoming the defacto build tool for Java projects.Pls can anyone suggest a good src other than within netbeans Ant 1.3 manual as it is difficult to print intact and will take a bit of editing.Thus any other src doc's ie. ant's made simple .or ant's for dummies Cheers Chuck -- The views expressed by the sender of this message don't necessarily represent those of Brecon Beacons National Park Authority. This message is intended for the addressee(s) only and is sent in confidence; if you receive it in error, please can you let us know (at [EMAIL PROTECTED]) and then destroy all copies. Nid yw'r farn a fynegir gan anfonwr y neges hon o anghenraid yn adlewyrchu barn Awdurdod Parc Cenedlaethol Bannau Brycheiniog. Neges yw hon a fwriadwyd ar gyfer y derbynnydd/derbynyddion yn unig ac fe'i hanfonir yn gyfrinachol; os ydych yn ei dderbyn mewn camgymeriad, a fyddech gystal â rhoi gwybod i ni (yn [EMAIL PROTECTED]) ac yna dilëwch bob copi.
Re: SV: Ant build tools - Need address to get grips with.
Pls could you post this ant website address or link. Cheers chuck. Mikkel Bruun wrote: Part 1.1Type: Plain Text (text/plain) Encoding: quoted-printable -- The views expressed by the sender of this message don't necessarily represent those of Brecon Beacons National Park Authority. This message is intended for the addressee(s) only and is sent in confidence; if you receive it in error, please can you let us know (at [EMAIL PROTECTED]) and then destroy all copies. Nid yw'r farn a fynegir gan anfonwr y neges hon o anghenraid yn adlewyrchu barn Awdurdod Parc Cenedlaethol Bannau Brycheiniog. Neges yw hon a fwriadwyd ar gyfer y derbynnydd/derbynyddion yn unig ac fe'i hanfonir yn gyfrinachol; os ydych yn ei dderbyn mewn camgymeriad, a fyddech gystal â rhoi gwybod i ni (yn [EMAIL PROTECTED]) ac yna dilëwch bob copi.
RE: Ant build tools - Need address to get grips with.
http://jakarta.apache.org/ant/ .trond strømme, software engineer, mogul technology, norway [EMAIL PROTECTED] -Original Message- From: Chuck Amadi [mailto:[EMAIL PROTECTED]] Sent: 10. juli 2001 12:03 To: [EMAIL PROTECTED] Subject: Re: Ant build tools - Need address to get grips with. Pls could you post this ant website address or link. Cheers chuck. Mikkel Bruun wrote: Part 1.1Type: Plain Text (text/plain) Encoding: quoted-printable -- The views expressed by the sender of this message don't necessarily represent those of Brecon Beacons National Park Authority. This message is intended for the addressee(s) only and is sent in confidence; if you receive it in error, please can you let us know (at [EMAIL PROTECTED]) and then destroy all copies. Nid yw'r farn a fynegir gan anfonwr y neges hon o anghenraid yn adlewyrchu barn Awdurdod Parc Cenedlaethol Bannau Brycheiniog. Neges yw hon a fwriadwyd ar gyfer y derbynnydd/derbynyddion yn unig ac fe'i hanfonir yn gyfrinachol; os ydych yn ei dderbyn mewn camgymeriad, a fyddech gystal â rhoi gwybod i ni (yn [EMAIL PROTECTED]) ac yna dilëwch bob copi.
Re: html:options not understanding collections from form beans ?
Can you post some of the code you are working with? Given a method getDirectoryName() you should be able to pass the same collection to both the labelName and labelProperty properties. Though, you may need to expose the collection as a bean (in page scope). The tags are not written with the assumption that collections will be a property of the ActionForm, but rather as a bean, usually passed with the request. The underlying idea being that model-based processes (like getAllDirectories()) should be performed in an Action and the passed to the view, rather than generated by the ActionForm (which is part of the presentation tier). -- Ted Husted, Husted dot Com, Fairport NY USA. -- Custom Software ~ Technical Services. -- Tel 716 737-3463. -- http://www.husted.com/about/struts/ Howie wrote: ive got a little problem with html:options. in my form bean i have a method called getAllDirectories() which does some processing and returns a java.util.List of all the available directories. this works fine; struts picks up on the fact that it should look at the form bean for this collection. however, html:options doesnt seem to provide for this sort of setup: labelName and labelProperty both report that there's no getter method available for property directoryName for bean under name null. when combining labelName and labelProperty along with property, there's a servletexception thrown ( cannot find bean under name directoryName ). looking at the source ( OptionsTag.java ), it seems to want everything nice and orderly, with both labelName and labelProperty being Collections used for the value and content of the option tag. is there an easy way to 'bind' ( sorry, im a WebObjects refugee ) two different properties of a bean to the option value and option content ? ideally, html:options would, given a collection, be able to use PropertyUtils ( kinda reminiscent of EOKeyValueCoding in NeXT's EOF, for those that care about these sort of things ) to get the labelName and labelProperty as its iterating through. was this the original intent ? --- Howie [EMAIL PROTECTED] URL: http://www.toodarkpark.org
Re: reset-method
The default reset() method does not do anything, so the fields you do not change yourself would not be changed. The general advice is to use booleans for checkboxes and set them to false in reset(). Reset() is called before the ActionForm is populated from the request, and would not change any values (unless you are trying to pass the form between Actions). -- Ted Husted, Husted dot Com, Fairport NY USA. -- Custom Software ~ Technical Services. -- Tel 716 737-3463. -- http://www.husted.com/about/struts/ Bjørn Erik Andersson wrote: Hello, Does anyone have any code examples or information on how to write the reset() -method in order to reset only checkboxes in a form (and still keep any textbox values etc) ? This to avoid the unselect problems in checkboxes using Struts. Thanks in advance, Bjørn Erik Andersson
RE: struts w/ej
Paul, The problem you are facing is exactly what I tried to solve in the mapper framework I'm developing. I'm still working on it, but plan to have another more mature release within a week. In the meantime you can see an early release on Ted's site http://www.husted.com/about/struts/resources.htm#extensions http://www.husted.com/about/struts/resources.htm#extensions . I've made an earlier posting in the dev list giving some background info, see http://www.mail-archive.com/struts-dev@jakarta.apache.org/msg02058.html http://www.mail-archive.com/struts-dev@jakarta.apache.org/msg02058.html . Feedback welcomed, Fr. -Original Message- From: Paul Beer [mailto:[EMAIL PROTECTED]] Sent: 09 July 2001 22:55 To: [EMAIL PROTECTED] Subject: struts w/ej i have followed some old threads about this but see no resolution to how to map the struts form bean to EJB value objects; they all seem to allude to a mysterious an non-existent struts 1.1. is it recommended to do validation from within the form bean and then create a value object w/the data for the EJB or to do the validation in the value object? Seems like duplicate work to create a form bean and a value object for an ejb, but if you dont , then the html form is dangerously coupled with the functioning of the EJB which I am trying to avoid in my application design. Can people give some real world examples of this ? And on a technical note, if you use the struts form bean to instantiate and populate a value object how is it passes to the action? are people just putting it in the http session ? sample code would be helpful. -paul The information in this email is confidential and is intended solely for the addressee(s). Access to this email by anyone else is unauthorised. If you are not an intended recipient, you must not read, use or disseminate the information contained in the email. Any views expressed in this message are those of the individual sender, except where the sender specifically states them to be the views of Capco. http://www.capco.com ***
SV: SV: Ant build tools - Need address to get grips with.
sure ;-) http://jakarta.apache.org/ant -Oprindelig meddelelse- Fra: Chuck Amadi [mailto:[EMAIL PROTECTED]] Sendt: 10 July 2001 12:03 Til: [EMAIL PROTECTED] Emne: Re: SV: Ant build tools - Need address to get grips with. Pls could you post this ant website address or link. Cheers chuck. Mikkel Bruun wrote: Part 1.1Type: Plain Text (text/plain) Encoding: quoted-printable -- The views expressed by the sender of this message don't necessarily represent those of Brecon Beacons National Park Authority. This message is intended for the addressee(s) only and is sent in confidence; if you receive it in error, please can you let us know (at [EMAIL PROTECTED]) and then destroy all copies. Nid yw'r farn a fynegir gan anfonwr y neges hon o anghenraid yn adlewyrchu barn Awdurdod Parc Cenedlaethol Bannau Brycheiniog. Neges yw hon a fwriadwyd ar gyfer y derbynnydd/derbynyddion yn unig ac fe'i hanfonir yn gyfrinachol; os ydych yn ei dderbyn mewn camgymeriad, a fyddech gystal â rhoi gwybod i ni (yn [EMAIL PROTECTED]) ac yna dilëwch bob copi.
Re: Struts BroadVision 6.0
Hi Raffaele, Although I have not worked with BV 6 (only 4/5), we have had BV here talking to us recently and I quizzed them about struts and the implication was that even when it ships it would ship with struts 0.5. I don't know that this is the case but I expect that is why you are seeing differences. AFAIK There should be no problem deploying a newer struts application on BV 6 (or at least they claim there shouldn't be) although substituting their struts.jar with a newer one would probably break their example application. Any web app you deploy with the new struts.jar should work fine though. Hope this helps, Ciao Nic Raffaele Sgherri To: [EMAIL PROTECTED] rsgherri@sapcc: ient.comSubject: Struts BroadVision 6.0 10/07/2001 11:02 Please respond to struts-user Anyone out there has experiences implementing a Struts site within BroadVision 6.0? They ships BV6 with an example application, but the Struts.Jar that they uses is sot 100% complete compared to the 1.0, and no support is given :( Any help is appreciated. ...ho un progetto chiaro in mente: Homer Simpson presidente... --- Raffaele Sgherri ¬ Sapient | Via Crocefisso, 19 - 20122 Milano (Italia). The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer.
Re: Diagram of ActionServlet - open for comments
These are both very nice. As to the first one, that mentions struts-config at the top, I would change the top caption to read The Action classes you created which are registered with the ActionMappings loaded from the struts-config.xml. And the second to read A request for ... registered in the mappings with the path ... The second diagram seems to imply that the Actions are registered with the mappings and the forms, which isn't quite correct. Some of the mappings may reference an Action, but it is the mappings that are registered when the application loads. (Struts keeps a list of the Actions it creates, but that doesn't happen until they are called.) So I would just say at the top The ActionMappings and ActionForm beans are registered when your server ... In the square, under doPost / doGet, 2) -- may mean to say Locale 4) -- might say fill it from the request to avoid ambiguity Under the Explanation, I would say 1) The ActionServlet checks the ActionMappings for a mapping whose path property matches the URI ... 2) The servlet asks the mapping for its associated ActionForm class. If there is one, the object is created and filled from the request. 3) The servlet asks the mapping for its associated Action class, creates or reuses the appropriate Action object, and finally passes the ActionMapping, ActionForm, and request objects to the Action's perform method. I'd be tempted to add a 2.1 to mention reset() and validate() and cover all the bases. 2.1) Before populating the ActionForm bean, the servlet calls the bean's reset() method. After filling the bean from the reqeust, the servlet calls the bean's validate() method. If validate returns false, the servlet forwards the ActionForm bean to the destination given by the mapping's input property. Otherwise, these are great! -Ted.
Re: Can anyone tell me the relationship of Struts framework and FrontController design pattern of J2EE?
The Struts framework implements the Front Controller pattern as its ActionServlet. Using that vocabulary, the ActionMappings are the Dispatcher. The advantage of Struts is that the Front Controller, Dispatcher, and several other J2EE patterns have already been implemented for you, and are ready to use! Our friend Dan Malks, et al, have developed the architectural patterns based on real-life implementations, including, I imagine, what we have been doing with Struts. My copy of Core J2EE Patterns just came yesterday, and I'm looking forward to reading it in-depth. -- Ted Husted, Husted dot Com, Fairport NY USA. -- Custom Software ~ Technical Services. -- Tel 716 737-3463. -- http://www.husted.com/about/struts/ Liang Li wrote: Hi, I find the url http://java.sun.com/j2ee/blueprints/design_patterns/front_controller/index.html describing the front controller design pattern. I think it has relationship with the Struts Framework, but I'm not sure what's the relationship. Can anyone tell me the relationship between them? And what's the advantage of struts? Thanks in advance. --Liang
can Struts tags create a bean using constructor instead of setter
Are struts tags currently designed to handle this for me?: package com.vnu.models; public class JumpUrlsBean extends java.lang.Object{ private String targetUrl = null;private String successUrl = null;private String failureUrl = null;public JumpUrlsBean(String targetUrl, String successUrl, String failureUrl){ this.targetUrl = targetUrl; this.successUrl = successUrl; this.failureUrl = failureUrl;}public String getTargetUrl(){return this.targetUrl;}public String getSuccessUrl(){return this.successUrl;}public String getFailureUrl(){return this.failureUrl;}} There is purposely no setter method because it shouldnt be modifyable. However, I want Struts to populate it for me
subscribe me
Find the best deals on the web at AltaVista Shopping! http://www.shopping.altavista.com
Re: Diagram of ActionServlet - open for comments
Point 4 could be described in more detail: methods: reset and validate -- gR
Re: Action BEFORE a page is constructed?
One way to populate a form before it is used (say you want to load user information for editing) is to create an action called preloadUserAction. In the config file create an action mapping such as actionpath=/edituser type=actionbeans.PreloadUserAction name=userForm scope=session input=/selfAdmin.jsp forward name=success path=/selfAdmin.jsp/ /action The userForm is passed into the preload action. This populates the form and then forwards onto the page that will use that form. The example application uses the same technique but is a bit more complex because the action is dual use: see EditSubscriptionAction. Adam. --- peter [EMAIL PROTECTED] wrote: Action BEFORE a page is constructed? As far as I understood the working of struts, you inherit the FORM and the ACTION classes. The forms are constructed BEFORE a page is shown - if values are already available, they will be shown. AFTER the page is submitted, the ACTION is called with the FORM element filled with the appropriate values. But what do I do to make any data available to the next page? I can do so in the preceeding ACTION. But this means, I have to do so in all preceding actions of this page. This would be a copy of code. So I am simply looking for a way to be called, just BEFORE the page is created. The only mehtod I know, is the Construction of the FORM. But there I do not have any link to the SessionContext which is my main anker element. If anyone has an idea what I am talking about, please help. Thanks Peter [EMAIL PROTECTED] __ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail http://personal.mail.yahoo.com/
RE: Image uploads
Look at the Java2D api. http://java.sun.com/products/java-media/2D/index.html You can create a custom action handler for struts that uses the Java2d api to check the image as well as apply transformation to it. I know this is a little vague but it's always more rewarding when wee discover things for ourselves. If you have trouble, just email me and I'll be happy to discuss in more detail. -Original Message- From: Matthias Bauer [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 10, 2001 6:56 AM To: struts-user Subject: Image uploads Hi there, I know the question is a little offtopic, but maybe somebody can provide a quick answer anyway. I want to upload an image file with struts (this works well already). But before storing the image in the database I want to check the width and height and the type of the image (e. g. gif or jpg). Does anybody have an idea how I can easily do this in Java? Thanks, --- Matthias
Error-page in web.xml
I'm hoping someone can help me understand this better. In web.xml, I have the following entries - error-page exception-typejava.lang.Exception/exception-type location/errorpage.jsp/location /error-page error-page exception-typejavax.servlet.ServletException/exception-type location/errorpagesrvlt.jsp/location /error-page From my understanding, anytime an Exception, or ServletException occurs in my application, it will call either errorpage.jsp or errorpagesrvlt.jsp. Is that correct? Does it matter if the exception occurs in a JSP or a servlet? This seems to work in Tomcat, but with SilverStream, I don't get taken to the error page, but get the SilverStream generate error message. In my errorpage.jsp I have - %@ page language=Java isErrorPage=true% is that right? Thanks for any insite, this is driving me crazy. Ryan
Re: Diagram of ActionServlet - open for comments
Ted Husted [EMAIL PROTECTED] wrote: 2.1) Before populating the ActionForm bean, the servlet calls the bean's reset() method. After filling the bean from the reqeust, the servlet calls the bean's validate() method. If validate returns false, the servlet forwards the ActionForm bean to the destination given by the mapping's input property. I mean, validate now returns ActionErrors and does not have to be called at all, if set in web.xml -- gR
RE: RE: RE: WTE/Struts parser incompatibilities - pandoras box?
I tried importing it all. It worked fine with NT but failed using Windows 2000. When I reverted to IBM's MO there were no probs. brgds, S. Bro -Original Message- List: struts-user Subject: RE: RE: WTE/Struts parser incompatibilities - pandoras box? From: Jon.Ridgway [EMAIL PROTECTED] Date: 2001-06-22 13:17:12 [Download message RAW] Hi, It has been done both ways by various people on this list. Both seem to work. So I guess it really doesn't matter. Juts a personal taste thing. Personally I have trodden all over IBM XML Parser ... project as I want the latest versions of all org packages and I don't like the mix and match implicit in bringing only some of the JAXP classes into VA. Jon. -Original Message- From: dsf65b y b3763476b3 [mailto:[EMAIL PROTECTED]] Sent: 22 June 2001 12:41 To: [EMAIL PROTECTED] Subject: RE: RE: WTE/Struts parser incompatibilities - pandoras box? I'm aware that the actual name of the project doesn't matter! What I tried to get across was that if I follow the instruction for installing a JAXP compatible parser found at: http://www7.software.ibm.com/vad.nsf/Data/Document2558?OpenDocumentSubMast I have to create open editions of the IBM's packages: org.xml.sax org.xml.sax.helpers which are part of the project IBM XML Parser for Java 2.0.15. However, if I leave out *all* the packages starting with org when importing parser.jar I don't have to do that and it still works! What are the ramifications, if any, of doing that? Respectfully, S. Bro
RE: struts w/ej
If any of you have already tried the mapper framework, the next release planned for next week will make some of the elements in the mapper-config DTD obsolete (nested-mapper, converters, validators, conversions, validations) and will add a couple new elements (declarations, rule). This means you'll need to change your mapper-config.xml accordingly. Fr. -Original Message- From: Assenza, Chris [mailto:[EMAIL PROTECTED]] Sent: 10 July 2001 15:06 To: '[EMAIL PROTECTED]' Subject: RE: struts w/ej (I hit Send by mistake - sorry for the premature mailing) Paul, I'm afraid I'm pressed for time at the moment, but I'd like to share our approach. I can't say with certainty that this was the best approach (we've discussed it on the list before in fact) but it is getting the job done for us. (Criticisms welcome :) We have multiple objects upon which we perform maintenance. Each object has a search screen and a detail screen. Our Action needs to do different things when a different button is pressed (basic CRUD functions, few advanced things, etc). Each object, while different, shares a great deal of generic code in order to prepare data and pass it along to some EJB (session bean). Thus, we have an abstract Action class that contains all our generic code. Then, in our object-specific action implementations (they extend the abstract class and then also contain the perform method) we make calls to the various generic methods defined in the abstract class. Depending on the situation, we will pass in a (EJB) home reference to a method and that method will then make the appropriate method calls to the session bean. To get data back and forth, we have a second method on the object-specific actions (because the data is different for different objects) wherein we set values on a data object that the bean uses for running queries, etc. Basically sample syntax is: data.setSomeId(form.getSomeId()); We simply call this method when calling the session bean's method that requires the data, and then pass the data object in. It's certainly not the best way to do this -- there are more efficient ways to populate the data object but we hit certain limitations process-wise and time-wise and this is where we are. All short-comins aside, it does get the job done. :) BTW -- The mapper framework looks extremely promising and I'm interested to try it out shortly, just wish time would provide itself. :P Chris The information in this email is confidential and is intended solely for the addressee(s). Access to this email by anyone else is unauthorised. If you are not an intended recipient, you must not read, use or disseminate the information contained in the email. Any views expressed in this message are those of the individual sender, except where the sender specifically states them to be the views of Capco. http://www.capco.com ***
RE: can Struts tags create a bean using constructor instead of setter
Beans need to have public. no-argument constructors, unless they are explicitly created and stored in the required scope. RegardsMeeraj/ -Original Message-From: Jonathan [mailto:[EMAIL PROTECTED]]Sent: Tuesday, July 10, 2001 3:01 PMTo: [EMAIL PROTECTED]Subject: can Struts tags create a bean using constructor instead of setter Are struts tags currently designed to handle this for me?: package com.vnu.models; public class JumpUrlsBean extends java.lang.Object{ private String targetUrl = null;private String successUrl = null;private String failureUrl = null;public JumpUrlsBean(String targetUrl, String successUrl, String failureUrl){ this.targetUrl = targetUrl; this.successUrl = successUrl; this.failureUrl = failureUrl;}public String getTargetUrl(){return this.targetUrl;}public String getSuccessUrl(){return this.successUrl;}public String getFailureUrl(){return this.failureUrl;}} There is purposely no setter method because it shouldnt be modifyable. However, I want Struts to populate it for me
Re: html:options not understanding collections from form beans ?
On Tue, 10 Jul 2001, Ted Husted wrote: Can you post some of the code you are working with? Given a method getDirectoryName() you should be able to pass the same collection to both the labelName and labelProperty properties. Though, you may need to expose the collection as a bean (in page scope). The tags are not written with the assumption that collections will be a property of the ActionForm, but rather as a bean, usually passed with the request. actually, getAllDirectories() returned a List of objects that responded to getDirectoryID() and getDirectoryName(). apparently html:options didnt like that, so the main page of the application now redirects to an action. the action now goes out and fetches this data, putting it into the request before forwarding it off to another page/action/forwarder. now im just doing a normal logic:iterate through the array and its all working. The underlying idea being that model-based processes (like getAllDirectories()) should be performed in an Action and the passed to the view, rather than generated by the ActionForm (which is part of the presentation tier). i just kept forgetting that the JSP pages are compiled into servlets. in WebObjects, you'd have a WOComponent subclass and 2-3 files corresponding to that subclass: a .html file, a .wod file, and a .woo. the .wod told the .html how to interact with the .java, and the .woo was used for misc DB initialization purposes. i just have to wrap my head around this new view-is-actually-a-class concept :) -- Ted Husted, Husted dot Com, Fairport NY USA. -- Custom Software ~ Technical Services. -- Tel 716 737-3463. -- http://www.husted.com/about/struts/ Howie wrote: ive got a little problem with html:options. in my form bean i have a method called getAllDirectories() which does some processing and returns a java.util.List of all the available directories. this works fine; struts picks up on the fact that it should look at the form bean for this collection. however, html:options doesnt seem to provide for this sort of setup: labelName and labelProperty both report that there's no getter method available for property directoryName for bean under name null. when combining labelName and labelProperty along with property, there's a servletexception thrown ( cannot find bean under name directoryName ). looking at the source ( OptionsTag.java ), it seems to want everything nice and orderly, with both labelName and labelProperty being Collections used for the value and content of the option tag. is there an easy way to 'bind' ( sorry, im a WebObjects refugee ) two different properties of a bean to the option value and option content ? ideally, html:options would, given a collection, be able to use PropertyUtils ( kinda reminiscent of EOKeyValueCoding in NeXT's EOF, for those that care about these sort of things ) to get the labelName and labelProperty as its iterating through. was this the original intent ? --- Howie [EMAIL PROTECTED] URL: http://www.toodarkpark.org --- Howie [EMAIL PROTECTED] URL: http://www.toodarkpark.org This sort of thing has cropped up before and has always been due to human error. -- HAL
Java files won't compile- compilation errors/utlise Ant's
Excuse me 4 mailing u direct. I have just seconded a linux box for home use as well as my home windox box is practically full). Thus as per your mail u mentioned i should try and compile it via the command line(ant prferrably) that would give you sufficient data to work with. Thus it may download netbeans and tomcat onto my linux box or can i just get on with it with the those packages already on my window box.Hence i assume that within windows i'll be utilising ms-dos prompt once i switch dir to my java_ home add ANT_HOME.to my autoexec.bat path.` 1) Can i crack on with netbeans on my window box((ant 1.3 ) or do i need to download the optional .jar files that contain the implemetation of ANT's style command i assume i do. as if the case i will need to install netbeans,tomcat ant onto the linux box. uh oh. ( Just on converted from a Bill-gatesfile 2 open community) hence still learning the ssh commands. Thus i hope it is easily grasped . Cheers for your help- Chuckie Sorry 4 keeping on but i've lost a lot of ground due to my constuctivness and petulence . -- The views expressed by the sender of this message don't necessarily represent those of Brecon Beacons National Park Authority. This message is intended for the addressee(s) only and is sent in confidence; if you receive it in error, please can you let us know (at [EMAIL PROTECTED]) and then destroy all copies. Nid yw'r farn a fynegir gan anfonwr y neges hon o anghenraid yn adlewyrchu barn Awdurdod Parc Cenedlaethol Bannau Brycheiniog. Neges yw hon a fwriadwyd ar gyfer y derbynnydd/derbynyddion yn unig ac fe'i hanfonir yn gyfrinachol; os ydych yn ei dderbyn mewn camgymeriad, a fyddech gystal â rhoi gwybod i ni (yn [EMAIL PROTECTED]) ac yna dilëwch bob copi.
XML/XSL/Struts Architecture
Hi, In our application, we are using XML/XSL to generate JSP and plan to use Struts for submitting data from HTML forms. Has anyone used / know if this architecture works. my thinking is ( correct me if wrong ) , we will not be able to use tag libraries coz of XML/XSL combination for generating pages. unique thing about this application is structure of HTML is different for each client. Thanks Mahesh
RE: Any more suggestions (Action Classes) WON'T COMPILE.
put the ApplicationMapping under classes/org/apache/struts/action the package declaration is "package org.apache.struts.action; " when compiling the classes directory struts.jarshould be in the classpath. -Original Message-From: Chuck Amadi [mailto:[EMAIL PROTECTED]]Sent: Tuesday, July 10, 2001 7:31 AMTo: Craig R. McClanahanSubject: Any more suggestions (Action Classes) WON'T COMPILE.Hi all , well i have tried everthing in the book/doc's to no avail, I would like to know that say for instance if one declare a full classpath name i.e package classes/org/apache/struts/action; dir or does on just say declare package action; As i am still having problems with the Action Classes errors below.Also i have a modified Action class as per visual Pls check it out . note briefly i am unable to compile the .java classes. WEB-INF/classes/org/apache/struts/action/ActionMapping.java [85:1] Class ActionMapping not found in type declaration or import. public final class ApplicationMapping extends ActionMapping { ^ WEB-INF/classes/org/apache/struts/action/ActionMapping.java [85:1] Public class action.ApplicationMapping is defined in C:\jakarta-tomcat-3.2.2\webapps\bbnpa\WEB-INF\classes\org\apache\struts\action\ActionMapping.java and must be defined in a file called "ApplicationMapping.java". public final class ApplicationMapping extends ActionMapping { ^ 3 errors Errors compiling ActionMapping. -- The views expressed by the sender of this message don't necessarily represent those of Brecon Beacons National Park Authority. This message is intended for the addressee(s) only and is sent in confidence; if you receive it in error, please can you let us know (at [EMAIL PROTECTED]) and then destroy all copies. Nid yw'r farn a fynegir gan anfonwr y neges hon o anghenraid yn adlewyrchu barn Awdurdod Parc Cenedlaethol Bannau Brycheiniog. Neges yw hon a fwriadwyd ar gyfer y derbynnydd/derbynyddion yn unig ac fe'i hanfonir yn gyfrinachol; os ydych yn ei dderbyn mewn camgymeriad, a fyddech gystal â rhoi gwybod i ni (yn [EMAIL PROTECTED]) ac yna dilëwch bob copi.
SV: Struts, EJBs and Pizza
Lots. - No java code in JSP pages is achievable if you're willing to write tags - Look for reuse between forms beans and between actions. - Call the same field the same name on all forms - Keep all data necessary to process the request either in the request or in an easily accessible bean. - Don't create transient beans to process requests - make them part of the form bean - Layer your application: Separate form beans from value objects - use factories. I could go on and onbut the good news was Struts was an immense help. -- dIon Gillard, Multitask Consulting Work: http://www.multitask.com.au NetRexx: http://www.multitask.com.au/NetRexx.nsf - Forwarded by dIon Gillard/Multitask Consulting/AU on 11/07/2001 02:07 AM - SV: Struts, EJBs and Pizza nice!!! how was the development??? any lessons learned??? Mikkel
RE: WEBLOGIC 5.1SP8 issue
Hi NGUYEN, This is a problem with WebLogic. Basically one of the custom tags is Barfing in between the html:form ... tags. It can be any of the following: 1. A tag has a syntax error. 2. Open tag without a properly nested close tag. 3. Some of the logic tags need logic:present tags to wrap them. In general there is an exception being thrown in one of the custome tags within the html:form tags. Good Luck, Abraham -Original Message- From: NGUYEN G InfoEdpMsiVdf [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 10, 2001 2:26 AM To: [EMAIL PROTECTED] Subject: WEBLOGIC 5.1SP8 issue Hi! I've got some problem when I use Weblogic5.1SP8, i get the following error: mar. juil. 10 11:24:02 CEST 2001:E ServletContext-General Root cause of Serv letException javax.servlet.ServletException: runtime failure in custom tag 'form' at jsp_servlet._jsp._login._login._jspService(_login.java:264) at weblogic.servlet.jsp.JspBase.service(JspBase.java:27) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm pl.java:106) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm pl.java:124) at weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletCon textImpl.java:907) at weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletCon textImpl.java:851) at weblogic.servlet.internal.ServletContextManager.invokeServlet(Servlet ContextManager.java:252) at weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.jav a:364) at weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:252) at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:129) mar. juil. 10 11:24:02 CEST 2001:I ServletContext-General file: init Can You help me? thanks! * Ce message et toutes les pieces jointes (ci-apres le message) sont confidentiels et etablis a l'intention exclusive de ses destinataires. Toute utilisation ou diffusion non autorisee est interdite. Tout message electronique est susceptible d'alteration. La SOCIETE GENERALE et ses filiales declinent toute responsabilite au titre de ce message s'il a ete altere, deforme ou falsifie. This message and any attachments (the message) are confidential and intended solely for the addressees. Any unauthorised use or dissemination is prohibited. E-mails are susceptible to alteration. Neither SOCIETE GENERALE nor any of its subsidiaries or affiliates shall be liable for the message if altered, changed or falsified. *
RE: Error-page in web.xml
that's a interesting point. any experieence about orion-server? -Original Message- From: Ryan Cornia [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 10, 2001 4:49 PM To: [EMAIL PROTECTED] Subject: Error-page in web.xml I'm hoping someone can help me understand this better. In web.xml, I have the following entries - error-page exception-typejava.lang.Exception/exception-type location/errorpage.jsp/location /error-page error-page exception-typejavax.servlet.ServletException/exception-type location/errorpagesrvlt.jsp/location /error-page From my understanding, anytime an Exception, or ServletException occurs in my application, it will call either errorpage.jsp or errorpagesrvlt.jsp. Is that correct? Does it matter if the exception occurs in a JSP or a servlet? This seems to work in Tomcat, but with SilverStream, I don't get taken to the error page, but get the SilverStream generate error message. In my errorpage.jsp I have - %@ page language=Java isErrorPage=true% is that right? Thanks for any insite, this is driving me crazy. Ryan
WLS/Service Pack 8 Troubles
I am trying to migrate my web app from WLS 6.0 to a WLS 5.1 SP8, but i've encountered some setbacks. I verified that the service pack was installed then registered my WAR file in weblogic.properties. I then added my ApplicationResources file into the _tmp_xxx directory. My final result: a 404 error. Does anyone have any advice? Are there any additional steps not included in the installation instructions on the Struts home page? ~Jason
Re: Any more suggestions (Action Classes) WON'T COMPILE.
It looks as though you named the file ActionMapping.java when it should be ApplicationMapping.java. The file name must be the same as the class name. HTH, Pete Chuck Amadi wrote: Hi all , well i have tried everthing in the book/doc's to no avail, I would like to know that say for instance if one declare a full classpath name i.e package classes/org/apache/struts/action; dir or does on just say declare package action; As i am still having problems with the Action Classes errors below.Also i have a modified Action class as per visual Pls check it out . note briefly i am unable to compile the .java classes. WEB-INF/classes/org/apache/struts/action/ActionMapping.java [85:1] Class ActionMapping not found in type declaration or import. public final class ApplicationMapping extends ActionMapping { ^ WEB-INF/classes/org/apache/struts/action/ActionMapping.java [85:1] Public class action.ApplicationMapping is defined in C:\jakarta-tomcat-3.2.2\webapps\bbnpa\WEB-INF\classes\org\apache\struts\action\ActionMapping.java and must be defined in a file called ApplicationMapping.java. public final class ApplicationMapping extends ActionMapping { ^ 3 errors Errors compiling ActionMapping. -- The views expressed by the sender of this message don't necessarily represent those of Brecon Beacons National Park Authority. This message is intended for the addressee(s) only and is sent in confidence; if you receive it in error, please can you let us know (at [EMAIL PROTECTED]) and then destroy all copies. Nid yw'r farn a fynegir gan anfonwr y neges hon o anghenraid yn adlewyrchu barn Awdurdod Parc Cenedlaethol Bannau Brycheiniog. Neges yw hon a fwriadwyd ar gyfer y derbynnydd/derbynyddion yn unig ac fe'i hanfonir yn gyfrinachol; os ydych yn ei dderbyn mewn camgymeriad, a fyddech gystal â rhoi gwybod i ni (yn [EMAIL PROTECTED]) ac yna dilëwch bob copi.
RE: can Struts tags create a bean using constructor instead of setter
Object construction is expensive as well. This is an interesting question and I like to add some. I hope that Craig, Ted, Martin and some others senior member can answer the scalabilities of struts. I wonder if struts use instant poolling for from bean. If so, then how do strusts reset the from bean? And if it is all possible can you point out all the optimization or scalability issues that struts has overcome. -Original Message-From: Jonathan [mailto:[EMAIL PROTECTED]]Sent: Tuesday, July 10, 2001 7:01 AMTo: [EMAIL PROTECTED]Subject: can Struts tags create a bean using constructor instead of setter Are struts tags currently designed to handle this for me?: package com.vnu.models; public class JumpUrlsBean extends java.lang.Object{ private String targetUrl = null;private String successUrl = null;private String failureUrl = null;public JumpUrlsBean(String targetUrl, String successUrl, String failureUrl){ this.targetUrl = targetUrl; this.successUrl = successUrl; this.failureUrl = failureUrl;}public String getTargetUrl(){return this.targetUrl;}public String getSuccessUrl(){return this.successUrl;}public String getFailureUrl(){return this.failureUrl;}} There is purposely no setter method because it shouldnt be modifyable. However, I want Struts to populate it for me
Has anyone used KONA? and how diffierent is it from struts?
Thanks
Page is not cached
Hello, I have struts 1.0 app running on tomcat and I noticed that one of my pages (output after uploading a file) is not cached by the browser (IE 5). By default ActionServlet doesn't include any headers prohibiting from caching. I tried manually set headers inside of the action prior to forwarding to template but it didn't help (somehow they didn't show up when I tried to print the headers out): 10 Jul 2001 13:36:01,942 INFO ContextServlet,55 - // Header Info 10 Jul 2001 13:36:01,942 INFO ContextServlet,59 - Cookie=JSESSIONID=5r5zy3v3o1 10 Jul 2001 13:36:01,958 INFO ContextServlet,59 - Host=njimtw860140:8080 10 Jul 2001 13:36:01,958 INFO ContextServlet,59 - Accept=application/msword, application/vnd.ms-excel, application/vnd.ms-powerpoint, image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */* 10 Jul 2001 13:36:01,974 INFO ContextServlet,59 - User-Agent=Mozilla/4.0 (compatible; MSIE 5.0; Windows NT; DigExt) 10 Jul 2001 13:36:01,989 INFO ContextServlet,59 - Content-Length=546 10 Jul 2001 13:36:01,989 INFO ContextServlet,59 - Accept-Language=en-us 10 Jul 2001 13:36:02,005 INFO ContextServlet,59 - Accept-Encoding=gzip, deflate 10 Jul 2001 13:36:02,005 INFO ContextServlet,59 - Content-Type=multipart/form-data; boundary=---7d111e1211634 10 Jul 2001 13:36:02,021 INFO ContextServlet,59 - Connection=Keep-Alive 10 Jul 2001 13:36:02,021 INFO ContextServlet,59 - Referer=http://njimtw860140:8080/hp2/templates/CasImportTemplate.jsp 10 Jul 2001 13:36:02,036 INFO ContextServlet,61 - // End Header Info Did anyone encounter this problem? Thanks, Mark. -- This message is intended only for the personal and confidential use of the designated recipient(s) named above. If you are not the intended recipient of this message you are hereby notified that any review, dissemination, distribution or copying of this message is strictly prohibited. This communication is for information purposes only and should not be regarded as an offer to sell or as a solicitation of an offer to buy any financial product, an official confirmation of any transaction, or as an official statement of Lehman Brothers. Email transmission cannot be guaranteed to be secure or error-free. Therefore, we do not represent that this information is complete or accurate and it should not be relied upon as such. All information is subject to change without notice.
RE: WEBLOGIC 5.1SP8 issue
this a known problem with sp8. If you install sp9 you will know what the actual exception is. -Original Message- From: NGUYEN G InfoEdpMsiVdf [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 10, 2001 2:26 AM To: [EMAIL PROTECTED] Subject: WEBLOGIC 5.1SP8 issue Hi! I've got some problem when I use Weblogic5.1SP8, i get the following error: mar. juil. 10 11:24:02 CEST 2001:E ServletContext-General Root cause of Serv letException javax.servlet.ServletException: runtime failure in custom tag 'form' at jsp_servlet._jsp._login._login._jspService(_login.java:264) at weblogic.servlet.jsp.JspBase.service(JspBase.java:27) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm pl.java:106) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm pl.java:124) at weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletCon textImpl.java:907) at weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletCon textImpl.java:851) at weblogic.servlet.internal.ServletContextManager.invokeServlet(Servlet ContextManager.java:252) at weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.jav a:364) at weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:252) at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:129) mar. juil. 10 11:24:02 CEST 2001:I ServletContext-General file: init Can You help me? thanks! * Ce message et toutes les pieces jointes (ci-apres le message) sont confidentiels et etablis a l'intention exclusive de ses destinataires. Toute utilisation ou diffusion non autorisee est interdite. Tout message electronique est susceptible d'alteration. La SOCIETE GENERALE et ses filiales declinent toute responsabilite au titre de ce message s'il a ete altere, deforme ou falsifie. This message and any attachments (the message) are confidential and intended solely for the addressees. Any unauthorised use or dissemination is prohibited. E-mails are susceptible to alteration. Neither SOCIETE GENERALE nor any of its subsidiaries or affiliates shall be liable for the message if altered, changed or falsified. *
Sorry, Here is another Iterate question
Good Morning: I have a question for the iterate property update with indexed tag. Normally I use my own tag to show the real name of the iterate property for update purpose, then just read them out from the HTTPRequest on my action class, that works well until recently I have to add a upload feature to one of my page which have Iterate tags. Since there aren't any HTTPRequest left in my action class to read due to the multipart issue. Then I try to using the ActionForm to handle the Iterate property for update. I go through couple thread on this mailing list regarding for the indexed tag on iterate tag for update purpose, and follow all the steps, still can't get this thing works, please help me out. Here are the step I did. 1) I get a object call InflowAttributes have three field, all have the getters and setters. a. String name b. String type c. String value 2) I get form-bean call UserForm and have one of the field. a. InFlowAttribute[] attributes. have three method for the field. a. public InFlowAttribute[] getAttributes() { return this.attributes; } b. public void setAttributes(InFlowAttributes[] attributes) { this.attributes = attributes; } c. public InFlowAttribute getAttribute(int index) { return this.attributes[index]; } 3) I get jsp for the editing a userform, have couple thing made for this indexed Iterate Text tag. a) I get Dave Hay's indexed package install on top of the struts 1.0 release, both java and tld. b) I have struts-html.tld and struts-logic.tld define on top of my JSP page. c) Here is my implementation for the iterate. logic:iterate id=attribute name=userForm property=attributes tr tdstruts:htmpProperty name=attribute property=name/.td tdhtml:text name=attribute property=value indexed=true//td /tr /logic:iterate d) I have all the attribute[0..n].value set up properlly without any problem. 4) This JSP for editing userform will trigged a saveUser action. Here is my problem, I can get all the other field from userform without problem except attributes field is null, no matter whatever I do. I know some thing I did wrong to cause the array attributes didn't get set back to my userform, but just couldn't figure out why, If some people out there can help me out, there will be really appreciated. Basically I try to understand how the HTML form request get populate back to form bean. especially how the attribute[0..n].value can get set back to array attributes on my form. By the way, until to this point, I still didn't put enctype=multipart/form-data on my form yet, so this will be pure Iterate tag update issue. Thanks in advance for the help. Regards FL
Re: Iterate problem - Any Solutions !!!!!! - SOLVED FINALLY
Hi Suhas, No sure what you mean by that... By the way, do you have to have an array? If you make it a collection, you can do away with the index altogether! Dave suhas [EMAIL PROTECTED] on 07/10/2001 11:52:20 AM Please respond to [EMAIL PROTECTED]; Please respond to suhas [EMAIL PROTECTED] To: [EMAIL PROTECTED], suhas [EMAIL PROTECTED] cc:(bcc: David Hay/Lex/Lexmark) Subject: Re: Iterate problem - Any Solutions !! - SOLVED FINALLY Another point - The iterate tag used here is just acting as a for loop . I mean the scripting variable it exposes is not at all useful in this scenario . Any comments ! Suhas - Original Message - From: suhas [EMAIL PROTECTED] To: [EMAIL PROTECTED] Cc: Gregor Rayman [EMAIL PROTECTED] Sent: Tuesday, July 10, 2001 4:26 PM Subject: Re: Iterate problem - Any Solutions !! - SOLVED FINALLY It worked at last . No other change needed . This is how - logic:iterate id=element name=updateOrderForm property=views type=example.testorder.OverDueOrderView tr td html:text name=updateOrderForm property='%= view[ + index+ ]+.orderNo %' / /td td html:text name=updateOrderForm property='%= view[+ index+ ]+.salesDiv %' / /td td html:text name=updateOrderForm property='%= view[+ index+ ]+.productOrdered %' / /td /tr - Original Message - From: Jon.Ridgway [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, July 10, 2001 11:06 AM Subject: RE: Iterate problem - Any Solutions !! Hi Suhas, I seem to remember a problem with arrays being used in this way. Someone on this list created some new indexed tags you can grab from Teds site. Not certain but have a look at: http://www.husted.com/about/struts/resources.htm#contributions Specifically have a look at the Indexed Tags: http://husted.com/about/struts/indexed-tags.htm Jon. -Original Message- From: suhas [mailto:[EMAIL PROTECTED]] Sent: 10 July 2001 15:20 To: [EMAIL PROTECTED] Subject: Iterate problem - Any Solutions !! I still struggling with iterate problem still . Any solutions . I do have the proper getter methods in the OverDueOrderView . getting Here I'm getting **in side the getView of UpdateOrder Form 0 ** printed with following error message javax.servlet.ServletException: Exception thrown by getter for view[0].orderNo of bean org.apache.struts.taglib.html.BEAN logic:iterate id=view name=updateOrderForm property=views type=example.testorder.OverDueOrderView tr td html:text property='%= view[ + index+ ]+.orderNo %' / /td td html:text property='%= view[+index+ ]+.salesDiv %' / /td td html:text property='%= view[+index+ ]+.productOrdered %' / /td /tr % index++ ;% /logic:iterate - Original Message - From: suhas [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, July 10, 2001 2:02 PM Subject: Re: Iterate problem it is goes something like this . private String orderNo ; public String getOrderNo() { return orderNo ; } - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, July 10, 2001 8:28 AM Subject: Re: Iterate problem Hi The parts you show look correct to me. It seems that the problem lies in the code of method OverDueOrderView.getOrderNo(), which you have not copied to the mail. Guido suhas [EMAIL PROTECTED] To: [EMAIL PROTECTED] ltech.com cc: Subject: Iterate problem 10.07.2001 11:55 Please respond to struts-user Hi I have a question My Iterate tag goes like this logic:iterate id=view name=updateOrderForm property=views type =example.testorder.OverDueOrderView tr td html:text property='%= view[ + index+ ]+.orderNo %' / /td td html:text property='%= view[+index+ ]+.salesDiv %' / /td td html:text property='%= view[+index+ ]+.productOrdered %' / /td /tr % index++ ;% /logic:iterate Do I need **IndexId** here as an attribute in the iterate Tag ??? 'cos In my form bean when showing the above table there is a call to public OverDueOrderView getView(int index) { System.out.println( in side the getView of UpdateOrder Form + index); return (OverDueOrderView)views.get(index); } Here I'm getting **in side the getView of UpdateOrder Form 0 ** printed with following error message javax.servlet.ServletException: Exception thrown by getter for view[0].orderNo of bean org.apache.struts.taglib.html.BEAN What can be the problem -- IS it 'cos i'm not specifying
Re: SV: Struts, EJBs and Pizza
[EMAIL PROTECTED] wrote: I could go on and onbut the good news was Struts was an immense help. Please do -- I think the world may be ready for The Elements of Struts Development http://husted.com/about/struts/elements.htm The avoid transient beans point sounds especially interesting ... [EMAIL PROTECTED] wrote: Lots. - No java code in JSP pages is achievable if you're willing to write tags - Look for reuse between forms beans and between actions. - Call the same field the same name on all forms - Keep all data necessary to process the request either in the request or in an easily accessible bean. - Don't create transient beans to process requests - make them part of the form bean - Layer your application: Separate form beans from value objects - use factories. I could go on and onbut the good news was Struts was an immense help. -- dIon Gillard, Multitask Consulting Work: http://www.multitask.com.au NetRexx: http://www.multitask.com.au/NetRexx.nsf - Forwarded by dIon Gillard/Multitask Consulting/AU on 11/07/2001 02:07 AM - SV: Struts, EJBs and Pizza nice!!! how was the development??? any lessons learned??? Mikkel
Re: can Struts tags create a bean using constructor instead of setter
Yes I know, but when you create a value object you dont want setters. What I want is a bean like structure that has no setters. I want to be able to create it by passing values to a constructor. - Original Message - From: Meeraj Kunnumpurath To: '[EMAIL PROTECTED]' Sent: Tuesday, July 10, 2001 11:29 AM Subject: RE: can Struts tags create a bean using constructor instead of setter Beans need to have public. no-argument constructors, unless they are explicitly created and stored in the required scope. RegardsMeeraj/ -Original Message-From: Jonathan [mailto:[EMAIL PROTECTED]]Sent: Tuesday, July 10, 2001 3:01 PMTo: [EMAIL PROTECTED]Subject: can Struts tags create a bean using constructor instead of setter Are struts tags currently designed to handle this for me?: package com.vnu.models; public class JumpUrlsBean extends java.lang.Object{ private String targetUrl = null;private String successUrl = null;private String failureUrl = null;public JumpUrlsBean(String targetUrl, String successUrl, String failureUrl){ this.targetUrl = targetUrl; this.successUrl = successUrl; this.failureUrl = failureUrl;}public String getTargetUrl(){return this.targetUrl;}public String getSuccessUrl(){return this.successUrl;}public String getFailureUrl(){return this.failureUrl;}} There is purposely no setter method because it shouldnt be modifyable. However, I want Struts to populate it for me
Sorry, another question for Iterate Tag
Good Morning: I have a question for the iterate property update with indexed tag. Normally I use my own tag to show the real name of the iterate property for update purpose, then just read them out from the HTTPRequest on my action class, that works well until recently I have to add a upload feature to one of my page which have Iterate tags. Since there aren't any HTTPRequest left in my action class to read due to the multipart issue. Then I try to using the ActionForm to handle the Iterate property for update. I go through couple thread on this mailing list regarding for the indexed tag on iterate tag for update purpose, and follow all the steps, still can't get this thing works, please help me out. Here are the step I did. 1) I get a object call InflowAttributes have three field, all have the getters and setters. a. String name b. String type c. String value 2) I get form-bean call UserForm and have one of the field. a. InFlowAttribute[] attributes. have three method for the field. a. public InFlowAttribute[] getAttributes() { return this.attributes; } b. public void setAttributes(InFlowAttributes[] attributes) { this.attributes = attributes; } c. public InFlowAttribute getAttribute(int index) { return this.attributes[index]; } 3) I get jsp for the editing a userform, have couple thing made for this indexed Iterate Text tag. a) I get Dave Hay's indexed package install on top of the struts 1.0 release, both java and tld. b) I have struts-html.tld and struts-logic.tld define on top of my JSP page. c) Here is my implementation for the iterate. logic:iterate id=attribute name=userForm property=attributes tr tdstruts:htmpProperty name=attribute property=name/.td tdhtml:text name=attribute property=value indexed=true//td /tr /logic:iterate d) I have all the attribute[0..n].value set up properlly without any problem. 4) This JSP for editing userform will trigged a saveUser action. Here is my problem, I can get all the other field from userform without problem except attributes field is null, no matter whatever I do. I know some thing I did wrong to cause the array attributes didn't get set back to my userform, but just couldn't figure out why, If some people out there can help me out, there will be really appreciated. Basically I try to understand how the HTML form request get populate back to form bean. especially how the attribute[0..n].value can get set back to array attributes on my form. By the way, until to this point, I still didn't put enctype=multipart/form-data on my form yet, so this will be pure Iterate tag update issue. Thanks in advance for the help. Regards FL
Report to Recipient(s)
Incident Information:- Originator:Jason Rosenblum [EMAIL PROTECTED] Recipients:Struts (E-mail) [EMAIL PROTECTED] Subject: WLS/Service Pack 8 Troubles Message from Jason Rosenblum [EMAIL PROTECTED] was quarantined because it contained banned content.
Any Success With Validator?
I have a small and simple web app that I have working with vanilla struts. I am trying to incorporate the struts validator mechanism by converting just one form. To do so, I have done the following: Placed the Struts_Validator-20010702.jar into the web app's lib dir. Place the jakarta-regexp-1.2.jar into the web app's lib dir. Place the struts-validator.tld into the web app's WEB-INF dir (along with the struts tag lib files). Copy the example validation.xml file into the web app's WEB-INF dir. Removed all but one form from the default (no locale) formset. Edited each field so that it depends on require only. Removed all the localized formsets. Cut paste from the validator servlet definition from the example web.xml into mine. Changed the taglib reference for the validator taglib (no tld durectory). Changed the jsp to use the validator:errorsExist tag in place of the struts errors tag. Added the validator tag lib to the page. Changed the form class so that it extends ValidatorForm rather than struts ActionForm. Commented out my previously coded validate() method in the form class. In the form's action class, remove the check for errors in the perform() method. Added validate=true to the form's action in the struts-config.xml file. When I submit the page with empty fields, no errors are reported and the form's action just marches merrily along forwarding to the next jsp which fails because parameters are empty. I have looked and tried again and again with no luck. Before I give up, I thought I'd ask for help here. Any ideas as to what I am missing? Thanks In Advance, David Seattle
Re: html:text attribute question - Thanks ! It works !
Thank you very much I have downloaded the most recent binary version of Struts, changed TLD file by adding this new property, and it works ! Thanks a lot ! Jerzy Kalat - Original Message - From: Niall Pemberton [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, July 09, 2001 7:18 PM Subject: RE: html:text attribute question Jerzy, Looking at the code of BaseHandlerTag (from which most of the html:... tags inherit) everything looks in place to handle this attribute (it was added on June 13th). I suggest you change your copy of the struts-html.tld to include this attribute and see if it works. Niall -Original Message- From: Jerzy Kalat [mailto:[EMAIL PROTECTED]] Sent: 09 July 2001 12:33 To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: html:text attribute question Hi, If this is true, what do I do wrong, as this line of code TD SPAN class=f-data html:text property=geoEntityType.id size=4 maxlength=4 title=Enter Type ID/ /SPAN /TD produces this error: org.apache.jasper.compiler.CompileException: C:\tomcat-3.2.1\webapps\myapps\geoEntityType.jsp(186,27) Attribute title invalid according to the specified TLD Jerzy Kalat - Original Message - From: Pham Thanh Quan [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, July 05, 2001 9:44 PM Subject: Re: html:text attribute question You can implement it perfectly by the way that you present Quan PS. I use IE 5.0 - Original Message - From: Jerzy Kalat [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, July 05, 2001 9:25 PM Subject: html:text attribute question Hi, IE Browser has very nice, user friendly feature, with form input text field. If such field has attribute title='text to be displayed' and user put his mouse over this field, this text is displayed to the user. I do not see 'title' atribute in html:text input button. Any idea how can we implement it? Jerzy Kalat
RE: Has anyone used KONA? and how diffierent is it from struts?
As far as I know, db-Kona is weblogic specific implementation instead of JDBC. It might have some performance benefits over JDBC but at the price of portability. I am not sure if db-Kona is totally different beast from Kona itself! With regards -Srini -Original Message- From: Trieu, Danny [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 10, 2001 1:30 PM To: [EMAIL PROTECTED] Subject: Has anyone used KONA? and how diffierent is it from struts? Thanks
Re: can Struts tags create a bean using constructor instead of setter
Struts does check to see if an ActionForm bean in the appropriate scope already exists before creating another, and then calls the standard reset() method before populating it from the current request (which is one reason why we have a reset() method ;-). Struts tries to be parsimonious with object creation wherever it can. Only one Action object per class is created per application, the mapping and message resources are used application-wide, the locale resources are not loaded until needed, and so forth. Another rather unlikely optimization is the use of introspection. While it can be more expensive than other strategies, the way it is used in the framework reduces the number of objects and custom tags needed by a deployment, simplyfing the overall application. Also by relying heavily on standards, Struts automatically gains whatever optimizations containers provide for those standards. Case in point are Javabeans. While maps seems like they would be more efficient at first, field reports indicate that many containers are optimized for JavaBeans can be more perfomant than maps. Likewise, as the new standard JSP tags are finalized, we will move quickly to leverage those within the framework, since the JSP processors will undoubtedly be optimized for the standard tags. -- Ted Husted, Husted dot Com, Fairport NY USA. -- Custom Software ~ Technical Services. -- Tel 716 737-3463. -- http://www.husted.com/about/struts/ From: Trieu, Danny [EMAIL PROTECTED] Object construction is expensive as well. This is an interesting question and I like to add some. I hope that Craig, Ted, Martin and some others senior member can answer the scalabilities of struts. I wonder if struts use instant poolling for from bean. If so, then how do strusts reset the from bean? And if it is all possible can you point out all the optimization or scalability issues that struts has overcome.
Error: org.apache.struts.action.MESSAGE
Hi What exactly does this error mean?? I have a JSP (using a few Struts tags) with the action beans working with a couple of EJB's. I have successfully deployed it in the Websphere Test Environment using VA 3.5.3. I am trying to deploy the same application on WAS 3.5 Patch 2 and I get the following/well known error when I try to hit my JSP. If Iam correct, this has to do with the web.xml, struts-config.xml files and the addition of the servlets to the servlet container. Error 500 An error has occured while processing request:http://xxx.yyy.com/phase3order.jsp Message: Server caught unhandled exception from servlet [JSP 1.1 Processor]: Cannot find message resources under key org.apache.struts.action.MESSAGE Could some one throw some light on this puhlease Regards Hemant Pathangi
Re: Page is not cached
Do you have the ActionServlet init-param nocache set to true? From ActionServlet.java: nocache - If set to true, add HTTP headers to every response intended to defeat browser caching of any response we generate or forward to HTH, Pete Zeltser, Mark wrote: Hello, I have struts 1.0 app running on tomcat and I noticed that one of my pages (output after uploading a file) is not cached by the browser (IE 5). By default ActionServlet doesn't include any headers prohibiting from caching. I tried manually set headers inside of the action prior to forwarding to template but it didn't help (somehow they didn't show up when I tried to print the headers out): 10 Jul 2001 13:36:01,942 INFO ContextServlet,55 - // Header Info 10 Jul 2001 13:36:01,942 INFO ContextServlet,59 - Cookie=JSESSIONID=5r5zy3v3o1 10 Jul 2001 13:36:01,958 INFO ContextServlet,59 - Host=njimtw860140:8080 10 Jul 2001 13:36:01,958 INFO ContextServlet,59 - Accept=application/msword, application/vnd.ms-excel, application/vnd.ms-powerpoint, image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */* 10 Jul 2001 13:36:01,974 INFO ContextServlet,59 - User-Agent=Mozilla/4.0 (compatible; MSIE 5.0; Windows NT; DigExt) 10 Jul 2001 13:36:01,989 INFO ContextServlet,59 - Content-Length=546 10 Jul 2001 13:36:01,989 INFO ContextServlet,59 - Accept-Language=en-us 10 Jul 2001 13:36:02,005 INFO ContextServlet,59 - Accept-Encoding=gzip, deflate 10 Jul 2001 13:36:02,005 INFO ContextServlet,59 - Content-Type=multipart/form-data; boundary=---7d111e1211634 10 Jul 2001 13:36:02,021 INFO ContextServlet,59 - Connection=Keep-Alive 10 Jul 2001 13:36:02,021 INFO ContextServlet,59 - Referer=http://njimtw860140:8080/hp2/templates/CasImportTemplate.jsp 10 Jul 2001 13:36:02,036 INFO ContextServlet,61 - // End Header Info Did anyone encounter this problem? Thanks, Mark. -- This message is intended only for the personal and confidential use of the designated recipient(s) named above. If you are not the intended recipient of this message you are hereby notified that any review, dissemination, distribution or copying of this message is strictly prohibited. This communication is for information purposes only and should not be regarded as an offer to sell or as a solicitation of an offer to buy any financial product, an official confirmation of any transaction, or as an official statement of Lehman Brothers. Email transmission cannot be guaranteed to be secure or error-free. Therefore, we do not represent that this information is complete or accurate and it should not be relied upon as such. All information is subject to change without notice. begin:vcard n:; x-mozilla-html:FALSE org:BRIMG SRC=http://www.irista.com/images/common/logo_top_right.gif; adr:;; version:2.1 end:vcard
Weblogic 5.1 sp9 Struts example problem
Hi, When I try a Strust example , http://localhost:7001/strutsexample/index.jsp, the following exception is thrown. I've tried deploying the example as a .war file as well as in the extracted format. ANy ideas ? Wed Jul 11 08:57:29 GMT+10:00 2001:E WebAppServletContext-strutsexample Servlet failed with Exception java.lang.NoSuchMethodError: weblogic.utils.io.FilenameEncoder: method resolveRelativePaths(Ljava/lang/String;)Ljava/lan g/String; not found at weblogic.servlet.JSPServlet.calculateURI(JSPServlet.java:143) at weblogic.servlet.JSPServlet.service(JSPServlet.java:105) at javax.servlet.http.HttpServlet.service(HttpServlet.java:865) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:120) at weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImpl.java:915) at weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImpl.java:879) at weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContextManager.java:269) at weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:365) at weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:253) at weblogic.kernel.ExecuteThread.run(ExecuteThread.java, Compiled Code) Cheers Neil NOTICE The information contained in this electronic mail message is privileged and confidential, and is intended only for use of the addressee. If you are not the intended recipient, you are hereby notified that any disclosure, reproduction, distribution or other use of this communication is strictly prohibited. If you have received this communication in error, please notify the sender by reply transmission and delete the message without copying or disclosing it.
Problem getting Struts working with Websphere 3.5.4
I am trying to get the example application to work on Websphere 3.5.4. I followed the additional steps from the installation page and I can now see the index.jsp page and the tour, but when I try to register or logon I get the following error. Has anyone else seen this or know of a solution?
RE: Weblogic 5.1 sp9 Struts example problem
Thanks Abraham, When I replaced sp9 with sp8 the example works fine. I deployed as a .war so i did not need to make the classpath changes. Cheers Neil Abraham Kang [EMAIL PROTECTED] on 11/07/2001 09:36:06 AM Please respond to [EMAIL PROTECTED]; Please respond to [EMAIL PROTECTED] To: [EMAIL PROTECTED] cc:(bcc: Neil Figg/NSW/ING-MM/AU) Subject: RE: Weblogic 5.1 sp9 Struts example problem When you deployed in unjarred format did you have struts.jar and the /WEB-INF/classes directory on your weblogic classpath? I have configured Struts with sp8. I have heard there are allot of bugs with sp9. Can you try with sp8 to see if there is a difference after taking the two steps above? --Abraham -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 10, 2001 3:56 PM To: [EMAIL PROTECTED] Subject: Weblogic 5.1 sp9 Struts example problem Hi, When I try a Strust example , http://localhost:7001/strutsexample/index.jsp, the following exception is thrown. I've tried deploying the example as a .war file as well as in the extracted format. ANy ideas ? Wed Jul 11 08:57:29 GMT+10:00 2001:E WebAppServletContext-strutsexample Servlet failed with Exception java.lang.NoSuchMethodError: weblogic.utils.io.FilenameEncoder: method resolveRelativePaths(Ljava/lang/String;)Ljava/lan g/String; not found at weblogic.servlet.JSPServlet.calculateURI(JSPServlet.java:143) at weblogic.servlet.JSPServlet.service(JSPServlet.java:105) at javax.servlet.http.HttpServlet.service(HttpServlet.java:865) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStu bImpl.java:120) at weblogic.servlet.internal.ServletContextImpl.invokeServlet(Servlet ContextImpl.java:915) at weblogic.servlet.internal.ServletContextImpl.invokeServlet(Servlet ContextImpl.java:879) at weblogic.servlet.internal.ServletContextManager.invokeServlet(Serv letContextManager.java:269) at weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP. java:365) at weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:253) at weblogic.kernel.ExecuteThread.run(ExecuteThread.java, Compiled Code) Cheers Neil NOTICE The information contained in this electronic mail message is privileged and confidential, and is intended only for use of the addressee. If you are not the intended recipient, you are hereby notified that any disclosure, reproduction, distribution or other use of this communication is strictly prohibited. If you have received this communication in error, please notify the sender by reply transmission and delete the message without copying or disclosing it.
Re: Any Success With Validator?
Standard out goes to the console window not to the log file. If you are starting Tomcat as a background process, don't. Then as it starts you will see some Struts and Validator print out. David --- David White [EMAIL PROTECTED] wrote: My web app is called my-struts-example. The servlet log from Tomcat follows. My debug for both struts and validator servelts is 1 or higher. I do not see what you are talking about, David. Thanks for the help. servlet.log 2001-07-10 03:47:30 - path=/examples :jsp: init 2001-07-10 03:47:30 - path=/doc :jsp: init 2001-07-10 03:47:30 - path=/InstallRoot :jsp: init 2001-07-10 03:47:30 - path=/admin :jsp: init 2001-07-10 03:47:30 - path=/struts-example :jsp: init 2001-07-10 03:47:30 - path=/struts-example :database: init 2001-07-10 03:47:30 - path=/struts-example :database: Initializing database servlet 2001-07-10 03:47:30 - path=/struts-example :database: Loading database from '/WEB-INF/database.xml' 2001-07-10 03:47:31 - path=/struts-example :action: init 2001-07-10 03:47:31 - path=/struts-example :action: Loading application resources from resource org.apache.struts.webapp.example.ApplicationResources 2001-07-10 03:47:31 - path=/struts-example :action: Initializing configuration from resource path /WEB-INF/struts-config.xml 2001-07-10 03:47:31 - path=/struts-example :action: Process servletName=action, urlPattern=*.do 2001-07-10 03:47:31 - path=/struts-example :action: Mapping for servlet 'action' = '*.do' 2001-07-10 03:47:31 - path=/validator :jsp: init 2001-07-10 03:47:31 - path=/my-struts-example :jsp: init 2001-07-10 03:47:31 - path=/my-struts-example :validator: init 2001-07-10 03:47:31 - path=/my-struts-example :validator: Loading validation file from '/WEB-INF/validation.xml' 2001-07-10 03:47:32 - path=/my-struts-example :action: init 2001-07-10 03:47:32 - path=/my-struts-example :action: Loading application resources from resource ApplicationResources 2001-07-10 03:47:32 - path=/my-struts-example :action: Initializing configuration from resource path /WEB-INF/struts-config.xml 2001-07-10 03:47:33 - path=/my-struts-example :action: Process servletName=action, urlPattern=*.do 2001-07-10 03:47:33 - path=/my-struts-example :action: Mapping for servlet 'action' = '*.do' 2001-07-10 03:47:33 - path= :jsp: init 2001-07-10 03:47:33 - path=/webcontainer_examples :jsp: init 2001-07-10 03:50:47 - path=/my-struts-example :jsp: init 2001-07-10 03:51:19 - path=/my-struts-example :jsp: init 2001-07-10 03:51:22 - path=/my-struts-example :action: Processing a POST for /logon 2001-07-10 03:51:22 - path=/my-struts-example :action: Setting locale 'en' 2001-07-10 03:51:22 - path=/my-struts-example :action: Looking for ActionForm bean under attribute 'logonForm' 2001-07-10 03:51:22 - path=/my-struts-example :action: Creating new ActionForm instance of class 'LogonForm' 2001-07-10 03:51:22 - path=/my-struts-example :action: Storing instance under attribute 'logonForm' in scope 'request' 2001-07-10 03:51:22 - path=/my-struts-example :action: Populating bean properties from this request 2001-07-10 03:51:22 - path=/my-struts-example :action: Validating input form properties 2001-07-10 03:51:22 - path=/my-struts-example :action: No errors detected, accepting input 2001-07-10 03:51:22 - path=/my-struts-example :action: Looking for Action instance for class LogonAction 2001-07-10 03:51:22 - path=/my-struts-example :action: Double checking for Action instance already there 2001-07-10 03:51:22 - path=/my-struts-example :action: Creating new Action instance 2001-07-10 03:51:25 - path=/my-struts-example :jsp: init servlet.log David Winterfeldt wrote: If the debug is greater than zero when you are initializing the ValidatorServlet, you should see the the form values being printed to standard out. Can you see anything? This is a good check as to whether the resource is loading. Do you have the error messages defined in your messages resources? The default one for required is 'errors.required'. David --- David White [EMAIL PROTECTED] wrote: I have a small and simple web app that I have working with vanilla struts. I am trying to incorporate the struts validator mechanism by converting just one form. To do so, I have done the following: Placed the Struts_Validator-20010702.jar into the web app's lib dir. Place the jakarta-regexp-1.2.jar into the web app's lib dir. Place the struts-validator.tld into the web app's WEB-INF dir (along with the struts tag lib files). Copy the example validation.xml file into the web app's WEB-INF dir. Removed all but one form from the default (no locale) formset. Edited each field so that it depends on require only. Removed all the localized formsets. Cut paste from the validator servlet
logic:iterator indexId?
Hi Everyone, Anybody knows how to use the indexId in the logic:iterator tag? Will it give us indexed html form element? Please hell... Thanks, Lucas
would transactional token help in this case? (could be a threading issue?)
Hi, I have an application in which I havent used transactional tokens. I have a text field where I defined a onchange=preprocess() which sets a value and then submits the form. Heres the behaviour I see: a. It works 'perfectly' when I change the value and move the focus out of this text box (it gets submitted). b. It works 'alright' (for some reason this takes longer to process than the above case) when I hit enter in the text field c. It sometimes throws an error when I do step (a) followed by step (b) without waiting for the control to return from step (a). The kind of error I am getting (I would have to explain my program in detail to exactly say what this error is) leads me to suspect that two threads are trying to access/change the data in the form bean. Has anyone seen this behaviour before or knows if using transactional tokens would help in this case? (I am suspecting not from what I know of the way they work ...) Also note that this form/application worked well when I did not use onclick - i.e. using the default behaviour of submitting the value of the text field when you hit enter ... Thanks Pratima -Original Message- From: Ryan Cornia [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 10, 2001 7:49 AM To: [EMAIL PROTECTED] Subject: Error-page in web.xml I'm hoping someone can help me understand this better. In web.xml, I have the following entries - error-page exception-typejava.lang.Exception/exception-type location/errorpage.jsp/location /error-page error-page exception-typejavax.servlet.ServletException/exception-type location/errorpagesrvlt.jsp/location /error-page From my understanding, anytime an Exception, or ServletException occurs in my application, it will call either errorpage.jsp or errorpagesrvlt.jsp. Is that correct? Does it matter if the exception occurs in a JSP or a servlet? This seems to work in Tomcat, but with SilverStream, I don't get taken to the error page, but get the SilverStream generate error message. In my errorpage.jsp I have - %@ page language=Java isErrorPage=true% is that right? Thanks for any insite, this is driving me crazy. Ryan
Re: Error: org.apache.struts.action.MESSAGE
check if u specified the applicationResourcefile in the web.xml as init-param param-name application /param-name param-value example.applicationResource /param-value /init-param If u using bean:message tag in the Jsp then the application REsources should have been loaded before Check that Suhas - Original Message - From: Pathangi, Rao H. [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, July 10, 2001 9:00 PM Subject: Error: org.apache.struts.action.MESSAGE Hi What exactly does this error mean?? I have a JSP (using a few Struts tags) with the action beans working with a couple of EJB's. I have successfully deployed it in the Websphere Test Environment using VA 3.5.3. I am trying to deploy the same application on WAS 3.5 Patch 2 and I get the following/well known error when I try to hit my JSP. If Iam correct, this has to do with the web.xml, struts-config.xml files and the addition of the servlets to the servlet container. Error 500 An error has occured while processing request:http://xxx.yyy.com/phase3order.jsp Message: Server caught unhandled exception from servlet [JSP 1.1 Processor]: Cannot find message resources under key org.apache.struts.action.MESSAGE Could some one throw some light on this puhlease Regards Hemant Pathangi
Report to Recipient(s)
Incident Information:- Originator:suhas [EMAIL PROTECTED] Recipients:[EMAIL PROTECTED] Subject: Re: Error: org.apache.struts.action.MESSAGE Message from suhas [EMAIL PROTECTED] was quarantined because it contained banned content.