load dynamically created files in jsp

2010-05-13 Thread Upasana Sharma
Hi I have a scenario where i create a temporary dynamic image file from the database and try to show it on my jsp. The file url shows the image properly, but when in jsp , my browser says that "Firefox doesn't know how to open this address, because the protocol (d) isn't associated with any progra

Struts Validation Framework - Focus and Select form field

2010-05-13 Thread somag
Hi, On one of my project we are using struts validation framework...i am using client side validation...requirement is when form field value is invalid its focusing into specific field...at same time i have to select existing value invalid text...like focus() and select() Thanks, -Soma -- View

Re: how to set default focus field in ?

2010-05-13 Thread Zoran Avtarovski
As a simple solution, why not just modify the form tag template and if the focusElement parameter is set, include a simple javascript block at the close of the form to set the focus. Just keep in mind that if there are two forms on a page and both have the focusElement parameter set only the last w

Re: spring, struts2, convention plugin, how to "wire" an action class

2010-05-13 Thread Denis Cabasson
My best guess is that the Action instance used in the web application is not actually loaded from the configuration in your applicationContext, but directly by Struts 2 (through the Spring Factory, but still Struts 2). That mean that you will have a bean named myAction in you application conte

Re: spring, struts2, convention plugin, how to "wire" an action class

2010-05-13 Thread Jake Vang
roger, thanks for the steps. i went through each of those steps and made sure my settings/configurations complied. however, i still cannot initialize Action classes using Spring. as an illustration of the problem i am facing, i have created an example that you may download and verify for yourself

override applicationresources.properties file for different logins

2010-05-13 Thread venkeee
i am using a factory class to override Application resources.properties file,but my problem is for different users i create different properties file,i identified which property for user is only userlogins. i searched in google to find code use.This factory class is object created in deployment st

RE: struts-blank-1.3.10.war has memory leak.

2010-05-13 Thread James Cook
Hey, I know this doesn't give you a direct answer. But I found this article quite interesting on the topic of undeploying an application and classes being left loaded, which in turn leaves the classloader. http://blogs.sun.com/fkieviet/entry/classloader_leaks_the_dreaded_java -Original Mess

struts-blank-1.3.10.war has memory leak.

2010-05-13 Thread Mark Shifman
Hi: I have been trying to track down a memory leak in my struts 1.3.10 web app. I am using tomcat 6.0.26 which has a leak detector button in the manager app. After basically gutting my app to a start up page, it occurred to me that I should just see if the struts-blank web app has a memory leak.

Re: Some Spring/Struts questions

2010-05-13 Thread Dale Newfield
On 5/13/10 7:10 AM, Andy Law wrote: Following up on that thought process, if I use an interceptor then is there any difference/tradeoff/efficiency gain or loss from stuffing the object in question onto the Value Stack instead of dropping it into the request or the session? I guess that "explicitn

Re: spring, struts2, convention plugin, how to "wire" an action class

2010-05-13 Thread RogerV
Jake Vang wrote: > >> If you want Spring to create your action class (as opposed to Struts >> creating them) then you need to define your action in the >> applicationContext.xml file. > > how do you do that? here's a couple of ways i have tried that do NOT work. > 1) Add to your struts.xml

Re: spring, struts2, convention plugin, how to "wire" an action class

2010-05-13 Thread Jake Vang
yes, i read the documentation for that before posting here too. it says to "simply" drop in the struts2-spring-plugin-.jar. i already have that in /WEB-INF/lib. however, towards the end of the document, they are referencing how to initialize Actions from spring using struts.xml and applicationConte

Re: spring, struts2, convention plugin, how to "wire" an action class

2010-05-13 Thread Denis Cabasson
Jake, the short answer to your problem is : use the struts-spring plugin ( http://struts.apache.org/2.1.8.1/docs/spring-plugin.html ). Include the jar for that plugin in your classpath, and Struts 2 will use Spring to manage the Action lifecycle, meaning you can inject anything the way you are

Re: spring, struts2, convention plugin, how to "wire" an action class

2010-05-13 Thread Jake Vang
thanks. example please? (when you have time). On Thu, May 13, 2010 at 6:52 AM, James Cook wrote: > Ahh hmm. > > You can use the autowired, You just have to declare you stuff in the spring > xml. E.g. > > > I think you can also use the @Resource anno as well. Can't think off the top > of my hea

Re: spring, struts2, convention plugin, how to "wire" an action class

2010-05-13 Thread Jake Vang
> If you want Spring to create your action class (as opposed to Struts > creating them) then you need to define your action in the > applicationContext.xml file. how do you do that? here's a couple of ways i have tried that do NOT work. 1. (normal, naive way that works for defining services)

RE: spring, struts2, convention plugin, how to "wire" an action class

2010-05-13 Thread RogerV
James Cook-13 wrote: > > Oh, did you want your action as a spring managed bean? Ah I think i > massively miss read you. You want to inject predefined values etc? > If you want Spring to create your action class (as opposed to Struts creating them) then you need to define your action in the ap

Re: Some Spring/Struts questions

2010-05-13 Thread Andy Law
Wes Wannemacher wrote: > > On Wed, May 12, 2010 at 10:42 AM, Dale Newfield wrote: >> >> That all sounds reasonable, except the part about putting it in the >> session >> instead of the request.  If there's no compelling reason to store >> something >> in the session, I think that it should be

RE: spring, struts2, convention plugin, how to "wire" an action class

2010-05-13 Thread James Cook
Ahh hmm. You can use the autowired, You just have to declare you stuff in the spring xml. E.g. mailto:vangj...@googlemail.com] Sent: 13 May 2010 11:44 To: Struts Users Mailing List Subject: Re: spring, struts2, convention plugin, how to "wire" an action class yes. precisely. On Thu, May 13, 2

