Re: How to implement ajax in struts 1.1

2008-03-17 Thread Sudhan Maharjan
Also you can use different frameworks like DWR, GWT . etc, Please visit: http://wiki.apache.org/struts/AjaxStruts On Thu, Mar 13, 2008 at 5:07 PM, Raghu varma bhupathiraju < [EMAIL PROTECTED]> wrote: > > Hi friends > > Can any one tell me how to implement ajax in struts 1.1 with simple > exa

Re: How to implement ajax in struts 1.1

2008-03-17 Thread Sudhan Maharjan
If you know how to use AJAX in general websites, its not much of difficulty to implement AJAX in struts. Just include action while sending request to server. like req.open("GET", someaction.do, true); where req is HttpXmlRequest Object. Rest you can get the data as manipulate as usual. On Thu, M

Something odd with deployment to WL 10

2008-03-17 Thread Alex Shneyderman
I get an exception while deploying WAR to WL 10. Here is the stack trace: java.lang.NoClassDefFoundError: Lorg/apache/velocity/app/VelocityEngine; at java.lang.Class.getDeclaredFields0(Native Method) at java.lang.Class.privateGetDeclaredFields(Class.java:2259) at java.lang

Re: struts 1.2 html:select and submit button

2008-03-17 Thread Sudhan Maharjan
You can simply call a struts action through AJAX. A little bit of AJAX can help to do your task. If you know AJAX, you can call struts action while sending request as req.open("GET", someaction.do, true); On Tue, Mar 18, 2008 at 9:20 AM, Sonu S <[EMAIL PROTECTED]> wrote: > HI, > > I am using st

Re: Issue In Autocompleter

2008-03-17 Thread Ozzy
Dude I dont think autocomplete would be complete till you actually try to complete it. Now we are thinking! Ankur Agar wrote: > > > Hi All, > I am tryin to make an autocomplete work with its theme="ajax" > I am using struts 2.0.x > The data coming from the action is in JSON

struts 1.2 html:select and submit button

2008-03-17 Thread Sonu S
HI, I am using struts 1.2 in my web application. I have to display one list list will be build dynamically. User can select any option. base on the user's selection page will be refreshed (need to hit the database and display information in other fields on same page.) I need to know two th

Re: Struts 1 return stream (documents)

2008-03-17 Thread bhaarat Sharma
Quick question in all other examples on that page they show how the fileName is retrieved. But for Byte Array Example they do not mention anything regarding the fileName. How are we suppose to supply the fileName? On Mon, Mar 17, 2008 at 10:41 PM, Dave Newton <[EMAIL PROTECTED]> wrote: > --- bh

Re: Struts 1 return stream (documents)

2008-03-17 Thread Dave Newton
--- bhaarat Sharma <[EMAIL PROTECTED]> wrote: > Thanks! I remember you helped me with similar problem in S2 as well I'm very good at using the work of others to make me look good ;) Dave - To unsubscribe, e-mail: [EMAIL PROTECT

Re: Struts 1 return stream (documents)

2008-03-17 Thread bhaarat Sharma
yes, that worked! Thanks! I remember you helped me with similar problem in S2 as well On Mon, Mar 17, 2008 at 10:07 PM, Dave Newton <[EMAIL PROTECTED]> wrote: > Does this help? > > http://wiki.apache.org/struts/StrutsFileDownload > > Dave > > > > --- bhaarat Sharma <[EMAIL PROTECTED]> wrote: >

Re: Struts 1 return stream (documents)

2008-03-17 Thread Dave Newton
Does this help? http://wiki.apache.org/struts/StrutsFileDownload Dave --- bhaarat Sharma <[EMAIL PROTECTED]> wrote: > Hello, > > I started struts by learning struts2. However, now i am working with > struts 1: ( > > I am faced with a problem where user downloads a file. > > I have this in t

Struts 1 return stream (documents)

