Re: how to pass object through request parameter

2008-03-04 Thread Nils-Helge Garli Hegvik
You can store objects as request attributes, which lives as long as
the request. If you need an object to live between requests, use the
session.

Nils-H

On Wed, Mar 5, 2008 at 8:24 AM, Arpan Debroy <[EMAIL PROTECTED]> wrote:
> Hi,
>
>  Instead of sending string name and values, I want to send the whole object,
>  which comprises of  some fields, from one jsp to another one.
>  I am using struts2.
>  Can anyone tell me if it's possible to pass an object rather than strings
>  through request object.
>
>  Thanks
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



how to pass object through request parameter

2008-03-04 Thread Arpan Debroy
Hi,

Instead of sending string name and values, I want to send the whole object,
which comprises of  some fields, from one jsp to another one.
I am using struts2.
Can anyone tell me if it's possible to pass an object rather than strings
through request object.

Thanks


Re: Struts 2: Creating custom JavaBeans from request parameters (not in action class)

2008-03-04 Thread Jeromy Evans

Cheng Wei Lee wrote:

I know I can get the values of the request parameters in the action class
and then use them to instantiate an object. Read from the API for
ParameterAware interface, "One common use for this is to have the action
propagate parameters to internally instantiated data objects.". Does this
means that Struts 2 can do it for us if we implement some interfaces or use
some interceptors? That is, I don't need to create the object in my own
action class?

  


If your bean is available in a public property of your action, and has a 
no-arg constructor, Struts 2 will instantiate it and set properties on it.

Ensure you have a getter and setter for the bean in your action.

ParameterAware is rarely needed.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



pls help: how to upload file if use struts 1.x

2008-03-04 Thread john lee
Could any expert tell me how to upload file if use struts 1.x? any example will 
be greatly appreciate.
   
  tks in advance
   
  john

   
-
Be a better friend, newshound, and know-it-all with Yahoo! Mobile.  Try it now.

Re: Conversation Scope?

2008-03-04 Thread Jeromy Evans

Gabriel Belingueres wrote:

I thought that a possible explanation would be to keep the view (JSP)
pages unaware of the scope of the variables it uses but honesty I'm
not fully convinced of the gain I can achieve with this practice.

I've developed a conversation scope interceptor I'm using in my
projects and I don't use modelDriven interface.

ModelDriven interface is (IMHO) uncomfortable because it is designed
to return only one object for use in the view, which IMO is
unrealistic but in the simplest use cases. In addition, if you want to
use several objects in the view, it forces to either create a DTO (not
good) to reunite all data or using a Map with domain objects but in
either case you end up with something not very different to not using
model-driven.
  


Hi Gabriel,

You're correct.  ModelDriven does not give you much benefit other than 
to put a single Model object, rather than the Action, at the top of the 
ValueStack (the Action falls to second). In many respects, that's a 
limitation rather than a benefit. 

It's an alternative approach that suits some circumstances. Some people 
like the strict distinction between the action and the object being 
acted upon.


Personally, I don't favour ModelDriven on normal actions that are used 
to populate a view.  Like you stated earlier in the thread, I prefer 
using %{contact.firstName} rather than %{firstName} and often have 
multiple beans that need to be accessed.  However, I have found it 
useful with the REST plugin as I typical deal with a single resource 
type (the Model) and take care that it can be serialized into XML or 
JSON as well as populate a view.  Again that's mainly about demarcation 
between the action and model and of no significant technical merit.


regards,
Jeromy Evans



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Struts 2: map-backed bean

2008-03-04 Thread Cheng Wei Lee
Should I be implementing ParameterAware interface instead since the
RequestAware gives me attributes instead of parameters from the form?

On Wed, Mar 5, 2008 at 1:15 AM, Ian Roughley <[EMAIL PROTECTED]> wrote:

> If you implement the RequestAware interface, the map will contain all
> the form values.
>
> /Ian
>
> --
> Ian Roughley
> From Down & Around, Inc.
> Consulting * Agile Process * Open Source
> Advanced Struts2 Workshop, April 28-30, Sunnyvale CA
> web: http://www.fdar.com - email: [EMAIL PROTECTED]
>
>
>
> Cheng Wei Lee wrote:
> > In Struts 1, we could use map-backed form beans to deal with dynamic
> forms,
> > is there something equal in Struts 2?
> >
> >
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: Struts 2: map-backed bean

2008-03-04 Thread Cheng Wei Lee
Thanks!

On Wed, Mar 5, 2008 at 2:08 AM, Dave Newton <[EMAIL PROTECTED]> wrote:

> --- Cheng Wei Lee <[EMAIL PROTECTED]> wrote:
> > What I was thinking of doing, is to prefix the components at the JSP
> such
> > that I can pick them up at action classes by iterating. Suppose I've 5
> > textfields that makes up a Person object, and the user dynamically adds
> 5
> > Persons at the JSP and submits, what I would do at my action class is to
> > loop through, and create a Person object through each set of 5
> textfields.
> >
> > What do you think of my approach? Or there's a better or more elegant
> way
> > of doing things?
>
> Type conversion [1].
>
> Nutshell version--
>
> Form:
> people[0].name, people[0].email...
> people[1].name, people[1].email...
>
> Action:
> List _people;
>
> The framework does the conversion for you.
>
> Dave
>
> [1] http://struts.apache.org/2.x/docs/type-conversion.html
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: problem compiling HelloWorldTest.java

2008-03-04 Thread Kimberly Begley
Thanks!

On Wed, Mar 5, 2008 at 11:19 AM, Dave Newton <[EMAIL PROTECTED]> wrote:

> --- Kimberly Begley <[EMAIL PROTECTED]> wrote:
> > javac -d . HelloWorldTest.java
> > --
> > 1. ERROR in HelloWorldTest.java (at line 9)
> > HelloWorld hello_world = new HelloWorld();
> > ^^
> > HelloWorld cannot be resolved to a type
> > --
> > 2. ERROR in HelloWorldTest.java (at line 9)
> > HelloWorld hello_world = new HelloWorld();
> >  ^^
> > HelloWorld cannot be resolved to a type
> > --
> > 3. ERROR in HelloWorldTest.java (at line 16)
> > HelloWorld.MESSAGE.equals(hello_world.getMessage()));
> > ^^
> > HelloWorld cannot be resolved
> > --
> > 3 problems (3 errors)
> >
> > I'm not sure if the errors are related to the warning I got about
> > HelloWorld.java - any suggestions?
>
> HelloWorld is not on your classpath when you're compiling HelloWorldTest.
> The
> serialization warning is not related to that compilation problem.
>
> Dave
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Kimberly Begley


Re: problem compiling HelloWorldTest.java

2008-03-04 Thread Dave Newton
--- Kimberly Begley <[EMAIL PROTECTED]> wrote:
> javac -d . HelloWorldTest.java
> --
> 1. ERROR in HelloWorldTest.java (at line 9)
> HelloWorld hello_world = new HelloWorld();
> ^^
> HelloWorld cannot be resolved to a type
> --
> 2. ERROR in HelloWorldTest.java (at line 9)
> HelloWorld hello_world = new HelloWorld();
>  ^^
> HelloWorld cannot be resolved to a type
> --
> 3. ERROR in HelloWorldTest.java (at line 16)
> HelloWorld.MESSAGE.equals(hello_world.getMessage()));
> ^^
> HelloWorld cannot be resolved
> --
> 3 problems (3 errors)
> 
> I'm not sure if the errors are related to the warning I got about
> HelloWorld.java - any suggestions?

HelloWorld is not on your classpath when you're compiling HelloWorldTest. The
serialization warning is not related to that compilation problem.

Dave



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



problem compiling HelloWorldTest.java

2008-03-04 Thread Kimberly Begley
Hello,
I'm going through the struts2 bootstrap/HelloWorld tutorial and am having
some problems.
When I compile HelloWorld. java  I get the this warning:

 javac -d . HelloWorld.java
--
1. WARNING in HelloWorld.java (at line 3)
public class HelloWorld extends ActionSupport {
 ^^
The serializable class HelloWorld does not declare a static final
serialVersionUID field of type long


and then when I compile HelloWorldTest.java I get these errors:

javac -d . HelloWorldTest.java
--
1. ERROR in HelloWorldTest.java (at line 9)
HelloWorld hello_world = new HelloWorld();
^^
HelloWorld cannot be resolved to a type
--
2. ERROR in HelloWorldTest.java (at line 9)
HelloWorld hello_world = new HelloWorld();
 ^^
HelloWorld cannot be resolved to a type
--
3. ERROR in HelloWorldTest.java (at line 16)
HelloWorld.MESSAGE.equals(hello_world.getMessage()));
^^
HelloWorld cannot be resolved
--
3 problems (3 errors)

I'm not sure if the errors are related to the warning I got about
HelloWorld.java - any suggestions?
Thanks
--


Re: Package extends

2008-03-04 Thread stanlick
Thanks Wes --

I have a dozen (or so) namespaces that each extend a base name.  My base
package does some "standard" tasks, one of which is establishing a custom
interceptor stack that is designated as the default.  A newly added
sub-package was failing to behave and it extended the base AND also a couple
plug-ins.  The config-browser revealed the problem!  One of the plug-ins was
replacing my inherited custom interceptor stack with its own.

Scott



On Tue, Mar 4, 2008 at 3:25 PM, Martin Gainty <[EMAIL PROTECTED]> wrote:

> first and foremost read the doc available at
> http://struts.apache.org/2.x/docs/package-configuration.html
> note that packages define groupings of actions, results, result types,
> interceptors, and interceptor-stacks
> and yes one package can extend another package by specifying
> extends="base_package"
> Not sure why you would want to extend multiple packages (note the use of
> keyword extends vs implements)
> so in the example of
> 
> states every action,result,resultType,interceptor and Interceptor-stack
> from
> base-package "bar" will be made available to new package "fu"
> perhaps you are introducing differing namespaces and causing a mismatch?
>
> provided we're not seeing anything company proprietary can we see the
> struts.xml declaration for both packages?
>
> ?
> Martin-
> - Original Message -
> From: <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" 
> Sent: Tuesday, March 04, 2008 3:15 PM
> Subject: Re: Package extends
>
>
> > Does anyone know what the expectations are given this scenario?  All I
> hear
> > are crickets...
> >
> > On Mon, Mar 3, 2008 at 8:12 PM, <[EMAIL PROTECTED]> wrote:
> >
> > > config-browser doesn't deserve to be exposed to the binary mess I have
> > > created!  I have refactored this Struts 2 application into oblivion.
>  If
> > > package D extends packages A, B, and C and package A has a custom
> > > default-interceptor defined, shouldn't package D inherit this stack?
>  I
> am
> > > having to duplicate the stack creation from package A inside package
> D!
> I
> > > think the only way to stop the decline of this application is to close
> the
> > > lid on my laptop and focus on the Kansas v. Texas Tech game.  Have you
> ever
> > > "improved" code so much that you ended up where you began?
> > >
> > > Peace,
> > > Scott
> > >
> > >
> > > On Mon, Mar 3, 2008 at 7:40 PM, Wes Wannemacher <[EMAIL PROTECTED]>
> wrote:
> > >
> > > > Scott,
> > > >
> > > > Would it help if you dropped the config-browser into the app and saw
> how
> > > > badly you have it mangled ;)
> > > >
> > > > -Wes
> > > >
> > > > On Mon, 2008-03-03 at 18:58 -0600, [EMAIL PROTECTED] wrote:
> > > > > I am knee deep in a problem where I have looked at it so long that
> I
> > > > am
> > > > > nearly wrapped around the axle.  Before I get into the gory
> details,
> > > > what
> > > > > does a package extend when it specifies the extends attribute
> followed
> > > > by
> > > > > multiple coma separated packages?  I am chiefly interested in a
> > > > > default-interceptor-ref that might have been established in only
> one
> > > > > "parent."  Should this be the stack the child adopts?  I'll stop
> here
> > > > before
> > > > > blathering on about my mess.
> > > > >
> > > >
> > > >
> > > >
> -
> > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > >
> > > >
> > >
> > >
> > > --
> > > Scott
> > > [EMAIL PROTECTED]
> >
> >
> >
> >
> > --
> > Scott
> > [EMAIL PROTECTED]
> >
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Scott
[EMAIL PROTECTED]


RE: Index.jsp hit 20 times and fails with "The page isn't redirecting properly"

