Re: Benefits of using Filter as front controller
What people are missing here is that using filters and deviating from the spec as front controller would cause quite a few issues when some applications servers are used. I quite clearly remember that I went through hell to deploy my applications on WebSphere applications with an Http server as front Web server. WebSphere goes through web.xml files and uses Servlet URL mappings to generate the plugin file for resource mapping and filters are ignored. Even when I opened a pmr, I was told by support that struts 2 deviates from the Spec. when you pick a framework, you got to be aware that these things may cost you dearly down the road depending on what application servers you use or you plan to migrate. As much as I have been an avid struts user [specially struts 1], I personally think that you should seriously consider Spring MVC / MVC Portlet against any other framework. I ,per se, have had a great experience with Spring MVC which somehow brings up the good memories of struts 1 [once everything is put in the context of its time] - Original Message - From: umeshawas...@gmail.com umeshawas...@gmail.com To: Struts Users Mailing List user@struts.apache.org Cc: Sent: Monday, August 13, 2012 2:05:45 PM Subject: Re: Benefits of using Filter as front controller Rene Thanks for such a detailed explanation and descrbing each and every aspects Now even I can say and explains things in much more and good way Sent from BlackBerry® on Airtel -Original Message- From: Rene Gielen rgie...@apache.org Date: Mon, 13 Aug 2012 20:00:04 To: Struts Users Mailing Listuser@struts.apache.org Reply-To: Struts Users Mailing List user@struts.apache.org Subject: Re: Benefits of using Filter as front controller Grabbed me a copy of Servlet Spec 2.4: quote SRV.6.1 What is a filter? A filter is a reusable piece of code that can transform the content of HTTP requests, responses, and header information. Filters do not generally create a response or respond to a request as servlets do, rather they modify or adapt the requests for a resource, and modify or adapt responses from a resource. /quote do not generally is way different from may not, right? Reading both the relevant parts of the spec and the API docs again, I cannot see any violation of the servlet specification by using a Filter for doing the dispatching, rather than a Servlet. The other part is how requests are mapped, which imposes the question if a servlet mapping matching the request URL must exist: quote SRV.11.1 Use of URL Paths [...] 1. The container will try to find an exact match of the path of the request to the path of the servlet. A successful match selects the servlet. 2. The container will recursively try to match the longest path-prefix. This is done by stepping down the path tree a directory at a time, using the ’/’ character as a path separator. The longest match determines the servlet selected. (ad 2.: Previous versions of this specification made use of these mapping tech- niques as a suggestion rather than a requirement, allowing servlet con- tainers to each have their different schemes for mapping client requests to servlets.) 3. If the last segment in the URL path contains an extension (e.g. .jsp), the servlet container will try to match a servlet that handles requests for the extension. An extension is defined as the part of the last segment after the last ’.’ character. 4. If neither of the previous three rules result in a servlet match, the container will attempt to serve content appropriate for the resource requested. If a default servlet is defined for the application, it will be used. /quote Point 4 is crucial. As to my opinion, it doesn't state clearly if a default mapping must exist or not, which leaves it IMO up to the container. That said, most frameworks use dispatcher servlets, and WebWork / Struts 2 once did as well. The rationale behind switching to the Filter architecture was to deal better with integrating technologies such a Sitemesh or Portlet, which both profit from splitting the dispatching in more than one phase. This could only be accomplished by using filters rather than servlets. Since then, e.g. all major problems with sitemes integration magically disappeared. So my point of view is that there is nothing wrong with using filters for dispatching. If the container interprets the servlet spec in an opposite way, a dummy default servlet mapping should do the trick. Nevertheless I'm happy to hear about points I might have missed or misinterpreted. - René Am 8/13/12 16:01 , schrieb Paul Benedict: I'll take back what I said and reserve opinion until further research. I'll be interested in what you all find. For the record, the Spring Framework has its front-controllers as servlets. http://static.springsource.org/spring/docs/3.1.x/javadoc-api/org/springframework/web/servlet/package-summary.html Paul On Mon, Aug 13, 2012 at 8:53 AM, umeshawas...@gmail.com wrote: Yes this was one
Re: Benefits of using Filter as front controller
I remember more than one case where I found WAS / Websphere Portal to implement a very ... say ... at least ... imaginative interpretation of the specs That is exactly the point,the compromise of clear-cut sections of spec in favor of unclear, murky, interpretive sections of spec in struts 2 much like IBM. There is no interpretation on whether a Servlet can/should be used to server resource but when it comes to filters there is. And quite rightfully so, as there may be darn compelling reasons to do so, since things quite few often do not follow patterns put in black and white. I am not trying to stir an endless discussion on what interpretation is correct as there will be no consensus. And I do not know what has been the darn compelling reason that could have not gotten away with using a Servlet as front controller in struts 2, but I would have loved to have the option of using a Servlet as my front controller in struts 2. With all said, I did not mean to belittle struts 2 or take a jab at any struts 2 contributor in my previous comment. And I believe it is very honorable of you to try make the tool available to the development community for free by putting a lot of work in your free and personal time. I just wanted to reflect the opinion for some spectrum of struts user community though may be small in numbers. - Original Message - From: Rene Gielen rgie...@apache.org To: Struts Users Mailing List user@struts.apache.org Cc: Sent: Tuesday, August 14, 2012 12:10:56 PM Subject: Re: Benefits of using Filter as front controller So far I fail to see where Struts 2 deviates from or violates the spec. The fact that _usually_ a front controller - a concept not to be found at all in the servlet spec - is implemented as servlet does not mean that it _has_ to be implemented that way, unless the spec says or clearly implies otherwise. For what I found in the and cited earlier, this is not the case. That WAS *interprets* the spec in a different way - especially when it comes to a tooling level that has nothing to do with the spec whatsoever (parsing web.xml to generate loadbalancing / proxy webserver configuration) - is a totally different story. To some extent I understand the rationale behind this, implying a servlet mapping should exist for a given URL - but besides IBM claiming this has to be the case, I haven't found any evidence so far. Interestingly, when it comes to IBM support saying Struts 2 deviates from the spec, I remember more than one case where I found WAS / Websphere Portal to implement a very ... say ... at least ... imaginative interpretation of the specs. I'm not quite sure if them saying that Struts 2 deviates makes a case for this being a fact to count on. But again, I'm happy to hear I'm wrong if someone could clearly point out what I might have missed when reading the spec. Side note - sorry to say, but in my very personal and for sure not representative experience, every time a some application servers might have issues case arises, there is a good chance that _some_ of them share a common product line name, starting with W :) And well, going through hell when deploying apps to WAS* is something I suffered from myself many times, with various different frameworks and technology stacks in use. I'll try to wrap up my points: - the filter-based dispatching addressed real and serious technical integration issues, and was able to solve them - if it would violate the spec, we would *have to* remove it again, or at least deliver a then spec conform dispatcher servlet as alternative - so far there seems to be no evidence this is the case - the Struts team *can for sure do much better* in documenting the possible glitches, especially after what we learned from this thread and your experiences; we should point out that using a filter dispatcher might impose the need to add a default dummy servlet mapping to help some application servers BTW: I agree, Spring MVC became a great framework once they dropped the inheritance-based controller madness, replacing it with annotation based POJO configuration and heavy AOP magic. Nevertheless, Struts 2 has a lot of sweet spots even over Spring MVC, as to my opinion as a user of both :) Cheers, - René Am 14.08.12 15:46, schrieb Struts Two: What people are missing here is that using filters and deviating from the spec as front controller would cause quite a few issues when some applications servers are used. I quite clearly remember that I went through hell to deploy my applications on WebSphere applications with an Http server as front Web server. WebSphere goes through web.xml files and uses Servlet URL mappings to generate the plugin file for resource mapping and filters are ignored. Even when I opened a pmr, I was told by support that struts 2 deviates from the Spec. when you pick a framework, you got to be aware that these things may cost you dearly down the road depending on what application servers
File download fails in Firefox and Chrome
Hi everyone: I have an application in Struts 2.1.8 that has been running for the past two years with no issue. However; recently I have noticed the all file downloads on Firefox and Chrome fails while IE is okay. I know it has something with content-dispositon but I have not been able to fix it. The code is as follows: public String execute() { Attachment attachment = ticketLocal.findAttachment(getAttachmentId()); setInputStream(new ByteArrayInputStream(attachment.getAttachment())); getServletResponse().setHeader(Content-Disposition, (attachment; filename=\ + attachment.getName().trim().replaceAll( , _) + \)); return Action.SUCCESS; } Not setting the Content-disposition is header, makes the firefox to prompt for the download but it uses the action for filename ie Ticket.action. Has anyone faced a similar issue or can provide a hint on how to fix the issue - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: File download fails in Firefox and Chrome
The fact is that I set content disposition programatically in the following line getServletResponse().setHeader(Content-Disposition, (attachment;filename=\ + attachment.getName().trim().replaceAll( , _) + \)); in the action as opposed to configuration. I was working with no issue until a month ago for over a year and suddenly it has stopped working - Original Message - From: Eric Lentz eric.le...@sherwin.com To: Struts Users Mailing List user@struts.apache.org Cc: Sent: Friday, January 13, 2012 11:22:02 AM Subject: Re: File download fails in Firefox and Chrome Not setting the Content-disposition is header, makes the firefox to prompt for the download but it uses the action for filename ie Ticket.action. Has anyone faced a similar issue or can provide a hint on how to fix the issue Yep, saw this problem just this week. I ran the request through software that would allow me to view the header and I saw that only the filename appeared in the contentDisposition, no filename=... Add a field to your action class called contentDisposition and assign it like this: contentDisposition = filename=\ + filename + \; This assumes you are using the stream result in a manner similar to this: result name=myDownloadName type=stream param name=bufferSize1024/param /result I included the contentDisposition in the result like this: result name=myDownloadName type=stream param name=contentType${contentType}/param param name=contentDispositionfilename=${contentDisposition}/param param name=bufferSize1024/param /result But that didn't work, because Struts took whatever was in my contentDisposition in my action versus using the param. So _the above doesn't work_ because it would drop the filename= portion. If you used a different variable name, then it would probably work, but I didn't go back and try. In theory, this would work: result name=myDownloadName type=stream param name=contentType${myContentType}/param param name=contentDispositionfilename=${myContentDisposition}/param param name=bufferSize1024/param /result Assuming you had myContentType and myContentDisposition in your action. Hope that helps. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: File download fails in Firefox and Chrome
Thank you very much for your reply. Your suggestion worked though in IE the file is opened in a new tab as opposed to save but it works on Firefox. - Original Message - From: Eric Lentz eric.le...@sherwin.com To: Struts Users Mailing List user@struts.apache.org Cc: Sent: Friday, January 13, 2012 11:22:02 AM Subject: Re: File download fails in Firefox and Chrome Not setting the Content-disposition is header, makes the firefox to prompt for the download but it uses the action for filename ie Ticket.action. Has anyone faced a similar issue or can provide a hint on how to fix the issue Yep, saw this problem just this week. I ran the request through software that would allow me to view the header and I saw that only the filename appeared in the contentDisposition, no filename=... Add a field to your action class called contentDisposition and assign it like this: contentDisposition = filename=\ + filename + \; This assumes you are using the stream result in a manner similar to this: result name=myDownloadName type=stream param name=bufferSize1024/param /result I included the contentDisposition in the result like this: result name=myDownloadName type=stream param name=contentType${contentType}/param param name=contentDispositionfilename=${contentDisposition}/param param name=bufferSize1024/param /result But that didn't work, because Struts took whatever was in my contentDisposition in my action versus using the param. So _the above doesn't work_ because it would drop the filename= portion. If you used a different variable name, then it would probably work, but I didn't go back and try. In theory, this would work: result name=myDownloadName type=stream param name=contentType${myContentType}/param param name=contentDispositionfilename=${myContentDisposition}/param param name=bufferSize1024/param /result Assuming you had myContentType and myContentDisposition in your action. Hope that helps. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: struts2 in weblogic 10.3
Hi: I know based on my experience that I had quite some trouble running struts 2 on WebSphere which led to opening quite a few PMRS with IBM. And in many occasions it happened to be the issue with existing struts 2 design that breaks the Spec such as using filters to server resources and etc and then you are left in catch 22 situation where you get no support from application server vendor as finger pointed to struts 2 deviation from the Spec and the current design can not be changed. If you are in the process of choosing a framework for your application, you may want to take a look at Spring MVC as well. - Original Message - From: Frans Thamura fr...@meruvian.org To: Struts Users Mailing List user@struts.apache.org; jlm...@gmail.com Cc: Sent: Tuesday, November 1, 2011 8:06:19 AM Subject: Re: struts2 in weblogic 10.3 Can we know? Where do you put ur struts.xml and can share ur war structure On Nov 1, 2011 6:00 PM, jlm...@gmail.com wrote: I'm using Struts 2 with WL withou problems for months. You meed to check your app. Sent via BlackBerry from T-Mobile -Original Message- From: Frans Thamura fr...@meruvian.org Date: Tue, 1 Nov 2011 17:16:16 To: Struts Users Mailing Listuser@struts.apache.org Reply-To: Struts Users Mailing List user@struts.apache.org Subject: Re: struts2 in weblogic 10.3 Hi all Just test our code, springmvc run well. Does this mean struts2, not weblogic ready? F On Nov 1, 2011 3:31 PM, Maurizio Cucchiara mcucchi...@apache.org wrote: Looks like weblogic is trying to loading the same library twice: - from :C:/Users/user/.m2/repository/org/apache/struts/struts2-core/ 2.2.3.1/s - and from F:/Oracle/Middleware/user_projects/domains/base_domain/servers/AdminServer/tmp/_WL_user/_auto_generated_ear_/me9saz/war/WEB-INF/lib/ Anyway, I'm sure that you will be luckier asking this kind of question to the user ML. Twitter :http://www.twitter.com/m_cucchiara G+ :https://plus.google.com/107903711540963855921 Linkedin :http://www.linkedin.com/in/mauriziocucchiara Maurizio Cucchiara On 31 October 2011 07:43, vickyfaizal vicky.fai...@meruvian.org wrote: Unable to load configuration. - bean - - To unsubscribe, e-mail: dev-unsubscr...@struts.apache.org For additional commands, e-mail: dev-h...@struts.apache.org - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Migration from 2.1.8 to 2.2.1.1
None of the javaassist's dual licenses is (modified) Apache license. I understand some software applications that use plugins to have different open sources licenses as they are optional. But once a library is added as a dependency with a different open source license than Apache 2, it will cause quite a few issues at least from legal perspective. is there any version of javaassist or an alternative library with Apache 2 license? does existing javaassit licenses limits or puts extra restriction on Apache 2 license that comes with struts 2? - Original Message From: Lukasz Lenart lukasz.len...@googlemail.com To: Struts Users Mailing List user@struts.apache.org Sent: Wed, March 30, 2011 12:58:02 AM Subject: Re: Migration from 2.1.8 to 2.2.1.1 Just read through release notes: http://struts.apache.org/2.2.1/docs/version-notes-221.html http://struts.apache.org/2.2.1/docs/version-notes-2211.html If you aren't running your application on JBoss you must add Javassist library as a dependency Regards -- Łukasz + 48 606 323 122 http://www.lenart.org.pl/ Warszawa JUG conference - Confitura http://confitura.pl/ 2011/3/29 Struts Two struts...@yahoo.ca: Hello All: is Migration from 2.1.8 to 2.2.1.1 straightforward involving only jar files replacement or there is more to it? I remember when I migrated from 2.0.14 to 2.1.8 I had to go through a wiki page for migration to work, is there such WIKI page? I am only using tiles plugin and no other plugins are there. I would appreciate any tips/links or yes or no answers. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Migration from 2.1.8 to 2.2.1.1
It is not the question whether it concerns me or not, it is the process that some (big) companies follow. When we started the projected in struts 2, we involved the legal team with regard to licenses involved, we got the approval. Now before I try to upgrade my struts 2 which involves a new license other than Apache 2, I have to involve the legal team which makes a simple upgrade overly complex. I believe that struts 2 team should at least keep core files under Apache 2 license [much like struts 1.x]. It does not make sense that struts 2 is licensed under Apache 2 while some of its dependencies are licensed differently which makes you wonder what is Apache 2 licensed struts 2 and what is not. Without those core components there is no struts 2. Nothing with regard to MPL concerns me as it is the same one used by Firefox but the red-tape and processes followed by some companies may deem it otherwise to avoid lawsuits, etc. - Original Message From: Dave Newton davelnew...@gmail.com To: Struts Users Mailing List user@struts.apache.org Sent: Wed, March 30, 2011 9:29:48 AM Subject: Re: Migration from 2.1.8 to 2.2.1.1 What about the MPL concerns you? On Wednesday, March 30, 2011, Struts Two struts...@yahoo.ca wrote: None of the javaassist's dual licenses is (modified) Apache license. I understand some software applications that use plugins to have different open sources licenses as they are optional. But once a library is added as a dependency with a different open source license than Apache 2, it will cause quite a few issues at least from legal perspective. is there any version of javaassist or an alternative library with Apache 2 license? does existing javaassit licenses limits or puts extra restriction on Apache 2 license that comes with struts 2? - Original Message From: Lukasz Lenart lukasz.len...@googlemail.com To: Struts Users Mailing List user@struts.apache.org Sent: Wed, March 30, 2011 12:58:02 AM Subject: Re: Migration from 2.1.8 to 2.2.1.1 Just read through release notes: http://struts.apache.org/2.2.1/docs/version-notes-221.html http://struts.apache.org/2.2.1/docs/version-notes-2211.html If you aren't running your application on JBoss you must add Javassist library as a dependency Regards -- Łukasz + 48 606 323 122 http://www.lenart.org.pl/ Warszawa JUG conference - Confitura http://confitura.pl/ 2011/3/29 Struts Two struts...@yahoo.ca: Hello All: is Migration from 2.1.8 to 2.2.1.1 straightforward involving only jar files replacement or there is more to it? I remember when I migrated from 2.0.14 to 2.1.8 I had to go through a wiki page for migration to work, is there such WIKI page? I am only using tiles plugin and no other plugins are there. I would appreciate any tips/links or yes or no answers. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Migration from 2.1.8 to 2.2.1.1
Hello All: is Migration from 2.1.8 to 2.2.1.1 straightforward involving only jar files replacement or there is more to it? I remember when I migrated from 2.0.14 to 2.1.8 I had to go through a wiki page for migration to work, is there such WIKI page? I am only using tiles plugin and no other plugins are there. I would appreciate any tips/links or yes or no answers. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Mix SpringMVC 3.0 with Struts2
And why do you want to mix Struts 2 with Spring 3.0MVC? It is understandable if you want to use Spring DI with struts 2, however; if you already have Spring 3MVC, I think you should stick to it. - Original Message From: Frans Thamura fr...@meruvian.org To: Struts Users Mailing List user@struts.apache.org Sent: Thu, July 29, 2010 6:49:31 PM Subject: Mix SpringMVC 3.0 with Struts2 hi all I try to mix Struts2 2.2.1 with SpringMVC 3.0 i got a Validator error when ass Struts2, but if i remove struts2, the code work well i believe there is a problem with the validation any tips for the exclude ? i see that struts2 using spring 2.5.6, this is my exclusions am i put in the wrong depedency? if yes, where i must put it, or ... dependency groupIdorg.apache.struts/groupId artifactIdstruts2-spring-plugin/artifactId version2.2.1/version exclusions exclusion groupIdorg.springframework/groupId artifactIdspring/artifactId /exclusion exclusion groupIdorg.springframework/groupId artifactIdspring-core/artifactId /exclusion /exclusions /dependency -- Frans Thamura Meruvian. We grow because we share the same believe. Mobile: +6287885901958 Blog Profile: http://frans.thamura.info We provide services to migrate your apps to Java (web), in amazing fast and reliable. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Struts time picker does not render in IE7/IE8
What is meant is do not use struts dojo plugin. However, you can use dojo framework (which is a great framework) with struts 2 - Original Message From: Dale Newfield d...@newfield.org To: Struts Users Mailing List user@struts.apache.org Cc: john.vargh...@smartonline.com Sent: Tue, June 29, 2010 10:36:08 AM Subject: Re: Struts time picker does not render in IE7/IE8 On 6/29/10 9:03 AM, john.vargh...@smartonline.com wrote: Hi friendsany suggesstions? My suggestion is don't use dojo. -Dale - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Upgrade from 1.2 to 1.3x
Look at the following page for migration from 1.2 to 1.3: http://wiki.apache.org/struts/StrutsUpgradeNotes12to13 - Original Message From: Søren Blidorf so...@nolas.dk To: struts-u...@jakarta.apache.org Sent: Tue, May 25, 2010 6:23:51 AM Subject: Upgrade from 1.2 to 1.3x Hi. I am upgrading my struts app to 1.3.10 from 1.2 In my web.xml I have configured taglib like this: taglib taglib-uri/WEB-INF/struts-bean.tld/taglib-uri taglib-location/WEB-INF/struts-bean.tld/taglib-location /taglib taglib taglib-uri/WEB-INF/struts-html.tld/taglib-uri taglib-location/WEB-INF/struts-html.tld/taglib-location /taglib taglib taglib-uri/WEB-INF/struts-logic.tld/taglib-uri taglib-location/WEB-INF/struts-logic.tld/taglib-location /taglib taglib taglib-uri/WEB-INF/struts-tiles.tld/taglib-uri taglib-location/WEB-INF/struts-tiles.tld/taglib-location /taglib taglib taglib-uri/WEB-INF/struts-nested.tld/taglib-uri taglib-location/WEB-INF/struts-nested.tld/taglib-location /taglib Is that still ok to do? From the struts Wiki it looks like I have to refer directly to http://struts.apache.org/tags-bean Soren, DK - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Websphere/Struts issue with form based authentication
The problem should be due to the fact struts two breaks Servelt 2.4 spec by using a filter to access resources as opposed to servlet. I had a similar issue. Search for posting with title There is no Action mapped for namespace / and action name j_security_check I think I should have mentioned the solution there when you use form-based authentication. --- On Fri, 5/14/10, Jesse Hill jesse_h...@yahoo.com wrote: From: Jesse Hill jesse_h...@yahoo.com Subject: Websphere/Struts issue with form based authentication To: user@struts.apache.org Received: Friday, May 14, 2010, 6:59 PM Hello everyone, I have a struts2 app (2.0.14) running on Websphere (version 6.1.x and 7.x) and when I try to access a struts action that is protected by Websphere security constraints and form based authentication, I get the following messages in the log: [5/14/10 14:34:14:169 EDT] 0092 SRTServletRes W WARNING: Cannot set status. Response already committed. [5/14/10 14:34:14:185 EDT] 0092 SRTServletRes W WARNING: Cannot set header. Response already committed. This is perhaps similar to the problem in: http://www.mail-archive.com/user@struts.apache.org/msg68306.html But the solutions presented there do not resolve this issue. I have the invokefilterscompatibility variable set correctly and am running with the patches. I can access protected static files without seeing the log messages - it only occurs when I invoke a protected struts action. So /myapp/static.html will redirect to the login page without the log messages, but /myapp/struts.action causes the errors to print as part of the redirect. Any ideas? Thanks very much, Jesse - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
RE: Struts2 on Websphere portal 6.1.0.0
Set the the following properties in custom properties of your Websphere application server com.ibm.ws.webcontainer.assumefiltersuccessonsecurityerror = true com.ibm.ws.webcontainer.invokefilterscompatibility = true --- On Thu, 4/22/10, Prabahar prabahar.durais...@lntinfotech.com wrote: From: Prabahar prabahar.durais...@lntinfotech.com Subject: RE: Struts2 on Websphere portal 6.1.0.0 To: user@struts.apache.org Received: Thursday, April 22, 2010, 7:24 AM Please find the attached error log... http://old.nabble.com/file/p28325070/DisplayTag.txt DisplayTag.txt -- View this message in context: http://old.nabble.com/Struts2-on-Websphere-portal-6.1.0.0-tp18761735p28325070.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
RE: Struts2 on Websphere portal 6.1.0.0
When you run struts 2 on Websphere 6.1, there are a few properties you need to add to your Server custom properties. Without these properties set, you will not be able to run struts2. IBM portal server is bacisally and enterprise file that runs on Websphere application server, and I think you need to set those properties. --- On Mon, 4/19/10, Griffith, Michael * michael.griff...@fda.hhs.gov wrote: From: Griffith, Michael * michael.griff...@fda.hhs.gov Subject: RE: Struts2 on Websphere portal 6.1.0.0 To: Struts Users Mailing List user@struts.apache.org Received: Monday, April 19, 2010, 2:59 PM The problem is the URI parameter in your display tag table. This is how DT invokes the action/HTTP request that originally got the request for the table in the table. It should be something like: requestURI=search.action where the value is the action of the page. MG -Original Message- From: Prabahar [mailto:prabahar.durais...@lntinfotech.com] Sent: Monday, April 19, 2010 3:17 AM To: user@struts.apache.org Subject: Re: Struts2 on Websphere portal 6.1.0.0 I am facing an issue with Struts 2 portlet which uses Display Tag. I have implemented a code to display a list using Display Table and also implemented Sorting option. It is working fine with IBM WAS 7.0 and the same code is not working with IBM Portal Server 6.1 It is displaying the data, but when i click on the pagination link (First, Last, Next..) and the column header (to sort) then i am getting page can not be found. I have even mentioned page cotext, but still i am facing this issue. I have also added the display tag portlet support jar (displaytag-portlet-1.2.jar) along with displaytag-1.2.jar and its supporting jars. display:table name=searchResultList id=user sort=list defaultsort=2 pagesize=2 requestURI= display:column sortable=true property=name/display:column display:column property=address/display:column /display:table I have a doubt in the requestURI parameter... what exactly i should give to that parameter. I have also used requestURIContext as well, but no improvement. Nils-Helge Garli wrote: Thanks for the summary, although I disagree with your conclusion ;) Nils-H On Fri, Aug 1, 2008 at 2:21 AM, Struts Two struts...@yahoo.ca wrote: I am running Struts2.0.11.1 on Websphere 6.1.0.17 NOT THE WEBSPHERE PORTAL. You need to keep the followings in mind: 1- You need to have at least fixpack 13 or 15 ( I am not sure which one, otherwise you CAN NOT RUN STRUTS 2 ON WAS) 2- Struts 2.0.11.2 has problems running on Websphere 6.1 (it is missing a patch), so you need to downgrade to 2.0.11.1 till next release (2.0.11.3 or 2.0.12) 3- Once the above you are done with above steps, you need to set the following custom property for WAS server: com.ibm.ws.webcontainer.invokefilterscompatibility = true If you do not set the above property, you can not run struts 2 on WAS as well. However; I did a project using struts on Websphere portal 6.0. IBM provides its own customized struts that works with portal (which is based on struts1), and it is pretty good. I recommend use the IBM's struts that comes with Portal server as you would have a hard time using struts 2 with websphere portal. Hope this helps, - Original Message From: Dinesh Narayanan ndchan...@gmail.com To: user@struts.apache.org Sent: Thursday, July 31, 2008 3:26:20 PM Subject: Struts2 on Websphere portal 6.1.0.0 Has Anybody tried Struts2 (Struts-2.0.11.2) on Websphere portal 6.1.0..0? I am running into issues when I tried a very simple JSR168 example. Any help would be appreciated. Is there some example of struts2 sample in websphere portal 6.1? A) My portlet.xml contains the following entries init-param nameviewNamespace/name value/view/value /init-param !-- The default action to invoke in view mode. -- init-param namedefaultViewAction/name valueindex/value /init-param B) My struts.xml is struts package name=view extends=struts-portlet-default namespace=/view action name=index class=com.myCompany.proj1.ExampleAction result name=success/WEB-INF/view/index.jsp/result /action /package /struts Thanks Dinesh __ Be smarter than spam. See how smart SpamGuard is at giving junk email the boot with the All-new Yahoo! Mail. Click on Options in Mail and switch to New Mail today or register for free at http://mail.yahoo.ca - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Websphere 6.1 and Struts 1.3
I am running 1.3.10 on WAS 6.1 with no issues. Have installed the latest Websphere fixpacks and test. However; if you struts version is 1.1 or 1.2, you may need to add the following property: prependSlashToResource = true to custom properties of your server. --- On Mon, 4/5/10, Darshan Shroff darshanmahesh_shr...@infosys.com wrote: From: Darshan Shroff darshanmahesh_shr...@infosys.com Subject: Re: Websphere 6.1 and Struts 1.3 To: user@struts.apache.org Received: Monday, April 5, 2010, 9:35 AM Hi, I am facing a similar issue. Any update on this. ? Regards, Darshan Shroff shroffdars...@gmail.com newton.dave wrote: IIRC it's not necessary to use the extension when defining actions. That'd actually kind of defeat one of the purposes of having a definable extension. --- On Tue, 6/10/08, Martin mgai...@hotmail.com wrote: From: Martin mgai...@hotmail.com Subject: Re: Websphere 6.1 and Struts 1.3 To: Struts Users Mailing List user@struts.apache.org Date: Tuesday, June 10, 2008, 1:53 PM struts-config.xml action-mappings !-- Default admin action -- !-- Forwards to com.schpro.action.AdminAction -- action path=/admin type=com.schpro.action.AdminAction forward name=configure path=/jsp/admin.jsp / forward name=projectsearch path=/projectsearch.do / /action you have admin defined as path instead of 'admin.do' Martin - Original Message - From: Sury Balasubramanian To: user@struts.apache.org Sent: Tuesday, June 10, 2008 1:30 PM Subject: Websphere 6.1 and Struts 1.3 Hello all, I am having an issue with a webapp developed on struts 1.3 on Websphere 6.1.07 (running on AIX). The webapp when compiled, tested and run on Windows (websphere 6.1.015) works fine. The problem is as follows. The application installs properly. If i login and directly access a JSP i don't have an issue at all. If I use a url http://server:port/sp/admin.do (struts url). Users get the following error: Error 404: Parsing error processing resource path /WEB-INF/struts-config.xml The following files are attached: web.xml struts-config.xml trace on websphere when the struts request is sent The following were already checked: struts.xml is referred to with a leading slash /WEB-INF/struts.xml in the web.xml as prescried by IBM. the server property of leading slash is also set to make sure we read the leading slash. Is this a good place to post this or on the websphere forum? Is there something missing on the config.xml that websphere specifically validates? Thanks Sury -- - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- View this message in context: http://old.nabble.com/Websphere-6.1-and-Struts-1.3-tp17760714p28138386.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org __ The new Internet Explorer® 8 - Faster, safer, easier. Optimized for Yahoo! Get it Now for Free! at http://downloads.yahoo.com/ca/internetexplorer/ - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: drop down list auto suggest feature using Struts1.1/JSP/Javascript
You can also use Dojo with Struts 1. I am currently using dojo 1.3.2 with struts 1.3.10 with no issues whatsoever. --- On Mon, 1/11/10, Paul Benedict pbened...@apache.org wrote: From: Paul Benedict pbened...@apache.org Subject: Re: drop down list auto suggest feature using Struts1.1/JSP/Javascript To: Struts Users Mailing List user@struts.apache.org Received: Monday, January 11, 2010, 2:35 AM Look into Java Web Parts. It's an ajax framework that's compatible with Struts 1. On Sun, Jan 10, 2010 at 8:21 AM, sri2003 hipal...@yahoo.com wrote: Hi, Need to have a drop down list with populated values; but when the user wants to select a value, he can either type in the first few letters or select it from the drop down list with the mouse or both. example: a drop down list has 10 values. the user clicks on the drop down and it allows him to type in the box or select the value from the drop down, but if he type A it will just to all the values starting with A and if he continues to type Al it will further goto all the values that start with Al e.g. Alex and Albert. How do i go about doing this using Struts1.1/JSP/Javascript? Any sample code/example would be great. Thanks in advance -- View this message in context: http://old.nabble.com/drop-down-list-auto-suggest-feature-using-Struts1.1-JSP-Javascript-tp27098731p27098731.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org __ Connect with friends from any web browser - no download required. Try the new Yahoo! Canada Messenger for the Web BETA at http://ca.messenger.yahoo.com/webmessengerpromo.php - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: [Struts 2.1.8] Dojo with Tiles: works or not ?
I am using struts 2.1.8 with Tiles 2.0.5 and Dojo toolkit 1.3.2 [not struts dojo plugin] and I have no problem. --- On Thu, 12/17/09, Celinio Fernandes cel...@yahoo.com wrote: From: Celinio Fernandes cel...@yahoo.com Subject: [Struts 2.1.8] Dojo with Tiles: works or not ? To: Struts Users Mailing List user@struts.apache.org Received: Thursday, December 17, 2009, 2:36 PM Hi, I already posted a message about my problem, yesterday. I followed this example here : http://struts.apache.org/2.1.8.1/docs/struts-2-spring-2-jpa-ajax.html It works well. However if i put the JSP pages inside Tiles, then it does not work. What happens is that the page seems to refresh all the time and grows exponentially (one page inside another inside another etc). Is there a know problem with Dojo in combination with Tiles ? http://www.dojotoolkit.org/tags/tiles Not too sure if it's a big issue or just a minor modification i need to do in my Tiles template or the JSPs to make it work. Perhaps some issue with the s:div Dojo tag ? I do not think I need to copy-paste any code for more details. The header, footer, menu are very classic. Does anyone have any idea ? thanks for helping. __ Yahoo! Canada Toolbar: Search from anywhere on the web, and bookmark your favourite sites. Download it now http://ca.toolbar.yahoo.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Adding Json to existing action
You can either use Json plugin or write your own customized result type that return JSON. --- On Tue, 10/27/09, Michael Varlik m.var...@gmx.de wrote: From: Michael Varlik m.var...@gmx.de Subject: Adding Json to existing action To: user@struts.apache.org Received: Tuesday, October 27, 2009, 1:07 PM Hi, I need to call an existing struts action within my application from a JavaScript function. I thought it might be possible to create an additional entry in the struts mapping file like this: action name=getDataJson class=com.mypackage.MyAction method=getData result type=json / /action and then call the action with getDataJson.action. Unfortunately, when I try this a NullPointerException occurs in the action code. It seems, some parameters are not properly initialized. What I'd like to know is: what is the recommendet way of calling an existing action to get JSON results? Is it a good idea to do this at all? Cheers, Markus -- Neu: GMX DSL bis 50.000 kBit/s und 200,- Euro Startguthaben! http://portal.gmx.net/de/go/dsl02 - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org __ Looking for the perfect gift? Give the gift of Flickr! http://www.flickr.com/gift/ - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: RE: Adding Json to existing action
What I meant was either to use Json Plugin for struts 2. Read the following Wiki page: http://cwiki.apache.org/WW/json-plugin.html The JSON plugin is bundled with Struts since 2.1.7. Or you can write your customized Struts 2 Result type for JSON and register it in your struts2.xml for use [does not make sense to do that if you are using 2.1.7+]. To learn how to do that, take a look at the a sample provided in struts 2 in action. That should do it as well. Hope this helps. --- On Tue, 10/27/09, Michael Varlik m.var...@gmx.de wrote: From: Michael Varlik m.var...@gmx.de Subject: Re: RE: Adding Json to existing action To: Struts Users Mailing List user@struts.apache.org Received: Tuesday, October 27, 2009, 3:50 PM I just noticed a mistake I made. When adding the parameter to the result I also have to add a getJsonData() method to the action, right? I have added this method which actually calls execute(). Now I don't get null as a result anymore but I get success which is also not what I expected. I guess I have missed something. Since this is the first time I use struts, I have no idea what I did wrong. Any hints are appreciated. Cheers, Markus Original-Nachricht Datum: Tue, 27 Oct 2009 16:09:25 +0100 Von: Michael Varlik m.var...@gmx.de An: Struts Users Mailing List user@struts.apache.org, user@struts.apache.org Betreff: Re: RE: Adding Json to existing action Thanks for that hint. I have extended my mapping by adding param name=rootjsonData/param to my action mapping's result tag. Now I don't get any Exception and the server log looks just fine. However, the value returned by the action is just null. Do you have any idea what could be wrong here? Cheers, Markus Original-Nachricht Datum: Tue, 27 Oct 2009 09:39:01 -0400 Von: Mike Baranski list-subscripti...@secmgmt.com An: \'Struts Users Mailing List\' user@struts.apache.org Betreff: RE: Adding Json to existing action I do this to pass parameters, using prototype js: s:set name=foo value=%{'door' + door.id}/ s:set name=form_name value=%{'form_door' + door.id}/ s:set name=door_description value=getText(#foo)/ s:if test=door.state == 1 s:url id=door_url action=unlocks:param name=door.id value=door.id//s:url s:form method=POST action=unlock id=%{#form_name} onsubmit=return false; s:hidden name=door.id/ s:hidden name=door.state/ s:url var=locked_image value=/pages/door-control/images/locked.png / s:submit type=image alt=Locked src=%{locked_image} onclick=%{'new Ajax.Updater(\\'' + #foo +'\\', \\'' + #door_url + '\\', {evalScripts: true}); return false;'}/ /s:form /s:if -Original Message- From: Struts Two [mailto:struts...@yahoo.ca] Sent: Tuesday, October 27, 2009 9:24 AM To: Struts Users Mailing List Subject: Re: Adding Json to existing action You can either use Json plugin or write your own customized result type that return JSON. --- On Tue, 10/27/09, Michael Varlik m.var...@gmx.de wrote: From: Michael Varlik m.var...@gmx.de Subject: Adding Json to existing action To: user@struts.apache.org Received: Tuesday, October 27, 2009, 1:07 PM Hi, I need to call an existing struts action within my application from a JavaScript function. I thought it might be possible to create an additional entry in the struts mapping file like this: action name=getDataJson class=com.mypackage.MyAction method=getData result type=json / /action and then call the action with getDataJson.action. Unfortunately, when I try this a NullPointerException occurs in the action code. It seems, some parameters are not properly initialized. What I'd like to know is: what is the recommendet way of calling an existing action to get JSON results? Is it a good idea to do this at all? Cheers, Markus -- Neu: GMX DSL bis 50.000 kBit/s und 200,- Euro Startguthaben! http://portal.gmx.net/de/go/dsl02 - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org __ Looking for the perfect gift? Give the gift of Flickr! http://www.flickr.com/gift/ - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
Re: Struts2 on Websphere 6.1 : 404 errors
Yes, it is. If you plan to turn on container security, you need another flag as well. --- On Fri, 10/16/09, Raghuveer.V raghuve...@infotechsw.com wrote: From: Raghuveer.V raghuve...@infotechsw.com Subject: Struts2 on Websphere 6.1 : 404 errors To: user@struts.apache.org Received: Friday, October 16, 2009, 1:03 PM Hi Struts2 Users, I have problem when deploying application struts2.1.6 application on Websphere6.1 which was succefully working on apache-tomcat-5.5.23. We have used configuration option to make it work as per information available in Websphere forums and Struts2 forums on my local websphere. Could you suggest is this the ONLY possible solution to make struts2 work on Websphere?. Initially we have received 404 errors. Servlet filter is not called for URL resources on WAS 6.1 , configuration option has been set in server The webcontainer custom property com.ibm.ws.webcontainer.invokefilterscompatibility was set to true as per below links. com.ibm.ws.webcontainer.invokefilterscompatibility=true Application Servers - server - Web Container Settings - Web Container - Custom Properties Goggle Refrence: struts2 +websphere +There is no Action mapped for namespace / and action name com.ibm.ws.webcontainer.invokefilterscompatibility+struts2+websphere http://www.ibm.com/developerworks/forums/thread.jspa?threadID=264848 http://www-01.ibm.com/support/docview.wss?rs=180 http://www-01.ibm.com/support/docview.wss?rs=180uid=swg1PK27620 uid=swg1PK27620 http://www.mail-archive.com/user@struts.apache.org/msg88798.html http://www.nabble.com/Struts2-on-Websphere-portal-6.1.0.0-td18761735.html Regards, Raghu __ Connect with friends from any web browser - no download required. Try the new Yahoo! Canada Messenger for the Web BETA at http://ca.messenger.yahoo.com/webmessengerpromo.php - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: warning from user@struts.apache.org
Can anyone says why am I getting this warning? What do you exactly mean messages from you have been bouncing? --- On Sun, 10/11/09, user-h...@struts.apache.org user-h...@struts.apache.org wrote: From: user-h...@struts.apache.org user-h...@struts.apache.org Subject: warning from user@struts.apache.org To: struts...@yahoo.ca Received: Sunday, October 11, 2009, 6:07 PM Hi! This is the ezmlm program. I'm managing the user@struts.apache.org mailing list. I'm working for my owner, who can be reached at user-ow...@struts.apache.org. Messages to you from the user mailing list seem to have been bouncing. I've attached a copy of the first bounce message I received. If this message bounces too, I will send you a probe. If the probe bounces, I will remove your address from the user mailing list, without further notice. I've kept a list of which messages from the user mailing list have bounced from your address. Copies of these messages may be in the archive. To retrieve a set of messages 123-145 (a maximum of 100 per request), send a short message to: user-get.123_...@struts.apache.org To receive a subject and author list for the last 100 or so messages, send a short message to: user-in...@struts.apache.org Here are the message numbers: 202661 --- Enclosed is a copy of the bounce message I received. Return-Path: Received: (qmail 58614 invoked for bounce); 29 Sep 2009 22:03:36 - Date: 29 Sep 2009 22:03:36 - From: mailer-dae...@apache.org To: user-return-2026...@struts.apache.org Subject: failure notice Hi. This is the qmail-send program at apache.org. I'm afraid I wasn't able to deliver your message to the following addresses. This is a permanent error; I've given up. Sorry it didn't work out. struts...@yahoo.ca: 67.195.168.31 failed after I sent the message. Remote host said: 554 delivery error: dd This account has been temporarily suspended. Please try again later. - mta193.mail.ac4.yahoo.com __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Servlet filter as front controller
I have mentioned this before in another thread that Struts2 is breaking Servlet specification 2.4 in this regard, but have heard no comment on it which means two things either I have a point or I am way off. In Servlet specification 2.4 filters are not supposed to be accessed directly as a resource. And anything other than a jsp page need to have a Servlet mapping in order to make it accessible (as per specification). Struts 1 had ActionServlet to which *.action or *.do mapping was done. This sort of deviation from sped is causing some folks issues when it comes to using some appservers that follow the spec and you have to resort to all sort of hacks to get around it. --- On Wed, 10/7/09, Arthur Neves arthu...@gmail.com wrote: From: Arthur Neves arthu...@gmail.com Subject: Re: Servlet filter as front controller To: Struts Users Mailing List user@struts.apache.org Received: Wednesday, October 7, 2009, 11:57 PM With the filter struts2 can intercept all request. I think it's more difficult to do thinks like, the namespace struct with a servlet,i dont have sure though. On Wed, Oct 7, 2009 at 2:58 PM, Unmesh joshi unmesh_jo...@hotmail.comwrote: Hi,Struts2 uses servlet filter org.apache.struts2.dispatcher.ng.filter.StrutsExecuteFilter as front controller, rather than having a servlet act as front controller. Is there any specific advantage of using servlet filter over servlet (as in struts 1.1)? Thanks,Unmesh _ Great events make grand headlines – read them all on MSN India http://in.msn.com __ Ask a question on any topic and get answers from real people. Go to Yahoo! Answers and share what you know at http://ca.answers.yahoo.com - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Servlet filter as front controller
Dummy servlet should do it (as mentioned by WES), I know this in case of WAS where you are going to create plugin-xml file for your HTTP server. Without a dummy servlet mapped to *.action or *.do, Http server would fail to route any request that is mapped to *.action or *.do in the filter. --- On Thu, 10/8/09, Wes Wannemacher w...@wantii.com wrote: From: Wes Wannemacher w...@wantii.com Subject: Re: Servlet filter as front controller To: Struts Users Mailing List user@struts.apache.org Received: Thursday, October 8, 2009, 1:15 PM I was thinking about this issue recently and wondered if simply mapping a do-nothing servlet to * would workaround this... I thought about trying it, but I only have tomcat and jetty handy for testing, and this doesn't seem to be an issue on either one. Although, a do-nothing servlet would probably solve the other problem of mapping welcome-files to index.action. -Wes On Thu, Oct 8, 2009 at 8:36 AM, Struts Two struts...@yahoo.ca wrote: I have mentioned this before in another thread that Struts2 is breaking Servlet specification 2.4 in this regard, but have heard no comment on it which means two things either I have a point or I am way off. In Servlet specification 2.4 filters are not supposed to be accessed directly as a resource. And anything other than a jsp page need to have a Servlet mapping in order to make it accessible (as per specification). Struts 1 had ActionServlet to which *.action or *.do mapping was done. This sort of deviation from sped is causing some folks issues when it comes to using some appservers that follow the spec and you have to resort to all sort of hacks to get around it. --- On Wed, 10/7/09, Arthur Neves arthu...@gmail.com wrote: From: Arthur Neves arthu...@gmail.com Subject: Re: Servlet filter as front controller To: Struts Users Mailing List user@struts.apache.org Received: Wednesday, October 7, 2009, 11:57 PM With the filter struts2 can intercept all request. I think it's more difficult to do thinks like, the namespace struct with a servlet,i dont have sure though. On Wed, Oct 7, 2009 at 2:58 PM, Unmesh joshi unmesh_jo...@hotmail.comwrote: Hi,Struts2 uses servlet filter org.apache.struts2.dispatcher.ng.filter.StrutsExecuteFilter as front controller, rather than having a servlet act as front controller. Is there any specific advantage of using servlet filter over servlet (as in struts 1.1)? Thanks,Unmesh _ Great events make grand headlines – read them all on MSN India http://in.msn.com __ Ask a question on any topic and get answers from real people. Go to Yahoo! Answers and share what you know at http://ca.answers.yahoo.com - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- Wes Wannemacher Head Engineer, WanTii, Inc. Need Training? Struts, Spring, Maven, Tomcat... Ask me for a quote! - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org __ Looking for the perfect gift? Give the gift of Flickr! http://www.flickr.com/gift/ - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Dojo trouble after upgrade
Dojo has been moved to a plugin in struts 2.1. There are more information on this on the struts 2 wiki site. You are much better of using dojo natively than the plugin [which you can call it an old hag now :) ] --- On Thu, 9/17/09, Scott Nesbitt scottnesb...@yahoo.com wrote: From: Scott Nesbitt scottnesb...@yahoo.com Subject: Dojo trouble after upgrade To: user@struts.apache.org Received: Thursday, September 17, 2009, 5:03 PM I upgraded from 2.0.6 to 2.1.6 and am experiencing pathing trouble with Dojo files. Before upgrade: script type=text/javascript src=../struts/simple/dojoRequire.js/script After upgrade: script language=JavaScript type=text/javascript src=/myApp/struts/ajax/dojoRequire.js/script Somehow /myApp is getting inserted into thepath instead of .. Anybody know of how this replacement happens? Is there a way to make it use the relative pathing? Thanks for any tips or pointers. Scott - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org __ Looking for the perfect gift? Give the gift of Flickr! http://www.flickr.com/gift/ - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Intermittent Session Problems in Strut2.
Do you log in to the system from two different client machines or you log in to both accounts using tabs of a same browser IE or firefox ? --- On Sun, 8/23/09, pankaj semwal semw...@gmail.com wrote: From: pankaj semwal semw...@gmail.com Subject: Intermittent Session Problems in Strut2. To: user@struts.apache.org Received: Sunday, August 23, 2009, 6:04 AM Hi List, I am facing a problem of session intermittent in Strut2.In Distributed environment when user A login and at the same time when user B login .The information are sharing .I tried but did not find the solution. Even the session Id are creating different for each user. I am setting the session as : Map session = ActionContext.getContext().getSession(); session.put(loginDetails, user); Please tell me where i am wrong. Please help me. __ Connect with friends from any web browser - no download required. Try the new Yahoo! Canada Messenger for the Web BETA at http://ca.messenger.yahoo.com/webmessengerpromo.php - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Migrating struts2 - Could not find property errors
Read the following link: http://cwiki.apache.org/S2WIKI/troubleshooting-guide-migrating-from-struts-20x-to-21x.html --- On Fri, 8/21/09, Raghuveer.V raghuve...@infotechsw.com wrote: From: Raghuveer.V raghuve...@infotechsw.com Subject: Migrating struts2 - Could not find property errors To: user@struts.apache.org Received: Friday, August 21, 2009, 1:40 PM I use following jars in my struts2 application. It is found following errors were shown in server console, Any other jar files missing? commons-fileupload-1.2.1 commons-io-1.3.2 commons-logging-1.1 freemarker-2.3.13 junit-3.8.1 ognl-2.6.11 spring-test-2.5.6 struts2-core-2.1.6 xwork-2.1.2 -- WARNING: Could not find property [actionErrors] Aug 21, 2009 4:40:09 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogg er warn WARNING: Could not find property [templateDir] Aug 21, 2009 4:44:53 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogg er warn WARNING: Could not find property [theme] Aug 21, 2009 4:44:53 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogg er warn WARNING: Could not find property [theme] Aug 21, 2009 4:44:53 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogg er warn WARNING: Could not find property [struts.actionMapping] __ Be smarter than spam. See how smart SpamGuard is at giving junk email the boot with the All-new Yahoo! Mail. Click on Options in Mail and switch to New Mail today or register for free at http://mail.yahoo.ca - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
s:actionmessage issue after upgrade to 2.1.6 (possible bug)
Before I migrate my struts application from 2.0.12 to 2.1.6 The following s:actionmessage cssClass=alert-go/ would generate: ul li span class=alert-stop You can not change your role to Agent. /span /li /ul which would display the message in the appropriate color defined by style sheet class However, after I have migrated my code to 2.1.6, the generated code looks like the following ul class=alert-stop lispanYou can not change your role to Agent./span/li /ul The style-sheet effect is gone and the text is always shown in black. The same thing happens for s:actionerror cssClass=alert-stop/ is there any way to fix this? __ Ask a question on any topic and get answers from real people. Go to Yahoo! Answers and share what you know at http://ca.answers.yahoo.com - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: s:actionmessage issue after upgrade to 2.1.6 (possible bug)
Thanks for the advice Wes. However; in this case I am bound to corporate provided style-sheet classes that I can not change. Based on your suggestion, I have to write a few lines of css to define my own classes and then go through every single page the uses s:actionmessage ... and s:actionerror.. to update the css classes. I was just hoping there was a simpler way without me changing all those pages after the upgrade --- On Fri, 8/21/09, Wes Wannemacher w...@wantii.com wrote: From: Wes Wannemacher w...@wantii.com Subject: Re: s:actionmessage issue after upgrade to 2.1.6 (possible bug) To: Struts Users Mailing List user@struts.apache.org Received: Friday, August 21, 2009, 7:40 PM Just add a selector so that your class applies to the span who's parent LI's parent UL has the class alert-go (or whatever class name you're specifying). -Wes On Fri, Aug 21, 2009 at 3:23 PM, Struts Twostruts...@yahoo.ca wrote: Before I migrate my struts application from 2.0.12 to 2.1.6 The following s:actionmessage cssClass=alert-go/ would generate: ul li span class=alert-stop You can not change your role to Agent. /span /li /ul which would display the message in the appropriate color defined by style sheet class However, after I have migrated my code to 2.1.6, the generated code looks like the following ul class=alert-stop lispanYou can not change your role to Agent./span/li /ul The style-sheet effect is gone and the text is always shown in black. The same thing happens for s:actionerror cssClass=alert-stop/ is there any way to fix this? __ Ask a question on any topic and get answers from real people. Go to Yahoo! Answers and share what you know at http://ca.answers.yahoo.com - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- Wes Wannemacher Head Engineer, WanTii, Inc. Need Training? Struts, Spring, Maven, Tomcat... Ask me for a quote! - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org __ Make your browsing faster, safer, and easier with the new Internet Explorer® 8. Optimized for Yahoo! Get it Now for Free! at http://downloads.yahoo.com/ca/internetexplorer/ - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Anyone using the Ajaxtags with Struts 2
I have used it in one my applications. It is pretty simple and straigtforward. However, you are limited to the few tags provided. Not to mention that accessibility is a big issue. I just recently moved a projed to production using native dojo 1.3.2 and struts 2 and it is awesome. I tested it with screen reader (JAWS) including a few visually impaired gentlemen and they could interact and work with dojo dijits with their screen readers. regards, --- On Tue, 8/18/09, stanlick stanl...@gmail.com wrote: From: stanlick stanl...@gmail.com Subject: Anyone using the Ajaxtags with Struts 2 To: user@struts.apache.org Received: Tuesday, August 18, 2009, 5:21 PM I am trying to leverage the http://ajaxtags.sourceforge.net/ AjaxTags and would like to see if anyone here might have tips before tearing in. I realize this might not be the best venue for the question, but hey, It's Struts 2 sort of. Peace, Scott -- View this message in context: http://www.nabble.com/Anyone-using-the-Ajaxtags-with-Struts-2-tp25029536p25029536.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org __ Looking for the perfect gift? Give the gift of Flickr! http://www.flickr.com/gift/ - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Why submit didn't support param
why do n't you define a form and make your a href=.. tag submit the form, in this way you can submit any number of params you want something like form id=myFormId action=.action input name=x1 type... / input name=x2 type... / . /form a href=javascript:(document.getElementById('myFormId')).submit().../a in this way, each of your link acts like a submit button that posts a form that includes user's origional selection and any other thing that you want. --- On Wed, 8/19/09, jun hua ar3...@gmail.com wrote: From: jun hua ar3...@gmail.com Subject: Re: Why submit didn't support param To: Struts Users Mailing List user@struts.apache.org Received: Wednesday, August 19, 2009, 12:50 AM Hi, Wielgus, Thanks! Man, That sounds great! Actually I hope struts2 can provide us something like s:submit action=Actionname.action?param=123123 / or s:submit action=Actionname.action param name=name value=value/s:submit. It's not the first time I got frustrated by such kind of problem. Actually I found struts2 can support s:submit action=Actionname!methodname /. the String can be parsed without any problem in the source code ~_~ Frank 2009/8/18 Paweł Wielgus poulw...@gmail.com Hi Frank, submit should be inside form, and inside form You can add hidden to add any information You like to differ from which line/id/identificator this submit was pressed. So the simplest way to achieve it is to add form for every row. Another solution is to use indexed properties with one form, but that's another story. Best greetings, Paweł Wielgus. 2009/8/18 BlackKnight ar3...@gmail.com: Hi, Just currious y struts didn't support s:param in s:submit I am having a problem: A list of controls are produced using iterator, user can remove each of them by clicking submit near each of them. If i use s:url, i can send the id of the row via param, but the data user has inputed will be lost! Also the iterator will be empty! If I use s:submit I have no way to know which row the control is located! Are trying to modify the struts2 source code! but it's really really a mess for a beginer like me!! Any suggestions?! Frank - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org __ Looking for the perfect gift? Give the gift of Flickr! http://www.flickr.com/gift/ - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
[S2]OgnlValueStack warnings after upgrade struts 2.1.6
Much has been said about this issue both on Struts 2.1 migration Wiki page and previous emails on this subject on how to turn them off by putting a new limit category in log4j.xml. Some folks ,like me, do not use log4j and use only apache logging [apache-logging-xxx.jar]. Is there any other way, like setting a constant in struts.xml that can kill those darn messages at the application level. I have managed to turn them off by setting filters at the server level but this means all struts applications on the server would have theirs filtered and other S2 application owners on the same server may not consider those messages darn annoying after all. __ Looking for the perfect gift? Give the gift of Flickr! http://www.flickr.com/gift/ - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: [ S2 Tags ] : Need help - Line breaks etc.
Use simple theme and then you can use html constructs to format you page. --- On Wed, 7/29/09, Mickey Kumra mickey_ku...@infosys.com wrote: From: Mickey Kumra mickey_ku...@infosys.com Subject: [ S2 Tags ] : Need help - Line breaks etc. To: user@struts.apache.org user@struts.apache.org Received: Wednesday, July 29, 2009, 2:14 PM Hi I am using Struts2 and need to insert line breaks between items while displaying options with s:checkboxlist, s:radio etc. I am unable to figure out a way to achieve this. Would this require manipulation of some templates? If yes, how do I go about doing it? On similar lines, how can I control the structure of the page generated using Struts2 tags? Thanks in advance. Thanks Regards ---Mickey Kumra___ __ Looking for the perfect gift? Give the gift of Flickr! http://www.flickr.com/gift/ - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: EJB Injection in Interceptor
You can either use Spring or implement your own EJB3 interceptor. Though I use my own EJB3 interceptor, I believe the best option is to go with Spring. Google Juice can also be option on the table as well. --- On Thu, 7/30/09, Robin Mannering ro...@mtndesigns.co.uk wrote: From: Robin Mannering ro...@mtndesigns.co.uk Subject: Re: EJB Injection in Interceptor To: Struts Users Mailing List user@struts.apache.org Received: Thursday, July 30, 2009, 6:17 AM Just to clear up my actual question from the thread below as feedback has run dry unfortunately. Is there anybody working daily with Struts 2 and EJB 3.0? If so, what is the best way to obtain local references to EJB 3 session beans from within Struts 2 action classes? Thanks for any thoughts on this subject. Robin Mannering wrote: Just wondering if the below thread has gone any further. After creating another thread on the same subject at an earlier date, we discussed using the EJB plugin here: http://cwiki.apache.org/S2PLUGINS/ejb3-plugin.html However, having started to use this plugin so that I can reference stateless session beans, it seems that all EJB Session bean classes must be defined as @Remote rather than @Local in order for the injection to obtain the references correctly. Failure to specify them as remote throws a javax.naming.NameNotFoundException. However, reading from a book entitled Pro EJB 3.0, the following performance issues are mentioned in relation to using @Remote when @Local is available. Hopefully this link will work for you. http://books.google.co.uk/books?id=fVCuB_Xq3pACpg=PA40lpg=PA40dq=Making+an+interface+remote+has+consequencessource=blots=Bg9DdpVAWWsig=vxrumZhYLhjmqbt6bdMJ96hrY7shl=enei=QIdtStuLC-WhjAf34KGeCwsa=Xoi=book_resultct=resultresnum= So, the problem is : How can we obtain references to EJB 3 session beans from within Struts 2 action classes? I'd be very interested to hear your thoughts. Thanks Robin Nathan Schulte wrote: Wes Wannemacher wesw at wantii.com writes: Seems to me that my idea to create an ObjectFactory based plugin ... needs to pick up some steam. I only have one question for the EJB users out there... Do you guys need Spring integration as well? To answer your question, _I_ personally don't need Spring integration. I've never used Spring, and for this project, it was too much overhead to learn (on top of Java EE, the JPA, Hibernate intricacies, Struts2...), and from what I understand, it seemed like using it and S2 together provided duplicate functionality (another topic altogether...). On another note, I find it awesome that the community (or whatever group you're part of) is so willing to provide support. I mean, in my eyes, this is something that I could see myself writing to make my coding easier, it's just that given my situation, it's easier to use the workaround. Admittedly, I'm not very familiar with JEE5. Some of this is still black magic, and I don't fully understand the issue, I just know enough to understand that the architecture permits it as an issue (and not everyone is just blowing smoke my way) and can leave all of the intricate details be, as they don't directly affect my project. -Nate - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.387 / Virus Database: 270.13.20/2248 - Release Date: 07/19/09 05:57:00 No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.392 / Virus Database: 270.13.31/2265 - Release Date: 07/26/09 17:59:00 __ Looking for the perfect gift? Give the gift of Flickr! http://www.flickr.com/gift/ - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
[S1.3.10] Apache Tiles fail
I have been trying to start a new project using struts 1.3.10 on Websphere V6.1. However, I have been unable to make tiles work with struts 1.3 . I get an exception as follows: Stack Dump = java.io.FileNotFoundException: mainPage .. I have downgraded to strtus 1.2.9 and everything is working as expected. My two cents are this can be one of those Websphere bugs [similar to the one I experienced sometime ago when I used Struts 2.1.x]. However, to be on the safe side, I am asking struts user group to see if anyone else has experienced the samething on Websphere [probably found a way around it] or not? __ Make your browsing faster, safer, and easier with the new Internet Explorer® 8. Optimized for Yahoo! Get it Now for Free! at http://downloads.yahoo.com/ca/internetexplorer/ - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: [S1.3.10] Apache Tiles fail
Antonio: Thank you for the url, I was missing the tiles config. It would be great if information related to struts 1.3 is put under user guide for struts 1.3 as I started with 1.3.10 blank.war. Once again, thanks for the url. --- On Fri, 7/17/09, Antonio Petrelli antonio.petre...@gmail.com wrote: From: Antonio Petrelli antonio.petre...@gmail.com Subject: Re: [S1.3.10] Apache Tiles fail To: Struts Users Mailing List user@struts.apache.org Received: Friday, July 17, 2009, 1:03 PM 2009/7/17 Struts Two struts...@yahoo.ca: I have been trying to start a new project using struts 1.3.10 on Websphere V6.1. However, I have been unable to make tiles work with struts 1.3 . I get an exception as follows: Stack Dump = java.io.FileNotFoundException: mainPage See: http://wiki.apache.org/struts/StrutsUpgradeNotes12to13 at the 4.3 Tiles section. Antonio - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org __ The new Internet Explorer® 8 - Faster, safer, easier. Optimized for Yahoo! Get it Now for Free! at http://downloads.yahoo.com/ca/internetexplorer/ - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
RE: how to configure struts2 for /*.action?
Let's say you have /*.action as your filter URL and you have Websphere application server and IBM Http server as your webserver. Once you try to generate your plugin file for http server, *.action is not picked up by WAS as filter are ignored [since they are not supposed be accessed directly for resource as specified by spec]. To make the long story short, all your requests for *.action would fail. To fix the issue, you may want to create a dummuy servlet and have *.action as servlet URL. This also would work for any other appserver that may face a similar issue. --- On Thu, 7/16/09, ravi_eze ravichand...@ivycomptech.com wrote: From: ravi_eze ravichand...@ivycomptech.com Subject: RE: how to configure struts2 for /*.action? To: user@struts.apache.org Received: Thursday, July 16, 2009, 6:04 AM hi, can you give some exampels for which u had to put hacks? We will test those parts explicitly. -- ravi -- View this message in context: http://www.nabble.com/how-to-configure-struts2-for--*.action--tp24481000p24510603.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org __ Make your browsing faster, safer, and easier with the new Internet Explorer® 8. Optimized for Yahoo! Get it Now for Free! at http://downloads.yahoo.com/ca/internetexplorer/ - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
RE: how to configure struts2 for /*.action?
Just keep in mind by setting /*.action for your struts filter url, you may cause yourself some problems down the road depending on the app server you use, as struts 2 is not following servlet 2.4 spec in this regard. filters are not supposed to be accessed directly as a resource according to the spec. I myself have been experiencing some issues for a similar case like this one and had to resort various hacks to get around it. --- On Wed, 7/15/09, Martin Gainty mgai...@hotmail.com wrote: From: Martin Gainty mgai...@hotmail.com Subject: RE: how to configure struts2 for /*.action? To: Struts Users Mailing List user@struts.apache.org Received: Wednesday, July 15, 2009, 9:21 PM look at a working example.. showcase contain these *.action entries in /WEB-INF/web.xml servlet servlet-namefaces/servlet-name servlet-classjavax.faces.webapp.FacesServlet/servlet-class load-on-startup1/load-on-startup /servlet servlet servlet-nameJspSupportServlet/servlet-name servlet-classorg.apache.struts2.views.JspSupportServlet/servlet-class load-on-startup1/load-on-startup /servlet !-- JavaServer Faces Servlet Mapping, not called directly -- servlet-mapping servlet-namefaces/servlet-name url-pattern*.action/url-pattern /servlet-mapping Martin __ Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen. Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni. Date: Wed, 15 Jul 2009 16:29:04 -0400 From: newton.d...@yahoo.com To: user@struts.apache.org Subject: Re: how to configure struts2 for /*.action? ravi_eze wrote: We are not serving static content. Not *you*, *Struts 2*. What will happen if i do *.action? Why did the doc say /* *should* be in web.xml? Because of what you've already been told a couple of times now. Dave - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org _ Hotmail® has ever-growing storage! Don’t worry about storage limits. http://windowslive.com/Tutorial/Hotmail/Storage?ocid=TXT_TAGLM_WL_HM_Tutorial_Storage_062009 __ Ask a question on any topic and get answers from real people. Go to Yahoo! Answers and share what you know at http://ca.answers.yahoo.com - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Struts1.3.10 and command chains
Prior to struts 1.3, If I wanted to load my catalog (say catalog.xml) file (which had all the business logic in chains for my app), I had to add the followings to my web.xml: context-param description/description param-nameorg.apache.commons.chain.CONFIG_CLASS_RESOURCE/param-name param-valueresources/catalog.xml/param-value /context-param listener descriptionChain Listener/description display-nameChain Listener/display-name listener-classorg.apache.commons.chain.web.ChainListener/listener-class /listener In struts 1.3.10 request processing cycle is rewritten using command chains and the jar file is part of struts apps. I was wondering if I want to load my own catalog [in which I have the list of all chains that runs my business logic], do I have to add ChainListener and CONFIG_CLASS_RESOURCE context parameter to my web.xml to be able to load my chain or command as follows: Catalog catalog = CatalogFactory.getInstance().getCatalog(); Command command = catalog.getCommand(runTivoliCPUAVG); __ Yahoo! Canada Toolbar: Search from anywhere on the web, and bookmark your favourite sites. Download it now http://ca.toolbar.yahoo.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Struts FilterDispatcher issue with regard to specification 2.4
I think I was not very clear on what I meant by plugin. I would try to be more precise as some struts users have been experiencing the same problem and IBM has pointed out this is due Struts not conforming with 2.4 Spec. Almost all production and staging environments using Websphere Application server have an (IBM) Http server that runs in front of Websphere. Requests that come to (IBM) Http Server are dispatched to either Websphere (dynamic content) or a resource on a file system. Http server uses a special xml file named plugin.xml to make that decision. This file is generated by Websphere application servers by parsing web.xml of deployed applications. Now, If we have the following entry in the web.xml: servlet servlet-nameaction/servlet-name servlet-classorg.apache.struts.action.ActionServlet/servlet-class /servlet servlet-mapping servlet-nameaction/servlet-name url-pattern*.do/url-pattern /servlet-mapping A corresponding entry for context-root/*.do is created in the plugin file [as per spec 2.4 (Servlets can be accessed directly as resource)] and https(s)://hostname/context-root/*.do requests are correctly dispatched to Websphere container However, if you have an entry like[as in struts 2.0 or StrutsPrepareAndExecuteFilter in 2.1] : filter filter-namestruts2/filter-name filter-classorg.apache.struts2.dispatcher.FilterDispatcher/filter-class /filter filter-mapping filter-namestruts2/filter-name url-pattern/*.do/url-pattern /filter-mapping This will be ignored during plugin.xml file generation as per 2.4 spec filters are not supposed to be accessed directly as a resource. This will result in Page not found error in http(s)://hostname/context-root/*.do. --- On Tue, 6/23/09, Struts Two struts...@yahoo.ca wrote: From: Struts Two struts...@yahoo.ca Subject: Struts FilterDispatcher issue with regard to specification 2.4 To: user@struts.apache.org Received: Tuesday, June 23, 2009, 8:07 PM Hello All: In Servlet specification 2.4 filters are not supposed to be accessed directly as a resource. And anything other than a jsp page need to have a Servlet mapping in order to make it accessible (as per specification). Struts 1 had ActionServlet which allowed for servlet mapping of *.action or *.do which could in turn be picked up by Websphere Applicton Server duing plugin generation to be used for http webserver. However, in struts 2 filter mapping for *.action or *.do will not work anymore during plugin generation as it is not supported per 2.4 specification. This would make the application unaccessible though Http server. I was wondering if someone can explain to me the rational to use DispatchFilter as opposed to a DispatchServlet in struts 2. __ Looking for the perfect gift? Give the gift of Flickr! http://www.flickr.com/gift/ - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org __ Ask a question on any topic and get answers from real people. Go to Yahoo! Answers and share what you know at http://ca.answers.yahoo.com - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Struts FilterDispatcher issue with regard to specification 2.4
Hello All: In Servlet specification 2.4 filters are not supposed to be accessed directly as a resource. And anything other than a jsp page need to have a Servlet mapping in order to make it accessible (as per specification). Struts 1 had ActionServlet which allowed for servlet mapping of *.action or *.do which could in turn be picked up by Websphere Applicton Server duing plugin generation to be used for http webserver. However, in struts 2 filter mapping for *.action or *.do will not work anymore during plugin generation as it is not supported per 2.4 specification. This would make the application unaccessible though Http server. I was wondering if someone can explain to me the rational to use DispatchFilter as opposed to a DispatchServlet in struts 2. __ Looking for the perfect gift? Give the gift of Flickr! http://www.flickr.com/gift/ - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
RE: (PROBLEM SOLVED) WAS 6.1: There is no Action mapped for namespace / and action name j_security_check
Not anything that I am aware of. --- On Fri, 6/5/09, Mitchell, Steven steven.mitch...@umb.com wrote: From: Mitchell, Steven steven.mitch...@umb.com Subject: RE: (PROBLEM SOLVED) WAS 6.1: There is no Action mapped for namespace / and action name j_security_check To: Struts Users Mailing List user@struts.apache.org Received: Friday, June 5, 2009, 1:54 PM Changing my mapping to url-pattern*.action/url-pattern broke my submit buttons. I had to add .action to my form action parameter (action=myAction.action). Is there some other setting to accomplish the same thing? -Original Message- From: Struts Two [mailto:struts...@yahoo.ca] Sent: Thursday, June 04, 2009 7:15 PM To: Struts Users Mailing List Subject: Re: (PROBLEM SOLVED) WAS 6.1: There is no Action mapped for namespace / and action name j_security_check Finally, the problem with form based authentication got resovled. However; here is a summary of what happens that we get the error: There is no Action mapped for namespace / and actionName j_security_check With form-based authentication, Websphere authenticates a user by using URI hostname/context-root/j_security_check. Due to the fact that in struts 2.1 default action extension list (struts.action.extension) has changed from just 'action' to 'action' plus , j_security_check is mistaken as an struts action. Line: config = configuration.getRuntimeConfiguration().getActionConfig(namespace, actionName); in class com.opensymphony.xwork2.DefaultActionProxy located in method prepare() returns null for actionName j_security_check and consquently no mapping error is displayed. Solution: as described in migration guide in the following link [which makes it clear why everything in struts 2.0 works but not struts 2.1]: http://cwiki.apache.org/S2WIKI/troubleshooting-guide-migrating-from-stru ts-20x-to-21x.html Add the following to your struts.xml constant name=struts.action.extension value=action / and then in your web.xml, change: filter-mapping filter-namestruts2/filter-name url-pattern/*/url-pattern /filter-mapping TO filter-mapping filter-namestruts2/filter-name url-pattern*.action/url-pattern /filter-mapping The form based authentication works just like basic authentication. You still need to have the following properties set: com.ibm.ws.webcontainer.assumefiltersuccessonsecurityerror = true com.ibm.ws.webcontainer.invokefilterscompatibility = true __ Reclaim your name @ymail.com or @rocketmail.com. Get your new email address now! Go to http://ca.promos.yahoo.com/jacko/ - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- NOTICE: This electronic mail message and any attached files are confidential. The information is exclusively for the use of the individual or entity intended as the recipient. If you are not the intended recipient, any use, copying, printing, reviewing, retention, disclosure, distribution or forwarding of the message or any attached file is not authorized and is strictly prohibited. If you have received this electronic mail message in error, please advise the sender by reply electronic mail immediately and permanently delete the original transmission, any attachments and any copies of this message from your computer system. Thank you. == - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org __ Looking for the perfect gift? Give the gift of Flickr! http://www.flickr.com/gift/ - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
RE: Adding Struts 2.1.6 on WAS 6.1 breaks welcome-file in web.xml
This is weird, as basic authentication works for me and I have got no problem with it. Anyways,Earlier today, I sent my Struts enterprise file to WAS Level 3 support for testing [form based authentication] and I will keep you posted as soon as I hear sth. __ Ask a question on any topic and get answers from real people. Go to Yahoo! Answers and share what you know at http://ca.answers.yahoo.com - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: (PROBLEM SOLVED) WAS 6.1: There is no Action mapped for namespace / and action name j_security_check
Finally, the problem with form based authentication got resovled. However; here is a summary of what happens that we get the error: There is no Action mapped for namespace / and actionName j_security_check With form-based authentication, Websphere authenticates a user by using URI hostname/context-root/j_security_check. Due to the fact that in struts 2.1 default action extension list (struts.action.extension) has changed from just 'action' to 'action' plus , j_security_check is mistaken as an struts action. Line: config = configuration.getRuntimeConfiguration().getActionConfig(namespace, actionName); in class com.opensymphony.xwork2.DefaultActionProxy located in method prepare() returns null for actionName j_security_check and consquently no mapping error is displayed. Solution: as described in migration guide in the following link [which makes it clear why everything in struts 2.0 works but not struts 2.1]: http://cwiki.apache.org/S2WIKI/troubleshooting-guide-migrating-from-struts-20x-to-21x.html Add the following to your struts.xml constant name=struts.action.extension value=action / and then in your web.xml, change: filter-mapping filter-namestruts2/filter-name url-pattern/*/url-pattern /filter-mapping TO filter-mapping filter-namestruts2/filter-name url-pattern*.action/url-pattern /filter-mapping The form based authentication works just like basic authentication. You still need to have the following properties set: com.ibm.ws.webcontainer.assumefiltersuccessonsecurityerror = true com.ibm.ws.webcontainer.invokefilterscompatibility = true __ Reclaim your name @ymail.com or @rocketmail.com. Get your new email address now! Go to http://ca.promos.yahoo.com/jacko/ - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
RE: (PROBLEM SOLVED) WAS 6.1: There is no Action mapped for namespace / and action name j_security_check
I had a PMR open with IBM and L3 support pointed me to the right direction by sifting through the logs. --- On Fri, 6/5/09, Martin Gainty mgai...@hotmail.com wrote: From: Martin Gainty mgai...@hotmail.com Subject: RE: (PROBLEM SOLVED) WAS 6.1: There is no Action mapped for namespace / and action name j_security_check To: Struts Users Mailing List user@struts.apache.org Received: Friday, June 5, 2009, 12:47 AM Did you get a chance to contact IBM to apprise them of this solution? Félicitations sur ce travail le plus excellent ! Martin __ Note de déni et de confidentialité Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni. Date: Thu, 4 Jun 2009 17:15:06 -0700 From: struts...@yahoo.ca Subject: Re: (PROBLEM SOLVED) WAS 6.1: There is no Action mapped for namespace / and action name j_security_check To: user@struts.apache.org Finally, the problem with form based authentication got resovled. However; here is a summary of what happens that we get the error: There is no Action mapped for namespace / and actionName j_security_check With form-based authentication, Websphere authenticates a user by using URI hostname/context-root/j_security_check. Due to the fact that in struts 2.1 default action extension list (struts.action.extension) has changed from just 'action' to 'action' plus , j_security_check is mistaken as an struts action. Line: config = configuration.getRuntimeConfiguration().getActionConfig(namespace, actionName); in class com.opensymphony.xwork2.DefaultActionProxy located in method prepare() returns null for actionName j_security_check and consquently no mapping error is displayed. Solution: as described in migration guide in the following link [which makes it clear why everything in struts 2.0 works but not struts 2.1]: http://cwiki.apache.org/S2WIKI/troubleshooting-guide-migrating-from-struts-20x-to-21x.html Add the following to your struts.xml constant name=struts.action.extension value=action / and then in your web.xml, change: filter-mapping filter-namestruts2/filter-name url-pattern/*/url-pattern /filter-mapping TO filter-mapping filter-namestruts2/filter-name url-pattern*.action/url-pattern /filter-mapping The form based authentication works just like basic authentication. You still need to have the following properties set: com.ibm.ws.webcontainer.assumefiltersuccessonsecurityerror = true com.ibm.ws.webcontainer.invokefilterscompatibility = true __ Reclaim your name @ymail.com or @rocketmail.com. Get your new email address now! Go to http://ca.promos.yahoo.com/jacko/ - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org _ Hotmail® has ever-growing storage! Don’t worry about storage limits. http://windowslive.com/Tutorial/Hotmail/Storage?ocid=TXT_TAGLM_WL_HM_Tutorial_Storage_062009 __ The new Internet Explorer® 8 - Faster, safer, easier. Optimized for Yahoo! Get it Now for Free! at http://downloads.yahoo.com/ca/internetexplorer/ - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
RE: Adding Struts 2.1.6 on WAS 6.1 breaks welcome-file in web.xml
Can you explain why index.html would work and index.jsp would not? I got welcome-fileindex.html/welcome-file to work Quite frankly, I do not know. I never had this problem when I was using struts 1. I could do something like this in my welcome file [which would invoke an action instead]: welcome-fileindex.do/welcome and entering http://hostname/context worked. However, switching to struts 2, I have had the same problem as yours with http://hostname/context. Since I found a work-around with the sample index.html, I never bothered to see why, as I had much bigger issues [basic and form based] authentication issues with WAS and struts 2.1.x . I had basic authentication resolved and now working on form-based. I do not see why index.html failed when you enabled security as it just merely redirects to index.jsp to which you have ;otherwise; preferred to go directly. __ Make your browsing faster, safer, and easier with the new Internet Explorer® 8. Optimized for Yahoo! Get it Now for Free! at http://downloads.yahoo.com/ca/internetexplorer/ - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
RE: Adding Struts 2.1.6 on WAS 6.1 breaks welcome-file in web.xml
I am running Websphere 6.1.0.23 and Basic authentication works for me with the following two properties set: com.ibm.ws.webcontainer.assumefiltersuccessonsecurityerror = true com.ibm.ws.webcontainer.invokefilterscompatibility = true Can you apply fixpack 23 and test? I had two PMRs closed a few weeks ago to have basic authentication work on WAS V6.1 and WAS V7. __ Be smarter than spam. See how smart SpamGuard is at giving junk email the boot with the All-new Yahoo! Mail. Click on Options in Mail and switch to New Mail today or register for free at http://mail.yahoo.ca - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: WAS 6.1: There is no Action mapped for namespace / and action name j_security_check
That is why I asked you if you are using Form-based authentication or Basic authentication. And I got no reply. However, looking at ur logs, esp the message: There is no Action mapped for namespace / and action name j_security_check Now I know that your are using Form-based authentication.Unfortunately, I have to say that Form-based authentication with struts 2.1.x does not work either on WAS V6.1/V7.0.0.x. I am currently working with Websphere support on this issue. I keep you posted [if interested] once I have a solution at hand.However, You can switch to Basicauthentication for the time being till a solution is available. To use Basic authentication, you need to set the following custom property for your server [ONLY WEBSPHERE V6.1, WAS 7 STILL HAS ISSUES and different solution] com.ibm.ws.webcontainer.assumefiltersuccessonsecurityerror true without this property, basic authentication fails on V6.1 as well. You also need to have this property set to be able to run struts 2.1.x on WASV6.1 [you do not need this for V7]: com.ibm.ws.webcontainer.invokefil=terscompatibility true __ Looking for the perfect gift? Give the gift of Flickr! http://www.flickr.com/gift/ - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Adding Struts 2.1.6 on WAS 6.1 breaks welcome-file in web.xml
Typing http://servername/context/ results in Error 404: There is no Action mapped for namespace / and action name . To fix this issue, modify your welcome part of web.xml, welcome-file-list welcome-fileindex.html/welconpme-file /welcome-file-list create an index.html with the following content: !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.0 Transitional//EN html head META HTTP-EQUIV=Refresh CONTENT=0;URL=index.action /head body pLoading .../p /body /html Then typing http://servername/context/ should work. __ Be smarter than spam. See how smart SpamGuard is at giving junk email the boot with the All-new Yahoo! Mail. Click on Options in Mail and switch to New Mail today or register for free at http://mail.yahoo.ca - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
RE: Struts 2 dispatcher does not see namespace and action in URL
Do you have Basic or Form based authentication enabled in your web.xml? --- On Tue, 5/26/09, Mitchell, Steven steven.mitch...@umb.com wrote: From: Mitchell, Steven steven.mitch...@umb.com Subject: RE: Struts 2 dispatcher does not see namespace and action in URL To: Struts Users Mailing List user@struts.apache.org Received: Tuesday, May 26, 2009, 3:33 PM I found a post about setting com.ibm.ws.webcontainer.invokefilterscompatibility = true, but it made no difference. The namespace and action name are still getting dropped before reaching Struts. Since it works find on Tomcat 5.5, I suspect com.ibm.ws.webcontainer.filter.FilterInstanceWrapper, com.ibm.ws.webcontainer.filter.WebAppFilterChain, or com.ibm.ws.wswebcontainer.filter.WebAppFilterManager simply because they are the previous three classes in the stack trace. I'll keep Googling. Any other ideas? -Original Message- From: Mitchell, Steven [mailto:steven.mitch...@umb.com] Sent: Tuesday, May 26, 2009 8:23 AM To: user@struts.apache.org Subject: Struts 2 dispatcher does not see namespace and action in URL I have a Struts 2 application that runs fine under Tomcat 5.5 that will not run on a fully patched version of WebSphere 6.1. The application index.jsp page redirects to a mapped namespace and action, yet the Struts 2 dispatcher does not see the namespace or action. It issues the message There is no Action mapped for namespace / and action name . Note that the namespace and action name are missing. I have also tried manually typing a full URL containing a namespace and action, yet I get the same error message missing the namespace and action name. This has never happened on Tomcat 5.5 where the application functions normally. Has anybody run into this issue deploying an application on WebSphere? It happens with Struts 2.1.2, 2.1.3 snapshot, and 2.1.6. I'm out of ideas. [5/21/09 16:52:06:743 CDT] 002c XmlConfigurat I com.opensymphony.xwork2.util.logging.commons.CommonsLogger info Parsing configuration file [struts.xml] [5/21/09 16:52:07:101 CDT] 002c StrutsSpringO I com.opensymphony.xwork2.util.logging.commons.CommonsLogger info Initializing Struts-Spring integration... [5/21/09 16:52:07:113 CDT] 002c SpringObjectF I com.opensymphony.xwork2.util.logging.commons.CommonsLogger info Setting autowire strategy to name [5/21/09 16:52:07:111 CDT] 002c StrutsSpringO I com.opensymphony.xwork2.util.logging.commons.CommonsLogger info ... initialized Struts-Spring integration successfully [5/21/09 16:52:08:817 CDT] 002c Dispatcher W com.opensymphony.xwork2.util.logging.commons.CommonsLogger warn Could not find action or result There is no Action mapped for namespace / and action name . - [unknown location] at com.opensymphony.xwork2.DefaultActionProxy.prepare(DefaultActionProxy.ja va:177) at org.apache.struts2.impl.StrutsActionProxy.prepare(StrutsActionProxy.java :61) at org.apache.struts2.impl.StrutsActionProxyFactory.createActionProxy(Strut sActionProxyFactory.java:39) at com.opensymphony.xwork2.DefaultActionProxyFactory.createActionProxy(Defa ultActionProxyFactory.java:47) at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:4 57) at org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher .java:395) at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInst anceWrapper.java:190) at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterCh ain.java:130) at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterC hain.java:87) at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilter Manager.java:832) at com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppF ilterManager.java:742) at com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppF ilterManager.java:695) at com.ibm.ws.wswebcontainer.filter.WebAppFilterManager.invokeFilters(WebAp pFilterManager.java:101) at com.ibm.ws.webcontainer.extension.DefaultExtensionProcessor.invokeFilter s(DefaultExtensionProcessor.java:818) at com.ibm.ws.webcontainer.extension.DefaultExtensionProcessor.handleReques t(DefaultExtensionProcessor.java:557) at com.ibm.ws.wswebcontainer.extension.DefaultExtensionProcessor.handleRequ est(DefaultExtensionProcessor.java:113) at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3440) at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:267) at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:815 ) at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1 461) at
Re: File upload (jupload)--how to disable struts2' fileupload interceptor?
what would be nice is some explanation as to how to better configure the filtering and namespaces in the web and struts xml files. Totally agree, I have struggling with this myself for sometime [extensive googling culminated in no good answer]. --- On Mon, 5/18/09, jesse crossley jesse.cross...@gmail.com wrote: From: jesse crossley jesse.cross...@gmail.com Subject: Re: File upload (jupload)--how to disable struts2' fileupload interceptor? To: user@struts.apache.org Received: Monday, May 18, 2009, 8:38 PM you were right, Andy, i finally safely changed the struts2 filter mappings from /* to *.action and today i've had great success merging redback struts2 with my existing webapp. i hit upon this when googling led me to another post elsewhere that was questioning how to run struts1 alongside struts2. the answer was to map the struts1 servlet to *.do and the struts2 filter to *.action. this beat my attempts of /struts2/* and even /*.action, and finally did what i wanted, enabling all of the security (and struts2) actions i need while not glomming on to any other URLs i may be using. but this answer was not easily come by: especially when all the struts.xml/web.xml/filter information i came across during extensive googling indicated that the /* filter was too important to the workings of struts2 to disable. coupled with the trouble i had creating a valid filter, i reached the premature conclusion that i wouldn't find an answer to the filtering problem. what would be nice is some explanation as to how to better configure the filtering and namespaces in the web and struts xml files. i'm not about to redo my existing webapps in struts2 (due to time and general lack of knowledge), but i'm all over this integration of redback struts2-based security with minimal mods to my existing webapps. it looks like i can safely do it, now, but i can't explain how or why it works this way (yet), and with the purported wide acceptance and use of struts2 i'd have hoped for more how-to use-cases similar to my own. the problem i hit now is this one Andy Sykes wrote: .. the only example I can see is if you're using Struts interceptors/actions for webapp security - in which case hitting a servlet directly might mean there's no session information to validate the user. That's a trivial matter, though. i'm in just this scenario now: how can i check the securitySession info from the servlet-side of things? i've re-implemented the IfAuthorizedTag's condition() method as a Utils.isAuthorized() method, but i never seem to be connecting with the authorization info. any ideas/pointers there? i'm plumb tired after googling for days... public static final boolean ifAuthorized( final HttpSession session, final String permission, final String resource) throws ServletException { ApplicationContext applicationContext = WebApplicationContextUtils.getRequiredWebApplicationContext(session.getServletContext()); Boolean authzStatusBool = (Boolean) session.getServletContext().getAttribute( redbackCache + permission + (resource!=null?resource:)); boolean authzStatus; if ( authzStatusBool == null ) { SecuritySession securitySession = (SecuritySession) session.getAttribute( SecuritySystemConstants.SECURITY_SESSION_KEY ); try{ SecuritySystem securitySystem = (SecuritySystem) applicationContext.getBean(PlexusToSpringUtils.buildSpringId(SecuritySystem.ROLE)); if (securitySystem == null){ throw new ServletException( unable to locate security system ); } authzStatus = securitySystem.isAuthorized( securitySession, permission, resource!=null?resource: ); session.getServletContext().setAttribute( redbackCache + permission + (resource!=null?resource:), Boolean.valueOf( authzStatus ) ); }catch ( AuthorizationException ae ){ throw new ServletException( error with authorization, ae ); } }else{ authzStatus = authzStatusBool.booleanValue(); } session.getServletContext().setAttribute( ifAuthorizedTag, Boolean.valueOf( authzStatus ) ); return authzStatus; } -- View this message in context: http://www.nabble.com/File-upload-%28jupload%29--how-to-disable-struts2%27-fileupload-interceptor--tp23534189p23604543.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org __ Yahoo! Canada Toolbar: Search from
Re: Migrate Struts 1.0 app from WebSphere 5.1 to 6.1 - JSP container failed to load the TagExtraInfo
I know when I migrated my struts 1.1 apps from Websphere 5.1 to Websphere 6.x, I had to add the a property to custom server properties to make it work, Go to : Application servers [ur server name] Web container Custom properties and then add the following property: prependSlashToResource = true Let's hope this will solve ur problem. --- On Tue, 5/12/09, mule_user s...@aol.com wrote: From: mule_user s...@aol.com Subject: Migrate Struts 1.0 app from WebSphere 5.1 to 6.1 - JSP container failed to load the TagExtraInfo To: user@struts.apache.org Received: Tuesday, May 12, 2009, 7:54 PM The same code (EAR) did not throw the above exceptions in WebSphere 5.1 server. Migrating Struts 1.0 application from WebSphere 5.1 to WebSphere 6.1 in z/OS. After successfully deploying Struts 1.0 app in WebSphere 6.1 server, I start the application. As the application starts up, I get the following error in server log as: Trace: 2009/05/11 15:57:57.713 01 t=9CCC68 c=UNK key=P8 (13007002) ThreadId: 00e3 FunctionName: endElement SourceId: com.ibm.ws.jsp Category: WARNING ExtendedMessage: JSPG0235E: The JSP container failed to load the TagExtraInfo class .org.apache.struts.taglib.EnumerateTei. Trace: 2009/05/11 15:57:57.713 01 t=9CCC68 c=UNK key=P8 (000A) Description: Log Java Message Message: JSPG0235E: The JSP container failed to load the TagExtraInfo class .org.apache.struts.taglib.EnumerateTei. Trace: 2009/05/11 15:57:57.717 01 t=9CCC68 c=UNK key=P8 (13007002) ThreadId: 00e3 FunctionName: endElement SourceId: com.ibm.ws.jsp Category: WARNING ExtendedMessage: JSPG0235E: The JSP container failed to load the TagExtraInfo class .org.apache.struts.taglib.IterateTei. Trace: 2009/05/11 15:57:57.717 01 t=9CCC68 c=UNK key=P8 (000A) Description: Log Java Message Message: JSPG0235E: The JSP container failed to load the TagExtraInfo class .org.apache.struts.taglib.IterateTei. Trace: 2009/05/11 16:03:19.143 01 t=9C6E88 c=UNK key=P8 (13007002) ThreadId: 0055 FunctionName: endElement SourceId: com.ibm.ws.jsp Category: WARNING ExtendedMessage: JSPG0235E: The JSP container failed to load the TagExtraInfo class .org.apache.struts.taglib.html.TextTei. Trace: 2009/05/11 16:03:19.144 01 t=9C6E88 c=UNK key=P8 (000A) Description: Log Java Message Message: JSPG0235E: The JSP container failed to load the TagExtraInfo class .org.apache.struts.taglib.html.TextTei. This seems to be a known issue. We found similar posting in IBM forum as: http://www.ibm.com/developerworks/forums/thread.jspa?threadID=179489tstart=0 But the answer was not comprehensive. Note that the same code (EAR) did not throw the above exceptions in WebSphere 5.1 server. An example of our struts.tld is: tlibversion1.0/tlibversion jspversion1.1/jspversion shortnameSTRUTS Framework Tag Library/shortname urihttp://jakarta.apache.org/taglibs/struts-1.0/uri tag nameenumerate/name tagclassorg.apache.struts.taglib.EnumerateTag/tagclass teiclassorg.apache.struts.taglib.EnumerateTei/teiclass bodycontentJSP/bodycontent We would like to know what steps need to be taken to resolve this issue. 1. Please show an example of what exact changes need to be made in both struts.tld and web.xml? 2. Instead of making the changes in both struts.tld and web.xml, what exact parameter needs to be added in WAS 6.1 server? 3. What are the implications for not being able to load these classes? Even though I am getting errors saying that these classes are not getting loaded, the Struts 1.0 application successfully starts and functions correctly in WebSphere 6.1 server. Again, note that the exact same code (EAR) base did not throw the above exceptions in WebSphere 5.1 server. -- View this message in context:
Re: How do I get a request header
Here is one way I did to get Authorization value in the header: 1- Define an interceptor that retrieves HttpServletRequest 2- Define an interface ,say HeaderAware. 3- In your interceptor retrieve related values from Header and then inject it into your action if it implements HeaderAware. That should do it. --- On Tue, 5/12/09, Jim Collings jlistn...@gmail.com wrote: From: Jim Collings jlistn...@gmail.com Subject: Re: How do I get a request header To: Struts Users Mailing List user@struts.apache.org Received: Tuesday, May 12, 2009, 12:40 PM I am also trying to retrieve an item in the header so that I can place it in the value stack. Any ideas on how best to accomplish this? Jim C. On Tue, May 12, 2009 at 8:37 AM, Norris Shelton norrisshel...@yahoo.comwrote: I looked in the interceptors and did not see one that pulled the heders. Norris Shelton Software Engineer Sun Certified Java 1.1 Programmer Shelton Consulting, LLC ICQ# 26487421 AIM NorrisEShelton YIM norrisshelton __ Looking for the perfect gift? Give the gift of Flickr! http://www.flickr.com/gift/ - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Struts 2 and Spring Framework
Going through Maven xml files in the link you provided to check for spring jar dependencies, I noticed a dependency on spring-web.jar, I was wondering where does it fit. I know that: spring-beans.jar, spring-core.jar, spring-context.jar are required for DI. spring-aop.jar is used for Aspect oriented part. cglib-nodep-2.1_3.jar is used by AOP for creating proxies. As for the web part, we all are using struts 2 and not sure spring-web.jar fits. I am trying to create a blank template with minimum number of spring jars and I would appreciate any hints on that? --- On Sat, 4/18/09, Wes Wannemacher w...@wantii.com wrote: From: Wes Wannemacher w...@wantii.com Subject: Re: Struts 2 and Spring Framework To: Struts Users Mailing List user@struts.apache.org Received: Saturday, April 18, 2009, 6:03 AM adi...@gmail.com wrote: Hi All, Does anybody has an sample application using Struts 2 and Spring Framework? When I put the struts2-spring-plugin-2.1.6.jar file in my classpath I've got this error: java.lang.NullPointerException at org.apache.log4j.Category.isEnabledFor(Category.java:749) at org.apache.commons.logging.impl.Log4JLogger.isTraceEnabled(Log4JLogger.j ava:327) If you have a list of jars required, please let put them here! I have a few projects up here - http://code.google.com/p/struts2inpractice/source/browse/#svn/trunk I have to check and see if they need updated, but they could probably help to serve as starter-apps. They are all maven based though, and if you're asking about dependencies, etc. I'm guessing you aren't using maven (yet). Check one of the maven dependency sites. Without knowing what libs you're already deploying we'll just spit back whatever Maven tells us is required. At the least you'll need the S2 required jars, whichever Spring jars your application needs (which we don't know), and the plugin jars. Managing transitive dependencies by hand is a PITA. Yes, I agree with Dave 100%. In fact, it is considered best practice not to depend on transitive dependencies. If you are going to use Spring via the Struts2 Spring Plugin, then I suggest you also add Spring as a dependency. Adding the plugin will automatically add the requirements that allow the plugin to work properly, but it is best to be explicit as to what your project needs. Dave - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- -- Wes Wannemacher Author - Struts 2 In Practice Includes coverage of Struts 2.1, Spring, JPA, JQuery, Sitemesh and more http://www.manning.com/wannemacher - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org __ The new Internet Explorer® 8 - Faster, safer, easier. Optimized for Yahoo! Get it Now for Free! at http://downloads.yahoo.com/ca/internetexplorer/ - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Struts Filter mapping and namespace
I have a web application in which I would like to have everything that goes through context-root/web/* to be handled by struts 2 and context-root/rpc/* to be handled by a different framework (IBM RPC adapter). As for the struts 2 part, I have struts 2 filter configured in my web.xml as : filter filter-namestruts2/filter-name filter-classorg.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter/filter-class /filter filter-mapping filter-namestruts2/filter-name url-pattern/web/*/url-pattern /filter-mapping In struts-blank.was I have changed default namespace in struts.xml to package name=default namespace=/web extends=struts-default default-action-ref name=index / action name=index result type=redirectAction param name=actionNameHelloWorld/param param name=namespace/web/example/param /result /action /package and in example.xml to : package name=example namespace=/web/example extends=struts-default Now when I enter the following URLs all fail: http://localhost:9080/struts2.1.6/web/example/HelloWorld.action http://localhost:9080/struts2.1.6/web/index http://localhost:9080/struts2.1.6/web/index.action I get the following exceptions: [Servlet Error]-[Filter [struts2]: could not be initialized]: java.lang.NullPointerException at com.opensymphony.xwork2.util.FileManager$FileRevision.needsReloading(FileManager.java:209) at com.opensymphony.xwork2.util.FileManager.fileNeedsReloading(FileManager.java:60) Any tip/help is appreciated greatly in advance. __ Instant Messaging, free SMS, sharing photos and more... Try the new Yahoo! Canada Messenger at http://ca.beta.messenger.yahoo.com/ - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Minimum number of jar files for Spring DI
Hello: I was wondering if anybody has the list of minimum number of jar files required to use only Spring DI [with AOP] in struts 2 as opposed to using spring.jar. __ Looking for the perfect gift? Give the gift of Flickr! http://www.flickr.com/gift/ - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Struts and EJB 3
@EJB annotation can be used only with container managed components like Servlet and JSF beans. Other than that either you have to use spring or right a customized EJB3 interceptor for struts 2 or modify request processing command chains for struts 1.3 to inject EJB 3 beans. Keep in mind you can also use Google Guice to do that as well [if you are not using any other spring goodies, Guice should very easy to set up] --- On Fri, 4/10/09, Stefano Tranquillini stefano.tranquill...@gmail.com wrote: From: Stefano Tranquillini stefano.tranquill...@gmail.com Subject: Re: Struts and EJB 3 To: Struts Users Mailing List user@struts.apache.org Received: Friday, April 10, 2009, 2:39 PM Yes, i'll try to use, but the ejb with annotation gives me a nullpointer exception. i've to call the ejb using the old style jndi call. On Fri, Apr 10, 2009 at 15:25, Lukasz Lenart lukasz.len...@googlemail.com wrote: 2009/4/10 Stefano elste...@gmail.com: in struts1 what's the way to use EJB3.0? there's no possibility to use annotation? i need to use classical jndi? why? You can use annotations with Struts1, is not a problem with framework but with Java platform you're using. THe best solution is to use Spring to connect Struts1 Actions with EJB3 beans. Regards -- Lukasz http://www.lenart.org.pl/ - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- Stefano - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org __ Yahoo! Canada Toolbar: Search from anywhere on the web, and bookmark your favourite sites. Download it now http://ca.toolbar.yahoo.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
[jira] (WW-2642) resolved on Websphere
For those of you who had problem running Struts 2.1.6 on WAS 6.1 as reported in [jira] (WW-2642). The problem has been resolved. Please refer to the JIRA, I have posted details in there. regards __ Get the name you've always wanted @ymail.com or @rocketmail.com! Go to http://ca.promos.yahoo.com/jacko/ - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: [jira] (WW-2642) resolved on Websphere
Hi: Do I need to open an account to create a wiki page on struts, any instructions/links on how to proceed is appreciated. There is also work in progress to fix the issue of running struts on WAS 7.x and I would post as soon as the issue is resovled. --- On Thu, 4/9/09, Musachy Barroso musa...@gmail.com wrote: From: Musachy Barroso musa...@gmail.com Subject: Re: [jira] (WW-2642) resolved on Websphere To: Struts Users Mailing List user@struts.apache.org Received: Thursday, April 9, 2009, 4:02 PM It would be great if you could create a wiki page that explains this stuff. Thanks for the feedback/research. musachy On Thu, Apr 9, 2009 at 11:22 AM, Struts Two struts...@yahoo.ca wrote: For those of you who had problem running Struts 2.1..6 on WAS 6.1 as reported in [jira] (WW-2642). The problem has been resolved. Please refer to the JIRA, I have posted details in there. regards __ Get the name you've always wanted @ymail.com or @rocketmail.com! Go to http://ca.promos.yahoo.com/jacko/ - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- Hey you! Would you help me to carry the stone? Pink Floyd - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org __ Looking for the perfect gift? Give the gift of Flickr! http://www.flickr.com/gift/ - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Problem getting request parameters in HTTP GET in Struts 2
Why do n't you let your action implement RequestAware interface and then get parameter from the request map. --- On Tue, 3/17/09, Duan, Bin bd...@claritas.com wrote: From: Duan, Bin bd...@claritas.com Subject: Problem getting request parameters in HTTP GET in Struts 2 To: user@struts.apache.org Received: Tuesday, March 17, 2009, 7:01 PM I was trying to get a parameter from a Http GET. The get from jsp looks like this: a href=/providerDetail.action?drProviderId=1000Provider Name The providerDetail.action maps to ProviderAction class. In the action class, I have a setDrProviderId() method, but found the id was not set. Then I tried to get the id from ServletActionRequest.getRequest().getParameter(drProviderId), but still did not get anything. I debugged the code, in the request object, I saw request input as GET /providerDetail.action?drProviderId=1000, this pretty much meant the parameter was sent to the server side correctly. But request.getParameter(drProviderId) returned me null. If I switch to use form POST, my setDrProviderId() method was still NOT called, but I could get the id from request.getParameter(drProviderId). This problem will almost be a show stopper for our project to use Struts. Anybody has any ideas of what could be wrong? I am using Struts 2.1.6. I tried both on oc4j and JBoss. Following is my struts.xml file struts package name=dataReceiving extends=struts-default action name=listProvider method=listProvider class=com.claritas.mms.radish.dataReceiving.DrProviderAction result/dataReceiving/ProviderList.jsp/result /action action name=providerDetail method=providerDetail class=com.claritas.mms.radish.dataReceiving.DrProviderAction result/dataReceiving/ProviderDetails.jsp/result /action /package /struts Following is my DrProviderAction class public void setDrProviderId(String id) { this.drProviderId = new Integer(id).intValue(); } public String providerDetail() { Map map = request.getParameterMap(); String sid = request.getParameter(drProviderId); drProviderId = new Integer(sid).intValue(); //check if the if(session != null) { MapInteger, DrProvider providerMap = (Map)session.get(provider_map); if(providerMap != null) { provider = providerMap.get(drProviderId); } } else //go to database { provider = service.getProvider(drProviderId); } return SUCCESS; } __ Instant Messaging, free SMS, sharing photos and more... Try the new Yahoo! Canada Messenger at http://ca.beta.messenger.yahoo.com/ - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Struts 2 Container Security problem
Are you able to Access a URL that goes to an action directly? I myself have Websphere 6.1.0.21 for my RAD 7.5 and I am not able to do so. Hm...I am going to try this on our AIX test servers to double check. --- On Tue, 3/17/09, pblatner pblat...@gmail.com wrote: From: pblatner pblat...@gmail.com Subject: Re: Struts 2 Container Security problem To: user@struts.apache.org Received: Tuesday, March 17, 2009, 9:20 PM I installed the latest fix pack for WebSphere, bringing my version up to 6.1.0.21 and it did the trick. The Web container authentication now works as I expected it to. Thanks for the feedback. Pete. pblatner wrote: I don't see how this fix applies to the problem I mentioned below: http://www-01.ibm.com/support/docview.wss?rs=180uid=swg1PK31377 The text there doesn't say anything about resolving an issue where WebSphere doesn't seem to be recognizing servlet filters as resources to secure using web container authentication. Musachy Barroso wrote: Just as a reference, there is a ticket open for this: https://issues.apache.org/struts/browse/WW-2642 musachy On Mon, Mar 16, 2009 at 5:37 PM, Struts Two struts...@yahoo.ca wrote: There is a problem running Struts 2.1.6 on Websphere when security is enabled. The case happens when url is an action not a resource like jsp or html. Refer to JIRA WW-2642 that I opened almost a year ago. I was hoping that Apache group can get their hands on Websphere to verify the issue but it seems like a distant probability as I have not heard any news on that for sometime. But on the bright site, there may be some good news on this soon. As I had to locate WAS L3 support in person and I am working with them on this issue [though the pace is slow]. Also keep in mind, the same issue exists on WAS 7.0.0.1 with a slight variation. If this is determined to be a Websphere problem with WAS 6.1. Then I have a stronger case to press issue for WAS 7.0. --- On Mon, 3/16/09, pblatner pblat...@gmail.com wrote: From: pblatner pblat...@gmail.com Subject: Re: Struts 2 Container Security problem To: user@struts.apache.org Received: Monday, March 16, 2009, 9:05 PM I have tried to do the exact thing that Jeromy suggests below with 2 packages. And then in the web.xml specify a security constraint with the URL pattern /protected/*. After doing so, I am not getting the result that I think I should be. When issuing a request for my action at http://localhost/MyApp/protected/HomeAction;, the container is not intercepting and challenging me with my logon.html page. Anyone know why this isn't working? The struts 2 servlet-filter pattern is /*.. It seems pretty obvious that the struts 2 servlet filter is responding to the first part of the URL: http://localhost/MyApp/*; and the container isn't seeing that as a secured resource. Am I missing a configuration pattern somewhere that tells the container to inspect the full URL before allowing the servlet filter to process it? My deployment environment is WebSphere 6.1. Are there any incompatibilities between WebSphere 6.1 and struts 2 that could be causing this? Thanks, Pete. Jeromy Evans - Blue Sky Minds wrote: In struts.xml, the namespace given to your package needs be in /protected as well. eg. package name=myPackage namespace=/protected Otherwise, as you've seen, it's available in the root of the application's context path. I usually split my struts2 application into at least two packages: package name=public namespace=/ ... package name=secure namespace=/protected -- View this message in context: http://www.nabble.com/Struts-2-Container-Security-problem-tp15571409p22547426.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org __ Instant Messaging, free SMS, sharing photos and more... Try the new Yahoo! Canada Messenger at http://ca.beta.messenger.yahoo.com/ - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- Hey you! Would you help me to carry the stone? Pink Floyd - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- View this message in context: http://www.nabble.com/Struts-2-Container-Security-problem-tp15571409p22568026
Re: Struts 2 Container Security problem
There is a problem running Struts 2.1.6 on Websphere when security is enabled. The case happens when url is an action not a resource like jsp or html. Refer to JIRA WW-2642 that I opened almost a year ago. I was hoping that Apache group can get their hands on Websphere to verify the issue but it seems like a distant probability as I have not heard any news on that for sometime. But on the bright site, there may be some good news on this soon. As I had to locate WAS L3 support in person and I am working with them on this issue [though the pace is slow]. Also keep in mind, the same issue exists on WAS 7.0.0.1 with a slight variation. If this is determined to be a Websphere problem with WAS 6.1. Then I have a stronger case to press issue for WAS 7.0. --- On Mon, 3/16/09, pblatner pblat...@gmail.com wrote: From: pblatner pblat...@gmail.com Subject: Re: Struts 2 Container Security problem To: user@struts.apache.org Received: Monday, March 16, 2009, 9:05 PM I have tried to do the exact thing that Jeromy suggests below with 2 packages. And then in the web.xml specify a security constraint with the URL pattern /protected/*. After doing so, I am not getting the result that I think I should be. When issuing a request for my action at http://localhost/MyApp/protected/HomeAction;, the container is not intercepting and challenging me with my logon.html page. Anyone know why this isn't working? The struts 2 servlet-filter pattern is /*.. It seems pretty obvious that the struts 2 servlet filter is responding to the first part of the URL: http://localhost/MyApp/*; and the container isn't seeing that as a secured resource. Am I missing a configuration pattern somewhere that tells the container to inspect the full URL before allowing the servlet filter to process it? My deployment environment is WebSphere 6.1. Are there any incompatibilities between WebSphere 6.1 and struts 2 that could be causing this? Thanks, Pete. Jeromy Evans - Blue Sky Minds wrote: In struts.xml, the namespace given to your package needs be in /protected as well. eg. package name=myPackage namespace=/protected Otherwise, as you've seen, it's available in the root of the application's context path. I usually split my struts2 application into at least two packages: package name=public namespace=/ ... package name=secure namespace=/protected -- View this message in context: http://www.nabble.com/Struts-2-Container-Security-problem-tp15571409p22547426.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org __ Instant Messaging, free SMS, sharing photos and more... Try the new Yahoo! Canada Messenger at http://ca.beta.messenger.yahoo.com/ - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: struts2 and dojo
I am using dojo 1.2.3 with struts 2. Just copy dojo library to your workspace and then you are set. However, you can not use struts dojo tag lib with it. In other words, you can not use theme=ajax, and you need to code your own javascripts to work with widgets or containers. I think it is worth it as this offers you a lot of flexibility. --- On Tue, 3/10/09, fr Rouxel rouxe...@yahoo.com wrote: From: fr Rouxel rouxe...@yahoo.com Subject: struts2 and dojo To: user@struts.apache.org Received: Tuesday, March 10, 2009, 2:44 PM Hi, how can I use dojo 0.9 or dojo 1.0 with struts2. I think struts 2 uses dojo 0.4 ? thanks -- View this message in context: http://www.nabble.com/struts2-and-dojo-tp22435740p22435740.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org __ Ask a question on any topic and get answers from real people. Go to Yahoo! Answers and share what you know at http://ca.answers.yahoo.com - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Struts 1: Why is ActionServlet unavailable?
Which version of struts you are running? Running early version of struts like 1.1 on new web containers is problematic. I had the same issue running early version of struts on Websphere V6+. I had to add a custom property prependSlashToResource = true to my server make it run. Since you are running weblogic, I assume there should be some similar way to do it. Hope it helps. --- On Fri, 3/6/09, laredotornado laredotorn...@gmail.com wrote: From: laredotornado laredotorn...@gmail.com Subject: Struts 1: Why is ActionServlet unavailable? To: user@struts.apache.org Received: Friday, March 6, 2009, 3:55 PM Hi, I'm using Struts 1 with Weblogic 9.2.2 (Java 1.5), running on my local Win XP machine. I'm getting this error when trying to deploy my WAR in my Weblogic logs ... Mar 6, 2009 8:31:48 AM MST Error HTTP CO183L-4CVY3D1 my_managed_server_1 [ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)' WLS Kernel 1236353508999 BEA-101216 Servlet: action failed to preload on startup in Web application: RoutingEngine.war. javax.servlet.UnavailableException: init at org.apache.struts.action.ActionServlet.init(ActionServlet.java:368) at javax.servlet.GenericServlet.init(GenericServlet.java:256) at weblogic.servlet.internal.StubSecurityHelper$ServletInitAction.run(StubSecurityHelper.java:278) at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321) at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121) at weblogic.servlet.internal.StubSecurityHelper.createServlet(StubSecurityHelper.java:64) at weblogic.servlet.internal.StubLifecycleHelper.createOneInstance(StubLifecycleHelper.java:58) at weblogic.servlet.internal.StubLifecycleHelper.init(StubLifecycleHelper.java:48) at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:507) at weblogic.servlet.internal.WebAppServletContext.preloadServlet(WebAppServletContext.java:1715) at weblogic.servlet.internal.WebAppServletContext.loadServletsOnStartup(WebAppServletContext.java:1692) at weblogic.servlet.internal.WebAppServletContext..preloadResources(WebAppServletContext.java:1612) at weblogic.servlet.internal.WebAppServletContext.start(WebAppServletContext.java:2750) at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:889) at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:333) at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:204) at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26) at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:60) at weblogic.application.internal.flow.ScopedModuleDriver.start(ScopedModuleDriver.java:200) at weblogic.application.internal..flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:117) at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:204) at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26) at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:60) at weblogic.application.internal.flow.StartModulesFlow.activate(StartModulesFlow.java:26) at weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:635) at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26) at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:212) at weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:154) at weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:80) at weblogic.deploy.internal.targetserver.BasicDeployment.activate(BasicDeployment.java:181) at weblogic.deploy.internal.targetserver.BasicDeployment.activateFromServerLifecycle(BasicDeployment.java:358) at weblogic.management.deploy.internal.DeploymentAdapter$1.doActivate(DeploymentAdapter.java:52) at weblogic.management.deploy.internal.DeploymentAdapter.activate(DeploymentAdapter.java:186) at weblogic.management.deploy.internal.AppTransition$2..transitionApp(AppTransition.java:30) at weblogic.management.deploy.internal.ConfiguredDeployments.transitionApps(ConfiguredDeployments.java:233) at weblogic.management.deploy.internal.ConfiguredDeployments.activate(ConfiguredDeployments.java:169) at weblogic.management.deploy.internal.ConfiguredDeployments.deploy(ConfiguredDeployments.java:123) at weblogic.management.deploy.internal.DeploymentServerService.resume(DeploymentServerService.java:173) at weblogic.management.deploy.internal.DeploymentServerService.start(DeploymentServerService.java:89) at weblogic..t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)
RE: Problem with file download.
I had the same problem that I used to get prompted for file save on IE6 but on IE7 the attachment was being displayed in a new pop up browser. and I did the following to resolve it: action name=ticketFileDownload class=ccol.action.ticket.TicketFileDownload result name=success type=stream param name=contentTypeapplication/octet-stream/param /result /action Then make ur action class implement ServletResponseAware interface and add the following lines to your action method: setInputStream(new ByteArrayInputStream(attachment.getAttachment())); getServletResponse().setHeader(Content-Disposition, (attachment; filename=\ + attachment.getName() + \)); For some reason not known to me, using the above method, you get prompted to save the file in IE6/7 and firefox 2.x and 3.x. However, following the way described in Wiki documentation would result to the problem you are experiencing. --- On Thu, 2/26/09, Security Management list-subscripti...@secmgmt.com wrote: From: Security Management list-subscripti...@secmgmt.com Subject: RE: Problem with file download. To: 'Struts Users Mailing List' user@struts.apache.org Received: Thursday, February 26, 2009, 8:17 PM Here's what I've used, note the contentDisposition. result name=export-image type=stream param name=contentTypeimage/jpg/param param name=inputNameimageStream/param param name=contentDispositionattachment; filename=image.jpg/param param name=bufferSize4096/param /result -Original Message- From: jfputnam [mailto:johnfput...@comcast.net] Sent: Thursday, February 26, 2009 2:49 PM To: user@struts.apache.org Subject: Problem with file download. I have followed serveral examples but still have an issue downloading a file using an input stream. In IE7 when I try the download with text/plain context type, the text is rendered in the html page. When I change the contentType a file dialog folder pops up with open/open folder/ cancel no save button. There is also a popup window that says Internet Explorer cannot download extractAccounting.action from localhost. Internet Explorer was not able to open this Internet site. The requested site is either unavailable or cannot be found. Please try again later. On firefox there is no file save dialog, just the text displayed. I want to be able to generate .csv files and have the user be able to save them on their pc. The struts.xml entry is. action name=extractAccounting class=com.merrick.bestmatch.presentation.action.billing.AccountingLink method=extractAccounting result name=success type=stream document.pdf inputStream filename=document.pdf 1024 /result /action The action class is: public class AccountingLink extends BestMatchActionSupport implements PropertiesAware { private InputStream inputStream; //-- -- public String extractAccounting() { String text = Converting String to InputStream Example; try { inputStream = new ByteArrayInputStream(text.getBytes(UTF-8)); } catch (UnsupportedEncodingException e) { e.printStackTrace(); } return SUCCESS; } //-- -- public InputStream getInputStream() { return inputStream; } } Any help with figuring out what the problem is and a solution is appreciated. ---John Putnam -- View this message in context: http://www.nabble.com/Problem-with-file-download.-tp22232119p22232119.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org __ Instant Messaging, free SMS, sharing photos and more... Try the new Yahoo! Canada Messenger at http://ca.beta.messenger.yahoo.com/ - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: [s2] accesing params from s:include tag
I do not think you will be able to access the param value passed to s:include within struts tag [clearly an obvious shortcoming]. Your best bet is using jsp expression language as the parameter is put in request scope. I was not able to do it, despite trying a million different forms as well as suggestions by some folks in strust mailing list. --- On Fri, 2/27/09, Nils-Helge Garli Hegvik nil...@gmail.com wrote: From: Nils-Helge Garli Hegvik nil...@gmail.com Subject: Re: [s2] accesing params from s:include tag To: Struts Users Mailing List user@struts.apache.org Received: Friday, February 27, 2009, 2:14 PM Haven't really tried, but I assume the parameter would be a String, so have you tried using 'eq' instead of '=='. Nils-H On Fri, Feb 27, 2009 at 3:06 PM, hernan gonzalez hgonza...@gmail.com wrote: I'm struggling with s:include + s:param in struts 2.0.14 The docs for the include tag http://struts.apache.org/2.0.14/docs/include.html states: How To access parameters Parameters are passed as request parameters, so use the ${param.ParamName} notation to access them. Do not use the property tag to access parameters in included files. That's not very clear for me, (and for others, judging from old messages in the list). The parameters passed to an included jsp via struts2 tags can't be accesed using struts2 tags?? (it appears that the parameters are not added to the parameters collection in the actionContext) This should be really simple, please, can't someone give an example ? Say I have a page.jsp that includes a fragment jsp file via the following: s:include value=frag.jsps:param name=opt1/s:param/s:include In the frag.jsp I want to do something as s:if test=#parameters.opt == 1 ... /s2:if What would be the correct syntax? Hernán J. González - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org __ Instant Messaging, free SMS, sharing photos and more... Try the new Yahoo! Canada Messenger at http://ca.beta.messenger.yahoo.com/ - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: How to use s:include param in s:if
I was trying to avoid % if() ...% in my jsps by using request Object and since I am not using JSTL in favor of struts 2 tags, c:if ... tag is not possible. I have managed to get around the problem with a less favorable approach. My s:include now looks like: s:include value=./includes/tabs.jsp s:param name=tab1Class value=%{'on'} / s:param name=tab2Class value=%{'off'} / /s:include and in my tabs.jsp I have someting: td class=${param.tab1Class} .../td td class=${param.tab2Class} .../td What I do not like about this approach is If I add a new tab, I not only have to update tabs.jsp but every single jsp that includes it. I believe s:include tag should be able to handle a simple case like the one I was trying to do. Anyways, thank you for your replies and time. --- On Fri, 2/6/09, Wes Wannemacher w...@wantii.com wrote: From: Wes Wannemacher w...@wantii.com Subject: Re: How to use s:include param in s:if To: Struts Users Mailing List user@struts.apache.org Received: Friday, February 6, 2009, 11:48 PM On Friday 06 February 2009 18:27:18 Struts Two wrote: Wes , Thank you for your reply, Unfortunately that does not work. The if statement return false [I print ${param.tab1} on the page and it has the value 'tab1' yet if statement is false]. I am using struts 2.0.14. Hmm... Strange. I don't know if it matters, but ${param.tab1} probably works because it's a legit EL expression. Your include points directly to a JSP, rather than an action. Try doing the whole thing in EL, you might be able to accomplish what you're looking for with less hassle. -Wes -- Wes Wannemacher Author - Struts 2 In Practice Includes coverage of Struts 2.1, Spring, JPA, JQuery, Sitemesh and more http://www.manning.com/wannemacher - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org __ Instant Messaging, free SMS, sharing photos and more... Try the new Yahoo! Canada Messenger at http://ca.beta.messenger.yahoo.com/ - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
How to initialize a List property through action configuration
If I have a property such as private ListString myList; Is there a way that I can initialize the list through action configuration? I have tried the following: #action name=queueContent class=ccol.action.queue.QueueRead method=getMyQueueContent# #param name=myList# {Alarmed,Open} #/param# #result name=success# myQueueContent #/result# #/action# and #action name=queueContent class=ccol.action.queue.QueueRead method=getMyQueueContent# #param name=myList# Alarmed #/param# #param name=myList# Open #/param# #result name=success#myQueueContent#/result# #/action# For the last case, the list is initialized with Open [which makes sense as Alarmed gets overwritten, but I just wanted to try]. __ Be smarter than spam. See how smart SpamGuard is at giving junk email the boot with the All-new Yahoo! Mail. Click on Options in Mail and switch to New Mail today or register for free at http://mail.yahoo.ca - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
How to use s:include param in s:if
I have run out of options and I was hoping if someone can help me. I have an include tag as follows: s:include value=./includes/tabs.jsp s:param name=tabId value=%{'tab1'} / /s:include In my tabs.jsp, I tried to do the following: td s:if test=%{#request.param.tabId == 'tab1'}class=on /s:ifs:elseclass=off/s:else But of no avail. Using ${param.tabId}, I can see the value of tablId. I even tried [crazy ideas like]: td s:if test=%{${param.tabId} == 'tab1'}class=on /s:ifs:elseclass=off/s:else td s:if test={${param.tabId} == 'tab1'}class=on /s:ifs:elseclass=off/s:else Refering to Struts 2 in action and Struts 2 Design and programming was of no help. I would appreciate if anybody helps me on that. regards, __ Instant Messaging, free SMS, sharing photos and more... Try the new Yahoo! Canada Messenger at http://ca.beta.messenger.yahoo.com/ - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: How to use s:include param in s:if
Wes , Thank you for your reply, Unfortunately that does not work. The if statement return false [I print ${param.tab1} on the page and it has the value 'tab1' yet if statement is false]. I am using struts 2.0.14. --- On Fri, 2/6/09, Wes Wannemacher w...@wantii.com wrote: From: Wes Wannemacher w...@wantii.com Subject: Re: How to use s:include param in s:if To: Struts Users Mailing List user@struts.apache.org Received: Friday, February 6, 2009, 11:07 PM On Friday 06 February 2009 17:35:56 Struts Two wrote: I have run out of options and I was hoping if someone can help me. I have an include tag as follows: s:include value=./includes/tabs.jsp s:param name=tabId value=%{'tab1'} / /s:include In my tabs.jsp, I tried to do the following: td s:if test=%{#request.param.tabId == 'tab1'}class=on /s:ifs:elseclass=off/s:else But of no avail. Using ${param.tabId}, I can see the value of tablId. I even tried [crazy ideas like]: td s:if test=%{${param.tabId} == 'tab1'}class=on /s:ifs:elseclass=off/s:else td s:if test={${param.tabId} == 'tab1'}class=on /s:ifs:elseclass=off/s:else Refering to Struts 2 in action and Struts 2 Design and programming was of no help. I would appreciate if anybody helps me on that. regards, Try - s:if test=#parameters.tabId == 'tab1' -Wes -- Wes Wannemacher Author - Struts 2 In Practice Includes coverage of Struts 2.1, Spring, JPA, JQuery, Sitemesh and more http://www.manning.com/wannemacher - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org __ Looking for the perfect gift? Give the gift of Flickr! http://www.flickr.com/gift/ - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Struts 2 and Command chains
Since I have moved to struts 2, It has been somehow hard for me to forgo the simplicity offered by combining struts 1.2+ and Apache common chains. In a number of projects [medium sized to large] I managed to get away only with ONE single action class for the whole project. Just consider the following: 1- All your http forms use a Map form 2- Each of your url mappings maps to a chain name 3- You have a single CommandAction class that does the following: a) Puts the Map form in a chain context b) Executes the chain c) Iterates through the context and puts every value whose key conventionally starts with request_ c) forwards the result I have been trying to see if I can devise or follow a similar logic in struts 2 but so far of no avail, and I have ended up creating actions here and there. Though Struts in Action book touchs on a few designs for CRUD, It falls below the flexibility and the simpilicity offered by struts 1.2+ and command chains in this respect. I was just wondering if anybody else out there has any ideas/tips that can share in this regard? __ Yahoo! Canada Toolbar: Search from anywhere on the web, and bookmark your favourite sites. Download it now at http://ca.toolbar.yahoo.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: What's the best alternative after Struts2 Dojo PlugIn deprecate?
Why don't you use dojo famework directly? I am using dojo 1.2.3 with struts 2. You have much much more control and freedom in doing what you want to do. It may only take you a week or two of learining curve if you already do not know about the framework. --- On Thu, 1/29/09, jwl wansto...@yahoo.com wrote: From: jwl wansto...@yahoo.com Subject: What's the best alternative after Struts2 Dojo PlugIn deprecate? To: user@struts.apache.org Received: Thursday, January 29, 2009, 9:45 PM Any suggestion for the alternative AJAX framework for Struts2 after they deprecate Dojo PlugIn? I know there are many out there, but what's the best one to integrate with Struts2? Any suggestion or analysis is highly appreciated! -- View this message in context: http://www.nabble.com/What%27s-the-best-alternative-after-Struts2-Dojo-PlugIn-deprecate--tp21736570p21736570.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org __ Yahoo! Canada Toolbar: Search from anywhere on the web, and bookmark your favourite sites. Download it now at http://ca.toolbar.yahoo.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Problem in sending mail to mailing list
I had this problem before and it was because the email was being sent as Rich Text. change your email option to simple text and you should be fine. --- On Fri, 1/23/09, Dave Newton newton.d...@yahoo.com wrote: From: Dave Newton newton.d...@yahoo.com Subject: Re: Problem in sending mail to mailing list To: Struts Users Mailing List user@struts.apache.org Received: Friday, January 23, 2009, 5:12 PM umesh awasthi wrote: can you suggest any thing else to look in to?? Not really; maybe somebody using gmail can comment. Another option is to put code fragments on a source-hosting service like pastebin etc. Some folks that haven't figured out how to send text-only emails often change characters to [, which is another option (but can be hard to read). Dave - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org __ Get a sneak peak at messages with a handy reading pane with All new Yahoo! Mail: http://ca.promos.yahoo.com/newmail/overview2/ - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Struts 2 session problem
option 2 and 3 are overheads for a large app This is an overstatment. The real question is whether This overhead causes major [performance, etc] problems for THE app , u are working on [not any large app], or not. And that is the question which you can only answer. regards, RajibJana wrote: option 2 and 3 are overheads for a large app, I will check option 3 , currently I am using glassfish, will check whether option 3 is available in gf. Struts Two wrote: There are a few solutions to your problem: 1- You can serialize your object as a hidden field and deserialize it on each request if you need it. It serves like a baggage that you carry form page to other. In this way, you avoid putting any object in session scope. Some folks may argue that this is not efficient for huge-sized objects, but keep in mind httpsession should not be confused with storage. I already use this solution in a few medium size webapps, works like charm. 2- If the object put in session is sort of object like ,say, the one the holds user credentials, roles, timezones, etc that can be calculated at each request, you may have custom interceptor that does it each time a user submits a request. You may incur just an extra cost of going to databse, to get all the information but with today's hardware speed and software, you should not worry about that. I have also used this solution and it also works like charm. 3- [I have not tried this myself ], If you are using servers like websphere, they provide other ways of session management except cookies and url rewriting like using ssl id for session management. You may want to try it. __ Looking for the perfect gift? Give the gift of Flickr! http://www.flickr.com/gift/ - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Struts 2 session problem
There are a few solutions to your problem: 1- You can serialize your object as a hidden field and deserialize it on each request if you need it. It serves like a baggage that you carry form page to other. In this way, you avoid putting any object in session scope. Some folks may argue that this is not efficient for huge-sized objects, but keep in mind httpsession should not be confused with storage. I already use this solution in a few medium size webapps, works like charm. 2- If the object put in session is sort of object like ,say, the one the holds user credentials, roles, timezones, etc that can be calculated at each request, you may have custom interceptor that does it each time a user submits a request. You may incur just an extra cost of going to databse, to get all the information but with today's hardware speed and software, you should not worry about that. I have also used this solution and it also works like charm. 3- [I have not tried this myself ], If you are using servers like websphere, they provide other ways of session management except cookies and url rewriting like using ssl id for session management. You may want to try it. --- On Sat, 1/17/09, RajibJana rajibj...@gmail.com wrote: From: RajibJana rajibj...@gmail.com Subject: Struts 2 session problem To: user@struts.apache.org Received: Saturday, January 17, 2009, 5:23 AM Hi All, I am using struts 2.0.14 to build an enterprise application. It uses spring, hibernate, tiles, Dojo 1.2.2. Now I have a serious problem. My application has lots a pages and each page shows the logged in userid ( a string variable). This userid is put into the session map injected by the SessionAware interceptor. The injected userid is used in jsp page (#session.userid) to show the logged in user info and also is saved in database for each business transaction for audit control. Now the problem is: 1) A User opens a browser window( IE 7/Firfox) and logs in the application as User X and the application shows the logged in userid as X and DB transactions also get userid info as X. 2) The same user opens a bowser tab or new window from the opened window ( from where he logged in as X), and logs in the application as User Y. Now userid Y overrides the userid X in session map( as no new session is not opened, I guess) and I get userid as Y in both the browser tabs. My application breaks. 3) If the user opens a new browser instance, then a new session is created and both the windows have their own user id info( i.e. userid doesnt override) I tried the scope interceptor ( by starting a conversion), but the result is same( i.e. could not get new session in a window tab). I searched for a solution, could not get a solution. Please suggest how to get rid of this problem. Thanks Rajib -- View this message in context: http://www.nabble.com/Struts-2-session-problem-tp21513305p21513305.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org __ Ask a question on any topic and get answers from real people. Go to Yahoo! Answers and share what you know at http://ca.answers.yahoo.com - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Manage Sessions in Struts
The following solutions will work: 1- On each request, you serialize your session object into an hidden field instead of ur session, but depending on size and number of your session objects, this can be very expensive as it needs to be submitted with every form and link to be deserialized if needed. I currently use it in one of my projects and it works perfect. 2- If your session object is a type of object that can be calcualted/retrieved on each request (like user authorization,roles,etc), you can have an interceptor to inject it to your every action on each request and you keep ur app abolutely session free. I have had the session mix-up issues using firefox/explorer tabs and this solution has also worked for me. hope it helps. --- On Sun, 11/30/08, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: From: [EMAIL PROTECTED] [EMAIL PROTECTED] Subject: Re: Manage Sessions in Struts To: Struts Users Mailing List user@struts.apache.org Received: Sunday, November 30, 2008, 3:33 PM What? Are there solutions that are not web-based? :) On Sun, Nov 30, 2008 at 6:11 AM, Paweł Wielgus [EMAIL PROTECTED] wrote: Hi Dani, the only solution i can imagine in this case is to invalidate session from first browser when the same user logs in with the second browser - it would require You to write such bussiness logic to make it work. But then again You cannot (or it will be very hard to do) differentiate if a request comes from first or second tab in ff. So if it's a real problem/requirement You should probably use something other than web based solution. Best greetings, Pawel Wielgus. 2008/11/30, Dani [EMAIL PROTECTED]: Hi, In my web application I have to manage sessions. An user can not login from multiple browsers (just one session available per user). I have read that if browser window is cloned (such as a new tab in firefox or IE) the session is also cloned to this new tab so a user could have two instances of the application, and that´s what i am trying to avoid. I have been playing around with sessions ID but no luck... Any suggestions to achieve this? Thanks! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Instant Messaging, free SMS, sharing photos and more... Try the new Yahoo! Canada Messenger at http://ca.beta.messenger.yahoo.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts2 upload
I had a similar problem and it used to happen whenever the file uploaded had a size larget than the one specified in struts configuration. Try files of small size first to see if you face the same issue (though your problem may be totally different). - Original Message From: Nick J [EMAIL PROTECTED] To: user@struts.apache.org Sent: Saturday, November 1, 2008 5:54:57 PM Subject: Struts2 upload Hi, I am having some trouble with Uploads in Struts 2. Here is the action: package name=uploads extends=json-default namespace=/_uploads !-- ...other actions ...-- action name=imageUpload class=uploadManager method=imageUpload interceptor-ref name=fileUpload/ result/upload.html/result /action /package Here is the HTML form: form name=myForm action=/_uploads/imageUpload enctype=multipart/form-data input type=file name=imageUpload value=Browse ... / input type=submit / /form Here's the appropriate part of the action class: public String imageUpload() { return ActionSupport.SUCCESS; } public ListImage getImageList() { return images; } public void setImageUpload(File myImage) { uploadedImage = myImage; } public void setImageUploadContentType(String contentType) { imageContentType = contentType; } public void setImageUploadFileName(String filename) { imageFilename = filename; } I have debugger break-points in the imageUpload method, and in the setter methods. The execution never reaches the setters, and when it breaks in the imageUpload method, and I inspect the values of uploadedImage, imageContentType and imageFilename they are all null, so the interceptor has not called the the setters like I was expecting it to. As far as I can tell, this agrees with all the tutorials I've read, so I'm at a loss now.. If anyone has any ideas, I'd be very greatful! thanks! -- View this message in context: http://www.nabble.com/Struts2-upload-tp20284756p20284756.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Ask a question on any topic and get answers from real people. Go to Yahoo! Answers and share what you know at http://ca.answers.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
How to run an iterator twice in a page
I have a list of users and I would like to iterate over this list twice in a page. However in the following code snippet, The list is iterated only once and the second iterator displays nothing. pTable 1/p table cellspacing=1 cellpadding=0 class=basic-table width=100% tr class=gray-med-dark th nowrap=nowrap scope=coluser id/th th nowrap=nowrap scope=coluser name/th /tr s:iterator value=users id=u status=status tr tds:property value=#u.id //td tds:property value=#u.name //td /tr /s:iterator /table pTable 2/p table cellspacing=1 cellpadding=0 class=basic-table width=100% tr class=gray-med-dark th nowrap=nowrap scope=coluser id/th th nowrap=nowrap scope=coluser name/th /tr s:iterator value=users id=u status=status tr tds:property value=#u.id //td tds:property value=#u.name //td /tr /s:iterator /table In the second iterator I even renamed the id to u1 but of no avail. I think in the first iterator all the user objects are pushed on the top of stack hence users is not availabe on the second iterator. I would appreciate any hints on how to achieve this. __ Looking for the perfect gift? Give the gift of Flickr! http://www.flickr.com/gift/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to run an iterator twice in a page
I was hoping to find a better way to do this for a case as simple as the this one rather than resorting to hacks. Normally in JSTL when c:foreach is used a new iterator is created. I also tried the following in the second iterator but of no avail s:iterator value=[1].users id=u status=status I also tried to move users into request scope [ s:set id=users name=users scope=request value=users/] and then try s:iterator value=#request.users id=u status=status in both iterators, But only the first table is displayed. - Original Message From: Peterson, Ryan [EMAIL PROTECTED] To: Struts Users Mailing List user@struts.apache.org Sent: Friday, October 31, 2008 5:10:39 PM Subject: RE: How to run an iterator twice in a page It's sort of hack-ish, but can you make a copy of the list of users in the Java code, and iterate over the copied list for the 2nd set of results? -Original Message- From: Struts Two [mailto:[EMAIL PROTECTED] Sent: Friday, October 31, 2008 1:36 PM To: Struts Users Mailing List Subject: How to run an iterator twice in a page I have a list of users and I would like to iterate over this list twice in a page. However in the following code snippet, The list is iterated only once and the second iterator displays nothing. pTable 1/p table cellspacing=1 cellpadding=0 class=basic-table width=100% tr class=gray-med-dark th nowrap=nowrap scope=coluser id/th th nowrap=nowrap scope=coluser name/th /tr s:iterator value=users id=u status=status tr tds:property value=#u.id //td tds:property value=#u.name //td /tr /s:iterator /table pTable 2/p table cellspacing=1 cellpadding=0 class=basic-table width=100% tr class=gray-med-dark th nowrap=nowrap scope=coluser id/th th nowrap=nowrap scope=coluser name/th /tr s:iterator value=users id=u status=status tr tds:property value=#u.id //td tds:property value=#u.name //td /tr /s:iterator /table In the second iterator I even renamed the id to u1 but of no avail. I think in the first iterator all the user objects are pushed on the top of stack hence users is not availabe on the second iterator. I would appreciate any hints on how to achieve this. __ Looking for the perfect gift? Give the gift of Flickr! http://www.flickr.com/gift/ - 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] __ Be smarter than spam. See how smart SpamGuard is at giving junk email the boot with the All-new Yahoo! Mail. Click on Options in Mail and switch to New Mail today or register for free at http://mail.yahoo.ca - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to run an iterator twice in a page
Please ignore this topic as the problem was due a typo in my jsp. I apologize for wasting your time on an issue that is not a problem, I should have checked more carefully. regards, - Original Message From: Struts Two [EMAIL PROTECTED] To: Struts Users Mailing List user@struts.apache.org Sent: Friday, October 31, 2008 5:43:55 PM Subject: Re: How to run an iterator twice in a page I was hoping to find a better way to do this for a case as simple as the this one rather than resorting to hacks. Normally in JSTL when c:foreach is used a new iterator is created. I also tried the following in the second iterator but of no avail s:iterator value=[1].users id=u status=status I also tried to move users into request scope [ s:set id=users name=users scope=request value=users/] and then try s:iterator value=#request.users id=u status=status in both iterators, But only the first table is displayed. - Original Message From: Peterson, Ryan [EMAIL PROTECTED] To: Struts Users Mailing List user@struts.apache.org Sent: Friday, October 31, 2008 5:10:39 PM Subject: RE: How to run an iterator twice in a page It's sort of hack-ish, but can you make a copy of the list of users in the Java code, and iterate over the copied list for the 2nd set of results? -Original Message- From: Struts Two [mailto:[EMAIL PROTECTED] Sent: Friday, October 31, 2008 1:36 PM To: Struts Users Mailing List Subject: How to run an iterator twice in a page I have a list of users and I would like to iterate over this list twice in a page. However in the following code snippet, The list is iterated only once and the second iterator displays nothing. pTable 1/p table cellspacing=1 cellpadding=0 class=basic-table width=100% tr class=gray-med-dark th nowrap=nowrap scope=coluser id/th th nowrap=nowrap scope=coluser name/th /tr s:iterator value=users id=u status=status tr tds:property value=#u.id //td tds:property value=#u.name //td /tr /s:iterator /table pTable 2/p table cellspacing=1 cellpadding=0 class=basic-table width=100% tr class=gray-med-dark th nowrap=nowrap scope=coluser id/th th nowrap=nowrap scope=coluser name/th /tr s:iterator value=users id=u status=status tr tds:property value=#u.id //td tds:property value=#u.name //td /tr /s:iterator /table In the second iterator I even renamed the id to u1 but of no avail. I think in the first iterator all the user objects are pushed on the top of stack hence users is not availabe on the second iterator. I would appreciate any hints on how to achieve this. __ Looking for the perfect gift? Give the gift of Flickr! http://www.flickr.com/gift/ - 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] __ Be smarter than spam. See how smart SpamGuard is at giving junk email the boot with the All-new Yahoo! Mail. Click on Options in Mail and switch to New Mail today or register for free at http://mail.yahoo.ca - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Ask a question on any topic and get answers from real people. Go to Yahoo! Answers and share what you know at http://ca.answers.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: 404 error in struts 2 blank helloworld example in RAD7
Struts 2.0.11.2 has a known issue for running on websphere. Downgrade to struts 2.0.11.1 [That is the one I am currently using with RAD 7.5 and Websphere 6.1.0.19 and it works perfect] or upgrade to build 2.0.12 which is supposed to have fixed the issue [I have not tried it yet] - Original Message From: Tim Jowers [EMAIL PROTECTED] To: user@struts.apache.org Sent: Thursday, October 16, 2008 6:52:23 PM Subject: 404 error in struts 2 blank helloworld example in RAD7 Hi, Has anyone run the struts2-blank-2.0.11.2.war in RAD7/WebSphere? I get 404 on calling an action. First, https://localhost:9444/testo/example/HelloWorld.jsp works. Then the action 404's: https://localhost:9444/testo/example/HelloWorld.action?request_locale=en I validated the HelloWorld.class can be loaded with a JSP scriptlet. Here is the struts.xml: ?xml version=1.0 encoding=UTF-8 ? !DOCTYPE struts PUBLIC -//Apache Software Foundation//DTD Struts Configuration 2.0//EN http://struts.apache.org/dtds/struts-2.0.dtd; struts constant name=struts.enable.DynamicMethodInvocation value=true / constant name=struts.devMode value=true / package name=example namespace=/example extends=struts-default action name=HelloWorld class=example.HelloWorld result/example/HelloWorld.jsp/result /action action name=* class=example.ExampleSupport result/example/{1}.jsp/result /action /package /struts I know it is being loaded as the jsp is being loaded and if I put in a bogus class name like example.HelloWorld2 then it emits an error message. This is supposed to be simple but I do not see any other logged messages or anything telling me why it is 404. Maybe this has something to do with WebSphere taking over *.action mappings or something.??? Thanks for any insights, Tim Jowers P.S I note the example.ExampleSupport class is never classloaded. Not sure why it was in the example as it seems to be ignored always. Here's the server log: [10/16/08 18:45:53:283 EDT] 000a WsServerImpl A WSVR0001I: Server server1 open for e-business [10/16/08 18:47:17:376 EDT] 0021 ServletWrappe I SRVE0242I: [samj2ee] [/testo] [/example/HelloWorld.jsp]: Initialization successful. [10/16/08 18:47:17:688 EDT] 0021 XmlConfigurat I com.opensymphony.xwork2.config.providers.XmlConfigurationProvider register Parsing configuration file [struts-default.xml] [10/16/08 18:47:17:798 EDT] 0021 XmlConfigurat I com..opensymphony.xwork2.config.providers.XmlConfigurationProvider register Parsing configuration file [struts-plugin.xml] [10/16/08 18:47:17:813 EDT] 0021 XmlConfigurat I com.opensymphony.xwork2.config.providers.XmlConfigurationProvider register Parsing configuration file [struts.xml] [10/16/08 18:47:17:845 EDT] 0021 Settings W org.apache.struts2.config.Settings getLocale Settings: Could not parse struts.locale setting, substituting default VM locale [10/16/08 18:47:17:860 EDT] 0021 DefaultConfig I com.opensymphony.xwork2.config.impl.DefaultConfiguration$ContainerProperties setProperty Overriding property struts.i18n.reload - old value: false new value: true [10/16/08 18:47:17:860 EDT] 0021 DefaultConfig I com.opensymphony.xwork2.config.impl.DefaultConfiguration$ContainerProperties setProperty Overriding property struts.configuration.xml.reload - old value: false new value: true [10/16/08 18:47:18:313 EDT] 0021 ObjectTypeDet I com.opensymphony.xwork2.util.ObjectTypeDeterminerFactory clinit Setting DefaultObjectTypeDeterminer as default ... __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: 404 error in struts 2 blank helloworld example in RAD7
So, I do have a working configuration for tomcat5.5. Now for WebSphere/Rad7. WebSphere does not give an error message but does load the .jsp but just not the .action. This must be a websphere configuration issue or an issue with conflicting .jars. i'll continue to investigate. Before you run struts 2 on Websphere, make sure you set the following property through websphere admin console: Application servers server1 Web container Custom Properties com.ibm.ws.webcontainer.invokefilterscompatibility == true My assumption is you are also running Struts 2.0.11.1 as my current project is based on this release, and I have not been experiencing any problems of any sort. Bear in mind if you are using struts 2.1.2 Beta version you may still experience problem running urls that end with .action directly from browser url address. I had this issue before 2.1.2 goes to beta and there is a JIRA still open for this. __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Issue getting autocompleter value in javascript
autocompleter is a dojo widget, you should try to get its value through dojo api for widgets not dom api. Your javascript will not work (as you have already noticed). regards, - Original Message From: sheva j [EMAIL PROTECTED] To: user@struts.apache.org Sent: Monday, September 29, 2008 9:56:43 AM Subject: Issue getting autocompleter value in javascript Hi, I am facing an issue in getting, selected value of autocompleter in javascript. Issue: On the onclick event of a button, I am calling a javascript function. getAutoValue() { var selectedValue = document.getElementById(auto).value; alert(selectedValue); } where 'auto' is autocompleter's name. I am not able to get the value of autocompleter(ajax). Is there any possiblity to get the selected value of autocompleter. Kindly help me. Thanks in advance. __ Yahoo! Canada Toolbar: Search from anywhere on the web, and bookmark your favourite sites. Download it now at http://ca.toolbar.yahoo.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts2+dojo+JasonArray
I am using Dojo 1.1.1[combo box widget and FilterString widget] with struts 2, I esp use extensive use of dojo ItemFileReader and my result type is geared toward Dojo Data reader abstractions. The only thing I have done on the strust part (apart from making sure the Jason string generated can be read by ItemFileReader) is to write a customized result type for String contents. However, most of the work comes on the client side where you tell the widget to handle the string received as Jason, and as it was mentioned that part has only to do with dojo not struts. - Original Message From: prashanth2 [EMAIL PROTECTED] To: user@struts.apache.org Sent: Tuesday, September 16, 2008 11:49:17 AM Subject: Struts2+dojo+JasonArray Could anybody give me a working sample to read back jsonarray from struts2 action class using dojo. Say for example Iam having a ListCustomers objects converted into JsonArray. My only problem is , how to retrieve the response using dojo1.1.1. From my understanding i specified handleAs:jason, the response data retrieval is the problem. Can somebody point me to an example or atleast give a snippet that loop through the json response. Thanks -- View this message in context: http://www.nabble.com/Struts2%2Bdojo%2BJasonArray-tp19514650p19514650.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Ask a question on any topic and get answers from real people. Go to Yahoo! Answers and share what you know at http://ca.answers.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JBoss 5 RC1 and Struts 2 : Simple validation error (URI scheme is not file)
Most probably it is an xwork issue, I have been experiencing the same problem for Websphere for 2.0.11.2 and 2.1.2, though 2.0.11.1 works for me. - Original Message From: Bobby Mitch [EMAIL PROTECTED] To: Struts Users Mailing List user@struts.apache.org Sent: Wednesday, September 10, 2008 4:41:40 AM Subject: Re: JBoss 5 RC1 and Struts 2 : Simple validation error (URI scheme is not file) ok, well for your information I asked about that problem in the JBoss problem, thinking that the problem could come from JBoss, and I just posted the question on the XWORK forum where i hope they will help me fix it. http://forums.opensymphony.com/thread.jspa?threadID=454261 http://www.jboss.com/index.html?module=bbop=viewtopicp=4175490#4175490 It seems that it is a problem related to xwork, not Struts 2 itself. What do you think ? __ Connect with friends from any web browser - no download required. Try the new Yahoo! Canada Messenger for the Web BETA at http://ca.messenger.yahoo.com/webmessengerpromo.php - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JBoss 5 RC1 and Struts 2 : Simple validation error (URI scheme is not file)
I believe the issue should be fixed on 2.1.2 (for Websphere at least), but it still remains an issue for Struts 2.0.11.2 (for Websphere users). See the email below: - Original Message From: Rene Gielen [EMAIL PROTECTED] To: Struts Users Mailing List user@struts.apache.org Sent: Wednesday, July 16, 2008 2:40:38 AM Subject: [ANN] Struts 2.0.11.2 General Availability Release with Important Security Fix Apache Struts 2.0..11.2 is now available from http://struts.apache.org/download.cgi#struts20112. This release is a fast track security fix release, including a security fixed version 2.0.5 of XWork, which corrects a serious vulnerability in ParametersInterceptor allowing malicious users to remotely change server side context objects. For more information about the exploit, visit our security bulletins page at http://struts.apache.org/2.0.11.2/docs/s2-003.html. IMPORTANT ADDITIONAL NOTES: There are two known issues with this release: 1. the integrated XWork 2.0.5 jar may cause problems when used in a combination of WebSphere 6.1 runtime environments with validation configuration via XML files. Possible Workarounds: - use annotation based validation definition instead XML based - stay with Struts 2.0..11.1 including XWork 2.0.4, applying the following exclude rule to your parameter interceptor refs in struts.xml interceptor-ref name=params param name=excludeParams.*[[^\\p{Graph}][#:=]].*/param /interceptor-ref 2. the filtering mechanism implemeted in XWork's ParametersInterceptor to fix the described security issue does not completely avoid any possible malicious parameter name. Possible Workaround: - apply the following exclude rule to your parameter interceptor refs in struts.xml to avoid the usage of backslash characters in parameter names interceptor-ref name=params param name=excludeParams.*\\.*/param /interceptor-ref Both issues will be addressed in a soon upcoming XWork 2..0.6 release, followed by a new Struts 2.0 GA release including this new XWork version. * All developers are advised to either update Struts 2 applications to Struts 2.0.11.2 or manually exchange usages of xwork-2.0.x.jar with the fixed xwork-2.0.5.jar to prevent remotety induced context manipulations. For the complete release notes for Struts 2.0.11.2, see http://struts.apache.org/2.0.11.2/docs/release-notes-20112.html. - The Apache Struts Team. __ Connect with friends from any web browser - no download required. Try the new Yahoo! Canada Messenger for the Web BETA at http://ca.messenger.yahoo.com/webmessengerpromo.php - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JBoss 5 RC1 and Struts 2 : Simple validation error (URI scheme is not file)
Do not give up, the game is not still over . (you can still do sth about it) As an alternative, you can import the source code of xwork into ur workspace and remove xwork the jar file, run your code in debug mode, find the culprit, fix it. Then you can replace the class file in xwork jar file with the one fixed. That is what I usually do on the last resort, and it is garuanteed to work. - Original Message From: Bobby Mitch [EMAIL PROTECTED] To: Struts Users Mailing List user@struts.apache.org Sent: Wednesday, September 10, 2008 5:01:14 PM Subject: Re: JBoss 5 RC1 and Struts 2 : Simple validation error (URI scheme is not file) Thanks. Applying the workaround with Struts 2.0.11.1 and XWorks 2.0..4, and modifying struts.xml by adding the interceptor-ref tag does not work: 22:58:02,671 ERROR [[default]] Servlet.service() for servlet default threw exception java.lang.IllegalArgumentException: URI scheme is not file at java.io.File.init(Unknown Source) at com..opensymphony.xwork2.validator.ValidatorFactory.parseValidators(ValidatorFactory.java:314) at com.opensymphony.xwork2.validator.ValidatorFactory.clinit(ValidatorFactory.java:224) at com.opensymphony.xwork2.validator.AnnotationValidationConfigurationBuilder.processRequiredFieldValidatorAnnotation(AnnotationValidationConfigurationBuilder.java:575) at com.opensymphony.xwork2.validator.AnnotationValidationConfigurationBuilder.processAnnotations(AnnotationValidationConfigurationBuilder..java:149) at com.opensymphony.xwork2.validator.AnnotationValidationConfigurationBuilder.buildAnnotationClassValidatorConfigs(AnnotationValidationConfigurationBuilder.java:783) at com.opensymphony.xwork2.validator.AnnotationActionValidatorManager.buildClassValidatorConfigs(AnnotationActionValidatorManager.java:254) at com.opensymphony.xwork2.validator.AnnotationActionValidatorManager.buildValidatorConfigs(AnnotationActionValidatorManager.java:340) at com.opensymphony.xwork2.validator.AnnotationActionValidatorManager.getValidators(AnnotationActionValidatorManager.java:69) at com.opensymphony.xwork2.validator.AnnotationActionValidatorManager.validate(AnnotationActionValidatorManager.java:138) at com.opensymphony.xwork2.validator.AnnotationActionValidatorManager.validate(AnnotationActionValidatorManager.java:113) at com.opensymphony.xwork2.validator.AnnotationActionValidatorManager.validate(AnnotationActionValidatorManager.java:100) at com.opensymphony.xwork2.validator.ValidationInterceptor.doBeforeInvocation(ValidationInterceptor.java:142) at com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:148) at org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:48) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223) at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221) I guess it is game over until a new working release comes out --- On Wed, 9/10/08, Struts Two [EMAIL PROTECTED] wrote: From: Struts Two [EMAIL PROTECTED] Subject: Re: JBoss 5 RC1 and Struts 2 : Simple validation error (URI scheme is not file) To: Struts Users Mailing List user@struts.apache.org Date: Wednesday, September 10, 2008, 9:09 AM I believe the issue should be fixed on 2.1.2 (for Websphere at least), but it still remains an issue for Struts 2.0.11.2 (for Websphere users). See the email below: - Original Message From: Rene Gielen [EMAIL PROTECTED] To: Struts Users Mailing List user@struts.apache.org Sent: Wednesday, July 16, 2008 2:40:38 AM Subject: [ANN] Struts 2.0.11.2 General Availability Release with Important Security Fix Apache Struts 2.0..11.2 is now available from http://struts.apache.org/download.cgi#struts20112. This release is a fast track security fix release, including a security fixed version 2.0.5 of XWork, which corrects a serious vulnerability in ParametersInterceptor allowing malicious users to remotely change server side context objects. For more information about the exploit, visit our security bulletins page at http://struts.apache.org/2.0.11.2/docs/s2-003.html. IMPORTANT ADDITIONAL NOTES: There are two known issues with this release: 1. the integrated XWork 2.0.5 jar may cause problems when used in a combination of WebSphere 6.1 runtime environments with validation configuration via XML files. Possible Workarounds: - use annotation based validation definition instead XML based - stay with Struts 2.0..11.1 including XWork 2.0.4, applying the following exclude rule
Re: JBoss 5 RC1 and Struts 2 : Simple validation error (URI scheme is not file)
What version of Struts are you using? If you are using struts version 2.0.12, then this is a known issue (for websphere users). From what I understand,The fix for this problem is not included in xwork-2.0.5. However, if you are using struts 2.1.2 you are not supposed to see this error. - Original Message From: Bobby Mitch [EMAIL PROTECTED] To: user@struts.apache.org Sent: Sunday, September 7, 2008 6:17:45 AM Subject: JBoss 5 RC1 and Struts 2 : Simple validation error (URI scheme is not file) Hi, I am using JBoss RC 1 and Struts 2 and I am facing a problem when trying to use an XML validation file. The error message i get is : Code: java.lang.IllegalArgumentException: URI scheme is not file at java.io.File.(Unknown Source) at com.opensymphony.xwork2.validator.ValidatorFactory.parseValidators(ValidatorFactory.java:323) It looks like it is not happy with the XML validation file. Here is the content of that file : Code: ?xml version=1.0 encoding=UTF-8? !DOCTYPE validators PUBLIC -//OpenSymphony Group//XWork Validator 1.0.2//EN http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd; validators field name=name field-validator type=requiredstring messageYou must enter a name/message /field-validator /field /validators I made some research and found out that someone already had the same error : http://www.nabble.com/Simple-validation-does-not-work-td18894126.html My code looks almost exactly like his. He solved the problem by switching back to JBoss 4.0.5 which is not a convenient solution for me since i want to stick with JBoss 5. I also tried without an XML file for validation, using annotations only. And it turns out that I have the same problem. Here is the complete stack trace : Code: 07:15:07,378 INFO [ActionValidatorManagerFactory] Detected AnnotationActionValidatorManager, initial izing it... 07:15:13,239 ERROR [[default]] Servlet.service() for servlet default threw exception java.lang.IllegalArgumentException: URI scheme is not file at java.io.File.(Unknown Source) at com.opensymphony.xwork2.validator.ValidatorFactory.parseValidators(ValidatorFactory.java:323) at com.opensymphony.xwork2.validator.ValidatorFactory.(ValidatorFactory.java:230) at com.opensymphony.xwork2.validator.ValidatorFileParser.addValidatorConfigs(ValidatorFileParser.jav a:192) at com.opensymphony.xwork2.validator.ValidatorFileParser.parseActionValidatorConfigs(ValidatorFilePa rser.java:72) at com.opensymphony.xwork2.validator.AnnotationActionValidatorManager.loadFile(AnnotationActionValid atorManager.java:361) at com.opensymphony.xwork2.validator.AnnotationActionValidatorManager.buildClassValidatorConfigs(Ann otationActionValidatorManager.java:252) at com.opensymphony.xwork2.validator.AnnotationActionValidatorManager.buildValidatorConfigs(Annotati onActionValidatorManager.java:340) at com.opensymphony.xwork2.validator.AnnotationActionValidatorManager.getValidators(AnnotationAction ValidatorManager.java:69) at com.opensymphony.xwork2.validator.AnnotationActionValidatorManager.validate(AnnotationActionValid atorManager.java:138) at com.opensymphony.xwork2.validator.AnnotationActionValidatorManager.validate(AnnotationActionValid atorManager.java:113) at com.opensymphony.xwork2.validator.AnnotationActionValidatorManager.validate(AnnotationActionValid atorManager.java:100) at com.opensymphony.xwork2.validator.ValidationInterceptor.doBeforeInvocation(ValidationInterceptor. java:142) at com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:14 8) at org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationV alidationInterceptor.java:48) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.jav a:86) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223) at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221) at com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorIntercept or.java:123) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223) at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221) at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java: 186) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.jav a:86) at
Re: JBoss 5 RC1 and Struts 2 : Simple validation error (URI scheme is not file)
In my case, I have downgraded to 2.0.11.1 and it works fine ( I had some issues running the beta code on Websphere). I know ,for sure, that you will not be getting the exception in 2.0.11.1. - Original Message From: Bobby Mitch [EMAIL PROTECTED] To: Struts Users Mailing List user@struts.apache.org Sent: Sunday, September 7, 2008 4:45:07 PM Subject: Re: JBoss 5 RC1 and Struts 2 : Simple validation error (URI scheme is not file) Hi, thanks for your reply. I am using this version : struts-2.0.11.2. I will try the version 2.1.2 and i hope it will work. I will let you know. In the mean time, if you or other people have any other suggestion, please don't hesitate. Thanks. --- On Sun, 9/7/08, Struts Two [EMAIL PROTECTED] wrote: From: Struts Two [EMAIL PROTECTED] Subject: Re: JBoss 5 RC1 and Struts 2 : Simple validation error (URI scheme is not file) To: Struts Users Mailing List user@struts.apache.org Date: Sunday, September 7, 2008, 8:21 AM What version of Struts are you using? If you are using struts version 2.0.12, then this is a known issue (for websphere users). From what I understand,The fix for this problem is not included in xwork-2.0.5. However, if you are using struts 2.1.2 you are not supposed to see this error. - Original Message From: Bobby Mitch To: user@struts.apache.org Sent: Sunday, September 7, 2008 6:17:45 AM Subject: JBoss 5 RC1 and Struts 2 : Simple validation error (URI scheme is not file) Hi, I am using JBoss RC 1 and Struts 2 and I am facing a problem when trying to use an XML validation file. The error message i get is : Code: java.lang.IllegalArgumentException: URI scheme is not file at java.io.File.(Unknown Source) at com.opensymphony.xwork2.validator.ValidatorFactory.parseValidators(ValidatorFactory.java:323) It looks like it is not happy with the XML validation file. Here is the content of that file : Code: ?xml version=1.0 encoding=UTF-8? !DOCTYPE validators PUBLIC -//OpenSymphony Group//XWork Validator 1.0.2//EN http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd; validators field name=name field-validator type=requiredstring messageYou must enter a name/message /field-validator /field /validators I made some research and found out that someone already had the same error : http://www.nabble.com/Simple-validation-does-not-work-td18894126.html My code looks almost exactly like his. He solved the problem by switching back to JBoss 4.0.5 which is not a convenient solution for me since i want to stick with JBoss 5. I also tried without an XML file for validation, using annotations only. And it turns out that I have the same problem. Here is the complete stack trace : Code: 07:15:07,378 INFO [ActionValidatorManagerFactory] Detected AnnotationActionValidatorManager, initial izing it... 07:15:13,239 ERROR [[default]] Servlet.service() for servlet default threw exception java.lang.IllegalArgumentException: URI scheme is not file at java.io.File.(Unknown Source) at com.opensymphony.xwork2.validator.ValidatorFactory.parseValidators(ValidatorFactory.java:323) at com.opensymphony.xwork2.validator.ValidatorFactory.(ValidatorFactory.java:230) at com.opensymphony.xwork2.validator.ValidatorFileParser.addValidatorConfigs(ValidatorFileParser.jav a:192) at com.opensymphony.xwork2.validator.ValidatorFileParser.parseActionValidatorConfigs(ValidatorFilePa rser.java:72) at com.opensymphony.xwork2.validator.AnnotationActionValidatorManager.loadFile(AnnotationActionValid atorManager.java:361) at com.opensymphony.xwork2.validator.AnnotationActionValidatorManager.buildClassValidatorConfigs(Ann otationActionValidatorManager.java:252) at com.opensymphony.xwork2.validator.AnnotationActionValidatorManager.buildValidatorConfigs(Annotati onActionValidatorManager.java:340) at com.opensymphony.xwork2.validator.AnnotationActionValidatorManager.getValidators(AnnotationAction ValidatorManager.java:69) at com.opensymphony.xwork2.validator.AnnotationActionValidatorManager.validate(AnnotationActionValid atorManager.java:138) at com.opensymphony.xwork2.validator.AnnotationActionValidatorManager.validate(AnnotationActionValid atorManager.java:113) at com.opensymphony.xwork2.validator.AnnotationActionValidatorManager.validate(AnnotationActionValid atorManager.java:100) at com.opensymphony.xwork2.validator.ValidationInterceptor.doBeforeInvocation(ValidationInterceptor. java:142) at com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:14 8) at org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationV alidationInterceptor.java:48) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.jav a:86) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling
Re: Extending EJBInjection interceptor
I am currently using my own customized EJB3InjectInterceptor for Websphere application server (It only injects local beans as I do not use remote in my application). Now seeing that Jeromy is working on a new Interceptor, I wonder if all the servers follow the same lookup pattern. I know that in websphere you can look up a local session bean using: ejblocal:fully qualified class name If the lookup pattern is the same among all the servers then having an interceptor that does the injection regardless of the server used is a great idea. Jeromy Evans schrieb: Alexander Baetz wrote: Hi, i'm currently working on a new Interceptor for EJB Injection on Actions. I allready extendet it to work on fields and methods. But since i dont like to make my own Annotation type i wanted to use the javax.ejb.ejb anotation. But there is a small problem with that: the annotation used by the ejb3-plugin for struts 2 has a field that determines if the bean is statefull or stateless. I don't have this bean, so how do i determine for the injection if the bean is statefull? I'm not familiar with the plugin, but why does it need to know whether the bean is statefull or stateless? I don't think that should affect the lookup or injection into the action, should it? Only the Container that instantiates the bean and provides the instance cares, doesn't it? __ Yahoo! Canada Toolbar: Search from anywhere on the web, and bookmark your favourite sites. Download it now at http://ca.toolbar.yahoo.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[S2] Reason for having Prepare interceptor before Param interceptor?
Is there any reason that Prepare interceptor is called before Param interceptor in the default stack, I see numerous occasions, at least in my case, that you want to have prepare() method run based on user selection. I understand that I can build my stack the suits my needs, However; I was wondering if someone can kindly elaborate on why having prepare interceptor after the params may not be considered a reasonable default as opposed to current one? __ Ask a question on any topic and get answers from real people. Go to Yahoo! Answers and share what you know at http://ca.answers..yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[S2] Checkbox problem
I have a checkbox as follows in a jsp: s:checkbox theme=simple name=ticket.ccUpdateFlag id=ticket.ccUpdateFlag / Once a user selects the checkbox and submits the form, ccUpdateFlag is set to true. However, on the database side the value is stored as 'Y' or 'N' . So my getCcUpdateFlag returns 'Y' or 'N' depending on the fact ccUpdateFlag is set to true or false. Now on a different page (say update/vie page), I have the same exact check box. I have been trying to map 'Y' to fieldValue=true unsuccessfully so far. I have tried the followings: s:checkbox theme=simple name=ticket.ccUpdateFlag id=ticket.ccUpdateFlag s:if test=ticket.ccUpdateFlag='Y'filedValue=true/s:if / This breaks the page and the page does not even compile, I get invalid jsp exception.. I then went to my bean and added the following method: public boolean isCCUpate(){ return Y.equals(getCcUpdateFlag()); } I then tried to use the following: s:checkbox theme=simple name=ticket.ccUpdateFlag id=ticket.ccUpdateFlag fieldValue=s:property value='ticket.CCUpate'/ / This would also fail, looking at generated html, here is what is generated: input type=checkbox name=ticket.ccUpdateFlag value=lt;s:property value='ticket.CCUpate'/gt; id=ticket.ccUpdateFlag/ input type=hidden name=__checkbox_ticket.ccUpdateFlag value=lt;s:property value='ticket.CCUpate'/gt; / Is there a way that I can have checkbox fieldValue=true if ticket.ccUpdateflag == 'Y'. __ Instant Messaging, free SMS, sharing photos and more... Try the new Yahoo! Canada Messenger at http://ca.beta.messenger.yahoo.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Get path to the webapp
Assuming you have a file named test.txt at the root of your webapp, you can get the absolute path name to the file with the following code snippet in ur interceptor. ActionContext context = actionInvocation.getInvocationContext(); HttpServletRequest request = (HttpServletRequest) context.get(com.opensymphony.xwork2.dispatcher.HttpServletRequest); String completeFilename = request.getSession().getServletContext().getRealPath(test.txt); - Original Message From: Paul Benedict [EMAIL PROTECTED] To: Struts Users Mailing List user@struts.apache.org Sent: Tuesday, August 12, 2008 6:56:24 PM Subject: Re: Get path to the webapp Vasyl, The attempt is very iffy. Some things you need to know: 1) No Servlet API provides the path to your files. 2) If running in a WAR file that is never expanded, there will be no such file directory that will exist. 3) You can use the classloader of the web context to get the root of your web application, but that assumes #2 is false. You must be on a file system for it to work. Paul On Tue, Aug 12, 2008 at 8:04 AM, Vasyl Skrypij [EMAIL PROTECTED] wrote: Hi all I have Struts 2.0.9 I need to get the path to the directory in which my web application is situated during interceptor's asking. How can I do this been using ActionInvocation class object which passes into intercept method, or maybe i should try some other way? -- View this message in context: http://www.nabble.com/Get-path-to-the-webapp-tp18943905p18943905.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Yahoo! Canada Toolbar: Search from anywhere on the web, and bookmark your favourite sites. Download it now at http://ca.toolbar.yahoo.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Simple validation does not work
xwork2.0.5 is missing a patch for websphere users, use xwork2.0.6. I am also using RAD 7.5 and Was 6.1.0.17 and EJB3 feature pack. When I upgraged to struts 2.0.12, I had problems in running my validations and some more issues, I downgraded to 2.0.11.1 and everything is fine. However, the struts 2 folks in their release note mentioned that xwork 2.0.5 is missing a patch for WAS users and the patch is included in xwork 2.0.6. So you can either use 2.0.11.1 or use xwork 2.0.6 instead of xwork 2.0.5 - Original Message From: holod [EMAIL PROTECTED] To: user@struts.apache.org Sent: Saturday, August 9, 2008 6:39:42 AM Subject: Re: Simple validation does not work http://www.mvnrepository.com/artifact/com.opensymphony/xwork/2.0.5 Scroll down page and see Source Control paragraph. Use some svn client and checkout branch. Using command mvn package you can compile and package the project. Then use your new jar instead of official-released. It helped for me, but I'm using WebSphere AppServer 6.1 + EJB3 feature pack. The problem was in difference between IBM JDK and Sun JDK. Good luck, Anton. __ Ask a question on any topic and get answers from real people. Go to Yahoo! Answers and share what you know at http://ca.answers.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: EJB Injection for Struts 2 Actions
You can extend the default stack to inject EJB3. I am not sure if the lookups for all the servers are the same, but in my case, I have extended the default stack to inject EJB3 local lookups through an interceptor on Websphere and it is working prettry good. - Original Message From: Alexander Bätz [EMAIL PROTECTED] To: Struts Users Mailing List user@struts.apache.org Sent: Sunday, August 3, 2008 4:01:12 AM Subject: EJB Injection for Struts 2 Actions Hi, i'm looking for a possibility to realize EJB injection for struts actions. The simpler the better. I know that there is a EJB plugin in the registry but currently (and at least for the last 3 weeks) there is now download on the project site. Some explanation how this is possible in struts and a working example would be great. Greetings, Alex __ Ask a question on any topic and get answers from real people. Go to Yahoo! Answers and share what you know at http://ca.answers.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts2 on Websphere portal 6.1.0.0
I am running Struts2.0.11.1 on Websphere 6.1.0.17 NOT THE WEBSPHERE PORTAL. You need to keep the followings in mind: 1- You need to have at least fixpack 13 or 15 ( I am not sure which one, otherwise you CAN NOT RUN STRUTS 2 ON WAS) 2- Struts 2.0.11.2 has problems running on Websphere 6.1 (it is missing a patch), so you need to downgrade to 2.0.11.1 till next release (2.0.11.3 or 2.0.12) 3- Once the above you are done with above steps, you need to set the following custom property for WAS server: com.ibm.ws.webcontainer.invokefilterscompatibility = true If you do not set the above property, you can not run struts 2 on WAS as well. However; I did a project using struts on Websphere portal 6.0. IBM provides its own customized struts that works with portal (which is based on struts1), and it is pretty good. I recommend use the IBM's struts that comes with Portal server as you would have a hard time using struts 2 with websphere portal. Hope this helps, - Original Message From: Dinesh Narayanan [EMAIL PROTECTED] To: user@struts.apache.org Sent: Thursday, July 31, 2008 3:26:20 PM Subject: Struts2 on Websphere portal 6.1.0.0 Has Anybody tried Struts2 (Struts-2.0.11.2) on Websphere portal 6.1.0..0? I am running into issues when I tried a very simple JSR168 example. Any help would be appreciated. Is there some example of struts2 sample in websphere portal 6.1? A) My portlet.xml contains the following entries init-param nameviewNamespace/name value/view/value /init-param !-- The default action to invoke in view mode. -- init-param namedefaultViewAction/name valueindex/value /init-param B) My struts.xml is struts package name=view extends=struts-portlet-default namespace=/view action name=index class=com.myCompany.proj1.ExampleAction result name=success/WEB-INF/view/index.jsp/result /action /package /struts Thanks Dinesh __ Be smarter than spam. See how smart SpamGuard is at giving junk email the boot with the All-new Yahoo! Mail. Click on Options in Mail and switch to New Mail today or register for free at http://mail.yahoo.ca - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts2 and Jquery problem with LightBox or thickbox
What was meant is: Does you applicaiton functionsas expected despite the exception you see on ur console or the exception brings your application (or some functionality) to a halt. - Original Message From: prashanth2 [EMAIL PROTECTED] To: user@struts.apache.org Sent: Tuesday, July 15, 2008 1:46:49 PM Subject: Re: Struts2 and Jquery problem with LightBox or thickbox I dont understand what u asked, anyways iam getting the below exception, and thickbox/lightbox never opened for me. Jul 2, 2008 3:39:54 PM com.opensymphony.xwork2.interceptor.ParametersInterceptor setParameters SEVERE: ParametersInterceptor - [setParameters]: Unexpected Exception caught setting 'height' on 'class com.hicom.web.action.UserSignupAction: Error setting expression 'height' with value '[Ljava.lang.String;@7a847a84' newton.dave wrote: DOES IT ACTUALLY NOT WORK OR DOES IT JUST LOG THE EXCEPTION --- On Tue, 7/15/08, prashanth2 [EMAIL PROTECTED] wrote: From: prashanth2 [EMAIL PROTECTED] Subject: Re: Struts2 and Jquery problem with LightBox or thickbox To: user@struts.apache.org Date: Tuesday, July 15, 2008, 9:17 AM CAN SOMEBODY HELP ME, HOW CAN I CREATE A LIGHT OR THICK BOX prashanth2 wrote: I tried to implement thickbox functionality in a jsp ,to display iframe in a thickbox. If I use a simple a href using a jsp,thickbox works fine, but if i use s:url with *.action as the url ,and if i pass height,width attributes ,iam getting an error .I tried removing height and width, but iam getting an exception saying ParametersInterceptor exception using random .Random variable is used by jQuery.js internally. If i can not use Jquery 'thickbox, what other frameworks support thickbox kind of functionality, as i need thick box to show some dynamic content,such as user's information or it can be a form submit. Jul 2, 2008 3:39:54 PM com.opensymphony.xwork2..interceptor.ParametersInterceptor setParameters SEVERE: ParametersInterceptor - [setParameters]: Unexpected Exception caught setting 'height' on 'class com.hicom.web.action.UserSignupAction: Error setting expression 'height' with value '[Ljava.lang.String;@7a847a84' -- View this message in context: http://www.nabble.com/Struts2-and-Jquery-problem-with--LightBox-or-thickbox-tp18326073p18465058.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Struts2-and-Jquery-problem-with--LightBox-or-thickbox-tp18326073p18471126.html Sent from the Struts - User mailing list archive at Nabble.com.. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Connect with friends from any web browser - no download required. Try the new Yahoo! Canada Messenger for the Web BETA at http://ca.messenger.yahoo.com/webmessengerpromo.php - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Where to get latest binaries
Hi: Can anyone tell me where I can get the latest binaries for struts 2.1..x that contains the fixes since the struts 2.1.2 build release on 02-May-2008. I would like to test JIRA WW-2642 that I opened using 2.1.2 and have the issue closed. All I need is the sample applicaiton{hello world) with binaries that contain the fixes, say 2.1.3. I went to followoing page but did not find what I was looking for. http://people.apache.org/builds/struts/ - Original Message From: hns [EMAIL PROTECTED] To: user@struts.apache.org Sent: Monday, July 14, 2008 9:46:43 AM Subject: RE: about security HI According to help of some previous threads i have created Login interceptor,i really such thankful to all helpful people who help me in this discussion please http://www.nabble.com/about-current-action-name-acsess-td15736383.html#a15755941 Check here and read out from first thread ,you can take advantage of it Yanni Tan wrote: I am new to the web development, but I like the concept of this answer. Could you explain more about how to setup/configure the interceptor? i.e. How to hook up your interceptor method with the server? Thanks! -- View this message in context: http://www.nabble.com/about-security-tp18402549p18444283..html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Looking for the perfect gift? Give the gift of Flickr! http://www.flickr.com/gift/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: about security
Here are my thoughts [based on my experience with Websphere but I hope they can be generalized): 1- Using session for users's authentication is not a very good idea esp if there is a chance that they may have multiple browser or tabs open at the sametime. there is a great chance of session mix-ups. However; if you are , for some reason or another, pressed to use http session, make sure that you use url rewriting instead of cookies for session tracking[ Websphere also allows a thrid way to use ssl ids for this purpose if you use ssl]. To do so you do not need to change your code, you need to change container settings. 2- Applying security using JASS or realm is a web-container setting not struts 2. You need to do two things: a) Enable the security of your container (server) to use a registery for authentication (LDAP,OS,...). Note that some servers like websphere allow you to extend its capability to use a custome registery (say database for this purpose) b) Change your web.xml and application.xml (add security constraints and roles and ...). Once it is done. It does not matter u use struts 2 or struts 1 or anyother framework. At logging (first access) users get chanllenged. In my case, to avoid using session for authentication, I am using an interceptor to retrieve user role and other information on each request. Note that once a user is logged in (assuming you use single signon), users' credentials (login name) are cached by the server and at each request you can retrieve it using request.getRemoteUser(). So you can rid of session by paying a very slight overhead of retriving all necessary information at each request using an interceptor. regards, - Original Message From: hns [EMAIL PROTECTED] To: user@struts.apache.org Sent: Friday, July 11, 2008 8:17:54 AM Subject: about security hi i have successfully converted and deployed struts 2.0.11 application to client but still have some security questions because i have less knowledge of jaas ,realm or role based security i have done authentication using query fire in database for user name and password when user authenticated i have stored his user name and user id and user type (admin,executive,branch head) in session problems 1. users can login from diff node or diff explorer n with same user name ,how to solve it 2. how can i apply realm or jaas in struts 2.0.11 please help me ,i am waiting for favorable reply -- View this message in context: http://www.nabble.com/about-security-tp18402549p18402549.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Get the name you've always wanted @ymail.com or @rocketmail.com today! Go to http://ca.promos.yahoo.com/jacko/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: iterate from session
What do you mean by it's not producing any markup ?. The iterator tag does not produce any markup. - Original Message From: Dhiraj Thakur [EMAIL PROTECTED] To: user@struts.apache.org Sent: Wednesday, July 9, 2008 4:05:39 PM Subject: iterate from session Hi there, I am trying to iterate a session variable of type HashMapString, List using the following code, but it's not producing any markup.. s:iterator value=#session.User id=User s:property value=key / s:property value=value/ /s:iterator If there is any example on how to iterate object from session variable than please let me know. regards, Dhiraj __ Yahoo! Canada Toolbar: Search from anywhere on the web, and bookmark your favourite sites. Download it now at http://ca.toolbar.yahoo.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]