2008-03-17 Thread bhaarat Sharma
Hello, I started struts by learning struts2. However, now i am working with struts 1: ( I am faced with a problem where user downloads a file. I have this in the struts.xml And then in the action I have this which is returning a bytestream protected

Re: uploaded image file contentType (IE vs Firefox)

2008-03-17 Thread Dave Newton
--- akash agrawal <[EMAIL PROTECTED]> wrote: > I have to support both IE and Firefox so can't use just one browser. I was kidding. > Yes, I can do some processing on the server side and handle image/pjpeg and > image/jpeg as same and image/x-png and image/png as same but would prefer > not to as

Re: uploaded image file contentType (IE vs Firefox)

2008-03-17 Thread akash agrawal
Thanks for the reply Dave. I have to support both IE and Firefox so can't use just one browser. Yes, I can do some processing on the server side and handle image/pjpeg and image/jpeg as same and image/x-png and image/png as same but would prefer not to as decoding these images requires differen

Re: uploaded image file contentType (IE vs Firefox)

2008-03-17 Thread Dave Newton
--- akash agrawal <[EMAIL PROTECTED]> wrote: > What can I do to resolve this conflict and not get different content types? Only use one browser? Can't you just do some processing/aggregation of content types on the server side? Dave -

uploaded image file contentType (IE vs Firefox)

2008-03-17 Thread akash agrawal
Hi, I am using fileuploadinterceptor which is part defaultStack. I upload an image *.jpg using IE and Firefox and get a different contentType in action for different browser. IE returns content type as image/pjpeg whereas Firefox returns content type as image/jpeg. Similary for a *.png image up

RE: How to initialize business service objects?

2008-03-17 Thread Griffith, Michael *
Frank, I would check your struts.properties file: Make sure it has these entries and that it is on your classpath (i.e. in WEB-INF/classes) struts.objectFactory = spring struts.objectFactory.spring.autoWire = name MG -Original Message- From: Frank Fischer [mailto:[EMAIL PROTECTED] Se

RE: How to initialize business service objects?

2008-03-17 Thread Dave Newton
--- Frank Fischer <[EMAIL PROTECTED]> wrote: > Off the top of my head I don't recall what "autodetect" means. Did you try leaving out the "default-autowire" attribute or switching it to the default ("name" or something like that; I don't recall) and seeing if that works? That would at least hel

RE: How to initialize business service objects?

2008-03-17 Thread Frank Fischer
Hi Michael Thanks for your answer. > 1) You have included the struts2-spring-pliugin.jar in your classpath Yes, it put it under "WEB-INF/lib/" so it's packaged to the war file and should be available to tomcat it think. I also can't see any error or warning messages while deploying the applicati

Re: [struts] Struts 2 and JSP 2.0 tags

2008-03-17 Thread Dale Newfield
Kalpesh Modi wrote: Is there anyway to use the JSP 2.0 tag files and the Struts 2.0 tags together. Yes, all you have to do is add the taglib at the top of your .tag file so that you can refer to the s: tags. The difficulty comes in passing arguments. At first I was only able to successfully

Struts 2 and JSP 2.0 tags

2008-03-17 Thread Kalpesh Modi
Hi, Is there anyway to use the JSP 2.0 tag files and the Struts 2.0 tags together. I have created a JSP 2.0 .tag file. Inside that file, I want to access the attributes passed from the main jsp. I want to access the attributes using the Struts 2.0 tags. Is there any way to do it? I am using St

Re: How to initialize business service objects?

2008-03-17 Thread Dave Newton
--- Randy Burgess <[EMAIL PROTECTED]> wrote: > You also need to setup your action in the application context so that > Spring knows where to inject the business object. You *can* do it that way, but the default setup doesn't require it. It depends on how you're wiring, whether or not your philoso

Re: [OT] XML Preprocessing

2008-03-17 Thread Dave Newton
--- Chris Pratt <[EMAIL PROTECTED]> wrote: > What I'm trying to do is read a stream of HTML and make changes to > certain tags ,like adding a target="_blank" to the tags and > setting the src attributes for , and others so they can't > be loaded, for a mail viewer web application. I'd prefer not

Re: How to initialize business service objects?

2008-03-17 Thread Rushikesh Thakkar
Frank, AFAIU, you want your Business Service Object to be injected in your Struts2 actions. To achieve that, I have done this: - Using Spring ObjectFactory. - Declare Business Service Object (BSO) in Spring's applicationContext.xml(you've already done that) - Define action that has setter method

Re: How to initialize business service objects?

2008-03-17 Thread Randy Burgess
You also need to setup your action in the application context so that Spring knows where to inject the business object. Your class name in the Struts action also needs to be the *bean id of the action* so that the Struts/Spring plugin can do it's work. So assuming you have a setter for DispatcherSe

