Re: How to install Struts 1.1b on WebSphere 3.5.4 (Missing ressources attribute org.apache.struts.action.MESSAGE)
Check your struts-config.xml for the Resources file package structure and see if it matches the resources location in the classpath. later hemant - Original Message - From: Renato Aganippe [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Tuesday, July 30, 2002 2:00 PM Subject: Re: How to install Struts 1.1b on WebSphere 3.5.4 (Missing ressources attribute org.apache.struts.action.MESSAGE) Tim, I did so. My ressource file is available within my classpath. Renato - Original Message - From: Tim T. Young [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Tuesday, July 30, 2002 7:39 PM Subject: Re: How to install Struts 1.1b on WebSphere 3.5.4 (Missing ressources attribute org.apache.struts.action.MESSAGE) You will want to add the path of that resource file to your webapp's classpath. (Or put the resource file, with any corresponding directory structure, into a path that is already in the classpath.) Tim Renato Aganippe raganippe@car diweb.com 07/30/2002 To: [EMAIL PROTECTED] 12:03 PM cc: Please respond to Struts Users Mailing List Subject: How to install Struts 1.1b on WebSphere 3.5.4 (Missing ressources attribute org.apache.struts.action.MESSAGE) Caterpillar: Confidential Green Retain Until: 08/29/2002 Retention Category: G90 - Information and Reports Hi everybody! I'm triyng to put Struts 1.1b on WebSphere 3.5.4 but I have the following message : Message : Server caught unhandled exception from servlet [Activateur de service de fichiers]: Server caught unhandled exception from servlet [Processeur JSP 1.1]: Missing resources attribute org.apache.struts.action.MESSAGE Does anybody have an idea? (I understand that the ressource file is not availaible but where do I have to put it to make it available) Then, is there someone who knows where I get an installation guide for struts 1.1b on WebSphere 3.5.4? Thanks a lot! Renato Aganippe Cardiweb Web Developer -- 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]
Fw: Checkboxes and Intermittent BeanUtils.populate Error
- Original Message - From: hemant [EMAIL PROTECTED] To: struts [EMAIL PROTECTED] Sent: Tuesday, July 30, 2002 10:13 AM Subject: Checkboxes and Intermittent BeanUtils.populate Error Comrades, I check a checkbox and submit, I get the error. If I do not use the checkbox and hit submit, the page comes up successfully. Any issues with primitives in relation to the FormBean member population? The strange thing is that this problem does not occur all the time. The page prior to this JSP has a form with checkboxes and that works fine with checkboxes checked. That is creepy and worries me. I looked at the source code and here is a snippet from BeanUtils.setProperty(Object, String) // else { // Value into scalar if (value instanceof String || (value == null type.isPrimitive())) { newValue = ConvertUtils.convert((String) value, type); } else if (value instanceof String[]) { newValue = ConvertUtils.convert(((String[]) value)[0], type); } else { newValue = value; } } // I wonder if this part is messing things up for primitive types. I checked the checkBox Value and it got the String as on. Now the code that takes this on and sets the ValueObject boolean variable to true seems to be causing the problem. My getters for boolean are getFoo() and setFoo() where foo is a boolean. Should it be setFoo() and isFoo()?? Please Advise hemant javax.servlet.ServletException: BeanUtils.populate 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.util.RequestUtils.populate(java.lang.Object, java.lang.String, java.lang.String, javax.servlet.http.HttpServletRequest) void org.apache.struts.action.RequestProcessor.processPopulate(javax.servlet.http .HttpServletRequest, javax.servlet.http.HttpServletResponse, org.apache.struts.action.ActionForm, org.apache.struts.action.ActionMapping) void org.apache.struts.action.RequestProcessor.process(javax.servlet.http.HttpSer vletRequest, javax.servlet.http.HttpServletResponse) void org.apache.struts.action.ActionServlet.process(javax.servlet.http.HttpServle tRequest, javax.servlet.http.HttpServletResponse) void org.apache.struts.action.ActionServlet.doPost(javax.servlet.http.HttpServlet Request, javax.servlet.http.HttpServletResponse) void javax.servlet.http.HttpServlet.service(javax.servlet.http.HttpServletRequest , javax.servlet.http.HttpServletResponse) void javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse) void org.apache.catalina.core.ApplicationDispatcher.invoke(javax.servlet.ServletR equest, javax.servlet.ServletResponse) void org.apache.catalina.core.ApplicationDispatcher.doForward(javax.servlet.Servl etRequest, javax.servlet.ServletResponse) void org.apache.catalina.core.ApplicationDispatcher.forward(javax.servlet.Servlet Request, javax.servlet.ServletResponse) void org.apache.struts.action.RequestProcessor.doForward(java.lang.String, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) void org.apache.struts.action.RequestProcessor.processActionForward(javax.servlet .http.HttpServletRequest, javax -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Wrapping Collections in LazyList to auto-populate form on Submit
Arron, Thanks for responding. Things seem to be clearer now. I have a question to ask though. We all know Bananas have seeds. (So a BananaBean can have a collection of seeds.) Now I have a situation where I have to set the property of the seed bean via the JSP on submit. Lets have a seed bean public class SeedBean { public String getColor() { return color; } public void setColor(String str) { color= str; } private String color; } Now in the MonkeyBean (Which is the formbean ) can I say the following? public class MonkeyBean { public List getBananas() { return bananas; } private List bananas = LazyCollections.lazyList(new ArrayList(LazyCollections.lazyList(new ArrayList(), SeedBean.class)), BananaBean.class); } I tried doing the same but it didnt work :( Thanks for your time hemant - Original Message - From: Arron Bates [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Tuesday, July 23, 2002 10:19 AM Subject: Re: Wrapping Collections in LazyList to auto-populate form on Submit Hemant, Sorry about the issues you're having, but at face value it seems that you're almost trying too hard. Without seeing the rest of your code, it's hard to see what your generateWrappedCollection() method is trying to acheive, so I'll try to answer with code... With the collection wrapping, it's a simple one liner in the bean. For example, in all my monkey examples, they all return the collection as the indexed property type (because it's a valid indexed getter and the iterate tags can use the collection to get their thing going). All you need to do is wrap that collection directly. For example, two complete beans... public class MonkeyBean { public List getBananas() { return bananas; } private List bananas = LazyCollections.lazyList(new ArrayList(), BananaBean.class); } public class BananaBean { public String getFlavour() { return flav; } public void setFlavour(String str) { flav = str; } private String flav; } The MonkeyBean is the parent class that hold the collection. It has immediately wrapped the ArrayList in the LazyCollection, and passed it the class of the BananaBean object. You may want to keep a reference to the wrapped ArrayList, generally I don't have the need to. These classes are all but ready to rock. In the action class, query the database or whatever and populate the MonkeyBean with the BananaBean data. Serve the result to the JSP. JSP write out a list of text boxes using iterate tags. Submit this, and after the monkeybean is built, the lazy collection will grow the banana list with banana beans as the indexed requests come in. When it gets back to your action class, you'll have your collection of banana beans. Hope this helps, you know where we are if it doesn't. Arron. On Mon, 2002-07-22 at 22:59, hemant wrote: Comrades, Objective: To autopopulate forms on submit. The formbean has a collection of collections of ValueObjects. Each valueObject contains a pair of other Value Objects. Before people beat me up, The following possibilities have been dealt with: 1 No, this is not a case of reset() I have the collections initialized and things are fine. 2 It is not a case of bean being in request scope. By default the bean is in session scope (Unless we explicitly mention the action attribute that it is request scope.) [ ...cut...] I am about to give up on form auto populate as I am out of time. I will be populating them by hand but anyway... one last attempt. We dont like to lose... do we? Thanks In Advance hemant -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Wrapping Collections in LazyList to auto-populate form on Submit
Arron Great answer! Will experiment with my code based on your suggestions and let you know Thanks for your time Regards hemant - Original Message - From: Arron Bates [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wednesday, July 24, 2002 10:46 AM Subject: Re: Wrapping Collections in LazyList to auto-populate form on Submit The seed beans would be child beans to the banana beans. You'd ask the monkey bean for the collection of bananas, and once you have a banana, you'd ask the banana for the list of it's seeds. So, the list becomes a member of the banana. Looking a little like this... public class BananaBean { public String getFlavour() { return flav; } public void setFlavour(String str) { flav = str; } public List getSeeds() { return seedList; } private List seedList = LazyCollections.lazyList(new ArrayList(), SeedBean.class); private String flav; } Nested beans are all about composition. Each nesting level will be composed of that beneath it. Monkey's don't manage seeds, they manage bananas. Seed management is up to the Banana. If there's another level, then the seed bean will take care of that. The Monkey examples of my site are an example of all this. What may be confusing is that they build objects and at times their children for sake of convenience. But the member collections themselves are always attached to the object they're concerned with. So when the request comes in, it will make the monkey object for the form. It'll then ask for the banana at the index. When the banana's made it will make the lazy wrapped list of seeds. so when an update for a seed comes in, then it will make the seed object for the banana. Once you have one level going, the rest are just as easy. From one to a hundred list levels, it's all the same. Other things come to light too... you don't have to always have the model start with monkey. Say another form which is banana specific, you can use the same banana object in another model, and it'll work just as well. Gotta love OOP :) Arron. On Wed, 2002-07-24 at 23:43, hemant wrote: Arron, Thanks for responding. Things seem to be clearer now. I have a question to ask though. We all know Bananas have seeds. (So a BananaBean can have a collection of seeds.) Now I have a situation where I have to set the property of the seed bean via the JSP on submit. Lets have a seed bean public class SeedBean { public String getColor() { return color; } public void setColor(String str) { color= str; } private String color; } Now in the MonkeyBean (Which is the formbean ) can I say the following? public class MonkeyBean { public List getBananas() { return bananas; } private List bananas = LazyCollections.lazyList(new ArrayList(LazyCollections.lazyList(new ArrayList(), SeedBean.class)), BananaBean.class); } I tried doing the same but it didnt work :( Thanks for your time hemant - Original Message - From: Arron Bates [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Tuesday, July 23, 2002 10:19 AM Subject: Re: Wrapping Collections in LazyList to auto-populate form on Submit Hemant, Sorry about the issues you're having, but at face value it seems that you're almost trying too hard. Without seeing the rest of your code, it's hard to see what your generateWrappedCollection() method is trying to acheive, so I'll try to answer with code... With the collection wrapping, it's a simple one liner in the bean. For example, in all my monkey examples, they all return the collection as the indexed property type (because it's a valid indexed getter and the iterate tags can use the collection to get their thing going). All you need to do is wrap that collection directly. For example, two complete beans... public class MonkeyBean { public List getBananas() { return bananas; } private List bananas = LazyCollections.lazyList(new ArrayList(), BananaBean.class); } public class BananaBean { public String getFlavour() { return flav; } public void setFlavour(String str) { flav = str; } private String flav; } The MonkeyBean is the parent class that hold the collection. It has immediately wrapped the ArrayList in the LazyCollection, and passed it the class of the BananaBean object. You may want to keep a reference to the wrapped ArrayList, generally I don't have the need to. These classes are all but ready to rock. In the action class, query the database or whatever and populate the MonkeyBean with the BananaBean data. Serve the result to the JSP. JSP write out a list of text boxes using iterate tags. Submit this, and after the monkeybean is built, the lazy
Re: Wrapping Collections in LazyList to auto-populate form on Submit
To answer your second question, the LazyCollections aren't yet public (unless I am in some kinda coma) , they can be found in commons nightly builds.This is OO Software Craftsmanship at its best!! The code is very well documented and should be enough to get you going. regards hemant - Original Message - From: [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wednesday, July 24, 2002 11:22 AM Subject: Re: Wrapping Collections in LazyList to auto-populate form on Submit Two questions: 1 - In our situation we will be getting a *result* object with an internal list from the backend that is similar to the MonkeyBean. I would NOT be able to change it's implementation (ie:adding LazyCollections) . How could I achieve the same thing? Would I need to create to temporary list wrappers that would be used to manually insert the newly created lists ? 2 - Are the LazyCollections public now. The last I heard they were on there way to Commons. I have been checking Arrons site and have seen to mention of them. I also understand that some of the tutorials will be updated with the lazy collections instead of putting the list in session. Is this the case? Thanks hemant [EMAIL PROTECTED] on 07/24/2002 10:02:05 AM Please respond to Struts Users Mailing List [EMAIL PROTECTED] To:Struts Users Mailing List [EMAIL PROTECTED] cc: Subject:Re: Wrapping Collections in LazyList to auto-populate form on Submit Arron Great answer! Will experiment with my code based on your suggestions and let you know Thanks for your time Regards hemant - Original Message - From: Arron Bates [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wednesday, July 24, 2002 10:46 AM Subject: Re: Wrapping Collections in LazyList to auto-populate form on Submit The seed beans would be child beans to the banana beans. You'd ask the monkey bean for the collection of bananas, and once you have a banana, you'd ask the banana for the list of it's seeds. So, the list becomes a member of the banana. Looking a little like this... public class BananaBean { public String getFlavour() { return flav; } public void setFlavour(String str) { flav = str; } public List getSeeds() { return seedList; } private List seedList = LazyCollections.lazyList(new ArrayList(), SeedBean.class); private String flav; } Nested beans are all about composition. Each nesting level will be composed of that beneath it. Monkey's don't manage seeds, they manage bananas. Seed management is up to the Banana. If there's another level, then the seed bean will take care of that. The Monkey examples of my site are an example of all this. What may be confusing is that they build objects and at times their children for sake of convenience. But the member collections themselves are always attached to the object they're concerned with. So when the request comes in, it will make the monkey object for the form. It'll then ask for the banana at the index. When the banana's made it will make the lazy wrapped list of seeds. so when an update for a seed comes in, then it will make the seed object for the banana. Once you have one level going, the rest are just as easy. From one to a hundred list levels, it's all the same. Other things come to light too... you don't have to always have the model start with monkey. Say another form which is banana specific, you can use the same banana object in another model, and it'll work just as well. Gotta love OOP :) Arron. On Wed, 2002-07-24 at 23:43, hemant wrote: Arron, Thanks for responding. Things seem to be clearer now. I have a question to ask though. We all know Bananas have seeds. (So a BananaBean can have a collection of seeds.) Now I have a situation where I have to set the property of the seed bean via the JSP on submit. Lets have a seed bean public class SeedBean { public String getColor() { return color; } public void setColor(String str) { color= str; } private String color; } Now in the MonkeyBean (Which is the formbean ) can I say the following? public class MonkeyBean { public List getBananas() { return bananas; } private List bananas = LazyCollections.lazyList(new ArrayList(LazyCollections.lazyList(new ArrayList(), SeedBean.class)), BananaBean.class); } I tried doing the same but it didnt work :( Thanks for your time hemant - Original Message - From: Arron Bates [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Tuesday, July 23, 2002 10:19 AM Subject: Re: Wrapping Collections in LazyList to auto-populate form on Submit Hemant, Sorry about the issues you're
Re: Wrapping Collections in LazyList to auto-populate form on Submit
Arron, Upon reading your reply, i modified my MonkeyBean and BananaBean to have a wrapped BananaBean List and wrapped SeedBean List respectively. I fire up the page and submit, and check for the changes in the BananaBean List in MonkeyBean but the change in seed information does not seem to be updated in the banana list upon submit. Any bonehead thing that I might have done? So when the request comes in, it will make the monkey object for the form. It'll then ask for the banana at the index. When the banana's made it will make the lazy wrapped list of seeds. so when an update for a seed comes in, then it will make the seed object for the banana. So is it possible that the new Banana and new Seed are not being created at all? and as a result the seed/banana data is not being set? Regards hemant - Original Message - From: Arron Bates [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wednesday, July 24, 2002 10:46 AM Subject: Re: Wrapping Collections in LazyList to auto-populate form on Submit The seed beans would be child beans to the banana beans. You'd ask the monkey bean for the collection of bananas, and once you have a banana, you'd ask the banana for the list of it's seeds. So, the list becomes a member of the banana. Looking a little like this... public class BananaBean { public String getFlavour() { return flav; } public void setFlavour(String str) { flav = str; } public List getSeeds() { return seedList; } private List seedList = LazyCollections.lazyList(new ArrayList(), SeedBean.class); private String flav; } Nested beans are all about composition. Each nesting level will be composed of that beneath it. Monkey's don't manage seeds, they manage bananas. Seed management is up to the Banana. If there's another level, then the seed bean will take care of that. The Monkey examples of my site are an example of all this. What may be confusing is that they build objects and at times their children for sake of convenience. But the member collections themselves are always attached to the object they're concerned with. So when the request comes in, it will make the monkey object for the form. It'll then ask for the banana at the index. When the banana's made it will make the lazy wrapped list of seeds. so when an update for a seed comes in, then it will make the seed object for the banana. Once you have one level going, the rest are just as easy. From one to a hundred list levels, it's all the same. Other things come to light too... you don't have to always have the model start with monkey. Say another form which is banana specific, you can use the same banana object in another model, and it'll work just as well. Gotta love OOP :) Arron. On Wed, 2002-07-24 at 23:43, hemant wrote: Arron, Thanks for responding. Things seem to be clearer now. I have a question to ask though. We all know Bananas have seeds. (So a BananaBean can have a collection of seeds.) Now I have a situation where I have to set the property of the seed bean via the JSP on submit. Lets have a seed bean public class SeedBean { public String getColor() { return color; } public void setColor(String str) { color= str; } private String color; } Now in the MonkeyBean (Which is the formbean ) can I say the following? public class MonkeyBean { public List getBananas() { return bananas; } private List bananas = LazyCollections.lazyList(new ArrayList(LazyCollections.lazyList(new ArrayList(), SeedBean.class)), BananaBean.class); } I tried doing the same but it didnt work :( Thanks for your time hemant - Original Message - From: Arron Bates [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Tuesday, July 23, 2002 10:19 AM Subject: Re: Wrapping Collections in LazyList to auto-populate form on Submit Hemant, Sorry about the issues you're having, but at face value it seems that you're almost trying too hard. Without seeing the rest of your code, it's hard to see what your generateWrappedCollection() method is trying to acheive, so I'll try to answer with code... With the collection wrapping, it's a simple one liner in the bean. For example, in all my monkey examples, they all return the collection as the indexed property type (because it's a valid indexed getter and the iterate tags can use the collection to get their thing going). All you need to do is wrap that collection directly. For example, two complete beans... public class MonkeyBean { public List getBananas() { return bananas; } private List bananas = LazyCollections.lazyList(new ArrayList(), BananaBean.class); } public class BananaBean { public String getFlavour() { return flav
Wrapping Collections in LazyList to auto-populate form on Submit
Comrades, Objective: To autopopulate forms on submit. The formbean has a collection of collections of ValueObjects. Each valueObject contains a pair of other Value Objects. Before people beat me up, The following possibilities have been dealt with: 1 No, this is not a case of reset() I have the collections initialized and things are fine. 2 It is not a case of bean being in request scope. By default the bean is in session scope (Unless we explicitly mention the action attribute that it is request scope.) When asked about why the nested beans were not dynamically populated even though the getter() methods are beling called, Nesting and Recursion Guru Arron Bates said the following: quote FYI This isn't a nested tags issue at all, but a nested bean-in-a-list issue which Struts had a long time before I wrote the nested tags. They're only guilty of making something quite complex very easy to do. :) Wrap your collections in org.apache.commons.collections.LazyList, provide a class definition of your child bean and it'll be sweet and ready to do without any other effort, even in the reset() method. /quote So without wasting anytime, I downloaded the nightly build and incorporated it into my IDE. I still seem to be missing something. I wrote a simple method to test the wrapping. I get the following... trace java.lang.IllegalArgumentException: Null property value for 'wrappedCollections[0]' java.lang.Throwable(java.lang.String) java.lang.Exception(java.lang.String) java.lang.RuntimeException(java.lang.String) java.lang.IllegalArgumentException(java.lang.String) java.lang.Object org.apache.commons.beanutils.PropertyUtils.getNestedProperty(java.lang.Object, java.lang.String) java.lang.Object org.apache.commons.beanutils.PropertyUtils.getProperty(java.lang.Object, java.lang.String) java.lang.Object org.apache.struts.util.RequestUtils.lookup(javax.servlet.jsp.PageContext, java.lang.String, java.lang.String, java.lang.String) int org.apache.struts.taglib.logic.IterateTag.doStartTag() /trace jspSnippet nested:iterate id=voPairCollectionHolder property=wrappedCollections name=rangesform type=com.xxx.operations.mplanning.mpi.util.VoPairCollectionHolder nested:iterate id=vopair name=voPairCollectionHolder property=voPairs type=com.xxx.operations.mplanning.mpi.util.ValueObjectPair . . nested:write name=vopair property=twVo.objectType/ - nested:write name=vopair property=twVo.description/ /jspSnippet public java.util.Collection generateWrappedCollection() { if (null != this.collectionOfCollectionsOfVoPairs) { ArrayList list = new ArrayList(); //This is the entire collection. Iterator iterator = this.collectionOfCollectionsOfVoPairs.iterator(); //A LazyList List lazyList = null; ValueObjectPair voPair = new ValueObjectPair(); //A container for ValueObjectPair collection. VoPairCollectionHolder holder = null; while (iterator.hasNext()) { //Gets each collection of ValueObject Pairs. Collection voPairCollection = (Collection) iterator.next(); //Wrap collection containing ValueObjectPairs into a LazyList. lazyList = LazyCollections.lazyList(new ArrayList(voPairCollection), voPair.getClass()); //Place each ValueObjectPair collection into a VoPairCollecitonHolder. holder = new VoPairCollectionHolder(lazyList); //The list now is a collection of VoPairCollection holders. list.add(holder); //list.add(lazyList); } //Now Wrap the collection of collections of valueobject pairs in another lazylist this.wrappedCollections = LazyCollections.lazyList(list, holder.getClass()); } return this.wrappedCollections; } I am about to give up on form auto populate as I am out of time. I will be populating them by hand but anyway... one last attempt. We dont like to lose... do we? Thanks In Advance hemant
Setter Methods not being called in nested:iterate scenario :+(
Comrades, I am trying to Iterate over a Collection of Collections of ValueObjects and after some real painful experimentation (With VA 3.5.3 + Apache Tomcat + Poolman ), I got the page to come up properly :). So far so good. I went out and celebrated for a few minutes... The getter methods seem to work fine. But the user data is not being captured on Submit :( Please throw some light on this... Here is the snippet from my JSP. !--bean:define id=collectionOfPairs name = ldmservice property=ranges type=java.util.Collection scope=session/-- nested:root name=rangesform !--logic:iterate id=pairs name=collectionOfPairs type=java.util.Collection-- nested:iterate property=collectionOfRanges nested:iterate id=vopair property=this/ type=com.xxx.operations.mplanning.mpi.util.ValueObjectPair nested:root name=vopair ... ... tr td width=10%Description/td td width=90%nested:write name=vopair property=twVo.description//td /tr For some reason, the setter Method of setDescription(String xyz) is not being called. Please help... Many Thanks for Your Time Regards hemant
Re: Setter Methods not being called in nested:iterate scenario :+(
Adam Thanks for responding.. The Actionform (rangesform) itself is my root and I have a collection reference collectionOfPairs in rangesform, replete with getter/setter methods. The collectionOfPairs is instantiated and populated. If not, I would not be seeing the page with the correct data. right? As I said earlier, the getters work, the setters do not work. All this inspite of having the bean in the form. Thanks hemant - Original Message - From: Adam Hardy [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Thursday, July 18, 2002 4:39 PM Subject: Re: Setter Methods not being called in nested:iterate scenario :+( nested tags / indexed properties / nested beans gotcha. You have to instantiate the beans yourself in the form reset() if you want to capture the indexed properties. [this answer was automated, virtually] hemant wrote: Comrades, I am trying to Iterate over a Collection of Collections of ValueObjects and after some real painful experimentation (With VA 3.5.3 + Apache Tomcat + Poolman ), I got the page to come up properly :). So far so good. I went out and celebrated for a few minutes... The getter methods seem to work fine. But the user data is not being captured on Submit :( Please throw some light on this... Here is the snippet from my JSP. !--bean:define id=collectionOfPairs name = ldmservice property=ranges type=java.util.Collection scope=session/-- nested:root name=rangesform !--logic:iterate id=pairs name=collectionOfPairs type=java.util.Collection-- nested:iterate property=collectionOfRanges nested:iterate id=vopair property=this/ type=com.xxx.operations.mplanning.mpi.util.ValueObjectPair nested:root name=vopair ... ... tr td width=10%Description/td td width=90%nested:write name=vopair property=twVo.description//td /tr For some reason, the setter Method of setDescription(String xyz) is not being called. Please help... Many Thanks for Your Time Regards hemant -- 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]
property=this/ VS property=something in nested:iterate
Here is a snippet from my JSP //Start of Snippet/// nested:iterate id=collectionOfRanges property=collectionOfRanges nested:iterate id=vopair property=this/ type=com.xxx.operations.mplanning.mpi.util.ValueObjectPair nested:root name=vopair . ... td nested:write name=vopair property=twVo.objectType/ - nested:write name=vopair property=twVo.description/ /td //End of Snippet/// Now the getters work fine. The setters for some reason do not work. Yes, I have my reset() method and it is as follows public void reset(ActionMapping mapping, HttpServletRequest request) { if (this.collectionOfRanges == null) { HttpSession session = request.getSession(); MpiServiceBean msb = (MpiServiceBean) session.getAttribute(MpiConstants.MPI_SERVICE_BEAN); this.collectionOfRanges = msb.getRanges(); } } So the collectionOfRanges is populated before the page is fired up and it is expected that this method is called before Submit data is fed into collectionOfRanges . But for some reason, the setter() methods are not being called. Is this because of having nested:iterate id=vopair property=this/ type=com.xxx.operations.mplanning.mpi.util.ValueObjectPair instead of nested:iterate id=vopair property=something type=com.xxx.operations.mplanning.mpi.util.ValueObjectPair ??? If that is true, then it would mean I need a bean for every property that I want to set. Isnt that cumbersome? Thanks in Advance hemant - Original Message - From: hemant [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Thursday, July 18, 2002 6:11 PM Subject: Re: Setter Methods not being called in nested:iterate scenario :+( Adam Thanks for responding.. The Actionform (rangesform) itself is my root and I have a collection reference collectionOfPairs in rangesform, replete with getter/setter methods. The collectionOfPairs is instantiated and populated. If not, I would not be seeing the page with the correct data. right? As I said earlier, the getters work, the setters do not work. All this inspite of having the bean in the form. Thanks hemant - Original Message - From: Adam Hardy [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Thursday, July 18, 2002 4:39 PM Subject: Re: Setter Methods not being called in nested:iterate scenario :+( nested tags / indexed properties / nested beans gotcha. You have to instantiate the beans yourself in the form reset() if you want to capture the indexed properties. [this answer was automated, virtually] hemant wrote: Comrades, I am trying to Iterate over a Collection of Collections of ValueObjects and after some real painful experimentation (With VA 3.5.3 + Apache Tomcat + Poolman ), I got the page to come up properly :). So far so good. I went out and celebrated for a few minutes... The getter methods seem to work fine. But the user data is not being captured on Submit :( Please throw some light on this... Here is the snippet from my JSP. !--bean:define id=collectionOfPairs name = ldmservice property=ranges type=java.util.Collection scope=session/-- nested:root name=rangesform !--logic:iterate id=pairs name=collectionOfPairs type=java.util.Collection-- nested:iterate property=collectionOfRanges nested:iterate id=vopair property=this/ type=com.xxx.operations.mplanning.mpi.util.ValueObjectPair nested:root name=vopair ... ... tr td width=10%Description/td td width=90%nested:write name=vopair property=twVo.description//td /tr For some reason, the setter Method of setDescription(String xyz) is not being called. Please help... Many Thanks for Your Time Regards hemant -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Need some help
No, it is a trivialize the complexity tactic which makes you feel good momentarily. all in jest hemant - Original Message - From: avinash [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Friday, July 19, 2002 1:14 AM Subject: Re: Need some help hi , i don't know how some people say that they are new to the new and can ask such complex questions. ;-) is it humility ? - Original Message - From: Asit Kumar Padhi [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Thursday, July 18, 2002 3:29 PM Subject: Need some help All, I am new to the Struts Framework.I am involved in extending the framework for Object Mapping and Testing (Cactus or JUnit).Can anyone tell me how to extend the Struts framework and integrate them.I want some good resources in this regards. Thanks Asit -- -- -- 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]
Arron Bates, Monkey Example: List of BananaLists
First of all, the tutorial keyboardmonkey.com was extremely helpful. Arron, Thank You very much. I have a situation where I have a Collection of banana Lists. nested:iterate id=crateOfBanaLists name=rangesform property=crates type=java.util.Collection nested:iterate id=bananaList nested:write name=bananaList property=bananaType/ - nested:write name=brand property=description/ . Does the above mean it is trying to do a lookup on a crateOfBanaLists.bananaList I get a NullPointerException. What could possibly be wrong. I get a feeling it is not that complicated. Iam missing some minute detail somewhere. Is it because I have the id? and that bananaList is null? All I want to do is to iterate on the bananaList in the Crate of BananaLists. The above code works for logic:iterate . Regards and Thanks in advance hemant java.lang.NullPointerException java.lang.Throwable() java.lang.Exception() java.lang.RuntimeException() java.lang.NullPointerException() java.lang.String org.apache.struts.taglib.nested.NestedPropertyHelper.getNestedProperty(java.lang.String, javax.servlet.jsp.tagext.Tag) java.lang.String org.apache.struts.taglib.nested.NestedPropertyHelper.getNestedProperty(java.lang.String, javax.servlet.jsp.tagext.Tag) java.lang.String org.apache.struts.taglib.nested.NestedPropertyHelper.getNestedProperty(org.apache.struts.taglib.nested.NestedPropertySupport) void org.apache.struts.taglib.nested.NestedPropertyHelper.setNestedProperties(org.apache.struts.taglib.nested.NestedPropertySupport) int org.apache.struts.taglib.nested.logic.NestedIterateTag.doStartTag()
Re: Arron Bates, Monkey Example: List of BananaLists
ITried this too... nested:iterate id=crateOfBanaLists name=rangesform property=crates type=java.util.Collection nested:iterate id=bananaList name = crateOfBanaLists nested:write name=bananaList property=bananaType/ - nested:write name=brand property=description/ . - Original Message - From: hemant [EMAIL PROTECTED] To: struts [EMAIL PROTECTED] Sent: Monday, July 15, 2002 3:10 PM Subject: Arron Bates, Monkey Example: List of BananaLists First of all, the tutorial@ keyboardmonkey.com was extremely helpful. Arron, Thank You very much. I have a situation where I have a Collection of banana Lists. nested:iterate id=crateOfBanaLists name=rangesform property=crates type=java.util.Collection nested:iterate id=bananaList nested:write name=bananaList property=bananaType/ - nested:write name=brand property=description/ . Does the above mean it is trying to do a lookup on a crateOfBanaLists.bananaList I get a NullPointerException. What could possibly be wrong. I get a feeling it is not that complicated. Iam missing some minute detail somewhere. Is it because I have the id? and that bananaList is null? All I want to do is to iterate on the bananaList in the Crate of BananaLists. The above code works for logic:iterate . Regards and Thanks in advance hemant java.lang.NullPointerException java.lang.Throwable() java.lang.Exception() java.lang.RuntimeException() java.lang.NullPointerException() java.lang.String org.apache.struts.taglib.nested.NestedPropertyHelper.getNestedProperty(java. lang.String, javax.servlet.jsp.tagext.Tag) java.lang.String org.apache.struts.taglib.nested.NestedPropertyHelper.getNestedProperty(java. lang.String, javax.servlet.jsp.tagext.Tag) java.lang.String org.apache.struts.taglib.nested.NestedPropertyHelper.getNestedProperty(org.a pache.struts.taglib.nested.NestedPropertySupport) void org.apache.struts.taglib.nested.NestedPropertyHelper.setNestedProperties(org .apache.struts.taglib.nested.NestedPropertySupport) int org.apache.struts.taglib.nested.logic.NestedIterateTag.doStartTag() -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Arron Bates, Monkey Example: List of BananaLists
http://www.keyboardmonkey.com/ - Original Message - From: Emerson Cargnin - SICREDI Serviços [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Monday, July 15, 2002 5:43 PM Subject: Re: Arron Bates, Monkey Example: List of BananaLists could you point the url of this tutorial??? hemant wrote: First of all, the tutorial@ keyboardmonkey.com was extremely helpful. Arron, Thank You very much. I have a situation where I have a Collection of banana Lists. nested:iterate id=crateOfBanaLists name=rangesform property=crates type=java.util.Collection nested:iterate id=bananaList nested:write name=bananaList property=bananaType/ - nested:write name=brand property=description/ . Does the above mean it is trying to do a lookup on a crateOfBanaLists.bananaList I get a NullPointerException. What could possibly be wrong. I get a feeling it is not that complicated. Iam missing some minute detail somewhere. Is it because I have the id? and that bananaList is null? All I want to do is to iterate on the bananaList in the Crate of BananaLists. The above code works for logic:iterate . Regards and Thanks in advance hemant java.lang.NullPointerException java.lang.Throwable() java.lang.Exception() java.lang.RuntimeException() java.lang.NullPointerException() java.lang.String org.apache.struts.taglib.nested.NestedPropertyHelper.getNestedProperty(j ava.lang.String, javax.servlet.jsp.tagext.Tag) java.lang.String org.apache.struts.taglib.nested.NestedPropertyHelper.getNestedProperty(j ava.lang.String, javax.servlet.jsp.tagext.Tag) java.lang.String org.apache.struts.taglib.nested.NestedPropertyHelper.getNestedProperty(o rg.apache.struts.taglib.nested.NestedPropertySupport) void org.apache.struts.taglib.nested.NestedPropertyHelper.setNestedProperties (org.apache.struts.taglib.nested.NestedPropertySupport) int org.apache.struts.taglib.nested.logic.NestedIterateTag.doStartTag() -- Emerson Cargnin - MSA SICREDI - Tel : 3358-4860 -- 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]
bean:define Nightly Version, June28th
I had my jsp page working correctly until I replaced the struts libraries with a June28th Version of the nightly build Here is what I get now. Could someone throw some light on this? Regards hemant javax.servlet.ServletException: Define tag can contain only one of name attribute, value attribute, or body content java.lang.Throwable(java.lang.String) java.lang.Exception(java.lang.String) javax.servlet.ServletException(java.lang.Throwable) void org.apache.jasper.runtime.PageContextImpl.handlePageException(java.lang.Throwable) void org.apache.jsp.mainmenu$jsp._jspService(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) void org.apache.jasper.runtime.HttpJspBase.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) void javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse) void org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, boolean) void org.apache.jasper.servlet.JspServlet.serviceJspFile(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, java.lang.String, java.lang.Throwable, boolean) void org.apache.jasper.servlet.JspServlet.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) void javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse) void org.apache.catalina.core.ApplicationDispatcher.invoke(javax.servlet.ServletRequest, javax.servlet.ServletResponse) void org.apache.catalina.core.ApplicationDispatcher.doForward(javax.servlet.ServletRequest, javax.servlet.ServletResponse) void org.apache.catalina.core.ApplicationDispatcher.forward(javax.servlet.ServletRequest, javax.servlet.ServletResponse) void org.apache.struts.action.RequestProcessor.doForward(java.lang.String, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) void org.apache.struts.action.RequestProcessor.processActionForward(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, org.apache.struts.action.ActionForward) void org.apache.struts.action.RequestProcessor.process(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) void org.apache.struts.action.ActionServlet.process(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) void org.apache.struts.action.ActionServlet.doPost(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) void javax.servlet.http.HttpServlet.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) void javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse) void org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse) void org.apache.catalina.core.ApplicationFilterChain.doFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse) void org.apache.catalina.core.StandardWrapperValve.invoke(org.apache.catalina.Request, org.apache.catalina.Response, org.apache.catalina.ValveContext) void org.apache.catalina.core.StandardPipeline.invokeNext(org.apache.catalina.Request, org.apache.catalina.Response) void org.apache.catalina.core.StandardPipeline.invoke(org.apache.catalina.Request, org.apache.catalina.Response) void org.apache.catalina.core.ContainerBase.invoke(org.apache.catalina.Request, org.apache.catalina.Response) void org.apache.catalina.core.StandardContextValve.invoke(org.apache.catalina.Request, org.apache.catalina.Response, org.apache.catalina.ValveContext) void org.apache.catalina.core.StandardPipeline.invokeNext(org.apache.catalina.Request, org.apache.catalina.Response) void org.apache.catalina.core.StandardPipeline.invoke(org.apache.catalina.Request, org.apache.catalina.Response) void org.apache.catalina.core.ContainerBase.invoke(org.apache.catalina.Request, org.apache.catalina.Response) void org.apache.catalina.core.StandardContext.invoke(org.apache.catalina.Request, org.apache.catalina.Response) void org.apache.catalina.core.StandardHostValve.invoke(org.apache.catalina.Request, org.apache.catalina.Response, org.apache.catalina.ValveContext) void org.apache.catalina.core.StandardPipeline.invokeNext(org.apache.catalina.Request, org.apache.catalina.Response) void org.apache.catalina.valves.ErrorDispatcherValve.invoke(org.apache.catalina.Request, org.apache.catalina.Response, org.apache.catalina.ValveContext) void org.apache.catalina.core.StandardPipeline.invokeNext(org.apache.catalina.Request
Problem with ActionForm? Exception @ BeanUtils.populate?
I have a formbean declared as follows form-bean name=rangesactionform type=com.xxx.operations.mplanning.mpi.action.actionform.RangesActionForm/ and an action action path=/ranges name = rangesactionform type=com.xxx.operations.mplanning.mpi.action.RetrieveRangesAction validate=true forward name=success path=/ranges.jsp/ /action here is my RangesActionForm class public class RangesActionForm extends MpiActionForm { //This is the collection of ranges. private java.util.Collection pair; public RangesActionForm() { super(); } public java.util.Collection getPair() { return pair; } public void setPair(java.util.Collection newPair) { pair = newPair; } public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) { ActionErrors errors = null; HttpSession session = request.getSession(); MpiServiceBean msb = (MpiServiceBean) session.getAttribute(MpiConstants.MPI_SERVICE_BEAN); this.pair = msb.getRanges(); return errors; } } - I set up a debug point at the beginning of validate() method. For some reason, the execution fails even before it gets to that point. Instead I get the following exception. Could someone please throw some light on this? Iam not really sure where exactly the problem lies. Regards and Thanks in Advance hemant - javax.servlet.ServletException: BeanUtils.populate 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.util.RequestUtils.populate(java.lang.Object, java.lang.String, java.lang.String, javax.servlet.http.HttpServletRequest) void org.apache.struts.action.RequestProcessor.processPopulate(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, org.apache.struts.action.ActionForm, org.apache.struts.action.ActionMapping) void org.apache.struts.action.RequestProcessor.process(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) void org.apache.struts.action.ActionServlet.process(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) void org.apache.struts.action.ActionServlet.doPost(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) void javax.servlet.http.HttpServlet.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) void javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse) void org.apache.catalina.core.ApplicationDispatcher.invoke(javax.servlet.ServletRequest, javax.servlet.ServletResponse) void org.apache.catalina.core.ApplicationDispatcher.doForward(javax.servlet.ServletRequest, javax.servlet.ServletResponse) void org.apache.catalina.core.ApplicationDispatcher.forward(javax.servlet.ServletRequest, javax.servlet.ServletResponse) void org.apache.struts.action.RequestProcessor.doForward(java.lang.String, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) void org.apache.struts.action.RequestProcessor.processActionForward(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, org.apache.struts.action.ActionForward) void org.apache.struts.action.RequestProcessor.process(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) void org.apache.struts.action.ActionServlet.process(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) void org.apache.struts.action.ActionServlet.doPost(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) void javax.servlet.http.HttpServlet.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) void javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse) void org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse) void org.apache.catalina.core.ApplicationFilterChain.doFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse) void org.apache.catalina.core.StandardWrapperValve.invoke(org.apache.catalina.Request, org.apache.catalina.Response, org.apache.catalina.ValveContext) void org.apache.catalina.core.StandardPipeline.invokeNext(org.apache.catalina.Request, org.apache.catalina.Response) void org.apache.catalina.core.StandardPipeline.invoke(org.apache.catalina.Request
Re: Problem with Struts 1.1b1 and Log4J 1.2.4
Fabrice and Hemant I had this problem too but I overcame it the hard way. Many a times, its the IDE that causes this kinda confusion. Here is what I did, I wrote a startup servlet that starts up logging , creates the connection pools via poolman, and loads a few other things. step1: I loaded this startup servlet prior to loading the Action Servlet.Please see my web.xml below: (load-on-startup number ) step2: Remove log4j property files from your webapp. Let it pick it up from your IDE environment. (I mean C:/program files/ibm/visual age /yada/yada) step3: Make sure your WEB-INF/lib has the latest struts libraries. But yes, it was almost insulting that the LOG4J error would baffle us like that. LOL later... hemant //- web-app servlet servlet-nameaction/servlet-name servlet-classorg.apache.struts.action.ActionServlet/servlet-class init-param param-namedebug/param-name param-value2/param-value /init-param init-param param-nameconfig/param-name param-value/WEB-INF/struts-config.xml/param-value /init-param init-param param-nameapplication/param-name param-valueblah.blah...ApplicationResources/param-value /init-param init-param param-namedetail/param-name param-value2/param-value /init-param init-param param-namevalidate/param-name param-valuetrue/param-value /init-param load-on-startup2/load-on-startup /servlet !--Startup Manager-- servlet servlet-namempi_startup_manager/servlet-name servlet-classblah.blahStartupManager/servlet-class init-param param-nameLOG4J_CONFIG/param-name param-value/blah/.blah.../log4j.properties/param-value /init-param load-on-startup1/load-on-startup /servlet //- - Original Message - From: Hemanth Setty [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Monday, July 01, 2002 8:53 PM Subject: Problem with Struts 1.1b1 and Log4J 1.2.4 Hello, I have included both the Struts and Log4J packages in a webapp. Things worked fine when I was using Struts 1.0.2. After I got the latest beta realease of struts(1.1b1)..I get this error log4j:WARN No appenders could be found for logger (org.apache.commons.digester.Digester). log4j:WARN Please initialize the log4j system properly. Does anybody know why this occurs? After digging in a little bit I realized its because of the common-digester.jar file that comes with the struts1.1? But why does this error show up? Should I just stick with 1.0.2 of struts until a full release of 1.1? -hemanth -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Problem with Struts 1.1b1 and Log4J 1.2.4
One other thing, Make sure your Startup Servlet does not extend ActionServlet. I made it extend HttpServlet and the problem went away. Thanks hemant - Original Message - From: hemant [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Tuesday, July 02, 2002 11:54 AM Subject: Re: Problem with Struts 1.1b1 and Log4J 1.2.4 Fabrice and Hemant I had this problem too but I overcame it the hard way. Many a times, its the IDE that causes this kinda confusion. Here is what I did, I wrote a startup servlet that starts up logging , creates the connection pools via poolman, and loads a few other things. step1: I loaded this startup servlet prior to loading the Action Servlet.Please see my web.xml below: (load-on-startup number ) step2: Remove log4j property files from your webapp. Let it pick it up from your IDE environment. (I mean C:/program files/ibm/visual age /yada/yada) step3: Make sure your WEB-INF/lib has the latest struts libraries. But yes, it was almost insulting that the LOG4J error would baffle us like that. LOL later... hemant //- web-app servlet servlet-nameaction/servlet-name servlet-classorg.apache.struts.action.ActionServlet/servlet-class init-param param-namedebug/param-name param-value2/param-value /init-param init-param param-nameconfig/param-name param-value/WEB-INF/struts-config.xml/param-value /init-param init-param param-nameapplication/param-name param-valueblah.blah...ApplicationResources/param-value /init-param init-param param-namedetail/param-name param-value2/param-value /init-param init-param param-namevalidate/param-name param-valuetrue/param-value /init-param load-on-startup2/load-on-startup /servlet !--Startup Manager-- servlet servlet-namempi_startup_manager/servlet-name servlet-classblah.blahStartupManager/servlet-class init-param param-nameLOG4J_CONFIG/param-name param-value/blah/.blah.../log4j.properties/param-value /init-param load-on-startup1/load-on-startup /servlet //- - Original Message - From: Hemanth Setty [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Monday, July 01, 2002 8:53 PM Subject: Problem with Struts 1.1b1 and Log4J 1.2.4 Hello, I have included both the Struts and Log4J packages in a webapp. Things worked fine when I was using Struts 1.0.2. After I got the latest beta realease of struts(1.1b1)..I get this error log4j:WARN No appenders could be found for logger (org.apache.commons.digester.Digester). log4j:WARN Please initialize the log4j system properly. Does anybody know why this occurs? After digging in a little bit I realized its because of the common-digester.jar file that comes with the struts1.1? But why does this error show up? Should I just stick with 1.0.2 of struts until a full release of 1.1? -hemanth -- 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]
Action Form Dictating Value Objects?
Comrades, Let us take the check the fruit example posted by Larry Maturo. Here the Fruit Object needs to have a boolean value called checked. The ValueObject makes sense when its in a Struts Environment but doesnt it look like we have compromised on the Value Object definition? the checked instance variable should not have been there in the first place as it has nothing to do with a Fruit abstraction. I guess we need something like a ValueObject add on object to plug it in when we use this Object in a Struts environment. later hemant //start logic:iterate id=fruits name=nameOfYourFormBean property=fruits html:checkbox indexed=true name=fruits property=checked/ bean:write name=fruits property=fruitName / /logic:iterate in class Fruit public class Fruit { private String fruitName = ; private boolean checked = false; public Fruit() { super(); } public String getFruitName() { return fruitName; } public void setFruitName(String _fruitName) { fruitName = _fruitName; } public boolean getChecked() { return checked; } public void setChecked(boolean _checked){ checked = _checked; } } In you form bean: private ArrayList frutis = null; public ArrayList getFruits() { return fruits; } public void setFruits(ArrayList _frutis) { fruits = _fruits; } public Fruit getFruits(int index) { return (Fruit) fruits.get(index); } public void setFruits(int index, Fruit fruit) { fruits.set(index,fruit); } public void reset(ActionMapping mapping, javax.servlet.http.HttpServletRequest request){ Fruit f = null; Iterator it = fruits.iterator(); while it.hasNext() { f = (Fruit) it.next(); f.setChecked(false); } } //-end
Re: Action Form Dictating Value Objects?
Minor correction...It should have been, Let us take the fruit example. pardon my grammar hemant - Original Message - From: hemant To: struts Cc: Sanjay Pamidiparti Sent: Friday, June 21, 2002 11:12 AM Subject: Action Form Dictating Value Objects? Comrades, Let us take the check the fruit example posted by Larry Maturo. Here the Fruit Object needs to have a boolean value called checked. The ValueObject makes sense when its in a Struts Environment but doesnt it look like we have compromised on the Value Object definition? the checked instance variable should not have been there in the first place as it has nothing to do with a Fruit abstraction. I guess we need something like a ValueObject add on object to plug it in when we use this Object in a Struts environment. later hemant //start logic:iterate id=fruits name=nameOfYourFormBean property=fruits html:checkbox indexed=true name=fruits property=checked/ bean:write name=fruits property=fruitName / /logic:iterate in class Fruit public class Fruit { private String fruitName = ; private boolean checked = false; public Fruit() { super(); } public String getFruitName() { return fruitName; } public void setFruitName(String _fruitName) { fruitName = _fruitName; } public boolean getChecked() { return checked; } public void setChecked(boolean _checked){ checked = _checked; } } In you form bean: private ArrayList frutis = null; public ArrayList getFruits() { return fruits; } public void setFruits(ArrayList _frutis) { fruits = _fruits; } public Fruit getFruits(int index) { return (Fruit) fruits.get(index); } public void setFruits(int index, Fruit fruit) { fruits.set(index,fruit); } public void reset(ActionMapping mapping, javax.servlet.http.HttpServletRequest request){ Fruit f = null; Iterator it = fruits.iterator(); while it.hasNext() { f = (Fruit) it.next(); f.setChecked(false); } } //-end
Re: Newbie: pass ResultSet to JSP?
The cached Row set works extremely well for small volumes but when volumes are large, its can cause a resource problem as these objects hog the memory especially when there are a large number of users. just a thought. later hemant - Original Message - From: Shekhar Jain [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Sent: Friday, June 21, 2002 1:06 PM Subject: RE: Newbie: pass ResultSet to JSP? We've had good success in using a CachedRowSet instead of a ResultSet. -Original Message- From: Struts Newsgroup [mailto:@[EMAIL PROTECTED]] Sent: Friday, June 21, 2002 6:25 AM To: [EMAIL PROTECTED] Subject: Newbie: pass ResultSet to JSP? Subject: Newbie: pass ResultSet to JSP? From: David Chu [EMAIL PROTECTED] === I am trying to get my head around this struts framework for the first time. I am confused about the best/standard way to access data from a JSP. - Let's say I want a page list_items.jsp. - I have access to a bean that has a method that returns the results of a database query as a ResultSet object. - How should I iterate through the rows of the bean? - Complication: my jsp complains that the ResultSet object has been closed (because I closed the query) Is this the prefered encapsulator of data that I should be accessing through my JSP? Hopefully I can use the struts-logic:iterate tag. Thanks for helping out a new struts developer! -david -- David C. Chu America Online Network Tools Intern -- -- 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]
Servlet Load Order kills Logging, perplexed :o/
) void org.apache.commons.digester.Digester.endElement(java.lang.String, java.lang.String, java.lang.String) void org.apache.xerces.parsers.SAXParser.endElement(org.apache.xerces.utils.QName) void org.apache.xerces.validators.common.XMLValidator.callEndElement(int) boolean org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch(boolean) boolean org.apache.xerces.framework.XMLDocumentScanner.parseSome(boolean) void org.apache.xerces.framework.XMLParser.parse(org.xml.sax.InputSource) java.lang.Object org.apache.commons.digester.Digester.parse(java.io.InputStream) org.apache.struts.config.ApplicationConfig org.apache.struts.action.ActionServlet.initApplicationConfig(java.lang.String, java.lang.String) void org.apache.struts.action.ActionServlet.init() void javax.servlet.GenericServlet.init(javax.servlet.ServletConfig) javax.servlet.Servlet org.apache.catalina.core.StandardWrapper.loadServlet() void org.apache.catalina.core.StandardWrapper.load() void org.apache.catalina.core.StandardContext.loadOnStartup(org.apache.catalina.Container []) void org.apache.catalina.core.StandardContext.start() void org.apache.catalina.core.ContainerBase.addChild(org.apache.catalina.Container) void org.apache.catalina.core.StandardHost.addChild(org.apache.catalina.Container) void org.apache.catalina.core.StandardHost.install(java.lang.String, java.net.URL) void org.apache.catalina.startup.HostConfig.deployApps() void org.apache.catalina.startup.HostConfig.start() void org.apache.catalina.startup.HostConfig.lifecycleEvent(org.apache.catalina.LifecycleEvent) void org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(java.lang.String, java.lang.Object) void org.apache.catalina.core.ContainerBase.start() void org.apache.catalina.core.StandardHost.start() void org.apache.catalina.core.ContainerBase.start() void org.apache.catalina.core.StandardEngine.start() void org.apache.catalina.core.StandardService.start() void org.apache.catalina.core.StandardServer.start() void org.apache.catalina.startup.Catalina.start() void org.apache.catalina.startup.Catalina.execute() void org.apache.catalina.startup.Catalina.process(java.lang.String []) java.lang.Object java.lang.reflect.Method.invoke(java.lang.Object, java.lang.Object []) void org.apache.catalina.startup.Bootstrap.main(java.lang.String []) java.lang.Object java.lang.reflect.Method.invoke(java.lang.Object, java.lang.Object []) void StartTomcat.main(java.lang.String []) Starting service Tomcat-Apache Apache Tomcat/4.0.3 ---End Of Trace But Here is the interesting point, If I reverse the Servlet Load Order, that is, Startup second and the ActionServlet first, I dont get this nasty exception but I get an appender Issue but the Logging works. Whats with the appender issue here? START OF TRACE- Starting service Tomcat-Standalone Apache Tomcat/4.0.3 log4j:WARN No appenders could be found for logger (org.apache.commons.digester.Digester). log4j:WARN Please initialize the log4j system properly. Checking for log4J PropertyConfigurator... pc is /com/jny/operations/mplanning/mpi/properties/log4j.properties The class is class java.util.Properties Property Configurator Found... The url is valoader:/C:/Program Files/IBM/VisualAge for Java/ide/project_resources/mpi/com/jny/operations/mplanning/mpi/properties/log4j.properties Checking for log4J PropertyConfigurator... pc is /com/jny/operations/mplanning/mpi/properties/log4j.properties The class is class java.util.Properties Property Configurator Found... The url is valoader:/C:/Program Files/IBM/VisualAge for Java/ide/project_resources/mpi/com/jny/operations/mplanning/mpi/properties/log4j.properties Starting service Tomcat-Apache Apache Tomcat/4.0.3 -END OF TRACE--- Could somebody throw some light on whats going on? Is there another way to initiate Logging? preferably via ActionServlet? Regards hemant
Options Tag, Property Attribute and Accessor Consumption.
Comrades, Here is a Scenario. Let us say we have 2 kinds of value objects extending a base ValueObject. AVo and BVo extend BaseVo and BaseVo has a method getKey() Now I have a collection of AVo's and another collection of BVo's. I want to provide the descriptions of these VO's in a dropdown and capture the key during the process. Both the dropdowns exist in the same form. so the code would be something like. html:select property=key name = ldmGroup indexed=yes html:options collection=ldmGroups property=key labelProperty=formattedDescription/ /html:select So, that takes care of AVo collection in a dropdown. html:select property=key name = twGroup indexed=yes html:options collection=twGroups property=key labelProperty=formattedDescription/ /html:select This is what I have to do to capture BVo's keys. Now I also want to have a drop down of BVo collection but the key[] in formbean is already filled by AVo collection parameters. How can I use the dropdown and capture the BVo's keys? Thanks for your time. hemant
On a Tangent, Connection Pooling for UDB/400
Good Morning Comrades Pardon me for posting this post on a Struts group. This message is on a tangent as it discusses connection pooling and connections to UDB/400. I simply cound not resist it, I definitely know there are a quite a few of us who have faced this problem hence, requesting them for advise. I have a connection pool with connections to UDB/400 and I am using a class4 JDBC driver. The version of the ToolBox driver is 3.0. I create the connection pool, use connections , everything works fine, but after a certain interval (20 minutes or so), I dont get a connection. I talked to the DBA and came to know that the UDB session lasts for about 4 hours. So it cannot be the database. I connect to Oracle using a pool too, and everything is great with it. Here is the trace I get when it fails Java.sql.SQLException: The connection does not exist. 2002-04-05 20:22:21,015 [HttpProcessor[8080][4]] ERROR com.jny.operations.mplanning.mpi.dao.LabelDetailsDao - Could not retreive Labels com.jny.operations.mplanning.mpi.common.dao.DaoException java.lang.Throwable(java.lang.String) java.lang.Exception(java.lang.String) com.jny.operations.mplanning.mpi.common.exception.BaseException(java.lang.String) com.jny.operations.mplanning.mpi.common.dao.DaoException(java.lang.String) java.util.Collection com.jny.operations.mplanning.mpi.dao.LabelDetailsDao.getLabels(java.lang.String, com.jny.operations.mplanning.mpi.common.util.Datastore) java.util.Collection com.jny.operations.mplanning.mpi.dao.LabelDetailsDao.getLdmLabels(com.jny.operations.mplanning.mpi.common.util.Datastore) java.util.Collection com.jny.operations.mplanning.mpi.service.MpiServiceBean.getLabels() java.lang.Object java.lang.reflect.Method.invoke(java.lang.Object, java.lang.Object []) java.lang.Object org.apache.struts.util.PropertyUtils.getSimpleProperty(java.lang.Object, java.lang.String) java.lang.Object org.apache.struts.util.PropertyUtils.getNestedProperty(java.lang.Object, java.lang.String) java.lang.Object org.apache.struts.util.PropertyUtils.getProperty(java.lang.Object, java.lang.String) Thank You for your time hemant
WebSphere 3.5, Struts 1.1Beta Any Issues?
Comrades, I have to deploy my webapp (powered by Struts 1.1Beta, I just love saying that) on WebSphere 3.5.x . I remember the nauseating/sinking feeling (due to Learning Curve + Deployment Issues) I encountered in the beginning when I was trying to get Struts 1.0 to run on it. Now that 1.1Beta has a lot of changes, have you encountered any issues with regards to functionality such as XML parsing etc? Prerparing myself mentally, precautions/pointers are highly appreciated. Thanks and Regards hemant
java.lang.ClassFormatError out of the Blue
I Use Tomcat 4.0.2 and Struts 1.0.2 with VA 3.5.3 Everything was perfect until, one inauspicious moment in the afternoon when I suddenly got this exception from nowhere. I have no clue as to why and how. But I do see that this is a ClassFormatException so, I moved the application related code (not struts) onto another machine where I previously deployed my app. The app was fine on this box earlier.Now, I get the same ClassFormatError there too so, It has to do with the code I moved. The Java API says that it is Thrown when the Java Virtual Machine attempts to read a class file and determines that the file is malformed or otherwise cannot be interpreted as a class file. So .class file is corrupt/malformed. But which? I am trying to force a recompile on classes by adding a space, etc. any ideas on what sould be done next if my attempt fails? here is the exception Thank You for your time hemant root cause java.lang.ClassFormatError java.lang.Throwable() java.lang.Error() java.lang.LinkageError() java.lang.ClassFormatError() java.lang.Class java.lang.ClassLoader.defineClass0(java.lang.String, byte [], int, int, java.security.ProtectionDomain) java.lang.Class java.lang.ClassLoader.defineClass(java.lang.String, byte [], int, int, java.security.ProtectionDomain) java.lang.Class java.lang.ClassLoader.defineClass(java.lang.String, byte [], int, int) java.lang.Class org.apache.jasper.servlet.JasperLoader.loadClass(java.lang.String, boolean) java.lang.Class org.apache.jasper.servlet.JasperLoader.loadClass(java.lang.String) boolean org.apache.jasper.servlet.JspServlet.loadJSP(java.lang.String, java.lang.String, boolean, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) void org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) void org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, boolean) void org.apache.jasper.servlet.JspServlet.serviceJspFile(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, java.lang.String, java.lang.Throwable, boolean) void org.apache.jasper.servlet.JspServlet.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) void javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse) void org.apache.catalina.core.ApplicationDispatcher.invoke(javax.servlet.ServletRequest, javax.servlet.ServletResponse) void org.apache.catalina.core.ApplicationDispatcher.doForward(javax.servlet.ServletRequest, javax.servlet.ServletResponse) void org.apache.catalina.core.ApplicationDispatcher.forward(javax.servlet.ServletRequest, javax.servlet.ServletResponse) void org.apache.struts.action.ActionServlet.processActionForward(org.apache.struts.action.ActionForward, org.apache.struts.action.ActionMapping, org.apache.struts.action.ActionForm, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) void org.apache.struts.action.ActionServlet.process(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) void org.apache.struts.action.ActionServlet.doPost(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) void javax.servlet.http.HttpServlet.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) void javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse) void org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse) void org.apache.catalina.core.ApplicationFilterChain.doFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse) void org.apache.catalina.core.StandardWrapperValve.invoke(org.apache.catalina.Request, org.apache.catalina.Response, org.apache.catalina.ValveContext) void org.apache.catalina.core.StandardPipeline.invokeNext(org.apache.catalina.Request, org.apache.catalina.Response) void org.apache.catalina.core.StandardPipeline.invoke(org.apache.catalina.Request, org.apache.catalina.Response) void org.apache.catalina.core.ContainerBase.invoke(org.apache.catalina.Request, org.apache.catalina.Response) void org.apache.catalina.core.StandardContextValve.invoke(org.apache.catalina.Request, org.apache.catalina.Response, org.apache.catalina.ValveContext) void org.apache.catalina.core.StandardPipeline.invokeNext(org.apache.catalina.Request
Frustrating ClassCastException
I am currently using Tomcat 4.0.1 in a VisualAge 3.5.3 environment with struts 1.0.2. Here is the scenario. I run both struts-example webapp and my application webapp, everything works out fine. JSP's and Java files are created in the work directory in Tomcat and everything is hunky dory. Now I stop Tomcat and bring it backup and then attempt to test the struts-example webapp. It works well. Now when I run my web app, I get a ClassCast Exception. Looks like it is caused by ActionForm. But All my ActionForm's blissfully extend org.apache.struts.action.ActionForm. Everything except struts-config and web.xml is the same in both webapps. What could be wrong? Thanks for your time hemant -- java.lang.ClassCastException java.lang.Throwable() java.lang.Exception() java.lang.RuntimeException() java.lang.ClassCastException() org.apache.struts.action.ActionForm org.apache.struts.action.ActionServlet.processActionForm(org.apache.struts.action.ActionMapping, javax.servlet.http.HttpServletRequest) org.apache.struts.action.ActionForm org.apache.struts.action.ActionServlet.processActionForm(org.apache.struts.action.ActionMapping, javax.servlet.http.HttpServletRequest) void org.apache.struts.action.ActionServlet.process(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) void org.apache.struts.action.ActionServlet.doPost(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) void javax.servlet.http.HttpServlet.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) void javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse) void org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse) void org.apache.catalina.core.ApplicationFilterChain.doFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse) void org.apache.catalina.core.StandardWrapperValve.invoke(org.apache.catalina.Request, org.apache.catalina.Response, org.apache.catalina.ValveContext) void org.apache.catalina.core.StandardPipeline.invokeNext(org.apache.catalina.Request, org.apache.catalina.Response) void org.apache.catalina.core.StandardPipeline.invoke(org.apache.catalina.Request, org.apache.catalina.Response) void org.apache.catalina.core.ContainerBase.invoke(org.apache.catalina.Request, org.apache.catalina.Response) void org.apache.catalina.core.StandardContextValve.invoke(org.apache.catalina.Request, org.apache.catalina.Response, org.apache.catalina.ValveContext) void org.apache.catalina.core.StandardPipeline.invokeNext(org.apache.catalina.Request, org.apache.catalina.Response) void org.apache.catalina.core.StandardPipeline.invoke(org.apache.catalina.Request, org.apache.catalina.Response) void org.apache.catalina.core.ContainerBase.invoke(org.apache.catalina.Request, org.apache.catalina.Response) void org.apache.catalina.core.StandardContext.invoke(org.apache.catalina.Request, org.apache.catalina.Response) void org.apache.catalina.core.StandardHostValve.invoke(org.apache.catalina.Request, org.apache.catalina.Response, org.apache.catalina.ValveContext) void org.apache.catalina.core.StandardPipeline.invokeNext(org.apache.catalina.Request, org.apache.catalina.Response) void org.apache.catalina.valves.ErrorDispatcherValve.invoke(org.apache.catalina.Request, org.apache.catalina.Response, org.apache.catalina.ValveContext) void org.apache.catalina.core.StandardPipeline.invokeNext(org.apache.catalina.Request, org.apache.catalina.Response) void org.apache.catalina.valves.ErrorReportValve.invoke(org.apache.catalina.Request, org.apache.catalina.Response, org.apache.catalina.ValveContext) void org.apache.catalina.core.StandardPipeline.invokeNext(org.apache.catalina.Request, org.apache.catalina.Response) void org.apache.catalina.valves.AccessLogValve.invoke(org.apache.catalina.Request, org.apache.catalina.Response, org.apache.catalina.ValveContext) void org.apache.catalina.core.StandardPipeline.invokeNext(org.apache.catalina.Request, org.apache.catalina.Response) void org.apache.catalina.core.StandardPipeline.invoke(org.apache.catalina.Request, org.apache.catalina.Response) void org.apache.catalina.core.ContainerBase.invoke(org.apache.catalina.Request, org.apache.catalina.Response) void org.apache.catalina.core.StandardEngineValve.invoke(org.apache.catalina.Request, org.apache.catalina.Response, org.apache.catalina.ValveContext) void org.apache.catalina.core.StandardPipeline.invokeNext(org.apache.catalina.Request, org.apache.catalina.Response
Re: Struts Basic/Pooling DataSource Vs Poolman
Yes, but Iam sure it will be back. It is too good to be shelved. The current version (v2.1) works fine for me. Regards hemant - Original Message - From: Niall Pemberton [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Tuesday, April 02, 2002 7:56 AM Subject: RE: Struts Basic/Pooling DataSource Vs Poolman I haven't used poolman, but isn't the problem with it that it is no longer being developed? Niall -Original Message- From: hemant [mailto:[EMAIL PROTECTED]] Sent: 01 April 2002 23:12 To: struts Subject: Struts Basic/Pooling DataSource Vs Poolman I currently use poolman in my webapp. I was wondering if anyone got a chance to play with the classes in commons-dbcp.jar. How different are these from poolman?. I still dont think that Struts classes provide features such as resultset cache, periodic update of the cache with new data, query cache, Pool Management etc. Regards hemant -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Fw: Dynamic Bean Populate on Submit.
Vadim Petrenko, You da man... Many Thanks, will look into it. Right now Iam experimenting with 1.1b. Regards hemant - Original Message - From: Vadim Petrenko [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, April 02, 2002 8:25 AM Subject: Dynamic Bean Populate on Submit. Hi! There is such a feature as 'mapped properties'. So, you can use the following constructions: html:text property=table(name)/ // note () // name - name of a field of table table html:text property=table(lastname)/ etc in the form you only need to define: Map table = new HashMap(); public Object getTable(String key) { return table.get(key); } public void setTable(String key, Object value) { table.put(key, value); } In brief, you don't need to define setters and getters for every property as well as properties themselves. Just reflect your database table to a map (valueobject). And so on. Available as of 1.1.b1. Good luck. === Iam not aware of the enhancements in Struts 1.1b completely but would like to know if the following functionality exists either in Struts 1.1b or 1.0.2. Lets say, we get a collection of ValueObjects and populate the JSP by doing a vo.getXXX methods. Since Struts depends heavily on Introspection, Is it possible that vo.setXXX is called when someone enters a value and submits? This would make life a lot easier. (Pardon me if this question was already answered, I didnt get results for my combination of search-words ) comments please Regards pathangi r __ Do You Yahoo!? Yahoo! Tax Center - online filing with TurboTax http://http://taxes.yahoo.com/ _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Consistent ClassCastException in VisualAge 3.5.3 with Struts
Comrades, Here is the scenario. Environment: VA 3.5.3, Struts 1.0.2, Tomcat 4.0.1 1.Start Tomcat 2.Debug a JSP in the WebApp(Involves struts), some exception is thrown somewhere 3.Stop Tomcat Gracefully using StopTomcat's main() 4.Start Tomcat again 5.Hit JSP 6.The following Exception is thrown type Exception report message Internal Server Error description The server encountered an internal error (Internal Server Error) that prevented it from fulfilling this request. java.lang.ClassCastException java.lang.Throwable() java.lang.Exception() java.lang.RuntimeException() java.lang.ClassCastException() org.apache.struts.action.ActionForm org.apache.struts.action.ActionServlet.processActionForm(org.apache.struts.action.ActionMapping, javax.servlet.http.HttpServletRequest) org.apache.struts.action.ActionForm org.apache.struts.action.ActionServlet.processActionForm(org.apache.struts.action.ActionMapping, javax.servlet.http.HttpServletRequest) void org.apache.struts.action.ActionServlet.process(javax.servlet.http.HttpServletRequest, javax .. ... . ... 7.Delete Struts project from VA Workspace, Delete Struts packages from repository 8.Load Struts Again by importing jar from version 1.0.2 9.Start Tomcat 10.Hit JSP 11.Everything works Fine. Whats going on??? Why do I have to import ? This started very recently after I experimented with 1.1Beta. But before switching back to 1.0.2, I deleted the entire Beta Struts related Jars. I also got the latest Xerces. Please enlighten this ignorant soul. Thank You for your Time hemant
Re: Visual Age 3.5.3 +WTE
This happens generally when your webapp is not properly started or is in the process of starting.Check your web.xml and *.webapp files for any mistakes. regards hemant - Original Message - From: Singh, Sandeep [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Sent: Tuesday, April 02, 2002 3:19 PM Subject: Visual Age 3.5.3 +WTE getting Below error,Message is currently unavailable. Mailing kist archive dosent help.I will Apprecitae if Anybody can contribute Thanks Sandeep Error 503 An error has occured while processing request:http://localhost:8080/employeelist/ Message: Application is currently unavailable for service Target Servlet: null StackTrace: -- -- Root Error-1: Application is currently unavailable for service com.ibm.servlet.engine.webapp.ApplicationUnavailableException: Application is currently unavailable for service java.lang.Throwable(java.lang.String) java.lang.Exception(java.lang.String) javax.servlet.ServletException(java.lang.String) com.ibm.websphere.servlet.error.ServletErrorReport(java.lang.String) com.ibm.servlet.engine.webapp.WebAppErrorReport(java.lang.String) com.ibm.servlet.engine.webapp.ApplicationUnavailableException(com.ibm.servle t.engine.webapp.WebApp) void com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.handleWebAppDispatch(c om.ibm.servlet.engine.webapp.WebAppRequest, javax.servlet.http.HttpServletResponse, boolean) void com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.dispatch(javax.servlet .ServletRequest, javax.servlet.ServletResponse, boolean) void com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.forward(javax.servlet. ServletRequest, javax.servlet.ServletResponse) void com.ibm.servlet.engine.srt.WebAppInvoker.handleInvocationHook(java.lang.Obje ct) void com.ibm.servlet.engine.invocation.CachedInvocation.handleInvocation(java.lan g.Object) void com.ibm.servlet.engine.srp.ServletRequestProcessor.dispatchByURI(java.lang.S tring, com.ibm.servlet.engine.srp.ISRPConnection) void com.ibm.servlet.engine.oselistener.OSEListenerDispatcher.service(com.ibm.ser vlet.engine.oselistener.api.IOSEConnection) void com.ibm.servlet.engine.http_transport.HttpTransportHandler.handleConnection( java.net.Socket) void com.ibm.servlet.engine.http_transport.HttpTransportHandler.run() void java.lang.Thread.run() -Original Message- From: hemant [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 02, 2002 10:07 AM To: struts Subject: Consistent ClassCastException in VisualAge 3.5.3 with Struts Comrades, Here is the scenario. Environment: VA 3.5.3, Struts 1.0.2, Tomcat 4.0.1 1.Start Tomcat 2.Debug a JSP in the WebApp(Involves struts), some exception is thrown somewhere 3.Stop Tomcat Gracefully using StopTomcat's main() 4.Start Tomcat again 5.Hit JSP 6.The following Exception is thrown type Exception report message Internal Server Error description The server encountered an internal error (Internal Server Error) that prevented it from fulfilling this request. java.lang.ClassCastException java.lang.Throwable() java.lang.Exception() java.lang.RuntimeException() java.lang.ClassCastException() org.apache.struts.action.ActionForm org.apache.struts.action.ActionServlet.processActionForm(org.apache.struts.a ction.ActionMapping, javax.servlet.http.HttpServletRequest) org.apache.struts.action.ActionForm org.apache.struts.action.ActionServlet.processActionForm(org.apache.struts.a ction.ActionMapping, javax.servlet.http.HttpServletRequest) void org.apache.struts.action.ActionServlet.process(javax.servlet.http.HttpServle tRequest, javax .. ... . ... 7.Delete Struts project from VA Workspace, Delete Struts packages from repository 8.Load Struts Again by importing jar from version 1.0.2 9.Start Tomcat 10.Hit JSP 11.Everything works Fine. Whats going on??? Why do I have to import ? This started very recently after I experimented with 1.1Beta. But before switching back to 1.0.2, I deleted the entire Beta Struts related Jars. I also got the latest Xerces. Please enlighten this ignorant soul. Thank You for your Time hemant _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Struts 1.1Beta and Log4J, No appender Issue
Fellow Loggers, The problem still recurs. I tried to load my StartupManager Servlet which loads the Log4J configuration prior to ActionServlet load but in vain. I still get the following.. log4j: No appenders could be found for category (org.apache.commons.digester.Digester). log4j: Please initialize the log4j system properly The above error seems to be simple to handle but there is an internal mechanism that is trying to discover Log4J and is doing something with it even before I load Log4J (via StartupManager Servlet) myself. If all I need to do is to add an appender, which properties file is it looking for? and where is it looking for? (/classes)??. It definitely is not looking at my log4j.properties as I tried to add the appender there and it did not work. Another question, slightly on a tangent though, I get a Cannot find ActionMappings or ActionFormBeans collection while the same struts-config.xml works fine with Struts 1.0.2 Please Advise hemant - Original Message - From: hemant [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Thursday, March 28, 2002 2:09 PM Subject: Re: Struts 1.1Beta and Log4J, No appender Issue Marcelo Thanks, Will try to make sure that Log4J initializes prior to ActionServlet load. Earlier, I had a Logger class which had a Category instance initialized in a static block. Looks like my Logger was loaded prior to ActionServlet with 1.0.2. Now, I guess I have to write a startup servlet and load it prior to ActionServlet as you said. have a good weekend hemant public class Logger { static Category category = Category.getInstance(mpi); static { try { String pc = CommonConstants.LOG4JPATH; System.out.println(pc is + pc); if ((pc.trim().length() 0) (null != pc)) { Properties pp = new Properties(); URL url = pp.getClass().getResource(pc); PropertyConfigurator.configure(url); } else { BasicConfigurator.configure(); } } catch (Exception e) { System.err.println(Error in Configuration: + e); } } /// // Lots of methods here for debug(), info(), etc // } --- hemant wrote: The Log4J configuration loaded property when I used Struts 1.0.2. If it worked then, shouldn't it work now with struts 1.1beta? It worked with 1.0.2, but Struts did not use the commons-logging package then, so the log messages weren't printed through Log4j, which is the case now. It seems that you initialize the log4j configuration after the Struts' ActionServlet loads, so when the ActionServlet (and the Digester, and Beanutils, etc) try to log and log4j is not yet configured, you get that error. I have a servlet that loads some configuration for my application. I've set it up so that it loads before the Struts' ActionServlet, so that the log4j system is properly initialized when called. Try do do something similar. -- []'s Marcelo Vanzin Touch Tecnologia [EMAIL PROTECTED] Life is too short to drink cheap beer -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Struts 1.1Beta and Log4J, No appender Issue
Marcelo Thanks for your time, here is the servlet part of the web.xml you asked for.. Regards hemant ///web.xml start / web-app !--StartupManager-- servlet servlet-classorg.apache.struts.action.ActionServlet/servlet-class init-param param-nameLOG4J_CONFIG/param-name param-value/com/jny/operations/mplanning/mpi/properties/log4j.properties/ param-value /init-param load-on-startup1/load-on-startup /servlet servlet servlet-nameaction/servlet-name servlet-classorg.apache.struts.action.ActionServlet/servlet-class init-param param-namedebug/param-name param-value2/param-value /init-param init-param param-nameconfig/param-name param-value/WEB-INF/struts-config.xml/param-value /init-param init-param param-nameapplication/param-name param-valuecom.jny.operations.mplanning.mpi.properties.ApplicationResource s/param-value /init-param init-param param-namedetail/param-name param-value2/param-value /init-param init-param param-namevalidate/param-name param-valuetrue/param-value /init-param load-on-startup1/load-on-startup /servlet /.. more web.xml details. web.xml end The following is my init method... init() start/// public void init() { // insert code to initialize the servlet here // Testing Log4J... try { String configFile = getServletConfig().getInitParameter(LOG4J_CONFIG); Logger logger = new Logger(configFile); } catch (Exception e) { System.out.println(The exception is + e.toString()); } } init() end/// //Logger class start public class Logger { static Category cat = Category.getInstance(mpi); public Logger(String log4jpath) { try { if ((null != log4jpath) (log4jpath.trim().length() 0) ) { Properties pp = new Properties(); URL url = pp.getClass().getResource(log4jpath); PropertyConfigurator.configure(url); } else { BasicConfigurator.configure(); } } catch (Exception e) { System.err.println(Error in Configuration: + e); } /// // Lots of methods here for debug(), info(), etc for example... // public static void info(String message) // { // cat.info(message); // } // } } /Logger End/ - Original Message - From: Marcelo Vanzin [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Monday, April 01, 2002 1:32 PM Subject: Re: Struts 1.1Beta and Log4J, No appender Issue Could you post the part of your web.xml where the servlets are declared, and the init() method of your StartupManager servlet, so I could take a look at them? I have the same setup as you seem to have (a servlet loading the Log4j configuration prior to the ActionServlet loading) and I never get this error. hemant wrote: I tried to load my StartupManager Servlet which loads the Log4J configuration prior to ActionServlet load but in vain. I still get the following.. log4j: No appenders could be found for category (org.apache.commons.digester.Digester). log4j: Please initialize the log4j system properly -- []'s Marcelo Vanzin Touch Tecnologia [EMAIL PROTECTED] Life is too short to drink cheap beer -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Struts 1.1Beta and Log4J, Minor Correction
Startup Manager in my web.xml is as follows... (earlier post had the wrong servlet-class ) !--StartupManager-- servlet servlet-classcom.jny.operations.mplanning.mpi.service.StartupManager/serv let-class init-param param-nameLOG4J_CONFIG/param-name param-value/com/jny/operations/mplanning/mpi/properties/log4j.properties/ param-value /init-param load-on-startup1/load-on-startup /servlet _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Dynamic Bean Populate on Submit.
Iam not aware of the enhancements in Struts 1.1b completely but would like to know if the following functionality exists either in Struts 1.1b or 1.0.2. Lets say, we get a collection of ValueObjects and populate the JSP by doing a vo.getXXX methods. Since Struts depends heavily on Introspection, Is it possible that vo.setXXX is called when someone enters a value and submits? This would make life a lot easier. (Pardon me if this question was already answered, I didnt get results for my combination of search-words ) comments please Regards pathangi r
Struts Basic/Pooling DataSource Vs Poolman
I currently use poolman in my webapp. I was wondering if anyone got a chance to play with the classes in commons-dbcp.jar. How different are these from poolman?. I still dont think that Struts classes provide features such as resultset cache, periodic update of the cache with new data, query cache, Pool Management etc. Regards hemant
Re: Struts 1.1Beta and Log4J, No appender Issue
Thanks Marcelo I will try that at the end of the day and will post the result. Switching back and forth between 1.0.2 and 1.1b is not as smooth as it seems with VA 3.5.3 and Tomcat 4.x. Regards hemant - Original Message - From: Marcelo Vanzin [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Monday, April 01, 2002 3:30 PM Subject: Re: Struts 1.1Beta and Log4J, No appender Issue hemant wrote: here is the servlet part of the web.xml you asked for.. Modify the load-on-startup value so that the value attributed to your servlet is smaller than the one given to the ActionServlet. -- []'s Marcelo Vanzin Touch Tecnologia [EMAIL PROTECTED] Life is too short to drink cheap beer -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Struts 1.1Beta and Log4J, No appender Issue
Fellow Strutters and Loggers, I have a webapp using Struts1.0.2 and it works fine. Iam currently using Tomcat 4.0.2 and Log4J 1.1.3. I read about the enhancements in 1.1beta and decided to use it my webapp. I suddenly get the following... log4j: No appenders could be found for category (org.apache.commons.digester.Digester). log4j: Please initialize the log4j system properly I removed 1.1beta and rollbacked to my good ol 1.0.2 and everything works fine. Why is Struts 1.1beta messing with my Log4J configuration? (or am I missing something?). Please advise. Thanks for your time hemant
Re: Struts 1.1Beta and Log4J, No appender Issue
Marcelo , Thanks for your response, The Log4J configuration loaded property when I used Struts 1.0.2. If it worked then, shouldn't it work now with struts 1.1beta? Yes, I did look at the Logging class for Log4J, Log4JCategoryLog. but, it should not interfere with my Log4J settings unless I specifically want it to. Regards hemant Original Message - From: Marcelo Vanzin [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Thursday, March 28, 2002 11:48 AM Subject: Re: Struts 1.1Beta and Log4J, No appender Issue hemant wrote: log4j: No appenders could be found for category (org.apache.commons.digester.Digester). log4j: Please initialize the log4j system properly Struts 1.1b is using the commons-logging package for logging, and in your case it is falling back to the Log4j system. It seems that your Log4j configuration is not being loaded before the ActionServlet is loaded, so you get this configuration error from Log4j. Try doing the Log4j initialization before the ActionServlet initialization. -- []'s Marcelo Vanzin Touch Tecnologia [EMAIL PROTECTED] Life is too short to drink cheap beer -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Long Live Poolman
Yep, Poolman rocks, Its insanely easy to use and setup. Iam currently using it in my webapp and it works like a charm. Iam curious to know if anyone has setup poolman as a Server(ala JDBC datasources on WebSphere) and was able to do a JNDI lookup on its datasources. How did you get the InitialContext? . Thanks for your time hemant - Original Message - From: Martin Samm [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Friday, March 22, 2002 7:08 AM Subject: Re: HOWTO: Lessons learned from using Struts, Tomcat and Oracle alternatively, use poolman, which although 'dead' can still be had from Sourceforge. i'm also using Struts / Tomcat (3.2 however) and Oracle (all on *nix). I haven't tried Tomcat / Struts pooling, but opted for poolman instead and found it easy to setup On Friday 22 Mar 2002 12:04 pm, you wrote: Original Message Subject: Lessons learned from using Struts, Tomcat and Oracle Date: Thu, 21 Mar 2002 19:43:22 -0800 (PST) From: Walter S. So [EMAIL PROTECTED] Hi Ted, I just want to share this information in case someone else also goes through the same problems I did. I was able to come up with this solution after spending an entire afternoon searching through the net and archives, so if it saves people a few hours of debugging, I'll be happy. I am not sure how to categorize it or even which mailing list to send this, whether it should go to Tomcat, Struts, or Tyrex, so I decided to send it to you since you are active in Jakarta. My goal was to set up a Connection Pooled DataSource using Oracle running Struts on Tomcat. I use Tomcat 4.0.3, Struts 1.1-b1-lib, Oracle 8.1.7 classes12.zip running on Windows 98, but it should work well on Solaris/Linux. Initially, I set up the Oracle JDBC drivers under my webapp and used the datasource in struts-config.xml to access Oracle. My application consistently hung after the pool was exhausted. (For example, if I set the minCount and maxCount to 10, my webapp would hang after 10 requests) The problem of Oracle connections not being returned properly by the Struts pool was well documented in the mailing list, so I switched the datasource from struts-config.xml to tomcat's server.xml. I followed the instructions in the Tomcat jndi-resources-howto and copied the Oracle drivers to common/lib after renaming the classes12.zip to classes12.jar as suggested by the mailing list. I found my webapp wasn't running properly as the servlet would stop executing after context.lookup(). This bothered me because Tomcat was not throwing any exceptions. After some more research, I changed the debug level in server.xml from 0 to 99. This time, the log generated showed a java.lang.ClassCastException: tyrex.jdbc.xa.EnabledDataSource when the lookup() is called. A post in the tomcat-dev mailing list provided the answer: There was a conflict in the jars of tomcat and the webapp. True enough, I found a jdbc2_0-stdext.jar (83KB) that came in tomcat\common\lib, and a jdbc2_0-stdext.jar (7KB) that i had unpacked from Struts to my web-app. After deleting the 7KB jar, the lookup() executed properly. To sum up, when using a DataSource in Tomcat and Struts in the webapp, make sure to remove the extraneous jdbc2_0-stdext.jar that comes with the Struts Lib. :) Hope that helps, Walter __ Do You Yahoo!? Yahoo! Movies - coverage of the 74th Academy Awards® http://movies.yahoo.com/ -- Martin Samm [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Struts 1.1Beta and Log4J, No appender Issue
Marcelo Thanks, Will try to make sure that Log4J initializes prior to ActionServlet load. Earlier, I had a Logger class which had a Category instance initialized in a static block. Looks like my Logger was loaded prior to ActionServlet with 1.0.2. Now, I guess I have to write a startup servlet and load it prior to ActionServlet as you said. have a good weekend hemant public class Logger { static Category category = Category.getInstance(mpi); static { try { String pc = CommonConstants.LOG4JPATH; System.out.println(pc is + pc); if ((pc.trim().length() 0) (null != pc)) { Properties pp = new Properties(); URL url = pp.getClass().getResource(pc); PropertyConfigurator.configure(url); } else { BasicConfigurator.configure(); } } catch (Exception e) { System.err.println(Error in Configuration: + e); } } /// // Lots of methods here for debug(), info(), etc // } --- hemant wrote: The Log4J configuration loaded property when I used Struts 1.0.2. If it worked then, shouldn't it work now with struts 1.1beta? It worked with 1.0.2, but Struts did not use the commons-logging package then, so the log messages weren't printed through Log4j, which is the case now. It seems that you initialize the log4j configuration after the Struts' ActionServlet loads, so when the ActionServlet (and the Digester, and Beanutils, etc) try to log and log4j is not yet configured, you get that error. I have a servlet that loads some configuration for my application. I've set it up so that it loads before the Struts' ActionServlet, so that the log4j system is properly initialized when called. Try do do something similar. -- []'s Marcelo Vanzin Touch Tecnologia [EMAIL PROTECTED] Life is too short to drink cheap beer -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
- Iterate tag with multiple id's? -
Here is a scenario. (Struts 1.0.2.) I get a collection of objects and each object holds references to 2 more objects, which are essentially beans. I want to iterate, and get data from both these beans at once but the iterate tag allows only one bean id declaration per iterate as shown below (unless Iam wrong and should be thrown into hell for such an assumption) logic:iterate collection=ldmbean id=crapValueObj // /logic:iterate I wish there was a way to say logic:iterate collection=ldmbean id=crapValueObj, moreCrapValueObj // get data from both crapValueObj and moreCrapValueObj /logic:iterate Thanks 4 your time hemant
JNDI Lookup, Websphere Vs Tomcat
Here is how we proceed for a DataSource JNDI Lookup with WebSphere //- ... java.util.Properties parms = new java.util.Properties(); parms.setProperty(Context.INITIAL_CONTEXT_FACTORY, com.ibm.ejs.ns.jndi.CNInitialContextFactory); // Create the Initial Naming Context javax.naming.Context ctx = new javax.naming.InitialContext(parms); // Lookup through the naming service to retrieve a DataSource object javax.sql.DataSource ds = (javax.sql.DataSource)ctx.lookup(jdbc/SampleDB); // Obtain a Connection from the DataSource java.sql.Connection conn = ds.getConnection(); //- Datasources could thus be parked on WebSphere and accessed by clients remotely. 1 Now, Can we park Datasources on Tomcat in a similar manner? Does Tomcat provide DataSources to WebApps only?. 2 If we can create DataSources on Tomcat to be remotely available (clients could be EJB's on another server ) How do we go about doing that? Thank You for your time Regards hemant
Re: Loading pdf files using jsp
I have used iText successfully in my previous assignment. It works extremely well. If one wants 2 go bleeding edge, they can have a look at FOP from apache or WH2FO by Fabio Gianetti (works for simple word -- pdf conversion. If your word doc has tables inside of tables, this tool blows up.) FOP was a pain but worth learning. regards hemant - Original Message - From: Galbreath, Mark [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Sent: Tuesday, February 12, 2002 12:11 PM Subject: RE: Loading pdf files using jsp Adobe used to have a Java library but there were so many issues with it (and Adobe did not support it) that they removed it from their downloads. http://support.adobe.com/devsup/devsup.nsf/docs/51759.htm I would suggest a Google search, however, because I know many people have asked this question (including me) over the years and someone is bound to have written one by now. Mark -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 12, 2002 10:04 AM To: Struts Users Mailing List Subject: Re: Loading pdf files using jsp Maybe you meant that you wanted to WRITE a PDF file from JSP? Loading a PDF file from a JSP is no different than loading any other web page from JSP. If the client browser has the Adobe Acrobat plugin installed, any hyperlink to PDF files will spawn the PDF file in the requesting browser. You may need to ensure that your server is configured to accepct the PDF mime-type, but other than that, it's a simple deal. To write PDF's dynamically, there is a Java library that you can obtain that is free. You'll have to dig for it though, cause I simply cannot remember the name or where to get it. There are also numerous commercial libraries that assist with writing dynamic PDF's on the server. - Cody [EMAIL PROTECTED] on 02/12/2002 04:27:32 AM Please respond to Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] cc: Subject: Loading pdf files using jsp Hello, I want to load a PDF file from JSP. Is it possible. Regards Arun -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
html:select, html:options related query
Hello, I get a javax.servlet.jsp.JspException with the description being No getter method available for property selectSeasons for bean under name org.apache.struts.taglib.html.BEAN I have the following questions 1) Why is it looking at org.apache.struts.taglib.html.BEAN in the first place? 2) I have read many queries, I'm still not clear if a form-bean is mandatory for an action. I do not think it is mandatory but when I tried an action without an action form-bean it gave me an exception which is a totally different post in itself. As soon as I added a form-bean it went away. The rangesActionForm in my struts-config.xml is one such bean. Thanks in Advance, Regards hemant ___ Environment: Tomcat 3.2.1/Struts 1.0/JBuilder 5.0/ Here is a snippet from my jsp: -- html:form action=ranges.do bean:define id=ldmbean name = ldmservice property=seasons type=java.util.Collection/ html:select property=seasons html:options collection=seasons property=seasons labelProperty=seasonDescription/ /html:select table tr TD align=center rowspan=2 width=67html:submit property=submit value=Submit//TD TD align=center rowspan=2 width=123html:reset value=Reset//TD /tr /table /html:form - My struts-config.xml is as shown below -- struts-config !-- == Form Bean Definitions === -- form-beans !-- Login form bean -- form-bean name=loginForm type=com.jny.operations.mplanning.mpi.action.actionform.LoginForm/ !-- Main Menu form bean -- form-bean name=mainMenuForm type=com.jny.operations.mplanning.mpi.action.actionform.MainMenuForm/ form-bean name=rangesActionForm type=com.jny.operations.mplanning.mpi.action.actionform.RangesActionForm/ /form-beans !-- == Global Forward Definitions == -- global-forwards forward name=mainmenu path=/mainmenu.jsp/ forward name=login path=/login.jsp/ forward name=chooseBP path=/choosebp.jsp/ forward name=createbuyplan path=/createbuyplan.jsp/ forward name=administrationpath=/administration.jsp/ forward name=rangespath=/ranges.jsp/ /global-forwards !-- == Action Mapping Definitions == -- action-mappings !-- Login Mappings -- actionpath=/login type=com.jny.operations.mplanning.mpi.action.Login name=loginForm input=/login.jsp /action !-- Main Menu Mappings -- actionpath=/mainmenu type=com.jny.operations.mplanning.mpi.action.MainMenu name=mainMenuForm input=/mainmenu.jsp /action action path=/createbuyplan type=com.jny.operations.mplanning.mpi.action.CreateBuyPlanAction validate=false /action action path=/ranges name = rangesActionForm type=com.jny.operations.mplanning.mpi.action.RetrieveRanges validate=false /action /action-mappings /struts-config -- Stack Trace: --- javax.servlet.ServletException: No getter method available for property selectSeasons for bean under name org.apache.struts.taglib.html.BEAN at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:459) at _0002fmainmenu_0002ejspmainmenu_jsp_10._jspService(_0002fmainmenu_0002ejspmainmenu_jsp_10.java:436) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:177) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:318) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:391) ... ... ...