Re: Accesssing a bean from a jsp without struts tags

2007-04-07 Thread joey
just implement interface ServletRequestAware and ensure you has config servlet-config interceptor in your action mapper. regards joey On 4/7/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] wrote: joey wrote: add request.setAttribute(invoices,accountBean.getInvoices()) in

Re: Accesssing a bean from a jsp without struts tags

2007-04-07 Thread joey
struts set action object in valuestack,so you can't refere to it in your tag. I just manually set it in request scope. btw.Maybe someone know better method.:) On 4/7/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: joey wrote: add request.setAttribute(invoices,accountBean.getInvoices()) in your

Re: [Struts2] How to get instance of ActionSupport class after redirect?

2007-04-07 Thread Ted Husted
On 4/6/07, Neil Aggarwal [EMAIL PROTECTED] wrote: I can probably use a session variable to temporarily hold the ActionSupport instance, but it seems there should be a more Struts-centric way to get it. So long as the Action is utilizing SessionAware, then using the session this way is

Re: Accesssing a bean from a jsp without struts tags

2007-04-07 Thread Dave Newton
--- joey [EMAIL PROTECTED] wrote: struts set action object in valuestack,so you can't refere to it in your tag. Values exposed to OGNL from an Action are also available through JSP EL due to the StrutsRequestWrapper. getAttribute calls are elegated to the OGNL stack if the atribute isn't found

Re: Accesssing a bean from a jsp without struts tags

2007-04-07 Thread mansour77
Dave Newton wrote: --- joey [EMAIL PROTECTED] wrote: struts set action object in valuestack,so you can't refere to it in your tag. Values exposed to OGNL from an Action are also available through JSP EL due to the StrutsRequestWrapper. getAttribute calls are elegated to the OGNL stack

RE: [Struts2] How to get instance of ActionSupport class after redirect?

2007-04-07 Thread Neil Aggarwal
Ted: Thanks for the advice. I think that is the best approach to use. Thanks, Neil -- Neil Aggarwal, (214)986-3533, www.JAMMConsulting.com FREE! Eliminate junk email and reclaim your inbox. Visit http://www.spammilter.com for details. -Original Message- From: [EMAIL

Re: Accesssing a bean from a jsp without struts tags

2007-04-07 Thread Dave Newton
--- [EMAIL PROTECTED] wrote: Can you give an example please. I am newbie and it sounds like greek to me. my original question was how to retrieve an object using useBean from struts? Your original question was how to access a bean from something like an iterator; the quick answer is you don't

Re: Struts 2 and JSTL (XML)

2007-04-07 Thread Eduardo Kortright
Thanks! On 4/5/07, Brian Thompson [EMAIL PROTECTED] wrote: Yeah, it's possible. Just declare both taglibs in your jsps, like this: %@ taglib uri=http://java.sun.com/jsp/jstl/core; prefix=c % %@ taglib uri=http://java.sun.com/jsp/jstl/fmt; prefix=fmt % %@ taglib

Re: Action Validator ans s:url...

2007-04-07 Thread Dave Newton
Anyone? Beuler? Beuler? I'm still not seeing it, and it's going to irritate me all weekend. --- Dave Newton [EMAIL PROTECTED] wrote: --- [EMAIL PROTECTED] wrote: Actually annotations do work at the method level. That's what I thought too :/ I must be doing something toopid, and I would

[S2] Struts2 + Maven

2007-04-07 Thread Guilherme
Hi, I'm trying to build my project using Maven, but when i run mvn:compile this error is generated: E:\apache-tomcat-6.0.10\webapps\oficinamvn compile [INFO] Scanning for projects... [INFO] [INFO] Building Application

Accessing a Bean from a bean using EL with STRUTS 2 - I really need help

2007-04-07 Thread mansour77
All I am trying to do is to retrieve an account from A DB and using taglib (data grid) to display the associated invoice with this account. Should this be a two-days task. Maybe something wrong with me. here's my controller: package billing; import com.opensymphony.xwork2.ActionSupport;

