equivalent for OSUser in webwork
Do we have an equivalent for OSUser in struts 2? If NO, can some one recommend a framework that helps building role based application in an iterative way. In other words I need to build different services, where each service is an application and deploy and based on the user role, access is granted or denied. I need something that works with struts 2 (and JSF) similar to jetspeed but not jetspeed. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Reg: Problem related to setting up of Indexed property on Form Submit
kukreja sanjeev wrote: Hi Guys, I am facing problem related to setting up the Indexed property on form submit in struts 2.x. It would be great if you can provide your valuable inputs to rectify this. It would help if you described what the problem is... Is something not working, or are you just unsure how to do what you want to? If the latter, what exactly are you trying to accomplish? L. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: tag
Can you be more specific? How is it 'not working'? Are you getting a file input but no restriction on what files can be selected, or just not getting a file input at all? Check the generated markup in the output HTML. It's possible the browser just isn't enforcing the accept restriction, or that it doesn't understand the specification you've supplied. Or the problem could be something else entirely. It's hard to say without more information about what's happening. L. Sandip Gaikwad wrote: Should I write I did so. But it is also not working. On 8/18/07, Nuwan Chandrasoma <[EMAIL PROTECTED]> wrote: I think you should give the file extensions Thanks, Nuwan Sandip Gaikwad wrote: hi, I want to know how I can use tag to accept only Microsoft Word files. But it is not working. Please help me. Thank you. - 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: S2 XML Validation
stanlick wrote: I am trying to figure out the and not having much success. Can someone tell me what is wrong with this? model.password.equals(model.confirmPassword) ${getText("nomatch")} ${min} and ${max} The documentation is ambiguous, since the description says the validator uses a regular expression but the parameter description says it uses an OGNL expression. Assuming the latter is correct, you might try changing your expression to 'model.password == model.confirmPassword', though I would have thought what you have would work. What's actually happening with what you have? Do you get any errors logged? Are the other validations working correctly? I'm assuming it's just a typo that your expression is not wrapped in name="expression"> tags, and that you have a message that doesn't seem to be relevant to the validation? If you're still having problems, make sure to post the exact code that you're actually using and describe exactly what is happening (or not happening) as a result. L. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: does not work
lupus wrote: Hi all, How to use s:include to include a dynamic jsp file? For instance: does not work in struts 2: the value of filename cannot be parsed. What do you mean, cannot be parsed? What is the value of filename, and what is the actual error you are getting? Where is filename set? Try using an OGNL or JSTL expression instead of a Runtime Expression to pass the value to the tag; I'm not sure if RT expressions are supported there, off hand. L. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Autowiring multiple Items of same object
I'm not sure I understand the problem, but here are some comments that might help to clarify: Vamsi wrote: Hi all, I will explain my problem scenario. I have a objects You're instructing the s:iterator tag to iterate over a collection names 'advisors'. Do you have a getAdvisors() method accessible through the value stack? What does it return? For each element in the collection named 'advisors', you are then attempting to reference properties named 'irs.a' and 'irs.b'. So, translating (approximately) into Java, the above markup is roughly equivalent to: for (SomeType item : getAdvisors()) { out.writeln(item.getIrs().getA()); out.writeln(item.getIrs().getB()); } in My action class there is I am declaring like this List irs; This doesn't match up with your markup. Perhaps what you intended to do was something more like Can anybody provide solutions for this one or references http://struts.apache.org/2.0.9/docs/iterator.html http://struts.apache.org/2.0.9/docs/property.html http://struts.apache.org/2.0.9/docs/tag-syntax.html If that doesn't clarify things, try re-posting with a more complete description of the code and markup you're using. L. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: validation issues
Sivaswamynatha K wrote: Hello friends, I am using struts 1.2.9. In my project, I have to navigate along the five jsp pages. For each page I have one next button which updates the data to the database. During that time I have to do only mask validation and not required validation. In the fifth page I have one save button. On clicking that I have to do required validation for all the previous pages and then update the database. How to do this? You need to have all the inputs available when the 5th page is submitted -- either by gathering them in a session scoped form as you work through the prior pages, or by including the inputs from prior pages as hidden fields in each subsequent page. Then you just write validation rules as normal for the final page, including the required rules. This workflow sounds a bit cumbersome, though; what if the user didn't enter a required field on page one? They don't find out they made a mistake until four pages later? Obviously I don't know your exact requirements, but that sounds kinda painful... ;-) L. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Help with scope interceptor
I haven't used the Scope interceptor, so I may not be 100% correct, but the following answers are based on my interpretation of the documentation: j alex wrote: Hi, I need help regarding correct usage of Scope interceptor (http://struts.apache.org/2.0.9/docs/scope-interceptor.html) Before going into details i had couple of qns : #1. Is this usable we have multiple actions sharing the same model object ? - i.e each page of the app posts to a different Action . All of these Actions extend from a BaseAction in which we've the get() and set() for the model. Yes, provided each action is configured with a scope interceptor with the 'key' parameter set to the same value. Assumptions (please correct me if i'm wrong here) : #2. If yes to #1, i guess we **must** provide a "key" under which to save the object Yes. #3. The Action class need not implement any special interfaces/extend any classes -- right now, it extends ActionSupport. Correct. The struts.xml is as follows : true modelObj modelObj true page-i1.jsp page-o1.jsp true modelObj modelObj true page-i2.jsp page-o2.jsp The problem is that the values entered in page-i1.jsp (posting to page2 Action) are not showing up in page-i2.jsp -- BUT, those were showing up before the interceptor was added. Do you have the necessary getModelObj() / setModelObj() methods on Action1 and Action2 respectively? Have you added debug logging to determine if those methods are called at the appropriate points? L. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[S2] Autocompleter initial value and key
Hi, I need to set an initial value and key for an autocompleter. How can id do this? I can set the initial value, but canĀ“t never set the initial key. Thanks a lot. -- View this message in context: http://www.nabble.com/-S2--Autocompleter-initial-value-and-key-tf4291467.html#a12216974 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Conditional validation
Matt -- Did you have trouble getting your validation entries to pass the dtd rules? I'm using "http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd"; and getting the error The content of element type "field-validator" must match "(param*,message)". mraible wrote: > > I figured out how to do this - posting here so others will benefit. > > 1. Create a new ConditionalVisitorFieldValidator.java: > > public class ConditionalVisitorFieldValidator extends > VisitorFieldValidator > { > private String expression; > > public void setExpression(String expression) > { > this.expression = expression; > } > > public String getExpression() > { > return expression; > } > > /** >* If expression evaluates to true, invoke visitor validation. >* @param object the object being validated >* @throws ValidationException >*/ > public void validate(Object object) throws ValidationException > { > if (validateExpression(object)) > { > super.validate(object); > } > } > > /** >* Validate the expression contained in the "expression" paramter. >* @param object the object you're validating >* @return true if expression evaluates to true (implying a validation > failure) >* @throws ValidationException if anything goes wrong >*/ > public boolean validateExpression(Object object) throws > ValidationException > { > Boolean answer = Boolean.FALSE; > Object obj = null; > > try > { > obj = getFieldValue(expression, object); > } > catch (ValidationException e) > { > throw e; > } > catch (Exception e) > { > // let this pass, but it will be logged right below > } > > if ((obj != null) && (obj instanceof Boolean)) > { > answer = (Boolean) obj; > } > else > { > log.warn("Got result of " + obj + " when trying to get Boolean."); > } > > return answer; > } > } > > 2. Add it to your validators.xml: > > class="com...validation.ConditionalVisitorFieldValidator"/> > > 3. Write your validation rule: > > > > reason == 'colleague' and colleaguePositionID == '_CHOOSE_' > You must choose a position where you worked with this > person, or choose "Other..." > > > reason == 'colleague' and colleaguePositionID == 'OTHER' > > > > > Hope this helps, > > Matt > > > mraible wrote: >> >> I need to do something similar - is it possible to have conditional >> visitor validation in Struts 2? AFAICT, it isn't. >> >> Basically, I'd like to have a couple of validation rules for a drop-down. >> One rule is that the user must select at least one choice when the >> drop-down has its radio button selected: >> >> >> reason != 'partner' or (reason == 'partner' and partnerPositionID >> != '_CHOOSE_') >> You must choose a position where you worked with this >> person, or choose "Other..." >> >> >> This works. Now I want to require a number of fields if the person >> selects the "Other..." option. The validation syntax starts to get >> complicated at this point. I'd like to do something like: >> >> reason != 'partner' or (reason == 'partner' and partnerPositionID != >> 'OTHER') -> kick in visitor validation. >> >> I still think the above syntax is confusing (ref >> http://tinyurl.com/2htw2k), I'd much rather write something like: >> >> reason == 'partner' and partnerPositionID == 'OTHER' -> show message >> >> I'm guessing it's possible to write my own FieldExpressionValidator that >> inverses the true/false outcome? >> >> Why do I need conditional visitor validation? >> >> I'm trying to create a "component" that can be re-used in the backend >> (model object w/ its own validation rules) and on the front-end (using >> JSP tag files or the s:component tag). >> >> If there's an easier way to do this, please let me know. Of course, I >> could use JSF/Wicket/Tapestry - and that might be the outcome if this is >> not possible. >> >> Thanks, >> >> Matt >> >> >> Sparecreative wrote: >>> >>> Is there a way to setup conditional validation through the >>> validation.xml >>> file? >>> >>> I'm currently user the visitor validator method where my core user >>> validation properties are in a User-validation.xml file. I want to be >>> able >>> to use this same file for all my user actions (register, add, update) >>> and >>> just have conditional code which looks a user field to determine >>> validation. >>> >>> At the moment I'm using a combination of the valididation.xml file and >>> the >>> validate method in the action. >>> >>> I know the following doesn't work, but can I have something like this: >>> >>> >> 1.0.2//EN" >>> "http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd";> >>> >>> >>> >>> >>> user.action.equals('insert') || user.action.equals('register') >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>>
Re: Fw: Date problem
vamsi wrote: But it is saying Paramtert interceptor unable to convert the java.lang.String to Date and giving an Illegalargumentexception any information why it is saying like that You have to make sure the value entered is in correct format. It should be in format that is outputted by DataFormat.getDateInstance(DataFormat.SHORT).format(yourDate) What value do you enter? Oleg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[S2] tree tag and nodes customization
Hi, is there a way to specify different images for each node? Or are property such expandIconSrcPlus immutable for the entire tree? Thanks, P. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Reg: Problem related to setting up of Indexed property on Form Submit
Hi Guys, I am facing problem related to setting up the Indexed property on form submit in struts 2.x. It would be great if you can provide your valuable inputs to rectify this. Thanks in Advance. Regards, Sanjeev - Take the Internet to Go: Yahoo!Go puts the Internet in your pocket: mail, news, photos & more.
Re: tag
Should I write I did so. But it is also not working. On 8/18/07, Nuwan Chandrasoma <[EMAIL PROTECTED]> wrote: > > I think you should give the file extensions > > Thanks, > > Nuwan > > Sandip Gaikwad wrote: > > hi, > > I want to know how I can use tag to accept only Microsoft > Word > > files. > > > > But it is not working. > > Please help me. > > Thank you. > > > > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
tag
hi, I want to know how I can use tag to accept only Microsoft Word files. But it is not working. Please help me. Thank you.
Re: tag
I think you should give the file extensions Thanks, Nuwan Sandip Gaikwad wrote: hi, I want to know how I can use tag to accept only Microsoft Word files. But it is not working. Please help me. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
tag
hi, I want to know how I can use tag to accept only Microsoft Word files. But it is not working. Please help me. Thank you.
Security Propogation works fine in TOMCAT Server but not in the WebSphere Applciation Server v6.1
Hi , I am newbie to Struts 2 , require urgent assistance on the below issue. Issue: - I want to secure my web application using Container managed security by using Websphere Application Server6.1. Secured all the URLs by placing a security constraint and map the relevent users/groups in my web.xml.But the security credentials are not propogated to the Filter class.Where as the same works 100% fine in TOMCAT server. Environment --- Websphere Application Server6.1 Struts2.0.9 Rational Application Developer7 Problem Description After configuring all container managed security we were able to get the security credentials like remoteUser in JSP.But when the form is submitted to the action class by having the Filter as a controller we are not able to get the remoteUser by calling request.getRemoteUser() at the Action . Wat we inferred is that the Userprinpical context in the request parameter is not available at the Filter. Below are the entries which we have in web.xml secconst12 secweb1234 *.action /* * GET PUT HEAD TRACE POST DELETE OPTIONS secAuthConst12 secrole12 BASIC DirRealm secrole12 Below are the steps we tried. Approach 1 1) Having a Servlet as a controller.(Submit the jsp form to a Servlet) 1)When we have the following in web.xml SampleServletController SampleServletController com.scb.mbp.action.SampleServletController SampleServletController *.action 2) When we call the request.getRemoteUser() in the servlet's doPost method we can able to get the remoteUser name. Output This approach works fine in both ApacheTomacat6.0.14 and Websphere Application Server6.1. (ie) we can able to get the remoteUser in servlet's doPost() method. Approach 2 2) Having a Servlet Filter as a controller.(Submit the form to a Servlet Filter) 1)When we have the following in web.xml SampleFilterController SampleFilterController com.scb.mbp.action.SampleFilterController SampleFilterController *.action Output 1) In Apcahe Tomcat 6.0.14 when we call the request.getRemoteUser() in the Filter's doFilter method we got the remoteUser name. 2) In Websphere Application Server 6.1 when we call the request.getRemoteUser() in the Filter's doFilter method we got null. The above scenarios clearly flags that the application works fine in TOMCAT and doesn't in the WebSphere Application Server. Plesae let us know wat would be required to be done to make it work in WebSphere Application Server v6.1. Regards, Vinoth This email is confidential. If you are not the addressee tell the sender immediately and destroy this email without using, sending or storing it. Emails are not secure and may suffer errors, viruses, delay, interception and amendment. Standard Chartered PLC and subsidiaries ("SCGroup") do not accept liability for damage caused by this email and may monitor email traffic.