Re: S2: Design Input suggestion

2007-04-05 Thread Harring Figueiredo
Joey, Thank you so much for you input. I will take a look again at the showcase application code and see the detail of it. I was not aware that we could setup interceptors like that -- Your input on this is greatly appreciated. Regards, Harring Figueiredo On 4/5/07, joey <[EMAIL PROTECTED]> wr

Re: WildCards and Results

2007-04-05 Thread Aram Mkhitaryan
As Ted wrote those methods should return Strings which will determine the result to be shown. String myCustomMethod() { if(1) return "result1"; else return "result2"; } /pages/course1.jsp /pages/course2.jsp Also I do not recommend to define action name like since '!' is alread

Re: STRUTS2 Resource Bundles

2007-04-05 Thread Aram Mkhitaryan
Add struts.properties next to struts.xml and add global resources like struts.custom.i18n.resources=com.xyz.MyResourceBundle,com.xyz.props also see here for more details http://struts.apache.org/2.0.6/docs/how-do-i-set-a-global-resource-bundle.html Best, Aram On 4/6/07, Love, Andrew <[EMAIL P

Re: Help: JSP and Java 5 enum

2007-04-05 Thread Paul Benedict
I found the answer. The Apache JSTL implementation automatically coerces the r-value to an enum. So the below example works as wanted. Paul Benedict wrote: Has anyone ever compared or iterated a Java 5 enum in JSP? I want do the following: I don't mind comparing ordinals too, but I must be

FreeMarker evaluating result of s.url?

2007-04-05 Thread River Tarnell
hello, i have a FreeMarker template which looks like this: <@s.url id="viewurl" includeParams="none" action="view" title=title.text /> View as long as title.text contains "simple" text, this works fine: it outputs . however, if the literal value of title.text looks like a FreeMarker exp

Help: JSP and Java 5 enum

2007-04-05 Thread Paul Benedict
Has anyone ever compared or iterated a Java 5 enum in JSP? I want do the following: I don't mind comparing ordinals too, but I must be able to do a comparison. Thanks! Paul - To unsubscribe, e-mail: [EMAIL PROTECTED] For add

Re: How to get a attribute value of map value?

2007-04-05 Thread Felipe Rodrigues
So, in the link you sent me, I found this: myEntitiesMap['%{id}'].value It is used to change the value of some Entitie inside the Map. How to put some entitie inside the Map using OGNL? One more question.Where could I found out when to use %{} or #? Thanks, Felipe Mark Menard wrote: > > On

Re: How to get a attribute value of map value?

2007-04-05 Thread Felipe Rodrigues
hum... I thought it could be the right way, because print nothing is better than print it as a literal. I'll debug a little more to find the error. Thanks anyway. Mark Menard wrote: > > On 4/5/07 1:34 PM, "Felipe Rodrigues" <[EMAIL PROTECTED]> wrote: > >> %{test['AnyString'].att} prints nothi

Re: How to get a attribute value of map value?

2007-04-05 Thread Felipe Rodrigues
Yeah, I know. I'll make some others test. I just aked to make discart a OGNL syntax error. So if it is the correct form, so I need figure out what value is getting to att. And yes, My class has the setAtt method. Actually, this value comes from database using boxSQL framework. (http://boxsql.dev

autocompleter with JSON plugin

2007-04-05 Thread Rohit Dewan
I have the following in the body: <@s.url id="foos" value="foosList.action" /> <@s.form theme="ajax" action="addTest" method="add"> <@ s.autocompleterModel theme="ajax" href="%{foos}" name="foo" /> <@s.submit value="OK" action="addTest" method="add"/>

Re: S2: Design Input suggestion

2007-04-05 Thread joey
I don't think you should turn on validation in "edit" mode or "create" mode. Validation is only needed in "save" mode. "edit" mode or "create" mode is just to show field data,no submit. You can set validation only work for "save" mode like this: Add edit,create i

Re: S2: Better passing of fields by link

2007-04-05 Thread joey
Yes,your method is easier,I just missed your reply. regards joey On 4/6/07, Musachy Barroso <[EMAIL PROTECTED]> wrote: I think it is easier just to use the anchor tag from the ajax theme, which already does this. regards musachy On 4/5/07, joey <[EMAIL PROTECTED]> wrote: > > I think you want t

Re: struts controller with JSF view