Re: [S2] Struts2 + Maven

2007-04-07 Thread Wendy Smoak
On 4/7/07, Guilherme [EMAIL PROTECTED] wrote: I'm trying to build my project using Maven, but when i run mvn:compile this error is generated: Odd. At first I thought this belonged on [EMAIL PROTECTED], but there _is_ a profile in the struts2-core pom that has a dependency on

Re: Accessing a Bean from a bean using EL with STRUTS 2 - I really need help

2007-04-07 Thread mansour77
Laurie Harper wrote: [EMAIL PROTECTED] wrote: All I am trying to do is to retrieve an account from A DB and using taglib (data grid) to display the associated invoice with this account. Should this be a two-days task. Maybe something wrong with me. here's my controller: package billing;

Re: [S2] Struts2 + Maven

2007-04-07 Thread Laurie Harper
Guilherme wrote: Hi, I'm trying to build my project using Maven, but when i run mvn:compile this error is generated: E:\apache-tomcat-6.0.10\webapps\oficinamvn compile [INFO] Scanning for projects... [INFO] [INFO]

Re: Accessing a Bean from a bean using EL with STRUTS 2 - I really need help

2007-04-07 Thread mansour77
Dave Newton wrote: --- [EMAIL PROTECTED] wrote: jsp:useBean id=accountBean type=billing.AccountBean scope=request/ I don't know exactly why I am using this, but from what I understand to make the variable available for the page. Being a newbie, I decided

Re: Accessing a Bean from a bean using EL with STRUTS 2 - I really need help

2007-04-07 Thread Dave Newton
--- [EMAIL PROTECTED] wrote: jsp:useBean id=accountBean type=billing.AccountBean scope=request/ is sufficient, but it's still not clear to me why you're using jsp:useBean.../ at all. ui:dataGrid items=${accountBean.invoices} [...] If accountBean has an appropriate

Re: Accessing a Bean from a bean using EL with STRUTS 2 - I really need help

2007-04-07 Thread mansour77
Sorry: Forgot about the tag lib : I am using datagrid lib from jakarta-taglibs-sandbox. Dave Newton wrote: --- [EMAIL PROTECTED] wrote: jsp:useBean id=accountBean type=billing.AccountBean scope=request/ I don't know exactly why I am using this, but from

Re: Accessing a Bean from a bean using EL with STRUTS 2 - I really need help

2007-04-07 Thread Laurie Harper
[EMAIL PROTECTED] wrote: All I am trying to do is to retrieve an account from A DB and using taglib (data grid) to display the associated invoice with this account. Should this be a two-days task. Maybe something wrong with me. here's my controller: package billing; import

Re: Accessing a Bean from a bean using EL with STRUTS 2 - I really need help

2007-04-07 Thread Dave Newton
--- [EMAIL PROTECTED] wrote: when I stepped into the code, I found obj is of type string So I assumed there's something wrong I am doing in passing the argument, or setting some variable ... or Here's where my problem IS. You still haven't said if you'r running on a JSP 2.0

Re: [S2] Struts2 + Maven

2007-04-07 Thread Dave Newton
--- Laurie Harper [EMAIL PROTECTED] wrote: Guilherme wrote: E:\apache-tomcat-6.0.10\webapps\oficina [...] Maven settings file: settings localRepositoryC:/Documents and Settings/guilherme.SERVER/.m2/repository [...] You don't mention what version of Struts you're trying to compile

Re: Accessing a Bean from a bean using EL with STRUTS 2 - I really need help

2007-04-07 Thread mansour77
Dave Newton wrote: --- [EMAIL PROTECTED] wrote: when I stepped into the code, I found obj is of type string So I assumed there's something wrong I am doing in passing the argument, or setting some variable ... or Here's where my problem IS. You still haven't said if

Re: Accessing a Bean from a bean using EL with STRUTS 2 - I really need help

