Re: from struts 1.1 to struts 1.2.7 on JDev 10 g
hi erol, do not play jdevelopers default struts folder.just add struts-1.2.7 do project library as third library and be sure that struts-1.2.7 must be on top of the other libraries. i had tried and it had worked. regards EROL TEZCAN <[EMAIL PROTECTED]> wrote: Hi All, I am using JDev 10g. Now I want to use struts 1.2.7. Now it works with struts 1.1 I downloaded struts 1.2.7 and extract it in a temp folder, and copied all files to /jdev/jakarta_struts/ folder. When I want to run my old application(employee), it gives me some of errors like that: Error(2): java.lang.ClassNotFoundException: org.apache.struts.taglib.html.MessagesTei Error(2): Unable to load taghandler class: /WEB-INF/struts-html.tld Error(3): java.lang.ClassNotFoundException: org.apache.struts.taglib.bean.CookieTei Error(3): Unable to load taghandler class: /WEB-INF/struts-bean.tld I created a new application, and a new jsp page for testing. When I want to add a tag from Componennt Palette into jsp page, it adds . How can I use struts 1.2.7 on JDeveloper10g without any problems? Any suggestion? Erol __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - Yahoo! Messenger NEW - crystal clear PC to PCcalling worldwide with voicemail
Re: iterate on properties of a DynaActionForm
Hi, If ur using HashMap there is no guarantee that they pop out in the same order in which u have pushed(placed/inserted). So better go for a LinkedHashMap. LinkedHashMap preserves the order that u have placed. Khan On 6/28/05, Dave Newton <[EMAIL PROTECTED]> wrote: > > Goswami, Raj wrote: > > >I had the same problem. Thanks for your answer. How do I provide a the > key name though? For e.g. suppose I have a map with key names as > employeeId, employeeLastName, employeeFirstName etc. and I want to print it > by calling the individual key names, not just arbitrarily any key as I might > lose the order in that case. > > > > > I think the DynaActionForm/etc. uses HashMap so there's no guaranteed > order anyway. I'm not sure why you want to do any of this anyway, bu if > you're using it for anything other than debugging purposes you'll > probably want to explore different options. > > Dave > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
Re: unable to print nested values with bean:write, or c:out
From: "Mick Knutson" <[EMAIL PROTECTED]> I modified what I was trying with this: [] And this is the error message I get: 19:02:50,908 ERROR [[jsp]] Servlet.service() for servlet jsp threw exception javax.servlet.jsp.JspException: Invalid argument looking up property consumerActivity.lastPinChangeDate of bean consumerValidatorForm And you're sure that your form has a getConsumerActivity() method, and whatever it returns has a getLastPinChangeDate() method? Can you try it with all JSTL instead of mixing and tags? It doesn't look like is doing what you want-- it looks like it thinks "consumerActivity.lastPinChangeDate" is the property name. So use for the first part. If you need it... what does just print? Unless you're on a JSP 2.0 container (probably not if you're using the best combination is JSTL and Struts-EL. Use JSTL as much as possible, and the Struts-EL taglib only has the things that can't be done in JSTL. -- Wendy Smoak - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[ANN] JSP+Struts web controls
First, check out this live demo: http://www.superinterface.com/strutsdialog/embeddedmasterpage-tomcat.do See the "Sign In" cell? It is JSP/Struts web component, built with Struts Dialogs. This login component is rendered using a separate included JSP. It is: * independent. The only information needed is the URL where to redirect to re-render the component, possibly along with other child components. * it processes input by itself (check the URL in the address bar, and url of login form) * it is stateful It works with current JSP spec, but can be implemented easier if JSP spec were modified a bit. I am trying to find a person who can help me to fix the small issue with JSP spec. Now, check the page URL. Try to log in. Use guest/guest as username/password. After you logged in, you see... the same page, and same URL. Notice, that you cannot go "back". After you logged in, master page is updated, the prices are changed, and "Contact Us" menuitem is shown. I hope that this page will finally show you, what a cool thing Struts Dialogs is, and what a web component is. I started discussion on web controls/components about two weeks ago, but almost no one replied. Does this mean that components are available to .NET developers only? Or to JSF or portlet developers? No, you can create components in Struts, if you render them using JSP. Check out live demo, and see the source code. This is very simple, but powerful concept,based on the same idea of two-phase input processing (aka Post-Redirect-Get). Only instead of redirecting back to itself, component redirects to master page, and it reloads itself. This is it. Source code and runnable jars are at: http://sourceforge.net/project/showfiles.php?group_id=49385&release_id=338164 Documentation is not available yet, and will be announced separately. Michael. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[ANN] Create robust wizards with enhanced Struts Dialogs
I refactored my initial Easy Wizard library, which did not have nice integration with Struts. Now, after I created Struts Dialogs, I added wizard capability as a new action: WizardAction. Check out the live wizard demo, while I am updating the docs: http://www.superinterface.com/strutsdialog/wizardaction.do Source code is avalable from Struts Applications homepage: http://sourceforge.net/project/showfiles.php?group_id=49385&release_id=338164 To create your own wizard you need to peform two steps. First is to create wizard rules. Read about rule engine here: http://today.java.net/pub/a/today/2005/03/15/webwizard1.htm Then you need to create Wizard Manager. There is no docs yet, so you can download source code and take a look at the sample. Michael. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: unable to print nested values with bean:write, or c:out
I modified what I was trying with this: [] And this is the error message I get: 19:02:50,908 ERROR [[jsp]] Servlet.service() for servlet jsp threw exception javax.servlet.jsp.JspException: Invalid argument looking up property consumerActivity.lastPinChangeDate of bean consumerValidatorForm at org.apache.struts.taglib.TagUtils.lookup(TagUtils.java:1017) at org.apache.struts.taglib.bean.DefineTag.doEndTag(DefineTag.java:232) at org.apache.jsp.WEB_002dINF.default_.body.consumer_jsp._jspService(org.apache.jsp.WEB_002dINF.default_.body.consumer_jsp:387) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97) at javax.servlet.http.HttpServlet.service(HttpServlet.java:810) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264) at javax.servlet.http.HttpServlet.service(HttpServlet.java:810) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672) at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:574) at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:499) at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:966) at org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:604) at org.apache.struts.tiles.TilesUtilImpl.doInclude(TilesUtilImpl.java:101) at org.apache.struts.tiles.TilesUtil.doInclude(TilesUtil.java:137) at org.apache.struts.taglib.tiles.InsertTag.doInclude(InsertTag.java:758) at org.apache.struts.taglib.tiles.InsertTag$InsertHandler.doEndTag(InsertTag.java:890) at org.apache.struts.taglib.tiles.InsertTag.doEndTag(InsertTag.java:460) at org.apache.jsp.WEB_002dINF.default_.defaultLayout_jsp._jspx_meth_tiles_insert_3(org.apache.jsp.WEB_002dINF.default_.defaultLayout_jsp: 195) at org.apache.jsp.WEB_002dINF.default_.defaultLayout_jsp._jspService(org.apache.jsp.WEB_002dINF.default_.defaultLayout_jsp:93) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97) at javax.servlet.http.HttpServlet.service(HttpServlet.java:810) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264) at javax.servlet.http.HttpServlet.service(HttpServlet.java:810) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672) at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463) at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398) at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301) at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1056) at org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcessor.java:261) at org.apache.struts.tiles.TilesRequestProcessor.processTilesDefinition(TilesRequestProcessor.java:237) at org.apache.struts.tiles.TilesRequestProcessor.processForwardConfig(TilesRequestProcessor.java:300) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:231) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164) at com.baselogic.struts.ExtendedActionServlet.process(ExtendedActionServlet.java:61) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:415) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at javax.servlet.http.HttpServlet.service(HttpServlet.java:810) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
[OT] Populating Form objects without Struts?
In previous projects where I have used ActionForms, I have always used Struts.I am currently working on a project that, for various reasons, does not use Struts. Is there a way to harvest the advantages of ActionForms without Struts? In particular, I have a form that the user fills out with checkboxes and a "comments" section. There are many of them: the business logic dictates that the form contain 3 "zones." Each zone has between 4 and 10 questions. Each question has a checkbox and a "comment" field. Ideally I would create a bean with a series of Zone objects which contain Question objects which each contain a boolean "checked" and a String "comment"--problem solved. However, I haven't ever done this without Struts, so I don't know of any way to have the values populated in an Object sent with the form submission--the action servlet usually takes care of that. Is there a tool for doing this or any suggested workaround without Struts? Sorry if I'm missing something completely obvious: a quick scan of previous posts and the LazyList and BeanUtils APIs didn't make any lights go on. Thanks, Greg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Re: String as Parameterwith html:link
Actually, that's what I have been doing with no problems. Have you tried it? lang should work just fine in 1.2.4+ Regards, Abdullah -Original Message- From: news [mailto:[EMAIL PROTECTED] Behalf Of Laurie Harper Sent: Monday, June 27, 2005 5:29 PM To: user@struts.apache.org Subject: Re: String as Parameterwith html:link http://struts.apache.org/userGuide/struts-html.html#link You can use paramId, paramName and paramPropery to supply a single parameter w/out building a map, though that still requires the parameter value to be stored in a bean in some scope. There's no way to supply arbitrary values directly (i.e. not from a bean or map) unfortunately. L. Franz-Josef Herpers wrote: > Hi, > > I have a question concerning the Struts-HTML-Tag . I want to > generate a link to an action with one parameter which is a hardcoded > String (not a value of a bean property which is present in a scope). And > I don't want to use the url-Attribut but the action-Attribut to generate > the link to the action. One example link could be: > http://mydomain/setLocale.do?lang="de";. > > What I'm doing now is: create a HashMap with one entry and use the > name-Attribut: > > > > > lang > > > That works fine, but just out of curiosity: Is there really no > possibility to just provide a string via an attribute of html:link which > then is appended literally to the generated URL as a parameter. And if > not is there a special reason for it? > > Regards > Franz -- Laurie, Open Source advocate, Java geek and novice blogger: http://www.holoweb.net/~laurie/ - 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: Strange error-page behavior
Bill: You are right, when I use the page errorPage directive, I get it to go to the error page, but when I use the one in web.xml, that gives me the Internal Error. Strange. Thanks for your help, Neil -- Neil Aggarwal, JAMM Consulting, (214) 986-3533, www.JAMMConsulting.com FREE! Valuable info on how your business can reduce operating costs by 17% or more in 6 months or less! http://newsletter.JAMMConsulting.com > -Original Message- > From: Bill Schneider [mailto:[EMAIL PROTECTED] > Sent: Sunday, June 26, 2005 5:28 AM > To: user@struts.apache.org > Subject: Re: Strange error-page behavior > > > I've found that the directive in web.xml works > only if the > error is thrown from an Action, before the JSP is processed. Putting > <%@ page errorPage="/errorPage.jsp" %> in your JSP may help. > > I believe Tomcat always uses RequestDispatcher.forward for > > directives, which breaks if the response is already > committed. But when > processing the JSP errorPage directive it may use pageContext.include > instead in situations where forward would break. > > -- Bill > > > I tried setting my error page directive to: > > > > java.lang.Throwable > > /errorPage.jsp > > > > > > I am still getting an IllegalStateException. > > > > That seems weird to me. > > - > 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: Problem accessing elements of Collection inside logic:iterate (II)
Riemann Robert (Platinion) wrote: Hello everyone, (a second post since my mail editor just made the posting unreadable... sorry!) I need your help with a tricky problem, where I do not see any explanation currently: I try to construct a table with all data items stored in a database using Hibernate. There is a Form bean for the data items themselves and a form bean with a Collection (ArrayList) with the list of all such data items. Here is the relevant JSP code ... name="InterfacesOverviewForm" property="interfacesItems" type="Presentation.form.InterfacesInputForm"> property="mainId" size="2"/> property="interfacesItems"> No Interfaces data items stored yet. No Interfaces data items available. In my OverviewInterfacesAction I do the following: ... // read data from the persistence layer Collection lDTOList = lService.readData(); // the list of form beans ArrayList lFormInterfacesList = new ArrayList(); // convert DTO's to form beans lFormInterfacesList = (ArrayList) convert(lDTOList); // set the form bean collection into the form lForm.setInterfacesItems(lFormInterfacesList); // place the form with the collection into the request pRequest.setAttribute("InterfacesOverviewForm",lForm); // done return (pMapping.findForward(Constants.SUCCESS)); } I would expect that in my JSP, The iterate gets in each iteration one form after the other out of the collection and that I have access to the properties of the collection elements as in line (**) Unfortunately there are two effects that I cannot explain: 1) With the code as above I get an Exception stating, that bean InterfacesOverviewData cannot be found in any scope Maybe convert() is returning null? 2) If I start the JSP with a name="InterfacesOverviewForm" type="Presentation.form.InterfacesOverviewForm"/> I still get a different exception, but this time stating, that there is no getter method for property mainId in form InterfacesOverviewForm, which is correct since that form contains a Collection with elements which all have a property mainId and getter getMainId(). Yes, but your bean:define binds IngerfacesOverviewData to an instance of interfacesOverviewForm, not to the element type. 3) If I try to access the Collection instead of a property in line (**), i.e. I change the line to: property="interfacesItems" size="150"/> Then I see the the ArrayList printed (I provided a toString() method in the InterfacesInputForm (i.e. the form which represents an element of the Collection), thoug obviously the Collection is there and can be accessed. With or without the bean:define? Shouldn't that be name="InterfacesOverviewForm"? 4) A further observation which I cannot explain might indicate that the heart of my error in not caused by the logic:iterate tag itself: both branches of the surrounding logic:present and logic:empty checks, i.e.,logic:present and logic:notPresent and logic:empty and logic:notEmpty are executed (with the code as described until (3)) That sounds a bit odd... I'd suggest adding some debugging code to the JSP to print out everything in the various scopes to make sure everything's as you expect it. L. -- Laurie, Open Source advocate, Java geek and novice blogger: http://www.holoweb.net/~laurie/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Strange error-page behavior
Neil Aggarwal wrote: I am using Tiles to construct the site. I set the page buffer on my layout page and the content page to a large value and I still get the IllegalStateException. Does the tiles:insert tag cause a problem? Hmm, maybe Tiles is fluching the response somewhere along the line... not sure. Try setting flush="false" on any Tiles 'insert' or 'get' tags. L. -- Laurie, Open Source advocate, Java geek and novice blogger: http://www.holoweb.net/~laurie/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: String as Parameterwith html:link
http://struts.apache.org/userGuide/struts-html.html#link You can use paramId, paramName and paramPropery to supply a single parameter w/out building a map, though that still requires the parameter value to be stored in a bean in some scope. There's no way to supply arbitrary values directly (i.e. not from a bean or map) unfortunately. L. Franz-Josef Herpers wrote: Hi, I have a question concerning the Struts-HTML-Tag . I want to generate a link to an action with one parameter which is a hardcoded String (not a value of a bean property which is present in a scope). And I don't want to use the url-Attribut but the action-Attribut to generate the link to the action. One example link could be: http://mydomain/setLocale.do?lang="de";. What I'm doing now is: create a HashMap with one entry and use the name-Attribut: lang That works fine, but just out of curiosity: Is there really no possibility to just provide a string via an attribute of html:link which then is appended literally to the generated URL as a parameter. And if not is there a special reason for it? Regards Franz -- Laurie, Open Source advocate, Java geek and novice blogger: http://www.holoweb.net/~laurie/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: iterate on properties of a DynaActionForm
The reason I need to do this is that my table data comes as a List of Maps. Each Map in the list is actually a table row. I would like to output the data according to the display order or the table headers. Actually, Wendy answered my question. Thanks Wendy! Appreciate all of your help! Regards, -Original Message- From: Dave Newton [mailto:[EMAIL PROTECTED] Sent: Monday, June 27, 2005 5:30 PM To: Struts Users Mailing List Subject: Re: iterate on properties of a DynaActionForm Goswami, Raj wrote: >I had the same problem. Thanks for your answer. How do I provide a the key >name though? For e.g. suppose I have a map with key names as employeeId, >employeeLastName, employeeFirstName etc. and I want to print it by calling the >individual key names, not just arbitrarily any key as I might lose the order >in that case. > > I think the DynaActionForm/etc. uses HashMap so there's no guaranteed order anyway. I'm not sure why you want to do any of this anyway, bu if you're using it for anything other than debugging purposes you'll probably want to explore different options. Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - This email transmission and any accompanying attachments may contain CSX privileged and confidential information intended only for the use of the intended addressee. Any dissemination, distribution, copying or action taken in reliance on the contents of this email by anyone other than the intended recipient is strictly prohibited. If you have received this email in error please immediately delete it and notify sender at the above CSX email address. Sender and CSX accept no liability for any damage caused directly or indirectly by receipt of this email. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: iterate on properties of a DynaActionForm
From: "Goswami, Raj" <[EMAIL PROTECTED]> > I had the same problem. Thanks for your answer. How do I provide a the key > name though? For e.g. suppose I have a map with key names as employeeId, > employeeLastName, employeeFirstName etc. and I want to print it by calling the > individual key names, not just arbitrarily any key as I might lose the order in that > case. (or just , I'm not sure if yours is a dynamic form.) The dotted names should work in as well, without the expression. -- Wendy Smoak - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: iterate on properties of a DynaActionForm
Goswami, Raj wrote: I had the same problem. Thanks for your answer. How do I provide a the key name though? For e.g. suppose I have a map with key names as employeeId, employeeLastName, employeeFirstName etc. and I want to print it by calling the individual key names, not just arbitrarily any key as I might lose the order in that case. I think the DynaActionForm/etc. uses HashMap so there's no guaranteed order anyway. I'm not sure why you want to do any of this anyway, bu if you're using it for anything other than debugging purposes you'll probably want to explore different options. Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: iterate on properties of a DynaActionForm
I had the same problem. Thanks for your answer. How do I provide a the key name though? For e.g. suppose I have a map with key names as employeeId, employeeLastName, employeeFirstName etc. and I want to print it by calling the individual key names, not just arbitrarily any key as I might lose the order in that case. Thanks again, -Original Message- From: Wendy Smoak [mailto:[EMAIL PROTECTED] Sent: Monday, June 27, 2005 4:24 PM To: Struts Users Mailing List Subject: Re: iterate on properties of a DynaActionForm From: "Dewitte Rémi" <[EMAIL PROTECTED]> > I'm quite new in struts and i'd like to print all properties of my form with > their corresponding value. I don't manage to do this with iterate. Could you > please suggest me a solution ? > my bean name is QuestionnaireForm defined in struts-config: > type="org.apache.struts.validator.DynaValidatorForm"> Do you just want to see what's in the form, for debugging purposes? If so, you don't have to iterate, just do: <%@ taglib uri="http://java.sun.com/jstl/core"; prefix="c" %> (or ) This just calls the 'toString' method on the form. In this case, DynaValidatorForm prints out its internal Map. If you do need to iterate over the form contents, ask the form for its Map, then print out the key and value of each MapEntry: - If you need help translating to , let us know. (Also, you might want to make your form name start with a lower-case letter. Otherwise it looks like a class name instead of an instance.) -- Wendy Smoak - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - This email transmission and any accompanying attachments may contain CSX privileged and confidential information intended only for the use of the intended addressee. Any dissemination, distribution, copying or action taken in reliance on the contents of this email by anyone other than the intended recipient is strictly prohibited. If you have received this email in error please immediately delete it and notify sender at the above CSX email address. Sender and CSX accept no liability for any damage caused directly or indirectly by receipt of this email. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: iterate on properties of a DynaActionForm
From: "Dewitte Rémi" <[EMAIL PROTECTED]> > I'm quite new in struts and i'd like to print all properties of my form with > their corresponding value. I don't manage to do this with iterate. Could you > please suggest me a solution ? > my bean name is QuestionnaireForm defined in struts-config: > type="org.apache.struts.validator.DynaValidatorForm"> Do you just want to see what's in the form, for debugging purposes? If so, you don't have to iterate, just do: <%@ taglib uri="http://java.sun.com/jstl/core"; prefix="c" %> (or ) This just calls the 'toString' method on the form. In this case, DynaValidatorForm prints out its internal Map. If you do need to iterate over the form contents, ask the form for its Map, then print out the key and value of each MapEntry: - If you need help translating to , let us know. (Also, you might want to make your form name start with a lower-case letter. Otherwise it looks like a class name instead of an instance.) -- Wendy Smoak - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: unable to print nested values with bean:write, or c:out
From: "Mick Knutson" <[EMAIL PROTECTED]> > property="consumerActivity.lastPinChangeDate"/> > value="${consumerValidatorForm.consumerAct.lastPinChangeDate}"/> > [] The tag has the equivalent of: lastPinChangeDate = form.getConsumerActivity().getLastPinChangeDate(); The has lastPinChangeDate = form.getConsumerAct().getLastPinChangeDate(); My guess is that the former is correct, (with Activity spelled out) but then you overwrite lastPinChangeDate with blank when can't find the 'consumerAct' property. -- Wendy Smoak - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
unable to print nested values with bean:write, or c:out
I have an ActionForm (consumerValidatorForm) that contains a ConsumerActivity object. The CA object contains a date (lastPinChangeDate). I am trying this in my jsp, and nothing seems to print: [] All I get is [] printed, and I know there is a date in that object as I do a print in my action. -- Thanks Mick Knutson (925) 951-4126 HP Consulting Services Safeway (Blackhawk Fastword Project) J2EE Architect --- "MMS " made the following annotations. -- Warning: All e-mail sent to this address will be received by the Safeway corporate e-mail system, and is subject to archival and review by someone other than the recipient. This e-mail may contain information proprietary to Safeway and is intended only for the use of the intended recipient(s). If the reader of this message is not the intended recipient(s), you are notified that you have received this message in error and that any review, dissemination, distribution or copying of this message is strictly prohibited. If you have received this message in error, please notify the sender immediately. == - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: caching staticJavascript.jsp?
Found the answer to my own question. Just need to give the browser some hints that it should cache the page. Something like: - staticJavascript.jsp: <%@ page language="java" contentType="application/x-javascript" %> <%@ taglib uri = "http://struts.apache.org/tags-html-el"; prefix = "html"%> <% response.setHeader("Cache-Control", "max-age=3600");%> Aymeric. -Original Message- From: Aymeric Alibert [mailto:[EMAIL PROTECTED] Sent: Monday, June 27, 2005 5:29 AM To: 'Struts Users Mailing List' Subject: caching staticJavascript.jsp? I am building a Struts (1.2.7) application that client will access using a slow connection (56K modem) and I am trying to limit the amount of data downloaded from the server. Since I am using the Validator, I would like to create an external staticJavascript.jsp page that could be cached by the browser to hold the javascript generated by the Validator. Here is what I have: - staticJavascript.jsp: <%@ page language="java" contentType="application/x-javascript" %> <%@ taglib uri = "http://struts.apache.org/tags-html-el"; prefix = "html"%> - agencies.jsp <%@ page contentType = "text/html;charset=UTF-8" language = "java"%> <%@ taglib uri = "http://struts.apache.org/tags-html-el"; prefix = "html"%> <%@ taglib uri = "http://java.sun.com/jstl/core_rt"; prefix = "c"%> <%@ taglib uri = "http://java.sun.com/jstl/fmt_rt"; prefix = "fmt"%> ... The application is working fine, but the staticJavascript.jsp is downloaded for each page (I tried both IE and FireFox). Any idea why the browsers are not caching that page? Using a sniffer, here is the Request/Response I got each time: Request: GET /eacadmin/staticJavascript.jsp HTTP/1.1 Host: localhost:8080 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.8) Gecko/20050511 Firefox/1.0.4 Accept: */* Accept-Language: en-us,en;q=0.5 Accept-Encoding: gzip,deflate Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive: 300 Proxy-Connection: keep-alive Referer: http://localhost:8080/eacadmin/agencies.do Cookie: eacUserCookie=true; JSESSIONID=42975E280666F1E7455AA5EC6311BBD3 Response: HTTP/1.1 200 OK Server: Apache-Coyote/1.1 Content-Type: application/x-javascript;charset=ISO-8859-1 Date: Mon, 27 Jun 2005 10:11:29 GMT Content-Length: 34166 . Any idea? Thanks, Aymeric. - 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]
Problem accessing elements of Collection inside logic:iterate (II)
Hello everyone, (a second post since my mail editor just made the posting unreadable... sorry!) I need your help with a tricky problem, where I do not see any explanation currently: I try to construct a table with all data items stored in a database using Hibernate. There is a Form bean for the data items themselves and a form bean with a Collection (ArrayList) with the list of all such data items. Here is the relevant JSP code ... No Interfaces data items stored yet. No Interfaces data items available. In my OverviewInterfacesAction I do the following: ... // read data from the persistence layer Collection lDTOList = lService.readData(); // the list of form beans ArrayList lFormInterfacesList = new ArrayList(); // convert DTO's to form beans lFormInterfacesList = (ArrayList) convert(lDTOList); // set the form bean collection into the form lForm.setInterfacesItems(lFormInterfacesList); // place the form with the collection into the request pRequest.setAttribute("InterfacesOverviewForm",lForm); // done return (pMapping.findForward(Constants.SUCCESS)); } I would expect that in my JSP, The iterate gets in each iteration one form after the other out of the collection and that I have access to the properties of the collection elements as in line (**) Unfortunately there are two effects that I cannot explain: 1) With the code as above I get an Exception stating, that bean InterfacesOverviewData cannot be found in any scope 2) If I start the JSP with a I still get a different exception, but this time stating, that there is no getter method for property mainId in form InterfacesOverviewForm, which is correct since that form contains a Collection with elements which all have a property mainId and getter getMainId(). 3) If I try to access the Collection instead of a property in line (**), i.e. I change the line to: Then I see the the ArrayList printed (I provided a toString() method in the InterfacesInputForm (i.e. the form which represents an element of the Collection), thoug obviously the Collection is there and can be accessed. 4) A further observation which I cannot explain might indicate that the heart of my error in not caused by the logic:iterate tag itself: both branches of the surrounding logic:present and logic:empty checks, i.e.,logic:present and logic:notPresent and logic:empty and logic:notEmpty are executed (with the code as described until (3)) Any help or hint is highly appreciated! Thanks in advanced Robert - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
working with composite action forms
Hi Dears, A newbie question: I have a transfer object called FatherTO that contains a collection of ChildTO's. Can you please help me with how the relevant ActionForm (i.e. FatherForm ) should look like. How should the reset() & validate() methods look like? Thanks Rivka ** The contents of this email and any attachments are confidential. They are intended for the named recipient(s) only. If you have received this email in error please notify the system manager or the sender immediately and do not disclose the contents to anyone or make copies. ** eSafe scanned this email for viruses, vandals and malicious content. ** **
iterate on properties of a DynaActionForm
Hi ! I'm quite new in struts and i'd like to print all properties of my form with their corresponding value. I don't manage to do this with iterate. Could you please suggest me a solution ? my bean name is QuestionnaireForm defined in struts-config: Thanks ! Rémi - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Extending ForwardAction
Peter. 1. I would imagine so if you extend the class and call super.execute() to get the end result, you could then do your own processing. 2. This small piece of functionality could have been written and tested in under a minute. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: 27 June 2005 14:45 To: user@struts.apache.org Subject: Extending ForwardAction Hi all! Here a question from a newbie: Is it possible to extend the ForwardAction class to add some functionality chained to the forward? My struts-config entry would look like this: Does Struts recognize that MyForwardAction extends ForwardAction so that is uses the parameter-attribute? Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Problem accessing elements of Collection inside logic:iterate
Hello everyone, I need your help with a tricky problem, where I do not see any explanation currently: I try to construct a table with all data items stored in a database using Hibernate. There is a Form bean for the data items themselves and a form bean with a Collection (ArrayList) with the list of all such data items. Here is the relevant JSP code // put one property of the interfaces data item into the table cell (**) . . . No Interfaces data items stored yet. No Interfaces data items available. In my OverviewInterfacesAction I do the following: ... Collection lDTOList = lService.readData(); // read data from the persistence layer ArrayList lFormInterfacesList = new ArrayList(); // the list of form beans lFormInterfacesList = (ArrayList) convert(lDTOList); convert DTO's to form beans lForm.setInterfacesItems(lFormInterfacesList); // set the form bean collection into the form pRequest.setAttribute("InterfacesOverviewForm",lForm); // place the form with the collection into the request return (pMapping.findForward(Constants.SUCCESS)); // done } I expect that in my JSP, The iterate gets in each iteration one form after the other out of the collection and that I have access to the properties of the collection elements as in line (**) Unfortunately there are two effects that I cannot explain: 1) With the code as above I get an Exception stating, that bean InterfacesOverviewData cannot be found in any scope 2) If I start the JSP with a I still get a different exception, but this time stating, that there is no getter method for property mainId in form InterfacesOverviewForm, which is correct since that form contains a Collection with elements which all have a property mainId and getter getMainId(). 3) If I try to access the Collection instead of a property in line (**), i.e. I change the line to: Then I see the the ArrayList printed (I provided a toString() method in the InterfacesInputForm (i.e. the form which represents an element of the Collection), thoug obviously the Collection is there and can be accessed. 4) A further observation which I cannot explain might indicate that the heart of my error in not caused by the logic:iterate tag itself: both branches of the surrounding logic:present and logic:empty checks, i.e., logic:present and logic:notPresent and logic:empty and logic:notEmpty are executed (with the code as described until (3)) Any help or hint is highly appreciated! Thanks in advanced Robert Dr. Robert Riemann | IT Architect Platinion GmbH A Company of The Boston Consulting group Ridlerstr. 31b 80339 Munich/Germany Tel. +49 (0) 89 54545-53 22 Mobile +49 (0) 160 532 33 22 Fax +49 (0) 89 5108 2900 mailto:[EMAIL PROTECTED] http://www.platinion.de
DataSource Error
Hi, I upgrade my struts 1.1 files to struts 1.2.7. When I used struts 1.1 , I can get a connection with DataSource in struts-config.xml like that codes: struts-config.xml in java files ServletContext context = servlet.getServletContext(); DataSource dataSource = (DataSource) context.getAttribute("db1"); But now, I cant get any connection with the codes above. Now I am using this codes in excute() method (new codes) -- dataSource = getDataSource(request,"db1"); connection = dataSource.getConnection(); It doesnt work and give it an error message: 503 Service Unavailable Servlet error: Initializing application data source db1 Any ideas? Thanks, Erol __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
Re: Use UTF-8 encoded proerties file
On 6/27/05, Aleksandar Matijaca <[EMAIL PROTECTED]> wrote: > Paul, for good measure, I also include the following jstl: > > > > Regards, a.m. > > > > On 6/27/05, Paul Moody <[EMAIL PROTECTED]> wrote: > > > > This looks like the same problem discussed in the > > "native2ascii" thread. I will copy in my input below, > > you can search on the mailing list site for the > > complete list of messages for this thread: > > > > ** > > > > Re: native2ascii > > > > Paul Moody > > Fri, 24 Jun 2005 02:43:30 -0700 > > > > Below is my understanding of the solution. It is a bit > > annoying that property files can not be UTF-8 encoded > > but that seems to be the case. Anyway, here is what I > > have done and it seems to work... > > > > - you should store your Turkish strings in a text > > file with UTF-8 format (you can open the file in > > notepad and when saving choose the UTF-8 format). > > > > - you run the native2ascii to convert the UTF-8 > > strings into the required format with the strange > > looking things like \ufffd (or whatever). Don't worry, > > this is what is needed for the property files used by > > struts. > > > > - your JSPs should have a directive telling your > > browser that they are in UTF-8 format. Near the top of > > every JSP we have "<%@ page > > contentType="text/html;charset=UTF-8" > > pageEncoding="UTF-8" language="java" %>" > > > > Hopefully this should work. Good luck. > > > > ** > > > > --- Antony Paul <[EMAIL PROTECTED]> wrote: > > > > > Hi all, > > > I want to keep the properties file in arabic. I > > > do this by saving > > > the file with encoding of UTF-8 in Notepad. But > > > displaying this file > > > using outputs garbage in browser. > > > Any help is > > > appreciated. > > > -- > > > rgds > > > Antony Paul > > > http://www.geocities.com/antonypaul24/ > > > > > > > > - > > > To unsubscribe, e-mail: > > > [EMAIL PROTECTED] > > > For additional commands, e-mail: > > > [EMAIL PROTECTED] > > > > > > > > > > > > > > > > > > > > ___ > > Yahoo! Messenger - NEW crystal clear PC to PC calling worldwide with > > voicemail http://uk.messenger.yahoo.com > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > i wrote a test which modifies java.util.Properties to read/write the properties file using UTF-8 and it works. I need to write my own implementation as I can't modify the Sun code due to licensing restrictions. -- rgds Antony Paul http://www.geocities.com/antonypaul24/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Use UTF-8 encoded proerties file
Paul, for good measure, I also include the following jstl: Regards, a.m. On 6/27/05, Paul Moody <[EMAIL PROTECTED]> wrote: > > This looks like the same problem discussed in the > "native2ascii" thread. I will copy in my input below, > you can search on the mailing list site for the > complete list of messages for this thread: > > ** > > Re: native2ascii > > Paul Moody > Fri, 24 Jun 2005 02:43:30 -0700 > > Below is my understanding of the solution. It is a bit > annoying that property files can not be UTF-8 encoded > but that seems to be the case. Anyway, here is what I > have done and it seems to work... > > - you should store your Turkish strings in a text > file with UTF-8 format (you can open the file in > notepad and when saving choose the UTF-8 format). > > - you run the native2ascii to convert the UTF-8 > strings into the required format with the strange > looking things like \ufffd (or whatever). Don't worry, > this is what is needed for the property files used by > struts. > > - your JSPs should have a directive telling your > browser that they are in UTF-8 format. Near the top of > every JSP we have "<%@ page > contentType="text/html;charset=UTF-8" > pageEncoding="UTF-8" language="java" %>" > > Hopefully this should work. Good luck. > > ** > > --- Antony Paul <[EMAIL PROTECTED]> wrote: > > > Hi all, > > I want to keep the properties file in arabic. I > > do this by saving > > the file with encoding of UTF-8 in Notepad. But > > displaying this file > > using outputs garbage in browser. > > Any help is > > appreciated. > > -- > > rgds > > Antony Paul > > http://www.geocities.com/antonypaul24/ > > > > > - > > To unsubscribe, e-mail: > > [EMAIL PROTECTED] > > For additional commands, e-mail: > > [EMAIL PROTECTED] > > > > > > > > > > > ___ > Yahoo! Messenger - NEW crystal clear PC to PC calling worldwide with > voicemail http://uk.messenger.yahoo.com > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
Re: Use UTF-8 encoded proerties file
Yes, for some reason the Properties class assumes your files are ISO 8859-1 encoded and struts uses the Properties class to read your property files. I think you have a couple of choices. Either use the native2ascii which as somebody else pointed out can be part of the build script. We use something like this in ant: If you still do not want anything to do with native2ascii then you could implement your own MessageResources class that loads your UTF-8 properties files. See "org.apache.struts.util.MessageResources" and "org.apache.struts.util.MessageResourcesFactory". Maybe somebody has already done this? Hope this is of help. Paul Moody --- delbd <[EMAIL PROTECTED]> wrote: > Quote from sun java doc of java.util.Properties: > > 'When saving properties to a stream or loading them > from a stream, the ISO 8859-1 character encoding is > used. > For characters that cannot be directly represented > in this encoding, Unicode escapes are used; > however, only a single 'u' character is allowed in > an escape sequence. > The native2ascii tool can be used to convert > property files to and from other character > encodings.' > > > Le Lundi 27 Juin 2005 15:20, Antony Paul a écrit : > > On 6/27/05, Jana Parvanova <[EMAIL PROTECTED]> wrote: > > > Readers deal with character data - while streams > do not. Which is to say > > > that encoding (which is interpreting bytes) is > not applicable to streams. > > > > Then what the hell InputStream has to do with > properties file ?. Do > > people store properties file as in binary file ?. > > > > > > -- > David Delbecq > Royal Meteorological Institute of Belgium > > - > Is there life after /sbin/halt -p? > > - > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > > ___ Yahoo! Messenger - NEW crystal clear PC to PC calling worldwide with voicemail http://uk.messenger.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Extending ForwardAction
Hi all! Here a question from a newbie: Is it possible to extend the ForwardAction class to add some functionality chained to the forward? My struts-config entry would look like this: Does Struts recognize that MyForwardAction extends ForwardAction so that is uses the parameter-attribute? Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Lazy List problem
Hello All, I have a collection - externalRatings which is of type CpExternalCreditRating. CpExternalCreditRating contains an object appCreditRatingSource inside it. Basically, there are nested objects. I use the nested tags to display all the info onto the user screen. The values get displayed properly , problem is when I update something and submit the form ... I get an java.lang.IllegalArgumentException: No bean specified exception. When I removed the text fields using appCreditRatingSource objects inside the CpExternalCreditRating objects and tried to just update the values inside CpExternalCreditRatingit submitted the form without any problem and I was able to retrieve the collection from my DynaForm.so , "externalRatings[0].appCreditRatingSource.srcNm" throws an exception but "externalRatings[0].ratingValTxt" works fine. Here is my Form bean public class UpdateCpRatingForm extends DynaValidatorForm { /** * override the reset methodits called before hitting Action */ List externalRatings = null; private Map values = new HashMap(); public void reset(ActionMapping mapping, HttpServletRequest request) { super.reset(mapping, request); externalRatings = ListUtils.lazyList(new ArrayList(), new ExternalRatingBeanFactory()); this.set("externalRatings",externalRatings); } public void setValue(String key, Object value) { this.set(key, value); } public Object getValue(String key) { return this.get(key); } public Map getAllValues() { return this.getMap(); } class ExternalRatingBeanFactory implements Factory { /** * Create a new instance of the TradeAdjBean object */ public Object create() { return new CpExternalCreditRating(); } } } Please suggest what to do ? I have been stuck with this for some time now. Rahul
Re: Use UTF-8 encoded proerties file
Quote from sun java doc of java.util.Properties: 'When saving properties to a stream or loading them from a stream, the ISO 8859-1 character encoding is used. For characters that cannot be directly represented in this encoding, Unicode escapes are used; however, only a single 'u' character is allowed in an escape sequence. The native2ascii tool can be used to convert property files to and from other character encodings.' Le Lundi 27 Juin 2005 15:20, Antony Paul a écrit : > On 6/27/05, Jana Parvanova <[EMAIL PROTECTED]> wrote: > > Readers deal with character data - while streams do not. Which is to say > > that encoding (which is interpreting bytes) is not applicable to streams. > > Then what the hell InputStream has to do with properties file ?. Do > people store properties file as in binary file ?. > > -- David Delbecq Royal Meteorological Institute of Belgium - Is there life after /sbin/halt -p? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Use UTF-8 encoded proerties file
Couldn't you include native2ascii as part of the compilation process? This way you always edit UTF-8 files but they are converted when you build your application. Le Lundi 27 Juin 2005 15:11, Antony Paul a écrit : > On 6/27/05, Paul Moody <[EMAIL PROTECTED]> wrote: > > This looks like the same problem discussed in the > > "native2ascii" thread. I will copy in my input below, > > you can search on the mailing list site for the > > complete list of messages for this thread: > > > > ** > > > > Re: native2ascii > > > > Paul Moody > > Fri, 24 Jun 2005 02:43:30 -0700 > > > > Below is my understanding of the solution. It is a bit > > annoying that property files can not be UTF-8 encoded > > but that seems to be the case. Anyway, here is what I > > have done and it seems to work... > > > > - you should store your Turkish strings in a text > > file with UTF-8 format (you can open the file in > > notepad and when saving choose the UTF-8 format). > > > > - you run the native2ascii to convert the UTF-8 > > strings into the required format with the strange > > looking things like \ufffd (or whatever). Don't worry, > > this is what is needed for the property files used by > > struts. > > > > - your JSPs should have a directive telling your > > browser that they are in UTF-8 format. Near the top of > > every JSP we have "<%@ page > > contentType="text/html;charset=UTF-8" > > pageEncoding="UTF-8" language="java" %>" > > > > Hopefully this should work. Good luck. > > > > ** > > > > Thanks for the reply. I dont want to use native2ascii tool. I want to > read properties file in Arabic so that it is easy to edit. When I > looked at API for java.io.InputStreamReader, there is an option to > pass the encoding but I cant find a similar mechanism with subclasses > of InputStream. > -- David Delbecq Royal Meteorological Institute of Belgium - Is there life after /sbin/halt -p? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Use UTF-8 encoded proerties file
On 6/27/05, Jana Parvanova <[EMAIL PROTECTED]> wrote: > Readers deal with character data - while streams do not. Which is to say > that encoding (which is interpreting bytes) is not applicable to streams. Then what the hell InputStream has to do with properties file ?. Do people store properties file as in binary file ?. -- rgds Antony Paul http://www.geocities.com/antonypaul24/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Use UTF-8 encoded proerties file
Readers deal with character data - while streams do not. Which is to say that encoding (which is interpreting bytes) is not applicable to streams. - Original Message - From: "Antony Paul" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" Sent: Monday, June 27, 2005 4:11 PM Subject: Re: Use UTF-8 encoded proerties file > On 6/27/05, Paul Moody <[EMAIL PROTECTED]> wrote: > > This looks like the same problem discussed in the > > "native2ascii" thread. I will copy in my input below, > > you can search on the mailing list site for the > > complete list of messages for this thread: > > > > ** > > > > Re: native2ascii > > > > Paul Moody > > Fri, 24 Jun 2005 02:43:30 -0700 > > > > Below is my understanding of the solution. It is a bit > > annoying that property files can not be UTF-8 encoded > > but that seems to be the case. Anyway, here is what I > > have done and it seems to work... > > > > - you should store your Turkish strings in a text > > file with UTF-8 format (you can open the file in > > notepad and when saving choose the UTF-8 format). > > > > - you run the native2ascii to convert the UTF-8 > > strings into the required format with the strange > > looking things like \ufffd (or whatever). Don't worry, > > this is what is needed for the property files used by > > struts. > > > > - your JSPs should have a directive telling your > > browser that they are in UTF-8 format. Near the top of > > every JSP we have "<%@ page > > contentType="text/html;charset=UTF-8" > > pageEncoding="UTF-8" language="java" %>" > > > > Hopefully this should work. Good luck. > > > > ** > > > > Thanks for the reply. I dont want to use native2ascii tool. I want to > read properties file in Arabic so that it is easy to edit. When I > looked at API for java.io.InputStreamReader, there is an option to > pass the encoding but I cant find a similar mechanism with subclasses > of InputStream. > > -- > rgds > Antony Paul > http://www.geocities.com/antonypaul24/ > > - > 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: Use UTF-8 encoded proerties file
On 6/27/05, Paul Moody <[EMAIL PROTECTED]> wrote: > This looks like the same problem discussed in the > "native2ascii" thread. I will copy in my input below, > you can search on the mailing list site for the > complete list of messages for this thread: > > ** > > Re: native2ascii > > Paul Moody > Fri, 24 Jun 2005 02:43:30 -0700 > > Below is my understanding of the solution. It is a bit > annoying that property files can not be UTF-8 encoded > but that seems to be the case. Anyway, here is what I > have done and it seems to work... > > - you should store your Turkish strings in a text > file with UTF-8 format (you can open the file in > notepad and when saving choose the UTF-8 format). > > - you run the native2ascii to convert the UTF-8 > strings into the required format with the strange > looking things like \ufffd (or whatever). Don't worry, > this is what is needed for the property files used by > struts. > > - your JSPs should have a directive telling your > browser that they are in UTF-8 format. Near the top of > every JSP we have "<%@ page > contentType="text/html;charset=UTF-8" > pageEncoding="UTF-8" language="java" %>" > > Hopefully this should work. Good luck. > > ** > Thanks for the reply. I dont want to use native2ascii tool. I want to read properties file in Arabic so that it is easy to edit. When I looked at API for java.io.InputStreamReader, there is an option to pass the encoding but I cant find a similar mechanism with subclasses of InputStream. -- rgds Antony Paul http://www.geocities.com/antonypaul24/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Use UTF-8 encoded proerties file
This looks like the same problem discussed in the "native2ascii" thread. I will copy in my input below, you can search on the mailing list site for the complete list of messages for this thread: ** Re: native2ascii Paul Moody Fri, 24 Jun 2005 02:43:30 -0700 Below is my understanding of the solution. It is a bit annoying that property files can not be UTF-8 encoded but that seems to be the case. Anyway, here is what I have done and it seems to work... - you should store your Turkish strings in a text file with UTF-8 format (you can open the file in notepad and when saving choose the UTF-8 format). - you run the native2ascii to convert the UTF-8 strings into the required format with the strange looking things like \ufffd (or whatever). Don't worry, this is what is needed for the property files used by struts. - your JSPs should have a directive telling your browser that they are in UTF-8 format. Near the top of every JSP we have "<%@ page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8" language="java" %>" Hopefully this should work. Good luck. ** --- Antony Paul <[EMAIL PROTECTED]> wrote: > Hi all, > I want to keep the properties file in arabic. I > do this by saving > the file with encoding of UTF-8 in Notepad. But > displaying this file > using outputs garbage in browser. > Any help is > appreciated. > -- > rgds > Antony Paul > http://www.geocities.com/antonypaul24/ > > - > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > > ___ Yahoo! Messenger - NEW crystal clear PC to PC calling worldwide with voicemail http://uk.messenger.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Use UTF-8 encoded proerties file
Hi all, I want to keep the properties file in arabic. I do this by saving the file with encoding of UTF-8 in Notepad. But displaying this file using outputs garbage in browser. Any help is appreciated. -- rgds Antony Paul http://www.geocities.com/antonypaul24/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: javascript html:fprm and getElementById
Very true. I just wanted to point out the standards-compliant way in case it wasn't known... You pointed out the reality, which is excellent info :) Frank -Original Message- From: "Nitesh"<[EMAIL PROTECTED]> Sent: 6/27/05 1:40:03 AM To: "Struts Users Mailing List" Subject: Re: javascript html:fprm and getElementById getElementById is indeed the "standards-compliant" method... but something which came in a bit late!!! Browser IE 5+ and Netscape 6+ support them... but the earlier version browsers does not support getElementById (since these browsers date before the standard was introduced. Also the standard practice followed for manipulating forms in the HTML document using JavaScript is the form array/object rather than getElementById. (Doesn't mean that you cannot/should not use getElementById) getElementById is introduced keeping in mind the DHTML parts and as a standard way to access the DOM elements which were not exposed as arrays/object for JavaScript. For e.g.. accessing the table cells/rows or DIV/SPAN elements etc to bring in DHTML effects. HTH, Nitesh Naveen - Original Message - From: "Frank W. Zammetti" <[EMAIL PROTECTED]> To: Sent: Monday, June 27, 2005 10:39 AM Subject: RE: javascript html:fprm and getElementById > Remember that getElementById is the "standards-compliant" method, the > others are not, IIRC. They of course work too, but when manipulating DOM > objects, getElementById is supposed to be used, according to the current > standards. > > Is there such a thing as casting in JS? I'm not sure. I don't think > there is as far as object references go anyway, but I could be wrong. > > Frank > > -Original Message- >From: "Nitish Kumar"<[EMAIL PROTECTED]> >Sent: 6/27/05 12:37:42 AM >To: "'Struts Users Mailing List'" >Subject: RE: javascript html:fprm and getElementById > > >I geuss, some thing working or not working in JavaScript is a lot > dependent >on what version of what browser, are you using. > >Well, Any ways, from my previous experience with JavaScript, usually > >document.getElementById gives you an object, and casting it to form > doesnt >work all the time.. > >it is always better to use document.forms[i].action . > > >Thanks and Regards, >Nitish Kumar > > > > >-Original Message- >From: Frank W. Zammetti [mailto:[EMAIL PROTECTED] >Sent: Monday, June 27, 2005 3:05 AM >To: Struts Users Mailing List >Subject: Re: javascript html:fprm and getElementById [Message truncated. Tap Edit->Mark for Download to get remaining portion.] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: javascript html:fprm and getElementById
Gotcha, thanks for clarifying :) Frank -Original Message- From: "Nitish Kumar"<[EMAIL PROTECTED]> Sent: 6/27/05 2:23:48 AM To: "'Struts Users Mailing List'" Subject: RE: javascript html:fprm and getElementById Sorry for getting mixed up with terms, I didnt mean casting as in terms of Java, :) document.getElementById always returns object and then if we start treating it as frames or forms. It some times doesnt work.. Thanks and Regards, Nitish Kumar -Original Message- From: Frank W. Zammetti [mailto:[EMAIL PROTECTED] Sent: Monday, June 27, 2005 10:40 AM To: user@struts.apache.org Subject: RE: javascript html:fprm and getElementById Remember that getElementById is the "standards-compliant" method, the others are not, IIRC. They of course work too, but when manipulating DOM objects, getElementById is supposed to be used, according to the current standards. Is there such a thing as casting in JS? I'm not sure. I don't think there is as far as object references go anyway, but I could be wrong. Frank -Original Message- From: "Nitish Kumar"<[EMAIL PROTECTED]> Sent: 6/27/05 12:37:42 AM To: "'Struts Users Mailing List'" Subject: RE: javascript html:fprm and getElementById I geuss, some thing working or not working in JavaScript is a lot dependent on what version of what browser, are you using. Well, Any ways, from my previous experience with JavaScript, usually document.getElementById gives you an object, and casting it to form doesnt work all the time.. it is always better to use document.forms[i].action . Thanks and Regards, Nitish Kumar -Original Message- From: Frank W. Zammetti [mailto:[EMAIL PROTECTED] Sent: Monday, June 27, 2005 3:05 AM To: Struts Users Mailing List Subject: Re: javascript html:fprm and getElementById Why do you believe this does not work? I just tried in IE and it worked [Message truncated. Tap Edit->Mark for Download to get remaining portion.] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[ANNOUNCE] XMoon 0.7.4 released
Changes in version 0.7.4 (27.6.2005) * Moved from Castor to Jakarta Commons Digester * Added new Workbench's methods saveMessages(), saveErrors() and stopExecute() * New Parameter control on Task (see Doc) * added xmoon-failsafe.properties inside jar * Removed AccessNode in order to use Jaas Authentication and Authorization -- Mario Nee' Brescia Italy [EMAIL PROTECTED] http://www.xmoon.org - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
from struts 1.1 to struts 1.2.7 on JDev 10 g
Hi All, I am using JDev 10g. Now I want to use struts 1.2.7. Now it works with struts 1.1 I downloaded struts 1.2.7 and extract it in a temp folder, and copied all files to /jdev/jakarta_struts/ folder. When I want to run my old application(employee), it gives me some of errors like that: Error(2): java.lang.ClassNotFoundException: org.apache.struts.taglib.html.MessagesTei Error(2): Unable to load taghandler class: /WEB-INF/struts-html.tld Error(3): java.lang.ClassNotFoundException: org.apache.struts.taglib.bean.CookieTei Error(3): Unable to load taghandler class: /WEB-INF/struts-bean.tld I created a new application, and a new jsp page for testing. When I want to add a tag from Componennt Palette into jsp page, it adds . How can I use struts 1.2.7 on JDeveloper10g without any problems? Any suggestion? Erol __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
caching staticJavascript.jsp?
I am building a Struts (1.2.7) application that client will access using a slow connection (56K modem) and I am trying to limit the amount of data downloaded from the server. Since I am using the Validator, I would like to create an external staticJavascript.jsp page that could be cached by the browser to hold the javascript generated by the Validator. Here is what I have: - staticJavascript.jsp: <%@ page language="java" contentType="application/x-javascript" %> <%@ taglib uri = "http://struts.apache.org/tags-html-el"; prefix = "html"%> - agencies.jsp <%@ page contentType = "text/html;charset=UTF-8" language = "java"%> <%@ taglib uri = "http://struts.apache.org/tags-html-el"; prefix = "html"%> <%@ taglib uri = "http://java.sun.com/jstl/core_rt"; prefix = "c"%> <%@ taglib uri = "http://java.sun.com/jstl/fmt_rt"; prefix = "fmt"%> ... The application is working fine, but the staticJavascript.jsp is downloaded for each page (I tried both IE and FireFox). Any idea why the browsers are not caching that page? Using a sniffer, here is the Request/Response I got each time: Request: GET /eacadmin/staticJavascript.jsp HTTP/1.1 Host: localhost:8080 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.8) Gecko/20050511 Firefox/1.0.4 Accept: */* Accept-Language: en-us,en;q=0.5 Accept-Encoding: gzip,deflate Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive: 300 Proxy-Connection: keep-alive Referer: http://localhost:8080/eacadmin/agencies.do Cookie: eacUserCookie=true; JSESSIONID=42975E280666F1E7455AA5EC6311BBD3 Response: HTTP/1.1 200 OK Server: Apache-Coyote/1.1 Content-Type: application/x-javascript;charset=ISO-8859-1 Date: Mon, 27 Jun 2005 10:11:29 GMT Content-Length: 34166 . Any idea? Thanks, Aymeric. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
String as Parameterwith html:link
Hi, I have a question concerning the Struts-HTML-Tag . I want to generate a link to an action with one parameter which is a hardcoded String (not a value of a bean property which is present in a scope). And I don't want to use the url-Attribut but the action-Attribut to generate the link to the action. One example link could be: http://mydomain/setLocale.do?lang="de";. What I'm doing now is: create a HashMap with one entry and use the name-Attribut: lang That works fine, but just out of curiosity: Is there really no possibility to just provide a string via an attribute of html:link which then is appended literally to the generated URL as a parameter. And if not is there a special reason for it? Regards Franz - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Form-Action combo
Adam Hardy on 27/06/05 01:30, wrote: Ted Husted wrote On 26/06/05 13:25: * http://struts.apache.org/roadmap.html on a related note I see that merging the DTDs for validator and forms has been mooted. My desired strategy would be to have a form bean that knows what type its members are. I would declare the form-property's type in that merged dynaform / validator xml. OK, I overlooked that the form property declaration already contains "type". In the current actionform / struts set-up, the mapping of http parameters is done straight onto these form properties so typed, leading to unmanageable exceptions if the http parameter cannot be converted. I am suggesting that the formbean uses string-typed properties for the request parameter mapping part, and a method or a set of methods to apply the mapping to the declared types. The declaration of types for the properties that receive the initial request parameters would then be replaced. (Nested beans etc would be another question.) Adam - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]