Re: Is there any free Application for Bug Tracking Software in Java or JSP
Return Receipt Your Re: Is there any free Application for Bug Tracking Software document in Java or JSP : was Dang Minh Phuong/MIS/MECS/SG received by: at: 09/22/2004 02:02:01 PM - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
File Download
Hi All, Sorry if this slightly offline from the topic. I want to give a download link on my browser to the user so that he can download a test file from the server and save it into his local machine . I have given a hyperlink to the user which points directly to the file (download.txt) But the problem is instead of downloading the file the contents of the file get displayed in the browser. What is the best way i can accomplish this? Any help in Struts for doing this? Thanks Shailende Jain - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
success story using Struts in large scale web based system
Hi folks, I am trying to sell the management using Struts framework for the next web based system. Is there a success story I can reference? And how it benefits from using Struts? Any pointer is appreciated. Regards, Alex - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
JSTL and scope
Hi, I am a little surprised that having a class variable imported into a page isn't seen by JSTL contructs. For example if i have a class that defines: package com.company.test public final class MyClass { public static final String TEST = test; } and my JSP page has: [EMAIL PROTECTED] import=com.company.test.MyClass% c:out value=${MyClass.TEST}/ you don't get any output. If you add: % pageContext.setAttribute(test, MyClass.TEST); % and change the JSTL to: c:out value=${test}/ then it works. But surely the MyClass.TEST already had page scope otherwise the setAttribute wouldn't have seen it? The upshot of all this is that I am iterating through a map that can have any one of about 30 keys. Do I really have to put all these keys into the session or some other scope every time I load the page? Thanks, Andy _ Stay in touch with absent friends - get MSN Messenger http://www.msn.co.uk/messenger - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] GMail invites
For all people who have either invites to give, or want an invite you can go to: http://isnoop.net/gmailomatic.php Here you can give away your invites, and receive an invite. DelGurth On Wed, 22 Sep 2004 10:49:08 +0300, Adi [EMAIL PROTECTED] wrote: I wish one, if you still have Ivan Pechorin wrote: I have 5 invites available. Please, send me requests off list. - 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: JSTL and scope
I can see where you are coming from. I would also like to be able to call custom methods on objects rather than just those that have getXXX. I suppose this is all to do with JSTL adhering to strict bean specification with everything acquired by get methods matching class members. you would need a method called getTEST to be able to access using JSTL because doing MyClass.TEST with JSTL violates the bean spec. -Original Message- From: andy wix [mailto:[EMAIL PROTECTED] Sent: 22 September 2004 10:42 To: [EMAIL PROTECTED] Subject: JSTL and scope Hi, I am a little surprised that having a class variable imported into a page isn't seen by JSTL contructs. For example if i have a class that defines: package com.company.test public final class MyClass { public static final String TEST = test; } and my JSP page has: [EMAIL PROTECTED] import=com.company.test.MyClass% c:out value=${MyClass.TEST}/ you don't get any output. If you add: % pageContext.setAttribute(test, MyClass.TEST); % and change the JSTL to: c:out value=${test}/ then it works. But surely the MyClass.TEST already had page scope otherwise the setAttribute wouldn't have seen it? The upshot of all this is that I am iterating through a map that can have any one of about 30 keys. Do I really have to put all these keys into the session or some other scope every time I load the page? Thanks, Andy _ Stay in touch with absent friends - get MSN Messenger http://www.msn.co.uk/messenger - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Developers of QuickAddress Software a href=http://www.qas.com;www.qas.com/a Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
multiple struts-config error
When I am tring to use multiple struts-config xml files in web.xml, I get below error on click of an action. 503 Service Unavailable Servlet error: Parsing error processing resource path /WEB-INF/resr-fin-struts-config.xml, /WEB-INF/resr-tam-struts-config.xml Any input ..??? Regards, Viral
Re: JSTL and scope
As this is a struts list then perhaps you'd consider using a struts action or even perhaps a plain old servlet to do what you need. request.setAttribute(test,MyClass.TEST); if its a map then request.setAttribute(mymap,map); or even Iterator keys = map.keySet().iterator(); while(keys.hasNext()) { String key = keys.next().toString(); request.setAttribute(key,map.get(key)); } ... this way you can access your properties in you page as follows c:out value=${mykey} / which will return the value of the given key. also jsp:useBean id=yourbean class=com.yourdomain.yourpackage.YourClass scope=request / c:out value=${yourbean.yourproperty} / And thus save all that importing in jsp.. HTH Mark On 22 Sep 2004, at 11:42, andy wix wrote: Hi, I am a little surprised that having a class variable imported into a page isn't seen by JSTL contructs. For example if i have a class that defines: package com.company.test public final class MyClass { public static final String TEST = test; } and my JSP page has: [EMAIL PROTECTED] import=com.company.test.MyClass% c:out value=${MyClass.TEST}/ you don't get any output. If you add: % pageContext.setAttribute(test, MyClass.TEST); % and change the JSTL to: c:out value=${test}/ then it works. But surely the MyClass.TEST already had page scope otherwise the setAttribute wouldn't have seen it? The upshot of all this is that I am iterating through a map that can have any one of about 30 keys. Do I really have to put all these keys into the session or some other scope every time I load the page? Thanks, Andy _ Stay in touch with absent friends - get MSN Messenger http://www.msn.co.uk/messenger - 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: multiple struts-config error
I woud remove the preceeding / and any space between entries. Original Message Follows From: Viral_Thakkar [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: multiple struts-config error Date: Wed, 22 Sep 2004 15:21:21 +0530 When I am tring to use multiple struts-config xml files in web.xml, I get below error on click of an action. 503 Service Unavailable Servlet error: Parsing error processing resource path /WEB-INF/resr-fin-struts-config.xml, /WEB-INF/resr-tam-struts-config.xml Any input ..??? Regards, Viral - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: multiple struts-config error
By any chance are you trying to map both these struts file as same input parameter. Better try this, init-param param-nameconfig/param-name param-value/WEB-INF/resr-fin-struts-config.xml/param-value /init-param init-param param-nameconfig/app2/param-name param-value/WEB-INF/resr-tam-struts-config.xml/param-value /init-param You will be able to access action classes for your 2nd struts-config as mentioned below http://localhost/app2/YourActionClass.do Hope this helps. - Ashutosh -Original Message- From: Mark Benussi [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 22, 2004 3:42 PM To: [EMAIL PROTECTED] Subject: RE: multiple struts-config error I woud remove the preceeding / and any space between entries. Original Message Follows From: Viral_Thakkar [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: multiple struts-config error Date: Wed, 22 Sep 2004 15:21:21 +0530 When I am tring to use multiple struts-config xml files in web.xml, I get below error on click of an action. 503 Service Unavailable Servlet error: Parsing error processing resource path /WEB-INF/resr-fin-struts-config.xml, /WEB-INF/resr-tam-struts-config.xml Any input ..??? Regards, Viral - 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: Is there any free Application for Bug Tracking Software in Java or JSP
Amit Gupta wrote:snip Can you *please* turn off your return receipt request? Thanks. -- /** * @author Darryl L. Pierce [EMAIL PROTECTED] * @seeThe Infobahn Offramp http://mcpierce.mypage.org * @quote Lobby, lobby, lobby, lobby, lobby, lobby... - Adrian Monk */ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Is there any free Application for Bug Tracking Software in Java or JSP
Return Receipt Your Re: Is there any free Application for Bug Tracking Software document in Java or JSP : was Dennis Graham/EvergreenFunds received by: at: 09/22/2004 07:43:32 AM - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Is there any free Application for Bug Tracking Software in Java or JSP
Return Receipt Your Re: Is there any free Application for Bug Tracking Software document in Java or JSP : was Dennis Graham/EvergreenFunds received by: at: 09/22/2004 07:43:51 AM - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: success story using Struts in large scale web based system
Hi Alex, this question was asked before, so I searched the archives and found the following threads: http://marc.theaimsgroup.com/?l=struts-userm=99851089726272w=2 and http://marc.theaimsgroup.com/?l=struts-userm=99307752323367w=2 and http://marc.theaimsgroup.com/?l=struts-userm=98467412717873w=2 I think I remember at least one of these perhaps having a link to a site with a list of companies using Struts successfully. Regards, Geeta -Original Message- From: Alex Lui [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 22, 2004 5:36 AM To: [EMAIL PROTECTED] Subject: success story using Struts in large scale web based system Hi folks, I am trying to sell the management using Struts framework for the next web based system. Is there a success story I can reference? And how it benefits from using Struts? Any pointer is appreciated. Regards, Alex - 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: Multiple modules with multiple tile definition files
Okay, I found a way to do what I wanted, but not as cleaning as I'd have liked. Here's what I did. First, I created Tiles definition file for each module in the application. Then in one of the module's Struts configuration file I put in the TilesPlugin definition and listed each module's Tiles definition file. In my case I put this in the Struts config associated with the default struts module (that one defined simply as config/ in the web.xml). Then I defined each additional module's Struts configuration file in the web.xml like normal. In each module's Struts config file I defined the Tiles request processor as the controller but not the TilesPlugin. This seems to work just fine. It's not as flexible as I'd like but it does the job. Lajoie Chad wrote: I'm having an issue getting Tiles to work with Struts 1.1 in a modular application setup. Here is what I'm trying to do. In each module I want a module specific Tiles definition file and a global definitions file. In each module the Struts config file for that module has something like the following Tiles plugin configuration: plug-in className=org.apache.struts.tiles.TilesPlugin set-property property=definitions-config value=/WEB-INF/tiles-def/global.xml, /WEB-INF/tiles-def/sysadmin.xml/ set-property property=definitions-debug value=2/ set-property property=definitions-parser-validate value=true / set-property property=moduleAware value=true / /plug-in What I expected to see is that as Struts configured each module it would read the plugin definition and load the global Tiles file and then load the module specific one. Thus each module would have access to it's page definitions but no other ones (unless they were in the global.xml file). Instead, what I am seeing is that only the Tiles files listed in the TilesPlugin configuration of the first module Struts configures gets used in every module. Thus all the other modules can't find their page definitions. Can I do what I want and if so what I am missing to make this work? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Chad La Joie Booz | Allen | Hamilton (703) 377-1300 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: session lost while using opensta
This not really the place to find opensta or jboss experts. You really should ask on a opensta and/or jboss forum. -- James Mitchell Software Engineer / Open Source Evangelist EdgeTech, Inc. 678.910.8017 AIM: jmitchtx - Original Message - From: panhandlealks [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, September 22, 2004 2:49 AM Subject: session lost while using opensta Hi there, I am developing an application with struts which works fine with jboss. Now I want to make some stress- and performance-tests with opensta but it doesnt work at all. To me it seems that the session is lost after each request. Any ideas ? - 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: question related to action and tile
You may want to try adding this to the header of your jsp: meta http-equiv=expires content=1 / meta http-equiv=pragma content=no-cache / When the reload button is clicked, the browser should ask the user whether he/she wants to resend the entered information. It does not solve you problem completely (if the user chooses to resend the information, it is processed by the action again. But, on the other hand, you should take care of this e.g. in you validate method - maybe checking for existing name, id, etc.), but at least alerts the user, that he/she is doing someting repeatedly. Radek -Original Message- From: Lijuan Jing [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 22, 2004 9:53 AM To: [EMAIL PROTECTED] Subject: question related to action and tile This is a question related to action and tile. action path=someURL name=submitForm type=someActionClass forward name=success path=.pages.tileDef1/ /action --- tile definition: definition name=.pages.Base path=/pages/common/layouts/baseLayout.jsp put name=footer value=/pages/common/header.jsp / put name=content value=/pages/content/home_content.jsp / put name=footer value=/pages/common/footer.jsp / /definition definition name=.pages.tileDef1 extends=.pages.Base put name=content value=/pages/content/real_content.jsp / /definition After someActionClass executed successfully, it displays page .pages.tileDef1, but the URL on browser still shows someURL. If user clicks browser's refresh button, the 'submitForm' will be submitted again and 'someActionClass' will be executed again which end up processing the 'submitForm' multiple times depends on how many time user clicks refresh. It becomes worse if the content of the form will be written to database. How do I know (while I am in action code) if it comes from the real button click or the refresh button click? Or I could show a different URL after the form is processed, then a dummy action has to be added. Not a clean way to do. action path=someURL name=submitForm type=someActionClass forward name=success path=/do/dummy/ /action action path=/dummy name=dummyForm type=dummyActionClass forward name=success path=.pages.tileDef1/ /action Thanks, Lijuan __ Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages! http://promotions.yahoo.com/new_mail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[OT] Returned Receipts
I would like to respectfully request that those of you have returned receipts enabled in your emails to this mailing list, please disable them. I know they have a legitimate purpose in some cases, but for those searching the archives on a thread subject and getting a bunch of returned receipt notices in the search results is not very helpful. In addition, they are just another annoying windoze event I have to address when scrolling through email messages in my client. Maybe that's my fault, maybe I should use a different client or maybe there is a way to disable the returned receipt events in my email client. Never the less, the returned receipts become part of the mailing list archives and just take up valuable knowledge space. robert - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: multiple struts-config error
Ashutosh's example is for configuring Struts to use multiple modules. However, Struts does support a comma-separated list of struts-config files as the value of the 'config' init parameter (or any config/* init parameter for modules.) I find having multiple struts-config files helps considerably to manage a large project, but I find that the module development model generally doesn't suit my applications, so I do what Viral is trying to do all the time. Furthermore, whitespace and leading slashes are not a problem: Here's what I have in one project: init-param param-nameconfig/param-name param-value /WEB-INF/struts-config.xml, /WEB-INF/library/struts-config.xml, /WEB-INF/image/struts-config.xml, /WEB-INF/reporting/struts-config.xml, /WEB-INF/offer/struts-config.xml, /WEB-INF/configure/struts-config.xml, /WEB-INF/customizeflow/struts-config.xml, /WEB-INF/preferences/struts-config.xml, /WEB-INF/help/struts-config.xml, /WEB-INF/group/struts-config.xml, /WEB-INF/media/struts-config.xml, /WEB-INF/deliver/struts-config.xml, /WEB-INF/dealer/struts-config.xml, /WEB-INF/agency/struts-config.xml, /WEB-INF/planner/struts-config.xml, /WEB-INF/coop/struts-config.xml, /WEB-INF/proxy/struts-config.xml, /WEB-INF/training/struts-config.xml, /WEB-INF/contentmgmt/struts-config.xml /param-value /init-param All those spaces and newlines are ignored. This is in Struts 1.2, but I believe this functionality goes back a ways. By the way, for those thinking about using this, I find using directories instead of merely unique file names helps keep things organized. It gives you a place to put related Validator and Tiles config files (both of which also support any number of config files) and I like to be able to do searches across all files named struts-config.xml (like this morning when I found another developer had defined a global exception handler which was overriding the exception config I had put in the first struts-config file.) I've never had a problem with this, so I'm not sure what to suggest, but I can tell you that it will work. Joe At 3:50 PM +0530 9/22/04, Ashutosh Satyam wrote: By any chance are you trying to map both these struts file as same input parameter. Better try this, init-param param-nameconfig/param-name param-value/WEB-INF/resr-fin-struts-config.xml/param-value /init-param init-param param-nameconfig/app2/param-name param-value/WEB-INF/resr-tam-struts-config.xml/param-value /init-param You will be able to access action classes for your 2nd struts-config as mentioned below http://localhost/app2/YourActionClass.do Hope this helps. - Ashutosh -Original Message- From: Mark Benussi [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 22, 2004 3:42 PM To: [EMAIL PROTECTED] Subject: RE: multiple struts-config error I woud remove the preceeding / and any space between entries. Original Message Follows From: Viral_Thakkar [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: multiple struts-config error Date: Wed, 22 Sep 2004 15:21:21 +0530 When I am tring to use multiple struts-config xml files in web.xml, I get below error on click of an action. 503 Service Unavailable Servlet error: Parsing error processing resource path /WEB-INF/resr-fin-struts-config.xml, /WEB-INF/resr-tam-struts-config.xml Any input ..??? Regards, Viral - 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] -- Joe Germuska [EMAIL PROTECTED] http://blog.germuska.com In fact, when I die, if I don't hear 'A Love Supreme,' I'll turn back; I'll know I'm in the wrong place. - Carlos Santana
Re: File Download
Robert et al- Check out this DownloadServlet example at http://www.experts-exchange.com/Web/Web_Languages/JSP/Q_20842012.html HTH, Martin- - Original Message - From: Robert Shields [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Wednesday, September 22, 2004 4:59 AM Subject: RE: File Download Hi, One way to do this is to set a header named content-disposition with a value of attachment;filename=download.txt So the raw http header would look like this: content-disposition: attachment;filename=download.txt This will cause your browser to open the standard open/save dialog. How you set the header is another story! Maybe use a servlet-mapping to map download.txt to a servlet and call response.addHeader from that servlet. Regards Rob -Original Message- From: Shailender Jain [mailto:[EMAIL PROTECTED] Sent: 22 September 2004 09:28 To: [EMAIL PROTECTED] Subject: File Download Hi All, Sorry if this slightly offline from the topic. I want to give a download link on my browser to the user so that he can download a test file from the server and save it into his local machine I have given a hyperlink to the user which points directly to the file (download.txt) But the problem is instead of downloading the file the contents of the file get displayed in the browser. What is the best way i can accomplish this? Any help in Struts for doing this? Thanks Shailende Jain __ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email __ - 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: trying to implement 2 resource bundles and getting odd errors
I am pretty sure that you must have one of the message-resources defined without a key (essentially being the default bundle). -Bill Siggelkow Janice wrote: So, yes, I waited until the very last minute to split my resource bundle into 2 in order to keep maintenance simpler. But some pages in my app are now spitting the dreaded: Cannot find message resources under key org.apache.struts.action.MESSAGE at me. Most of the pages are fine, and all of my .jsps are using bean:message /, so I'm thinking I've got things set up correctly for the most part. Has anyone else run into this? What on earth am I missing? Here's a bit from struts-config.xml: message-resources key=default parameter=ApplicationResources/ message-resources key=reports parameter=ReportResources/ I had previously been using just the first one, so I added 'bundle=default' or 'bundle=reports' to everywhere I was using bean:message /. I'm thinking that there's some implicit stuff happening now that I don't understand. Here's an example of a spot that chokes: Here's the reference to the code in the error: at _jsp._admin._persorg._org__list._jspService(_org__list.java:251) [SRC:/jsp/admin/persOrg/org_list.jsp:43] Here's lines 42/3 from the .jsp: 42:tr class=body % if (++rowcount % 2 == 0) { % bgcolor = bean:message bundle=default key=style.altColour/; % } % 43: td valign=topa href=%=request.getContextPath() %/organization.do?action=showFormaddEdit=editid=bean:write name=widget property=id / onMouseOut=MM_swapImgRestore() onMouseOver=MM_swapImage('Image%=rowcount %','','../../images/app/icon_arrow_rtcol1.gif',1)img src=../../images/app/icon_arrow_rtcol.gif name=Image%=rowcount % width=18 height=17 border=0/a/td And here's lines 251/2 in the .java: __jsp_taghandler_12.setBundle(default); __jsp_taghandler_12.setKey(style.altColour); That key does exist in ApplicationResources and it is successfully used by several other .jsp pages. Line 42 in the .jsp is used several times in different files. I don't know whether I've provided the correct information. I'd be happy to provide some more if I thought it might help me fix it. I'm just about ready to go with one file again, but I'd like to solve this first! Oh, I'm using struts 1.1. Thanks in advance! Janice - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: question related to action and tile
Lijuan Jing wrote: This is a question related to action and tile. action path=someURL name=submitForm type=someActionClass forward name=success path=.pages.tileDef1/ /action --- tile definition: definition name=.pages.Base path=/pages/common/layouts/baseLayout.jsp put name=footer value=/pages/common/header.jsp / put name=content value=/pages/content/home_content.jsp / put name=footer value=/pages/common/footer.jsp / /definition definition name=.pages.tileDef1 extends=.pages.Base put name=content value=/pages/content/real_content.jsp / /definition After someActionClass executed successfully, it displays page .pages.tileDef1, but the URL on browser still shows someURL. If user clicks browser's refresh button, the 'submitForm' will be submitted again and 'someActionClass' will be executed again which end up processing the 'submitForm' multiple times depends on how many time user clicks refresh. It becomes worse if the content of the form will be written to database. How do I know (while I am in action code) if it comes from the real button click or the refresh button click? Or I could show a different URL after the form is processed, then a dummy action has to be added. Not a clean way to do. action path=someURL name=submitForm type=someActionClass forward name=success path=/do/dummy/ /action action path=/dummy name=dummyForm type=dummyActionClass forward name=success path=.pages.tileDef1/ /action Thanks, Lijuan __ Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages! http://promotions.yahoo.com/new_mail Which method (GET or POST) are you using to submit the request? If the request will be modifying data in a database, you should be using the POST method. When issuing a reload using the POST method, browsers will display a message to the user warning that they are re-sending duplicate information. If you want to be absolutely sure that your request is a new request, you will probably need to include some sort of token parameter in the request. When you generate the original form, you generate a random number. You store this number as a session attribute named expectedToken and send it to the user as the value of a hidden form field named token. The user fills out the form and sends it back to you. If the token parameter matches the expectedToken attribute, then you change (or delete) the expectedToken attribute and process the request. If they do not match, you return a meaningful error to the user. There is no way in standard HTTP / Servlets to distinguish between a refresh and an original request. Jeff Beal - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Need Best Practices Thoughts on Actions
You won't be guaranteed to catch any event like browser close or the user clicking alternate navigation, bookmarks or even typing in a new url. If it were are definite requirement, you could simply attempt to catch that even, then prompt the user with something like Warning - you have unsaved changes. If you wish to save your changes press ok. -- James Mitchell Software Engineer / Open Source Evangelist EdgeTech, Inc. 678.910.8017 AIM: jmitchtx - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, September 22, 2004 9:07 AM Subject: Need Best Practices Thoughts on Actions I've got a requirement where if the user tries to leave a form without saving changed data they have the option to save on the fly before going to the link they clicked or go to the link without saving the data. On the save option I pass the destination (the name of a forward in the SaveAction action tag of strut-config) to the SaveAction which does the lookup then forwards to their destination. My problem is how to handle the option of not saving. My thought now is to have a RouterAction class that takes a request parm and uses it to look up a forward in it's action mapping. Is this an good way to handle this or are there better ways? - 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: Need Best Practices Thoughts on Actions
I've had the same requirement a couple of times. The way I've settled on doing it, whether it's the best or not I don't know, is this... I used client-side scripting to prompt the user whether they want to save or not (just some simple dirty data checking, i.e., any time they press a key I set a JavaScript variable to true, which indicates data has changed). Whether they choose yes or no determines what the target of my form submission is... It would either be something like ThisFormSave.app or ThisFormNoSave.app (changed dynamically via scripting). In struts-config, I map both of them to the same Action. Then in the Action I do: String path = mapping.getPath(); ...then you see whether path is /ThisFormSave or /ThisFormNoSave. Obviously save if appropriate. I also set a hidden form field that specifies where they are going next, which is what forward to use. That's it. On a couple of pages there are a small, finite number of links, in which case I actually had an Action mapping for each one with a Save and NoSave version, all mapped to the same Action, and I check for the NoSave substring. If not present, I do the save. The first approach I think works out better though... A little more client-side scripting, but a less verbose struts-config.xml. Matter of taste either way. -- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com On Wed, September 22, 2004 10:03 am, James Mitchell said: You won't be guaranteed to catch any event like browser close or the user clicking alternate navigation, bookmarks or even typing in a new url. If it were are definite requirement, you could simply attempt to catch that even, then prompt the user with something like Warning - you have unsaved changes. If you wish to save your changes press ok. -- James Mitchell Software Engineer / Open Source Evangelist EdgeTech, Inc. 678.910.8017 AIM: jmitchtx - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, September 22, 2004 9:07 AM Subject: Need Best Practices Thoughts on Actions I've got a requirement where if the user tries to leave a form without saving changed data they have the option to save on the fly before going to the link they clicked or go to the link without saving the data. On the save option I pass the destination (the name of a forward in the SaveAction action tag of strut-config) to the SaveAction which does the lookup then forwards to their destination. My problem is how to handle the option of not saving. My thought now is to have a RouterAction class that takes a request parm and uses it to look up a forward in it's action mapping. Is this an good way to handle this or are there better ways? - 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: success story using Struts in large scale web based system
Vodafone use Struts and Vauxhall motors are planning to use it in a rewite of their site I hear. Original Message Follows From: Chappell, Simon P [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: RE: success story using Struts in large scale web based system Date: Wed, 22 Sep 2004 08:52:40 -0500 -Original Message- From: Geeta Ramani [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 22, 2004 6:53 AM To: Struts Users Mailing List Subject: RE: success story using Struts in large scale web based system snip I think I remember at least one of these perhaps having a link to a site with a list of companies using Struts successfully. This might be that list. :-) http://www.simonpeter.com/techie/java/struts/sites.html Simon - Simon P. Chappell [EMAIL PROTECTED] Java Programming Specialist www.landsend.com Lands' End, Inc. (608) 935-4526 Some problems are so complex that you have to be highly intelligent and well-informed just to be undecided about them. - Laurence J. Peter - 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:[solved] Need Best Practices Thoughts on Actions
Thanks to Jim Frank for your help. While you guys were responding I ended up using a variation. If they click save I go ahead and submit the form w/ a hidden field for destination. If they don't want to save I go to a RouterAction with the destination as a request parm. The RouterAction then gets the forward mapping passed on the the request parm. Frank W. Zammetti (MLists) [EMAIL PROTECTED] wrote on 09/22/2004 10:12:38 AM: I've had the same requirement a couple of times. The way I've settled on doing it, whether it's the best or not I don't know, is this... I used client-side scripting to prompt the user whether they want to save or not (just some simple dirty data checking, i.e., any time they press a key I set a JavaScript variable to true, which indicates data has changed). Whether they choose yes or no determines what the target of my form submission is... It would either be something like ThisFormSave.app or ThisFormNoSave.app (changed dynamically via scripting). In struts-config, I map both of them to the same Action. Then in the Action I do: String path = mapping.getPath(); ...then you see whether path is /ThisFormSave or /ThisFormNoSave. Obviously save if appropriate. I also set a hidden form field that specifies where they are going next, which is what forward to use. That's it. On a couple of pages there are a small, finite number of links, in which case I actually had an Action mapping for each one with a Save and NoSave version, all mapped to the same Action, and I check for the NoSave substring. If not present, I do the save. The first approach I think works out better though... A little more client-side scripting, but a less verbose struts-config.xml. Matter of taste either way. -- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com On Wed, September 22, 2004 10:03 am, James Mitchell said: You won't be guaranteed to catch any event like browser close or the user clicking alternate navigation, bookmarks or even typing in a new url. If it were are definite requirement, you could simply attempt to catch that even, then prompt the user with something like Warning - you have unsaved changes. If you wish to save your changes press ok. -- James Mitchell Software Engineer / Open Source Evangelist EdgeTech, Inc. 678.910.8017 AIM: jmitchtx - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, September 22, 2004 9:07 AM Subject: Need Best Practices Thoughts on Actions I've got a requirement where if the user tries to leave a form without saving changed data they have the option to save on the fly before going to the link they clicked or go to the link without saving the data. On the save option I pass the destination (the name of a forward in the SaveAction action tag of strut-config) to the SaveAction which does the lookup then forwards to their destination. My problem is how to handle the option of not saving. My thought now is to have a RouterAction class that takes a request parm and uses it to look up a forward in it's action mapping. Is this an good way to handle this or are there better ways? - 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]
Transfer Data Objects between Actions and Views
Hi, I come across the following code. It uses request.setAttribute(employee,employeeDTO); for transfering employeeDTO. Is it the only practice for doing this? -- Regards, M. Onur Tokan code package net.reumann; import org.apache.struts.action.Action; import org.apache.struts.action.ActionForward; import org.apache.struts.action.ActionMapping; import org.apache.struts.action.ActionForm; import org.apache.commons.beanutils.BeanUtils; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; public final class InsertEmployeeAction extends Action { public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { EmployeeService service = new EmployeeService(); EmployeeForm employeeForm = (EmployeeForm) form; EmployeeDTO employeeDTO = new EmployeeDTO(); BeanUtils.copyProperties( employeeDTO, employeeForm ); service.insertEmployee( employeeDTO ); request.setAttribute(employee,employeeDTO); return (mapping.findForward(success)); } } /code - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Cannot map default resource bundle?
My struts-config.xml contains more than one resource file. The default one cannot be mapped in bean:message, without specifing bundle. What needs to be changed? (I keep the default resource file for ValidatorForm.) Thanks Error Message: javax.servlet.ServletException: Missing message for key main.title org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:825) Welcome.jsp: head titlebean:message key=main.title//title html:base/ /head My struts-config.xml: message-resources parameter=com.common.resources.ApplicationResources null=false / message-resources parameter=com.erp.quotation.ApplicationResources key=quotation null=false / - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Transfer Data Objects between Actions and Views
Hi.. Hmmm.. I do not see why (in the code you came across) one should both populate a form with the properties of the DTO + set the DTO as an attribute on the request object? It should be enough to populate the form with properties from the DTO. I have seen other solutions where Views (JSPs) always contains a Form tag (eg. form bean). When you populate the form bean from the action you do something like this. pseudo code, action: // Form bean representing the view myFormBean.setVO(myVO); pseudo code, form private MyVOClass myVO; private void populate() { // Call methods to populate form } // Setter that get called from action void setVO(MyVOClass myVO) { this.myVO = myVO; populate(); } The VO could also contain selections for listboxes, comboboxes, etc. So that the VO is View (form) specific, and the DTO (the object/data you really want to store) can be extracted from the VO. You can say that with this approach you have two objects DTO: The object that travels across tiers and is persisted, maybe as entity beans or whatever. VO: The view specific object that holds the DTO and what else is needed for generating the view. So the DTO is a subset of the VO. I think is is a nice way to do things, but it introduces yet another object representing the same data. On the other hand it clean separates what data is needed for the generating the view (VO) and what data is needed to be persisted or transferred to antoher tier (DTO). My few cents Regards Henrik - Original Message - From: M. Onur Tokan [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, September 22, 2004 5:05 PM Subject: Transfer Data Objects between Actions and Views Hi, I come across the following code. It uses request.setAttribute(employee,employeeDTO); for transfering employeeDTO. Is it the only practice for doing this? -- Regards, M. Onur Tokan code package net.reumann; import org.apache.struts.action.Action; import org.apache.struts.action.ActionForward; import org.apache.struts.action.ActionMapping; import org.apache.struts.action.ActionForm; import org.apache.commons.beanutils.BeanUtils; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; public final class InsertEmployeeAction extends Action { public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { EmployeeService service = new EmployeeService(); EmployeeForm employeeForm = (EmployeeForm) form; EmployeeDTO employeeDTO = new EmployeeDTO(); BeanUtils.copyProperties( employeeDTO, employeeForm ); service.insertEmployee( employeeDTO ); request.setAttribute(employee,employeeDTO); return (mapping.findForward(success)); } } /code - 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]
error in strutsel-exercise-taglib
Hello All, I tried deploying the example webapp that comes with the contrib/struts-el taglibs and am getting the following exception accessing the index.jsp: java.lang.NullPointerException org.apache.struts.taglib.TagUtils.pageURL(TagUtils.java:1114) org.apache.struts.taglib.TagUtils.computeURLWithCharEncoding(TagUtils.java:466) org.apache.struts.taglib.TagUtils.computeURLWithCharEncoding(TagUtils.java:329) org.apache.struts.taglib.html.LinkTag.calculateURL(LinkTag.java:475) org.apache.struts.taglib.html.LinkTag.doStartTag(LinkTag.java:334) org.apache.strutsel.taglib.html.ELLinkTag.doStartTag(ELLinkTag.java:666) org.apache.jsp.index_jsp._jspx_meth_html$1el_link_0(index_jsp.java:146) org.apache.jsp.index_jsp._jspService(index_jsp.java:118) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94) javax.servlet.http.HttpServlet.service(HttpServlet.java:810) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:298) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236) javax.servlet.http.HttpServlet.service(HttpServlet.java:810) Can anyone suggest what the problem might be? Struts version 1.2.4, Tomcat 5.0.25. Thanks! -- john = John Cartwright Associate Scientist Geospatial Data Services Group CIRES, National Geophysical Data Center/NOAA (303) 497-6284 [EMAIL PROTECTED] = - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Forward to a file on hard drive
Is it possible to forward to a file on a hard drive? I set up a global forward like this forward name=lapTop path=C:\project\WorkQueueLaptop.html I've since learned that the path is context relative so this is a no go. What technique do I need to use? Is it possible to handle this form the config file? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: success story using Struts in large scale web based system
Simon - I'm not involved with the development at all, but it appears that Wal-Mart's online store uses Struts for its checkout screens (the cart itself is not Struts though it seems.) Maybe you can update your site with it. Also, this is OT, but anybody have a guess as to what their cart *is* programmed in? The extension on the files is .gsp... Matt Chappell, Simon P wrote: -Original Message- From: Geeta Ramani [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 22, 2004 6:53 AM To: Struts Users Mailing List Subject: RE: success story using Struts in large scale web based system snip I think I remember at least one of these perhaps having a link to a site with a list of companies using Struts successfully. This might be that list. :-) http://www.simonpeter.com/techie/java/struts/sites.html Simon - Simon P. Chappell [EMAIL PROTECTED] Java Programming Specialist www.landsend.com Lands' End, Inc. (608) 935-4526 Some problems are so complex that you have to be highly intelligent and well-informed just to be undecided about them. - Laurence J. Peter - 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: Forward to a file on hard drive
If you need to forward to a resource outside the current web context, you can try using a redirect. forward name=lapTop path=http://gmail.google.com; redirect=true/ Now, whether it'll work when you point it to a local resource... I think what you'll get is the user's browser will try to look for that file on the user's machine. Hubert On Wed, 22 Sep 2004 11:50:29 -0400, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Is it possible to forward to a file on a hard drive? I set up a global forward like this forward name=lapTop path=C:\project\WorkQueueLaptop.html I've since learned that the path is context relative so this is a no go. What technique do I need to use? Is it possible to handle this form the config file? - 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: success story using Struts in large scale web based system
Hi Could be that they just made up GSP to prevent you from knowing and actually forward that to a Java app server or maybe even ASP. This is sometimes done as a security measure and is easy to do. Allistair. -Original Message- From: Matt Bathje [mailto:[EMAIL PROTECTED] Sent: 22 September 2004 17:07 To: Struts Users Mailing List Subject: Re: success story using Struts in large scale web based system Simon - I'm not involved with the development at all, but it appears that Wal-Mart's online store uses Struts for its checkout screens (the cart itself is not Struts though it seems.) Maybe you can update your site with it. Also, this is OT, but anybody have a guess as to what their cart *is* programmed in? The extension on the files is .gsp... Matt Chappell, Simon P wrote: -Original Message- From: Geeta Ramani [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 22, 2004 6:53 AM To: Struts Users Mailing List Subject: RE: success story using Struts in large scale web based system snip I think I remember at least one of these perhaps having a link to a site with a list of companies using Struts successfully. This might be that list. :-) http://www.simonpeter.com/techie/java/struts/sites.html Simon - Simon P. Chappell [EMAIL PROTECTED] Java Programming Specialist www.landsend.com Lands' End, Inc. (608) 935-4526 Some problems are so complex that you have to be highly intelligent and well-informed just to be undecided about them. - Laurence J. Peter - 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] FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Developers of QuickAddress Software a href=http://www.qas.com;www.qas.com/a Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: success story using Struts in large scale web based system
Thats what I figured...I think with the struts based checkout (unless that is ALSO a security measure :) ) its kind of obvious that it is jsp though :) Matt Allistair Crossley wrote: Hi Could be that they just made up GSP to prevent you from knowing and actually forward that to a Java app server or maybe even ASP. This is sometimes done as a security measure and is easy to do. Allistair. -Original Message- From: Matt Bathje [mailto:[EMAIL PROTECTED] Sent: 22 September 2004 17:07 To: Struts Users Mailing List Subject: Re: success story using Struts in large scale web based system Simon - I'm not involved with the development at all, but it appears that Wal-Mart's online store uses Struts for its checkout screens (the cart itself is not Struts though it seems.) Maybe you can update your site with it. Also, this is OT, but anybody have a guess as to what their cart *is* programmed in? The extension on the files is .gsp... Matt - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: c:out question
Hmmm use c:out value=${foo.bar} escapeXml=true/ to filter c:out value=${foo.bar} escapeXml=false/ to not filter If the filtering is not working then something else has already filtered the content; or the content-type on the page is set to plain text instead of text/html maybe? AFAIK the escapeXml attribute works as touted. -Bill Siggelkow Sergey Livanov wrote: When data output with html elements is used c:out value=... escapeXml='false/true' / the html text is loaded as plain text. table width=99% border=0 cellspacing=0 cellpadding=3 class=t11ver tr align=left valign=top td width=100% class=t10verfont color=#697A94b I have been changing escapeXml but I havent had any results. Is there any analogues bean-write filter? Please help me to find an error. Sergey mailto:[EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Forward to a file on hard drive
This doesn't work either. I get a 404 for a local resource or an outside url. I don't want to hardcode the document.location but I don't know what other choices there are. Hubert Rabago [EMAIL PROTECTED] wrote on 09/22/2004 12:00:00 PM: If you need to forward to a resource outside the current web context, you can try using a redirect. forward name=lapTop path=http://gmail.google.com; redirect=true/ Now, whether it'll work when you point it to a local resource... I think what you'll get is the user's browser will try to look for that file on the user's machine. Hubert On Wed, 22 Sep 2004 11:50:29 -0400, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Is it possible to forward to a file on a hard drive? I set up a global forward like this forward name=lapTop path=C:\project\WorkQueueLaptop.html I've since learned that the path is context relative so this is a no go. What technique do I need to use? Is it possible to handle this form the config file? - 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: c:out question
Well, content-type should be a non-factor. If the value of escapeXml is true, then the following conversions take place regardless: - amp; - lt; - gt; - #034; ' - #039; What does the actual HTML source look like? Quoting Bill Siggelkow [EMAIL PROTECTED]: Hmmm use c:out value=${foo.bar} escapeXml=true/ to filter c:out value=${foo.bar} escapeXml=false/ to not filter If the filtering is not working then something else has already filtered the content; or the content-type on the page is set to plain text instead of text/html maybe? AFAIK the escapeXml attribute works as touted. -Bill Siggelkow Sergey Livanov wrote: When data output with html elements is used c:out value=... escapeXml='false/true' / the html text is loaded as plain text. table width=99% border=0 cellspacing=0 cellpadding=3 class=t11ver tr align=left valign=top td width=100% class=t10verfont color=#697A94b I have been changing escapeXml but I havenÂ’t had any results. Is there any analogues bean-write filter? Please help me to find an error. Sergey mailto:[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: Forward to a file on hard drive
Are you actually trying to FORWARD to the file or is your intention to initiate download of the file? If the later, you'll need to do the usual download code, and just point it at the file. Your specifying an HTML file though, so I assume you want the user to see that page... So, the question is, is it a one-time page display or are you trying to redirect them to another webapp? If you just need to display it, you could always open a stream on the file and render it to response manually. Seems like a lot of work though... Can you be more specific about what your really trying to do? -- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com On Wed, September 22, 2004 1:23 pm, [EMAIL PROTECTED] said: This doesn't work either. I get a 404 for a local resource or an outside url. I don't want to hardcode the document.location but I don't know what other choices there are. Hubert Rabago [EMAIL PROTECTED] wrote on 09/22/2004 12:00:00 PM: If you need to forward to a resource outside the current web context, you can try using a redirect. forward name=lapTop path=http://gmail.google.com; redirect=true/ Now, whether it'll work when you point it to a local resource... I think what you'll get is the user's browser will try to look for that file on the user's machine. Hubert On Wed, 22 Sep 2004 11:50:29 -0400, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Is it possible to forward to a file on a hard drive? I set up a global forward like this forward name=lapTop path=C:\project\WorkQueueLaptop.html I've since learned that the path is context relative so this is a no go. What technique do I need to use? Is it possible to handle this form the config file? - 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: Forward to a file on hard drive
What is it you're trying to do? Are you trying to give the client access to a document store on the server? If so, you should place the document in a location accessible to the web application, and provide that url as the forward path. How you do this and what its eventual URL is would depend on your server, of course. On Wed, 22 Sep 2004 13:23:30 -0400, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: This doesn't work either. I get a 404 for a local resource or an outside url. I don't want to hardcode the document.location but I don't know what other choices there are. Hubert Rabago [EMAIL PROTECTED] wrote on 09/22/2004 12:00:00 PM: If you need to forward to a resource outside the current web context, you can try using a redirect. forward name=lapTop path=http://gmail.google.com; redirect=true/ Now, whether it'll work when you point it to a local resource... I think what you'll get is the user's browser will try to look for that file on the user's machine. Hubert On Wed, 22 Sep 2004 11:50:29 -0400, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Is it possible to forward to a file on a hard drive? I set up a global forward like this forward name=lapTop path=C:\project\WorkQueueLaptop.html I've since learned that the path is context relative so this is a no go. What technique do I need to use? Is it possible to handle this form the config file? - 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: how to access JSF Managed Bean in Struts Action class
Managed beans are no different than any other beans with respect to scopes: * Managed beans in request scope will be created on demand once for every request * Managed beans in session scope will be created on demand once for every session * Managed beans in application scope will be created on demand once for the lifetime of the application. If you are caching things that are shared between users, put them in application scope instead. If the cached data is unique per user, then you're going to need to leave it in session scope. Craig On Tue, 21 Sep 2004 13:45:58 -0600, BaTien Duong [EMAIL PROTECTED] wrote: Craig McClanahan wrote: On Mon, 20 Sep 2004 08:41:55 -0600, BaTien Duong [EMAIL PROTECTED] wrote: Just 2 quick questions from expert advise. Assuming FooBean is initialized by Faces in the session: 1) Under what cirscunstances we shoud use Faces or directly accessing the component under user session, assuming that you also use faces with other framework such as Tiles? I'm not quite sure what you are referring to, but it's quite straightforward to reference properties from a session-scoped bean. For example, assume user is a UserProfileBean and has a name property. You can use expressions like this: Hello h:outputText value=#{user.name}/ Note that it doesn't matter whether the bean was created by the managed beans facility or via programmatic logic (say, being placed there by an Action), so it is very straightforward to interoperate. 2) If FooBean is a default user profile bean, does faces have some kind of caching so it can just replicate the default configuration of the user profile for every created user session? If the caching is not a part of spec then which implementation (RI or myfaces) has it? You can specify initial values for the properties of a managed bean by using managed-property elements nested inside: managed-bean managed-bean-nameuser/managedp-bean-name managed-bean-classcom.mycompany.UserProfileBean/managed-bean-class managed-bean-scopesession/managed-bean-scope managed-property property-nameuserType/property-name property-classjava.lang.String/property-class valueStandard/value /managed-property /managed-bean The content of the value element can be either a literal value or a value binding expression, so you can have your initialization grab dynamically calculated values if you need them. Craig Thank Craig. I am fully aware of these features, but found the loading is slow. I have not investigated whether faces implementations have some caching mechanism so it does not need to create the session managed beans from the scratch for every new user. My question is whether the RI and/or my faces have some caching mechanism to speed up the process. If it does not then it is worth while to programmatically create these beans from our own cache implementation. Once the beans with identical attribute names are available in the session then faces does not have to create them. I am trying to decide which approach we should take. Your further insight information may save us some time. Thank again BaTien DBGROUPS - 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: converters
Struts does use BeanUtils, but it doesn't have any concept of converters like JSF. This is why Struts wants you to use string properties in form beans, and it's also why JSF doesn't need the form bean concept. Craig On Tue, 21 Sep 2004 15:53:03 -0400, Jesse Vitrone [EMAIL PROTECTED] wrote: Hi all - JSF has the concept of a converter, does struts have anything like that? Thanks, Jesse - 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: Forward to a file on hard drive
Frank W. Zammetti (MLists) [EMAIL PROTECTED] wrote on 09/22/2004 01:34:07 PM: Are you actually trying to FORWARD to the file or is your intention to initiate download of the file? FORWARD Your specifying an HTML file though, so I assume you want the user to see that page... So, the question is, is it a one-time page display or are you trying to redirect them to another webapp? Can you be more specific about what your really trying to do? Apologies for the vagueness. Many thanks for the help. My piece of this system is a web app but it's presented through a browser embedded in a fat client. When the users click a certain link I need to do some action stuff (which is working) and then render the html page from the local hard drive. Once it's displayed I'm out of the picture and the fat c/s app is supposed to takeover. If you just need to display it, you could always open a stream on the file and render it to response manually. Seems like a lot of work though... Can you be more specific about what your really trying to do? -- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com On Wed, September 22, 2004 1:23 pm, [EMAIL PROTECTED] said: This doesn't work either. I get a 404 for a local resource or an outside url. I don't want to hardcode the document.location but I don't know what other choices there are. Hubert Rabago [EMAIL PROTECTED] wrote on 09/22/2004 12:00:00 PM: If you need to forward to a resource outside the current web context, you can try using a redirect. forward name=lapTop path=http://gmail.google.com; redirect=true/ Now, whether it'll work when you point it to a local resource... I think what you'll get is the user's browser will try to look for that file on the user's machine. Hubert On Wed, 22 Sep 2004 11:50:29 -0400, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Is it possible to forward to a file on a hard drive? I set up a global forward like this forward name=lapTop path=C:\project\WorkQueueLaptop.html I've since learned that the path is context relative so this is a no go. What technique do I need to use? Is it possible to handle this form the config file? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Forward to a file on hard drive
In that case, try something like forward name=something path=file:///C:/path/to/file.html redirect=true/ On Wed, 22 Sep 2004 14:00:23 -0400, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Frank W. Zammetti (MLists) [EMAIL PROTECTED] wrote on 09/22/2004 01:34:07 PM: Are you actually trying to FORWARD to the file or is your intention to initiate download of the file? FORWARD Your specifying an HTML file though, so I assume you want the user to see that page... So, the question is, is it a one-time page display or are you trying to redirect them to another webapp? Can you be more specific about what your really trying to do? Apologies for the vagueness. Many thanks for the help. My piece of this system is a web app but it's presented through a browser embedded in a fat client. When the users click a certain link I need to do some action stuff (which is working) and then render the html page from the local hard drive. Once it's displayed I'm out of the picture and the fat c/s app is supposed to takeover. If you just need to display it, you could always open a stream on the file and render it to response manually. Seems like a lot of work though... Can you be more specific about what your really trying to do? -- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com On Wed, September 22, 2004 1:23 pm, [EMAIL PROTECTED] said: This doesn't work either. I get a 404 for a local resource or an outside url. I don't want to hardcode the document.location but I don't know what other choices there are. Hubert Rabago [EMAIL PROTECTED] wrote on 09/22/2004 12:00:00 PM: If you need to forward to a resource outside the current web context, you can try using a redirect. forward name=lapTop path=http://gmail.google.com; redirect=true/ Now, whether it'll work when you point it to a local resource... I think what you'll get is the user's browser will try to look for that file on the user's machine. Hubert On Wed, 22 Sep 2004 11:50:29 -0400, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Is it possible to forward to a file on a hard drive? I set up a global forward like this forward name=lapTop path=C:\project\WorkQueueLaptop.html I've since learned that the path is context relative so this is a no go. What technique do I need to use? Is it possible to handle this form the config file? - 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: Forward to a file on hard drive
Interesting... It sounds, based on your description of what your doing, that you really aren't forwading to the page, you just need to return it out of your Action. If that's the case, my suggestion of getting a stream on it (treat it like an ordinary file, attach no special meaning to the fact that it's an HTML document) and render it to the response manually. I THINK that will get you what you need... -- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com On Wed, September 22, 2004 2:00 pm, [EMAIL PROTECTED] said: Frank W. Zammetti (MLists) [EMAIL PROTECTED] wrote on 09/22/2004 01:34:07 PM: Are you actually trying to FORWARD to the file or is your intention to initiate download of the file? FORWARD Your specifying an HTML file though, so I assume you want the user to see that page... So, the question is, is it a one-time page display or are you trying to redirect them to another webapp? Can you be more specific about what your really trying to do? Apologies for the vagueness. Many thanks for the help. My piece of this system is a web app but it's presented through a browser embedded in a fat client. When the users click a certain link I need to do some action stuff (which is working) and then render the html page from the local hard drive. Once it's displayed I'm out of the picture and the fat c/s app is supposed to takeover. If you just need to display it, you could always open a stream on the file and render it to response manually. Seems like a lot of work though... Can you be more specific about what your really trying to do? -- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com On Wed, September 22, 2004 1:23 pm, [EMAIL PROTECTED] said: This doesn't work either. I get a 404 for a local resource or an outside url. I don't want to hardcode the document.location but I don't know what other choices there are. Hubert Rabago [EMAIL PROTECTED] wrote on 09/22/2004 12:00:00 PM: If you need to forward to a resource outside the current web context, you can try using a redirect. forward name=lapTop path=http://gmail.google.com; redirect=true/ Now, whether it'll work when you point it to a local resource... I think what you'll get is the user's browser will try to look for that file on the user's machine. Hubert On Wed, 22 Sep 2004 11:50:29 -0400, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Is it possible to forward to a file on a hard drive? I set up a global forward like this forward name=lapTop path=C:\project\WorkQueueLaptop.html I've since learned that the path is context relative so this is a no go. What technique do I need to use? Is it possible to handle this form the config file? - 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: Forward to a file on hard drive
That presumes that the app server is on the same box as the client (which is, I think, the only way the file:// path would work). IF that's the case, then yes, Hubert's suggestion would probably work just fine. I had assumed, from the description given, that this wasn't the case. -- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com On Wed, September 22, 2004 2:03 pm, Hubert Rabago said: In that case, try something like forward name=something path=file:///C:/path/to/file.html redirect=true/ On Wed, 22 Sep 2004 14:00:23 -0400, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Frank W. Zammetti (MLists) [EMAIL PROTECTED] wrote on 09/22/2004 01:34:07 PM: Are you actually trying to FORWARD to the file or is your intention to initiate download of the file? FORWARD Your specifying an HTML file though, so I assume you want the user to see that page... So, the question is, is it a one-time page display or are you trying to redirect them to another webapp? Can you be more specific about what your really trying to do? Apologies for the vagueness. Many thanks for the help. My piece of this system is a web app but it's presented through a browser embedded in a fat client. When the users click a certain link I need to do some action stuff (which is working) and then render the html page from the local hard drive. Once it's displayed I'm out of the picture and the fat c/s app is supposed to takeover. If you just need to display it, you could always open a stream on the file and render it to response manually. Seems like a lot of work though... Can you be more specific about what your really trying to do? -- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com On Wed, September 22, 2004 1:23 pm, [EMAIL PROTECTED] said: This doesn't work either. I get a 404 for a local resource or an outside url. I don't want to hardcode the document.location but I don't know what other choices there are. Hubert Rabago [EMAIL PROTECTED] wrote on 09/22/2004 12:00:00 PM: If you need to forward to a resource outside the current web context, you can try using a redirect. forward name=lapTop path=http://gmail.google.com; redirect=true/ Now, whether it'll work when you point it to a local resource... I think what you'll get is the user's browser will try to look for that file on the user's machine. Hubert On Wed, 22 Sep 2004 11:50:29 -0400, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Is it possible to forward to a file on a hard drive? I set up a global forward like this forward name=lapTop path=C:\project\WorkQueueLaptop.html I've since learned that the path is context relative so this is a no go. What technique do I need to use? Is it possible to handle this form the config file? - 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: Forward to a file on hard drive
Hmm... and my understanding was that the file is installed on the user's machine. and then render the html page from the local hard drive. If I misunderstood, then the code sample I posted wouldn't work. Hubert On Wed, 22 Sep 2004 14:05:43 -0400 (EDT), Frank W. Zammetti (MLists) [EMAIL PROTECTED] wrote: That presumes that the app server is on the same box as the client (which is, I think, the only way the file:// path would work). IF that's the case, then yes, Hubert's suggestion would probably work just fine. I had assumed, from the description given, that this wasn't the case. -- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com On Wed, September 22, 2004 2:03 pm, Hubert Rabago said: In that case, try something like forward name=something path=file:///C:/path/to/file.html redirect=true/ On Wed, 22 Sep 2004 14:00:23 -0400, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Frank W. Zammetti (MLists) [EMAIL PROTECTED] wrote on 09/22/2004 01:34:07 PM: Are you actually trying to FORWARD to the file or is your intention to initiate download of the file? FORWARD Your specifying an HTML file though, so I assume you want the user to see that page... So, the question is, is it a one-time page display or are you trying to redirect them to another webapp? Can you be more specific about what your really trying to do? Apologies for the vagueness. Many thanks for the help. My piece of this system is a web app but it's presented through a browser embedded in a fat client. When the users click a certain link I need to do some action stuff (which is working) and then render the html page from the local hard drive. Once it's displayed I'm out of the picture and the fat c/s app is supposed to takeover. If you just need to display it, you could always open a stream on the file and render it to response manually. Seems like a lot of work though... Can you be more specific about what your really trying to do? -- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com On Wed, September 22, 2004 1:23 pm, [EMAIL PROTECTED] said: This doesn't work either. I get a 404 for a local resource or an outside url. I don't want to hardcode the document.location but I don't know what other choices there are. Hubert Rabago [EMAIL PROTECTED] wrote on 09/22/2004 12:00:00 PM: If you need to forward to a resource outside the current web context, you can try using a redirect. forward name=lapTop path=http://gmail.google.com; redirect=true/ Now, whether it'll work when you point it to a local resource... I think what you'll get is the user's browser will try to look for that file on the user's machine. Hubert On Wed, 22 Sep 2004 11:50:29 -0400, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Is it possible to forward to a file on a hard drive? I set up a global forward like this forward name=lapTop path=C:\project\WorkQueueLaptop.html I've since learned that the path is context relative so this is a no go. What technique do I need to use? Is it possible to handle this form the config file? - 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: Forward to a file on hard drive
Ok, seems like my brain is asleep earlier than usual today... I agree, if that is indeed the case, the redirect should in all probability work as Hubert says. I would expect it to until I saw otherwise anyway. -- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com On Wed, September 22, 2004 2:08 pm, Hubert Rabago said: Hmm... and my understanding was that the file is installed on the user's machine. and then render the html page from the local hard drive. If I misunderstood, then the code sample I posted wouldn't work. Hubert On Wed, 22 Sep 2004 14:05:43 -0400 (EDT), Frank W. Zammetti (MLists) [EMAIL PROTECTED] wrote: That presumes that the app server is on the same box as the client (which is, I think, the only way the file:// path would work). IF that's the case, then yes, Hubert's suggestion would probably work just fine. I had assumed, from the description given, that this wasn't the case. -- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com On Wed, September 22, 2004 2:03 pm, Hubert Rabago said: In that case, try something like forward name=something path=file:///C:/path/to/file.html redirect=true/ On Wed, 22 Sep 2004 14:00:23 -0400, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Frank W. Zammetti (MLists) [EMAIL PROTECTED] wrote on 09/22/2004 01:34:07 PM: Are you actually trying to FORWARD to the file or is your intention to initiate download of the file? FORWARD Your specifying an HTML file though, so I assume you want the user to see that page... So, the question is, is it a one-time page display or are you trying to redirect them to another webapp? Can you be more specific about what your really trying to do? Apologies for the vagueness. Many thanks for the help. My piece of this system is a web app but it's presented through a browser embedded in a fat client. When the users click a certain link I need to do some action stuff (which is working) and then render the html page from the local hard drive. Once it's displayed I'm out of the picture and the fat c/s app is supposed to takeover. If you just need to display it, you could always open a stream on the file and render it to response manually. Seems like a lot of work though... Can you be more specific about what your really trying to do? -- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com On Wed, September 22, 2004 1:23 pm, [EMAIL PROTECTED] said: This doesn't work either. I get a 404 for a local resource or an outside url. I don't want to hardcode the document.location but I don't know what other choices there are. Hubert Rabago [EMAIL PROTECTED] wrote on 09/22/2004 12:00:00 PM: If you need to forward to a resource outside the current web context, you can try using a redirect. forward name=lapTop path=http://gmail.google.com; redirect=true/ Now, whether it'll work when you point it to a local resource... I think what you'll get is the user's browser will try to look for that file on the user's machine. Hubert On Wed, 22 Sep 2004 11:50:29 -0400, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Is it possible to forward to a file on a hard drive? I set up a global forward like this forward name=lapTop path=C:\project\WorkQueueLaptop.html I've since learned that the path is context relative so this is a no go. What technique do I need to use? Is it possible to handle this form the config file? - 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: Forward to a file on hard drive
By the way, bmf5, if it IS on the user's hard drive, you don't need to hardcode the path to the file like in my example. You can create an ActionForward in your action to specify the path at runtime, and have the action return that instead. On Wed, 22 Sep 2004 14:12:00 -0400 (EDT), Frank W. Zammetti (MLists) [EMAIL PROTECTED] wrote: Ok, seems like my brain is asleep earlier than usual today... I agree, if that is indeed the case, the redirect should in all probability work as Hubert says. I would expect it to until I saw otherwise anyway. -- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com On Wed, September 22, 2004 2:08 pm, Hubert Rabago said: Hmm... and my understanding was that the file is installed on the user's machine. and then render the html page from the local hard drive. If I misunderstood, then the code sample I posted wouldn't work. Hubert On Wed, 22 Sep 2004 14:05:43 -0400 (EDT), Frank W. Zammetti (MLists) [EMAIL PROTECTED] wrote: That presumes that the app server is on the same box as the client (which is, I think, the only way the file:// path would work). IF that's the case, then yes, Hubert's suggestion would probably work just fine. I had assumed, from the description given, that this wasn't the case. -- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com On Wed, September 22, 2004 2:03 pm, Hubert Rabago said: In that case, try something like forward name=something path=file:///C:/path/to/file.html redirect=true/ On Wed, 22 Sep 2004 14:00:23 -0400, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Frank W. Zammetti (MLists) [EMAIL PROTECTED] wrote on 09/22/2004 01:34:07 PM: Are you actually trying to FORWARD to the file or is your intention to initiate download of the file? FORWARD Your specifying an HTML file though, so I assume you want the user to see that page... So, the question is, is it a one-time page display or are you trying to redirect them to another webapp? Can you be more specific about what your really trying to do? Apologies for the vagueness. Many thanks for the help. My piece of this system is a web app but it's presented through a browser embedded in a fat client. When the users click a certain link I need to do some action stuff (which is working) and then render the html page from the local hard drive. Once it's displayed I'm out of the picture and the fat c/s app is supposed to takeover. If you just need to display it, you could always open a stream on the file and render it to response manually. Seems like a lot of work though... Can you be more specific about what your really trying to do? -- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com On Wed, September 22, 2004 1:23 pm, [EMAIL PROTECTED] said: This doesn't work either. I get a 404 for a local resource or an outside url. I don't want to hardcode the document.location but I don't know what other choices there are. Hubert Rabago [EMAIL PROTECTED] wrote on 09/22/2004 12:00:00 PM: If you need to forward to a resource outside the current web context, you can try using a redirect. forward name=lapTop path=http://gmail.google.com; redirect=true/ Now, whether it'll work when you point it to a local resource... I think what you'll get is the user's browser will try to look for that file on the user's machine. Hubert On Wed, 22 Sep 2004 11:50:29 -0400, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Is it possible to forward to a file on a hard drive? I set up a global forward like this forward name=lapTop path=C:\project\WorkQueueLaptop.html I've since learned that the path is context relative so this is a no go. What technique do I need to use? Is it possible to handle this form the config file? - 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
Re: how to access JSF Managed Bean in Struts Action class
Craig McClanahan wrote: Managed beans are no different than any other beans with respect to scopes: * Managed beans in request scope will be created on demand once for every request * Managed beans in session scope will be created on demand once for every session * Managed beans in application scope will be created on demand once for the lifetime of the application. If you are caching things that are shared between users, put them in application scope instead. If the cached data is unique per user, then you're going to need to leave it in session scope. Craig Thank Craig. I must be too involved NOT to think that way. Thanks a million. BaTien DBGROUPS On Tue, 21 Sep 2004 13:45:58 -0600, BaTien Duong [EMAIL PROTECTED] wrote: Craig McClanahan wrote: On Mon, 20 Sep 2004 08:41:55 -0600, BaTien Duong [EMAIL PROTECTED] wrote: Just 2 quick questions from expert advise. Assuming FooBean is initialized by Faces in the session: 1) Under what cirscunstances we shoud use Faces or directly accessing the component under user session, assuming that you also use faces with other framework such as Tiles? I'm not quite sure what you are referring to, but it's quite straightforward to reference properties from a session-scoped bean. For example, assume user is a UserProfileBean and has a name property. You can use expressions like this: Hello h:outputText value=#{user.name}/ Note that it doesn't matter whether the bean was created by the managed beans facility or via programmatic logic (say, being placed there by an Action), so it is very straightforward to interoperate. 2) If FooBean is a default user profile bean, does faces have some kind of caching so it can just replicate the default configuration of the user profile for every created user session? If the caching is not a part of spec then which implementation (RI or myfaces) has it? You can specify initial values for the properties of a managed bean by using managed-property elements nested inside: managed-bean managed-bean-nameuser/managedp-bean-name managed-bean-classcom.mycompany.UserProfileBean/managed-bean-class managed-bean-scopesession/managed-bean-scope managed-property property-nameuserType/property-name property-classjava.lang.String/property-class valueStandard/value /managed-property /managed-bean The content of the value element can be either a literal value or a value binding expression, so you can have your initialization grab dynamically calculated values if you need them. Craig Thank Craig. I am fully aware of these features, but found the loading is slow. I have not investigated whether faces implementations have some caching mechanism so it does not need to create the session managed beans from the scratch for every new user. My question is whether the RI and/or my faces have some caching mechanism to speed up the process. If it does not then it is worth while to programmatically create these beans from our own cache implementation. Once the beans with identical attribute names are available in the session then faces does not have to create them. I am trying to decide which approach we should take. Your further insight information may save us some time. Thank again BaTien DBGROUPS - 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: Forward to a file on hard drive
I'm sorry to report it doesn't work. As best I can tell It wants to find the file in the application context. I base that on the 404 and the location being the RouterAction with parm... http://localhost:9080/AIM/router.do?destination=handHeld from a forward of forward name=handHeld path=file:///C:/AIM/AuditorWorkQueueHandheld.html redirect=true This is the toString on the Forward in my RouterAction Forward = ForwardConfig[name=handHeld,path=file:///C:/AIM/AuditorWorkQueueHandheld.html,redirect=true,contextRelative=false] I may have to try the stream to response suggestion or hardcode it some javascript. Bart Frank W. Zammetti (MLists) [EMAIL PROTECTED] wrote on 09/22/2004 02:12:00 PM: Ok, seems like my brain is asleep earlier than usual today... I agree, if that is indeed the case, the redirect should in all probability work as Hubert says. I would expect it to until I saw otherwise anyway. -- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com On Wed, September 22, 2004 2:08 pm, Hubert Rabago said: Hmm... and my understanding was that the file is installed on the user's machine. and then render the html page from the local hard drive. If I misunderstood, then the code sample I posted wouldn't work. Hubert On Wed, 22 Sep 2004 14:05:43 -0400 (EDT), Frank W. Zammetti (MLists) [EMAIL PROTECTED] wrote: That presumes that the app server is on the same box as the client (which is, I think, the only way the file:// path would work). IF that's the case, then yes, Hubert's suggestion would probably work just fine. I had assumed, from the description given, that this wasn't the case. -- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com On Wed, September 22, 2004 2:03 pm, Hubert Rabago said: In that case, try something like forward name=something path=file:///C:/path/to/file.html redirect=true/ On Wed, 22 Sep 2004 14:00:23 -0400, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Frank W. Zammetti (MLists) [EMAIL PROTECTED] wrote on 09/22/2004 01:34:07 PM: Are you actually trying to FORWARD to the file or is your intention to initiate download of the file? FORWARD Your specifying an HTML file though, so I assume you want the user to see that page... So, the question is, is it a one-time page display or are you trying to redirect them to another webapp? Can you be more specific about what your really trying to do? Apologies for the vagueness. Many thanks for the help. My piece of this system is a web app but it's presented through a browser embedded in a fat client. When the users click a certain link I need to do some action stuff (which is working) and then render the html page from the local hard drive. Once it's displayed I'm out of the picture and the fat c/s app is supposed to takeover. If you just need to display it, you could always open a stream on the file and render it to response manually. Seems like a lot of work though... Can you be more specific about what your really trying to do? -- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com On Wed, September 22, 2004 1:23 pm, [EMAIL PROTECTED] said: This doesn't work either. I get a 404 for a local resource or an outside url. I don't want to hardcode the document.location but I don't know what other choices there are. Hubert Rabago [EMAIL PROTECTED] wrote on 09/22/2004 12:00:00 PM: If you need to forward to a resource outside the current web context, you can try using a redirect. forward name=lapTop path=http://gmail.google.com; redirect=true/ Now, whether it'll work when you point it to a local resource... I think what you'll get is the user's browser will try to look for that file on the user's machine. Hubert On Wed, 22 Sep 2004 11:50:29 -0400, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Is it possible to forward to a file on a hard drive? I set up a global forward like this forward name=lapTop path=C:\project\WorkQueueLaptop.html I've since learned that the path is context relative so this is a no go. What technique do I need to use? Is it possible to handle this form the config file? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For
Re[2]: c:out question SOLVED
Bill! Thank you very much. I solved my problem. BS Hmmm use BS c:out value=${foo.bar} escapeXml=true/ to filter BS c:out value=${foo.bar} escapeXml=false/ to not filter BS If the filtering is not working then something else has already filtered BS the content; or the content-type on the page is set to plain text BS instead of text/html maybe? BS AFAIK the escapeXml attribute works as touted. BS -Bill Siggelkow BS Sergey Livanov wrote: When data output with html elements is used c:out value=... escapeXml='false/true' / the html text is loaded as plain text. table width=99% border=0 cellspacing=0 cellpadding=3 class=t11ver tr align=left valign=top td width=100% class=t10verfont color=#697A94b I have been changing escapeXml but I havent had any results. Is there any analogues bean-write filter? Please help me to find an error. Sergey mailto:[EMAIL PROTECTED] BS - BS To unsubscribe, e-mail: [EMAIL PROTECTED] BS For additional commands, e-mail: [EMAIL PROTECTED] -- , Sergey mailto:[EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
What Are the Causes For Validation to Throw ClassCastException?
Do not understand the 'HTTP Status 500 - java.lang.ClassCastException org.apache.struts.validator.DynaValidatorForm.validate(DynaValidatorForm.java:141)' 1. I have this plug-in by the very end of the struts-config.xml file: plug-in className=org.apache.struts.validator.ValidatorPlugIn set-property property=pathnames value=/WEB-INF/validator-rules.xml,/WEB-INF/validation.xml/ /plug-in 2. I have this action mapping in the struts-config.xml file: action path=/content/UpdateTitle type=org.dhsinfo.content.doSomething1 name=editTitleForm scope=request validate=true input=.frame.content forward name=success path=.title.Confirmation/ /action 3. I have this form-bean inside the form-beans element in the struts-config.xml file: form-bean name=editTitleForm type=org.apache.struts.validator.DynaValidatorForm form-property name=page type=java.lang.String/ form-property name=title type=java.lang.String/ /form-bean 4. I have the validation.xml file in the AppName/WEB-INF directory 4.1. I changed the beginning of the validation.xml file to http://jakarta.apache.org/commons/dtds/validator_1_1_3.dtd; ): 4.2 my validation.xml file code is shown below I got the HTTP Status 500 - Servlet.service() for servlet action threw exception java.lang.ClassCastException org.apache.struts.validator.DynaValidatorForm.validate(DynaValidatorForm.java:141) code: ?xml version=1.0 encoding=ISO-8859-1 ? !DOCTYPE form-validation PUBLIC -//Apache Software Foundation//DTD Commons Validator Rules Configuration 1.0//EN http://jakarta.apache.org/commons/dtds/validator_1_1_3.dtd; form-validation global constant constant-namepostalCode/constant-name constant-value^\d{5}\d*$/constant-value /constant /global formset form name=editTitleForm field property=page depends=required arg0 key=request.page/ /field field property=title depends=required arg0 key=insert.title/ /field /form /formset /form-validation __ Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages! http://promotions.yahoo.com/new_mail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Forward to a file on hard drive
I may be missing something here, but if the file is on the local client it would seem that the only way to display the local page is to return a page with a link to the local file: a href=file://c://client_local_file.htmlclient/a Which of course the user would have click through for the actual display. JC [EMAIL PROTECTED] ler.com To: Struts Users Mailing List [EMAIL PROTECTED] cc: 09/22/2004 01:50 Subject: Re: Forward to a file on hard drive PM Please respond to Struts Users Mailing List I'm sorry to report it doesn't work. As best I can tell It wants to find the file in the application context. I base that on the 404 and the location being the RouterAction with parm... http://localhost:9080/AIM/router.do?destination=handHeld from a forward of forward name=handHeld path=file:///C:/AIM/AuditorWorkQueueHandheld.html redirect=true This is the toString on the Forward in my RouterAction Forward = ForwardConfig[name=handHeld,path=file:///C:/AIM/AuditorWorkQueueHandheld.html,redirect=true,contextRelative=false] I may have to try the stream to response suggestion or hardcode it some javascript. Bart Frank W. Zammetti (MLists) [EMAIL PROTECTED] wrote on 09/22/2004 02:12:00 PM: Ok, seems like my brain is asleep earlier than usual today... I agree, if that is indeed the case, the redirect should in all probability work as Hubert says. I would expect it to until I saw otherwise anyway. -- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com On Wed, September 22, 2004 2:08 pm, Hubert Rabago said: Hmm... and my understanding was that the file is installed on the user's machine. and then render the html page from the local hard drive. If I misunderstood, then the code sample I posted wouldn't work. Hubert On Wed, 22 Sep 2004 14:05:43 -0400 (EDT), Frank W. Zammetti (MLists) [EMAIL PROTECTED] wrote: That presumes that the app server is on the same box as the client (which is, I think, the only way the file:// path would work). IF that's the case, then yes, Hubert's suggestion would probably work just fine. I had assumed, from the description given, that this wasn't the case. -- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com On Wed, September 22, 2004 2:03 pm, Hubert Rabago said: In that case, try something like forward name=something path=file:///C:/path/to/file.html redirect=true/ On Wed, 22 Sep 2004 14:00:23 -0400, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Frank W. Zammetti (MLists) [EMAIL PROTECTED] wrote on 09/22/2004 01:34:07 PM: Are you actually trying to FORWARD to the file or is your intention to initiate download of the file? FORWARD Your specifying an HTML file though, so I assume you want the user to see that page... So, the question is, is it a one-time page display or are you trying to redirect them to another webapp? Can you be more specific about what your really trying to do? Apologies for the vagueness. Many thanks for the help. My piece of this system is a web app but it's presented through a browser embedded in a fat client. When the users click a certain link I need to do some action stuff (which is working) and then render the html page from the local hard drive. Once it's displayed I'm out of the picture and the fat c/s app is supposed to takeover. If you just need to display it, you could always open a stream on the file and render it to response manually. Seems like a lot of work though... Can you be more specific about what your really trying to do? -- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies
RE: Forward to a file on hard drive
Bmf5: Here is what I did to forward to a local file using the logic:redirect tag. 1. Declare a global forward in your struts-config.xml - global-forwards forward name=handHeld path=file:///C:/AIM/AuditorWorkQueueHandheld.html redirect=true / /global-forwards 2. In a test JSP, I added: logic:redirect forward=test / The redirect worked. Of course, this was just a test which I did with a logic tag. Praveen -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 22, 2004 1:50 PM To: Struts Users Mailing List Subject: Re: Forward to a file on hard drive I'm sorry to report it doesn't work. As best I can tell It wants to find the file in the application context. I base that on the 404 and the location being the RouterAction with parm... http://localhost:9080/AIM/router.do?destination=handHeld from a forward of forward name=handHeld path=file:///C:/AIM/AuditorWorkQueueHandheld.html redirect=true This is the toString on the Forward in my RouterAction Forward = ForwardConfig[name=handHeld,path=file:///C:/AIM/AuditorWorkQueueHandheld .html,redirect=true,contextRelative=false] I may have to try the stream to response suggestion or hardcode it some javascript. Bart Frank W. Zammetti (MLists) [EMAIL PROTECTED] wrote on 09/22/2004 02:12:00 PM: Ok, seems like my brain is asleep earlier than usual today... I agree, if that is indeed the case, the redirect should in all probability work as Hubert says. I would expect it to until I saw otherwise anyway. -- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com On Wed, September 22, 2004 2:08 pm, Hubert Rabago said: Hmm... and my understanding was that the file is installed on the user's machine. and then render the html page from the local hard drive. If I misunderstood, then the code sample I posted wouldn't work. Hubert On Wed, 22 Sep 2004 14:05:43 -0400 (EDT), Frank W. Zammetti (MLists) [EMAIL PROTECTED] wrote: That presumes that the app server is on the same box as the client (which is, I think, the only way the file:// path would work). IF that's the case, then yes, Hubert's suggestion would probably work just fine. I had assumed, from the description given, that this wasn't the case. -- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com On Wed, September 22, 2004 2:03 pm, Hubert Rabago said: In that case, try something like forward name=something path=file:///C:/path/to/file.html redirect=true/ On Wed, 22 Sep 2004 14:00:23 -0400, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Frank W. Zammetti (MLists) [EMAIL PROTECTED] wrote on 09/22/2004 01:34:07 PM: Are you actually trying to FORWARD to the file or is your intention to initiate download of the file? FORWARD Your specifying an HTML file though, so I assume you want the user to see that page... So, the question is, is it a one-time page display or are you trying to redirect them to another webapp? Can you be more specific about what your really trying to do? Apologies for the vagueness. Many thanks for the help. My piece of this system is a web app but it's presented through a browser embedded in a fat client. When the users click a certain link I need to do some action stuff (which is working) and then render the html page from the local hard drive. Once it's displayed I'm out of the picture and the fat c/s app is supposed to takeover. If you just need to display it, you could always open a stream on the file and render it to response manually. Seems like a lot of work though... Can you be more specific about what your really trying to do? -- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com On Wed, September 22, 2004 1:23 pm, [EMAIL PROTECTED] said: This doesn't work either. I get a 404 for a local resource or an outside url. I don't want to hardcode the document.location but I don't know what other choices there are. Hubert Rabago [EMAIL PROTECTED] wrote on 09/22/2004 12:00:00 PM: If you need to forward to a resource outside the current web context, you can try using a redirect. forward name=lapTop path=http://gmail.google.com; redirect=true/ Now, whether it'll work when you point it to a local resource... I think what you'll get is the user's browser will try to look for that file on the user's machine. Hubert On Wed, 22 Sep 2004 11:50:29 -0400, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Is it possible to forward to a file on a hard drive? I set up a
Re: What Are the Causes For Validation to Throw ClassCastException?
Caroline Jen wrote: Do not understand the 'HTTP Status 500 - java.lang.ClassCastException org.apache.struts.validator.DynaValidatorForm.validate(DynaValidatorForm.java:141)' 1. I have this plug-in by the very end of the struts-config.xml file: plug-in className=org.apache.struts.validator.ValidatorPlugIn set-property property=pathnames value=/WEB-INF/validator-rules.xml,/WEB-INF/validation.xml/ /plug-in 2. I have this action mapping in the struts-config.xml file: action path=/content/UpdateTitle type=org.dhsinfo.content.doSomething1 name=editTitleForm scope=request validate=true input=.frame.content forward name=success path=.title.Confirmation/ /action 3. I have this form-bean inside the form-beans element in the struts-config.xml file: form-bean name=editTitleForm type=org.apache.struts.validator.DynaValidatorForm form-property name=page type=java.lang.String/ form-property name=title type=java.lang.String/ /form-bean 4. I have the validation.xml file in the AppName/WEB-INF directory 4.1. I changed the beginning of the validation.xml file to http://jakarta.apache.org/commons/dtds/validator_1_1_3.dtd; ): 4.2 my validation.xml file code is shown below I got the HTTP Status 500 - Servlet.service() for servlet action threw exception java.lang.ClassCastException org.apache.struts.validator.DynaValidatorForm.validate(DynaValidatorForm.java:141) code: ?xml version=1.0 encoding=ISO-8859-1 ? !DOCTYPE form-validation PUBLIC -//Apache Software Foundation//DTD Commons Validator Rules Configuration 1.0//EN http://jakarta.apache.org/commons/dtds/validator_1_1_3.dtd; form-validation global constant constant-namepostalCode/constant-name constant-value^\d{5}\d*$/constant-value /constant /global formset form name=editTitleForm field property=page depends=required arg0 key=request.page/ /field field property=title depends=required arg0 key=insert.title/ /field /form /formset /form-validation It appears as though the problem is with your use of a form-property called page - based on what I am seeing around line 141 of the DynaValidatorForm code, if you have a property named page, it MUST be an integer, otherwise classcastexception is thrown. I'm guessing this is to accomodate paged forms (aka wizards) Try changing the property to have another name, and I think it will fix your problem. Matt - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Dynamically Creating Dynaforms
Hi everyone here are my goals: Be able to dynamically create fields in a form (they will be known at runtime, but only then) Be able to pre-populate these fields, then harvest them from the user I know I can do this by using session scoped beans with a map-backed form and in the name of my fields doing something like value(myFieldNameInTheMap). I would like to if possible avoid that. I know with dynaforms specified in xml I can declare fields like myField of type string then within the jsp all i need is name=myField as opposed to name=value(myField). Is there anyway in my prepopulating action to create a dynaform programatically with all the fields I need so i can just use their names from within the jsp? Thanks! -David (Ps i know its possible to do that with DynaBeans from commons.. but i'm wondering if I'm going to have to subclass dynaform or something to implement this) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Submit Question
I apologize for this simple, stupid question. I created a form on a JSP page. I put in the form the; html:submit value=Save So, how do I get the name/value of this from my FormBean? Would this work? html:submit property=xxx value=Save html:reset property=xxx value=Cancel And then in the form-bean, do this: public String getXXX() { return this.xxx;} Right, now I actually have: html:hidden property=action value=Save html:submit value=Save html:reset value=Cancel And in the form-bean: public String getAction() { return this.action; } Thanks for any help! Tom - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Forward to a file on hard drive
Thank you for the help. This worked for me too. I used the same forward from struts-config in the jsp as I used in the RouterAction (which didn't work) I'll have my router action go to a jsp that redirects. Sort of clugee (sp) but gets the job done for now. Thank you and thanks to all the others who helped. Bart Arumbakkam, Praveen \(Contractor\) [EMAIL PROTECTED] wrote on 09/22/2004 03:12:58 PM: Bmf5: Here is what I did to forward to a local file using the logic:redirect tag. 1. Declare a global forward in your struts-config.xml - global-forwards forward name=handHeld path=file:///C:/AIM/AuditorWorkQueueHandheld.html redirect=true / /global-forwards 2. In a test JSP, I added: logic:redirect forward=test / The redirect worked. Of course, this was just a test which I did with a logic tag. Praveen -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 22, 2004 1:50 PM To: Struts Users Mailing List Subject: Re: Forward to a file on hard drive I'm sorry to report it doesn't work. As best I can tell It wants to find the file in the application context. I base that on the 404 and the location being the RouterAction with parm... http://localhost:9080/AIM/router.do?destination=handHeld from a forward of forward name=handHeld path=file:///C:/AIM/AuditorWorkQueueHandheld.html redirect=true This is the toString on the Forward in my RouterAction Forward = ForwardConfig[name=handHeld,path=file:///C:/AIM/AuditorWorkQueueHandheld ..html,redirect=true,contextRelative=false] I may have to try the stream to response suggestion or hardcode it some javascript. Bart Frank W. Zammetti (MLists) [EMAIL PROTECTED] wrote on 09/22/2004 02:12:00 PM: Ok, seems like my brain is asleep earlier than usual today... I agree, if that is indeed the case, the redirect should in all probability work as Hubert says. I would expect it to until I saw otherwise anyway. -- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com On Wed, September 22, 2004 2:08 pm, Hubert Rabago said: Hmm... and my understanding was that the file is installed on the user's machine. and then render the html page from the local hard drive. If I misunderstood, then the code sample I posted wouldn't work. Hubert On Wed, 22 Sep 2004 14:05:43 -0400 (EDT), Frank W. Zammetti (MLists) [EMAIL PROTECTED] wrote: That presumes that the app server is on the same box as the client (which is, I think, the only way the file:// path would work). IF that's the case, then yes, Hubert's suggestion would probably work just fine. I had assumed, from the description given, that this wasn't the case. -- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com On Wed, September 22, 2004 2:03 pm, Hubert Rabago said: In that case, try something like forward name=something path=file:///C:/path/to/file.html redirect=true/ On Wed, 22 Sep 2004 14:00:23 -0400, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Frank W. Zammetti (MLists) [EMAIL PROTECTED] wrote on 09/22/2004 01:34:07 PM: Are you actually trying to FORWARD to the file or is your intention to initiate download of the file? FORWARD Your specifying an HTML file though, so I assume you want the user to see that page... So, the question is, is it a one-time page display or are you trying to redirect them to another webapp? Can you be more specific about what your really trying to do? Apologies for the vagueness. Many thanks for the help. My piece of this system is a web app but it's presented through a browser embedded in a fat client. When the users click a certain link I need to do some action stuff (which is working) and then render the html page from the local hard drive. Once it's displayed I'm out of the picture and the fat c/s app is supposed to takeover. If you just need to display it, you could always open a stream on the file and render it to response manually. Seems like a lot of work though... Can you be more specific about what your really trying to do? -- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com On Wed, September 22, 2004 1:23 pm, [EMAIL PROTECTED] said: This doesn't work either. I get a 404 for a local resource or an outside url. I don't want to hardcode the document.location but I don't know what other choices there are. Hubert Rabago [EMAIL PROTECTED] wrote on 09/22/2004 12:00:00 PM: If
Re: Submit Question
Tom Holmes Jr. wrote: I apologize for this simple, stupid question. I created a form on a JSP page. I put in the form the; html:submit value=Save So, how do I get the name/value of this from my FormBean? Would this work? html:submit property=xxx value=Save html:reset property=xxx value=Cancel And then in the form-bean, do this: public String getXXX() {return this.xxx;} Right, now I actually have: html:hidden property=action value=Save html:submit value=Save html:reset value=Cancel And in the form-bean: public String getAction() {return this.action;} Thanks for any help! Tom I don't see why it wouldn't help...all you can do to be sure is try though :) Make sure that your form-bean definition xml has a form-property called xxx of course. Matt - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Struts Tiles with Frames
Hi, I'm using tiles. I have a situation where I have a JSP Tiled with header, Navigation Bar, body and footer. In the body tile, I need two frames left and right. In the left frame I'll show a Tree and clicking on TreeNode in the left frame, I wish to display the Node details in the right frame. The right frame contains some buttons and clicking on those buttons should submit the entire page. I'm finding it difficult to use Frameset and html:frame along with Tiles. Has anybody done similar implementation? Any examples on the web? THanx Ratnakar - Do you Yahoo!? New and Improved Yahoo! Mail - 100MB free storage!
Re: How To Validate a File Name With Required Restrictions
Caroline Jen wrote: If we require a file name submitted by users must be less than 40 characters, not have space and have a single 3 character extension (for example: .doc, .txt, .pdf) To set 40 characters limit, we can do: field property=filename depends=required,maxlength arg0 key=select.filename/ arg1 name=maxlength key=${var:maxlength} resource=false/ var var-namemaxlength/var-name var-value40/var-value /var /field I think the 3 characters extension may be something similar to ^\d{3}\d*$ (I can be wrong). And how do we set the 'no space' constraint? I think you need to read up on regular expressions a bit before asking here. Try out: http://www.regular-expressions.info/reference.html The answer to your question depends on what characters you want to allow to be typed in as well. Off the top of my head, something like this (totally untested): ^\S+\.\S{3}$ would work, but it allows ANY non-whitespace character to be typed in - this would include slashes, number signs, and other wacky characters that aren't good for filenames. This regexp roughly translates into: any non-whitespace character 1 or more times, then a period, than any non-whitespace character exactly 3 times The regexp you suggested translates into this: digit character 3 times, then digit character 0 or more times Like I said, you need to read up a little bit more, as this is not really a regexp help center :) Matt - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Forward to a file on hard drive
Agh, beat me to the punch :) That's what I tried after the forward from the Action didn't work for me either. I understand (I think) why it didn't work as expected... RequestProcessor was trying to find the file specified in the forward on the app server, not the client-side... I (and I think Bart as well) were subconsciously making an assumption that Struts would return essentially an empty page with a redirect header in it to the client, but that's not what happens. Praveen's solution shows that to get that functionality you have to do it yourself. Good thread in any case, one of those things that is likely to help someone down the road when they find it in the archives :) -- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com On Wed, September 22, 2004 3:54 pm, [EMAIL PROTECTED] said: Thank you for the help. This worked for me too. I used the same forward from struts-config in the jsp as I used in the RouterAction (which didn't work) I'll have my router action go to a jsp that redirects. Sort of clugee (sp) but gets the job done for now. Thank you and thanks to all the others who helped. Bart Arumbakkam, Praveen \(Contractor\) [EMAIL PROTECTED] wrote on 09/22/2004 03:12:58 PM: Bmf5: Here is what I did to forward to a local file using the logic:redirect tag. 1. Declare a global forward in your struts-config.xml - global-forwards forward name=handHeld path=file:///C:/AIM/AuditorWorkQueueHandheld.html redirect=true / /global-forwards 2. In a test JSP, I added: logic:redirect forward=test / The redirect worked. Of course, this was just a test which I did with a logic tag. Praveen -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 22, 2004 1:50 PM To: Struts Users Mailing List Subject: Re: Forward to a file on hard drive I'm sorry to report it doesn't work. As best I can tell It wants to find the file in the application context. I base that on the 404 and the location being the RouterAction with parm... http://localhost:9080/AIM/router.do?destination=handHeld from a forward of forward name=handHeld path=file:///C:/AIM/AuditorWorkQueueHandheld.html redirect=true This is the toString on the Forward in my RouterAction Forward = ForwardConfig[name=handHeld,path=file:///C:/AIM/AuditorWorkQueueHandheld ..html,redirect=true,contextRelative=false] I may have to try the stream to response suggestion or hardcode it some javascript. Bart Frank W. Zammetti (MLists) [EMAIL PROTECTED] wrote on 09/22/2004 02:12:00 PM: Ok, seems like my brain is asleep earlier than usual today... I agree, if that is indeed the case, the redirect should in all probability work as Hubert says. I would expect it to until I saw otherwise anyway. -- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com On Wed, September 22, 2004 2:08 pm, Hubert Rabago said: Hmm... and my understanding was that the file is installed on the user's machine. and then render the html page from the local hard drive. If I misunderstood, then the code sample I posted wouldn't work. Hubert On Wed, 22 Sep 2004 14:05:43 -0400 (EDT), Frank W. Zammetti (MLists) [EMAIL PROTECTED] wrote: That presumes that the app server is on the same box as the client (which is, I think, the only way the file:// path would work). IF that's the case, then yes, Hubert's suggestion would probably work just fine. I had assumed, from the description given, that this wasn't the case. -- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com On Wed, September 22, 2004 2:03 pm, Hubert Rabago said: In that case, try something like forward name=something path=file:///C:/path/to/file.html redirect=true/ On Wed, 22 Sep 2004 14:00:23 -0400, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Frank W. Zammetti (MLists) [EMAIL PROTECTED] wrote on 09/22/2004 01:34:07 PM: Are you actually trying to FORWARD to the file or is your intention to initiate download of the file? FORWARD Your specifying an HTML file though, so I assume you want the user to see that page... So, the question is, is it a one-time page display or are you trying to redirect them to another webapp? Can you be more specific about what your really trying to do? Apologies for the vagueness. Many thanks for the help. My piece of this system is a web app but it's presented through a browser embedded in a fat client. When the users click a certain link I need to do some action stuff (which is working) and then render the html page from the local hard drive. Once it's displayed I'm out
Re: What Are the Causes For Validation to Throw ClassCastException?
I have changed the property from 'page' to 'pg'. The ClassCastException problem is gone. However, the validation.xml that I put in the AppName/WEB-INF is not doing anything. In my action mapping (struts-config.xml), I did set validate=true and in my validation.xml, I have required set for the depends attribute for every single text field. depends=required I intentionally left every field in those forms blank and submit forms. But, the Struts did not give me any warning about that I leave text fields blank. --- Matt Bathje [EMAIL PROTECTED] wrote: Caroline Jen wrote: Do not understand the 'HTTP Status 500 - java.lang.ClassCastException org.apache.struts.validator.DynaValidatorForm.validate(DynaValidatorForm.java:141)' 1. I have this plug-in by the very end of the struts-config.xml file: plug-in className=org.apache.struts.validator.ValidatorPlugIn set-property property=pathnames value=/WEB-INF/validator-rules.xml,/WEB-INF/validation.xml/ /plug-in 2. I have this action mapping in the struts-config.xml file: action path=/content/UpdateTitle type=org.dhsinfo.content.doSomething1 name=editTitleForm scope=request validate=true input=.frame.content forward name=success path=.title.Confirmation/ /action 3. I have this form-bean inside the form-beans element in the struts-config.xml file: form-bean name=editTitleForm type=org.apache.struts.validator.DynaValidatorForm form-property name=page type=java.lang.String/ form-property name=title type=java.lang.String/ /form-bean 4. I have the validation.xml file in the AppName/WEB-INF directory 4.1. I changed the beginning of the validation.xml file to http://jakarta.apache.org/commons/dtds/validator_1_1_3.dtd; ): 4.2 my validation.xml file code is shown below I got the HTTP Status 500 - Servlet.service() for servlet action threw exception java.lang.ClassCastException org.apache.struts.validator.DynaValidatorForm.validate(DynaValidatorForm.java:141) code: ?xml version=1.0 encoding=ISO-8859-1 ? !DOCTYPE form-validation PUBLIC -//Apache Software Foundation//DTD Commons Validator Rules Configuration 1.0//EN http://jakarta.apache.org/commons/dtds/validator_1_1_3.dtd; form-validation global constant constant-namepostalCode/constant-name constant-value^\d{5}\d*$/constant-value /constant /global formset form name=editTitleForm field property=page depends=required arg0 key=request.page/ /field field property=title depends=required arg0 key=insert.title/ /field /form /formset /form-validation It appears as though the problem is with your use of a form-property called page - based on what I am seeing around line 141 of the DynaValidatorForm code, if you have a property named page, it MUST be an integer, otherwise classcastexception is thrown. I'm guessing this is to accomodate paged forms (aka wizards) Try changing the property to have another name, and I think it will fix your problem. Matt - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] ___ Do you Yahoo!? Declare Yourself - Register online to vote today! http://vote.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Forward to a file on hard drive
clugee (sp) http://dictionary.reference.com/search?r=2q=kludgy I'm good for something. - Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: What Are the Causes For Validation to Throw ClassCastException?
Do you also have /AppName/WEB-INF/validator-rules.xml? Without that the validation won't work. Also make sure that you have the proper version of the validator jar. Assuming those things are correct, take a look through your tomcat logs, I bet you are actually getting an error of some sort. Matt Caroline Jen wrote: I have changed the property from 'page' to 'pg'. The ClassCastException problem is gone. However, the validation.xml that I put in the AppName/WEB-INF is not doing anything. In my action mapping (struts-config.xml), I did set validate=true and in my validation.xml, I have required set for the depends attribute for every single text field. depends=required I intentionally left every field in those forms blank and submit forms. But, the Struts did not give me any warning about that I leave text fields blank. --- Matt Bathje [EMAIL PROTECTED] wrote: Caroline Jen wrote: Do not understand the 'HTTP Status 500 - java.lang.ClassCastException org.apache.struts.validator.DynaValidatorForm.validate(DynaValidatorForm.java:141)' 1. I have this plug-in by the very end of the struts-config.xml file: plug-in className=org.apache.struts.validator.ValidatorPlugIn set-property property=pathnames value=/WEB-INF/validator-rules.xml,/WEB-INF/validation.xml/ /plug-in 2. I have this action mapping in the struts-config.xml file: action path=/content/UpdateTitle type=org.dhsinfo.content.doSomething1 name=editTitleForm scope=request validate=true input=.frame.content forward name=success path=.title.Confirmation/ /action 3. I have this form-bean inside the form-beans element in the struts-config.xml file: form-bean name=editTitleForm type=org.apache.struts.validator.DynaValidatorForm form-property name=page type=java.lang.String/ form-property name=title type=java.lang.String/ /form-bean 4. I have the validation.xml file in the AppName/WEB-INF directory 4.1. I changed the beginning of the validation.xml file to http://jakarta.apache.org/commons/dtds/validator_1_1_3.dtd; ): 4.2 my validation.xml file code is shown below I got the HTTP Status 500 - Servlet.service() for servlet action threw exception java.lang.ClassCastException org.apache.struts.validator.DynaValidatorForm.validate(DynaValidatorForm.java:141) code: ?xml version=1.0 encoding=ISO-8859-1 ? !DOCTYPE form-validation PUBLIC -//Apache Software Foundation//DTD Commons Validator Rules Configuration 1.0//EN http://jakarta.apache.org/commons/dtds/validator_1_1_3.dtd; form-validation global constant constant-namepostalCode/constant-name constant-value^\d{5}\d*$/constant-value /constant /global formset form name=editTitleForm field property=page depends=required arg0 key=request.page/ /field field property=title depends=required arg0 key=insert.title/ /field /form /formset /form-validation It appears as though the problem is with your use of a form-property called page - based on what I am seeing around line 141 of the DynaValidatorForm code, if you have a property named page, it MUST be an integer, otherwise classcastexception is thrown. I'm guessing this is to accomodate paged forms (aka wizards) Try changing the property to have another name, and I think it will fix your problem. Matt - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: What Are the Causes For Validation to Throw ClassCastException?
Jen, DynaValidatorForm ALREADY has a page field so leave it out: http://struts.apache.org/api/org/apache/struts/validator/DynaValidatorForm.h tml As for your validation not working with pg that's because the validator uses the field name page to figure out which validations to test in multi-page validations. Additionally, WHY are you requiring a page field in your formset? It should be a hidden variable out of the view of the user so there is no need to validate it. Without it, the plugIn should assume page=0 and do the most basic of validations in your formset. Regards, David -Original Message- From: Caroline Jen [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 22, 2004 4:16 PM To: Struts Users Mailing List Subject: Re: What Are the Causes For Validation to Throw ClassCastException? I have changed the property from 'page' to 'pg'. The ClassCastException problem is gone. However, the validation.xml that I put in the AppName/WEB-INF is not doing anything. In my action mapping (struts-config.xml), I did set validate=true and in my validation.xml, I have required set for the depends attribute for every single text field. depends=required I intentionally left every field in those forms blank and submit forms. But, the Struts did not give me any warning about that I leave text fields blank. --- Matt Bathje [EMAIL PROTECTED] wrote: Caroline Jen wrote: Do not understand the 'HTTP Status 500 - java.lang.ClassCastException org.apache.struts.validator.DynaValidatorForm.validate(DynaValidatorForm.jav a:141)' 1. I have this plug-in by the very end of the struts-config.xml file: plug-in className=org.apache.struts.validator.ValidatorPlugIn set-property property=pathnames value=/WEB-INF/validator-rules.xml,/WEB-INF/validation.xml/ /plug-in 2. I have this action mapping in the struts-config.xml file: action path=/content/UpdateTitle type=org.dhsinfo.content.doSomething1 name=editTitleForm scope=request validate=true input=.frame.content forward name=success path=.title.Confirmation/ /action 3. I have this form-bean inside the form-beans element in the struts-config.xml file: form-bean name=editTitleForm type=org.apache.struts.validator.DynaValidatorForm form-property name=page type=java.lang.String/ form-property name=title type=java.lang.String/ /form-bean 4. I have the validation.xml file in the AppName/WEB-INF directory 4.1. I changed the beginning of the validation.xml file to http://jakarta.apache.org/commons/dtds/validator_1_1_3.dtd; ): 4.2 my validation.xml file code is shown below I got the HTTP Status 500 - Servlet.service() for servlet action threw exception java.lang.ClassCastException org.apache.struts.validator.DynaValidatorForm.validate(DynaValidatorForm.jav a:141) code: ?xml version=1.0 encoding=ISO-8859-1 ? !DOCTYPE form-validation PUBLIC -//Apache Software Foundation//DTD Commons Validator Rules Configuration 1.0//EN http://jakarta.apache.org/commons/dtds/validator_1_1_3.dtd; form-validation global constant constant-namepostalCode/constant-name constant-value^\d{5}\d*$/constant-value /constant /global formset form name=editTitleForm field property=page depends=required arg0 key=request.page/ /field field property=title depends=required arg0 key=insert.title/ /field /form /formset /form-validation It appears as though the problem is with your use of a form-property called page - based on what I am seeing around line 141 of the DynaValidatorForm code, if you have a property named page, it MUST be an integer, otherwise classcastexception is thrown. I'm guessing this is to accomodate paged forms (aka wizards) Try changing the property to have another name, and I think it will fix your problem. Matt - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] ___ Do you Yahoo!? Declare Yourself - Register online to vote today! http://vote.yahoo.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]
RE: error in strutsel-exercise-taglib
You don't need to use Struts-EL with Tomcat 5, if you're using JSP 2.0. In fact, it won't work. I don't know what this particular exception is, but you can avoid this situation entirely by just not doing it. -Original Message- From: John C Cartwright [mailto:[EMAIL PROTECTED] Hello All, I tried deploying the example webapp that comes with the contrib/struts-el taglibs and am getting the following exception accessing the index.jsp: java.lang.NullPointerException org.apache.struts.taglib.TagUtils.pageURL(TagUtils.java:1114) org.apache.struts.taglib.TagUtils.computeURLWithCharEncoding(T agUtils.java:466) org.apache.struts.taglib.TagUtils.computeURLWithCharEncoding(T agUtils.java:329) org.apache.struts.taglib.html.LinkTag.calculateURL(LinkTag.java:475) org.apache.struts.taglib.html.LinkTag.doStartTag(LinkTag.java:334) org.apache.strutsel.taglib.html.ELLinkTag.doStartTag(ELLinkTag .java:666) org.apache.jsp.index_jsp._jspx_meth_html$1el_link_0(index_jsp. java:146) org.apache.jsp.index_jsp._jspService(index_jsp.java:118) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94) javax.servlet.http.HttpServlet.service(HttpServlet.java:810) org.apache.jasper.servlet.JspServletWrapper.service(JspServlet Wrapper.java:298) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet .java:292) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236) javax.servlet.http.HttpServlet.service(HttpServlet.java:810) Can anyone suggest what the problem might be? Struts version 1.2.4, Tomcat 5.0.25. Thanks! -- john = John Cartwright Associate Scientist Geospatial Data Services Group CIRES, National Geophysical Data Center/NOAA (303) 497-6284 [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: Submit Question
If you just create a little test.jsp and try these things out, it is easier than checking with the list. I made a little test.jsp with the following in it. Run it and check out what the window in the browser says. You have to set up your own taglib %@ tags, of course. %@ page language='java' % %@ page contentType='text/html; charset=UTF-8' % %@ taglib uri='struts-html'prefix='html' % html form method='get' action='test.jsp' tbody tr td style=vertical-align: top; text-align: center; html:submit property=method value=countryAdd/html:submit /td td style=vertical-align: top; text-align: center; html:submit property=method value=countryEdit/html:submit /td td style=vertical-align: top; text-align: center; html:submit property=method value=countryDelete/html:submit /td /tr /tbody /form /html Michael McGrady Matt Bathje wrote: Tom Holmes Jr. wrote: I apologize for this simple, stupid question. I created a form on a JSP page. I put in the form the; html:submit value=Save So, how do I get the name/value of this from my FormBean? Would this work? html:submit property=xxx value=Save html:reset property=xxx value=Cancel And then in the form-bean, do this: public String getXXX() {return this.xxx;} Right, now I actually have: html:hidden property=action value=Save html:submit value=Save html:reset value=Cancel And in the form-bean: public String getAction() {return this.action;} Thanks for any help! Tom I don't see why it wouldn't help...all you can do to be sure is try though :) Make sure that your form-bean definition xml has a form-property called xxx of course. Matt - 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: Doubt on Struts+JSF Integration
I don't think there is only one preferred scenario, because the starting points will vary widely. Option (a) is certainly going to be popular if you have an existing application that you are migrating, because you can do it one page at a time. Option (b) is really useful if you like the setter injection variation of IoC containers, because that's exactly what you get from the managed beans configuration capability. But both of these needs are quite legitimate, and can be used either together or separately in a single application. JSF is designed to satisfy requirements in the view tier, and be able to plug in to larger application scale frameworks that provide controller and/or model capabilities. For simple applications, it is likely to be sufficient by itself. However, I think more complicated applications are going to want more, and I certainly believe that a future Struts should be a way to satisfy those needs. Craig On Wed, 22 Sep 2004 11:32:49 +0530, babloosony [EMAIL PROTECTED] wrote: Hi All, what is preferred and in what scenarios out the below two when integrating jsf and struts: a. accessing a struts form bean(used for populating jsf+jsp page) from a struts action class b. accessing a jsf managed bean(used for populating jsf+jsp page) from a struts action class in jsf and struts integration, should we use jsf just for view tier and struts for all client and server side validation+exception handling+internationalization+tiles integration ? Thanks Regards, Kumar. - 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] GMail invites
On Wed, 22 Sep 2004 11:44:36 +0200, Wessel van Norel [EMAIL PROTECTED] wrote: For all people who have either invites to give, or want an invite you can go to: http://isnoop.net/gmailomatic.php Here you can give away your invites, and receive an invite. DelGurth Indeed, it is my belief that GMail invites are too off topic for even a [FRIDAY] or [OT] label in the subject line. It can also be a good way to get people to reply to your blog. Craig - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Submit Question
I will try this out. Thanks! Michael McGrady wrote: If you just create a little test.jsp and try these things out, it is easier than checking with the list. I made a little test.jsp with the following in it. Run it and check out what the window in the browser says. You have to set up your own taglib %@ tags, of course. %@ page language='java' % %@ page contentType='text/html; charset=UTF-8' % %@ taglib uri='struts-html'prefix='html' % html form method='get' action='test.jsp' tbody tr td style=vertical-align: top; text-align: center; html:submit property=method value=countryAdd/html:submit /td td style=vertical-align: top; text-align: center; html:submit property=method value=countryEdit/html:submit /td td style=vertical-align: top; text-align: center; html:submit property=method value=countryDelete/html:submit /td /tr /tbody /form /html Michael McGrady Matt Bathje wrote: Tom Holmes Jr. wrote: I apologize for this simple, stupid question. I created a form on a JSP page. I put in the form the; html:submit value=Save So, how do I get the name/value of this from my FormBean? Would this work? html:submit property=xxx value=Save html:reset property=xxx value=Cancel And then in the form-bean, do this: public String getXXX() {return this.xxx;} Right, now I actually have: html:hidden property=action value=Save html:submit value=Save html:reset value=Cancel And in the form-bean: public String getAction() {return this.action;} Thanks for any help! Tom I don't see why it wouldn't help...all you can do to be sure is try though :) Make sure that your form-bean definition xml has a form-property called xxx of course. Matt - 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: Submit Question
I cleaned it up a bit. You don't need the rest, of course. Enjoy, Michael McGrady Tom Holmes Jr. wrote: I will try this out. Thanks! %@ page language='java' % %@ page contentType='text/html; charset=UTF-8' % %@ taglib uri='struts-html'prefix='html' % html form method='get' action='test.jsp' html:submit property=method value=countryAdd/ html:submit property=method value=countryEdit/ html:submit property=method value=countryDelete/ /form /html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Path .frame.content Does Not Start With a / Character
I think I have made all kinds of mistakes in the Struts history. I was working on VALIDATION. However, when I leave all text fields blank and submit the form for testing, I got HTTP Status 500 - java.lang.IllegalArgumentException: Path .frame.content does not start with a / character I think the problem is in my struts-config.xml file. I do not see that I put a / in front of any tile expressions; in particular, .frame.content (My struts-config.xml can be found in the attachment) The Tomcat logs file can also be found in the attachment. In the browser window, I got: java.lang.IllegalArgumentException: Path .frame.content does not start with a / character org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1062) org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcessor.java:274) org.apache.struts.action.RequestProcessor.internalModuleRelativeForward(RequestProcessor.java:1012) org.apache.struts.tiles.TilesRequestProcessor.internalModuleRelativeForward(TilesRequestProcessor.java:345) org.apache.struts.action.RequestProcessor.processValidate(RequestProcessor.java:980) org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:255) org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482) org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525) javax.servlet.http.HttpServlet.service(HttpServlet.java:709) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) ___ Do you Yahoo!? Express yourself with Y! Messenger! Free. Download now. http://messenger.yahoo.com?xml version=1.0 encoding=ISO-8859-1 ? !DOCTYPE struts-config PUBLIC -//Apache Software Foundation//DTD Struts Configuration 1.1//EN http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd; struts-config !-- Data Source Configuration -- !-- data-sources data-source set-property property=maxCount value=4/ set-property property=minCount value=2/ set-property property=description value=Artimus:MySQL Data Source Configuration/ set-property property=driverClass value=com.mysql.jdbc.Driver/ set-property property=url value=jdbc:mysql://localhost:3306/artimus/ set-property property=autoCommit value=true/ set-property property=user value=javauser/ set-property property=password value=javadude/ /data-source /data-sources -- !-- Form Bean Definitions -- form-beans !-- Menu Form Bean -- form-bean name=messageForm type=org.apache.struts.validator.DynaValidatorForm form-property name=msgtype type=java.lang.String/ form-property name=sender type=java.lang.String/ form-property name=receiver type=java.lang.String/ form-property name=messageTopic type=java.lang.String/ form-property name=priority type=java.lang.String/ form-property name=distribution type=java.lang.String/ form-property name=messageBody type=java.lang.String/ /form-bean form-bean name=editTitleForm type=org.apache.struts.validator.DynaValidatorForm form-property name=document type=java.lang.String/ form-property name=title type=java.lang.String/ /form-bean form-bean name=editPageForm type=org.apache.struts.validator.DynaValidatorForm form-property name=document type=java.lang.String/ form-property name=title type=java.lang.String/ form-property name=body type=java.lang.String/ /form-bean form-bean name=addLinkForm type=org.apache.struts.validator.DynaValidatorForm form-property name=document type=java.lang.String/ form-property name=linkname type=java.lang.String/ form-property name=linklocation type=java.lang.String/ /form-bean form-bean name=addFileForm type=org.apache.struts.validator.DynaValidatorForm form-property name=document type=java.lang.String/ form-property name=linkname type=java.lang.String/ form-property name=filename type=java.lang.String/ /form-bean /form-beans !-- === Global Forward Definitions --
RE: Path .frame.content Does Not Start With a / Character
I recall reading that the action's input parameter cannot be a tile. Try a JSP or action path. Regards, David -Original Message- From: Caroline Jen [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 22, 2004 5:55 PM To: [EMAIL PROTECTED] Subject: Path .frame.content Does Not Start With a / Character I think I have made all kinds of mistakes in the Struts history. I was working on VALIDATION. However, when I leave all text fields blank and submit the form for testing, I got HTTP Status 500 - java.lang.IllegalArgumentException: Path .frame.content does not start with a / character I think the problem is in my struts-config.xml file. I do not see that I put a / in front of any tile expressions; in particular, .frame.content (My struts-config.xml can be found in the attachment) The Tomcat logs file can also be found in the attachment. In the browser window, I got: java.lang.IllegalArgumentException: Path .frame.content does not start with a / character org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:10 62) org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcesso r.java:274) org.apache.struts.action.RequestProcessor.internalModuleRelativeForward(Requ estProcessor.java:1012) org.apache.struts.tiles.TilesRequestProcessor.internalModuleRelativeForward( TilesRequestProcessor.java:345) org.apache.struts.action.RequestProcessor.processValidate(RequestProcessor.j ava:980) org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:255) org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482) org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525) javax.servlet.http.HttpServlet.service(HttpServlet.java:709) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) ___ Do you Yahoo!? Express yourself with Y! Messenger! Free. Download now. http://messenger.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Path .frame.content Does Not Start With a / Character
David, Someone had better tell my application then, because it is using lots of tiles for the input parameter. ;) I do recall getting the error described by Caroline some time ago, but darned if I can remember how I resolved it. (Too much water under the bridge. Or, too much beer on the brain?) It may be that I had to go to 1.2.x to get it to work. Just did a search of the Release Notes and it wasn't mentioned there, though. I do know it works because I am using validation and tiles for the input parameter. TR David G. Friedman wrote: I recall reading that the action's input parameter cannot be a tile. Try a JSP or action path. Regards, David -Original Message- From: Caroline Jen [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 22, 2004 5:55 PM To: [EMAIL PROTECTED] Subject: Path .frame.content Does Not Start With a / Character I think I have made all kinds of mistakes in the Struts history. I was working on VALIDATION. However, when I leave all text fields blank and submit the form for testing, I got HTTP Status 500 - java.lang.IllegalArgumentException: Path .frame.content does not start with a / character I think the problem is in my struts-config.xml file. I do not see that I put a / in front of any tile expressions; in particular, .frame.content (My struts-config.xml can be found in the attachment) The Tomcat logs file can also be found in the attachment. In the browser window, I got: java.lang.IllegalArgumentException: Path .frame.content does not start with a / character org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:10 62) org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcesso r.java:274) org.apache.struts.action.RequestProcessor.internalModuleRelativeForward(Requ estProcessor.java:1012) org.apache.struts.tiles.TilesRequestProcessor.internalModuleRelativeForward( TilesRequestProcessor.java:345) org.apache.struts.action.RequestProcessor.processValidate(RequestProcessor.j ava:980) org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:255) org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482) org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525) javax.servlet.http.HttpServlet.service(HttpServlet.java:709) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) ___ Do you Yahoo!? Express yourself with Y! Messenger! Free. Download now. http://messenger.yahoo.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]
RE: using JSP2.0 / JSTL1.1 with Struts
Jason, Thanks for replying me though it took me sometime to try it out. What about JSTL 1.1? Do I have to download it by myself and replace the Previous 1.0 version? Or is it part of JBoss or Tomcat 5.0? Thanks again, Erez -Original Message- From: Jason Lea [mailto:[EMAIL PROTECTED] Sent: Thursday, September 16, 2004 11:49 PM To: Struts Users Mailing List Subject: Re: using JSP2.0 / JSTL1.1 with Struts Erez Efrati wrote: Hi all, Until now I've been using Struts 1.1 with JSP1.2/JSTL 1.0 with the use of JSTL EL extension for Struts tags. Html-el etc.. Now I'd like to move on and take advantage of the JSP2.0 and JST1.1 new features. I am running with JBoss 3.2.5 + Tomcat 5.0. Any special steps? Do I need to download JSTL 1.1 by myself ? Thanks in advance, Erez Don't know about the JBoss side of things. But I'm using Tomcat 5.0+JSP2.0/JSTL1.1 I guess this question is going to come again too... :) I think the main points are: 1. change the web.xml declaration to have web-app xmlns=http://java.sun.com/xml/ns/j2ee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd; version=2.4 So that it uses Servlet 2.4 + JSP2.0 2. Tag-libs: no longer need to be specified in the web.xml, so you can remove those entries You don't use the struts-el tags, as EL is provided by the container. In the JSP you include the taglibs for example: /WEB-INF/jsp/include/prelude.jspf: %@ taglib prefix=c uri=http://java.sun.com/jsp/jstl/core; %%@ taglib prefix=fmt uri=http://java.sun.com/jsp/jstl/fmt; %%@ taglib prefix=fn uri=http://java.sun.com/jsp/jstl/functions; %%@ taglib prefix=html uri=http://jakarta.apache.org/struts/tags-html; %%@ taglib prefix=logic uri=http://jakarta.apache.org/struts/tags-logic; %%@ taglib prefix=bean uri=http://jakarta.apache.org/struts/tags-bean; %%@ taglib prefix=tiles uri=http://jakarta.apache.org/struts/tags-tiles; %%@ taglib prefix=nested uri=http://jakarta.apache.org/struts/tags-nested; %%@ taglib prefix=display uri=http://displaytag.sf.net; % I think that is all that is required, there is an optional step 3: 3. Read the JSP2.0 spec for the newweb.xml jsp-config option for controlling JSPs Which allows things like those tag-libs above to be included on every JSP page eg jsp-config jsp-property-group descriptionJSP Configuration/description display-nameJSPConfiguration/display-name url-pattern*.jsp/url-pattern !-- no scriplets, only taglibs can be used -- scripting-invalidtrue/scripting-invalid page-encodingUTF-8/page-encoding include-prelude/WEB-INF/jsp/include/prelude.jspf/include-prelude include-coda/WEB-INF/jsp/include/coda.jspf/include-coda /jsp-property-group /jsp-config Let me know if I missed anything... -- Jason Lea - 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: Path .frame.content Does Not Start With a / Character
These tile errors are usually typo-related. Your struts-config has both frame.content and frame.Content. Maybe only one of these are valid? If both are really valid, make sure they're both in your tiles config file. Hubert On Wed, 22 Sep 2004 14:54:37 -0700 (PDT), Caroline Jen [EMAIL PROTECTED] wrote: I think I have made all kinds of mistakes in the Struts history. I was working on VALIDATION. However, when I leave all text fields blank and submit the form for testing, I got HTTP Status 500 - java.lang.IllegalArgumentException: Path .frame.content does not start with a / character I think the problem is in my struts-config.xml file. I do not see that I put a / in front of any tile expressions; in particular, .frame.content (My struts-config.xml can be found in the attachment) The Tomcat logs file can also be found in the attachment. In the browser window, I got: java.lang.IllegalArgumentException: Path .frame.content does not start with a / character org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1062) org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcessor.java:274) org.apache.struts.action.RequestProcessor.internalModuleRelativeForward(RequestProcessor.java:1012) org.apache.struts.tiles.TilesRequestProcessor.internalModuleRelativeForward(TilesRequestProcessor.java:345) org.apache.struts.action.RequestProcessor.processValidate(RequestProcessor.java:980) org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:255) org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482) org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525) javax.servlet.http.HttpServlet.service(HttpServlet.java:709) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) ___ Do you Yahoo!? Express yourself with Y! Messenger! Free. Download now. http://messenger.yahoo.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]
Re: Path .frame.content Does Not Start With a / Character
I think the problem is that you do not have the tile mentioned anywhere in your struts config. Try creating a global forward like this: global-forwards forward name=some.tile.name path=some.tile.name / /global-forwards Then I believe you will be able to refer to it as your input attribute for validation. HTH, sean - Original Message - From: Terry Roe [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wednesday, September 22, 2004 6:23 PM Subject: Re: Path .frame.content Does Not Start With a / Character David, Someone had better tell my application then, because it is using lots of tiles for the input parameter. ;) I do recall getting the error described by Caroline some time ago, but darned if I can remember how I resolved it. (Too much water under the bridge. Or, too much beer on the brain?) It may be that I had to go to 1.2.x to get it to work. Just did a search of the Release Notes and it wasn't mentioned there, though. I do know it works because I am using validation and tiles for the input parameter. TR David G. Friedman wrote: I recall reading that the action's input parameter cannot be a tile. Try a JSP or action path. Regards, David -Original Message- From: Caroline Jen [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 22, 2004 5:55 PM To: [EMAIL PROTECTED] Subject: Path .frame.content Does Not Start With a / Character I think I have made all kinds of mistakes in the Struts history. I was working on VALIDATION. However, when I leave all text fields blank and submit the form for testing, I got HTTP Status 500 - java.lang.IllegalArgumentException: Path .frame.content does not start with a / character I think the problem is in my struts-config.xml file. I do not see that I put a / in front of any tile expressions; in particular, .frame.content (My struts-config.xml can be found in the attachment) The Tomcat logs file can also be found in the attachment. In the browser window, I got: java.lang.IllegalArgumentException: Path .frame.content does not start with a / character org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:10 62) org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcesso r.java:274) org.apache.struts.action.RequestProcessor.internalModuleRelativeForward(Requ estProcessor.java:1012) org.apache.struts.tiles.TilesRequestProcessor.internalModuleRelativeForward( TilesRequestProcessor.java:345) org.apache.struts.action.RequestProcessor.processValidate(RequestProcessor.j ava:980) org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:255) org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482) org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525) javax.servlet.http.HttpServlet.service(HttpServlet.java:709) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) ___ Do you Yahoo!? Express yourself with Y! Messenger! Free. Download now. http://messenger.yahoo.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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Path .frame.content Does Not Start With a / Character
My guess is it can't find the tile you've specified in the input parameter - either its wrong or something else is wrong in your tiles configuration Niall - Original Message - From: Caroline Jen [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, September 22, 2004 10:54 PM Subject: Path .frame.content Does Not Start With a / Character I think I have made all kinds of mistakes in the Struts history. I was working on VALIDATION. However, when I leave all text fields blank and submit the form for testing, I got HTTP Status 500 - java.lang.IllegalArgumentException: Path .frame.content does not start with a / character I think the problem is in my struts-config.xml file. I do not see that I put a / in front of any tile expressions; in particular, .frame.content (My struts-config.xml can be found in the attachment) The Tomcat logs file can also be found in the attachment. In the browser window, I got: java.lang.IllegalArgumentException: Path .frame.content does not start with a / character org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:10 62) org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcesso r.java:274) org.apache.struts.action.RequestProcessor.internalModuleRelativeForward(Requ estProcessor.java:1012) org.apache.struts.tiles.TilesRequestProcessor.internalModuleRelativeForward( TilesRequestProcessor.java:345) org.apache.struts.action.RequestProcessor.processValidate(RequestProcessor.j ava:980) org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:255) org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482) org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525) javax.servlet.http.HttpServlet.service(HttpServlet.java:709) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) ___ Do you Yahoo!? Express yourself with Y! Messenger! Free. Download now. http://messenger.yahoo.com ?xml version=1.0 encoding=ISO-8859-1 ? !DOCTYPE struts-config PUBLIC -//Apache Software Foundation//DTD Struts Configuration 1.1//EN http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd; struts-config !-- Data Source Configuration -- !-- data-sources data-source set-property property=maxCount value=4/ set-property property=minCount value=2/ set-property property=description value=Artimus:MySQL Data Source Configuration/ set-property property=driverClass value=com.mysql.jdbc.Driver/ set-property property=url value=jdbc:mysql://localhost:3306/artimus/ set-property property=autoCommit value=true/ set-property property=user value=javauser/ set-property property=password value=javadude/ /data-source /data-sources -- !-- Form Bean Definitions -- form-beans !-- Menu Form Bean -- form-bean name=messageForm type=org.apache.struts.validator.DynaValidatorForm form-property name=msgtype type=java.lang.String/ form-property name=sender type=java.lang.String/ form-property name=receiver type=java.lang.String/ form-property name=messageTopic type=java.lang.String/ form-property name=priority type=java.lang.String/ form-property name=distribution type=java.lang.String/ form-property name=messageBody type=java.lang.String/ /form-bean form-bean name=editTitleForm type=org.apache.struts.validator.DynaValidatorForm form-property name=document type=java.lang.String/ form-property name=title type=java.lang.String/ /form-bean form-bean name=editPageForm type=org.apache.struts.validator.DynaValidatorForm form-property name=document type=java.lang.String/ form-property name=title type=java.lang.String/ form-property name=body type=java.lang.String/ /form-bean form-bean name=addLinkForm type=org.apache.struts.validator.DynaValidatorForm form-property name=document type=java.lang.String/ form-property name=linkname type=java.lang.String/ form-property
Re: using JSP2.0 / JSTL1.1 with Struts
Hi Erez, Yes, downloaded Standard 1.1 and use that in my app - it says on this page: http://jakarta.apache.org/taglibs/doc/standard-doc/intro.html Standard-1.1 (JSTL 1.1) requires a JSP container that supports the Java Servlet 2.4 and JavaServer Pages 2.0 specifications. Jakarta Tomcat 5 http://jakarta.apache.org/tomcat/ supports the new specifications. The Standard-1.1 taglib has been tested with Tomcat 5.0.3. Erez Efrati wrote: Jason, Thanks for replying me though it took me sometime to try it out. What about JSTL 1.1? Do I have to download it by myself and replace the Previous 1.0 version? Or is it part of JBoss or Tomcat 5.0? Thanks again, Erez -Original Message- From: Jason Lea [mailto:[EMAIL PROTECTED] Sent: Thursday, September 16, 2004 11:49 PM To: Struts Users Mailing List Subject: Re: using JSP2.0 / JSTL1.1 with Struts Erez Efrati wrote: Hi all, Until now I've been using Struts 1.1 with JSP1.2/JSTL 1.0 with the use of JSTL EL extension for Struts tags. Html-el etc.. Now I'd like to move on and take advantage of the JSP2.0 and JST1.1 new features. I am running with JBoss 3.2.5 + Tomcat 5.0. Any special steps? Do I need to download JSTL 1.1 by myself ? Thanks in advance, Erez Don't know about the JBoss side of things. But I'm using Tomcat 5.0+JSP2.0/JSTL1.1 I guess this question is going to come again too... :) I think the main points are: 1. change the web.xml declaration to have web-app xmlns=http://java.sun.com/xml/ns/j2ee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd; version=2.4 So that it uses Servlet 2.4 + JSP2.0 2. Tag-libs: no longer need to be specified in the web.xml, so you can remove those entries You don't use the struts-el tags, as EL is provided by the container. In the JSP you include the taglibs for example: /WEB-INF/jsp/include/prelude.jspf: %@ taglib prefix=c uri=http://java.sun.com/jsp/jstl/core; %%@ taglib prefix=fmt uri=http://java.sun.com/jsp/jstl/fmt; %%@ taglib prefix=fn uri=http://java.sun.com/jsp/jstl/functions; %%@ taglib prefix=html uri=http://jakarta.apache.org/struts/tags-html; %%@ taglib prefix=logic uri=http://jakarta.apache.org/struts/tags-logic; %%@ taglib prefix=bean uri=http://jakarta.apache.org/struts/tags-bean; %%@ taglib prefix=tiles uri=http://jakarta.apache.org/struts/tags-tiles; %%@ taglib prefix=nested uri=http://jakarta.apache.org/struts/tags-nested; %%@ taglib prefix=display uri=http://displaytag.sf.net; % I think that is all that is required, there is an optional step 3: 3. Read the JSP2.0 spec for the newweb.xml jsp-config option for controlling JSPs Which allows things like those tag-libs above to be included on every JSP page eg jsp-config jsp-property-group descriptionJSP Configuration/description display-nameJSPConfiguration/display-name url-pattern*.jsp/url-pattern !-- no scriplets, only taglibs can be used -- scripting-invalidtrue/scripting-invalid page-encodingUTF-8/page-encoding include-prelude/WEB-INF/jsp/include/prelude.jspf/include-prelude include-coda/WEB-INF/jsp/include/coda.jspf/include-coda /jsp-property-group /jsp-config Let me know if I missed anything... -- Jason Lea
RE: Path .frame.content Does Not Start With a / Character
Thanks Terry. I could have sworn it didn't work when I started using Struts (v1.0, I think). Sadly, a quick bugzilla search didn't show up anything noticeable. Maybe I just mistyped it ages ago and got that idea stuck in my head. :( I actually wanted to lookup the previous 1.0 and 1.1 release notes to figure out where I got this wrong idea but I deleted those versions from my HD. And now I can't seem to find out how to download previous releases from the Struts main site! It must be too late at night if I can't find the older versions! :( -David -Original Message- From: Terry Roe [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 22, 2004 6:23 PM To: Struts Users Mailing List Subject: Re: Path .frame.content Does Not Start With a / Character David, Someone had better tell my application then, because it is using lots of tiles for the input parameter. ;) I do recall getting the error described by Caroline some time ago, but darned if I can remember how I resolved it. (Too much water under the bridge. Or, too much beer on the brain?) It may be that I had to go to 1.2.x to get it to work. Just did a search of the Release Notes and it wasn't mentioned there, though. I do know it works because I am using validation and tiles for the input parameter. TR David G. Friedman wrote: I recall reading that the action's input parameter cannot be a tile. Try a JSP or action path. Regards, David -Original Message- From: Caroline Jen [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 22, 2004 5:55 PM To: [EMAIL PROTECTED] Subject: Path .frame.content Does Not Start With a / Character I think I have made all kinds of mistakes in the Struts history. I was working on VALIDATION. However, when I leave all text fields blank and submit the form for testing, I got HTTP Status 500 - java.lang.IllegalArgumentException: Path .frame.content does not start with a / character I think the problem is in my struts-config.xml file. I do not see that I put a / in front of any tile expressions; in particular, .frame.content (My struts-config.xml can be found in the attachment) The Tomcat logs file can also be found in the attachment. In the browser window, I got: java.lang.IllegalArgumentException: Path .frame.content does not start with a / character org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:10 62) org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcesso r.java:274) org.apache.struts.action.RequestProcessor.internalModuleRelativeForward(Requ estProcessor.java:1012) org.apache.struts.tiles.TilesRequestProcessor.internalModuleRelativeForward( TilesRequestProcessor.java:345) org.apache.struts.action.RequestProcessor.processValidate(RequestProcessor.j ava:980) org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:255) org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482) org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525) javax.servlet.http.HttpServlet.service(HttpServlet.java:709) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) ___ Do you Yahoo!? Express yourself with Y! Messenger! Free. Download now. http://messenger.yahoo.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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
: Path .frame.content Does Not Start With a / Character
Let me give you a download address:http://apache.linuxforum.net/dist/jakarta/struts/binaries/jakarta-struts-1.1.zip. Good luck to you! -- : David G. Friedman [mailto:[EMAIL PROTECTED] : 2004923 11:32 : Struts Users Mailing List : RE: Path .frame.content Does Not Start With a / Character Thanks Terry. I could have sworn it didn't work when I started using Struts (v1.0, I think). Sadly, a quick bugzilla search didn't show up anything noticeable. Maybe I just mistyped it ages ago and got that idea stuck in my head. :( I actually wanted to lookup the previous 1.0 and 1.1 release notes to figure out where I got this wrong idea but I deleted those versions from my HD. And now I can't seem to find out how to download previous releases from the Struts main site! It must be too late at night if I can't find the older versions! :( -David -Original Message- From: Terry Roe [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 22, 2004 6:23 PM To: Struts Users Mailing List Subject: Re: Path .frame.content Does Not Start With a / Character David, Someone had better tell my application then, because it is using lots of tiles for the input parameter. ;) I do recall getting the error described by Caroline some time ago, but darned if I can remember how I resolved it. (Too much water under the bridge. Or, too much beer on the brain?) It may be that I had to go to 1.2.x to get it to work. Just did a search of the Release Notes and it wasn't mentioned there, though. I do know it works because I am using validation and tiles for the input parameter. TR David G. Friedman wrote: I recall reading that the action's input parameter cannot be a tile. Try a JSP or action path. Regards, David -Original Message- From: Caroline Jen [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 22, 2004 5:55 PM To: [EMAIL PROTECTED] Subject: Path .frame.content Does Not Start With a / Character I think I have made all kinds of mistakes in the Struts history. I was working on VALIDATION. However, when I leave all text fields blank and submit the form for testing, I got HTTP Status 500 - java.lang.IllegalArgumentException: Path .frame.content does not start with a / character I think the problem is in my struts-config.xml file. I do not see that I put a / in front of any tile expressions; in particular, .frame.content (My struts-config.xml can be found in the attachment) The Tomcat logs file can also be found in the attachment. In the browser window, I got: java.lang.IllegalArgumentException: Path .frame.content does not start with a / character org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:10 62) org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcesso r.java:274) org.apache.struts.action.RequestProcessor.internalModuleRelativeForward(Requ estProcessor.java:1012) org.apache.struts.tiles.TilesRequestProcessor.internalModuleRelativeForward( TilesRequestProcessor.java:345) org.apache.struts.action.RequestProcessor.processValidate(RequestProcessor.j ava:980) org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:255) org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482) org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525) javax.servlet.http.HttpServlet.service(HttpServlet.java:709) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) ___ Do you Yahoo!? Express yourself with Y! Messenger! Free. Download now. http://messenger.yahoo.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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]