2007-04-07 Thread Dave Newton
--- [EMAIL PROTECTED] wrote: Dave Newton wrote: You could *try* just passing in accountBean.invoices (rather than ${accountBean.invoices}) and see if that works; I don't know if the taglib is expecting a complete EL expression. I tried this and it didn't work. Yeah, didn't think so.

Re: Accessing a Bean from a bean using EL with STRUTS 2 - I really need help

2007-04-07 Thread Piero Sartini
On Saturday 07 April 2007 22:15:18 [EMAIL PROTECTED] wrote: Now since it looks like I am running into compatibility issues, is there any alternative for this tag lib ? I need some thing very similar that provides paging and to be as easy an .net control components. Does struts provides a

Re: Struts 2 + Spring 2 + JPA + AJAX Tutorial

2007-04-07 Thread Piero Sartini
Apr 7, 2007 1:47:30 PM org.apache.catalina.core.StandardContext start SEVERE: Error listenerStart Apr 7, 2007 1:47:30 PM org.apache.catalina.core.StandardContext start SEVERE: Context [/person] startup failed due to previous errors looks like there is a problem with a listener

sub-struts

2007-04-07 Thread Asaf Paris Mandoki
I want to create an application that makes use of sub-applications (Widgets). The applications job is to call a bunch of widgets and return the result of all of them to the user on a single page. I want each widget to be programmed with struts, meaning that: Each widget must have it's own

Re: sub-struts

2007-04-07 Thread Piero Sartini
I want each widget to be programmed with struts, meaning that: Each widget must have it's own control configuration (struts.xml) and it's own set of classes. If you are using struts2, you could develop your widgets within their own packages and namespaces within your main application. See

Re: [S2] Struts2 + Maven

2007-04-07 Thread Guilherme
Hi, I solve this problema runnig this goal: !-- Run the translator for Java 1.4 compatiblity Sample: $ cd struts/struts2/ $ mvn clean install -Papps,j4 - Djava14.jar=$JAVA_HOME/../Classes/classes.jar -- This

Re: sub-struts

2007-04-07 Thread Asaf Paris Mandoki
How can I call an action of a widget form an action of the application and have the result returned as a string? On 4/7/07, Piero Sartini [EMAIL PROTECTED] wrote: I want each widget to be programmed with struts, meaning that: Each widget must have it's own control configuration (struts.xml)

Re: Struts 2 + Spring 2 + JPA + AJAX Tutorial

2007-04-07 Thread Minerva CC
Hi Piero, Thank you so much for your help. I setup log4j properties file and now I am able to debug the server startup. Actually the problem was caused by a missing Action class, which I deleted last night by a accident. Now, everything is working again. Thank you again for you support-:)

Re: sub-struts

2007-04-07 Thread Piero Sartini
On Sunday 08 April 2007 01:13:33 Asaf Paris Mandoki wrote: How can I call an action of a widget form an action of the application and have the result returned as a string? Look at the action tag [1]. You can execute an action and store its result within a request property. Piero [1]

AJAX div loads local URL but not remote one

2007-04-07 Thread Eduardo Kortright
Hi all, I'm trying to learn how to use AJAX, but I'm having some trouble. In the JSP below, the first s:div/ loads the URL just fine, but the second s:div/ simply displays Loading... and stays that way forever. IE displays Error on page in the status bar when it is (apparently) trying to

Re: AJAX div loads local URL but not remote one

2007-04-07 Thread Eduardo Kortright
Sorry about that... cut and paste went crazy on me; let me try again. Here is the JSP again: %@ page language=java contentType=text/html; charset=ISO-8859-1 pageEncoding=ISO-8859-1% !DOCTYPE html PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN http://www.w3.org/TR/html4/loose.dtd; %@ taglib

Re: sub-struts

2007-04-07 Thread Asaf Paris Mandoki
Thanks a lot for the replies. I'll look into it. I forgot to say that the directory structure i wrote on my first post (which was wrong [forgot the web-inf directory]), should be inside a directory of the application. So each widget should have it's own classes directory, struts.xml, etc. The

