Re: Create multiple struts configuration file problem

2008-08-06 Thread Engr. Jherald Gerome Lacambra
try first to use what i have posted. Its different from what you are using now 2008/8/7 angelwei <[EMAIL PROTECTED]>: > > if i try this on web.xml: > > > action > org.apache.struts.action.ActionServlet servlet-class> > - <#> > config > /WEB-INF/s

ApplicationResources.properties and JavaScript

2008-08-06 Thread nauke .
Hi all, Is there a way to access values in ApplicationResources.properties in Javascript functions? I've found a way where I can just pass a value from the app resource file as a parameter, but discovered that I return alerts with different messages based on some criteria. Any ideas? Thanks heap

Re: Issue with Url mapping with struts-action-extension=""

2008-08-06 Thread Haulyn R. Jason
Jeromy Evans 写道: > Haulyn R. Jason wrote: > >>> > In case it is a, I would try the following settings: >>> > >>> > struts.action.extension=,,action >>> > >>> >>> >>> >> 2.If I use Evans' way, it looks worked well but just need a "."..Struts >> do not have a solution f

Re: Create multiple struts configuration file problem

2008-08-06 Thread angelwei
if i try this on web.xml: action org.apache.struts.action.ActionServlet - <#> config /WEB-INF/struts-config.xml, /WEB-INF/struts-config-product.xml 1 it can run well. but if i try to use different tag it come out the error. ja

Re: I don't know what to call this SQL Exception.

2008-08-06 Thread Owen Berry
"Optimistic locking" will give you some information. One way to do this is to have a column in your database table that denotes a version number, which is incremented every time the row changes. Include that value in your form, and then you will be able compare the form version to the database vers

I don't know what to call this SQL Exception.

2008-08-06 Thread ryan webb
Hi!! I know this is not struts question but I don't know this term so I cannot search the internet fot it. Two users are seeing the same page (data from database), and both of them are editing the same piece of data however, the other user submits the changes (update/delete) first. I need to inf

Re: Struts 2 And JFreeChart

2008-08-06 Thread dynamicd
got it to work.. could not stop the caching so added a param to the src img src="/Dashboard/DisplayChart.action?p=<%=request.getParameter("RANDOM")%>" / dynamicd wrote: > > I have tried > <% >response.setHeader("Cache-Control", "no-cache"); //HTTP 1.1 >response.setHeader("Pragma", "

Re: Struts 2 And JFreeChart

2008-08-06 Thread dynamicd
Alrit got it to work Could not stop the browsers from caching. so added a param to the link /Dashboard/DisplayChart.action?p=<%=request.getParameter( " /> Hello Everyone, Got a quick question regarding the streaming of a JFreeChart (or any image) and how to be able to handle it on a jsp. I

Re: Struts 2 And JFreeChart

2008-08-06 Thread dynamicd
I am creating a new chart using the ChartFactory chart = ChartFactory.createBarChart (reportname,xaxis, yaxis, dataset, PlotOrientation.VERTICAL, true,true, true); return chart; and I am storing it in the session. However the DisplayChart.action that is in

help with radio button array

2008-08-06 Thread cpanon
Hello I am trying to construct a model that has multiple radio buttons per object but keep them distinct, therefore they need a different name.  I almost have it by creating a array of objects and using nested iterate, with the code below.  However, of course it does not increment the index on t

Re: [S2] Refactoring Action classes

2008-08-06 Thread Milan Milanovic
Dear Dave, newton.dave wrote: > > Please stop referring to the action as a "redirecting action". Results may > redirect; actions specify results. > > Yes, sorry, results recirect. newton.dave wrote: > > In addition to trying the things I and others have mentioned, PLEASE do > the followin

Re: Struts 2 And JFreeChart

2008-08-06 Thread Leena Borle
Hi, How are you creating new chart object ? For me every time user clicks on submit-DrawChart_draw,action will create New chart object (e.g. chart=ChartFactory.createBarChart) and store it in the session which afterwards is used by DIV(DrawChart_display.action). You need to refresh your chart o

Re: [S2] Refactoring Action classes

2008-08-06 Thread Dave Newton
Please stop referring to the action as a "redirecting action". Results may redirect; actions specify results. In addition to trying the things I and others have mentioned, PLEASE do the following: 1) Look at the code for the redirectAction and step through it--this is a trivial step and would