Re: How to initialize business service objects?

2008-03-17 Thread Piero Sartini
Am Donnerstag, 13. März 2008 22:32:34 schrieb Frank Fischer: > Now i don't understand (1) where to create/initialize these business logic > classes and (2) how to get access to them from the action classes. Just build your business logic without thinking about s2 too much. From your action classe

RE: How to initialize business service objects?

2008-03-17 Thread Griffith, Michael *
Frank, Check two things: 1) You have included the struts2-spring-pliugin.jar in your classpath 2) Your applicationContext.xml file is getting loaded on startup. If you haven't already done so, check your web.xml for a context parameter like this: contextConfigLocation

RE: How to initialize business service objects?

2008-03-17 Thread Frank Fischer
Hi all first i'd like to thank all of you that have given me valuable feedback to my question. Following the answers from Dave and Jeromy i decided to go the "hard" way with Spring and DI. After reading some manuals (thanks to GF, good reading) i managed to load the Spring ContextLoaderListene

Re: [OT] XML Preprocessing

2008-03-17 Thread Chris Pratt
On Mon, Mar 17, 2008 at 8:02 AM, Roger Varley <[EMAIL PROTECTED]> wrote: > I've never tried to do this since, normally, you want the XML processor to > handle entities such as the & symbol - and if either the input XML or output > XML contains these symbols unaltered then you don't have legal XML

Re: [OT] XML Preprocessing

2008-03-17 Thread Roger Varley
I've never tried to do this since, normally, you want the XML processor to handle entities such as the & symbol - and if either the input XML or output XML contains these symbols unaltered then you don't have legal XML. If you really need to leave these unprocessed, then perhaps you can replace

Re: not interpreted

2008-03-17 Thread Dave Newton
--- GF <[EMAIL PROTECTED]> wrote: > > ...unless you use the XML syntax available from JSP 2.0 and later ;-) > And in this case, how can you resolve the Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e

[S2] Calling getMethod with parametr

2008-03-17 Thread bugs_
In Struts 1 is this: In the ActionForm is this method: public boolean getTechnologyCheckbox(String key) throws ValueNotDefinedException { return sessionData.getTechnologyById(key).isSelected(); } In the jsp page is: <%=propertyName%> is for example "technologyCheck

Re: Struts2 Annotation based Validation

2008-03-17 Thread Lukasz Lenart
> In Struts2 error messages are stored in the ValueStack in an object Yes, I made mistake, I've mean in request scope, not in request object ;-) Regards -- Lukasz - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional comm

Re: Struts2 Annotation based Validation

2008-03-17 Thread Jeromy Evans
Lukasz Lenart wrote: Hi, Error messages are stored in request, you have to subclass ActionSupport and add some mechanism to store messages in session. Regards In Struts2 error messages are stored in the ValueStack in an object implementing ValidationAware. If your action extends ActionSu

Re: [S2] accessing #application and #request from a Interceptor

2008-03-17 Thread Nils-Helge Garli Hegvik
Have you tried context.getApplication()? BTW: The source code for the ServletConfigInterceptor shows how to access most of the context objects from an interceptor. Nils-H On Mon, Mar 17, 2008 at 10:16 AM, GF <[EMAIL PROTECTED]> wrote: > > On Mon, Mar 17, 2008 at 10:06 AM, GF <[EMAIL PROTECTED]>

Re: Struts2 Annotation based Validation

2008-03-17 Thread Tauri Valor
Thanks Lukasz! I tried request.getAttribute("actionerror") and request.getAttribute("fielderror") in my jsp but it did not work. Am I doing it the wrong way ? Lukasz Lenart wrote: > > Hi, > > Error messages are stored in request, you have to subclass > ActionSupport and add some mech

Re: [S2] accessing #application and #request from a Interceptor

2008-03-17 Thread GF
On Mon, Mar 17, 2008 at 10:06 AM, GF <[EMAIL PROTECTED]> wrote: > I have some data stored in #application.mymap > Inside and interceptor I want to put some of this data in > #request.anothermap > > How can I access them? > About the #request, is it right to do this? > > final ActionContex

Re: Struts2 Annotation based Validation

2008-03-17 Thread Lukasz Lenart
Hi, Error messages are stored in request, you have to subclass ActionSupport and add some mechanism to store messages in session. Regards -- Lukasz http://www.linkedin.com/in/lukaszlenart - To unsubscribe, e-mail: [EMAIL PROT