2008-03-04 Thread Karr, David
Note that the "index.jsp" at the root of the webapp looks like this:

<% response.sendRedirect("index.action"); %>

The action that this refers to is:

  
/jsp/index.jsp
  

For some reason, instead of going to "/jsp/index.jsp", it appears to be
trying to serve "/index.jsp", which seems to be what causes the infinite
loop.

Martin Gainty pointed out to me that I was missing the "actionPackages"
init-param.  I fixed that, but that only made it so that it made it into
my "index" action class, 20 times before failing.

I tried enabling "devMode" in the struts.properties file and sending
"?debug=console" to my URL, but that didn't appear to give me any
additional info anywhere.

> -Original Message-
> From: Karr, David 
> Sent: Tuesday, March 04, 2008 12:37 PM
> To: Struts Users Mailing List
> Subject: Index.jsp hit 20 times and fails with "The page 
> isn't redirecting properly"
> 
> I'm trying to piece together the app described in chapter 2 
> from the Practical Apache Struts book (just from the soure 
> code zip).  I have
> Struts2.0.11 and Tomcat 6.0.14.
> 
> After I got to the point where it appeared to deploy without 
> errors, when I execute the URL, the browser returns "The page 
> isn't redirecting properly".  I put a print statement at the 
> root "index.jsp" which shows that "index.jsp" is getting hit 
> 20 times on initial entry, before I get the "The page isn't 
> redirecting properly" error.  It never got into any of my action code.
> 
> What could I be doing wrong?
> 
> If it helps, I'll attach my web.xml and struts.xml.
> 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: howto 'transfer' a URL parameter to an interceptor (eg resourceID=44) pic included

2008-03-04 Thread Nils-Helge Garli Hegvik
I don't think you can even do it that way. It's easier to just access
the parameter map from the ActionInvocation and ActionContext in the
interceptor.

http://www.opensymphony.com/xwork/api/com/opensymphony/xwork2/interceptor/Interceptor.html#intercept(com.opensymphony.xwork2.ActionInvocation)
http://www.opensymphony.com/xwork/api/com/opensymphony/xwork2/ActionInvocation.html#getInvocationContext()
http://www.opensymphony.com/xwork/api/com/opensymphony/xwork2/ActionContext.html#getParameters()

Nils-H


On Tue, Mar 4, 2008 at 7:53 PM, xianwinwin <[EMAIL PROTECTED]> wrote:
>
>  Hi all,
>
>  I'm trying to create an AuthorizationInterceptor.
>
>  consider the following scenario: The user clicks on any link and the the
>  link has resourceID
>
>  eg: doSomthig_update.do?resourceID=44
>
>
>  I would like to transfer the resouceID to my interceptor in order to verify
>  if the user is entitle to view resourceID=44.
>
>
>  http://www.nabble.com/file/p15834496/2003747819598530439_fs.jpg
>
>
>  THANKS for any pointers!
>  --
>  View this message in context: 
> http://www.nabble.com/howto-%27transfer%27-a-URL-parameter-to-an-interceptor-%28eg-resourceID%3D44%29-pic-included-tp15834496p15834496.html
>  Sent from the Struts - User mailing list archive at Nabble.com.
>
>
>  -
>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Package extends

2008-03-04 Thread Martin Gainty
first and foremost read the doc available at
http://struts.apache.org/2.x/docs/package-configuration.html
note that packages define groupings of actions, results, result types,
interceptors, and interceptor-stacks
and yes one package can extend another package by specifying
extends="base_package"
Not sure why you would want to extend multiple packages (note the use of
keyword extends vs implements)
so in the example of

states every action,result,resultType,interceptor and Interceptor-stack from
base-package "bar" will be made available to new package "fu"
perhaps you are introducing differing namespaces and causing a mismatch?

provided we're not seeing anything company proprietary can we see the
struts.xml declaration for both packages?

?
Martin-
- Original Message -
From: <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" 
Sent: Tuesday, March 04, 2008 3:15 PM
Subject: Re: Package extends


> Does anyone know what the expectations are given this scenario?  All I
hear
> are crickets...
>
> On Mon, Mar 3, 2008 at 8:12 PM, <[EMAIL PROTECTED]> wrote:
>
> > config-browser doesn't deserve to be exposed to the binary mess I have
> > created!  I have refactored this Struts 2 application into oblivion.  If
> > package D extends packages A, B, and C and package A has a custom
> > default-interceptor defined, shouldn't package D inherit this stack?  I
am
> > having to duplicate the stack creation from package A inside package D!
I
> > think the only way to stop the decline of this application is to close
the
> > lid on my laptop and focus on the Kansas v. Texas Tech game.  Have you
ever
> > "improved" code so much that you ended up where you began?
> >
> > Peace,
> > Scott
> >
> >
> > On Mon, Mar 3, 2008 at 7:40 PM, Wes Wannemacher <[EMAIL PROTECTED]> wrote:
> >
> > > Scott,
> > >
> > > Would it help if you dropped the config-browser into the app and saw
how
> > > badly you have it mangled ;)
> > >
> > > -Wes
> > >
> > > On Mon, 2008-03-03 at 18:58 -0600, [EMAIL PROTECTED] wrote:
> > > > I am knee deep in a problem where I have looked at it so long that I
> > > am
> > > > nearly wrapped around the axle.  Before I get into the gory details,
> > > what
> > > > does a package extend when it specifies the extends attribute
followed
> > > by
> > > > multiple coma separated packages?  I am chiefly interested in a
> > > > default-interceptor-ref that might have been established in only one
> > > > "parent."  Should this be the stack the child adopts?  I'll stop
here
> > > before
> > > > blathering on about my mess.
> > > >
> > >
> > >
> > > -
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > >
> >
> >
> > --
> > Scott
> > [EMAIL PROTECTED]
>
>
>
>
> --
> Scott
> [EMAIL PROTECTED]
>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Package extends

2008-03-04 Thread Wes Wannemacher
Scott, I looked on the wiki, and it doesn't get real specific. I would
load up config-browser as well as looking through the XWork2 code to
see how it should work. If you get it figured out, let me know, or
leave a comment on the wiki so that we can update the docs in case
someone else finds themselves up the same creek.

-Wes

On 3/4/08, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> Does anyone know what the expectations are given this scenario?  All I hear
>  are crickets...
>
>
>  On Mon, Mar 3, 2008 at 8:12 PM, <[EMAIL PROTECTED]> wrote:
>
>  > config-browser doesn't deserve to be exposed to the binary mess I have
>  > created!  I have refactored this Struts 2 application into oblivion.  If
>  > package D extends packages A, B, and C and package A has a custom
>  > default-interceptor defined, shouldn't package D inherit this stack?  I am
>  > having to duplicate the stack creation from package A inside package D!  I
>  > think the only way to stop the decline of this application is to close the
>  > lid on my laptop and focus on the Kansas v. Texas Tech game.  Have you ever
>  > "improved" code so much that you ended up where you began?
>  >
>  > Peace,
>  > Scott
>  >
>  >
>  > On Mon, Mar 3, 2008 at 7:40 PM, Wes Wannemacher <[EMAIL PROTECTED]> wrote:
>  >
>  > > Scott,
>  > >
>  > > Would it help if you dropped the config-browser into the app and saw how
>  > > badly you have it mangled ;)
>  > >
>  > > -Wes
>  > >
>  > > On Mon, 2008-03-03 at 18:58 -0600, [EMAIL PROTECTED] wrote:
>  > > > I am knee deep in a problem where I have looked at it so long that I
>  > > am
>  > > > nearly wrapped around the axle.  Before I get into the gory details,
>  > > what
>  > > > does a package extend when it specifies the extends attribute followed
>  > > by
>  > > > multiple coma separated packages?  I am chiefly interested in a
>  > > > default-interceptor-ref that might have been established in only one
>  > > > "parent."  Should this be the stack the child adopts?  I'll stop here
>  > > before
>  > > > blathering on about my mess.
>  > > >
>  > >
>  > >
>  > > -
>  > > To unsubscribe, e-mail: [EMAIL PROTECTED]
>  > > For additional commands, e-mail: [EMAIL PROTECTED]
>  > >
>  > >
>  >
>  >
>  > --
>  > Scott
>  > [EMAIL PROTECTED]
>
>
>
>
>
> --
>  Scott
>  [EMAIL PROTECTED]
>


-- 
Wesley Wannemacher
President, Head Engineer/Consultant
WanTii, Inc.
http://www.wantii.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Index.jsp hit 20 times and fails with "The page isn't redirecting properly"

2008-03-04 Thread Karr, David
I'm trying to piece together the app described in chapter 2 from the
Practical Apache Struts book (just from the soure code zip).  I have
Struts2.0.11 and Tomcat 6.0.14.

After I got to the point where it appeared to deploy without errors,
when I execute the URL, the browser returns "The page isn't redirecting
properly".  I put a print statement at the root "index.jsp" which shows
that "index.jsp" is getting hit 20 times on initial entry, before I get
the "The page isn't redirecting properly" error.  It never got into any
of my action code.

What could I be doing wrong?

If it helps, I'll attach my web.xml and struts.xml.


http://java.sun.com/xml/ns/j2ee"; 
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
 xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd";>
	
	Struts 2 - Maven Archetype - Starter
	
	
		contextConfigLocation
		classpath*:applicationContext*.xml
	
	
	
	
action2-cleanup
org.apache.struts2.dispatcher.ActionContextCleanUp


sitemesh
com.opensymphony.module.sitemesh.filter.PageFilter


action2
org.apache.struts2.dispatcher.FilterDispatcher

	
	