Re: spring, struts2, convention plugin, how to "wire" an action class

2010-05-13 Thread Jake Vang
yes. precisely. On Thu, May 13, 2010 at 6:41 AM, James Cook wrote: > Oh, did you want your action as a spring managed bean? Ah I think i massively > miss read you. You want to inject predefined values etc? > > > -Original Message- > From: Jake Vang [mailto:vangj...@googlemail.com] > Sent

RE: spring, struts2, convention plugin, how to "wire" an action class

2010-05-13 Thread James Cook
Oh, did you want your action as a spring managed bean? Ah I think i massively miss read you. You want to inject predefined values etc? -Original Message- From: Jake Vang [mailto:vangj...@googlemail.com] Sent: 13 May 2010 11:38 To: Struts Users Mailing List Subject: Re: spring, struts2,

Re: spring, struts2, convention plugin, how to "wire" an action class

2010-05-13 Thread Jake Vang
thanks. i won't go that route. i noticed your example (in the first response) and i realized that i may trying to push some business logic into the Action class. and, i don't think that's too good of a practice. i simply revised my Service class to hold these values (booleans, String, int, etc...)

RE: spring, struts2, convention plugin, how to "wire" an action class

2010-05-13 Thread James Cook
Yeah sorry, short on time here, didn't see your question at the bottom. Add the spring jar from the spring project. -Original Message- From: Jake Vang [mailto:vangj...@googlemail.com] Sent: 13 May 2010 11:16 To: Struts Users Mailing List Subject: Re: spring, struts2, convention plugin, h

Re: spring, struts2, convention plugin, how to "wire" an action class

2010-05-13 Thread Jake Vang
doesn't answer the question but thanks anyways. On Thu, May 13, 2010 at 6:12 AM, James Cook wrote: > Nope, no they are not in the xml for me. I use the @Service/@Repository > annotations on the class, coupled with the component scan in the Spring xml. > > -Original Message- > From: Jake

Re: spring, struts2, convention plugin, how to "wire" an action class

2010-05-13 Thread Jake Vang
by the way, which package is the @Autowired annotation in? using eclipse and code assist, i can't get it to show up. is it in some other jar file (it's not in the spring-core-x.jar)? On Thu, May 13, 2010 at 5:44 AM, James Cook wrote: > Hmm. I use the same combo. > > I found at some point I could

RE: spring, struts2, convention plugin, how to "wire" an action class

2010-05-13 Thread James Cook
Nope, no they are not in the xml for me. I use the @Service/@Repository annotations on the class, coupled with the component scan in the Spring xml. -Original Message- From: Jake Vang [mailto:vangj...@googlemail.com] Sent: 13 May 2010 11:09 To: Struts Users Mailing List Subject: Re: spri

Re: spring, struts2, convention plugin, how to "wire" an action class

2010-05-13 Thread Jake Vang
well, there's something strange about struts2 (with convention plugin) + spring. if your action has a field representing a service, MyInjectedService myInjectedService, you just have to define that in the spring xml file. for example, your Action class looks like the following. public class MyActi

RE: spring, struts2, convention plugin, how to "wire" an action class

2010-05-13 Thread James Cook
Hmm. I use the same combo. I found at some point I could jsut do public class MyAction extends ActionSupport { private MyInjectedService service etc etc But I have started doing: public class MyAction extends ActionSupport { @Autowired private MyInjectedService service I am not sure if tha

spring, struts2, convention plugin, how to "wire" an action class

2010-05-13 Thread Jake Vang
i am using struts 2.1.8.1 and the convention plugin. i am also using spring for dependency injections (DI). my question is if it is possible to to use struts2 + convention plugin with spring for DI on my Action classes? i have searched the internet but only seen examples using struts 1 + spring fo