2007-04-05 Thread Gary VanMatre
>From: "Keith Easterbrook" <[EMAIL PROTECTED]> > > Hi, > > Our team is dealing with a technology decision and I was hoping to get > some advice. Some members would like to use JSF for the entire MVC, and > some would very much like the injection from Struts 2. We have decided > that the view

Re: S2: Better passing of fields by link

2007-04-05 Thread Musachy Barroso
I think it is easier just to use the anchor tag from the ajax theme, which already does this. regards musachy On 4/5/07, joey <[EMAIL PROTECTED]> wrote: I think you want the a tag having the ajax function like the autocompleter tag. You can just use ajax lib javascript like dojo to achieve it.

Re: Action Validator ans

2007-04-05 Thread Dave Newton
--- [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 have sworn I did this before (but I already made one huge mis-assumption about my validations); hopefully it'll be obvious to a fresh set of e

Re: S2: Better passing of fields by link

2007-04-05 Thread joey
I think you want the a tag having the ajax function like the autocompleter tag. You can just use ajax lib javascript like dojo to achieve it. There is the snippet: function dojoForm(form) { var kw = { mimetype: "text/plain", encoding:

Re: MVC 2 design, how to

2007-04-05 Thread Ted Husted
It sounds like that you might want to use the ModelDriven approach, where the AccountManager is the model object. I was surprised to find that there doesn't seem to be a page or FAQ with regard to using ModelDriven. Essentially, all you need to do is place a model property on a base Action class

struts controller with JSF view

2007-04-05 Thread Keith Easterbrook
Hi, Our team is dealing with a technology decision and I was hoping to get some advice. Some members would like to use JSF for the entire MVC, and some would very much like the injection from Struts 2. We have decided that the view will be JSF, but the controller is still up in the air. This is pr

Re: Action Validator ans

2007-04-05 Thread stanlick
Actually annotations do work at the method level. On 4/5/07, Dave Newton <[EMAIL PROTECTED]> wrote: --- Ted Husted <[EMAIL PROTECTED]> wrote: > Note that it is the action name not the method name. > (Though, I often wonder if the method name would make > more sense.) Apparently I've just been l

MVC 2 design, how to

2007-04-05 Thread mansour77
Hello every one: I am trying to write a little application to familiarize myself with struts 2. I am trying to design the application using mvc2. the application is nothing but a small utility for invoices. It store, retrieves and update invoices. Each invoice belongs to an Account in the DB.

Re: Action Validator ans

2007-04-05 Thread Dave Newton
--- Ted Husted <[EMAIL PROTECTED]> wrote: > The validation comes out of XWork, so we'd have to > file a ticket over there. My guess is that it wouldn't be worth it; it's easy enough to see the need for the existing way of doing it and it's not *that* much more work. I guess. :/ If anybody else chi

Re: Action Validator ans

2007-04-05 Thread Ted Husted
On 4/5/07, Dave Newton <[EMAIL PROTECTED]> wrote: Turns out the annotations are class-based as well (again, I had just been lucky so far)... If the validation files were based off of method names the annotations could be as well, which would be a nice, unified view of things, IMO. The validatio

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

2007-04-05 Thread Peter Milne
On Wed, 2007-04-04 at 20:12 -0400, Musachy Barroso wrote: > oopsI had to upload a new one, overwriting the old one doesn't fix it: > > http://cwiki.apache.org/confluence/download/attachments/33168/quickstart_maven2.zip > > musachy > > On 4/4/07, Peter Milne <[EMAIL PROTECTED]> wrote: > > > >

Re: Action Validator ans

2007-04-05 Thread Dave Newton
--- Ted Husted <[EMAIL PROTECTED]> wrote: > Note that it is the action name not the method name. > (Though, I often wonder if the method name would make > more sense.) Apparently I've just been lucky (and had fewer method-specific validations than I thought :/ so far. Having the validation files

Re: upload fail occasionally

2007-04-05 Thread torben
I have now done some more studies by making my own fileUploadInterceptor class. It is complety the same as org.apache.struts2.interceptor.FileUploadInterceptor, except that I write in the log the class name of the HttpServletRequest I get in the intercept method. If I bypass apache as fronte

S2: Design Input suggestion

2007-04-05 Thread Harring Figueiredo
Folks: I have a form that is rendered by calling an action from a get or a put. In "edit" mode, the fields are pre-populated from the POJO (param to get the POJO is passed on the URL GET). In "create" mode, the fields are, of course, empty. The design issue I am having has to do with the Vali

Re: Action Validator ans

2007-04-05 Thread stanlick
Ted -- I think the method name "validation naming" would be more intuitive. Thanks, Scott On 4/5/07, Ted Husted <[EMAIL PROTECTED]> wrote: The WebWork "bang" notation for calling methods doesn't support per-method validations. However, the Struts-style wildcards do support per-method valida

STRUTS2 Resource Bundles

2007-04-05 Thread Love, Andrew
Hello, I would like to add a resource bundle to the path for validation messages. The bundle must load from a path that does not follow the Package hierarchy defined in struts2. The textProvider in the ActionSupport class is private so I cannot directly add the bundle from an Action class.

Re: How to get a attribute value of map value?

2007-04-05 Thread Mark Menard
On 4/5/07 1:34 PM, "Felipe Rodrigues" <[EMAIL PROTECTED]> wrote: > %{test['AnyString'].att} prints nothing and finally I've used this technique to access the properties of entities stored in a Map. (http://www.vitarara.org/cms/node/81) Are you sure that the "att" attribute has something in it? M

Re: S2: Better passing of fields by link

2007-04-05 Thread Musachy Barroso
What problem are you having? Just do: like what you did for the autocompleter, there are a few examples on showcase also. musachy On 4/5/07, Scott Nesbitt <[EMAIL PROTECTED]> wrote: I have a link that calls an action and I would like the action class to have some field values from my page.

S2: Better passing of fields by link

2007-04-05 Thread Scott Nesbitt
I have a link that calls an action and I would like the action class to have some field values from my page. Currently I do this: Edit Lineup In rewriteLink() I manually create a list of parameter key/values. Is there a better way? In my autocompleter tag I can just do formId="dataForm" and

Re: Struts 2 and JSTL (XML)

2007-04-05 Thread Brian Thompson
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 uri="http://java.sun.com/jsp/jstl/sql"; prefix="sql" %> <%@ taglib uri="/struts-

Struts2..Problems with getText() in jsp files

2007-04-05 Thread Jeff C
hi, I've spent the last couple of weeks migrating our site from webwork 2 to struts 2. The Struts 2 version of the app worked fine on my windows machine, as well as in our qc environment (apache/tomcat 5). However, when we rolled the code to the production servers, we encountered a rather major p

Re: [S2] Validation setup

2007-04-05 Thread Skip Hollowell
OK, I think I may be on to something here... In this particular Action, I am working with a Payment class, instead of individual fields. that may very well be where all of my trouble is. align="center"/> So say I want to validate the ccNumber and ccExpDate. These are part of my Pa

Re: request.getParameterValues OGNL ?

2007-04-05 Thread cilquirm
Hi, Does ... not work for you? Will Berger wrote: > > How does one in struts 2 process a list of req parameters using ognl? > > In jsp, this gets the job done. > <% > String emailList[] = request.getParameterValues("email")); > for (int i=0;i { > out.println(

Re: How to get a attribute value of map value?

2007-04-05 Thread cilquirm
The second way, %{test['AnyString'].att} or even, explicitly, %{test['AnyString'].getAtt()} should both work. I know it might sound dumb, but is there a value to att? ( using that class as an example, there's no way to set it :-) -a Felipe Rodrigues wrote: > > Hi guys, > > I have this case

Re: Struts 2 URL mapping

2007-04-05 Thread cilquirm
You actually can do that with the default mapper, using wildcarding. Here's an example of what we do : {1} The only trick is that you have to remember to suffix your url appropriately when calling so that S2's dispatchfilter is able to run and pick up on the url mapping. i.e. ( our s

Re: Struts 2 URL mapping

2007-04-05 Thread cilquirm
You actually can do that with the default mapper, using wildcarding. Here's an example of what we do : {1} The only trick is that you have to remember to suffix your url appropriately when calling so that S2's dispatchfilter is able to run and pick up on the url mapping. i.e. ( our s

Re: Struts 2 URL mapping

2007-04-05 Thread cilquirm
You actually can do that with the default mapper, using wildcarding. Here's an example of what we do : {1} The only trick is that you have to remember to suffix your url appropriately when calling so that S2's dispatchfilter is able to run and pick up on the url mapping. i.e. ( our s

Re: Action Validator ans

2007-04-05 Thread Dave Newton
--- Ted Husted <[EMAIL PROTECTED]> wrote: > Note that it is the action name not the method name. > (Though, I often wonder if the method name would make > more sense.) Sakes alive, really?! Hmm, I wonder if I've just been naming things luckily up 'til now--I may have to rename some validation file

Re: Action Validator ans

2007-04-05 Thread Ted Husted
The WebWork "bang" notation for calling methods doesn't support per-method validations. However, the Struts-style wildcards do support per-method validations. Validations can be specified just as if the method name had been hardcoded in the configuration. The syntax is "ActionClass-actionName-va

How to get a attribute value of map value?

2007-04-05 Thread Felipe Rodrigues
Hi guys, I have this case now, and I'm not getting take the value of a map value attribute. Let me explain better. I have a class: class Mov{ private String att; public String getAtt(){ return att; } } and I put it inside a java.util.Map, like Map test = new HashMap(); test.put("AnyString

form filed populated wrongly

2007-04-05 Thread Guna
Hi, I have two jsp pages with different form bean. on first jsp page, i have field called "LastName". on first jsp page if user press cancel the request. the user is navigated to second jsp page which has also a field called "lastName". The problem is what ever value i enter on first jsp page la

Re: Action Validator ans

2007-04-05 Thread stanlick
Ted -- This is a great explanation! Can you add to this how Validator naming works with respect to wildcard methods? For instance: CourseAction list() create() Course-validation.xml and supposedly support for something like Course-create-validation.xml I think I remember reading somethin

Struts 2 - File upload & converters.

2007-04-05 Thread karthik muthukumaraswamy
Hello, I am planning to migrate my Struts 1 App to Struts 2. I have a page where I am uploading files to the server. I tried to follow the fileupload sample that comes with the Struts 2 distribution but without success. In my app, I have all the required .jar files in the WEb-INF/lib directory. Yo

Re: Action Validator ans

2007-04-05 Thread Dave Newton
--- [EMAIL PROTECTED] wrote: > Maybe you missed the part about *not* passing a > parameter with the link url? Maybe I was answering your *first* question? > This link allows an item to be deleted and the > parameter being passed is a read-only "hibernate id" > that was loaded into the page durin

Re: Action Validator ans

2007-04-05 Thread Ted Husted
How the link is generated isn't relevant. Once the response hits the browser, everything is in HTML, and the framework is no longer involved. When the client clicks the link, it sends back a GET for the resource. If the action resource has been configured for validation, then validation fires. By

Re: Action Validator ans

2007-04-05 Thread stanlick
Maybe you missed the part about *not* passing a parameter with the link url? I am experimenting with a few ideas to minimize writing too many Action classes by leveraging the wildcard method feature. This link allows an item to be deleted and the parameter being passed is a read-only "hibernate

Re: [S2] Validation setup

2007-04-05 Thread Skip Hollowell
Dave Newton-4 wrote: --- Skip Hollowell <[EMAIL PROTECTED] > wrote: > Dave Newton-4 wrote: >> Skip Hollowell said: >>> AccountAction_payment-validation.xml doesn't work >>> AccountAction_Payment-validation.xml doesn't work >>

Re: [S2] Validation setup

2007-04-05 Thread Dave Newton
--- Skip Hollowell <[EMAIL PROTECTED]> wrote: > Dave Newton-4 wrote: >> Skip Hollowell said: >>> AccountAction_payment-validation.xml doesn't work >>> AccountAction_Payment-validation.xml doesn't work >> Are the underscores typos? > No typos. > So how can I turn on the validation for this form / >

Re: [S2] Validation setup

2007-04-05 Thread Skip Hollowell
Dave Newton-4 wrote: --- Skip Hollowell <[EMAIL PROTECTED] > wrote: > AccountAction_payment-validation.xml doesn't work > AccountAction_Payment-validation.xml doesn't work Are the underscores typos? No typos. I am graspin

Re: S2: Passing paramaters with autocompleter

2007-04-05 Thread Scott Nesbitt
Thank you, Musachy! I did overlook that option, my state parameter is passing great now. I also figured out why the string I typed into the autocomplete field had a value but no key: I forgot to put name="team" in the s:autocomplete tag. Once I did that it worked fine. Thanks again, Scott --

Re: resume after login feature

2007-04-05 Thread Dave Newton
--- meeboo <[EMAIL PROTECTED]> wrote: > Gotcha Dave... now all I need is clean URL:s before > I can actually consider using this damned framework Clean URLs? FYI, the source for org.apache.struts2.interceptor.ServletConfigInterceptor shows how to access the request, from which you can grab the o

Re: resume after login feature

2007-04-05 Thread meeboo
Gotcha Dave... now all I need is clean URL:s before I can actually consider using this damned framework :) Dave Newton-4 wrote: > > --- meeboo <[EMAIL PROTECTED]> wrote: >> Yeah Dave, the problem is passing the data. I have >> my Login.java action class which implements >> ServletRequestAware

Re: [S2] Validation setup

2007-04-05 Thread Dave Newton
--- Skip Hollowell <[EMAIL PROTECTED]> wrote: > I had the whole validation thing working great, and > then I had to go and get 'fancy' with my Actions and > aliases, That'll teach ya'! > AccountAction_payment-validation.xml doesn't work > AccountAction_Payment-validation.xml doesn't work Are t

Re: Action Validator ans

2007-04-05 Thread Dave Newton
--- [EMAIL PROTECTED] wrote: > It strikes me as odd that a hyperlink not related to > the form would be intercepted by the form validator. Meh; if an action is Validatable then it's Validatable, you know? I have to agree with Ted--if you're passing a parameter that's being used by the method, wh

Re: resume after login feature

2007-04-05 Thread Dave Newton
--- meeboo <[EMAIL PROTECTED]> wrote: > Yeah Dave, the problem is passing the data. I have > my Login.java action class which implements > ServletRequestAware but it'll of course only retrieve > localhost:8080/login.action since that's the request > URI. I need to somehow tell it which location th

[S2] Validation setup

2007-04-05 Thread Skip Hollowell
I had the whole validation thing working great, and then I had to go and get 'fancy' with my Actions and aliases, and now, I can't seem to get my validator xml files named correctly... method="list"> name="success">/WEB-INF/jsp/UC01-EnterPayment.jsp

Re: Action Validator ans

2007-04-05 Thread stanlick
Thanks Ted. Let us suppose for a moment there are no parameters passed with the URL. Is there an S2 pulley or chain I can tug on to bypass the validation? Maybe this is not a case where I should be using a S2 tag? It strikes me as odd that a hyperlink not related to the form would be intercept

Re: resume after login feature

2007-04-05 Thread meeboo
Yeah Dave, the problem is passing the data. I have my Login.java action class which implements ServletRequestAware but it'll of course only retrieve localhost:8080/login.action since that's the request URI. I need to somehow tell it which location the user tried to login from so that it can redire

Re: S2: Passing paramaters with autocompleter

2007-04-05 Thread Musachy Barroso
You can use the "formId" attribute, like: //fields here and it will pass the fields of the form as paramteers when the autocompleter is loaded. musachy On 4/5/07, Scott Nesbitt <[EMAIL PROTECTED]> wrote: I am trying to use the Ajax autocompleter and would like to pass some parameters.

Re: resume after login feature

2007-04-05 Thread Dave Newton
--- meeboo <[EMAIL PROTECTED]> wrote: > I'm kind of stumped on this problem too, how can I > send the original request uri to the login action so > that it knows what page to redirect to? Which is the problem; getting the original request, or sending data to the action? Sending data to the acti

Re: resume after login feature

2007-04-05 Thread meeboo
I'm kind of stumped on this problem too, how can I send the original request uri to the login action so that it knows what page to redirect to? Jae K wrote: > > Hello all, this is a struts2 question. > > I'm trying to implement a feature where a custom AuthenticationInterceptor > would redir

S2: Passing paramaters with autocompleter

2007-04-05 Thread Scott Nesbitt
I am trying to use the Ajax autocompleter and would like to pass some parameters. This is my JSP: Select a Sports Team Unfortunately, state is not set and the only parameter that is passed (a 'p' was typed in the field) has no key: 10:

Re: Excaption Handling in Struts 2

2007-04-05 Thread Dave Newton
--- ChristopherAngel wrote: > Looks like you're right. Dammit; that uses up my monthly allocation (I only get three). That's cool; someone will add something somewhere on the Wiki (I know I like sending emails on certain exception types or logging others, etc.) and this might be a good way to han

Re: Excaption Handling in Struts 2

2007-04-05 Thread ChristopherAngel
Looks like you're right. I now have: exception WEB-INF/jsp/exception.jsp and it is working. Thank you. Dave Newton-4 wrote: > > --- ChristopherAngel wrote: >> How do I call an action before goi

Re: Excaption Handling in Struts 2

2007-04-05 Thread Dave Newton
--- ChristopherAngel wrote: > How do I call an action before going to that page? This is untested, but AFAICT you should be able to have the result be whatever type you want, so perhaps you could send it to a type='action-redirect'? http://struts.apache.org/2.x/docs/exception-interceptor.html P

Re: Excaption Handling in Struts 2

2007-04-05 Thread ChristopherAngel
Ah - thank you. Strange that I couldn't see it. Ok I've now redirected all exceptions to a page. How do I now call an action before going to that page? Dave Newton-4 wrote: > > --- ChristopherAngel wrote: >> I think I'm having a bit of a fick day. > > It's almost Friday :) > >> but I have

Re: Excaption Handling in Struts 2

2007-04-05 Thread Dave Newton
--- ChristopherAngel wrote: > I think I'm having a bit of a fick day. It's almost Friday :) > but I have to ask in which jar can I find it? Should just be there in struts-core; IIRC it's at the root level. d. _

Re: Excaption Handling in Struts 2

2007-04-05 Thread ChristopherAngel
I think I'm having a bit of a fick day. Not only did I spell "Exception" "Excaption" but I have to ask in which jar can I find it? Dave Newton-4 wrote: > > --- ChristopherAngel wrote: >> Not only that but I'm confused by the 1st one > talking >> about the struts-default.xml which I've never se

Re: how to set hidden field value to a session attribute ?

2007-04-05 Thread Dave Newton
--- abhiram <[EMAIL PROTECTED]> wrote: > does it work for struts 1.2 It works on any container that supports JSP 2.0 (which yours does). If your container *doesn't* support JSP 2.0 you can use the html-el tags. d.

Re: Tiles Struts 2

2007-04-05 Thread Dave Newton
--- Syed Ibrahim <[EMAIL PROTECTED]> wrote: > How to use tiles in struts 2 http://struts.apache.org/2.x/docs/tiles-plugin.html d. TV dinner still cooling? Check out "Tonight's Picks" on Yahoo! TV. http://tv

RE: Accessing message resources

2007-04-05 Thread Dave Newton
--- David Harland <[EMAIL PROTECTED]> wrote: > In struts 1 you could access the resource bundles > using Resources.getMessage from any class. How do you > do the same in struts 2 using getText. http://struts.apache.org/2.x/struts2-core/apidocs/com/opensymphony/xwork2/ActionSupport.html#getTexts(ja

Re: how to set hidden field value to a session attribute ?

2007-04-05 Thread abhiram
thanks sir. does it work for struts 1.2 also, as i'm using it.nyways, im new to jsp too and should learn to use custom tags. thanks for the quick response. abhiram Dave Newton <[EMAIL PROTECTED]> wrote: --- abhiram wrote: > [...] i dont know how to set the value of a hidden > field to a ses

RE: Accessing message resources

2007-04-05 Thread David Harland
In struts 1 you could access the resource bundles using Resources.getMessage from any class. How do you do the same in struts 2 using getText. -Original Message- From: Dave Newton [mailto:[EMAIL PROTECTED] Sent: 05 April 2007 12:45 To: Struts Users Mailing List Subject: Re: Accessing m

Re: Excaption Handling in Struts 2

2007-04-05 Thread Dave Newton
--- ChristopherAngel wrote: > Not only that but I'm confused by the 1st one talking > about the struts-default.xml which I've never seen. Nobody's stopping you ;) It's in the jar; just look at it. d. It's he

Re: how to set hidden field value to a session attribute ?

2007-04-05 Thread Dave Newton
--- abhiram <[EMAIL PROTECTED]> wrote: > [...] i dont know how to set the value of a hidden > field to a session attribute. my appln server is apache > tomcat 5.5.9 JSP 2.0 is your friend (as is documentation). d.

Excaption Handling in Struts 2

2007-04-05 Thread ChristopherAngel
How do I redirect all Exceptions to a particular jsp page? I've looked at both: http://struts.apache.org/2.x/docs/exception-configuration.html and http://struts.apache.org/2.x/docs/exception-interceptor.html but these have not helped me. In fact they've confused me a little as the examples giv

how to set hidden field value to a session attribute ?

2007-04-05 Thread abhiram
hi friends!! im new to struts and im developing a web application using struts and jsp. in one scenario,i want to set the value of a string variable of a formbean to a session attribute through jsp.bcoz form bean is populated only when formdata is submitted,i wrote a hidden field in t

Re: How to glue struts to JSPs

2007-04-05 Thread Dave Newton
--- "Kraft, Daniel" wrote: > I'm new to struts and just worked through the user's > guide. However, for me it was not clarified there > how to connect the "View" component to a given JSP > page or, in general, how to manage it to make a > given JSP be displayed for the View-part of a > struts-requ

How to glue struts to JSPs

2007-04-05 Thread Kraft, Daniel
Hi! I'm new to struts and just worked through the user's guide. However, for me it was not clarified there how to connect the "View" component to a given JSP page or, in general, how to manage it to make a given JSP be displayed for the View-part of a struts-request. I wasn't able to find rea

Re: Struts 2 URL mapping

2007-04-05 Thread Dave Newton
--- meeboo <[EMAIL PROTECTED]> wrote: > Is it possible to snap up URL parameters via > wildcards in Struts.xml and then pass them on as > request parameters to an action? You may be able to use the RestfulActionMapper to do this; I don't know if you can do that with the default mapper. http://s

Struts 2 URL mapping

2007-04-05 Thread meeboo
Hey all Is it possible to snap up URL parameters via wildcards in Struts.xml and then pass them on as request parameters to an action? For example, map all URL:s from localhost:8080/v/*/ to /localhost:8080/movie.action?myParam=? where the question mark is replaced with the wildcard value. --

Re: WildCards and Results

2007-04-05 Thread Ted Husted
Since the methods do not return a String containing the result to match, I'm not sure how to direct Struts to display a page. All such methods should return a String, just like the canonical execute method. In other words, execute is the default Action method (or "alias"). Other methods can be

Re: upload fail occasionally

2007-04-05 Thread Dave Newton
--- nordland <[EMAIL PROTECTED]> wrote: > I had the same problem too. The invocation of the > ActionContextCleanUp-filter was the right choice. > Fileupload works now without any errors. That's great! I or someone else will add something to the wiki page, although I sure wish I could find the th

Re: Action Validator ans

2007-04-05 Thread Ted Husted
A hyperlink is a get, and if coded correctly a get shouldn't have side effects, and so at first blush validation might seem redundant. Although, the struts controller doesn't distinguish between get and post. If there is a validator associated with the course action, then it would be called regard

Re: upload fail occasionally

2007-04-05 Thread nordland
I had the same problem too. The invocation of the ActionContextCleanUp-filter was the right choice. Fileupload works now without any errors. Thanks! Dave Newton-4 wrote: > > Did either of you try specifying the context cleanup > filter? > > > contextCleanup > > org.apache.struts2.d

Re: [S2] using

2007-04-05 Thread MK Tan
have u try this On 4/5/07, [EMAIL PROTECTED] < [EMAIL PROTECTED]> wrote: Hello, I've been trying to use but come across a problem when using it with to set parameters on the action url. From the documentation there is an example: Which should results in

[S2] using

2007-04-05 Thread paul . edmondson
Hello, I've been trying to use but come across a problem when using it with to set parameters on the action url. From the documentation there is an example: Which should results in However the actual result when trying this example from the browser is: id="link1"

Re: [S2] using

2007-04-05 Thread paul . edmondson
Thanks for the advice. Your example does work and is a little bit neater than the example. I'll use you suggested way from now on. It might be an idea to either update the documentation to use this method or to raise a bug as the documented example does not work. Thanks again, Paul.

Accessing message resources

2007-04-05 Thread David Harland
Hi, How do you use ognl to access resources outside of a class that extends ActionSupport. eg the struts 2 equivalent to Resources.getMessage but getText() instead Thanks Dave. Need Mail bonding? Go to

Re: Accessing message resources

2007-04-05 Thread Dave Newton
--- David Harland <[EMAIL PROTECTED]> wrote: > How do you use ognl to access resources outside of a > class that extends ActionSupport. eg the struts 2 > equivalent to Resources.getMessage but > getText() instead I'm not aware that you'd normally use OGNL for that; the and tags are what (I thin

Struts 2 Logging

2007-04-05 Thread oguzhan tortop
Hi all , i want to log to a file by using logger interceptor but i couldn't find any information about it from struts 2 guide. I can see some information from console screen but i want them to be logged on a file is it possible ? -- View this message in context: http://www.nabble.com/Struts-2-Lo