action2-cleanup
/*


sitemesh
/*


action2
/*

	
	
	
org.springframework.web.context.ContextLoaderListener





dwr
uk.ltd.getahead.dwr.DWRServlet

debug
true



	jspSupportServlet
	org.apache.struts2.views.JspSupportServlet
	5



dwr
/dwr/*





index.jsp
default.jsp
index.html





http://struts.apache.org/dtds/struts-2.0.dtd";>


	
		
			/jsp/index.jsp
		
		 
			/jsp/index.jsp
			/jsp/helloWorld.jsp
		
	

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Re: Package extends

2008-03-04 Thread stanlick
Does anyone know what the expectations are given this scenario?  All I hear
are crickets...

On Mon, Mar 3, 2008 at 8:12 PM, <[EMAIL PROTECTED]> wrote:

> config-browser doesn't deserve to be exposed to the binary mess I have
> created!  I have refactored this Struts 2 application into oblivion.  If
> package D extends packages A, B, and C and package A has a custom
> default-interceptor defined, shouldn't package D inherit this stack?  I am
> having to duplicate the stack creation from package A inside package D!  I
> think the only way to stop the decline of this application is to close the
> lid on my laptop and focus on the Kansas v. Texas Tech game.  Have you ever
> "improved" code so much that you ended up where you began?
>
> Peace,
> Scott
>
>
> On Mon, Mar 3, 2008 at 7:40 PM, Wes Wannemacher <[EMAIL PROTECTED]> wrote:
>
> > Scott,
> >
> > Would it help if you dropped the config-browser into the app and saw how
> > badly you have it mangled ;)
> >
> > -Wes
> >
> > On Mon, 2008-03-03 at 18:58 -0600, [EMAIL PROTECTED] wrote:
> > > I am knee deep in a problem where I have looked at it so long that I
> > am
> > > nearly wrapped around the axle.  Before I get into the gory details,
> > what
> > > does a package extend when it specifies the extends attribute followed
> > by
> > > multiple coma separated packages?  I am chiefly interested in a
> > > default-interceptor-ref that might have been established in only one
> > > "parent."  Should this be the stack the child adopts?  I'll stop here
> > before
> > > blathering on about my mess.
> > >
> >
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
>
> --
> Scott
> [EMAIL PROTECTED]




-- 
Scott
[EMAIL PROTECTED]


Re: get the Locale from Action[S2]

2008-03-04 Thread Adam Gordon
dumb question, but does that return the locale of the user or the locale 
of the server on which the web app is running?  if the former, how does 
it determine the user's locale?  thanks.


--adam

aj2r wrote:

slideharmony wrote:
  

Hello,
anybody knows how can I get the client machine's Locale from my action
struts 2?
any help would be apprecciated.
Riccardo




Your action must extend com.opensymphony.xwork2.ActionSupport and then you
can use getLocale()
  


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



howto 'transfer' a URL parameter to an interceptor (eg resourceID=44) pic included

2008-03-04 Thread xianwinwin

Hi all,

I'm trying to create an AuthorizationInterceptor. 

consider the following scenario: The user clicks on any link and the the
link has resourceID 

eg: doSomthig_update.do?resourceID=44


I would like to transfer the resouceID to my interceptor in order to verify
if the user is entitle to view resourceID=44.

   
http://www.nabble.com/file/p15834496/2003747819598530439_fs.jpg 


THANKS for any pointers!
-- 
View this message in context: 
http://www.nabble.com/howto-%27transfer%27-a-URL-parameter-to-an-interceptor-%28eg-resourceID%3D44%29-pic-included-tp15834496p15834496.html
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: --help

2008-03-04 Thread Antonio Petrelli
2008/3/4, Martin Gainty <[EMAIL PROTECTED]>:
> anything in particular you're looking for help on?

Probably he/she typed:
struts --help
and strangely the last part of the command finished in an e-mail :-)

Antonio

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Conversation Scope?

2008-03-04 Thread Roberto Nunnari

Yes.. that's probably where my confusion/misunderstanding came from.

Thank you both and best regards.

--
Robi


Dave Newton wrote:

--- Martin Gainty <[EMAIL PROTECTED]> wrote:


looking at the doc for ModelDriven


http://www.opensymphony.com/xwork/api/com/opensymphony/xwork/ModelDriven.htm

l
we see the method
Object getModel()
Returns:
the model to be pushed onto the ValueStack instead of the Action itself


It also says

"ModelDriven Actions provide a model object to be pushed onto the ValueStack
in addition to the Action itself, allowing a FormBean type approach like
Struts."

Dave


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Struts 2: map-backed bean

2008-03-04 Thread Dave Newton
--- Cheng Wei Lee <[EMAIL PROTECTED]> wrote:
> What I was thinking of doing, is to prefix the components at the JSP such
> that I can pick them up at action classes by iterating. Suppose I've 5
> textfields that makes up a Person object, and the user dynamically adds 5
> Persons at the JSP and submits, what I would do at my action class is to
> loop through, and create a Person object through each set of 5 textfields.
> 
> What do you think of my approach? Or there's a better or more elegant way
> of doing things?

Type conversion [1].

Nutshell version--

Form:
people[0].name, people[0].email...
people[1].name, people[1].email...

Action:
List _people;

The framework does the conversion for you.

Dave

[1] http://struts.apache.org/2.x/docs/type-conversion.html


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Conversation Scope?

2008-03-04 Thread Dave Newton
--- Martin Gainty <[EMAIL PROTECTED]> wrote:

> looking at the doc for ModelDriven
>
http://www.opensymphony.com/xwork/api/com/opensymphony/xwork/ModelDriven.htm
> l
> we see the method
> Object getModel()
> Returns:
> the model to be pushed onto the ValueStack instead of the Action itself

It also says

"ModelDriven Actions provide a model object to be pushed onto the ValueStack
in addition to the Action itself, allowing a FormBean type approach like
Struts."

Dave


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Struts 2: map-backed bean

2008-03-04 Thread Cheng Wei Lee
What I was thinking of doing, is to prefix the components at the JSP such
that I can pick them up at action classes by iterating. Suppose I've 5
textfields that makes up a Person object, and the user dynamically adds 5
Persons at the JSP and submits, what I would do at my action class is to
loop through, and create a Person object through each set of 5 textfields.

What do you think of my approach? Or there's a better or more elegant way of
doing things?

Thanks!

On Wed, Mar 5, 2008 at 1:58 AM, Dave Newton <[EMAIL PROTECTED]> wrote:

> --- Cheng Wei Lee <[EMAIL PROTECTED]> wrote:
> > Suppose I use JavaScript to allow user to dynamically adds the number of
> > textboxes in the form, then submit. Would implementing RequestAware
> help?
> > Do I have to create the variables and getters/setters in advance at the
> > action class?
>
> You may also use array notation in situations like this, particularly when
> it's a collection of identical types, like Strings, or a "Person" object,
> etc. It can save a lot of boring code.
>
> Dave
>
> > On Wed, Mar 5, 2008 at 1:15 AM, Ian Roughley <[EMAIL PROTECTED]> wrote:
> > > If you implement the RequestAware interface, the map will contain all
> > > the form values.
> > >
> > > Cheng Wei Lee wrote:
> > > > In Struts 1, we could use map-backed form beans to deal with dynamic
> > > forms, is there something equal in Struts 2?
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: Conversation Scope?

2008-03-04 Thread Martin Gainty
looking at the doc for ModelDriven
http://www.opensymphony.com/xwork/api/com/opensymphony/xwork/ModelDriven.htm
l
we see the method
Object getModel()
Returns:
the model to be pushed onto the ValueStack instead of the Action itself

we can now use OGNL to access the model object -without worries about
transfer via dTO and or unsynched map merges

  http://struts.apache.org/2.x/docs/ognl-basics.html

  When it makes sense to scan for company proprietary code can you publish
your conversation interceptor?

  Make Sense?
  M--
- Original Message -
From: "Gabriel Belingueres" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" 
Sent: Tuesday, March 04, 2008 11:49 AM
Subject: Re: Conversation Scope?


> Well at this point I'm not proposing nothing in particular, just
> trying to understand the rationale behind this relation between
> conversation scope and model driven, which is not clear to me why it
> is designed this way.
>
> I thought that a possible explanation would be to keep the view (JSP)
> pages unaware of the scope of the variables it uses but honesty I'm
> not fully convinced of the gain I can achieve with this practice.
>
> I've developed a conversation scope interceptor I'm using in my
> projects and I don't use modelDriven interface.
>
> ModelDriven interface is (IMHO) uncomfortable because it is designed
> to return only one object for use in the view, which IMO is
> unrealistic but in the simplest use cases. In addition, if you want to
> use several objects in the view, it forces to either create a DTO (not
> good) to reunite all data or using a Map with domain objects but in
> either case you end up with something not very different to not using
> model-driven.
>
> 2008/3/4, Martin Gainty <[EMAIL PROTECTED]>:
> > Hi Gabriel-
> >
> > are your proposing an enhancement to s:head as i think this concept is
> > already covered by s:head which sets up global attributes?
> > http://struts.apache.org/2.0.6/docs/head.html
> >
> > or a separate "s:conversation" tag ?
> >
> > M-
> > - Original Message -
> > From: "Gabriel Belingueres" <[EMAIL PROTECTED]>
> > To: "Struts Users Mailing List" 
> > Sent: Tuesday, March 04, 2008 8:00 AM
> > Subject: Re: Conversation Scope?
> >
> >
> > > Why model-driven? I don't fully get it.
> > > I've done several S2 apps by now and never fell the time to use the
> > > model driven interface before (for me this is syntax sugar.)
> > >
> > > Now why is this important for supporting conversation scope?
> > > Is it for not writing code like
> > > ${conversationsMap[conversationId].myproperty} in the view? it is easy
> > > to create a tag that inject the conversation into a request-scoped
> > > variable like this:
> > > 
> > >
> > > then use ${myconversation.myproperty}
> > >
> > > Gabriel
> > >
> > > 2008/2/24, Jeromy Evans <[EMAIL PROTECTED]>:
> > > > I hadn't noticed this was already part of the 2.1.x core and default
> > stack:
> > > >
> > > >
http://struts.apache.org/2.x/docs/scoped-model-driven-interceptor.html.
> > > >
> > > > I haven't checked the code but it reads the same
> > > >
> > > > Ray Clough wrote:
> > > > > I'm definitely going to have to watch the 'ranting'.   (By the
way,
> > > > > Adam, you have to stop grappling with SWF when you get married.)
> > > > >
> > > > > It seems to me that 'ModelDriven' is not much use without
> > > > > ConversationScope, because you have to manually manage the
> > > > > model/session interaction in all but the first action in the
> > > > > conversation.  What I'm talking about with the term
> > > > > 'ConversationScope' is the need not to have to explicitly store,
> > > > > check, and remove my model data from the session in each action.
> > > > > Basically my action always looks like this:
> > > > >
> > > > >   1. check session for model.
> > > > >   2. if found, is model for the current conversation
> > > > >  * if no delete the model from the session, create new
model
> > > > >and place in session.
> > > > >  * if yes place it into the Action's private variable
> > > > >   3. .. whatever the action does ...
> > > > >   4. is the conversation finished?
> > > > >  * if no, make sure model is in session
> > > > >  * if yes, remove model from session
> > > > >
> > > > > This seems like a pretty straight-forward use case for an
> > > > > interceptor.  I'm thinking of a small object called
> > > > > "ConversationScope", which, of course, has to be stored in the
> > > > > session. The ConversationScope obj contains a map and a method to
> > > > > return its ConversationId, and methods to add and remove objects
from
> > > > > its map.  The interceptor could  do to the ConversationScope the
> > > > > actions which the Action currently does, as delineated above.  It
> > > > > might be nice to inject the ConversationScope into the action, but
I
> > > > > don't personally know injection well enough to do that.  A full
> > > > > solution with injection should h

Struts 2: Creating custom JavaBeans from request parameters (not in action class)

2008-03-04 Thread Cheng Wei Lee
I know I can get the values of the request parameters in the action class
and then use them to instantiate an object. Read from the API for
ParameterAware interface, "One common use for this is to have the action
propagate parameters to internally instantiated data objects.". Does this
means that Struts 2 can do it for us if we implement some interfaces or use
some interceptors? That is, I don't need to create the object in my own
action class?


Re: Struts 2: map-backed bean

2008-03-04 Thread Dave Newton
--- Cheng Wei Lee <[EMAIL PROTECTED]> wrote:
> Suppose I use JavaScript to allow user to dynamically adds the number of
> textboxes in the form, then submit. Would implementing RequestAware help?
> Do I have to create the variables and getters/setters in advance at the 
> action class?

You may also use array notation in situations like this, particularly when
it's a collection of identical types, like Strings, or a "Person" object,
etc. It can save a lot of boring code.

Dave

> On Wed, Mar 5, 2008 at 1:15 AM, Ian Roughley <[EMAIL PROTECTED]> wrote:
> > If you implement the RequestAware interface, the map will contain all
> > the form values.
> >
> > Cheng Wei Lee wrote:
> > > In Struts 1, we could use map-backed form beans to deal with dynamic
> > forms, is there something equal in Struts 2?


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Conversation Scope?

2008-03-04 Thread Dave Newton
AFAIK the model is pushed onto the stack *in addition* to the action.

I don't know of anywhere in the docs where it states that the action would be
unavailable.

Dave

--- Roberto Nunnari <[EMAIL PROTECTED]> wrote:

> Hi.
> 
> About the ModelDriven interface.. I believe I'd read somewhere
> that when you implement it, your view looses access to the action..
> 
> ..but using it I found out that if the method/property is not
> found in the model, then at some point the action is searched
> for it.. so with that in mind, you can access multiple objects
> from your view.
> 
> But now I doubt that if the doc somewhere says that the action
> will not be accessible when implementing the ModelDriven interface,
> someday updating my webapp to a newer version of S2 I'd meet
> a bad surprise..
> 
> any thoughts here?
> 
> Robi
> 
> 
> Gabriel Belingueres wrote:
> > Well at this point I'm not proposing nothing in particular, just
> > trying to understand the rationale behind this relation between
> > conversation scope and model driven, which is not clear to me why it
> > is designed this way.
> > 
> > I thought that a possible explanation would be to keep the view (JSP)
> > pages unaware of the scope of the variables it uses but honesty I'm
> > not fully convinced of the gain I can achieve with this practice.
> > 
> > I've developed a conversation scope interceptor I'm using in my
> > projects and I don't use modelDriven interface.
> > 
> > ModelDriven interface is (IMHO) uncomfortable because it is designed
> > to return only one object for use in the view, which IMO is
> > unrealistic but in the simplest use cases. In addition, if you want to
> > use several objects in the view, it forces to either create a DTO (not
> > good) to reunite all data or using a Map with domain objects but in
> > either case you end up with something not very different to not using
> > model-driven.
> > 
> > 2008/3/4, Martin Gainty <[EMAIL PROTECTED]>:
> >> Hi Gabriel-
> >>
> >> are your proposing an enhancement to s:head as i think this concept is
> >> already covered by s:head which sets up global attributes?
> >> http://struts.apache.org/2.0.6/docs/head.html
> >>
> >> or a separate "s:conversation" tag ?
> >>
> >> M-
> >> - Original Message -
> >> From: "Gabriel Belingueres" <[EMAIL PROTECTED]>
> >> To: "Struts Users Mailing List" 
> >> Sent: Tuesday, March 04, 2008 8:00 AM
> >> Subject: Re: Conversation Scope?
> >>
> >>
> >>> Why model-driven? I don't fully get it.
> >>> I've done several S2 apps by now and never fell the time to use the
> >>> model driven interface before (for me this is syntax sugar.)
> >>>
> >>> Now why is this important for supporting conversation scope?
> >>> Is it for not writing code like
> >>> ${conversationsMap[conversationId].myproperty} in the view? it is easy
> >>> to create a tag that inject the conversation into a request-scoped
> >>> variable like this:
> >>> 
> >>>
> >>> then use ${myconversation.myproperty}
> >>>
> >>> Gabriel
> >>>
> >>> 2008/2/24, Jeromy Evans <[EMAIL PROTECTED]>:
>  I hadn't noticed this was already part of the 2.1.x core and default
> >> stack:
> 
> http://struts.apache.org/2.x/docs/scoped-model-driven-interceptor.html.
> 
>  I haven't checked the code but it reads the same
> 
>  Ray Clough wrote:
> > I'm definitely going to have to watch the 'ranting'.   (By the way,
> > Adam, you have to stop grappling with SWF when you get married.)
> >
> > It seems to me that 'ModelDriven' is not much use without
> > ConversationScope, because you have to manually manage the
> > model/session interaction in all but the first action in the
> > conversation.  What I'm talking about with the term
> > 'ConversationScope' is the need not to have to explicitly store,
> > check, and remove my model data from the session in each action.
> > Basically my action always looks like this:
> >
> >   1. check session for model.
> >   2. if found, is model for the current conversation
> >  * if no delete the model from the session, create new model
> >and place in session.
> >  * if yes place it into the Action's private variable
> >   3. .. whatever the action does ...
> >   4. is the conversation finished?
> >  * if no, make sure model is in session
> >  * if yes, remove model from session
> >
> > This seems like a pretty straight-forward use case for an
> > interceptor.  I'm thinking of a small object called
> > "ConversationScope", which, of course, has to be stored in the
> > session. The ConversationScope obj contains a map and a method to
> > return its ConversationId, and methods to add and remove objects from
> > its map.  The interceptor could  do to the ConversationScope the
> > actions which the Action currently does, as delineated above.  It
> > might be nice to inject the ConversationScope into th

Struts 1 Plugin for Grails Released

2008-03-04 Thread graemer

Hi all,

We've released a plug-in that lets you run Struts apps within Grails. The
announcement is here:

http://docs.codehaus.org/display/GRAILS/2008/03/04/Struts+1+Plug-in+for+Grails+Released

Further info here: http://docs.codehaus.org/display/GRAILS/Struts+1+Plugin


The advantage for struts developers is you can use Groovy and Grails'
advanced features like GORM and the plugin system.

Feedback welcome

Graeme
-- 
View this message in context: 
http://www.nabble.com/Struts-1-Plugin-for-Grails-Released-tp15832738p15832738.html
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Struts 2: map-backed bean

2008-03-04 Thread Cheng Wei Lee
Ok, silly me, the setRequest method would set all request parameters into
the map, which I could then extract and use the values. Thanks for pointing
out this. Should have read the APIs more carefully.

On Wed, Mar 5, 2008 at 1:22 AM, Cheng Wei Lee <[EMAIL PROTECTED]> wrote:

> Suppose I use JavaScript to allow user to dynamically adds the number of
> textboxes in the form, then submit. Would implementing RequestAware help? Do
> I have to create the variables and getters/setters in advance at the action
> class?
>
>
> On Wed, Mar 5, 2008 at 1:15 AM, Ian Roughley <[EMAIL PROTECTED]> wrote:
>
> > If you implement the RequestAware interface, the map will contain all
> > the form values.
> >
> > /Ian
> >
> > --
> > Ian Roughley
> > From Down & Around, Inc.
> > Consulting * Agile Process * Open Source
> > Advanced Struts2 Workshop, April 28-30, Sunnyvale CA
> > web: http://www.fdar.com - email: [EMAIL PROTECTED]
> >
> >
> >
> > Cheng Wei Lee wrote:
> > > In Struts 1, we could use map-backed form beans to deal with dynamic
> > forms,
> > > is there something equal in Struts 2?
> > >
> > >
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>


Re: Struts 2: map-backed bean

2008-03-04 Thread Cheng Wei Lee
Suppose I use JavaScript to allow user to dynamically adds the number of
textboxes in the form, then submit. Would implementing RequestAware help? Do
I have to create the variables and getters/setters in advance at the action
class?

On Wed, Mar 5, 2008 at 1:15 AM, Ian Roughley <[EMAIL PROTECTED]> wrote:

> If you implement the RequestAware interface, the map will contain all
> the form values.
>
> /Ian
>
> --
> Ian Roughley
> From Down & Around, Inc.
> Consulting * Agile Process * Open Source
> Advanced Struts2 Workshop, April 28-30, Sunnyvale CA
> web: http://www.fdar.com - email: [EMAIL PROTECTED]
>
>
>
> Cheng Wei Lee wrote:
> > In Struts 1, we could use map-backed form beans to deal with dynamic
> forms,
> > is there something equal in Struts 2?
> >
> >
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: Struts 2: map-backed bean

2008-03-04 Thread Ian Roughley
If you implement the RequestAware interface, the map will contain all 
the form values.


/Ian

--
Ian Roughley

From Down & Around, Inc.

Consulting * Agile Process * Open Source
Advanced Struts2 Workshop, April 28-30, Sunnyvale CA
web: http://www.fdar.com - email: [EMAIL PROTECTED]



Cheng Wei Lee wrote:

In Struts 1, we could use map-backed form beans to deal with dynamic forms,
is there something equal in Struts 2?

  


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: --help

2008-03-04 Thread Martin Gainty
anything in particular you're looking for help on?

Martin--
- Original Message - 
From: "Randall Svancara" <[EMAIL PROTECTED]>
To: 
Sent: Tuesday, March 04, 2008 11:12 AM
Subject: --help


> 
> -- 
> Randall Svancara
> Systems Administrator
> 509-335-7093
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Conversation Scope?

2008-03-04 Thread Roberto Nunnari

Hi.

About the ModelDriven interface.. I believe I'd read somewhere
that when you implement it, your view looses access to the action..

..but using it I found out that if the method/property is not
found in the model, then at some point the action is searched
for it.. so with that in mind, you can access multiple objects
from your view.

But now I doubt that if the doc somewhere says that the action
will not be accessible when implementing the ModelDriven interface,
someday updating my webapp to a newer version of S2 I'd meet
a bad surprise..

any thoughts here?

Robi


Gabriel Belingueres wrote:

Well at this point I'm not proposing nothing in particular, just
trying to understand the rationale behind this relation between
conversation scope and model driven, which is not clear to me why it
is designed this way.

I thought that a possible explanation would be to keep the view (JSP)
pages unaware of the scope of the variables it uses but honesty I'm
not fully convinced of the gain I can achieve with this practice.

I've developed a conversation scope interceptor I'm using in my
projects and I don't use modelDriven interface.

ModelDriven interface is (IMHO) uncomfortable because it is designed
to return only one object for use in the view, which IMO is
unrealistic but in the simplest use cases. In addition, if you want to
use several objects in the view, it forces to either create a DTO (not
good) to reunite all data or using a Map with domain objects but in
either case you end up with something not very different to not using
model-driven.

2008/3/4, Martin Gainty <[EMAIL PROTECTED]>:

Hi Gabriel-

are your proposing an enhancement to s:head as i think this concept is
already covered by s:head which sets up global attributes?
http://struts.apache.org/2.0.6/docs/head.html

or a separate "s:conversation" tag ?

M-
- Original Message -
From: "Gabriel Belingueres" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" 
Sent: Tuesday, March 04, 2008 8:00 AM
Subject: Re: Conversation Scope?



Why model-driven? I don't fully get it.
I've done several S2 apps by now and never fell the time to use the
model driven interface before (for me this is syntax sugar.)

Now why is this important for supporting conversation scope?
Is it for not writing code like
${conversationsMap[conversationId].myproperty} in the view? it is easy
to create a tag that inject the conversation into a request-scoped
variable like this:


then use ${myconversation.myproperty}

Gabriel

2008/2/24, Jeromy Evans <[EMAIL PROTECTED]>:

I hadn't noticed this was already part of the 2.1.x core and default

stack:

http://struts.apache.org/2.x/docs/scoped-model-driven-interceptor.html.

I haven't checked the code but it reads the same

Ray Clough wrote:

I'm definitely going to have to watch the 'ranting'.   (By the way,
Adam, you have to stop grappling with SWF when you get married.)

It seems to me that 'ModelDriven' is not much use without
ConversationScope, because you have to manually manage the
model/session interaction in all but the first action in the
conversation.  What I'm talking about with the term
'ConversationScope' is the need not to have to explicitly store,
check, and remove my model data from the session in each action.
Basically my action always looks like this:

  1. check session for model.
  2. if found, is model for the current conversation
 * if no delete the model from the session, create new model
   and place in session.
 * if yes place it into the Action's private variable
  3. .. whatever the action does ...
  4. is the conversation finished?
 * if no, make sure model is in session
 * if yes, remove model from session

This seems like a pretty straight-forward use case for an
interceptor.  I'm thinking of a small object called
"ConversationScope", which, of course, has to be stored in the
session. The ConversationScope obj contains a map and a method to
return its ConversationId, and methods to add and remove objects from
its map.  The interceptor could  do to the ConversationScope the
actions which the Action currently does, as delineated above.  It
might be nice to inject the ConversationScope into the action, but  I
don't personally know injection well enough to do that.  A full
solution with injection should have a "ConversationAware" interface
which includes a "ConversationId" attribute.  It might be better to
use annotations rather than an interface declaration.

I'm just thinking on paper here, but it doesn't seem like any massive
over-architecting is needed.  I personally have almost no experience
with Spring, and every time I touch it everything breaks.  Guice
sounds like a nicer solution, but there is not much tutorial info on

it.

Thanks,
- rc


Adam Hardy wrote:

Is it worth building a mechanism for conversation scope, compared to
the complexity it introduces? I really dislike Spring Webflow with
its conversation scope, stringent encapsulation and stora

Struts 2: map-backed bean

2008-03-04 Thread Cheng Wei Lee
In Struts 1, we could use map-backed form beans to deal with dynamic forms,
is there something equal in Struts 2?


Re: redirect-action to https

2008-03-04 Thread Nuwan Chandrasoma

Hi,

take a look at this plug-in and code, it may be helpful to you.

http://code.google.com/p/struts2-ssl-plugin/

Thanks,

Nuwan

David Loup wrote:

Hi,

 


I'm trying to have Struts 2 redirect over HTTPS protocol.

 


On submit of a form calling editPerson.action (on a page already on
HTTPS), the following redirects to HTTP. 

 






type="redirect-action">listPersons 


/pages/viewPerson.jsp



 


Is there any configuration I can add to redirect over https ?

 


Thanks




CONFIDENTIALITY - This email and any files transmitted with it, are 
confidential, may be legally privileged and are intended solely for the use of 
the individual or entity to whom they are addressed. If this has come to you in 
error, you must not copy, distribute, disclose or use any of the information it 
contains. Please notify the sender immediately and delete them from your system.

SECURITY - Please be aware that communication by email, by its very nature, is 
not 100% secure and by communicating with Perform Group by email you consent to 
us monitoring and reading any such correspondence.

VIRUSES - Although this email message has been scanned for the presence of 
computer viruses, the sender accepts no liability for any damage sustained as a 
result of a computer virus and it is the recipient’s responsibility to ensure 
that email is virus free.

AUTHORITY - Any views or opinions expressed in this email are solely those of 
the sender and do not necessarily represent those of Perform Group.

COPYRIGHT - Copyright of this email and any attachments belongs to Perform 
Group, Companies House Registration number 6324278.
  



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: application based annotations

2008-03-04 Thread Dave Newton
S2.0 doesn't have interceptor ref annotations [1]. This functionality may
have been added in S2.1; I don't recall at the moment.

Dave

[1] http://struts.apache.org/2.x/docs/annotations.html

--- [EMAIL PROTECTED] wrote:

> 
> Hi all,
> 
> I'm trying to build an application by applying ZERO configuration (only 
> annotation) pattern.
> I have some actions that have some interceptors defined inside just like 
> below:.
> 
> 
> /login.jsp
> 
> 
> 
> I would like to know if there is an action annotation feature covering 
> this case.
> 
> Is possible to build an application entirely with annotation?
> 
> Is it possible to rewrite the mailreader entirely with annotation?
> 
> Thanks in advance.
> Meissa
> 
> L'integrite de ce message n'etant pas assuree sur internet, Natixis ne peut
> etre tenu responsable de son contenu. Toute utilisation ou diffusion non
> autorisee est interdite. Si vous n'etes pas destinataire de ce message,
> merci de le detruire et d'avertir l'expediteur.
> Ensemble, faisons un geste pour l'environnement : n'imprimons nos mails que
> si necessaire
> 
> The integrity of this message cannot be guaranteed on the Internet. Natixis
> can not therefore be considered responsible for the contents. Any
> unauthorized use or dissemination is prohibited. If you are not the
> intended recipient of this message, then please delete it and notify the
> sender.
> 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Conversation Scope?

2008-03-04 Thread Gabriel Belingueres
Well at this point I'm not proposing nothing in particular, just
trying to understand the rationale behind this relation between
conversation scope and model driven, which is not clear to me why it
is designed this way.

I thought that a possible explanation would be to keep the view (JSP)
pages unaware of the scope of the variables it uses but honesty I'm
not fully convinced of the gain I can achieve with this practice.

I've developed a conversation scope interceptor I'm using in my
projects and I don't use modelDriven interface.

ModelDriven interface is (IMHO) uncomfortable because it is designed
to return only one object for use in the view, which IMO is
unrealistic but in the simplest use cases. In addition, if you want to
use several objects in the view, it forces to either create a DTO (not
good) to reunite all data or using a Map with domain objects but in
either case you end up with something not very different to not using
model-driven.

2008/3/4, Martin Gainty <[EMAIL PROTECTED]>:
> Hi Gabriel-
>
> are your proposing an enhancement to s:head as i think this concept is
> already covered by s:head which sets up global attributes?
> http://struts.apache.org/2.0.6/docs/head.html
>
> or a separate "s:conversation" tag ?
>
> M-
> - Original Message -
> From: "Gabriel Belingueres" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" 
> Sent: Tuesday, March 04, 2008 8:00 AM
> Subject: Re: Conversation Scope?
>
>
> > Why model-driven? I don't fully get it.
> > I've done several S2 apps by now and never fell the time to use the
> > model driven interface before (for me this is syntax sugar.)
> >
> > Now why is this important for supporting conversation scope?
> > Is it for not writing code like
> > ${conversationsMap[conversationId].myproperty} in the view? it is easy
> > to create a tag that inject the conversation into a request-scoped
> > variable like this:
> > 
> >
> > then use ${myconversation.myproperty}
> >
> > Gabriel
> >
> > 2008/2/24, Jeromy Evans <[EMAIL PROTECTED]>:
> > > I hadn't noticed this was already part of the 2.1.x core and default
> stack:
> > >
> > > http://struts.apache.org/2.x/docs/scoped-model-driven-interceptor.html.
> > >
> > > I haven't checked the code but it reads the same
> > >
> > > Ray Clough wrote:
> > > > I'm definitely going to have to watch the 'ranting'.   (By the way,
> > > > Adam, you have to stop grappling with SWF when you get married.)
> > > >
> > > > It seems to me that 'ModelDriven' is not much use without
> > > > ConversationScope, because you have to manually manage the
> > > > model/session interaction in all but the first action in the
> > > > conversation.  What I'm talking about with the term
> > > > 'ConversationScope' is the need not to have to explicitly store,
> > > > check, and remove my model data from the session in each action.
> > > > Basically my action always looks like this:
> > > >
> > > >   1. check session for model.
> > > >   2. if found, is model for the current conversation
> > > >  * if no delete the model from the session, create new model
> > > >and place in session.
> > > >  * if yes place it into the Action's private variable
> > > >   3. .. whatever the action does ...
> > > >   4. is the conversation finished?
> > > >  * if no, make sure model is in session
> > > >  * if yes, remove model from session
> > > >
> > > > This seems like a pretty straight-forward use case for an
> > > > interceptor.  I'm thinking of a small object called
> > > > "ConversationScope", which, of course, has to be stored in the
> > > > session. The ConversationScope obj contains a map and a method to
> > > > return its ConversationId, and methods to add and remove objects from
> > > > its map.  The interceptor could  do to the ConversationScope the
> > > > actions which the Action currently does, as delineated above.  It
> > > > might be nice to inject the ConversationScope into the action, but  I
> > > > don't personally know injection well enough to do that.  A full
> > > > solution with injection should have a "ConversationAware" interface
> > > > which includes a "ConversationId" attribute.  It might be better to
> > > > use annotations rather than an interface declaration.
> > > >
> > > > I'm just thinking on paper here, but it doesn't seem like any massive
> > > > over-architecting is needed.  I personally have almost no experience
> > > > with Spring, and every time I touch it everything breaks.  Guice
> > > > sounds like a nicer solution, but there is not much tutorial info on
> it.
> > > >
> > > > Thanks,
> > > > - rc
> > > >
> > > >
> > > > Adam Hardy wrote:
> > > >> Is it worth building a mechanism for conversation scope, compared to
> > > >> the complexity it introduces? I really dislike Spring Webflow with
> > > >> its conversation scope, stringent encapsulation and storage of
> > > >> massive amounts of data in various maps that locks away everything
> > > >> out of sight and make

Re: redirect-action to https

2008-03-04 Thread oscar perez
I don't know if struts 2 provides functionality for that but I've used acegi
for a scenario such as the one you described.

Oscar

On Tue, Mar 4, 2008 at 12:25 PM, David Loup <[EMAIL PROTECTED]>
wrote:

> Hi,
>
>
>
> I'm trying to have Struts 2 redirect over HTTPS protocol.
>
>
>
> On submit of a form calling editPerson.action (on a page already on
> HTTPS), the following redirects to HTTP.
>
>
>
>  method="update">
>
>
>
> type="redirect-action">listPersons
>
>/pages/viewPerson.jsp
>
> 
>
>
>
> Is there any configuration I can add to redirect over https ?
>
>
>
> Thanks
>
>
> 
>
> CONFIDENTIALITY - This email and any files transmitted with it, are
> confidential, may be legally privileged and are intended solely for the use
> of the individual or entity to whom they are addressed. If this has come to
> you in error, you must not copy, distribute, disclose or use any of the
> information it contains. Please notify the sender immediately and delete
> them from your system.
>
> SECURITY - Please be aware that communication by email, by its very
> nature, is not 100% secure and by communicating with Perform Group by email
> you consent to us monitoring and reading any such correspondence.
>
> VIRUSES - Although this email message has been scanned for the presence of
> computer viruses, the sender accepts no liability for any damage sustained
> as a result of a computer virus and it is the recipient's responsibility to
> ensure that email is virus free.
>
> AUTHORITY - Any views or opinions expressed in this email are solely those
> of the sender and do not necessarily represent those of Perform Group.
>
> COPYRIGHT - Copyright of this email and any attachments belongs to Perform
> Group, Companies House Registration number 6324278.


--help

2008-03-04 Thread Randall Svancara

-- 
Randall Svancara
Systems Administrator
509-335-7093


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



application based annotations

2008-03-04 Thread meissa . sakho

Hi all,

I'm trying to build an application by applying ZERO configuration (only 
annotation) pattern.
I have some actions that have some interceptors defined inside just like 
below:.


/login.jsp



I would like to know if there is an action annotation feature covering 
this case.

Is possible to build an application entirely with annotation?

Is it possible to rewrite the mailreader entirely with annotation?

Thanks in advance.
Meissa

L'integrite de ce message n'etant pas assuree sur internet, Natixis ne peut 
etre tenu responsable de son contenu. Toute utilisation ou diffusion non 
autorisee est interdite. Si vous n'etes pas destinataire de ce message, merci 
de le detruire et d'avertir l'expediteur.
Ensemble, faisons un geste pour l'environnement : n'imprimons nos mails que si 
necessaire

The integrity of this message cannot be guaranteed on the Internet. Natixis can 
not therefore be considered responsible for the contents. Any unauthorized use 
or dissemination is prohibited. If you are not the intended recipient of this 
message, then please delete it and notify the sender.


Re: Struts2 CheckBox tag inside an s:iterator

2008-03-04 Thread Skip Hollowell
The problem with this is that checkboxes only exist when they are 
checked.  If the box is not checked, nothing is sent to the form for 
that box.  Thus you are seeing information in your pre-populated data 
for those boxes that were checked when the form was submitted.  It's not 
an easy fix, and one I too am currently struggling with.


Skip Hollowell

Mano Dasanayaka-2 wrote:

Hi All,

I have a jsp where we list down some dynamic checkboxes.
for this we use s:checkbox tag inside a s:iterator ,




   
name="fullMarket" fieldValue="${entry.packageId}"
   
theme="simple" value="${fullMarket}" >










in my action class I have a string[] named fullMarket and all the 
required

getters and setters are provided there. Everything happens successfully,
when we submit the form ,,.i.e fullMarket  array comes with the selected
id's.

but as we try to pre populate this same set of checkboxes , I see all the
checkboxes  selected irrespective of the values I set in action class.

this.fullMarket =  new String[] {"3","4","5"};


Any one got an idea what's wrong with this implementation.,..,


Thanks In Advance

Regards,

Mano



-
To unsubscribe, e-mail: [EMAIL PROTECTED] 

For additional commands, e-mail: [EMAIL PROTECTED] 







-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Problem with returning SUCCESS from execute

2008-03-04 Thread aum strut
thks for the rply..
really silly i m even knowing this i did this mistake.

:)


On 3/4/08, Lukasz Lenart <[EMAIL PROTECTED]> wrote:
>
> >  *class* StrutsExample {
>
> Your class should extend ActionSupport or return Action.SUCCESS (not
> SUCCESS)
>
>
> Regards
> --
> Lukasz
>
> http://www.linkedin.com/in/lukaszlenart
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: Problem with returning SUCCESS from execute

2008-03-04 Thread Lukasz Lenart
>  *class* StrutsExample {

Your class should extend ActionSupport or return Action.SUCCESS (not SUCCESS)


Regards
-- 
Lukasz

http://www.linkedin.com/in/lukaszlenart

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Problem with returning SUCCESS from execute

2008-03-04 Thread aum strut
hi all,

i am using MyEclipse for developing struts2 based example everything is
working fine
but in my execute method when i am trying to return the SUCCESS it is giving
the error that it can not resolved error.
below is the code i have written

*

package* aum.struts.tester;
*

import* java.sql.Date;
*

import* com.opensymphony.xwork2.Action;
*

import* com.opensymphony.xwork2.ActionSupport;



*class* StrutsExample {

//private static final String SUCCESS = null;

*private* String name="null";

Date date;

*public* Date getDate() {

*return* date;

}

*public* *void* setDate(Date date) {

*this*.date = date;

}

*public* String getName() {

*return* name;

}

*public* *void* setName(String name) {

*this*.name=name;

}

*public* String execute() *throws* Exception{

*return* SUCCESS;>*here it is showing that it is not able to resolve the
error.*

}

}

Please help me find out the problem with this.



Thanks in advance

--aum


Re: Conversation Scope?

2008-03-04 Thread Martin Gainty
Hi Gabriel-

are your proposing an enhancement to s:head as i think this concept is
already covered by s:head which sets up global attributes?
http://struts.apache.org/2.0.6/docs/head.html

or a separate "s:conversation" tag ?

M-
- Original Message -
From: "Gabriel Belingueres" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" 
Sent: Tuesday, March 04, 2008 8:00 AM
Subject: Re: Conversation Scope?


> Why model-driven? I don't fully get it.
> I've done several S2 apps by now and never fell the time to use the
> model driven interface before (for me this is syntax sugar.)
>
> Now why is this important for supporting conversation scope?
> Is it for not writing code like
> ${conversationsMap[conversationId].myproperty} in the view? it is easy
> to create a tag that inject the conversation into a request-scoped
> variable like this:
> 
>
> then use ${myconversation.myproperty}
>
> Gabriel
>
> 2008/2/24, Jeromy Evans <[EMAIL PROTECTED]>:
> > I hadn't noticed this was already part of the 2.1.x core and default
stack:
> >
> > http://struts.apache.org/2.x/docs/scoped-model-driven-interceptor.html.
> >
> > I haven't checked the code but it reads the same
> >
> > Ray Clough wrote:
> > > I'm definitely going to have to watch the 'ranting'.   (By the way,
> > > Adam, you have to stop grappling with SWF when you get married.)
> > >
> > > It seems to me that 'ModelDriven' is not much use without
> > > ConversationScope, because you have to manually manage the
> > > model/session interaction in all but the first action in the
> > > conversation.  What I'm talking about with the term
> > > 'ConversationScope' is the need not to have to explicitly store,
> > > check, and remove my model data from the session in each action.
> > > Basically my action always looks like this:
> > >
> > >   1. check session for model.
> > >   2. if found, is model for the current conversation
> > >  * if no delete the model from the session, create new model
> > >and place in session.
> > >  * if yes place it into the Action's private variable
> > >   3. .. whatever the action does ...
> > >   4. is the conversation finished?
> > >  * if no, make sure model is in session
> > >  * if yes, remove model from session
> > >
> > > This seems like a pretty straight-forward use case for an
> > > interceptor.  I'm thinking of a small object called
> > > "ConversationScope", which, of course, has to be stored in the
> > > session. The ConversationScope obj contains a map and a method to
> > > return its ConversationId, and methods to add and remove objects from
> > > its map.  The interceptor could  do to the ConversationScope the
> > > actions which the Action currently does, as delineated above.  It
> > > might be nice to inject the ConversationScope into the action, but  I
> > > don't personally know injection well enough to do that.  A full
> > > solution with injection should have a "ConversationAware" interface
> > > which includes a "ConversationId" attribute.  It might be better to
> > > use annotations rather than an interface declaration.
> > >
> > > I'm just thinking on paper here, but it doesn't seem like any massive
> > > over-architecting is needed.  I personally have almost no experience
> > > with Spring, and every time I touch it everything breaks.  Guice
> > > sounds like a nicer solution, but there is not much tutorial info on
it.
> > >
> > > Thanks,
> > > - rc
> > >
> > >
> > > Adam Hardy wrote:
> > >> Is it worth building a mechanism for conversation scope, compared to
> > >> the complexity it introduces? I really dislike Spring Webflow with
> > >> its conversation scope, stringent encapsulation and storage of
> > >> massive amounts of data in various maps that locks away everything
> > >> out of sight and makes it all taste like it's been massively
> > >> over-architected (and of course the practically insurmountable
> > >> learning curve)
> > >>
> > >> Isn't it just easier to clean your variables out of the session
> > >> manually when done? I'm not trying to provoke another rant, it's just
> > >> that I've suffered my fair share of pain grappling with SWF and I
> > >> find all justifications of its complexity unwarranted.
> > >>
> > >> Adam
> > >>
> > >> Ray Clough on 24/02/08 02:23, wrote:
> > >>> Thanks Jeromy.  (usually my wife is the only one who notices my
> > >>> 'rants').
> > >>>
> > >>> Jeromy Evans wrote:
> >  Hi Ray,
> > 
> >  I'm not sure, but check out Tom's new scope plugin as it may get
> >  you part of the way there.
> > 
> >  http://cwiki.apache.org/S2PLUGINS/scope-plugin.html
> > 
> >  I was just reading one of your rants from August 07 that mentioned
> >  the need to use ModelDriven's model across a conversation and think
> >  this will be useful.
> > 
> >  cheers,
> >  Jeromy Evans
> > 
> >  Ray Clough wrote:
> > > JSF has a "ConversationScope" for extended series of
> > > requests/

Page field values becoming null while navigating to a new page

2008-03-04 Thread RajiR

Hi All,

I have a login page with userId and password as its fields and its
corresponding ActionClass-validation.xml file to validate the page.After
logging in i have provided a link called "updateProfile" inorder to update
the details provided by user during the time of registration by forwarding
to another jsp page with pre-populated values i.e., the values which has
entered during registration and which has to be modified.
   But after clicking on the link all the model bean values are becoming
null and throwing validation that userid and password are required.How to
keep track of the page field values while navigating to a new page?
-- 
View this message in context: 
http://www.nabble.com/Page-field-values-becoming-null-while-navigating-to-a-new-page-tp15827167p15827167.html
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Conversation Scope?

2008-03-04 Thread Gabriel Belingueres
Why model-driven? I don't fully get it.
I've done several S2 apps by now and never fell the time to use the
model driven interface before (for me this is syntax sugar.)

Now why is this important for supporting conversation scope?
Is it for not writing code like
${conversationsMap[conversationId].myproperty} in the view? it is easy
to create a tag that inject the conversation into a request-scoped
variable like this:


then use ${myconversation.myproperty}

Gabriel

2008/2/24, Jeromy Evans <[EMAIL PROTECTED]>:
> I hadn't noticed this was already part of the 2.1.x core and default stack:
>
> http://struts.apache.org/2.x/docs/scoped-model-driven-interceptor.html.
>
> I haven't checked the code but it reads the same
>
> Ray Clough wrote:
> > I'm definitely going to have to watch the 'ranting'.   (By the way,
> > Adam, you have to stop grappling with SWF when you get married.)
> >
> > It seems to me that 'ModelDriven' is not much use without
> > ConversationScope, because you have to manually manage the
> > model/session interaction in all but the first action in the
> > conversation.  What I'm talking about with the term
> > 'ConversationScope' is the need not to have to explicitly store,
> > check, and remove my model data from the session in each action.
> > Basically my action always looks like this:
> >
> >   1. check session for model.
> >   2. if found, is model for the current conversation
> >  * if no delete the model from the session, create new model
> >and place in session.
> >  * if yes place it into the Action's private variable
> >   3. .. whatever the action does ...
> >   4. is the conversation finished?
> >  * if no, make sure model is in session
> >  * if yes, remove model from session
> >
> > This seems like a pretty straight-forward use case for an
> > interceptor.  I'm thinking of a small object called
> > "ConversationScope", which, of course, has to be stored in the
> > session. The ConversationScope obj contains a map and a method to
> > return its ConversationId, and methods to add and remove objects from
> > its map.  The interceptor could  do to the ConversationScope the
> > actions which the Action currently does, as delineated above.  It
> > might be nice to inject the ConversationScope into the action, but  I
> > don't personally know injection well enough to do that.  A full
> > solution with injection should have a "ConversationAware" interface
> > which includes a "ConversationId" attribute.  It might be better to
> > use annotations rather than an interface declaration.
> >
> > I'm just thinking on paper here, but it doesn't seem like any massive
> > over-architecting is needed.  I personally have almost no experience
> > with Spring, and every time I touch it everything breaks.  Guice
> > sounds like a nicer solution, but there is not much tutorial info on it.
> >
> > Thanks,
> > - rc
> >
> >
> > Adam Hardy wrote:
> >> Is it worth building a mechanism for conversation scope, compared to
> >> the complexity it introduces? I really dislike Spring Webflow with
> >> its conversation scope, stringent encapsulation and storage of
> >> massive amounts of data in various maps that locks away everything
> >> out of sight and makes it all taste like it's been massively
> >> over-architected (and of course the practically insurmountable
> >> learning curve)
> >>
> >> Isn't it just easier to clean your variables out of the session
> >> manually when done? I'm not trying to provoke another rant, it's just
> >> that I've suffered my fair share of pain grappling with SWF and I
> >> find all justifications of its complexity unwarranted.
> >>
> >> Adam
> >>
> >> Ray Clough on 24/02/08 02:23, wrote:
> >>> Thanks Jeromy.  (usually my wife is the only one who notices my
> >>> 'rants').
> >>>
> >>> Jeromy Evans wrote:
>  Hi Ray,
> 
>  I'm not sure, but check out Tom's new scope plugin as it may get
>  you part of the way there.
> 
>  http://cwiki.apache.org/S2PLUGINS/scope-plugin.html
> 
>  I was just reading one of your rants from August 07 that mentioned
>  the need to use ModelDriven's model across a conversation and think
>  this will be useful.
> 
>  cheers,
>  Jeromy Evans
> 
>  Ray Clough wrote:
> > JSF has a "ConversationScope" for extended series of
> > requests/responses
> > dealing with the same topic, and usually the same data model.  I'm
> > thinking
> > of writing an interceptor to simulate ConversationScope, and I'm
> > wondering
> > if this has not already been done, and if so, does anyone have
> > details,
> > code, etc.
> >>
> >>
> >> -
> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
> >> For additional commands, e-mail: [EMAIL PROTECTED]
> >>
> >>
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECT

Re: [OT] Re: JasperReports problem

2008-03-04 Thread Dave Newton
--- hns <[EMAIL PROTECTED]> wrote:
> result type error undefined
> 
> try {
>   JasperCompileManager.compileReportToFile(
>   "jasper/our_jasper_template.jrxml",
>   "jasper/our_compiled_template.jasper");
> } catch (Exception e) {
>   e.printStackTrace();
>   return ERROR;
> }
> return SUCCESS;
>   }
> 
> i could not understand why error come

Probably because there was an exception during your Jasper compilation, so
ERROR was returned, and you don't have a "error" result defined.

Dave


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [OT] Re: about yui

2008-03-04 Thread Dave Newton
--- hns <[EMAIL PROTECTED]> wrote:
> i have already download and see all examples 
> but it can show my type example
> how can i achieve it  

You can ask on a YUI forum; this forum is for Struts.

Dave


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [OT] Re: about yui

2008-03-04 Thread hns

thanks 
i have already download and see all examples 
but it can show my type example
how can i achieve it  
-- 
View this message in context: 
http://www.nabble.com/about-yui-tp15821595p15826283.html
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: sitemesh problem

2008-03-04 Thread hns

ooops 
extremely thankful to you
its my mistake
-- 
View this message in context: 
http://www.nabble.com/sitemesh-problem-tp15759026p15826155.html
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [OT] Re: JasperReports problem

2008-03-04 Thread hns

yes after understanding my mistake i have added 
all commons-* .jar and got another error at 
 
result type error undefined
because
i have

try {
JasperCompileManager.compileReportToFile(
"jasper/our_jasper_template.jrxml",
"jasper/our_compiled_template.jasper");
} catch (Exception e) {
e.printStackTrace();
return ERROR;
}
//if all goes well ..
return SUCCESS;
}

in JasperAction.java

i could not understand why error come
 
-- 
View this message in context: 
http://www.nabble.com/JasperReports-problem-tp15824149p15826154.html
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: unexpected behaviour

2008-03-04 Thread Dave Newton
--- mteccles <[EMAIL PROTECTED]> wrote:
> Now i just thought the action is wired by spring as a singleton, and the
> fielderrors are a property of this object... maybe forms should not be
> singletons. still like to know thoughts

Actions are assumed to be created per-request. If it's a singleton I would
imagine all sorts of bad things would happen.

Dave


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[OT] Re: JasperReports problem

2008-03-04 Thread Dave Newton
--- hns <[EMAIL PROTECTED]> wrote:
> This problem solved using done
> 
> 
> 
>   
>   /jasper/our_compiled_template.jasper
>   myList
>   PDF
>   
>   
> 
> --
> but it gives another error while executing action
> 
> java.lang.NoClassDefFoundError: org/apache/commons/digester/Digester

Include the digester library :|

Did you look at the required libraries for Jasper? 

http://www.jasperforge.org/jaspersoft/opensource/business_intelligence/jasperreports/requirements.html

Dave


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[OT] Re: about yui

2008-03-04 Thread Dave Newton
--- hns <[EMAIL PROTECTED]> wrote:
> now i want something like that when yui widget highlight on the screen
> other area of my page will be shows in  dark shadow ,it means remain 
> unactive how i can achieve it 

http://developer.yahoo.com/yui/

Dave


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: sitemesh problem

2008-03-04 Thread aj2r



hns wrote:
> 
> ...
> input.button { 
>   margin: 0; 
>   font: bolder 12px Arial, Sans-serif; 
>   border: 1px solid #CCC; 
>   padding: 2px 3px; 
>   background: #FFF;
>   color: #88ac0b;
> }
> 
> 
Your fail is here. You write input.button, but this is wrong, replace
input.button with button.button and it works. If you see generated source,
the tag is a button tag not an input tag.

-- 
View this message in context: 
http://www.nabble.com/sitemesh-problem-tp15759026p15825641.html
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: sitemesh problem

2008-03-04 Thread hns

thanks

my refresh.css
-


/
   HTML ELEMENTS
/ 

/* Top Elements */
* { margin: 0; padding: 0; }

