Re: S2 : Checking constants within JSP

2008-02-02 Thread Dave Newton
--- j alex <[EMAIL PROTECTED]> wrote: > I assume it won't have any performance impact . Please confirm? Won't have *any* performance impact? That doesn't seem possible; most any time you're using a tag you're going to have some overhead. Scriptlets are compiled directly into the servlet, tags make

Re: S2 : Checking constants within JSP

2008-02-02 Thread j alex
Thanks Dave, with just scriptlets we could do it with a single page import on top <%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1" import="com.abc.utils.AffinityConstants" and in scriptlet as: <% if(((AppConstants.APPLICATION_CODE.equals(appCode))

Re: S2 : Checking constants within JSP

2008-02-02 Thread Dave Newton
--- j alex <[EMAIL PROTECTED]> wrote: > > > but this doesn't look clean ; is there a way to get rid of the @ > com.abc.util.AppConstants [import?] No; that's how OGNL accesses static data (and it's much cleaner than the way we have to do it with JSP 2.0, IIRC). Another option is to expose a sta

S2 : Checking constants within JSP

2008-02-02 Thread j alex
Hi, What's the best way to check constants in jsp using the s:if tag. I've constants defined in a file like : public class AppConstants { public static final String APPLICATION_CODE = "MYAPP"; public static final String APPLICATION_VERSION = "1.2"; Now, in the JSP we need to use these

Re: Struts2 2.0.11 Validation with DWR

2008-02-02 Thread j alex
Were you able to solve this yet ? . If not, please let me now the exact exception trace-- i had implemented it, and may be able to help Also, if you solved ..pls post the solution too. On Jan 29, 2008 9:27 AM, Julien RICHARD <[EMAIL PROTECTED]> wrote: > I need some help with DWR. > > I have find

Re: AjaxTag 1.3 support?

2008-02-02 Thread Jeromy Evans
I completely agree with Dave so I'll take a different tact. Based on this example: http://struts.apache.org/2.0.11/docs/ajax-tags.html#AjaxTags-autocompleterTag, I would also take the approach of returning a JSON Result via the JSON Plugin. Only the configuration changes for an XML result.

RE: AjaxTag 1.3 support?

2008-02-02 Thread Dave Newton
--- "Griffith, Michael *" <[EMAIL PROTECTED]> wrote: > Thanks for the comprehensive reply. Looking at the documentation and the > example app, I am still not sure how to configure my action/response. I > am using tiles 2. As previously stated if you are writing directly to the response you need t

RE: AjaxTag 1.3 support?

2008-02-02 Thread Griffith, Michael *
Jeromy, Thanks for the comprehensive reply. Looking at the documentation and the example app, I am still not sure how to configure my action/response. I am using tiles 2. If I configure the autocompleter as such: It seems I need to return my result in JSON format correct? By returning a

RE: DataGrid, Struts layout and Struts 2

2008-02-02 Thread nandha
thank you nagesh. the link s very much helpfull to acheive my task. nagesh.kumar wrote: > > I think some more components like table ,tabbedPanel ,tree ,treenode > which > are look like datarid we can use this > > > http://struts.apache.org/2.0.6/docs/tag-reference.html > > > Thanks > Nag

Re: actions defined in a package are visible in other packages??

2008-02-02 Thread paulbrickell
Dave, Thanks for the help here. I see the same thing happening now. If I have a leading slash in my config file I can create a link with both and action and a url but the action tag then only works if I have a leading slash. If I dont then I get the 'cannot find action' error. I can create a u

Re: reset problem for a dynavalidator form

2008-02-02 Thread Ashima Beri
Thanks Dave! This explains it. newton.dave wrote: > > --- Ashima Beri <[EMAIL PROTECTED]> wrote: >> I read in struts flow explanation that Action class is only called if the >> validations are passed through. >> I dont know what other way to adopt. > > What Laurie is saying is that you can imp

Re: reset problem for a dynavalidator form

2008-02-02 Thread Ashima Beri
Thanks Laurie... This helps! Ill go the secod way. Laurie Harper wrote: > > On a normal form submit to an action with validation, if validation > fails, the request is forwarded to the input result and execute() is > bypassed, yes. So, you have two options: > > 1) as Dave reiterated, you can

Re: reset problem for a dynavalidator form

2008-02-02 Thread Laurie Harper
On a normal form submit to an action with validation, if validation fails, the request is forwarded to the input result and execute() is bypassed, yes. So, you have two options: 1) as Dave reiterated, you can put your form reset logic in validate(); have your validate method detect the when th

Re: reset problem for a dynavalidator form

2008-02-02 Thread Dave Newton
--- Ashima Beri <[EMAIL PROTECTED]> wrote: > I read in struts flow explanation that Action class is only called if the > validations are passed through. > I dont know what other way to adopt. What Laurie is saying is that you can implement a validate() method and call super.validate() before you d

Re: reset problem for a dynavalidator form

2008-02-02 Thread Ashima Beri
Hi Laurie, Thanks for the quick reply. I want to reset the form fields after hitting a reset button. When I thought of going about it through the Action class way and tried to clear out my form fields , strangely i noticed that the Action class's execute method is never called if there are still c

