Re: [OT] recommendations on workflow engines..
On 6/4/07, אלחנן מעין <[EMAIL PROTECTED]> wrote: hi.. we have a homegrown web framework and we would like to integrate it into one of the open source engine out there, things like jbpm or osworks, our enviorment are jboss 3.2.5 (for development) , hibernate 2.1.7c, and websphere 5 (for production) are there any comparison articles or recommendations (like why NOT to use jbpm?). Sorry, haven't used either. Depending upon the requirements, Commons SCXML [1] could be another candidate. Here is the mailing lists information [2]. -Rahul [1] http://jakarta.apache.org/commons/scxml/ [2] http://jakarta.apache.org/commons/scxml/mail-lists.html
Re: [s2] First try : failed to run mailreader-2.0.1
On 12/6/06, nicolas de loof <[EMAIL PROTECTED]> wrote: it works with xalan 2.6.0. If this lib is required, why isn't it in the war WEB-INF/lib ? I agree it should work out of the box, but dropping in WEB-INF/lib isn't the ideal solution either. Cross-JDK JAXP has gotten a tad trickier [1] (and that reference covers only Sun JDKs). -Rahul [1] http://java.sun.com/j2se/1.5.0/docs/guide/xml/jaxp/JAXP-Compatibility_150.html 2006/12/6, nicolas de loof <[EMAIL PROTECTED]>: > > Hello, > > I'd like to install Struts 2.0.1 apps as a live-demo to Struts 2. I'm > using Tomcat 4.1.30 on Java5 (jrockit). When running mailreader app, I get > : > > TransformerFactoryConfigurationError: Provider org.apache.xalan.processor.TransformerFactoryImpl > not found > > > Seems there is some dependency to Xalan. I added xalan-2.7.0 in tomcat > common-lib and got a NoSuchMethodError : nextSibling. What version is > used by struts ? > > Nico. > > > > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts 2.0 Mialing List
On 10/28/06, Mike Duffy <[EMAIL PROTECTED]> wrote: Does anyone know if there will be a new mailing list for Struts 2.0? No, AFAIK this is the one. Many use prefixes to email subjects, eg. [Struts2] or [S2] for Struts 2.0. -Rahul Thx. Mike - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts & Workflow
On 10/18/06, Don Brown <[EMAIL PROTECTED]> wrote: Struts 2 doesn't have a specific workflow engine built in, per se, but you do have several options: 1. Spring's Web Flow 2. Continuations And then there is Commons SCXML [1], which is a generic state machine / workflow engine that can tie into many environments (though there is nothing ATM in the Struts1/2 space, AFAIK). One of the benefits is leveraging a W3C standard (in the making, so it has a decent chance of paying off in the long run from various standpoints -- tooling, runtimes, multiple impls to choose from). Its possible to pick the expression language for expressions within the workflow definition (JSP 2.0 EL, Commons JEXL are supported, there is concrete evidence of ability to use pnuts and ECMA, and anecdotal evidence for using XPath via the tiger APIs). Its also possible to add domain-specific XML vocabularies (namespaces) that allows the Commons SCXML engine to carry out domain-specific actions. One of the working examples is an impl for Shale dialogs [2] (which were mentioned below). -Rahul [1] http://jakarta.apache.org/commons/scxml/ [2] http://shale.apache.org/shale-dialog/ For point 2, Struts 2 has built in support for RIFE's continuations library. A good example can be found in the showcase. It basically lets you code a workflow in a single method, adding 'pause' calls for when a page should be sent back to the user. Use with care, however, as this is still in an experimental stage. Another framework to look at is Apache Shale - http://shale.apache.org - which builds on JSF and adds a "Dialog" scope framework for this sort of thing. Don On 10/18/06, Jim Reynolds <[EMAIL PROTECTED]> wrote: > Hello Roger, > > I know for sure that Spring has a wizard-like approach for > multi-screen data entry. I believe it is called Spring Web Flow. Now, > I am getting a feeling that Struts2 supports portions of Spring > (Still trying to figure this out) and also appears to include WebWork. > So to the point of your question if someone on this list knows if > Web Flow is part of Struts2, then this would be a valid solution if > you do not want to use Spring. I know there is no work-flow in Struts > 1.x unless you roll your own. > > HTH > > > > On 10/18/06, Roger Varley <[EMAIL PROTECTED]> wrote: > > Hi > > > > I'm looking at the possibilty of using Struts for my next project, > > which is to replace an internal intranet application that uses an > > applet with a servlet based framework. Among the many "challenges" is > > the need, because the applet is basically a multi-screen data entry > > program, to have absolute control over the sequence flow of the > > application - ignore browser back/forward, bookmarking etc and I > > probably need some way of telling if a user navigates away/closes the > > browser mid-session. > > > > Can I do this with Struts (and if so, how) or do I need a more generic > > "worklfow" type of framework? > > > > Sorry if this all sounds a bit vague, but I'm just at the start of > > trying to sort all this out. > > > > Regards > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Reload Message resources i.e Resource Bundle
On 8/17/06, Harsh Gupta <[EMAIL PROTECTED]> wrote: How to Reload Message resources i.e Resource Bundles in struts 1.1??? Create a "reloadable" message resources factory, see factory attribute [1] of -Rahul [1] http://struts.apache.org/1.x/userGuide/configuration.html#resources_config - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT]Scriptlets
On 8/16/06, Puneet Lakhina <[EMAIL PROTECTED]> wrote: I recently joined a software services comapny and as a part of my job i was required to develop intranet websites using struts. Now the attitude in the organisation is a strict no to scriptlets unless u have no other go. Theres always another go ;-) I dont have singnificant experience in JSP so i dont know, but for all you experinced JSP programmers, is no scriptlets the way forward?? Yes, for reasons such as avoiding a heterogeneous programming model, improving readability etc. -Rahul Thanks for your responses. -- Puneet - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Using bean:message from non-struts servlet
On 8/15/06, James Sanders <[EMAIL PROTECTED]> wrote: Puneet, Thank you for your response. The problem is that this does not work outside of the land of struts configuration. Using struts configuration, each jsp has access to all the keys in the Messages.properties file for its module (or actually, whichever module the ActionForm that forwards to that jsp is in). However, my servlet does not have a struts module and thus any jsp it forwards to has no inherent Messages.properties file from which to retrieve keys. It is possible to retrieve these keys from inside my servlet by using the ResourceBundle.getBundle() function with the argument being the fully qualified class name of the Messages.properties file. But when I try to access these keys from my jsp using the tag I get an error, leading me to believe that there must be some other place where the keys recognized by that tag are being populated, I simply don't know where. If your not in the Struts realm, use the JSTL format taglib (you may use it even if you are). The implementation details of the bean taglib depend on Struts specific APIs, such as MessageResources. -Rahul On 8/15/06, Puneet Lakhina <[EMAIL PROTECTED] > wrote: > > On 8/16/06, James Sanders <[EMAIL PROTECTED] > wrote: > > > > Working within a larger struts system, it became necessary for me to > > create > > a servlet, which co-exists with, but outside of, the system. This has > > worked > > very well, but I now find myself wishing to use the functionality of > > and MessageResource files in a jsp outside the struts > > realm. > > It is not difficult to simply use a ResourceBundle to retrieve the > > necessary > > messages into my servlet, but I can't seem to figure out how to make > these > > messages accessible through in my jsp. Does anyone know > the > > mechanism struts (or anything else) uses to make this happen? > > > > > If you want to use a key from ur properties file in ur jsp, u could simply > > do.. this will put the value of the key > here.. im not sure this wat u wanted to ask..but in case its this then > well > n good.. > > -- > Puneet > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: web.xml specifications from 2.4 to 2.3
On 6/14/06, Dave Newton <[EMAIL PROTECTED]> wrote: chuanjiang lo wrote: > property="business_id"/> > You need to use the EL-enabled tag libs (struts-el or something like that) when you don't have JSP 2.0 available. Indeed: http://struts.apache.org/struts-action/struts-el/index.html -Rahul Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem with logic:iterate and List of Strings
On 6/13/06, Florian Barth <[EMAIL PROTECTED]> wrote: Hi folks! I'm having a little problem with a jsp. My FormBean has a List of Strings as value. Now I would like to iterate over the elements of that list, creating a text-field for every element the list contains. At the moment I can online write out the elements using this code-snippet: Just putting in doesn't work, because the str-String-Object doesn't have getter or setter for it's value, so I didn't find an substitute for fooBar that works. I pretty sure that there is an easier way than writing a wrapper for String with getter and setter. http://struts.apache.org/struts-action/struts-taglib/indexedprops.html -Rahul I searched the Mailing-List and googled around a bit, but didn't find something useful. Hope you can help me, Thank you very much, Regards, Florian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts Tag -
On 6/5/06, J Gotsch <[EMAIL PROTECTED]> wrote: Looking at the documentation, it's not clear on how I can use the . Now, which of the following three is the correct syntax for the match comparing? value="ABC"> The name attribute is the name of the bean in the specified scope (or the usual findAttribute() cascading search in all scopes) -- see this page [1] for details -- thereby the correct snippet per the intent of the one above would be: <%-- Do something --%> Or you could do a pageContext.setAttribute() or if in a setup action, a request.setAttribute(). That being said, its recommended to use JSTL and/or EL wherever possible. The JSTL equivalent would be: <%-- Do something --%> -Rahul [1] http://struts.apache.org/struts-action/struts-taglib/tlddoc/logic/match.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [shale] Is there a Dialog Scope?
On 6/5/06, Adam Brod <[EMAIL PROTECTED]> wrote: Hi- JBoss Seam provides addition Scopes beyond Request, Session, Application and None. In particular, JBoss has a Conversation Scope that stores your data for the duration of a specific conversation. This frees the developer from stuffing data in the session and then manually removing it at the end of the dialog. Does Shale Dialog offer that functionality? I want to configure my bean with Scope=Dialog. It would live for the duration of the dialog, and then to be automatically destroyed by the Dialog Manager. In addition to the earlier response, here are some concrete pointers that might help: To populate the "dialog scope", bind the dialog scoped bean to #{dialog.data} -- this is usually done in the first action state of the dialog (which is also the first state of any kind for me, since all my dialogs begin with action states). The subsequent views (matching view states within the same dialog), can then accordingly access its properties. The Dialog Manager will take care of removing the data once the dialog runs to completion. The Shale usecases sample application has such an example in its "Edit Profile" dialog. Look at the method bound to #{profile$edit.setup} and the views under /profile/profile*.jsp -Rahul Please let me know what I can do. Thanks, Adam Brod Product Development Team - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: RE : getIndexValue() in custom tag
On 5/26/06, Jean-Marie Pitre <[EMAIL PROTECTED]> wrote: Thank's for your reply Miguel. It is not exactly what I want ... :( While it requires the JSP author to have an additional "index" attribute on your custom tag, it does introduce a loose coupling that allows the author to watch for the index of, say, the third logic:iterate tag or the second c:forEach tag along the ancestor axis, as compared to the getIndexValue() solution. -Rahul In fact I have write a custom JSP tag, I use it in an iterate block. I would like to retrieve in the doStartTag block the Index value. Jean-Marie -Message d'origine- De: Miguel Galves [mailto:[EMAIL PROTECTED] Envoyé: vendredi 26 mai 2006 13:52 Ŕ: Struts Users Mailing List Objet: Re: getIndexValue() in custom tag Jean Marie, I'm not sure if that's what you are looking for... <%= costFormat.format(c) %> In the code above, I use index to access values in an array called costs. []s On 5/26/06, Jean-Marie Pitre <[EMAIL PROTECTED]> wrote: > > Hi, > > > > I am developing an application with struts and custom JSP tags. > > In my custom tag I would like to retrieve the getIndexValue() when I use > it inside an iterate (in order to change its name like xxx[1] ...). > > Have you got any idea? >
Re: Sending run time value to custom tag
On 5/26/06, Hanmay Udgiri <[EMAIL PROTECTED]> wrote: is there any way i can the pass the value runtime??? Runtime or EL expressions. -Rahul On 5/26/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > > We cannot use tag inside another tags. > > > -Original Message- > From: Hanmay Udgiri [mailto:[EMAIL PROTECTED] > Sent: Friday, May 26, 2006 12:17 PM > To: Struts Users Mailing List > Subject: Sending run time value to custom tag > > Hi > I am sending a runtime value to a custom tag.I am sending the value > through bean:write tag but it is not sending the value.i am attaching > the sample code. > > > > here in the tag class it does not take the value passed through > bean:write tag if I pass like below it takes. > > > > I have to use bean:write tag. > > -- > Thanks and Regards > Hanmayya Udgiri > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: including taglib in jsp
On 5/5/06, temp temp <[EMAIL PROTECTED]> wrote: including a taglib in jsp will it cause performance problems ? for example my jsp has path to taglib <%@ taglib uri="/tld/struts-bean" prefix="bean"%> and I am not using declared tag any where in my jsp. As per performance measure can I ignore tld declaration or should remove unnecessary tld declaration? There is no reason to remove it solely for performance considerations (the jsp compiler overhead is probably negligible, and for production apps where the JSPs are precompiled, there is no runtime overhead). Style is another issue, and possibly subjective. -Rahul thanks & regards - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: html:text attributes for nested tags
On 5/5/06, Raghuveer <[EMAIL PROTECTED]> wrote: It is working like this for scalar properties but doesn't work for nested tags Maybe you're looking for its nested counterpart, ? -Rahul -Original Message- From: Raghuveer [mailto:[EMAIL PROTECTED] Sent: Friday, May 05, 2006 6:10 PM To: 'user@struts.apache.org' Subject: html:text attributes Could any one give info how the below attributes can be used in - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: html:text attributes
On 5/5/06, Raghuveer <[EMAIL PROTECTED]> wrote: Could any one give info how the below attributes can be used in Related tlddoc contains short descriptions: http://struts.apache.org/struts-action/struts-taglib/tlddoc/html/text.html -Rahul - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How use AND,OR in logic struts tag lib
On 4/26/06, Angel Navarro <[EMAIL PROTECTED]> wrote: > Hi, > > I need to translate: > > if ( a == 'option1' || a == 'option2' ) > Use JSTL: ... "and" is also available in EL similarly. -Rahul > to struts code > I don't know how put || or && in > Thanks > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts 1.3 - WebSite/Docs
On 4/10/06, Dion Gillard <[EMAIL PROTECTED]> wrote: > Any pointers to where to find details on the changes and details in 1.3? > Probable starting points: http://struts.apache.org/struts-action/userGuide/release-notes.html http://wiki.apache.org/struts/StrutsUpgrade -Rahul - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: struts-blank.war jboss 500 error {V2 - correction to path}
On 3/24/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > ummmanybody care to take a stab at this one? > Its looking for a JSP 2.0 TagAttributeInfo constructor that it can't find (TC 5.x supports JSP 2.0, 4.x does 1.2). Its a jsp-api.jar mixup, though I can't see why that would happen with an unmodified struts-blank.war deployment on Tomcat. In any case, things to do: * Examine jsp-api jar(s) in classpath * Check behavior with a servlet 2.4 web.xml -Rahul > I know it's probably something obvious and I may look like a dumb n00b, but > I've sort of reached my limit looking for the obvious. > > ta, > pc > > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Sent: Saturday, March 25, 2006 12:18 AM > To: 'Struts Users Mailing List'; [EMAIL PROTECTED] > Subject: RE: struts-blank.war jboss 500 error {V2 - correction to path} > > > and I also get the same error with Jakarta-tomcat-5-5-9. > > Which leads me to surmise something has changed in the setup between V4 of > tomcat and V5, as Jboss is also using V5 of tomcat. > > So what config causes Struts examples to work out of the box on Tomcat V4, > but fail in V5/Jboss? > > Could be my setup, as I'm still new to struts setup, but then it would not > work under tomcatV4 would it? > > Thanks in advance, > paul > > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Sent: Friday, March 24, 2006 11:55 PM > To: 'Struts Users Mailing List' > Subject: struts-blank.war jboss 500 error {V2 - correction to path} > > > Hi, > I've had Struts1-2-9 working under Tomcat-4-1-31 no problems. > eg: drop struts-blank.war into the webapps directory and punch > http://localhost:8080/struts-blank/ and it shows fine. > > Now I try to evaluate JBoss-4-0-4RC1 auto install, drop struts-blank.war > into C:\jboss-4.0.4RC1\server\default\deploy > and I get the 500 error below. I've googled endlessly trying to find a > resolution, other people have had similar error but no fix I can see. > > Does anyone have any clues? > > Thanks, > paul > > HTTP Status 500 - > > type Exception report > > message > > description The server encountered an internal error () that prevented it > from fulfilling this request. > > exception > > javax.servlet.ServletException: > javax.servlet.jsp.tagext.TagAttributeInfo.(Ljava/lang/String;ZLjava/la > ng/String;ZZ)V - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: upgrading from 1.1 to 1.2.9
On 3/24/06, Daniel Blumenthal <[EMAIL PROTECTED]> wrote: > I just took the plunge, and upgraded from 1.1 to 1.2.9. I did the > following: > > replaced all the .jar files in WEB-INF/lib > replaced all the .tlds in WEB-INF > upgraded to sslext1.2 > restarted Tomcat > > And, um, everything just worked. Now, > normally this wouldn't be something I'd be complaining about, but I expected > to have to make at least a couple of changes to something. Anything. > There's a certain confidence bred of having spent time debugging a piece of > code or wrangling with configurations. > > So, my question - is this expected behavior? Is 1.2.9 backward compatible > to 1.1? Or are there some hidden gotchas that I should be concerned about? > This [1] is a useful related resource. -Rahul [1] http://wiki.apache.org/struts/StrutsUpgrade > Thanks! > > Daniel > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: formbean of double type value chages when submitting the form
On 3/24/06, Hubert Rabago <[EMAIL PROTECTED]> wrote: > You know, you're right. I don't know why we list those there since > DynaActionForm can support any type. (pause, think.) The intent probably was to mention that those converters are *guaranteed* to be available (since they exist in BeanUtils). Not disputing the patch idea ;-) -Rahul > Hmm, maybe next > week I'll find time to fix that. (Patches to docs are welcome!) > > Anyway, I think you missed a statement a few paragraphs down the same > section: "And, of course, while the DynaActionForm may support various > binary types, properties used with the html:text tag should still be > String properties." > > Going back on topic, you can use whatever type you need in > DynaActionForm as long as you know what you're doing and you can > handle the consequences. Laurie's option 1 is an example of handling > it yourself, although now that I think about it, I think > FormPropertyConfig is the one that replaces the null with "new > Double()" which is where you get your "0.0". Ahh, I'll have to look > again to see how you can intercept this. > > So, bottom line, yes, you can put whatever type in Dyna*Form fields > you want. I sometimes put other Dyna*Form objects in them. If you > do, though, you'll have to know how to handle them yourself. The > default form handle only handles Strings and booleans. > > Hubert > > On 3/24/06, fea jabi <[EMAIL PROTECTED]> wrote: > > so, I should have all form-properties to be of String type and convert to > > Double and then validate is it? > > > > if that is the case then, why do we have the below data types? what is it's > > purpose? > > > > http://struts.apache.org/struts-action/userGuide/building_controller.html > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Error
On 3/24/06, Vinit Sharma <[EMAIL PROTECTED]> wrote: > Hi, > > I'm getting an error "org.apache.struts.taglib.html.BaseHandlerTag: method > setErrorKey(Ljava/lang/String;)V not found" when I'm trying to render an > html:text element like: > > There is probably an errorKey attribute on the page. Besides that, it seems you have <= 1.2.4 (IIRC) binaries in classpath. The error style attributes were added around that timeframe (check SVN / release notes in case I'm off about the minor version). -Rahul > MRInfoForm is my ActionForm and cardNumber is property of bean CardInfoBean > which is a member of MRInfoForm. CardInfoBean implements Serializable. > > Thanks, > > > -- > Vinit Sharma > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: focus in html object
On 3/24/06, Raghuveer <[EMAIL PROTECTED]> wrote: > > In my log screen i have 2 text boxes to input user login user id and > password. > Initiall when page loads i am focusing on username by focus attribute in > form tag. > If there is an error in password , i display Struts Action Error as > "password is required." > > What i need to do to focus the cursor on "password" textbox when there is > error in password. > > I.e Does struts1.2.8 provides any facility for focusing respective html > object (if there is any error related to the property )? > > --- > The functionality is provided, since focus is rtexprvalue true, so you can render an expression of choice as its value (for instance, one which checks for password errors being present and returns either "username" or "password" accordingly). -Rahul > styleClass="inputBox" /> > redisplay="false" styleClass="inputBox"/> property="password"/> > > - > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Expression Language
On 3/23/06, David M Sledge <[EMAIL PROTECTED]> wrote: > Do EL expressions only evaluate to String and primitive types? I have code > similar to the following in my jsp. > > > > > I will assume thats bean:write. > > > > Where uriList is an object of type java.util.List only containing > java.net.URI objects, and where uriValueMap has only java.net.URI objects as > keys and has for values objects with the property someProperty. > > > As a result, I end up getting the following exception: > > javax.servlet.ServletException: Invalid argument looking up property: > "http://namespace-uri.org.someProperty"; of bean: "uriValueMap" > > Is there any way to preserved the java.net.URI type as a lookup key? > Probably not using bean:write. I prefer JSTL counterparts for the tags above. This will work: c:out may not be needed. -Rahul > > > Thanks, > > > > David M. Sledge > > Analyst/Programmer Specialist > > LTER Network Office > > Dept. of Biology, MSC03 2020 > 1 University of New Mexico > Albuquerque, NM 87131-0001 > > 505-277-0666 > [EMAIL PROTECTED] > > > > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Troubles with comparisons using logic tags
On 3/23/06, Yariel Ramos Moreno <[EMAIL PROTECTED]> wrote: > Hello: > > I'm having some problems with comparisons using logic tags in Struts 1.1. > There is more than 12 h that I'm trying to resolve it... and nothing. > > I am passing 2 variables by session: >niCount = 10 >viewed = 3 or 21 (I'm trying with this 2 values) > Many of the logic tags have been deprecated in favor of JSTL tags. The comparison tags fall in this category. If possible, switch to using JSTL, like so: ... some code here ... some (hopefully other ;-) code here even better, use since the two conditions are complementary. If switching is not possible ... > Then I'm doing this: > > > some code here ... > > > > some code here > > > as result the code inside both conditions is executed... and if you look at > both conditions, the variables are inverted. I have try all possible > combination with the other tags and the evaluation is never correct (when I > use logic:greaterThan or logic:greaterEqual, the code in it's body is never > excecuted). > Thats because the "value" attribute is passed the literal "viewed" in the first case, leading to a String comparison. If you're able to use EL, pass "${sessionScope.viewed}" instead (if not, a runtime expression). -Rahul > I don't know what can I do. > > Thanks in advance, > > Yariel. > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Shale] jsp vs. jspx
On 3/22/06, James Reynolds <[EMAIL PROTECTED]> wrote: > > As part of converting my app from vanilla faces to Shale, I decided to > convert my jsp files to jspx for two reasons. First, to prevent someone > else from employing scriplets in the future and, second, because I've > read that it's a good idea (maybe I've been reading all the wrong > stuff). > On the second - I've used jspx files when the markup emitted is XML based -- such as XHTML, VoiceXML or WML rendering. It takes better care of well-formedness concerns (plus the root element doesn't even have to be , which is beautiful). On the first - Thats good, but what about ? ;-) > Now I'm running into some newbie problems getting jspx pages to display > correctly so I'm starting to second guess myself. Is there any > advantage one way or the other as far as Shale is concerned? > Probably not, but my experience with using jspx files has been similar (there are probably more "issues" with container processing of jspx files than jsp files -- regardless of container). Shale shouldn't care. -Rahul > Thanks > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: newbie guestion: JSTL Expression language
On 3/16/06, Morten Andersen <[EMAIL PROTECTED]> wrote: > I want to use JSTL to check the role of the user (it can be one of many) > > I'm new to JSTL so even the simplest things gives me problems: > > I've set the role using request.setAttribute("role" , role); > > This tag: > > > Prints out the role fine > > While the following statements are newer true: > > Expression must be contained in ${ and } in its entirety i.e. ${role eq 'editor'} >The role is editor > > > ${role ne 'editor'} -Rahul >The role is editor > > > Where do I go wrong? > > Morten > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JSP expression html filter?
On 2/21/06, Jürgen Hofmann <[EMAIL PROTECTED]> wrote: > If I use the bean write-tag () I can filter html > output: > becomes > ... > > How can I filter output from JSP expressions (${...}) ? Is this possible? > ${fn:escapeXml(...)} or -Rahul > Thanks > > Jürgen > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: constant strings in the tags
On 1/24/06, Dave Newton <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > Surely they thought about this and decided there was some reason not to > > make the constants available in the tags. Or was it just too difficult a > > task for some finite period of development time? > > Probably not the right forum to ask. > Well, I'm not sure how you'd differentiate between a named, scoped bean > and a fully-specified class name except by checking for a named, scoped > bean and if that fails looking up a class definition. You could add a > parameter to tags, but that wouldn't help for JSP 2.0 non-tag EL > expressions. Maybe by declaring a package name somewhere you could > finagle a way around it, but still seems warty. > package constants; public class Foo { public static final String BAR = "bar"; //... } elsewhere, in a JSP 2.0 page: ${foo.BAR} <%-- Line of interest --%> The issue I quoted earlier says the above line should have the *desired* effect. -Rahul > > Dave > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: constant strings in the tags
On 1/24/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Here's what I usually do: > > > request.setAttribute( Constants.USER, userObject ); > > and the Constants.java defines > > public final static String USER = "theUser"; > > then in the JSP > > > > > But I want to be able to do something like > > > > > I've never actually tried this. Maybe I should before posting this, but I > don't know why it would work. I thought the EL only had access to bean > properties? So why would it be able to access a field directly? > > Known issue, push for it to be resolved here: https://jsp-spec-public.dev.java.net/issues/show_bug.cgi?id=145 -Rahul - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: jstl tutorial/reference?
On 1/23/06, Deep Chand <[EMAIL PROTECTED]> wrote: > Hi, > > I'm developing a struts based application and would like to use jstl > tags instead of custom tags specified with struts tag lib. Is there a > good JSTL tutorial/reference available which gives good example usage > also of how to use the jstl tags. > The only reference you need is the set of documents published via JSR-52 [ http://www.jcp.org/en/jsr/detail?id=52 ]. Everything else is gravy ;-) -Rahul > Thanks > Deep > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: html-el:select and tag files
On 1/23/06, Clint Popetz <[EMAIL PROTECTED]> wrote: > On Mon, Jan 23, 2006 at 03:00:27PM -0500, Rahul Akolkar wrote: > > On 1/23/06, Clint Popetz <[EMAIL PROTECTED]> wrote: > > > On Mon, Jan 23, 2006 at 12:36:02PM -0700, Wendy Smoak wrote: > > > > > > > > Use the plain HTML tags and make sure you've configured your webapp > > > > for Servlet 2.4 so that the container will evaluate the expressions > > > > prior to passing them into the tags. > > > > > > I had no idea this was even possible. Can you point me to a reference > > > on configuring tomcat 5.5.x do that? > > > > Doesn't take much: > > > > http://wiki.apache.org/jakarta-taglibs/FrequentlyAskedQuestions > > Ok, I am sorry for the confusion. I had assumed that because I was > running tomcat5.5 and tag files were working, I was in jsp 2.0 land, > but I had no version attribute for the web-app declaratipon in > web.xml, and the DOCTYPE was pointing to 2.3. I tried changing it to > what is suggested by the FAQ, but that results in all of my jstl tags > failing to compile. I just read the Jstl-1.1 appendix on compatibilty > and discovered that jstl-1.1 defaults to jstl-1.0 mode when running in > with a web.xml set to 2.3, so that makes sense. > > I can't possibly update all my uses of jstl at this point in order to > run with jstl-1.1, so it seems I'm running under 2.3 for the time > being. > You might also want to look at the 1.0 --> 1.1 migration roadmap laid out in the spec. In some cases, it isn't too much work. > Now, given that I'm running under jsp 1.2, not 2.0, and thus using the > struts-el tags, my original question still stands. I won't re-quote > it, for space concerns. Basically, a EL expression is passed from a > page into a tag file via an attribute, and then passed to struts-el as > a property, but I get one-two-few EL evaluations, and thus end up with > a property name that has el expressions in it but is treated as a bean > property literally. > 1.2 didn't have tag files, so all bets are off. Some servlet containers might blow up with an audible bang ;-) >Thanks, >-Clint > > P.S. Magic behaviors are dangerous. The fact that the text "2.4" versus > the text "2.3" in my web.xml turns off container jsp-el parsing _and_ > toggles jstl 1.0 verses 1.1 is a little much. My $.02. > Its not so much that you changed one character in your web.xml, but what the semantics of the version attribute are in the web application descriptor. Non-trivial. -Rahul - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: struts and JSTL
On 1/23/06, fea jabi <[EMAIL PROTECTED]> wrote: > Thank you for your response. I have set the value in the formbean. > > hence, tried this instead > > > > ... value="${Form1.map.amount}" ... -Rahul > But only half of JSP is getting displayed. Not sure why? any idea why this > happening? > > > When tried to debug I see an EL exception being thrown > > "Unable to find a value for \"amount\" in object of class > \"org.apache.struts.validator.DynaValidatorForm\" using operator \".\"" > > The form-bean does have the form-property amount. Not sure why it can't find > it. > > Thanks. > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: html-el:select and tag files
On 1/23/06, Michael Jouravlev <[EMAIL PROTECTED]> wrote: > > You don't need to configure it (if you don't want to turn EL off). EL > is simply what JSP 2.0 container does. EL and JSTL are part of JSP 2.0 > spec. > JSTL is not part of JSP 2.0. They're separate JSRs (52 and 152 respectively). -Rahul > > Michael. > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: html-el:select and tag files
On 1/23/06, Clint Popetz <[EMAIL PROTECTED]> wrote: > On Mon, Jan 23, 2006 at 12:36:02PM -0700, Wendy Smoak wrote: > > On 1/23/06, Clint Popetz <[EMAIL PROTECTED]> wrote: > > > > > This may be more of a jsp 2.0 question than a html-el tag > > > library question, but here goes. > > > > If you're using JSP 2.0, you should not be using Struts-EL. > > > > Use the plain HTML tags and make sure you've configured your webapp > > for Servlet 2.4 so that the container will evaluate the expressions > > prior to passing them into the tags. > > I had no idea this was even possible. Can you point me to a reference > on configuring tomcat 5.5.x do that? I couldn't find anything in > >http://tomcat.apache.org/tomcat-5.5-doc/jasper-howto.html > > to configure the Jsp servlet to do that. Also, for testing I use the > jasper ant task to compile the jsps, and the resulting java is > definitely not pre-evaluating the strings passed into the html: (or > htm-el:) tags. How do I convince jasper to do that? > Doesn't take much: http://wiki.apache.org/jakarta-taglibs/FrequentlyAskedQuestions -Rahul >Thanks, >-Clint > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Be Careful though: was Re: Struts JSTL & EL
On 1/19/06, Rick Reumann <[EMAIL PROTECTED]> wrote: > Rahul Akolkar wrote the following on 1/19/2006 3:30 PM: > > > For such concerns ... > > > > ${fn:escapeXml(test)} > > > > is an option. > > > > is overrated in JSP >= 2.0, IMO. > > Just curious why is ${fn:escapeXml(test)} any better than value='${test}'/> ? > Lets lay out all the options: 1) ${test} 2) ${fn:escapeXml(test)} 3) 4) And the scenarios: a) "test" must be escaped b) "test" cannot contain characters that need to be escaped c) "test" must not be escaped Then, keeping aside jspx/tagx files: i) For (b) and (c), (1) wins, the criteria being: * Verbosity * Need for JSP tag invocation. ii) For (a), (2) wins because I'm already doing (i). Ofcourse, to each their own. -Rahul > -- > Rick > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Be Careful though: was Re: Struts JSTL & EL
On 1/19/06, Rick Reumann <[EMAIL PROTECTED]> wrote: > Josh McDonald wrote the following on 1/18/2006 5:29 PM: > > Servlet 2.4 lets you use EL all over the place in JSPs? That rocks me, > > can someone please send me a link to some good examples of just how > > out-there you can get? > > Just remember to consider using c:out vs just the straight EL ${}... > For such concerns ... ${fn:escapeXml(test)} is an option. is overrated in JSP >= 2.0, IMO. The one place it is useful is to ensure well-formedness in jspx files. jspx/tagx files are revolutionary in concept, and a step in the right direction, though I doubt many folks use them extensively. -Rahul > Craig brought this up a while ago and I wasn't even aware of the > concerns. For outputting text you should be careful of just using > ${someVar} vsBy default c:out will escape > the characters so that what is inputted for someVal will show up. Just > using ${} does not escape the characters, so if you aren't careful with > what you do on the backend, someone possibly could enter in a javascript > string which will get persisted to the db, and then on a display page if > you simply display this field using the built in EL support, you'll end > up with Javascript executing on the page:) > > Try it out, do this on your page: > > value="this.location='http://www.espn.com';"/> > > stuf > stuff > ${test} > > > Then try it with > > value="this.location='http://www.espn.com';"/> > > stuf > stuff > > > > > -- > Rick > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: need Calendar in JSF
On 1/12/06, JEEVANATHAM P. /BPCRP/INFOTECH/VASHI <[EMAIL PROTECTED]> wrote: > Hi all, > > Is there any component in JSF for date picker? > Tomahawk calendar [1] for one. -Rahul [1] http://myfaces.apache.org/tomahawk/calendar.html > > > Please let me know. > > Thanks n advance > > jeeva > > -- > Greetings! > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to iterate using
On 1/11/06, Ashish Kulkarni <[EMAIL PROTECTED]> wrote: > Hi > Thanx now it works, > but i have another issue, > what i am trying is this > > items="${viewlinephase.map.viewNames}"> > > > > > > > viewName.nameDescis workig fine, and value is getting > substituated, but viewName.l1082CODE is not getting > substituted No such getter below (but there is one for viewName.l082CODE). -Rahul > my bean is as follows > public class PL1082Bean > { >private String l082CODE; >private String l082DESC; > > >public String getL082CODE() >{ >return l082CODE; >} >public void setL082CODE(String l082code) >{ >l082CODE = l082code; >} >public String getL082DESC() >{ >return l082DESC; >} >public void setL082DESC(String l082desc) >{ >l082DESC = l082desc; >} >public String getNameDesc() >{ >return l082CODE + " " + l082DESC; >} > > Ashish - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to iterate using
On 1/11/06, Ashish Kulkarni <[EMAIL PROTECTED]> wrote: > Hi > I have defined a DynaValidatorForm in > struts-config.xml file like this > type="org.apache.struts.action.DynaActionForm"> > type="java.util.Collection" /> > > > In My jsp i have defined a Action class which uses > this bean > I want to iterate through all viewNames in my jsp > using tag > How do i go it > I tried > items="${viewlinephase.viewNames}"> ${viewlinephase.map.viewNames} You'll be able to CGLib enhance if you wish in 1.3.x. -Rahul > > > > > > But i get Unable to find a value for "viewNames" in > object of class > "org.apache.struts.action.DynaActionForm" using > operator "." > > How do i do it > > Ashish - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Shale] getting my first dialog to work with Shale/MyFaces
On 1/8/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Ah, this is a bad thing for me..(:( I really absolutely have to have an > always visible and always clickable menu bar and after reading the > bugzilla notes seems like "breaking out of" a current dialog and starting > abrand new one without formally ending it is not possible now (hope I have > that right?). So i will either cludge a solution or stay my use of dialogs > till you guys have figured out the right solution. > Dialog progression is driven purely by UI gestures. There were a couple of posts on the dev list a few days back that are probably of interest here: http://marc.theaimsgroup.com/?l=struts-dev&m=113657007806524&w=2 I don't think a RFE was filed, but I haven't been watching for it either. I would've filed one myself if I had a patch to propose. -Rahul - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Shale] getting my first dialog to work with Shale/MyFaces
On 1/8/06, Craig McClanahan <[EMAIL PROTECTED]> wrote: > On 1/7/06, Rahul Akolkar <[EMAIL PROTECTED]> wrote: > > > > [snip] > > * A self transition for a view state should be possible (its > > definitely legit in state chart theory, Shale dialogs being state > > charts for a specific purpose). > > > Self-transitions for a view state are definitely legal, but there's an > interesting semantic twist here. Since we are in a view state, the > transition is based on the logical outcome returned by the action method > that is invoked for the submit button that actually submits the form (phew, > say that sentence three times real fast :-). If the action method returns > an outcome that happens to map to the same view identifier, a *new* > component tree is still created, so you lose any state information you've > stored in the current component tree. If the action method returns null, on > the other hand, there is a short circuit to the normal transition mechanism > that causes the current view to be redisplayed, *without* being recreated. > > This was done deliberately, so that action methods within a dialog work > exactly the way they do outside a dialog. From a state chart perspective, > you can assume there is an additional unspecified transition that says "if > the logical outcome is null, redisplay the current component tree without > recreating it." This can be an important consideration when you are > designing the UI of your application ... even if the *user* doesn't know or > care whether a new view was created or not in this scenario, it can > dramatically simplify your dialog configuration, and your application logic, > to know that this is a scenario you can rely on. > That makes sense. A "stay" (null) transition should retain state, a "self" transition (amounts to calling onexit and onentry -- which gets us in initial -- for that state) should not. Now in terms of DialogNavigationHandler#transition(...) a null outcome and a stay transition seems to produce the identical State as a return value and hence identical results from a dialog progression perspective. A quick test by making the "next" transition on page 2 of the edit profile dialog (from the shale usecases war) point to the same state seemed to retain the values in the s. Is my quick test missing something? -Rahul > Craig > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Shale] getting my first dialog to work with Shale/MyFaces
On 1/7/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Rahul Akolkar <[EMAIL PROTECTED]> wrote on 01/06/2006 05:07:21 PM: > > > On 1/6/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > > > My "Search" still throws > > > a nasty error, but I guess I shall struggle with that awhile before > > > I give up and ask you again..(:( > > > > > > > > > Possibly rethink the corresponding outbound transition from the > > SearchHome view state (separate the search and results views). > > Thank you Rahul. Actually the specs are that my results appear just below > my search form and I had already coded things so everything was in > /search.jsp (I used rendered attributes to render results if present). > However I guess what Shale requires is for the ids (names) to be different > (and never mind what those names map to). Not really. I understand your "specs" now, whats the "nasty error" you refer to, does that hold any clues? > > So that's what i did: > > > > > > > > > > > > > > > > > This worked for my *first* search: my searchBean.find() returns " > ContactListSuccess" and everything is hunky dory. Sweet. *However*, since > my search form is visble above my results, I got a Faces error when I > searched again! And the error made sense too (;) since I was in the > "ContactListSuccess" state (after the first successful search) and I was > now transitioning to "ContactSearchSuccess" again due to the second > search, which is not a legal outcome according to the dialog. So I moved > the up > so it was a common transition (instead of adding it twice) and then I no > longer got the error. > A couple of things that I think are relevant here: * A self transition for a view state should be possible (its definitely legit in state chart theory, Shale dialogs being state charts for a specific purpose). * I tend to use action states since I can visualize the processing bits as states in the dialog config (and searching definitely qualifies), and the corresponding multiple logical outcomes (error, no results, few results, many results) appear as transitions in the action state. But, I understand this is subjective. > Furthermore, my menu bar, which is always visible and which has a link to > dialog:Search Contacts also is always clickable. Thus I also need a common > transition for outcome "Search Contacts". So my dialog now looks like > this: > > > > > > > > > > > > > > > > > > > > I do have a few more transitions which I have omitted (which are not > common), but it really seems to me that by making so many of the > transitions "common", I am not utilizing what Shale can give me via > dialogs. Is this correct? Or is this what i have to live with since my > specs dictate I show the search form above my results and I always have > the menu bar visible? I get the feeling I may be missing something > important.. > There is nothing wrong with "common" transitions -- Shale calls these global transitions -- pending they're truly common. Looking at what you have listed: * Transitions such as the first one (cancel) are useful when specified as global transitions, especially in wizard style dialogs, otherwise you'd be authoring them redundantly. * The second one is a candidate for localizing (will be a side-effect of having one view state). * The third one I believe is refering to the "always clickable" menu bar link to initiate the search dialog, and that is going to be suspect since Shale dialogs, as of today, work best when you run a dialog to completion before beginning another (where completion is defined as reaching an end state, that says nothing about any *task* being completed). Ofcourse, if you're using dialogs, it'd be good be aware of the known issues 35066 [1], 37120 [2] and 37571 [3], if you're not already. And finally, use the latest nightlies if you can, just saw r366984 [4] whiz by, that added better error messages for dialogs. -Rahul [1] http://issues.apache.org/bugzilla/show_bug.cgi?id=35066 [2] http://issues.apache.org/bugzilla/show_bug.cgi?id=37120 [3] http://issues.apache.org/bugzilla/show_bug.cgi?id=37571 [4] http://svn.apache.org/viewcvs?rev=366984&view=rev > > > > -Rahul > > Once again thank you for your time and patience! > Geeta > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Shale] getting my first dialog to work with Shale/MyFaces
On 1/6/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Actually I found that dialog-config.xml had an xml error so I guess it was > silently not loaded. So I fixed it and now the Cancel works (yeahh!!) so I > think at least I have gotten "into the dialog..:) My "Search" still throws > a nasty error, but I guess I shall struggle with that awhile before I give > up and ask you again..(:( > Possibly rethink the corresponding outbound transition from the SearchHome view state (separate the search and results views). -Rahul > > Thank you again for your time, > Geeta > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: tabs is struts
On 12/24/05, Martin Gainty <[EMAIL PROTECTED]> wrote: > You can use > > page is file which contains the JSP logic > flush sends the current page output before included file > > c:import to include local and remote rewrite tasks > c:url for URL rewrite URL > http://java.sun.com/developer/technicalArticles/javaserverpages/faster/index.html Indeed. One point I'd like to add is if you *aggregate* content in the tabs from separate static or dynamic sources, you will also need to mitigate potential naming conflicts if that can be an issue (things where this can bite is form submission, AJAX techniques etc.) -Rahul > - Original Message - > From: "Jim Douglas" <[EMAIL PROTECTED]> > To: > Sent: Saturday, December 24, 2005 10:18 AM > Subject: Re: tabs is struts > > > > This is an excelet solution, thank you! > > > > Do you know how can I modify the line "", so > > that it servers up a JSP via STRUTS? > > > > > > > > Foo is cool! > > > > > > > > > > > > > > > > > > Jim > > > > > > > >>From: su mo <[EMAIL PROTECTED]> > >>Reply-To: "Struts Users Mailing List" > >>To: Struts Users Mailing List > >>Subject: Re: tabs is struts > >>Date: Tue, 13 Dec 2005 09:41:51 +0530 > >> > >>Checkout this. Very good one > >> > >>ditchnet.org/taglibs/ > >> > >> - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: text field not populating after validate() fails.
On 12/24/05, Vikrama Sanjeeva <[EMAIL PROTECTED]> wrote: > H, > Rahul: The pull-down menus are prepopulated using the session. For > pull-down menus, I'm using the same approach as Rick used in "LESSON II - 9 > - Create SetUpEmployeeAction". You can see here: > http://www.reumann.net/struts/lesson2/step9.do > OK, my question was about the text fields and textareas that were *not* getting populated after validation failure. But, please see Rick's pointer in the earlier email to this thread. -Rahul - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem in
On 12/24/05, Vikrama Sanjeeva <[EMAIL PROTECTED]> wrote: > Hi, > > Yes, it's working now with . When I click calendar icon (img) > it displays correct. This calendar is in Javascript and has next year, next > month, privious year, previous month buttons. When i click any one of the it > says "page cannot be found: Http 400 error". > Sounds rather like a 404 to me. > Again, it is relative path problem? > I'd say. I don't think we have any details about what the buttons are doing, but this may help as well: http://www.w3.org/TR/REC-html40/struct/links.html#h-12.4 -Rahul P.S.- Didn't Michael have a page on the wiki about this? I'm not good at navigating the Struts wiki in order to find stuff, there are probably some "conventions" I'm not aware of? > Bye, > Viki. > > On 12/23/05, Laurie Harper <[EMAIL PROTECTED]> wrote: > > >> > > >> [1] > > >> > > http://struts.apache.org//struts-doc-1.2.8/userGuide/struts-html.html#base > > >> > > >> - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: NewB: Struts FormFile and Session scope FormBean
On 12/24/05, Kedar Panse <[EMAIL PROTECTED]> wrote: > Thanks, That would work. But still I'll have to have FormFile in to > ActionForm which is not seriliazable. Giving me error > > IOException while loading persisted sessions: java.io.WriteAbortedException: > writing aborted; java.io.NotSerializableException: To use lazy initialization, one tends to declare the corresponding fields transient. And you should also think about using a real persistence layer (being in a servlet container environment). But lets first ask: * Is it the intent to serialize? Why do you want FormFile's to persist? Is this about the server failures/restarts? * Does it matter enough for these use cases? What is the end-user experience that is missing, that you want to achieve? -Rahul > > Kedar > > > On 12/22/05, Laurie Harper <[EMAIL PROTECTED]> wrote: > > > > Kedar Panse wrote: > > > Hello gurus, > > > > > > I want to use a wizard type of flow where in one screen there is File > > > Upload. As this is wizard, i was using session scoped formbean with > > one > > > property formfile. But seems like formfile is not serializable. What > > is > > > proper way of handling this? > > > > Given that a file could be arbitrarily large, is doesn't really make > > sense to store it in the session. I'd suggest saving it to temporary > > disk and replacing the reference in the form bean with the path to the > > temporary file. You can then reload the temp file when your wizard is > > ready to deal with it. > > > > So, in your action when the file upload is received, stream it to a temp > > file, set the form bean property for the uploaded file to null, and set > > another property to the path to the temp file. The form bean should then > > serialize without problem, and you can get at the file later when you > > need to. > > > > L. > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: validation.xml
On 12/22/05, Srinivas Jadcharla <[EMAIL PROTECTED]> wrote: > When it looks validate = true in struts-config.xml and when you form extends > ValidatorForm it looks for validations in Validator.xml this is how Client > Side Validation Works.How Exactly you are implementing Serverside > validations? > Look at Commons Validator: http://jakarta.apache.org/commons/validator/ Server-side bits: http://jakarta.apache.org/commons/validator/apidocs/index.html -Rahul > On 22 Dec 2005 15:21:39 -, rahul kshirsagar <[EMAIL PROTECTED]> > wrote: > > > > Hi, > > > > I am using validation.xml in my application.It takes care of client side > > as well as server side validations.It is working fine.But i dont > > understand how exactly it takes care of both validations. > > > > Regards, > > Rahul. > > > > > > > -- > Thanks & RegardsSrinivas732-648-9421(Cell) > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: text field not populating after validate() fails.
On 12/22/05, Vikrama Sanjeeva <[EMAIL PROTECTED]> wrote: > Actually I'm using a javascript which needs to define form name. And in > struts, when you define form name it is mandatory to define type too. > >I just change the "scope" in struts-config from "request" to "session" > and it is working fine now. But question is, why it is not working with > scope=request? > What is the pre-population mechanism that you mention below? Is it request-sensitive for the controls that don't get pre-populated? -Rahul > Bye, > Viki. > > On 12/22/05, Laurie Harper <[EMAIL PROTECTED]> wrote: > > > > You shouldn't need either name or type, Struts will derive both from the > > configuration. Since you say that's working OK for you, why are you > > trying to add them? > > > > L. > > > > Vikrama Sanjeeva wrote: > > > Hi, > > > > > > I have a form which consists of pull-down menus, radio button, text > > area > > > and text fields. The form takes all the required input fields from user, > > > validate them and if validation fail's, the same form is called with > > > pre-populated values (as entered 1st time by user). This is true when > > there > > > is NO form "name" and "type" is given in form tag. But when I give form > > > "name" and "type" in form tag, only pull-down menus are populated if > > > validation fails. Whereas, text field, text area and radio buttons are > > not > > > pre-poulated. > > > > > > I'm not sure what is going wrong here?? Below is the related code I'm > > > using. > > > > > > / struts-config.xml***/ > > > > > > > > > > > > > > type="com.world.MyActionClass" > > > name="myForm" > > > scope="request" > > > validate="true" > > > input="myForm.jsp" > > > > > > > > > name="success" > > > path="/myHome.jsp"/> > > > > > > > > > / struts-config.xml***/ > > > > > > /START myForm.jsp***/ > > > > > > > > > > > > > > method="post" enctype="multipart/form-data"> > > > > > > Happy > > > > > > > > > Select Country > > > > property="countryName" > > > labelProperty="countryName" /> > > > > > > > > > > > > > > > > > > > > > > > > / END myForm.jsp***/ > > > > > > > > > Bye, > > > Viki. > > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [.do -> JSF/Shale]
On 12/21/05, Garner, Shawn <[EMAIL PROTECTED]> wrote: > Is there a way to call a .do type action in JSF/Shale and have it do some > processing and then that action decides which view to go to? > > My case would be I am use to calling a login.do from another company and we > need to process the information in the post to either go to welcome.jsp or > error.jsp. > > JSF - Standard navigation: Backing beans, method binding expressions, logical outcomes from action attributes. Shale - Dialogs. State charts. The good stuff. -Rahul > > Shawn > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: using c:out with EL replacing bean:write
On 12/19/05, Srini Pillai <[EMAIL PROTECTED]> wrote: > Thanks Rick, for responding quickly. > > >>I'm not sure what you are attempting to do with: > value="${request['FAEditorForm'].id_${counter}}" > Thumb rule: EL expressions that look like this are invalid: ${...${...}...} (unless you have appropriate escapes in place). Replace with (JSP 2.0): Then, the "id" param for your URL is here: ${FAEditorForm.formProperty} And c:url, c:param will make it cleaner as already suggested below. -Rahul > I am trying to access the value from the ActionForm for property > 'id_0', 'id_1' etc... depending on the value of the ${counter}. The > example you had suggested using the 'url' tag will not work for me since > the 'id' parameter will pass the value of the counter but I require the > value in the form for the 'id_?' (where '?' is any number from 0...n) as > mentioned above. Hope I am clear. Really appreciate your help. > > Thanks, > Srini > > >>> [EMAIL PROTECTED] 12/19/2005 10:45 AM >>> > On 12/19/05, Srini Pillai <[EMAIL PROTECTED]> wrote: > > > > > > This is the code I tried to display a link with a value in the > dynamic > > form: > > > > > > . > > ?methodToCall=removeElement&id= > value="${request['FAEditorForm'].id_${counter}}" />">Remove > > . > > > > > struts tags (from what I remember) I don't believe mix that well when > used > within standard html tags. > > I think it'll look cleaner anyway using the c:url tag: > > > > > > Remove > > I'm not sure what you are attempting to do with: > value="${request['FAEditorForm > > > > '].id_${counter}}" > > > but I doubt you need that . You just probably need the id from the > counter, if not you'll have to explain why not and I could try to > help. > > -- > Rick > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: how to customize applicationresources
On 12/16/05, Sony Thomas <[EMAIL PROTECTED]> wrote: > Hi all, > > I want to read my application resources from a database rather than > using properties file. Do I need to extends MessageResoursces class in > order to do this ?? Is there any examples of this or is ther any links > which give some idea, how to do this?? > Take a look at Commons Resources: http://jakarta.apache.org/commons/resources/ Niall recently added a bunch of documentation as well: http://wiki.apache.org/jakarta-commons/ResourcesUserGuideImplementations -Rahul > thanks all > > Sony > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: chinese characters and bean tags
On 12/16/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > [EMAIL PROTECTED] wrote: > >>> make sure that you have the UFT-8 charsett declared in the content type > >>> of the response -- e.g. with <%@ page contentType="text/html; > >>> charset=UTF-8"%> and/or HTML META-tags. > >>> > >>> L. > > So, here the most important part of my JSP code: > > > > test > > > Do you have the JSP page directive set as suggested above? The HTML tags are best considered to be "hints". -Rahul > <% > > /* > * +++ TEST CASE 1 +++ > */ > > // business logic for obtaining all hibernated objects > BOGeneric bo = new BOGeneric(); > List l = bo.find("ChinaText", new Criterion[] {}, new Order[] {}); > pageContext.setAttribute("names", l); > > // runs it throung and prints out all the texts > for (Iterator i=l.iterator(); i.hasNext();) { >out.println(((ChinaText)i.next()).getText() + " : "); > } > %> > > > > - > > > In the first test case I get correct encoded chinese texts. In the second > one I get only strings. > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem with using Logic:equla tag.
On 12/15/05, David Evans <[EMAIL PROTECTED]> wrote: > I am not sure the specifics, but some versions of jsp require you to do > this: > <%@ page isELIgnored="false" %> > and some older version of the jstl don't take EL in the attributes. > > you could test to see if EL is being evaluted by doing this: > > > maybe this will help: > http://jakarta.apache.org/taglibs/doc/standard-doc/intro.html > This may help as well: http://wiki.apache.org/jakarta-taglibs/FrequentlyAskedQuestions -Rahul > dave > > On Fri, 2005-12-16 at 01:15 +0330, Legolas Woodland wrote: > > David Evans wrote: > > > As someone else mentioned, the problem could be the scope of your > > > variable. Another thing to check, are you sure that EL is being > > > evaluated in your page? > > > > > > > > How i can ensure about : does EL evaluate or not ? > > What i have done is : > > I add the JSTL taglib declaration to my jsp file and i do those coding > > that i mentioned. > > if the variable is not in my page scope , how it is shown when i use : > > > > <%=sysvar%> > > > > , can you tell me how i should check the variable scope ? > > if variable is not in the scope , why the Tag does not return exception . > > > > Thank you > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: html:select and submit
On 12/9/05, Frank W. Zammetti <[EMAIL PROTECTED]> wrote: > What are you actually trying to send? The selected value or the index > of the selected item? I also note you have multiple="true"... so you > expect that more than one can be selected? I'm not sure if that has a > bearing on the selectedIndex (I could see where it might), and even if > it does, the handler code wouldn't seem to account for that. > In a multiple , selectName.selectedIndex will always be the index of the *first* selection, if there are one or more (or -1 if there are none). -Rahul > Frank > > Mike Darretta wrote: > > I thought I had licked this problem - but it only works with Firefox! > > > > I have an tag that, when a user selects an option, a > > submit() is forced through a javascript call. > > > > The JSP code is: > > > > >... > > onclick="handleClick(this)"/> > > > > The javascript code: > > > > function handleClick(obj, prefix) { > >var F_Obj = obj.form; > >index = F_Obj.selectedAvailableBeans.selectedIndex; > >... > > > >F_Obj.submit(); > > } > > > > This works fine in Firefox, but with IE, the index value is always -1. > > > > Can anyone help me with the proper way to post the results of a > > selection without requiring the user to depress a select button? > > > > Thanks, > > > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: html:select and submit
On 12/9/05, Mike Darretta <[EMAIL PROTECTED]> wrote: > I thought I had licked this problem - but it only works with Firefox! > > I have an tag that, when a user selects an option, a > submit() is forced through a javascript call. > > The JSP code is: > > ... > onclick="handleClick(this)"/> > This is a well-known issue. While one would hope that the HTML event processing models would be consistent across all browsers, that is hardly the case. While we patiently wait for that to happen, you should trigger the handler with an onchange event, rather than an onclick, whose more explicit semantics will ensure that you have the correct selectedIndex in your Javascript handler. The saving grace here being that even conceptually, when dealing with elements, you are *almost* always interested in changes, not clicks. -Rahul > The javascript code: > > function handleClick(obj, prefix) { >var F_Obj = obj.form; >index = F_Obj.selectedAvailableBeans.selectedIndex; >... > >F_Obj.submit(); > } > > This works fine in Firefox, but with IE, the index value is always -1. > > Can anyone help me with the proper way to post the results of a > selection without requiring the user to depress a select button? > > Thanks, > -- > Mike > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: please give me some directions. - how can i use tabs in struts,
On 12/8/05, Sony Thomas <[EMAIL PROTECTED]> wrote: > Hi , > > i have lot of information to fill in the form. I mean it cannot contain > in one page. so i would like to use tabs in my struts application. how > can i use tabs in struts, please give me a reply. http://ditchnet.org/tabs I haven't used it. -Rahul - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: struts and JSTL
On 12/5/05, fea jabi <[EMAIL PROTECTED]> wrote: > I am using Servlet engine 2.4. What will be the different advice? > > My web.xml looks something like this > PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN" > "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd";> > > > ... > > > > is it right one? > In the forums I am seeing that it should be different one for JSTL 1.1 to > work. > > Where can I get that web.xml from? > http://wiki.apache.org/jakarta-taglibs/FrequentlyAskedQuestions -Rahul - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [FRIDAY] Struts 1.x is Struts Classic after all
On 12/1/05, Don Brown <[EMAIL PROTECTED]> wrote: > Well, considering I started work a couple of hours ago, no, nothing yet :) You mean its going to take you more than two hours? ;-) But seriously, thanks for sharing the paragraph below, thats exactly what I was looking for, a sneak preview of your thoughts about the "compatibility layer". One other question - ti/phase2 is already there, and ti/phase1 comes next? Are we counting down, whats the insight into the nomenclature? -Rahul > I can tell you my approach I thought of today - replace the WebWork > ServletDispatcher with a Common-Chain RequestProcessor then weave in a > command or two that detects what type of action is being called, and > delegates to the appropriate chain. I'm hoping to even use Struts Action > 1.3 as a dependency at first, so you have 100% Struts 1.x functionality, yet > you can start migrating sections to Struts Ti (WebWork) as you have time. > > The Struts Ti repository is here: > http://svn.apache.org/viewcvs.cgi/struts/sandbox/trunk/ti/ I'll be adding a > phase1 directory with the code. > > If you are interested in Struts Ti, I'd highly recommend pulling down > WebWork and giving it a spin. You could also swing by your local bookstore > and thumb through the excellent WebWork in Action book from Manning :) > > Don > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [FRIDAY] Struts 1.x is Struts Classic after all
On 12/1/05, Don Brown <[EMAIL PROTECTED]> wrote: > I just started working > on the Struts Action 1.x compatibility layer tonight so its too > early to say, On 12/1/05, Ted Husted <[EMAIL PROTECTED]> wrote: > Meanwhile, I'm working on a set of "rosetta > applications" that show how well-known Struts applications look > as best-practice WebWork applications. Don, Ted - Any of this in sandbox yet? Where should I be looking? Trying to line up some weekend reading ... -Rahul - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JSTL messages problem
On 11/22/05, Laurie Harper <[EMAIL PROTECTED]> wrote: > For the record, here's the general solution as well, for situations > where you can't use the element body like that. First, defining a > scripting variable: > > http://marc.theaimsgroup.com/?l=struts-user&m=113269509808314&w=2 -Rahul > > > Or, to avoid the scripting variable, you can use jsp:attribute: > > > > > > > > This comes up on the list so often, I think I'll add an FAQ page to the > wiki :-) > > L. > > Ed Griebel wrote: > > I use this idiom all the time to get a message label on a button: > > > > > > > > > > You should be able to substitute above. > > > > -ed > > > > > > On 11/22/05, Wendy Smoak <[EMAIL PROTECTED]> wrote: > > > >>On 11/22/05, Frank W. Zammetti <[EMAIL PROTECTED]> wrote: > >> > >>>Ok, today is apparently the day I get to ask a bunch of stupid questions... > >>> > >>>Why doesn't this work? > >>> > >>>" /> > >> > >>You can't use a JSP tag as attribute of another JSP tag. > >> > >>Maybe try with the fmt in the body, then use an expression for > >>the value of ? Which implies the use of the Struts-EL > >>taglib, which you should be using if you're on Servlet 2.3/JSTL 1.0. > >> > >>If you haven't already, change the URI in <%@ taglib> and leave the > >>prefix as 'html'. > >> > >>-- > >>Wendy > >> - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JSTL messages problem
On 11/22/05, Garner, Shawn <[EMAIL PROTECTED]> wrote: > It might also work to do this: > > > > Sometimes double quotes inside double quotes confuses the compiler. > If you put single quotes inside the double quotes it might be able to better > determine your meaning. > I wouldn't recommend that. I suspect the only thing we might end up confusing is ourselves ;-) -Rahul > Shawn > > -Original Message- > From: Frank W. Zammetti [mailto:[EMAIL PROTECTED] > Sent: Tuesday, November 22, 2005 2:43 PM > To: Struts Users Mailing List > Cc: Struts Users Mailing List > Subject: Re: JSTL messages problem > > Ok, today is apparently the day I get to ask a bunch of stupid questions... > > Why doesn't this work? > > " /> > > I get... > > org.apache.jasper.JasperException: /index.jsp(36,83) equal symbol expected > > ...when I try it. doesn't work either... it's obviously a > problem with embedding one taq in another, so I guess my quesion really is > how does one label a submit button with a message from a bundle in > general? I've done this in the past, but I've never tried it from within > an , always a plain HTML element, so it wasn't a > nested custom tag. Thanks! > > -- > Frank W. Zammetti > Founder and Chief Software Architect > Omnytex Technologies > http://www.omnytex.com > AIM: fzammetti > Yahoo: fzammetti > MSN: [EMAIL PROTECTED] > > On Tue, November 22, 2005 3:27 pm, Wendy Smoak said: > > On 11/22/05, Frank W. Zammetti <[EMAIL PROTECTED]> wrote: > > > >> I added this but it still didn't work... One thing that didn't make > >> sense > >> to me is that I have app_resources_en.properties in WEB-INF/classes, so > >> I > >> wasn't sure how to qualify that in a package structure, so I just put > >> app_resources.properties... is that right or > >> am > >> I misunderstanding something? Thanks again! > > > > Leave off the '.properties' in the . Other than that, yes. > > > > -- > > Wendy > > http://wiki.wsmoak.net/cgi-bin/wiki.pl?StrutsMessagesAndJSTL - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JSTL messages problem
On 11/22/05, Wendy Smoak <[EMAIL PROTECTED]> wrote: > On 11/22/05, Rahul Akolkar <[EMAIL PROTECTED]> wrote: > > On 11/22/05, Nick Sophinos <[EMAIL PROTECTED]> wrote: > > > This is definitely not how JSTL recommends loading bundles (see > > fmt:bundle and fmt:setBundle). Ofcourse, its your decision. > > Can you explain more about this? Ofcourse. I think Frank also asked a similar question, though the top posting in that email might have thrown me off. > I'm also using the context > parameter, and I only have the one .properties file, the app has no > need for i18n. > It boils down to what a technology *expects* the casual users to know. The param-name is merely an implementation detail (though the spec talks about it so its guaranteed to be the same name in all JSTL impls). Its similar to the casual user not needing to know that a Struts module is "loaded" under the attribute name Globals.MODULE_KEY + prefix. In addition, as you've noted, this approach mandates the app use a single basename bundle. > It looks like fmt:setBundle would be done on each page, so I'm not > sure what I'd gain from it. > Why on every page? -Rahul > Thanks, > -- > Wendy > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JSTL messages problem
On 11/22/05, Wendy Smoak <[EMAIL PROTECTED]> wrote: > On 11/22/05, Frank W. Zammetti <[EMAIL PROTECTED]> wrote: > > Ok, today is apparently the day I get to ask a bunch of stupid questions... > > > > Why doesn't this work? > > > > " /> > > You can't use a JSP tag as attribute of another JSP tag. > > Maybe try with the fmt in the body, then use an expression for > the value of ? fmt:message has a var/scope tuple for this purpose. -Rahul >Which implies the use of the Struts-EL > taglib, which you should be using if you're on Servlet 2.3/JSTL 1.0. > > If you haven't already, change the URI in <%@ taglib> and leave the > prefix as 'html'. > > -- > Wendy > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JSTL messages problem
On 11/22/05, Nick Sophinos <[EMAIL PROTECTED]> wrote: > Place this in your web.xml file: > > > javax.servlet.jsp.jstl.fmt.localizationContext > com.omnytext.blah.blah.properties.ApplicationResources > > > > Where ApplicationResources.properties is the name of the message bundle in > question. > This is definitely not how JSTL recommends loading bundles (see fmt:bundle and fmt:setBundle). Ofcourse, its your decision. -Rahul > - Nick > > On 11/22/05, Frank W. Zammetti <[EMAIL PROTECTED]> wrote: > > > > Hello... I'm trying to display messages from a bundle using JSTL like so: > > > > > > > > This isn't working, I'm getting: > > > > ???messages.appTitle??? > > > > However, doing: > > > > > > > > Working fine. So I know the key is correct, and the bundle is being read, > > etc. I admit I haven't done much with JSTL, but this seems pretty simple. > > Do I need to do any other kind of setup to tell the JSTL tags about the > > bundle? Thanks! > > > > -- > > Frank W. Zammetti > > Founder and Chief Software Architect > > Omnytex Technologies > > http://www.omnytex.com > > AIM: fzammetti > > Yahoo: fzammetti > > MSN: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: bean:define errors in eclipse 3.1.1 WTP
On 11/21/05, Garner, Shawn <[EMAIL PROTECTED]> wrote: > I try to edit my JSP in Eclipse 3.1.1 WTP (Web Tools Project) however I get > errors on variables defined by ID tags for example: > > > > > > > <%=(myValue1 + "-" myValue2)%> > > > > The above snip of code will result in Eclipse telling me that "myValue1 > cannot be resolved" and "myValue2 cannot be resolved". > > However the page compiles fine and works fine in the web application. > Does anyone know how to avoid getting these error messages while still > getting other JSP errors? > > It's a nice tool but I get tired of all the errors that aren't errors. I > tried opening a bug on Eclipse WTP Bugzilla but they listed as fixed and it > is not as far as I could tell. I tried emailing the person who fixed it but > they never responded. > I'd be interested in knowing how they fixed it, in case you ever find out. This seems to be a tough one for tooling, unless it identifies Struts taglibs individually and incorporates exceptions to the markup validators hooked to the JSP editor. Another thread running in parallel [1] clarifies the reason why this may get tricky for the tooling stack. -Rahul [1] http://marc.theaimsgroup.com/?l=struts-user&m=113256415823693&w=2 > Any help? > > Shawn > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: getInitParameter struts TC5
On 11/21/05, Chris Pat <[EMAIL PROTECTED]> wrote: > Hello > What is the correct syntax in the struts-config.xml > and the syntax in the Action, to establish/retreive an > default parameter for the default application. I have > tried: > web.xml > >totalSamples >3 > > > action > String textNum =totalSamples = > servlet.getInitParameter("totalSamples"); > ServletContext#getInitParameter(String) -Rahul > What is the correct way? tia. > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: What's wrong
On 11/21/05, Fulgencio Comendeiro, Eduardo <[EMAIL PROTECTED]> wrote: > <% > { > java.util.ArrayList list = new java.util.ArrayList(); > list.add("textouno.texto1"); > list.add("textouno.texto2"); > list.add("textouno.texto3"); > list.add("textouno.texto4"); > pageContext.setAttribute("list", list, PageContext.PAGE_SCOPE); > } > %> Artificial scope might be unnecessary. > jsp:useBean is moot, given the scriptlet. > contenido. > > value="" > > > > The result must be : > > JSTL? Along the lines of (JSP 2.0 variant) ... -Rahul - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT]AW: AW: STRUTS PHP
On 11/19/05, Jim Douglas <[EMAIL PROTECTED]> wrote: > That was so simple there's no need to post. > Cool, thanks for letting us know ;-) -Rahul > Thanks, > Jim > > > >From: "Jim Douglas" <[EMAIL PROTECTED]> > >Reply-To: "Struts Users Mailing List" > >To: [EMAIL PROTECTED], user@struts.apache.org > >Subject: RE: [OT]AW: AW: STRUTS PHP > >Date: Thu, 17 Nov 2005 03:08:34 + > > > > > >Thanks for the reply, if I get it working the weekend I post how I did it. > > > >Jim > > > > > >>From: "Martin Kindler" <[EMAIL PROTECTED]> > >>Reply-To: <[EMAIL PROTECTED]> > >>To: "'Struts Users Mailing List'" > >>Subject: [OT]AW: AW: STRUTS PHP > >>Date: Wed, 16 Nov 2005 16:44:56 +0100 > >> > >>You are right: This is off-topic! > >> > >>For me the seems to be exactly what I need. Thanks for the tip. > >> > >>Martin > >> > >> > -Ursprüngliche Nachricht- > >> > Von: Rahul Akolkar [mailto:[EMAIL PROTECTED] > >> > Gesendet: Mittwoch, 16. November 2005 16:31 > >> > An: Struts Users Mailing List > >> > Betreff: Re: AW: STRUTS PHP > >> > > >> > > >> > On 11/16/05, Martin Kindler <[EMAIL PROTECTED]> wrote: > >> > > I googled a bit for a taglib providing a tag to include any > >> > > http-sources in my jsp-pages (as you know I want to include > >> > > PHP-generated pages) and found the Jakarta IO-taglib > >> > > (http://jakarta.apache.org/taglibs/doc/io-doc/intro.html). > >> > > > >> > > I have not had the time to experiment with it, but it looks > >> > promising. > >> > > The doc says "The can be used to make 'server side > >> > > include' style calls to any web server anywhere for any resource" > >> > > which seems to what you (and I need). > >> > > >> > > >> > If is the only tag in the IO taglib for your > >> > need, you should look at JSTL core's import . > >> > Unless you get into XML-RPC and SOAP, which doesn't seem to > >> > be a requirement of this thread so far. > >> > > >> > > >> > > > >> > > Can someone on this list comment about it? > >> > > > >> > > >> > > >> > Maybe this is better asked on taglibs-user AT > >> > jakarta.apache.org, though I'm not sure how active the IO > >> > taglib is. To my part, I will correct the couple of typos I > >> > noticed on the documentation page [1], in a day or two. > >> > > >> > -Rahul > >> > > >> > [1] http://jakarta.apache.org/taglibs/doc/io-doc/index.html > >> > > >> > > >> > > Martin > >> > > > >> > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JSP 2.0 and taglibs (was Custom tags referencing struts tags)
Two email responses consolidated in one below: On 11/19/05, Craig McClanahan <[EMAIL PROTECTED]> wrote: > On 11/19/05, Laurie Harper <[EMAIL PROTECTED]> wrote: > > > > Rahul Akolkar wrote: > > > Yes, that was more of a post-33064 comment. > > > > > > Getting the the Struts tags to be 2.0-ready is something I'd be > > > interested in too. Given the origin of those tags way before 2.0, > > > backward compatibility issues will take precedence. I wonder if > > > there's a better way. > > > > Yeah, backwards compatibility dictates that we introduce any change in > > behaviour as a configurable option somehow -- possibly with a 'this will > > become the default behaviour in the next release' type warning. > > > > If you have any ideas on 'a better way' I'd love to hear them. One > > possibility would be to refactor the tags so that we can produce a set > > of JSP 2.0 tag files and have the tags and tag fils share a common > > implementation class. Actually, that might be a better way to go than > > what I've been working on in 33064! > > > If you guys are *really* serious about this kind of rewrite, a better > approach might just be to create a completely new alternative library with > its own URI, based on SimpleTag (JSP 2.0) instead of Tag, with a deliberate > goal of making the implementation classes extensible in the required manner. > That way, strict backwards compatibility wouldn't be required (although > you'd have to continue to maintain the old set for existing apps of course). > Oh, I'm serious, I wouldn't just lob it out there. I'm not even thinking about SimpleTag vs. Tag, that bit I'm not necessarily fascinated by. I'm thinking what Struts tags gain by moving beyond 33064, and what is needed today to make that happen. To that end, I'm willing to devote some of my spare time if there is consensus about the approach. I'm thinking about the unification of the programming model for authoring and instantiation of JSP tags, something that JSP 2.0 doesn't receive enough credit for, IMO. There is really nothing at the technology level that holds us back today for *easily* enabling Struts tags to be aggregated together and composed into reusable chunks of larger functionality. If 90% of the login screen's today look the same, give and take a stylesheet, one should be able to easily create a reusable asset: that contains one , one , one and a with other view layer frills, which may further allow packaging that tag implementation, a stub for an ActionForm, an Action and other helpers as necessary, with the struts-config bits and beyond that, create libraries of such "components" for different verticals. I'm not saying composition is trivial -- configuration of composites, the correct granularity of assets etc. -- are all mitigating factors. But, it should be possible to do this without copying rendering code or playing container. Lets just use the composability that JSP 2.0 gives us at the .tag file level by getting the Struts tags to co-operate. This is a step towards pure JSP based reusable "asset libraries" or "view layer frameworks" that use vanilla Struts (an example of that is [1]). > > On the other hand, lots of the things you might want to do with new tags can > already be done with JSF components, even in a Struts based app (with the > struts-faces library :-). > While I indeed agree, and I've been spending some of my "play" time in JSF and Shale land, this really was a statement about vanilla Struts, and those who want to use vanilla Struts. IMO, its about Struts evolving hand-in-hand with JSP technology. Every n days, we get a post from someone saying how a given unit of work was done in lesser time using some other technology of choice. This opens up a new dimension of reuse for Struts applications, and therefore, has potential to decrease development time and effort. That alone, in my mind, is quite a laudable goal. > > Craig > > On 11/19/05, Laurie Harper <[EMAIL PROTECTED]> wrote: > > I'm not sure that a rewrite delivers enough benefit to justify having > two parallel implementations to maintain -- especially since these > taglibs don't get a lot of maintenance anyway... > > > On the other hand, lots of the things you might want to do with new tags can > > already be done with JSF components, even in a Struts based app (with the > > struts-faces library :-). > > Yeah, I'm beginning to see that ;-) Hey now, don't go astray on me like that ;-) Anyway, I plan on coming back to this bug report after the long weekend, lets see what the options are. -Rahul [1] http://jakarta.apache.org/taglibs/doc/rdc-doc/intro.html > > L. > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Custom tags referencing struts tags
On 11/18/05, Laurie Harper <[EMAIL PROTECTED]> wrote: > Rahul Akolkar wrote: > >>It's a bit messy; the functionality the tags encapsulate isn't exposed > >>in a way you can access directly. A cleaner alternative if you're using > >>JSP 2.0 is to use a tag file, which can then just contain standard JSP > >>to select and invoke the appropriate delegate tag. There are some issues > >>with doing this currently, which I have a work-in-progress solution to > >>(see http://issues.apache.org/bugzilla/show_bug.cgi?id=33064 for details). > >> > > > > > > > > Tag files are a serious option. For example, see composition here [1]. > > > > Whatever you do, don't play container. I assure you, you have better > > things to do ;-) > > Ah, you haven't seen how ugly it can get wrapping the Struts Html tags > in tag files... ;-) > > It's definately the way to go for this kind of thing, we just need to > clean up #33064 to make it viable. > Yes, that was more of a post-33064 comment. Getting the the Struts tags to be 2.0-ready is something I'd be interested in too. Given the origin of those tags way before 2.0, backward compatibility issues will take precedence. I wonder if there's a better way. -Rahul > L. > > > > > -Rahul > > > > [1] > > http://wiki.apache.org/jakarta-taglibs/ReusableDialogComponents/Tutorials/Composition > > > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to find the version number of the struts installation?
On 11/19/05, Raghu Kanchustambham <[EMAIL PROTECTED]> wrote: > If I need to find the version of jdk .. i would use something like java > --version. > How would I know which version of struts jar are there on my machine? Any > suggestions of easily & reliably finding it ? Look at the MANIFEST in /META-INF. -Rahul > Thanks. > Raghu > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to find length of a string in a bean
On 11/18/05, rahul <[EMAIL PROTECTED]> wrote: > Hi All, > > I have got a bean in my session scope. I want to find the length of a string > which is a member variable of that bean. > Try JSTL fn:length(). -Rahul > I tried but this works only with collection. > > Any help? > > > --RahulJoshi > > > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Custom tags referencing struts tags
On 11/17/05, Laurie Harper <[EMAIL PROTECTED]> wrote: > Craig McClanahan wrote: > > On 11/17/05, David Whipple <[EMAIL PROTECTED]> wrote: > > > >> > >>I would like to be able to create a custom tag which is able to use the > >>struts , or fields. I am not able > >>to find a way to create a tag library that can produce/call/reference > >>other > >>tags. > It's a bit messy; the functionality the tags encapsulate isn't exposed > in a way you can access directly. A cleaner alternative if you're using > JSP 2.0 is to use a tag file, which can then just contain standard JSP > to select and invoke the appropriate delegate tag. There are some issues > with doing this currently, which I have a work-in-progress solution to > (see http://issues.apache.org/bugzilla/show_bug.cgi?id=33064 for details). > Tag files are a serious option. For example, see composition here [1]. Whatever you do, don't play container. I assure you, you have better things to do ;-) -Rahul [1] http://wiki.apache.org/jakarta-taglibs/ReusableDialogComponents/Tutorials/Composition > > I have searched everything I can think of and can't seem to find anything > > > >>that can allow this. > >> > >>Does anyone know a way to approach this? > >> > >>Thanks, > >>Dave > > > > Craig > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Help required with struts for dynamic row addition in jsp
One does wish that every UI technology had the XForms concept of repeat [1] -Rahul [1] http://www.w3.org/TR/xforms/slice9.html#id2632123 On 11/16/05, Michael Jouravlev <[EMAIL PROTECTED]> wrote: > This is an older simpler version: http://superinterface.com/rdapp/viewList.do > And source code for it: http://superinterface.com/files/prgpattern.zip > > This is a newer version: > http://www.superinterface.com/strutsdialog/crudactionlite.do > Source code for it is in the main download for Struts Dialogs library: > http://struts.sourceforge.net/strutsdialogs > You can read about how it works here: > http://struts.sourceforge.net/strutsdialogs/crudaction.html > > Also you may try MailReader rewritten with Struts Dialogs library: > http://www.superinterface.com/mailreader/Home.do Log in as > "user"/"pass" or register and then log in. Then select "Manage > subscriptions", you will see a similar pageable table with > add/edit/delete features. > The source code is in strutsdialogs-mailreader.war in dialogs-1.23 > release, you can get it here: > https://sourceforge.net/project/showfiles.php?group_id=49385&package_id=154597 > The documentation is here: > http://struts.sourceforge.net/strutsdialogs/mailreader-walkingtour.html > This is the page that might interest you most: > http://struts.sourceforge.net/strutsdialogs/mailreader-subscriptions.html > > Michael. > > -- > Struts Dialogs: code-behind for Struts > http://struts.sourceforge.net/strutsdialogs > > On 11/15/05, Simpy Ahuja <[EMAIL PROTECTED]> wrote: > > Hi Michael! > > thanks so much for replying and giving a wonderful examplei would need > > to add a set of blank rows to the form on clicking on add button and should > > be able to edit the previuos entries as well. Can i get a code for that? > > thanks a ton ! > > Simpy > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tag html:text
On 11/16/05, Niall Pemberton <[EMAIL PROTECTED]> wrote: > I agree, the BaseHandlerTag has all the code required for "onselect", but > none of the tags define it as an attribute in the TLD. As it is part of the > HTML 4 spec, it looks like an oversight to me. Please file a bug report for > this. > Thomas already did, as 37527 [1]. -Rahul [1] http://issues.apache.org/bugzilla/show_bug.cgi?id=37527 > http://issues.apache.org/bugzilla/ > > thanks. > > Niall > > - Original Message - > From: "Thomas Colin de Verdière" <[EMAIL PROTECTED]> > Sent: Wednesday, November 16, 2005 10:45 AM > > > > Hello, > > I think the attribute onselect is missing on tag html:text. Struts 1.2.7 > > (and Struts 1.2.8) > > Is this an issue ? > > I put in the tld the new attribute and it works. Should i submit an issue > ? > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: No getter method servlet Exception. using DynaActionForm
On 11/16/05, fea jabi <[EMAIL PROTECTED]> wrote: > I have right ones but still getting the same error. > > DynaActionForm properties need to be accessed in JSPs via the internal Map. 36794 [1] is probably good related reading. -Rahul [1] http://issues.apache.org/bugzilla/show_bug.cgi?id=36794 > >From: [EMAIL PROTECTED] > >Reply-To: "Struts Users Mailing List" > >To: "Struts Users Mailing List" > >CC: user@struts.apache.org > >Subject: Re: No getter method servlet Exception. using DynaActionForm > >Date: Wed, 16 Nov 2005 16:19:18 +0100 > > > > > >Hi, > > > > I'm not sure, but I think you have several mistakes... > > > > First, You have put "CustForm" in the property name of the form, but > >in the property name of the action you have put "SetupForm" and in the > >class you have put "CustForm" again > > > > In the jsp you have put " >="post">" I think the correct would be > >" > > > Not sure if that is the problem, but... > > > > > > > > > > "fea jabi" > > <[EMAIL PROTECTED]To: > >user@struts.apache.org > > m> cc: > >bcc: > > 16/11/2005 15:52 Subject: No getter method > >servlet Exception. using DynaActionForm > > Please respond to > > "Struts Users > > Mailing List" > > > > > > > > > > > > > > > > > > > >I am trying to use the DynaActionForm. > > > > > name="CustForm" > > type="org.apache.struts.action.DynaActionForm" dynamic="true"> > > > > > > > > >initial="true"/> > > > > > > > path="/PrepareCustAction" > > type="com.actions.PrepareCustAction" > > name="SetupForm" > > scope="session" > > validate="false" > > input="/pages/Setup.jsp"> > > > > > > > > > > > >public class PrepareCustAction extends Action { > > > > public ActionForward execute(ActionMapping mapping, > >ActionForm form, > >HttpServletRequest request, > >HttpServletResponse response) > >throws ServletException, IOException{ > > DynaActionForm setupForm = (DynaActionForm) form; > > > > ModuleConfig moduleConfig = RequestUtils.getModuleConfig(request, > >getServlet().getServletContext()); > > FormBeanConfig formConfig = > >moduleConfig.findFormBeanConfig("CustForm"); > > DynaActionFormClass dynaClass = > >DynaActionFormClass.createDynaActionFormClass(formConfig); > > > > try { > > setupForm = (DynaActionForm)dynaClass.newInstance(); > > } > > catch (Exception e) { > > //logger.error(e); > > } > > > > > > return mapping.findForward("success"); > > } > > > > > > > >.. > >... > > > > > > > > >key="colon"/> > > > > > > >styleClass="invisibleInput" readonly="true" tabindex="-1"/> > > > > > > > > > > > > > > >key="colon"/> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >key="colon"/> > > > > > > > > > > > > > >. > >... > > > > > >I am just trying to launch the jsp. Later would like to prepopulate the > >formbean too. > > > >But when when trying to lauch the jsp getting the below error > > > > > >javax.servlet.ServletException: No getter method for property custName of > >bean org.apache.struts.taglib.html.BEAN > > > >org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:846) > > > > > >org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:779) > > > > > >what am I missing? > > > >Thanks. > > > >_ > >Express yourself instantly with MSN Messenger! Download today - it's FREE! > >http://messenger.msn.click-url.com/go/onm002004
Re: Is Struts supports indexed property like itemForSale[1].lineDetail[4].selected ... I searched but haven't found how?
On 11/16/05, David Gagnon <[EMAIL PROTECTED]> wrote: > Hi all, > > Sorry for this question that I tought trivial . but I haven't found my > answer in the list . .so I ask you. > > property="itemForSale" id="itemForSale" indexId="ctr" > >property="lineDetail" id="lineDetail" indexId="ctr2"> > property="selected" indexed="true" /> > > > > > The code over gives: > > class="contentBaseInlinedText" type="checkbox"> > > > But I would like > > name="lineDetail[0].selected" value="on" class="contentBaseInlinedText" > type="checkbox"> > Try the nested tags [1]. -Rahul [1] http://struts.apache.org/struts-taglib/tagreference-struts-nested.html > > I guess struts don't support that... If yes is there a way I would be > able to validate it? > > Thanks for your help!!! > > /David > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tag html:text
On 11/16/05, Thomas Colin de Verdière <[EMAIL PROTECTED]> wrote: > Hello, > I think the attribute onselect is missing on tag html:text. Struts 1.2.7 > (and Struts 1.2.8) > Is this an issue ? > I put in the tld the new attribute and it works. Should i submit an issue ? The Struts HTML taglib, in certain cases, does not expose all attributes to the HTML element counterpart. Whether you wish to file a report for this is upto you, its always a good idea to read comments on similar issues in bugzilla first [1]. I should point to the specific discussions, sorry. -Rahul [1] http://issues.apache.org/bugzilla/ > > Thomas de Verdière > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: AW: STRUTS PHP
On 11/16/05, Martin Kindler <[EMAIL PROTECTED]> wrote: > I googled a bit for a taglib providing a tag to include any http-sources in > my jsp-pages (as you know I want to include > PHP-generated pages) and found the Jakarta IO-taglib > (http://jakarta.apache.org/taglibs/doc/io-doc/intro.html). > > I have not had the time to experiment with it, but it looks promising. > The doc says "The can be used to make 'server side include' > style calls to any web server anywhere for any resource" which seems to what > you (and I need). If is the only tag in the IO taglib for your need, you should look at JSTL core's import . Unless you get into XML-RPC and SOAP, which doesn't seem to be a requirement of this thread so far. > > Can someone on this list comment about it? > Maybe this is better asked on taglibs-user AT jakarta.apache.org, though I'm not sure how active the IO taglib is. To my part, I will correct the couple of typos I noticed on the documentation page [1], in a day or two. -Rahul [1] http://jakarta.apache.org/taglibs/doc/io-doc/index.html > Martin > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Newbie help with Struts idiom: functional if/else tags
On 11/15/05, Mark S Petrovic <[EMAIL PROTECTED]> wrote: > I know I'll look back on this learning curve with a head-slapping > recollection, but until then, for posterity: > > 1. If I remove the taglib directive in the JSP, the various tags > are copied directly into the html output, with the browser doing its > best to just ignore them. The plaintext tag body content is actually > rendered, again, the result of the browser doing its best with what it > considers unknown markup. > > 2. When I put the taglib directive back in, the JSP compiles and > subsequently does something with the tag directives, as the tags are > no longer copied into the resultant html and the default > always seems to execute. Nor do I receive any exception output in the > browser or in the catalina.out logfile. > > Whatever is misconfigured in my app is not a completely fatal situation: > I just can't get at the scripting variables to do meaningful operations > on them. > Match JSTL to Servlet/JSP spec. You're using JSTL 1.1, and I suspect you don't have a Servlet 2.4 web.xml. Some details are here [1]. -Rahul [1] http://wiki.apache.org/jakarta-taglibs/FrequentlyAskedQuestions - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [shale] any installation guide and tutorial?
On 11/15/05, pc leung <[EMAIL PROTECTED]> wrote: > I'd like to give it try. But in the documentation web page of shale, > there is no installation guide. I do not know how to install it. It > contains api only. Any installation guide or tutorial of using shale > with myfaces? > > Moreover, in the shale-framework, it has a struts-shale-usecases.war. > I put it in tomcat webapps. It explodes as it should be. I use that as a benchmark Shale webapp example. As with many web technologies, the "installation" is a matter of having the appropriate archives in the application classpath, with a couple of changes to the web application descriptor, and additional configuration files (such as clay-config's or dialig-config's depending on what features you're using). I find my way around by looking at the usecases war. Ofcourse, I don't mean to undermine the utility of detailed guides or tutorials, I think your observations are valid. > To my > surprise, I find many files with jsp extensions such validator, > subviews, profile, lookup,... > I wonder if JSF file does not need to have .jsf as file extension? > In fact the DEFAULT_SUFFIX for faces ViewHandler's is .jsp. Some containers require additional configuration to process .jsf files as .jsp, so this tends to work well. -Rahul - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [shale]
On 11/14/05, Garner, Shawn <[EMAIL PROTECTED]> wrote: > Does anyone know if shale will run on JRun 4? They say that they are J2EE > 1.3 compatible. > As listed in the Foundation section of the Shale home page [1], the sample applications are configured for J2EE 1.4, but you should be able to get Shale going on J2EE 1.3 with the changes listed (I haven't tried). If you get around to doing that, it'll be nice if you ping this thread and let the rest of us know how it went, just as another data point. -Rahul [1] http://struts.apache.org/shale/index.html > > > Shawn > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Lists within lists issue
On 11/9/05, Michael Jouravlev <[EMAIL PROTECTED]> wrote: > On 11/9/05, Rick Reumann <[EMAIL PROTECTED]> wrote: > > Michael Jouravlev wrote the following on 11/8/2005 7:15 PM: > > > > >> > >> property="someObject[${aProp.someIndex}].subobject[${bProp.someIndex}].someField"/> > > > > > Any idea how to simplify input using JSTL 1.1 (JSP 2.0) only? > > > > Well, that would be pretty much impossible without writing a tag to do > > it (since as it stands how could JSP or JSTL have any idea what your > > nested property names are?). > > Hmm, I can build proper name right as HTML tag. I think I can omit > using Struts nested tags, and use JSTL only + BeanUtil.populate(), of > course: > Sure. It seems you don't have a nested list below, which makes it cleaner than the previous example. Incidently, since you're on JSP 2.0, you can improve readability by using expressions in template text, IMO. -Rahul > > > > > >name="lines[].quantity" >value="" >size="3"> > > > > > Not pretty... I have to use "map" and I have to use "lines" in input > element, since "lines" is a property of a dynabean. But works. > > Can I use an ArrayList or Map instead of plain array? I guess not > since BeanUtils does not understand them, according to docs. > > Michael. > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Lists within lists issue
On 11/9/05, Rick Reumann <[EMAIL PROTECTED]> wrote: > Michael Jouravlev wrote the following on 11/8/2005 7:15 PM: > > >> >> property="someObject[${aProp.someIndex}].subobject[${bProp.someIndex}].someField"/> > > > Any idea how to simplify input using JSTL 1.1 (JSP 2.0) only? > > Well, that would be pretty much impossible without writing a tag to do > it (since as it stands how could JSP or JSTL have any idea what your > nested property names are?). If you did make a tag to do it you would > end up with is something similar to the nested tag:) I think a generic > "nestedGeneric" tag would be nice which acts like the nested tag but is > used to just output the correctly structured name property for nested > elements. > Indeed, nested tags work cleaner because they already understand the contracts between the names on the HTML controls and the form bean population mechanism used by Struts. This give and take is a very frameworky thing, and also the reason why the Struts documentation recommends JSTL replacements for specific tags within specific Struts taglibs (one can go beyond that, with a pain threshold to match). Rick - If you are taking suggestions about your code snippets, which offer a nice comparison for nested lists, maybe they'd be better off without the Struts HTML tags? ... since: * The HTML tags in that usecase are simple enough to write out as HTML markup, so this: can become this: * Doing so will remove all Struts taglibs from that snippet, not just the nested one (with the assumption that if someone's trying to avoid one, they're probably trying to avoid all). -Rahul > -- > Rick > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] Web application context case
On 11/9/05, Garner, Shawn <[EMAIL PROTECTED]> wrote: > It isn't from a link necessarily. > Usually it is because somebody typed it in instead of using the link we > provided. > Usually they have caps on or they somehow capitalize one letter. > I'd like to catch the people that are doing this and have them get the right > page. The task of emulating the kind of case insentivity you are talking about can be fairly easily handled at the webserver. Since you mentioned you're using IIS, maybe you can try URLSpellCheck for IIS (I haven't used it)? [1] And, ofcourse, if you move to Apache, mod_speling [2] (with a single l for added humor) has been around for ages. -Rahul [1] http://www.port80software.com/products/urlspellcheck/ [2] http://httpd.apache.org/docs/2.0/mod/mod_speling.html > > Shawn D. Garner > -Original Message- > From: news [mailto:[EMAIL PROTECTED] On Behalf Of Laurie Harper > Sent: Wednesday, November 09, 2005 5:31 PM > To: user@struts.apache.org > Subject: Re: [OT] Web application context case > > Garner, Shawn wrote: > > I have a struts webapp on JRun tied to IIS. > > > > Anyway our application's context root is all lowercase for example /webapp > > > > But the stats for our site in the IIS logs say we're getting 404 page not > > found errors for the same context only with different case variations. > > > > So for /WEBAPP, /WebApp for example they get a 404 page not found. > > > > I tried to google this but was unable to find anything on cases and > context > > root. > > > > Anyone know how I can get my webapp to catch the other variations of > > lower/upper case letters? > > URLs are case sensitive so, short of deploying your web application > multiple times, you can't. You'll need to identify where these incorrect > requests originate, and fix any broken links. > > L. > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: barfs if it's parameter is null
On 11/7/05, Mon Cab <[EMAIL PROTECTED]> wrote: > Hi all... > > I.e any way of using the tag less > strictly, so that value="bla"> will not cause an exception if var is > null. At the moment I am getting: Which is as advertised here [ http://struts.apache.org/struts-taglib/tagreference-struts-logic.html ]. Wrap in or use JSTL with JSTL fn:substring in the test. -Rahul > > > javax.servlet.ServletException: Cannot compare null > variable to value signup > > org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:825) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Difference between and JS submit.
On 11/7/05, Scott Piker <[EMAIL PROTECTED]> wrote: > That's because, by design, a javascript submit() call does not invoke > whatever's established as the form's onSubmit action. It's not a struts > thing, it's a javascript/web browser thing. > > In these situations, just call the validation function directly in your > javascript, e.g.: > > function doIt(form) > { >if validateAddressForm(form) >{ >form.submit(); >} > } > If you want to save an additional script tag/function: ... Pointers: What constitues a HTML form submission (and hence triggers the form onsubmit handler)? [ http://www.w3.org/TR/REC-html40/interact/forms.html#h-17.13.3 ] -Rahul > HTH, > - Scott > > > -Original Message- > > From: Jim Reynolds [mailto:[EMAIL PROTECTED] > > Sent: Monday, November 07, 2005 2:49 PM > > To: user@struts.apache.org > > Subject: Difference between and JS submit. > > > > I posted this email a week ago, and received no response, so > > I am going to try again and change my verbage. > > > > Below is a JSP file which uses struts client-side validation. > > The validtion works great when you use either the > > or a normal. This is all good. > > > > Problem is, when you use legal javascript to submit the form, > > the validation does NOT work. Myself and other co-workers > > cannot understand why this is? Does anyone know why? > > > > The JSP file is below, and can easily be run and played with. > > I really was hoping someone had an idea why, because I would > > like to perform the client-side and need to change actions, > > etc. with JS. > > > > Thanks, > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [shale][clay] CSS style classes on substituted elements
On 11/5/05, Gary VanMatre <[EMAIL PROTECTED]> wrote: > > > Note that my original example should probably have been > > > > #{shale:managed-bean-name} > > > > because we're not actually talking about an attribute here. > > > > The issue you raise, of course, is that you're actually trying to replace > > part of the expression itself (rather than the whole thing). But, maybe that > > isn't really necessary? Maybe the evaluaton of the "shale:managed-bean" part > > of the following expression could return the real managed bean *instance*, > > instead of just it's name? Then you'd just use: > > > > set name="action" value="#{shale:managed-bean.saveAction}"/> > > > > on a button component, without needing any textual substitution of the > > expression itself. > > > > Ok, I see what you mean now. That looks good, has some style. > Agreed, I'm afraid I was a little lost in all the @ signs that were previously around, it almost seemed to be another programming model. I see this has the benefit of having the look and feel of EL with a couple of implicit maps to refer to Shale managed beans and attributes. Feels like home. > > For the class substitution case that conditionally sets styleClass only if > > class is actually specified, either the element would need to be smart > > about knowing whether there was really a value there, or we could do a "set > > if" operation that only performed the set if the expression evaluated to > > something other than null or empty string: > > > > > > > > where the expression would evaluate the value of the "class" attribute, if > > it exists, and perform the set only if a non-null non-empty-string value was > > returned by evaluating the expression. > > > > That's a interesting idea. Or, we might be able to use a new "bindingType" > in the "set" node. But, a "set-if" might be more descriptive. > Does that mean there are scenarios where one wouldn't want the behavior in Craig's first suggestions (a "smart" if)? If there aren't, IMO, it makes sense to do that since this is one of the cases where less is more and not having to remember to differentiate between and is a good thing while authoring. -Rahul > > Craig > > > > Gary > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [shale][myfaces] selectManyCheckBox in usecases fails to validate
On 11/4/05, Craig McClanahan <[EMAIL PROTECTED]> wrote: > > Rahul, > > To make sure I don't lose this in my inbox, could you please file a bug > report about it? > Sure, # 37361 [*] -Rahul * http://issues.apache.org/bugzilla/show_bug.cgi?id=37361 > http://issues.apache.org/bugzilla/ > > Thanks, > > Craig > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Shale timeline
On 11/3/05, Bernhard Slominski <[EMAIL PROTECTED]> wrote: > Hi Craig, > > thanks a lot for the answer, that's really helpful! > > > Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > > Gesendet: Donnerstag, 3. November 2005 17:57 > > > As far as I'm concerned, the feature work I wanted to see for a > > 1.0.0release is complete > > You don't want to come up with a specific date, do you? There is a very good write-up somewhere on the Apache site about how releases work, can't find it now, sorry. In a nutshell, there are no dates (the process is driven by volunteers having enough time to finish up the tasks leading to a release). Also, I do not speak for the Struts Shale team, this is a broader comment. -Rahul - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Shale timeline
On 11/3/05, Craig McClanahan <[EMAIL PROTECTED]> wrote: > the dev list) on a grade. That being said, I would *not* assume 1.0.0 would > be anything other than an alpha. This is not necessarily an issue about > quality, it's more about API stability. I don't want to lock down quite > everything yet, until people have had a chance to try things out. I know we've spent few cycles deciding names/version numbers recently, so I'm not going to dwell on this beyond this email, but given the above, would you consider a 0.1.0 (or 0.5.0) first release? That, atleast in my mind, is more along the lines of your statement above and conveys "not wanting to lock down just yet" very well. I'd like to see a Shale release too, don't get me otherwise. -Rahul - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[shale][myfaces] selectManyCheckBox in usecases fails to validate
Thought I'd changed something when I rolled Shale, but I see the following behavior in Shale 11/4 nightlies usecases.war as well. 1) Navigate to view corresponding to profile/profile3.jsp in Edit Profile dialog. 2) Validation for selectManyCheckBox fails with javax.faces.component.UISelectMany.INVALID A cursory glance didn't help locate the cause for the failure. Any ideas? Thanks, -Rahul - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: c:forEach does not recognize HashSet when combined with nested EL ?
On 11/1/05, Keith Sader <[EMAIL PROTECTED]> wrote: > Sorry, I was reading off of the cuff - my mistake. Let me look at this > again... > > On 11/1/05, Raghu Kanchustambham <[EMAIL PROTECTED]> wrote: > > Hi Keith, > > Thanks for responding. > > However, How will this solve my problem? The problem is that the control is > > not entering into the loop in the first place. And you have put additional > > statements in the loop body. I have anyways tried it, and it did not work. > > Regards, > It looks like your items should be > items='${studentEnrollentForm.studentEnrollment.paymentDetails}' > > I don't work with DynaActionFroms normally, so this may be something > you have to look up from JSTL documentation. Or Struts documentation ;-) DynaActionForms store a Map of property values, with an aptly named getter, which gives us this expression: ${studentEnrollentForm.map.studentEnrollment.paymentDetails} There has been talk about eliminating the need to access the Map first to get to the property value. -Rahul > > And since JSTL is fairly new, you might try using the tried and true > method of inspecting what's > happening with your .jsp. > > > > > <% > > > > DynaActionForm dynaForm = (DynaActionForm) request.getAttribute > > > > ("studentEnrollmentForm"); > > > > StudentEnrollment se = (StudentEnrollment) dynaForm.get > > > > ("studentEnrollment"); > > > hth, > -- > Keith Sader > [EMAIL PROTECTED] > http://www.saderfamily.org/roller/page/ksader > http://www.jroller.com/page/certifieddanger > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Can someone explain to me what is in http://jakarta.apache.org/taglibs/
On 11/1/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Are these tag libs seperate from what comes with Struts 1.2.7? For example I > am interested in using Struts to build a data grid application but I found a > datagrid library at: > http://jakarta.apache.org/taglibs/sandbox/doc/datagrid-doc/intro.html > > Are datagrid capabilities not included in Struts 1.2.7 and if I want a > datagrid library I have to use what is available in > http://jakarta.apache.org/taglibs/? > Taglibs at http://jakarta.apache.org/taglibs/ are not related to Struts (I presume you must have visited the URL already). There was a question just a day or two ago about datagrid and Struts asked on taglibs-user AT jakarta.apache.org mailing list. You can search the taglibs-user archives, and post your own question(s) there if needed. -Rahul > Thanks in advance, > > --Brad. > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Expression in an expression?
Otmar - Please see reply below. On 10/31/05, Michael Rasmussen <[EMAIL PROTECTED]> wrote: > You could try putting all of your collections into a collection and > accessing them by the index that way, or you could use a: > > style approach combined with your current tag and use index > in a series of > > > > > Unfortunately expressions within expressions will not work and > wouldn't be really clean if you actually did find a way to do it. > > On 10/31/05, Otmar Manuela <[EMAIL PROTECTED]> wrote: > > Hi, > > > > Can someone help me with the following? I have the following code in my > > jsp file: > > > > > > > > The problem is that I have a number of collections and I want to be able > > to dynamically tell the bean which collection to use. The code below > > does not work, but it will give you an idea of what I'm trying to > > accomplish: > > > > > > > > Is there a way to accomplish this? You cannot gensym in JSP or EL. Michael has one solution above, I'd move that bit to a delegating bean that accesses the appropriate collection so the view stays fairly clean. -Rahul > > > > Thanks, > > > > Otmar Manuela > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problems with custom taglibs
> > Eric Plante wrote: > > Is there more to add than <%@ taglib uri="http://java.sun.com/jsp/jstl/core"; > > prefix="c" %> > > in my jsp page? > > > > Eric > > Eric - Since the URI you're using belongs to JSTL 1.1, cross-check that you are: 1) using a Servlet 2.4 container 2) using a Servlet 2.4 web application descriptor 3) using the JSTL 1.1 libraries in the application classpath -Rahul > > > > > >>Sounds like you didn't add JSTL to your application (that's why the JSTL > >>expression isn't being evaluated). > >> > >>L. > >> > >>Eric Plante wrote: > >> > >>>Hi, > >>> > >>>Wendy, I tried: > >>> > >>> > >>> > >>> > >>> > >>>That's a test to output every key in the Map which contain 10 items. > >>> > >>>the tags are recognized but what's output is ${mot.key} once litteraly, > > > > the > > > >>>strings aren't recognized as data. I tried without the c:out but the > > > > reszult > > > >>>is the same. > >>> > >>> > >>> > >>> > >>> > So your form has two Maps that are keyed alike? I don't think you need > > > > a > > > custom tag (or Struts tags) at all. This iterates over a treeMap and > > > > uses > > > the key of each 'obj' as the key into a hashMap: > > > ${hashMap[obj.key]} > > > That's with the Maps in request scope... if they're coming from the form > bean, it would be items="${formBeanName.treeMap}" (assuming there is a > getTreeMap method on your form bean.) > > The above also assumes JSTL 1.1. If you're using JSTL 1.0 you'd need a > in the > middle rather than just the expression. > > Here's the JSP I was using to play with this: > <%@ taglib uri="http://java.sun.com/jsp/jstl/core"; prefix="c" %> > > <% > java.util.TreeMap treeMap = new java.util.TreeMap(); > treeMap.put( "key1", "value1" ); > treeMap.put( "key2", "value2" ); > request.setAttribute( "treeMap", treeMap ); > > java.util.HashMap hashMap = new java.util.HashMap(); > hashMap.put( "value1", "description1" ); > hashMap.put( "value2", "description2" ); > hashMap.put( "key1", "descByKey1" ); > hashMap.put( "key2", "descByKey2" ); > request.setAttribute( "hashMap", hashMap ); > %> > > > > ${hashMap[obj.value]} > > > > > > ${hashMap[obj.key]} > > > If you need help adding JSTL to your webapp, just ask. (We need to know > what version of the Servlet specification you're working with-- Servlet > >>> > >>>2.4 > >>> > >>> > (Tomcat 5.x) or something else?) > > HTH, > -- > Wendy Smoak > > > > > > > - > 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: [Shale] Changing String type to HtmlInputText in Backingbean gives No Propertyeditor error
On 10/13/05, Wendy Smoak <[EMAIL PROTECTED]> wrote: > From: <[EMAIL PROTECTED]> > > > So my jsp has this: > > >value="#{registration.userName}" /> > > .. > > >binding="#{registration.password}" /> > > > > My backingbean RegistrationBean has the following: > > > > private HtmlInputText userName = null; > > private HtmlInputSecret password = null; > > with appropriate getters and setters. > > What happens if you use 'binding' instead of 'value' for the userName? > >binding="#{registration.userName}" /> I was tempted to change the prefix to JSF, but didn't want to break the email thread. The above suggestion should do it. But I'd ask why you want to bind component instances rather than values? If this is a "traditional" login view, I'd think binding values should be sufficient? -Rahul - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Shale Question
On 10/13/05, Ryan Wynn <[EMAIL PROTECTED]> wrote: > Everything is working correctly now. I think the ViewControllerMapper was > not being set/picked up because I had specified the myFaces > org.apache.myfaces.webapp.FacesServlet directly instead of > javax.faces.webapp.FacesServlet. OK, I did glance at the docs/spec, and saw that you should indeed be at par with a servlet 2.3 container. At any rate, glad you've things going again. -Rahul - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]