body {
background: #CC;
font: 70%/1.5em Verdana, Tahoma, arial, sans-serif;
color: #333; 
text-align: center;
height: 100%;
}

/* links */
a, a:visited {
text-decoration: none;
color: #4F82CB; 
background: inherit;
}
a:hover {
color: #4EBF37;
background: inherit;
}

/* headers */
h1, h2, h3 {
font-family: Tahoma, Verdana, 'Trebuchet MS', Sans-serif;
font-weight: Bold;  
}
h1 {
font-size: 120%;
}
h2 {
font-size: 110%;
text-transform: uppercase;
color: #88ac0b;
}
h3 {
font-size: 110%;
color: #66; 
}

/* images */
img {
border: 2px solid #CCC;
}
img.float-right {
  margin: 5px 0px 10px 10px;  
}
img.float-left {
  margin: 5px 10px 10px 0px;
}

h1, h2, h3, p {
padding: 10px;  
margin: 0;
}
ul, ol {
margin: 5px 20px;
padding: 0 20px;
color: #88ac0b; 
}
ul span, ol span {
color: #66;
}

code {
  margin: 5px 0;
  padding: 10px;
  text-align: left;
  display: block;
  overflow: auto;  
  font: 500 1em/1.5em 'Lucida Console', 'courier new', monospace ;
  /* white-space: pre; */
  background: #FAFAFA;
  border: 1px solid #f2f2f2;  
}
acronym {
  cursor: help;
  border-bottom: 1px solid #777;
}
blockquote {
margin: 10px;
padding: 0 0 0 28px;  
   border: 1px solid #f2f2f2; 
background: #FAFAFA url(quote.gif) no-repeat 5px 5px;
}

