RE: Is anyone using tomcat 4.1.18 with nested tags?
Sri Jeff, I have seen this inconsistent behavior and can duplicate it fairly painlessly. I found when testing for bug 15799 that in some cases the bean name property for a nested write was null. Going up the tree I couldn't find any unmatched resets for the bean name where a reset changed the name to null but I didn't look at reused tags a potential source for the problem. I also don't understand why the nested tags like NestedWrite don't implement a reset. It is likely that it is just fine but it also seems possible that there should be a reset to originalProperty and isNesting in the NestedWrite tag. I haven't spent time researching this either. David Morris [EMAIL PROTECTED] 02/11/03 08:57AM Jeff: I have seen your several posts in the last day or so but haven't commiserated since you had indicated haven't read my posting (http://www.mail-archive.com/struts-user@jakarta.apache.org/msg57884.html). After debugging the problem, I had rephrased the problem in http://www.mail-archive.com/struts-user@jakarta.apache.org/msg57931.html. Eventually, I submitted a bug report -- which you have indicated as having read. Your tests on earlier versions of Tomcat may bolster Arron's belief that the problem lies in Tomcat -- or to be more precise the Jasper page compiler. You may consider appending to the bug report (#16916) and providing more information. This *is* a show-stopper for me and so I have set the priority for the bug as Major. I have no choice but to revert back to using Struts 1.0.2 with the nested extension :( since our deployment servers are at Tomcat 4.1.18. Please let me know if I can help Sri - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Indexed Properties and Population
Matt, You really don't need to know how many there are, just create them on demand. You can intercept gets and auto-extend the underlying Collection. One implementation that should work based on your example as long as you are willing to create a child factory is in the commons collection package and is ListUtils.lazyList, which takes a List and factory. David Morris [EMAIL PROTECTED] 01/16/03 02:31PM I have an ArrayList on a form... let's call the form Parent and the ArrayList Children. If I have: private ArrayList children; public void setChildren(int index, ChildForm childForm) { this.children.set(index, childForm); } Then saving my form results in a NPE for BeanUtils.copyProperties. If I create a whole bunch of objects in the ArrayList in the constructor - I avoid this problem: public ParentForm () { children = new ArrayList(100); for (int i=0; i 100; i++) { children.add(new ChildForm()); } But I'm guessing that this fits better into the reset(mapping, request) method of my form. My question is - how do I determine how many there are? Is there something in the request this this information - or should I set a hidden field with the number of children? Thanks, Matt -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Problems with nested tags
Jordan, I had a similar problem with the beta3 version of the nested tags. I posted a bug in bugzilla along with a patch that fixed this issue for me. What I found was that some code in the NestedPropertyHelper was picking up the default nested name value. If you are using Beta 3, you might check http://issues.apache.org/bugzilla/show_bug.cgi?id=15799 to see if this is a related problem. David Morris [EMAIL PROTECTED] 01/09/03 09:45AM OK, done. Thanks for that Sri. That seemed easy enough but now I am getting an error that says: javax.servlet.ServletException: No getter method for property languageId of bean org.apache.struts.taglib.html.BEAN Any suggestions? This has really got me stumped. thanks Jordan -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Problem reloading resources with Beta 3
I just did a quick rebuild of a project using the new Beta 3 version of Struts and started getting an error loading a plugin. The project worked OK with Beta 2. I probably missed something -- here is what I did: 1. Replace Struts Beta 2 related jars in Tomcat 1.1.12 based container with Beta 3 jars 2. Replace TLDs 3. Started Tomcat and received an error in the ActionServlet.initModulePlugIns while initializing com.fgm.web.menu.MneuPlugIn.init 4. Reverted back to Beta 2 and all works again. 5. Repeated steps 1-4 Does anyone know if there are changes I need to make anywhere else or if there was a change made to the way plugins initialize? Thanks, David Morris -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Self reference in optionsCollection
How do you reference this in an optionsCollection (or any standard tag for that matter)? The nested tags support a special notation of ./ or this/, which doesn't appear to carry through to standard tags. Thanks, David Morris -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Dynamic Forms
Adrian, Would it work to store your property name/values pairs in an arrayList and then use iterate or the nested tags to loop through the values when you display them? The generated text tag would then be something like property=dynValues[0].value value=Some Value. You would build the arrayList of dynProps each one having a value, name pair. nested:root name=yourBeanIfNotOnForm nested:iterate property=dynValues trtdnested:text property=value//td/tr /nested:iterate /nested:root David Morris [EMAIL PROTECTED] 06/20/02 08:14AM Hi, I have checked through almost the entire archive and encountered loads of articles covering dynamic forms, but all use the DynaActionForm, which requres the properties to specified in the struts-config.xml file. In most cases this is fine but for a few JSP's the property names are being dynamically generated at run-time so I can't add them to the struts-config file. Adrian. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: FW: Bean Usage - Collections
Keith, I don't use bean:define, but it works in most cases. Instead, I create the bean in my action class. That means you will have to specify the .do or /do/... url whenever you have a link to your page. The Action will run before you ever hit your JSP so you create the bean in the Action and use the request passed into your Action to set the action in the proper scope. You do not have to define the bean in struts config. The values entered on the form will be placed in the bean specified on the html:form tag. If that is a struts form, you will end up with two copies of your bean (it can be convenient because then you have from and to values), one on the form and one associated with your action class. The name you specify on your html:text(?) tag would be the name you assign to the attribute you saved in the action class. David Morris [EMAIL PROTECTED] 06/20/02 10:36AM Hey, I posted this a while ago, and go no response at all. Sorry if I'm a pain in the ass, but does nobody know how to do this? It doesn't seem like it should be too complex for anyone that has much experience with struts. Please help! -Original Message- From: Kamholz, Keith (corp-staff) USX [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 20, 2002 10:23 AM To: Struts (E-mail) Subject: Bean Usage - Collections Hi everyone, I'm new to struts and right now I'm working on some collections in my app. I have an EntryHolder bean class that has 3 properties (ArrayLists of entries) which each hold a different type of entry. Each type of entry is it's own class. I then have a form that fills in the info into the entry class. I believe I can just use the bean:define id=entries name=beanName type=com.moog.us.beans.EntryHolder/ tag (before the link to my form page) to instantiate the EntryHolder bean, right? (Do i need to define this bean in struts-config, if the input doesn't come from a form?) In order to the put the entry into the corresponding ArrayList, do I add it to the list in my Action that handles the form? If so, how do I access that bean in the action? My only guess is that I get it from the request parameter, or the HttpSession . Any input would be greatly appreciated. Thanks! Keith Kamholz -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Nested iterate name
Arron, And that is what I did. At this point the nested tag is working great so it is not worth spending much time on but I wonder why the name attribute on the nested:iterate tag seems to be ignored. From the documentation and what I remember of using the base iterate tag, I expected the following to work: html:form action=/myform.do nested:iterate name=myBean property=myBeanProperty nested:text property=myBeanPropertyProperty / /nested:iterate /html:form When I tried this the form bean was used rather than myBean. Is the name attribute on a nested:iterate totally ignored? When I look at the NestedNameSupport class I get the impression that nested tag names sit off to the side and do not extend the base name support. Thanks, David Morris [EMAIL PROTECTED] 06/04/02 03:09AM David, You can wedge a nested:root tag within the form tag. The child tags to the root tag will only see the root tag, and those outside the scope of the root tag won't know it's there either. Example... html:form action=/myform.do nested:root name=myOtherBean nested:iterate property=myBenProperty nested:text property=myBeanPropertyProperty / /nested:iterate /nested:root nested:nest [... other nesting exploits ...] /nested:nest /html:form ...will work just fine. The stuff within the root tag will only be working against that bean, and the other nesting exploits stuff will be working against the form bean. As soon as the tags hit a valid root tag, they stop there and use that one. Which is what makes the above possible. Is this the answer you're looking for?... Arron. David Morris wrote: I am using the 1.1b1 nested tags and ran into something that seems inconsistent. When I specify a form like: html:form action=myform nested:iterate name=mybean property=mybeanproperty nested:text property=mybeanpropertyproperty ... I get an error that mybeanproperty, which is an ArrayList is not found in myform? If I create a getter in my form bean for mybean it works OK. I really don't want to do this unless there is a way to get the request associated with a form bean. The following sort of thing does work so I have to question whether I am using the nested tags properly: html:form action=myform html:select property=mybeanproperty html:options name=mybean property=mybeanproperty.mybeanpropertyproperty ... How do I tell the nested:iterate tag to use the bean I specified rather than the form bean? Thanks, David Morris -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Nested iterate name
I am using the 1.1b1 nested tags and ran into something that seems inconsistent. When I specify a form like: html:form action=myform nested:iterate name=mybean property=mybeanproperty nested:text property=mybeanpropertyproperty ... I get an error that mybeanproperty, which is an ArrayList is not found in myform? If I create a getter in my form bean for mybean it works OK. I really don't want to do this unless there is a way to get the request associated with a form bean. The following sort of thing does work so I have to question whether I am using the nested tags properly: html:form action=myform html:select property=mybeanproperty html:options name=mybean property=mybeanproperty.mybeanpropertyproperty ... How do I tell the nested:iterate tag to use the bean I specified rather than the form bean? Thanks, David Morris -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: nested tag issue
Dean, This is like the blind leading the blind. I wonder why you don't want to declare a form but something like this should work: nested:root name=attributeNameOfBeanContainingYourCollection nested:nest property=myCollection nested:iterate property=myCollection nested:write property=myDate/ /nested:iterate /nested:nest /nested:root David Morris [EMAIL PROTECTED] 06/03/02 04:07PM ...This works, where filter.do maps to the form that holds myCollection: html:form action=/filter.do nested:nest property=myCollection nested:iterate property=myCollection nested:write property=myDate/ /nested:iterate /nested:nest /html:form This doesn't: nested:nest property=myCollection nested:iterate property=myCollection nested:write property=myDate/ /nested:iterate /nested:nest Thanks in advance. Dean Chen -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Validator Tag with with Struts 1.1.b1
Validators, I am trying to use the validator plug-in without much luck. It looks like the examples with the 1.1 beta use the old package naming. Also, it looks like the intention is to move the javascript tag to the Struts HTML tags (at least the one example I found implied that). The tld does not define the tag and the validator tld uses the old package naming. Any idea how I can use this with the 1.1 beta or do I need to use another version? Also, can someone point me to a working example of validation with a 1.1 version of Struts? Thanks, David Morris -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Validator Tag with Struts 1.1.b1
Evan, I really appreciate the time you took in answering my question. I can now get the validator to work on simple pages like a login which only has one for the site, but I don't understand how some of the names are correlated. For example, what name should be put in the html:javascript formName attribute? In my case I have something like: html:javascript formName=setup.Prompt html:form action=/setup/prompt name=setupPrompt type=com.x.setup.PromptForm onsubmit onsubmit=return validateSetupPrompt(this); struts-config.xml has: form-bean name=setup.Prompt type=com.x.setup.PromptForm action path=setup/prompt type=com.x.setup.PromptAction scope=session name=setup.Prompt validate=true input=/x/WEB-INF/jsp/setup/prompt.jsp Where I am struggling is when I have 50 or so applications and many share the same basic types of screens. I went the nested tags route for a while but couldn't get it to work with validation. Next I tried the brute force form approach but validation still doesn't work. Would dynaforms help? Thanks, David Morris [EMAIL PROTECTED] 05/17/02 07:52AM David Morris wrote: Validators, Any idea how I can use this with the 1.1 beta or do I need to use another version? Also, can someone point me to a working example of validation with a 1.1 version of Struts? Validation is poorly documented, the javadoc is even missing from the nightlies, but I was able to get it working under 1.1b1 for a demo last week. I completely ignored the contrib directory because everything is available in the main distribution and the html taglib. 1. struts-config.xml needs only the following (make sure the files exist): message-resources parameter=ApplicationResources/ plug-in className=org.apache.struts.validator.ValidatorPlugIn set-property property=pathname value=/WEB-INF/validation-rules.xml/ set-property property=pathname value=/WEB-INF/validation.xml/ /plug-in 2. I specified rules in validation.xml consistent with the old examples. This doesn't seem to have changed. 3. Be sure your applicationResources.properties file has a set of messages beginning with error. These can be copied over from examples if they are missing. 4. Set validate to true on your forms. 5. Make your forms extend: org.apache.struts.validator.ValidatorActionForm. Until you get things working I suggest you comment out any existing validate method in your form class. 6. Add the tag html:javascript formName=registerForm/ somewhere near the top. I put it above a random body tag that was in the html I was using. 7. Add the event: onsubmit=return validateRegisterForm(this); to your html:form tag. It is important that all of your form names in the event, the javascript tag and struts-config.xml match in order for the javascript validation to work properly. Have fun, Evan. -- Evan Schnell, Technical Lead nVISIA, Twin Cities Digital Architecture and Construction 2 Meridian Crossings, Richfield, MN 55423 Voice: 612.243.2460 -- Fax: 612.243.2468 -- Mobile: 612.232.5972 -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Struts menu
Scott, What is the feasibility of pulling roles from something like Tomcat? On the surface, it would be better to check the tomcat_users and web.xml files and filter out pages that the user is unauthorized to. Does your menu do this or would it be useful to you? David Morris [EMAIL PROTECTED] 04/10/02 11:51AM On Mon, 2002-04-08 at 08:12, Jon.Ridgway wrote: Hi All, I was wondering if there are any plans add the following to the Struts menu: -Support for roles I don't currently have plans to support roles. However, I am working out an implementation for generically supporting permission checking. This could easily be tied into checking roles as well. I'll have to think about it some more. -Support for locales (might already be their can't see how to use however) Localization is already supported. However, it does not automatically use the main MessageResources used in Struts apps (keyed by Action.MESSAGES_KEY). At this point, you need to pass the attribute key of the MessageResources you want to use. For example: menu:useMenuDisplayer name=CoolMenus bundle=%=Action.MESSAGES_KEY% Check the example menu application. -Support for struts-config forwards. Sounds like a good idea. I'll put it on the ToDo list... -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: A suggestion for Product-quality Code
Frank, Your logging suggestion makes sense to me, I have hit every one of these myself at least once. I hadn't thought of them as bugs, but I it may be helpful to add them to the Apache Software Foundation Bug Database so that they can acted on or rejected. I will try to do the same. The URL is: http://nagoya.apache.org/bugzilla/ David Morris [EMAIL PROTECTED] 01/07/02 09:43AM ...Specifically, some of the problems I have run into are: - If the ActionForm name is not defined in struts-config, silence - If the ActionForward string is not found, silence - If no app.properties found, pretty close to silence - if you say html:text indexed=yes (should be true), silence (note, the documentation implies it should be yes) - If the ActionError type is not found, silence In most of these cases exception and/or log entries would be very helpful. Don't get me wrong. Struts is great and the developers have done a great job (congratulations!), but now that it is attracting a wider following, it is time to also help the many developers be more productive. Frank Lawlor Athens Group, Inc. (512) 345-0600 x151 Athens Group, an employee-owned consulting firm integrating technology strategy and software solutions. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Class loader question
Group, With Struts Nightly build and Tomcat 4.0.1: Why does struts have to be in the WEB-INF directory structure? I can see that the root of this requirement is the class loader. Now that I am experimenting with the nightly Struts 1.1 build I also have to put the Commons jars in the WEB-INF directory structure. Is the root cause of this JSP page/Struts entanglements? If JSP pages are the root cause, is it wise/possible to put a them in a context that is part of Tomcat/classes? This gets more interesting if you are also using Cocoon 2, but that is a question for another day. Thanks, David Morris -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Struts Validator Load Failure
You might check that the commons jar files are in the same directory as struts.jar. I assume WEB-INF/lib. David Morris [EMAIL PROTECTED] 01/07/02 05:34PM Same problem as described using: RH Linux 7.2 07-jan Struts and Torque 06-Jan Tomcat 4 If someone comes up with a working combination, I'd be interested in hearing it. In the meantime back to Struts 1.0. -Original Message- From: Struts Newsgroup [mailto:@[EMAIL PROTECTED]] Sent: Sunday, January 06, 2002 7:25 PM To: [EMAIL PROTECTED] Subject: Re: Struts Validator Load Failure Subject: Re: Struts Validator Load Failure From: Paul Heath [EMAIL PROTECTED] === The same validation.xml works in the Tomcat environment with the same commons, struts, tiles validator jars. Do I need to be including jaxp or xerces in my classpath as well ? FYI - My app server is SilverStream 3.7.3 Steven D. Wilkinson [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED]... I haven't used the validator, but that is a Digester error. I would guess that something is wrong in the validation.xml file. Struts Newsgroup @Basebeans.com wrote: Subject: Struts Validator Load Failure From: Paul Heath [EMAIL PROTECTED] === The following is a partial stack trace of when the app server tries to load Struts Validator. I have the latest version of Digester (v1.1.1) and Struts Validator in my classpath. Anyone know how to fix this: java.lang.NoSuchMethodError at org.apache.commons.digester.Digester.getReader(Digester.java:527) at org.apache.commons.digester.Digester.parse(Digester.java:1206) at com.wintecinc.struts.validation.ValidatorResourcesInitializer.initialize(Val idatorResourcesInitializer.java:237) at com.wintecinc.struts.validation.ValidatorResourcesInitializer.initialize(Val idatorResourcesInitializer.java:123) at com.wintecinc.struts.action.ValidatorServlet.initMapping(ValidatorServlet.ja va:223) at com.wintecinc.struts.action.ValidatorServlet.init(ValidatorServlet.java:123) at javax.servlet.GenericServlet.init(GenericServlet.java:258) -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Is there a way to call a struts custom tag from your owncustom tag?
Hanikh, You can instantiate a tag from within a tag. You would need to set the appropriate tag setters like setParent and setPageContext. It may or may not work depending on how the tag was written. I also don't think it is an ideal way to nesting tags but it does work when the output of one tag changes enclosed tags. David Morris [EMAIL PROTECTED] 11/30/01 10:05AM Oh, well, maybe I wasn't clear in my question. I want myTagLib:myTag / to somehow replace itself by a set of struts tags. I don't think findAncestor would do it. Am I missing something in your thoughts? Thanks for your answer anyway. -Original Message- From: Matt Raible [mailto:[EMAIL PROTECTED]] Sent: Friday, November 30, 2001 12:06 PM To: Struts Users Mailing List Subject: Re: Is there a way to call a struts custom tag from your own custom tag? You could probably use findAncestorWithClass(Tag, Class) http://java.sun.com/products/servlet/2.2/javadoc/javax/servlet/jsp/tagext/Ta gSupport.html --- Hani Hamandi [EMAIL PROTECTED] wrote: Hi, My question is actually simple. I would like to write my own custom tag that, for example, builds a form using the struts custom tags. For example, I would like to write a tag like this one: myTabLib:mytag / Which, for example, does this: html:form action = myAction.do bean:message key = myLabel / html:text property = myField / /html:form This is just an example, I am not particularly interested in building a form. The key question is how to get your container to actually execute another custom tag from within your doStartTag() method for example. If you do out.print(bean:message key = \myLabel\ /), of course this will simply be sent back to the browser as is (text), without any interpretation on the server side. I don't know, maybe this is not doable at all, but thanks in advance for any suggestions, Hani. P.S: The thing is, if this is not doable, then using struts kinda prevents you from writing your own custom tags (unless you extend the struts stuff). I wanted to write my own custom tag which reads some data from the database, does a couple of things, and builds an html:select with the data. But that's exactly where I got stuck: at the html:select! Of course, the regular select would work just fine, but you do want to use the html:select for struts to populate your bean. So I ended up using a %@ include, at least for now. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Is there a way to call a struts custom tag from your owncustom tag?
Hani, I still must not understand, but I think that your someStrutsTag is indeed nested in your tag. At least the output is. You may be able to get away with something like: if (getSomeStrutsTag() == null) { setSomeStrutsTag()(new SomeStrutsTag()); getSomeStrutsTag().setParent(this); getSomeStrutsTag().setPageContext(pageContext); getSomeStrutsTag().setWhateverelse(); } // You should probably use reflection to see what is available and then // do something like this for the appropriate pieces: getSomeStrutsTag().doStartTag(); You would put this code in the doStart or doEnd of your own tag. I still don't think this is real good practice, but it should work. David Morris [EMAIL PROTECTED] 11/30/01 11:50AM Thanks for your answer David. Again, maybe I was not clear in my original message, even though I thought I were. But I am really not trying to do nesting here. I am simply trying to write a custom tag: Normally, when you write a custom tag, the only tags you can use in out.print( ... ) are the plain old html tags. I want to be able, from within my custom tag, say in doStartTag(), to do something like out.print(html:someStrutsTag /) where html:someStrutsTag / is not simply written back to the browser as is, but actually evalutated on the server. Thanks again for your suggestion, Hani. -Original Message- From: David Morris [mailto:[EMAIL PROTECTED]] Sent: Friday, November 30, 2001 1:27 PM To: [EMAIL PROTECTED] Subject: RE: Is there a way to call a struts custom tag from your own custom tag? Hanikh, You can instantiate a tag from within a tag. You would need to set the appropriate tag setters like setParent and setPageContext. It may or may not work depending on how the tag was written. I also don't think it is an ideal way to nesting tags but it does work when the output of one tag changes enclosed tags. David Morris -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
HTML form tag
I noticed that the struts html form tag supports most of the attributes of a normal form tag, but not everything. Is that by design, an oversight, or am I missing something? I needed to use the onkeypress attribute but it is not supported. I ended up registering an event handler on the document. If it would help, I wouldn't mind adding the support to the tag. Thanks, David Morris -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Using a HashMap for storing the FormBeans-Data
Dirk, This sounds similar to a question I posted. Unfortunately, I did not receive a response. I set my form elements to have the same name and want to associate a class with them. Using the same name meant that I only had to have one getter and setter in my generic form. In my case I have a selection object that would be used on a form that supports printing or inquiries. The selection would normally represent a database selection. The difficulty I ran into was with pre-validating the form. Ideally I would want to use something like the validation classes that I understand will be part of the next release. This is probably not much help. I am not happy with this approach and was hoping that someone with a better overall understanding of Struts had worked through this. David Morris [EMAIL PROTECTED] 10/25/01 02:04AM Hi, is it possible to use a HashMap to get and set the data of a FormBean. I would like to have a formbean with a HashMap wich represents the formbeans data! Any suggestions are welcome
Re: 24/7 availability
Amit, The site supports a manufacturing facility that makes Medium Density Fiberboard. The plant runs continuously for up to 6 months at a time. Scheduling information originates on an AS/400, which is fed down to an Oracle database that supports the site. The site provides machine operators and others with information about the product as it is produced. Without our data the plant is running blind but only a few operations run continuously during production. That is why we have the opportunity to take down a single application, just not all of them at once. David Morris [EMAIL PROTECTED] 10/23/01 09:22PM Could you tell me something more about the 24/7 environment , any URL's also will also be of great help Rgds Amit
Generic selection forms
Group, I have been trying to come up with a list of options related to a Struts-based application. I would appreciate your ideas and comments. At this point I have prototyped a few ideas and have not come up with a structure I am satisfied with. I am trying to build a report/inquiry framework. I would like to be able to define a JSP page that takes some entry criteria and returns a result. I am reasonably satisfied with the flow of this application although I think the workflow support I have been reading about will really help. The main area I am struggling with is in building generic selection objects and output format descriptions. I tried a generic selection where every value on the screen has the same name and the type is passed as a parameter. This makes it difficult to validate (entered, numeric, date, etc) values without a trip to the server. The data relations and output format is described in a resource bundle. I take a result set and put it into a set of hash tables that allows the application to format the data fairly flexibly. The hash tables are set up as a 4d cube for report/result set/rows/columns. The main drawback has been that this can eat up memory and is not necessary if the user has not customized their view. Finally, when I have run into some printing challenges. Most of these are related to the use of HTML and CSS. I cannot get page headings to work as I think the CSS specification says it should with IE 5.5. I experimented with JDOM and FOP and could not get this to perform acceptably due to the massive memory requirements. I do believe that I could improve the performance if I could get FOP to process the input document using SAX events rather than building the full DOM tree. Anyone else successful doing this for a report that spans more than a few pages? Thanks, David Morris
24/7 availability
Group, Another question, which is not entirely Struts related. We recently implemented a system that relies heavily on Struts in a 24/7 environment. Right now we have some opportunities to cycle Tomcat 3.2.3, which is what we are running Struts on. In the future those opportunities will get further apart. At that point, we will only be able to stop and restart individual applications. Struts seems to have some problems with objects disappearing, especially forms. Has anyone implemented a mechanism that facilitates reloading of individual applications? If not does anyone have any suggestions on where I might begin implementing this type of support? Thanks, David Morris
RE: Re : Struts in VAJ 3.53
Harshal, I am not sure this applies because you are using the Websphere test environment, but I get this with Tomcat 3.2.3 in VAJ unless I add struts to the classpath as a jar and not as a project. It did not happen with the Tomcat 3.2.1 test environment (at least that appears to be the main difference between my development system that works and the one that doesn't). David Morris [EMAIL PROTECTED] 09/22/01 02:46PM Also Iam seeing this a lot of this. Field initialization: The type named FastHashMap is deprecated. Please Help. Thanks Harshal. -Original Message- From: Jhaveri, Harshal [mailto:[EMAIL PROTECTED]] Sent: Saturday, September 22, 2001 4:42 PM To: '[EMAIL PROTECTED]' Subject: Re : Struts in VAJ 3.53 Hi! All I followed all the instructions on the Url: http://www7.software.ibm.com/vad.nsf/Data/Document2558?OpenDocumentSubMast but when I start the WTE . I get the following error. [01.09.22 16:26:39:339 EDT] 2535 ServletInstan X Uncaught init() exception thrown by servlet {0}: {1} action javax.servlet.ServletException java.lang.Throwable(java.lang.String) java.lang.Exception(java.lang.String) javax.servlet.ServletException(java.lang.String, java.lang.Throwable) void org.apache.struts.action.ActionServlet.initMapping() void org.apache.struts.action.ActionServlet.init() void javax.servlet.GenericServlet.init(javax.servlet.ServletConfig) void com.ibm.servlet.engine.webapp.StrictServletInstance.doInit() void com.ibm.servlet.engine.webapp.StrictLifecycleServlet._init(javax.servlet.Ser vletConfig) void com.ibm.servlet.engine.webapp.PreInitializedServletState.init(com.ibm.servle t.engine.webapp.StrictLifecycleServlet, javax.servlet.ServletConfig) void com.ibm.servlet.engine.webapp.StrictLifecycleServlet.init(javax.servlet.Serv letConfig) void com.ibm.servlet.engine.webapp.ServletInstance.init() void javax.servlet.GenericServlet.init(javax.servlet.ServletConfig) void com.ibm.servlet.engine.webapp.ServletManager.addServlet(java.lang.String, javax.servlet.Servlet, java.util.Properties) void com.ibm.servlet.engine.webapp.WebAppServletManager.loadServlet(java.lang.Str ing) void com.ibm.servlet.engine.webapp.WebAppServletManager.loadAutoLoadServlets() void com.ibm.servlet.engine.webapp.WebApp.loadServletManager() void com.ibm.servlet.engine.webapp.WebApp.init(com.ibm.servlet.engine.config.WebA ppInfo, com.ibm.servlet.engine.webapp.WebAppContext) void com.ibm.servlet.engine.srt.WebGroup.loadWebApp() void com.ibm.servlet.engine.srt.WebGroup.init(com.ibm.servlet.engine.ServletHost, com.ibm.servlet.engine.config.WebGroupInfo) void com.ibm.servlet.engine.ServletHost.loadWebGroups() void com.ibm.servlet.engine.ServletHost.init(com.ibm.servlet.engine.ServletEngine , com.ibm.servlet.engine.config.ServletHostInfo) void com.ibm.servlet.engine.ServletEngine.loadServletHosts() void com.ibm.servlet.engine.ServletEngine.init(com.ibm.servlet.engine.config.Serv letEngineInfo) com.ibm.servlet.engine.ServletEngine com.ibm.servlet.engine.ServletEngine.getEngine() void com.ibm.ivj.control.node.ServletEngineRunner.startServletEngine(boolean) boolean com.ibm.ivj.control.node.ServletEngineRunner.startServer() void com.ibm.ivj.control.node.ServletEngineRunner.main(java.lang.String []) java.lang.Object java.lang.reflect.Method.invoke(java.lang.Object, java.lang.Object []) [01.09.22 16:26:39:430 EDT] 2535 WebGroup X [Servlet Error]-[{0}]: {1}: {2} action Failed to load servlet javax.servlet.ServletException java.lang.Throwable(java.lang.String) java.lang.Exception(java.lang.String) javax.servlet.ServletException(java.lang.String, java.lang.Throwable) void org.apache.struts.action.ActionServlet.initMapping() void org.apache.struts.action.ActionServlet.init() void javax.servlet.GenericServlet.init(javax.servlet.ServletConfig) void com.ibm.servlet.engine.webapp.StrictServletInstance.doInit() void com.ibm.servlet.engine.webapp.StrictLifecycleServlet._init(javax.servlet.Ser vletConfig) void com.ibm.servlet.engine.webapp.PreInitializedServletState.init(com.ibm.servle t.engine.webapp.StrictLifecycleServlet, javax.servlet.ServletConfig) void com.ibm.servlet.engine.webapp.StrictLifecycleServlet.init(javax.servlet.Serv letConfig) void com.ibm.servlet.engine.webapp.ServletInstance.init() void javax.servlet.GenericServlet.init(javax.servlet.ServletConfig) void com.ibm.servlet.engine.webapp.ServletManager.addServlet(java.lang.String, javax.servlet.Servlet, java.util.Properties) void