Re: session delete event

2008-02-02 Thread Laurie Harper
Sergey Livanov wrote: How I can intercept *before* session delete event? HttpSessionListener.sessionDestroyed(): Notification that a session is about to be invalidated. http://tomcat.apache.org/tomcat-5.5-doc/servletapi/javax/servlet/http/HttpSessionListener.html L. -

Re: reset problem for a dynavalidator form

2008-02-02 Thread Laurie Harper
Ashima Beri wrote: Hi, I am trying to reset a validator form after the form is submitted and a few of the validations have failed. Reset button used in the form clears out fields changed only since the time the form is loaded. That is it does just the client side reset. One way that i figured out

Re: Struts, Interceptor error message customization

2008-02-02 Thread Laurie Harper
Mike J. M. wrote: Hello, So I am currently using Struts, including an action that has a fileUpload Interceptor that checks for files that are too large and certain allowable file types. Right now if either of these conditions are met, the system will throw a generic HTTP 500 error up. What I am

Re: How to create a new Struts2 project with maven2?

2008-02-02 Thread Laurie Harper
It works fine for me too. Maybe it's a problem with the version of Maven you're using? [EMAIL PROTECTED] mvn --version Maven version: 2.0.6 [EMAIL PROTECTED] mvn archetype:create -DgroupId=home.struts2 -DartifactId=struts2-example -DarchetypeGroupId=org.apache.struts -DarchetypeArtifactId=stru

session delete event

2008-02-02 Thread Sergey Livanov
How I can intercept *before* session delete event?

reset problem for a dynavalidator form

2008-02-02 Thread Ashima Beri
Hi, I am trying to reset a validator form after the form is submitted and a few of the validations have failed. Reset button used in the form clears out fields changed only since the time the form is loaded. That is it does just the client side reset. One way that i figured out was to submit the f

Re: Struts and Windows Authentication

2008-02-02 Thread Martin Gainty
Hi Arun- following up on Antonio's suggestion- did you look at setting the AD properties ? http://jcifs.samba.org/src/docs/ntlmhttpauth.html#props (and then restart the container) ? Martin - Original Message - From: "Arun" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" Sent: Saturda

[OT] Re: Struts and Windows Authentication

2008-02-02 Thread Dave Newton
--- Arun <[EMAIL PROTECTED]> wrote: > I am using tomcat. Is it possible implement container managed security with this? Yes; see the Tomcat docs[1,2]. Dave [1] http://tomcat.apache.org/tomcat-5.5-doc/realm-howto.html [2] http://tomcat.apache.org/tomcat-6.0-doc/realm-howto.html > > On Feb 1, 20

Re: actions defined in a package are visible in other packages??

2008-02-02 Thread Dave Newton
I can only dupe this if I leave out the leading "/" (slash) in my namespace attribute of my package. Off the top of my head I'd say that the dispatcher is looking in a "/" namespace (as opposed to the "" (empty string) namespace) and can't find the action there (or is looking in "" instead of "/",

Re: Struts and Windows Authentication

2008-02-02 Thread Arun
I am using tomcat. Is it possible implement container managed security with this? On Feb 1, 2008 7:42 PM, Cory D. Wiles <[EMAIL PROTECTED]> wrote: > At my job we authenticate our users directly using Active Directory using > container managed security. > > What container are you using? > > On Feb

Re: actions defined in a package are visible in other packages??

2008-02-02 Thread mgainty
not off base at all.. one example is to reference WEB-INF/classes/struts-tags-ui.xml example.jsp example.jsp which resolves the default result of example.jsp to /tags/ui/example.jsp specifically.. $TOMCAT_HOME/webapps/struts2-showcase-2.0.11/tags/ui/exa

Re: actions defined in a package are visible in other packages??

2008-02-02 Thread Wes Wannemacher
I'm jumping into this thread late, so I apologize if I'm way off-base. But, is there a reason why you aren't using a front-slash in your namespace names? Although the docs don't explicitly say it is required, a leading / seems to show up in each example in the docs. http://struts.apache.org/2.x/do

Re: How to create a new Struts2 project with maven2?

2008-02-02 Thread Nuwan Chandrasoma
Hi, The command i have given to you work for me, i dont know what is wrong here.. any maven guru can help you on this. Thanks, Nuwan (http://code.google.com/p/struts2-ssl-plugin/) Thai Dang Vu wrote: I tried what you suggested, but still got error: mvn -e archetype:create -DgroupId=home.s

Re: actions defined in a package are visible in other packages??

2008-02-02 Thread paulbrickell
Dave, OK did as you suggested, cranked up the logging level and I do now get some logging. I created a little sandbox app to test out some things with and simplifying has really helped. Heres what I have now execute test action Now the first div works exactly as expected. Th

Re: How to create a new Struts2 project with maven2?

2008-02-02 Thread Thai Dang Vu
I tried what you suggested, but still got error: mvn -e archetype:create -DgroupId=home.struts2 -DartifactId=struts2-example -DarchetypeGroupId=org.apache.struts -DarchetypeArtifactId=struts2-archetype-starter -DarchetypeVersion=2.0.11 -DremoteRepositories=http://people.apache.org/builds/strut