[S2] accessing #application and #request from a Interceptor

2008-03-17 Thread GF
I have some data stored in #application.mymap Inside and interceptor I want to put some of this data in #request.anothermap How can I access them? About the #request, is it right to do this? final ActionContext context = invocation.getInvocationContext(); request = (HttpServletRe

Re: Is type property in tag must be filled?

2008-03-17 Thread Antonio Petrelli
2008/3/17, Chen Chunwei <[EMAIL PROTECTED]>: > > Thanks Antonio. > > I know little about DTD, but in my company, we are not allowed to access > Internet. So I cann't see these dtds. :-( WTF? Now I know why you are still using Struts 1.1 :-D You're forgiven :-D Antonio

Re: Is type property in tag must be filled?

2008-03-17 Thread Chen Chunwei
Thanks Antonio. I know little about DTD, but in my company, we are not allowed to access Internet. So I cann't see these dtds. :-( Talos - Original Message - From: "Antonio Petrelli" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" Sent: Monday, March 17, 2008 4:32 PM Subject: Re:

Re: not interpreted

2008-03-17 Thread GF
> > > ...unless you use the XML syntax available from JSP 2.0 and later ;-) > > And in this case, how can you resolve the

Re: Is type property in tag must be filled?

2008-03-17 Thread Antonio Petrelli
2008/3/17, Chen Chunwei <[EMAIL PROTECTED]>: > > But I'm using Struts 1.1, then is it still required? Yes. See: http://struts.apache.org/dtds/struts-config_1_1.dtd And learn DTD :-) Antonio

Re: Is type property in tag must be filled?

2008-03-17 Thread Chen Chunwei
Thanks Antonio But I'm using Struts 1.1, then is it still required? Talos - Original Message - From: "Antonio Petrelli" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" Sent: Monday, March 17, 2008 4:07 PM Subject: Re: Is type property in tag must be filled? > 2008/3/17, Chen Chu

Re: Is type property in tag must be filled?

2008-03-17 Thread Antonio Petrelli
2008/3/17, Chen Chunwei <[EMAIL PROTECTED]>: > I'm new to Struts. And I want to ask if the type property in > tag must be filled? I mean if it's null, will the form-bean work? If you are using Struts 1.2.x, the "type" attribute is required: http://struts.apache.org/dtds/struts-config_1_2.dtd I

Is type property in tag must be filled?

2008-03-17 Thread Chen Chunwei
Hi all, I'm new to Struts. And I want to ask if the type property in tag must be filled? I mean if it's null, will the form-bean work? Thanks. Talos

Struts2 Annotation based Validation

2008-03-17 Thread Tauri Valor
Using Annotation based Validation, I want to try the following: The Validation Error message can be retrieved in our jsp using : Do I have any alternative method of using the above tags ? For eg. can I retrieve the error using session.getAttribute(actionerror) ? Are actionerror and fielde

Re: How to initialize business service objects?

2008-03-17 Thread GF
I suggest you to read this simple but useful tutorial to have an idea about how much is simple to use Struts2+Spring+Hibernate together. http://struts.apache.org/2.x/docs/struts-2-spring-2-jpa-ajax.html On Thu, Mar 13, 2008 at 10:32 PM, Frank Fischer < [EMAIL PROTECTED]> wrote: > > Now i don't u

Re: should I learn struts 1 first before learning struts 2?

2008-03-17 Thread GF
I learned Struts2 without knowing anything about Struts1. But I'm a little curious to take a look to Struts1 too. But just for personal knowledge. On Fri, Mar 14, 2008 at 7:51 PM, akoo <[EMAIL PROTECTED]> wrote: > > Hi, forgive me if this has been asked before. I am just starting on > struts > a

Re: Struts 2 scheduler

2008-03-17 Thread GF
Yes, I usually use Quartz inside Spring. If I remember correctly there is a chapter about Scheduling in the big Spring manual On Fri, Mar 14, 2008 at 3:47 AM, alex xander <[EMAIL PROTECTED]> wrote: > thx all, > i solve my problem with quartz, i used it with spring > thx so much >

[S2] variable of variable in OGNL?

2008-03-17 Thread GF
I have something like %{#application.one.two.three} is it possible to do something like: %{#application.%{stringVariable}.two.three} Thanks.