Re: Struts2 - freemarker error

2009-06-25 Thread Jim Kiley
Please for the love of all that is good in the world don't actually post all that. On Thu, Jun 25, 2009 at 5:52 PM, Martin Gainty wrote: > > please post all jsp pages, all freemarker template code ,all java code and > configuration > files of applicationContext.xml, decorators.xml, dwr.xml, site

Re: Struts2 - freemarker error

2009-06-25 Thread Dave Newton
Martin Gainty wrote: please post all jsp pages, all freemarker template code ,all java code and configuration files of applicationContext.xml, decorators.xml, dwr.xml, sitemesh.xml tiles.xml,validation.xml, web.xml, struts-actionchaining.xml,struts-ajax.xml , struts-chat.xml, struts-conversion.x

Re: Dynamic value supplied s:text name in struts 2

2009-06-25 Thread gdown
Correction on this question. With Struts1 the following would work: JSP: <% String productType = [get the productType from the form] String productTypeI18nKey = "product.type.list." + productType; %> With the Struts2, how would I do the same. I've tried: JSP: <% String productTypeI18nKey =

Re: Prevent Word formatting

2009-06-25 Thread Dave Newton
Jim Collings wrote: I don't want users pasting in formatting from Word into my Struts II text area. How can I prevent this? Don't allow them to paste? You'd have to filter via JavaScript or on the server side. Dave - To unsu

RE: Struts2 - freemarker error

2009-06-25 Thread Martin Gainty
please post all jsp pages, all freemarker template code ,all java code and configuration files of applicationContext.xml, decorators.xml, dwr.xml, sitemesh.xml tiles.xml,validation.xml, web.xml, struts-actionchaining.xml,struts-ajax.xml , struts-chat.xml, struts-conversion.xml, struts-filedownloa

RE: Struts1 or Struts2

2009-06-25 Thread Mitchell, Steven
Chris, My opinion is that you will take an initial productivity hit while the team gets accustomed to the new JSP tags. That is what took me the longest. I also switched from Tiles to SiteMesh, which like much better. My recommendation is to pick one person to do the first small, benchmark applic

Dynamic value supplied s:text name in struts 2

2009-06-25 Thread gdown
With Struts1 the following would work: JSP: <% String productType = [get the productType from the form] String productTypeI18nKey = "product.type.list." + productType; %> With the Struts2, how would I do the same. I've tried: JSP: <% String productTypeI18nKey = "product.type.list." + productT

Struts1 or Struts2

2009-06-25 Thread CRANFORD, CHRIS
My company has used Struts1.1 and Struts1.2 for the development of our widely used customer portal web application environment. Recently, the company has decided to migrate to a new back office solution and as a part of this project, our customer portal application is needing to be rewritten as w

Changing Result Class at Runtime

2009-06-25 Thread Dan Slack
Hi, So, first off, I'm doing some unit testing with Struts2. So far, using different solutions provided from other sites, I've been able to run a unit test on an Action. However, I had to tell Struts2 to NOT execute the result. This is fine when I'm testing that my Action is a-ok, however, I

RE: Prevent Word formatting

2009-06-25 Thread Dan Slack
If you want to allow pasting, but just strip out the word formatting, well, that can be a pain, and the easiest solution is to use javascript. I've used a library called CleanPaste (http://antscode.blogspot.com/2009/05/strip-formatting-on-paste-using-yui.ht ml), however, this is tied to the YUI Ri

Re: Struts2 redirect-action with post params

2009-06-25 Thread Kelly.Graus
Hi Wes, I am using Struts 2.0.11.2. I tried it using redirectAction, but I am still receiving the same error. Kelly Wes Wannemacher wrote: > > On Thu, Jun 25, 2009 at 1:36 PM, Kelly.Graus > wrote: > >> >> >> This is the redirect action. it redirects to the action, but the post >> parameter

Prevent Word formatting

2009-06-25 Thread Jim Collings
I don't want users pasting in formatting from Word into my Struts II text area. How can I prevent this? Jim C. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache

Re: Struts 2.1 Assigning a property to a JSP variable

2009-06-25 Thread gdown
Well I found 2 ways to assign an action's property to a JSP variable in a scriptlet: Solution 1: Set property as an attribute JSP: <% String myProductType = request.getAttribute("prodType") %> This takes the action's productType property and stores it as an attribute called prodType in the req