Re: sub-struts

2007-04-07 Thread Piero Sartini
On Sunday 08 April 2007 02:01:24 Asaf Paris Mandoki wrote: I forgot to say that the directory structure i wrote on my first post (which was wrong [forgot the web-inf directory]), should be inside a directory of the application. So each widget should have it's own classes directory, struts.xml,

Setting isDebug=true for AJAX theme

2007-04-07 Thread Eduardo Kortright
Hi again, Can anyone tell me how to turn on debugging (DOJO config var isDebug)? The page http://struts.apache.org/2.0.6/docs/ajax-head-template.html seems to have some errors in it and I can't tell what the procedure is for setting isDebug to true. Thanks -- Eduardo Kortright

Re: Setting isDebug=true for AJAX theme

2007-04-07 Thread Dave Newton
--- Eduardo Kortright [EMAIL PROTECTED] wrote: Can anyone tell me how to turn on debugging (DOJO config var isDebug)? s:head theme=ajax debug=true/ d. Bored stiff? Loosen up... Download and play hundreds

Re: Setting isDebug=true for AJAX theme

2007-04-07 Thread Eduardo Kortright
Thanks. Now I only have to figure out why s:div theme=ajax gives a dojo.widget.parse error when the URL is a remote website, but not when it is a page on a local web server. -- Eduardo On 4/7/07, Dave Newton [EMAIL PROTECTED] wrote: --- Eduardo Kortright [EMAIL PROTECTED] wrote: Can anyone

Re: Setting isDebug=true for AJAX theme

2007-04-07 Thread Dave Newton
--- Eduardo Kortright [EMAIL PROTECTED] wrote: The page http://struts.apache.org/2.0.6/docs/ajax-head-template.html seems to have some errors in it [...] Fixed(-ish). d. Finding fabulous fares is fun.

Re: sub-struts

2007-04-07 Thread Asaf Paris Mandoki
The requirement is that the widgets should be very easy to develop. And be as independent as possible of the application. So they could even be uploaded by users. The widgets should be able to make use of other, more general systems, like user management. I was thinking of doing this by

Re: Setting isDebug=true for AJAX theme

2007-04-07 Thread Eduardo Kortright
Hmm. I still see two instances of this error: Error formatting macro: snippet: java.lang.IllegalArgumentException: Invalid url: must begin with a configured prefix. The first occurrence is after the words The contents of head.ftl are:, and the second is after the words simply do the

Re: Setting isDebug=true for AJAX theme

2007-04-07 Thread Dave Newton
--- Eduardo Kortright [EMAIL PROTECTED] wrote: Hmm. I still see two instances of this error: The changes do not propagate to the live wiki immediately. The top snippet (whose output you can see by viewing the source of your page that uses the s:head.../ tag is: script language=JavaScript

Re: sub-struts

2007-04-07 Thread WongTseng
If you want to learn more about struts2, you can read the book 'webwork in action' which covers almost 90% of the knowledge about struts2 except for different package and cofig file names. As we all know, struts2 is almost the same as webwork. 2007/4/8, Asaf Paris Mandoki [EMAIL PROTECTED]:

Re: sub-struts

2007-04-07 Thread Asaf Paris Mandoki
Thanks for the tip. This reminds me of other questions I have. While trying to have client-side validation i ran into the problem that my server wasn't serving static content. I found this while looking for the solution. http://issues.apache.org/struts/browse/WW-1718 How do I fix this not a

Re: AJAX div loads local URL but not remote one

2007-04-07 Thread Musachy Barroso
Dojo supports crossdomain XHR using IFrames, but the ajax tags do not support it, yet. musachy On 4/7/07, Eduardo Kortright [EMAIL PROTECTED] wrote: Sorry about that... cut and paste went crazy on me; let me try again. Here is the JSP again: %@ page language=java contentType=text/html;