/* form elements */
form {
margin:10px; padding: 0 5px;
border: 1px solid #f2f2f2; 
background-color: #FAFAFA; 
}
label {
display:block;
font-weight:bold;
margin:5px 0;
}
input {
padding:2px;
border:1px solid #eee;
font: normal 1em Verdana, sans-serif;
color:#777;
}
textarea {
width:400px;
padding:2px;
font: normal 1em Verdana, sans-serif;
border:1px solid #eee;
height:100px;
display:block;
color:#777;
}
input.button { 
margin: 0; 
font: bolder 12px Arial, Sans-serif; 
border: 1px solid #CCC; 
padding: 2px 3px; 
background: #FFF;
color: #88ac0b;
}



/* search */
form.search {
position: absolute;
top: 35px; right: 25px;
background: transparent;
border: none;   
}   
form.search input.textbox {
margin: 0; padding: 1px 2px;
width: 120px;
background: #FFF;
color: #333; 
}
form.search input.button {
background: #CCC url(headerbg.gif) repeat-x;
color: #333;
border: none;   
width: 70px; height: 21px;
}

/
   LAYOUT
/ 
#wrap {
width: 820px;
background: #CCC url(content.jpg) repeat-y center top;
margin: 0 auto;
text-align: left;


}
#content-wrap {
clear: both;
width: 750px;
padding: 0; 
margin: 0 auto;
}
#header {
width: 820px;
position: relative;
height: 106px;
background: #CCC url(header.jpg) no-repeat center top;
padding: 0;
font-size: 14px;
color: #FFF;
}
#header h1#logo-text {
position: absolute;
margin: 0; padding: 0;
font: bolder 3.3em 'Trebuchet MS', Arial, Sans-serif;
letter-spacing: -2px;
color: #FFF;
text-transform: none;