Re: Struts 2.1 Accessing the action instance from a JSP

2009-06-25 Thread gdown
I was able to get access to the action from the JSP as follows (it isn't pretty but it worked) JSP: <% com.opensymphony.xwork2.ognl.OgnlValueStack stack = (com.opensymphony.xwork2.ognl.OgnlValueStack)request.getAttribute("struts.valueStack"); MyAction myAction = (MyAction)stack.findValue("actio

Save web page as pageName.doc

2009-06-25 Thread Jim Collings
This still isn't working. In theory, if I set the meta data as below: This should explicitly tell the browser what to call the file but the file name still comes out as action-name. Does anyone have any ideas as to how I can prevent this? Perhaps if I move the "downloadable-report.jsp" file

Re: Struts2 redirect-action with post params

2009-06-25 Thread Wes Wannemacher
On Thu, Jun 25, 2009 at 1:36 PM, Kelly.Graus wrote: > > > This is the redirect action. it redirects to the action, but the post > parameter isn't set. > > type="redirect-action">submitXmlLicenseRequest > > > Which version of struts are you using, redirect-action was renamed to redirectA

Re: Struts 2.1 Accessing the action instance from a JSP

2009-06-25 Thread Wes Wannemacher
Does it have to be in a scriptlet? OGNL will let you call methods, assuming the action is on top of the stack (you aren't inside of another action from the s:action tag, or you aren't in an iterator that is iterating an object that has a matching method) - -Wes On Thu, Jun 25, 2009 at 2:08 PM,

Re: Struts2 tags inside freemarker sitemesh decorator

2009-06-25 Thread Wes Wannemacher
I use JSP decorators and struts tags in the decorators, I can't testify about freemarker, but it works with JSP, so I would imagine there is a good chance it would work with freemarker. -Wes On Thu, Jun 25, 2009 at 1:12 PM, rdk1 wrote: > > Hello, > > is it possible? More importantly, is it possib

Re: Struts2 redirect-action with post params

2009-06-25 Thread Kelly.Graus
Hi Brice, I tried that, I still am receiving a [Fatal Error] Premature end of file error, and the licenseRequest parameter is not being set. Any ideas as to why this wouldn't work? Thanks! Kelly brice.roncace wrote: > > Using the named parameter (parameters) that Struts2 places on the OGNL

Struts 2.1 Accessing the action instance from a JSP

2009-06-25 Thread gdown
Does anyone know how to access the action instance from the value stack. I'd like to be able to call a method on the action from the JSP. I'm trying to do something like this: MyAction.java: public class MyAction extends ActionSupport { public String myMethod() { return "somethi

Struts 2.1 Assigning a property to a JSP variable

2009-06-25 Thread gdown
Does anyone know how to assign a value from to a JSP variable? I'm trying to do something like this (I know this doesn't work): <% String prodType = ; %> We're migrating a struts 1.0.2 app to 2.1 and we have a lot of code that used to access the ActionForm and assign values to JSP. Thanks

[S2] Can't setBufferSize on StreamResult from action configuration (Struts2 2.1.6)

2009-06-25 Thread Francisco José Aquino García
Hi,   I've been coding an action which returns a streamed image based on some image id. Quick and dirty, something like: package org.chop.prjx.actions; import java.io.*; import java.slf4j.*; import com.opensymphony.xwork2.ActionSupport; import eu.medsea.mimeutil.MimeUtil; public class ThumbnailA

Re: Struts2 redirect-action with post params

2009-06-25 Thread brice . roncace
Using the named parameter (parameters) that Struts2 places on the OGNL stack should work for you: submitXmlLicenseRequest ${#parameters.licenseRequest} Brice On Jun 25, 2009 11:36am, "Kelly.Graus" wrote: Hello, I am trying to redirect to an action when the default index page is

Struts2 redirect-action with post params

2009-06-25 Thread Kelly.Graus
Hello, I am trying to redirect to an action when the default index page is navigated to. However, I want to include the post params so they are sent to the action. Here's what I've got so far: This is the action that I want to redirect to. If I call it directly, it works as expected.

Struts2 tags inside freemarker sitemesh decorator

2009-06-25 Thread rdk1
Hello, is it possible? More importantly, is it possible to access value stack and thus attributes of current action? I'm on Struts 2.1.7 Regards, rdk -- View this message in context: http://www.nabble.com/Struts2-tags-inside-freemarker-sitemesh-decorator-tp24207453p24207453.html Sent from the

Re: Struts FilterDispatcher issue with regard to specification 2.4

2009-06-25 Thread Struts Two
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

problem in parameter passing to chained action with the same parameter name

2009-06-25 Thread Halil Ağın
Hello List; I am doing some expreiment on chaining action. I want to pass a request parameter to my chained action with the same name of parameter. I call the action as http://localhost:8080/action3.action?param=10 action3 decrease the param value by 1 and return the chained result. the chained a

Re: Exceptions thrown by constructor different from those thown by execute() ?

2009-06-25 Thread Wes Wannemacher
On Thu, Jun 25, 2009 at 9:05 AM, Jan T. Kim wrote: > > I agree that from an EJB provider's angle its quite possible to argue > that session bean's constructors shouldn't throw exceptions. From an > application assembler's perspective, though, I'd expect that a global > exception mapping would handl

Struts2 - freemarker error

2009-06-25 Thread Kishan G. Chellap Paandy
Hi, I'm using struts 2.1.6, xwork-2.1.2, freemarker 2.3.13, ognl 2.6.11 and jboss 5.0.1. I'm having one ftl, where I'm doing the following <#list "${additionalMethods}"?split(",") as additional> <#assign tmpInner>${additional?trim?substring(0, additional?trim?index_of(":"))} But this gives m

Re: Generating Dynamic radio button list

2009-06-25 Thread BlackKnight
Jim Kiley ??: You need to provide Struts with an actual List (or Set or the like). It looks like you are providing a single String. You will need to parse that String out into a List of Strings in order for to treat it as a List. jk 2009/6/24 BlackKnight Hi, I am trying to generate a d

Re: Exceptions thrown by constructor different from those thown by execute() ?

2009-06-25 Thread Jan T. Kim
Dear Chris, On Thu, Jun 25, 2009 at 08:23:30AM -0400, musom...@aol.com wrote: > > I am with the devs on this one -- typically the constructor of an object > whose life cycle is managed by > the framework is off limits -- you wouldn't write code to throw exceptions > from a servlet or > EJB et

Re: Exceptions thrown by constructor different from those thown by execute() ?

2009-06-25 Thread musomesa
I am with the devs on this one -- typically the constructor of an object whose life cycle is managed by the framework is off limits -- you wouldn't write code to throw exceptions from a servlet or EJB etc. Chris -Original Message- From: Wes Wannemacher To: Struts Users Mailing Lis

RE: how to prevent users from directly accessing jsp files

2009-06-25 Thread Sathishkumar Thiyagarajan
Vishnu, If you would like to secure particular file extension try giving it as below. *.jsp Hope it solves your issue. Regards, Sathish Kumar T -Original Message- From: Vishnu Vyasan Nelliparmbil [mailto:vis...@mun.gov.bh] Sent: Thursday, June 25, 2009 12:55 PM To: Struts Users Mailin

Re: Cannot find bean in scope

2009-06-25 Thread Dave Newton
Sam Wun wrote: I got this errors: 12:42:04,269 INFO [PluginPackageUtil:1391] Finished checking for available updates in 3 ms 12:42:14,020 ERROR [PortletRequestDispatcherImpl:316] org.apache.jasper.JasperException: javax.servlet.ServletException: javax.servlet.jsp.JspException: Cannot find bean:

Re: Pre setAttribute for a form

2009-06-25 Thread Sam Wun
Like I have said before, if I "manually" navigated to the RedirectHellpForm page , then reload the first page (RedirectForm), and press the Submit button from the RedirectForm, it can find the "name" of RedirectHelpForm. My questions is how can I setAttribute("RedirectHelpForm" ...) before navigate

RE: how to prevent users from directly accessing jsp files

2009-06-25 Thread Vishnu Vyasan Nelliparmbil
Even I am facing the same problem. All JSP direct access /pages/* POST GET No Access restricted NO Access restricted Up on restricting as given above, the container is not allowing the struts to access t

Re: Pre setAttribute for a form

2009-06-25 Thread Sam Wun
I just tried your suggestion, it doesn't work. The page flow is: RedirectAction -> RedirectHelpAction -> RedirectStep3Action Here is the RedirectAction.java file: import org.apache.commons.logging.LogFactory; import javax.portlet.ActionRequest; import javax.portlet.ActionResponse; import javax.p