Re: [S2] Welcome Page as Action?

2010-04-15 Thread Chris Pratt
How'd it go when you put an empty default.action file in the directory? (*Chris*) On Wed, Apr 14, 2010 at 10:54 PM, Burton Rhodes burtonrho...@gmail.comwrote: I'm not sure the default action solves the problem. I am put this in my struts.xml file: !-- Set the default action to Login_show

previous action

2010-04-15 Thread lucas owen
Hi Struts users: An easy one: how can I figure out the struts 2 previous action, the one I come from? I have tried everything but nothing works... Thanks in advance!!!

Re: previous action

2010-04-15 Thread Kun Niu
You'll have to track it all by yourself with an action ID or something related, as a parameter of your request url. lucas owen wrote: Hi Struts users: An easy one: how can I figure out the struts 2 previous action, the one I come from? I have tried everything but nothing works... Thanks in

Re: [S2] Welcome Page as Action?

2010-04-15 Thread Upasana Sharma
Hi I put these in my project and its working for me. I created a blank file called welcome. In struts.xml package name=default namespace=/ extends=struts-default default-action-ref name=welcome/ action name=welcome class=com.upasana.WelcomeAction result name=SUCCESSWelcomePage.jsp/result

RE: Convention Plugin not being picked up.

2010-04-15 Thread Miles, Chris
Hi, I am using the convention plugin, not the older codebehind plugin. The convention plugin exists in my lib directory. I am calling actions by /namespace/actionName.action Thanks Chris Good Afternoon Chris best to look at the usage of the code behind plugin

Re: previous action

2010-04-15 Thread lucas owen
thanks for the answer, but I'm completely sure you can obtain it from ActionContext or ActionInvocation or something similar... the problem is I don´t know how. 2010/4/15 Kun Niu haoniu...@gmail.com You'll have to track it all by yourself with an action ID or something related, as a parameter

Re: previous action