Re: [S2] Refactoring Action classes

2008-08-06 Thread Milan Milanovic
Hi Nils-Helge, yes, I only use session attribute in my action class which implements SessionAware interface. -- Regards, Milan Nils-Helge Garli wrote: > > And you're sure it's a session attribute and not a request attribute? > > Nils-H > > On Wed, Aug 6, 2008 at 6:49 PM, Milan Milanovic >

Re: [S2] Refactoring Action classes

2008-08-06 Thread Milan Milanovic
Dear Dave, Standard action is no redirect action. My session variables was deleted somewhere between my action class method and its resulting jsp, because in my action class method I had that variable, and in jsp I don't have it any more. O.K. I can put monitoring interceptor or listener like J

Re: Struts 2 And JFreeChart

2008-08-06 Thread dynamicd
I have tried <% response.setHeader("Cache-Control", "no-cache"); //HTTP 1.1 response.setHeader("Pragma", "no-cache"); //HTTP 1.0 response.setDateHeader("Expires", 0); //prevents caching at the proxy server %> as well.. newton.dave wrote: > > --- On Wed, 8/6/08, dynamicd <[EMAIL PRO

Re: Struts 2 And JFreeChart

2008-08-06 Thread Dave Newton
--- On Wed, 8/6/08, dynamicd <[EMAIL PROTECTED]> wrote: > Also tried implementing the SessionAware. However the same thing. Why? Did you try setting the headers for not caching? Dave > dynamicd wrote: > > > > This is cool.. I tried it out. However once the > > chart_display.jsp is called the

Handling general multipart file posts

2008-08-06 Thread dm_thor
Hi all, I am working on an application that needs to implement multiple uploads. As a solution I used a small client-side flash file called SWFUpload to allow for the functionality I need. My application runs primarily within the struts framework; however, I have been unable to figure out how to

Re: Struts 2 And JFreeChart

2008-08-06 Thread dynamicd
Also tried implementing the SessionAware. However the same thing. dynamicd wrote: > > This is cool.. I tried it out. However once the > chart_display.jsp is called the first time through the image tag. it does > not call the DisplayChart.action again to refresh the image with a new one > when

Re: Struts 2 And JFreeChart

