RE: looking for success stories
We've just finished phase1 of our system for the South African Revenue Services, an online tax return system, check it out on www.ipayment.co.za Unfortunately though, to get the full appreciation for the site one has to register as a taxpayer, but basically we used Tomcat, Struts and JBoss. The user is able to register and recieve and send their tax returns/payments electronically -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 22, 2001 10:06 PM To: [EMAIL PROTECTED] Subject: looking for success stories Hello, We are currently in the early design stages of an extremely high profile application and I am considering using Struts. I have used it in the past for several very small applications with no more than a couple concurrent users. But since we only get one shot at making this application work (or we'll all be out on our arses) I must make a very convincing case for Struts. Does anyone have any success stories that they'd like to share? Or can anyone point me in the direction of any articles or web pages or whatever where I may find info? By the way, we are going to deploy on Websphere (we're currently on 3.5.3 but will hopefully move to 4.0 before we roll it out) so I'd be especially interested if anyone has successfully deployed on WAS. Thanks! -Eric Stievater [EMAIL PROTECTED] *** IMPORTANT NOTE * The opinions expressed in this message and/or any attachments are those of the author and not necessarily those of Brown Brothers Harriman Co., its subsidiaries and affiliates (BBH). There is no guarantee that this message is either private or confidential, and it may have been altered by unauthorized sources without your or our knowledge. Nothing in the message is capable or intended to create any legally binding obligations on either party and it is not intended to provide legal advice. BBH accepts no responsibility for loss or damage from its use, including damage from virus. ** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. This footnote also confirms that this email message has been swept by MIMEsweeper for the presence of computer viruses. www.mimesweeper.com **
Re: Getting collections of messages
Hi, check the struts-validator extension at http://home.earthlink.net/~dwinterfeldt/ Rakesh Ayilliath [EMAIL PROTECTED] - Original Message - From: Adam Hardy [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, August 23, 2001 4:06 AM Subject: Getting collections of messages Hello, Is it possible to return collections of messages from the ApplicationResources.properties file? Eg the ApplicationResources.properties could be: page1.optionbox.1=Apples page1.optionbox.2=Oranges page1.optionbox.3=Pears ... ... I would like to get page1.optionbox.* as a collection to populate an options tag. I have looked through the JavaDoc for org.apache.struts.util.MessageResources and it doesn't have any methods that return collections or arrays so I guess the answer is probably no. Is there a way to acheive this functionality? Thanks Adam. __ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/
menu displayer
Dear all, I would like to know if anyone has done,using struts, an implementation of a menu displayereither collapsable or heirarchial that will look at user permissions.Based on the users permissions,it should display appropriate menu components Any information in this regard is welcome. thanks Pritish
RE: menu displayer
I would recommend doing something like this with a JSP/Servlet (in Struts) generating arrays of items and subitems, so you could decide in the Action Servlet what to put and what not to put in the arrays. Does that make sense? -Original Message- From: Pritish Kanagalekar [mailto:[EMAIL PROTECTED]] Sent: 23 August 2001 17:30 To: [EMAIL PROTECTED] Subject: menu displayer Dear all, I would like to know if anyone has done,using struts, an implementation of a menu displayer either collapsable or heirarchial that will look at user permissions.Based on the users permissions,it should display appropriate menu components Any information in this regard is welcome. thanks Pritish =** If you are not the intended recipient, employee or agent responsible for delivering the message to the intended recipient, you are hereby notified that any dissemination or copying of this communication and its attachments is strictly prohibited. If you have received this communication and its attachments in error, please return the original message and attachments to the sender using the reply facility on e-mail. Internet communications are not secure and therefore the UCLES Group does not accept legal responsibility for the contents of this message. Any views or opinions presented are solely those of the author and do not necessarily represent those of the UCLES Group unless otherwise specifically stated. This footnote also confirms that this email message has been swept by MIMEsweeper for the presence of computer viruses although this does not guarantee that this email is virus free. **=
RE: menu displayer
I meant writing out an array of items and subitems within a JavaScript function :), so the menus would be generated dynamically in DHTML. -Original Message- From: Mike Dewhirst [mailto:[EMAIL PROTECTED]] Sent: 23 August 2001 09:36 To: '[EMAIL PROTECTED]' Subject: RE: menu displayer I would recommend doing something like this with a JSP/Servlet (in Struts) generating arrays of items and subitems, so you could decide in the Action Servlet what to put and what not to put in the arrays. Does that make sense? -Original Message- From: Pritish Kanagalekar [mailto:[EMAIL PROTECTED]] Sent: 23 August 2001 17:30 To: [EMAIL PROTECTED] Subject: menu displayer Dear all, I would like to know if anyone has done,using struts, an implementation of a menu displayer either collapsable or heirarchial that will look at user permissions.Based on the users permissions,it should display appropriate menu components Any information in this regard is welcome. thanks Pritish =** If you are not the intended recipient, employee or agent responsible for delivering the message to the intended recipient, you are hereby notified that any dissemination or copying of this communication and its attachments is strictly prohibited. If you have received this communication and its attachments in error, please return the original message and attachments to the sender using the reply facility on e-mail. Internet communications are not secure and therefore the UCLES Group does not accept legal responsibility for the contents of this message. Any views or opinions presented are solely those of the author and do not necessarily represent those of the UCLES Group unless otherwise specifically stated. This footnote also confirms that this email message has been swept by MIMEsweeper for the presence of computer viruses although this does not guarantee that this email is virus free. **=
RE: menu displayer
How about creating an object (to be stored within the session-context), that will manage the contents of the menu and use a tag to format it. The array- version is easier to set up, but the generalization/reutilization might be better with a specialized class... It might even be possible to create a standard struts implementation, which could be exnteded by the individual applications to provide additional functionality (like permission-handling,...) how about it? Alexander Jesse -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 23, 2001 10:36 AM To: [EMAIL PROTECTED] Subject: RE: menu displayer I would recommend doing something like this with a JSP/Servlet (in Struts) generating arrays of items and subitems, so you could decide in the Action Servlet what to put and what not to put in the arrays. Does that make sense? -Original Message- From: Pritish Kanagalekar [mailto:[EMAIL PROTECTED]] Sent: 23 August 2001 17:30 To: [EMAIL PROTECTED] Subject: menu displayer Dear all, I would like to know if anyone has done,using struts, an implementation of a menu displayer either collapsable or heirarchial that will look at user permissions.Based on the users permissions,it should display appropriate menu components Any information in this regard is welcome. thanks Pritish =** If you are not the intended recipient, employee or agent responsible for delivering the message to the intended recipient, you are hereby notified that any dissemination or copying of this communication and its attachments is strictly prohibited. If you have received this communication and its attachments in error, please return the original message and attachments to the sender using the reply facility on e-mail. Internet communications are not secure and therefore the UCLES Group does not accept legal responsibility for the contents of this message. Any views or opinions presented are solely those of the author and do not necessarily represent those of the UCLES Group unless otherwise specifically stated. This footnote also confirms that this email message has been swept by MIMEsweeper for the presence of computer viruses although this does not guarantee that this email is virus free. **=
RE: I am new to the mailing list, need help to get to list archive(s)
http://www.mail-archive.com/struts-user%40jakarta.apache.org/ -Original Message- From: Venkat Jonnalagadda [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 22, 2001 5:47 PM To: '[EMAIL PROTECTED]' Subject: I am new to the mailing list, need help to get to list archive(s) Hi all, I am new to the mailing list and need directions to get to the list archives(s)... Thanks Venkat.
How to run HostPublisher and Struts in VAJ 3.5.3
Does any Body know how to run IntegrationsObjects from HostPublisher 2.2 together with Struts in the test environment of VAJ 3.5.3? Thanks a lot for your help Thomas Nachbur *** PLEASE NOTE *** This message, along with any attachments, may be confidential or legally privileged. It is intended only for the named person(s), who is/are the only authorized recipients. If this message has reached you in error, kindly destroy it without review and notify the sender immediately. Thank you for your help. **
problem with bluestone trail 6
I tried bluestone Trail 6 the jsp is simple: %@ page language=java % %@ taglib uri=/WEB-INF/struts-form.tld prefix=form % HTML HEADTITLELogon/TITLE/HEAD BODY bgcolor='silver' form:form action='logon.do' Username:form:text property='username'/ Password:form:text property='password'/ form:submit value='OK'/ /form:form /BODY /HTML I got the following exception: javax.servlet.ServletException: Cannot find ActionMappings or ActionFormBeans collection Thanks for any help! Ebi
prefix for struts-config.xml
Is it be possible to add a prefix to the forward parameter in an action mapping. I'm not too hot with xml, so could you explain how to do this? I presume you could define _something_ in the struts-config.xml/web.xml and include it in the forward value... Thanks for any advice! =** If you are not the intended recipient, employee or agent responsible for delivering the message to the intended recipient, you are hereby notified that any dissemination or copying of this communication and its attachments is strictly prohibited. If you have received this communication and its attachments in error, please return the original message and attachments to the sender using the reply facility on e-mail. Internet communications are not secure and therefore the UCLES Group does not accept legal responsibility for the contents of this message. Any views or opinions presented are solely those of the author and do not necessarily represent those of the UCLES Group unless otherwise specifically stated. This footnote also confirms that this email message has been swept by MIMEsweeper for the presence of computer viruses although this does not guarantee that this email is virus free. **=
RE: Getting collections of messages
I think U need to create the OptionLabelValue class and populate it with something like String i8nLabelValue = messages.getMessage(title.option.mr); list.add(new OptionLabelValue(i8nLabelValue,i8nLabelValue)); And in the jsp use select name= x html:options name=NameUnderWhichUsavedTheAboveList property= name labelProperty=value /html:options/html:select Let me know if it works -Original Message- From: Rakesh [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 23, 2001 12:51 PM To: [EMAIL PROTECTED] Subject: Re: Getting collections of messages Hi, check the struts-validator extension at http://home.earthlink.net/~dwinterfeldt/ Rakesh Ayilliath [EMAIL PROTECTED] - Original Message - From: Adam Hardy [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, August 23, 2001 4:06 AM Subject: Getting collections of messages Hello, Is it possible to return collections of messages from the ApplicationResources.properties file? Eg the ApplicationResources.properties could be: page1.optionbox.1=Apples page1.optionbox.2=Oranges page1.optionbox.3=Pears ... ... I would like to get page1.optionbox.* as a collection to populate an options tag. I have looked through the JavaDoc for org.apache.struts.util.MessageResources and it doesn't have any methods that return collections or arrays so I guess the answer is probably no. Is there a way to acheive this functionality? Thanks Adam. __ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/
use of logic-tags
Hi all, Two general questions: 1. Has someone an idea how to implement an ELSE with the logic-tags? Till now, I always made something like this (example): logic:equal . /logic:equal logic:notEqual . /logic:notEqual 2. Instead of using a string, which I can set to true or false, is there a possiblity to set a property to true or false (boolean) in the form, and use it later on from a jsp page? Thanks Marcel
RE: use of logic-tags
2 . U can use bean:define tag -Original Message- From: Marcel Andres [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 23, 2001 5:25 PM To: struts-user Subject: use of logic-tags Hi all, Two general questions: 1. Has someone an idea how to implement an ELSE with the logic-tags? Till now, I always made something like this (example): logic:equal . /logic:equal logic:notEqual . /logic:notEqual 2. Instead of using a string, which I can set to true or false, is there a possiblity to set a property to true or false (boolean) in the form, and use it later on from a jsp page? Thanks Marcel
Re: Getting collections of messages
Thanks this looks like just what I need. __ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/
RE: use of logic-tags
I think that you could implements rapidly somethink like : tag:if condition=???Boolean expression??? tag:thenHere it's evaluate only if condition is truetag:then/ tag:elseHere it's evaluate only if condition is falsetag:else/ tag:if/ arno -Message d'origine- De: Marcel Andres [SMTP:[EMAIL PROTECTED]] Date: jeudi 23 aout 2001 13:55 A: struts-user Objet: use of logic-tags Hi all, Two general questions: 1. Has someone an idea how to implement an ELSE with the logic-tags? Till now, I always made something like this (example): logic:equal . /logic:equal logic:notEqual . /logic:notEqual 2. Instead of using a string, which I can set to true or false, is there a possiblity to set a property to true or false (boolean) in the form, and use it later on from a jsp page? Thanks Marcel
RE: Va Java and Struts
Sorry I can't be precise on version numbers here but I think the problem is that the application you are running (or the struts code) is doing a request.removeAttribute(..) which is not supported in the old servlet API. ie. your Websphere version doesn't support the latest servlet API. Keith. --- [EMAIL PROTECTED] wrote: MaryAnne, I can't help you as I am new to Struts as well as VAJ and Websphere, but I would be very grateful if you could send me that article. Thanks, Robert -Original Message- From: MARYANNE B. SMITH [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 22, 2001 11:19 AM To: [EMAIL PROTECTED] Subject: Va Java and Struts I was trying to run the sample app from the article Making Struts work in the VisualAge for Java 3.5.3 WebSphere Test Environment in the Va Java 3.5.3 Test Environment. I installed the binary distribution file (Struts 1.0b)so I do not have the source to fix or change. This is the error I get upon requesting the employee.search.jsp page. Root Error-1: cant remove Attributes from request scope java.lang.IllegalArgumentException: cant remove Attributes from request scope java.lang.Throwable(java.lang.String) java.lang.Exception(java.lang.String) java.lang.RuntimeException(java.lang.String) java.lang.IllegalArgumentException(java.lang.String) void org.apache.jasper.runtime.PageContextImpl.removeAttribute(java.lan g.String, int) int org.apache.struts.taglib.html.FormTag.doEndTag() void jsp._employeeEdit_xjsp._jspService(javax.servlet.http.HttpServletR equest, javax.servlet.http.HttpServletResponse) void org.apache.jasper.runtime.HttpJspBase.service(javax.servlet.http.H ttpServletRequest, javax.servlet.http.HttpServletResponse) void javax.servlet.http.HttpServlet.service(javax.servlet.ServletReques t, javax.servlet.ServletResponse) void org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(jav ax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, boolean) void org.apache.jasper.runtime.JspServlet.serviceJspFile(javax.servlet. http.HttpServletRequest Any suggestions? Maryanne __ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/
Nested properties and javascript
All, When one uses nested beans as the FormBean (ActionForm) the html input field names (logically) have a dot in their names. This all work fine, i.e. the data can be posted back to the server and picked up by struts. However, JScript doesn't appear happy with objects having dots in their names (it naturally thinks that you mean a 'subobject' of an object). Anyone have any ideas on how to get around this? (apart from not using nested FormBeans?) Regards, Sean
exception handling design
all-- i'm in the process of designing an exception handling scheme with which struts will interact, and i wanted to solicit any ideas and best practices out there, especially from those of you who might have done this already. i have a base exception with relevant methods to chain additional exceptions to it, which will create a linked list of exceptions. i plan to have at least two subclasses of this base exception, one for application exceptions, one for system exceptions. when one or more exception(s) is(are) encountered, i was thinking i would pass a constant which holds a specific struts application.properties message key (e.g., error.authentication or error.database) to each exception constructor. then, if one or more exceptions is encountered, i can chain them all together and throw the base exception from the business layer to the presentation layer, where it will be caught by a related struts action class. at that point, the action class can call some utility method, passing it the base exception. this utility method will return a fully populated ActionErrors object, which the action class can then check for size. if it contains errors, the action class can return an appropriate ActionForward object. does anyone out there see any flaws with this type of setup? suggestions? comments? thanks in advance. jon
RE: menu displayer
I think this is what you want: http://husted.com/about/struts/struts-menu.zip You could hide/show items using logic:present role=role1,role2link/logic:present You might have to change some things in the source for this one though. Matt --- Mike Dewhirst [EMAIL PROTECTED] wrote: I meant writing out an array of items and subitems within a JavaScript function :), so the menus would be generated dynamically in DHTML. -Original Message- From: Mike Dewhirst [mailto:[EMAIL PROTECTED]] Sent: 23 August 2001 09:36 To: '[EMAIL PROTECTED]' Subject: RE: menu displayer I would recommend doing something like this with a JSP/Servlet (in Struts) generating arrays of items and subitems, so you could decide in the Action Servlet what to put and what not to put in the arrays. Does that make sense? -Original Message- From: Pritish Kanagalekar [mailto:[EMAIL PROTECTED]] Sent: 23 August 2001 17:30 To: [EMAIL PROTECTED] Subject: menu displayer Dear all, I would like to know if anyone has done,using struts, an implementation of a menu displayer either collapsable or heirarchial that will look at user permissions.Based on the users permissions,it should display appropriate menu components Any information in this regard is welcome. thanks Pritish =** If you are not the intended recipient, employee or agent responsible for delivering the message to the intended recipient, you are hereby notified that any dissemination or copying of this communication and its attachments is strictly prohibited. If you have received this communication and its attachments in error, please return the original message and attachments to the sender using the reply facility on e-mail. Internet communications are not secure and therefore the UCLES Group does not accept legal responsibility for the contents of this message. Any views or opinions presented are solely those of the author and do not necessarily represent those of the UCLES Group unless otherwise specifically stated. This footnote also confirms that this email message has been swept by MIMEsweeper for the presence of computer viruses although this does not guarantee that this email is virus free. **= __ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/
Re: Struts with WebSphere 4.0 on Win2000
Check out the redbook IBM Webshphere 4.0 Handbook - there is a sample app that used STRUTS! ** MailSweeper This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or taking of any action in reliance on the information contained in this e-mail is prohibited. If you have received this email in error, please immediately notify your email administrator. Blue Cross Blue Shield of Rhode Island 459-1000 x4357 (in state) 1-800-637-3718 x4357 (out of state) **
RE: use of logic-tags
i'm using Nials new tags, I've built them into my struts.jar file what version of struts r u using. If u like I can send u my jar file and tld, very easy to get working...let me know -Original Message- From: Heritier Arnaud [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 23, 2001 2:08 PM To: '[EMAIL PROTECTED]' Subject: RE: use of logic-tags I think that you could implements rapidly somethink like : tag:if condition=???Boolean expression??? tag:thenHere it's evaluate only if condition is truetag:then/ tag:elseHere it's evaluate only if condition is falsetag:else/ tag:if/ arno -Message d'origine- De: Marcel Andres [SMTP:[EMAIL PROTECTED]] Date: jeudi 23 aout 2001 13:55 A: struts-user Objet: use of logic-tags Hi all, Two general questions: 1. Has someone an idea how to implement an ELSE with the logic-tags? Till now, I always made something like this (example): logic:equal . /logic:equal logic:notEqual . /logic:notEqual 2. Instead of using a string, which I can set to true or false, is there a possiblity to set a property to true or false (boolean) in the form, and use it later on from a jsp page? Thanks Marcel ** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. This footnote also confirms that this email message has been swept by MIMEsweeper for the presence of computer viruses. www.mimesweeper.com **
HashMaps
Hi I am new to the list, and intermediate in Struts, and still haven't found how to use HashMaps with Struts tags. They are really handy, and save a lot of iterates. Anyone has an idea? Thanx Ganeff
bluestone trail 6
I tried bluestone Trail 6 the jsp is simple: %@ page language=java % %@ taglib uri=/WEB-INF/struts-form.tld prefix=form % HTML HEADTITLELogon/TITLE/HEAD BODY bgcolor='silver' form:form action='logon.do' Username:form:text property='username'/ Password:form:text property='password'/ form:submit value='OK'/ /form:form /BODY /HTML I got the following exception: javax.servlet.ServletException: Cannot find ActionMappings or ActionFormBeans collection Thanks for any help! Ebi
submitting a form from another frameset with struts
hi I`m having difficulties when I try to submit a form with javascript inside a frameset. The form that I want to submit is located inside a different frameset. I`m wondering if this have anything to do with the struts taglibs that im using to build my forms. Please help Jan Fredrik
RE: Struts with WebSphere 4.0 on Win2000
Yes, it works quite well. :) Chris Christopher Assenza Phone: 412.201.6026 Fax: 412.201.6060 Email: [EMAIL PROTECTED] ACCESSDATA Moving Your Business from Point A to Point e.SM http://www.accessdc.com/ -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 22, 2001 7:35 PM To: [EMAIL PROTECTED] Subject: Struts with WebSphere 4.0 on Win2000 Any chance anyone has done this for WAS 4.0 on 2000?
Re: Struts with WebSphere 4.0 on Win2000
Hi. One thing you should watch out for. WAS contains a bug that causes an error when using the Struts form tag. Comment out the 2 "pageContext.removeAttribute" lines in the org.apache.struts.taglib.html.FormTag class (doEndTag() method, starting at line 591), rebuild Struts, and all should be ok. Alternatively, you could do this: try { pageContext.removeAttribute(Constants.BEAN_KEY, PageContext.REQUEST_SCOPE); } catch (IllegalArgumentException iaex) {} try { pageContext.removeAttribute(Constants.FORM_KEY, PageContext.REQUEST_SCOPE); } catch (IllegalArgumentException iaex) {} Terence [EMAIL PROTECTED] wrote: Any chance anyone has done this for WAS 4.0 on 2000?
RE: Struts with WebSphere 4.0 on Win2000
Are you using EJB? What libraries did you have to import to get it working? Is there anything special you had to do to get it working? Thanks, Kent -Original Message- From: Assenza, Chris [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 23, 2001 7:15 AM To: '[EMAIL PROTECTED]' Subject: RE: Struts with WebSphere 4.0 on Win2000 Yes, it works quite well. :) Chris Christopher Assenza Phone: 412.201.6026 Fax: 412.201.6060 Email: [EMAIL PROTECTED] ACCESSDATA Moving Your Business from Point A to Point e.SM http://www.accessdc.com/ -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 22, 2001 7:35 PM To: [EMAIL PROTECTED] Subject: Struts with WebSphere 4.0 on Win2000 Any chance anyone has done this for WAS 4.0 on 2000?
RE: Struts with WebSphere 4.0 on Win2000
Kent, Yes, we use EJB's - no special libraries for that specific functionality, although there are issues with deployment and servlet spec compatibility. Not to repeat what Terence said but I'm going to cut and paste an earlier response from yesterday. :) Details on the shortcoming of WAS' JASPER can be found: http://www.mail-archive.com/struts-user@jakarta.apache.org/msg10964.html and somewhere else in the archive with some explanation from Craig and others, but I don't recall where. :) As for WebSphere, I can vouch for it with both 3.5.3 and 4.0. There are a few things to be aware of prior to moving forward. First and foremost - both WAS 3.5.x and 4.0 are using versions of Jasper that are slightly behind the latest spec; unfortunately, Struts makes use of the parts of the spec wherein WAS is lacking. A very simple change has been made to the Form taglib that will allow Struts 1.0 to work in a WAS environment. It can be downloaded at: http://www.enfused.com/struts.jar Second, in 3.5.3 deployment requires some extra steps and some tweaking. A list of the special steps can be found: http://jakarta.apache.org/struts/installation-was352-x.html As for 4.0, deployment is pretty straight forward. The Application Assembly tool is the nicest and most usable J2EE deployment tool I've seen to date and will get the job done just fine. The fact that 4.0 is J2EE compliant helps a lot too - finally we can use EAR's and WAR's properly. :) Hope that helps, Chris Christopher Assenza Phone: 412.201.6026 Fax: 412.201.6060 Email: [EMAIL PROTECTED] ACCESSDATA Moving Your Business from Point A to Point e.SM http://www.accessdc.com/ -Original Message- From: Kent Roylance [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 23, 2001 10:06 AM To: [EMAIL PROTECTED] Subject: RE: Struts with WebSphere 4.0 on Win2000 Are you using EJB? What libraries did you have to import to get it working? Is there anything special you had to do to get it working? Thanks, Kent -Original Message- From: Assenza, Chris [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 23, 2001 7:15 AM To: '[EMAIL PROTECTED]' Subject: RE: Struts with WebSphere 4.0 on Win2000 Yes, it works quite well. :) Chris Christopher Assenza Phone: 412.201.6026 Fax: 412.201.6060 Email: [EMAIL PROTECTED] ACCESSDATA Moving Your Business from Point A to Point e.SM http://www.accessdc.com/ -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 22, 2001 7:35 PM To: [EMAIL PROTECTED] Subject: Struts with WebSphere 4.0 on Win2000 Any chance anyone has done this for WAS 4.0 on 2000?
RE: default action and templates
Anyway U are doing the pageContext.setAttribute(template-stack , stack , PageContext.REQUEST_SCOPE) in the template:put tag. I don't see any reason why u cannot do the same in the Action class (requst.setAttribute(template-stack , stack)) . just take care of using the same key to access Stack in the template:get tag Suhas -Original Message- From: Erik Hatcher [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 23, 2001 10:45 AM To: [EMAIL PROTECTED] Subject: Re: default action and templates Why not use the Action to populate request scoped variables that you then bean:write inside template:put tags? Or have a look at the source code to the template:put tag and reverse-engineer it! :) Erik - Original Message - From: Marcelo Vanzin [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, August 20, 2001 12:12 PM Subject: Re: default action and templates Hi guys, me again. Marcelo Vanzin wrote: 2) I actually had some doubts with the templates, but while writing them down I kind of saw some ways of doing what I wanted, so I'll try it and later if I'm still stuck I'll cry for help. :-) So it came to be that what I had in mind did not work. :-) At least not the way I tried, but I could not find anything in the docs... Is there a way to do something similar to a template:put ... you would use in a JSP file, but inside an Action class? If that is possible, I'm done. :-) I tried request.setAttribute(), but when I call template:get ... in the main template, it raises an exception (empty stack), and all the examples I found were only JSP, not one using an Action class. -- []'s Marcelo Vanzin Touch Tecnologia [EMAIL PROTECTED] We're an underground revolution working overtime
RE: Struts with WebSphere 4.0 on Win2000
Chris, I've managed to get this running in VAJ 4.0(WTE), but for some reason, I'm missing some step somewhere in getting it to run in WAS 4.0. Do you (or anyone else watching), by chance have step-by-step intstructions for getting the example app running in 4.0? I've heard various piecies, like needing to change the xml describing the dtd's to use SYSTEM, and that WAS has a problem with the FormTag class (and that there's a 2 line fix), etc and I was wondering if anyone had put all the pieces together along with the values to enter for the console when installing the ear file. (ASIDE: What makes this even more frustrating is I'm just learning the new WAS 4.0 tools after finally getting used to the 3.5.x ones.) Any help would be greatly appreciated!!! Getting frustrated, Stephen :-{)
RE: Struts with WebSphere 4.0 on Win2000
Stephen, What did you do to get it running in VAJ? Do you have any specific steps you followed? Thanks, Kent -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 23, 2001 8:36 AM To: [EMAIL PROTECTED] Subject: RE: Struts with WebSphere 4.0 on Win2000 Chris, I've managed to get this running in VAJ 4.0(WTE), but for some reason, I'm missing some step somewhere in getting it to run in WAS 4.0. Do you (or anyone else watching), by chance have step-by-step intstructions for getting the example app running in 4.0? I've heard various piecies, like needing to change the xml describing the dtd's to use SYSTEM, and that WAS has a problem with the FormTag class (and that there's a 2 line fix), etc and I was wondering if anyone had put all the pieces together along with the values to enter for the console when installing the ear file. (ASIDE: What makes this even more frustrating is I'm just learning the new WAS 4.0 tools after finally getting used to the 3.5.x ones.) Any help would be greatly appreciated!!! Getting frustrated, Stephen :-{)
RE: Struts with WebSphere 4.0 on Win2000
Stephen, We aren't using VAJ (currently) so I can't vouch for the WTE, although it is supposed to be identical to the single-server free license you can d/l from the IBM site. For 4.0 there ARE no long-winded extra steps believe it or not. It's been a while since I last played with it but you just need to package a J2EE compliant EAR or WAR file and use the Application Assembly tool to Generate Code for Deployment (If I recall the menu option correctly). The DTD thing is no longer an issue, at least from my experience. It is really quite easy. I compiled some PRELIMINARY steps for our own application and have included them here. They take place after the EAR file has been made deployable by the AA tool. :) Please don't take them as the absolute only and best way to get the job done, they stem from early experimenting. :) Since so many people seem to be asking I might just go home tonight and try to formalize the whole process. :) Brief Preliminary Deployment Instructions for WAS 4.0 · Deploy Application o Install WebSphere 4.0 o Once completed and system is restarted (if necessary): Start the WebSphere service (startServer.bat on NT, probably startServer.sh on Unix) o After the server has started, log onto the web-based Administration Console (http://localhost:9090/admin). o Next, expand Nodes on the left. o Click on Enterprise Applications o Click on Install o Browse to the file Deployed_app.ear that you created with the AA tool. o Select the file follow the steps the console takes you through: § Click next on EJB deployment screen. § Click next on the Web Module deployment screen (change your preference on pre-compiling if you so desire). § On the next screen, allow WebSphere to redeploy YourApp-ejb.jar by leaving the box checked and clicking next. (ed: Not sure if this step is necessary) § Review the settings and click Finish when ready. · Once finished, begin JDBC configuration. (for Oracle) o Expand Resources in the left navigation area. o Click JDBC Drivers o Click New § The Server Class Path is the location of classes12.zip (Oracle's JDBCdrivers) on the server. § Name is: OracleJdbcDriver § Implementation Classname is: oracle.jdbc.pool.OracleConnectionPoolDataSource o Click Ok to add the driver. o Expand the newly created OracleJdbcDriver in the left navigation area. o Click on Data Sources o Click New § Name is: somePool § JNDI Name is: jdbc/somePool § Default Userid is: someId § Defaults Password is: somePass § All others left blank/default. o Click Ok to add the Data Source. o From the Data Source screen, click on somePool. o Click on Property Set (on the bottom). o Click Resource Properties o Click New § Name is: URL § Type is: java.lang.String § Value is: jdbc:oracle:thin:user/pass@host:port:sid Where: · user/pass are the username/password respectively · host is the IP address of the Oracle DB Server · port is the port on which Oracle is listening (ex. 1521). · sid is the Oracle SID or name for the database o Click Ok until you've reached the Data Source Screen. · Complete Deployment o Click Save on the nav-bar at the top of the screen. o Select server-config.xml (or the top option) and click Ok. o Stop and then restart the WebSphere AppServer. · Once started, go to http://someIpAddress/appname/file.jsp to test the deployment. -Chris Christopher Assenza Phone: 412.201.6026 Fax: 412.201.6060 Email: [EMAIL PROTECTED] ACCESSDATA Moving Your Business from Point A to Point e.SM http://www.accessdc.com/ -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 23, 2001 10:36 AM To: [EMAIL PROTECTED] Subject: RE: Struts with WebSphere 4.0 on Win2000 Chris, I've managed to get this running in VAJ 4.0(WTE), but for some reason, I'm missing some step somewhere in getting it to run in WAS 4.0. Do you (or anyone else watching), by chance have step-by-step intstructions for getting the example app running in 4.0? I've heard various piecies, like needing to change the xml
RE: bluestone trail 6
Are you using Tomcat? From: Srilatha Ravuri [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] To: '[EMAIL PROTECTED]' [EMAIL PROTECTED] Subject: RE: bluestone trail 6 Date: Thu, 23 Aug 2001 08:17:16 -0500 MIME-Version: 1.0 Received: from [64.208.42.41] by hotmail.com (3.2) with ESMTP id MHotMailBD4E4D850012400431D740D02A2912B50; Thu, 23 Aug 2001 06:17:57 -0700 Received: (qmail 8226 invoked by uid 500); 23 Aug 2001 13:17:43 - Received: (qmail 8216 invoked from network); 23 Aug 2001 13:17:43 - Received: from smtp2.hntb.com (HELO hntbw21.hntb.org) (198.51.229.202) by h31.sny.collab.net with SMTP; 23 Aug 2001 13:17:43 - Received: by hntbw21.hntb.org with Internet Mail Service (5.5.2653.19)id RDHG1NM6; Thu, 23 Aug 2001 08:17:17 -0500 From struts-user-return-15842-bhamidik Thu, 23 Aug 2001 06:18:55 -0700 Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm Precedence: bulk list-help: mailto:[EMAIL PROTECTED] list-unsubscribe: mailto:[EMAIL PROTECTED] list-post: mailto:[EMAIL PROTECTED] Delivered-To: mailing list [EMAIL PROTECTED] Message-ID: [EMAIL PROTECTED] X-Mailer: Internet Mail Service (5.5.2653.19) X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N I too got the same error.My mistake was in struts-config.xml (which is under folder /WEB-INF/struts-config.xml). where I gave a different name for the package and trying out with type as logon.LogonForm and logon.LogonAction as in the tutorial.Later I named my package as logon and corrected it.It worked. !-- == Form Bean Definitions === -- form-beans form-bean name=logonForm type=logon.LogonForm/ /form-beans !-- == Action Mapping Definitions == -- action-mappings action path=/logon type=logon.LogonAction name=logonForm Thanks -Original Message- From: Tamanaei, ITS PersWi C500, DA [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 23, 2001 7:50 AM To: '[EMAIL PROTECTED]' Subject: bluestone trail 6 Importance: Low I tried bluestone Trail 6 the jsp is simple: %@ page language=java % %@ taglib uri=/WEB-INF/struts-form.tld prefix=form % HTMLHEADTITLELogon/TITLE/HEAD BODY bgcolor='silver' form:form action='logon.do' Username:form:text property='username'/ Password:form:text property='password'/ form:submit value='OK'/ /form:form /BODY /HTML I got the following exception: javax.servlet.ServletException: Cannot find ActionMappings or ActionFormBeans collection Thanks for any help! Ebi _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
RE: Struts with WebSphere 4.0 on Win2000
Stephen, Appreciate the info because I know it takes time to figure out and is hard to come by. Thanks again, Kent -Original Message- From: Assenza, Chris [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 23, 2001 8:55 AM To: '[EMAIL PROTECTED]' Subject: RE: Struts with WebSphere 4.0 on Win2000 Stephen, We aren't using VAJ (currently) so I can't vouch for the WTE, although it is supposed to be identical to the single-server free license you can d/l from the IBM site. For 4.0 there ARE no long-winded extra steps believe it or not. It's been a while since I last played with it but you just need to package a J2EE compliant EAR or WAR file and use the Application Assembly tool to Generate Code for Deployment (If I recall the menu option correctly). The DTD thing is no longer an issue, at least from my experience. It is really quite easy. I compiled some PRELIMINARY steps for our own application and have included them here. They take place after the EAR file has been made deployable by the AA tool. :) Please don't take them as the absolute only and best way to get the job done, they stem from early experimenting. :) Since so many people seem to be asking I might just go home tonight and try to formalize the whole process. :) Brief Preliminary Deployment Instructions for WAS 4.0 · Deploy Application o Install WebSphere 4.0 o Once completed and system is restarted (if necessary): Start the WebSphere service (startServer.bat on NT, probably startServer.sh on Unix) o After the server has started, log onto the web-based Administration Console (http://localhost:9090/admin). o Next, expand Nodes on the left. o Click on Enterprise Applications o Click on Install o Browse to the file Deployed_app.ear that you created with the AA tool. o Select the file follow the steps the console takes you through: § Click next on EJB deployment screen. § Click next on the Web Module deployment screen (change your preference on pre-compiling if you so desire). § On the next screen, allow WebSphere to redeploy YourApp-ejb.jar by leaving the box checked and clicking next. (ed: Not sure if this step is necessary) § Review the settings and click Finish when ready. · Once finished, begin JDBC configuration. (for Oracle) o Expand Resources in the left navigation area. o Click JDBC Drivers o Click New § The Server Class Path is the location of classes12.zip (Oracle's JDBCdrivers) on the server. § Name is: OracleJdbcDriver § Implementation Classname is: oracle.jdbc.pool.OracleConnectionPoolDataSource o Click Ok to add the driver. o Expand the newly created OracleJdbcDriver in the left navigation area. o Click on Data Sources o Click New § Name is: somePool § JNDI Name is: jdbc/somePool § Default Userid is: someId § Defaults Password is: somePass § All others left blank/default. o Click Ok to add the Data Source. o From the Data Source screen, click on somePool. o Click on Property Set (on the bottom). o Click Resource Properties o Click New § Name is: URL § Type is: java.lang.String § Value is: jdbc:oracle:thin:user/pass@host:port:sid Where: · user/pass are the username/password respectively · host is the IP address of the Oracle DB Server · port is the port on which Oracle is listening (ex. 1521). · sid is the Oracle SID or name for the database o Click Ok until you've reached the Data Source Screen. · Complete Deployment o Click Save on the nav-bar at the top of the screen. o Select server-config.xml (or the top option) and click Ok. o Stop and then restart the WebSphere AppServer. · Once started, go to http://someIpAddress/appname/file.jsp to test the deployment. -Chris Christopher Assenza Phone: 412.201.6026 Fax: 412.201.6060 Email: [EMAIL PROTECTED] ACCESSDATA Moving Your Business from Point A to Point e.SM http://www.accessdc.com/ -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 23, 2001 10:36 AM To: [EMAIL PROTECTED] Subject: RE: Struts with WebSphere 4.0 on Win2000 Chris, I've managed to get
RE: bluestone trail 6
Yep! -Original Message- From: Bhamidi Krishna [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 23, 2001 9:58 AM To: [EMAIL PROTECTED] Subject: RE: bluestone trail 6 Are you using Tomcat? From: Srilatha Ravuri [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] To: '[EMAIL PROTECTED]' [EMAIL PROTECTED] Subject: RE: bluestone trail 6 Date: Thu, 23 Aug 2001 08:17:16 -0500 MIME-Version: 1.0 Received: from [64.208.42.41] by hotmail.com (3.2) with ESMTP id MHotMailBD4E4D850012400431D740D02A2912B50; Thu, 23 Aug 2001 06:17:57 -0700 Received: (qmail 8226 invoked by uid 500); 23 Aug 2001 13:17:43 - Received: (qmail 8216 invoked from network); 23 Aug 2001 13:17:43 - Received: from smtp2.hntb.com (HELO hntbw21.hntb.org) (198.51.229.202) by h31.sny.collab.net with SMTP; 23 Aug 2001 13:17:43 - Received: by hntbw21.hntb.org with Internet Mail Service (5.5.2653.19)id RDHG1NM6; Thu, 23 Aug 2001 08:17:17 -0500 From struts-user-return-15842-bhamidik Thu, 23 Aug 2001 06:18:55 -0700 Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm Precedence: bulk list-help: mailto:[EMAIL PROTECTED] list-unsubscribe: mailto:[EMAIL PROTECTED] list-post: mailto:[EMAIL PROTECTED] Delivered-To: mailing list [EMAIL PROTECTED] Message-ID: [EMAIL PROTECTED] X-Mailer: Internet Mail Service (5.5.2653.19) X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N I too got the same error.My mistake was in struts-config.xml (which is under folder /WEB-INF/struts-config.xml). where I gave a different name for the package and trying out with type as logon.LogonForm and logon.LogonAction as in the tutorial.Later I named my package as logon and corrected it.It worked. !-- == Form Bean Definitions === -- form-beans form-bean name=logonForm type=logon.LogonForm/ /form-beans !-- == Action Mapping Definitions == -- action-mappings action path=/logon type=logon.LogonAction name=logonForm Thanks -Original Message- From: Tamanaei, ITS PersWi C500, DA [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 23, 2001 7:50 AM To: '[EMAIL PROTECTED]' Subject: bluestone trail 6 Importance: Low I tried bluestone Trail 6 the jsp is simple: %@ page language=java % %@ taglib uri=/WEB-INF/struts-form.tld prefix=form % HTMLHEADTITLELogon/TITLE/HEAD BODY bgcolor='silver' form:form action='logon.do' Username:form:text property='username'/ Password:form:text property='password'/ form:submit value='OK'/ /form:form /BODY /HTML I got the following exception: javax.servlet.ServletException: Cannot find ActionMappings or ActionFormBeans collection Thanks for any help! Ebi _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
Re: default action and templates
Erik Hatcher wrote: Why not use the Action to populate request scoped variables that you then bean:write inside template:put tags? This was actually my other question from yesterday. I could not find a way to do that, not with bean:write at least. Or have a look at the source code to the template:put tag and reverse-engineer it! :) Hehehe, I tried that, really. :-) But it seems that the values used by template:get are stored in a stack in the ContentMapStack class, and the map key is the PageContext. If only I could find a way to access the PageContext from inside the Action class... -- []'s Marcelo Vanzin Touch Tecnologia [EMAIL PROTECTED] We're an underground revolution working overtime
Re: Nested properties and javascript
[EMAIL PROTECTED] wrote: However, JScript doesn't appear happy with objects having dots in their names (it naturally thinks that you mean a 'subobject' of an object). Anyone have any ideas on how to get around this? (apart from not using nested FormBeans?) You could use something like this in DOM 0: document.myForm.elements['my.weird.name'].myProperty Should work. Or you could use DOM Level 1/2's getElementById() method, and assign a valid id attribute to each form object. -- []'s Marcelo Vanzin Touch Tecnologia [EMAIL PROTECTED] We're an underground revolution working overtime
Re: Cannot find ActionMappings Error - second time I am posting -
Hi, struts.jar should be in the WEB-INF/lib directory. I fact all the jars you make use of in your web-app, needs to be in this directory. Rakesh Ayilliath (Software Engineer) Synergy IT Innovations Pvt Ltd, #196, 1st Floor, 9th Cross, HMT Layout, RT Nagar Bangalore 560032 [EMAIL PROTECTED] - Original Message - From: Bhamidi Krishna [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, August 23, 2001 8:12 PM Subject: Re: Cannot find ActionMappings Error - second time I am posting - Hi, thankyou for the mail. I removed struts from the classpath and the error disappeared. This time it says : java.lang.NoClassDefFoundError: org/apache/struts/taglib/html/FormTag at java.lang.Class.newInstance0(Native Method) Where should the struts.jar be in relation to the app? I put it in the WEB-INF. Krishna Are you talking about the struts-example webapp or is it an app of your own ? See to it that the struts.jar is not in your classpath while your tomcat starts up. Rakesh Ayilliath [EMAIL PROTECTED] - Original Message - From: Bhamidi Krishna [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, August 23, 2001 3:09 AM Subject: Cannot find ActionMappings Error - second time I am posting - Hi, this is the second time I am posting this message. When I try to run struts on Tomcat, I get the following error : Exception in: R( /examples + /jsp/logon/logon.jsp + null) - javax.servlet.ServletException: Cannot find ActionMappings or ActionFormBeans collection I tried all settings I could get hold of from the struts-user mail archive. In the absence of a definitive guide to Struts, can someone please enlighten me on how to overcome this error?? thankyou, Krishna _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
RE: default action and templates
No WAY at least in the Action Class u can not get the pageContext as it is generated by the container for u and accessible to if u use the custom tags -Original Message- From: Marcelo Vanzin [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 23, 2001 8:34 PM To: [EMAIL PROTECTED] Subject: Re: default action and templates Erik Hatcher wrote: Why not use the Action to populate request scoped variables that you then bean:write inside template:put tags? This was actually my other question from yesterday. I could not find a way to do that, not with bean:write at least. Or have a look at the source code to the template:put tag and reverse-engineer it! :) Hehehe, I tried that, really. :-) But it seems that the values used by template:get are stored in a stack in the ContentMapStack class, and the map key is the PageContext. If only I could find a way to access the PageContext from inside the Action class... -- []'s Marcelo Vanzin Touch Tecnologia [EMAIL PROTECTED] We're an underground revolution working overtime
Re: looking for success stories
Eric, like most Strus users I started to study and test the framework from the late betas, and also have used it on some small applications. In april we decided to port our content aggregation portal to Struts, and last month we deployed the first 99% Struts based version of this application. Take a look at http://www.organox.com.br We actually handle low traffic (for a public service) - about 5000 registered users, 300 logins/day, 128 kb/s (outbound) and 640 kb/s (inbound) average bandwidth usage on office hours. Everything runs smoothly and Struts made the application really easy to mantain. Thi site is a demonstration for our content aggregation technology. It is also a test environment to ensure the architecture will stand up with higher loads. Our goal is to handle 50k page requests/day on this setup (25 times our curent load). We are about to lease our technology to 2 large banks in Brazil and these guys will offer it to 100-200k users. I hope this will be a real success story. For now I can tell you we just do not worry about Struts, because it is such a fine piece of software. We actually deploy our application on a single machine using with Solaris 8 x86 MU4, Apache 1.3.19, Sun JDK 1.3.0, Resin 1.2.5 and Struts 1.0. These componentes proved to be extremely stable and highly configurable. A note on servlet containers: nothing against Websphere, it is ok. But we picked Resin because it is cheap, fast, stable, and specialy: 1. Is highly compliant with the latest JSP/Servlet specifications. (Not WAS best feature) 2. Their technical support is really responsive. I am not talking about support channels, filing requests or on-line faqs, anyone can do this. I am impressed because I have seen critical patches being created and published overnight. Just check http://www.caucho.com *Saran [EMAIL PROTECTED] wrote: Hello, We are currently in the early design stages of an extremely high profile application and I am considering using Struts. I have used it in the past for several very small applications with no more than a couple concurrent users. But since we only get one shot at making this application work (or we'll all be out on our arses) I must make a very convincing case for Struts. Does anyone have any success stories that they'd like to share? Or can anyone point me in the direction of any articles or web pages or whatever where I may find info? By the way, we are going to deploy on Websphere (we're currently on 3.5.3 but will hopefully move to 4.0 before we roll it out) so I'd be especially interested if anyone has successfully deployed on WAS. Thanks! -Eric Stievater [EMAIL PROTECTED] *** IMPORTANT NOTE * The opinions expressed in this message and/or any attachments are those of the author and not necessarily those of Brown Brothers Harriman Co., its subsidiaries and affiliates (BBH). There is no guarantee that this message is either private or confidential, and it may have been altered by unauthorized sources without your or our knowledge. Nothing in the message is capable or intended to create any legally binding obligations on either party and it is not intended to provide legal advice. BBH accepts no responsibility for loss or damage from its use, including damage from virus.
Managing struts-config.xml
Is there any way of splitting up struts-config.xml, possibly by being able to include xml fragements into the main file. We are working on a project involving approx. 12 developers. We are using cvs for source control. What we are finding is that we are getting frequent conficts when trying to merge changes that different members of the team are making. Thanks in advance, John John O'Reilly Traventec Phone: +353 91 518786 Fax: +353 91 525056 Email:[EMAIL PROTECTED] www.traventec.com
Re: radio select
Somehow I always preferred using int for html:radio property... easy to manage, debug and set. Rakesh Ayilliath (Software Engineer) Synergy IT Innovations Pvt Ltd, #196, 1st Floor, 9th Cross, HMT Layout, RT Nagar Bangalore 560032 [EMAIL PROTECTED] - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, August 23, 2001 1:03 AM Subject: Re: radio select I'm not sure I understand your warning. For a set of radio buttons, there should not be an array in the form bean, just a simple string property, since only one radio button from a set can be selected at any time. -- Martin Cooper - Original Message - From: SUPRIYA MISRA [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, August 22, 2001 6:35 AM Subject: Re: radio select suggestion:-you may need to reset the value in the form bean WARNING: In order to correctly recognize cases where none of the associated radios are selected, the ActionForm bean associated with this form must include a statement setting the corresponding array to zero length in the reset() method. From: Bille Madsen [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: radio select Date: Wed, 22 Aug 2001 11:35:14 +0200 Hi, I have the following code: html:radio property=radioBtn value=mail / html:radio property=radioBtn value=credit / html:errors property=radioBtn / Just two normal radiobuttons, have do I use the 'selected'-option which html provide? If the user select one the radio-buttons and come back to the page later, none of the radio-buttons are selected, but all other info is still presented(struts text-fields and so on). By the way, I get the values correct in the formbean, so no problem there... Anyone having a answer? Thanks Bille _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
Re: Managing struts-config.xml
O'Reilly John [EMAIL PROTECTED] Is there any way of splitting up struts-config.xml, possibly by being able to include xml fragements into the main file. We are working on a project involving approx. 12 developers. We are using cvs for source control. What we are finding is that we are getting frequent conficts when trying to merge changes that different members of the team are making. Thanks in advance, John John O'Reilly Traventec I see two possibilities: 1) Define some means, how struts-config.xml will be compiled from various files during deployment. or 2) Split struts-config.xml into external entities within the doc-type. I admit, I've not tried to do it :-( -- gR
Re: Managing struts-config.xml
Take at look at this: http://www.mail-archive.com/struts-user@jakarta.apache.org/msg10052.html Haven't tried it myself, but if Dan Miser says it works ... -- Ted Husted, Husted dot Com, Fairport NY USA. -- Custom Software ~ Technical Services. -- Tel +1 716 737-3463 -- http://www.husted.com/about/struts/ O'Reilly John wrote: Is there any way of splitting up struts-config.xml, possibly by being able to include xml fragements into the main file. We are working on a project involving approx. 12 developers. We are using cvs for source control. What we are finding is that we are getting frequent conficts when trying to merge changes that different members of the team are making. Thanks in advance, John John O'Reilly Traventec Phone: +353 91 518786 Fax: +353 91 525056 Email:[EMAIL PROTECTED] www.traventec.com
STRUTS and EJB
Hi! I'm new to the list, so please forgive me if my question is old or just foolish..:) Have you used Struts in combination with EJBs? I have found it pretty hard in the case where I have: - WLS6 server - n-tier architecture, where mostly session EJB's are used to interact with a relational db I want to fill in a form JavaBean using a struts form, and after validating it in my Action class, store it into the db using a session EJB component. The proble here is that I have to extend ActionForm class to make the bean work with Struts. This forces me to add Struts class also on the EJB classpath. I also have to put my ActionForm and Action classes on the EJB classpath. Now that I have them on the EJB classpath, and EJB classloader is parent of web classloader (in WLS at least), my web form classes won't be reloaded automatically when I change the code inside, because the classes were loaded by the EJB classloader. Got it? To put it simply, I wonder why it is necessary to extend ActionForm in my bean.. This obligation makes development much slower, if I still want to send my form bean to the EJB for storing.. Regards, Juha Paananen Software Engineer RTSe
Re: default action and templates
SUHAS G. KULKARNI wrote: Anyway U are doing the pageContext.setAttribute(template-stack , stack , PageContext.REQUEST_SCOPE) in the template:put tag. I don't see any reason why u cannot do the same in the Action class (requst.setAttribute(template-stack , stack)) . just take care of using the same key to access Stack in the template:get tag Thanks, that worked! I think I missed the pc.setAttribute(template-stack, stack) in ContentMapStack.java. :-) -- []'s Marcelo Vanzin Touch Tecnologia [EMAIL PROTECTED] We're an underground revolution working overtime
RE: html:radio tag indexed?
Dave, That's great! Meanwhile, I'm having other difficulties with the indexed tags... I have the following JSP code. The generated form page looks good, however, it doesn't link the check box property to the corresponding form attribute. %! int i=1; % html:form action=/saveAnswers /p table border=0 width=757 logic:iterate name=model property=lQuestions id=row type=org.wei.quiz.SurveyQuestion tr td width=18b%=i%/b/td td class=T3 width=583 colspan=5bbean:write name=row property=question //b/td /tr tr td class=table_row_content_small align=left width=116 html:checkbox property=lAnswers indexed=true value=5/5-Strongly Agree /td %i++;% /logic:iterate The above code generates the following HTML. . . . td class=table_row_content_small align=left width=116 input type=checkbox name=org.apache.struts.taglib.html.BEAN[0].lAnswers value=55-Strongly Agree /td . . . Whereas I'd like it to generate... . . . td class=table_row_content_small align=left width=116 input type=checkbox name=lAnswers[0].answer value=55-Strongly Agree /td . . . Where lAnswers[0] is an element of an ArrayList, lAnswers, in my form. Any ideas? Thanks, Princeton -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 22, 2001 4:17 PM To: [EMAIL PROTECTED] Subject: Re: html:radio tag indexed? Hi. Have just replied to Nathan's post on the dev list. I will make the changes to textAreas and radio buttons, and get them added to nightly build. Cheers, Dave Princeton Lau [EMAIL PROTECTED] on 08/22/2001 04:01:37 PM Please respond to [EMAIL PROTECTED] To: '[EMAIL PROTECTED]' [EMAIL PROTECTED] cc:(bcc: David Hay/Lex/Lexmark) Subject: html:radio tag indexed? Hello everyone and especially Dave Hays, Has anyone tried updating the html:radio Struts tag to produce indexed names? I am currently making a multiple choice survey application and having an indexed radio button would be great! Thanks, Princeton From http://husted.com/about/struts/indexed-tags.htm . . . I have now finished updating several html Struts tags to produce indexed names such as input type=text name=parameter[0].value value=Mac when used within an iterate tag. These tags involve only minor changes to the existing tags, and to trigger them, indexed=true is added to the tag. . . .
Re: STRUTS and EJB
Juha Paananen [EMAIL PROTECTED] wrote: I want to fill in a form JavaBean using a struts form, and after validating it in my Action class, store it into the db using a session EJB component. The proble here is that I have to extend ActionForm class to make the bean work with Struts. You can use containment instead of inheritance. You should avoid using Struts ActionForm on the business logic level. -- gR
RE: html:radio tag indexed?
Not sure what's in your form bean, but looks like you need html:checkbox name=lAnswers property=answer indexed=true value=5/ But to do that, you'll have to change the id for your iteration to lAnswers Cheers, Dave Princeton Lau [EMAIL PROTECTED] on 08/23/2001 12:40:34 PM Please respond to [EMAIL PROTECTED] To: '[EMAIL PROTECTED]' [EMAIL PROTECTED] cc:(bcc: David Hay/Lex/Lexmark) Subject: RE: html:radio tag indexed? Dave, That's great! Meanwhile, I'm having other difficulties with the indexed tags... I have the following JSP code. The generated form page looks good, however, it doesn't link the check box property to the corresponding form attribute. %! int i=1; % html:form action=/saveAnswers /p table border=0 width=757 logic:iterate name=model property=lQuestions id=row type=org.wei.quiz.SurveyQuestion tr td width=18b%=i%/b/td td class=T3 width=583 colspan=5bbean:write name=row property=question //b/td /tr tr td class=table_row_content_small align=left width=116 html:checkbox property=lAnswers indexed=true value=5/5-Strongly Agree /td %i++;% /logic:iterate The above code generates the following HTML. . . . td class=table_row_content_small align=left width=116 input type=checkbox name=org.apache.struts.taglib.html.BEAN[0].lAnswers value=55-Strongly Agree /td . . . Whereas I'd like it to generate... . . . td class=table_row_content_small align=left width=116 input type=checkbox name=lAnswers[0].answer value=55-Strongly Agree /td . . . Where lAnswers[0] is an element of an ArrayList, lAnswers, in my form. Any ideas? Thanks, Princeton -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 22, 2001 4:17 PM To: [EMAIL PROTECTED] Subject: Re: html:radio tag indexed? Hi. Have just replied to Nathan's post on the dev list. I will make the changes to textAreas and radio buttons, and get them added to nightly build. Cheers, Dave Princeton Lau [EMAIL PROTECTED] on 08/22/2001 04:01:37 PM Please respond to [EMAIL PROTECTED] To: '[EMAIL PROTECTED]' [EMAIL PROTECTED] cc:(bcc: David Hay/Lex/Lexmark) Subject: html:radio tag indexed? Hello everyone and especially Dave Hays, Has anyone tried updating the html:radio Struts tag to produce indexed names? I am currently making a multiple choice survey application and having an indexed radio button would be great! Thanks, Princeton From http://husted.com/about/struts/indexed-tags.htm . . . I have now finished updating several html Struts tags to produce indexed names such as input type=text name=parameter[0].value value=Mac when used within an iterate tag. These tags involve only minor changes to the existing tags, and to trigger them, indexed=true is added to the tag. . . .
Re: STRUTS and EJB
I agree with Gregor. The ActionForm beans are best left as ActionForm beans, and used only as an extension of the html:form tags. Once the data is validated, it should be transferred to persistent stoarge, or to another bean that is not bound to the HTTP layer (and could be re-used in other environments). This bean can then use the right data-type for the job, and perform other business tasks that have nothing to do with gathering input from HTTP. On the way back, a good way to repopulate an ActionForm bean, or other string-based helper, is to have your data access objects return a Map, and then use it with the standard BeanUtils.populate() method. Struts does the same thing with the HTTP request, which is basically a Map. -- Ted Husted, Husted dot Com, Fairport NY USA. -- Custom Software ~ Technical Services. -- Tel +1 716 737-3463 -- http://www.husted.com/about/struts/ Gregor Rayman wrote: Juha Paananen [EMAIL PROTECTED] wrote: I want to fill in a form JavaBean using a struts form, and after validating it in my Action class, store it into the db using a session EJB component. The proble here is that I have to extend ActionForm class to make the bean work with Struts. You can use containment instead of inheritance. You should avoid using Struts ActionForm on the business logic level. -- gR
RE: STRUTS and EJB
I also agree on that stuff that has references to STRUTS should not be transmitted to the EJB level. The problem here is simply that I would not want to make another, exactly similar (except extends ActionForm), class for transporting the information to the EJB. Of course, I can do that, but I don't like the idea. My question is, is this inheritance of ActionForm really necessary in Struts design? -Original Message- From: Ted Husted [mailto:[EMAIL PROTECTED]] Sent: 23. elokuuta 2001 20:29 To: [EMAIL PROTECTED] Subject: Re: STRUTS and EJB I agree with Gregor. The ActionForm beans are best left as ActionForm beans, and used only as an extension of the html:form tags. Once the data is validated, it should be transferred to persistent stoarge, or to another bean that is not bound to the HTTP layer (and could be re-used in other environments). This bean can then use the right data-type for the job, and perform other business tasks that have nothing to do with gathering input from HTTP. On the way back, a good way to repopulate an ActionForm bean, or other string-based helper, is to have your data access objects return a Map, and then use it with the standard BeanUtils.populate() method. Struts does the same thing with the HTTP request, which is basically a Map. -- Ted Husted, Husted dot Com, Fairport NY USA. -- Custom Software ~ Technical Services. -- Tel +1 716 737-3463 -- http://www.husted.com/about/struts/ Gregor Rayman wrote: Juha Paananen [EMAIL PROTECTED] wrote: I want to fill in a form JavaBean using a struts form, and after validating it in my Action class, store it into the db using a session EJB component. The proble here is that I have to extend ActionForm class to make the bean work with Struts. You can use containment instead of inheritance. You should avoid using Struts ActionForm on the business logic level. -- gR
RE: STRUTS and EJB
Title: RE: STRUTS and EJB Why not make a Value object for passing the information around, and have the form hold an instance of the value object? Derek. -Original Message- From: Juha Paananen [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 23, 2001 1:47 PM To: [EMAIL PROTECTED] Subject: RE: STRUTS and EJB I also agree on that stuff that has references to STRUTS should not be transmitted to the EJB level. The problem here is simply that I would not want to make another, exactly similar (except extends ActionForm), class for transporting the information to the EJB. Of course, I can do that, but I don't like the idea. My question is, is this inheritance of ActionForm really necessary in Struts design? -Original Message- From: Ted Husted [mailto:[EMAIL PROTECTED]] Sent: 23. elokuuta 2001 20:29 To: [EMAIL PROTECTED] Subject: Re: STRUTS and EJB I agree with Gregor. The ActionForm beans are best left as ActionForm beans, and used only as an extension of the html:form tags. Once the data is validated, it should be transferred to persistent stoarge, or to another bean that is not bound to the HTTP layer (and could be re-used in other environments). This bean can then use the right data-type for the job, and perform other business tasks that have nothing to do with gathering input from HTTP. On the way back, a good way to repopulate an ActionForm bean, or other string-based helper, is to have your data access objects return a Map, and then use it with the standard BeanUtils.populate() method. Struts does the same thing with the HTTP request, which is basically a Map. -- Ted Husted, Husted dot Com, Fairport NY USA. -- Custom Software ~ Technical Services. -- Tel +1 716 737-3463 -- http://www.husted.com/about/struts/ Gregor Rayman wrote: Juha Paananen [EMAIL PROTECTED] wrote: I want to fill in a form JavaBean using a struts form, and after validating it in my Action class, store it into the db using a session EJB component. The proble here is that I have to extend ActionForm class to make the bean work with Struts. You can use containment instead of inheritance. You should avoid using Struts ActionForm on the business logic level. -- gR
RE: STRUTS and EJB
Title: RE: STRUTS and EJB If a value object is used within the ActionForm for holding the form data, how should the html elements be named so that the data elements in the value object is automatically populated. Or should the data elements also reside in the ActionForm as separate fields, for which the setters and getters would go and get the information from the value object ? Anand Narayan -Original Message-From: Derek Longmuir [mailto:[EMAIL PROTECTED]]Sent: Thursday, August 23, 2001 1:46 PMTo: '[EMAIL PROTECTED]'Subject: RE: STRUTS and EJB Why not make a Value object for passing the information around, and have the form hold an instance of the value object? Derek. -Original Message- From: Juha Paananen [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 23, 2001 1:47 PM To: [EMAIL PROTECTED] Subject: RE: STRUTS and EJB I also agree on that stuff that has references to STRUTS should not be transmitted to the EJB level. The problem here is simply that I would not want to make another, exactly similar (except "extends ActionForm"), class for transporting the information to the EJB. Of course, I can do that, but I don't like the idea. My question is, is this inheritance of ActionForm really necessary in Struts design? -Original Message- From: Ted Husted [mailto:[EMAIL PROTECTED]] Sent: 23. elokuuta 2001 20:29 To: [EMAIL PROTECTED] Subject: Re: STRUTS and EJB I agree with Gregor. The ActionForm beans are best left as ActionForm beans, and used only as an extension of the html:form tags. Once the data is validated, it should be transferred to persistent stoarge, or to another bean that is not bound to the HTTP layer (and could be re-used in other environments). This bean can then use the right data-type for the job, and perform other business tasks that have nothing to do with gathering input from HTTP. On the way back, a good way to repopulate an ActionForm bean, or other string-based helper, is to have your data access objects return a Map, and then use it with the standard BeanUtils.populate() method. Struts does the same thing with the HTTP request, which is basically a Map. -- Ted Husted, Husted dot Com, Fairport NY USA. -- Custom Software ~ Technical Services. -- Tel +1 716 737-3463 -- http://www.husted.com/about/struts/ Gregor Rayman wrote: "Juha Paananen" [EMAIL PROTECTED] wrote: I want to fill in a form JavaBean using a struts form, and aftervalidating it in my Action class, store it into the db using a sessionEJB component. The proble here is that I have to extend ActionForm class to make the bean work with Struts. You can use containment instead of inheritance. You should avoid using Struts ActionForm on the business logic level. -- gR ___ Juniper Bank "Rated #1 in Customer Confidence" Gomez Inc., Summer 2001 Internet Credit Card Scorecard www.juniper.com ___ This e-mail and any files transmitted with it may contain confidential and/or proprietary information. It is intended solely for the use of the individual or entity who is the intended recipient. Unauthorized use of this information is prohibited. If you have received this in error, please contact the sender by replying to this message and delete this material from any system it may be on.
Re: STRUTS and EJB
Yes, the inheritance is a necessary part of the Struts design. I realize that it seems wasteful at first, but the ActionForm beans have several special needs that may not apply to the other beans in your application. An interface was tried in the earliest instances of the framework, but discarded for several reasons. The biggest one is that we may need to yet add another method, and if the ActionForm was an interface, everything would break ;-( The other reason was that people tried to turn their business beans into ActionForm beans, which is really not a good idea in practice (as seductive as it sounds ;-) For more see http://www.mail-archive.com/struts-user@jakarta.apache.org/msg08070.html and http://www.mail-archive.com/struts-dev@jakarta.apache.org/msg01495.html You should also take a look at the BeanUtils for quick and easy ways to populate beans. I add a toMap() method to all my ActionForm beans, which, with BeanUtils.populate() can be an easy way to populate your business beans. In fact, these are so useful, we moved them to theCommons for 1.1 ;-) -- Ted Husted, Husted dot Com, Fairport NY USA. -- Custom Software ~ Technical Services. -- Tel +1 716 737-3463 -- http://www.husted.com/about/struts/ Juha Paananen wrote: I also agree on that stuff that has references to STRUTS should not be transmitted to the EJB level. The problem here is simply that I would not want to make another, exactly similar (except extends ActionForm), class for transporting the information to the EJB. Of course, I can do that, but I don't like the idea. My question is, is this inheritance of ActionForm really necessary in Struts design?
RE: STRUTS and EJB
Title: RE: STRUTS and EJB html:text property=valueObjectA.someNumber size=5 maxlength=5 / Where the form has a Value object ValueObjectA, along with a public ValueObjectA getValueObjectA() method. The value object has a String someNumber in it, with a public String getSomeNumber() method. Doesn't one of the sample applications or Ted's examples show this a lot better? Derek. -Original Message- From: Narayan, Anand [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 23, 2001 1:47 PM To: '[EMAIL PROTECTED]' Subject: RE: STRUTS and EJB If a value object is used within the ActionForm for holding the form data, how should the html elements be named so that the data elements in the value object is automatically populated. Or should the data elements also reside in the ActionForm as separate fields, for which the setters and getters would go and get the information from the value object ? Anand Narayan -Original Message- From: Derek Longmuir [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 23, 2001 1:46 PM To: '[EMAIL PROTECTED]' Subject: RE: STRUTS and EJB Why not make a Value object for passing the information around, and have the form hold an instance of the value object? Derek. -Original Message- From: Juha Paananen [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 23, 2001 1:47 PM To: [EMAIL PROTECTED] Subject: RE: STRUTS and EJB I also agree on that stuff that has references to STRUTS should not be transmitted to the EJB level. The problem here is simply that I would not want to make another, exactly similar (except extends ActionForm), class for transporting the information to the EJB. Of course, I can do that, but I don't like the idea. My question is, is this inheritance of ActionForm really necessary in Struts design? -Original Message- From: Ted Husted [mailto:[EMAIL PROTECTED]] Sent: 23. elokuuta 2001 20:29 To: [EMAIL PROTECTED] Subject: Re: STRUTS and EJB I agree with Gregor. The ActionForm beans are best left as ActionForm beans, and used only as an extension of the html:form tags. Once the data is validated, it should be transferred to persistent stoarge, or to another bean that is not bound to the HTTP layer (and could be re-used in other environments). This bean can then use the right data-type for the job, and perform other business tasks that have nothing to do with gathering input from HTTP. On the way back, a good way to repopulate an ActionForm bean, or other string-based helper, is to have your data access objects return a Map, and then use it with the standard BeanUtils.populate() method. Struts does the same thing with the HTTP request, which is basically a Map. -- Ted Husted, Husted dot Com, Fairport NY USA. -- Custom Software ~ Technical Services. -- Tel +1 716 737-3463 -- http://www.husted.com/about/struts/ Gregor Rayman wrote: Juha Paananen [EMAIL PROTECTED] wrote: I want to fill in a form JavaBean using a struts form, and after validating it in my Action class, store it into the db using a session EJB component. The proble here is that I have to extend ActionForm class to make the bean work with Struts. You can use containment instead of inheritance. You should avoid using Struts ActionForm on the business logic level. -- gR
Re: default action and templates
- Original Message - From: Marcelo Vanzin [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, August 23, 2001 8:04 AM Subject: Re: default action and templates Erik Hatcher wrote: Why not use the Action to populate request scoped variables that you then bean:write inside template:put tags? This was actually my other question from yesterday. I could not find a way to do that, not with bean:write at least. This should work request.setAttribute(name,this is a test); // in your Action !-- in your template-using JSP page -- template:put name=contentbean:write name=name/ /template:put !-- in your template definition JSP page -- template:get name=content/ Or have a look at the source code to the template:put tag and reverse-engineer it! :) Hehehe, I tried that, really. :-) But it seems that the values used by template:get are stored in a stack in the ContentMapStack class, and the map key is the PageContext. If only I could find a way to access the PageContext from inside the Action class... But the template stuff gets put into request scope, so you don't need page context specifically. Erik
Re: Struts on AIX
The best thing would be to also enter a request into Bugzilla, where it won't get lost in the shuffle ;-) http://jakarta.apache.org/site/bugs.html Jain, Shipra wrote: I would like to bring this to attention of developers of Struts. So, I am posting to developers mailing list also . They can more clearly explain if Sturts code has a bug in regards to AIX system, or something else is wrong. They also can tell which is a better fix. I myself don't like the idea of changing the struts code either. Although, we have to do that anyway for FormTag problem.
Re: submitting a form from another frameset with struts
In the end, the Struts html have to write html ;-), so it shouldn't matter. The thing to do would be to compare the HTML source of what you are trying to do with html tags and then with the html: tags, to find out what's missing. -- Ted Husted, Husted dot Com, Fairport NY USA. -- Custom Software ~ Technical Services. -- Tel +1 716 737-3463 -- http://www.husted.com/about/struts/ Jan Fredrik Øveraasen wrote: hi I`m having difficulties when I try to submit a form with javascript inside a frameset. The form that I want to submit is located inside a different frameset. I`m wondering if this have anything to do with the struts taglibs that im using to build my forms. Please help Jan Fredrik
RE: submitting a form from another frameset with struts
What tags are you using? -Original Message- From: Jan Fredrik Øveraasen [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 23, 2001 8:59 AM To: '[EMAIL PROTECTED]' Subject:submitting a form from another frameset with struts hi I`m having difficulties when I try to submit a form with javascript inside a frameset. The form that I want to submit is located inside a different frameset. I`m wondering if this have anything to do with the struts taglibs that im using to build my forms. Please help Jan Fredrik
Re: Struts-----formbean-----petstore
Put the String in request scope, or in any old bean, and use bean:write No worries, mate ;-) -- Ted Husted, Husted dot Com, Fairport NY USA. -- Custom Software ~ Technical Services. -- Tel +1 716 737-3463 -- http://www.husted.com/about/struts/ Kurt Chen wrote: Dear all I'm using Struts as my webtier in MVC structure. now I've got a string of data from database. and load the string in my formbean successfully. but my problem ishow to load the string I got from the DB and show the string in a jsp(view). any suggestion will be greatly appreciatedthanks in advance plus, does anyone has any successful case on implementing Struts as webtier in PetStore workflow, please let me know.thanks. Kurt.
RE: looking for success stories
Eric, Our company is using struts for 3 different web applications, travel industry stuff, one for consumers, one for airline agents, and one for administration of travel inventory. They're up, they work, they haven't been exposed to tons-of-users yet but we like'em. I did most of the development of these web clients and have to say that they're easy to understand, easy to work on, and can't think of anything coming my way that would kill the apps once a lot of users are online. Nothing that another server can't solve in any case! I'll try to get permission after release to mention our experiences etc. from mgt. (we have to regard struts as a competitive advantage, really it is). In any case, I found it, I recommended it, my butt is online and I'm still employed, the boss is happy, the contractor who did the admin web-app (using struts) liked it. All is well! Kurt Olsen 808 945-3313 x121 -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 22, 2001 10:06 AM To: [EMAIL PROTECTED] Subject: looking for success stories Hello, We are currently in the early design stages of an extremely high profile application and I am considering using Struts. I have used it in the past for several very small applications with no more than a couple concurrent users. But since we only get one shot at making this application work (or we'll all be out on our arses) I must make a very convincing case for Struts. Does anyone have any success stories that they'd like to share? Or can anyone point me in the direction of any articles or web pages or whatever where I may find info? By the way, we are going to deploy on Websphere (we're currently on 3.5.3 but will hopefully move to 4.0 before we roll it out) so I'd be especially interested if anyone has successfully deployed on WAS. Thanks! -Eric Stievater [EMAIL PROTECTED] *** IMPORTANT NOTE * The opinions expressed in this message and/or any attachments are those of the author and not necessarily those of Brown Brothers Harriman Co., its subsidiaries and affiliates (BBH). There is no guarantee that this message is either private or confidential, and it may have been altered by unauthorized sources without your or our knowledge. Nothing in the message is capable or intended to create any legally binding obligations on either party and it is not intended to provide legal advice. BBH accepts no responsibility for loss or damage from its use, including damage from virus.
path problem
I make the sample about the logon.do, everything works but know i put the JSP files archived in a jsp/test/ folder and works fine with the HTML Tags but now i deelte the custom tags and failed. Find Ok the Logon main page but when it try to go to the action it get a path like this localhost:port/logon/jsp/test/logon.doparameters it works if i change the path manually to localhost:port/logon/logon.doparameters and i try to change the action in the form by using /logon.do insted of logon.do but don't work. Thx in advance. = Ing. Jose Efrain Gutierrez C Web Developer/Softtek Monterrey Mexico ICQ:2293612 yahoo hotmail:jefrainmx _ Do You Yahoo!? Construye tu página personal en Yahoo! GeoCities. ¡Es fácil, rápido y gratis! http://geocities.yahoo.com.mx
RE: Struts and Tomcat 4.0
Standard instructions for Struts work great for 4.0 just put the war files in your webapps directory; except for the fact you need the crimson.jar and jaxp.jar either in the root/web-inf lib or the in the web-inf/lib of the web app you are running. Pete Gordon -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 23, 2001 3:26 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Struts and Tomcat 4.0 Sorry everyone if this post has already been made. Does anyone have some instructions on how to get struts working with Tomcat 4.0? Thanks in advance.
RE: Struts and Tomcat 4.0
I had trouble with an older beta version, but when I upgraded to the beta 7 release everything worked fine. David --- Pete Gordon [EMAIL PROTECTED] wrote: Standard instructions for Struts work great for 4.0 just put the war files in your webapps directory; except for the fact you need the crimson.jar and jaxp.jar either in the root/web-inf lib or the in the web-inf/lib of the web app you are running. Pete Gordon -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 23, 2001 3:26 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Struts and Tomcat 4.0 Sorry everyone if this post has already been made. Does anyone have some instructions on how to get struts working with Tomcat 4.0? Thanks in advance. __ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/
Updating only a few items in a list
Hi. Just wondered how other people are handling this sort of thing... I am iterating over a set of parameters, and the user is able to change one or more of them. I then only want to save those which have been changed. I currently save a copy list to the form, and compare it with the list I get back, to see which have changed. Does anyone have a better suggestion? Cheers, Dave
Re: Updating only a few items in a list
PS Obviously, I am doing the saving in my action - ie in my action I only want to make calls to save only those that have changed! Dave David_Hay/Lex/Lexmark.LEXMARK@sweeper.lex.lexmark.com on 08/23/2001 04:33:55 PM Please respond to [EMAIL PROTECTED] To: [EMAIL PROTECTED] cc:(bcc: David Hay/Lex/Lexmark) Subject: Updating only a few items in a list Hi. Just wondered how other people are handling this sort of thing... I am iterating over a set of parameters, and the user is able to change one or more of them. I then only want to save those which have been changed. I currently save a copy list to the form, and compare it with the list I get back, to see which have changed. Does anyone have a better suggestion? Cheers, Dave
Re: Struts and Tomcat 4.0
Just be sure to read the very end of the release notes, where it talks about the JARs. Also be sure you don't have another copy of the J2EE extensions on your classpath. [EMAIL PROTECTED] wrote: Sorry everyone if this post has already been made. Does anyone have some instructions on how to get struts working with Tomcat 4.0? Thanks in advance.
Re: STRUTS and EJB
I just updated the Struts-Simple example to demonstrate using nested beans in ActionForms and also with bean:write http://husted.com/about/struts/resources.htm#new Using a nested bean on your ActionForm lets you use the form like a wrapper, so you don't have to define everything twice, if your business beans and ActionForm beans would otherwise be identical. -- Ted Husted, Husted dot Com, Fairport NY USA. -- Custom Software ~ Technical Services. -- Tel +1 716 737-3463 -- http://www.husted.com/about/struts/ Derek Longmuir wrote: html:text property=valueObjectA.someNumber size=5 maxlength=5 / Where the form has a Value object ValueObjectA, along with a public ValueObjectA getValueObjectA() method. The value object has a String someNumber in it, with a public String getSomeNumber() method. Doesn't one of the sample applications or Ted's examples show this a lot better? Derek. -Original Message- From: Narayan, Anand [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 23, 2001 1:47 PM To: '[EMAIL PROTECTED]' Subject: RE: STRUTS and EJB If a value object is used within the ActionForm for holding the form data, how should the html elements be named so that the data elements in the value object is automatically populated. Or should the data elements also reside in the ActionForm as separate fields, for which the setters and getters would go and get the information from the value object ? Anand Narayan -Original Message- From: Derek Longmuir [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 23, 2001 1:46 PM To: '[EMAIL PROTECTED]' Subject: RE: STRUTS and EJB Why not make a Value object for passing the information around, and have the form hold an instance of the value object? Derek. -Original Message- From: Juha Paananen [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 23, 2001 1:47 PM To: [EMAIL PROTECTED] Subject: RE: STRUTS and EJB I also agree on that stuff that has references to STRUTS should not be transmitted to the EJB level. The problem here is simply that I would not want to make another, exactly similar (except extends ActionForm), class for transporting the information to the EJB. Of course, I can do that, but I don't like the idea. My question is, is this inheritance of ActionForm really necessary in Struts design? -Original Message- From: Ted Husted [mailto:[EMAIL PROTECTED]] Sent: 23. elokuuta 2001 20:29 To: [EMAIL PROTECTED] Subject: Re: STRUTS and EJB I agree with Gregor. The ActionForm beans are best left as ActionForm beans, and used only as an extension of the html:form tags. Once the data is validated, it should be transferred to persistent stoarge, or to another bean that is not bound to the HTTP layer (and could be re-used in other environments). This bean can then use the right data-type for the job, and perform other business tasks that have nothing to do with gathering input from HTTP. On the way back, a good way to repopulate an ActionForm bean, or other string-based helper, is to have your data access objects return a Map, and then use it with the standard BeanUtils.populate() method. Struts does the same thing with the HTTP request, which is basically a Map. -- Ted Husted, Husted dot Com, Fairport NY USA. -- Custom Software ~ Technical Services. -- Tel +1 716 737-3463 -- http://www.husted.com/about/struts/ Gregor Rayman wrote: Juha Paananen [EMAIL PROTECTED] wrote: I want to fill in a form JavaBean using a struts form, and after validating it in my Action class, store it into the db using a session EJB component. The proble here is that I have to extend ActionForm class to make the bean work with Struts. You can use containment instead of inheritance. You should avoid using Struts ActionForm on the business logic level. -- gR
Unable to open taglibrary /WEB-INF/struts-bean.tld : ParseError in the tag library descriptor: java.lang.NullPointerException
We're trying to get struts set up and can't get past this error. I looked through the archives and found some stuff that was close to this, but couldn't find anything that matched. We've installed tomcat and struts on an AIX box that is on our intranet and not connected to the internet. Here is what the app is: hello.jsp %@ page language=java % %@ taglib uri=/WEB-INF/struts-bean.tld prefix=bean % bean:message key=hello.message / web.xml ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.2//EN http://vistadev.freightliner.com/dtd/web-app_2_2.dtd; web-app servlet servlet-nameaction/servlet-name servlet-classorg.apache.struts.action.ActionServlet/servlet-class init-param param-nameapplication/param-name param-valuehelloworld.HelloWorldResources/param-value /init-param init-param param-namevalidate/param-name param-valuetrue/param-value /init-param init-param param-nameconfig/param-name param-value/WEB-INF/struts-config.xml/param-value /init-param load-on-startup1/load-on-startup /servlet !-- Define a URI to use to retrieve the struts taglib -- taglib taglib-uri/WEB-INF/struts-bean.tld/taglib-uri taglib-location/WEB-INF/struts-bean.tld/taglib-location /taglib welcome-file-list welcome-filehello.jsp/welcome-file /welcome-file-list /web-app The full error message is: Error: 500 Location: /hello-world/hello.jsp Internal Servlet Error: org.apache.jasper.compiler.CompileException: /javahome/tomcat/jakarta-tomcat-3.2.3/webapps/hello-world/hello.jsp(1,0) Unable to open taglibrary /WEB-INF/struts-bean.tld : Parse Error in the tag library descriptor: java.lang.NullPointerException at java.lang.Exception.(Compiled Code) at javax.servlet.ServletException.(Compiled Code) at org.apache.jasper.JasperException.(Compiled Code) at org.apache.jasper.compiler.CompileException.(Compiled Code) at org.apache.jasper.compiler.JspParseEventListener.handleDirective(Compiled Code) at org.apache.jasper.compiler.DelegatingListener.handleDirective(Compiled Code) at org.apache.jasper.compiler.Parser$Directive.accept(Compiled Code) at org.apache.jasper.compiler.Parser.parse(Compiled Code) at org.apache.jasper.compiler.Parser.parse(Compiled Code) at org.apache.jasper.compiler.Parser.parse(Compiled Code) at org.apache.jasper.compiler.Compiler.compile(Compiled Code) at org.apache.jasper.servlet.JspServlet.doLoadJSP(Compiled Code) at org.apache.jasper.servlet.JasperLoader.loadJSP(Compiled Code) at org.apache.jasper.servlet.JspServlet.loadJSP(Compiled Code) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(Compi led Code) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(Compiled Code) at org.apache.jasper.servlet.JspServlet.serviceJspFile(Compiled Code) at org.apache.jasper.servlet.JspServlet.service(Compiled Code) at javax.servlet.http.HttpServlet.service(Compiled Code) at org.apache.tomcat.core.ServletWrapper.doService(Compiled Code) at org.apache.tomcat.core.Handler.service(Compiled Code) at org.apache.tomcat.core.ServletWrapper.service(Compiled Code) at org.apache.tomcat.core.ContextManager.internalService(Compiled Code) at org.apache.tomcat.core.ContextManager.service(Compiled Code) at org.apache.tomcat.service.connector.Ajp13ConnectionHandler.processConnection (Compiled Code) at org.apache.tomcat.service.TcpWorkerThread.runIt(Compiled Code) at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(Compiled Code) at java.lang.Thread.run(Compiled Code) I had to copy the dtd's to our webserver because we couldn't get to them at sun.com. I changed the references in web.xml, struts-config.xml and in struts-bean.tld. I've had this thing working on an NT box that is connected to the internet, so I'm thinking that something is haywire with my hacks to setup for non-internet access. Any help would be greatly appreciated. Thanks, pb WorldSecure Freightliner.com made the following annotations on 08/23/01 14:10:41 -- [INFO] -- Content Manager: The information contained in this communication is confidential and intended solely for the use of the individual to whom it is addressed and others authorized to receive it. If you are not the intended recipient, any disclosure, copying, distribution or taking of any action in reliance on the contents of
findForward failures
When a findForward(name) fails, because name isn't known, why isn't there an exception thrown? It seems like misspelling this (or my case, miscapitalizing) would be common occurrence that a programmer would like to find out about soonest Am I missing something?
use 2 struts version in the same context
How can i use 2 different Struts version of JAR in the same context..??? what do i need to configure..?? = Ing. Jose Efrain Gutierrez C Web Developer/Softtek Monterrey Mexico ICQ:2293612 yahoo hotmail:jefrainmx _ Do You Yahoo!? Construye tu página personal en Yahoo! GeoCities. ¡Es fácil, rápido y gratis! http://geocities.yahoo.com.mx
RE: STRUTS and EJB
Thanks very much. This nested property thing seems like a nice solution for the problem! -Original Message- From: Ted Husted [mailto:[EMAIL PROTECTED]] Sent: 24. elokuuta 2001 0:08 To: [EMAIL PROTECTED] Subject: Re: STRUTS and EJB I just updated the Struts-Simple example to demonstrate using nested beans in ActionForms and also with bean:write http://husted.com/about/struts/resources.htm#new Using a nested bean on your ActionForm lets you use the form like a wrapper, so you don't have to define everything twice, if your business beans and ActionForm beans would otherwise be identical. -- Ted Husted, Husted dot Com, Fairport NY USA. -- Custom Software ~ Technical Services. -- Tel +1 716 737-3463 -- http://www.husted.com/about/struts/ Derek Longmuir wrote: html:text property=valueObjectA.someNumber size=5 maxlength=5 / Where the form has a Value object ValueObjectA, along with a public ValueObjectA getValueObjectA() method. The value object has a String someNumber in it, with a public String getSomeNumber() method. Doesn't one of the sample applications or Ted's examples show this a lot better? Derek. -Original Message- From: Narayan, Anand [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 23, 2001 1:47 PM To: '[EMAIL PROTECTED]' Subject: RE: STRUTS and EJB If a value object is used within the ActionForm for holding the form data, how should the html elements be named so that the data elements in the value object is automatically populated. Or should the data elements also reside in the ActionForm as separate fields, for which the setters and getters would go and get the information from the value object ? Anand Narayan -Original Message- From: Derek Longmuir [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 23, 2001 1:46 PM To: '[EMAIL PROTECTED]' Subject: RE: STRUTS and EJB Why not make a Value object for passing the information around, and have the form hold an instance of the value object? Derek. -Original Message- From: Juha Paananen [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 23, 2001 1:47 PM To: [EMAIL PROTECTED] Subject: RE: STRUTS and EJB I also agree on that stuff that has references to STRUTS should not be transmitted to the EJB level. The problem here is simply that I would not want to make another, exactly similar (except extends ActionForm), class for transporting the information to the EJB. Of course, I can do that, but I don't like the idea. My question is, is this inheritance of ActionForm really necessary in Struts design? -Original Message- From: Ted Husted [mailto:[EMAIL PROTECTED]] Sent: 23. elokuuta 2001 20:29 To: [EMAIL PROTECTED] Subject: Re: STRUTS and EJB I agree with Gregor. The ActionForm beans are best left as ActionForm beans, and used only as an extension of the html:form tags. Once the data is validated, it should be transferred to persistent stoarge, or to another bean that is not bound to the HTTP layer (and could be re-used in other environments). This bean can then use the right data-type for the job, and perform other business tasks that have nothing to do with gathering input from HTTP. On the way back, a good way to repopulate an ActionForm bean, or other string-based helper, is to have your data access objects return a Map, and then use it with the standard BeanUtils.populate() method. Struts does the same thing with the HTTP request, which is basically a Map. -- Ted Husted, Husted dot Com, Fairport NY USA. -- Custom Software ~ Technical Services. -- Tel +1 716 737-3463 -- http://www.husted.com/about/struts/ Gregor Rayman wrote: Juha Paananen [EMAIL PROTECTED] wrote: I want to fill in a form JavaBean using a struts form, and after validating it in my Action class, store it into the db using a session EJB component. The proble here is that I have to extend ActionForm class to make the bean work with Struts. You can use containment instead of inheritance. You should avoid using Struts ActionForm on the business logic level. -- gR
Internationalizating rollover buttons
Hi All - We are trying to implement rollover buttons in our applications. We would like to internationalize them as well. We are using the Struts html tag html:image with the following : html:image property=submit srcKey=image.submit1 onmouseover=src='images/submit1.gif' onmouseout=src='images/submit2.gif' / How can I replace the src s within onmouseover and onmouseout by using srcKey ? Otherwise the application is not internationalized. Please help. TIA - Debasish __ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/
iPlanet: Registered JSP's and Struts
Please correct me if I'm wrong... and tell me if I'm right! My understanding of iPlanet Clustering is that I have to register all my JSP's in order for them to work across a cluster. However, in a Struts article by Ted Husted, he recommends that all JSPs be placed below WEB-INF so the user cannot get to them from a browser's address bar: From: http://husted.com/about/struts/catalog.htm Place all Java ServerPages below WEB-INFThe container provides security for all files below WEB-INF. This applies to client requests, but not forwards from the ActionServlet. Placing all JSPs below WEB-INF ensure that they are only accessed through Actions, and not directly by the client or each other. This allows security to be moved up into the Controller, where it can be handled more efficiently, and out of the base presentation layer. My question is - if I'm registering my "action" servlet, providing a servlet mapping for it, and making *all* my links and forms go through "action", do I have to register my JSPs? If not, will clustering still work for the JSPs? Thanks, Matt
Struts and HttpUnit
Has anyone used HttpUnit to test their struts application? I'd be willing to help compose a bunch of tests for the struts-example if someone can point me in the right direction. Matt __ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/
VAJ 4.0 and WTE cant remove Attributes from request scope
Hi, I found one suggestion from Johan about VAJ3.5.3 problem to cant remove attributes from request scope. I had a same problem when tried to setup VAJ 4.0 to run struts and I got the same problem as attached below. Anybody knows IBM has fixed this problem. Thanks! Mark Message: Server caught unhandled exception from servlet [jsp]: cant remove Attributes from request scopeTarget Servlet: jspStackTrace: Root Error-1: cant remove Attributes from request scopejava.lang.IllegalArgumentException: cant remove Attributes from request scope java.lang.Throwable(java.lang.String) java.lang.Exception(java.lang.String) java.lang.RuntimeException(java.lang.String) java.lang.IllegalArgumentException(java.lang.String) void org.apache.jasper.runtime.PageContextImpl.removeAttribute(java.lang.String, int) int org.apache.struts.taglib.html.FormTag.doEndTag()
Re: VAJ 4.0 and WTE cant remove Attributes from request scope
Replace the following lines in the doEndTag() method in the FormTag class: pageContext.removeAttribute(Constants.BEAN_KEY, PageContext.REQUEST_SCOPE); pageContext.removeAttribute(Constants.FORM_KEY, PageContext.REQUEST_SCOPE); with the following: pageContext.getRequest().removeAttribute(Constants.BEAN_KEY); pageContext.getRequest().removeAttribute(Constants.FORM_KEY); and your problem will disappear : ) Regards, Geoff Bennett, Multitask Consulting, [EMAIL PROTECTED] Mark Chen mark.chen@dhTo: [EMAIL PROTECTED], Mike Pettersen [EMAIL PROTECTED] ltd.com cc: Subject: VAJ 4.0 and WTE cant remove Attributes from request scope 24/08/2001 08:14 AM Please respond to struts-user Hi, I found one suggestion from Johan about VAJ3.5.3 problem to cant remove attributes from request scope. I had a same problem when tried to setup VAJ 4.0 to run struts and I got the same problem as attached below. Anybody knows IBM has fixed this problem. Thanks! Mark Message: Server caught unhandled exception from servlet [jsp]: cant remove Attributes from request scope Target Servlet: jsp StackTrace: Root Error-1: cant remove Attributes from request scope java.lang.IllegalArgumentException: cant remove Attributes from request scope java.lang.Throwable(java.lang.String) java.lang.Exception(java.lang.String) java.lang.RuntimeException(java.lang.String) java.lang.IllegalArgumentException(java.lang.String) void org.apache.jasper.runtime.PageContextImpl.removeAttribute(java.lang.String, int) int org.apache.struts.taglib.html.FormTag.doEndTag()
Re: VAJ 4.0 and WTE cant remove Attributes from requestscope
Geoff, Thank you very much!!! Regards, Mark Chen [EMAIL PROTECTED] 08/23/01 07:11PM Replace the following lines in the doEndTag() method in the FormTag class: pageContext.removeAttribute(Constants.BEAN_KEY,PageContext.REQUEST_SCOPE); pageContext.removeAttribute(Constants.FORM_KEY,PageContext.REQUEST_SCOPE);with the following: pageContext.getRequest().removeAttribute(Constants.BEAN_KEY); pageContext.getRequest().removeAttribute(Constants.FORM_KEY);and your problem will disappear : )Regards,Geoff Bennett,Multitask Consulting,[EMAIL PROTECTED] "Mark Chen" mark.chen@dh To: [EMAIL PROTECTED], "Mike Pettersen" [EMAIL PROTECTED] ltd.com cc: Subject: VAJ 4.0 and WTE "cant remove Attributes from request scope" 24/08/2001 08:14 AM Please respond to struts-user Hi,I found one suggestion from Johan about VAJ3.5.3 problem to cant removeattributes from request scope. I had a same problem whentried to setup VAJ 4.0 to run struts and I got the same problem as attachedbelow.Anybody knows IBM has fixed this problem.Thanks!MarkMessage: Server caught unhandled exception from servlet [jsp]: cant removeAttributes from request scopeTarget Servlet: jspStackTrace: Root Error-1: cant remove Attributes from request scopejava.lang.IllegalArgumentException: cant remove Attributes from requestscope java.lang.Throwable(java.lang.String) java.lang.Exception(java.lang.String) java.lang.RuntimeException(java.lang.String) java.lang.IllegalArgumentException(java.lang.String) voidorg.apache.jasper.runtime.PageContextImpl.removeAttribute(java.lang.String,int) int org.apache.struts.taglib.html.FormTag.doEndTag()
Re: welcome file in web.xml with pre-compiled jsp's?
Anyone have a solution for this? I'm having the same problem. Thanks. [EMAIL PROTECTED] wrote: Hi everyone, I am pre-compiling my jsp's in my struts web app, and everything works fine, except specifying the welcome file in the web.xml. If I do not pre-compile everything, having index.jsp as the first page works great. However, when I pre-compile index.jsp it doesn't work. Putting an uncompiled index.jsp back in the root directory makes it work again. I guess it is because I am now calling a servlet instead of page, but not sure how to get around this. Does anyone know if there is something special I have to do, or if there is anywhere else I can specify the first page as a servlet? Thanks, Dave Web.xml: ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.2//EN http://java.sun.com/j2ee/dtds/web-app_2_2.dtd; !-- web.xml for use with PRE-COMPILED JSP's -- web-app !-- The Welcome File List -- welcome-file-list !-- call index.jsp as first page -- welcome-fileindex.jsp/welcome-file /welcome-file-list !-- Action Servlet Configuration -- servlet servlet-nameaction/servlet-name !-- central Action Servlet Controller to use -- servlet-classbeans.AppController/servlet-class !-- Java class name of the application resources bundle base class -- init-param param-nameapplication/param-name param-valueApplicationResources/param-value /init-param !-- Context-relative path to the XML resource containing our configuration information -- init-param param-nameconfig/param-name param-value/WEB-INF/struts-config.xml/param-value /init-param !-- The debugging detail level for this servlet, which controls how much information is logged. [0] -- init-param param-namedebug/param-name param-value2/param-value /init-param !-- The debugging detail level for the Digester we utilize in initMapping(), which logs to System.out instead of the servlet log. [0] -- init-param param-namedetail/param-name param-value2/param-value /init-param load-on-startup2/load-on-startup /servlet !-- Catch any exceptions, and redirect to error page -- error-page exception-typejava.lang.Exception/exception-type location/error.jsp/location /error-page servlet servlet-name changeLogFileName /servlet-name servlet-class JspServ.changeLogFileName /servlet-class /servlet servlet servlet-name chooseDevice /servlet-name servlet-class JspServ.chooseDevice /servlet-class /servlet servlet servlet-name dataDir /servlet-name servlet-class JspServ.dataDir /servlet-class /servlet servlet servlet-name dataDirFrame /servlet-name servlet-class JspServ.dataDirFrame /servlet-class /servlet servlet servlet-name error /servlet-name servlet-class JspServ.error /servlet-class /servlet servlet servlet-name index /servlet-name servlet-class JspServ.index /servlet-class /servlet servlet servlet-name indexBar /servlet-name servlet-class JspServ.indexBar /servlet-class /servlet servlet servlet-name log /servlet-name servlet-class JspServ.log /servlet-class /servlet servlet servlet-name logFilter /servlet-name servlet-class JspServ.logFilter /servlet-class /servlet servlet servlet-name logFrame /servlet-name servlet-class JspServ.logFrame /servlet-class /servlet servlet servlet-name logging /servlet-name servlet-class JspServ.logging /servlet-class /servlet servlet servlet-name loggingFrame /servlet-name servlet-class JspServ.loggingFrame /servlet-class /servlet servlet servlet-name loggingSaveCancel /servlet-name servlet-class JspServ.loggingSaveCancel /servlet-class /servlet servlet servlet-name login /servlet-name servlet-class JspServ.login /servlet-class /servlet servlet servlet-name messages /servlet-name servlet-class JspServ.messages /servlet-class /servlet servlet servlet-name parameters /servlet-name servlet-class JspServ.parameters /servlet-class /servlet servlet servlet-name parametersFrame /servlet-name servlet-class JspServ.parametersFrame /servlet-class /servlet servlet servlet-name parametersSaveCancel /servlet-name servlet-class JspServ.parametersSaveCancel /servlet-class /servlet servlet servlet-name serialNosFrame
Re: How to Create an ActionError with a text message
Hello Rajan, Copied from other's post: Add in the ApplicationResources.properties file an entry like error.exception = Exception: {0}. Then when I create the error I use catch (Exception e) { ActionErrors errors = new ActionErrors(); errors.add(ActionErrors.GLOBAL_ERROR, new ActionError(error.exception, e.getMessage())); saveErrors(request, errors); return mapping.findForward(failure); } Wednesday, August 22, 2001, 3:12:06 PM, you wrote: RG ActionError normally takes a key to a property in ApplicationResources RG file. But I would like to report errors without putting all the errors in RG the properties file. RG I would like to continue to use the html:errors/ tag. RG Is there a way of reporting errors from an Action which can be reported by RG html:error/ without putting the message string in the resource? RG Thanks for your help, RG Rajan RG __ RG Do You Yahoo!? RG Make international calls for as low as $.04/minute with Yahoo! Messenger RG http://phonecard.yahoo.com/ -- Best regards, Anthony
Hard time understanding tld(s)...
Hi all, can somebody point me to some documentation describing what struts.tld, struts-bean.tld, struts-logic.tld, struts-html.tld etc., are and what context(s) they are used Venkat.
Interbase/interclient
Hi all- I had this problem with the following sturts data source (as configured in sturts-config.xml). I was previously using jdbc-odbc, but then I realized it doesnt support prepared statements (duh) Ive decided to switch to a real db. Interbase was my choice. However if I add the following declaration in struts-config.xml, I start getting javax.servlet.ServletException: Cannot find ActionMappings or ActionFormBeans collection for no apparent reason. I tried to change the direction of slashes but didnt work. If I take it out, my first fake login page shows up no problem. Any idea?Thanks, --a data-source key=dbtest autoCommit=false description=Police Datasource driverClass=interbase.interclient.Driver maxCount=4 minCount=2 url=jdbc:interbase://localhost/c:/data/projects/test/test.gdb user=sysdba /
Please Help !!!! STRUTS and TOMCAT 3.3 Beta 1 Problem.
Please help!!! My application works fine in Tomcat version 3.2.3. But if this same application is deployed in Tomcat version 3.3 beta1.0. I got the below error message when startup the Tomcat Server. I think there is something worng with the XML Parser API. Do I need a new XML Parser Version? or How can I fix this problem thank you very much Binh 2001-08-21 14:33:40 - LoadOnStartupInterceptor: cannot load servlet name: action - java.lang.NoClassDefFoundError: org/xml/sax/SAXExceptio at java.lang.Class.newInstance0(Native Method) at java.lang.Class.newInstance(Class.java:237) at org.apache.tomcat.facade.ServletHandler.getServlet(ServletHandler.java:348) at org.apache.tomcat.facade.ServletHandler.preInit(ServletHandler.java:402) at org.apache.tomcat.facade.ServletHandler.init(ServletHandler.java:227) at org.apache.tomcat.facade.LoadOnStartupInterceptor.contextInit(LoadOnStartupInterceptor.java:136) at org.apache.tomcat.core.Context.init(Context.java:501) at org.apache.tomcat.core.ContextManager.init(ContextManager.java:588) at org.apache.tomcat.startup.EmbededTomcat.initContextManager(EmbededTomcat.java:310) at org.apache.tomcat.startup.Tomcat.startTomcat(Tomcat.java:176) at org.apache.tomcat.startup.Tomcat.execute(Tomcat.java:120) at java.lang.reflect.Method.invoke(Native Method) at org.apache.tomcat.util.IntrospectionUtils.execute(IntrospectionUtils.java:87) at org.apache.tomcat.startup.Main.execute(Main.java:305) __ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/
Re: Hard time understanding tld(s)...
http://java.sun.com/products/jsp/tags/11/syntaxref119.html#8780 Venkat Jonnalagadda wrote: Hi all, can somebody point me to some documentation describing what struts.tld, struts-bean.tld, struts-logic.tld, struts-html.tld etc., are and what context(s) they are used Venkat. -- Ted Husted, Husted dot Com, Fairport NY USA. -- Custom Software ~ Technical Services. -- Tel +1 716 737-3463 -- http://www.husted.com/about/struts/
Maintaining an array...
Hello all, I would like to create 'n' number of html:text property=test maxlength=10/ dynamically (where n is greater than 0). I also would like to maintain the same property name for all the 'n' html:text I create. Is that possible? If yes, how will I be able to get these values in the ActionForm and what will be my property type in ActionForm. Here were are going to provide the user the flexibility to add n number of html:text tags dynamically. But question is , how are we going to handle these n number of tags. I think I read about this issue mentioned by someone long time ago, but somehow I am not able to recollect it. Thanks a million. Michael. winmail.dat
RE: Interbase/interclient
Problem solved. I provided the password parameter and apparently it was all it was looking for. The error message wasnt all that clear as you can tell. Documentation may need to be updated as to tell that struts do try to connect to the defined data sources, even though it wasnt asked to. Well, thanks everyone. --a -Original Message- From: Ali Ozoren [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 23, 2000 8:58 PM To: [EMAIL PROTECTED] Subject: Interbase/interclient Hi all- I had this problem with the following sturts data source (as configured in sturts-config.xml). I was previously using jdbc-odbc, but then I realized it doesnt support prepared statements (duh) Ive decided to switch to a real db. Interbase was my choice. However if I add the following declaration in struts-config.xml, I start getting javax.servlet.ServletException: Cannot find ActionMappings or ActionFormBeans collection for no apparent reason. I tried to change the direction of slashes but didnt work. If I take it out, my first fake login page shows up no problem. Any idea?Thanks, --a data-source key=dbtest autoCommit=false description=Police Datasource driverClass=interbase.interclient.Driver maxCount=4 minCount=2 url=jdbc:interbase://localhost/c:/data/projects/test/test.gdb user=sysdba /
RE: STRUTS and EJB
Title: RE: STRUTS and EJB But look at the mail send by Ted Husted asking not to use the Value Objects ( Business beans) inside the ActionForm bean Here it is -The other reason was that people tried to turn their business beans into ActionForm beans, which is really not a good idea in practice (as seductive as it sounds ;-) -Original Message-From: Derek Longmuir [mailto:[EMAIL PROTECTED]]Sent: Thursday, August 23, 2001 11:38 PMTo: '[EMAIL PROTECTED]'Subject: RE: STRUTS and EJB html:text property="valueObjectA.someNumber" size="5" maxlength="5" / Where the form has a Value object ValueObjectA, along with a "public ValueObjectA getValueObjectA()" method. The value object has a String someNumber in it, with a "public String getSomeNumber()" method. Doesn't one of the sample applications or Ted's examples show this a lot better? Derek. -Original Message- From: Narayan, Anand [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 23, 2001 1:47 PM To: '[EMAIL PROTECTED]' Subject: RE: STRUTS and EJB If a value object is used within the ActionForm for holding the form data, how should the html elements be named so that the data elements in the value object is automatically populated. Or should the data elements also reside in the ActionForm as separate fields, for which the setters and getters would go and get the information from the value object ? Anand Narayan -Original Message- From: Derek Longmuir [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 23, 2001 1:46 PM To: '[EMAIL PROTECTED]' Subject: RE: STRUTS and EJB Why not make a Value object for passing the information around, and have the form hold an instance of the value object? Derek. -Original Message- From: Juha Paananen [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 23, 2001 1:47 PM To: [EMAIL PROTECTED] Subject: RE: STRUTS and EJB I also agree on that stuff that has references to STRUTS should not be transmitted to the EJB level. The problem here is simply that I would not want to make another, exactly similar (except "extends ActionForm"), class for transporting the information to the EJB. Of course, I can do that, but I don't like the idea. My question is, is this inheritance of ActionForm really necessary in Struts design? -Original Message- From: Ted Husted [mailto:[EMAIL PROTECTED]] Sent: 23. elokuuta 2001 20:29 To: [EMAIL PROTECTED] Subject: Re: STRUTS and EJB I agree with Gregor. The ActionForm beans are best left as ActionForm beans, and used only as an extension of the html:form tags. Once the data is validated, it should be transferred to persistent stoarge, or to another bean that is not bound to the HTTP layer (and could be re-used in other environments). This bean can then use the right data-type for the job, and perform other business tasks that have nothing to do with gathering input from HTTP. On the way back, a good way to repopulate an ActionForm bean, or other string-based helper, is to have your data access objects return a Map, and then use it with the standard BeanUtils.populate() method. Struts does the same thing with the HTTP request, which is basically a Map. -- Ted Husted, Husted dot Com, Fairport NY USA. -- Custom Software ~ Technical Services. -- Tel +1 716 737-3463 -- http://www.husted.com/about/struts/ Gregor Rayman wrote: "Juha Paananen" [EMAIL PROTECTED] wrote: I want to fill in a form JavaBean using a struts form, and aftervalidating it in my Action class, store it into the db using a sessionEJB component. The proble here is that I have to extend ActionForm class to make the bean work with Struts. You can use containment instead of inheritance. You should avoid using Struts ActionForm on the business logic level. -- gR
Index of an arrayList in a options tag
Hi All, I am using an arraylist to hold some values and display them in a select box as follows. html:select property=singleSelect size=5 html:options property=selectList labelProperty=selectList/ /html:select I have created the arraylist in my action class and added some values to it. Then I set it to the form (to the selectList variable). Of course I have the getter and setter methods in my bean and it works fine. My question is, can I display the index of the arraylist as the value property in my option html tag ? How do I do it ? For e.g. I would ideally like the output to be like option value=0Some text /option option value=1Some other text/option Cheers, Gane
RE: Index of an arrayList in a options tag
try html:select property=singleSelect size=5 html:options collection=arrayList property=name labelProperty=value/ /html:select Create the LabelValueOptions class having name(put numbers) and value(item text) add them in the arrayList . -Original Message- From: Ganendran Kumaraswamy [mailto:[EMAIL PROTECTED]] Sent: Friday, August 24, 2001 10:58 AM To: '[EMAIL PROTECTED]' Subject: Index of an arrayList in a options tag Hi All, I am using an arraylist to hold some values and display them in a select box as follows. html:select property=singleSelect size=5 html:options property=selectList labelProperty=selectList/ /html:select I have created the arraylist in my action class and added some values to it. Then I set it to the form (to the selectList variable). Of course I have the getter and setter methods in my bean and it works fine. My question is, can I display the index of the arraylist as the value property in my option html tag ? How do I do it ? For e.g. I would ideally like the output to be like option value=0Some text /option option value=1Some other text/option Cheers, Gane
Hi All, especially Nial Pemberton and Ted Husted - Re Logic Tags
Hi All, I just want to know wether Nials extra logic tags will ever be put into the Struts build? Thanx Regards, Dudley Butt Software Analyst/Developer Phone: +27 (0)21 936 7517 Mobile: +27 (0)83 327 5709 E-mail: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] ** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. This footnote also confirms that this email message has been swept by MIMEsweeper for the presence of computer viruses. www.mimesweeper.com **
Struts on AIX
Hi JiRong Sorry for replying so late, but I was busy in some other stuff also you had come out with your fix. Anyway, I saw your fix . All steps looks fine to me especially if it works for you, but I have to say about steps 7 8. Regarding step 7. We also came with the same fix at first, but one of our enthusiastic deployer said that changing the DTD to use SYSTEM identifier point to file on local system is not good practice. This hard codes the file we have to change the file on every machine we deploy. I totally agree with him. Later on, he diged into the source code for Struts Java came up with the following changes in the Struts code. In Class ActionServlet, method initDigester(int) initServlet(). // Register our local copy of the DTDs that we can find for (int i = 0; i registrations.length; i += 2) { URL url = this.getClass().getResource(registrations[i+1]); if (url != null) { digester.register(registrations[i], url.getFile()); // modified by us } } // Register our local copy of the DTDs that we can find for (int i = 0; i registrations.length; i += 2) { URL url = this.getClass().getResource(registrations[i+1]); if (url != null) digester.register(registrations[i], url.toString()); // original } In Class Digester, method resolveEntity // Return an input source to our alternative URL try { URL url = new URL(classloader, null, dtdURL); // we modified InputStream stream = url.openStream(); return (new InputSource(stream)); } catch (Exception e) { throw new SAXException(e); } try { URL url = new URL(dtdURL); // original InputStream stream = url.openStream(); return (new InputSource(stream)); } catch (Exception e) { throw new SAXException(e); } The reason he gave had something to do with difference in how URL are handled in Windows AIX. According, to him his code should work on all systems. Altough he too wasn't much comfortable with his fix, especially the line URL url = new URL(classloader, null, dtdURL); could aslo be file instead of classloader. Anyway, That moment, it gave us a temporary fix. This was first deployment of our part of application on production like environment. On next, deployment hope we move to WAS 4.0. We will see what happens then. I would like to bring this to attention of developers of Struts. So, I am posting to developers mailing list also . They can more clearly explain if Sturts code has a bug in regards to AIX system, or something else is wrong. They also can tell which is a better fix. I myself don't like the idea of changing the struts code either. Although, we have to do that anyway for FormTag problem. Regarding step 8 for parser : We followed following step from http://jakarta.apache.org/struts/installation-was352-x.html 6: Copy jaxp 1.0.1's (NOT 1.1.1's) jaxp.jar and parser.jar to the servlets directory of the strut-example webapp. That worked for us. I am not sure about the link that you had send for parser. Hope you are not bored by my long mail. Regards Shipra -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 21, 2001 8:00 AM To: [EMAIL PROTECTED] Subject: Finally make the Struts working on AIX Hi, To share with you, here is my recorded instruction to config Struts 1.0 on my AIX 4.3 with WebSphere 3.5.4. Does it mean I can go ahead with Struts? Regards, JiRong config Struts on sindev02 1. Start adminclient.bat from D:\WebSphere\AppServer\bin adminclient sindev02 2. Create Applicatin Server Payment, create Default Servlet Engine create a payment webapp to test, must change the permisson of payment directory 3. Copy jakarta-struts-1.0.tar file to /home/rongji1/temp, extract to /home/rongji1/ as /home/rongji1/jakarta-struts-1.0 4. Use the Convert War File task in WebSphere to convert the struts-example.war to /home/rongji/ as /home/rongji1/struts-example 5. Create a WEB-INF folder under /home/rongji1/struts-example/servlets/ as /home/rongji1/struts-example/servlets/WEB-INF 6. Copy struts-config.xml, database.xml and web.xml into the above directory 7. Edit the struts-config.xml and web.xml to point the DTD file to local system as: !DOCTYPE struts-config SYSTEM file:/home/rongji1/struts-example/servlets/org/apache/struts/resources/stru ts-config_1_0.dtd be careful about the space 8. Copy the latest IBM XML parse 3.2.1 from: http://www.alphaworks.ibm.com/tech/xml4j, xerces.jar copy into /home/rongji1/struts-example/servlets/ 9. Copy struts-config_1_0.dtd, web-app_2_2.dtd and web-app_2_3.dtd from /home/rongji1/jakarta-struts-1.0/lib to /home/rongji1/struts-example/servlets/org/apache/struts/resources 10.Replace the struts.jar at /home/rongji1/struts-example/servlets with the one update the FormTag from Chris:
Struts and Tomcat 4.0
Sorry everyone if this post has already been made. Does anyone have some instructions on how to get struts working with Tomcat 4.0? Thanks in advance.