/* change the values of top and left to adjust the position of the 
logo*/
top: 28px; left: 50px;  
}
#header h2#slogan {
position: absolute;
margin: 0; padding: 0;
font: normal .8em 'Trebuchet MS', Arial, Sans-serif;
text-transform: none;
color: #FFF;

/* change the values of top and left to adjust the position of the 
slogan*/
top: 74px; left: 58px;  
}
#header h2#welcome {
position: absolute;
margin: 0; padding: 0;
font: normal .9em 'Trebuchet MS', Arial, Sans-serif;
text-transform: none;
color: #FFF;

/* change the values of top and left to adjust the position of the 
slogan*/
top: 84px; right: 58px; 

}

#header h2#date1 {
position: absolute;
margin: 0; padding: 0;
font: normal .9em 'Trebuchet MS', Arial, Sans-serif;
text-transform: none;
color: #FFF;
background: url(clock.gif) no-repeat left;
padding-left: 20px; margin: 0 10px 0 5px;
/* change the values of top and left to adjust the position of the 
slogan*/
top: 29px; right: 55px; 

}   

/* Menu */
#menu {

Re: JasperReports problem

2008-03-04 Thread hns

This problem solved using done




/jasper/our_compiled_template.jasper
myList
PDF




--
but it gives another error while executing action




