Re: Still struggeling: howto get ActionForward to calling page
yeap, that's something in a way i thought of as 'dirty fix' for a framework. As i am looking into struts for 2-3 days only i am surprised to find such an elementary functionallity not implemented? Should be interessting for plenty of people having more than 2-3 pages nested in not linear way? Alex Send reply to: Struts Users Mailing List [EMAIL PROTECTED] Date sent: Wed, 06 Aug 2003 10:50:00 +0200 From: Adam Hardy [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject:Re: Still struggeling: howto get ActionForward to calling page [ Double-click this line for list subscription options ] The input attribute on the action mapping is what you specify for the return page when validation of the form bean fails, so that is not going to help you. The easiest solution I can think of is to put a hidden field in your selection screens with the screen's URL in it. Alternatively you could try using the HTTP header referer e.g.: Referer: http://www.w3.org/hypertext/DataSources/Overview.html but this is an optional header so not all browsers have to send it. I've never used it so I don't know which browsers do send it. hth Adam [EMAIL PROTECTED] wrote: Hi, i am still looking for a clean way to get an ActionForward to the page that called my current Action. That means e.g. I am a displayListAction and have been called by a selection screen. In case i don't find a result for the selection parameters I would like to bring a specific error to the calling selection screen. That would give users a chance to change their selection. Sounding easy, this gets complicate in case there are several selection screens bringing up the same list. I don't like to create a specific forward for each selection page and then somehow determine which one called me (can do that, but there should be a nice way in such a famous framework?). The hint using ActionMapping.getInputForward() or new ActionForward(mapping.getInput()) didn't help me to much, seems to me there is hardcoded value inside, specified in the input attribute of the specific action. How would an expert solve that problem? :-) Alex Looking for a way to get an ActionForward to the page calling the current page. The example: Want to realize 5-XX pages where to enter values for a calculation. The calculation result page would check if everything was fine (using db queries etc..) Now in case that one of the input values is incorrect / missmatching the context, I'd like to redisplay the calling page showing the values entered before + an error message. How can i realize that without having to define specific forwards to the 5 pages and then deciding which one was the calling one? Tried the ActionMapping.getInputForward(), but it brought back null values in the ActionForward only. Comments and keywords to look for welcome. - 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: current year in JSP
Thanks it worked fine. Erez -Original Message- From: Bailey, Shane C. [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 05, 2003 7:59 PM To: 'Struts Users Mailing List' Subject: RE: current year in JSP The problem is that something like that (determining current date) should be done somewhere else besides the JSP if you want scriptlets totally out of your JSP. But if you don't want to do it somewhere else then the single expression scriptlets aren't too bad to have in your JSP: bean:define id=currentYear %=(new java.util.GregorianCalendar()).get(java.util.Calendar.YEAR)% /bean:define This is untested code but it should work (or a variation). -Original Message- From: Erez Efrati [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 05, 2003 2:54 PM To: 'Struts Users Mailing List' Subject: current year in JSP I have a scriptlet in my JSP which I wish to rewrite using JSTL and tags and to get rid of the java code. How can I perform this? % for (int i = 30; i 90; i++) { % html:option value=%=Integer.toString(2003-i)% %=2003-i%/html:option % } % I wish to do something like: c:forEach var=age begin=30 end=90 html-el:option value='${CurrentYear - age}' c:out value='${CurrentYear - age}' / /html-el:option How to compute the CurrentYear? Thanks a lot, Erez - 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: Calling a default Action upon App startup
Greetings Mohan. Thanks for replying. The reasons why I mentioned the listener approach because I am also loading the user profile upon successful login. You are correct in that the mixing of servlet listeners and Struts forms is not a good idea. Your ServletContextListener approach seems interesting though. The data I am using to populate the forms are merely reference/lookup data that the user can select from. Thus the data is very static, does not change at all. Are you currently using the ServletContextListener for such data? Another approach would be to override the ActionForm reset method to load the default values in the form. However that violates separation of concerns. the ActionForm should not be doing any kind of database lookup. _CJ On Tuesday 05 August 2003 12:11 am, Mohan Radhakrishnan wrote: This is what I think about the listener approach. In our project even though we use HttpSessionAttributeListener, we are loading only the login user profile as a java bean. We don't mix servlet listeners and Struts forms. We could load data into POJO's and then copy it into ActionForms whenever they are needed. I am not sure about the efficiency of this approach for large number of forms. The filter is hit even before the ActionServlet is hit the VERY first time. So Struts is not even loaded unless you use the load on startup tag. Again here we load our own javabeans. But when we need to prepopulate we set up our ActionForms Just-in-Time. Our data that don't change often is in javabeans loaded by our ServletContextListener. Mohan -Original Message- From: Curtney Jacobs [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 05, 2003 9:33 AM To: Struts Users Mailing List Subject: Calling a default Action upon App startup Greetings everyone! I would like to preopulate serveral forms with default values retrieve from a database upon application startup or after a successful login by the user. I have an approach in mind, however, I am not sure if it is the most efficient or best approach. My approach is to use a filter that creates and stores in memory default ActionForms. The ActionForm will contain default values for select fields (or any other fields) retrieved from a database. The ActionForms will be stored within the current user session and then controll will be given over to Struts ActionServlet. Another similar approach would be to register a listerner (HttpSessionAttributeListener) that would essentially wait for a specific attribute to be added into the session (i.e SETUP_FORMS) then it would query the database for neccessary application setup data. I read the message archive, and a few have suggested calling a setup action per request that prepopulates the default values in the ActionForm. This is a valid approach, but IMHO only for small applications. It just seems that there will be to much traffic going on between the app and the database. Correct me if I am wrong. If you have gotten this far please share your thoughts on this topic. Curtney - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [OT] - [TOPIC] - [VOTE]
I have noticed that this list alone has more postings then the all the Sun mailing postings put together ? Why do you think that is the case ? From: James Mitchell [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: RE: [OT] - [TOPIC] - [VOTE] Date: Tue, 5 Aug 2003 07:11:37 -0400 When I'm in a hurry to get through my inbox, I rely on 2 industry standard categories/criteria for sorting... [BEER] [OTHER] ;) -- James Mitchell Software Engineer / Struts Evangelist http://www.struts-atlanta.org 770-822-3359 AIM:jmitchtx -Original Message- From: message message [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 05, 2003 7:07 AM To: [EMAIL PROTECTED] Subject: RE: [OT] - [TOPIC] - [VOTE] What is the criteria of the list ? From: James Mitchell [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: RE: [OT] - [TOPIC] - [VOTE] Date: Tue, 5 Aug 2003 06:20:51 -0400 -1 We tried this a long time ago. Fact is, it would be impossible to categorize discussions by any label. Especially when you consider how topics can vary from one area to another or could be a mix of more than a few that you listed. Your best bet is to just go through what you can and delete the rest. There is a massive amount of knowledge transfer being spread among the threads here (and other lists), so it is up to you to get what you need or save what you might need in the future. I have a technique where I save (what I consider) important discussions in subfolders within my mail client. That makes for quicker searches among relevant messages. -- James Mitchell Software Engineer / Struts Evangelist http://www.struts-atlanta.org 770-822-3359 AIM:jmitchtx -Original Message- From: Puneet Agarwal [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 05, 2003 1:08 AM To: [EMAIL PROTECTED] Subject: [OT] - [TOPIC] - [VOTE] With growing traffic on this mailing list, it has become difficult to search for mails to read or not to read. For better participation in the forum, we can have following norm. We can have the Subject of mails prefix any of the following categories. If all agree we could request ASF people to publish these on the struts site too. By doing so we can apply message filtering rules to sort the mails and read/answer those that interest you. I hope this would lead to better participation in the forum. [OT] -Off Topic [FB] -Form Bean [AF] -Action Form [RP] -Request Processor [AS] -ActionServlet [SC] -Scope Related mails [GE] -General Error [DG] -Design Consideration [PR] -Problem in Struts [TL] -Tiles [T-BE] -Bean Tag Library [T-HT] -HTML Tag Library [T-NS] -Nested Tag Library [T-LG] -Logic Tag Library etc Shall we start voting for this...!!! Regards, Puneet Agarwal Tata Consultancy Services, C-56, Phase - II, NOIDA 201305 (India) Phone: +91-120-2461001, 2, 7, 8, 9, 12, 13 (Ext. 1031) FAX : +91-120-246 1521 Struts ... Action ... Struts in Action ... Action in Struts ... - 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] _ The new MSN 8: smart spam protection and 2 months FREE* http://join.msn.com/?page=features/junkmail - 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] _ Add photos to your messages with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: changing to JSTL
test=${yourFormName.yourProperty ne 0} -Original Message- From: Adam Hardy [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 06, 2003 9:29 AM To: Struts Users Mailing List Subject: changing to JSTL Can anyone give a quick snippet to show how to replace the logic:equal tag with the c:choose c:when test=??? OK /c:when c:otherwise stuffit /c:otherwise /c:choose within a formtag where the item to test is whether a form property is 0 or not? I'm using the JSTL tutorial at sun but they don't bring struts into it at all. TIA Adam - 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 use ActionError with two keys?
The name of the host would presumably be available from the actionform, or some bean in your action. Then you would create an ActionError like this: new ActionError(errors.required,hostName); I'm not sure I understand why the host name, which seems to be a variable would be represented as a key also. -Original Message- From: Zsolt Koppany [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 06, 2003 9:47 AM To: Struts Users Mailing List Subject: Re: How to use ActionError with two keys? And how can I do that? How can I get the string assigned to for example errors.required? Zsolt On Wed, 2003-08-06 at 15:36, Prashanth.S wrote: Hi i think u need to use positional parameter substitution instead of using another key like {0},{1} etc in actionerror and replace them with actual values in properties file.. HTH prashanth Zsolt Koppany [EMAIL PROTECTED] wrote: Hi, how can I use ActionError with two keys. The example below show what I would like to do: new ActionError(errors.required, host.name) Zsolt - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software - 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: Returning a result set
Thanks for that. So what would be the best way of displaying such data on a JSP page? Would logic iterate be ok for such large amounts of data? -Original Message- From: Mehta, Chirag (IT) Sent: 07 August 2003 09:49 To: [EMAIL PROTECTED] Subject: Returning a result set Hello, I am developing an application where the user can run SQL queries from a text area on a JSP page and the application returns the results. As I have no idea what the user will input and the database they will be connected has many gigs of data, with plenty of column, how should i handle the result set from the database? I cannot define set methods as I have no idea what the return will be and might be very large? Can anyone help? Thanks Chirag -- NOTICE: If received in error, please destroy and notify sender. Sender does not waive confidentiality or privilege, and use is prohibited. -- NOTICE: If received in error, please destroy and notify sender. Sender does not waive confidentiality or privilege, and use is prohibited. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
uploadfile path
I am trying to upload a file using html:file which is received as a FormFile, the problem is I need to find out this files absolute path. Hwo can I retrieve this information? Thanks Daniel - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Redirect option instead of findForward!!!Urgent
Hi Rohit, Could u please be more elaborate on your given solution. I am still not able to get through the solution. Anurag Garg -Original Message- From: Rohit Aeron [mailto:[EMAIL PROTECTED] Sent: Thursday, August 07, 2003 2:37 PM To: Struts Users Mailing List Subject: RE: Redirect option instead of findForward!!!Urgent Try changing the scope of forward or Action in struts-config. It might help.I think you can specify a scope for forward also ...not tried but just see if it works... Regards Rohit -Original Message- From: Anurag Garg [mailto:[EMAIL PROTECTED] Sent: Thursday, August 07, 2003 2:20 PM To: Struts Users Mailing List Subject: RE: Redirect option instead of findForward!!!Urgent Hi Adam, I have already tried this option, but still it is giving me the same problem. This is how I have defined in the struts-config. When i do mapping.findForward(showPassword) in my TestAC i am taken to the correct page but the request object is also passed with it although i have set the redirect attribute as true. action path=/test type=com.action.TestAC name=sourcingAF scope=request validate=false input=/pages/Test.jsp forward name=showLogout path=/pages/Logout.jsp/ forward name=showPassword path=/ShowPassword.do?hidValue=N redirect=true / I am using the struts rc-2. Any problem with it. Anurag Garg -Original Message- From: Adam Hardy [mailto:[EMAIL PROTECTED] Sent: Thursday, August 07, 2003 1:35 PM To: Struts Users Mailing List Subject: Re: Redirect option instead of findForward!!!Urgent Hi Anurag, you specify in struts-config in the forward element for the action mapping, that it should redirect. (=true) Adam Anurag Garg wrote: Hello All, I have created a page where i submit the data for saving it in the database. I have some hidden variables defined in the same page. After saving the data when my control comes in the action class I do mapping.findForward to the other page. The new page also contains some hidden variables which have the same name as the previous page. When the new page's action class gets executed the value of hidden variables from the previous page is picked as the findforward is taking my request object to the other page. Now i dont want my request object from the previous page to move to the new page. Is there any option which can do response.sendRedirect for me so that i dont take my request object of the previous page along to the new page. I have tried to reset the variables in the action class before doing findforward to the new page. Thanks for the response in advance Anurag Garg. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] *-- This message and any attachment(s) is intended only for the use of the addressee(s) and may contain information that is PRIVILEGED and CONFIDENTIAL. If you are not the intended addressee(s), you are hereby notified that any use, distribution, disclosure or copying of this communication is strictly prohibited. If you have received this communication in error, please erase all copies of the message and its attachment(s) and notify the sender or Kanbay postmaster immediately. Any views expressed in this message are those of the individual sender and not of Kanbay. Although we have taken steps to ensure that this e-mail and any attachment(s) are free from any virus, we advise that in keeping with good computing practice the recipient should ensure they are actually virus free. - 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: Returning a result set
have a look at www.ibatis.com The db-layer is a pretty good counterpart to struts and very well documented. It's worth to look at (I'm not sponsered by ibatis) cheers Reinhard - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Location of JSPs for TILES
Must all files for a given Tiles definition be located in the same folder? I am extending one layout where the base file is located in /WEB-INF/jsp and the added file is located in /WEB-INF/jsp/proptype No, this shouldn't be a problem. I do the same thing--the only difference is that you have your JSPs under WEB-INF. (I found out about that practice after building several apps, and not all containers support it anyway.) Are you sure that the proptypelist.jsp is the one that it can't find? Maybe you could give your definition for .list so we can see if there's an issue with that... David Hibbs Staff Programmer / Analyst American National Insurance Company - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Domain Value LookUp
Though this is not directly related to STRUTS, I was wondering if someone has come across something like below that can be integrated with STRUTS. Is anyone aware of any generic component for Domain Value LookUp. Domain Values might be based on one or more contexts. e.g list of states is single context based. list of counties for a state is 2 contexts based. list of districts in a county of a state depends upon 3 context. So I am looking at some generic API's which can be use to get the list of domain values by passing the related contexts. Thanks Sreekant G. This mail was scanned by Interscan Virus Wall of Mailserver at Cathedral Road TCS Chennai - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Using Struts Validator on Map-backed ActionForms
field property=volume(fieldname)... in the validations file, here fieldname is dynamic and appended by 0,1,2,3,4 since there would be multiple entries of say phone % for (int i=0;i5;i++;) { % html:text property=volume(phone%=i%) value=/ % } % my actual fieldname is phone but on jsp it would be value(phone0),value(phone1),value(phone2),value(phone3),value(phone4) if it was a single phone then its fine field property=volume(phone)... but in mulitple phones how to specify, is there a way ? Thanks Panchasheel -Original Message- From: Erez Efrati [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 06, 2003 5:52 AM To: 'Struts Users Mailing List' Subject: RE: Using Struts Validator on Map-backed ActionForms Just forgot to explain that I do the following: field property=property(user-username)... because user-username is the name of one of my properties (fields) on the form. In your case it would be something like: field property=volume(fieldname)... Erez -Original Message- From: Erez Efrati [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 06, 2003 11:44 AM To: 'Struts Users Mailing List' Subject: RE: Using Struts Validator on Map-backed ActionForms Hi Panchasheel, I am working with map backed action forms and the way to work with validation in this case is as follows (a piece of my validation.xml): (on my ActionForm there are getProperty and setProperty interfacing the actual map - as in your case I guess it is 'getVolume() and setVolume()). !-- username -- field property=property(user-username) depends=required, mask msg name=mask key=logon.username.maskMsg/ arg0 key=logon.username/ var var-namemask/var-name var-value${username}/var-value /var /field Hope this helps, Erez -Original Message- From: Gandle, Panchasheel [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 06, 2003 4:48 AM To: 'Struts Users Mailing List' Subject: RE: Using Struts Validator on Map-backed ActionForms Has anybody come up with any validations for map-backed fields field property=??? depends=required arg0 key=/ /field what should go in ??? for % for (int i=0;i5;i++;) { % html:text property=volume(key%=i%) value=/ % } % Thanks Panchasheel -Original Message- From: Cordingley, Charles [mailto:[EMAIL PROTECTED] Sent: Friday, August 01, 2003 1:24 PM To: '[EMAIL PROTECTED]' Subject: Using Struts Validator on Map-backed ActionForms Hi, I am trying to use the Struts Validator to generate Javascript validation on a Map-backed action form, but I keep getting type is null or not an object javascript error (I am using Struts 1.1). Non map-backed properties on the form work fine. In the JSP I am creating text boxes using: html:text style=WIDTH: 75px; text-align: right property='%=volume(+act.getActivityID()+)%' value='%=+scenAct.getActivityVolume()%'/ and have this method on the action form to get it: public void setVolume(String key, Object value) { volumes.put(key, value); } In the validation.xml I have tried: field property=volume() depends=required arg0 key=/ /field and: field property=volume() depends=required arg0 key=/ /field but both result in the error. Does anyone know how to do this? Thanks, Charles. The Royal Bank of Scotland plc ('the Bank') is regulated by the Financial Services Authority and is a member of The Royal Bank of Scotland Marketing Group. The only packaged products (life policies, unit trusts and other collective investment schemes and stakeholder and other pensions) the Bank advises on and sells are those of the Marketing Group, whose other members are Royal Scottish Assurance plc and Royal Bank of Scotland Unit Trust Management Limited, both regulated by the Financial Services Authority. The Royal Bank of Scotland plc. Registered in Scotland No 90312. Registered Office: 36 St Andrew Square, Edinburgh EH2 2YB. Agency agreements exist between members of The Royal Bank of Scotland Group. This e-mail message is confidential and for use by the addressee only. If the message is received by anyone other than the addressee, please return the message to the sender by replying to it and then delete the message from your computer. Internet e-mails are not necessarily secure. The Royal Bank of Scotland plc does not accept responsibility for changes made to this message after it was sent. Whilst all reasonable care has been taken to avoid the transmission of viruses, it is the responsibility of the recipient to ensure that the onward transmission, opening or use of this message and any attachments will not adversely affect its systems or data. No responsibility is accepted by The Royal Bank of Scotland plc in this regard and the recipient should
RE: Using Struts Validator on Map-backed ActionForms
Has anybody come up with any validations for map-backed fields field property=??? depends=required arg0 key=/ /field what should go in ??? for % for (int i=0;i5;i++;) { % html:text property=volume(key%=i%) value=/ % } % Thanks Panchasheel -Original Message- From: Cordingley, Charles [mailto:[EMAIL PROTECTED] Sent: Friday, August 01, 2003 1:24 PM To: '[EMAIL PROTECTED]' Subject: Using Struts Validator on Map-backed ActionForms Hi, I am trying to use the Struts Validator to generate Javascript validation on a Map-backed action form, but I keep getting type is null or not an object javascript error (I am using Struts 1.1). Non map-backed properties on the form work fine. In the JSP I am creating text boxes using: html:text style=WIDTH: 75px; text-align: right property='%=volume(+act.getActivityID()+)%' value='%=+scenAct.getActivityVolume()%'/ and have this method on the action form to get it: public void setVolume(String key, Object value) { volumes.put(key, value); } In the validation.xml I have tried: field property=volume() depends=required arg0 key=/ /field and: field property=volume() depends=required arg0 key=/ /field but both result in the error. Does anyone know how to do this? Thanks, Charles. The Royal Bank of Scotland plc ('the Bank') is regulated by the Financial Services Authority and is a member of The Royal Bank of Scotland Marketing Group. The only packaged products (life policies, unit trusts and other collective investment schemes and stakeholder and other pensions) the Bank advises on and sells are those of the Marketing Group, whose other members are Royal Scottish Assurance plc and Royal Bank of Scotland Unit Trust Management Limited, both regulated by the Financial Services Authority. The Royal Bank of Scotland plc. Registered in Scotland No 90312. Registered Office: 36 St Andrew Square, Edinburgh EH2 2YB. Agency agreements exist between members of The Royal Bank of Scotland Group. This e-mail message is confidential and for use by the addressee only. If the message is received by anyone other than the addressee, please return the message to the sender by replying to it and then delete the message from your computer. Internet e-mails are not necessarily secure. The Royal Bank of Scotland plc does not accept responsibility for changes made to this message after it was sent. Whilst all reasonable care has been taken to avoid the transmission of viruses, it is the responsibility of the recipient to ensure that the onward transmission, opening or use of this message and any attachments will not adversely affect its systems or data. No responsibility is accepted by The Royal Bank of Scotland plc in this regard and the recipient should carry out such virus and other checks as it considers appropriate. - 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] Retrieve all messages ever sent to this list
I believe on the apache site there is a full mbox archive or something like that. -Original Message- From: Filip Polsakiewicz [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 05, 2003 11:01 AM To: Struts Users Mailinglist Subject: [OT] Retrieve all messages ever sent to this list Hi, is there a way to retrieve all messages which have been sent to this mailinglist until now? I'd like to save all messages on my Laptop as a kind of reference. Thanks, Filip This message and its contents (to include attachments) are the property of Kmart Corporation (Kmart) and may contain confidential and proprietary information. You are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on information contained herein is strictly prohibited. Unauthorized use of information contained herein may subject you to civil and criminal prosecution and penalties. If you are not the intended recipient, you should delete this message immediately. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: ResponseUtils.write and null properties
Yeah, we found this too. When using WebLogic 6.1 our reset functions set all values to null, which then left them blank on the JSP. When upgrading to WebLogic 7.0 then suddenly were all output as null and not a blank field. Upon investigation this is the way it should be done and was a bug (well not written ot the spec) in WebLogic 6.1. There is a flag in 7.0 which can be set to toggle this behaviour. Hope this helps IV --- Brian Lee [EMAIL PROTECTED] wrote: Is the intended behavior of ResponseUtils.write to write out the String null to the print writer if the property supplied is null? It seems that Weblogic's JspWriter will not write out null if null is provided, but sun's j2ee reference server will. BAL http://www.amazon.co.uk/exec/obidos/redirect-home?tag=velloscouk-21placement=home_multi.gifsite=amazon - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: changing to JSTL
Wow. I like this EL, but I'm not sure it's a good thing unless they ban %scripting% in jsps. :) Alex Shneyderman wrote: test=${yourFormName.yourProperty ne 0} -Original Message- From: Adam Hardy [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 06, 2003 9:29 AM To: Struts Users Mailing List Subject: changing to JSTL Can anyone give a quick snippet to show how to replace the logic:equal tag with the c:choose c:when test=??? OK /c:when c:otherwise stuffit /c:otherwise /c:choose within a formtag where the item to test is whether a form property is 0 or not? I'm using the JSTL tutorial at sun but they don't bring struts into it at all. TIA Adam - 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: New Bie: How to apply styles to submit buttons created with struts tags
Hi, I have a few submit buttons to which I wish to apply a style. I tried the following but I could not get the desired blue coloured buttons. html:submit property = LOGIN style=BORDER-RIGHT: #98c8e8 1px solid; BORDER-TOP: #98c8e8 1px solid; BORDER-LEFT: #98c8e8 1px solid; BORDER-BOTTOM: #98c8e8 1px solid onclick=loginForm.validate()LOGIN/html:submit Please suggest what I should do to get blue coloured buttons. I also have the following *.css file with me. .edit { FONT-WEIGHT: bold; FONT-SIZE: 8pt; FONT-FAMILY: Arial; BACKGROUND-COLOR: #fff1e6 } .edit { FONT-SIZE: 8pt; FONT-FAMILY: VArial } .edita { FONT-SIZE: 8pt; FONT-FAMILY: Arial; BACKGROUND-COLOR: #fff1e6 } .edit1 { FONT-WEIGHT: bold; FONT-SIZE: 8pt; FONT-FAMILY: Arial; BACKGROUND-COLOR: #fee2cd } .edit1a { FONT-SIZE: 8pt; FONT-FAMILY: Arial; BACKGROUND-COLOR: #fee2cd } .edit2 { FONT-WEIGHT: bold; FONT-SIZE: 8pt; FONT-FAMILY: Arial; BACKGROUND-COLOR: #fed3b4 } .edit2a { FONT-SIZE: 8pt; FONT-FAMILY: Arial; BACKGROUND-COLOR: #fed3b4 } .edit3 { FONT-SIZE: 8pt; FONT-FAMILY: Arial; BACKGROUND-COLOR: #f6fbff } .edit3a { FONT-SIZE: 8pt; FONT-FAMILY: Arial; BACKGROUND-COLOR: #eaf3fb } .edit3b { FONT-SIZE: 8pt; FONT-FAMILY: Arial; BACKGROUND-COLOR: #d7e9f7 } .edit4 { FONT-SIZE: 8pt; FONT-FAMILY: Arial; BACKGROUND-COLOR: #ff } .text { FONT-SIZE: 8pt; COLOR: #00; FONT-FAMILY: Arial } .text1 { FONT-SIZE: 8pt; COLOR: #0788de; FONT-FAMILY: Arial } .text2 { FONT-WEIGHT: bold; FONT-SIZE: 9pt; COLOR: #00; FONT-FAMILY: Arial } .text3 { FONT-WEIGHT: bold; FONT-SIZE: 9pt; COLOR: #f16917; FONT-FAMILY: Arial } .text4 { FONT-WEIGHT: bold; FONT-SIZE: 9pt; COLOR: #127fc9; FONT-FAMILY: Arial } .logintext { FONT-WEIGHT: bold; FONT-SIZE: 9pt; COLOR: #3898d8; FONT-FAMILY: Arial } .table { BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; FONT-SIZE: 8pt; BORDER-LEFT-COLOR: #ff; BORDER-BOTTOM-WIDTH: 0px; BORDER-BOTTOM-COLOR: #ff; COLOR: #00; BORDER-TOP-COLOR: #ff; FONT-FAMILY: Arial; TEXT-ALIGN: center; BORDER-RIGHT-WIDTH: 0px; BORDER-RIGHT-COLOR: #ff } .table1 { BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; FONT-SIZE: 8pt; BORDER-LEFT-COLOR: #ff; BORDER-BOTTOM-WIDTH: 0px; BORDER-BOTTOM-COLOR: #ff; COLOR: #00; BORDER-TOP-COLOR: #ff; FONT-FAMILY: Arial; TEXT-ALIGN: center; BORDER-RIGHT-WIDTH: 0px; BORDER-RIGHT-COLOR: #ff } .buttons { FONT-WEIGHT: bold; FONT-SIZE: 9pt; WIDTH: 72px; COLOR: #ff; FONT-FAMILY: Arial; HEIGHT: 17px; BACKGROUND-COLOR: #98c8e8; TEXT-ALIGN: center } buttons2 { FONT-WEIGHT: bold; FONT-SIZE: 8pt; WIDTH: 72px; COLOR: #0384dc; FONT-FAMILY: Arial; HEIGHT: 17px; BACKGROUND-COLOR: #d1cecd; TEXT-ALIGN: center } .buttons1 { FONT-WEIGHT: bold; FONT-SIZE: 8pt; VERTICAL-ALIGN: 15%; WIDTH: 165px; COLOR: #ff; FONT-FAMILY: Arial; HEIGHT: 17px; BACKGROUND-COLOR: #98c8e8; TEXT-ALIGN: center } Thanks, Seshadhri Srinivasan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Cannot find bean XXX in any scope - error
hi, u don't have to declare any classes .. the framework pick it up from the classpath logic:iterate name="tayloringForm" property="openFailures" id="openFailureDescriptor" type="tayloring.OpenFailureDescriptor" is absolutelycorrect should work for u... BTW, FYI my brother-in-law is working in ur company -- nagi ---Original Message--- From: Struts Users Mailing List Date: Tuesday, August 05, 2003 05:16:56 PM To: Struts Users Mailing List Subject: Re: Cannot find bean "XXX" in any scope - error Thanks Nagi..the error for Form bean is gone...but now the error isdisplayed for the descriptor class..".Cannot find beanOpenFailureDescriptor in scope request"Property openFailures in tayloringForm is a List which holdsOpenFailureDescriptor objects.i have tried changing the logic:iterate as belowlogic:iterate name="tayloringForm" property="openFailures" id="OpenFailureDescriptor" scope="request" type="tayloring.OpenFailureDescriptor"Should i declare all the descriptor or value objects somewhere?Thanks,Arindam"Nagendra Kumar O V S" To: [EMAIL PROTECTED] [EMAIL PROTECTED] cc: go.com Subject: Re: Cannot find bean "XXX" in any scope - error 08/05/2003 05:11 PM Please respond to "Struts Users Mailing List" hi, the name of the bean is case-sensitive... logic:iterate name="tayloringForm" property="openFailures" id="OpenFailureDescriptor" "tayloringForm " as defined in the config file check it out --nagi ---Original Message--- From: Struts Users Mailing List Date: Tuesday, August 05, 2003 04:47:14 PM To: Struts Users Mailing List Subject: Cannot find bean "XXX" in any scope - error Guys, Any help is appreciated in this regard - In struts-config.xml, I have an action mapping as below - action name="tayloringForm" path="/Tayloring/ShowAllOpenFailures" scope="request" type="tayloring.ShowAllOpenFailuresAction" validate ="false" forward name="success" path ="/pages/tayloring/all_open_failures.jsp" / /action and definition for form bean is as below - form-bean name="tayloringForm" type="tayloring.TayloringForm" /form-bean ShowAllOpenFailuresAction class, sets a property in the form bean, ((TayloringForm)form).setOpenFailures(openfailures); and fowards to "success" In all_open_failures.jsp, i have the following logic:iterate name="TayloringForm" property="openFailures" id ="OpenFailureDescriptor" trtd width="14%" align="center" bgcolor="#bb"bbean:write name="OpenFailureDescriptor" property="facilityID" //b/td /logic:iterate When i access this page via Tayloring/ShowAllOpenFailures action, i get the following error, org.apache.jasper.JasperException: Cannot find bean TayloringForm in any scope at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:254) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295) ... Thanks, Arindam - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] . IncrediMail - Email has finally evolved - Click Here-To unsubscribe, e-mail: [EMAIL PROTECTED]For additional commands, e-mail: [EMAIL PROTECTED]. IncrediMail - Email has finally evolved - Click Here
Re: Struts with Tomcat 4.1.27 ?? (YES)
Do Struts works with Tomcat 4.1.27 ? Yes. I just saved my webapps struts-*WHATEVER* applications (and my tomcat-users.xml ids/passwords), erased my tomcat-4.1.24, installed 4.1.27, and started the new one in under 5 minutes time. My application, the struts example application, and a few tiles-documentation examples links seem to work fine. FYI - you could've installed it so it used another set of ports and didn't conflict with any previous version you had running. Playing with the server.xml file for a new version of Tomcat won't hurt if you installed it in another location on disk and tweak that version's config file. If you try to run it while your normal version is running, it should just exit, die, or complain it couldn't get the port or service. Regards, David - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Date validation and format
I think there is a trick you can perform with regard to this: 2) Or is it possible in action read the value of the var named datePattern in validation for particular form?? You can call your validate method in your Form.validate() initial when you populate the form. If the date format is not the one you wanted, you use a decorator to format it, but don't add the error to the errors collection(since this is just displaying the form). On the client side, you can call validateWhen(myForm) in onLoad(), etc. Do I understand what you wanted to do correctly:). -Original Message- From: Ji Mare [mailto:[EMAIL PROTECTED] Sent: August 5, 2003 1:42 AM To: Struts Users Mailing List Subject: Date validation and format Hi all, I have question to date validation. In validation.xml I specified the field folowing way: field property=when depends=required,date arg0 key=demand.when resource=true name=required/ arg0 key=demand.when resource=true name=date/ arg1 key=${var:datePattern} resource=false name=date/ var var-namedatePattern/var-name var-value.MM.dd/var-value /var /field and everything is working, but, when I edit the field I would like to load the date frm DB and format the date the same pattern as is specified in the validation.xml. And here is my question. 1) Is it possible to specifi the var-value as the key in applicationResources to be able from application load the same value of the key. 2) Or is it possible in action read the value of the var named datePattern in validation for particular form?? Thanks a lot. -- Ji Mare (mailto:[EMAIL PROTECTED]) SAD SVT Praha, s.r.o. (http://www.svt.cz) Czech Republic - 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: uploadfile path
its only the original file's location that i require, i can't find any mention of how to aquire this in any online articles. -Original Message- From: Dan Tran [mailto:[EMAIL PROTECTED] Sent: 06 August 2003 16:24 To: Struts Users Mailing List Subject: Re: uploadfile path Folow the Struts upload example, you can trace thru how Struts gets the client file and upload to server where you have to do extra work to copy data from FormFile (its stream buffer) to the your choice of server location. -Dan - Original Message - From: Yansheng Lin [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Sent: Wednesday, August 06, 2003 8:18 AM Subject: RE: uploadfile path html:form method=POST enctype=multipart/form-data html:file property=theFile / /html:form theFile is type of FormFile. You can go from there. -Original Message- From: Daniel Massie [mailto:[EMAIL PROTECTED] Sent: August 6, 2003 2:35 AM To: Struts Users Mailing List Subject: uploadfile path I am trying to upload a file using html:file which is received as a FormFile, the problem is I need to find out this files absolute path. Hwo can I retrieve this information? Thanks Daniel - 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]
[OT] Performance Improvement
Any idea on the performance (turn-around-time) improvement achieved by using OSCache ? A rough range might do. Thanks Sreekant G. TCS AMBATTUR This mail was scanned by Interscan Virus Wall of Mailserver at Cathedral Road TCS Chennai - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: confirm unsubscribe from struts-user@jakarta.apache.org
On Tuesday 05 August 2003 13:46, [EMAIL PROTECTED] wrote: Hi! This is the ezmlm program. I'm managing the [EMAIL PROTECTED] mailing list. I'm working for my owner, who can be reached at [EMAIL PROTECTED] To confirm that you would like [EMAIL PROTECTED] removed from the struts-user mailing list, please send an empty reply to this address: struts-user-uc.1060087597.llhignackapomcbmgjho-me=caoilte [EMAIL PROTECTED] Usually, this happens when you just hit the reply button. If this does not work, simply copy the address and paste it into the To: field of a new message. or click here: mailto:struts-user-uc.1060087597.llhignackapomcbmgjho-me [EMAIL PROTECTED] I haven't checked whether your address is currently on the mailing list. To see what address you used to subscribe, look at the messages you are receiving from the mailing list. Each message has your address hidden inside its return path; for example, [EMAIL PROTECTED] receives messages with return path: struts-user-return-number[EMAIL PROTECTED] he.org. Some mail programs are broken and cannot handle long addresses. If you cannot reply to this request, instead send a message to [EMAIL PROTECTED] and put the entire address listed above into the Subject: line. --- Administrative commands for the struts-user list --- I can handle administrative requests automatically. Please do not send them to the list address! Instead, send your message to the correct command address: To subscribe to the list, send a message to: [EMAIL PROTECTED] To remove your address from the list, send a message to: [EMAIL PROTECTED] Send mail to the following for info and FAQ for this list: [EMAIL PROTECTED] [EMAIL PROTECTED] Similar addresses exist for the digest list: [EMAIL PROTECTED] [EMAIL PROTECTED] To get messages 123 through 145 (a maximum of 100 per request), mail: [EMAIL PROTECTED] To get an index with subject and author for messages 123-456 , mail: [EMAIL PROTECTED] They are always returned as sets of 100, max 2000 per request, so you'll actually get 100-499. To receive all messages with the same subject as message 12345, send an empty message to: [EMAIL PROTECTED] The messages do not really need to be empty, but I will ignore their content. Only the ADDRESS you send to is important. You can start a subscription for an alternate address, for example [EMAIL PROTECTED], just add a hyphen and your address (with '=' instead of '@') after the command word: [EMAIL PROTECTED] g To stop subscription for this address, mail: [EMAIL PROTECTED] org In both cases, I'll send a confirmation message to that address. When you receive it, simply reply to it to complete your subscription. If despite following these instructions, you do not get the desired results, please contact my owner at [EMAIL PROTECTED] Please be patient, my owner is a lot slower than I am ;-) --- Enclosed is a copy of the request I received. Return-Path: [EMAIL PROTECTED] Received: (qmail 28542 invoked from network); 5 Aug 2003 12:46:37 - Received: from zinc.btinternet.com (194.73.73.148) by daedalus.apache.org with SMTP; 5 Aug 2003 12:46:37 - Received: from host217-44-174-234.range217-44.btcentralplus.com ([217.44.174.234] helo=caryatin.mshome.net) by zinc.btinternet.com with esmtp (Exim 3.22 #23) id 19k1D3-0002wl-00 for [EMAIL PROTECTED]; Tue, 05 Aug 2003 13:46:37 +0100 From: Caoilte O'Connor [EMAIL PROTECTED] To: [EMAIL PROTECTED] Date: Tue, 5 Aug 2003 13:46:37 +0100 User-Agent: KMail/1.5.2 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: [EMAIL PROTECTED] X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: how to use requiredif
It looks like you're just trying to make sue that the password field is filled in right? If so, all you need to use is the 'required' validation. Just replace requiredif with required, and get rid of the var section. This will make sure a password was entered. Is this what you want to do? - Keith -Original Message- From: georgehill [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 06, 2003 11:35 PM To: [EMAIL PROTECTED] Subject: how to use requiredif Hi all, I hava question about the use of required in the validation.xml file.My example is : field property=conPassword depends=requiredif arg0 key=prompt.confirm.password/ var var-nametest/var-name var-value((newPassword != null)/var-value /var /field Is it right? If it's wrong, please give me a right example. Thanks a lot. :) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: RE: validating a html:select box
I hope I am not the first one to push the limit :) because I don't think selection boxes are that rare :) -Original Message- From: Yansheng Lin [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 06, 2003 9:16 PM To: 'Struts Users Mailing List' Subject: RE: RE: validating a html:select box Pushing the limit, eh:). How hard is it to write your own two line JavaScript. Besides, since it's a select box(not a combo), all the options are assumed to be valid from the beginning, why there is an invalid option there:). -Original Message- From: Erez Efrati [mailto:[EMAIL PROTECTED] Sent: August 6, 2003 1:39 PM To: 'Struts Users Mailing List' Subject: RE: RE: validating a html:select box For some reason, the javascript for intRange is not working if the property is a selection html:select. I looked in the javascript code (I am new to that still) but I saw that it only checks for the range if the field is a text or textarea. Is this true? How can I perform the client validation for selection boxes? Change the javascript? Erez -Original Message- From: David G. Friedman [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 06, 2003 5:22 PM To: Struts Users Mailing List Subject: Re: RE: validating a html:select box Erez, In that field validation, you can overload the sentence given back on that error. After arg0 .../ add something like: msg name=intRange key=month.invalid/ Then just add an application resource line such as: month.too.short=Please select a valid month. Or month.too.short=Please select a valid {0} to show the field name you put as arg0 in your validations xml configuration file. Regards, David ---Original Message--- From: Erez Efrati [EMAIL PROTECTED] Sent: 08/06/03 03:06 PM To: 'Struts Users Mailing List' [EMAIL PROTECTED] Subject: RE: validating a html:select box I guess I'd have to change the msg key to something else than the default message telling the value is out of range. What happens with html:radio? Is this also the way also to validate radio options? If no radio is selected (and I know this is off topic, well a bit) would the browser send a value? Thanks, Erez -Original Message- From: David G. Friedman [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 06, 2003 4:59 PM To: Struts Users Mailing List Subject: Re: validating a html:select box Erez, The Struts Validator has an intRange function. It's in the Validator User Guide: http://jakarta.apache.org/struts/userGuide/dev_validator.html Here's an example from that page so you can set your min max as 1 12 to prevent the zero (label month?) from being submitted: field property=integer depends=required,integer,intRange arg0 key=typeForm.integer.displayname/ arg1 name=range key=${var:min} resource=false/ arg2 name=range key=${var:max} resource=false/ var var-namemin/var-name var-value10/var-value /var var var-namemax/var-name var-value20/var-value /var /field ---Original Message--- From: Erez Efrati [EMAIL PROTECTED] Sent: 08/06/03 02:41 PM To: 'Struts Users Mailing List' [EMAIL PROTECTED] Subject: validating a html:select box I have a selection box with options where the first is valued 0 (=not selected) with some label saying: month. How can I use the Struts validator to validate the user has actually chosen a value other than 0? Do I have to write one of my own? I wish the validwhen was around... By the way the 'birthMonth' is an int (not a string). Here is a snip of my page: html:select property=birthMonth html:option value=-1 bean:message key=date.month/ /html:option c:forEach begin=1 end=12 var=m html-el:option value='${m}' c:out value='${m}' / /html-el:option /c:forEach /html:select Thanks a lot, Erez - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For
RE: How to add Java Script to a JSP page with struts tags
Hi Seshadhri Then you must be getting javascript error .just look at the bottom left corner of explorer see what does it say .. Just mail me that error so that I can will tell you more ... Regards Rohit -Original Message- From: Seshadhri Srinivasan [mailto:[EMAIL PROTECTED] Sent: Thursday, August 07, 2003 12:02 PM To: 'Struts Users Mailing List' Subject: RE: How to add Java Script to a JSP page with struts tags Hi Rohit, I tried doing the same but the problem persists. I have the following javascript code wherein I have used 'loginForm' for the form name as I use html:form action=login.do form tag. In the following code 'userName' is a html:text and 'password' is a html:password entity. function validate() { if(document.loginForm.userName.value==) { alert(Please enter valid username); document.loginForm.userName.focus(); return; } if(document.loginForm.password.value==) { alert(Please enter the password); document.loginForm.password.focus(); return; } } Please help Thanks, Seshadhri Srinivasan -Original Message- From: Rohit Aeron [mailto:[EMAIL PROTECTED] Sent: Thursday, August 07, 2003 11:26 AM To: Struts Users Mailing List Subject: RE: How to add Java Script to a JSP page with struts tags Try onclick=javascript:validate(); regards Rohit -Original Message- From: Seshadhri Srinivasan [mailto:[EMAIL PROTECTED] Sent: Thursday, August 07, 2003 11:20 AM To: 'Struts Users Mailing List' Subject: RE: How to add Java Script to a JSP page with struts tags Hi, I have created a login button using the html:submit tag. I wish to run a Java Script function validate() when this submit button is clicked. I tried using 'onclick = validate() ' within the html:submit tag, but it does not work. Please tell me how I can run Java Script code along with struts tags. Thanks, Seshadhri Srinivasan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] *-- This message and any attachment(s) is intended only for the use of the addressee(s) and may contain information that is PRIVILEGED and CONFIDENTIAL. If you are not the intended addressee(s), you are hereby notified that any use, distribution, disclosure or copying of this communication is strictly prohibited. If you have received this communication in error, please erase all copies of the message and its attachment(s) and notify the sender or Kanbay postmaster immediately. Any views expressed in this message are those of the individual sender and not of Kanbay. Although we have taken steps to ensure that this e-mail and any attachment(s) are free from any virus, we advise that in keeping with good computing practice the recipient should ensure they are actually virus free. - 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: [OFF TOPIC] JavaScript + select tag question
You may be right - might have to use the .index property instead. -Original Message- From: Adam Hardy [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 06, 2003 9:19 AM To: Struts Users Mailing List Subject: Re: [OFF TOPIC] JavaScript + select tag question I believe that document.forms[0].elements[anySelectbox].value will be invalid. .value only works on non-select form-elements. AFAIK without testing it now. Mark Galbreath wrote: If you read the API you will see that JavaScript functions are built into the Struts html:select tag: http://jakarta.apache.org/struts/userGuide/struts-html.html#select so you have several event handlers to use for transferring control. E.g., html:select property=myBean onClick=myFunction( 'myBean' )//html:select script type=text/javascript function myFunction( docObject ) { var string = document.forms[ 0 ].elements[ ' + docObject + ' ].value; var selected = string; location = /search.do?action= + docObject + selectedItem= + string; } /script And map an action path for search.do in your struts-config.xml file. Mark -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 06, 2003 7:37 AM I would like to do the following : I have a form with different fields and drop down boxes When A drop down box is selectd I would like to do a submit that looks more or less like this : submit=/search.do?action=dropdownbox1selectedItem=item - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [Q] Struts and date formatters
It is/was a known bug for WL 6.1 sp2. If you like more info on it, do a google search for CR064391. A patch was realeased for this bug (CR064391_610sp2.jar) and it is fixed as of sp3. But we cannot upgrade or install patched, for a number of reasons. So, if you use WL 6.1 sp2 without patches, you are limited with the number of jars you import. In particular, the total length of the names of all the jars (and sub-jars they use) cannot exceed 80 characters. --- Joe Germuska [EMAIL PROTECTED] wrote: At 7:05 -0700 8/6/03, Riaan Oberholzer wrote: I cannot switch to Sturts 1.1 because I use BEA WebLogic 6.1sp2 and a known WL bug limits the number of total jars you can use in an application to a collective name length of 80 characters. :( Same reason why I also cannot use JSTL. We run all of our client applications on WL6.1sp3 and almost all of them run Struts 1.1. I don't know if this was fixed between sp2 and sp3; this is the first I've heard of that bug. I'm not saying you're wrong -- just saying here's a case of someone in a similar environment doing what you want to be doing. Joe -- -- Joe Germuska [EMAIL PROTECTED] http://blog.germuska.com If nature worked that way, the universe would crash all the time. --Jaron Lanier - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Internationalizing 100's of pages of text
I have a web site at http://www.pobox.com/~encyclopaedia_wot. It contains 100's of pages of HTML of mostly text. I'd like to migrate this to JSPs and use Templates/Tiles because: 1) I want to better standardize the layout 2) I want the content writer to not have to worry about anything but content (by having them write only the xx_content.jsp files) I also want to internationalize it. I've already had requests for Spanish and Hebrew versions. However, putting the text into one or more property files seems like a Really Bad Idea. So is having hundreds of definition files. What I'd like to do is have something like this: 1) a template that has a 'content' parameter 2) an index.jsp which uses the template and specifies 'index_content.jsp' as 'content' 3) have template:get search for 'index_content_en_us.jsp', then 'index_content_en.jsp' then 'index_content.jsp'. Aside from writing my own version of template:get (which I can), is there a better, existing way of doing this? TIA, Gary Gary Kephart| New Century Mortgage Web-Based Application Developer | http://www.ncen.com [EMAIL PROTECTED] | 340 Commerce 949-797-5660| Irvine, CA 92602-1318
RE: Button labels and DispatchActions mix?
I guees if you want to assign the meaning to your form based on the context where you placed it, it might make some sence. Todor, you can probably create another action and extend it from your original action, where you would override getKeyMethodMap (). This will probably the least amount of work. HTH, Alex. -Original Message- From: Paul McCulloch [mailto:[EMAIL PROTECTED] Sent: Thursday, August 07, 2003 9:06 AM To: 'Struts Users Mailing List' Subject: RE: Button labels and DispatchActions mix? I'm not sure I understand you. Why would you want multple buttons, with the same label doing different things? Surely this would just confuse the user? -Original Message- From: Todor Sergueev Petkov [mailto:[EMAIL PROTECTED] Sent: 07 August 2003 13:58 To: Struts Users Mailing List Subject: Re: Button labels and DispatchActions mix? Even DispatchLookupAction doesn't work if you want to use the same label eg. buttons.reset or buttons.search for two different buttons useing the same Action... Paul McCulloch wrote: I believe that the solution is to use a DispatchLookupAction rather than a dispatch action. See p226 in Struts in Action for a description. Paul -Original Message- From: Rohit Aeron [mailto:[EMAIL PROTECTED] Sent: 07 August 2003 13:27 To: Struts Users Mailing List Subject: RE: Button labels and DispatchActions mix? Its better you use javascript There you can append your action also with submit value Eg: Document.formbean.action=search.do+value; Regards Rohit -Original Message- From: Todor Sergueev Petkov [mailto:[EMAIL PROTECTED] Sent: Thursday, August 07, 2003 5:49 PM To: Struts Users Mailing List Subject: Re: Button labels and DispatchActions mix? It works with the button label But I have two Search buttons on the same page both labeled search.button.reset but they perform two different actions. So I need a way to distinguish which was pressed inside my DispatchAction Rohit Aeron wrote: This will work .. html:submit property=action value=bean:message key=search.button.reset / /html:submit -Original Message- From: Todor Sergueev Petkov [mailto:[EMAIL PROTECTED] Sent: Thursday, August 07, 2003 5:29 PM To: Struts Users Mailing List Subject: Button labels and DispatchActions mix? Hello people, I have the following code : html:submit property=action value=resetg bean:message key=search.button.reset / /html:submit What I am trying to do is have a Dispatch Action so that when this button is pressed the request is something like search.do?action=resetg But I don't want my button to have the resetg title on it. I want it to have the search.button.reset title from ApplicationResources bundle on it. It seems tha Struts html tag library mixes the two. Is there a way out of this? Thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] *-- This message and any attachment(s) is intended only for the use of the addressee(s) and may contain information that is PRIVILEGED and CONFIDENTIAL. If you are not the intended addressee(s), you are hereby notified that any use, distribution, disclosure or copying of this communication is strictly prohibited. If you have received this communication in error, please erase all copies of the message and its attachment(s) and notify the sender or Kanbay postmaster immediately. Any views expressed in this message are those of the individual sender and not of Kanbay. Although we have taken steps to ensure that this e-mail and any attachment(s) are free from any virus, we advise that in keeping with good computing practice the recipient should ensure they are actually virus free. - 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] ** Axios Email Confidentiality Footer Privileged/Confidential Information may be contained in this message. If you are not the addressee indicated in this message (or responsible for delivery of the message to such person), you may not copy or deliver this message to anyone. In such case, you should destroy this message, and notify us immediately. If you or your employer does not consent to Internet email messages of this kind, please
RE: RE: Actions Best Practice
Yes David, it would work but it was not what Struts had in mind. I regard your solution as trick, a way around but not something I want to follow as development guidelines. Erez -Original Message- From: David G. Friedman [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 06, 2003 11:54 AM To: Struts Users Mailing List Subject: Re: RE: Actions Best Practice Taking your advice, it means that I would have two different action mappings, one for the init step and the second for the actual action (send). But then I will have to write something like html:link page=/InitForgotPassword.do?action=init which is a bit strange to write again the init, and it is needed cause the ForgotPasswordAction.java needs this 'action' parameter to distinguish between the two. Hmm.. Why not use the Struts Validator, set the validations to use page=1 (or page=2), and just set page=1 (or page=2) in the JSP automatically when the page gets displayed? Then, the first time you go to it, nothing needs to be validated. When you hit submit, the validations occur for that page, or further pages, if you have more in the sequence/step/function/route/click. Regards, David - 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: Help req urgently on file upload
Hi, I think you are using the old one. Please use commons-fileupload.jar that comes with the 1.1 version. Alok --- bhanu sistla [EMAIL PROTECTED] wrote: HI I am using structs upload.war but i am not able to deploy it. i am getting following error. java.lang.NoSuchMethodError at org.apache.struts.upload.CommonsMultipartRequestHandler.handleRequ (CommonsMultipartRequestHandler.java:220) at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:934 at org.apache.struts.action.RequestProcessor.processPopulate(RequestP essor.java:779) Can any body tell me what are the other jars i have to use apart from commons-fileupload-1.0.jar please its very urgent. can some body give me quick response Regards Bhanu - Want to chat instantly with your online friends? Get the FREE Yahoo!Messenger __ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Still struggeling: howto get ActionForward to calling page
This is definitely what I would do. And just to be more clear, I would copy that action mapping into as many new ones as you need. Just change the name and input page, then you should be all set. Also, if you don't specify the input page correctly, you can't return to that page if there are validation errors. I think this is the best solution by far. - Keith -Original Message- From: Rohit Aeron [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 06, 2003 8:23 AM To: Struts Users Mailing List Subject: RE: Still struggeling: howto get ActionForward to calling page Hi Alex Please try following solution In multiple screen scenario having same display list .Have separate actions for each screen then you can have forwards in case of error in respective Action which will map to original action. Regards Rohit -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 06, 2003 5:12 PM To: Struts Users Mailing List Subject: Re: Still struggeling: howto get ActionForward to calling page yeap, that's something in a way i thought of as 'dirty fix' for a framework. As i am looking into struts for 2-3 days only i am surprised to find such an elementary functionallity not implemented? Should be interessting for plenty of people having more than 2-3 pages nested in not linear way? Alex Send reply to: Struts Users Mailing List [EMAIL PROTECTED] Date sent: Wed, 06 Aug 2003 10:50:00 +0200 From: Adam Hardy [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject:Re: Still struggeling: howto get ActionForward to calling page [ Double-click this line for list subscription options ] The input attribute on the action mapping is what you specify for the return page when validation of the form bean fails, so that is not going to help you. The easiest solution I can think of is to put a hidden field in your selection screens with the screen's URL in it. Alternatively you could try using the HTTP header referer e.g.: Referer: http://www.w3.org/hypertext/DataSources/Overview.html but this is an optional header so not all browsers have to send it. I've never used it so I don't know which browsers do send it. hth Adam [EMAIL PROTECTED] wrote: Hi, i am still looking for a clean way to get an ActionForward to the page that called my current Action. That means e.g. I am a displayListAction and have been called by a selection screen. In case i don't find a result for the selection parameters I would like to bring a specific error to the calling selection screen. That would give users a chance to change their selection. Sounding easy, this gets complicate in case there are several selection screens bringing up the same list. I don't like to create a specific forward for each selection page and then somehow determine which one called me (can do that, but there should be a nice way in such a famous framework?). The hint using ActionMapping.getInputForward() or new ActionForward(mapping.getInput()) didn't help me to much, seems to me there is hardcoded value inside, specified in the input attribute of the specific action. How would an expert solve that problem? :-) Alex Looking for a way to get an ActionForward to the page calling the current page. The example: Want to realize 5-XX pages where to enter values for a calculation. The calculation result page would check if everything was fine (using db queries etc..) Now in case that one of the input values is incorrect / missmatching the context, I'd like to redisplay the calling page showing the values entered before + an error message. How can i realize that without having to define specific forwards to the 5 pages and then deciding which one was the calling one? Tried the ActionMapping.getInputForward(), but it brought back null values in the ActionForward only. Comments and keywords to look for welcome. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] *-- This message and any attachment(s) is intended only for the use of the addressee(s) and may contain information that is PRIVILEGED and CONFIDENTIAL. If you are not the intended addressee(s), you are hereby notified that any use, distribution, disclosure or copying of this communication is strictly prohibited. If you have received this communication in error, please erase all copies of the message and its attachment(s) and notify the
current year in JSP
I have a scriptlet in my JSP which I wish to rewrite using JSTL and tags and to get rid of the java code. How can I perform this? % for (int i = 30; i 90; i++) { % html:option value=%=Integer.toString(2003-i)% %=2003-i%/html:option % } % I wish to do something like: c:forEach var=age begin=30 end=90 html-el:option value='${CurrentYear - age}' c:out value='${CurrentYear - age}' / /html-el:option How to compute the CurrentYear? Thanks a lot, Erez - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Redirect option instead of findForward!!!Urgent
Hello All, I have created a page where i submit the data for saving it in the database. I have some hidden variables defined in the same page. After saving the data when my control comes in the action class I do mapping.findForward to the other page. The new page also contains some hidden variables which have the same name as the previous page. When the new page's action class gets executed the value of hidden variables from the previous page is picked as the findforward is taking my request object to the other page. Now i dont want my request object from the previous page to move to the new page. Is there any option which can do response.sendRedirect for me so that i dont take my request object of the previous page along to the new page. I have tried to reset the variables in the action class before doing findforward to the new page. Thanks for the response in advance Anurag Garg. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
ActionForm Initialization
Hi All, Which class in the Framework initializes the ActionForms specified in the XML Config files.. When we declare an ActionForm for an Action, the Framework will automatically sets the values in the from submitted using the form and calls the validate() method . But which class in the Framework does this.. Thanks in Advance Sateesh THIS E-MAIL MESSAGE ALONG WITH ANY ATTACHMENTS IS INTENDED ONLY FOR THE ADDRESSEE and may contain confidential and privileged information. If the reader of this message is not the intended recipient, you are notified that any dissemination, distribution or copy of this communication is strictly Prohibited. If you have received this message by error, please notify us immediately, return the original mail to the sender and delete the message from your system. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Where in the Framework URI gets mapped to an Action Class
Hi, I would like to know how the Framework extracts the Path from the URL so that it can instantiate the corresponding Action Class for which the path specified in the config file .. Which class of the Framework takes care of this ?? Thanks in Advance Sateesh THIS E-MAIL MESSAGE ALONG WITH ANY ATTACHMENTS IS INTENDED ONLY FOR THE ADDRESSEE and may contain confidential and privileged information. If the reader of this message is not the intended recipient, you are notified that any dissemination, distribution or copy of this communication is strictly Prohibited. If you have received this message by error, please notify us immediately, return the original mail to the sender and delete the message from your system. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Cancel Button Not Working in 1.1
Hi, I am trying to use the cancel button in Struts 1.1. It is not working The isCancelled(request) is always returnning false Can anyone help me? Natalie - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Validator
It's not only limited to String[]. For me, it's more like a map. (Got to go home, too late now.:) --- In ValidatorUtil.java --- public static String getValueAsString(Object bean, String property) { Object value = null; try { value = PropertyUtils.getProperty(bean, property); } catch (Exception e) { log.error(e.getMessage(), e); } return (value != null ? value.toString() : null); } -- -Original Message- From: Bailey, Shane C. [mailto:[EMAIL PROTECTED] Sent: August 6, 2003 4:26 PM To: 'Struts Users Mailing List' Subject: RE: Validator I don't think it is the formbean that is checked for isString() it is the data members of the formbean. Since it is http I guess there is only 2 choices: String and String[] and so the test determines how the validation for a value is to be done. Kinda goes back to that old question posted here... It would be the difference between testing .length and .length() !! :-) -Original Message- From: Yansheng Lin [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 06, 2003 6:30 PM To: 'Struts Users Mailing List' Subject: RE: Validator I guess it's more efficient if bean is a String type. (Damn, I just cannot see when you would have a FormBean of type String only). Anyway, I don't think it's needed... This is going to bug me for the whole evening:). -Original Message- From: Erez Efrati [mailto:[EMAIL PROTECTED] Sent: August 6, 2003 5:13 PM To: 'Struts Users Mailing List' Subject: RE: Validator It's in the code of FieldsCheck.java. I was trying to create one of my own validator and I saw these lines there. Erez -Original Message- From: Yansheng Lin [mailto:[EMAIL PROTECTED] Sent: Thursday, August 07, 2003 12:10 AM To: 'Struts Users Mailing List' Subject: RE: Validator ??? I don't see it in my validation-rules.xml. Which version are you using? -Original Message- From: Erez Efrati [mailto:[EMAIL PROTECTED] Sent: August 6, 2003 3:33 PM To: 'Struts Users Mailing List' Subject: Validator I am trying to figure out the code in struts.validator.FieldsCheck.java in order to write one of my own. Can someone explain what the purpose of the following lines of code in all of the validateXXX() in Struts: validateIntRange (...) { if (isString(bean)) { value = (String) bean; } ... } Is this really necessary? Erez - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Can I do multiple updates/inserts with one struts form?
I would suggest you use nested beans Regards Rohit -Original Message- From: Riaan Oberholzer [mailto:[EMAIL PROTECTED] Sent: Thursday, August 07, 2003 7:14 PM To: [EMAIL PROTECTED] Subject: Can I do multiple updates/inserts with one struts form? I have a dynamic table with a list of entries. Every row can be changed in one view and when the user submits it, everything is updated at once. How can I do this with struts? Rendering form elements with struts requires a property, but since I use multiple rows, all with the same property name (as a prefix, the unique id (can be text also) of the row forms the suffix), this cannot be done in a struts form. How do I do it? I currently used pure HTML for this and generated the names of the fields by adding the unique key value of the row. The rows names would look like this: nameXXX salaryXXX addressXXX nameYYY salaryYYY addressYYY etc. My processing action now has to run through ALL the parameters sent and figure it out with something like: if (param.startsWith(name) { id = param.substring(4); salary = request.getParameter(salary + id) // etc, until you have the complete record // then update the record Is there a better way do to this? And can it be done with struts forms? __ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] *-- This message and any attachment(s) is intended only for the use of the addressee(s) and may contain information that is PRIVILEGED and CONFIDENTIAL. If you are not the intended addressee(s), you are hereby notified that any use, distribution, disclosure or copying of this communication is strictly prohibited. If you have received this communication in error, please erase all copies of the message and its attachment(s) and notify the sender or Kanbay postmaster immediately. Any views expressed in this message are those of the individual sender and not of Kanbay. Although we have taken steps to ensure that this e-mail and any attachment(s) are free from any virus, we advise that in keeping with good computing practice the recipient should ensure they are actually virus free. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Returning values from a BasicDynaBean in jsp
From: Kris Schneider [EMAIL PROTECTED] I guess my previous example wasn't clearly formatted, but it certainly wasn't supposed to illustrate executing a query from a JSP. Here's a modified example: Java (e.g. an action): -- import javax.servlet.jsp.jstl.sql.Result; import javax.servlet.jsp.jstl.sql.ResultSupport; ... ResultSet rs = ...; Result result = ResultSupport.toResult(rs); request.setAttribute(result, result); ... JSP: c:forEach var=row items=${result.rows} tr tdc:out value=${row.seq}//td tdc:out value=${row.name}//td /tr /c:forEach works a treat 8-) Gone from no working versions, to two working versions in a day, thanks ;) I like the jstl version, as has already been said, it'll become the standard, and I'm sure it's faster just by the operations performed. Now... to get the last remaining sticking point... page-login-return_to_page_dynamically Have a little feedback on that, need to play a bit more now :) Mucho Gracias! J. _ Tired of 56k? Get a FREE BT Broadband connection http://www.msn.co.uk/specials/btbroadband - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tiles Reload and View Action give a null pointer exception when using multiple Struts modules
Can anyone confirm this ? actionpath=/tiles-admin/reload type=org.apache.struts.tiles.actions.ReloadDefinitionsAction/ actionpath=/tiles-admin/view type=org.apache.struts.tiles.actions.ViewDefinitionsAction/ Kind regards, Marcel Overdijk
RE: RE: validating a html:select box
Pushing the limit, eh:). How hard is it to write your own two line JavaScript. Besides, since it's a select box(not a combo), all the options are assumed to be valid from the beginning, why there is an invalid option there:). -Original Message- From: Erez Efrati [mailto:[EMAIL PROTECTED] Sent: August 6, 2003 1:39 PM To: 'Struts Users Mailing List' Subject: RE: RE: validating a html:select box For some reason, the javascript for intRange is not working if the property is a selection html:select. I looked in the javascript code (I am new to that still) but I saw that it only checks for the range if the field is a text or textarea. Is this true? How can I perform the client validation for selection boxes? Change the javascript? Erez -Original Message- From: David G. Friedman [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 06, 2003 5:22 PM To: Struts Users Mailing List Subject: Re: RE: validating a html:select box Erez, In that field validation, you can overload the sentence given back on that error. After arg0 .../ add something like: msg name=intRange key=month.invalid/ Then just add an application resource line such as: month.too.short=Please select a valid month. Or month.too.short=Please select a valid {0} to show the field name you put as arg0 in your validations xml configuration file. Regards, David ---Original Message--- From: Erez Efrati [EMAIL PROTECTED] Sent: 08/06/03 03:06 PM To: 'Struts Users Mailing List' [EMAIL PROTECTED] Subject: RE: validating a html:select box I guess I'd have to change the msg key to something else than the default message telling the value is out of range. What happens with html:radio? Is this also the way also to validate radio options? If no radio is selected (and I know this is off topic, well a bit) would the browser send a value? Thanks, Erez -Original Message- From: David G. Friedman [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 06, 2003 4:59 PM To: Struts Users Mailing List Subject: Re: validating a html:select box Erez, The Struts Validator has an intRange function. It's in the Validator User Guide: http://jakarta.apache.org/struts/userGuide/dev_validator.html Here's an example from that page so you can set your min max as 1 12 to prevent the zero (label month?) from being submitted: field property=integer depends=required,integer,intRange arg0 key=typeForm.integer.displayname/ arg1 name=range key=${var:min} resource=false/ arg2 name=range key=${var:max} resource=false/ var var-namemin/var-name var-value10/var-value /var var var-namemax/var-name var-value20/var-value /var /field ---Original Message--- From: Erez Efrati [EMAIL PROTECTED] Sent: 08/06/03 02:41 PM To: 'Struts Users Mailing List' [EMAIL PROTECTED] Subject: validating a html:select box I have a selection box with options where the first is valued 0 (=not selected) with some label saying: month. How can I use the Struts validator to validate the user has actually chosen a value other than 0? Do I have to write one of my own? I wish the validwhen was around... By the way the 'birthMonth' is an int (not a string). Here is a snip of my page: html:select property=birthMonth html:option value=-1 bean:message key=date.month/ /html:option c:forEach begin=1 end=12 var=m html-el:option value='${m}' c:out value='${m}' / /html-el:option /c:forEach /html:select Thanks a lot, Erez - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Not getting javascript Popup on html:radio buttons
Put an alert() in your validateRequired(). Maybe it's not getting called since it's a radio field... -Original Message- From: Erez Efrati [mailto:[EMAIL PROTECTED] Sent: August 7, 2003 11:06 AM To: 'Struts Users Mailing List' Subject: Not getting javascript Popup on html:radio buttons I have a field containing two a group of two html:radio items with the values 1 and 2. The page starts when none of them is selected. The property is depends on required but still I don't get the javascript popup, only the Action error coming from the server side. Any ideas why? Erez - 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: Bean tag lib help
Thats my code html:form method=POST action=/files bean:define id=processName name=filesForm property=processName type=fully-qualified-class-type-name / bean:define id=folder name=filesForm property=folder type=fully-qualified-class-type-name / html:hidden property=folder/ html:hidden property=processName/ table width=100% border=0 cellspacing=0 cellpadding=0 I changed it as suggested and this was the error I got org.apache.jasper.JasperException: Unable to compile class for JSP An error occurred at line: 51 in the jsp file: /files.jsp Generated servlet error: [javac] Compiling 1 source file /usr/local/tomcat-imageshed/work/Standalone/localhost/spooleradmin/files_jsp .java:154: illegal start of expression fully-qualified-class-type-name processName = null; ^ An error occurred at line: 51 in the jsp file: /files.jsp Generated servlet error: /usr/local/tomcat-imageshed/work/Standalone/localhost/spooleradmin/files_jsp .java:154: not a statement fully-qualified-class-type-name processName = null; ^ An error occurred at line: 51 in the jsp file: /files.jsp Generated servlet error: /usr/local/tomcat-imageshed/work/Standalone/localhost/spooleradmin/files_jsp .java:154: expected fully-qualified-class-type-name processName = null; ^ Vance Heredia Java Wireless Architect Global Applications Lonely Planet Publications Email: [EMAIL PROTECTED] Phone: +61 3 8379 8000 http://www.lonelyplanet.com/ http://mobile.lonelyplanet.com/ http://wap.lonelyplanet.com/ -Original Message- From: Nagendra Kumar O V S [mailto:[EMAIL PROTECTED] Sent: Wednesday, 6 August 2003 5:33 PM To: [EMAIL PROTECTED] Subject: Re: Bean tag lib help try bean:define id=processName name=filesForm property=processName type=fully-qualified-class-type-name/ -- nagi ---Original Message--- From: Struts Users Mailing List Date: Wednesday, August 06, 2003 12:18:43 PM To: '[EMAIL PROTECTED]' Subject: Bean tag lib help Hello, I got a question. My struts-bean tag doesnot seem to work correctly. Everytime I use the Bean tag Eg bean:define id=processName name=filesForm property=processName/ I get a java.lang.ClassCastException at org.apache.struts.taglib.html.FormTag.lookup(FormTag.java:766) at org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:481) at org.apache.jsp.files_jsp._jspService(files_jsp.java:149) The Java code looks like _jspx_th_html_form_0.setParent(_jspx_th_html_html_0); _jspx_th_html_form_0.setMethod(POST); _jspx_th_html_form_0.setAction(/files); 149- int _jspx_eval_html_form_0 = _jspx_th_html_form_0.doStartTag(); if (_jspx_eval_html_form_0 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) { do { out.write(\r\n ); /* bean:define */ java.lang.Object processName = null; org.apache.struts.taglib.bean.DefineTag _jspx_th_bean_define_0 = (org.apache.struts.taglib.bean.DefineTag) _jspx_tagPool_bean_define_property_name_id.get(org.apache.struts.taglib.bean ..DefineTag.class); Doea anyone have any ideas how to fix it Vance Heredia __ This email, including attachments, is intended only for the addressee and may be confidential, privileged and subject to copyright. If you have received this email in error, please advise the sender and delete it. If you are not the intended recipient of this email, you must not use, copy or disclose its content to anyone. You must not copy or communicate to others content that is confidential or subject to copyright, unless you have the consent of the content owner. IncrediMail - Email has finally evolved - Click Here
RE: Delete Validation -- with Vector displayed
Return an ActionError with a message parameterized to include the names of the entities, then on the JSP, render that errors collection. -Original Message- From: Alawadhi, Mona [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 05, 2003 2:08 PM To: 'Struts Users Mailing List' Subject: Delete Validation -- with Vector displayed Hello Everyone, I have a 'Delete' button in my JSP (a submit button). As the button is submitted, a method gets called (from the Action class) to do the following: 1. checks if the field is NOT used by entities 2. Based on 1, either the field gets deleted, or the field does not get deleted and a Vector of entities using the field is returned. How can I validate/ display a message to the user in case the field is used and cannot be deleted? The error message should also include the entities using the field (which is a Vector, or a string). Thank you, Mona * The information in this email is confidential and may be legally privileged. It is intended solely for the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited and may be unlawful. When addressed to our clients any opinions or advice contained in this email are subject to the terms and conditions expressed in the governing KPMG client engagement letter. * - 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]
[Q] Struts and date formatters
I am using the bean:write tag and for date fields (java.util.Date), I get the (rather ugly) full: Wed Aug 06 12:08:07 CEST 2003 I have tried to do: DateFormdat df = DateFormat.getDateTimeInstance(); SimpleDateFormat sdf = (SimpleDateFormat)df; sdf.applyPattern(-MM-dd hh:mm); But it gets ignored how/where can I change the default pattern that struts uses to format dates with? Thanks. __ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Service Locator pattern useful if not using EJBs?
It's really hard to tell without knowing what kind of struts-based web application you are designing. You might want to find out what service components you will lookup and/or create, and how often are these operations. Struts handles action dispatch pretty well. (On a side note, I am not sure why the creator of Struts once mentioned on this mailing list that Struts are meant to be a front-controller; that it resides in the presentation tier mainly. For me, anything after ActionMapping belongs to business tier). It makes my head hurts to think of all this the late of the day:). -Original Message- From: John Boyes [mailto:[EMAIL PROTECTED] Sent: August 7, 2003 3:40 PM To: [EMAIL PROTECTED] Subject: Service Locator pattern useful if not using EJBs? I'm currently deciding on which design patterns to use for a Struts-based web application. Definitely going to use a Business Delegate to ensure a proper separation of the business and presentation tiers. Is it good practice to use a Service Locator to look up services for the Business Delegate? I can see the benefits of using a Service Locator when using EJBS, however I'm not going to use EJBs. Are there any other pertinent benefits in using a Service Locator, or is it an unneccessary extra level of complexity in a non-EJB implementation? Any replies much appreciated, John - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: HTML question Select and Option Tags
You can limit it with using style=width:size_in_px. For example: html:select property=contry style=width:200px /html:select However, some old browser versions, such as Netscape 4.5, do no support this style. Silverio Wagner Silva(Secorp) [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] People, Is there any way to limit the size of a Select tag box in pixels ? In my application, it depends on the option tag content length. Thanks in advance, - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Struts optimization
Hi, I m using tiles, but i would like to kwnow if it's possible to refresh only one page of the tiles layout. Thus, the browser should load only the data page(body) which has changed, And not all,footer, header, menu bar, etc... Is it possible to do with STRUTS, like the HTML frameset do? How can i do that with struts tiles or other? Give me example, please. Laurent. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
struts problem(Unable to populate the form in the jsp to ActionForm bean)
Hi, I have a Action form which contains an arraylist the array list adds beans which are called IpAddress(two String properties).I am able to display in the jsp page but when I submit this form it is unable to populate to the action form. b class=txtMedium id=largebean:message bundle=content key=title.ipaddresses//b table width=100% cellspacing=0 cellpadding=2 border=0 logic:iterate id=Element name=editAdvancedForm property=alist tr class=textbox style=width:150px; tdhtml:text name=Element property=domainName //td tdbbean:message bundle=content key=common.pointsto//b/td tdhtml:text name=Element property=ipValue //td /tr /logic:iterate /table public class EditAdvancedForm extends ValidatorForm { //~ Instance fields private String domain_Id; private ArrayList alist; private IpAddress ip1; public EditAdvancedForm(){ alist=new ArrayList(); ip1=new IpAddress(); } public void setDomainName(String name) { ip1.setDomainName(name); } public String getDomainName() { return ip1.getDomainName(); } public void setIpValue(String name) { ip1.setIpValue(name); alist.add(new IpAddress(ip1.getDomainName(),ip1.getIpValue())); } public String getIpValue() { return ip1.getIpValue(); } /** * @return */ public String getDomain_Id() { return domain_Id; } /** * @return */ public IpAddress getIp1() { return ip1; } /** * @param address */ public void setIp1(IpAddress address) { ip1 = address; } /** * @return */ public ArrayList getAlist() { return alist; } /** * @param list */ public void setAlist(ArrayList list) { alist = list; } } public class IpAddress { private String domainName; private String ipValue; private String flag; private String flag1; public IpAddress(String str1,String str2) { this.setDomainName(str1); this.setIpValue(str2); } public IpAddress(){ } /** * @return */ public String getDomainName() { return domainName; } /** * @return */ public String getIpValue() { return ipValue; } /** * @param string */ public void setDomainName(String string) { domainName = string; } /** * @param string */ public void setIpValue(String string) { ipValue = string; } } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[ANNOUNCE] StrutsDoc 0.3.1 Released
StrutsDoc 0.3.1 has been released and can be found here: http://sourceforge.net/project/showfiles.php?group_id=49385 This release fixes a few minor bugs and includes a Spanish translation of the user guide. The strutsdoc for the struts-example application has been updated and can be found at: http://www.systemmobile.com/strutsdoc/struts-example -- Nick Heudecker SystemMobile, Inc. Email: [EMAIL PROTECTED] Phone: 734.604.9192 Web: http://www.systemmobile.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Java Help
Zille, following would be the rough steps that you'd have to do for accessing from a normal java class... 1. set the jdbc.drivers property of the system to the full path name of the driver 2. Call the getConnection method of the DriverManager class by passing the URL of the database however if you are planning to access the DB from inside a web application, it is advisable to create a data source corresponding to the database in the server and access the same using JNDI. something like Context ctx = new InitialContext(); DataSource ds = (DataSource) ctx.lookup(java:comp/env/jdbc/myDataSource); conn = ds.getConnection(); where myDataSource is the data source name that you provided while creating the JNDI entry... hope this helps ansu -Original Message- From: Zille Hassan [mailto:[EMAIL PROTECTED] Sent: Thursday, August 07, 2003 1:53 PM To: Struts Users Mailing List Subject: Java Help Hey Guys really new to this java stuff So can someone tell me how do I connect to my DB using ODBC All I remember is Class.forName(sun.jdbc.odbc.JdbcOdbc:) So how do I connect to my DB guys Regds Zille - 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: Drop down Boxes help
I don't think you can specify different action for different options in html:select. But I can suggest ,if you are using javascript you can manipulate it on the basis of options. Regards Rohit -Original Message- From: Todor Sergueev Petkov [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 06, 2003 2:35 PM To: Struts Users Mailing List Subject: Drop down Boxes help Hello everybody, I have a form containing multiple fields and drop down boxes... I have one ActionForm and one DispatchAction associated with all of them and I would like to distinguish which if the drop down boxes was chosen... Something like the following : html:select property=sourceArea onchange='..here I would like to be able to specifie something like action-1.do...' html:options collection=L1 property=idValue labelProperty=displayValue / /html:select What is the best way to do it with strutsand struts tag libraries or with JSTL... Thanks, Todor - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] *-- This message and any attachment(s) is intended only for the use of the addressee(s) and may contain information that is PRIVILEGED and CONFIDENTIAL. If you are not the intended addressee(s), you are hereby notified that any use, distribution, disclosure or copying of this communication is strictly prohibited. If you have received this communication in error, please erase all copies of the message and its attachment(s) and notify the sender or Kanbay postmaster immediately. Any views expressed in this message are those of the individual sender and not of Kanbay. Although we have taken steps to ensure that this e-mail and any attachment(s) are free from any virus, we advise that in keeping with good computing practice the recipient should ensure they are actually virus free. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
HashMap population with jsp form!!!!Urgent..........
Hi, I have a HashMap in my ActionForm bean.I am unable to populate with the form in the jsp page. can anyone help me regarding this. logic:notEmpty name=editAdvancedForm property=ip b class=txtMedium id=largebean:message bundle=content key=title.ipaddresses//b table width=100% cellspacing=0 cellpadding=2 border=0 logic:iterate id=Element name=editAdvancedForm property=ip tr class=textbox style=width:150px; tdhtml:text name=Element property=ips(%=Element.getkey()=%//td tdbbean:message bundle=content key=common.pointsto//b/td tdhtml:text name=Element property=ips(%=Element.getvalue()%)//td /tr /logic:iterate /table /logic:notEmpty Action Form public class EditAdvancedForm extends ValidatorForm { //~ Instance fields private String domain_Id; private Map ip; public EditAdvancedForm(){ ip=new HashMap(); } public void setIps(String key,String value) { ip.put(key,value); } public Object getIps(String key) { return ip.get(key); } public Map getIp() { return ip; } /** * @param map */ public void setIp(Map map) { ip = map; } } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
initializing ActionForm from a session bean
Hi; If I want to initialize an ActionForm from a session bean, what's the correct way. Looking at it it seems to me that I want to tie the session bean to the session. However, reset passes a ServletRequest instead of a HttpServletRequest so there is no way to get the session to do a getAttribute(). Am I missing something? thanks - dave
Re: Hindi i18n Iscii Font
If your doing Struts you gotta have a character encoding filter servlet. Try googling it. - vineet import java.io.IOException; import javax.servlet.Filter; import javax.servlet.FilterChain; import javax.servlet.FilterConfig; import javax.servlet.ServletException; import javax.servlet.ServletRequest; import javax.servlet.ServletResponse; /** * Example filter that unconditionally sets the character encoding to be used * in parsing the incoming request to a value specified by the * strongencoding/string filter initialization parameter in the web app * deployment descriptor (/code/WEB-INF/web.xml/code). This filter could * easily be extended to be more intelligent about what character encoding to * set, based on characteristics of the incoming request (such as the values * of the codeAccept-Language/code and codeUser-Agent/code headers, * or a value stashed in the current user's session). * * @author Craig McClanahan * @version $Revision: 1.1 $ $Date: 2001/07/24 00:26:55 $ */ public class SetCharacterEncodingFilter implements Filter { // - Instance Variables /** * The default character encoding to set for requests that pass through * this filter. */ protected String encoding = null; /** * The filter configuration object we are associated with. If this value * is null, this filter instance is not currently configured. */ protected FilterConfig filterConfig = null; // - Public Methods /** * Take this filter out of service. */ public void destroy() { this.encoding = null; this.filterConfig = null; } /** * Select and set (if specified) the character encoding to be used to * interpret request parameters for this request. * * @param request The servlet request we are processing * @param result The servlet response we are creating * @param chain The filter chain we are processing * * @exception IOException if an input/output error occurs * @exception ServletException if a servlet error occurs */ public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { // Select and set (if needed) the character encoding to be used String encoding = selectEncoding(request); if (encoding != null) request.setCharacterEncoding(encoding); // Pass control on to the next filter chain.doFilter(request, response); } /** * Place this filter into service. * * @param filterConfig The filter configuration object */ public void init(FilterConfig filterConfig) throws ServletException { this.filterConfig = filterConfig; this.encoding = filterConfig.getInitParameter(encoding); } // -- Protected Methods /** * Select an appropriate character encoding to be used, based on the * characteristics of the current request and/or filter initialization * parameters. If no character encoding should be set, return * codenull/code. * p * The default implementation unconditionally returns the value configured * by the strongencoding/strong initialization parameter for this * filter. * * @param request The servlet request we are processing */ protected String selectEncoding(ServletRequest request) { return (this.encoding); } } From: Rupinder Singh Mazara [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] Date: Wed, 06 Aug 2003 09:24:24 +0100 To: Struts Users Mailing List [EMAIL PROTECTED] Subject: RE: Hindi i18n Iscii Font Try looking at icu4j it's a Open Source by IBM http://oss.software.ibm.com/icu4j/ they have a cool api for doing internationalisation to any character set Rupinder -Original Message- From: Jason Lea [mailto:[EMAIL PROTECTED] Sent: 05 August 2003 22:34 To: Struts Users Mailing List Subject: Re: Hindi i18n Iscii Font Hi Kiran, You need to set the character encoding for the JSP page/response. Java still thinks the response should be in the default encoding which is ISO-8859-4 (I think that is the Latin character set). I use UTF-8 encoding so that I can mix languages eg English/Japanese/French without having to worry about setting the correct page encoding for each page. So I do the same thing for the properties files eg native2ascii -encoding UTF-8 etc etc But at the top of each of my JSP pages I have this: %@ page contentType=text/html; charset=UTF-8% In your case you probably have to change that to
RE: Validator
I don't think it is the formbean that is checked for isString() it is the data members of the formbean. Since it is http I guess there is only 2 choices: String and String[] and so the test determines how the validation for a value is to be done. Kinda goes back to that old question posted here... It would be the difference between testing .length and .length() !! :-) -Original Message- From: Yansheng Lin [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 06, 2003 6:30 PM To: 'Struts Users Mailing List' Subject: RE: Validator I guess it's more efficient if bean is a String type. (Damn, I just cannot see when you would have a FormBean of type String only). Anyway, I don't think it's needed... This is going to bug me for the whole evening:). -Original Message- From: Erez Efrati [mailto:[EMAIL PROTECTED] Sent: August 6, 2003 5:13 PM To: 'Struts Users Mailing List' Subject: RE: Validator It's in the code of FieldsCheck.java. I was trying to create one of my own validator and I saw these lines there. Erez -Original Message- From: Yansheng Lin [mailto:[EMAIL PROTECTED] Sent: Thursday, August 07, 2003 12:10 AM To: 'Struts Users Mailing List' Subject: RE: Validator ??? I don't see it in my validation-rules.xml. Which version are you using? -Original Message- From: Erez Efrati [mailto:[EMAIL PROTECTED] Sent: August 6, 2003 3:33 PM To: 'Struts Users Mailing List' Subject: Validator I am trying to figure out the code in struts.validator.FieldsCheck.java in order to write one of my own. Can someone explain what the purpose of the following lines of code in all of the validateXXX() in Struts: validateIntRange (...) { if (isString(bean)) { value = (String) bean; } ... } Is this really necessary? Erez - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: struts, Dreamweaver, Dreamweaver templates
No major problems - but I was worried I was going down a road that was going to be impossible - I figured it was better to ask first. thanks - dave - Original Message - From: Stephen Brown [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Sent: Thursday, August 07, 2003 3:20 PM Subject: RE: struts, Dreamweaver, Dreamweaver templates I've used Dreamweaver with struts without issue, but in general lean towards tiles for doing page templates. It really doesn't matter and depends on the technical aptitude of the HTML folks when deciding which way to go, but both work. What problem are you seeing? -Original Message- From: David Thielen [mailto:[EMAIL PROTECTED] Sent: August 7, 2003 12:42 PM To: Struts-Users Subject: struts, Dreamweaver, Dreamweaver templates Hi; I created my jsp pages using Dreamweaver and using the templates feature in Dreamweaver. I'm now incorporating struts and mixing that with Dreamweaver is difficult. Does this work ok or should I give up on templates? thanks - dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Sample code to upload file with struts
Would you like us to write the rest of your application as well? Hunter and Crawford, Java Servlet Programming, 2d ed. (O'Reilly 2002). Mark -Original Message- From: Pierre Houdagba [mailto:[EMAIL PROTECTED] Sent: Thursday, August 07, 2003 6:59 PM To: 'Struts Users Mailing List' Subject: Sample code to upload file with struts I need a sample code to upload a file selected by the user c:\myfolder\filetoupload.csv Please help Thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Allowing only POST for form submittal ????
Hi Shane, I guess it is so they can have one servlet method per HTTP method The spec includes doGet(), doPost(), doPut(), doDelete(), doHead(), doOptions(), doTrave() HTTP/1.0 has doGet, doPut, doHead. HTTP/1.1 adds the others. -- Jason Lea Bailey, Shane C. wrote: Jason, That makes since about the user (hacker) recreating the form on POSTing. Why the original separation in the Servlet then, any ideas? I would do the check at the top of the action. It seems more flexible than having to put your form actions in a certain area. Thanks. BTW, SecurityFilter is running smoothly :-) -Original Message- From: Jason Lea [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 06, 2003 6:21 PM To: Struts Users Mailing List Subject: Re: Allowing only POST for form submittal Hi Shane, I don't think it really matters. Say you have a hidden field containing an id in your form that is posted back to an action. A user could copy that page to their hard disk, modify the field and then submit it. They would still be POSTing so your action would be happy. You still need to verify the id is ok, or user has permission to access that id. If you had some reason to only allow POSTs then you might be able to check in the action, or I think you can do that with a security contraint in web.xml: security-constraint web-resource-collection web-resource-nameallow only POSTs/web-resource-name url-pattern/postonly/*.do/url-pattern http-methodGET/http-method /web-resource-collection auth-constraint role-nameno-member-role/role-name /auth-constraint /security-constraint This basically means if someone tries to use GET (eg a normal request to the action) they would have to be a member of the role 'no-member-role'. Since we won't have anyone in this role, nobody can use GET for these actions. All other methods are allowed. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Applet tree menu or using jsp/struts? URGENT !!
Hello group, I have tree menu running in applet in one of my applications. Currently i am in the process of evaluating whether to continue with tree menu in applet or to develop tree menu using jsp, struts etc.? what are the pros and cons between these two options. Also i am looking for some example or tutorial for treee menu using jsp/struts. In my case data for tree menu are coming from xml file. Any help would be appreciated. Also early response would be appreciated highly. Thanks - Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software
Tiles-EL ???
Anyone know of a non-scriplet way to do what this jsp snippet is doing? c:set var=editPage value=${config.editPage}/ % String editPage = (String) pageContext.getAttribute(editPage); % tiles:insert page=%=editPage%/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: risk of upgrading?
Can someone with a bit of in-depth Struts experience comment on the risks of upgrading a project from Struts 1.0 to Struts 1.1? Should my project work without any modifications? Are there any issues I need to be aware of (changes in behavior and the like)? I just did this. I had a slight problem because my server (Weblogic 7) is set to retain compiled JSP pages even through a server shutdown/restart cycle. That resulted in some odd error messages when one of those saved, compiled pages tried to use a bean tag (I came to grief on bean:define... to be precise). Once I made the most trivial change to an offending page - even inserting and removing a space - the server recompiled the page and everything worked fine. As far as I can tell, everything still works the same. But now I can use whatever methods and tags I find in the documentation without worrying whether they are supported in my version. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: N form items as fields
Hi Dave, you should look at indexed or nested tags with the iterate tag. hth Adam David Thielen wrote: Hi; I have a jsp page where I want to display N items where I get the N items from the database. I need to have an edit field with each item. Whats the best way to do this in struts? thanks - dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]