2010-04-15 Thread Sébastien Domergue
i think this information may be found if you are in a redirect result (and i'm not sure of that). Struts won't save the last action per session because anything will say that it is an action that renders a complete page or just a piece of page using ajax. Another exemple is that your action is

Re: previous action

2010-04-15 Thread Robert Graf-Waczenski
lucas owen schrieb: thanks for the answer, but I'm completely sure you can obtain it from ActionContext or ActionInvocation or something similar... Not to my knowledge (i may be wrong, though). My understanding of the ActionContext and the ActionInvocation is that both are valid only per

Re: Webapp runs under Windows, throws OGNL error under Linux

2010-04-15 Thread RogerV
OK - I think I've found out what is happening, and I think that there may be a bug in OGNL-2.7.3. The error occurs when Struts/Ognl is trying to assign user entered values back into a user object through the action. When I try to process the jsp of the failing action, Ognl calls

Struts 2 in an EAR

2010-04-15 Thread James Cook
Hi All, I have a Struts 2 enabled WAR that works fine when deployed on its own, but when packaged as part of an EAR it doesn't appear to be scanning for the annotations in the WAR as I get the unable to find Action message. I am running this on Glassfish 2.1.1 and using Struts 2.1.8.1

RE: Struts 2 in an EAR

2010-04-15 Thread Miles, Chris
NOT PROTECTIVELY MARKED James, Is this using the Convention plugin? If so then this is the exact same problem I have posted about. Not been able to find a solution yet. I am also using a Annotation enabled application within an WAR/EAR combo on Glassfish 2.1. Chris -Original Message-

RE: Struts 2 in an EAR

2010-04-15 Thread James Cook
Hi Chris, Yes this is the same issue this end. It is strange because there is a document talking about multiple Struts 2 WARs in an EAR. So I would imagine this has to be possible. I have set the logging level to FINEST on the Struts packages to see what was happening on boot (when the scanning

How to use XSL Result

2010-04-15 Thread kindlerm
Hi, I am trying to create a simple XML output using Struts 2 (2.6.1). Following tips from this list I chose to use an action with xsl result (although writing/debugging an extra XSLT in my case is just a nice exercise). I am looking for some documentation about the XML (resp. DOM) the XSLT is

Re: previous action

2010-04-15 Thread Dale Newfield
lucas owen wrote: An easy one: how can I figure out the struts 2 previous action, the one I come from? You could be asking for either of two different things: The action related to the current request? The action related to the URL being displayed in the browser's address bar when the

Re: previous action

2010-04-15 Thread Greg Lindholm
I've added this method to my ActionBase class to get the action name. /** * Gets the action name. This is just the bare name without .action extension. * * This is equivalent to #context['struts.actionMapping'].name from in a JSP. * * @return the action name */

Re: [S2] Welcome Page as Action?

2010-04-15 Thread Burton Rhodes
Haven't gotten it to work just yet. Just one of those minor enhancements that you can't justify spending an entire day on. I'll keep woroking at it though. Thanks all for your input and knowledge. On Thu, Apr 15, 2010 at 3:59 AM, Upasana Sharma sharma...@gmail.com wrote: Hi I put these in

Re: struts PDF

2010-04-15 Thread Chris Mawata
Adam, try editing this (it works for me when I am downloading a jar file in terms of the name of the file. It should with some editing work for your pdf) You can also do the equivalent in your struts.xml if you want to. @Results({ @Result(name=success, type=stream,

Re: S:radio onchange call an action

2010-04-15 Thread hisameer
Thanks Kusuma, It worked like a Charm! Kusuma Haranath Atmakuri wrote: try something like this: function callRelatedAction(actionName) { var testForm = document.getElementById('test'); testForm.action=actionName; testForm.submit(); }

Re: Using json in Struts 2.1.8.1

2010-04-15 Thread sharath karnati
Can anyone please let me know, how to use json??   Thanks, Sharath. --- On Wed, 4/14/10, sharath karnati karna...@yahoo.com wrote: From: sharath karnati karna...@yahoo.com Subject: Using json in Struts 2.1.8.1 To: user@struts.apache.org Cc: karna...@yahoo.com Date: Wednesday, April 14, 2010,

Re: Using json in Struts 2.1.8.1

2010-04-15 Thread hisameer
Do something like this: In your struts.xml define result types as follows: package name=package_name extends=struts-default namespace=/namespace_name result-types result-type name=json class=com.googlecode.jsonplugin.JSONResult /

Struts vs SpringMVC

2010-04-15 Thread Frans Thamura
have anyone read this? http://www.java4learners.com/struts/faq/what-are-advantages-spring-mvc-over-struts http://www.java4learners.com/struts/faq/what-are-advantages-spring-mvc-over-strutsany comment? -- Frans Thamura Meruvian. Experiential Tempation of Java and Enterprise OpenSource

How to reuse field validators?

2010-04-15 Thread Griffith, Michael *
Hello all, I am not clear on how to reuse a field validator that doesn't share a common package or action/alias. I have package ...struts.admin/ ...struts/application/ with namespaces /admin and /application respectively. I have a model object with a validator modelClass-validator.xml in

Basic security problem

2010-04-15 Thread Stephane Cosmeur
Hello struts users I have a really basic security problem and i would like to know what is the best practice to resolve it. I have an application with an authentification system and diffrent rights for diffrent type of user. To add or remove a link/fonctionnality, we simply declarate the element

Re: Basic security problem

2010-04-15 Thread Kun Niu
You should check the authentication all by yourself in your action. Stephane Cosmeur wrote: Hello struts users I have a really basic security problem and i would like to know what is the best practice to resolve it. I have an application with an authentification system and diffrent rights for

Re: Basic security problem

2010-04-15 Thread Cimballi
Hi Stephane, As Kun says, you have to test the role in your action. One way to do it it to have a super action with a permission property, and you set the permission property with a static param in your struts xml files using the StaticParameters interceptor. Then, you add a hasPermission method

Re: Struts vs SpringMVC

2010-04-15 Thread Cimballi
Comments are already included in the doc : 1. When we talk about MVC frameworks Struts(original and not Struts2) 2. Sturts 2 is the revision of Struts (original) and takes care of such shortcoming and provides a good set of competing features. So not so much to debate on... Cimballi On Thu,

Re: Struts vs SpringMVC

2010-04-15 Thread aum strut
Well we using Spring is our most of projects but to be honest we are using it for IOC,AOP and yes for other stuff but as per MVC is concerned Struts is our first choice.. we are on way to migrate our 25% of projects to Struts2 from struts1. On Fri, Apr 16, 2010 at 8:48 AM, Cimballi

Re: Basic security problem

2010-04-15 Thread Stephane Cosmeur
Thank you for answers. Your method looks good Cimbali. But do you think it would be really better than an object which describe the role of the user stored in the session map ? At firstline of each action in java, i would have: 'if (role.hasRighMethodName == true) .. Do you think your method is