java.lang.NoClassDefFoundError: org/apache/commons/digester/Digester

net.sf.jasperreports.engine.JasperCompileManager.compileReportToFile(JasperCompileManager.java:116)
com.mevipro.test.action.JasperAction.execute(JasperAction.java:47)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
java.lang.reflect.Method.invoke(Unknown Source)


-- 
View this message in context: 
http://www.nabble.com/JasperReports-problem-tp15824149p15825432.html
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: sitemesh problem

2008-03-04 Thread aj2r

Its seems correct too. I only think that you must have a mistake in your
Refresh.css

hns wrote:
> 
> my generated html file excluding class button from sendmessage.jsp ,it
> gives problem as i explained earlier 
> 
> 
> 
> 
> http://www.w3.org/1999/xhtml"; xml:lang="en" lang="en">
>   
>   
>   
> 
> 
> 
> 
> 
>  
> 
> 
> label
> {font-size: x-small;}
> 
> 
>   Send Us A Message
> rel="stylesheet"
> type="text/css"> 
>   
>   
> 
>   
> 
>   
>   
>   
>
> 
> 
>   
> 
> Portfolio 
>   Management 
>   
> 04 Mar 2008
> 
>   
>   welcome, hardik
>   
>   [ /Portfolio/Logout.do Logout ]
>   
> 
> 
>   
> 
>   
>   
>   
>   
>/Portfolio/Welcome.do Home 
>/Portfolio/Login_input.do Login 
>/Portfolio/webmail/portfol_main.do 
> PortFolio 
>/Portfolio/Welcome.do Support 
>/Portfolio/Welcome.do About   
>   
>   
> 
>   
>   
>   
>   
> 
> 
> 
> 
> 
> 
>   Technical
>   
>   This is Test
>   
>   
>   Tree
>   
>   
>   
> 
>   
>   
>   
>   
>  
> 
>/Portfolio/Welcome.do Home 
> 
># About 
>  
>   
> 
> 
>   
>   
>   
> 
>src="/Portfolio/struts/xhtml/validation.js">
>   
>  method="post">
> 
>  class="label">Your Email*:
> >
> 
> 
> 
>  class="label">Subject:
> >
> 
> 
> 
>  class="label">Message*:
> >Type your message here.
> 
> 
> 
>  id="SendMessage_0" value="Submit" class="button">Submit
> 
> 
> 
> 
>  value="Reset">Reset
> 
> 
> 
> 
> 
> 
> 
> 
> function validateForm_SendMessage() {
> form = document.getElementById("SendMessage");
> clearErrorMessages(form);
> clearErrorLabels(form);
> 
> var errors = false;
> 
> return !errors;
> }
> 
> 
> 
>   
>   
>   
>   
>   
>   
>
> 
> 
> 
> All Content © Copyright 2008 
> 
> 
> 
> 
>   
>
>   
>   
>   
>   
> 
> -
> 

-- 
View this message in context: 
http://www.nabble.com/sitemesh-problem-tp15759026p15825387.html
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: sitemesh problem

2008-03-04 Thread hns

my generated html file excluding class button from sendmessage.jsp ,it gives
problem as i explained earlier 




http://www.w3.org/1999/xhtml"; xml:lang="en" lang="en">








 


label
{font-size: x-small;}


Send Us A Message
  








 




Portfolio   
Management 

04 Mar 2008


welcome, hardik

[ /Portfolio/Logout.do Logout ]









 /Portfolio/Welcome.do Home 
 /Portfolio/Login_input.do Login 
 /Portfolio/webmail/portfol_main.do 
PortFolio 
 /Portfolio/Welcome.do Support 
 /Portfolio/Welcome.do About   


  










Technical

This is Test


Tree



  




   

 /Portfolio/Welcome.do Home 

 # About 
   











Your Email*:




Subject:




Message*:
Type your message here.



Submit




Reset








function validateForm_SendMessage() {
form = document.getElementById("SendMessage");
clearErrorMessages(form);
clearErrorLabels(form);

var errors = false;

return !errors;
}









 



All Content © Copyright 2008 





 





-
-- 
View this message in context: 
http://www.nabble.com/sitemesh-problem-tp15759026p15824819.html
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: sitemesh problem

2008-03-04 Thread aj2r

Can you put here generated source (html received by browser) of
sendMessage.jsp?
In other hand, in css file you should specify class names with an initial
dot, ie: .button not button


hns wrote:
> 
> now this is actual flow
> index.jsp  redirected to welcome.jsp(welcome.do)
> 
> my welcome.jsp shows perfectly---
> welcome.jsp
> -
> <%@ page contentType="text/html; charset=UTF-8" %>
> <%@ taglib uri="/struts-tags" prefix="s" %>
> <%@ taglib uri="http://www.opensymphony.com/sitemesh/page"; 
> prefix="pages"%>
>  <%@ taglib uri="http://www.opensymphony.com/sitemesh/decorator";
> prefix="decorator" %>
>  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
> 
> http://www.w3.org/1999/xhtml"; xml:lang="en" lang="en">
> 
>
>welcome
>   
> 
> 
> 
> 
>  
> 
>  
> 
>  
> 
> 
> 
> 
> 
> 
> 
> 
> now when i click on sendmail
> 
> it goes to which is in struts.xml
> 
> 
>  method="{1}">
> 
> /SendMail/SendMessage-input.jsp
> /SendMail/SendMessage-success.jsp
> 
> 
> 
> 
> 
> after invoking action it goes to as per you see /sendMessage-input.jsp 
> 
> sendMessage.jsp
> ---
> <%@ taglib uri="/struts-tags" prefix="s"
> %>
> 
> Send Us A Message
> 
> 
> 
> 
>  
> 
> button { 
>   margin: 0; 
>   font: bolder 12px Arial, Sans-serif; 
>   border: 1px solid #CCC; 
>   padding: 2px 3px; 
>   background: #FFF;
>   color: #88ac0b;
>   
> }
> label
> {font-size: x-small;}
> 
> 
> 
> 
> 
> 
> 
>  required="true" label="Message" value="Type your message here."
> onfocus="if (taSelected == 0){taSelected = 1; this.select();}" />
> 
> 
> 
> 
> 
> --
> now i tell  actual problem ,when sendmessage_input.jsp load it can not
> load button style remains in 
> Refresh.css ,that's why i have to write here css class button,whether my
> sidebar,header,footer shows correctly
> 

-- 
View this message in context: 
http://www.nabble.com/sitemesh-problem-tp15759026p15824552.html
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Managing xdoclet tags with prepare action in struts 1.2.4

2008-03-04 Thread Dimitris Mouchritsas

Hi all,
I'm trying to make some code run for a project in the company. For every 
action we have a prepare action.
The project build but when I try to access the action I get an 
application error, probably from struts. No
exception is thrown in the server log (oc4j 10.1.2 btw). Also I can see 
that the prepare action is entered.

Here's my xdoclet tags for the prepare action:
/**
* @struts.action name="prepareRegisterEOOrg" path="/prepareRegisterEOOrg"
*validate="false"
*
* @struts.action-forward name="goRegisterEOOrg" path="/registerEOOrg"
*/
and here it is for the action that actually does the work:
/**
* @struts.action name="registerEOOrg" path="/registerEOOrg"
*validate="true" input="registerEOOrg"
*
* @struts.action-forward name="goHome" path="/home.do" redirect="true"
* @struts.action-forward name="error" path="/registerEOOrg"
*/