2008-08-06 Thread dynamicd
This is cool.. I tried it out. However once the chart_display.jsp is called the first time through the image tag. it does not call the DisplayChart.action again to refresh the image with a new one when clicked on the DrawChart.action. (I added the println statement in the display method to find o

Re: [S2] Refactoring Action classes

2008-08-06 Thread Jeoffrey Bakker
Maybe adding a session listener to your web.xml is a little bit easier. E.g. a listener like below import javax.servlet.http.HttpSessionAttributeListener; import javax.servlet.http.HttpSessionBindingEvent; import javax.servlet.http.HttpSessionEvent; import javax.servlet.http.HttpSessionListener;

Re: [S2] Refactoring Action classes

2008-08-06 Thread Dave Newton
Some request parameters are prohibited, too, but those aren't session attributes. Dave --- On Wed, 8/6/08, Milan Milanovic <[EMAIL PROTECTED]> wrote: > From: Milan Milanovic <[EMAIL PROTECTED]> > Subject: Re: [S2] Refactoring Action classes > To: user@struts.apache.org > Date: Wednesday, Augus

Re: [S2] Refactoring Action classes

2008-08-06 Thread Dave Newton
--- On Wed, 8/6/08, Milan Milanovic <[EMAIL PROTECTED]> wrote: > I don't know really, I don't use HTTPS, my cookies are enabled, my > redirect action deleted my session variables, when I changed this > action to standard action it worked, NO other part of the code is > changed. What do you mean,

Re: [S2] Refactoring Action classes

2008-08-06 Thread Nils-Helge Garli Hegvik
And you're sure it's a session attribute and not a request attribute? Nils-H On Wed, Aug 6, 2008 at 6:49 PM, Milan Milanovic <[EMAIL PROTECTED]> wrote: > > Dear Dave, > > I don't know really, I don't use HTTPS, my cookies are enabled, my redirect > action deleted my session variables, when I chan

Re: [S2] Refactoring Action classes

2008-08-06 Thread Milan Milanovic
Dear Dave, I don't know really, I don't use HTTPS, my cookies are enabled, my redirect action deleted my session variables, when I changed this action to standard action it worked, NO other part of the code is changed. -- Milan newton.dave wrote: > > --- On Wed, 8/6/08, Milan Milanovic wrote:

Re: [S2] Refactoring Action classes

2008-08-06 Thread Dave Newton
--- On Wed, 8/6/08, Milan Milanovic wrote: > newton.dave wrote: >> --- On Wed, 8/6/08, Milan Milanovic wrote: >>> No, my cookies are enabled all the time. But if my >>> JSessionID is not automatically appended to the new >>> location by container/struts2 in case of redirect action, why ? >> >> Pr

Re: [S2] Refactoring Action classes

2008-08-06 Thread Milan Milanovic
I don't understand, but enabled cookies is defualt behavior, isn't it ? -- Regards, Milan newton.dave wrote: > > --- On Wed, 8/6/08, Milan Milanovic <[EMAIL PROTECTED]> wrote: >> No, my cookies are enabled all the time. But if my JSessionID is not >> automatically appended to the new location

RE: OGNL Help

2008-08-06 Thread Brad A Cupit
Zoran Avtarovski <[EMAIL PROTECTED]> wrote: > reflection has a heavy performance > penalty and from what I've seen of OGNL Just a quick side note, with modern JVMs (1.4 and later) the reflection penalty is significantly reduced. IMHO, reflection is quite fast. And OGNL uses reflection internally

Re: [S2] Refactoring Action classes

2008-08-06 Thread Dave Newton
--- On Wed, 8/6/08, Milan Milanovic <[EMAIL PROTECTED]> wrote: > No, my cookies are enabled all the time. But if my JSessionID is not > automatically appended to the new location by container/struts2 in > case of redirect action, why ? Probably because cookies are enabled all the time. Dave --

Re: [S2] Refactoring Action classes

2008-08-06 Thread Milan Milanovic
Dear Jeromy, Jeromy Evans - Blue Sky Minds wrote: > > Out of interest, which container and browser are you testing with and > how is the browser sending the JSessionID to your container? > Within the browser you can determine whether you are using the same > JSessionID or a new one by monitor

RE: [S2] Ajax DIV Question

2008-08-06 Thread Hoying, Ken
Thanks! I saw the indicator property right after I sent the email. Works like a charm. Thank you! -Original Message- From: Jeromy Evans [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 06, 2008 8:52 AM To: Struts Users Mailing List Subject: Re: [S2] Ajax DIV Question Dave Newton wro

Re: OGNL Help

2008-08-06 Thread Zoran Avtarovski
Thanks Martin, I understand that. But what I’m trying to do is take one parameter, evaluate it and then evaluate the result. For example: I have a question bean with an surveyEntity attribute. The value is variable and it may be 'surveyLong.initialValue'. I now want to evaluate this string as an

Re: [S2] Ajax DIV Question

2008-08-06 Thread Jeromy Evans
Dave Newton wrote: http://struts.apache.org/2.x/docs/dojo-submit.html Put the notification message in a different div? Dave Yeah, use the indicator attribute to show/hide an image as per the example at the top of that page. It looks better too. ---

Re: [S2] Ajax DIV Question

2008-08-06 Thread Jeromy Evans
Dave Newton wrote: http://struts.apache.org/2.x/docs/dojo-submit.html Put the notification message in a different div? Dave Yeah, use the indicator attribute to show/hide an image as show at the top of that page. It looks better too. --

Re: OGNL Help

2008-08-06 Thread Zoran Avtarovski
Hi Jeromy, In short yes, I'm trying to do a nested evaluation. I screwed up the description, but what you've described is what I'm trying to do. I tried all the permutations you suggested plus more with still no joy. I've used the reflection API as a backup but I'd prefer to use OGNL. Any help fr

RE: [S2] Ajax DIV Question

2008-08-06 Thread Dave Newton
http://struts.apache.org/2.x/docs/dojo-submit.html Put the notification message in a different div? Dave --- On Wed, 8/6/08, Hoying, Ken <[EMAIL PROTECTED]> wrote: > From: Hoying, Ken <[EMAIL PROTECTED]> > Subject: RE: [S2] Ajax DIV Question > To: "Struts Users Mailing List" > Date: Wednesday,

RE: [S2] Ajax DIV Question

2008-08-06 Thread Hoying, Ken
THANK YOU!!! That fixed the problem. Thank you for taking the time to share. I hate not having a message for the users there though. Does anyone know of a fix for this? Thanks in advance! -Original Message- From: Jeromy Evans [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 06, 20

Re: OGNL Help

2008-08-06 Thread Jeromy Evans
Zoran Avtarovski wrote: I¹m trying to achieve something with OGNL and I¹d like to know if it¹s possible and if so how to do it. In my action I have an object called surveyResult with setter/getter. I also have another object called questions with setter/getter. The question object has a string

Re: Struts 2 AJAX

2008-08-06 Thread Dave Newton
--- On Wed, 8/6/08, [EMAIL PROTECTED] wrote: > On Tue, Aug 5, 2008 at 7:45 PM, Dave Newton wrote: > > --- On Tue, 8/5/08, [EMAIL PROTECTED] wrote: > > > Is Struts 2.1.x still bound to DOJO? > > S2[.1] Ajax/Dojo is a plugin. > Is any other js library compatible to be "plugged" in? To the existing t

Re: Create multiple struts configuration file problem

2008-08-06 Thread Engr. Jherald Gerome Lacambra
try this on web.xml: action org.apache.struts.action.ActionServlet - <#> config /WEB-INF/struts-config.xml, /WEB-INF/struts-config-product.xml 1 2008/8/6 angelwei <[EMAIL PROTECTED]>: > > ya, i want to know how to create differe

Re: Struts 2 AJAX

2008-08-06 Thread stanlick
Is any other js library compatible to be "plugged" in? On Tue, Aug 5, 2008 at 7:45 PM, Dave Newton <[EMAIL PROTECTED]> wrote: > --- On Tue, 8/5/08, [EMAIL PROTECTED] wrote: > > Is Struts 2.1.x still bound to DOJO? > > S2 Ajax/Dojo is a plugin. > > Dave > > > --

RE: 2 Validation questions

2008-08-06 Thread Gundersen, Richard
Thanks for the reply Jeromy, appreciate all the extra info you've given me. It's the client side validation by the way, so I'll go down the controlHeader.ftl route and see how I get on. Someone else (Gabriel) mentioned a Javascript bug, so I think you're right. I'll check out the relevant code whe

OGNL Help

2008-08-06 Thread Zoran Avtarovski
I¹m trying to achieve something with OGNL and I¹d like to know if it¹s possible and if so how to do it. In my action I have an object called surveyResult with setter/getter. I also have another object called questions with setter/getter. The question object has a string element called questionEnt

Re: 2 Validation questions

2008-08-06 Thread Jeromy Evans
Gundersen, Richard wrote: Hi Basic question sorry (looked all over but can't find the answer) 1) When validation fails for my 'username' textfield, the error message is displayed ABOVE the text box. Is it possible to have more fine-grained control over how to position the error message. Idea