Non-Struts related : input one text field then show description in anotherfield
Need somebody help! I have one jsp page with one zip code text field and one state text field. I want when user input the zipcode text , onblur that zip code field then the state text field shows the state related to that zipcode. what kind of bean or tag lib do I need to perform this task? I want it to perform on client side(javascript) . Note:Zipcode and State are stored in the database Look forward to hearing the solution Sutiwan W. This E-mail and any files transmitted with it are confidential and intended for the sole use of the individual or entity to whom they are addressed. If you have received this E-mail in error please notify the system manager. This E-mail message has been swept for the presence of computer viruses. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
[ANN] Struts QA Distilled, Vol#1
Struts QA Distilled is a catalogue of question-and-answers distilled from Struts mailing lists and other sources. The catalogue is organized in topics. New entries are added to the catalogue periodically in batches. This is the first volume. http://www.scioworks.net/servlets/ShowPage?pid=31dp=3 This volume covers: Q1: What is the advantage of using multiple sub-applications as compared to using multiple servlets? Q2: Is there any thing I have to watch out if I want to migrate from 1.0 to 1.1 to take advantage of the sub-applications support? Q3: How to navigate from one sub-application to another sub-application? Q4: I found I was spending a lot of time shutting down and restarting the servlet container to reload the struts-config.xml, Action classes or resource bundles while developing. Is there a better way to do this? Q5: How to configure Struts to allow a given action mapping to be executed only if the request is of a specific HTTP method (e.g. GET or POST)? Q6: Why do I get a java.security.AccessControlException exception? Q7: I use html:html locale=true in a page, but the browser still tries to render the page in Western European (ISO) charset no matter what locale it is. Why? Q8: Apart from using bean:message and resource bundles, is there an alternative to internationalize long static paragraphs in JSP or HTML files? Q9: I want to use bean:message to internationalize the JSPs. However, certain encoded texts (e.g. encoded in Chinese Big5) in my resource files contain braces { which are confused as formatting arguments. What can I do? Q10: How to stream binary data (e.g. *.xls) back to the user from an Action? -- John Yu Scioworks Technologies e: [EMAIL PROTECTED] w: +(65) 873 5989 w: http://www.scioworks.com m: +(65) 9782 9610 Scioworks Camino - Don't develop Struts Apps without it!
RE: Non-Struts related : input one text field then show description inanother field
Really Sorry if my question confused you... I would like to perform it on client side but not know how to do it yet.. : ( Are there any way able to generate javascript function to populate the zipcode and the state in Map or something like that (cannot not use array cuz I want to use the zipcode as key and state as value). when user finish fill in the zipcode field , call that javascript function to show the associated state on another text field. Sutiwan W. neal nealcabage@ya To: Struts Users Mailing List [EMAIL PROTECTED] hoo.com cc: Subject: RE: Non-Struts related : input one text field then show 08/20/2002description in another field 01:59 PM Please respond to Struts Users Mailing List Sounds like you're saying that you want to cause the page to submit on the onBlur event, correct? Try something like this: input type=text onBlur=this.form.submit() / And then course you would do the lookup server-side and return the page with the revised list of zipcodes, per the chosen state. This is a similar sort of thing to what ASP.NET does with postback. Note though that onBlur probably won't work with NN4 and possibly not NN6...last I checked it was an event only listened to by MSIE. Also note that this implies making a lot of round trips to the server, which might decrease performance of you app in high-traffic scenarios. Cheers. Neal -Original Message- From: Sutiwan Kariya [mailto:[EMAIL PROTECTED]] Sent: Monday, August 19, 2002 11:25 PM To: [EMAIL PROTECTED] Subject: Non-Struts related : input one text field then show description in another field Need somebody help! I have one jsp page with one zip code text field and one state text field. I want when user input the zipcode text , onblur that zip code field then the state text field shows the state related to that zipcode. what kind of bean or tag lib do I need to perform this task? I want it to perform on client side(javascript) . Note:Zipcode and State are stored in the database Look forward to hearing the solution Sutiwan W. This E-mail and any files transmitted with it are confidential and intended for the sole use of the individual or entity to whom they are addressed. If you have received this E-mail in error please notify the system manager. This E-mail message has been swept for the presence of computer viruses. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] This E-mail and any files transmitted with it are confidential and intended for the sole use of the individual or entity to whom they are addressed. If you have received this E-mail in error please notify the system manager. This E-mail message has been swept for the presence of computer viruses. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Non-Struts related : input one text field then show description in another field
Aah - I see what you're saying. Well, I don't know if this is for Intranet or internet purposes but either way I'm presumign you don't want to make the user download a list of all possible postal codesthat would be one large page. :) How about if you defined a multideminsional array, wherein there are three deminsions: state, minimum postal code, and maximum postal. You could then compare whatever the user enters against the postal code range, per state, to determine which state is applicable. In which case you would again just define a method for the onBlur event. In this case it would be a user-defined method that would do an integer comparison of the input value, against the 2nd and 3rd dimensions of the array, in order to the correct index ... to get you the correct state contained in the first dimension. From there of course its just a matter of assigning that value to your state input field. I hope this time I answered the question you were asking. :) N -Original Message- From: Sutiwan Kariya [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 20, 2002 12:14 AM To: Struts Users Mailing List Subject: RE: Non-Struts related : input one text field then show description in another field Really Sorry if my question confused you... I would like to perform it on client side but not know how to do it yet.. : ( Are there any way able to generate javascript function to populate the zipcode and the state in Map or something like that (cannot not use array cuz I want to use the zipcode as key and state as value). when user finish fill in the zipcode field , call that javascript function to show the associated state on another text field. Sutiwan W. neal nealcabage@ya To: Struts Users Mailing List [EMAIL PROTECTED] hoo.com cc: Subject: RE: Non-Struts related : input one text field then show 08/20/2002description in another field 01:59 PM Please respond to Struts Users Mailing List Sounds like you're saying that you want to cause the page to submit on the onBlur event, correct? Try something like this: input type=text onBlur=this.form.submit() / And then course you would do the lookup server-side and return the page with the revised list of zipcodes, per the chosen state. This is a similar sort of thing to what ASP.NET does with postback. Note though that onBlur probably won't work with NN4 and possibly not NN6...last I checked it was an event only listened to by MSIE. Also note that this implies making a lot of round trips to the server, which might decrease performance of you app in high-traffic scenarios. Cheers. Neal -Original Message- From: Sutiwan Kariya [mailto:[EMAIL PROTECTED]] Sent: Monday, August 19, 2002 11:25 PM To: [EMAIL PROTECTED] Subject: Non-Struts related : input one text field then show description in another field Need somebody help! I have one jsp page with one zip code text field and one state text field. I want when user input the zipcode text , onblur that zip code field then the state text field shows the state related to that zipcode. what kind of bean or tag lib do I need to perform this task? I want it to perform on client side(javascript) . Note:Zipcode and State are stored in the database Look forward to hearing the solution Sutiwan W. This E-mail and any files transmitted with it are confidential and intended for the sole use of the individual or entity to whom they are addressed. If you have received this E-mail in error please notify the system manager. This E-mail message has been swept for the presence of computer viruses. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] This E-mail and any files transmitted with it are confidential and intended for the sole use of the individual or entity to whom they are addressed. If you have received this E-mail in error please notify the system manager. This E-mail message has been swept for the presence of computer viruses. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Non-Struts related : input one text field then show description inanother field
That's Right! : D but worse that the zipcode associates not only state but associate city also. huh... seems I gotta download a list of possible zipcode to the page and call javascript to handle it. Are there any better ways? Really thanx, Sutiwan W. neal nealcabage@ya To: Struts Users Mailing List [EMAIL PROTECTED] hoo.com cc: Subject: RE: Non-Struts related : input one text field then show 08/20/2002description in another field 02:21 PM Please respond to Struts Users Mailing List Aah - I see what you're saying. Well, I don't know if this is for Intranet or internet purposes but either way I'm presumign you don't want to make the user download a list of all possible postal codesthat would be one large page. :) How about if you defined a multideminsional array, wherein there are three deminsions: state, minimum postal code, and maximum postal. You could then compare whatever the user enters against the postal code range, per state, to determine which state is applicable. In which case you would again just define a method for the onBlur event. In this case it would be a user-defined method that would do an integer comparison of the input value, against the 2nd and 3rd dimensions of the array, in order to the correct index ... to get you the correct state contained in the first dimension. From there of course its just a matter of assigning that value to your state input field. I hope this time I answered the question you were asking. :) N -Original Message- From: Sutiwan Kariya [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 20, 2002 12:14 AM To: Struts Users Mailing List Subject: RE: Non-Struts related : input one text field then show description in another field Really Sorry if my question confused you... I would like to perform it on client side but not know how to do it yet.. : ( Are there any way able to generate javascript function to populate the zipcode and the state in Map or something like that (cannot not use array cuz I want to use the zipcode as key and state as value). when user finish fill in the zipcode field , call that javascript function to show the associated state on another text field. Sutiwan W. neal nealcabage@ya To: Struts Users Mailing List [EMAIL PROTECTED] hoo.com cc: Subject: RE: Non-Struts related : input one text field then show 08/20/2002description in another field 01:59 PM Please respond to Struts Users Mailing List Sounds like you're saying that you want to cause the page to submit on the onBlur event, correct? Try something like this: input type=text onBlur=this.form.submit() / And then course you would do the lookup server-side and return the page with the revised list of zipcodes, per the chosen state. This is a similar sort of thing to what ASP.NET does with postback. Note though that onBlur probably won't work with NN4 and possibly not NN6...last I checked it was an event only listened to by MSIE. Also note that this implies making a lot of round trips to the server, which might decrease performance of you app in high-traffic scenarios. Cheers. Neal -Original Message- From: Sutiwan Kariya [mailto:[EMAIL PROTECTED]] Sent: Monday, August 19, 2002 11:25 PM To: [EMAIL PROTECTED] Subject: Non-Struts related : input one text field then show description in another field Need somebody help! I have one jsp page with one zip code text field and one state text field. I want when user input the zipcode
RE: [ANN] Struts QA Distilled, Vol#1
Thanks John! Its great to see a company showing its commitment to the open source culture of Struts by opening up its internal knowledge bases collections of resources resource links like this to share with the rest of the developer community. Im sure this will become one of the first places struts developers will look towards to find their answers :-) Keep up the good work! -Original Message- From: John Yu [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 20, 2002 14:54 To: [EMAIL PROTECTED] Subject: [ANN] Struts QA Distilled, Vol#1 Struts QA Distilled is a catalogue of question-and-answers distilled from Struts mailing lists and other sources. The catalogue is organized in topics. New entries are added to the catalogue periodically in batches. This is the first volume. http://www.scioworks.net/servlets/ShowPage?pid=31dp=3 This volume covers: Q1: What is the advantage of using multiple sub-applications as compared to using multiple servlets? Q2: Is there any thing I have to watch out if I want to migrate from 1.0 to 1.1 to take advantage of the sub-applications support? Q3: How to navigate from one sub-application to another sub-application? Q4: I found I was spending a lot of time shutting down and restarting the servlet container to reload the struts-config.xml, Action classes or resource bundles while developing. Is there a better way to do this? Q5: How to configure Struts to allow a given action mapping to be executed only if the request is of a specific HTTP method (e.g. GET or POST)? Q6: Why do I get a java.security.AccessControlException exception? Q7: I use html:html locale=true in a page, but the browser still tries to render the page in Western European (ISO) charset no matter what locale it is. Why? Q8: Apart from using bean:message and resource bundles, is there an alternative to internationalize long static paragraphs in JSP or HTML files? Q9: I want to use bean:message to internationalize the JSPs. However, certain encoded texts (e.g. encoded in Chinese Big5) in my resource files contain braces { which are confused as formatting arguments. What can I do? Q10: How to stream binary data (e.g. *.xls) back to the user from an Action? -- John Yu Scioworks Technologies e: [EMAIL PROTECTED] w: +(65) 873 5989 w: http://www.scioworks.com m: +(65) 9782 9610 Scioworks Camino - Don't develop Struts Apps without it! -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Non-Struts related : input one text field then show description in another field
So, you just want to determine the city and state, based upon the user's input zip code? I think the best thing to do would just break that form up into steps (first get the zip code, submit the page, and come back with that data from the servlet). Sucks to have to do that but if there's that much data you might not have a choise unless you want to employ some sort of fat client that can make socket callbacks ... or you could use the iFrame as Joe suggested. This would also give you the feeling of doing it dynamically as the whole page wouldn't have to redraw. Good luck. N -Original Message- From: Sutiwan Kariya [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 20, 2002 12:40 AM To: Struts Users Mailing List Subject: RE: Non-Struts related : input one text field then show description in another field That's Right! : D but worse that the zipcode associates not only state but associate city also. huh... seems I gotta download a list of possible zipcode to the page and call javascript to handle it. Are there any better ways? Really thanx, Sutiwan W. neal nealcabage@ya To: Struts Users Mailing List [EMAIL PROTECTED] hoo.com cc: Subject: RE: Non-Struts related : input one text field then show 08/20/2002description in another field 02:21 PM Please respond to Struts Users Mailing List Aah - I see what you're saying. Well, I don't know if this is for Intranet or internet purposes but either way I'm presumign you don't want to make the user download a list of all possible postal codesthat would be one large page. :) How about if you defined a multideminsional array, wherein there are three deminsions: state, minimum postal code, and maximum postal. You could then compare whatever the user enters against the postal code range, per state, to determine which state is applicable. In which case you would again just define a method for the onBlur event. In this case it would be a user-defined method that would do an integer comparison of the input value, against the 2nd and 3rd dimensions of the array, in order to the correct index ... to get you the correct state contained in the first dimension. From there of course its just a matter of assigning that value to your state input field. I hope this time I answered the question you were asking. :) N -Original Message- From: Sutiwan Kariya [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 20, 2002 12:14 AM To: Struts Users Mailing List Subject: RE: Non-Struts related : input one text field then show description in another field Really Sorry if my question confused you... I would like to perform it on client side but not know how to do it yet.. : ( Are there any way able to generate javascript function to populate the zipcode and the state in Map or something like that (cannot not use array cuz I want to use the zipcode as key and state as value). when user finish fill in the zipcode field , call that javascript function to show the associated state on another text field. Sutiwan W. neal nealcabage@ya To: Struts Users Mailing List [EMAIL PROTECTED] hoo.com cc: Subject: RE: Non-Struts related : input one text field then show 08/20/2002description in another field 01:59 PM Please respond to Struts Users Mailing List Sounds like you're saying that you want to cause the page to submit on the onBlur event, correct? Try something like this: input type=text onBlur=this.form.submit() / And then course you would do the lookup server-side and return the page with the revised list of zipcodes, per the chosen state. This is a similar sort of thing to what ASP.NET does with postback. Note though that onBlur probably won't work with NN4 and possibly not NN6...last I checked it was an event only listened to by MSIE. Also note that this implies making a lot of round trips to the server, which might decrease performance of you app in high-traffic scenarios. Cheers. Neal -Original Message- From: Sutiwan Kariya [mailto:[EMAIL PROTECTED]] Sent: Monday, August 19, 2002 11:25 PM To: [EMAIL PROTECTED] Subject: Non-Struts related : input one text field then show description in another field Need somebody help! I have one jsp page with one zip code text field and one state text field. I want when user input the zipcode text , onblur that zip code field then the state text field shows the state related to that zipcode. what kind of bean or tag lib do I need to perform this task? I want it to
PB to run a simple login app
Hi, i done the following intallations: - sdk 1.4 - j2ee 1.3.1 - Tomcat 4.0.4 - Struts 1.0.2 - Eclipse 2.0 - Tomcat eclipse plugin - Easy struts eclipse plugin - struts config file editor. I made a simple application, that asks for a login and a passsword. - I launch tomcat - I launch my web navigator - http://localhos:8080/myApp/form/userLoginForm.jsp = An error occured with actionmappings. I read somewhere that it would come from my xml parser. Any idea. I installed nothing more that i describe on top thanks in advance Fred
upload question
Hi, Just a quick question. Why do I get garbage when I upload a jpeg or gif image file when using the upload example in struts? I can see the image if I navigate to it in my local fs using my browser but not by using the example upload war app. Cheers jfc -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: upgrade 1.1-b1 to 1.1-b2 breaks indexed attribute under iterate ?
Hi, It looks like you are right Raffy. The first here is the result of using 1.1-b2 (does not work) - td align=CENTER input type=submit name=cmd[17] value=Approve class=tableButton title=help text for approvescreen.button.approve /td and this is what results using 1.1-b1 (works fine) - td align=CENTER input type=submit name=cmd[12] value=Approve class=tableButton title=help text for approvescreen.button.approve alt=???en_GB.null??? /td I guess it is a bug ? Dan -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: 19 August 2002 20:38 To: Struts Users Mailing List Subject: Re: upgrade 1.1-b1 to 1.1-b2 breaks indexed attribute under iterate ? Take a look at your source code (view jsp source) The source being generate for the submit button is input type=submit name=cmd[0] value=Edit where the [0] is outside the quotes. The generated code should be input type=submit name=cmd[0] value=Edit With the currently generated source, when the form is submitted, beanUtils looks for a setCmd(String value) method instead of setCmd(int index, String value). Is it a bug? Daniel Haynes [EMAIL PROTECTED] on 08/19/2002 10:31:39 AM Please respond to Struts Users Mailing List [EMAIL PROTECTED] To: '[EMAIL PROTECTED]' [EMAIL PROTECTED] cc: Subject: upgrade 1.1-b1 to 1.1-b2 breaks indexed attribute under iterate ? Hi All, I've been attempting to upgrade a web app from jakarta-struts-1.1-b1 to jakarta-struts-1.1-b2.zip and it appears to be breaking some code. Specifically a piece of code 'Using the Indexed Attribute in the Scope of the Iterate Tag' (as in 'Using Struts' by Maturo). jsp:- logic:iterate id=approvalList collection=%= approvals % ... td align=CENTER html:submit indexed=true property=cmd value=Details styleClass=tableButton titleKey=approvescreen.button.details/ /td ActionForm: - private int index; private String cmd; public void setCmd(int index, String value) { this.index = index; cmd = value; } public String getCmd(int index) { return cmd; } public String getCmd() { return cmd; } public int getIndex() { return index; } When changing from jakarta-struts-1.1-b1 to jakarta-struts-1.1-b2 I get a browser error: java.lang.reflect.InvocationTargetException: Cannot set cmd at org.apache.commons.beanutils.BeanUtils.setProperty(BeanUtils.java:922) at org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:726) at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:978) at org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.j ava:779) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:246) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1292) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:510) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application FilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh ain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja va:243) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 66) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja va:190) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 66) at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:2 46) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 64) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2343) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180 ) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 66) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve. java:170) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 64) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170 ) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 64) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 64) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at
RE: Log4JCategoryLog does not implement Log after upgrade to Struts 1.1-b2
Check the archives and the struts download page for log4j issues. You probably do not have the log4j factory in the commons-logging jar. Cal http://www.calandva.com/ -Original Message- From: Anthony Martin [mailto:[EMAIL PROTECTED]] Sent: Monday, August 19, 2002 15:02 To: Struts User List (E-mail) Subject: Log4JCategoryLog does not implement Log after upgrade to Struts 1.1-b2 What could cause this type of error in my index.jsp? It started after I upgraded to Struts 1.1-b2, but I get this message even after going back to the previous version. I'm sure it some configuration on this workstation because my other workstation was fine after the upgrade. Any hints or ideas would be helpful... java.lang.ExceptionInInitializerError: org.apache.commons.logging.LogConfigurationException: org.apache.commons.logging.LogConfigurationException: org.apache.commons.logging.LogConfigurationException: Class org.apache.commons.logging.impl.Log4JCategoryLog does not implement Log at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.ja va:530) at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.ja va:285) at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.ja va:255) at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:375) at org.apache.struts.util.MessageResources.clinit(MessageResources.java:105) at org.apache.struts.taglib.bean.MessageTag.clinit(MessageTag.java:257) at org.apache.jsp.index$jsp._jspService(index$jsp.java:106) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja va:202) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:382) . . . Anthony -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
How to put things in the ServletContext
Hello, Apologies if this is an obvious one I've missed, (I'm a newbie and a bit bewildered by the onslaught of new information). But I want to put the home interface for an ejb into the servlet context to save time with multiple jndi lookups. Traditionally this is easily done in the servlet init() method and by making it a static member of the servlet. But I don't have access to this anymore since everything goes through the action servlet. Is there a way of putting stuff into the init() method of the action servlet without faffing around with subclassing it? I've found the DataSource and connection pool stuff, is this what I need? Can I have application context without the pool? Would there be any consequences of creating a pool with just one entry? Many thanks for your help, Adam. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
focus on a radio button (causes a javascript exception) with Strutsform tag
Gilles Vandaele - Forwarded by Gilles Vandaele/SMALS-MVM on 20/08/2002 11:21 - Gilles.Vandaele@smal s-mvm.be To:[EMAIL PROTECTED] cc: 19/08/2002 12:25 Subject: focus on a radio button causes a javascript exception Please respond to Struts Users Mailing List if I use a tag ...html:form action=/FieldList focus= %=sFirstFocusedField%... for a variable sFirstFocusedField who can be the name of any generated input field of my html form; the javascript exception: document.forms.FieldListForm.elements.field4.focus is not a function happend when sFirstFocusedField is the name of a radiobutton. I think that it can't go trough because the same name is used for any radio of the same group. The focus attribute need the name of the field to receive focus. So... any idea to go trough? (or did I mistaken?) Gilles Vandaele -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Setting array of string in DynaActionForm
Try this one form-property name=selectedSite type=java.lang.String[]/ I removed the space between String and [] HTH, robert -Original Message- From: Stephen Ting [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 20, 2002 12:04 AM To: [EMAIL PROTECTED] Subject: Setting array of string in DynaActionForm I hv a dynamic form and having problems to create array property in DynaActionForm. The following exception thrown when i reference to it. Could anyone help out!! regards, Stephen form-bean name=InventoryEnquiryForm dynamic=true type=org.apache.struts.action.DynaActionForm form-property name=itemNo type=java.lang.String/ form-property name=description type=java.lang.String/ form-property name=selectedSite type=java.lang.String []/ form-property name=searchLogic type=java.lang.String/ form-property name=view type=java.util.ArrayList/ /form-bean javax.servlet.ServletException: Servlet.init() for servlet action threw exception at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.jav a:935) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:808) at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.j ava:3266) at org.apache.catalina.core.StandardContext.start(StandardContext.java:3395 ) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:785) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:454) at org.apache.catalina.core.StandardHost.install(StandardHost.java:714) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:300) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:389) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:23 2) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSu pport.java:155) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1131) at org.apache.catalina.core.StandardHost.start(StandardHost.java:614) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1123) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:343) at org.apache.catalina.core.StandardService.start(StandardService.java:388) at org.apache.catalina.core.StandardServer.start(StandardServer.java:506) at org.apache.catalina.startup.Catalina.start(Catalina.java:781) at org.apache.catalina.startup.Catalina.execute(Catalina.java:681) at org.apache.catalina.startup.Catalina.process(Catalina.java:179) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav a:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor Impl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:243) - Root Cause - java.lang.NullPointerException at java.lang.reflect.Array.newArray(Native Method) at java.lang.reflect.Array.newInstance(Array.java:52) at org.apache.struts.config.FormPropertyConfig.getTypeClass(FormPropertyCon fig.java:239) at org.apache.struts.action.DynaActionFormClass.introspect(DynaActionFormCl ass.java:406) at org.apache.struts.action.DynaActionFormClass.init(DynaActionFormClass. java:112) at org.apache.struts.action.DynaActionFormClass.createDynaActionFormClass(D ynaActionFormClass.java:315) at org.apache.struts.action.ActionServlet.initApplicationConfig(ActionServl et.java:883) at org.apache.struts.action.ActionServlet.init(ActionServlet.java:455) at javax.servlet.GenericServlet.init(GenericServlet.java:258) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.jav a:916) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:808) at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.j ava:3266) at org.apache.catalina.core.StandardContext.start(StandardContext.java:3395 ) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:785) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:454) at org.apache.catalina.core.StandardHost.install(StandardHost.java:714) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:300) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:389) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:23 2) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSu pport.java:155) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1131) at org.apache.catalina.core.StandardHost.start(StandardHost.java:614) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1123) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:343) at
RE: How to put things in the ServletContext
Adam, take a look at javax.servlet.ServletContextListener. You have access to ServletContext via the ServletContextEvent in contextInitialized(). /** * Called just after the web application has been initialized * * @param event the ServletContextEvent containing the ServletContext */ public void contextInitialized(ServletContextEvent event) { ServletContext context = event.getServletContext(); Object o = //get home interface context.setAttribute(someName, o); // other stuff here } HTH, robert -Original Message- From: Adam Connors [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 20, 2002 5:16 AM To: [EMAIL PROTECTED] Subject: How to put things in the ServletContext Hello, Apologies if this is an obvious one I've missed, (I'm a newbie and a bit bewildered by the onslaught of new information). But I want to put the home interface for an ejb into the servlet context to save time with multiple jndi lookups. Traditionally this is easily done in the servlet init() method and by making it a static member of the servlet. But I don't have access to this anymore since everything goes through the action servlet. Is there a way of putting stuff into the init() method of the action servlet without faffing around with subclassing it? I've found the DataSource and connection pool stuff, is this what I need? Can I have application context without the pool? Would there be any consequences of creating a pool with just one entry? Many thanks for your help, Adam. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: tons of tiles debug messages!
Cedric There is a debug flag set to true in the TilesRequestProcessor. Can you make it configurable? Do I open a bug? Cal http://www.calandva.com/ -Original Message- From: Cedric Dumoulin [mailto:[EMAIL PROTECTED]] Sent: Sunday, August 18, 2002 17:38 To: Struts Users Mailing List Subject: Re: tons of tiles debug messages! hi, This is for struts 1.1b2. For struts 1.0.x, you specify definition factory configuration in web.xml. Attribute names and values are the same. In your case, set all debug attributes to 0 (zero), or remove them from web.xml (zero is the default value). Cedric mpopovits.rm wrote: Is this for Struts 1.1 or 1.0? I'm using Struts 1.0. If so, where does it go in the struts config file. Thanks, Michelle --- In [EMAIL PROTECTED], Herve Tchepannou [EMAIL PROTECTED] wrote: The debug configuation should be in your Tile-Plugin configuration. Make sure that the Tiles plugin is defined like this in your struts-config.xml file: !-- == Plugins Definitions == - - plug-in className=org.apache.struts.tiles.TilesPlugin set-property property=definitions-config value=/WEB-INF/tiles-defs.xml / set-property property=definitions-debug value=0 / set-property property=definitions-parser-details value=0 / set-property property=definitions-parser-validate value=true / /plug-in -Original Message- From: mpopovits.rm [mailto:mpopovits@h...] Sent: Friday, August 16, 2002 11:28 AM To: [EMAIL PROTECTED] Subject: tons of tiles debug messages! When I bring up my weblogic server which uses tiles I get pages and pages of tiles debug messages from the apache commons digester. How do I get rid of these? I've reduced my action servlet debug parms all down to 0, but they still torment me. -Please help. Thanks, Michelle Here's my action servlet config from web.xml. servlet servlet-nameaction/servlet-name !-- Specify servlet class to use If you also plan to use Struts, use ActionComponentServlet If you don't need Struts, use TilesServlet -- servlet- classorg.apache.struts.tiles.ActionComponentServlet/servlet- class !-- Tiles Servlet parameter Specify configuration file names. There can be several comma separated file names -- init-param param-namedefinitions-config/param-name param-value/WEB-INF/tiles-defs.xml/param-value /init-param !-- Tiles Servlet parameter Specify Tiles debug level. O : no debug information 1 : debug information 2 : more debug information -- init-param param-namedefinitions-debug/param-name param-value0/param-value /init-param !-- Tiles Servlet parameter Specify Digester debug level. This value is passed to Digester O : no debug information 1 : debug information 2 : more debug information -- init-param param-namedefinitions-parser-details/param-name param-value0/param-value /init-param !-- Tiles Servlet parameter Specify if xml parser should validate the Tiles configuration file. true : validate. DTD should be specified in file header. false : no validation -- init-param param-namedefinitions-parser-validate/param-name param-valuetrue/param-value /init-param init-param param-nameapplication/param-name param-valueApplicationResources/param-value /init-param init-param param-nameconfig/param-name param-value/WEB-INF/struts-config.xml/param-value /init-param init-param param-namedebug/param-name param-value0/param-value /init-param init-param param-namedetail/param-name param-value0/param-value /init-param init-param param-namevalidate/param-name param-valuetrue/param-value /init-param init-param param-namenocache/param-name param-valuetrue/param-value /init-param load-on-startup2/load-on-startup /servlet servlet servlet-namevalidator/servlet-name servlet- classcom.wintecinc.struts.action.ValidatorServlet/servlet-class init-param param-nameconfig/param-name param-value/WEB-INF/validation.xml/param-value /init-param init-param param-namedebug/param-name param-value0/param-value /init-param load-on-startup2/load-on-startup /servlet --here's an excerpt of the messages that I get on the console 2002-08-16 11:21:44,619 DEBUG org.apache.commons.digester.Digester.sax - startEl ement(,tiles-definitions,tiles-definitions) 2002-08-16 11:21:44,619 DEBUG org.apache.commons.digester.Digester - Pushing b ody text ''
Upload timed out
I have Apache and Tomcat 4.0.3 connected by mod_jk, at the same machine. When one user tries to upload a file with struts, he obtains the error: java.net.SocketTimeoutException: Read timed out at java.net.SocketInputStream.socketRead0(Native Method) at java.net.SocketInputStream.read(SocketInputStream.java:116) at org.apache.ajp.Ajp13.readN(Ajp13.java:429) at org.apache.ajp.Ajp13.receive(Ajp13.java:469) at org.apache.ajp.RequestHandler.refillReadBuffer(RequestHandler.java:711) at org.apache.ajp.RequestHandler.doRead(RequestHandler.java:682) at org.apache.ajp.Ajp13.doRead(Ajp13.java:354) at org.apache.ajp.tomcat4.Ajp13InputStream.read(Ajp13InputStream.java:99) at org.apache.struts.upload.BufferedMultipartInputStream.fill(BufferedMultipartInputStream.java:263) at org.apache.struts.upload.BufferedMultipartInputStream.read(BufferedMultipartInputStream.java:156) at org.apache.struts.upload.BufferedMultipartInputStream.readLine(BufferedMultipartInputStream.java:228) at org.apache.struts.upload.MultipartIterator.createLocalFile(MultipartIterator.java:488) at org.apache.struts.upload.MultipartIterator.getNextElement(MultipartIterator.java:217) at org.apache.struts.upload.DiskMultipartRequestHandler.handleRequest(DiskMultipartRequestHandler.java:76) at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:735) at org.apache.struts.action.ActionServlet.processPopulate(ActionServlet.java:2061) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1564) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:510) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1564) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:510) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566) at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2347) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.ajp.tomcat4.Ajp13Processor.process(Ajp13Processor.java:458) at org.apache.ajp.tomcat4.Ajp13Processor.run(Ajp13Processor.java:551) at java.lang.Thread.run(Thread.java:536) And this error appears at the same time he push the button upload. From my computer I don't have this problem. Does any one know what's happening ? Thanks ___ Wanadoo España S.L. Herramientas Corporativas / Analista Desarrollo David Arroyo Pérez / [EMAIL
RE: separating status messages and error messages-Getting the design right.
Amol, I'm very new to Struts myself...just learning my way around, really, so I'd love to hear someone else's opinion on this. The way I'd approach this is to use the logic:notPresent/ tag in the JSP to show your status message only if there isn't an error object. E.g.: logic:notPresent name=%= org.apache.struts.action.Action.ERROR_KEY % User added, any other suckers? /logic:notPresent Paul -Original Message- From: amolk [mailto:[EMAIL PROTECTED]] Sent: August 20, 2002 1:58 AM To: [EMAIL PROTECTED] Subject: separating status messages and error messages-Getting the design right. Hi all, I have just shifted from servlets to jsp + struts. I am still new to both. I have to create some jsp pages corresponding to some user actions. For example, the application administrator can click on add user link ( from left band menu which is in a separete frame ) and will be presented with a form which he can fill can click on add to add the user. On submit, the corresponding action class's perform is invoked and the same page has to be shown back to the user, this time, with a status message saying user added successfully. Add another? If the operation fails, an appropriate message is displayed using the html:errors/ My problem is the following: Where do i handle these status messages? Each page is viewed by the user in two different scenarios. 1. When the user wishes to perform some task. This time, there is no status, error message to be shown. Just the jsp page, directly. 2. After the user fill out the form and submits it. The same form reappears with the appropriate status or error message. Should i be mixing status and error messages? In that case, how do i handle different headers and footers for the two? Or should i be using some custom tags? Hve been trying out custom tags but since am still new to all this, ( jsp as well as struts. have been using only servlets till now!!! ) am not able to take design design decisions based on custom libraries, and stuff. I would go for a design where maximum html code is present in the jsp file itself so that my page designers can freely modify/manage it. Any suggestions? I am not using tiles or anything else. Too many new things to handle @ a time, specially since i am new to jsp itself!! thnx in advance, amol -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
[ANNOUNCE] Struts Console v2.1
Struts Console version 2.1 is now available. http://www.jamesholmes.com/struts/ Download Now: http://www.jamesholmes.com/struts/struts-console-2.1.zip -- OR -- http://www.jamesholmes.com/struts/struts-console-2.1.tar.gz Struts Console is FREE software. This release adds support for the IntelliJ IDEA IDE, one of the favorites of many developers. Changes with Struts Console v2.1 *) Fixed bug where the initial attribute of the form-property element was getting set to blank when it wasn't specified. *) Added plugin support for IntelliJ IDEA. Thanks, -james [EMAIL PROTECTED] http://www.jamesholmes.com/struts/ __ Do You Yahoo!? HotJobs - Search Thousands of New Jobs http://www.hotjobs.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Tiles Definition Bug ?
I have a action that use validation And at the input attribute I need to put a definition !!! How I don't get to put the definition directly, I create another action only forward to the definition... action path=/customerValidator forward=def.cadastro.identificacao/ action path=/customer type=classe scope=request name=customerForm input=/customerValidator.do parameter=method validate=true ... /action But I get another problem. My definition use the controllerUrl, but when happend a validator error, the customerValidator action forward to def.cadastro.identificacao but don't execute the action of the controllerUrl... this is a bug ? Thanks _ Tenha você também um MSN Hotmail, o maior webmail do mundo: http://www.hotmail.com/br -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: [ANNOUNCE] Struts Console v2.1
How can I use it for - Apache tomcat based applications? Thanks regards, Narayana Reddy PM, IRDI, India Telnet:847-1987 Work: 91-80-2051987 Home: 91-80-3541057 Mobile: 91-98451-62251 -Original Message- From: James Holmes [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 20, 2002 6:28 PM To: Struts Users Mailing List Subject: [ANNOUNCE] Struts Console v2.1 Struts Console version 2.1 is now available. http://www.jamesholmes.com/struts/ Download Now: http://www.jamesholmes.com/struts/struts-console-2.1.zip -- OR -- http://www.jamesholmes.com/struts/struts-console-2.1.tar.gz Struts Console is FREE software. This release adds support for the IntelliJ IDEA IDE, one of the favorites of many developers. Changes with Struts Console v2.1 *) Fixed bug where the initial attribute of the form-property element was getting set to blank when it wasn't specified. *) Added plugin support for IntelliJ IDEA. Thanks, -james [EMAIL PROTECTED] http://www.jamesholmes.com/struts/ __ Do You Yahoo!? HotJobs - Search Thousands of New Jobs http://www.hotjobs.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: [ANNOUNCE] Struts Console v2.1
Can you be more specific? The Struts Console is a tool for managing Struts config files. It does not support Tomcat config files, so if that's what you mean it will not help you. -james [EMAIL PROTECTED] http://www.jamesholmes.com/struts/ --- Narayana Reddy [EMAIL PROTECTED] wrote: How can I use it for - Apache tomcat based applications? Thanks regards, Narayana Reddy PM, IRDI, India Telnet:847-1987 Work: 91-80-2051987 Home: 91-80-3541057 Mobile: 91-98451-62251 -Original Message- From: James Holmes [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 20, 2002 6:28 PM To: Struts Users Mailing List Subject: [ANNOUNCE] Struts Console v2.1 Struts Console version 2.1 is now available. http://www.jamesholmes.com/struts/ Download Now: http://www.jamesholmes.com/struts/struts-console-2.1.zip -- OR -- http://www.jamesholmes.com/struts/struts-console-2.1.tar.gz Struts Console is FREE software. This release adds support for the IntelliJ IDEA IDE, one of the favorites of many developers. Changes with Struts Console v2.1 *) Fixed bug where the initial attribute of the form-property element was getting set to blank when it wasn't specified. *) Added plugin support for IntelliJ IDEA. Thanks, -james [EMAIL PROTECTED] http://www.jamesholmes.com/struts/ __ Do You Yahoo!? HotJobs - Search Thousands of New Jobs http://www.hotjobs.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] __ Do You Yahoo!? HotJobs - Search Thousands of New Jobs http://www.hotjobs.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Escaping HTML in html:multibox../
Is there a way to NOT escape HTML in the value attribute of html:multibox ... /. I'm trying to dynamically populate the value attribute using bean:write .../ and apparently the multibox tag does not process the embedded bean:write ... /. Code in JSP page: html:multibox property=upgradeLicenseKeys value=bean:write name='element' property='licenseKeyId'// HTML rendered: input type=checkbox name=upgradeLicenseKeys value=lt;bean:write name='element' property='licenseKeyId'/gt; I've tried the following as well (use single quotes to encapsulate the value's value): html:multibox property=upgradeLicenseKeys value='bean:write name=element property=licenseKeyId/'/ HTML rendered: input type=checkbox name=upgradeLicenseKeys value='lt;bean:write name=element property=licenseKeyId/gt;' I have included the appropriate page directive which imports the taglibrary: %@ taglib uri=jakarta-struts-bean prefix=bean% ...and I am using other bean:write .../ tags on the same page (not in the same fashion) and they are working properly. I found a message in the archives where the solution was to add filter=false in the bean:write tag, but the html:multibox tag has no attribute like that. I'm sure this has been solved before, I just cannot seem to find it in the archives. robert -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Problem deploying ejb combined with struts
Hi all, I have a problem deploying my application. Used configuration: JBoss 3.0 - Jetty 4.1 EJB 2.0 Servlets - Struts. When I create my application.xml I need to add a ejb module otherwise the appserver does not deploy the ejbs. But if I do, my struts are no longer accessible. This is the error : java.lang.NoClassDefFoundError: org/apache/struts/action/ActionForm If I leave the ejb module out, the struts compile and are accessible trough the JSP's but when trying to access the ejb's (since they are not deployed) Following error occurs: javax.naming.NameNotFoundException: LogonSession not bound Meaning I need to come up with a solution for this. If anyone has encountered this problem, could you please let me know, maybe I can send over my xml and .ear file so you could have a look if my structure is wrong. Thanks in advance, Les. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: separating status messages and error messages-Getting the design right.
Here's how I do it: % ActionErrors ae = ( ActionErrors) request.getAttribute( Action.ERROR_KEY); boolean err = false; if( ae != null) { err = true; } % You can also test for specific errors or for action messages. Then, wherever you want anything to occur on the page: % if( err) { % [whatever] % } % Mark -Original Message- From: Galbraith, Paul [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 20, 2002 8:38 AM Amol, I'm very new to Struts myself...just learning my way around, really, so I'd love to hear someone else's opinion on this. The way I'd approach this is to use the logic:notPresent/ tag in the JSP to show your status message only if there isn't an error object. E.g.: logic:notPresent name=%= org.apache.struts.action.Action.ERROR_KEY % User added, any other suckers? /logic:notPresent Paul -Original Message- From: amolk [mailto:[EMAIL PROTECTED]] Sent: August 20, 2002 1:58 AM To: [EMAIL PROTECTED] Subject: separating status messages and error messages-Getting the design right. Hi all, I have just shifted from servlets to jsp + struts. I am still new to both. I have to create some jsp pages corresponding to some user actions. For example, the application administrator can click on add user link ( from left band menu which is in a separete frame ) and will be presented with a form which he can fill can click on add to add the user. On submit, the corresponding action class's perform is invoked and the same page has to be shown back to the user, this time, with a status message saying user added successfully. Add another? If the operation fails, an appropriate message is displayed using the html:errors/ My problem is the following: Where do i handle these status messages? Each page is viewed by the user in two different scenarios. 1. When the user wishes to perform some task. This time, there is no status, error message to be shown. Just the jsp page, directly. 2. After the user fill out the form and submits it. The same form reappears with the appropriate status or error message. Should i be mixing status and error messages? In that case, how do i handle different headers and footers for the two? Or should i be using some custom tags? Hve been trying out custom tags but since am still new to all this, ( jsp as well as struts. have been using only servlets till now!!! ) am not able to take design design decisions based on custom libraries, and stuff. I would go for a design where maximum html code is present in the jsp file itself so that my page designers can freely modify/manage it. Any suggestions? I am not using tiles or anything else. Too many new things to handle @ a time, specially since i am new to jsp itself!! thnx in advance, amol -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Problem deploying ejb combined with struts
Hello, This application.xml works for me. ?xml version=1.0 encoding=Cp1252? !DOCTYPE application PUBLIC '-//Sun Microsystems, Inc.//DTD J2EE Application 1.2//EN' 'http://java.sun.com/j2ee/dtds/application_1_2.dtd' application display-namewhatever/display-name descriptionwhatever/description module ejbwhatever.jar/ejb /module module web web-uriwhatever.war/web-uri context-rootwhatever/context-root /web /module /application Regards, Stephen. -Original Message- From: Leslie Bertels (Synergetic) [mailto:[EMAIL PROTECTED]] Sent: 20 August 2002 15:06 To: Struts Users Mailing List Subject: Problem deploying ejb combined with struts Hi all, I have a problem deploying my application. Used configuration: JBoss 3.0 - Jetty 4.1 EJB 2.0 Servlets - Struts. When I create my application.xml I need to add a ejb module otherwise the appserver does not deploy the ejbs. But if I do, my struts are no longer accessible. This is the error : java.lang.NoClassDefFoundError: org/apache/struts/action/ActionForm If I leave the ejb module out, the struts compile and are accessible trough the JSP's but when trying to access the ejb's (since they are not deployed) Following error occurs: javax.naming.NameNotFoundException: LogonSession not bound Meaning I need to come up with a solution for this. If anyone has encountered this problem, could you please let me know, maybe I can send over my xml and .ear file so you could have a look if my structure is wrong. Thanks in advance, Les. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] --- Copyright material and/or confidential and/or privileged information may be contained in this e-mail and any attached documents. The material and information is intended for the use of the intended addressee only. If you are not the intended addressee, or the person responsible for delivering it to the intended addressee, you may not copy, disclose, distribute, disseminate or deliver it to anyone else or use it in any unauthorised manner or take or omit to take any action in reliance on it. To do so is prohibited and may be unlawful. The views expressed in this e-mail may not be official policy but the personal views of the originator. If you receive this e-mail in error, please advise the sender immediately by using the reply facility in your e-mail software, or contact [EMAIL PROTECTED] Please also delete this e-mail and all documents attached immediately. Many thanks for your co-operation. BMW Financial Services (GB) Limited is registered in England and Wales under company number 01288537. Registered Offices : Europa House, Bartley Way, Hook, Hants, RG27 9UF -- -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Problem deploying ejb combined with struts
I tried that, but maybe the structure of my ear file (or war file) is not correct!! Could you send my that structure please ??? Thx. Les. - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, August 20, 2002 4:05 PM Subject: RE: Problem deploying ejb combined with struts Hello, This application.xml works for me. ?xml version=1.0 encoding=Cp1252? !DOCTYPE application PUBLIC '-//Sun Microsystems, Inc.//DTD J2EE Application 1.2//EN' 'http://java.sun.com/j2ee/dtds/application_1_2.dtd' application display-namewhatever/display-name descriptionwhatever/description module ejbwhatever.jar/ejb /module module web web-uriwhatever.war/web-uri context-rootwhatever/context-root /web /module /application Regards, Stephen. -Original Message- From: Leslie Bertels (Synergetic) [mailto:[EMAIL PROTECTED]] Sent: 20 August 2002 15:06 To: Struts Users Mailing List Subject: Problem deploying ejb combined with struts Hi all, I have a problem deploying my application. Used configuration: JBoss 3.0 - Jetty 4.1 EJB 2.0 Servlets - Struts. When I create my application.xml I need to add a ejb module otherwise the appserver does not deploy the ejbs. But if I do, my struts are no longer accessible. This is the error : java.lang.NoClassDefFoundError: org/apache/struts/action/ActionForm If I leave the ejb module out, the struts compile and are accessible trough the JSP's but when trying to access the ejb's (since they are not deployed) Following error occurs: javax.naming.NameNotFoundException: LogonSession not bound Meaning I need to come up with a solution for this. If anyone has encountered this problem, could you please let me know, maybe I can send over my xml and .ear file so you could have a look if my structure is wrong. Thanks in advance, Les. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- - Copyright material and/or confidential and/or privileged information may be contained in this e-mail and any attached documents. The material and information is intended for the use of the intended addressee only. If you are not the intended addressee, or the person responsible for delivering it to the intended addressee, you may not copy, disclose, distribute, disseminate or deliver it to anyone else or use it in any unauthorised manner or take or omit to take any action in reliance on it. To do so is prohibited and may be unlawful. The views expressed in this e-mail may not be official policy but the personal views of the originator. If you receive this e-mail in error, please advise the sender immediately by using the reply facility in your e-mail software, or contact [EMAIL PROTECTED] Please also delete this e-mail and all documents attached immediately. Many thanks for your co-operation. BMW Financial Services (GB) Limited is registered in England and Wales under company number 01288537. Registered Offices : Europa House, Bartley Way, Hook, Hants, RG27 9UF -- -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
DAO - DTO business object to view beans
Hi, I am building a medium size struts application (40-60 jsp pages) in a team. my question is to do with mapping business objects to view beans... By view beans I mean DTO (data transfer objects mentioned by Chuck Caveness in chapter 7 his upcoming O'Reilly struts book) If my understanding is correct, to maintain the abstraction between the presentation layer and the business layer, business objects should be mapped to DTOs. DTOs are stateless and represent a partial view of your model to be represented on a single JSP page. We have adopted this policy quite literally and have designed our DTOs totally separate from the BO's (with re-use where possible). There are many instances however where our BOs are simply DAO (data access objects) which do not differ at all from the view beans. We as a team are arguing whether it is better to break the abstraction and use some of our BO's straight for display in the view (the BO's aren't persistant so there's no worry about accidental state manipulation). You can imagine with 40 or so JSPs how many view beans there are - and a lot of them will be straight theDTO.setProperty(theBO.getProperty()) which is also inefficient. Has anyone encountered the same superfluous nature in this scenario? The DTO's/viewBeans are not coupled to the presentation layer in any way seeing as they're just snapshot java beans with no specific struts implementation. Is there a big no-no that I haven't seen which means I shouldn't use the BOs for the view? thanks for your time in advance Alex __ Do You Yahoo!? Everything you'll ever need on one web page from News and Sport to Email and Music Charts http://uk.my.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Servlet Validation
Create a blank index.html page in the /host/account directory that redirects to index.jsp in a META tag with the URL /do/index and the user will be directed to any path and bean defined for that path in struts-config. Mark -Original Message- From: David Graham [mailto:[EMAIL PROTECTED]] Sent: Monday, August 19, 2002 3:31 PM Hi, I want all my jsps to be called through the ActionServlet instead of directly through a url. I've subclassed ActionServlet and overridden the process() method to do authentication. So, on every request it will check if the user is logged in and then provide the page they asked for. How do I set this up? Here's my feeble attempt in the struts-config file: action name=bogusForm type=com.ibm.sdfreg.action.AccountIndexAction path=/account/ scope=request validate=false forward name=success path=/account/index.jsp / /action There is no bogusForm bean defined and the AccountIndexAction.perform() method just forwards to the success page. I want the user to type in this url http://host/account/ and get the index page. Is this even possible? Thanks, Dave _ Chat with friends online, try MSN Messenger: http://messenger.msn.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Problem deploying ejb combined with struts
Hello Les, Lets see In my WAR file I have the following *.JSP WEB-INF\ struts-*.tld tiles.tld web.xml struts-config.xml jboss-web.xml classes\ All of the action, form etc classes that are part of my application. lib\ struts.jar commons-*.jar ejb-interfaces.jar In my EJB file I have the following *.class META-INF\ ejb-jar.xml jboss.xml jbosscmp.xml Hope this helps. Regards, Stephen. -Original Message- From: Leslie Bertels (Synergetic) [mailto:[EMAIL PROTECTED]] Sent: 20 August 2002 15:17 To: Struts Users Mailing List Subject: Re: Problem deploying ejb combined with struts I tried that, but maybe the structure of my ear file (or war file) is not correct!! Could you send my that structure please ??? Thx. Les. - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, August 20, 2002 4:05 PM Subject: RE: Problem deploying ejb combined with struts Hello, This application.xml works for me. ?xml version=1.0 encoding=Cp1252? !DOCTYPE application PUBLIC '-//Sun Microsystems, Inc.//DTD J2EE Application 1.2//EN' 'http://java.sun.com/j2ee/dtds/application_1_2.dtd' application display-namewhatever/display-name descriptionwhatever/description module ejbwhatever.jar/ejb /module module web web-uriwhatever.war/web-uri context-rootwhatever/context-root /web /module /application Regards, Stephen. -Original Message- From: Leslie Bertels (Synergetic) [mailto:[EMAIL PROTECTED]] Sent: 20 August 2002 15:06 To: Struts Users Mailing List Subject: Problem deploying ejb combined with struts Hi all, I have a problem deploying my application. Used configuration: JBoss 3.0 - Jetty 4.1 EJB 2.0 Servlets - Struts. When I create my application.xml I need to add a ejb module otherwise the appserver does not deploy the ejbs. But if I do, my struts are no longer accessible. This is the error : java.lang.NoClassDefFoundError: org/apache/struts/action/ActionForm If I leave the ejb module out, the struts compile and are accessible trough the JSP's but when trying to access the ejb's (since they are not deployed) Following error occurs: javax.naming.NameNotFoundException: LogonSession not bound Meaning I need to come up with a solution for this. If anyone has encountered this problem, could you please let me know, maybe I can send over my xml and .ear file so you could have a look if my structure is wrong. Thanks in advance, Les. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- - Copyright material and/or confidential and/or privileged information may be contained in this e-mail and any attached documents. The material and information is intended for the use of the intended addressee only. If you are not the intended addressee, or the person responsible for delivering it to the intended addressee, you may not copy, disclose, distribute, disseminate or deliver it to anyone else or use it in any unauthorised manner or take or omit to take any action in reliance on it. To do so is prohibited and may be unlawful. The views expressed in this e-mail may not be official policy but the personal views of the originator. If you receive this e-mail in error, please advise the sender immediately by using the reply facility in your e-mail software, or contact [EMAIL PROTECTED] Please also delete this e-mail and all documents attached immediately. Many thanks for your co-operation. BMW Financial Services (GB) Limited is registered in England and Wales under company number 01288537. Registered Offices : Europa House, Bartley Way, Hook, Hants, RG27 9UF -- -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Struts Community is going crazy! :-))
Dan, that is a fantastic diagram (so much information so easily accessible in such a small place)! I have one question though to do with the ActionForm... Your colouring infers that there is one 'ActionForm per screen'. I know that an ActionForm instance is created (and filled with the form information from the client) whenever a form-bean is specified in the struts-config.xml, but I have read many discussions which state it sometimes can be more useful to make a less granular ActionForm class which encompasses many forms across different pages. This could be a little confusing on your diagram (then again, maybe it's just me!). Did I interpet things incorrectly? Alex --- Dan Cancro [EMAIL PROTECTED] wrote: This may or may not be what you're looking for, but I've been trying to organize patterns in the following diagram that's meant to show, among other things, where all the routine http request sub-activities should be coded. I color coded the activities to identify those that can be coded in more than one place and so contribute to potentially chaotic designs. I'll look over Ted's patterns and see how I can add some of that stuff to the diagram. http://members.telocity.com/dcancro/images/eng/Struts_MVC.gif Dan -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] __ Do You Yahoo!? Everything you'll ever need on one web page from News and Sport to Email and Music Charts http://uk.my.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: upload question
I'm not sure if I understand you right, but is it because the upload example simply displays the contents of the files you upload directly to the browser (using out.print)? Because the image is a binary file it won't display nor would any other binary file... I haven't had any troubles uploading binary files before using struts hope that helps... Alex --- jfc [EMAIL PROTECTED] wrote: Hi, Just a quick question. Why do I get garbage when I upload a jpeg or gif image file when using the upload example in struts? I can see the image if I navigate to it in my local fs using my browser but not by using the example upload war app. Cheers jfc -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] __ Do You Yahoo!? Everything you'll ever need on one web page from News and Sport to Email and Music Charts http://uk.my.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Validating nested:text fields in an iterate block
Hi All, Is is possible to use the struts validator to validate a nested:text field within an iterate block. I can't see a way to do this; validation.xml wants the name of a property on the form; but within an iterate block the field names are made on the fly - ie address[0].street. Is it possible to define a property=address[*].street ? Any pointers much appreciated. Jon. The contents of this email are intended only for the named addressees and may contain confidential and/or privileged material. If received in error please contact UPCO on +44 (0) 113 201 0600 and then delete the entire e-mail from your system. Unauthorised review, distribution, disclosure or other use of this information could constitute a breach of confidence. Your co-operation in this matter is greatly appreciated. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
JSPs and HTML-Frames
Hi Folks! Perhaps no newbie anymore, but I still have a simple question: if I build a frameset and want to forward form data from one frame to a jsp in another frame, how should I do that? Within jsp:forward (if I don't want to process form data but want to automatically change other contest if somewhere else in my frameset an action occurred) there is no possibility to add a target parameter? I tried this using the _blank target, but tomcat seemed to ingnore this target? Code-snippet: ... jsp:forward page=/index.jsp jsp:param name=target value=_blank/ /jsp:forward ... And if I use struts: is there any support for frames within this framework? I was looking for target-parameter within the struts-config-1.1-DTD, but it looks as if there is nothing to help me in this case? Or do I have to learn more about using tiles within struts? Thanks in advance, Fabian -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Help - xml to pdf using struts
Yes. The problem with IE is that it doesn't show the file and you get a blank page. This note at the fop site says: Some browsers have problems handling the PDF result sent back to the browser. IE is particularly bad and different versions behave differently. Having a .pdf on the end of the url may help. http://xml.apache.org/fop/embedding.html -Original Message- From: Todd G. Nist [mailto:[EMAIL PROTECTED]] Sent: Friday, August 16, 2002 1:34 PM To: 'Struts Users Mailing List' Subject: RE: Help - xml to pdf using struts RE: Help - xml to pdf using strutsMike, Did you set the content type to application/pdf and then return null from you action once you successfully completed the transformation? That is what we do and it appears to work fine. Regards, Todd G. Nist try { // FO/Transformation code here ByteArrayOutputStream pdf = new ByteArrayOutputStream(); // show PDF response.setContentType(application/pdf); byte[] content = pdf.toByteArray(); response.setContentLength(content.length); response.getOutputStream().write(content); response.getOutputStream().flush(); } // return null from action return null; -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Friday, August 16, 2002 11:43 AM To: [EMAIL PROTECTED] Subject: RE: Help - xml to pdf using struts Hi Lisa, That looks similar to my solution. The biggest problem I had was with getting IE to display the PDF inline without a PDF in the URL Using a Struts action, I wasn't able to get the URL to change at the appropriate time with a redirect. In the end, I sent the pdf as an attachment which gives the open/save prompt. Were you able to get around this problem? Thanks, Mike -Original Message- From: Lisa van Gelder [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 15, 2002 4:52 AM To: 'Struts Users Mailing List' Subject: RE: Help - xml to pdf using struts Here is the bit of my action that deals with the pdf creation. First I transform xml to fo using xsl (and Xalan). The result is written to an InputSteam, which is passed into FOP. The result from FOP is then written out the client and the content type is set to application/pdf. HTH Lisa -Original Message- From: Zimmer, Robin (SSABSA) [mailto:[EMAIL PROTECTED]] Sent: 15 August 2002 09:37 To: 'Struts Users Mailing List' Subject: RE: Help - xml to pdf using struts Lisa, That sounds can you provide an example action please. -Original Message- From: Lisa van Gelder [mailto:[EMAIL PROTECTED]] Sent: Thursday, 15 August 2002 6:01 PM To: 'Struts Users Mailing List' Subject: RE: Help - xml to pdf using struts I do the xml - fo - pdf transformation in an Action, and then stream the result straight back to the browser. Lisa -Original Message- From: Zimmer, Robin (SSABSA) [mailto:[EMAIL PROTECTED]] Sent: 15 August 2002 09:28 To: 'Struts Users Mailing List' Subject: RE: Help - xml to pdf using struts Thanks for getting back to me. I appreciate that I have to have xsl:fo to transform the xml, but how best to render this using jsp??? Or do I need a servlet??? -Original Message- From: David WIlkinson [mailto:[EMAIL PROTECTED]] Sent: Thursday, 15 August 2002 5:57 PM To: 'Struts Users Mailing List' Subject: RE: Help - xml to pdf using struts We had to address a similar issue of creating pdf's from xml and found that it can be done in a simple way using xsl:fo to transform the xml. Check out http://xml.apache.org/fop/index.html for more info. -Original Message- From: Zimmer, Robin (SSABSA) [mailto:[EMAIL PROTECTED]] Sent: 15 August 2002 08:13 To: '[EMAIL PROTECTED]' Subject: Help - xml to pdf using struts I am in the last stages of implementating a Struts application. I now have to complete the reporting side. This basically consists of displaying xml output as HTML or PDF. I have the HTML side covered (I am using jakarta XTags) but how do I render an xml to fo transformation to pdf by using struts. I am aware of stxx but as far as I can see you have to override the actionservlet etc and this seems an overhead for what is a small part of the app. Can anyone please give some suggestions. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED]
RE: Problem deploying ejb combined with struts
Search the Jboss archives for classloading under Jboss 3.0.. I believe you have to wrap the war into a single .ear with the EJBS, and remove the libs from the war and put them in the ear *only* if you are using embedded Tomcat with JBoss. Something about how the classloaders work under the new Servlet 2.3 spec on classloading. HTH, James -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 20, 2002 9:22 AM To: [EMAIL PROTECTED] Subject: RE: Problem deploying ejb combined with struts Hello Les, Lets see In my WAR file I have the following *.JSP WEB-INF\ struts-*.tld tiles.tld web.xml struts-config.xml jboss-web.xml classes\ All of the action, form etc classes that are part of my application. lib\ struts.jar commons-*.jar ejb-interfaces.jar In my EJB file I have the following *.class META-INF\ ejb-jar.xml jboss.xml jbosscmp.xml Hope this helps. Regards, Stephen. -Original Message- From: Leslie Bertels (Synergetic) [mailto:[EMAIL PROTECTED]] Sent: 20 August 2002 15:17 To: Struts Users Mailing List Subject: Re: Problem deploying ejb combined with struts I tried that, but maybe the structure of my ear file (or war file) is not correct!! Could you send my that structure please ??? Thx. Les. - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, August 20, 2002 4:05 PM Subject: RE: Problem deploying ejb combined with struts Hello, This application.xml works for me. ?xml version=1.0 encoding=Cp1252? !DOCTYPE application PUBLIC '-//Sun Microsystems, Inc.//DTD J2EE Application 1.2//EN' 'http://java.sun.com/j2ee/dtds/application_1_2.dtd' application display-namewhatever/display-name descriptionwhatever/description module ejbwhatever.jar/ejb /module module web web-uriwhatever.war/web-uri context-rootwhatever/context-root /web /module /application Regards, Stephen. -Original Message- From: Leslie Bertels (Synergetic) [mailto:[EMAIL PROTECTED]] Sent: 20 August 2002 15:06 To: Struts Users Mailing List Subject: Problem deploying ejb combined with struts Hi all, I have a problem deploying my application. Used configuration: JBoss 3.0 - Jetty 4.1 EJB 2.0 Servlets - Struts. When I create my application.xml I need to add a ejb module otherwise the appserver does not deploy the ejbs. But if I do, my struts are no longer accessible. This is the error : java.lang.NoClassDefFoundError: org/apache/struts/action/ActionForm If I leave the ejb module out, the struts compile and are accessible trough the JSP's but when trying to access the ejb's (since they are not deployed) Following error occurs: javax.naming.NameNotFoundException: LogonSession not bound Meaning I need to come up with a solution for this. If anyone has encountered this problem, could you please let me know, maybe I can send over my xml and .ear file so you could have a look if my structure is wrong. Thanks in advance, Les. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- - Copyright material and/or confidential and/or privileged information may be contained in this e-mail and any attached documents. The material and information is intended for the use of the intended addressee only. If you are not the intended addressee, or the person responsible for delivering it to the intended addressee, you may not copy, disclose, distribute, disseminate or deliver it to anyone else or use it in any unauthorised manner or take or omit to take any action in reliance on it. To do so is prohibited and may be unlawful. The views expressed in this e-mail may not be official policy but the personal views of the originator. If you receive this e-mail in error, please advise the sender immediately by using the reply facility in your e-mail software, or contact [EMAIL PROTECTED] Please also delete this e-mail and all documents attached immediately. Many thanks for your co-operation. BMW Financial Services (GB) Limited is registered in England and Wales under company number 01288537. Registered Offices : Europa House, Bartley Way, Hook, Hants, RG27 9UF -- -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:struts-user- [EMAIL PROTECTED] For additional
RE: Non-Struts related : input one text field then show description in another field
Works fine with NN 6.2. Mark -Original Message- From: neal [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 20, 2002 3:00 AM To: Struts Users Mailing List Subject: RE: Non-Struts related : input one text field then show description in another field Sounds like you're saying that you want to cause the page to submit on the onBlur event, correct? Try something like this: input type=text onBlur=this.form.submit() / And then course you would do the lookup server-side and return the page with the revised list of zipcodes, per the chosen state. This is a similar sort of thing to what ASP.NET does with postback. Note though that onBlur probably won't work with NN4 and possibly not NN6...last I checked it was an event only listened to by MSIE. Also note that this implies making a lot of round trips to the server, which might decrease performance of you app in high-traffic scenarios. Cheers. Neal -Original Message- From: Sutiwan Kariya [mailto:[EMAIL PROTECTED]] Sent: Monday, August 19, 2002 11:25 PM To: [EMAIL PROTECTED] Subject: Non-Struts related : input one text field then show description in another field Need somebody help! I have one jsp page with one zip code text field and one state text field. I want when user input the zipcode text , onblur that zip code field then the state text field shows the state related to that zipcode. what kind of bean or tag lib do I need to perform this task? I want it to perform on client side(javascript) . Note:Zipcode and State are stored in the database Look forward to hearing the solution Sutiwan W. This E-mail and any files transmitted with it are confidential and intended for the sole use of the individual or entity to whom they are addressed. If you have received this E-mail in error please notify the system manager. This E-mail message has been swept for the presence of computer viruses. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Escaping HTML in html:multibox../
Robert: I think the only way to achieve dynamism in the value attribute is to use a JSP scriptlet such as: html:multibox property=upgradeLicenseKeys value=%=element.getLicenseKeyId()%/ What is it that you are trying to achieve? I have used multibox in an iteration (complete with pre-selected check-boxes) as follows: html:multibox name=prodBean property=selectedItems bean:write name=prodBean property=productCode/bean:write /html:multibox It renders as: input type=checkbox name=selectedItems value=hammer Hope that helps Sri -Original Message- From: Robert Taylor [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 20, 2002 9:56 AM To: [EMAIL PROTECTED] Subject: Escaping HTML in html:multibox../ Is there a way to NOT escape HTML in the value attribute of html:multibox ... /. I'm trying to dynamically populate the value attribute using bean:write .../ and apparently the multibox tag does not process the embedded bean:write ... /. Code in JSP page: html:multibox property=upgradeLicenseKeys value=bean:write name='element' property='licenseKeyId'// HTML rendered: input type=checkbox name=upgradeLicenseKeys value=lt;bean:write name='element' property='licenseKeyId'/gt; I've tried the following as well (use single quotes to encapsulate the value's value): html:multibox property=upgradeLicenseKeys value='bean:write name=element property=licenseKeyId/'/ HTML rendered: input type=checkbox name=upgradeLicenseKeys value='lt;bean:write name=element property=licenseKeyId/gt;' I have included the appropriate page directive which imports the taglibrary: %@ taglib uri=jakarta-struts-bean prefix=bean% ...and I am using other bean:write .../ tags on the same page (not in the same fashion) and they are working properly. I found a message in the archives where the solution was to add filter=false in the bean:write tag, but the html:multibox tag has no attribute like that. I'm sure this has been solved before, I just cannot seem to find it in the archives. robert -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: DAO - DTO business object to view beans
In my past experience, projects tend to start out with the DTOs matching the BOs 1-to-1 but as a project grows and matures, UI changes will require a DTO to change in such a way that they don't match the BOs anymore. So, do the right thing and have both BO and DTO, even if they are matching. This will give you the buffer zone you need to be able to change one or the other. If you want to automate the transformation, I think there is a transformation library in the Struts resources page (somewhere) that is supposed to help in this mapping. Worst case, take a look at the apache commons bean utils that Struts uses to help automate the transformations. James -Original Message- From: Alex Birch [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 20, 2002 9:18 AM To: [EMAIL PROTECTED] Subject: DAO - DTO business object to view beans Hi, I am building a medium size struts application (40-60 jsp pages) in a team. my question is to do with mapping business objects to view beans... By view beans I mean DTO (data transfer objects mentioned by Chuck Caveness in chapter 7 his upcoming O'Reilly struts book) If my understanding is correct, to maintain the abstraction between the presentation layer and the business layer, business objects should be mapped to DTOs. DTOs are stateless and represent a partial view of your model to be represented on a single JSP page. We have adopted this policy quite literally and have designed our DTOs totally separate from the BO's (with re-use where possible). There are many instances however where our BOs are simply DAO (data access objects) which do not differ at all from the view beans. We as a team are arguing whether it is better to break the abstraction and use some of our BO's straight for display in the view (the BO's aren't persistant so there's no worry about accidental state manipulation). You can imagine with 40 or so JSPs how many view beans there are - and a lot of them will be straight theDTO.setProperty(theBO.getProperty()) which is also inefficient. Has anyone encountered the same superfluous nature in this scenario? The DTO's/viewBeans are not coupled to the presentation layer in any way seeing as they're just snapshot java beans with no specific struts implementation. Is there a big no-no that I haven't seen which means I shouldn't use the BOs for the view? thanks for your time in advance Alex __ Do You Yahoo!? Everything you'll ever need on one web page from News and Sport to Email and Music Charts http://uk.my.yahoo.com -- To unsubscribe, e-mail: mailto:struts-user- [EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Servlet Validation
Thanks, I thought of a better variation of that technique though. The w3c recommends not using the meta refresh because of accessibilty and browser variation. I'll put an index.jsp with a single redirect statement in it to index.do. This way, it's using actual http header redirects instead of meta tags. Thanks, Dave Create a blank index.html page in the /host/account directory that redirects to index.jsp in a META tag with the URL /do/index and the user will be directed to any path and bean defined for that path in struts-config. Mark -Original Message- From: David Graham [mailto:[EMAIL PROTECTED]] Sent: Monday, August 19, 2002 3:31 PM Hi, I want all my jsps to be called through the ActionServlet instead of directly through a url. I've subclassed ActionServlet and overridden the process() method to do authentication. So, on every request it will check if the user is logged in and then provide the page they asked for. How do I set this up? Here's my feeble attempt in the struts-config file: action name=bogusForm type=com.ibm.sdfreg.action.AccountIndexAction path=/account/ scope=request validate=false forward name=success path=/account/index.jsp / /action There is no bogusForm bean defined and the AccountIndexAction.perform() method just forwards to the success page. I want the user to type in this url http://host/account/ and get the index page. Is this even possible? Thanks, Dave _ Chat with friends online, try MSN Messenger: http://messenger.msn.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] _ MSN Photos is the easiest way to share and print your photos: http://photos.msn.com/support/worldwide.aspx -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Servlet Validation
TAMTOWTDI! Mark -Original Message- From: David Graham [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 20, 2002 11:13 AM Thanks, I thought of a better variation of that technique though. The w3c recommends not using the meta refresh because of accessibilty and browser variation. I'll put an index.jsp with a single redirect statement in it to index.do. This way, it's using actual http header redirects instead of meta tags. Thanks, Dave Create a blank index.html page in the /host/account directory that redirects to index.jsp in a META tag with the URL /do/index and the user will be directed to any path and bean defined for that path in struts-config. Mark -Original Message- From: David Graham [mailto:[EMAIL PROTECTED]] Sent: Monday, August 19, 2002 3:31 PM Hi, I want all my jsps to be called through the ActionServlet instead of directly through a url. I've subclassed ActionServlet and overridden the process() method to do authentication. So, on every request it will check if the user is logged in and then provide the page they asked for. How do I set this up? Here's my feeble attempt in the struts-config file: action name=bogusForm type=com.ibm.sdfreg.action.AccountIndexAction path=/account/ scope=request validate=false forward name=success path=/account/index.jsp / /action There is no bogusForm bean defined and the AccountIndexAction.perform() method just forwards to the success page. I want the user to type in this url http://host/account/ and get the index page. Is this even possible? Thanks, Dave _ Chat with friends online, try MSN Messenger: http://messenger.msn.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] _ MSN Photos is the easiest way to share and print your photos: http://photos.msn.com/support/worldwide.aspx -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Problem deploying ejb combined with struts
James, The structure I have described below works fine on an embedded Tomcat 4.0.3 with JBoss 3.0.0. Regards, Stephen. -Original Message- From: James Higginbotham [mailto:[EMAIL PROTECTED]] Sent: 20 August 2002 16:01 To: Struts Users Mailing List Subject: RE: Problem deploying ejb combined with struts Search the Jboss archives for classloading under Jboss 3.0.. I believe you have to wrap the war into a single .ear with the EJBS, and remove the libs from the war and put them in the ear *only* if you are using embedded Tomcat with JBoss. Something about how the classloaders work under the new Servlet 2.3 spec on classloading. HTH, James -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 20, 2002 9:22 AM To: [EMAIL PROTECTED] Subject: RE: Problem deploying ejb combined with struts Hello Les, Lets see In my WAR file I have the following *.JSP WEB-INF\ struts-*.tld tiles.tld web.xml struts-config.xml jboss-web.xml classes\ All of the action, form etc classes that are part of my application. lib\ struts.jar commons-*.jar ejb-interfaces.jar In my EJB file I have the following *.class META-INF\ ejb-jar.xml jboss.xml jbosscmp.xml Hope this helps. Regards, Stephen. -Original Message- From: Leslie Bertels (Synergetic) [mailto:[EMAIL PROTECTED]] Sent: 20 August 2002 15:17 To: Struts Users Mailing List Subject: Re: Problem deploying ejb combined with struts I tried that, but maybe the structure of my ear file (or war file) is not correct!! Could you send my that structure please ??? Thx. Les. - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, August 20, 2002 4:05 PM Subject: RE: Problem deploying ejb combined with struts Hello, This application.xml works for me. ?xml version=1.0 encoding=Cp1252? !DOCTYPE application PUBLIC '-//Sun Microsystems, Inc.//DTD J2EE Application 1.2//EN' 'http://java.sun.com/j2ee/dtds/application_1_2.dtd' application display-namewhatever/display-name descriptionwhatever/description module ejbwhatever.jar/ejb /module module web web-uriwhatever.war/web-uri context-rootwhatever/context-root /web /module /application Regards, Stephen. -Original Message- From: Leslie Bertels (Synergetic) [mailto:[EMAIL PROTECTED]] Sent: 20 August 2002 15:06 To: Struts Users Mailing List Subject: Problem deploying ejb combined with struts Hi all, I have a problem deploying my application. Used configuration: JBoss 3.0 - Jetty 4.1 EJB 2.0 Servlets - Struts. When I create my application.xml I need to add a ejb module otherwise the appserver does not deploy the ejbs. But if I do, my struts are no longer accessible. This is the error : java.lang.NoClassDefFoundError: org/apache/struts/action/ActionForm If I leave the ejb module out, the struts compile and are accessible trough the JSP's but when trying to access the ejb's (since they are not deployed) Following error occurs: javax.naming.NameNotFoundException: LogonSession not bound Meaning I need to come up with a solution for this. If anyone has encountered this problem, could you please let me know, maybe I can send over my xml and .ear file so you could have a look if my structure is wrong. Thanks in advance, Les. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- - Copyright material and/or confidential and/or privileged information may be contained in this e-mail and any attached documents. The material and information is intended for the use of the intended addressee only. If you are not the intended addressee, or the person responsible for delivering it to the intended addressee, you may not copy, disclose, distribute, disseminate or deliver it to anyone else or use it in any unauthorised manner or take or omit to take any action in reliance on it. To do so is prohibited and may be unlawful. The views expressed in this e-mail may not be official policy but the personal views of the originator. If you receive this e-mail in error, please advise the sender immediately by using the reply facility in your e-mail software, or contact [EMAIL PROTECTED] Please also delete this e-mail and all documents attached immediately. Many thanks for your co-operation. BMW Financial Services (GB) Limited is registered in England and Wales under company number 01288537. Registered Offices : Europa House, Bartley Way, Hook, Hants, RG27
Re: Servlet Validation
An acronym a day keeps the Project Manager at bay. - Original Message - From: Galbreath, Mark [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Sent: Tuesday, August 20, 2002 10:17 AM Subject: RE: Servlet Validation TAMTOWTDI! Mark -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
iPlanet and Struts 1.02 problem - last try.
One more try at this issue Problem with an extra slash / being added to the front of my form action and links, examples from little app i wrote and struts-example app: Example 1: form name=panelForm method=POST action=//do/panelForm;jsessionid= Example 2: href=//do/editRegistration;jsessionid= This causes an issue by trying to call http://do/PanelForm; Server: iPlanet Web Server 6.0 SP2 Struts: 1.02 binary release Not sure where to go from here. Is there an iPlanet setting or something? I have tried MANY different settings in the struts-config.xml and web.xml, for example, tried using /do/* method, but it seems to do the same thing. Even the /do.* adds an extra http://PanelForm.do.. Here are some files if you need to look at them: [ clipping from struts-config.xml] action path=/panelForm type=com.whatever.struts.PanelAction name=panelForm scope=request input=/panelform.jsp validate=true forward name=success path=/do/success.jsp/ forward name=failure path=/do/panelForm / /action [ clipping from web.xml]--- servlet-mapping servlet-nameaction/servlet-name url-pattern/do/*/url-pattern /servlet-mapping --[ clipping from panelform.jsp]-- html:form action=/panelForm - -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Something fundamentally wrong
All, I think I am doing something fundamentally wrong with a small pop up window that I have, but I don't understand what. When I click the add button, i.e. html:submit, the jsp is supposed to forward back to itself, which it does rather successfully. But in the request, when it forwards back to itself, the property submit still equals submit and the jsp begins an infinite loop, even when I set form.setSubmit() or form.setSubmit(null). I have also tried removing the form if (doAddSwitchDR mapping.getAttribute() != null) { request.removeAttribute(mapping.getAttribute()); } but that doesn't work either. I have solved the problem using a set of boolean swithces, but I am sure that is not the Struts way to do it. I can submit the struts-config.xml or some of the code, but there is nothing different or unusual about them. Each time the page returns to the execute() method, it forwards back to itself again. What am I doing wrong in this scenario? I would much appreciate the help. Steve -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: [ANNOUNCE] Struts Console v2.1
Thank you Thanks regards, Narayana Reddy PM, IRDI, India Telnet:847-1987 Work: 91-80-2051987 Home: 91-80-3541057 Mobile: 91-98451-62251 -Original Message- From: James Holmes [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 20, 2002 7:18 PM To: Struts Users Mailing List; [EMAIL PROTECTED] Subject: RE: [ANNOUNCE] Struts Console v2.1 Can you be more specific? The Struts Console is a tool for managing Struts config files. It does not support Tomcat config files, so if that's what you mean it will not help you. -james [EMAIL PROTECTED] http://www.jamesholmes.com/struts/ --- Narayana Reddy [EMAIL PROTECTED] wrote: How can I use it for - Apache tomcat based applications? Thanks regards, Narayana Reddy PM, IRDI, India Telnet:847-1987 Work: 91-80-2051987 Home: 91-80-3541057 Mobile: 91-98451-62251 -Original Message- From: James Holmes [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 20, 2002 6:28 PM To: Struts Users Mailing List Subject: [ANNOUNCE] Struts Console v2.1 Struts Console version 2.1 is now available. http://www.jamesholmes.com/struts/ Download Now: http://www.jamesholmes.com/struts/struts-console-2.1.zip -- OR -- http://www.jamesholmes.com/struts/struts-console-2.1.tar.gz Struts Console is FREE software. This release adds support for the IntelliJ IDEA IDE, one of the favorites of many developers. Changes with Struts Console v2.1 *) Fixed bug where the initial attribute of the form-property element was getting set to blank when it wasn't specified. *) Added plugin support for IntelliJ IDEA. Thanks, -james [EMAIL PROTECTED] http://www.jamesholmes.com/struts/ __ Do You Yahoo!? HotJobs - Search Thousands of New Jobs http://www.hotjobs.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] __ Do You Yahoo!? HotJobs - Search Thousands of New Jobs http://www.hotjobs.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: How to put things in the ServletContext
-Original Message- From: Adam Connors [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 20, 2002 2:16 AM To: [EMAIL PROTECTED] Subject: How to put things in the ServletContext Hello, Apologies if this is an obvious one I've missed, (I'm a newbie and a bit bewildered by the onslaught of new information). But I want to put the home interface for an ejb into the servlet context to save time with multiple jndi lookups. Traditionally this is easily done in the servlet init() method and by making it a static member of the servlet. But I don't have access to this anymore since everything goes through the action servlet. Is there a way of putting stuff into the init() method of the action servlet without faffing around with subclassing it? You could pursue how to put things into the ServletContext, but for your particular need, I would suggest something slightly different. You're trying to implement the EJBHomeFactory pattern. You're better off writing the EJBHomeFactory singleton, and just referencing that when you need an EJBHome. If you want a detailed description of EJBHomeFactory, look at the book EJB Design Patterns, by Floyd Marinescu. You can get a free copy of the pdf (non-printable) at http://theserverside.com. Note that if you want to store/retrieve both remote and local references, you'll have to check for instanceof EJBLocalHome and NOT do the narrow() on the lookup result. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Problem deploying ejb combined with struts
Stephen, thanks alot man! I managed to get things working. Not exactly as you discribed below but that's ok. Regards, Les. - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, August 20, 2002 4:21 PM Subject: RE: Problem deploying ejb combined with struts Hello Les, Lets see In my WAR file I have the following *.JSP WEB-INF\ struts-*.tld tiles.tld web.xml struts-config.xml jboss-web.xml classes\ All of the action, form etc classes that are part of my application. lib\ struts.jar commons-*.jar ejb-interfaces.jar In my EJB file I have the following *.class META-INF\ ejb-jar.xml jboss.xml jbosscmp.xml Hope this helps. Regards, Stephen. -Original Message- From: Leslie Bertels (Synergetic) [mailto:[EMAIL PROTECTED]] Sent: 20 August 2002 15:17 To: Struts Users Mailing List Subject: Re: Problem deploying ejb combined with struts I tried that, but maybe the structure of my ear file (or war file) is not correct!! Could you send my that structure please ??? Thx. Les. - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, August 20, 2002 4:05 PM Subject: RE: Problem deploying ejb combined with struts Hello, This application.xml works for me. ?xml version=1.0 encoding=Cp1252? !DOCTYPE application PUBLIC '-//Sun Microsystems, Inc.//DTD J2EE Application 1.2//EN' 'http://java.sun.com/j2ee/dtds/application_1_2.dtd' application display-namewhatever/display-name descriptionwhatever/description module ejbwhatever.jar/ejb /module module web web-uriwhatever.war/web-uri context-rootwhatever/context-root /web /module /application Regards, Stephen. -Original Message- From: Leslie Bertels (Synergetic) [mailto:[EMAIL PROTECTED]] Sent: 20 August 2002 15:06 To: Struts Users Mailing List Subject: Problem deploying ejb combined with struts Hi all, I have a problem deploying my application. Used configuration: JBoss 3.0 - Jetty 4.1 EJB 2.0 Servlets - Struts. When I create my application.xml I need to add a ejb module otherwise the appserver does not deploy the ejbs. But if I do, my struts are no longer accessible. This is the error : java.lang.NoClassDefFoundError: org/apache/struts/action/ActionForm If I leave the ejb module out, the struts compile and are accessible trough the JSP's but when trying to access the ejb's (since they are not deployed) Following error occurs: javax.naming.NameNotFoundException: LogonSession not bound Meaning I need to come up with a solution for this. If anyone has encountered this problem, could you please let me know, maybe I can send over my xml and .ear file so you could have a look if my structure is wrong. Thanks in advance, Les. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- - Copyright material and/or confidential and/or privileged information may be contained in this e-mail and any attached documents. The material and information is intended for the use of the intended addressee only. If you are not the intended addressee, or the person responsible for delivering it to the intended addressee, you may not copy, disclose, distribute, disseminate or deliver it to anyone else or use it in any unauthorised manner or take or omit to take any action in reliance on it. To do so is prohibited and may be unlawful. The views expressed in this e-mail may not be official policy but the personal views of the originator. If you receive this e-mail in error, please advise the sender immediately by using the reply facility in your e-mail software, or contact [EMAIL PROTECTED] Please also delete this e-mail and all documents attached immediately. Many thanks for your co-operation. BMW Financial Services (GB) Limited is registered in England and Wales under company number 01288537. Registered Offices : Europa House, Bartley Way, Hook, Hants, RG27 9UF -- -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Problem deploying ejb combined with struts
You are most welcome. I am glad it helped. Regards, Stephen. -Original Message- From: Leslie Bertels (Synergetic) [mailto:[EMAIL PROTECTED]] Sent: 20 August 2002 16:47 To: Struts Users Mailing List Subject: Re: Problem deploying ejb combined with struts Stephen, thanks alot man! I managed to get things working. Not exactly as you discribed below but that's ok. Regards, Les. - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, August 20, 2002 4:21 PM Subject: RE: Problem deploying ejb combined with struts Hello Les, Lets see In my WAR file I have the following *.JSP WEB-INF\ struts-*.tld tiles.tld web.xml struts-config.xml jboss-web.xml classes\ All of the action, form etc classes that are part of my application. lib\ struts.jar commons-*.jar ejb-interfaces.jar In my EJB file I have the following *.class META-INF\ ejb-jar.xml jboss.xml jbosscmp.xml Hope this helps. Regards, Stephen. -Original Message- From: Leslie Bertels (Synergetic) [mailto:[EMAIL PROTECTED]] Sent: 20 August 2002 15:17 To: Struts Users Mailing List Subject: Re: Problem deploying ejb combined with struts I tried that, but maybe the structure of my ear file (or war file) is not correct!! Could you send my that structure please ??? Thx. Les. - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, August 20, 2002 4:05 PM Subject: RE: Problem deploying ejb combined with struts Hello, This application.xml works for me. ?xml version=1.0 encoding=Cp1252? !DOCTYPE application PUBLIC '-//Sun Microsystems, Inc.//DTD J2EE Application 1.2//EN' 'http://java.sun.com/j2ee/dtds/application_1_2.dtd' application display-namewhatever/display-name descriptionwhatever/description module ejbwhatever.jar/ejb /module module web web-uriwhatever.war/web-uri context-rootwhatever/context-root /web /module /application Regards, Stephen. -Original Message- From: Leslie Bertels (Synergetic) [mailto:[EMAIL PROTECTED]] Sent: 20 August 2002 15:06 To: Struts Users Mailing List Subject: Problem deploying ejb combined with struts Hi all, I have a problem deploying my application. Used configuration: JBoss 3.0 - Jetty 4.1 EJB 2.0 Servlets - Struts. When I create my application.xml I need to add a ejb module otherwise the appserver does not deploy the ejbs. But if I do, my struts are no longer accessible. This is the error : java.lang.NoClassDefFoundError: org/apache/struts/action/ActionForm If I leave the ejb module out, the struts compile and are accessible trough the JSP's but when trying to access the ejb's (since they are not deployed) Following error occurs: javax.naming.NameNotFoundException: LogonSession not bound Meaning I need to come up with a solution for this. If anyone has encountered this problem, could you please let me know, maybe I can send over my xml and .ear file so you could have a look if my structure is wrong. Thanks in advance, Les. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- - Copyright material and/or confidential and/or privileged information may be contained in this e-mail and any attached documents. The material and information is intended for the use of the intended addressee only. If you are not the intended addressee, or the person responsible for delivering it to the intended addressee, you may not copy, disclose, distribute, disseminate or deliver it to anyone else or use it in any unauthorised manner or take or omit to take any action in reliance on it. To do so is prohibited and may be unlawful. The views expressed in this e-mail may not be official policy but the personal views of the originator. If you receive this e-mail in error, please advise the sender immediately by using the reply facility in your e-mail software, or contact [EMAIL PROTECTED] Please also delete this e-mail and all documents attached immediately. Many thanks for your co-operation. BMW Financial Services (GB) Limited is registered in England and Wales under company number 01288537. Registered Offices : Europa House, Bartley Way, Hook, Hants, RG27 9UF -- -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail:
RE: Escaping HTML in html:multibox../
User error. I wasn't aware that the body of the html:multibox ... / was rendered as the value of html check box value attribute. Thanks Sri. robert -Original Message- From: Sri Sankaran [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 20, 2002 11:10 AM To: Struts Users Mailing List Subject: RE: Escaping HTML in html:multibox../ Robert: I think the only way to achieve dynamism in the value attribute is to use a JSP scriptlet such as: html:multibox property=upgradeLicenseKeys value=%=element.getLicenseKeyId()%/ What is it that you are trying to achieve? I have used multibox in an iteration (complete with pre-selected check-boxes) as follows: html:multibox name=prodBean property=selectedItems bean:write name=prodBean property=productCode/bean:write /html:multibox It renders as: input type=checkbox name=selectedItems value=hammer Hope that helps Sri -Original Message- From: Robert Taylor [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 20, 2002 9:56 AM To: [EMAIL PROTECTED] Subject: Escaping HTML in html:multibox../ Is there a way to NOT escape HTML in the value attribute of html:multibox ... /. I'm trying to dynamically populate the value attribute using bean:write .../ and apparently the multibox tag does not process the embedded bean:write ... /. Code in JSP page: html:multibox property=upgradeLicenseKeys value=bean:write name='element' property='licenseKeyId'// HTML rendered: input type=checkbox name=upgradeLicenseKeys value=lt;bean:write name='element' property='licenseKeyId'/gt; I've tried the following as well (use single quotes to encapsulate the value's value): html:multibox property=upgradeLicenseKeys value='bean:write name=element property=licenseKeyId/'/ HTML rendered: input type=checkbox name=upgradeLicenseKeys value='lt;bean:write name=element property=licenseKeyId/gt;' I have included the appropriate page directive which imports the taglibrary: %@ taglib uri=jakarta-struts-bean prefix=bean% ...and I am using other bean:write .../ tags on the same page (not in the same fashion) and they are working properly. I found a message in the archives where the solution was to add filter=false in the bean:write tag, but the html:multibox tag has no attribute like that. I'm sure this has been solved before, I just cannot seem to find it in the archives. robert -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: DAO - DTO business object to view beans
Have to agree. My ActionForms started out looking very like the objects I use to access the data from the j2ee side, but the speed at which they diverged over just a few iterations was quite surprising -Original Message- From: James Higginbotham [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 20, 2002 23:11 To: Struts Users Mailing List Subject: RE: DAO - DTO business object to view beans In my past experience, projects tend to start out with the DTOs matching the BOs 1-to-1 but as a project grows and matures, UI changes will require a DTO to change in such a way that they don't match the BOs anymore. So, do the right thing and have both BO and DTO, even if they are matching. This will give you the buffer zone you need to be able to change one or the other. If you want to automate the transformation, I think there is a transformation library in the Struts resources page (somewhere) that is supposed to help in this mapping. Worst case, take a look at the apache commons bean utils that Struts uses to help automate the transformations. James -Original Message- From: Alex Birch [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 20, 2002 9:18 AM To: [EMAIL PROTECTED] Subject: DAO - DTO business object to view beans Hi, I am building a medium size struts application (40-60 jsp pages) in a team. my question is to do with mapping business objects to view beans... By view beans I mean DTO (data transfer objects mentioned by Chuck Caveness in chapter 7 his upcoming O'Reilly struts book) If my understanding is correct, to maintain the abstraction between the presentation layer and the business layer, business objects should be mapped to DTOs. DTOs are stateless and represent a partial view of your model to be represented on a single JSP page. We have adopted this policy quite literally and have designed our DTOs totally separate from the BO's (with re-use where possible). There are many instances however where our BOs are simply DAO (data access objects) which do not differ at all from the view beans. We as a team are arguing whether it is better to break the abstraction and use some of our BO's straight for display in the view (the BO's aren't persistant so there's no worry about accidental state manipulation). You can imagine with 40 or so JSPs how many view beans there are - and a lot of them will be straight theDTO.setProperty(theBO.getProperty()) which is also inefficient. Has anyone encountered the same superfluous nature in this scenario? The DTO's/viewBeans are not coupled to the presentation layer in any way seeing as they're just snapshot java beans with no specific struts implementation. Is there a big no-no that I haven't seen which means I shouldn't use the BOs for the view? thanks for your time in advance Alex __ Do You Yahoo!? Everything you'll ever need on one web page from News and Sport to Email and Music Charts http://uk.my.yahoo.com -- To unsubscribe, e-mail: mailto:struts-user- [EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Struts Community is going crazy! :-))
Dan's diagram actually (and correctly) denotes that there is one ActionForm instantiated per request or session (depending on the scope it is configured for in the ActionMapping). The same ActionForm class can be configured for multiple Actions via the ActionMapping, as you stated, but the ActionForm object is instantiated from the class once per request or session for the particular Action that uses the ActionForm. Therefore, 2 different Actions can use the same ActionForm class and cause the RequestProcessor to instantiate the ActionForm object from the ActionForm class. When the Action is requested by a client, the RequestProcessor will check to see if an instance of the ActionForm exists in the request or session (can't remember the request/session attribute keys that it is stored under), if it does not exist, it is created and any request parameters sent by the client are populated into the appropriate ActionForm properties (see RequestProcessor.processActionForm for details). So, if 100 clients concurrently request an Action that has an ActionForm configured for request scope, there will be 100 instances of the ActionForm (one for each client). Once the request delivers a response, the request object is destroyed (waiting to be garbage collected) along with the ActionForm instance. Jason -Original Message- From: Alex Birch [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 20, 2002 7:28 AM To: Struts Users Mailing List Subject: RE: Struts Community is going crazy! :-)) Dan, that is a fantastic diagram (so much information so easily accessible in such a small place)! I have one question though to do with the ActionForm... Your colouring infers that there is one 'ActionForm per screen'. I know that an ActionForm instance is created (and filled with the form information from the client) whenever a form-bean is specified in the struts-config.xml, but I have read many discussions which state it sometimes can be more useful to make a less granular ActionForm class which encompasses many forms across different pages. This could be a little confusing on your diagram (then again, maybe it's just me!). Did I interpet things incorrectly? Alex --- Dan Cancro [EMAIL PROTECTED] wrote: This may or may not be what you're looking for, but I've been trying to organize patterns in the following diagram that's meant to show, among other things, where all the routine http request sub-activities should be coded. I color coded the activities to identify those that can be coded in more than one place and so contribute to potentially chaotic designs. I'll look over Ted's patterns and see how I can add some of that stuff to the diagram. http://members.telocity.com/dcancro/images/eng/Struts_MVC.gif Dan -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] __ Do You Yahoo!? Everything you'll ever need on one web page from News and Sport to Email and Music Charts http://uk.my.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Stupid email filters [WAS: DAO - DTO business object to view beans]
Ok whats wrong with this thread? Seems it offended someones highly touchy content filter. duh! tries-to-clap-but-the-hands-miss/ stupid/ Trend SMEX Content Filter has detected sensitive content. Place = Struts Users Mailing List; ; ; Struts Users Mailing List Sender = Andrew Hill Subject = RE: DAO - DTO business object to view beans Delivery Time = August 20, 2002 (Tuesday) 11:48:58 Policy = Blocking07292002 Action on this mail = Quarantine message Warning message from administrator: Content filter has detected a sensitive e-mail. /stupid -Original Message- From: Andrew Hill [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 20, 2002 23:56 To: Struts Users Mailing List Subject: RE: DAO - DTO business object to view beans Have to agree. My ActionForms started out looking very like the objects I use to access the data from the j2ee side, but the speed at which they diverged over just a few iterations was quite surprising -Original Message- From: James Higginbotham [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 20, 2002 23:11 To: Struts Users Mailing List Subject: RE: DAO - DTO business object to view beans In my past experience, projects tend to start out with the DTOs matching the BOs 1-to-1 but as a project grows and matures, UI changes will require a DTO to change in such a way that they don't match the BOs anymore. So, do the right thing and have both BO and DTO, even if they are matching. This will give you the buffer zone you need to be able to change one or the other. If you want to automate the transformation, I think there is a transformation library in the Struts resources page (somewhere) that is supposed to help in this mapping. Worst case, take a look at the apache commons bean utils that Struts uses to help automate the transformations. James -Original Message- From: Alex Birch [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 20, 2002 9:18 AM To: [EMAIL PROTECTED] Subject: DAO - DTO business object to view beans Hi, I am building a medium size struts application (40-60 jsp pages) in a team. my question is to do with mapping business objects to view beans... By view beans I mean DTO (data transfer objects mentioned by Chuck Caveness in chapter 7 his upcoming O'Reilly struts book) If my understanding is correct, to maintain the abstraction between the presentation layer and the business layer, business objects should be mapped to DTOs. DTOs are stateless and represent a partial view of your model to be represented on a single JSP page. We have adopted this policy quite literally and have designed our DTOs totally separate from the BO's (with re-use where possible). There are many instances however where our BOs are simply DAO (data access objects) which do not differ at all from the view beans. We as a team are arguing whether it is better to break the abstraction and use some of our BO's straight for display in the view (the BO's aren't persistant so there's no worry about accidental state manipulation). You can imagine with 40 or so JSPs how many view beans there are - and a lot of them will be straight theDTO.setProperty(theBO.getProperty()) which is also inefficient. Has anyone encountered the same superfluous nature in this scenario? The DTO's/viewBeans are not coupled to the presentation layer in any way seeing as they're just snapshot java beans with no specific struts implementation. Is there a big no-no that I haven't seen which means I shouldn't use the BOs for the view? thanks for your time in advance Alex __ Do You Yahoo!? Everything you'll ever need on one web page from News and Sport to Email and Music Charts http://uk.my.yahoo.com -- To unsubscribe, e-mail: mailto:struts-user- [EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Struts Community is going crazy! :-))
Yes...sorry I don't think I made myself quite clear... I am aware that ActionForms are created on a per-request basis... what I was pointing out was that the one per screen colour that is associated with the ActionForm comes under the Number of Implementations (in general) legend. This would imply that there is an implementation of an ActionForm class per screen. The square outline colours represents instances in memory which would more accurately describe how they are generated. The Action class for instance has a one per action colour. Perhaps I am wrong in my interpretation but what I was stating was that it was ambiguous and could be interpretted in more ways than one Alex --- Jason Rosen [EMAIL PROTECTED] wrote: Dan's diagram actually (and correctly) denotes that there is one ActionForm instantiated per request or session (depending on the scope it is configured for in the ActionMapping). The same ActionForm class can be configured for multiple Actions via the ActionMapping, as you stated, but the ActionForm object is instantiated from the class once per request or session for the particular Action that uses the ActionForm. Therefore, 2 different Actions can use the same ActionForm class and cause the RequestProcessor to instantiate the ActionForm object from the ActionForm class. When the Action is requested by a client, the RequestProcessor will check to see if an instance of the ActionForm exists in the request or session (can't remember the request/session attribute keys that it is stored under), if it does not exist, it is created and any request parameters sent by the client are populated into the appropriate ActionForm properties (see RequestProcessor.processActionForm for details). So, if 100 clients concurrently request an Action that has an ActionForm configured for request scope, there will be 100 instances of the ActionForm (one for each client). Once the request delivers a response, the request object is destroyed (waiting to be garbage collected) along with the ActionForm instance. Jason -Original Message- From: Alex Birch [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 20, 2002 7:28 AM To: Struts Users Mailing List Subject: RE: Struts Community is going crazy! :-)) Dan, that is a fantastic diagram (so much information so easily accessible in such a small place)! I have one question though to do with the ActionForm... Your colouring infers that there is one 'ActionForm per screen'. I know that an ActionForm instance is created (and filled with the form information from the client) whenever a form-bean is specified in the struts-config.xml, but I have read many discussions which state it sometimes can be more useful to make a less granular ActionForm class which encompasses many forms across different pages. This could be a little confusing on your diagram (then again, maybe it's just me!). Did I interpet things incorrectly? Alex --- Dan Cancro [EMAIL PROTECTED] wrote: This may or may not be what you're looking for, but I've been trying to organize patterns in the following diagram that's meant to show, among other things, where all the routine http request sub-activities should be coded. I color coded the activities to identify those that can be coded in more than one place and so contribute to potentially chaotic designs. I'll look over Ted's patterns and see how I can add some of that stuff to the diagram. http://members.telocity.com/dcancro/images/eng/Struts_MVC.gif Dan -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] __ Do You Yahoo!? Everything you'll ever need on one web page from News and Sport to Email and Music Charts http://uk.my.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] __ Do You Yahoo!? Everything you'll ever need on one web page from News and Sport to Email and Music Charts http://uk.my.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Struts Community is going crazy! :-))
I'm so happy you found it useful. Good catch about the ActionForm. I thought about that and added (in general) after Number of implementations because you are right that there could be one ActionForm implementation for a whole wizard composed of several pages. I'll add a new background color meaning One per screen or wizard. Do you think this would clear up any confusion? Maybe operation instead of wizard. Thanks, Dan -Original Message- From: Alex Birch [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 20, 2002 7:28 AM To: Struts Users Mailing List Subject: RE: Struts Community is going crazy! :-)) Dan, that is a fantastic diagram (so much information so easily accessible in such a small place)! I have one question though to do with the ActionForm... Your colouring infers that there is one 'ActionForm per screen'. I know that an ActionForm instance is created (and filled with the form information from the client) whenever a form-bean is specified in the struts-config.xml, but I have read many discussions which state it sometimes can be more useful to make a less granular ActionForm class which encompasses many forms across different pages. This could be a little confusing on your diagram (then again, maybe it's just me!). Did I interpet things incorrectly? Alex --- Dan Cancro [EMAIL PROTECTED] wrote: This may or may not be what you're looking for, but I've been trying to organize patterns in the following diagram that's meant to show, among other things, where all the routine http request sub-activities should be coded. I color coded the activities to identify those that can be coded in more than one place and so contribute to potentially chaotic designs. I'll look over Ted's patterns and see how I can add some of that stuff to the diagram. http://members.telocity.com/dcancro/images/eng/Struts_MVC.gif Dan -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] __ Do You Yahoo!? Everything you'll ever need on one web page from News and Sport to Email and Music Charts http://uk.my.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
How to use DynaValidatorForm?
Hello I am trying to use the DynaValidatorForm in the following way. In the struts-config file I have !-- == Action Mappings == -- form-beans form-bean name=loginForm dynamic=true type=org.apache.struts.validator.DynaValidatorForm form-property name=email type=java.lang.String / form-property name=password type=java.lang.String / /form-bean /form-beans !-- == Action Mappings == -- action-mappings action path = /login parameter=/jsp/security/action/login-body.jsp type=com.mediamania.struts.security.LoginAction name=loginForm validate=true input=/jsp/security/action/login-body.jsp /action /action-mappings !-- = Validator Plug-in == -- plug-in className=org.apache.struts.validator.ValidatorPlugIn set-property property=pathnames value=/WEB-INF/validation/validator-rules.xml,/WEB-INF/validation/validator.xml / /plug-in How to write the LoginAction class, should it extend DynaAction like public class LoginAction extends Action { public ActionForward execute( ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response ) throws Exception{ // Get the user's login name and password. They should have already // validated by the ActionForm. String email = ((LoginForm)form).getEmail(); String password = ((LoginForm)form).getPassword(); ... } And should LoginForm extend DynaActionForm or DynaValidator form? Thanks a lot. I am struts newbie Anand _ Chat with friends online, try MSN Messenger: http://messenger.msn.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Struts Community is going crazy! :-))
-Original Message- From: Dan Cancro [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 20, 2002 9:24 AM To: 'Struts Users Mailing List' Subject: RE: Struts Community is going crazy! :-)) I'm so happy you found it useful. Good catch about the ActionForm. I thought about that and added (in general) after Number of implementations because you are right that there could be one ActionForm implementation for a whole wizard composed of several pages. I'll add a new background color meaning One per screen or wizard. Do you think this would clear up any confusion? Maybe operation instead of wizard. Thanks, Dan -Original Message- From: Alex Birch [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 20, 2002 7:28 AM To: Struts Users Mailing List Subject: RE: Struts Community is going crazy! :-)) Dan, that is a fantastic diagram (so much information so easily accessible in such a small place)! I have one question though to do with the ActionForm... Your colouring infers that there is one 'ActionForm per screen'. I know that an ActionForm instance is created (and filled with the form information from the client) whenever a form-bean is specified in the struts-config.xml, but I have read many discussions which state it sometimes can be more useful to make a less granular ActionForm class which encompasses many forms across different pages. This could be a little confusing on your diagram (then again, maybe it's just me!). Did I interpet things incorrectly? Alex --- Dan Cancro [EMAIL PROTECTED] wrote: This may or may not be what you're looking for, but I've been trying to organize patterns in the following diagram that's meant to show, among other things, where all the routine http request sub-activities should be coded. I color coded the activities to identify those that can be coded in more than one place and so contribute to potentially chaotic designs. I'll look over Ted's patterns and see how I can add some of that stuff to the diagram. http://members.telocity.com/dcancro/images/eng/Struts_MVC.gif Dan -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] __ Do You Yahoo!? Everything you'll ever need on one web page from News and Sport to Email and Music Charts http://uk.my.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
query string with more then one param in struts-config.xml
I have the following forward within an action in struts-config.xml: forward name=success path=/do/campaign/entry?op=viewreload=1/ However tomcat doesn't seem to like it, so I changed it to: forward name=success path=/do/campaign/entry?op=viewamp;reload=1/ This however doesn't seem to do the right forward. How do I have a query string with more than param in struts-config.xml? thanks, sriram -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Struts Community is going crazy! :-))
Oops, sorry about that - I missed the whole color key for the interior of the boxes. I guess I was concentrating on the exterior border color. Didn't mean to rant on about how ActionForms are created :) Jason -Original Message- From: Alex Birch [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 20, 2002 9:15 AM To: Struts Users Mailing List Subject: RE: Struts Community is going crazy! :-)) Yes...sorry I don't think I made myself quite clear... I am aware that ActionForms are created on a per-request basis... what I was pointing out was that the one per screen colour that is associated with the ActionForm comes under the Number of Implementations (in general) legend. This would imply that there is an implementation of an ActionForm class per screen. The square outline colours represents instances in memory which would more accurately describe how they are generated. The Action class for instance has a one per action colour. Perhaps I am wrong in my interpretation but what I was stating was that it was ambiguous and could be interpretted in more ways than one Alex --- Jason Rosen [EMAIL PROTECTED] wrote: Dan's diagram actually (and correctly) denotes that there is one ActionForm instantiated per request or session (depending on the scope it is configured for in the ActionMapping). The same ActionForm class can be configured for multiple Actions via the ActionMapping, as you stated, but the ActionForm object is instantiated from the class once per request or session for the particular Action that uses the ActionForm. Therefore, 2 different Actions can use the same ActionForm class and cause the RequestProcessor to instantiate the ActionForm object from the ActionForm class. When the Action is requested by a client, the RequestProcessor will check to see if an instance of the ActionForm exists in the request or session (can't remember the request/session attribute keys that it is stored under), if it does not exist, it is created and any request parameters sent by the client are populated into the appropriate ActionForm properties (see RequestProcessor.processActionForm for details). So, if 100 clients concurrently request an Action that has an ActionForm configured for request scope, there will be 100 instances of the ActionForm (one for each client). Once the request delivers a response, the request object is destroyed (waiting to be garbage collected) along with the ActionForm instance. Jason -Original Message- From: Alex Birch [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 20, 2002 7:28 AM To: Struts Users Mailing List Subject: RE: Struts Community is going crazy! :-)) Dan, that is a fantastic diagram (so much information so easily accessible in such a small place)! I have one question though to do with the ActionForm... Your colouring infers that there is one 'ActionForm per screen'. I know that an ActionForm instance is created (and filled with the form information from the client) whenever a form-bean is specified in the struts-config.xml, but I have read many discussions which state it sometimes can be more useful to make a less granular ActionForm class which encompasses many forms across different pages. This could be a little confusing on your diagram (then again, maybe it's just me!). Did I interpet things incorrectly? Alex --- Dan Cancro [EMAIL PROTECTED] wrote: This may or may not be what you're looking for, but I've been trying to organize patterns in the following diagram that's meant to show, among other things, where all the routine http request sub-activities should be coded. I color coded the activities to identify those that can be coded in more than one place and so contribute to potentially chaotic designs. I'll look over Ted's patterns and see how I can add some of that stuff to the diagram. http://members.telocity.com/dcancro/images/eng/Struts_MVC.gif Dan -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] __ Do You Yahoo!? Everything you'll ever need on one web page from News and Sport to Email and Music Charts http://uk.my.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] __ Do You Yahoo!? Everything you'll ever need on one web page from News and Sport to Email and Music Charts http://uk.my.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Jcrontab and Struts
Hi all, I was wondering if anybody has some experience implementing Jcrontab into struts. Jf -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Stupid email filters [WAS: DAO - DTO business object to view beans]
Heh heh...happens to me all the time: Your name cannot be Dick. Your dog cannot be a bitch. Your cat cannot be a pussy. A fastener cannot be a screw. A lubrication nozzle cannot be a tit or a nipple. A mule cannot be an ass. Something strange cannot be queer. A cigarette cannot be a fag. A levee cannot be a dike. Etc., etc And some, like the one returned to you, make no sense at all. I've found General Electric's censors to be the most restrictive. PC v. free speech? Only in America, man. As the concierge in French Kiss states, Unlike some countries, [France] is not a nation of hypocrites. Mark -Original Message- From: Andrew Hill [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 20, 2002 12:07 PM To: Struts Users Mailing List Subject: Stupid email filters [WAS: DAO - DTO business object to view beans] Ok whats wrong with this thread? Seems it offended someones highly touchy content filter. duh! tries-to-clap-but-the-hands-miss/ stupid/ Trend SMEX Content Filter has detected sensitive content. Place = Struts Users Mailing List; ; ; Struts Users Mailing List Sender = Andrew Hill Subject = RE: DAO - DTO business object to view beans Delivery Time = August 20, 2002 (Tuesday) 11:48:58 Policy = Blocking07292002 Action on this mail = Quarantine message Warning message from administrator: Content filter has detected a sensitive e-mail. /stupid -Original Message- From: Andrew Hill [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 20, 2002 23:56 To: Struts Users Mailing List Subject: RE: DAO - DTO business object to view beans Have to agree. My ActionForms started out looking very like the objects I use to access the data from the j2ee side, but the speed at which they diverged over just a few iterations was quite surprising -Original Message- From: James Higginbotham [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 20, 2002 23:11 To: Struts Users Mailing List Subject: RE: DAO - DTO business object to view beans In my past experience, projects tend to start out with the DTOs matching the BOs 1-to-1 but as a project grows and matures, UI changes will require a DTO to change in such a way that they don't match the BOs anymore. So, do the right thing and have both BO and DTO, even if they are matching. This will give you the buffer zone you need to be able to change one or the other. If you want to automate the transformation, I think there is a transformation library in the Struts resources page (somewhere) that is supposed to help in this mapping. Worst case, take a look at the apache commons bean utils that Struts uses to help automate the transformations. James -Original Message- From: Alex Birch [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 20, 2002 9:18 AM To: [EMAIL PROTECTED] Subject: DAO - DTO business object to view beans Hi, I am building a medium size struts application (40-60 jsp pages) in a team. my question is to do with mapping business objects to view beans... By view beans I mean DTO (data transfer objects mentioned by Chuck Caveness in chapter 7 his upcoming O'Reilly struts book) If my understanding is correct, to maintain the abstraction between the presentation layer and the business layer, business objects should be mapped to DTOs. DTOs are stateless and represent a partial view of your model to be represented on a single JSP page. We have adopted this policy quite literally and have designed our DTOs totally separate from the BO's (with re-use where possible). There are many instances however where our BOs are simply DAO (data access objects) which do not differ at all from the view beans. We as a team are arguing whether it is better to break the abstraction and use some of our BO's straight for display in the view (the BO's aren't persistant so there's no worry about accidental state manipulation). You can imagine with 40 or so JSPs how many view beans there are - and a lot of them will be straight theDTO.setProperty(theBO.getProperty()) which is also inefficient. Has anyone encountered the same superfluous nature in this scenario? The DTO's/viewBeans are not coupled to the presentation layer in any way seeing as they're just snapshot java beans with no specific struts implementation. Is there a big no-no that I haven't seen which means I shouldn't use the BOs for the view? thanks for your time in advance Alex __ Do You Yahoo!? Everything you'll ever need on one web page from News and Sport to Email and Music Charts http://uk.my.yahoo.com -- To unsubscribe, e-mail: mailto:struts-user- [EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail:
RE: Struts Community is going crazy! :-))
sorry to be pedantic but I wasn't sure about wizard or operation :) I don't quite know how to categorize its 'number of implementations' multiplicity - I've thought about it a fair bit too! the only thing I could think of was another colour altogether and call it: One per form or collection of forms and that's not very good due to the ambiguities with java.util.Collection!! Seeing as DynaActionForm means you don't need to implement any ActionForm classes the situation is even more complex! sorry I could only point it out and not solve it. I'm so happy you found it useful. Good catch about the ActionForm. I thought about that and added (in general) after Number of implementations because you are right that there could be one ActionForm implementation for a whole wizard composed of several pages. I'll add a new background color meaning One per screen or wizard. Do you think this would clear up any confusion? Maybe operation instead of wizard. Thanks, Dan -Original Message- From: Alex Birch [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 20, 2002 7:28 AM To: Struts Users Mailing List Subject: RE: Struts Community is going crazy! :-)) Dan, that is a fantastic diagram (so much information so easily accessible in such a small place)! I have one question though to do with the ActionForm... Your colouring infers that there is one 'ActionForm per screen'. I know that an ActionForm instance is created (and filled with the form information from the client) whenever a form-bean is specified in the struts-config.xml, but I have read many discussions which state it sometimes can be more useful to make a less granular ActionForm class which encompasses many forms across different pages. This could be a little confusing on your diagram (then again, maybe it's just me!). Did I interpet things incorrectly? Alex --- Dan Cancro [EMAIL PROTECTED] wrote: This may or may not be what you're looking for, but I've been trying to organize patterns in the following diagram that's meant to show, among other things, where all the routine http request sub-activities should be coded. I color coded the activities to identify those that can be coded in more than one place and so contribute to potentially chaotic designs. I'll look over Ted's patterns and see how I can add some of that stuff to the diagram. http://members.telocity.com/dcancro/images/eng/Struts_MVC.gif Dan -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] __ Do You Yahoo!? Everything you'll ever need on one web page from News and Sport to Email and Music Charts http://uk.my.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] __ Do You Yahoo!? Everything you'll ever need on one web page from News and Sport to Email and Music Charts http://uk.my.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
FW: ScanMail Message: To Sender, sensitive content found and action taken.
Touche. -Original Message- From: System Attendant [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 20, 2002 12:41 PM Trend SMEX Content Filter has detected sensitive content. Place = 'Struts Users Mailing List'; ; ; Struts Users Mailing List Sender = Galbreath, Mark Subject = RE: Stupid email filters [WAS: DAO - DTO business object to view beans] Delivery Time = August 20, 2002 (Tuesday) 12:40:52 Policy = Blocking07292002 Action on this mail = Quarantine message Warning message from administrator: Content filter has detected a sensitive e-mail. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Stupid email filters [WAS: DAO - DTO business object to view beans]
I get a bad filter message for every post I send to struts-user! I hope it's not my name birch which looks like 'bitch'!?!! what about Birch trees? sorry all to make you receive annoying filters Alex --- Galbreath, Mark [EMAIL PROTECTED] wrote: Heh heh...happens to me all the time: Your name cannot be Dick. Your dog cannot be a bitch. Your cat cannot be a pussy. A fastener cannot be a screw. A lubrication nozzle cannot be a tit or a nipple. A mule cannot be an ass. Something strange cannot be queer. A cigarette cannot be a fag. A levee cannot be a dike. Etc., etc And some, like the one returned to you, make no sense at all. I've found General Electric's censors to be the most restrictive. PC v. free speech? Only in America, man. As the concierge in French Kiss states, Unlike some countries, [France] is not a nation of hypocrites. Mark -Original Message- From: Andrew Hill [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 20, 2002 12:07 PM To: Struts Users Mailing List Subject: Stupid email filters [WAS: DAO - DTO business object to view beans] Ok whats wrong with this thread? Seems it offended someones highly touchy content filter. duh! tries-to-clap-but-the-hands-miss/ stupid/ Trend SMEX Content Filter has detected sensitive content. Place = Struts Users Mailing List; ; ; Struts Users Mailing List Sender = Andrew Hill Subject = RE: DAO - DTO business object to view beans Delivery Time = August 20, 2002 (Tuesday) 11:48:58 Policy = Blocking07292002 Action on this mail = Quarantine message Warning message from administrator: Content filter has detected a sensitive e-mail. /stupid -Original Message- From: Andrew Hill [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 20, 2002 23:56 To: Struts Users Mailing List Subject: RE: DAO - DTO business object to view beans Have to agree. My ActionForms started out looking very like the objects I use to access the data from the j2ee side, but the speed at which they diverged over just a few iterations was quite surprising -Original Message- From: James Higginbotham [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 20, 2002 23:11 To: Struts Users Mailing List Subject: RE: DAO - DTO business object to view beans In my past experience, projects tend to start out with the DTOs matching the BOs 1-to-1 but as a project grows and matures, UI changes will require a DTO to change in such a way that they don't match the BOs anymore. So, do the right thing and have both BO and DTO, even if they are matching. This will give you the buffer zone you need to be able to change one or the other. If you want to automate the transformation, I think there is a transformation library in the Struts resources page (somewhere) that is supposed to help in this mapping. Worst case, take a look at the apache commons bean utils that Struts uses to help automate the transformations. James -Original Message- From: Alex Birch [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 20, 2002 9:18 AM To: [EMAIL PROTECTED] Subject: DAO - DTO business object to view beans Hi, I am building a medium size struts application (40-60 jsp pages) in a team. my question is to do with mapping business objects to view beans... By view beans I mean DTO (data transfer objects mentioned by Chuck Caveness in chapter 7 his upcoming O'Reilly struts book) If my understanding is correct, to maintain the abstraction between the presentation layer and the business layer, business objects should be mapped to DTOs. DTOs are stateless and represent a partial view of your model to be represented on a single JSP page. We have adopted this policy quite literally and have designed our DTOs totally separate from the BO's (with re-use where possible). There are many instances however where our BOs are simply DAO (data access objects) which do not differ at all from the view beans. We as a team are arguing whether it is better to break the abstraction and use some of our BO's straight for display in the view (the BO's aren't persistant so there's no worry about accidental state manipulation). You can imagine with 40 or so JSPs how many view beans there are - and a lot of them will be straight theDTO.setProperty(theBO.getProperty()) which is also inefficient. Has anyone encountered the same superfluous nature in this scenario? The DTO's/viewBeans are not coupled to the presentation layer in any way seeing as they're just snapshot java beans with no specific struts implementation. Is there a big no-no that I haven't seen which means I shouldn't use the BOs for the view? thanks for your time in advance Alex __ Do You Yahoo!? Everything you'll ever need on one web page from News and Sport to Email and Music Charts
RE: DAO - DTO business object to view beans
I tried to read chapter 7 and the discussion on DTOs does not flow smoothly into the ActionForm discussion so it's a bit confusing as to how the big picture looks. It is also mentioned that DTOs are part of the model and ActionForms are part of the view. If BOs delegate persistence to DAOs, do we now have the following layers? DAO-BO-DTO-ActionForm where we need to populate an ActionForm from a DTO to bring data to the presentation layer. Andrew Hill [EMAIL PROTECTED] on 08/20/2002 08:55:48 AM Please respond to Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] cc: Subject: RE: DAO - DTO business object to view beans Have to agree. My ActionForms started out looking very like the objects I use to access the data from the j2ee side, but the speed at which they diverged over just a few iterations was quite surprising -Original Message- From: James Higginbotham [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 20, 2002 23:11 To: Struts Users Mailing List Subject: RE: DAO - DTO business object to view beans In my past experience, projects tend to start out with the DTOs matching the BOs 1-to-1 but as a project grows and matures, UI changes will require a DTO to change in such a way that they don't match the BOs anymore. So, do the right thing and have both BO and DTO, even if they are matching. This will give you the buffer zone you need to be able to change one or the other. If you want to automate the transformation, I think there is a transformation library in the Struts resources page (somewhere) that is supposed to help in this mapping. Worst case, take a look at the apache commons bean utils that Struts uses to help automate the transformations. James -Original Message- From: Alex Birch [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 20, 2002 9:18 AM To: [EMAIL PROTECTED] Subject: DAO - DTO business object to view beans Hi, I am building a medium size struts application (40-60 jsp pages) in a team. my question is to do with mapping business objects to view beans... By view beans I mean DTO (data transfer objects mentioned by Chuck Caveness in chapter 7 his upcoming O'Reilly struts book) If my understanding is correct, to maintain the abstraction between the presentation layer and the business layer, business objects should be mapped to DTOs. DTOs are stateless and represent a partial view of your model to be represented on a single JSP page. We have adopted this policy quite literally and have designed our DTOs totally separate from the BO's (with re-use where possible). There are many instances however where our BOs are simply DAO (data access objects) which do not differ at all from the view beans. We as a team are arguing whether it is better to break the abstraction and use some of our BO's straight for display in the view (the BO's aren't persistant so there's no worry about accidental state manipulation). You can imagine with 40 or so JSPs how many view beans there are - and a lot of them will be straight theDTO.setProperty(theBO.getProperty()) which is also inefficient. Has anyone encountered the same superfluous nature in this scenario? The DTO's/viewBeans are not coupled to the presentation layer in any way seeing as they're just snapshot java beans with no specific struts implementation. Is there a big no-no that I haven't seen which means I shouldn't use the BOs for the view? thanks for your time in advance Alex __ Do You Yahoo!? Everything you'll ever need on one web page from News and Sport to Email and Music Charts http://uk.my.yahoo.com -- To unsubscribe, e-mail: mailto:struts-user- [EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] ** Please Note: The information in this E-mail message, and any files transmitted with it, is confidential and may be legally privileged. It is intended only for the use of the individual(s) named above. If you are the intended recipient, be aware that your use of any confidential or personal information may be restricted by state and federal privacy laws. If you, the reader of this message, are not the intended recipient, you are hereby notified that you should not further disseminate, distribute, or forward this E-mail message. If you have received this E-mail in error, please notify the sender and delete the material from any computer. Thank you. ** -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Struts Community is going crazy! :-))
Hmm, I'll think about it some more. If I can figure out a way to do it, I'd like to add rollover popup boxes to explain the finer points. I'm hoping to get around to creating similar diagrams for the other frameworks out there so it's easier to compare apples to apples. So, as much as possible, I'd like to keep these colors framework-independent. I think the best architecture would be the one with the fewest number of red (duplicate) and yellow (up to you) activities. If there are compelling reasons to code functionality in two different places with a particular framework, but not with another framework, then the latter framework would be the better one in that case. -Original Message- From: Alex Birch [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 20, 2002 9:52 AM To: Struts Users Mailing List Subject: RE: Struts Community is going crazy! :-)) sorry to be pedantic but I wasn't sure about wizard or operation :) I don't quite know how to categorize its 'number of implementations' multiplicity - I've thought about it a fair bit too! the only thing I could think of was another colour altogether and call it: One per form or collection of forms and that's not very good due to the ambiguities with java.util.Collection!! Seeing as DynaActionForm means you don't need to implement any ActionForm classes the situation is even more complex! sorry I could only point it out and not solve it. I'm so happy you found it useful. Good catch about the ActionForm. I thought about that and added (in general) after Number of implementations because you are right that there could be one ActionForm implementation for a whole wizard composed of several pages. I'll add a new background color meaning One per screen or wizard. Do you think this would clear up any confusion? Maybe operation instead of wizard. Thanks, Dan -Original Message- From: Alex Birch [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 20, 2002 7:28 AM To: Struts Users Mailing List Subject: RE: Struts Community is going crazy! :-)) Dan, that is a fantastic diagram (so much information so easily accessible in such a small place)! I have one question though to do with the ActionForm... Your colouring infers that there is one 'ActionForm per screen'. I know that an ActionForm instance is created (and filled with the form information from the client) whenever a form-bean is specified in the struts-config.xml, but I have read many discussions which state it sometimes can be more useful to make a less granular ActionForm class which encompasses many forms across different pages. This could be a little confusing on your diagram (then again, maybe it's just me!). Did I interpet things incorrectly? Alex --- Dan Cancro [EMAIL PROTECTED] wrote: This may or may not be what you're looking for, but I've been trying to organize patterns in the following diagram that's meant to show, among other things, where all the routine http request sub-activities should be coded. I color coded the activities to identify those that can be coded in more than one place and so contribute to potentially chaotic designs. I'll look over Ted's patterns and see how I can add some of that stuff to the diagram. http://members.telocity.com/dcancro/images/eng/Struts_MVC.gif Dan -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] __ Do You Yahoo!? Everything you'll ever need on one web page from News and Sport to Email and Music Charts http://uk.my.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] __ Do You Yahoo!? Everything you'll ever need on one web page from News and Sport to Email and Music Charts http://uk.my.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: separating status messages and error messages-Getting the des ign right.
I don't understand the need for the boolean err = false; if(ae!= null) { err = true; } in the code below. Why not use merely: % ActionErrors ae = (ActionErrors)request.getAttribute(Action.ERROR_KEY); % Then, wherever you want something to occur on the page: % if(ae == null ? true : false) { % [whatever] % } % I am only asking in case there is something that is useful in your code, Mark, that I am missing. The difference is not huge, obviously. At 10:09 AM 8/20/2002 -0400, you wrote: Here's how I do it: % ActionErrors ae = ( ActionErrors) request.getAttribute( Action.ERROR_KEY); boolean err = false; if( ae != null) { err = true; } % You can also test for specific errors or for action messages. Then, wherever you want anything to occur on the page: % if( err) { % [whatever] % } % Mark -Original Message- From: Galbraith, Paul [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 20, 2002 8:38 AM Amol, I'm very new to Struts myself...just learning my way around, really, so I'd love to hear someone else's opinion on this. The way I'd approach this is to use the logic:notPresent/ tag in the JSP to show your status message only if there isn't an error object. E.g.: logic:notPresent name=%= org.apache.struts.action.Action.ERROR_KEY % User added, any other suckers? /logic:notPresent Paul -Original Message- From: amolk [mailto:[EMAIL PROTECTED]] Sent: August 20, 2002 1:58 AM To: [EMAIL PROTECTED] Subject: separating status messages and error messages-Getting the design right. Hi all, I have just shifted from servlets to jsp + struts. I am still new to both. I have to create some jsp pages corresponding to some user actions. For example, the application administrator can click on add user link ( from left band menu which is in a separete frame ) and will be presented with a form which he can fill can click on add to add the user. On submit, the corresponding action class's perform is invoked and the same page has to be shown back to the user, this time, with a status message saying user added successfully. Add another? If the operation fails, an appropriate message is displayed using the html:errors/ My problem is the following: Where do i handle these status messages? Each page is viewed by the user in two different scenarios. 1. When the user wishes to perform some task. This time, there is no status, error message to be shown. Just the jsp page, directly. 2. After the user fill out the form and submits it. The same form reappears with the appropriate status or error message. Should i be mixing status and error messages? In that case, how do i handle different headers and footers for the two? Or should i be using some custom tags? Hve been trying out custom tags but since am still new to all this, ( jsp as well as struts. have been using only servlets till now!!! ) am not able to take design design decisions based on custom libraries, and stuff. I would go for a design where maximum html code is present in the jsp file itself so that my page designers can freely modify/manage it. Any suggestions? I am not using tiles or anything else. Too many new things to handle @ a time, specially since i am new to jsp itself!! thnx in advance, amol -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Stupid email filters [WAS: DAO - DTO business object to view beans]
Trend SMEX Content Filter has detected sensitive content. Place = Struts Users Mailing List; ; ; Struts Users Mailing List Sender = Mark Galbreath Subject = RE: Stupid email filters [WAS: DAO - DTO business object to view beans] Delivery Time = August 20, 2002 (Tuesday) 13:35:22 Policy = Blocking07292002 Action on this mail = Quarantine message Warning message from administrator: Content filter has detected a sensitive e-mail. Violating words: ... to you, make no sense at all. I've found ... ^ Reason Code: 14fQLAN Reason Description: The word sense is not allowed in this company. Please resend using a different synonym. This technology is made possible by: General Electric Automated Filter and Restriction Technology (GEA-FART) Hehehe;) James Mitchell Software Engineer\Struts Evangelist Struts-Atlanta, the Open Minded Developer Network http://www.open-tools.org/struts-atlanta -Original Message- From: Galbreath, Mark [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 20, 2002 12:47 PM To: 'Struts Users Mailing List' Subject: RE: Stupid email filters [WAS: DAO - DTO business object to view beans] Heh heh...happens to me all the time: Your name cannot be Dick. Your dog cannot be a bitch. Your cat cannot be a pussy. A fastener cannot be a screw. A lubrication nozzle cannot be a tit or a nipple. A mule cannot be an ass. Something strange cannot be queer. A cigarette cannot be a fag. A levee cannot be a dike. Etc., etc And some, like the one returned to you, make no sense at all. I've found General Electric's censors to be the most restrictive. PC v. free speech? Only in America, man. As the concierge in French Kiss states, Unlike some countries, [France] is not a nation of hypocrites. Mark -Original Message- From: Andrew Hill [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 20, 2002 12:07 PM To: Struts Users Mailing List Subject: Stupid email filters [WAS: DAO - DTO business object to view beans] Ok whats wrong with this thread? Seems it offended someones highly touchy content filter. duh! tries-to-clap-but-the-hands-miss/ stupid/ Trend SMEX Content Filter has detected sensitive content. Place = Struts Users Mailing List; ; ; Struts Users Mailing List Sender = Andrew Hill Subject = RE: DAO - DTO business object to view beans Delivery Time = August 20, 2002 (Tuesday) 11:48:58 Policy = Blocking07292002 Action on this mail = Quarantine message Warning message from administrator: Content filter has detected a sensitive e-mail. /stupid -Original Message- From: Andrew Hill [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 20, 2002 23:56 To: Struts Users Mailing List Subject: RE: DAO - DTO business object to view beans Have to agree. My ActionForms started out looking very like the objects I use to access the data from the j2ee side, but the speed at which they diverged over just a few iterations was quite surprising -Original Message- From: James Higginbotham [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 20, 2002 23:11 To: Struts Users Mailing List Subject: RE: DAO - DTO business object to view beans In my past experience, projects tend to start out with the DTOs matching the BOs 1-to-1 but as a project grows and matures, UI changes will require a DTO to change in such a way that they don't match the BOs anymore. So, do the right thing and have both BO and DTO, even if they are matching. This will give you the buffer zone you need to be able to change one or the other. If you want to automate the transformation, I think there is a transformation library in the Struts resources page (somewhere) that is supposed to help in this mapping. Worst case, take a look at the apache commons bean utils that Struts uses to help automate the transformations. James -Original Message- From: Alex Birch [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 20, 2002 9:18 AM To: [EMAIL PROTECTED] Subject: DAO - DTO business object to view beans Hi, I am building a medium size struts application (40-60 jsp pages) in a team. my question is to do with mapping business objects to view beans... By view beans I mean DTO (data transfer objects mentioned by Chuck Caveness in chapter 7 his upcoming O'Reilly struts book) If my understanding is correct, to maintain the abstraction between the presentation layer and the business layer, business objects should be mapped to DTOs. DTOs are stateless and represent a partial view of your model to be represented on a single JSP page. We have adopted this policy quite literally and have designed our DTOs totally separate from the BO's (with re-use where possible). There are many instances however where our BOs are simply DAO (data access objects) which do not differ at all from the view beans. We as a team are arguing whether it is better to
RE: separating status messages and error messages-Getting the des ign right.
Simply for code readability - we have HTML people who would be confused running into a trinary operator. Good refactoring, though! Mark -Original Message- From: micael [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 20, 2002 1:49 PM I don't understand the need for the boolean err = false; if(ae!= null) { err = true; } in the code below. Why not use merely: % ActionErrors ae = (ActionErrors)request.getAttribute(Action.ERROR_KEY); % Then, wherever you want something to occur on the page: % if(ae == null ? true : false) { % [whatever] % } % I am only asking in case there is something that is useful in your code, Mark, that I am missing. The difference is not huge, obviously. At 10:09 AM 8/20/2002 -0400, you wrote: Here's how I do it: % ActionErrors ae = ( ActionErrors) request.getAttribute( Action.ERROR_KEY); boolean err = false; if( ae != null) { err = true; } % You can also test for specific errors or for action messages. Then, wherever you want anything to occur on the page: % if( err) { % [whatever] % } % Mark -Original Message- From: Galbraith, Paul [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 20, 2002 8:38 AM Amol, I'm very new to Struts myself...just learning my way around, really, so I'd love to hear someone else's opinion on this. The way I'd approach this is to use the logic:notPresent/ tag in the JSP to show your status message only if there isn't an error object. E.g.: logic:notPresent name=%= org.apache.struts.action.Action.ERROR_KEY % User added, any other suckers? /logic:notPresent Paul -Original Message- From: amolk [mailto:[EMAIL PROTECTED]] Sent: August 20, 2002 1:58 AM To: [EMAIL PROTECTED] Subject: separating status messages and error messages-Getting the design right. Hi all, I have just shifted from servlets to jsp + struts. I am still new to both. I have to create some jsp pages corresponding to some user actions. For example, the application administrator can click on add user link ( from left band menu which is in a separete frame ) and will be presented with a form which he can fill can click on add to add the user. On submit, the corresponding action class's perform is invoked and the same page has to be shown back to the user, this time, with a status message saying user added successfully. Add another? If the operation fails, an appropriate message is displayed using the html:errors/ My problem is the following: Where do i handle these status messages? Each page is viewed by the user in two different scenarios. 1. When the user wishes to perform some task. This time, there is no status, error message to be shown. Just the jsp page, directly. 2. After the user fill out the form and submits it. The same form reappears with the appropriate status or error message. Should i be mixing status and error messages? In that case, how do i handle different headers and footers for the two? Or should i be using some custom tags? Hve been trying out custom tags but since am still new to all this, ( jsp as well as struts. have been using only servlets till now!!! ) am not able to take design design decisions based on custom libraries, and stuff. I would go for a design where maximum html code is present in the jsp file itself so that my page designers can freely modify/manage it. Any suggestions? I am not using tiles or anything else. Too many new things to handle @ a time, specially since i am new to jsp itself!! thnx in advance, amol -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: How to put things in the ServletContext
On Tue, 20 Aug 2002, Robert Taylor wrote: Date: Tue, 20 Aug 2002 05:33:09 -0400 From: Robert Taylor [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: RE: How to put things in the ServletContext Adam, take a look at javax.servlet.ServletContextListener. You have access to ServletContext via the ServletContextEvent in contextInitialized(). ServletContextListener is designed for exactly this sort of thing, but requires a Servlet 2.3 container. If you're stuck on 2.2, Struts 1.1 includes a new PlugIn facility that is designed to plug things in to the init() and destroy() methods without having to subclass ActionServlet. The Struts example app in 1.1 demonstrates how the API is used, by using a plugin to load its pseudo-database. Craig /** * Called just after the web application has been initialized * * @param event the ServletContextEvent containing the ServletContext */ public void contextInitialized(ServletContextEvent event) { ServletContext context = event.getServletContext(); Object o = //get home interface context.setAttribute(someName, o); // other stuff here } HTH, robert -Original Message- From: Adam Connors [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 20, 2002 5:16 AM To: [EMAIL PROTECTED] Subject: How to put things in the ServletContext Hello, Apologies if this is an obvious one I've missed, (I'm a newbie and a bit bewildered by the onslaught of new information). But I want to put the home interface for an ejb into the servlet context to save time with multiple jndi lookups. Traditionally this is easily done in the servlet init() method and by making it a static member of the servlet. But I don't have access to this anymore since everything goes through the action servlet. Is there a way of putting stuff into the init() method of the action servlet without faffing around with subclassing it? I've found the DataSource and connection pool stuff, is this what I need? Can I have application context without the pool? Would there be any consequences of creating a pool with just one entry? Many thanks for your help, Adam. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Problem with Proxy Pass
Hi folks, I use the proxy pass in Apache to translate the url from http://www.myDomian.com:8080/myApp to http://www.myDomian.com In the html:form tag, it looks like, html:form action=/logon.do method=POST ... However, you will notice Struts will add the app name in the action path if you view the html form action=/myApp/logon.do method=POST ... This will break the url. Would anybody please me how can tell Struts not to add the app name? Thanks! Billy Ng _ Send and receive Hotmail on your mobile device: http://mobile.msn.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Cannot create iterator (newbie)
Hi! Intro: First of all, I'm new to Struts :) Well, I'm running Struts with Tomcat 3.2.4. I have a Vector as part of an ActionForm then I'm sending this ActionForm to a JSP file and trying to use the Vector to create a select element using the html:select and html:options. But, (there is always a but) I'm getting a Cannot create iterator... message :( Comments? Suggestions? Details: I have an Action called GetSBUListAction, which fills a Vector (SbuList) with instances of a bean called SBU like this: SbuList = Sbu.getList (slLogin); added the Vector to an ActionForm called SBUListForm: SBUListForm SbuListForm = new SBUListForm (); SbuListForm.setSbuList (SbuList); then I added this Vector to the request as an attribute: request.setAttribute (SBUList, SbuListForm); Everything goes Ok, so far. Meanwhile, in the JSP world... I'm using: jsp:useBean id=SBUList scope=request type=com.honeywell.fadd.SBUListForm/ to get the List from the request and then I use: html:select property=selectedSBU html:options collection=SBUList property=sbuID labelProperty=name/ /html:select To try and make a select statement with its options. But when I try it, I get this ugly message: Error: 500 Location: /fadd/new_asset_sbu.jsp Internal Servlet Error: javax.servlet.ServletException: Cannot create iterator for com.honeywell.fadd.SBUListForm@2ea710 at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:461) at _0002fnew_0005fasset_0005fsbu_0002ejspnew_0005fasset_0005fsbu_jsp_13._jspService(_0002fnew_0005fasset_0005fsbu_0002ejspn ew_0005fasset_0005fsbu_jsp_13.java:399) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119) . . . Alejandro Silva Honeywell - GBS Mexico [EMAIL PROTECTED] +52 (444) 826-2577 -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: How to put things in the ServletContext
Given the recent discussion of Struts and connection pooling, it might be a good idea to include a connection pool example as an application. Jonas -Original Message- From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]] Sent: den 20 augusti 2002 20:24 To: Struts Users Mailing List Subject: RE: How to put things in the ServletContext On Tue, 20 Aug 2002, Robert Taylor wrote: Date: Tue, 20 Aug 2002 05:33:09 -0400 From: Robert Taylor [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: RE: How to put things in the ServletContext Adam, take a look at javax.servlet.ServletContextListener. You have access to ServletContext via the ServletContextEvent in contextInitialized(). ServletContextListener is designed for exactly this sort of thing, but requires a Servlet 2.3 container. If you're stuck on 2.2, Struts 1.1 includes a new PlugIn facility that is designed to plug things in to the init() and destroy() methods without having to subclass ActionServlet. The Struts example app in 1.1 demonstrates how the API is used, by using a plugin to load its pseudo-database. Craig /** * Called just after the web application has been initialized * * @param event the ServletContextEvent containing the ServletContext */ public void contextInitialized(ServletContextEvent event) { ServletContext context = event.getServletContext(); Object o = //get home interface context.setAttribute(someName, o); // other stuff here } HTH, robert -Original Message- From: Adam Connors [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 20, 2002 5:16 AM To: [EMAIL PROTECTED] Subject: How to put things in the ServletContext Hello, Apologies if this is an obvious one I've missed, (I'm a newbie and a bit bewildered by the onslaught of new information). But I want to put the home interface for an ejb into the servlet context to save time with multiple jndi lookups. Traditionally this is easily done in the servlet init() method and by making it a static member of the servlet. But I don't have access to this anymore since everything goes through the action servlet. Is there a way of putting stuff into the init() method of the action servlet without faffing around with subclassing it? I've found the DataSource and connection pool stuff, is this what I need? Can I have application context without the pool? Would there be any consequences of creating a pool with just one entry? Many thanks for your help, Adam. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Anything terrible happen over the past week?
Yes, apparently Mark Galbreath is back from vacation. I don't remember reading that in the release notes ;) James Mitchell Software Engineer\Struts Evangelist Struts-Atlanta, the Open Minded Developer Network http://www.open-tools.org/struts-atlanta -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 20, 2002 2:24 PM To: [EMAIL PROTECTED] Subject: Anything terrible happen over the past week? I've been out moving for the past week. I can catch up on the full archive over the next week, but has anything terrible been discovered and / or fixed since the b2 came out? Thanks -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
html:errors/ not displaying message?
I'm putting together a very basic, sample application for some training purposes using Struts 1.1b2. In testing the app, I cannot seem to get an error message from an ActionForm to display on the jsp. Can someone see what the heck I'm doing wrong? struts-config.xml ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE struts-config PUBLIC -//Apache Software Foundation//DTD Struts Configuration 1.1//EN http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd; struts-config form-beans form-bean name=LogonBean type=com.labone.LogonBean / /form-beans action-mappings action path=/LogonAction type=com.labone.LogonAction name=LogonBean input=/logon.jsp scope=request validate=true forward name=OK path=/display.jsp / forward name=NOK path=/logon.jsp / /action /action-mappings message-resources parameter=com.labone.Messages.ApplicationResources / /struts-config LogonBean.java package com.labone; import javax.servlet.http.HttpServletRequest; import org.apache.struts.action.ActionError; import org.apache.struts.action.ActionErrors; import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionMapping; public class LogonBean extends ActionForm { private String userID; public LogonBean() { this.userID = ; } public String getUserID() { return this.userID; } public void setUserID(String userID) { this.userID = userID; } public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) { ActionErrors errors = new ActionErrors(); if ((!userID.equals (Jerry)) (!userID.equals (Qing))) { errors.add(ActionErrors.GLOBAL_ERROR, new ActionError(userID, error.bad.userid)); } return errors; } } ApplicationResources.properties errors.header= errors.footer= error.bad.userid = Unknown User ID logon.jsp %@ taglib uri=/bean prefix=bean % %@ taglib uri=/display prefix=display% %@ taglib uri=/html prefix=html % %@ taglib uri=/logic prefix=logic % %@ taglib uri=/nestedprefix=nested % %@ taglib uri=/tiles prefix=tiles % html head titleThis is a test web application/title /head body table border=0 html:form action=LogonAction.do method=POST tr td User ID: /td td html:text maxlength=10 property=userID size=10 / /td td html:errors name=userID/ /td /tr tr td colspan=3 html:submit/ /td /tr /html:form /table /body /html Aughh! Jerry Jalenak Web Publishing LabOne, Inc. 10101 Renner Blvd. Lenexa, KS 66219 (913) 577-1496 [EMAIL PROTECTED] This transmission (and any information attached to it) may be confidential and is intended solely for the use of the individual or entity to which it is addressed. If you are not the intended recipient or the person responsible for delivering the transmission to the intended recipient, be advised that you have received this transmission in error and that any use, dissemination, forwarding, printing, or copying of this information is strictly prohibited. If you have received this transmission in error, please immediately notify LabOne at (800)388-4675. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Validating nested:text fields in an iterate block
I did not use the nested tag but you should be able to validate indexed fields by specifying indexedProperty and indexedListProperty (the version of the struts validator framework I use never uses the indexedProperty). field property=street indexedProperty=address indexedListProperty=addressList depends=.. For more info check out http://home.earthlink.net/~dwinterfeldt/revision.html for changes made on 9/25/2001. -Original Message- From: Jon.Ridgway [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 20, 2002 10:29 AM To: ''Struts Users Mailing List' ' Subject: Validating nested:text fields in an iterate block Hi All, Is is possible to use the struts validator to validate a nested:text field within an iterate block. I can't see a way to do this; validation.xml wants the name of a property on the form; but within an iterate block the field names are made on the fly - ie address[0].street. Is it possible to define a property=address[*].street ? Any pointers much appreciated. Jon. The contents of this email are intended only for the named addressees and may contain confidential and/or privileged material. If received in error please contact UPCO on +44 (0) 113 201 0600 and then delete the entire e-mail from your system. Unauthorised review, distribution, disclosure or other use of this information could constitute a breach of confidence. Your co-operation in this matter is greatly appreciated. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: html:errors/ not displaying message?
For your html:errors/ tag, don't specify the name attribute. Specify the property attribute instead. It would look like: html:errors property=userID / I hope this helps ya out. ~ Keith http://www.buffalo.edu/~kkamholz -Original Message- From: Jerry Jalenak [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 20, 2002 2:41 PM To: '[EMAIL PROTECTED]' Subject: html:errors/ not displaying message? I'm putting together a very basic, sample application for some training purposes using Struts 1.1b2. In testing the app, I cannot seem to get an error message from an ActionForm to display on the jsp. Can someone see what the heck I'm doing wrong? struts-config.xml ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE struts-config PUBLIC -//Apache Software Foundation//DTD Struts Configuration 1.1//EN http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd; struts-config form-beans form-bean name=LogonBean type=com.labone.LogonBean / /form-beans action-mappings action path=/LogonAction type=com.labone.LogonAction name=LogonBean input=/logon.jsp scope=request validate=true forward name=OK path=/display.jsp / forward name=NOK path=/logon.jsp / /action /action-mappings message-resources parameter=com.labone.Messages.ApplicationResources / /struts-config LogonBean.java package com.labone; import javax.servlet.http.HttpServletRequest; import org.apache.struts.action.ActionError; import org.apache.struts.action.ActionErrors; import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionMapping; public class LogonBean extends ActionForm { private String userID; public LogonBean() { this.userID = ; } public String getUserID() { return this.userID; } public void setUserID(String userID) { this.userID = userID; } public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) { ActionErrors errors = new ActionErrors(); if ((!userID.equals (Jerry)) (!userID.equals (Qing))) { errors.add(ActionErrors.GLOBAL_ERROR, new ActionError(userID, error.bad.userid)); } return errors; } } ApplicationResources.properties errors.header= errors.footer= error.bad.userid = Unknown User ID logon.jsp %@ taglib uri=/bean prefix=bean % %@ taglib uri=/display prefix=display% %@ taglib uri=/html prefix=html % %@ taglib uri=/logic prefix=logic % %@ taglib uri=/nestedprefix=nested % %@ taglib uri=/tiles prefix=tiles % html head titleThis is a test web application/title /head body table border=0 html:form action=LogonAction.do method=POST tr td User ID: /td td html:text maxlength=10 property=userID size=10 / /td td html:errors name=userID/ /td /tr tr td colspan=3 html:submit/ /td /tr /html:form /table /body /html Aughh! Jerry Jalenak Web Publishing LabOne, Inc. 10101 Renner Blvd. Lenexa, KS 66219 (913) 577-1496 [EMAIL PROTECTED] This transmission (and any information attached to it) may be confidential and is intended solely for the use of the individual or entity to which it is addressed. If you are not the intended recipient or the person responsible for delivering the transmission to the intended recipient, be advised that you have received this transmission in error and that any use, dissemination, forwarding, printing, or copying of this information is strictly prohibited. If you have received this transmission in error, please immediately notify LabOne at (800)388-4675. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: iPlanet and Struts 1.02 problem - last try.
Jason, did you deploy this as a web-application if what is the web-app context i dont see you mention that any where in your mail. Rajesh. -Original Message- From: Jason Muse [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 20, 2002 11:28 AM To: [EMAIL PROTECTED] Subject: iPlanet and Struts 1.02 problem - last try. One more try at this issue Problem with an extra slash / being added to the front of my form action and links, examples from little app i wrote and struts-example app: Example 1: form name=panelForm method=POST action=//do/panelForm;jsessionid= Example 2: href=//do/editRegistration;jsessionid= This causes an issue by trying to call http://do/PanelForm; Server: iPlanet Web Server 6.0 SP2 Struts: 1.02 binary release Not sure where to go from here. Is there an iPlanet setting or something? I have tried MANY different settings in the struts-config.xml and web.xml, for example, tried using /do/* method, but it seems to do the same thing. Even the /do.* adds an extra http://PanelForm.do.. Here are some files if you need to look at them: [ clipping from struts-config.xml] action path=/panelForm type=com.whatever.struts.PanelAction name=panelForm scope=request input=/panelform.jsp validate=true forward name=success path=/do/success.jsp/ forward name=failure path=/do/panelForm / /action [ clipping from web.xml]--- servlet-mapping servlet-nameaction/servlet-name url-pattern/do/*/url-pattern /servlet-mapping --[ clipping from panelform.jsp]-- html:form action=/panelForm - -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: html:errors/ not displaying message?
OK, should've caught that one. Also had a finger-check in the ActionForm where I'm setting the error message. Fixed 'em both. Now I'm getting a message on the logon.jsp, but it looks like this: ???en_US.error.bad.userid??? I'm guessing it has something to do with localization? Ideas? Jerry -Original Message- From: Kamholz, Keith (corp-staff) USX [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 20, 2002 1:44 PM To: 'Struts Users Mailing List' Subject: RE: html:errors/ not displaying message? For your html:errors/ tag, don't specify the name attribute. Specify the property attribute instead. It would look like: html:errors property=userID / I hope this helps ya out. ~ Keith http://www.buffalo.edu/~kkamholz -Original Message- From: Jerry Jalenak [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 20, 2002 2:41 PM To: '[EMAIL PROTECTED]' Subject: html:errors/ not displaying message? I'm putting together a very basic, sample application for some training purposes using Struts 1.1b2. In testing the app, I cannot seem to get an error message from an ActionForm to display on the jsp. Can someone see what the heck I'm doing wrong? struts-config.xml ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE struts-config PUBLIC -//Apache Software Foundation//DTD Struts Configuration 1.1//EN http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd; struts-config form-beans form-bean name=LogonBean type=com.labone.LogonBean / /form-beans action-mappings action path=/LogonAction type=com.labone.LogonAction name=LogonBean input=/logon.jsp scope=request validate=true forward name=OK path=/display.jsp / forward name=NOK path=/logon.jsp / /action /action-mappings message-resources parameter=com.labone.Messages.ApplicationResources / /struts-config LogonBean.java package com.labone; import javax.servlet.http.HttpServletRequest; import org.apache.struts.action.ActionError; import org.apache.struts.action.ActionErrors; import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionMapping; public class LogonBean extends ActionForm { private String userID; public LogonBean() { this.userID = ; } public String getUserID() { return this.userID; } public void setUserID(String userID) { this.userID = userID; } public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) { ActionErrors errors = new ActionErrors(); if ((!userID.equals (Jerry)) (!userID.equals (Qing))) { errors.add(ActionErrors.GLOBAL_ERROR, new ActionError(userID, error.bad.userid)); } return errors; } } ApplicationResources.properties errors.header= errors.footer= error.bad.userid = Unknown User ID logon.jsp %@ taglib uri=/beanprefix=bean % %@ taglib uri=/display prefix=display% %@ taglib uri=/htmlprefix=html % %@ taglib uri=/logic prefix=logic % %@ taglib uri=/nested prefix=nested % %@ taglib uri=/tiles prefix=tiles % html head titleThis is a test web application/title /head body table border=0 html:form action=LogonAction.do method=POST tr td User ID: /td td html:text maxlength=10 property=userID size=10 / /td td html:errors name=userID/ /td /tr tr td colspan=3 html:submit/ /td /tr /html:form /table /body /html Aughh! Jerry Jalenak Web Publishing LabOne, Inc. 10101 Renner Blvd. Lenexa, KS 66219 (913) 577-1496 [EMAIL PROTECTED] This transmission (and any information attached to it) may be confidential and is intended solely for the use of the individual or entity to which it is addressed. If you are not the intended recipient or the person responsible for
RE: Anything terrible happen over the past week?
Yep. I came back from vacation and resubscribed. Mark -Original Message- From: [EMAIL PROTECTED] Sent: Tuesday, August 20, 2002 2:24 PM I've been out moving for the past week. I can catch up on the full archive over the next week, but has anything terrible been discovered and / or fixed since the b2 came out? -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: html:errors/ not displaying message?
Could just not be finding your properties file... Should be in: /classes/com/labone/Messages/ApplicationResources.properties -Original Message- From: Jerry.Jalenak [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 20, 2002 3:02 PM To: struts-user Subject: RE: html:errors/ not displaying message? OK, should've caught that one. Also had a finger-check in the ActionForm where I'm setting the error message. Fixed 'em both. Now I'm getting a message on the logon.jsp, but it looks like this: ???en_US.error.bad.userid??? I'm guessing it has something to do with localization? Ideas? Jerry -Original Message- From: Kamholz, Keith (corp-staff) USX [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 20, 2002 1:44 PM To: 'Struts Users Mailing List' Subject: RE: html:errors/ not displaying message? For your html:errors/ tag, don't specify the name attribute. Specify the property attribute instead. It would look like: html:errors property=userID / I hope this helps ya out. ~ Keith http://www.buffalo.edu/~kkamholz -Original Message- From: Jerry Jalenak [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 20, 2002 2:41 PM To: '[EMAIL PROTECTED]' Subject: html:errors/ not displaying message? I'm putting together a very basic, sample application for some training purposes using Struts 1.1b2. In testing the app, I cannot seem to get an error message from an ActionForm to display on the jsp. Can someone see what the heck I'm doing wrong? struts-config.xml ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE struts-config PUBLIC -//Apache Software Foundation//DTD Struts Configuration 1.1//EN http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd; struts-config form-beans form-bean name=LogonBean type=com.labone.LogonBean / /form-beans action-mappings action path=/LogonAction type=com.labone.LogonAction name=LogonBean input=/logon.jsp scope=request validate=true forward name=OK path=/display.jsp / forward name=NOK path=/logon.jsp / /action /action-mappings message-resources parameter=com.labone.Messages.ApplicationResources / /struts-config LogonBean.java package com.labone; import javax.servlet.http.HttpServletRequest; import org.apache.struts.action.ActionError; import org.apache.struts.action.ActionErrors; import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionMapping; public class LogonBean extends ActionForm { private String userID; public LogonBean() { this.userID = ; } public String getUserID() { return this.userID; } public void setUserID(String userID) { this.userID = userID; } public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) { ActionErrors errors = new ActionErrors(); if ((!userID.equals (Jerry)) (!userID.equals (Qing))) { errors.add(ActionErrors.GLOBAL_ERROR, new ActionError(userID, error.bad.userid)); } return errors; } } ApplicationResources.properties errors.header= errors.footer= error.bad.userid = Unknown User ID logon.jsp %@ taglib uri=/beanprefix=bean % %@ taglib uri=/display prefix=display% %@ taglib uri=/htmlprefix=html % %@ taglib uri=/logic prefix=logic % %@ taglib uri=/nested prefix=nested % %@ taglib uri=/tiles prefix=tiles % html head titleThis is a test web application/title /head body table border=0 html:form action=LogonAction.do method=POST tr td User ID: /td td html:text maxlength=10 property=userID size=10 / /td td html:errors name=userID/ /td /tr tr td colspan=3 html:submit/ /td /tr /html:form /table /body /html Aughh! Jerry Jalenak Web Publishing LabOne, Inc. 10101
RE: Anything terrible happen over the past week?
Dare I ask if there is a patch for this? -Original Message- From: Galbreath [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 20, 2002 3:12 PM To: struts-user Subject: RE: Anything terrible happen over the past week? Yep. I came back from vacation and resubscribed. Mark -Original Message- From: [EMAIL PROTECTED] Sent: Tuesday, August 20, 2002 2:24 PM I've been out moving for the past week. I can catch up on the full archive over the next week, but has anything terrible been discovered and / or fixed since the b2 came out? -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: html:errors/ not displaying message?
Checked. it's there. I seem to remember a post sometime ago about having to specify locale= , but can't seem to remember where it needs to be coded. I went to check the archives about an hour ago and couldn't get into 'em. Anybody else remember something about this? Jerry -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 20, 2002 2:28 PM To: [EMAIL PROTECTED] Subject: RE: html:errors/ not displaying message? Could just not be finding your properties file... Should be in: /classes/com/labone/Messages/ApplicationResources.properties -Original Message- From: Jerry.Jalenak [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 20, 2002 3:02 PM To: struts-user Subject: RE: html:errors/ not displaying message? OK, should've caught that one. Also had a finger-check in the ActionForm where I'm setting the error message. Fixed 'em both. Now I'm getting a message on the logon.jsp, but it looks like this: ???en_US.error.bad.userid??? I'm guessing it has something to do with localization? Ideas? Jerry -Original Message- From: Kamholz, Keith (corp-staff) USX [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 20, 2002 1:44 PM To: 'Struts Users Mailing List' Subject: RE: html:errors/ not displaying message? For your html:errors/ tag, don't specify the name attribute. Specify the property attribute instead. It would look like: html:errors property=userID / I hope this helps ya out. ~ Keith http://www.buffalo.edu/~kkamholz -Original Message- From: Jerry Jalenak [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 20, 2002 2:41 PM To: '[EMAIL PROTECTED]' Subject: html:errors/ not displaying message? I'm putting together a very basic, sample application for some training purposes using Struts 1.1b2. In testing the app, I cannot seem to get an error message from an ActionForm to display on the jsp. Can someone see what the heck I'm doing wrong? struts-config.xml ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE struts-config PUBLIC -//Apache Software Foundation//DTD Struts Configuration 1.1//EN http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd; struts-config form-beans form-bean name=LogonBean type=com.labone.LogonBean / /form-beans action-mappings action path=/LogonAction type=com.labone.LogonAction name=LogonBean input=/logon.jsp scope=request validate=true forward name=OK path=/display.jsp / forward name=NOK path=/logon.jsp / /action /action-mappings message-resources parameter=com.labone.Messages.ApplicationResources / /struts-config LogonBean.java package com.labone; import javax.servlet.http.HttpServletRequest; import org.apache.struts.action.ActionError; import org.apache.struts.action.ActionErrors; import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionMapping; public class LogonBean extends ActionForm { private String userID; public LogonBean() { this.userID = ; } public String getUserID() { return this.userID; } public void setUserID(String userID) { this.userID = userID; } public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) { ActionErrors errors = new ActionErrors(); if ((!userID.equals (Jerry)) (!userID.equals (Qing))) { errors.add(ActionErrors.GLOBAL_ERROR, new ActionError(userID, error.bad.userid)); } return errors; } } ApplicationResources.properties errors.header= errors.footer= error.bad.userid = Unknown User ID logon.jsp %@ taglib uri=/bean prefix=bean % %@ taglib uri=/display prefix=display% %@ taglib uri=/html prefix=html % %@ taglib uri=/logic prefix=logic % %@ taglib uri=/nestedprefix=nested % %@ taglib uri=/tiles prefix=tiles % html head titleThis is a test web application/title /head body table border=0 html:form action=LogonAction.do method=POST tr td User ID: /td td html:text maxlength=10 property=userID size=10 /
RE: Anything terrible happen over the past week?
Huh? It's a FEATURE! -Original Message- From: [EMAIL PROTECTED] Sent: Tuesday, August 20, 2002 3:28 PM Dare I ask if there is a patch for this? -Original Message- From: Galbreath [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 20, 2002 3:12 PM Yep. I came back from vacation and resubscribed. Mark -Original Message- From: [EMAIL PROTECTED] Sent: Tuesday, August 20, 2002 2:24 PM I've been out moving for the past week. I can catch up on the full archive over the next week, but has anything terrible been discovered and / or fixed since the b2 came out? -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: html:errors/ not displaying message?
You mean html:html locale=true ? -Original Message- From: Jerry Jalenak [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 20, 2002 3:23 PM To: 'Struts Users Mailing List' Subject: RE: html:errors/ not displaying message? Checked. it's there. I seem to remember a post sometime ago about having to specify locale= , but can't seem to remember where it needs to be coded. I went to check the archives about an hour ago and couldn't get into 'em. Anybody else remember something about this? Jerry -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 20, 2002 2:28 PM To: [EMAIL PROTECTED] Subject: RE: html:errors/ not displaying message? Could just not be finding your properties file... Should be in: /classes/com/labone/Messages/ApplicationResources.properties -Original Message- From: Jerry.Jalenak [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 20, 2002 3:02 PM To: struts-user Subject: RE: html:errors/ not displaying message? OK, should've caught that one. Also had a finger-check in the ActionForm where I'm setting the error message. Fixed 'em both. Now I'm getting a message on the logon.jsp, but it looks like this: ???en_US.error.bad.userid??? I'm guessing it has something to do with localization? Ideas? Jerry -Original Message- From: Kamholz, Keith (corp-staff) USX [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 20, 2002 1:44 PM To: 'Struts Users Mailing List' Subject: RE: html:errors/ not displaying message? For your html:errors/ tag, don't specify the name attribute. Specify the property attribute instead. It would look like: html:errors property=userID / I hope this helps ya out. ~ Keith http://www.buffalo.edu/~kkamholz -Original Message- From: Jerry Jalenak [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 20, 2002 2:41 PM To: '[EMAIL PROTECTED]' Subject: html:errors/ not displaying message? I'm putting together a very basic, sample application for some training purposes using Struts 1.1b2. In testing the app, I cannot seem to get an error message from an ActionForm to display on the jsp. Can someone see what the heck I'm doing wrong? struts-config.xml ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE struts-config PUBLIC -//Apache Software Foundation//DTD Struts Configuration 1.1//EN http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd; struts-config form-beans form-bean name=LogonBean type=com.labone.LogonBean / /form-beans action-mappings action path=/LogonAction type=com.labone.LogonAction name=LogonBean input=/logon.jsp scope=request validate=true forward name=OK path=/display.jsp / forward name=NOK path=/logon.jsp / /action /action-mappings message-resources parameter=com.labone.Messages.ApplicationResources / /struts-config LogonBean.java package com.labone; import javax.servlet.http.HttpServletRequest; import org.apache.struts.action.ActionError; import org.apache.struts.action.ActionErrors; import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionMapping; public class LogonBean extends ActionForm { private String userID; public LogonBean() { this.userID = ; } public String getUserID() { return this.userID; } public void setUserID(String userID) { this.userID = userID; } public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) { ActionErrors errors = new ActionErrors(); if ((!userID.equals (Jerry)) (!userID.equals (Qing))) { errors.add(ActionErrors.GLOBAL_ERROR, new ActionError(userID, error.bad.userid)); } return errors; } } ApplicationResources.properties errors.header= errors.footer= error.bad.userid = Unknown User ID logon.jsp %@ taglib uri=/bean prefix=bean % %@ taglib uri=/display prefix=display% %@ taglib uri=/html prefix=html % %@ taglib uri=/logic prefix=logic % %@ taglib uri=/nestedprefix=nested % %@ taglib uri=/tiles prefix=tiles % html head titleThis is a test web application/title /head body table border=0 html:form action=LogonAction.do method=POST tr
Master-Detail - design strategy
Hi, I´ve just discovered Struts and I am finding it great. We've developed a framework of our own in my company and now I'm trying to map how to migrate things to Struts. One of the things we have that works great (in terms of productivity) is a class that simply calls a serie of services objects (Data Access Objects) passing a Bean to be filled and some filters (in a HashMap). This is very usefull in the classic master-detail problem (nearly 70% of our pages - intranet applications). In the master case , we usually have only one service call loading a list. In the detail case, we can have a lot of services loading lists (for combo boxes) and a service loading the detail bean. Even in the master page we can have a serie of service calls to load Combo Filters. In our framework the configuration is done programatically (which is bad), calling configuration methods of a Command class (like an Action class). This is done in the servlet (the calls). My question is about what is the best design strategy to implement this using Struts. My first thought was to extend tha Action class to implement the serie of service calls. The problem is how to retrieve the configuration of services, beans and filters (I would like to do that in a declarative manner). I thought about extending the ActionMapping class to add these configurations and use the set-property tag to set them, but it would be quite confuse (the configuration is a bit more complicated then a list of name-value pairs). I think I would need a XML hierarchy of my own. Any suggestions appreciated ... :) Thanks in advance. Confidencialidade do Correio do Eletrônico*** Informações confidenciais podem estar contidas nesta mensagem. Se você não se encontra na lista de destinatários ou não é o remetente da mesma, você não deve copiar ou enviar esta mensagem para ninguém. Neste caso, você deve destruir e notificar o remetente da mesma. A empresa considera opiniões, conclusões e outras informações que não se relacionam com o negócio oficial da corporação de responsabilidade do usuário do serviço. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: html:errors/ not displaying message?
Would it go in the message-resources tag in your struts-config.xml? I haven't done it, but i think i remember seeing that on this list. ~ Keith http://www.buffalo.edu/~kkamholz -Original Message- From: Jerry Jalenak [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 20, 2002 3:23 PM To: 'Struts Users Mailing List' Subject: RE: html:errors/ not displaying message? Checked. it's there. I seem to remember a post sometime ago about having to specify locale= , but can't seem to remember where it needs to be coded. I went to check the archives about an hour ago and couldn't get into 'em. Anybody else remember something about this? Jerry -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 20, 2002 2:28 PM To: [EMAIL PROTECTED] Subject: RE: html:errors/ not displaying message? Could just not be finding your properties file... Should be in: /classes/com/labone/Messages/ApplicationResources.properties -Original Message- From: Jerry.Jalenak [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 20, 2002 3:02 PM To: struts-user Subject: RE: html:errors/ not displaying message? OK, should've caught that one. Also had a finger-check in the ActionForm where I'm setting the error message. Fixed 'em both. Now I'm getting a message on the logon.jsp, but it looks like this: ???en_US.error.bad.userid??? I'm guessing it has something to do with localization? Ideas? Jerry -Original Message- From: Kamholz, Keith (corp-staff) USX [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 20, 2002 1:44 PM To: 'Struts Users Mailing List' Subject: RE: html:errors/ not displaying message? For your html:errors/ tag, don't specify the name attribute. Specify the property attribute instead. It would look like: html:errors property=userID / I hope this helps ya out. ~ Keith http://www.buffalo.edu/~kkamholz -Original Message- From: Jerry Jalenak [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 20, 2002 2:41 PM To: '[EMAIL PROTECTED]' Subject: html:errors/ not displaying message? I'm putting together a very basic, sample application for some training purposes using Struts 1.1b2. In testing the app, I cannot seem to get an error message from an ActionForm to display on the jsp. Can someone see what the heck I'm doing wrong? struts-config.xml ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE struts-config PUBLIC -//Apache Software Foundation//DTD Struts Configuration 1.1//EN http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd; struts-config form-beans form-bean name=LogonBean type=com.labone.LogonBean / /form-beans action-mappings action path=/LogonAction type=com.labone.LogonAction name=LogonBean input=/logon.jsp scope=request validate=true forward name=OK path=/display.jsp / forward name=NOK path=/logon.jsp / /action /action-mappings message-resources parameter=com.labone.Messages.ApplicationResources / /struts-config LogonBean.java package com.labone; import javax.servlet.http.HttpServletRequest; import org.apache.struts.action.ActionError; import org.apache.struts.action.ActionErrors; import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionMapping; public class LogonBean extends ActionForm { private String userID; public LogonBean() { this.userID = ; } public String getUserID() { return this.userID; } public void setUserID(String userID) { this.userID = userID; } public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) { ActionErrors errors = new ActionErrors(); if ((!userID.equals (Jerry)) (!userID.equals (Qing))) { errors.add(ActionErrors.GLOBAL_ERROR, new ActionError(userID, error.bad.userid)); } return errors; } } ApplicationResources.properties errors.header= errors.footer= error.bad.userid = Unknown User ID logon.jsp %@ taglib uri=/bean prefix=bean % %@ taglib uri=/display prefix=display% %@ taglib uri=/html prefix=html % %@ taglib uri=/logic prefix=logic % %@ taglib uri=/nestedprefix=nested % %@ taglib uri=/tiles prefix=tiles % html head titleThis is a test web application/title /head
RE: html:errors/ not displaying message?
Well, that's just it. I don't remember either, and can't see to find it in the DTD (old age / bad eyes?). I tried Sri's suggestion of using html:html locale=true but it didn't seem to help (I don't usually use the html:html tags). I mean, this is so basic its embarassing, but I can't seem to get the da*n error message to display, at least the way I want it. I'm now (still) getting ???en_US.error.bad.userid??? - kinda worthless, ya know? Jerry -Original Message- From: Kamholz, Keith (corp-staff) USX [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 20, 2002 2:29 PM To: 'Struts Users Mailing List' Subject: RE: html:errors/ not displaying message? Would it go in the message-resources tag in your struts-config.xml? I haven't done it, but i think i remember seeing that on this list. ~ Keith http://www.buffalo.edu/~kkamholz -Original Message- From: Jerry Jalenak [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 20, 2002 3:23 PM To: 'Struts Users Mailing List' Subject: RE: html:errors/ not displaying message? Checked. it's there. I seem to remember a post sometime ago about having to specify locale= , but can't seem to remember where it needs to be coded. I went to check the archives about an hour ago and couldn't get into 'em. Anybody else remember something about this? Jerry -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 20, 2002 2:28 PM To: [EMAIL PROTECTED] Subject: RE: html:errors/ not displaying message? Could just not be finding your properties file... Should be in: /classes/com/labone/Messages/ApplicationResources.properties -Original Message- From: Jerry.Jalenak [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 20, 2002 3:02 PM To: struts-user Subject: RE: html:errors/ not displaying message? OK, should've caught that one. Also had a finger-check in the ActionForm where I'm setting the error message. Fixed 'em both. Now I'm getting a message on the logon.jsp, but it looks like this: ???en_US.error.bad.userid??? I'm guessing it has something to do with localization? Ideas? Jerry -Original Message- From: Kamholz, Keith (corp-staff) USX [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 20, 2002 1:44 PM To: 'Struts Users Mailing List' Subject: RE: html:errors/ not displaying message? For your html:errors/ tag, don't specify the name attribute. Specify the property attribute instead. It would look like: html:errors property=userID / I hope this helps ya out. ~ Keith http://www.buffalo.edu/~kkamholz -Original Message- From: Jerry Jalenak [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 20, 2002 2:41 PM To: '[EMAIL PROTECTED]' Subject: html:errors/ not displaying message? I'm putting together a very basic, sample application for some training purposes using Struts 1.1b2. In testing the app, I cannot seem to get an error message from an ActionForm to display on the jsp. Can someone see what the heck I'm doing wrong? struts-config.xml ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE struts-config PUBLIC -//Apache Software Foundation//DTD Struts Configuration 1.1//EN http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd; struts-config form-beans form-bean name=LogonBean type=com.labone.LogonBean / /form-beans action-mappings action path=/LogonAction type=com.labone.LogonAction name=LogonBean input=/logon.jsp scope=request validate=true forward name=OK path=/display.jsp / forward name=NOK path=/logon.jsp / /action /action-mappings message-resources parameter=com.labone.Messages.ApplicationResources / /struts-config LogonBean.java package com.labone; import javax.servlet.http.HttpServletRequest; import org.apache.struts.action.ActionError; import org.apache.struts.action.ActionErrors; import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionMapping; public class LogonBean extends ActionForm { private String userID; public LogonBean() { this.userID = ; } public String getUserID() { return this.userID; } public void setUserID(String userID) { this.userID = userID; } public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) { ActionErrors errors = new ActionErrors(); if ((!userID.equals (Jerry))
RE: html:errors/ not displaying message?
The question marks MIGHT be displayed because you don't have errors.prefix or errors.suffix defined. I think the errors tag uses those when you're displaying errors by property. I'm not sure though, so hopefully one of the guru's will chime in and tell us how stupid we are, hahaha. ~ Keith http://www.buffalo.edu/~kkamholz -Original Message- From: Jerry Jalenak [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 20, 2002 3:36 PM To: 'Struts Users Mailing List' Subject: RE: html:errors/ not displaying message? Well, that's just it. I don't remember either, and can't see to find it in the DTD (old age / bad eyes?). I tried Sri's suggestion of using html:html locale=true but it didn't seem to help (I don't usually use the html:html tags). I mean, this is so basic its embarassing, but I can't seem to get the da*n error message to display, at least the way I want it. I'm now (still) getting ???en_US.error.bad.userid??? - kinda worthless, ya know? Jerry -Original Message- From: Kamholz, Keith (corp-staff) USX [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 20, 2002 2:29 PM To: 'Struts Users Mailing List' Subject: RE: html:errors/ not displaying message? Would it go in the message-resources tag in your struts-config.xml? I haven't done it, but i think i remember seeing that on this list. ~ Keith http://www.buffalo.edu/~kkamholz -Original Message- From: Jerry Jalenak [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 20, 2002 3:23 PM To: 'Struts Users Mailing List' Subject: RE: html:errors/ not displaying message? Checked. it's there. I seem to remember a post sometime ago about having to specify locale= , but can't seem to remember where it needs to be coded. I went to check the archives about an hour ago and couldn't get into 'em. Anybody else remember something about this? Jerry -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 20, 2002 2:28 PM To: [EMAIL PROTECTED] Subject: RE: html:errors/ not displaying message? Could just not be finding your properties file... Should be in: /classes/com/labone/Messages/ApplicationResources.properties -Original Message- From: Jerry.Jalenak [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 20, 2002 3:02 PM To: struts-user Subject: RE: html:errors/ not displaying message? OK, should've caught that one. Also had a finger-check in the ActionForm where I'm setting the error message. Fixed 'em both. Now I'm getting a message on the logon.jsp, but it looks like this: ???en_US.error.bad.userid??? I'm guessing it has something to do with localization? Ideas? Jerry -Original Message- From: Kamholz, Keith (corp-staff) USX [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 20, 2002 1:44 PM To: 'Struts Users Mailing List' Subject: RE: html:errors/ not displaying message? For your html:errors/ tag, don't specify the name attribute. Specify the property attribute instead. It would look like: html:errors property=userID / I hope this helps ya out. ~ Keith http://www.buffalo.edu/~kkamholz -Original Message- From: Jerry Jalenak [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 20, 2002 2:41 PM To: '[EMAIL PROTECTED]' Subject: html:errors/ not displaying message? I'm putting together a very basic, sample application for some training purposes using Struts 1.1b2. In testing the app, I cannot seem to get an error message from an ActionForm to display on the jsp. Can someone see what the heck I'm doing wrong? struts-config.xml ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE struts-config PUBLIC -//Apache Software Foundation//DTD Struts Configuration 1.1//EN http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd; struts-config form-beans form-bean name=LogonBean type=com.labone.LogonBean / /form-beans action-mappings action path=/LogonAction type=com.labone.LogonAction name=LogonBean input=/logon.jsp scope=request validate=true forward name=OK path=/display.jsp / forward name=NOK path=/logon.jsp / /action /action-mappings message-resources parameter=com.labone.Messages.ApplicationResources / /struts-config LogonBean.java package com.labone; import javax.servlet.http.HttpServletRequest; import org.apache.struts.action.ActionError; import org.apache.struts.action.ActionErrors; import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionMapping; public class LogonBean
RE: html:errors/ not displaying message?
I've never specified locale... I did get the ?en_US**? When it could not find my entry or my entire properties file... -Original Message- From: Jerry.Jalenak [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 20, 2002 3:36 PM To: struts-user Subject: RE: html:errors/ not displaying message? Well, that's just it. I don't remember either, and can't see to find it in the DTD (old age / bad eyes?). I tried Sri's suggestion of using html:html locale=true but it didn't seem to help (I don't usually use the html:html tags). I mean, this is so basic its embarassing, but I can't seem to get the da*n error message to display, at least the way I want it. I'm now (still) getting ???en_US.error.bad.userid??? - kinda worthless, ya know? Jerry -Original Message- From: Kamholz, Keith (corp-staff) USX [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 20, 2002 2:29 PM To: 'Struts Users Mailing List' Subject: RE: html:errors/ not displaying message? Would it go in the message-resources tag in your struts-config.xml? I haven't done it, but i think i remember seeing that on this list. ~ Keith http://www.buffalo.edu/~kkamholz -Original Message- From: Jerry Jalenak [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 20, 2002 3:23 PM To: 'Struts Users Mailing List' Subject: RE: html:errors/ not displaying message? Checked. it's there. I seem to remember a post sometime ago about having to specify locale= , but can't seem to remember where it needs to be coded. I went to check the archives about an hour ago and couldn't get into 'em. Anybody else remember something about this? Jerry -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 20, 2002 2:28 PM To: [EMAIL PROTECTED] Subject: RE: html:errors/ not displaying message? Could just not be finding your properties file... Should be in: /classes/com/labone/Messages/ApplicationResources.properties -Original Message- From: Jerry.Jalenak [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 20, 2002 3:02 PM To: struts-user Subject: RE: html:errors/ not displaying message? OK, should've caught that one. Also had a finger-check in the ActionForm where I'm setting the error message. Fixed 'em both. Now I'm getting a message on the logon.jsp, but it looks like this: ???en_US.error.bad.userid??? I'm guessing it has something to do with localization? Ideas? Jerry -Original Message- From: Kamholz, Keith (corp-staff) USX [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 20, 2002 1:44 PM To: 'Struts Users Mailing List' Subject: RE: html:errors/ not displaying message? For your html:errors/ tag, don't specify the name attribute. Specify the property attribute instead. It would look like: html:errors property=userID / I hope this helps ya out. ~ Keith http://www.buffalo.edu/~kkamholz -Original Message- From: Jerry Jalenak [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 20, 2002 2:41 PM To: '[EMAIL PROTECTED]' Subject: html:errors/ not displaying message? I'm putting together a very basic, sample application for some training purposes using Struts 1.1b2. In testing the app, I cannot seem to get an error message from an ActionForm to display on the jsp. Can someone see what the heck I'm doing wrong? struts-config.xml ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE struts-config PUBLIC -//Apache Software Foundation//DTD Struts Configuration 1.1//EN http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd; struts-config form-beans form-bean name=LogonBean type=com.labone.LogonBean / /form-beans action-mappings action path=/LogonAction type=com.labone.LogonAction name=LogonBean input=/logon.jsp scope=request validate=true forward name=OK path=/display.jsp / forward name=NOK path=/logon.jsp / /action /action-mappings message-resources parameter=com.labone.Messages.ApplicationResources / /struts-config LogonBean.java package com.labone; import javax.servlet.http.HttpServletRequest; import org.apache.struts.action.ActionError; import org.apache.struts.action.ActionErrors; import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionMapping; public class LogonBean extends ActionForm { private String userID; public LogonBean() { this.userID = ; } public String getUserID() { return this.userID; }
RE: html:errors/ not displaying message?
The ?? Show that its not being found - within the ?? is the kjey its looking for... -Original Message- From: kkamholz [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 20, 2002 3:44 PM To: struts-user Subject: RE: html:errors/ not displaying message? The question marks MIGHT be displayed because you don't have errors.prefix or errors.suffix defined. I think the errors tag uses those when you're displaying errors by property. I'm not sure though, so hopefully one of the guru's will chime in and tell us how stupid we are, hahaha. ~ Keith http://www.buffalo.edu/~kkamholz -Original Message- From: Jerry Jalenak [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 20, 2002 3:36 PM To: 'Struts Users Mailing List' Subject: RE: html:errors/ not displaying message? Well, that's just it. I don't remember either, and can't see to find it in the DTD (old age / bad eyes?). I tried Sri's suggestion of using html:html locale=true but it didn't seem to help (I don't usually use the html:html tags). I mean, this is so basic its embarassing, but I can't seem to get the da*n error message to display, at least the way I want it. I'm now (still) getting ???en_US.error.bad.userid??? - kinda worthless, ya know? Jerry -Original Message- From: Kamholz, Keith (corp-staff) USX [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 20, 2002 2:29 PM To: 'Struts Users Mailing List' Subject: RE: html:errors/ not displaying message? Would it go in the message-resources tag in your struts-config.xml? I haven't done it, but i think i remember seeing that on this list. ~ Keith http://www.buffalo.edu/~kkamholz -Original Message- From: Jerry Jalenak [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 20, 2002 3:23 PM To: 'Struts Users Mailing List' Subject: RE: html:errors/ not displaying message? Checked. it's there. I seem to remember a post sometime ago about having to specify locale= , but can't seem to remember where it needs to be coded. I went to check the archives about an hour ago and couldn't get into 'em. Anybody else remember something about this? Jerry -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 20, 2002 2:28 PM To: [EMAIL PROTECTED] Subject: RE: html:errors/ not displaying message? Could just not be finding your properties file... Should be in: /classes/com/labone/Messages/ApplicationResources.properties -Original Message- From: Jerry.Jalenak [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 20, 2002 3:02 PM To: struts-user Subject: RE: html:errors/ not displaying message? OK, should've caught that one. Also had a finger-check in the ActionForm where I'm setting the error message. Fixed 'em both. Now I'm getting a message on the logon.jsp, but it looks like this: ???en_US.error.bad.userid??? I'm guessing it has something to do with localization? Ideas? Jerry -Original Message- From: Kamholz, Keith (corp-staff) USX [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 20, 2002 1:44 PM To: 'Struts Users Mailing List' Subject: RE: html:errors/ not displaying message? For your html:errors/ tag, don't specify the name attribute. Specify the property attribute instead. It would look like: html:errors property=userID / I hope this helps ya out. ~ Keith http://www.buffalo.edu/~kkamholz -Original Message- From: Jerry Jalenak [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 20, 2002 2:41 PM To: '[EMAIL PROTECTED]' Subject: html:errors/ not displaying message? I'm putting together a very basic, sample application for some training purposes using Struts 1.1b2. In testing the app, I cannot seem to get an error message from an ActionForm to display on the jsp. Can someone see what the heck I'm doing wrong? struts-config.xml ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE struts-config PUBLIC -//Apache Software Foundation//DTD Struts Configuration 1.1//EN http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd; struts-config form-beans form-bean name=LogonBean type=com.labone.LogonBean / /form-beans action-mappings action path=/LogonAction type=com.labone.LogonAction name=LogonBean input=/logon.jsp scope=request validate=true forward name=OK path=/display.jsp / forward name=NOK path=/logon.jsp / /action /action-mappings message-resources parameter=com.labone.Messages.ApplicationResources / /struts-config LogonBean.java package com.labone;
RE: html:errors/ not displaying message?
I agree, it appears that the key is not being found. The ActionForm adds the message like this: errors.add(userID, new ActionError(error.bad.userid)); In my ApplicationResources.properties, I have errors.header= errors.footer= errors.prefix= errors.suffix= error.bad.userid = Unknown User ID What concerns(?) me is that the error that is being display has the key listed as en_US.error.bad.userid. This indicates to me that it is looking for an ApplicationResources_en.properties - not the default ApplicationResources.properties In fact, I think I'll try to add an 'english' version of the file and see what happens. jerry -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 20, 2002 2:54 PM To: [EMAIL PROTECTED] Subject: RE: html:errors/ not displaying message? The ?? Show that its not being found - within the ?? is the kjey its looking for... -Original Message- From: kkamholz [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 20, 2002 3:44 PM To: struts-user Subject: RE: html:errors/ not displaying message? The question marks MIGHT be displayed because you don't have errors.prefix or errors.suffix defined. I think the errors tag uses those when you're displaying errors by property. I'm not sure though, so hopefully one of the guru's will chime in and tell us how stupid we are, hahaha. ~ Keith http://www.buffalo.edu/~kkamholz -Original Message- From: Jerry Jalenak [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 20, 2002 3:36 PM To: 'Struts Users Mailing List' Subject: RE: html:errors/ not displaying message? Well, that's just it. I don't remember either, and can't see to find it in the DTD (old age / bad eyes?). I tried Sri's suggestion of using html:html locale=true but it didn't seem to help (I don't usually use the html:html tags). I mean, this is so basic its embarassing, but I can't seem to get the da*n error message to display, at least the way I want it. I'm now (still) getting ???en_US.error.bad.userid??? - kinda worthless, ya know? Jerry -Original Message- From: Kamholz, Keith (corp-staff) USX [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 20, 2002 2:29 PM To: 'Struts Users Mailing List' Subject: RE: html:errors/ not displaying message? Would it go in the message-resources tag in your struts-config.xml? I haven't done it, but i think i remember seeing that on this list. ~ Keith http://www.buffalo.edu/~kkamholz -Original Message- From: Jerry Jalenak [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 20, 2002 3:23 PM To: 'Struts Users Mailing List' Subject: RE: html:errors/ not displaying message? Checked. it's there. I seem to remember a post sometime ago about having to specify locale= , but can't seem to remember where it needs to be coded. I went to check the archives about an hour ago and couldn't get into 'em. Anybody else remember something about this? Jerry -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 20, 2002 2:28 PM To: [EMAIL PROTECTED] Subject: RE: html:errors/ not displaying message? Could just not be finding your properties file... Should be in: /classes/com/labone/Messages/ApplicationResources.properties -Original Message- From: Jerry.Jalenak [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 20, 2002 3:02 PM To: struts-user Subject: RE: html:errors/ not displaying message? OK, should've caught that one. Also had a finger-check in the ActionForm where I'm setting the error message. Fixed 'em both. Now I'm getting a message on the logon.jsp, but it looks like this: ???en_US.error.bad.userid??? I'm guessing it has something to do with localization? Ideas? Jerry -Original Message- From: Kamholz, Keith (corp-staff) USX [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 20, 2002 1:44 PM To: 'Struts Users Mailing List' Subject: RE: html:errors/ not displaying message? For your html:errors/ tag, don't specify the name attribute. Specify the property attribute instead. It would look like: html:errors property=userID / I hope this helps ya out. ~ Keith http://www.buffalo.edu/~kkamholz -Original Message- From: Jerry Jalenak [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 20, 2002 2:41 PM To: '[EMAIL PROTECTED]' Subject: html:errors/ not displaying message? I'm putting together a very basic, sample application for some training purposes using Struts 1.1b2. In testing the app, I cannot seem to get an error message from an ActionForm to
iPlanet Web Server 6.0 SP2 and Struts 1.02 Instructions
Getting your application to run under iPlanet Web Server 6.0 SP2 Step by Step. *Notice this is just something I type up as I went along to get one little sample application I created to run LOCALLY in iPlanet Web Server 6.0 SP2. I made it a little more generic for posting but basically these are just my notes... please no slams, constructive criticism always welcomed! I will use sampleapp as the application. 01. Create your sampleapp application and directory structure. 02. Create a .war file (ex: jar -cf sampleapp.war *) 03. Create a sampleapp empty directory where your application will be deployed In iPlanet Web Server Administration: 04. Create new Server 05. Leave default Server name 06. Choose port. I used 8071 07. Change Server Identifier to: sampleapp 08. Set your document root to the above sampleapp directory. for example mine is C:/iplanet/sampleapp.. (Notice the forward slashes and NO ending slash!) 09. Click OK button. 10. I think you have to click on Configure Server next. 11. Top right-hand corner of browser, click Class Manager. 12. Click Manage button to manage sampleapp 13. Click on Web Applications tab 14. Click Deploy Web Application tab --War file Local --War file path is path to the sampleapp.war file on your local harddrive --Application URI, I choose /sampleapp --Installation directory, directory you used in step 03. mine: C:\iplanet\sampleapp 12. Click OK 13. Click Apply top right-hand corner of browser 14. Click Apply Changes button. This basically just restarts your sampleapp server. 15. Open your browser and access http://localhost:8071/sampleapp/xxx.jsp..or whatever... You could also create a Server called something like struts-apps and just deploy multiple .war files in the step 14, Deploy Web Application section of iPlanet. I did this and deployed most of the sample apps included with Struts. Other info: -did NOT have to add anything to iPlanet classpath/jvm12.conf -the only files in my web-inf\lib folder are: struts.jar and jdbc2_0-stdext.jar Hope this helps some of you, Jason -Original Message- From: Rajesh Kalluri [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 20, 2002 2:18 PM To: Struts Users Mailing List Subject: RE: iPlanet and Struts 1.02 problem - last try. Jason, did you deploy this as a web-application if what is the web-app context i dont see you mention that any where in your mail. Rajesh. -Original Message- From: Jason Muse [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 20, 2002 11:28 AM To: [EMAIL PROTECTED] Subject: iPlanet and Struts 1.02 problem - last try. One more try at this issue Problem with an extra slash / being added to the front of my form action and links, examples from little app i wrote and struts-example app: Example 1: form name=panelForm method=POST action=//do/panelForm;jsessionid= Example 2: href=//do/editRegistration;jsessionid= This causes an issue by trying to call http://do/PanelForm; Server: iPlanet Web Server 6.0 SP2 Struts: 1.02 binary release Not sure where to go from here. Is there an iPlanet setting or something? I have tried MANY different settings in the struts-config.xml and web.xml, for example, tried using /do/* method, but it seems to do the same thing. Even the /do.* adds an extra http://PanelForm.do.. Here are some files if you need to look at them: [ clipping from struts-config.xml] action path=/panelForm type=com.whatever.struts.PanelAction name=panelForm scope=request input=/panelform.jsp validate=true forward name=success path=/do/success.jsp/ forward name=failure path=/do/panelForm / /action [ clipping from web.xml]--- servlet-mapping servlet-nameaction/servlet-name url-pattern/do/*/url-pattern /servlet-mapping --[ clipping from panelform.jsp]-- html:form action=/panelForm - -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: html:errors/ not displaying message?
I am not sure how all of that works, but I have a feeling that its okay that way. When I had the problem it was showing the same thing. Are you ABSOLUTELY sure the properties file is named right and is in your classes directory (not in your source if you have one)? Can you put a copy in the classes directory and remove the package off the resource tag and try it for hahas. The only reason I ask is that everytime - EVERYTIME - I have a problem with this it turns out to be something stupid I did and am overlooking (like a bad filename or putting it somewhere else or a hundred other things). -Original Message- From: Jerry.Jalenak [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 20, 2002 3:52 PM To: struts-user Subject: RE: html:errors/ not displaying message? I agree, it appears that the key is not being found. The ActionForm adds the message like this: errors.add(userID, new ActionError(error.bad.userid)); In my ApplicationResources.properties, I have errors.header= errors.footer= errors.prefix= errors.suffix= error.bad.userid = Unknown User ID What concerns(?) me is that the error that is being display has the key listed as en_US.error.bad.userid. This indicates to me that it is looking for an ApplicationResources_en.properties - not the default ApplicationResources.properties In fact, I think I'll try to add an 'english' version of the file and see what happens. jerry -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 20, 2002 2:54 PM To: [EMAIL PROTECTED] Subject: RE: html:errors/ not displaying message? The ?? Show that its not being found - within the ?? is the kjey its looking for... -Original Message- From: kkamholz [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 20, 2002 3:44 PM To: struts-user Subject: RE: html:errors/ not displaying message? The question marks MIGHT be displayed because you don't have errors.prefix or errors.suffix defined. I think the errors tag uses those when you're displaying errors by property. I'm not sure though, so hopefully one of the guru's will chime in and tell us how stupid we are, hahaha. ~ Keith http://www.buffalo.edu/~kkamholz -Original Message- From: Jerry Jalenak [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 20, 2002 3:36 PM To: 'Struts Users Mailing List' Subject: RE: html:errors/ not displaying message? Well, that's just it. I don't remember either, and can't see to find it in the DTD (old age / bad eyes?). I tried Sri's suggestion of using html:html locale=true but it didn't seem to help (I don't usually use the html:html tags). I mean, this is so basic its embarassing, but I can't seem to get the da*n error message to display, at least the way I want it. I'm now (still) getting ???en_US.error.bad.userid??? - kinda worthless, ya know? Jerry -Original Message- From: Kamholz, Keith (corp-staff) USX [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 20, 2002 2:29 PM To: 'Struts Users Mailing List' Subject: RE: html:errors/ not displaying message? Would it go in the message-resources tag in your struts-config.xml? I haven't done it, but i think i remember seeing that on this list. ~ Keith http://www.buffalo.edu/~kkamholz -Original Message- From: Jerry Jalenak [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 20, 2002 3:23 PM To: 'Struts Users Mailing List' Subject: RE: html:errors/ not displaying message? Checked. it's there. I seem to remember a post sometime ago about having to specify locale= , but can't seem to remember where it needs to be coded. I went to check the archives about an hour ago and couldn't get into 'em. Anybody else remember something about this? Jerry -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 20, 2002 2:28 PM To: [EMAIL PROTECTED] Subject: RE: html:errors/ not displaying message? Could just not be finding your properties file... Should be in: /classes/com/labone/Messages/ApplicationResources.properties -Original Message- From: Jerry.Jalenak [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 20, 2002 3:02 PM To: struts-user Subject: RE: html:errors/ not displaying message? OK, should've caught that one. Also had a finger-check in the ActionForm where I'm setting the error message. Fixed 'em both. Now I'm getting a message on the logon.jsp, but it looks like this: ???en_US.error.bad.userid??? I'm guessing it has something to do with localization? Ideas? Jerry -Original Message- From: Kamholz, Keith (corp-staff) USX [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 20, 2002
Advice Learning Struts
Hi, This group is very active which is a good thing. I'd like to familiarize myself with the usage of struts. I have background in Java and JSP etc, I also have access to BEA Weblogic 5.1 currently. Just need a tip as to the best way to get started with them. Any recommendations for a site that might have a clear explanation and examples that can be implemented to give one some hands on. I know about the main site and that is where I was going to start, but was wondering if anyone knew of anything else besides. Thanks very much. Jim Thomas -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Advice Learning Struts
Yes, I love this list... All I did was start small, keep refactoring the first project until you have a lot of best practices going, read everything you can find. of course now there is chucks book on theserverside.com... Sigh... when I was a kid there were no books on struts... -Original Message- From: James.Thomas [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 20, 2002 4:04 PM To: struts-user Cc: struts-user Subject: Advice Learning Struts Hi, This group is very active which is a good thing. I'd like to familiarize myself with the usage of struts. I have background in Java and JSP etc, I also have access to BEA Weblogic 5.1 currently. Just need a tip as to the best way to get started with them. Any recommendations for a site that might have a clear explanation and examples that can be implemented to give one some hands on. I know about the main site and that is where I was going to start, but was wondering if anyone knew of anything else besides. Thanks very much. Jim Thomas -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Why html:javascript failed?
I am running the struts-validator/jsRegistration.jsp from Tomcat 4.0.4 with Struts 1.1-b1 on IE5 from Windows XP. The screen shows the // End -- on the bottom of the page. (I really like to include the screen dump here. However, it was rejected by the mail server.) When I clicked the Save button, I got IE5 runtime error and it asked whether I wisj=h to debug. (Again, I really like to include the screen dump here. However, it was rejected by the mail server.) When I viewed the source code vis View Source, I notice that ===beginning of excerpt == /form // End -- /SCRIPT /body /html ==end of excerpt== There is no Script tag. Apparently something is wrong. Could somebody explain this and show me how to work around this problem? Thanks. Kwang-Shi
RE: Advice Learning Struts
There is also Wellington L. S. da Silva's book JSP and Tag LIbraries for Web Development. It has a number of errors in the examples, though, that can make you waste time if you are not first a careful reader of the Struts documentation. Otherwise, there is a wealth of pointers in the Resources section. Good Luck and enjoy! [EMAIL PROTECTED] on 08/20/2002 04:15:12 PM Please respond to Struts Users Mailing List [EMAIL PROTECTED] To: [EMAIL PROTECTED] cc:(bcc: Joseph Sadove/DKBDS USA/DKB) Subject: RE: Advice Learning Struts Yes, I love this list... All I did was start small, keep refactoring the first project until you have a lot of best practices going, read everything you can find. of course now there is chucks book on theserverside.com... Sigh... when I was a kid there were no books on struts... -Original Message- From: James.Thomas [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 20, 2002 4:04 PM To: struts-user Cc: struts-user Subject: Advice Learning Struts Hi, This group is very active which is a good thing. I'd like to familiarize myself with the usage of struts. I have background in Java and JSP etc, I also have access to BEA Weblogic 5.1 currently. Just need a tip as to the best way to get started with them. Any recommendations for a site that might have a clear explanation and examples that can be implemented to give one some hands on. I know about the main site and that is where I was going to start, but was wondering if anyone knew of anything else besides. Thanks very much. Jim Thomas -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Advice Learning Struts
Get a decent service pack for WL 5.1. I think sp8 is a good one. sp6 is not. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 20, 2002 1:04 PM To: Struts Users Mailing List Cc: [EMAIL PROTECTED] Subject: Advice Learning Struts Hi, This group is very active which is a good thing. I'd like to familiarize myself with the usage of struts. I have background in Java and JSP etc, I also have access to BEA Weblogic 5.1 currently. Just need a tip as to the best way to get started with them. Any recommendations for a site that might have a clear explanation and examples that can be implemented to give one some hands on. I know about the main site and that is where I was going to start, but was wondering if anyone knew of anything else besides. Thanks very much. Jim Thomas -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: html:errors/ not displaying message?
Are the following properties in your properties file? errors.header= errors.footer= robert -Original Message- From: Jerry Jalenak [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 20, 2002 3:23 PM To: 'Struts Users Mailing List' Subject: RE: html:errors/ not displaying message? Checked. it's there. I seem to remember a post sometime ago about having to specify locale= , but can't seem to remember where it needs to be coded. I went to check the archives about an hour ago and couldn't get into 'em. Anybody else remember something about this? Jerry -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 20, 2002 2:28 PM To: [EMAIL PROTECTED] Subject: RE: html:errors/ not displaying message? Could just not be finding your properties file... Should be in: /classes/com/labone/Messages/ApplicationResources.properties -Original Message- From: Jerry.Jalenak [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 20, 2002 3:02 PM To: struts-user Subject: RE: html:errors/ not displaying message? OK, should've caught that one. Also had a finger-check in the ActionForm where I'm setting the error message. Fixed 'em both. Now I'm getting a message on the logon.jsp, but it looks like this: ???en_US.error.bad.userid??? I'm guessing it has something to do with localization? Ideas? Jerry -Original Message- From: Kamholz, Keith (corp-staff) USX [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 20, 2002 1:44 PM To: 'Struts Users Mailing List' Subject: RE: html:errors/ not displaying message? For your html:errors/ tag, don't specify the name attribute. Specify the property attribute instead. It would look like: html:errors property=userID / I hope this helps ya out. ~ Keith http://www.buffalo.edu/~kkamholz -Original Message- From: Jerry Jalenak [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 20, 2002 2:41 PM To: '[EMAIL PROTECTED]' Subject: html:errors/ not displaying message? I'm putting together a very basic, sample application for some training purposes using Struts 1.1b2. In testing the app, I cannot seem to get an error message from an ActionForm to display on the jsp. Can someone see what the heck I'm doing wrong? struts-config.xml ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE struts-config PUBLIC -//Apache Software Foundation//DTD Struts Configuration 1.1//EN http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd; struts-config form-beans form-bean name=LogonBean type=com.labone.LogonBean / /form-beans action-mappings action path=/LogonAction type=com.labone.LogonAction name=LogonBean input=/logon.jsp scope=request validate=true forward name=OK path=/display.jsp / forward name=NOK path=/logon.jsp / /action /action-mappings message-resources parameter=com.labone.Messages.ApplicationResources / /struts-config LogonBean.java package com.labone; import javax.servlet.http.HttpServletRequest; import org.apache.struts.action.ActionError; import org.apache.struts.action.ActionErrors; import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionMapping; public class LogonBean extends ActionForm { private String userID; public LogonBean() { this.userID = ; } public String getUserID() { return this.userID; } public void setUserID(String userID) { this.userID = userID; } public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) { ActionErrors errors = new ActionErrors(); if ((!userID.equals (Jerry)) (!userID.equals (Qing))) { errors.add(ActionErrors.GLOBAL_ERROR, new ActionError(userID, error.bad.userid)); } return errors; } } ApplicationResources.properties errors.header= errors.footer= error.bad.userid = Unknown User ID logon.jsp %@ taglib uri=/beanprefix=bean % %@ taglib uri=/display prefix=display% %@ taglib uri=/htmlprefix=html % %@ taglib uri=/logic prefix=logic % %@ taglib uri=/nested prefix=nested % %@ taglib uri=/tiles prefix=tiles % html head titleThis is a test web application/title /head body table border=0 html:form action=LogonAction.do