The form bean has the name of RegisterEOOrgForm and the jsp is called 
registerEOOrg.jsp
Any idea what's wrong? Also please send a link if you know any tutorial 
that uses prepare

and dispatch actions, along with xdoclet. Thanks.




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



redirect-action to https

2008-03-04 Thread David Loup
Hi,

 

I'm trying to have Struts 2 redirect over HTTPS protocol.

 

On submit of a form calling editPerson.action (on a page already on
HTTPS), the following redirects to HTTP. 

 





listPersons 

/pages/viewPerson.jsp



 

Is there any configuration I can add to redirect over https ?

 

Thanks




CONFIDENTIALITY - This email and any files transmitted with it, are 
confidential, may be legally privileged and are intended solely for the use of 
the individual or entity to whom they are addressed. If this has come to you in 
error, you must not copy, distribute, disclose or use any of the information it 
contains. Please notify the sender immediately and delete them from your system.

SECURITY - Please be aware that communication by email, by its very nature, is 
not 100% secure and by communicating with Perform Group by email you consent to 
us monitoring and reading any such correspondence.

VIRUSES - Although this email message has been scanned for the presence of 
computer viruses, the sender accepts no liability for any damage sustained as a 
result of a computer virus and it is the recipient’s responsibility to ensure 
that email is virus free.

AUTHORITY - Any views or opinions expressed in this email are solely those of 
the sender and do not necessarily represent those of Perform Group.

COPYRIGHT - Copyright of this email and any attachments belongs to Perform 
Group, Companies House Registration number 6324278.

Re: sitemesh problem

2008-03-04 Thread hns

now this is actual flow
index.jsp  redirected to welcome.jsp(welcome.do)

my welcome.jsp shows perfectly---
welcome.jsp
-
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib uri="/struts-tags" prefix="s" %>
<%@ taglib uri="http://www.opensymphony.com/sitemesh/page";  prefix="pages"%>
 <%@ taglib uri="http://www.opensymphony.com/sitemesh/decorator";
prefix="decorator" %>
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>

http://www.w3.org/1999/xhtml"; xml:lang="en" lang="en">

   
   welcome





 

 

 








now when i click on sendmail

it goes to which is in struts.xml




/SendMail/SendMessage-input.jsp
/SendMail/SendMessage-success.jsp





after invoking action it goes to as per you see /sendMessage-input.jsp 

sendMessage.jsp
---
<%@ taglib uri="/struts-tags" prefix="s"
%>

Send Us A Message




 

button { 
margin: 0; 
font: bolder 12px Arial, Sans-serif; 
border: 1px solid #CCC; 
padding: 2px 3px; 
background: #FFF;
color: #88ac0b;

}
label
{font-size: x-small;}













--
now i tell  actual problem ,when sendmessage_input.jsp load it can not load
button style remains in 
Refresh.css ,that's why i have to write here css class button,whether my
sidebar,header,footer shows correctly
-- 
View this message in context: 
http://www.nabble.com/sitemesh-problem-tp15759026p15824345.html
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: unexpected behaviour

2008-03-04 Thread mteccles

Now i just thought the action is wired by spring as a singleton, and the
fielderrors are a property of this object... maybe forms should not be
singletons. still like to know thoughts



mteccles wrote:
> 
> Hi,
> 
> I developed a form that does some validation. I included validation and
> workflow interceptor in the actions stack.
> 
> The validation is very simple, it makes sure one field is a minimum
> length. It works fine except for the following scenario:
> 
> 1) submit invalid form (input is returned with field error showing)
> 2)fix input and re-submit
> 
> result: 
> 
> field error is still there therefore workflow sends it to input again.
> Surely the fielderror should of been popped from the stack in the
>  tag? Do i have to manually remove the error from the stack
> or is there a bug in my solution?
> 

-- 
View this message in context: 
http://www.nabble.com/%3Cs%3Afielderror%3E-unexpected-behaviour-tp15824230p15824298.html
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



unexpected behaviour

2008-03-04 Thread mteccles

Hi,

I developed a form that does some validation. I included validation and
workflow interceptor in the actions stack.

The validation is very simple, it makes sure one field is a minimum length.
It works fine except for the following scenario:

1) submit invalid form (input is returned with field error showing)
2)fix input and re-submit

result: 

field error is still there therefore workflow sends it to input again.
Surely the fielderror should of been popped from the stack in the
 tag? Do i have to manually remove the error from the stack or
is there a bug in my solution?
-- 
View this message in context: 
http://www.nabble.com/%3Cs%3Afielderror%3E-unexpected-behaviour-tp15824230p15824230.html
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: sitemesh problem

2008-03-04 Thread aj2r

It seems correct too :-/
Can tou put here (one more time :-P) the generated html of a page of the
/webmail namespace?
-- 
View this message in context: 
http://www.nabble.com/sitemesh-problem-tp15759026p15824174.html
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



JasperReports problem

2008-03-04 Thread hns

 i am trying to use jasper report functionality from document of strtus
2.0.11
after creating person.java at com.mevipro.test
and com.mevipro.test.action.JasperAction and
our_jasper_template.jrxml

i have write in strtus.xml



/jasper/our_compiled_template.jasper
myList
PDF


-
while i try to run index.jsp it shows error message of http status 404 file
not found
what is problem
-- 
View this message in context: 
http://www.nabble.com/JasperReports-problem-tp15824149p15824149.html
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: sitemesh problem

2008-03-04 Thread hns

thnaks for showing interest
main.jsp


<%@ taglib uri="http://www.opensymphony.com/sitemesh/decorator";
prefix="decorator" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ taglib uri="http://www.opensymphony.com/sitemesh/page";  prefix="pages"%>
http://www.w3.org/1999/xhtml"; xml:lang="en" lang="en">




  













 Login 
 Support 
 













 





-- 
View this message in context: 
http://www.nabble.com/sitemesh-problem-tp15759026p15824014.html
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: sitemesh problem

2008-03-04 Thread aj2r

It seems correct. Can you put here main.jsp too?

-- 
View this message in context: 
http://www.nabble.com/sitemesh-problem-tp15759026p15823935.html
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Rad 6.0

2008-03-04 Thread Antonio Petrelli
2008/3/4, Jerry Gustanski <[EMAIL PROTECTED]>:
>
> Does that go in the Web.xml? It doesn't seem to recognize  tag



What version of servlet are you using?
The fragment that I posted was for servlet 2.4. If you are using 2.3, simply
avoid the  element (or upgrade to servlet 2.4 :-) ).

Antonio


Re: Rad 6.0

2008-03-04 Thread Jerry Gustanski

Does that go in the Web.xml? It doesn't seem to recognize  tag
- Original Message - 
From: "Antonio Petrelli" <[EMAIL PROTECTED]>

To: "Struts Users Mailing List" 
Sent: Tuesday, March 04, 2008 1:24 AM
Subject: Re: Rad 6.0



2008/3/4, Jerry Gustanski <[EMAIL PROTECTED]>:


Hey! I put them there and it worked. I thinked that solved the problems I
was having last night too. I don't know how to set up the referenece in
web.xml. Can you tel me hoe to do that?




   
   
   http://struts.apache.org/tags-html
   /WEB-INF/tld/struts-html.tld
   
   

BTW, what part of the world do you live in?



Italy, Rome.

Thank you very much for the help so far.



My pleasure :-)

Antonio




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Jfree chart

2008-03-04 Thread hns


-- 
View this message in context: 
http://www.nabble.com/Jfree-chart-tp15823524p15823524.html
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Struts2 CheckBox tag inside an s:iterator

2008-03-04 Thread Mano Dasanayaka
Hi All,

I have a jsp where we list down some dynamic checkboxes.
for this we use s:checkbox tag inside a s:iterator ,














in my action class I have a string[] named fullMarket and all the required
getters and setters are provided there. Everything happens successfully,
when we submit the form ,,.i.e fullMarket  array comes with the selected
id's. 

but as we try to pre populate this same set of checkboxes , I see all the
checkboxes  selected irrespective of the values I set in action class.

this.fullMarket =  new String[] {"3","4","5"};


Any one got an idea what's wrong with this implementation.,..,


Thanks In Advance

Regards,

Mano 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Rad 6.0

2008-03-04 Thread Antonio Petrelli
2008/3/4, Jerry Gustanski <[EMAIL PROTECTED]>:
>
> Hey! I put them there and it worked. I thinked that solved the problems I
> was having last night too. I don't know how to set up the referenece in
> web.xml. Can you tel me hoe to do that?





http://struts.apache.org/tags-html
/WEB-INF/tld/struts-html.tld



BTW, what part of the world do you live in?



Italy, Rome.

Thank you very much for the help so far.



My pleasure :-)

Antonio


Re: sitemesh problem

2008-03-04 Thread hns

 
 
/styles/* 
/scripts/* 
/images/* 
/index.html
/Error.jsp 
/CSS/*
/struts/* 
/dojo/*
/struts/ajax/*
/js/yui/*
 
 
 
/*

 



   
 
 
  
-- 
View this message in context: 
http://www.nabble.com/sitemesh-problem-tp15759026p15823223.html
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Rad 6.0

2008-03-04 Thread Jerry Gustanski
Hey! I put them there and it worked. I thinked that solved the problems I 
was having last night too. I don't know how to set up the referenece in 
web.xml. Can you tel me hoe to do that?


BTW, what part of the world do you live in?

Thank you very much for the help so far.

Jerry
- Original Message - 
From: "Antonio Petrelli" <[EMAIL PROTECTED]>

To: "Struts Users Mailing List" 
Sent: Tuesday, March 04, 2008 12:13 AM
Subject: Re: Rad 6.0



2008/3/4, Jerry Gustanski <[EMAIL PROTECTED]>:


Here's the error:

JSP Processing Error
  HTTP Error Code:   500


  Error Message:
JSPG0047E: Unable to locate tag library for uri
http://struts.apache.org/tags-html




Did you put the JAR containing the tag libraries in your WEB-INF/lib
directory?
If not, put them there. If you can't (e.g. library positions determined in 
a

non standard manner), you have to put a reference to your web.xml.

Antonio




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: sitemesh problem

2008-03-04 Thread aj2r


hns wrote:
> 
> 
> 
> aj2r wrote:
>> 
>> 
>> Can you put here your decorators.xml?
>> 
> i have putted decoraters.xml at web-inf folder
> 

Can you put HERE your decorators.xml?
-- 
View this message in context: 
http://www.nabble.com/sitemesh-problem-tp15759026p15823087.html
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Problem with OGNL syntax

2008-03-04 Thread oscar perez
Hi,
Thank you for your quick reply. I tried your suggested syntax and didn't
work either.
However, I like a lot more your last proposal so I will give it a shot.
Thanks!
Oscar

On Tue, Mar 4, 2008 at 1:05 AM, Jeromy Evans <
[EMAIL PROTECTED]> wrote:

> oscar perez wrote:
> >
> > 
> > 
> >
> >
> I see what you're trying to do; you're asking OGNL to evaluate
> companyType first, and use the string result in the outer expression to
> evaluate.
>
> The %{} notation won't do this for you.  According to the OGNL guide you
> should use parentheses to evaluate part of the expression as a unit and
> change the evlatulation order [1]
>
> eg
>
> 
>
> Haven't tried that myself.
>
> see : Parenthetical Expressions
> [1] http://www.ognl.org/basicExpressions.html
>
>
> As a side note though... I don't like your approach.  As your four
> objects share the same interface you should have just one property
> called Enterprise and your form should address that.  Your action should
> implement Preparable and instantiate the appropriate concrete
> implementation prior to the params being set.  If you use the
> params-prepare-params stack you can pass parameters to your action, then
> instantiate the appropriate concrete implementation, then set the
> parameters on the implementation.
>
> regards,
>  Jromy Evans
>
>
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: Rad 6.0

2008-03-04 Thread Antonio Petrelli
2008/3/4, Jerry Gustanski <[EMAIL PROTECTED]>:
>
> Here's the error:
>
> JSP Processing Error
>   HTTP Error Code:   500
>
>
>   Error Message:
> JSPG0047E: Unable to locate tag library for uri
> http://struts.apache.org/tags-html



Did you put the JAR containing the tag libraries in your WEB-INF/lib
directory?
If not, put them there. If you can't (e.g. library positions determined in a
non standard manner), you have to put a reference to your web.xml.

Antonio