help in my ServletException
guys help me out what cause this error? I have all my class compiled so i don't know what to check. help me out... thanks.. [ServletException in:../tm/edit-busempinfo-body.jsp] Exception creating bean of class com.fltic.crm.form.BusEmpInfoForm: java.lang.ClassCastException'
Re: [OT] suggestion for getting properties
2003 3$B7n(B 17 $B7nMKF|(B 15:23$B!"(BDan Allen $B$5$s$O=q$-$^$7$?(B: (B I have a model class for my company which has numbers. I would like (B to create a method like (B (B getNumbers() (B (B which returns all of the different phone numbers that are in the (B database as a collection. However, when I get them, I need to know (B which ones they are for display purposes (just a list of numbers (B won't do much good or else you end up calling a fax machine). I (B thought of using a HashMap like (B (B HashMap numbers = new HashMap(); (B numbers.put("phone", getPhone()); (B numbers.put("fax", getPhone()); (B (BI don't think this would give the result you are looking for. (BA map will map a key to a value, and so in the above example, no mattery how (Bmany numbers you add to the map, there will only be 2 numbers in the end: the (Bone mapped to "phone" and the one mapped to "fax". (B (B2 things come to mind depending on what you want to accomplish: (Bput 2 methods in your model: (B (Bpublic Colleciton getPhoneNumbers() { (B... (B} (B (Bpublic Collection getFaxNumbers() { (B (B} (B (B (BOr, if you need to get all of the numbers in one go, try making a business (Bdata object: (B (Bpublic class TelephoneNumberBDO { (B (B// This kinda sucks. you'd probably do better with a typesafe enumeration (Bpublic static String PHONE_TYPE_VOICE = "voice"; (Bpublic static String PHONE_TYPE_FAX = "fax"; (B (Bprivate String phoneNumber = null; (Bpublic String getPhoneNumber() { (Breturn phoneNumber; (B} (Bpublic void setPhoneNumber(String phoneNumber) { (Bthis.phoneNumber = phoneNumber; (B} (B (Bprivate string type = null; (Bpublic String getType() { (Breturn type; (B} (Bpublic void setType(String type) { (Bthis.type = type; (B} (B (BThen get your data from the database, build your business data objects, and (Bput them into a collection (LinkedList will do fine for this) that will be (Breturned by getNumbers(). (B (BNow you can iterate over TelephoneNumberBDOs in your jsp and pull out type and (BphoneNumber. (B (B (B (B etc. (B (B but then I realized that HashMaps screw up the order. I need to (B keep the order that I place them in the Hash so I can do (B (B c:forEach items="${company.numbers}" var="number" (B bean:message key="${number.key}"/: c:out value="${number.value}"/ (B /c:forEach (B (B I tried to implement a FifoMap but failed because I didn't know how (B to subclass Map.Entry (B (BI don't think you'd want to subclass Map.Entry. This only holds a key-value (Bpair for when you view the map as a collection. (B (B (B- (BTo unsubscribe, e-mail: [EMAIL PROTECTED] (BFor additional commands, e-mail: [EMAIL PROTECTED]
RE: [Q] Accessing struts-tiles attribute in a bean?
Ted (Husted) has created a 'tiles for Velocity'. He did qualify that by saying it was not as fully-featured as Cedric's - as I think original tiles took a good while to develop - but Ted's was designed in the shower (or bath - I don't recall) and then developed quickly afterwards. However, that said - I'd be really interested in taking a look at that code - maybe his new book could be 'Struts on Speed' (not the author as he'd never get on those stilts - but Struts with Velocity). Ted - what's the chance of posting your views (or pointing us to a link) on how you're using Velocity with Struts. I did have another look at Velocity after your presentation but I still don't think I can do without tiles - even with the promise of 'cross platform' Velocity.NET/NVelocity it doesn't do it for me? H. -Original Message- From: Scott Barr [mailto:[EMAIL PROTECTED] Sent: 17 March 2003 05:02 To: 'Struts Users Mailing List' Subject: RE: [Q] Accessing struts-tiles attribute in a bean? Yeah, I'm exacly the same with Velocity. It is clean as a whistle, but I've gotta have my Tiles :) Scott Barr www.exergonic.com.au On Mon, 2003-03-17 at 04:49, Hue Holleran wrote: Not sure of 'best' way to this but I think this may work: tiles:useAttribute name=booboo classname=java.lang.String / ... bean:message key=%=booboo% / Yes, I agree tiles is great - been looking at Velocity again just recently but I just don't think I could live without tiles now. There always seems to be more to discover with tiles and so many ways it can be extended to suit new requirements. H. -Original Message- From: Jeff Smith [mailto:[EMAIL PROTECTED] Sent: 16 March 2003 00:48 To: Struts Users Mailing List Subject: [Q] Accessing struts-tiles attribute in a bean? James and Dan turned me on to tiles. I love them - as I love any tool that simplifies what I was already doing via brute force. :-) I feel I'm on the verge of a new level of understanding, but sadly, haven't quite crossed over. In my tiles structure, I want to have my pages get their titles from the application resource. So I dutifully created a titleKey attribute in my tile-description.xml, like so: definition name=StandardLayout path=/Jsps/Templates/TemplateMain.jsp put name=titleKey value=some.resource.key/ put name=header value=/Jsps/Tiles/TileHeader.jsp/ put name=content value=/Jsps/Tiles/TileWelcome.jsp/ put name=menu value=/Jsps/Tiles/TileMenu.jsp/ /definition In my TemplateMain.jsp, I want to take that titleKey and look up the proper title string from my application resource file. But I can't figure out how to access the value of the titleKey attribute into the key field of the bean:message tag. Is this possible? One day a light will go on in my head, and I won't feel so confused by all this. :-) Jefficus - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Strutsaction on different WebApps
Maybe I didn't explain my problem good enough... The name of my application is WebApp. This name is similar for both the production server and the test server. The servername (if you understand what I mean by that term) on the testserver is www.mycomp.com/test, and the servername on the productionserver is www.mycomp.com. You suggested to deploy the test-application under a different name (i.e. test-WebApp), but the problem is that I can't have the same servername for the test- and production server. See? It's ok to have different application-names, but the servername have to be different, because there are in fact two different servers on two different machines. It seems like Struts thinks the servername is www.mycomp.com even if I'm working on the testserver with the servername www.mycomp.com/test. Why is this a problem in Struts? I hope this explanation was clear to you... I appreciate any response on this problem :-) Kjellaug - Original Message - From: James Mitchell [EMAIL PROTECTED] To: Kjellaug Johansen [EMAIL PROTECTED] Cc: Struts Users Mailing List [EMAIL PROTECTED] Sent: Friday, March 14, 2003 4:14 PM Subject: Re: Strutsaction on different WebApps Sorry that no one helped you, but let's take this back to the list. How are you planning to do this? What is the name of your application? test or WebApp Are you familiar with Request Path Elements? You should read the servlet spec (section 4.4). That will give you a good understanding of why the approach you've described is giving the results you didn't expect. My only suggestion to you is to deploy your WebApp under a different name rather that trying to nest it under some directory. I wouldn't recommend running your test server as your production box, but if you have no choice, try naming your test application as test-WebApp and deploy it right beside WebApp. That would give you this: www.mycomp.com/WebApp www.mycomp.com/test-WebApp ...I think you'll start seeing the behavior you expect. -- James Mitchell Software Developer/Struts Evangelist http://struts.sourceforge.net/struts-atlanta/ - Original Message - From: Kjellaug Johansen [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, March 14, 2003 5:39 AM Subject: Strutsaction on different WebApps I've posted this on struts-user mail archive, but there haven't been any response, so I hope you could help me! I hope you have some time to look at my problem. Thanks! :-) I have two servers running webapps, one for production: www.mycomp.com/WebApp and one for testing: www.mycomp.com/test/WebApp When I work on the production server there are no problems, but when I work on the test-server and try to call a Struts-action (i.e. www.mycomp.com/test/WebApp/user/saveUser.do), I'm getting redirected to the production-server. The 'test' part in the URL for the test-server is ignored and I'm getting redirected to www.mycomp.com/WebApp/user/saveUser.do. The struts-config on the testserver looks like this: action path=/user/saveUser type=com.mycomp.web.user.SaveUserAction name=user scope=request input=/jsp/user/editUser.jsp /action The action call in the jsp file on the testserver looks like this: ... action = /user/saveUser.do My questions are: Doesn't Struts manage an extra level (test) between the serverroot (www.mycomp.com) and the webapp name (WebApp)? Are there any config-settings I can do to solve this? Kjellaug. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
struts with weblogic
Hi, Has some body tried struts 1.1 with weblogic 7.0 ? I would appreciate if you can suggest me configuration on weblogic. thanks Rajeev - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Getting the MessageResource Object in the FormBean
Hello All, I need to read the MessageResource object in my From class. How can I do it? Alok Garg [EMAIL PROTECTED] Time is the most valuable thing a man can spend.
[Q] Scaffolding question in relation to multiple possible forwards
There's a dispatch method on the ProcessResult that you can use for that. In this case, you would set it to age70. The ProcessAction woudl then look for an age70 ActionForward. The idea is that the concept of success, failure, age70, and any other of these tokens belongs to the business layer, and Struts inherits them. This is a great example since the idea of doing one thing or another because of an arbitrary age group is what business logic is all about. The business logic says age70. The presentation logic maps that to /pages/age70.jsp. In other words, the business controller (Process*) says jump and the presentation controller (Struts) responds with /how/high.jsp. HTH, Ted. -- Ted Husted, Struts in Action http://husted.com/struts/book.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Real dynamic properties
Hello, is there a way to configure the properties of a DynaActionForm really dynamically? I mean not to define them in the struts-config.xml but through java code? Thanks in advance, Spyros Halkidis
RE: [Q] Accessing struts-tiles attribute in a bean?
Hi I've been trying to get to grips with Tiles, can anyone point me to some resources, there seems to be a lack of information available on them. Thanks Kola -Original Message- From: Hue Holleran [mailto:[EMAIL PROTECTED] Sent: 17 March 2003 08:16 To: 'Struts Users Mailing List'; [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: RE: [Q] Accessing struts-tiles attribute in a bean? Ted (Husted) has created a 'tiles for Velocity'. He did qualify that by saying it was not as fully-featured as Cedric's - as I think original tiles took a good while to develop - but Ted's was designed in the shower (or bath - I don't recall) and then developed quickly afterwards. However, that said - I'd be really interested in taking a look at that code - maybe his new book could be 'Struts on Speed' (not the author as he'd never get on those stilts - but Struts with Velocity). Ted - what's the chance of posting your views (or pointing us to a link) on how you're using Velocity with Struts. I did have another look at Velocity after your presentation but I still don't think I can do without tiles - even with the promise of 'cross platform' Velocity.NET/NVelocity it doesn't do it for me? H. -Original Message- From: Scott Barr [mailto:[EMAIL PROTECTED] Sent: 17 March 2003 05:02 To: 'Struts Users Mailing List' Subject: RE: [Q] Accessing struts-tiles attribute in a bean? Yeah, I'm exacly the same with Velocity. It is clean as a whistle, but I've gotta have my Tiles :) Scott Barr www.exergonic.com.au On Mon, 2003-03-17 at 04:49, Hue Holleran wrote: Not sure of 'best' way to this but I think this may work: tiles:useAttribute name=booboo classname=java.lang.String / ... bean:message key=%=booboo% / Yes, I agree tiles is great - been looking at Velocity again just recently but I just don't think I could live without tiles now. There always seems to be more to discover with tiles and so many ways it can be extended to suit new requirements. H. -Original Message- From: Jeff Smith [mailto:[EMAIL PROTECTED] Sent: 16 March 2003 00:48 To: Struts Users Mailing List Subject: [Q] Accessing struts-tiles attribute in a bean? James and Dan turned me on to tiles. I love them - as I love any tool that simplifies what I was already doing via brute force. :-) I feel I'm on the verge of a new level of understanding, but sadly, haven't quite crossed over. In my tiles structure, I want to have my pages get their titles from the application resource. So I dutifully created a titleKey attribute in my tile-description.xml, like so: definition name=StandardLayout path=/Jsps/Templates/TemplateMain.jsp put name=titleKey value=some.resource.key/ put name=header value=/Jsps/Tiles/TileHeader.jsp/ put name=content value=/Jsps/Tiles/TileWelcome.jsp/ put name=menu value=/Jsps/Tiles/TileMenu.jsp/ /definition In my TemplateMain.jsp, I want to take that titleKey and look up the proper title string from my application resource file. But I can't figure out how to access the value of the titleKey attribute into the key field of the bean:message tag. Is this possible? One day a light will go on in my head, and I won't feel so confused by all this. :-) Jefficus - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Q] Accessing struts-tiles attribute in a bean?
Hue Holleran wrote: Ted - what's the chance of posting your views (or pointing us to a link) on how you're using Velocity with Struts. I did have another look at Velocity after your presentation but I still don't think I can do without tiles - even with the promise of 'cross platform' Velocity.NET/NVelocity it doesn't do it for me? I should probably do a how-to, but here's a clip from a Tiles Support thread on the Velocity User list: = Mark de Reeper wrote: #parse(/WEB-INF/templates/vm/htmlheader.vm) table width=100% border=0 tr td#if($header)#parse($header)#end/td /tr tr td#if($body)#parse($body)#end/td /tr tr td#if($footer)#parse($footer)#end/td /tr /table #parse(/WEB-INF/templates/vm/htmlfooter.vm) Then define a template to set the layout and the various bits, this is what is loaded as the main template to parse: #set ($body = /WEB-INF/templates/vm/templatebody.vm) #set ($footer = /WEB-INF/templates/vm/templatefooter.vm) #set ($header = /WEB-INF/templates/vm/templateheader.vm) #parse(/WEB-INF/templates/layouts/layoutHBF.vm) Ted Husted wrote: This is just how the original Struts Template library worked. (Great minds and all that.) You defined a second file to administer the template. This works well enough but it tends to generate a lot of meta-templates that are just used to call other templates. As Slavik pointed out, Tiles extended the template library so that you could express the meta-templates in XML. Instead of forwarding to the glockenspiel.vm template, you can foward to make a reference to say /vm/Glockenspiel and Struts will automatically look for a vmGlockenspiel element, do whatever sets you need, and the forward to the layout. A very neat aspect of Tiles, that we need to adopt for the other Struts configurations, is that one element can extend another. So if you just needed to replace the title on a page, you can extend one element and just override that one set. This makes a *huge* difference in maintenance when you pass the thirty page mark. Until one of us gets around to writing a Tiles tool, I've prototyped what you can do in the Struts config. I've a ViewAction that does the setting. You create the variables to set as Struts ActionForwards and pass their names to ViewAction as ActionMapping parameter. So I have something like this to describe a page: action path=/vm/main/permit/View type=us_ok_deq_wqdata.http.ViewAction validate=false name=permit_select_id parameter=vmTitle,vmChoice,vmMenu,vmBody,vmAction,vmButtonBar forward name=vmTitle path=Permit Detail / forward name=vmChoice path=View / forward name=vmMenu path=/cpu/menu/main.vm / forward name=vmBody path=/cpu/permit/view.vm / forward name=vmAction redirect=false path=/Main / forward name=vmButtonBar path=/cpu/permit/viewMain.vm / /action To render the same page but with a different button bar, I'd just change that forward to include some other template instead. Besides URI's for parse statements, you can also pass any variable you need to create. For example, vmChoice tells the menu which item we are on, so it can dim that one (and leave the rest linked). While we can't extend struts-config elements (yet), the ActionForwards do have a local and global scope. So you can do things like create a global default forward and let that pass through when it doesn't need to be changed. This is done for the Layout. There's a default vmLayout forward which can be overridden by an element if you need to use a different layout. This works fine inside of Struts and will work even better when we get the Struts config to support extended elements like the Tiles config. But, it seems to me that it's something that could also be done outside of Struts and made available to anyone using Velocity. For programmers, this sort of thing makes the templates feel object-orientated. You can define a base element and then extend it to say what changes. For designers, they can use Velocity templates seem more like fill-in-the-blank Dreamweaver templates. A GUI, like Struts Console, can even save you from mucking about with XML. -Ted. = For more see, http://www.mail-archive.com/[EMAIL PROTECTED]/msg09304.html There's a copy of my ViewAction at http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/wqdata/src/java/shared/org_apache_struts_scaffold/ViewAction.java -- Ted Husted, Struts in Action http://husted.com/struts/book.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: help in my ServletException
That is a ClassCastException, which occurs when you try to cast a object to a class or interface that it doesn't extend or implement. We would need more details to help you determine just what cast is failing. But, I suspect that your JSP is expecting to find a BusEmpInfoForm but is finding something else (an object that cannot be cast to the BusEmpInfoForm type) stored in the request or session under some bean name like busEmpInfoForm. If that doesn't clear this up, post the details of what happens (relevant mapping from struts-config.xml, what your Action class does, portion of the JSP it forwards to that causes the failure). -Max - Original Message - From: Richard Raquepo [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Monday, March 17, 2003 12:13 AM Subject: help in my ServletException guys help me out what cause this error? I have all my class compiled so i don't know what to check. help me out... thanks.. [ServletException in:../tm/edit-busempinfo-body.jsp] Exception creating bean of class com.fltic.crm.form.BusEmpInfoForm: java.lang.ClassCastException' - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [Q] Accessing struts-tiles attribute in a bean?
tiles-documentation.war http://nagoya.apache.org/eyebrowse/[EMAIL PROTECTED] he.orgmsgNo=64863 -Original Message- From: Kola Oyedeji [mailto:[EMAIL PROTECTED] Sent: 17 March 2003 09:31 To: 'Struts Users Mailing List' Subject: RE: [Q] Accessing struts-tiles attribute in a bean? Hi I've been trying to get to grips with Tiles, can anyone point me to some resources, there seems to be a lack of information available on them. Thanks Kola -Original Message- From: Hue Holleran [mailto:[EMAIL PROTECTED] Sent: 17 March 2003 08:16 To: 'Struts Users Mailing List'; [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: RE: [Q] Accessing struts-tiles attribute in a bean? Ted (Husted) has created a 'tiles for Velocity'. He did qualify that by saying it was not as fully-featured as Cedric's - as I think original tiles took a good while to develop - but Ted's was designed in the shower (or bath - I don't recall) and then developed quickly afterwards. However, that said - I'd be really interested in taking a look at that code - maybe his new book could be 'Struts on Speed' (not the author as he'd never get on those stilts - but Struts with Velocity). Ted - what's the chance of posting your views (or pointing us to a link) on how you're using Velocity with Struts. I did have another look at Velocity after your presentation but I still don't think I can do without tiles - even with the promise of 'cross platform' Velocity.NET/NVelocity it doesn't do it for me? H. -Original Message- From: Scott Barr [mailto:[EMAIL PROTECTED] Sent: 17 March 2003 05:02 To: 'Struts Users Mailing List' Subject: RE: [Q] Accessing struts-tiles attribute in a bean? Yeah, I'm exacly the same with Velocity. It is clean as a whistle, but I've gotta have my Tiles :) Scott Barr www.exergonic.com.au On Mon, 2003-03-17 at 04:49, Hue Holleran wrote: Not sure of 'best' way to this but I think this may work: tiles:useAttribute name=booboo classname=java.lang.String / ... bean:message key=%=booboo% / Yes, I agree tiles is great - been looking at Velocity again just recently but I just don't think I could live without tiles now. There always seems to be more to discover with tiles and so many ways it can be extended to suit new requirements. H. -Original Message- From: Jeff Smith [mailto:[EMAIL PROTECTED] Sent: 16 March 2003 00:48 To: Struts Users Mailing List Subject: [Q] Accessing struts-tiles attribute in a bean? James and Dan turned me on to tiles. I love them - as I love any tool that simplifies what I was already doing via brute force. :-) I feel I'm on the verge of a new level of understanding, but sadly, haven't quite crossed over. In my tiles structure, I want to have my pages get their titles from the application resource. So I dutifully created a titleKey attribute in my tile-description.xml, like so: definition name=StandardLayout path=/Jsps/Templates/TemplateMain.jsp put name=titleKey value=some.resource.key/ put name=header value=/Jsps/Tiles/TileHeader.jsp/ put name=content value=/Jsps/Tiles/TileWelcome.jsp/ put name=menu value=/Jsps/Tiles/TileMenu.jsp/ /definition In my TemplateMain.jsp, I want to take that titleKey and look up the proper title string from my application resource file. But I can't figure out how to access the value of the titleKey attribute into the key field of the bean:message tag. Is this possible? One day a light will go on in my head, and I won't feel so confused by all this. :-) Jefficus - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [Q] Accessing struts-tiles attribute in a bean?
Great links, Thanks Ted. I suppose the ultimate objective (imho) would be to extend tiles so it could utilise other views rather than just jsp. This could then leverage the great work Cedric has done on tiles wrt XML definitions and 'extends' definitions. Sorry if this seems like a really dumb/lazy q but how does the .vm get passed to velocity for processing - is this just via a servlet-mapping in web.xml. If so, could tiles not be extended to also pass the appropriate extension to a servlet mapping for processing? (Has anyone run any ideas past Cedric?). I'm not advocating even stronger dependence between the components - as I know you have strong and I think perfectly justifiable views on this - but tiles allowing a different processing engine for a resource could be very powerful. Ok, it could be tiles already does this - and I'm just rambling. I'll have a look again at the tiles code and try some examples before posting again. H. -Original Message- From: Ted Husted [mailto:[EMAIL PROTECTED] Sent: 17 March 2003 09:31 To: Hue Holleran Cc: 'Struts Users Mailing List'; [EMAIL PROTECTED] Subject: Re: [Q] Accessing struts-tiles attribute in a bean? Hue Holleran wrote: Ted - what's the chance of posting your views (or pointing us to a link) on how you're using Velocity with Struts. I did have another look at Velocity after your presentation but I still don't think I can do without tiles - even with the promise of 'cross platform' Velocity.NET/NVelocity it doesn't do it for me? I should probably do a how-to, but here's a clip from a Tiles Support thread on the Velocity User list: = Mark de Reeper wrote: #parse(/WEB-INF/templates/vm/htmlheader.vm) table width=100% border=0 tr td#if($header)#parse($header)#end/td /tr tr td#if($body)#parse($body)#end/td /tr tr td#if($footer)#parse($footer)#end/td /tr /table #parse(/WEB-INF/templates/vm/htmlfooter.vm) Then define a template to set the layout and the various bits, this is what is loaded as the main template to parse: #set ($body = /WEB-INF/templates/vm/templatebody.vm) #set ($footer = /WEB-INF/templates/vm/templatefooter.vm) #set ($header = /WEB-INF/templates/vm/templateheader.vm) #parse(/WEB-INF/templates/layouts/layoutHBF.vm) Ted Husted wrote: This is just how the original Struts Template library worked. (Great minds and all that.) You defined a second file to administer the template. This works well enough but it tends to generate a lot of meta-templates that are just used to call other templates. As Slavik pointed out, Tiles extended the template library so that you could express the meta-templates in XML. Instead of forwarding to the glockenspiel.vm template, you can foward to make a reference to say /vm/Glockenspiel and Struts will automatically look for a vmGlockenspiel element, do whatever sets you need, and the forward to the layout. A very neat aspect of Tiles, that we need to adopt for the other Struts configurations, is that one element can extend another. So if you just needed to replace the title on a page, you can extend one element and just override that one set. This makes a *huge* difference in maintenance when you pass the thirty page mark. Until one of us gets around to writing a Tiles tool, I've prototyped what you can do in the Struts config. I've a ViewAction that does the setting. You create the variables to set as Struts ActionForwards and pass their names to ViewAction as ActionMapping parameter. So I have something like this to describe a page: action path=/vm/main/permit/View type=us_ok_deq_wqdata.http.ViewAction validate=false name=permit_select_id parameter=vmTitle,vmChoice,vmMenu,vmBody,vmAction,vmButtonBar forward name=vmTitle path=Permit Detail / forward name=vmChoice path=View / forward name=vmMenu path=/cpu/menu/main.vm / forward name=vmBody path=/cpu/permit/view.vm / forward name=vmAction redirect=false path=/Main / forward name=vmButtonBar path=/cpu/permit/viewMain.vm / /action To render the same page but with a different button bar, I'd just change that forward to include some other template instead. Besides URI's for parse statements, you can also pass any variable you need to create. For example, vmChoice tells the menu which item we are on, so it can dim that one (and leave the rest linked). While we can't extend struts-config elements (yet), the ActionForwards do have a local and global scope. So you can do things like create a global default forward and let that pass through when it doesn't need to be changed. This is done for the Layout. There's a default vmLayout forward which can be overridden by an element if you need to use a different layout. This works fine inside of Struts and will work even better when we get the Struts config to support extended elements like the Tiles config. But, it seems to me that it's something that could also be done outside of Struts and made available to anyone
Struts-Menu onClick forcing a submit
Hi, I am using Coolmenu4 and setting location to the URL to execute e.g. location=ServiceInvoice/save.do. I found that this does not force a submit so my action form is not populated. To force a submit I tried the onClick e.g. onClick=submitSave('ServiceInvoice/save.do'). This does not work. The digester that loads the menu-config.xml doesn't like the parameter with single quotes. I tried double quotes and escaped double and single quotes but no luck. e.g. onClick=submitSave(\ServiceInvoice\save.do\) How can I pass a parameter using onClick?. If it is possible to force a submit using the location, page attribute or other approach I would rather do it that way without using javascript. Any help would be appreciated. Thanks, Jack
Newbie....need DB examples
Hello All, I have just started Struts in my project. I need simple DB examples in Struts that can fetch some data, update, and delete that data from database (like sqlserver). Please send link or attachment such that it would be easy to move ahead Waiting for reply Niket - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: struts with weblogic
Sure, runs fine. It's no different than using Struts with any other app server. Try out the examples that ship with Struts and if you still have problems post another message with details on the specific problems you're having. Quoting Rajeev Jain [EMAIL PROTECTED]: Hi, Has some body tried struts 1.1 with weblogic 7.0 ? I would appreciate if you can suggest me configuration on weblogic. thanks Rajeev - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Kris Schneider mailto:[EMAIL PROTECTED] D.O.Tech http://www.dotech.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Another sslext-struts question
Hello all, I'm trying to install the sslext-struts to toggle between https and http requests. I have downloaded the sslext-struts-1.1RC1 and I have copied the /web directory-which contains the demo app- into my webapps. I have enabled the SSL in Tomcat, copied the jnet.jar,jcert.jar,jsse.jar into /web/WEB-INF/lib dir, and I try to run the /web app of sslext. When I give the request http://localhost:8080/web -or https://localhost:8443/web- and I get the following error in my browser: HTTP Status 503 Servlet action is currently unavailable The requested service (Servlet action is currently unavailable) is not currently available. In Tomcat console i don't get any detailed exception. What am I doing wrong? Any help would be appriciated!!! - I have already searched the archive and I couldn't find any answer. - Also I would like to ask a more general question regarding SSL. Suppose someone has configured SSL on Apache server. When a http request for struts app is given to the server, this request is transformed into https and then send to tomcat? Or we should always use https? Thank you, Konstantina
Re: Tile variable in a custom tag
Import the tile attribute in one of the jsp scope: tiles.importAttribute name=OBJECT_NAME / Then, you can use it in your tag as el expression. If you need to use it as java variable, use tiles:useAttribute name=.../ Check the tag syntax to know more ... Cedric Sloan Seaman wrote: Is there any way to get a variable passed to a tile into a custom tag within that tile? Example: I pass to the tile: tiles:put name=OBJECT_NAME value=node/ and then I want to so something like: pantryLoading:getBarcodeTree name=${OBJECT_NAME} property=nodeList scope=session/ -- Sloan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Html:Options usage
Hi, I have a bean class that returns an ArrayList of ArrayLists for my dropdowns. I am really confused on how to show this dropdowns. Here's my bean class: public class UserAccessBean implements java.io.Serializable { List deptList = new ArrayList(); List brokerList = new ArrayList(); List filters = new ArrayList(); public List getFilters() { deptList.add(new LabelValueBean(1, Department1)); deptList.add(new LabelValueBean(2, Department2)); deptList.add(new LabelValueBean(3, Department3)); brokerList.add(new LabelValueBean(broker1, BrokerDepartment1)); brokerList.add(new LabelValueBean(broker2, BrokerDepartment2)); brokerList.add(new LabelValueBean(broker3, BrokerDepartment3)); filters.add(deptList); filters.add(brokerList); return filters; } } The 'filters' ArrayList can actually return 2 or more ArrayList. Like if there's 3 ArrayLists, I would like an html output such as: select name=filter1options/select select name=filter2options ... /select select name=filter3options.../select tia, Emmanuel - Do you Yahoo!? Yahoo! Web Hosting - establish your business online
Re: Another sslext-struts question
have you done the RSA certification bit?? Konstantina Stamopoulou [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hello all, I'm trying to install the sslext-struts to toggle between https and http requests. I have downloaded the sslext-struts-1.1RC1 and I have copied the /web directory-which contains the demo app- into my webapps. I have enabled the SSL in Tomcat, copied the jnet.jar,jcert.jar,jsse.jar into /web/WEB-INF/lib dir, and I try to run the /web app of sslext. When I give the request http://localhost:8080/web -or https://localhost:8443/web- and I get the following error in my browser: HTTP Status 503 Servlet action is currently unavailable The requested service (Servlet action is currently unavailable) is not currently available. In Tomcat console i don't get any detailed exception. What am I doing wrong? Any help would be appriciated!!! - I have already searched the archive and I couldn't find any answer. - Also I would like to ask a more general question regarding SSL. Suppose someone has configured SSL on Apache server. When a http request for struts app is given to the server, this request is transformed into https and then send to tomcat? Or we should always use https? Thank you, Konstantina - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Html:Options usage
logic:iterate name=filters id=filter indexId=filterIndex select name='%=filter+filterIndex%'html:optionsCollection name=filter label=label value=value//select /logic:iterate -Original Message- From: e gg [mailto:[EMAIL PROTECTED] Sent: 17 March, 2003 15:16 To: [EMAIL PROTECTED] Subject: Html:Options usage Hi, I have a bean class that returns an ArrayList of ArrayLists for my dropdowns. I am really confused on how to show this dropdowns. Here's my bean class: public class UserAccessBean implements java.io.Serializable { List deptList = new ArrayList(); List brokerList = new ArrayList(); List filters = new ArrayList(); public List getFilters() { deptList.add(new LabelValueBean(1, Department1)); deptList.add(new LabelValueBean(2, Department2)); deptList.add(new LabelValueBean(3, Department3)); brokerList.add(new LabelValueBean(broker1, BrokerDepartment1)); brokerList.add(new LabelValueBean(broker2, BrokerDepartment2)); brokerList.add(new LabelValueBean(broker3, BrokerDepartment3)); filters.add(deptList); filters.add(brokerList); return filters; } } The 'filters' ArrayList can actually return 2 or more ArrayList. Like if there's 3 ArrayLists, I would like an html output such as: select name=filter1options/select select name=filter2options ... /select select name=filter3options.../select tia, Emmanuel - Do you Yahoo!? Yahoo! Web Hosting - establish your business online __ Disclaimer and confidentiality note Everything in this e-mail and any attachments relating to the official business of Standard Bank Group Limited is proprietary to the company. It is confidential, legally privileged and protected by law. Standard Bank does not own and endorse any other content. Views and opinions are those of the sender unless clearly stated as being that of Standard Bank. The person addressed in the e-mail is the sole authorised recipient. Please notify the sender immediately if it has unintentionally reached you and do not read, disclose or use the content in any way. Standard Bank can not assure that the integrity of this communication has been maintained nor that it is free of errors, virus, interception or interference. __ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Another sslext-struts question
Hello James, If you mean the RSA certification using the keytool, yes I have done it -as part of tomcat SSL configuration . Konstantina - Original Message - From: Jamesey [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, March 17, 2003 3:16 PM Subject: Re: Another sslext-struts question have you done the RSA certification bit?? Konstantina Stamopoulou [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hello all, I'm trying to install the sslext-struts to toggle between https and http requests. I have downloaded the sslext-struts-1.1RC1 and I have copied the /web directory-which contains the demo app- into my webapps. I have enabled the SSL in Tomcat, copied the jnet.jar,jcert.jar,jsse.jar into /web/WEB-INF/lib dir, and I try to run the /web app of sslext. When I give the request http://localhost:8080/web -or https://localhost:8443/web- and I get the following error in my browser: HTTP Status 503 Servlet action is currently unavailable The requested service (Servlet action is currently unavailable) is not currently available. In Tomcat console i don't get any detailed exception. What am I doing wrong? Any help would be appriciated!!! - I have already searched the archive and I couldn't find any answer. - Also I would like to ask a more general question regarding SSL. Suppose someone has configured SSL on Apache server. When a http request for struts app is given to the server, this request is transformed into https and then send to tomcat? Or we should always use https? Thank you, Konstantina - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[OT] Changing a form page with minimal involvement of struts.
Hi all, I have labeled this OT, cause the solution may not involve struts at all. I would like to present the client with a specific type of data entry in a form page. It will be collecting a timestamp from the client, but I want to give them several different ways of giving me the data; by day; by month; after a date; before a date; and between two dates (default). I want to display the data enty type, only when the correct button is clicked, and if that entry type is not being used to change it and hide the original. The form page was created using data supplied by a call to a db, but this data is unlikely to change in a space of less than three or four hours, so a call to the business logic, will rarely make a difference. Now the prerequisites of this are: 1) I don't use JavaScript. 2) The pages are not generated using JSPs. 3) The reload speed must be kept down, by NOT going back through any business logic. So the questions are; 1) Is there a way to hold the data that created the original page, so that a call back to the creating Action class will stop the need to ask the business logic for the original page data again? 2) A way to do the same, but at the client end, so I don't have to make a request to struts at all? Institut fuer Prozessdatenverarbeitung und Elektronik, Forschungszentrum Karlsruhe GmbH, Postfach 3640, D-76021 Karlsruhe, Germany. Tel: (+49)/7247 82-4042 E-mail : [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
javascript function call with parameter
Hi, I'm trying in a JSP page to move items between 2 lists. This is done via a javascript method that call my action: function rightMove(nbForm){ document.forms[nbForm].elements['sense'].value=right; document.forms[nbForm].submit(); } This function is called on the ondblclick javascript method on the html:select tag : html:select property=databaseSelectedValues size=7 style=width:100% ondblclick=javascript:rightMove(%= nbForm %) html:options property=databaseValues / /html:select The problem is that my java parameter 'nbForm' that gives the form number to be sumitted isn't parsed correctly, the HTML output looks like : select name=databaseSelectedValues size=7 ondblclick=javascript:rightMove(%= nbForm %) style=width:100%) If I put the same funtion on a href link for instance, it works perfectly : a href=javascript:rightMove(%= nbForm %) title=Copy the selected values in the second list img src=files/images/idxdown.gif border=0/ /a Does anyone know the syntax of such a command? Thanks Yannick - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE:[OT] javascript function call with parameter
Why not just do: html:select property=databaseSelectedValues size=7 style=width:100% ondblclick=javascript:rightMove(this.form) html:options property=databaseValues / /html:select no scriptlet required... -- Voytek Jarnot Quidquid latine dictum sit, altum viditur. -Original Message- From: Yannick Lesage [mailto:[EMAIL PROTECTED] Sent: Monday, March 17, 2003 7:45 AM To: Struts-User Subject: javascript function call with parameter Hi, I'm trying in a JSP page to move items between 2 lists. This is done via a javascript method that call my action: function rightMove(nbForm){ document.forms[nbForm].elements['sense'].value=right; document.forms[nbForm].submit(); } This function is called on the ondblclick javascript method on the html:select tag : html:select property=databaseSelectedValues size=7 style=width:100% ondblclick=javascript:rightMove(%= nbForm %) html:options property=databaseValues / /html:select The problem is that my java parameter 'nbForm' that gives the form number to be sumitted isn't parsed correctly, the HTML output looks like : select name=databaseSelectedValues size=7 ondblclick=javascript:rightMove(%= nbForm %) style=width:100%) If I put the same funtion on a href link for instance, it works perfectly : a href=javascript:rightMove(%= nbForm %) title=Copy the selected values in the second list img src=files/images/idxdown.gif border=0/ /a Does anyone know the syntax of such a command? Thanks Yannick - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
how to configure iplant web server for struts
HI, I am facing problem in working struts in iplant webserver I am using only ActionServlet Tell me step by step procedure to execute an struts - application in iplanet web server.. Regards, P.RAMESHKUMAR, ** This email (including any attachments) is intended for the sole use of the intended recipient/s and may contain material that is CONFIDENTIAL AND PRIVATE COMPANY INFORMATION. Any review or reliance by others or copying or distribution or forwarding of any or all of the contents in this message is STRICTLY PROHIBITED. If you are not the intended recipient, please contact the sender by email and delete all copies; your cooperation in this regard is appreciated. **
Nested tags and recursion (Arron tree example)
Hello you all! I was trying to visualize/interact with a tree structure using Struts, and looking through the archives I found references to using Nested tags, which at that moment were an extension provided by Arron Bates (http://www.keyboardmonkey.com). As I believe, since Struts 1.1, Nested Tags are part of the main branch (correct if I'm wrong), so there's no further need to use the .jar provided by Arron at his home page: Struts 1.1 rc1 provides the tag libraries for using Nested Tags. That seems to be true, as I've succesfully tried Arron's examples with Struts 1.1 rc1... All but the recursive ones. That's why: 1) I'd like to know if Struts 1.1 rc1 provides Nested Tags, and so recursion, and if they work for other people. 2) Has somebody tried Arron's tree examples with 1.1 rc1 tags, and worked? Thanks a lot in advance :-) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: validate business data
Return Receipt Your RE: validate business data document : was Henry Molina/KRUGER received by: at: 03/17/2003 08:59:31 AM - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Nested tags and recursion (Arron tree example)
I was trying to visualize/interact with a tree structure using Struts, and looking through the archives I found references to using Nested tags, which at that moment were an extension provided by Arron Bates (http://www.keyboardmonkey.com). As I believe, since Struts 1.1, Nested Tags are part of the main branch (correct if I'm wrong), so there's no further need to use the .jar provided by Arron at his home page: Struts 1.1 rc1 provides the tag libraries for using Nested Tags. You are correct. Nested tags are part of the Struts 1.1 distribution. However, Arron has made some updates to it and they won't be reflected in the Struts distribution until rc2. So, in the meantime, I would recommend getting the jar at http://www.keyboardmonkey.com/downloads/km-nested-v2.03.jar. Simply place the jar file in the same location as your struts jar. The classes in this jar file will then be loaded. That seems to be true, as I've successfully tried Arron's examples with Struts 1.1 rc1... All but the recursive ones. That's why: 1) I'd like to know if Struts 1.1 rc1 provides Nested Tags, and so recursion, and if they work for other people. Yes, and yes. 2) Has somebody tried Arron's tree examples with 1.1 rc1 tags, and worked? Arron reported success with all his tests. Sri - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[OT]: Looking for a Good Web Designing Tool
Hi everybody, Which tool is good for developing web pages. I am using struts architecture but I will be the on who will also doing web designing work and also programming. I have Dreamweaver , but it doesn't support many features like fieldset and legend Is there a very user friendly Tool which can help build web user interfaces. Help appreciated Thank you very much Vinay - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [OT]: Looking for a Good Web Designing Tool
vi is great and it supports all current and future html tags... -- Voytek Jarnot Quidquid latine dictum sit, altum viditur. -Original Message- From: Vinay Chandupatla [mailto:[EMAIL PROTECTED] Sent: Monday, March 17, 2003 8:01 AM To: [EMAIL PROTECTED] Subject: [OT]: Looking for a Good Web Designing Tool Hi everybody, Which tool is good for developing web pages. I am using struts architecture but I will be the on who will also doing web designing work and also programming. I have Dreamweaver , but it doesn't support many features like fieldset and legend Is there a very user friendly Tool which can help build web user interfaces. Help appreciated Thank you very much Vinay - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
How to change context path?
I'm using weblogic server 6.1 and wonder if there are any ways I could change the context path. Could this be done in any configuration files (web.xml, weblogic.xml or config.xml)? I'll appreciate any help! Kjellaug.
Re: Looking for a Good Web Designing Tool
read the archive - Original Message - From: Vinay Chandupatla [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, March 17, 2003 3:00 PM Subject: [OT]: Looking for a Good Web Designing Tool Hi everybody, Which tool is good for developing web pages. I am using struts architecture but I will be the on who will also doing web designing work and also programming. I have Dreamweaver , but it doesn't support many features like fieldset and legend Is there a very user friendly Tool which can help build web user interfaces. Help appreciated Thank you very much Vinay - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT]: Looking for a Good Web Designing Tool
Oh, you beat me to it :) On Monday, March 17, 2003, at 08:15 AM, Jarnot Voytek Contr AU HQ/SC wrote: vi is great and it supports all current and future html tags... -- Voytek Jarnot Quidquid latine dictum sit, altum viditur. -Original Message- From: Vinay Chandupatla [mailto:[EMAIL PROTECTED] Sent: Monday, March 17, 2003 8:01 AM To: [EMAIL PROTECTED] Subject: [OT]: Looking for a Good Web Designing Tool Hi everybody, Which tool is good for developing web pages. I am using struts architecture but I will be the on who will also doing web designing work and also programming. I have Dreamweaver , but it doesn't support many features like fieldset and legend Is there a very user friendly Tool which can help build web user interfaces. Help appreciated Thank you very much Vinay - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [OT]: Best Web designing Tool which supports HTML4.01
Dreamweaver MX supports fieldset and legend along with the Struts taglibs. Shane -Original Message- From: Vinay [mailto:[EMAIL PROTECTED] Sent: Sunday, March 16, 2003 1:00 PM To: Struts Users Mailing List Subject: [OT]: Best Web designing Tool which supports HTML4.01 Hi everybody, Which tool is good for developing web pages. I am using struts architecture but I will be the on who will also doing web designing work and also programming. I have Dreamweaver , but it doesn't support many features like fieldset and legend Is there a very user friendly Tool which can help build web user interfaces. Help appreciated Thank you very much Vinay - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
validation.xml and Timestamp
I'm using struts validator for all dates and it works fine for simple dates. The entry in validation.xml file is like this. fieldproperty=eventDate depends=required,date arg0 key=eventForm.eventDate.displayname/ var var-namedatePatternStrict/var-name var-valuedd/MM/ /var-value /var /field How can i validate datetime field using the same procedure using format string dd/MM/ HH:SS (timeStamp)? --- Ferran Parra [EMAIL PROTECTED] http://www.mubimedia.com MUBIMEDIA S.L. C/ Mallorca, 275, 1r 2a 08008 BCN Tel: 93 215 21 91 / Fax: 93 215 41 21 --- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [OT]: Best Web designing Tool which supports HTML4.01
If it supports tag libraries also in addition to fieldset and legend tags of HTML4.01 , that should be enough for me, Thank you Vinay -- Original Message -- From: Witbeck, Shane [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] Date: Mon, 17 Mar 2003 09:18:34 -0500 Dreamweaver MX supports fieldset and legend along with the Struts taglibs. Shane -Original Message- From: Vinay [mailto:[EMAIL PROTECTED] Sent: Sunday, March 16, 2003 1:00 PM To: Struts Users Mailing List Subject: [OT]: Best Web designing Tool which supports HTML4.01 Hi everybody, Which tool is good for developing web pages. I am using struts architecture but I will be the on who will also doing web designing work and also programming. I have Dreamweaver , but it doesn't support many features like fieldset and legend Is there a very user friendly Tool which can help build web user interfaces. Help appreciated Thank you very much Vinay - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: validation.xml and Timestamp
You could certainly use a depends='mask' and the appropriate regular expression. -jeff On Monday, March 17, 2003, at 08:32 AM, Ferran Parra wrote: I'm using struts validator for all dates and it works fine for simple dates. The entry in validation.xml file is like this. fieldproperty=eventDate depends=required,date arg0 key=eventForm.eventDate.displayname/ var var-namedatePatternStrict/var-name var-valuedd/MM/ /var-value /var /field How can i validate datetime field using the same procedure using format string dd/MM/ HH:SS (timeStamp)? --- Ferran Parra [EMAIL PROTECTED] http://www.mubimedia.com MUBIMEDIA S.L. C/ Mallorca, 275, 1r 2a 08008 BCN Tel: 93 215 21 91 / Fax: 93 215 41 21 --- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: how to configure iplant web server for struts
I have exactly your problem using iPlanet 4.1 Regards, Guido. Ramesh_KumarP wrote: HI, I am facing problem in working struts in iplant webserver I am using only ActionServlet Tell me step by step procedure to execute an struts - application in iplanet web server.. Regards, P.RAMESHKUMAR, - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Struts Logging using JDK1.4
hi list, I am trying to initialze the LogManager with the over-riding property files. I have written a sep servlet whose only job is to initliaze the LogManager using readConfiguration(InputStream) method. I am SURE that Configuraiton is being read as Files are being created at the defined directry uisng defined names. BUT the problem is that inspite of setting of my own Formatter, it always takes XMLFormatter. However, if test the proggie from commnad prompt, it uses my Formatter. Has anybody faced this problem before? Is it something to do with jars in TomCat lib or Application's lib directory? Thanks for any Help. BEGIN:vCard VERSION:3.0 FN:Navjot Singh NICKNAME:navi,navis ORG:Net4India Ltd. ADR;TYPE=WORK,POSTAL,PARCEL:;;703, Bhikai Ji Cama Place;New Delhi;Delhi;110066;India TEL;TYPE=VOICE,MSG,WORK:+9-111-671-1391 TEL;TYPE=CELL:+9-198-111-78486 EMAIL;TYPE=INTERNET,PREF:[EMAIL PROTECTED] EMAIL;TYPE=INTERNET:[EMAIL PROTECTED] URL:http://www.net4india.com TZ:+05:30 BDAY:1978-07-13 END:vCard - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [OT] Learning Curve Management or Confusions of a Newbie
Hi Jeff, I read with interest your comments on the above. I think Rick Reumann has done a great example recently of a 'walkthrough' which I presume you'll have seen: Struttin' with Struts: http://www.reumann.net/do/struts/main I agree entirely with your comments - I'm still learning some bits of struts myself. What I've found really useful in the past has been Microsoft's Knowledge Base articles which you may/may not have used on msdn.microsoft.com. Of late they seem to have become less relevant as it has been much easier to just view the source with struts and related products - what a great idea: Open Source Software. I've found Vic's basebeans classes really useful also in understanding other complete approaches to building a struts application and I really like Vic's basebeans approach - it has some excellent merits in terms of performance and certainly speed of development. We have *loads* of 'Knowledge Base' articles we have prepared mainly on (Debian) Linux, Tomcat, Struts ( tiles, etc.) and quite a few other (largely unrelated) topics. Most of these are actually on paper at the moment, though. I'm putting together a similar example to Vic (Cekvenich)'s basicPortal but more for the content rather than the approach (the code for this is mainly Vic's). This can be hosted somewhere - on of our servers initially - but with public access in case anybody else is interested. Here is an extract from a previous mail I sent out on 8th November 2002: Sorry to perpetuate something that could be construed to be OT... but I'd like to chip-in with my 2p worth if that's OK. As relatively very new users to Struts we have found getting up-to-speed with Struts more difficult than we originally envisaged - probably due to being used to being spoon-fed over the years and not used-to really grown-up technologies like Struts, i.e. we have considered MVC before but it was easier just to get the job done - MS VB/ASP/.NET makes it very easy to get a solution up-and-running but we have always found we pay for this in maintenance times later! Having now committed to going Struts 1.1 - what we find we're missing are simple, complete and specifically targeted HowTo's or a Knowledge Base of worked examples on specific topics. Yes, javadoc is very useful - source (yippee!) is even more useful, user guide is detailed but has - clearly every possible option and it is not always clear which options we need in the (usually) simple solution that we're attempting to find. OK, google search is useful, apache.struts newsgroup even more useful and other great articles such as IBM Developer Works and other sites, e.g. Cedric's articles on tiles. However - well written it is not always clear to which version they refer and these complete articles are more like mini books and obviously take a significant amount to maintain and can sometimes quickly get out-of-date and cause a great deal of confusion to novices such as we consider ourselves to be. This list has been extremely useful - the replies, to be honest are staggering in their excellent quality. I always feel a bit (honoured and at the same time) distressed that authors (just speaking from limited personal experience) Cedric and Craig (obviously and others) have read and taken time to post a response - these people must be extremely busy just developing the core product to be answering questions that must seem fundamental. OK, I'm sure they don't mind but there must be a better way... We've started compiling internally, for our own use - our own KB articles - to be honest this is just a simple tile template (cheers, Cedric) with areas such as Sensible Title, Summary, Product (struts, tomcat, jikes, debian), Version(s) covered (usually common tile) as far as we can tell, More Information (body text) with file links, Other Resources and References (links to other articles). Ok, not rocket science - but this has been extremely useful to us. I gave up 2 years ago trying to remember everything (anything :-) and this is always my first port-of-call as it's easily searchable ... but this could be extended to comprise summarised information from these lists - OK this would be manual - but honestly how many would we need for simple repeated stuff for Struts = 50-100? e.g. mail from Mark Zeltser (Can forward action point to tiles definition?) - ok this can be got from the user guide, Cedric's article, Wellie Chao's article (IBM), probably from this list in a previous post - has solicited 9 responses. Unsuprisingly this really foxed us for a few hours - we realised in the end we could only do this via an action but a simple howto to cover this and include some info on Global Forwards would answer this question and the potential next one How do I create an action to do this? with an example of it in use would be an excellent searchable resource for everyone and a real jumpstart for anyone just getting-into
Re: How to change context path?
Do it in weblogic's config.xml, or better yet through the WebLogic console (http://yourserver:7001/console). Be sure to design and implement your web apps so that they would work no matter what the context path is. -Max - Original Message - From: Kjellaug Johansen [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Monday, March 17, 2003 6:20 AM Subject: How to change context path? I'm using weblogic server 6.1 and wonder if there are any ways I could change the context path. Could this be done in any configuration files (web.xml, weblogic.xml or config.xml)? I'll appreciate any help! Kjellaug. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
html:form problem
Hello, I have a probleme with html:form when i send data with this tag html:form action=/validate method=POST enctype=multipart/form-data the server transform all caracters like éèë... to Do you have any idea about this problem? Thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Nested tags and recursion (Arron tree example)
Hello again! I was trying to visualize/interact with a tree structure using Struts, and looking through the archives I found references to using Nested tags, which at that moment were an ... However, Arron has made some updates to it and they won't be reflected in the Struts distribution until rc2. So, in the meantime, I would recommend getting the jar at ... I don't know what those updates are, but they made the recursion examples work! Just dropped the .jar in WEB-INF\lib, next to struts.jar, and it started to work properly... so I believe there must be something wrong with Struts 1.1 rc1 and its Nested Tags... In case somebody takes care of this; I deployed Arron's examples with: * Struts 1.1 rc1 * Apache Tomcat 4.1.18 * JSDK 1.4.1.01 * J2EE 1.3.1 And the recursion examples didn't work until I used the updated Nested Tags, available from: http://www.keyboardmonkey.com/downloads/km-nested-v2.03.jar Thanks a lot, Sri Sankaran ;-) ! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Nested tags and recursion (Arron tree example)
You could also download a recent nightly Struts build that includes the same fixes contained in Arron's jar. David From: Distrox [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Re: Nested tags and recursion (Arron tree example) Date: Mon, 17 Mar 2003 16:02:07 +0100 Hello again! I was trying to visualize/interact with a tree structure using Struts, and looking through the archives I found references to using Nested tags, which at that moment were an ... However, Arron has made some updates to it and they won't be reflected in the Struts distribution until rc2. So, in the meantime, I would recommend getting the jar at ... I don't know what those updates are, but they made the recursion examples work! Just dropped the .jar in WEB-INF\lib, next to struts.jar, and it started to work properly... so I believe there must be something wrong with Struts 1.1 rc1 and its Nested Tags... In case somebody takes care of this; I deployed Arron's examples with: * Struts 1.1 rc1 * Apache Tomcat 4.1.18 * JSDK 1.4.1.01 * J2EE 1.3.1 And the recursion examples didn't work until I used the updated Nested Tags, available from: http://www.keyboardmonkey.com/downloads/km-nested-v2.03.jar Thanks a lot, Sri Sankaran ;-) ! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: html:form problem
I have had a similar problem and fixed it by explicitly setting the locale. Shane -Original Message- From: Noureddine Bekrar [mailto:[EMAIL PROTECTED] Sent: Monday, March 17, 2003 9:55 AM To: Struts Users Mailing List Subject: html:form problem Hello, I have a probleme with html:form when i send data with this tag html:form action=/validate method=POST enctype=multipart/form-data the server transform all caracters like éèë... to Do you have any idea about this problem? Thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: html:form problem
Thank you for your response; do you speak about the session locale in the client side? - Original Message - From: Witbeck, Shane [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, March 17, 2003 4:11 PM Subject: RE: html:form problem I have had a similar problem and fixed it by explicitly setting the locale. Shane -Original Message- From: Noureddine Bekrar [mailto:[EMAIL PROTECTED] Sent: Monday, March 17, 2003 9:55 AM To: Struts Users Mailing List Subject: html:form problem Hello, I have a probleme with html:form when i send data with this tag html:form action=/validate method=POST enctype=multipart/form-data the server transform all caracters like éèë... to Do you have any idea about this problem? Thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Newbie....need DB examples
Nicket I have just started Struts in my project. I need simple DB examples in Struts that can fetch some data, update, and delete that data from database (like sqlserver). Do you already have code that can read/write records from your database? You'll need to get that done before you can use Struts to provide a user interface for those tasks. The Struts framework doesn't handle the database interaction. Instead, you use the same code you would use in any other app, and you put that code in your Action classes. There's some information here: http://jakarta.apache.org/struts/faqs/database.html -- Wendy Smoak Applications Systems Analyst, Sr. Arizona State University PA Information Resources Management
RE: Struts-Menu onClick forcing a submit
It is puzzling why you would be using the 'menu' instead of on page links or buttons to submit the form. There is no way to do it using struts-menu selections w/o javascript as they do not render submit buttons. If your menu is within the form /form block try onclick=document.submit(); Also, you might want to use page instead of location although I don't think that is your issue. Page is for same site references, location is for off site references. Edgar -Original Message- From: Jack Zakarian [mailto:[EMAIL PROTECTED] Sent: Monday, March 17, 2003 7:03 AM To: '[EMAIL PROTECTED]' Subject: Struts-Menu onClick forcing a submit Hi, I am using Coolmenu4 and setting location to the URL to execute e.g. location=ServiceInvoice/save.do. I found that this does not force a submit so my action form is not populated. To force a submit I tried the onClick e.g. onClick=submitSave('ServiceInvoice/save.do'). This does not work. The digester that loads the menu-config.xml doesn't like the parameter with single quotes. I tried double quotes and escaped double and single quotes but no luck. e.g. onClick=submitSave(\ServiceInvoice\save.do\) How can I pass a parameter using onClick?. If it is possible to force a submit using the location, page attribute or other approach I would rather do it that way without using javascript. Any help would be appreciated. Thanks, Jack - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: html:form problem
My problem wasn't specifically with the html:form tag but with some business logic using WebSphere running on Solaris. You may want to try wrapping the html:form tag with the html:html taglib and setting locale=true. Just a guess here. Shane -Original Message- From: Noureddine Bekrar [mailto:[EMAIL PROTECTED] Sent: Monday, March 17, 2003 10:20 AM To: Struts Users Mailing List Subject: Re: html:form problem Thank you for your response; do you speak about the session locale in the client side? - Original Message - From: Witbeck, Shane [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, March 17, 2003 4:11 PM Subject: RE: html:form problem I have had a similar problem and fixed it by explicitly setting the locale. Shane -Original Message- From: Noureddine Bekrar [mailto:[EMAIL PROTECTED] Sent: Monday, March 17, 2003 9:55 AM To: Struts Users Mailing List Subject: html:form problem Hello, I have a probleme with html:form when i send data with this tag html:form action=/validate method=POST enctype=multipart/form-data the server transform all caracters like éèë... to Do you have any idea about this problem? Thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Struts-Menu onClick forcing a submit
Hi Edgar, It's a user requirement to use a horizontal dropdown menu to initiate actions. For example the menu would look like: [Home] [Action] [Query] [Add][Save] [Delete] Cancel FieldQueryNew Delete ClearList All Add Detail Delete Selected ResetNew Query There are different menus based on the screen being displayed. The action class has a number of methods for the above menu. Some of the menu actions will take you to another action-to-screen. Long term the menu options will be selected from a database table or XML file based on the userid and password. If I use the onclick=document.submit(); I will still need to set the forms action to the new url. Thanks for the reply and suggestion. Jack -Original Message- From: Edgar Dollin [mailto:[EMAIL PROTECTED] Sent: Monday, March 17, 2003 10:49 AM To: 'Struts Users Mailing List' Subject: RE: Struts-Menu onClick forcing a submit It is puzzling why you would be using the 'menu' instead of on page links or buttons to submit the form. There is no way to do it using struts-menu selections w/o javascript as they do not render submit buttons. If your menu is within the form /form block try onclick=document.submit(); Also, you might want to use page instead of location although I don't think that is your issue. Page is for same site references, location is for off site references. Edgar -Original Message- From: Jack Zakarian [mailto:[EMAIL PROTECTED] Sent: Monday, March 17, 2003 7:03 AM To: '[EMAIL PROTECTED]' Subject: Struts-Menu onClick forcing a submit Hi, I am using Coolmenu4 and setting location to the URL to execute e.g. location=ServiceInvoice/save.do. I found that this does not force a submit so my action form is not populated. To force a submit I tried the onClick e.g. onClick=submitSave('ServiceInvoice/save.do'). This does not work. The digester that loads the menu-config.xml doesn't like the parameter with single quotes. I tried double quotes and escaped double and single quotes but no luck. e.g. onClick=submitSave(\ServiceInvoice\save.do\) How can I pass a parameter using onClick?. If it is possible to force a submit using the location, page attribute or other approach I would rather do it that way without using javascript. Any help would be appreciated. Thanks, Jack - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
html-el:select
Hi, I have a form called ContestForm. It has a Collection called categories. categories is List which holds a instances of class Category. Which has methods getId() and getCatoryName(). on hrml:el this does not work... I mean I want to populate selected property and the selection list from the same form. html-el:form action=/contest/addcoll html-el:select property=categoryId size=10 does not work... 1. --- html-el:options collection=categories property=id labelProperty=categoryName/ 2. html-el:options collection=${ContestForm.map.categories} property=id labelProperty=categoryName/ /html-el:select /html-el:form Thank you in advance for any answers.. .anil - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: html-el:select
You said ContestForm has a categories property. Your reference in the JSP says that ContestForm has a map property, which has a categories property. Which is it? If the former, your reference would just be ${ContestForm.categories}. -Original Message- From: awc [mailto:[EMAIL PROTECTED] I have a form called ContestForm. It has a Collection called categories. categories is List which holds a instances of class Category. Which has methods getId() and getCatoryName(). on hrml:el this does not work... I mean I want to populate selected property and the selection list from the same form. html-el:form action=/contest/addcoll html-el:select property=categoryId size=10 does not work... 1. --- html-el:options collection=categories property=id labelProperty=categoryName/ 2. html-el:options collection=${ContestForm.map.categories} property=id labelProperty=categoryName/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
error deploying struts-example on tomcat 4.1.18
Deploying the struts-examples.war from struts rc1 on tomcat4.1.18 (win2k, SUN j2sdk 1.4.1), I get the following error I can't not solve: 17:26:52,824 ERROR [Digester] Parse Fatal Error at line 3 column -1: External entity not found: http://jakarta.apache.org/commons/dtds/validator_1_0.dtd;. java.net.UnknownHostException: jakarta.apache.org [...] any idea? Thanks in advance Enrico - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
How to workaround with the java.net.UnknownHostException: jakarta .apache.org exception (was RE: error deploying struts-example on tomcat 4 .1.18)
There is a bug into the commons-validator bundled with Struts 1.1 RC1: the disgester instancied by the ValidatorResourcesInitializer uses the local DTD located into /org/apache/commons/resources instead of /org/apache/commons/validator/resources... so as the digester doesn't find the DTD, it makes a lookup over the web. (you should not have your server accessing the web) 2 solutions: the first dirty but direct ... put the validator_1_0.dtd into your classpath into the directory /org/apache/commons/resources or the second, cleaner get the last commons-validator build. the bug is corrected regards Guillaume Compagnon -Message d'origine- De: Enrico Donelli [SMTP:[EMAIL PROTECTED] Date: lundi 17 mars 2003 17:31 À:'Struts Users Mailing List' Objet:error deploying struts-example on tomcat 4.1.18 Deploying the struts-examples.war from struts rc1 on tomcat4.1.18 (win2k, SUN j2sdk 1.4.1), I get the following error I can't not solve: 17:26:52,824 ERROR [Digester] Parse Fatal Error at line 3 column -1: External entity not found: http://jakarta.apache.org/commons/dtds/validator_1_0.dtd;. java.net.UnknownHostException: jakarta.apache.org [...] any idea? Thanks in advance Enrico - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Ce message et toutes les pieces jointes (ci-apres le message) sont confidentiels et etablis a l'intention exclusive de ses destinataires. Toute utilisation ou diffusion non autorisee est interdite.Tout message electronique est susceptible d'alteration. Le CREDIT DU NORD et ses filiales declinent toute responsabilite au titre de ce message s'il a ete altere, deforme ou falsifie. This message and any attachments ( the message) are confidential and intended solely for the addressees. Any unauthorised use or dissemination is prohibited.E-mails are susceptible to alteration. Neither CREDIT DU NORD nor any of its subsidiaries or affiliates shall be liable for the message if altered, changed or falsified. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: html-el:select
Sorry I should have added more info. ContestForm is DynaValidatorForm and has form-property name=categories type=java.util.Collection/ form-property name=categoryId type=java.lang.Integer/ if I try html-el:options collection=${ContestForm.categories} property=id labelProperty=categoryName/ with DynaValidatorForm, it does not work. .anil to recap... struts-config.xml form-bean name=ContestForm type=org.apache.struts.validator.DynaValidatorForm form-property name=categories type=java.util.Collection/ form-property name=categoryId type=java.lang.Integer/ /form-bean jsp... html-el:form action=/contest/addcoll html-el:options collection=${ContestForm.map.categories} property=id labelProperty=categoryName/ /html-el:select /html-el:form categories holds instances of Category class. class Category { public Integer getId(); //and set public String getCategoryName(); // and set } --- On some other page.. this works ok.. so it is there. I cannot get this into select... logic-el:iterate id=cats collection=${ContestForm.map.categories} indexId=index trtd c:out value=${cats.categoryName}/ /td td html-el:link page=/contest/add.do?col=catpindex=${ContestForm.map.index}index=${cats.index}Remove/html-el:link td /tr /logic-el:iterate .anil - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: html-el:select
Ok, in that case your original syntax was correct. I don't know why it isn't working. I assume you mean by does not work that the variable appears to be empty, and not that you're getting exceptions. If I were you, I would be stepping through this code in your debugger. Set breakpoints on your setters/getters. Inspect your old/new property values at that point. Once you see something unexpected, try to figure out why it is happening. -Original Message- From: awc [mailto:[EMAIL PROTECTED] Sorry I should have added more info. ContestForm is DynaValidatorForm and has form-property name=categories type=java.util.Collection/ form-property name=categoryId type=java.lang.Integer/ if I try html-el:options collection=${ContestForm.categories} property=id labelProperty=categoryName/ with DynaValidatorForm, it does not work. .anil to recap... struts-config.xml form-bean name=ContestForm type=org.apache.struts.validator.DynaValidatorForm form-property name=categories type=java.util.Collection/ form-property name=categoryId type=java.lang.Integer/ /form-bean jsp... html-el:form action=/contest/addcoll html-el:options collection=${ContestForm.map.categories} property=id labelProperty=categoryName/ /html-el:select /html-el:form categories holds instances of Category class. class Category { public Integer getId(); //and set public String getCategoryName(); // and set } --- On some other page.. this works ok.. so it is there. I cannot get this into select... logic-el:iterate id=cats collection=${ContestForm.map.categories} indexId=index trtd c:out value=${cats.categoryName}/ /td td html-el:link page=/contest/add.do?col=catpindex=${ContestForm.map.index}index=${ca ts .index}Remove/html-el:link td /tr /logic-el:iterate .anil - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DTD's and TLD's in Struts.jar Why?
Hi All, One of my co workers is optimizing the deployment of my Struts based web application. He has asked me why the Struts.jar contains DTD's and TLD's and if not used would like to remove them to improve speed of deployment. The only reason I can think of is for documentation and to provide the users of the framework a complete resource for the Struts framework. Is there any other reason they are included and am I correct with my assumption? Can the DTD's and TLD's in the Struts.jar be referenced within the application? Thanks, Greg
having a problem updating my form - starnge error with beanUtils
I have a jsp page that is being populated OK by the form bean. However - when i make changes to the fields and submit it to my action i get the following error java.lang.IllegalArgumentException: No bean specified at org.apache.commons.beanutils.PropertyUtils.getPropertyDescriptor(PropertyUtils.java:837) at org.apache.commons.beanutils.BeanUtils.setProperty(BeanUtils.java:849) at org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:729) at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:1097) at org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.java:798) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:254) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1422) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:523) Does anyone know what this means and what is going on here? thanks p.s. the form is a simple html:form action=myAction.do etc /html:form - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: html-el:select
Thanks for the reply... I started to get this message.. ServletException in:/common/bodyText/contest/winner.jsp] Cannot find bean under name [EMAIL PROTECTED], [EMAIL PROTECTED]' I guess exception lot better than no Bean found ... I am geeting closer. The struts release is -- jakarta-struts-1.1-b3-src and tomcat -- 4.1.18. I will try that. Thanks again. .anil Karr, David wrote: Ok, in that case your original syntax was correct. I don't know why it isn't working. I assume you mean by does not work that the variable appears to be empty, and not that you're getting exceptions. If I were you, I would be stepping through this code in your debugger. Set breakpoints on your setters/getters. Inspect your old/new property values at that point. Once you see something unexpected, try to figure out why it is happening. -Original Message- From: awc [mailto:[EMAIL PROTECTED] Sorry I should have added more info. ContestForm is DynaValidatorForm and has form-property name=categories type=java.util.Collection/ form-property name=categoryId type=java.lang.Integer/ if I try html-el:options collection=${ContestForm.categories} property=id labelProperty=categoryName/ with DynaValidatorForm, it does not work. .anil to recap... struts-config.xml form-bean name=ContestForm type=org.apache.struts.validator.DynaValidatorForm form-property name=categories type=java.util.Collection/ form-property name=categoryId type=java.lang.Integer/ /form-bean jsp... html-el:form action=/contest/addcoll html-el:options collection=${ContestForm.map.categories} property=id labelProperty=categoryName/ /html-el:select /html-el:form categories holds instances of Category class. class Category { public Integer getId(); //and set public String getCategoryName(); // and set } --- On some other page.. this works ok.. so it is there. I cannot get this into select... logic-el:iterate id=cats collection=${ContestForm.map.categories} indexId=index trtd c:out value=${cats.categoryName}/ /td td html-el:link page=/contest/add.do?col=catpindex=${ContestForm.map.index}index=${ca ts .index}Remove/html-el:link td /tr /logic-el:iterate .anil - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: having a problem updating my form - starnge error with beanUtils
make sure you specified a name attribute for your action element in struts-config action path=/myAction name=myActionForm type=MyActionAction scope=request input=/myAction.jsp forward name=success /action -Message d'origine- De : teknokrat [mailto:[EMAIL PROTECTED] Envoyé : Monday, March 17, 2003 5:11 PM À : [EMAIL PROTECTED] Objet : having a problem updating my form - starnge error with beanUtils I have a jsp page that is being populated OK by the form bean. However - when i make changes to the fields and submit it to my action i get the following error java.lang.IllegalArgumentException: No bean specified at org.apache.commons.beanutils.PropertyUtils.getPropertyDescriptor(PropertyUtils.java:837) at org.apache.commons.beanutils.BeanUtils.setProperty(BeanUtils.java:849) at org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:729) at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:1097) at org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.java:798) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:254) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1422) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:523) Does anyone know what this means and what is going on here? thanks p.s. the form is a simple html:form action=myAction.do etc /html:form - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Newbie....need DB examples
Thanks Wendy for helping me... - Original Message - From: Wendy Smoak [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Sent: Monday, March 17, 2003 8:59 PM Subject: RE: Newbieneed DB examples Nicket I have just started Struts in my project. I need simple DB examples in Struts that can fetch some data, update, and delete that data from database (like sqlserver). Do you already have code that can read/write records from your database? You'll need to get that done before you can use Struts to provide a user interface for those tasks. The Struts framework doesn't handle the database interaction. Instead, you use the same code you would use in any other app, and you put that code in your Action classes. There's some information here: http://jakarta.apache.org/struts/faqs/database.html -- Wendy Smoak Applications Systems Analyst, Sr. Arizona State University PA Information Resources Management - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Webwork vs Struts
Hi all, I'm in the throws of making a decision as to wether I should go with Struts or Webwork. Has anyone had any experience comparing the 2, who would be able to provide some valuable input? It will be appreciated, thanx Here is a post i made to the webwork site, and a reply i received: === I would please like to know from you guys out there, if anyone has used struts then moved over to using webwork. I would like to know if it is a feasible option, and what the pro's and con's of each are. I have read the FAQ on the comparison between struts and webwork, but i would like to hear from developers who have actually used webwork and struts. Which seems to be the better option? I was an avid Struts users for years before switching over to WebWork. I personally find WebWork a lot easier. Here are some of the things I think WebWork does better: * To perform simple actions with Struts requires a _lot_ of coding from ActionForms to Actions to relatively large config entries. If you look through the archives, I posted a comparison of what it took to create code in each framework. * Struts is strongly tied to the web layer making it inappropriate to directly place business logic there, WebWork isn't. I find with Struts, I end up using it as a wrapper layer around POJOs. Again, increasting the amount of code required. * Struts has a larger, albeit more low level tag library. The WebWork tag library is smaller, and yet I feel like you can get things done quicker as the constructs are higher level. * Finally, with Struts, the typically model is to use the ActionForm to receive input, the Action to wrap the business logic and response content gets placed into the request attributes. That seems pretty messy in comparison to having one disposable object to contain all these items. All in all, I think WebWork has a definite edge over Struts. With the upcoming WebWork2, I think it's hands down in WebWorks favor. In addition to an even cleaner separation of business logic and presentation layer, WebWork2 also implements a highly customizable interception framework that enables aspect-oriented development. In any event, I think it's worth a couple days to give it a try. NOTICE: This message contains privileged and confidential information intended only for the person or entity to which it is addressed. Any review, retransmission, dissemination, copy 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 message in error, please notify the sender immediately by e-mail, facsimile or telephone and thereafter delete the material from any computer. The New Africa Capital Group, its subsidiaries or associates do not accept liability for any personal views expressed in this message. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Struts-Menu onClick forcing a submit
I would have a hidden field which would help you decompose the action selected, since there can be only one submit target. You can use the LookupDispatchAction as a model or you can simply fill the value of the hidden field with your action code, i.e.: onclick=actionField.value='save';document.submit(); Then in your action look for the value of 'actionField' (it would be in your form or in the request parameters). Edgar -Original Message- From: Jack Zakarian [mailto:[EMAIL PROTECTED] Sent: Monday, March 17, 2003 11:10 AM To: 'Struts Users Mailing List' Subject: RE: Struts-Menu onClick forcing a submit Hi Edgar, It's a user requirement to use a horizontal dropdown menu to initiate actions. For example the menu would look like: [Home] [Action] [Query] [Add][Save] [Delete] Cancel FieldQueryNew Delete ClearList All Add Detail Delete Selected ResetNew Query There are different menus based on the screen being displayed. The action class has a number of methods for the above menu. Some of the menu actions will take you to another action-to-screen. Long term the menu options will be selected from a database table or XML file based on the userid and password. If I use the onclick=document.submit(); I will still need to set the forms action to the new url. Thanks for the reply and suggestion. Jack -Original Message- From: Edgar Dollin [mailto:[EMAIL PROTECTED] Sent: Monday, March 17, 2003 10:49 AM To: 'Struts Users Mailing List' Subject: RE: Struts-Menu onClick forcing a submit It is puzzling why you would be using the 'menu' instead of on page links or buttons to submit the form. There is no way to do it using struts-menu selections w/o javascript as they do not render submit buttons. If your menu is within the form /form block try onclick=document.submit(); Also, you might want to use page instead of location although I don't think that is your issue. Page is for same site references, location is for off site references. Edgar -Original Message- From: Jack Zakarian [mailto:[EMAIL PROTECTED] Sent: Monday, March 17, 2003 7:03 AM To: '[EMAIL PROTECTED]' Subject: Struts-Menu onClick forcing a submit Hi, I am using Coolmenu4 and setting location to the URL to execute e.g. location=ServiceInvoice/save.do. I found that this does not force a submit so my action form is not populated. To force a submit I tried the onClick e.g. onClick=submitSave('ServiceInvoice/save.do'). This does not work. The digester that loads the menu-config.xml doesn't like the parameter with single quotes. I tried double quotes and escaped double and single quotes but no luck. e.g. onClick=submitSave(\ServiceInvoice\save.do\) How can I pass a parameter using onClick?. If it is possible to force a submit using the location, page attribute or other approach I would rather do it that way without using javascript. Any help would be appreciated. Thanks, Jack - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: html-el:select
To reply to my own question if I set -- c:set var=xontent value=${ContestForm.map.categories}/ html-el:select property=categoryId size=10 html-el:options collection=xontent property=id labelProperty=categoryName/ /html-el:select This works.. .anil awc wrote: Thanks for the reply... I started to get this message.. ServletException in:/common/bodyText/contest/winner.jsp] Cannot find bean under name [EMAIL PROTECTED], [EMAIL PROTECTED]' I guess exception lot better than no Bean found ... I am geeting closer. The struts release is -- jakarta-struts-1.1-b3-src and tomcat -- 4.1.18. I will try that. Thanks again. .anil Karr, David wrote: Ok, in that case your original syntax was correct. I don't know why it isn't working. I assume you mean by does not work that the variable appears to be empty, and not that you're getting exceptions. If I were you, I would be stepping through this code in your debugger. Set breakpoints on your setters/getters. Inspect your old/new property values at that point. Once you see something unexpected, try to figure out why it is happening. -Original Message- From: awc [mailto:[EMAIL PROTECTED] Sorry I should have added more info. ContestForm is DynaValidatorForm and has form-property name=categories type=java.util.Collection/ form-property name=categoryId type=java.lang.Integer/ if I try html-el:options collection=${ContestForm.categories} property=id labelProperty=categoryName/ with DynaValidatorForm, it does not work. .anil to recap... struts-config.xml form-bean name=ContestForm type=org.apache.struts.validator.DynaValidatorForm form-property name=categories type=java.util.Collection/ form-property name=categoryId type=java.lang.Integer/ /form-bean jsp... html-el:form action=/contest/addcoll html-el:options collection=${ContestForm.map.categories} property=id labelProperty=categoryName/ /html-el:select /html-el:form categories holds instances of Category class. class Category { public Integer getId(); //and set public String getCategoryName(); // and set } --- On some other page.. this works ok.. so it is there. I cannot get this into select... logic-el:iterate id=cats collection=${ContestForm.map.categories} indexId=index trtd c:out value=${cats.categoryName}/ /td td html-el:link page=/contest/add.do?col=catpindex=${ContestForm.map.index}index=${ca ts .index}Remove/html-el:link td /tr /logic-el:iterate .anil - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Webwork vs Struts
Chck this site, it's interesting --Webwork is more flexible for building frameworks to access the model level, that can be integrated in an UI (Swing, ...) --Struts is more useful for handling web actions http://www.rollerweblogger.org/page/roller/20030113 -Message d'origine- De : Butt, Dudley [mailto:[EMAIL PROTECTED] Envoyé : Monday, March 17, 2003 6:12 PM À : '[EMAIL PROTECTED]' Objet : Webwork vs Struts Hi all, I'm in the throws of making a decision as to wether I should go with Struts or Webwork. Has anyone had any experience comparing the 2, who would be able to provide some valuable input? It will be appreciated, thanx Here is a post i made to the webwork site, and a reply i received: === I would please like to know from you guys out there, if anyone has used struts then moved over to using webwork. I would like to know if it is a feasible option, and what the pro's and con's of each are. I have read the FAQ on the comparison between struts and webwork, but i would like to hear from developers who have actually used webwork and struts. Which seems to be the better option? I was an avid Struts users for years before switching over to WebWork. I personally find WebWork a lot easier. Here are some of the things I think WebWork does better: * To perform simple actions with Struts requires a _lot_ of coding from ActionForms to Actions to relatively large config entries. If you look through the archives, I posted a comparison of what it took to create code in each framework. * Struts is strongly tied to the web layer making it inappropriate to directly place business logic there, WebWork isn't. I find with Struts, I end up using it as a wrapper layer around POJOs. Again, increasting the amount of code required. * Struts has a larger, albeit more low level tag library. The WebWork tag library is smaller, and yet I feel like you can get things done quicker as the constructs are higher level. * Finally, with Struts, the typically model is to use the ActionForm to receive input, the Action to wrap the business logic and response content gets placed into the request attributes. That seems pretty messy in comparison to having one disposable object to contain all these items. All in all, I think WebWork has a definite edge over Struts. With the upcoming WebWork2, I think it's hands down in WebWorks favor. In addition to an even cleaner separation of business logic and presentation layer, WebWork2 also implements a highly customizable interception framework that enables aspect-oriented development. In any event, I think it's worth a couple days to give it a try. NOTICE: This message contains privileged and confidential information intended only for the person or entity to which it is addressed. Any review, retransmission, dissemination, copy 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 message in error, please notify the sender immediately by e-mail, facsimile or telephone and thereafter delete the material from any computer. The New Africa Capital Group, its subsidiaries or associates do not accept liability for any personal views expressed in this message. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: having a problem updating my form - starnge error with beanUtils
ALAMI Ahmed wrote: make sure you specified a name attribute for your action element in struts-config action path=/myAction name=myActionForm type=MyActionAction scope=request input=/myAction.jsp forward name=success /action yes i have specified a name - the action mapping is ( customer refers to a form bean i have defined in form-beans ) action path=/updateCustomer name=customer scope=request type=com.lab.struts.customer.CustomerAction parameter=action input=/WEB-INF/jsp/CustomerDetails.jsp attribute=customer forward name=updated path=/WEB-INF/jsp/CustomerDetails.jsp redirect=false / /action -Message d'origine- De : teknokrat [mailto:[EMAIL PROTECTED] Envoyé : Monday, March 17, 2003 5:11 PM À : [EMAIL PROTECTED] Objet : having a problem updating my form - starnge error with beanUtils I have a jsp page that is being populated OK by the form bean. However - when i make changes to the fields and submit it to my action i get the following error java.lang.IllegalArgumentException: No bean specified at org.apache.commons.beanutils.PropertyUtils.getPropertyDescriptor(PropertyUtils.java:837) at org.apache.commons.beanutils.BeanUtils.setProperty(BeanUtils.java:849) at org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:729) at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:1097) at org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.java:798) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:254) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1422) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:523) Does anyone know what this means and what is going on here? thanks p.s. the form is a simple html:form action=myAction.do etc /html:form - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to workaround with the java.net.UnknownHostException: jakarta .apache.org exception (was RE: error deploying struts-example on tomcat4 .1.18)
or the second, cleaner get the last commons-validator build. the bug is corrected thanks a lot, this worked! Best regards Enrico regards Guillaume Compagnon - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
ActionFormBean / FormBeanConfig
Greetings all. I've searched google, looked at the mailing lists and the FAQs and have not been able to come up with a satisfactory explanation of the ActionFormBean class. I would like to initialize my ActionForm class with some custom properties, so I have defined an ActionFormBean which has getters/setters for those properties. In my struts-config I have this form-bean className=com.caleb.web.MyFormBeanConfig name=myForm type=com.caleb.web.MyFormBean set-property property=foo value=bar/ /form-bean From what I gather, this will call setFoo(bar) on an instance of MyFormBeanConfig. Ok, now what? How do I get these properties into MyFormBean? Is it supposed to happen auto-magically? I do have a get/set Foo on MyFormBean, but it is not getting called. I don't see any obvious hooks in ActionFormBean or ActionForm. Is this even what ActionFormBeans are used for? Thanks in advance! --m - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: html-el:select
Yeah, ok, now I remember. The collection attribute of the options tag is just the NAME of the bean which represents the collection. There is no way to specify an EL expression for that which represents the collection itself. This would have been a good place for Struts-EL to have a minor extension from Struts, to allow an attribute which specifies an EL expression for the collection itself. -Original Message- From: awc [mailto:[EMAIL PROTECTED] To reply to my own question if I set -- c:set var=xontent value=${ContestForm.map.categories}/ html-el:select property=categoryId size=10 html-el:options collection=xontent property=id labelProperty=categoryName/ /html-el:select This works.. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] Simulating Concurrent Users
On Wed, 2003-03-05 at 20:19, [EMAIL PROTECTED] wrote: Hi, Is there some open source tool or technique that I can use to simulate concurrent users for our application? I especially want to test our connection pooling implementation. Hi Gaurav, if you prefer an open-source solution, you should check out OpenSTA http://opensta.com/ - unfortunately it only runs on Windoze... Michael. -- Michael Hanisch [EMAIL PROTECTED] Red Hat - RH Interchange Inc., Orleansstrasse 4, D-81669 Munich/Germany phone: +49 (0)89 206058-53 fax: +49 (0)89 206058-88 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
wrapping beans in a form - any ideas
Have there been any discussion on the pros/cons of having forms like class MyForm extends ActionForm { MyBean bean; public void setBean(MyBean bean) { this.bean=bean; } public MyBean getBean() { return bean; } } And then use the properties like so bean:write name=bean property=bean.name / and so on cheers - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Validator Localization
David wrote: I don't think validator supports this but I could be wrong. I believe there's a requirement that forms be defined for the default locale and then for specific locales so that the validator can fall back to the default in case it doesn't find a locale specific formset. Thanks for the reply! Looking in the archives, this topic has been brought up two or three times in the Struts list or the Commons list, but this seems to be the first reply ever. :-( Just to see if I'm understanding your reply, do you suggest that I try defining the full validator set (formset) for each locale, including duplicating the common validations? I really don't need the default, since a locale is always set in this app -- I wanted to use the default locale to define the common validations across all locales. Anyway, I'll try duplicating the full formset for every locale and report back what happens. Thanks again, Paul - Paul Hodgetts -- Principal Consultant Agile Logic -- www.agilelogic.com Consulting, Coaching, Training -- On-Site Out-Sourced Development Java, J2EE, C++, OOA/D -- Agile Methods/XP/Scrum, Use Cases, UI/IA - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
New releases of sslext posted
All: New versions of sslext, the Struts extension for http/https switching, have been posted at http://sslext.sourceforge.net. One new posting is a bug-fixed version for Struts 1.1b3. The bug that was fixed is described below in an email from last week by Dennis Muhlestein. The other new posting is a new posting for Struts 1.1RC1. Both reflect some refactoring that simplifies the code. As a consequence, the ability to specify links including ../ or submodule paths has been eliminated. This is consistent with core Struts. The same capability is available by using the forward attribute of sslext:link. See example app. The versions for Struts 1.1b1 and Struts 1.1b2 are no longer supported and will soon be withdrawn from their posting. For now, they remain posted for comparison purposes. Additional note: One more thing, both new releases also include an additional version of the SecureRequestProcessor called SecureTilesRequestProcessor for use with Tiles. Thanks, Steve --- Dennis Muhlestein [EMAIL PROTECTED] wrote: sslext does not function as expected with modules. Specifically, when operating withing a module (ie: subappfoo), the sslext:link page=/somepage.do does not find the ModuleConfig for the subapplication. Instead, it finds the ModuleConfig for the root module. The reason the example applications in sslext works correctly with subappfoo is that the main module and the subappfoo module have the exact same action mappings and secure properties. Therefore, when you request the true or false page from the subapp, you get a ModuleConfig and SecureActionConfig from the root module that look identical to what you expect to get from the subappfoo module. To demonstrate the bug, change the struts-config-subapp.xml's /true secure property to be false. After this change, you should see neither page going to https. You will see however, that the true page still goes to https (when you are within subappfoo). This is because the secure config used by sslext:link came from the root module. Now go to the root module's index file. You'll see that the links to the true/false pages for the subapp are now correct (neither goes to https). This is because when you specify the module prefex (ie: page=/subappfoo/true.do ) in the sslext:link tags forward,href, or page attribute, the sub application's correct ModuleConfig is found. You can further see that this doesn't function properly by deploying a sub application that does not have the same action mappings as the root application. Then, sslext:link will not find the action requested in the tag, it won't get a ModuleConfig, and it won't be able to tell whether or not your action is supposed to be secure. The links will never change between https and http. They stay on the protocol made by the request that generates the page. The workaround for right now, is to use the href attribute instead of the page attribute on the sslext:link tag and specify the entire url relative to the root module (ie: href=/myModule/myPage.do ). If you have any questions or would like more details let me know. Thanks Dennis - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Validator Localization
As I recall from the last time I messed with the code: The validator first looks for a valid locale which matches down to the variant, then it looks for one that matches to the country, than language, and then finally the base default locale. James -Original Message- From: Paul Hodgetts [mailto:[EMAIL PROTECTED] Sent: Monday, March 17, 2003 1:47 PM To: Struts Users Mailing List Subject: Re: Validator Localization David wrote: I don't think validator supports this but I could be wrong. I believe there's a requirement that forms be defined for the default locale and then for specific locales so that the validator can fall back to the default in case it doesn't find a locale specific formset. Thanks for the reply! Looking in the archives, this topic has been brought up two or three times in the Struts list or the Commons list, but this seems to be the first reply ever. :-( Just to see if I'm understanding your reply, do you suggest that I try defining the full validator set (formset) for each locale, including duplicating the common validations? I really don't need the default, since a locale is always set in this app -- I wanted to use the default locale to define the common validations across all locales. Anyway, I'll try duplicating the full formset for every locale and report back what happens. Thanks again, Paul - Paul Hodgetts -- Principal Consultant Agile Logic -- www.agilelogic.com Consulting, Coaching, Training -- On-Site Out-Sourced Development Java, J2EE, C++, OOA/D -- Agile Methods/XP/Scrum, Use Cases, UI/IA - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Validator Localization
What I'm suggesting is that you define a default formset containing all form fields that need validation. Then define locale specific formsets as needed. If a field isn't in the locale specific formset, I believe the default validation will run. See this bug for more details: http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16920 David Thanks for the reply! Looking in the archives, this topic has been brought up two or three times in the Struts list or the Commons list, but this seems to be the first reply ever. :-( Just to see if I'm understanding your reply, do you suggest that I try defining the full validator set (formset) for each locale, including duplicating the common validations? I really don't need the default, since a locale is always set in this app -- I wanted to use the default locale to define the common validations across all locales. Anyway, I'll try duplicating the full formset for every locale and report back what happens. Thanks again, Paul - Paul Hodgetts -- Principal Consultant Agile Logic -- www.agilelogic.com Consulting, Coaching, Training -- On-Site Out-Sourced Development Java, J2EE, C++, OOA/D -- Agile Methods/XP/Scrum, Use Cases, UI/IA - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. http://join.msn.com/?page=features/virus - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
modules, is it possible to share tiles template?
Hi, Is it possible to share tiles template from submodule? I woudlike to set common look and feel for all sub apps. However, when sub module accesses common tile, all image, stylesheet, etc, referenceses are changed to include sub module as part of the URI. How can I solve this? I tried to use /html:base tag with no success. Env: struts 1.1_b3 tomcat 4.1.8 Thanks, Mark. -- NOTICE: If received in error, please destroy and notify sender. Sender does not waive confidentiality or privilege, and use is prohibited. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Apparent bean:struts / DynaActionForm Class Incompatibility
Hi all, Does anyone know how to get around the following problem: 1. I am using a DynaActionForm class to mediate data exchange between my JSPs and and Action classes. 2. In one JSP, I use the bean:struts / tag to copy one DynaActionForm class to a page scoped scripting variable. 3. Once I have done this, though, I can no longer access the properties of the bean through the scripting variables because the 'getter' method for that property cannot be found. Here is what I think is happening. The bean:struts / implicitly assumes that my DynaActionForm class is actually an ActionForm class. Although this is true since DynaActionForm subclasses ActionForm, their getter and setter methods are quite different. Getter methods in the ActionForm class take the form of 'getproperty' while getter methods in the DynaActionForm class take the form of 'get (property')'. Since my class is of the type DynaActionClass, my JSP fails. Does anyone know a workaround to this? Darryl - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Apparent bean:struts / DynaActionForm Class Incompatibility
bean:struts does *not* get you a handle to an ActionForm instance. If you use: bean:struts id=formBeanConfig formBean=theForm/ Then you get a handle to a FormBeanConfig instance that represents the info in your form-bean name=theForm ... element. Quoting [EMAIL PROTECTED]: Hi all, Does anyone know how to get around the following problem: 1. I am using a DynaActionForm class to mediate data exchange between my JSPs and and Action classes. 2. In one JSP, I use the bean:struts / tag to copy one DynaActionForm class to a page scoped scripting variable. 3. Once I have done this, though, I can no longer access the properties of the bean through the scripting variables because the 'getter' method for that property cannot be found. Here is what I think is happening. The bean:struts / implicitly assumes that my DynaActionForm class is actually an ActionForm class. Although this is true since DynaActionForm subclasses ActionForm, their getter and setter methods are quite different. Getter methods in the ActionForm class take the form of 'getproperty' while getter methods in the DynaActionForm class take the form of 'get (property')'. Since my class is of the type DynaActionClass, my JSP fails. Does anyone know a workaround to this? Darryl - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Kris Schneider mailto:[EMAIL PROTECTED] D.O.Tech http://www.dotech.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Problem with html:message
Hello, While I have had no problems getting errors to display I am unable to get messages displayed. In my jsp page I have the following: ul html:messages id=message li:write name=message//li /html:messages /ul html:errors/ and in the action which loads this pages I have: if ( !authenticate.authenticate(userID,password) ) { if ( authenticate.isLocked() ) { errors.add(ActionErrors.GLOBAL_ERROR,new ActionError(login.locked)); } else { messages.add(ActionMessages.GLOBAL_MESSAGE,new ActionMessage(login.failure)); } saveErrors(request,errors); saveMessages(request,messages); return ( new ActionForward(mapping.getInput())); Does anyone know why the html:message tag isn't displaying the messages? The only time it will display a bullet (without any text) is if there is an error (huh?). Otherwise my message never gets displayed. Resources are setup properly as I am able to retrieve the 'login.failure' text via bean:message.I am using the RC1.1 candidate. Is this a bug? Thanks, Ryan
Re: Problem with html:message
http://jakarta.apache.org/struts/userGuide/struts-html.html#messages David From: Ryan Cuprak [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Problem with html:message Date: Mon, 17 Mar 2003 15:29:58 -0500 Hello, While I have had no problems getting errors to display I am unable to get messages displayed. In my jsp page I have the following: ul html:messages id=message li:write name=message//li /html:messages /ul html:errors/ and in the action which loads this pages I have: if ( !authenticate.authenticate(userID,password) ) { if ( authenticate.isLocked() ) { errors.add(ActionErrors.GLOBAL_ERROR,new ActionError(login.locked)); } else { messages.add(ActionMessages.GLOBAL_MESSAGE,new ActionMessage(login.failure)); } saveErrors(request,errors); saveMessages(request,messages); return ( new ActionForward(mapping.getInput())); Does anyone know why the html:message tag isn't displaying the messages? The only time it will display a bullet (without any text) is if there is an error (huh?). Otherwise my message never gets displayed. Resources are setup properly as I am able to retrieve the 'login.failure' text via bean:message.I am using the RC1.1 candidate. Is this a bug? Thanks, Ryan _ Add photos to your e-mail with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [FRIDAY] List of sites using Struts
Our development group has finished 3 web sites based on Struts for The Hartford (insurance company based in the Hartford, Connecticut). One of them is the auto insurance service site for AARP members. http://aarp.thehartford.com/mypolicy/ Dave -Original Message- From: Jonas Bjornerstedt [mailto:[EMAIL PROTECTED] Sent: Friday, March 14, 2003 5:02 PM To: Struts Users Mailing List Subject: RE: [FRIDAY] List of sites using Struts The Swedish tax authority (Riksskatteverket www.rsv.se) uses Struts for the web tax return and for national registration. (I noticed the .do extension when I did my returns last year.) A Google search gives some links to Swedish consultants involved (for those of you that can read Swedish). http://www.bluefish.se/ http://www.init.se/Company.asp?comp=4infoID=70 Jonas -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: den 14 mars 2003 16:03 To: Struts Users Mailing List Subject: Re: [FRIDAY] List of sites using Struts I came across this canada 411 site: http://canada411.yellowpages.ca/ Robert McIntosh [EMAIL PROTECTED] on 03/14/2003 08:56:55 AM Please respond to Struts Users Mailing List [EMAIL PROTECTED] To:Struts Users Mailing List [EMAIL PROTECTED] cc: Subject:Re: [FRIDAY] List of sites using Struts Good enough :-) You can add Universal Underwriter Group as well. They use it internally http://www.universalunderwriters.com/ ~Robert Chappell, Simon P wrote: Yes. There were rumours that it was out of date. So I followed standard Slashdot procedure and didn't bother checking before putting my own list together. :-) Simon -Original Message- From: Robert McIntosh [mailto:[EMAIL PROTECTED] Sent: Friday, March 14, 2003 8:44 AM To: Struts Users Mailing List Subject: Re: [FRIDAY] List of sites using Struts Is this meant to be what is in addition to what is found here: http://jakarta.apache.org/struts/resources/powered.html ? Just curious... ~Robert Chappell, Simon P wrote: After the interesting exchange the other day, I went back through the emails and composed a list of sites that use Struts. This list can be found on my website and I offer it here for your consideration and abuse (mostly from Mark and former Lisp programmers I expect! :-) http://simonpeter.com/techie/java/struts/sites.html Feel free to suggest other sites that you know of. Simon - Simon P. Chappell [EMAIL PROTECTED] Java Programming Specialist www.landsend.com Lands' End, Inc. (608) 935-4526 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This communication, including attachments, is for the exclusive use of addressee and may contain proprietary, confidential or privileged information. If you are not the intended recipient, any use, copying, disclosure, dissemination or distribution is strictly prohibited. If you are not the intended recipient, please notify the sender immediately by return email and delete this communication and destroy all copies. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Apparent bean:struts / DynaActionForm Class Incompatibility
Hi Kris, Thanks for your help. I think I described my problem a bit incorrectly. This is how I get an error: 1. At the top of the JSP page, I have the following: bean:struts id=theDocumentForm formBean=documentForm / 2. Later, I try writing the value of one of the properties as follows: bean:write name=theDocumentForm property=description / 3. This results in the following error: org.apache.jasper.JasperException: No getter method for property description of bean theDocumentForm If there is no casting issue going on, then I am not sure what I am doing wrong that would lead to this error. Any suggestions? Darryl - Original Message - From: Kris Schneider [EMAIL PROTECTED] Date: Monday, March 17, 2003 1:28 pm Subject: Re: Apparent bean:struts / DynaActionForm Class Incompatibility bean:struts does *not* get you a handle to an ActionForm instance. If you use: bean:struts id=formBeanConfig formBean=theForm/ Then you get a handle to a FormBeanConfig instance that represents the info in your form-bean name=theForm ... element. Quoting [EMAIL PROTECTED]: Hi all, Does anyone know how to get around the following problem: 1. I am using a DynaActionForm class to mediate data exchange between my JSPs and and Action classes. 2. In one JSP, I use the bean:struts / tag to copy one DynaActionForm class to a page scoped scripting variable. 3. Once I have done this, though, I can no longer access the properties of the bean through the scripting variables because the 'getter' method for that property cannot be found. Here is what I think is happening. The bean:struts / implicitly assumes that my DynaActionForm class is actually an ActionForm class. Although this is true since DynaActionForm subclasses ActionForm, their getter and setter methods are quite different. Getter methods in the ActionForm class take the form of 'getproperty' while getter methods in the DynaActionForm class take the form of 'get (property')'. Since my class is of the type DynaActionClass, my JSP fails. Does anyone know a workaround to this? Darryl - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Kris Schneider ') mailto:[EMAIL PROTECTED] D.O.Techtarget=lhttp://www.dotech.com/ --- -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Nested property validation
Is there a way to validate a nested property when the outter property is a collection? For example, can I have a validation (using Struts Validator) like (using the nested tag sample app with monkeys and bananas): all bananas MUST have a description? I know it would be possible to have a set of custom validators to check these cases (nestedRequired, nestedMaxlength etc.), but I'd like to know if it's possible to do the same thing using the basic validators, instead of having to duplicate all of them. Something like: form name=monkeyForm field property=bunch.banana.description depends=required arg0 key=banana.description/ /field /form And that would automatically validate the description of all bananas of the bunch. Thanks in advance for any help. Jorge Mascena - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Validator Localization
James wrote: As I recall from the last time I messed with the code: The validator first looks for a valid locale which matches down to the variant, then it looks for one that matches to the country, than language, and then finally the base default locale. David wrote: What I'm suggesting is that you define a default formset containing all form fields that need validation. Then define locale specific formsets as needed. If a field isn't in the locale specific formset, I believe the default validation will run. See this bug for more details: http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16920 Thanks for trying to help me out! I think I may have a misconception with the validators. Which of these is true? 1. Validation goes through the form field by field. For each field, it looks for a validator definition, and if found runs it on that field. 2. Validation goes through the formset field by field. For each field definition, it runs the validation on the corresponding form field. I was thinking 2, but I now think 1 is more correct. So, bear with me, validation loads the formset corresponding most closely to the current locale, and then for each field in the form it looks for a field definition for it in that formset. If it's not in the locale formset, it looks in the default (true???). If I understand the bug report correctly, I need to define all possible fields in the default formset. I can then override those definitions in the locale-specific formset if I wish. But it won't (or at least it doesn't in my code) find the locale-specific field definition if one isn't also present in the default. That last part is what is confusing me. All of my forms have a first and last name field. Only the en_UK form has a postal code. Only the en_US form has a zip code. But it seems like my default formset has to have all four fields in it. True? If so, that means the only purpose for the locale-specific formset is to override the behavior of a defined field validation. It's not used like tiles definitions to extend a formset, with the ability to add new field definitions to the base formset. Thanks for any clarification. Maybe I need to sit and read the validator code for a few hours, but I was hoping this info was known and/or published somewhere. At least this thread will leave a trail in the archive for others to find... Thanks, Paul - Paul Hodgetts -- Principal Consultant Agile Logic -- www.agilelogic.com Consulting, Coaching, Training -- On-Site Out-Sourced Development Java, J2EE, C++, OOA/D -- Agile Methods/XP/Scrum, Use Cases, UI/IA - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tiles and WebSphere
My Struts 1.1 app. successfully runs on Tomcat using Tiles. Now I'm trying to deploy on Websphere 5.0 and the tiles:insert tag throws a ServletException that says, response already committed. I think it has to do with the tag using the ServletResonse.include() method to insert the tile. I have tried setting the tag's flush attribute to false with no luck. Has anyone had this problem or successfully used Tiles with WAS 5.0? Thanks, David _ Protect your PC - get McAfee.com VirusScan Online http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Apparent bean:struts / DynaActionForm Class Incompatibility
Darryl, As I said, you're not getting an ActionForm (or even a DynaActionForm), you're getting a FormBeanConfig. http://jakarta.apache.org/struts/api/org/apache/struts/config/FormBeanConfig.html FormBeanConfig doesn't have a description property, hence your error. Even if it did, you'd likely get a different error since configuration information is frozen once it's loaded. If you need to get at the form bean associated with an action mapping, I think you can do: bean:struts id=mapping mapping=/someAction/ bean:define id=attribute name=mapping property=attribute/ bean:define id=scope name=mapping property=scope/ bean:define id=form name=%= String.valueOf(attribute) % scope=%= String.valueOf(scope) %/ Of course, this assumes the form bean has already been created... Quoting [EMAIL PROTECTED]: Hi Kris, Thanks for your help. I think I described my problem a bit incorrectly. This is how I get an error: 1. At the top of the JSP page, I have the following: bean:struts id=theDocumentForm formBean=documentForm / 2. Later, I try writing the value of one of the properties as follows: bean:write name=theDocumentForm property=description / 3. This results in the following error: org.apache.jasper.JasperException: No getter method for property description of bean theDocumentForm If there is no casting issue going on, then I am not sure what I am doing wrong that would lead to this error. Any suggestions? Darryl - Original Message - From: Kris Schneider [EMAIL PROTECTED] Date: Monday, March 17, 2003 1:28 pm Subject: Re: Apparent bean:struts / DynaActionForm Class Incompatibility bean:struts does *not* get you a handle to an ActionForm instance. If you use: bean:struts id=formBeanConfig formBean=theForm/ Then you get a handle to a FormBeanConfig instance that represents the info in your form-bean name=theForm ... element. Quoting [EMAIL PROTECTED]: Hi all, Does anyone know how to get around the following problem: 1. I am using a DynaActionForm class to mediate data exchange between my JSPs and and Action classes. 2. In one JSP, I use the bean:struts / tag to copy one DynaActionForm class to a page scoped scripting variable. 3. Once I have done this, though, I can no longer access the properties of the bean through the scripting variables because the 'getter' method for that property cannot be found. Here is what I think is happening. The bean:struts / implicitly assumes that my DynaActionForm class is actually an ActionForm class. Although this is true since DynaActionForm subclasses ActionForm, their getter and setter methods are quite different. Getter methods in the ActionForm class take the form of 'getproperty' while getter methods in the DynaActionForm class take the form of 'get (property')'. Since my class is of the type DynaActionClass, my JSP fails. Does anyone know a workaround to this? Darryl - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Kris Schneider ') mailto:[EMAIL PROTECTED] D.O.Techtarget=lhttp://www.dotech.com/ --- -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Kris Schneider mailto:[EMAIL PROTECTED] D.O.Tech http://www.dotech.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Validator Localization
1. Validation goes through the form field by field. For each field, it looks for a validator definition, and if found runs it on that field. 2. Validation goes through the formset field by field. For each field definition, it runs the validation on the corresponding form field. I was thinking 2, but I now think 1 is more correct. Number 1 is correct. So, bear with me, validation loads the formset corresponding most closely to the current locale, and then for each field in the form it looks for a field definition for it in that formset. If it's not in the locale formset, it looks in the default (true???). AFAIK, yes. If I understand the bug report correctly, I need to define all possible fields in the default formset. I can then override those definitions in the locale-specific formset if I wish. But it won't (or at least it doesn't in my code) find the locale-specific field definition if one isn't also present in the default. Correct. That last part is what is confusing me. All of my forms have a first and last name field. Only the en_UK form has a postal code. Only the en_US form has a zip code. But it seems like my default formset has to have all four fields in it. True? Yes. If so, that means the only purpose for the locale-specific formset is to override the behavior of a defined field validation. It's not used like tiles definitions to extend a formset, with the ability to add new field definitions to the base formset. Thanks for any clarification. Maybe I need to sit and read the validator code for a few hours, but I was hoping this info was known and/or published somewhere. At least this thread will leave a trail in the archive for others to find... I did add a brief note to the validator Struts docs a few days ago. I just recently began coding the Validator so I don't know all the details yet. Thanks, Paul David _ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Apparent bean:struts / DynaActionForm Class Incompatibility
Thank you very much Kris :-) I've never worked with the FormBeanConfig class before, so I thought you were using a generic name in your last letter for the sake of example. I'll brush up on the class and make sure I familiarize myself with more of the Struts API before posting in the future. I appreciate your help. Darryl - Original Message - From: Kris Schneider [EMAIL PROTECTED] Date: Monday, March 17, 2003 2:06 pm Subject: Re: Apparent bean:struts / DynaActionForm Class Incompatibility Darryl, As I said, you're not getting an ActionForm (or even a DynaActionForm), you're getting a FormBeanConfig. http://jakarta.apache.org/struts/api/org/apache/struts/config/FormBeanConfig.html FormBeanConfig doesn't have a description property, hence your error. Even if it did, you'd likely get a different error since configuration information is frozen once it's loaded. If you need to get at the form bean associated with an action mapping, I think you can do: bean:struts id=mapping mapping=/someAction/ bean:define id=attribute name=mapping property=attribute/ bean:define id=scope name=mapping property=scope/ bean:define id=form name=%= String.valueOf(attribute) % scope=%= String.valueOf(scope) %/ Of course, this assumes the form bean has already been created... Quoting [EMAIL PROTECTED]: Hi Kris, Thanks for your help. I think I described my problem a bit incorrectly. This is how I get an error: 1. At the top of the JSP page, I have the following: bean:struts id=theDocumentForm formBean=documentForm / 2. Later, I try writing the value of one of the properties as follows: bean:write name=theDocumentForm property=description / 3. This results in the following error: org.apache.jasper.JasperException: No getter method for property description of bean theDocumentForm If there is no casting issue going on, then I am not sure what I am doing wrong that would lead to this error. Any suggestions? Darryl - Original Message - From: Kris Schneider [EMAIL PROTECTED] Date: Monday, March 17, 2003 1:28 pm Subject: Re: Apparent bean:struts / DynaActionForm Class Incompatibility bean:struts does *not* get you a handle to an ActionForm instance. If you use: bean:struts id=formBeanConfig formBean=theForm/ Then you get a handle to a FormBeanConfig instance that represents the info in your form-bean name=theForm ... element. Quoting [EMAIL PROTECTED]: Hi all, Does anyone know how to get around the following problem: 1. I am using a DynaActionForm class to mediate data exchange between my JSPs and and Action classes. 2. In one JSP, I use the bean:struts / tag to copy one DynaActionForm class to a page scoped scripting variable. 3. Once I have done this, though, I can no longer access the properties of the bean through the scripting variables because the 'getter' method for that property cannot be found. Here is what I think is happening. The bean:struts / implicitly assumes that my DynaActionForm class is actually an ActionForm class. Although this is true since DynaActionForm subclasses ActionForm, their getter and setter methods are quite different. Getter methods in the ActionForm class take the form of 'getproperty' while getter methods in the DynaActionForm class take the form of 'get (property')'. Since my class is of the type DynaActionClass, my JSP fails. Does anyone know a workaround to this? Darryl - To unsubscribe, e-mail: struts-user- [EMAIL PROTECTED] For additional commands, e- mail: [EMAIL PROTECTED] -- Kris Schneider ') ') mailto:[EMAIL PROTECTED] D.O.Techtarget=l target=lhttp://www.dotech.com/ --- -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: struts-user- [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Kris Schneider ') mailto:[EMAIL PROTECTED] D.O.Techtarget=lhttp://www.dotech.com/ --- -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
bean:write and scriptlet write
I have a bean defined on a page. I can write some of the methods using scriptlet code, but not others. However, I can write the others with bean:write. For example, the following code causes a cannot resolve symbol : method getIndexFactor () servlet exception.: %= sortedQueueCursor.getIndexFactor() % But this works on the same page: bean:write name=sortedQueueCursor property=indexFactor/ But I can do the following successfully with the same bean on the same page: %= sortedQueueCursor.getComparatorName() % Both methods return Strings. What am I missing? Thanks
Re: modules, is it possible to share tiles template?
Example: Global Tile: link rel=stylesheet type=text/css href=html:rewrite page='/css/onelook_ie.css'/ Regualar reference, html output: link rel=stylesheet type=text/css href=/sample/css/onelook_ie.css Reference from sub module, html output: link rel=stylesheet type=text/css href=/sample/module/css/onelook_ie.css How to avoid having /module/ as part of URI when referenced from sub module? Thanks, Mark. Mark Zeltser wrote: Hi, Is it possible to share tiles template from submodule? I woudlike to set common look and feel for all sub apps. However, when sub module accesses common tile, all image, stylesheet, etc, referenceses are changed to include sub module as part of the URI. How can I solve this? I tried to use /html:base tag with no success. Env: struts 1.1_b3 tomcat 4.1.8 Thanks, Mark. -- NOTICE: If received in error, please destroy and notify sender. Sender does not waive confidentiality or privilege, and use is prohibited. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- NOTICE: If received in error, please destroy and notify sender. Sender does not waive confidentiality or privilege, and use is prohibited. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
struts auto validation not displaying
Hi all, I have a dynaform field that is being validated but it is not displaying the error msg. I matched everything up several times to make sure everything was there but its still not showing the error messages. I know its validating though because it will return me back to my page. Even a view source of the post error page just shows a blank where the html:errors should have put the error. If I manually create an error and save it however, it will display correctly. (btw.. the unknown=false is because i'm using xdoclet to build the struts-config and I have no idea why its putting that in. It doesnt seem to harm anything though. Can anyone see what I'm doing wrong? Thanks. -Tim // application resource # prompt text prompt.company.name=A company name is required to search on // jsp page ... html:errors/ ... //struts-config form-beans form-bean name=selectCompanyForm type=org.apache.struts.validator.DynaValidatorForm form-property name=companyName type=java.lang.String/ /form-bean /form-beans ... action path=/companySearch type=com.mam.ui.action.CompanySearchAction name=selectCompanyForm scope=request input=select.company.page unknown=false validate=true ... set-property property=pathnames value=/WEB-INF/validator-rules.xml,/WEB-INF/validation.xml,/WEB-INF/validat ion-dyna.xml/ // validation-dyna.xml formset form name=selectCompanyForm field property=companyName depends=required arg0 key=prompt.company.name/ /field /form /formset -Tim - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Validator Localization
Thank you, David and James! I must be understanding things better, because my code now works, and I can make predictable changes to it. ;-) Now that I think of it, Validators work just like Tiles, as far as localization. In Tiles, I need all the puts in the default definition, and then I can override them in the locale-specific definition. The overridden behavior is perhaps a bit more dramatic in Tiles than in Validators, since I can change the way an entire page looks, but it's the same concept. The extends facility in Tiles is not present in Validators (as far as I can tell). That's OK, although it could help clean up the definitions a bit, especially if there are a lot of forms that share common fields. Perhaps that's an area for future feature additions. Thanks again, Paul - Paul Hodgetts -- Principal Consultant Agile Logic -- www.agilelogic.com Consulting, Coaching, Training -- On-Site Out-Sourced Development Java, J2EE, C++, OOA/D -- Agile Methods/XP/Scrum, Use Cases, UI/IA - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem with html:message
I believe it's the struts-bean.tld write attribute which actually does the work here, the struts-html.tld's messages attribute just iterates. Where's the prefix associated with the struts-bean.tld in your snippet, that is, one would expect to see something like: %@ taglib uri=struts-bean prefix=NNN % ... NNN:write name=message/ where you have: :write name=message/ Mike --- Ryan Cuprak [EMAIL PROTECTED] wrote: Hello, While I have had no problems getting errors to display I am unable to get messages displayed. In my jsp page I have the following: ul html:messages id=message li:write name=message//li /html:messages /ul html:errors/ and in the action which loads this pages I have: if ( !authenticate.authenticate(userID,password) ) { if ( authenticate.isLocked() ) { errors.add(ActionErrors.GLOBAL_ERROR,new ActionError(login.locked)); } else { messages.add(ActionMessages.GLOBAL_MESSAGE,new ActionMessage(login.failure)); } saveErrors(request,errors); saveMessages(request,messages); return ( new ActionForward(mapping.getInput())); Does anyone know why the html:message tag isn't displaying the messages? The only time it will display a bullet (without any text) is if there is an error (huh?). Otherwise my message never gets displayed. Resources are setup properly as I am able to retrieve the 'login.failure' text via bean:message.I am using the RC1.1 candidate. Is this a bug? Thanks, Ryan __ Do you Yahoo!? Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop! http://platinum.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tiles and WebSphere
I did sucessfully in WAS 3.5.3. Have not tried in WAS 5.0 From: David Graham [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Tiles and WebSphere Date: Mon, 17 Mar 2003 14:03:38 -0700 My Struts 1.1 app. successfully runs on Tomcat using Tiles. Now I'm trying to deploy on Websphere 5.0 and the tiles:insert tag throws a ServletException that says, response already committed. I think it has to do with the tag using the ServletResonse.include() method to insert the tile. I have tried setting the tag's flush attribute to false with no luck. Has anyone had this problem or successfully used Tiles with WAS 5.0? Thanks, David _ Protect your PC - get McAfee.com VirusScan Online http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Help STOP SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: bean:write and scriptlet write
On Mon, 17 Mar 2003 16:21:00 -0500 Cohan, Sean [EMAIL PROTECTED] wrote: Both methods return Strings. What am I missing? Send the whole JSP to [EMAIL PROTECTED] -- Rick Reumann - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tiles and WebSphere
It's actually a small bug in the Tiles insert tag. In tiles-defs.xml I define these definitions: definition name=tiles.leftnav path=/layout/leftnav.jsp !-- this is the optional secure part of the navigation -- put name=secureLeftNav value=/ /definition !-- defines the secure leftnav piece to insert into main leftnav -- definition name=tiles.secureLeftNav extends=tiles.leftnav put name=secureLeftNav value=/layout/secureLeftNav.jsp/ /definition The first definition defines an optional attribute called secureLeftNav. The second definition extends the first and defines a jsp for that attribute. When hitting a page that uses definition 1 I receive a response already committed error because the tag tries to do an include on a null page (note that this only happens in WAS 5, not Tomcat 4.1.18). I'll commit a fix tonight where the tag will simply return if the page variable is null. David My Struts 1.1 app. successfully runs on Tomcat using Tiles. Now I'm trying to deploy on Websphere 5.0 and the tiles:insert tag throws a ServletException that says, response already committed. I think it has to do with the tag using the ServletResonse.include() method to insert the tile. I have tried setting the tag's flush attribute to false with no luck. Has anyone had this problem or successfully used Tiles with WAS 5.0? Thanks, David _ MSN 8 with e-mail virus protection service: 2 months FREE* http://join.msn.com/?page=features/virus - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Real dynamic properties
[ Disclaimer: Others may disagree - I'm new at this ;) ] The best way is to assign one property to be a HashMap. There are limitations - but none that have really stood in my apps way... 1. See MapBackedForm example in 4.3.2 Map-backed ActionForms of http://jakarta.apache.org/struts/userGuide/building_controller.html#config. - It is possible to refer to elements in the jsp, that do not (yet) have even corresponding entries in the map... very cool... (see above) 2. On that note, a combination of DynaBean form and mapbackedform would probably look like form-bean ... form-property name=value type=java.util.HashMap / ... /form-bean !! HOWEVER !! I had significant problems using the above for html:text name=mydynabean property=value(keyname) / beanUtils refused to populate the field - although it would render. logic:iterate had a problem even when i dealt with each element as a type=Map.MapEntry. Craig, maybe it is not putting the Map.Entry back in place on a populate?? I did have problems using :text and MapEntry - it wouldnt populate to save it's life... Anyway, I didn't get what I wanted from DynaBean. So I've since just 'extended' ValidatorActionForm, http://jakarta.apache.org/struts/api/org/apache/struts/validator/ValidatorAc tionForm.html which seems to work pretty well even with validating fields of Map (truely dynamic) variables without problem, like this: package com.hp.sm.model; import java.util.Map; import java.util.HashMap; import javax.servlet.http.HttpServletRequest; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.commons.beanutils.PropertyUtils; import org.apache.struts.action.ActionMapping; import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionErrors; public class SmModelForm extends org.apache.struts.validator.ValidatorActionForm { private static Log log = LogFactory.getLog(SmModelForm.class); private static boolean debug = true; private final Map values = new HashMap(); private final Map login = new HashMap(); public void setValue(String key, Object value) { values.put(key, value); } public Object getValue(String key) { return values.get(key); } public ActionErrors validate( ActionMapping mapping, HttpServletRequest request) { // validate using the commons-validator and validation.xml ActionErrors errors = super.validate(mapping, request); // perform our additional validation here. if ( (errors==null) || (errors.isEmpty()) ) errors = SmModelHelper.validateSmModelForm( this, request.getSession().getServletContext() ); if ( (errors==null) || (errors.isEmpty()) ) return null; return (errors); } public void reset() { log.info( reset();); values.clear(); // add some fields I want ... setValue(prevState , new java.lang.String() ); setValue(state , new java.lang.String() ); setValue(valid , new java.lang.String() ); setValue(validateModel , new java.lang.String() ); } } [validation.xml] 11 formset 33form name=/login 34 field !-- a dynamic map backed property -- 35property=value(password) 36depends=required 37arg0 key=loginForm.password.error.label / 38 /field 40 field 41property=value(email) 42depends=required,email 43arg0 key=loginForm.email.error.label / 44 /field 45/form 57 /formset 59 /form-validation -Original Message- From: Chalkidis Spyros [mailto:[EMAIL PROTECTED] Sent: Monday, March 17, 2003 4:26 AM To: [EMAIL PROTECTED] Subject: Real dynamic properties Hello, is there a way to configure the properties of a DynaActionForm really dynamically? I mean not to define them in the struts-config.xml but through java code? Thanks in advance, Spyros Halkidis - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [NEWBIE]A very stupid question
My link is created as follows: script language=JavaScript document.write(trtd height='200'p class='enterLink'Welcome to XML-OPbra href='/xml-op/Login.do' class='enterLink'Click here to log in/a/p/td/tr) /script Marco -Original Message- From: Tony Tahbaz [mailto:[EMAIL PROTECTED] Sent: Sunday, March 16, 2003 9:16 PM To: Struts Users Mailing List Subject: RE: [NEWBIE]A very stupid question How are you creating your link? Are you using the struts-html taglib or are you just using html? -Original Message- From: Marco Tedone [mailto:[EMAIL PROTECTED] Sent: Sunday, March 16, 2003 2:07 PM To: Struts-user-list Subject: [NEWBIE]A very stupid question I have my application under the context /xml-op/ In my struts-config.xml file, I define an action with the path=/Login Anyway, when I want to invoke the Login action as a forward, let's say by means of a ForwardAction action mapping, in my jsp page, as href I have to indicate the following: /xml-op/Login.do If I want to invoke the same action from within a form, then I have to omit the /xml-op/ prefix. Anyone of you does know why? TIA, Marco - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [NEWBIE]A very stupid question
Thank you Carl -Original Message- From: Carl Fyffe [mailto:[EMAIL PROTECTED] Sent: Monday, March 17, 2003 3:50 AM To: 'Struts Users Mailing List' Subject: RE: [NEWBIE]A very stupid question Marco, You should use the html:link tag. Use the page instead of href. Page will prepend the correct context path for you. Html:rewrite does this as well so you can use that for linking to images and what not. Here is an example: html:link page=/Login.doLogin/html:link So what Struts will actually output would be: a href=/xml-op/Login.doLogin/a Given that xml-op is your context. Hth, Carl -Original Message- From: Tony Tahbaz [mailto:[EMAIL PROTECTED] Sent: Sunday, March 16, 2003 4:16 PM To: Struts Users Mailing List Subject: RE: [NEWBIE]A very stupid question How are you creating your link? Are you using the struts-html taglib or are you just using html? -Original Message- From: Marco Tedone [mailto:[EMAIL PROTECTED] Sent: Sunday, March 16, 2003 2:07 PM To: Struts-user-list Subject: [NEWBIE]A very stupid question I have my application under the context /xml-op/ In my struts-config.xml file, I define an action with the path=/Login Anyway, when I want to invoke the Login action as a forward, let's say by means of a ForwardAction action mapping, in my jsp page, as href I have to indicate the following: /xml-op/Login.do If I want to invoke the same action from within a form, then I have to omit the /xml-op/ prefix. Anyone of you does know why? TIA, Marco - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]