Re: Does Tiles Layout page can have struts form components

2007-07-18 Thread Antonio Petrelli

2007/7/19, Arunkumar Balasubramanian <[EMAIL PROTECTED]>:



If you could get me a link which has the sample for this steps, it would
assist me.




The reason because I did not give a link is that such documentation is
present only for Tiles 2, while it seems that you are using Struts-Tiles 1.
Anyway:
http://tiles.apache.org/tutorial/advanced/preparer.html ("preparer" is the
new term for "controller")
http://tiles.apache.org/tutorial/advanced/beans.html

Antonio


Re: Tiles 2.0.3 Plug-in

2007-07-18 Thread Roberto Nunnari

Yes. I can confirm that.


Also, in the move from Struts 2.0.6 to 2.0.8, I had to
change my tiles.xml put tags to put-attribute, like this:

before:





after:


value="/WEB-INF/tiles/content/userList.jsp" />



also, make sure you have all the tiles libraries:
struts2-tiles-plugin-2.0.8.jar
ties-api-2.0.3.jar
tiles-core-2.0.3.jar
tiles-jsp-2.0.3.jar

the latter has to be taken from the tiles 2.0.3 distribution,
as in the Struts 2.0.8 distribution is missing.

Best regards.

--
Robi.



Dave Newton wrote:

IIRC the Tiles tags and possibly the DTD has changed;
I had to update at least my tiles tags between 2.0.6
-> 2.0.8.

d.

--- "Jiang, Jane (NIH/NCI) [C]" <[EMAIL PROTECTED]>
wrote:


Hi all,

Has any one got tiles plug-in to work with tiles
version 2.0.3 or 2.0.4?

We have developed a Struts 2 application that uses
tiles plug in 2.0.6
with tiles-api-2.0-20070207.130156-4.jar and
tiles-core-2.0-20070207.130156-4.jar.  When I tried
to replace these two
jar files with the three 2.0.3 tiles jar files.  I
could not start my
application in Tomcat.  This is the error I got.

ERROR Thread-1


org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/acr]

-
Exception sending context initialized event to
listener instance of
class org.apache.struts2.tiles.StrutsTilesListener
java.lang.NullPointerException
at


org.apache.tiles.context.ChainedTilesContextFactory.createApplicationCon

text(ChainedTilesContextFactory.java:107)
at


org.apache.struts2.tiles.StrutsTilesContainerFactory$StrutsTilesContextF
actory.createApplicationContext(StrutsTilesContainerFactory.java:98)

at


org.apache.struts2.tiles.StrutsTilesContainerFactory.initializeContainer

(StrutsTilesContainerFactory.java:68)
at


org.apache.tiles.factory.TilesContainerFactory.createTilesContainer(Tile

sContainerFactory.java:199)
at


org.apache.tiles.factory.TilesContainerFactory.createContainer(TilesCont

ainerFactory.java:164)
at


org.apache.tiles.listener.TilesListener.createContainer(TilesListener.ja

va:91)
at


org.apache.struts2.tiles.StrutsTilesListener.createContainer(StrutsTiles

Listener.java:66)
at


org.apache.tiles.listener.TilesListener.contextInitialized(TilesListener

.java:58)
at


org.apache.catalina.core.StandardContext.listenerStart(StandardContext.j

ava:3764)
at


org.apache.catalina.core.StandardContext.start(StandardContext.java:4216

)
at


org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.ja

va:760)
at


org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740)

at


org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544)

at


org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:825)

at


org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:714)

at


org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:490)

at


org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)

at


org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:31

1)
at


org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSu

pport.java:120)
at


org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1022)

at


org.apache.catalina.core.StandardHost.start(StandardHost.java:736)

at


org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)

at


org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)

at


org.apache.catalina.core.StandardService.start(StandardService.java:448)

at


org.apache.catalina.core.StandardServer.start(StandardServer.java:700)

at


org.apache.catalina.startup.Catalina.start(Catalina.java:552)

at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
at


sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav

a:39)
at


sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor

Impl.java:25)
at
java.lang.reflect.Method.invoke(Method.java:597)
at


org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)

at


org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)

ERROR Thread-1
org.apache.catalina.core.StandardContext - Error
listenerStart
ERROR Thread-1
org.apache.catalina.core.StandardContext - Context
[/acr]
startup failed due to previous errors 



As far as I can tell, the documentation for tiles
plug-in did not
change.  Is there anything else I need to do that is
not documented for
release 2.0.3?

Thanks a lot for your help,

Jane





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



Re: struts-conf.xml Quesitons.

2007-07-18 Thread Nuwan Chandrasoma

Hi,

Have you looked at the struts-config.xml  DTD file, i think it has the 
descriptions of the elements in struts-config.


Thanks,

Nuwan


- Original Message - 
From: "jiangfan shi" <[EMAIL PROTECTED]>

To: 
Sent: Thursday, July 19, 2007 4:03 AM
Subject: struts-conf.xml Quesitons.




Hi, All,

I wonder if anyone could give me some information (any web page, book or
reference doc etc ) about the relations over the elements in the
struts-config.xml. As to the relationship, I mean some dependency or
constraints. For example, data-sources refers to some data source. But I
could not find some more interesting constraints, such as when A has the
value "x", then B must have the value "y".

Any hints are appreciated. Thanks in advance.

Jiangfan
--
View this message in context: 
http://www.nabble.com/struts-conf.xml-Quesitons.-tf4108010.html#a11681958

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: Fwd: Group Total

2007-07-18 Thread Thomas Ramapuram

Try Decorators.
  You will have to write java code and add the code as a decorator to 
your table.

   Just look up the documentation in Dispyay tags.
   Regards,
   Thomas
Sachin wrote:

Here is a clear pic of my doubt.


* header row*



* columns *
 group-total row  <--- *how to get this?* --->



* grand-total row*


Regards.
Satheesh.C


-- Forwarded message --
From: Sachin <[EMAIL PROTECTED]>
Date: Jul 18, 2007 9:53 AM
Subject: Group Total
To: Struts Users Mailing List 



Hi ,

Here is an exmaple to get total value in footer. But i need to get this
value inside table for each grouped items as a separate row in the table.

 
 
 
 
 
   Total Bill:
   
 
 


Please help me on this. Is there any alternat way to do this without
using *total
*and *varTotals* attributes.






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



Re: Setting application properties

2007-07-18 Thread Nuwan Chandrasoma

Hi,

Add a property file to your classpath, read it from your java code. this is 
what i got from google :)


http://www.exampledepot.com/egs/java.util/Props.html

http://www.javaworld.com/javaworld/javaqa/2003-08/01-qa-0808-property.html?page=1

Thanks,

Nuwan


- Original Message - 
From: "SimonK" <[EMAIL PROTECTED]>

To: 
Sent: Thursday, July 19, 2007 4:42 AM
Subject: Setting application properties




Hi all,

I am new to struts, so please forgive me if this question has an obvious
answer.

I want to be able to define some global settings for my application, such
as:

- the path to the applications temporary directory;
- the path to a static (input) data directory;
- the location/name of a db.

This (and other such constants) will be required by multiple actions and
Inteceptors.

Ideally I'd like this information to be separate to the web.xml and
struts.xml files, and in "key = value" form (... exactly like that of a
property file).

What is the canonical way of doing this?

Note - I'm having trouble findng information on how to deal with property
files.

Cheers,
Simon.
--
View this message in context: 
http://www.nabble.com/Setting-application-properties-tf4108144.html#a11682293

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]



[OT]Re: automating the generating of web.xml and struts-config.xml

2007-07-18 Thread Nuwan Chandrasoma

Hi,

Try xdoclets

Thanks,

Nuwan


- Original Message - 
From: "Antoine Solomon" <[EMAIL PROTECTED]>

To: 
Sent: Wednesday, July 18, 2007 10:54 PM
Subject: automating the generating of web.xml and struts-config.xml



Hello all,

I just wanted to know if there are any technologies used for automatically
creating the web.xml and struts-config.xml files?

Thanks in advanced,
--
Antoine W. Solomon Jr.




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



Setting application properties

2007-07-18 Thread SimonK

Hi all,

I am new to struts, so please forgive me if this question has an obvious
answer.

I want to be able to define some global settings for my application, such
as:

- the path to the applications temporary directory;
- the path to a static (input) data directory;
- the location/name of a db.

This (and other such constants) will be required by multiple actions and
Inteceptors.

Ideally I'd like this information to be separate to the web.xml and
struts.xml files, and in "key = value" form (... exactly like that of a
property file).

What is the canonical way of doing this?

Note - I'm having trouble findng information on how to deal with property
files.

Cheers,
Simon.
-- 
View this message in context: 
http://www.nabble.com/Setting-application-properties-tf4108144.html#a11682293
Sent from the Struts - User mailing list archive at Nabble.com.


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



struts-conf.xml Quesitons.

2007-07-18 Thread jiangfan shi

Hi, All,

I wonder if anyone could give me some information (any web page, book or
reference doc etc ) about the relations over the elements in the
struts-config.xml. As to the relationship, I mean some dependency or
constraints. For example, data-sources refers to some data source. But I
could not find some more interesting constraints, such as when A has the
value "x", then B must have the value "y". 

Any hints are appreciated. Thanks in advance.

Jiangfan
-- 
View this message in context: 
http://www.nabble.com/struts-conf.xml-Quesitons.-tf4108010.html#a11681958
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: Does Tiles Layout page can have struts form components

2007-07-18 Thread Arunkumar Balasubramanian
 
 
Thanks much for your quick response. If you could get me a link which has the 
sample for this steps, it would assist me. Being new to tiles, it will be of 
great help to me. Hope I am not disturbing too much.  Thanks once again in 
advance.
_
See what you’re getting into…before you go there.
http://newlivehotmail.com

RE: Does Tiles Layout page can have struts form components

2007-07-18 Thread Arunkumar Balasubramanian
 
Thanks much for your quick response.
 
If you could get me a link which has the sample for this steps, it would assist 
me. Being new to tiles, it will be of great help to me. Hope I am not 
disturbing too much.
 
 Thanks once again in advance.
 
 Regards,
 Arun
 



> Date: Wed, 18 Jul 2007 09:00:10 +0200> From: [EMAIL PROTECTED]> To: 
> user@struts.apache.org> Subject: Re: Does Tiles Layout page can have struts 
> form components> > 2007/7/18, Arunkumar Balasubramanian <[EMAIL PROTECTED]>:> 
> >> > Hi> >> > Thanks for your response.> >> > Could you please elaborate on 
> this. I read your message and was trying to> > extract the information from 
> it. If you could elaborate it, It will be of> > great help.> > > > > Ok, I'll 
> try to tell you step by step.> > 1. Create one (better two, one for each 
> javascript command) "Controller", by> extending the "ControllerSupport" 
> class. In the controller, fill the> attributes through the "ComponentContext" 
> object in the "execute" method.> 2. Associate the "controllers" to your 
> definitions:> > > ...> > > You should use the 
> same template/attributes, since you want to reuse them.> 3. Use your 
> definitions.> > I hope I have been clearer.> > Antonio
_
PC Magazine’s 2007 editors’ choice for best web mail—award-winning Windows Live 
Hotmail.
http://imagine-windowslive.com/hotmail/?locale=en-us&ocid=TXT_TAGHM_migration_HMWL_mini_pcmag_0707

Re: How can I add ActionErrors when do the interceptor's intercept() method?

2007-07-18 Thread M.Liang Liu

Wow,it works!
I now get it work when tried 2 times to find that "login_violation" the
actionName you defined in the global result is a style of wildcard you map
your action.
yup?

Thanks a lot!
Appreciation is given to Nuwan,too.He showed me a way to do my own
interceptors.

On 7/18/07, Arnaud Cogoluegnes <[EMAIL PROTECTED]> wrote:


Oops, my mistake: interceptor returns "needLogin" (global result) and not
"needAuthentication"  :-)

By the way, about the redirect result, it indeed "forgets" your action
error/message, as they are request scoped (it's equivalent to a HTTP
Redirect).

Cheers,

Arnaud


-Message d'origine-
De: Arnaud Cogoluegnes [mailto:[EMAIL PROTECTED]
Envoyé: mercredi 18 juillet 2007 12:46
À: 'Struts Users Mailing List'
Objet: RE: How can I add ActionErrors when do the interceptor's
intercept()
method?

Perhaps your security interceptor could forward to an action, which has
the
responsibility to handle the error message:

The interceptor:

public String intercept(ActionInvocation actionInvocation) throws
Exception
{
  Map session = actionInvocation.getInvocationContext().getSession();
  User user = (User) session.get(Constants.USER_KEY);
  boolean isAuthenticated = (null != user);
  if (isAuthenticated) {
   return actionInvocation.invoke();
  } else {
return "needAuthentication";
}

The global results:


  login_violation
  /


And in your action (the login action, which gathers all login stuff):

@SkipValidation
public String violation() {
  addActionMessage(getText("need.authentication"));
  return SUCCESS; // to the login form
}

Worked for me.

Cheers,

Arnaud

-Message d'origine-
De: M.Liang Liu [mailto:[EMAIL PROTECTED]
Envoyé: mercredi 18 juillet 2007 10:59
À: Struts Users Mailing List
Objet: Re: How can I add ActionErrors when do the interceptor's
intercept()
method?

I tried many times,but there's no solutions then.

Any help could be greatly appreciated.
On 7/17/07, M.Liang Liu <[EMAIL PROTECTED]> wrote:
>
> Thanks for you quick reply,Nuwan.
>
> yeah,ur code works and action-error should be add to the original
action(I
> tested).
> However,I set my global result in my default package,and when the
invalid
> action accessing was intercepted,the browser was redirect to the login
page.
>
> It's strange that the action-error did NOT display.I am sure that my
> interceptor has been configured correctly and the actionError has been
add
> to the very action.
> I guess the global result whose type is "redirect" cause this
problem,but
> am not sure.
>
> So,I define my login result as dispatch,which is default, it
works.Myglobal result is follwing:
>
>



> 
> /error.jsp
> /common/login.jsp
> /error.jsp
> 
>
>


--
>
> Does it work?yes.action error has been add and can display correctly.
> The problem is that I can NOT use redirect type any more.As a result,the
> doLogin action---the login form's action---can not mapped,as  the
namespace
> now is still the invalid action's.
> eg.I access :http://localhost:8080/myapp/kms/showNews.tbs before logged
in
> Then access was intercepted and dispatched to :
> http://localhost:8080/myapp/common/login.jsp
> so I logged.
> The form was submitted  to http://localhost:8080/myapp/kms/doLogin.tbs
> which should be: http://localhost:8080/myapp/common/doLogin.tbs
>
> Any comment?
>
> Thanks a lot.
> On 7/18/07, Nuwan Chandrasoma <[EMAIL PROTECTED]> wrote:
> >
> > Hi,
> >
> > hope this code will help you.
> >
> >  Object action = invocation.getAction ();
> >  if (action instanceof com.opensymphony.xwork2.ValidationAware) {
> >   ((com.opensymphony.xwork2.ValidationAware)
action).addActionError
> > ("Username or password incorrect.");
> >  }
> >
> > Thanks,
> >
> > Nuwan.
> >
> > - Original Message -
> > From: "M.Liang Liu" <[EMAIL PROTECTED] >
> > To: 
> > Sent: Tuesday, July 17, 2007 9:49 AM
> > Subject: How can I add ActionErrors when do the interceptor's
> > intercept()
> > method?
> >
> >
> > >
> > > Hi,all
> > > I've got a problem when I put my own interceptors in my app:
> > > I write an interceptor to authenticate whether the user access the
> > current
> > > page or action has logged in.
> > > I write the code in the following style(refer to the mailreader
> > example):
> > > 
> > > ..
> > > public String intercept(ActionInvocation actionInvocation) throws
> > > Exception
> > > {
> > > Map session = actionInvocation.getInvocationContext().getSession();
> > > User user = (User) session.get(Constants.USER_KEY);
> > > boolean isAuthenticated = (null != user);
> > > if (isAuthenticated) {
> > > return actionInvocation.invoke();
> > > } else {
> > >//how to add actionErrors here?
> > > return Action.LOGIN;
> > > }
> >

Re: FieldExpressionValidator: How do I reference field names?

2007-07-18 Thread Musachy Barroso

Ah beautiful, I like the "in" better  (the types are enums), maybe I should
finally look at the OGNL documentation :)

musachy

On 7/18/07, cilquirm <[EMAIL PROTECTED]> wrote:



That's a mouthful.

OGNL does have an 'in' operator

customer.creditCards[0].type in [ 'AMERICAN_EXPRESS', 'VISA', 'DISCOVER' ,
'MASTERCARD']

note that you don't have to do toString() if type is already a string ;
ognl's equality operator ( == ) already uses equals.

If it's not of type String, you might try projection :

[ 'AMERICAN_EXPRESS', 'VISA', 'DISCOVER' , 'MASTERCARD'].{? #this.equals(
customer.creditCards[0].type ) }.size() > 0




Musachy Barroso wrote:
>
> Looks ok, here is one that I have:
>
> 
> 
>
> 'AMERICAN_EXPRESS'.equals(customer.creditCards
> [0].type.toString())
> || 'VISA'.equals(customer.creditCards
[0].type.toString())
> || 'DISCOVER'.equals(customer.creditCards
> [0].type.toString())
> || 'MASTERCARD'.equals(customer.creditCards
> [0].type.toString())
>
> Credit Card Type must be American Express, Visa,
> MasterCard, Discover
> 
> 
>
> //is ther an "in" operator in OGNL?
>
> musachy
>
> On 7/18/07, mraible <[EMAIL PROTECTED]> wrote:
>>
>>
>> That didn't work - how about this: http://rafb.net/p/cmnEKB18.html
>>
>>
>> mraible wrote:
>> >
>> > Looks like Nabble was escaping my HTML - let's try again with HTML
>> Format
>> > checked:
>> >
>> > 
>> > 
>> > true
>> > Reason is required.
>> > 
>> > 
>> >
>> > 
>> > 
>> > friendEmail
>> > reason.equals('friend') and friendEmail == null
>> > Please provide your friend's email
>> > 
>> >
>> > 
>> > 
>> > 
>> > reason.equals('friend') and friendEmail == null
>> > Please provide your friend's email
>> > 
>> > 
>> >
>> >
>> > Musachy Barroso wrote:
>> >>
>> >> I've read this like 10 times just to make sure I'm not missing
>> something,
>> >> but:
>> >>
>> >>  
>> >>friendEmail
>> >>reason.equals('friend') and friendEmail == null
>> >>Please provide your friend's email
>> >>
>> >>
>> >>
>> >> why is "friendEmail" in the expression?(should be "
>> >> reason.equals('friend')
>> >> and friendEmail == null" right?)
>> >>
>> >> musachy
>> >>
>> >> On 7/18/07, mraible <[EMAIL PROTECTED]> wrote:
>> >>>
>> >>>
>> >>> I'm trying to use a FieldExpressionValidator (or
ExpressionValidator)
>> to
>> >>> compare fields. Unfortunately, it doesn't seem to be working. I
have
>> a
>> >>> radio
>> >>> button (named "reason") and a text field named "friendEmail". If
the
>> >>> selected radio has a reason of "friend", I want to require the text
>> >>> field.
>> >>> However, the expression "reason.equals('friend') and friendEmail ==
>> >>> null"
>> >>> doesn't seem to work. Is this expression syntax correct, or do I
have
>> to
>> >>> do
>> >>> something additional to get a handle on the "reason" and
>> "friendEmail"
>> >>> values?
>> >>>
>> >>> 
>> >>> 
>> >>> true
>> >>> Reason is a required field.
>> >>> 
>> >>> 
>> >>>
>> >>> 
>> >>> friendEmail
>> >>> reason.equals('friend') and friendEmail == null
>> >>> Please provide your friend's email
>> >>> 
>> >>>
>> >>> I've also tried the following, but no dice:
>> >>>
>> >>> 
>> >>> 
>> >>> reason.equals('friend')
>> >>> Please provide your friend's email
>> >>> 
>> >>> 
>> >>>
>> >>> Thanks,
>> >>>
>> >>> Matt
>> >>> --
>> >>> View this message in context:
>> >>>
>>
http://www.nabble.com/FieldExpressionValidator%3A-How-do-I-reference-field-names--tf4104715.html#a11673436
>> >>> Sent from the Struts - User mailing list archive at Nabble.com.
>> >>>
>> >>>
>> >>>
-
>> >>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> >>> For additional commands, e-mail: [EMAIL PROTECTED]
>> >>>
>> >>>
>> >>
>> >>
>> >> --
>> >> "Hey you! Would you help me to carry the stone?" Pink Floyd
>> >>
>> >>
>> >
>> >
>>
>> --
>> View this message in context:
>>
http://www.nabble.com/FieldExpressionValidator%3A-How-do-I-reference-field-names--tf4104715.html#a11677727
>> Sent from the Struts - User mailing list archive at Nabble.com.
>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>
>
> --
> "Hey you! Would you help me to carry the stone?" Pink Floyd
>
>

--
View this message in context:
http://www.nabble.com/FieldExpressionValidator%3A-How-do-I-reference-field-names--tf4104715.html#a11679100
Sent from the Struts - User mailing list archive at Nabble.com.


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

automating the generating of web.xml and struts-config.xml

2007-07-18 Thread Antoine Solomon

Hello all,

I just wanted to know if there are any technologies used for automatically
creating the web.xml and struts-config.xml files?

Thanks in advanced,
--
Antoine W. Solomon Jr.


Re: FieldExpressionValidator: How do I reference field names?

2007-07-18 Thread cilquirm

That's a mouthful.

OGNL does have an 'in' operator

customer.creditCards[0].type in [ 'AMERICAN_EXPRESS', 'VISA', 'DISCOVER' ,
'MASTERCARD']

note that you don't have to do toString() if type is already a string ;
ognl's equality operator ( == ) already uses equals.

If it's not of type String, you might try projection :

[ 'AMERICAN_EXPRESS', 'VISA', 'DISCOVER' , 'MASTERCARD'].{? #this.equals(
customer.creditCards[0].type ) }.size() > 0 
 



Musachy Barroso wrote:
> 
> Looks ok, here is one that I have:
> 
> 
> 
> 
> 'AMERICAN_EXPRESS'.equals(customer.creditCards
> [0].type.toString())
> || 'VISA'.equals(customer.creditCards[0].type.toString())
> || 'DISCOVER'.equals(customer.creditCards
> [0].type.toString())
> || 'MASTERCARD'.equals(customer.creditCards
> [0].type.toString())
> 
> Credit Card Type must be American Express, Visa,
> MasterCard, Discover
> 
> 
> 
> //is ther an "in" operator in OGNL?
> 
> musachy
> 
> On 7/18/07, mraible <[EMAIL PROTECTED]> wrote:
>>
>>
>> That didn't work - how about this: http://rafb.net/p/cmnEKB18.html
>>
>>
>> mraible wrote:
>> >
>> > Looks like Nabble was escaping my HTML - let's try again with HTML
>> Format
>> > checked:
>> >
>> > 
>> > 
>> > true
>> > Reason is required.
>> > 
>> > 
>> >
>> > 
>> > 
>> > friendEmail
>> > reason.equals('friend') and friendEmail == null
>> > Please provide your friend's email
>> > 
>> >
>> > 
>> > 
>> > 
>> > reason.equals('friend') and friendEmail == null
>> > Please provide your friend's email
>> > 
>> > 
>> >
>> >
>> > Musachy Barroso wrote:
>> >>
>> >> I've read this like 10 times just to make sure I'm not missing
>> something,
>> >> but:
>> >>
>> >>  
>> >>friendEmail
>> >>reason.equals('friend') and friendEmail == null
>> >>Please provide your friend's email
>> >>
>> >>
>> >>
>> >> why is "friendEmail" in the expression?(should be "
>> >> reason.equals('friend')
>> >> and friendEmail == null" right?)
>> >>
>> >> musachy
>> >>
>> >> On 7/18/07, mraible <[EMAIL PROTECTED]> wrote:
>> >>>
>> >>>
>> >>> I'm trying to use a FieldExpressionValidator (or ExpressionValidator)
>> to
>> >>> compare fields. Unfortunately, it doesn't seem to be working. I have
>> a
>> >>> radio
>> >>> button (named "reason") and a text field named "friendEmail". If the
>> >>> selected radio has a reason of "friend", I want to require the text
>> >>> field.
>> >>> However, the expression "reason.equals('friend') and friendEmail ==
>> >>> null"
>> >>> doesn't seem to work. Is this expression syntax correct, or do I have
>> to
>> >>> do
>> >>> something additional to get a handle on the "reason" and
>> "friendEmail"
>> >>> values?
>> >>>
>> >>> 
>> >>> 
>> >>> true
>> >>> Reason is a required field.
>> >>> 
>> >>> 
>> >>>
>> >>> 
>> >>> friendEmail
>> >>> reason.equals('friend') and friendEmail == null
>> >>> Please provide your friend's email
>> >>> 
>> >>>
>> >>> I've also tried the following, but no dice:
>> >>>
>> >>> 
>> >>> 
>> >>> reason.equals('friend')
>> >>> Please provide your friend's email
>> >>> 
>> >>> 
>> >>>
>> >>> Thanks,
>> >>>
>> >>> Matt
>> >>> --
>> >>> View this message in context:
>> >>>
>> http://www.nabble.com/FieldExpressionValidator%3A-How-do-I-reference-field-names--tf4104715.html#a11673436
>> >>> Sent from the Struts - User mailing list archive at Nabble.com.
>> >>>
>> >>>
>> >>> -
>> >>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> >>> For additional commands, e-mail: [EMAIL PROTECTED]
>> >>>
>> >>>
>> >>
>> >>
>> >> --
>> >> "Hey you! Would you help me to carry the stone?" Pink Floyd
>> >>
>> >>
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/FieldExpressionValidator%3A-How-do-I-reference-field-names--tf4104715.html#a11677727
>> Sent from the Struts - User mailing list archive at Nabble.com.
>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
> 
> 
> -- 
> "Hey you! Would you help me to carry the stone?" Pink Floyd
> 
> 

-- 
View this message in context: 
http://www.nabble.com/FieldExpressionValidator%3A-How-do-I-reference-field-names--tf4104715.html#a11679100
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: Open Source Struts Dating Application

2007-07-18 Thread cilquirm


I think you have to 'know' somebody to get it incubated.  i.e.  Just because
you're offering, doesn't mean they'll bite.  (And I don't mean that in a bad
way, either.  )

Check out the incubation docs for more info :

http://incubator.apache.org/incubation/Incubation_Policy.html

Barring that, you're free to open it up to the world on sourceforge,
dev.java.net, or googlecode.

I do think that having an advanced application is a good real-world testbed
for a whole slew of things.

I'm assuming it's an S1 app?

-a




Strut Date wrote:
> 
> Hi
>
>   I have been writing a Struts based dating application for the last 2
> years, and would like to explore the possibility of contributing this to
> the Apache SW Foundation.  I wondered whether this would be possible, and
> if so, what would be involved / who I should contact.  
>
>   Functionality Includes
>
>   - Buddylists / Hotlists
>   - Date Search (Zip & City Based)
>   - Webmail
>   - Integration to Instant Messaging (Userplane)
>   - Photo Management 
>   - Profile Management
>   - Log4J Loging
>
>   There are many areas in which the application could be improved, and
> extended into a broader social space application.  Any comments would be
> appreciated. 
> 
>
> -
> Got a little couch potato? 
> Check out fun summer activities for kids.
> 

-- 
View this message in context: 
http://www.nabble.com/Open-Source-Struts-Dating-Application-tf4105619.html#a11678962
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: Tiles 2.0.3 Plug-in

2007-07-18 Thread Dave Newton
IIRC the Tiles tags and possibly the DTD has changed;
I had to update at least my tiles tags between 2.0.6
-> 2.0.8.

d.

--- "Jiang, Jane (NIH/NCI) [C]" <[EMAIL PROTECTED]>
wrote:

> Hi all,
> 
> Has any one got tiles plug-in to work with tiles
> version 2.0.3 or 2.0.4?
> 
> We have developed a Struts 2 application that uses
> tiles plug in 2.0.6
> with tiles-api-2.0-20070207.130156-4.jar and
> tiles-core-2.0-20070207.130156-4.jar.  When I tried
> to replace these two
> jar files with the three 2.0.3 tiles jar files.  I
> could not start my
> application in Tomcat.  This is the error I got.
> 
> ERROR Thread-1
>
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/acr]
> -
> Exception sending context initialized event to
> listener instance of
> class org.apache.struts2.tiles.StrutsTilesListener
> java.lang.NullPointerException
> at
>
org.apache.tiles.context.ChainedTilesContextFactory.createApplicationCon
> text(ChainedTilesContextFactory.java:107)
> at
>
org.apache.struts2.tiles.StrutsTilesContainerFactory$StrutsTilesContextF
>
actory.createApplicationContext(StrutsTilesContainerFactory.java:98)
> at
>
org.apache.struts2.tiles.StrutsTilesContainerFactory.initializeContainer
> (StrutsTilesContainerFactory.java:68)
> at
>
org.apache.tiles.factory.TilesContainerFactory.createTilesContainer(Tile
> sContainerFactory.java:199)
> at
>
org.apache.tiles.factory.TilesContainerFactory.createContainer(TilesCont
> ainerFactory.java:164)
> at
>
org.apache.tiles.listener.TilesListener.createContainer(TilesListener.ja
> va:91)
> at
>
org.apache.struts2.tiles.StrutsTilesListener.createContainer(StrutsTiles
> Listener.java:66)
> at
>
org.apache.tiles.listener.TilesListener.contextInitialized(TilesListener
> .java:58)
> at
>
org.apache.catalina.core.StandardContext.listenerStart(StandardContext.j
> ava:3764)
> at
>
org.apache.catalina.core.StandardContext.start(StandardContext.java:4216
> )
> at
>
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.ja
> va:760)
> at
>
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740)
> at
>
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544)
> at
>
org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:825)
> at
>
org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:714)
> at
>
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:490)
> at
>
org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)
> at
>
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:31
> 1)
> at
>
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSu
> pport.java:120)
> at
>
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1022)
> at
>
org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
> at
>
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
> at
>
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
> at
>
org.apache.catalina.core.StandardService.start(StandardService.java:448)
> at
>
org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
> at
>
org.apache.catalina.startup.Catalina.start(Catalina.java:552)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> Method)
> at
>
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
> a:39)
> at
>
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
> Impl.java:25)
> at
> java.lang.reflect.Method.invoke(Method.java:597)
> at
>
org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
> at
>
org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
> ERROR Thread-1
> org.apache.catalina.core.StandardContext - Error
> listenerStart
> ERROR Thread-1
> org.apache.catalina.core.StandardContext - Context
> [/acr]
> startup failed due to previous errors 
> 
> 
> As far as I can tell, the documentation for tiles
> plug-in did not
> change.  Is there anything else I need to do that is
> not documented for
> release 2.0.3?
> 
> Thanks a lot for your help,
> 
> Jane
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 



   

Pinpoint customers who are looking for what you sell. 
http://searchmarketing.yahoo.com/

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



Re: Tiles plugin and no contentType

2007-07-18 Thread Roberto Nunnari

Antonio Petrelli wrote:

2007/7/18, Antonio Petrelli <[EMAIL PROTECTED]>:


2007/7/18, Antonio Petrelli <[EMAIL PROTECTED]>:
>
> 2007/7/18, Roberto Nunnari <[EMAIL PROTECTED]>:
> >
> > If I telnet to the tomcat server on port 8080 I don't get the
> > contentType header for the tiles pages.
>
>
>
>  Strange... Using the showcase in trunk of Struts 2 it works correctly.
> I will try to check it in Struts 2.0.8 ASAP.
>


It seems that you are right. I check the Struts 2 showcase and the Tiles
test responded without a content type! It needs further investigation




This is definitely my fault, I forgot to merge from the trunk to the 
2.0branch!

Now I committed the change, so it will appear in Struts 2.0.9.

Thanks a lot Roberto :-)


Thanks to you, Antonio.




Antonio




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



Re: FieldExpressionValidator: How do I reference field names?

2007-07-18 Thread Musachy Barroso

Ding!

musachy

On 7/18/07, Eric Rank <[EMAIL PROTECTED]> wrote:


At risk of pointing out the obvious, I notice is that your expression
validates when:

1. reason is "friend"
2. and when friendEmail is null

I'm guessing that you want it to successfully validate when

1. reason equals "friend"
2. And when friendEmail IS NOT null

Could that be the problem?

I only point it out because the backwards logic involved with
validators has bitten me in the past. I always have to remind myself
that my validators test for things that I want, not for things that
will cause failure.

Eric Rank




On Jul 18, 2007, at 3:08 PM, mraible wrote:

>
> That didn't work - how about this: http://rafb.net/p/cmnEKB18.html
>
>
> mraible wrote:
>>
>> Looks like Nabble was escaping my HTML - let's try again with HTML
>> Format
>> checked:
>>
>> 
>> 
>> true
>> Reason is required.
>> 
>> 
>>
>> 
>> 
>> friendEmail
>> reason.equals('friend') and friendEmail == null
>> Please provide your friend's email
>> 
>>
>> 
>> 
>> 
>> reason.equals('friend') and friendEmail == null
>> Please provide your friend's email
>> 
>> 
>>
>>
>> Musachy Barroso wrote:
>>>
>>> I've read this like 10 times just to make sure I'm not missing
>>> something,
>>> but:
>>>
>>>  
>>>friendEmail
>>>reason.equals('friend') and friendEmail == null
>>>Please provide your friend's email
>>>
>>>
>>>
>>> why is "friendEmail" in the expression?(should be "
>>> reason.equals('friend')
>>> and friendEmail == null" right?)
>>>
>>> musachy
>>>
>>> On 7/18/07, mraible <[EMAIL PROTECTED]> wrote:


 I'm trying to use a FieldExpressionValidator (or
 ExpressionValidator) to
 compare fields. Unfortunately, it doesn't seem to be working. I
 have a
 radio
 button (named "reason") and a text field named "friendEmail". If
 the
 selected radio has a reason of "friend", I want to require the text
 field.
 However, the expression "reason.equals('friend') and friendEmail ==
 null"
 doesn't seem to work. Is this expression syntax correct, or do I
 have to
 do
 something additional to get a handle on the "reason" and
 "friendEmail"
 values?

 
 
 true
 Reason is a required field.
 
 

 
 friendEmail
 reason.equals('friend') and friendEmail == null
 Please provide your friend's email
 

 I've also tried the following, but no dice:

 
 
 reason.equals('friend')
 Please provide your friend's email
 
 

 Thanks,

 Matt
 --
 View this message in context:
 http://www.nabble.com/FieldExpressionValidator%3A-How-do-I-
 reference-field-names--tf4104715.html#a11673436
 Sent from the Struts - User mailing list archive at Nabble.com.


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


>>>
>>>
>>> --
>>> "Hey you! Would you help me to carry the stone?" Pink Floyd
>>>
>>>
>>
>>
>
> --
> View this message in context: http://www.nabble.com/
> FieldExpressionValidator%3A-How-do-I-reference-field-names--
> tf4104715.html#a11677727
> 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]





--
"Hey you! Would you help me to carry the stone?" Pink Floyd


Re: [Struts 2] If exists tag?

2007-07-18 Thread Musachy Barroso


...


//more elegant :)

On 7/18/07, Musachy Barroso <[EMAIL PROTECTED]> wrote:



...


musachy

On 7/18/07, Neil Aggarwal < [EMAIL PROTECTED]> wrote:
>
> Hello:
>
> Is there a struts tag to check if a collection is not null
> and has at least one element?
>
> I want to check a collection before printing the table
> containing the elements using an  tag.
>
> Thanks,
> Neil
>
>
> --
> Neil Aggarwal, (832)245-7314, www.JAMMConsulting.com
> FREE! Eliminate junk email and reclaim your inbox.
> Visit http://www.spammilter.com for details.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


--
"Hey you! Would you help me to carry the stone?" Pink Floyd





--
"Hey you! Would you help me to carry the stone?" Pink Floyd


Re: [Struts 2] If exists tag?

2007-07-18 Thread Musachy Barroso


...


musachy

On 7/18/07, Neil Aggarwal <[EMAIL PROTECTED]> wrote:


Hello:

Is there a struts tag to check if a collection is not null
and has at least one element?

I want to check a collection before printing the table
containing the elements using an  tag.

Thanks,
Neil


--
Neil Aggarwal, (832)245-7314, www.JAMMConsulting.com
FREE! Eliminate junk email and reclaim your inbox.
Visit http://www.spammilter.com for details.


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





--
"Hey you! Would you help me to carry the stone?" Pink Floyd


Re: S2: YUI plugin and autocompleter

2007-07-18 Thread Musachy Barroso

I think IFrame is used by default when IE is detected

musachy

On 7/18/07, Pierre Goupil <[EMAIL PROTECTED]> wrote:


I'm not sure but maybe its due to a bug in IE. See :

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

and look for the "use iframe" parameter. Which give this :

myAutoComp.useIFrame = true;

My 2 cents,

Pierre Goupil



2007/7/18, Scott Nesbitt <[EMAIL PROTECTED]>:
>
>
> Using the YUI plugin with the Yahoo autocompleter is
> working pretty well, but the autocompletion dropdown
> is not positioned under the textfield.  Here is my
> markup:
>
> action="AjaxTest"
>namespace="/nodecorate"
>includeParams='none'/>
>
> State:
>   name="state"
>   href="%{#statesUrl}"
>   delay="0"
>   forceValidOption="true"
>   cssStyle="width:320px"
>   containerCssStyle="width:320px"
> />
> 
>
> Is there something I have to do to get the dropdown
> positioned correctly?  Does anyone else see this?
>
> Thanks,
>
> Scott
>
>
>
>
>

> Need a vacation? Get great deals
> to amazing places on Yahoo! Travel.
> http://travel.yahoo.com/
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


--
"Si le sang ne coule pas assez chaud dans tes veines,
je le répandrais sur le sable pour qu'il bouille au soleil."

(Maraxus de Kelde)





--
"Hey you! Would you help me to carry the stone?" Pink Floyd


Re: FieldExpressionValidator: How do I reference field names?

2007-07-18 Thread Eric Rank
At risk of pointing out the obvious, I notice is that your expression  
validates when:


1. reason is "friend"
2. and when friendEmail is null

I'm guessing that you want it to successfully validate when

1. reason equals "friend"
2. And when friendEmail IS NOT null

Could that be the problem?

I only point it out because the backwards logic involved with  
validators has bitten me in the past. I always have to remind myself  
that my validators test for things that I want, not for things that  
will cause failure.


Eric Rank




On Jul 18, 2007, at 3:08 PM, mraible wrote:



That didn't work - how about this: http://rafb.net/p/cmnEKB18.html


mraible wrote:


Looks like Nabble was escaping my HTML - let's try again with HTML  
Format

checked:



true
Reason is required.





friendEmail
reason.equals('friend') and friendEmail == null
Please provide your friend's email





reason.equals('friend') and friendEmail == null
Please provide your friend's email




Musachy Barroso wrote:


I've read this like 10 times just to make sure I'm not missing  
something,

but:

 
   friendEmail
   reason.equals('friend') and friendEmail == null
   Please provide your friend's email
   


why is "friendEmail" in the expression?(should be "
reason.equals('friend')
and friendEmail == null" right?)

musachy

On 7/18/07, mraible <[EMAIL PROTECTED]> wrote:



I'm trying to use a FieldExpressionValidator (or  
ExpressionValidator) to
compare fields. Unfortunately, it doesn't seem to be working. I  
have a

radio
button (named "reason") and a text field named "friendEmail". If  
the

selected radio has a reason of "friend", I want to require the text
field.
However, the expression "reason.equals('friend') and friendEmail ==
null"
doesn't seem to work. Is this expression syntax correct, or do I  
have to

do
something additional to get a handle on the "reason" and  
"friendEmail"

values?



true
Reason is a required field.




friendEmail
reason.equals('friend') and friendEmail == null
Please provide your friend's email


I've also tried the following, but no dice:



reason.equals('friend')
Please provide your friend's email



Thanks,

Matt
--
View this message in context:
http://www.nabble.com/FieldExpressionValidator%3A-How-do-I- 
reference-field-names--tf4104715.html#a11673436

Sent from the Struts - User mailing list archive at Nabble.com.


--- 
--

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





--
"Hey you! Would you help me to carry the stone?" Pink Floyd







--
View this message in context: http://www.nabble.com/ 
FieldExpressionValidator%3A-How-do-I-reference-field-names-- 
tf4104715.html#a11677727

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: tree view in struts

2007-07-18 Thread Laurie Harper

Session A Mwamufiya wrote:

Hi All,

Has anyone come across an struts 2 example that uses a tree viewer to represent 
categories and questions, like what eclipse has for its online help webpage.  
I'd like to copy a similar example for a project I'm working on.  Any help 
would be much appreciated.


Is this what you're looking for?
http://struts.apache.org/2.x/docs/tree.html


ObWhine: please don't post unrelated questions to an existing thread. Be 
sure to start a new thread (with an appropriate subject) by sending a 
fresh message to the list, rather than using Reply To.


L.


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



Re: FieldExpressionValidator: How do I reference field names?

2007-07-18 Thread Musachy Barroso

Looks ok, here is one that I have:

   
   
   
   'AMERICAN_EXPRESS'.equals(customer.creditCards
[0].type.toString())
   || 'VISA'.equals(customer.creditCards[0].type.toString())
   || 'DISCOVER'.equals(customer.creditCards
[0].type.toString())
   || 'MASTERCARD'.equals(customer.creditCards
[0].type.toString())
   
   Credit Card Type must be American Express, Visa,
MasterCard, Discover
   
   

//is ther an "in" operator in OGNL?

musachy

On 7/18/07, mraible <[EMAIL PROTECTED]> wrote:



That didn't work - how about this: http://rafb.net/p/cmnEKB18.html


mraible wrote:
>
> Looks like Nabble was escaping my HTML - let's try again with HTML
Format
> checked:
>
> 
> 
> true
> Reason is required.
> 
> 
>
> 
> 
> friendEmail
> reason.equals('friend') and friendEmail == null
> Please provide your friend's email
> 
>
> 
> 
> 
> reason.equals('friend') and friendEmail == null
> Please provide your friend's email
> 
> 
>
>
> Musachy Barroso wrote:
>>
>> I've read this like 10 times just to make sure I'm not missing
something,
>> but:
>>
>>  
>>friendEmail
>>reason.equals('friend') and friendEmail == null
>>Please provide your friend's email
>>
>>
>>
>> why is "friendEmail" in the expression?(should be "
>> reason.equals('friend')
>> and friendEmail == null" right?)
>>
>> musachy
>>
>> On 7/18/07, mraible <[EMAIL PROTECTED]> wrote:
>>>
>>>
>>> I'm trying to use a FieldExpressionValidator (or ExpressionValidator)
to
>>> compare fields. Unfortunately, it doesn't seem to be working. I have a
>>> radio
>>> button (named "reason") and a text field named "friendEmail". If the
>>> selected radio has a reason of "friend", I want to require the text
>>> field.
>>> However, the expression "reason.equals('friend') and friendEmail ==
>>> null"
>>> doesn't seem to work. Is this expression syntax correct, or do I have
to
>>> do
>>> something additional to get a handle on the "reason" and "friendEmail"
>>> values?
>>>
>>> 
>>> 
>>> true
>>> Reason is a required field.
>>> 
>>> 
>>>
>>> 
>>> friendEmail
>>> reason.equals('friend') and friendEmail == null
>>> Please provide your friend's email
>>> 
>>>
>>> I've also tried the following, but no dice:
>>>
>>> 
>>> 
>>> reason.equals('friend')
>>> Please provide your friend's email
>>> 
>>> 
>>>
>>> Thanks,
>>>
>>> Matt
>>> --
>>> View this message in context:
>>>
http://www.nabble.com/FieldExpressionValidator%3A-How-do-I-reference-field-names--tf4104715.html#a11673436
>>> Sent from the Struts - User mailing list archive at Nabble.com.
>>>
>>>
>>> -
>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>
>>>
>>
>>
>> --
>> "Hey you! Would you help me to carry the stone?" Pink Floyd
>>
>>
>
>

--
View this message in context:
http://www.nabble.com/FieldExpressionValidator%3A-How-do-I-reference-field-names--tf4104715.html#a11677727
Sent from the Struts - User mailing list archive at Nabble.com.


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





--
"Hey you! Would you help me to carry the stone?" Pink Floyd


[Struts 2] If exists tag?

2007-07-18 Thread Neil Aggarwal
Hello:

Is there a struts tag to check if a collection is not null
and has at least one element?

I want to check a collection before printing the table
containing the elements using an  tag.

Thanks,
Neil


--
Neil Aggarwal, (832)245-7314, www.JAMMConsulting.com
FREE! Eliminate junk email and reclaim your inbox.
Visit http://www.spammilter.com for details.


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



Re: Don't expose .action to user?

2007-07-18 Thread Chris Pratt

We had the same concern, so by putting this in the top of our struts.xml:

 

It makes all the actions look like regular old .html requests.
 (*Chris*)

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



Re: S2: YUI plugin and autocompleter

2007-07-18 Thread Pierre Goupil

I'm not sure but maybe its due to a bug in IE. See :

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

and look for the "use iframe" parameter. Which give this :

myAutoComp.useIFrame = true;

My 2 cents,

Pierre Goupil



2007/7/18, Scott Nesbitt <[EMAIL PROTECTED]>:



Using the YUI plugin with the Yahoo autocompleter is
working pretty well, but the autocompletion dropdown
is not positioned under the textfield.  Here is my
markup:



State:
   


Is there something I have to do to get the dropdown
positioned correctly?  Does anyone else see this?

Thanks,

Scott





Need a vacation? Get great deals
to amazing places on Yahoo! Travel.
http://travel.yahoo.com/

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





--
"Si le sang ne coule pas assez chaud dans tes veines,
je le répandrais sur le sable pour qu'il bouille au soleil."

(Maraxus de Kelde)


Don't expose .action to user?

2007-07-18 Thread Kevin Lawrence

Hi,

I am a struts newbie and am exploring struts2 for a website rewrite.

I don't want the user to know whether or not they are accessing an 
action - and I don't want to expose the .action suffix in the url.


examples:

 http://www.junitfactory.com/demo
   - needs to go via DemoAction to /demo/index.jsp

 http://www.junitfactory.com/faq
   - will go straight to /faq/index.html


I came up with a way to do it.

My web.xml looks like this:

JUnit Factory


struts 
org.apache.struts2.dispatcher.FilterDispatcher




struts
*.action



main.action
index.html
index.jsp


It looks like tomcat won't use main.action unless a file main.action 
exists in the directory.


Most of the pages don't require an action and will just fall through to 
index.html or index.jsp. For the pages that do require an action, I'll 
create a main.action in the directory and an entry in struts.xml:




/demo/main.jsp




It seems to work in a simple example but, before I go too far, am I 
missing something that is obviously stupid? Is there a better way to do 
this?


Thanks,

Kevin



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



Re: FieldExpressionValidator: How do I reference field names?

2007-07-18 Thread mraible

That didn't work - how about this: http://rafb.net/p/cmnEKB18.html


mraible wrote:
> 
> Looks like Nabble was escaping my HTML - let's try again with HTML Format
> checked:
> 
> 
> 
> true
> Reason is required.
> 
> 
> 
> 
> 
> friendEmail
> reason.equals('friend') and friendEmail == null
> Please provide your friend's email
> 
> 
> 
> 
> 
> reason.equals('friend') and friendEmail == null
> Please provide your friend's email
> 
> 
> 
> 
> Musachy Barroso wrote:
>> 
>> I've read this like 10 times just to make sure I'm not missing something,
>> but:
>> 
>>  
>>friendEmail
>>reason.equals('friend') and friendEmail == null
>>Please provide your friend's email
>>
>> 
>> 
>> why is "friendEmail" in the expression?(should be "
>> reason.equals('friend')
>> and friendEmail == null" right?)
>> 
>> musachy
>> 
>> On 7/18/07, mraible <[EMAIL PROTECTED]> wrote:
>>>
>>>
>>> I'm trying to use a FieldExpressionValidator (or ExpressionValidator) to
>>> compare fields. Unfortunately, it doesn't seem to be working. I have a
>>> radio
>>> button (named "reason") and a text field named "friendEmail". If the
>>> selected radio has a reason of "friend", I want to require the text
>>> field.
>>> However, the expression "reason.equals('friend') and friendEmail ==
>>> null"
>>> doesn't seem to work. Is this expression syntax correct, or do I have to
>>> do
>>> something additional to get a handle on the "reason" and "friendEmail"
>>> values?
>>>
>>> 
>>> 
>>> true
>>> Reason is a required field.
>>> 
>>> 
>>>
>>> 
>>> friendEmail
>>> reason.equals('friend') and friendEmail == null
>>> Please provide your friend's email
>>> 
>>>
>>> I've also tried the following, but no dice:
>>>
>>> 
>>> 
>>> reason.equals('friend')
>>> Please provide your friend's email
>>> 
>>> 
>>>
>>> Thanks,
>>>
>>> Matt
>>> --
>>> View this message in context:
>>> http://www.nabble.com/FieldExpressionValidator%3A-How-do-I-reference-field-names--tf4104715.html#a11673436
>>> Sent from the Struts - User mailing list archive at Nabble.com.
>>>
>>>
>>> -
>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>
>>>
>> 
>> 
>> -- 
>> "Hey you! Would you help me to carry the stone?" Pink Floyd
>> 
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/FieldExpressionValidator%3A-How-do-I-reference-field-names--tf4104715.html#a11677727
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: FieldExpressionValidator: How do I reference field names?

2007-07-18 Thread mraible

Looks like Nabble was escaping my HTML - let's try again with HTML Format
checked:



true
Reason is required.





friendEmail
reason.equals('friend') and friendEmail == null
Please provide your friend's email





reason.equals('friend') and friendEmail == null
Please provide your friend's email




Musachy Barroso wrote:
> 
> I've read this like 10 times just to make sure I'm not missing something,
> but:
> 
>  
>friendEmail
>reason.equals('friend') and friendEmail == null
>Please provide your friend's email
>
> 
> 
> why is "friendEmail" in the expression?(should be "
> reason.equals('friend')
> and friendEmail == null" right?)
> 
> musachy
> 
> On 7/18/07, mraible  wrote:
>>
>>
>> I'm trying to use a FieldExpressionValidator (or ExpressionValidator) to
>> compare fields. Unfortunately, it doesn't seem to be working. I have a
>> radio
>> button (named "reason") and a text field named "friendEmail". If the
>> selected radio has a reason of "friend", I want to require the text
>> field.
>> However, the expression "reason.equals('friend') and friendEmail == null"
>> doesn't seem to work. Is this expression syntax correct, or do I have to
>> do
>> something additional to get a handle on the "reason" and "friendEmail"
>> values?
>>
>> 
>> 
>> true
>> Reason is a required field.
>> 
>> 
>>
>> 
>> friendEmail
>> reason.equals('friend') and friendEmail == null
>> Please provide your friend's email
>> 
>>
>> I've also tried the following, but no dice:
>>
>> 
>> 
>> reason.equals('friend')
>> Please provide your friend's email
>> 
>> 
>>
>> Thanks,
>>
>> Matt
>> --
>> View this message in context:
>> http://www.nabble.com/FieldExpressionValidator%3A-How-do-I-reference-field-names--tf4104715.html#a11673436
>> Sent from the Struts - User mailing list archive at Nabble.com.
>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
> 
> 
> -- 
> "Hey you! Would you help me to carry the stone?" Pink Floyd
> 
> 

-- 
View this message in context: 
http://www.nabble.com/FieldExpressionValidator%3A-How-do-I-reference-field-names--tf4104715.html#a11677716
Sent from the Struts - User mailing list archive at Nabble.com.


Re: FieldExpressionValidator: How do I reference field names?

2007-07-18 Thread Eric Rank

Hi Matt,

I've used the fieldexpression validator with some success. I use the  
 element. I would have written the validator  
as follows:




   
  

  Please provide your friend's email
   


It's unrelated to your probblem directly, but I DO wish that the  
validation framework would allow a sort of inverse short circuiting.  
In some cases, if one field-validator passes, it would be nice to  
skip the others.


Eric Rank


On Jul 18, 2007, at 11:38 AM, mraible wrote:



I'm trying to use a FieldExpressionValidator (or  
ExpressionValidator) to
compare fields. Unfortunately, it doesn't seem to be working. I  
have a radio

button (named "reason") and a text field named "friendEmail". If the
selected radio has a reason of "friend", I want to require the text  
field.
However, the expression "reason.equals('friend') and friendEmail ==  
null"
doesn't seem to work. Is this expression syntax correct, or do I  
have to do

something additional to get a handle on the "reason" and "friendEmail"
values?



true
Reason is a required field.




friendEmail
reason.equals('friend') and friendEmail == null
Please provide your friend's email


I've also tried the following, but no dice:



reason.equals('friend')
Please provide your friend's email



Thanks,

Matt
--


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



Re: Need help: not parsed

2007-07-18 Thread orshoe

I am having the exact same problem, except I am also using Freemarker along
with Sitemesh and Struts 2. I tried using the  style tags
as well as the OGNL style <@decorator.head/> tags. Viewing the source of the
rendered page on the browser doesn't show the tags themselves (for the OGNL
styled ones) on the source. However, the head and body are not rendered from
the page either. Am I missing something like the order of the filters, or a
filter itself? Please see the filter config in my web.xml:


struts-cleanup
   
org.apache.struts2.dispatcher.ActionContextCleanUp



Struts2
   
org.apache.struts2.dispatcher.FilterDispatcher


   
sitemesh
   
org.apache.struts2.sitemesh.FreeMarkerPageFilter



struts-cleanup
/*



Struts2
/*



sitemesh
/*


Please advise.


Rosalia Lee wrote:
> 
> Hi,
> 
> I'm new to SiteMesh and have been trying to use SiteMesh, Struts 2 with
> SiteMesh Plugin and Java 5 for a project. I have been stucked with this
> problem for a couple days. Thanks in advance for your help.  It will be
> greatly appreciated! 
> 
> Problem: When I requested index.html or index.jsp, the result page was
> decorated, but it didn't show the contenct because the 
> and  tags were not parsed or replaced with content in
> the requested page.
> 
> *** 
> This is my web.xml 
> 
>  xmlns="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";> 
> 
> Prototype Application 
> 
>  
>   struts-cleanup 
>   org.apache.struts2.dispatcher.ActionContextCleanUp er-class> 
>  
>  
>   sitemesh 
>   org.apache.struts2.sitemesh.FreeMarkerPageFilter -class> 
>  
>  
>   struts2 
>   org.apache.struts2.dispatcher.FilterDispatcher lass> 
>  
> 
>  
>   struts-cleanup 
>   /* 
>  
>  
>   sitemesh 
>   /* 
>  
> 
>  
>   struts2 
>   /* 
>  
> 
>  
>   index.html 
>   index.jsp 
>  
>  
> 
> * 
> This is my sitemesh.xml 
> 
>  
>
>
> 
>
> class="com.opensymphony.module.sitemesh.parser.HTMLPageParser" /> 
>class="com.opensymphony.module.sitemesh.parser.HTMLPageParser" /> 
>
> 
>
>  class="com.opensymphony.module.sitemesh.mapper.ConfigDecoratorMapper"> 
>
>  
>
>  
> 
> ** 
> baseTemplate.jsp (this is my decorator) 
> 
> <%@ taglib uri="http://www.opensymphony.com/sitemesh/decorator";
> prefix="decorator" %> 
> 
>  
>  
>   Static Title from Decorator Page 
>
>  
> 
>  
>   Static Text from Decorator Page 
> 
>
>  
>  
> 
> * 
> This is my index.html and index.jsp. (I tried both files, but neither
> work) 
> 
>  
>  
> Header from requested page 
>  
>  
> Directly under war dir. TESTING!!! 
> Click 
>  
> 
> 
> Thanks for your help in advanace.
> 
> Rosalia
> 

-- 
View this message in context: 
http://www.nabble.com/Need-help%3A-%3Cdecorator%3Abody--%3E-not-parsed-tf4070536.html#a11677520
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: Tiles 2.0.3 Plug-in

2007-07-18 Thread Eric Buitenhuis

I'm not a place where I can reference, but I seem to remember having to add
chain config to the web.xml.





On 7/18/07, Jiang, Jane (NIH/NCI) [C] <[EMAIL PROTECTED]> wrote:


Hi all,

Has any one got tiles plug-in to work with tiles version 2.0.3 or 2.0.4?

We have developed a Struts 2 application that uses tiles plug in 2.0.6
with tiles-api-2.0-20070207.130156-4.jar and
tiles-core-2.0-20070207.130156-4.jar.  When I tried to replace these two
jar files with the three 2.0.3 tiles jar files.  I could not start my
application in Tomcat.  This is the error I got.

ERROR Thread-1
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/acr] -
Exception sending context initialized event to listener instance of
class org.apache.struts2.tiles.StrutsTilesListener
java.lang.NullPointerException
at
org.apache.tiles.context.ChainedTilesContextFactory.createApplicationCon
text(ChainedTilesContextFactory.java:107)
at
org.apache.struts2.tiles.StrutsTilesContainerFactory$StrutsTilesContextF
actory.createApplicationContext(StrutsTilesContainerFactory.java:98)
at
org.apache.struts2.tiles.StrutsTilesContainerFactory.initializeContainer
(StrutsTilesContainerFactory.java:68)
at
org.apache.tiles.factory.TilesContainerFactory.createTilesContainer(Tile
sContainerFactory.java:199)
at
org.apache.tiles.factory.TilesContainerFactory.createContainer(TilesCont
ainerFactory.java:164)
at
org.apache.tiles.listener.TilesListener.createContainer(TilesListener.ja
va:91)
at
org.apache.struts2.tiles.StrutsTilesListener.createContainer(StrutsTiles
Listener.java:66)
at
org.apache.tiles.listener.TilesListener.contextInitialized(TilesListener
.java:58)
at
org.apache.catalina.core.StandardContext.listenerStart(StandardContext.j
ava:3764)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4216
)
at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.ja
va:760)
at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740)
at
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544)
at
org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:825)
at
org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:714)
at
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:490)
at
org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)
at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:31
1)
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSu
pport.java:120)
at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1022)
at
org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at
org.apache.catalina.core.StandardService.start(StandardService.java:448)
at
org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
ERROR Thread-1 org.apache.catalina.core.StandardContext - Error
listenerStart
ERROR Thread-1 org.apache.catalina.core.StandardContext - Context [/acr]
startup failed due to previous errors


As far as I can tell, the documentation for tiles plug-in did not
change.  Is there anything else I need to do that is not documented for
release 2.0.3?

Thanks a lot for your help,

Jane

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




Re: FieldExpressionValidator: How do I reference field names?

2007-07-18 Thread Musachy Barroso

I've read this like 10 times just to make sure I'm not missing something,
but:


  friendEmail
  reason.equals('friend') and friendEmail == null
  Please provide your friend's email
  


why is "friendEmail" in the expression?(should be " reason.equals('friend')
and friendEmail == null" right?)

musachy

On 7/18/07, mraible <[EMAIL PROTECTED]> wrote:



I'm trying to use a FieldExpressionValidator (or ExpressionValidator) to
compare fields. Unfortunately, it doesn't seem to be working. I have a
radio
button (named "reason") and a text field named "friendEmail". If the
selected radio has a reason of "friend", I want to require the text field.
However, the expression "reason.equals('friend') and friendEmail == null"
doesn't seem to work. Is this expression syntax correct, or do I have to
do
something additional to get a handle on the "reason" and "friendEmail"
values?



true
Reason is a required field.




friendEmail
reason.equals('friend') and friendEmail == null
Please provide your friend's email


I've also tried the following, but no dice:



reason.equals('friend')
Please provide your friend's email



Thanks,

Matt
--
View this message in context:
http://www.nabble.com/FieldExpressionValidator%3A-How-do-I-reference-field-names--tf4104715.html#a11673436
Sent from the Struts - User mailing list archive at Nabble.com.


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





--
"Hey you! Would you help me to carry the stone?" Pink Floyd


Tiles 2.0.3 Plug-in

2007-07-18 Thread Jiang, Jane (NIH/NCI) [C]
Hi all,

Has any one got tiles plug-in to work with tiles version 2.0.3 or 2.0.4?

We have developed a Struts 2 application that uses tiles plug in 2.0.6
with tiles-api-2.0-20070207.130156-4.jar and
tiles-core-2.0-20070207.130156-4.jar.  When I tried to replace these two
jar files with the three 2.0.3 tiles jar files.  I could not start my
application in Tomcat.  This is the error I got.

ERROR Thread-1
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/acr] -
Exception sending context initialized event to listener instance of
class org.apache.struts2.tiles.StrutsTilesListener
java.lang.NullPointerException
at
org.apache.tiles.context.ChainedTilesContextFactory.createApplicationCon
text(ChainedTilesContextFactory.java:107)
at
org.apache.struts2.tiles.StrutsTilesContainerFactory$StrutsTilesContextF
actory.createApplicationContext(StrutsTilesContainerFactory.java:98)
at
org.apache.struts2.tiles.StrutsTilesContainerFactory.initializeContainer
(StrutsTilesContainerFactory.java:68)
at
org.apache.tiles.factory.TilesContainerFactory.createTilesContainer(Tile
sContainerFactory.java:199)
at
org.apache.tiles.factory.TilesContainerFactory.createContainer(TilesCont
ainerFactory.java:164)
at
org.apache.tiles.listener.TilesListener.createContainer(TilesListener.ja
va:91)
at
org.apache.struts2.tiles.StrutsTilesListener.createContainer(StrutsTiles
Listener.java:66)
at
org.apache.tiles.listener.TilesListener.contextInitialized(TilesListener
.java:58)
at
org.apache.catalina.core.StandardContext.listenerStart(StandardContext.j
ava:3764)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4216
)
at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.ja
va:760)
at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740)
at
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544)
at
org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:825)
at
org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:714)
at
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:490)
at
org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)
at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:31
1)
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSu
pport.java:120)
at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1022)
at
org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at
org.apache.catalina.core.StandardService.start(StandardService.java:448)
at
org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
ERROR Thread-1 org.apache.catalina.core.StandardContext - Error
listenerStart
ERROR Thread-1 org.apache.catalina.core.StandardContext - Context [/acr]
startup failed due to previous errors 


As far as I can tell, the documentation for tiles plug-in did not
change.  Is there anything else I need to do that is not documented for
release 2.0.3?

Thanks a lot for your help,

Jane

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



Re: Open Source Struts Dating Application

2007-07-18 Thread Leon Rosenberg

run it by yourself and make a lot of money like the guy who owns
plentyoffish.com

On 7/18/07, Strut Date <[EMAIL PROTECTED]> wrote:

Hi

  I have been writing a Struts based dating application for the last 2 years, 
and would like to explore the possibility of contributing this to the Apache SW 
Foundation.  I wondered whether this would be possible, and if so, what would 
be involved / who I should contact.

  Functionality Includes

  - Buddylists / Hotlists
  - Date Search (Zip & City Based)
  - Webmail
  - Integration to Instant Messaging (Userplane)
  - Photo Management
  - Profile Management
  - Log4J Loging

  There are many areas in which the application could be improved, and extended 
into a broader social space application.  Any comments would be appreciated.


-
Got a little couch potato?
Check out fun summer activities for kids.


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



Open Source Struts Dating Application

2007-07-18 Thread Strut Date
Hi
   
  I have been writing a Struts based dating application for the last 2 years, 
and would like to explore the possibility of contributing this to the Apache SW 
Foundation.  I wondered whether this would be possible, and if so, what would 
be involved / who I should contact.  
   
  Functionality Includes
   
  - Buddylists / Hotlists
  - Date Search (Zip & City Based)
  - Webmail
  - Integration to Instant Messaging (Userplane)
  - Photo Management 
  - Profile Management
  - Log4J Loging
   
  There are many areas in which the application could be improved, and extended 
into a broader social space application.  Any comments would be appreciated. 

   
-
Got a little couch potato? 
Check out fun summer activities for kids.

Re: Tiles plugin and no contentType

2007-07-18 Thread Antonio Petrelli

2007/7/18, Roberto Nunnari <[EMAIL PROTECTED]>:


Are you going to create a new jira issue or reopen an old one so
that I can watch it?




The old one, WW-1724, is still open, due to a non-completion of the task:
https://issues.apache.org/struts/browse/WW-1724
so you can watch it :-)

Antonio


treeview in struts 2

2007-07-18 Thread Session A Mwamufiya
Hi,

Has anyone used a treeviewer in a struts 2 project?  I'm looking to generate a 
tree view from a database of categories and questions, and have the tree update 
when the database is changed from a web page.

Thanks,
Session


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



Loading Screen!!

2007-07-18 Thread adambomb

Hi 
Im trying to make a loading jsp for a another jsp which takes considerable
time pulling out huge amount of data. 
Can some body help me in making a loading screen which is displayed(perhaps
with hepl of javascript) while the page is loading a redirects to the actual
page once it has got the result. 
Another way is to display partial page as it loads.eg 20 rows at a time.And
keeps on loading untill the whole result is recieved. 
What would be the better way. 
Pls provide detailed solution 
Thanks
-- 
View this message in context: 
http://www.nabble.com/Loading-Screen%21%21-tf4105086.html#a11674430
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: Tiles plugin and no contentType

2007-07-18 Thread Antonio Petrelli

2007/7/18, Antonio Petrelli <[EMAIL PROTECTED]>:


2007/7/18, Antonio Petrelli <[EMAIL PROTECTED]>:
>
> 2007/7/18, Roberto Nunnari <[EMAIL PROTECTED]>:
> >
> > If I telnet to the tomcat server on port 8080 I don't get the
> > contentType header for the tiles pages.
>
>
>
>  Strange... Using the showcase in trunk of Struts 2 it works correctly.
> I will try to check it in Struts 2.0.8 ASAP.
>


It seems that you are right. I check the Struts 2 showcase and the Tiles
test responded without a content type! It needs further investigation




This is definitely my fault, I forgot to merge from the trunk to the 2.0branch!
Now I committed the change, so it will appear in Struts 2.0.9.

Thanks a lot Roberto :-)

Antonio


Re: Tiles plugin and no contentType

2007-07-18 Thread Roberto Nunnari

Antonio Petrelli wrote:

2007/7/18, Antonio Petrelli <[EMAIL PROTECTED]>:


2007/7/18, Roberto Nunnari <[EMAIL PROTECTED]>:
>
> If I telnet to the tomcat server on port 8080 I don't get the
> contentType header for the tiles pages.



 Strange... Using the showcase in trunk of Struts 2 it works correctly.
I will try to check it in Struts 2.0.8 ASAP.




It seems that you are right. I check the Struts 2 showcase and the Tiles
test responded without a content type! It needs further investigation

Antonio



Thank you Antonio.

Are you going to create a new jira issue or reopen an old one so
that I can watch it?

--
Robi

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



Struts 2 + Xwork validation problems

2007-07-18 Thread Art Krahenbuhl

We recently migrated our project over from WebWork to Struts 2.  The move was
fairly painless, however, there is one issue that is plaguing us.  Whenever
it seems that we use a *-validation.xml file to do our validation, it
doesn't complete and throws a large stack trace.  I'll attach a snippet of
the trace (and I can provide the entire stack trace if needed).  The error
comes up as either an ExceptionInInitializerError or a NoClassDefFoundError
(we've gotten both consistently).  Granted all of these problems go away if
we use just the validate() method, but we had all validation working in
WebWork - any help on this strange issue would be appreciated.

In regards to the NoClassDefFoundError, the class that can't be found isn't
specified.  Perhaps I'm not including a required jar, but I'm not sure what
jar could be missing.


StackTrace:

java.lang.ExceptionInInitializerError

com.opensymphony.xwork2.validator.ValidatorFileParser.addValidatorConfigs(ValidatorFileParser.java:192)

com.opensymphony.xwork2.validator.ValidatorFileParser.parseActionValidatorConfigs(ValidatorFileParser.java:72)

com.opensymphony.xwork2.validator.AnnotationActionValidatorManager.loadFile(AnnotationActionValidatorManager.java:361)

com.opensymphony.xwork2.validator.AnnotationActionValidatorManager.buildClassValidatorConfigs(AnnotationActionValidatorManager.java:252)

com.opensymphony.xwork2.validator.AnnotationActionValidatorManager.buildValidatorConfigs(AnnotationActionValidatorManager.java:340)

com.opensymphony.xwork2.validator.AnnotationActionValidatorManager.getValidators(AnnotationActionValidatorManager.java:69)

com.opensymphony.xwork2.validator.AnnotationActionValidatorManager.validate(AnnotationActionValidatorManager.java:138)

com.opensymphony.xwork2.validator.AnnotationActionValidatorManager.validate(AnnotationActionValidatorManager.java:113)

com.opensymphony.xwork2.validator.AnnotationActionValidatorManager.validate(AnnotationActionValidatorManager.java:100)

com.opensymphony.xwork2.validator.ValidationInterceptor.doBeforeInvocation(ValidationInterceptor.java:142)

com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:148)

org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:48)

com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86)

com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)

com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)

com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)

com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
-- 
View this message in context: 
http://www.nabble.com/Struts-2-%2B-Xwork-validation-problems-tf4104770.html#a11673570
Sent from the Struts - User mailing list archive at Nabble.com.


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



FieldExpressionValidator: How do I reference field names?

2007-07-18 Thread mraible

I'm trying to use a FieldExpressionValidator (or ExpressionValidator) to
compare fields. Unfortunately, it doesn't seem to be working. I have a radio
button (named "reason") and a text field named "friendEmail". If the
selected radio has a reason of "friend", I want to require the text field.
However, the expression "reason.equals('friend') and friendEmail == null"
doesn't seem to work. Is this expression syntax correct, or do I have to do
something additional to get a handle on the "reason" and "friendEmail"
values?



true
Reason is a required field.




friendEmail
reason.equals('friend') and friendEmail == null
Please provide your friend's email


I've also tried the following, but no dice:



reason.equals('friend')
Please provide your friend's email



Thanks,

Matt
-- 
View this message in context: 
http://www.nabble.com/FieldExpressionValidator%3A-How-do-I-reference-field-names--tf4104715.html#a11673436
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: Tiles plugin and no contentType

2007-07-18 Thread Antonio Petrelli

2007/7/18, Antonio Petrelli <[EMAIL PROTECTED]>:


2007/7/18, Roberto Nunnari <[EMAIL PROTECTED]>:
>
> If I telnet to the tomcat server on port 8080 I don't get the
> contentType header for the tiles pages.



 Strange... Using the showcase in trunk of Struts 2 it works correctly.
I will try to check it in Struts 2.0.8 ASAP.




It seems that you are right. I check the Struts 2 showcase and the Tiles
test responded without a content type! It needs further investigation

Antonio


Re: Struts2 and images from database

2007-07-18 Thread bartlebooth
Perhaps the result name in my example does not correspond to the return 
value of your action ?

I assume you are using the param interceptor here

public class ImageAction {
   privateint imageId;
   privateImage image;
  
   // this method is called when using the param-interceptor

   public void setImageId(int imageId) {
  this.imageId = imageId;
   }

   public InputStream getImageStream() {
  // create a stream from your image
   }

   public String execute() {
  // get image
  image = dao.getImage() // or something like that, could be in the 
prepare method if you're using the prepare interceptor


  return "all"; // if you use "success" here, you have to modify 
the result name in your struts.xml

   }
}

hope this helps

bartlebooth



Roberto Nunnari wrote:

Hi bartlebooth.

That is very neat!

But the getImageStream method in my action is never called..

why?



bartlebooth wrote:

You could use the stream result-type.

   
   image/jpg
   imageStream
   name="contentDisposition">filename="image.jpg"

   1024
   

In your action, you have to provide a method getImageStream 
(corresponding to the inputName parameter above).


public InputStream getImageStream() {
   // create a stream from your image
}


Josh Vickery wrote:
If you return null from your Action you can write directly to the 
response:


HttpServletResponse response = ServletActionContext.getResponse();
response.setContentType("image/jpg");
out = response.getOutputStream();
write image here
return null;

On 7/18/07, Roberto Nunnari <[EMAIL PROTECTED]> wrote:

hehe.. ok.. let's add some context..

Till now I was using a servlet to serve to the web images stored
in a database. To access the database I had the myDAO
object in the applicationContext and so it was accessible by
the servlet and actions.

Now I have added Spring to the game, and the myDAO object is
no longer in the applicationContext, as it is managed by Spring.

All my actions now extends a base class that has a setMyDAO
method, and so they get access to the myDAO object.

But what about the servlet? It will not be injected by Spring.

What is the solution?

Thank you.

Best regards.

--
Robi.



Roberto Nunnari wrote:
> Hello.
>
> What is the best way to serve images stored in database in Struts2?
>
> action, resultType, or servlet?
>
> Thank you.
>




-
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: Struts2 and images from database

2007-07-18 Thread Roberto Nunnari

my fault.. action.execute() was still returning SUCCESS while
the mapping result name is "all"!

Thank you!

--
Robi.


Roberto Nunnari wrote:

Hi bartlebooth.

That is very neat!

But the getImageStream method in my action is never called..

why?



bartlebooth wrote:

You could use the stream result-type.

   
   image/jpg
   imageStream
   name="contentDisposition">filename="image.jpg"

   1024
   

In your action, you have to provide a method getImageStream 
(corresponding to the inputName parameter above).


public InputStream getImageStream() {
   // create a stream from your image
}


Josh Vickery wrote:
If you return null from your Action you can write directly to the 
response:


HttpServletResponse response = ServletActionContext.getResponse();
response.setContentType("image/jpg");
out = response.getOutputStream();
write image here
return null;

On 7/18/07, Roberto Nunnari <[EMAIL PROTECTED]> wrote:

hehe.. ok.. let's add some context..

Till now I was using a servlet to serve to the web images stored
in a database. To access the database I had the myDAO
object in the applicationContext and so it was accessible by
the servlet and actions.

Now I have added Spring to the game, and the myDAO object is
no longer in the applicationContext, as it is managed by Spring.

All my actions now extends a base class that has a setMyDAO
method, and so they get access to the myDAO object.

But what about the servlet? It will not be injected by Spring.

What is the solution?

Thank you.

Best regards.

--
Robi.



Roberto Nunnari wrote:
> Hello.
>
> What is the best way to serve images stored in database in Struts2?
>
> action, resultType, or servlet?
>
> Thank you.
>




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



Re: Struts2 and images from database

2007-07-18 Thread Roberto Nunnari

Hi bartlebooth.

That is very neat!

But the getImageStream method in my action is never called..

why?



bartlebooth wrote:

You could use the stream result-type.

   
   image/jpg
   imageStream
   name="contentDisposition">filename="image.jpg"

   1024
   

In your action, you have to provide a method getImageStream 
(corresponding to the inputName parameter above).


public InputStream getImageStream() {
   // create a stream from your image
}


Josh Vickery wrote:
If you return null from your Action you can write directly to the 
response:


HttpServletResponse response = ServletActionContext.getResponse();
response.setContentType("image/jpg");
out = response.getOutputStream();
write image here
return null;

On 7/18/07, Roberto Nunnari <[EMAIL PROTECTED]> wrote:

hehe.. ok.. let's add some context..

Till now I was using a servlet to serve to the web images stored
in a database. To access the database I had the myDAO
object in the applicationContext and so it was accessible by
the servlet and actions.

Now I have added Spring to the game, and the myDAO object is
no longer in the applicationContext, as it is managed by Spring.

All my actions now extends a base class that has a setMyDAO
method, and so they get access to the myDAO object.

But what about the servlet? It will not be injected by Spring.

What is the solution?

Thank you.

Best regards.

--
Robi.



Roberto Nunnari wrote:
> Hello.
>
> What is the best way to serve images stored in database in Struts2?
>
> action, resultType, or servlet?
>
> Thank you.
>




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



Re: Tiles plugin and no contentType

2007-07-18 Thread Roberto Nunnari

Thank you Antonio.


Antonio Petrelli wrote:

2007/7/18, Roberto Nunnari <[EMAIL PROTECTED]>:


If I telnet to the tomcat server on port 8080 I don't get the
contentType header for the tiles pages.




Strange... Using the showcase in trunk of Struts 2 it works correctly.
I will try to check it in Struts 2.0.8 ASAP.

I thought the problem was solved, but maybe not in tiles 2.0.3

but instead in tiles 2.0.4?




It was resolved in Tiles 2.0.1.

Antonio




--
Roberto Nunnari
Servizi Informatici SUPSI-DTI
SUPSI-DTI - Via Cantonale - 6928 Manno - Switzerland
email: mailto:[EMAIL PROTECTED]
tel: +41-58-561


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



S2: YUI plugin and autocompleter

2007-07-18 Thread Scott Nesbitt

Using the YUI plugin with the Yahoo autocompleter is
working pretty well, but the autocompletion dropdown
is not positioned under the textfield.  Here is my
markup:



State:
   


Is there something I have to do to get the dropdown
positioned correctly?  Does anyone else see this?

Thanks,

Scott


   

Need a vacation? Get great deals
to amazing places on Yahoo! Travel.
http://travel.yahoo.com/

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



Re: Struts2 and images from database

2007-07-18 Thread bartlebooth

You could use the stream result-type.

   
   image/jpg
   imageStream
   name="contentDisposition">filename="image.jpg"

   1024
   

In your action, you have to provide a method getImageStream 
(corresponding to the inputName parameter above).


public InputStream getImageStream() {
   // create a stream from your image
}


Josh Vickery wrote:
If you return null from your Action you can write directly to the 
response:


HttpServletResponse response = ServletActionContext.getResponse();
response.setContentType("image/jpg");
out = response.getOutputStream();
write image here
return null;

On 7/18/07, Roberto Nunnari <[EMAIL PROTECTED]> wrote:

hehe.. ok.. let's add some context..

Till now I was using a servlet to serve to the web images stored
in a database. To access the database I had the myDAO
object in the applicationContext and so it was accessible by
the servlet and actions.

Now I have added Spring to the game, and the myDAO object is
no longer in the applicationContext, as it is managed by Spring.

All my actions now extends a base class that has a setMyDAO
method, and so they get access to the myDAO object.

But what about the servlet? It will not be injected by Spring.

What is the solution?

Thank you.

Best regards.

--
Robi.



Roberto Nunnari wrote:
> Hello.
>
> What is the best way to serve images stored in database in Struts2?
>
> action, resultType, or servlet?
>
> Thank you.
>


-
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]






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



Re: Tiles plugin and no contentType

2007-07-18 Thread Antonio Petrelli

2007/7/18, Roberto Nunnari <[EMAIL PROTECTED]>:


If I telnet to the tomcat server on port 8080 I don't get the
contentType header for the tiles pages.




Strange... Using the showcase in trunk of Struts 2 it works correctly.
I will try to check it in Struts 2.0.8 ASAP.

I thought the problem was solved, but maybe not in tiles 2.0.3

but instead in tiles 2.0.4?




It was resolved in Tiles 2.0.1.

Antonio


Re: Struts2 and images from database

2007-07-18 Thread Roberto Nunnari

Thank you Josh!

I'll try that right away..
I thought that struts actions could only return text..

Do you have to change the resultType for that action?

--
Robi


Josh Vickery wrote:

If you return null from your Action you can write directly to the response:

HttpServletResponse response = ServletActionContext.getResponse();
response.setContentType("image/jpg");
out = response.getOutputStream();
write image here
return null;

On 7/18/07, Roberto Nunnari <[EMAIL PROTECTED]> wrote:

hehe.. ok.. let's add some context..

Till now I was using a servlet to serve to the web images stored
in a database. To access the database I had the myDAO
object in the applicationContext and so it was accessible by
the servlet and actions.

Now I have added Spring to the game, and the myDAO object is
no longer in the applicationContext, as it is managed by Spring.

All my actions now extends a base class that has a setMyDAO
method, and so they get access to the myDAO object.

But what about the servlet? It will not be injected by Spring.

What is the solution?

Thank you.

Best regards.

--
Robi.



Roberto Nunnari wrote:
> Hello.
>
> What is the best way to serve images stored in database in Struts2?
>
> action, resultType, or servlet?
>
> Thank you.
>


-
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: Struts2 and images from database

2007-07-18 Thread Josh Vickery

If you return null from your Action you can write directly to the response:

HttpServletResponse response = ServletActionContext.getResponse();
response.setContentType("image/jpg");
out = response.getOutputStream();
write image here
return null;

On 7/18/07, Roberto Nunnari <[EMAIL PROTECTED]> wrote:

hehe.. ok.. let's add some context..

Till now I was using a servlet to serve to the web images stored
in a database. To access the database I had the myDAO
object in the applicationContext and so it was accessible by
the servlet and actions.

Now I have added Spring to the game, and the myDAO object is
no longer in the applicationContext, as it is managed by Spring.

All my actions now extends a base class that has a setMyDAO
method, and so they get access to the myDAO object.

But what about the servlet? It will not be injected by Spring.

What is the solution?

Thank you.

Best regards.

--
Robi.



Roberto Nunnari wrote:
> Hello.
>
> What is the best way to serve images stored in database in Struts2?
>
> action, resultType, or servlet?
>
> Thank you.
>


-
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: Struts2 and images from database

2007-07-18 Thread Roberto Nunnari

hehe.. ok.. let's add some context..

Till now I was using a servlet to serve to the web images stored
in a database. To access the database I had the myDAO
object in the applicationContext and so it was accessible by
the servlet and actions.

Now I have added Spring to the game, and the myDAO object is
no longer in the applicationContext, as it is managed by Spring.

All my actions now extends a base class that has a setMyDAO
method, and so they get access to the myDAO object.

But what about the servlet? It will not be injected by Spring.

What is the solution?

Thank you.

Best regards.

--
Robi.



Roberto Nunnari wrote:

Hello.

What is the best way to serve images stored in database in Struts2?

action, resultType, or servlet?

Thank you.




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



[OT] RE: [JAVA] using clas.forname()

2007-07-18 Thread Dave Newton
--- temp temp <[EMAIL PROTECTED]> wrote:
> but can  I call  Class.forName()   for same class
> more than  once 
>   exmple
>   class.forName("Test")
>   class.forName("Test")
>   even If i can do this i donot want to load the
> class once it is already  loaded so how  can I find
> if the class is already loaded ?

Search teh intarwebs for "singleton".

d.



  

Park yourself in front of a world of choices in alternative vehicles. Visit the 
Yahoo! Auto Green Center.
http://autos.yahoo.com/green_center/ 

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



Can Struts Action Servlet Re-poll struts-config.xml After Hot Sync with JBoss?

2007-07-18 Thread jameshurff

I am running MyEclipse, JBoss 4.0.5 GA and JDK 1.4.2

I am looking for a way to hot deploy my struts-config.xml and tiles-def.xml
changes.  Any suggestions on how to do this (and subsequently speed up my
development process) would be greatly appreciated.

See the transcript below from the MyEclipse forum...can I tell Struts to
check for changes and re-initialize the struts-config.xml context without
having to redeploy/restart the entire web application?

http://www.myeclipseide.com/PNphpBB2-viewtopic-t-18054.html

Subject: Hot Sync Of XML to JBoss Via MyEclipse 

I've attempted to find my answer in the JBoss forums and via Google. I have
a simple question... 

I run JBoss 4.0.5 and JDK 1.4.2_XX 

Can I perform a hot sync of XML files (e.g. struts-config.xml,
tiles-def.xml, spring application.xml) to JBoss via MyEclipse? I want to
save the file and have the changes immediately deployed to the JBoss
container like .java and .jsp files. Why can I not do this? 

support-rkalla  
 Post subject: RE: Hot Sync Of XML to JBoss Via MyEclipse  Posted: Jul 18,
2007 - 10:44 AM  
 
jhurff, 
MyEclipse will actually hot-sync this file (copy out the changed one)
immediately. The problem is that Struts is not written to *poll* the XML
file for changes, so you can update the XML file 700 times if you want, but
Struts only parses it once and keeps that copy in memory. 

*NOTE: Struts may have a setting to have it repoll that file, but I don't
know what it is. 

So right now the only way to get Struts to reload the changes is to reload
the web context itself, this forces the app server to kill the in-memory
objects and reload them (which in turn causes Struts to reparse the XML
file).
-- 
View this message in context: 
http://www.nabble.com/Can-Struts-Action-Servlet-Re-poll-struts-config.xml-After-Hot-Sync-with-JBoss--tf4103789.html#a11670420
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 and images from database

2007-07-18 Thread Roberto Nunnari

Hello.

What is the best way to serve images stored in database in Struts2?

action, resultType, or servlet?

Thank you.

--
Robi


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



Fwd: Group Total

2007-07-18 Thread Sachin

Here is a clear pic of my doubt.


* header row*



* columns *
 group-total row  <--- *how to get this?* --->



* grand-total row*


Regards.
Satheesh.C


-- Forwarded message --
From: Sachin <[EMAIL PROTECTED]>
Date: Jul 18, 2007 9:53 AM
Subject: Group Total
To: Struts Users Mailing List 



Hi ,

Here is an exmaple to get total value in footer. But i need to get this
value inside table for each grouped items as a separate row in the table.

 
 
 
 
 
   Total Bill:
   
 
 


Please help me on this. Is there any alternat way to do this without
using *total
*and *varTotals* attributes.



--
Satheesh.c


--
Satheesh.c


tree view in struts

2007-07-18 Thread Session A Mwamufiya
Hi All,

Has anyone come across an struts 2 example that uses a tree viewer to represent 
categories and questions, like what eclipse has for its online help webpage.  
I'd like to copy a similar example for a project I'm working on.  Any help 
would be much appreciated.

Thanks,
Session


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



Fwd: Group Total

2007-07-18 Thread Sachin

Any help would be greatly appreciated ... pls..


-- Forwarded message --
From: Sachin <[EMAIL PROTECTED]>
Date: Jul 18, 2007 10:03 AM
Subject: Re: Group Total
To: Struts Users Mailing List 


sorry for the typo.

I need the group total value in separate row in the table for each grouped
item.

Please help me on this.


On 7/18/07, Sachin <[EMAIL PROTECTED]> wrote:



Hi ,

Here is an exmaple to get total value in footer. But i need to get this
value inside table for each grouped items as a separate column in the table.

  
  
  
  
  
Total Bill:

  
  


Please help me on this. Is there any alternat way to do this without using
*total *and *varTotal* attributes.



--
Satheesh.c





--
Satheesh.c

--
Satheesh.c


Re: Group Total

2007-07-18 Thread Sachin

sorry for the typo.

I need the group total value in separate row in the table for each grouped
item.

Please help me on this.


On 7/18/07, Sachin <[EMAIL PROTECTED]> wrote:



Hi ,

Here is an exmaple to get total value in footer. But i need to get this
value inside table for each grouped items as a separate column in the table.

  
  
  
  
  
Total Bill:

  
  


Please help me on this. Is there any alternat way to do this without using
*total *and *varTotal* attributes.



--
Satheesh.c





--
Satheesh.c


Tiles plugin and no contentType

2007-07-18 Thread Roberto Nunnari

Hello.

I'm working on a new web application using 
Struts2/Tiles2/Spring/Hibernate3 and tomcat5.5.23

and I'm now facing a problem that after a web search seams
to be Tiles related.

I'm talking about the issue https://issues.apache.org/struts/browse/WW-1724
on Tiles that don't include the ContenType in the generated page.

I'm using the binary distribution of Struts 2.0.8 with the
Tiles plugin (2.0.3) that comes with Struts2 (I had to add
by hand tiles-jsp-2.0.3.jar that is missing in the S2 distribution).

Also I had to change web.xml to include:
***

contextCleanup

org.apache.struts2.dispatcher.ActionContextCleanUp


***
as I was having wierd problems and the above solved them.

If I telnet to the tomcat server on port 8080 I don't get the
contentType header for the tiles pages.

I thought the problem was solved, but maybe not in tiles 2.0.3
but instead in tiles 2.0.4?

Any hints?

Thank you.

--
Roberto Nunnari



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



RE: [JAVA] using clas.forname()

2007-07-18 Thread Al Sutton
You might get a problem if the class isn't there :).

-Original Message-
From: Neil Aggarwal [mailto:[EMAIL PROTECTED] 
Sent: 18 July 2007 14:47
To: 'Struts Users Mailing List'
Subject: RE: [JAVA] using clas.forname()


Miro:

You can call Class.forName() as many times as you
like without a problem.

Neil 

--
Neil Aggarwal, (832)245-7314, www.JAMMConsulting.com
FREE! Eliminate junk email and reclaim your inbox.
Visit http://www.spammilter.com for details.

-Original Message-
From: temp temp [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, July 18, 2007 8:45 AM
To: user@struts.apache.org
Subject: [JAVA] using clas.forname()

How can I  know whether a class is already loaded ?   
  or  if I call class.forname("Some class name")   twice will there be any
problems ?
  Thanks
  Miro

   
-
Need a vacation? Get great deals to amazing places on Yahoo! Travel. 


-
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: S2: Getting info from server via topic

2007-07-18 Thread Scott Nesbitt

Hmm, when I print out the value of the "data" argument
it seems to have the complete text of the JSP (in both
before and load sections of the function.)

All the JavaScript and HTML is in this argument. 
Could it be because this JSP is included from another
JSP like this?

<%@ include file="sports.jsp" %>

Thanks for the help,

Scott

--- Musachy Barroso <[EMAIL PROTECTED]> wrote:

> Anything that you write to the output stream on your
> action will be
> available on the "data" argument.
> 
> musachy
> 
> On 7/17/07, Scott Nesbitt <[EMAIL PROTECTED]>
> wrote:
> >
> >
> > For this topic:
> >
> > dojo.event.topic.subscribe("/saveTopic",
> > function(data, type, e)
> > {
> > // data : text returned
> > // type : "before", "load" or "error"
> > // e: request object
> >   if ('load' == type)
> >   {
> >
> >   }
> > }
> >
> > When my action on the server is successful the
> type is
> > set to load and things work great.  However, I
> would
> > like to send some data back from the server also
> (in
> > the "data" arg, I presume.)
> >
> > I posted this a week ago but got no response.  Is
> this
> > better asked in the Dojo list?
> >
> > Thanks,
> >
> > Scott
> >
> >
> >
> >  
>

> > Park yourself in front of a world of choices in
> alternative vehicles.
> > Visit the Yahoo! Auto Green Center.
> > http://autos.yahoo.com/green_center/
> >
> >
>
-
> > To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> > For additional commands, e-mail:
> [EMAIL PROTECTED]
> >
> >
> 
> 
> -- 
> "Hey you! Would you help me to carry the stone?"
> Pink Floyd
> 



  

Fussy? Opinionated? Impossible to please? Perfect.  Join Yahoo!'s user panel 
and lay it on us. http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7 


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



RE: [JAVA] using clas.forname()

2007-07-18 Thread temp temp

but can  I call  Class.forName()   for same class more than  once 
  exmple
  class.forName("Test")
  class.forName("Test")
  even If i can do this i donot want to load the class once it is already  
loaded so how  can I find if the class is already loaded ?
Miro
  Neil Aggarwal <[EMAIL PROTECTED]> wrote:  Miro:

You can call Class.forName() as many times as you
like without a problem.

 Neil 

--
Neil Aggarwal, (832)245-7314, www.JAMMConsulting.com
FREE! Eliminate junk email and reclaim your inbox.
Visit http://www.spammilter.com for details.

-Original Message-
From: temp temp [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, July 18, 2007 8:45 AM
To: user@struts.apache.org
Subject: [JAVA] using clas.forname()

How can I  know whether a class is already loaded ?   
  or  if I call class.forname("Some class name")   twice will there be any
problems ?
  Thanks
  Miro

   
-
Need a vacation? Get great deals to amazing places on Yahoo! Travel. 


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



   
-
Need a vacation? Get great deals to amazing places on Yahoo! Travel. 

Group Total

2007-07-18 Thread Sachin

Hi ,

Here is an exmaple to get total value in footer. But i need to get this
value inside table for each grouped items as a separate column in the table.

 
 
 
 
 
   Total Bill:
   
 
 


Please help me on this. Is there any alternat way to do this without
using *total
*and *varTotal* attributes.



--
Satheesh.c


Totaling Group

2007-07-18 Thread Sachin

Hi ,

Help me to get the totaled value of grouped items inside the body.

Here is an example


 
 
 
 
 Total Bill:
 
 
 


--
Satheesh.c


RE: [JAVA] using clas.forname()

2007-07-18 Thread Neil Aggarwal
Miro:

You can call Class.forName() as many times as you
like without a problem.

Neil 

--
Neil Aggarwal, (832)245-7314, www.JAMMConsulting.com
FREE! Eliminate junk email and reclaim your inbox.
Visit http://www.spammilter.com for details.

-Original Message-
From: temp temp [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, July 18, 2007 8:45 AM
To: user@struts.apache.org
Subject: [JAVA] using clas.forname()

How can I  know whether a class is already loaded ?   
  or  if I call class.forname("Some class name")   twice will there be any
problems ?
  Thanks
  Miro

   
-
Need a vacation? Get great deals to amazing places on Yahoo! Travel. 


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



[JAVA] using clas.forname()

2007-07-18 Thread temp temp
How can I  know whether a class is already loaded ?   
  or  if I call class.forname(“Some class name”)   twice will there be any 
problems ?
  Thanks
  Miro

   
-
Need a vacation? Get great deals to amazing places on Yahoo! Travel. 

RE: How can I add ActionErrors when do the interceptor's intercept() method?

2007-07-18 Thread Arnaud Cogoluegnes
Oops, my mistake: interceptor returns "needLogin" (global result) and not
"needAuthentication"  :-)

By the way, about the redirect result, it indeed "forgets" your action
error/message, as they are request scoped (it's equivalent to a HTTP
Redirect).

Cheers,

Arnaud


-Message d'origine-
De : Arnaud Cogoluegnes [mailto:[EMAIL PROTECTED] 
Envoyé : mercredi 18 juillet 2007 12:46
À : 'Struts Users Mailing List'
Objet : RE: How can I add ActionErrors when do the interceptor's intercept()
method?

Perhaps your security interceptor could forward to an action, which has the
responsibility to handle the error message:

The interceptor:

public String intercept(ActionInvocation actionInvocation) throws Exception
{
  Map session = actionInvocation.getInvocationContext().getSession();
  User user = (User) session.get(Constants.USER_KEY);
  boolean isAuthenticated = (null != user);
  if (isAuthenticated) {
   return actionInvocation.invoke();
  } else {
return "needAuthentication";
}

The global results:


  login_violation
  /


And in your action (the login action, which gathers all login stuff):

@SkipValidation
public String violation() {
  addActionMessage(getText("need.authentication"));
  return SUCCESS; // to the login form
}

Worked for me.

Cheers,

Arnaud

-Message d'origine-
De : M.Liang Liu [mailto:[EMAIL PROTECTED] 
Envoyé : mercredi 18 juillet 2007 10:59
À : Struts Users Mailing List
Objet : Re: How can I add ActionErrors when do the interceptor's intercept()
method?

I tried many times,but there's no solutions then.

Any help could be greatly appreciated.
On 7/17/07, M.Liang Liu <[EMAIL PROTECTED]> wrote:
>
> Thanks for you quick reply,Nuwan.
>
> yeah,ur code works and action-error should be add to the original action(I
> tested).
> However,I set my global result in my default package,and when the invalid
> action accessing was intercepted,the browser was redirect to the login
page.
>
> It's strange that the action-error did NOT display.I am sure that my
> interceptor has been configured correctly and the actionError has been add
> to the very action.
> I guess the global result whose type is "redirect" cause this problem,but
> am not sure.
>
> So,I define my login result as dispatch,which is default, it
works.Myglobal result is follwing:
>
>


> 
> /error.jsp
> /common/login.jsp
> /error.jsp
> 
>
>

--
>
> Does it work?yes.action error has been add and can display correctly.
> The problem is that I can NOT use redirect type any more.As a result,the
> doLogin action---the login form's action---can not mapped,as  the
namespace
> now is still the invalid action's.
> eg.I access :http://localhost:8080/myapp/kms/showNews.tbs before logged in
> Then access was intercepted and dispatched to :
> http://localhost:8080/myapp/common/login.jsp
> so I logged.
> The form was submitted  to http://localhost:8080/myapp/kms/doLogin.tbs
> which should be: http://localhost:8080/myapp/common/doLogin.tbs
>
> Any comment?
>
> Thanks a lot.
> On 7/18/07, Nuwan Chandrasoma <[EMAIL PROTECTED]> wrote:
> >
> > Hi,
> >
> > hope this code will help you.
> >
> >  Object action = invocation.getAction ();
> >  if (action instanceof com.opensymphony.xwork2.ValidationAware) {
> >   ((com.opensymphony.xwork2.ValidationAware) action).addActionError
> > ("Username or password incorrect.");
> >  }
> >
> > Thanks,
> >
> > Nuwan.
> >
> > - Original Message -
> > From: "M.Liang Liu" <[EMAIL PROTECTED] >
> > To: 
> > Sent: Tuesday, July 17, 2007 9:49 AM
> > Subject: How can I add ActionErrors when do the interceptor's
> > intercept()
> > method?
> >
> >
> > >
> > > Hi,all
> > > I've got a problem when I put my own interceptors in my app:
> > > I write an interceptor to authenticate whether the user access the
> > current
> > > page or action has logged in.
> > > I write the code in the following style(refer to the mailreader
> > example):
> > > 
> > > ..
> > > public String intercept(ActionInvocation actionInvocation) throws
> > > Exception
> > > {
> > > Map session = actionInvocation.getInvocationContext().getSession();
> > > User user = (User) session.get(Constants.USER_KEY);
> > > boolean isAuthenticated = (null != user);
> > > if (isAuthenticated) {
> > > return actionInvocation.invoke();
> > > } else {
> > >//how to add actionErrors here?
> > > return Action.LOGIN;
> > > }
> > > .
> > >
> > > 
> > > The question is that :how can I addActionErrors to the interceptor,so
> > that
> > > when the invalid action---namelly not logged in---was redirected to
> > the
> > > login page,some actionErrors messages like "You are not logged in"

RE: How can I add ActionErrors when do the interceptor's intercept() method?

2007-07-18 Thread Arnaud Cogoluegnes
Perhaps your security interceptor could forward to an action, which has the
responsibility to handle the error message:

The interceptor:

public String intercept(ActionInvocation actionInvocation) throws Exception
{
  Map session = actionInvocation.getInvocationContext().getSession();
  User user = (User) session.get(Constants.USER_KEY);
  boolean isAuthenticated = (null != user);
  if (isAuthenticated) {
   return actionInvocation.invoke();
  } else {
return "needAuthentication";
}

The global results:


  login_violation
  /


And in your action (the login action, which gathers all login stuff):

@SkipValidation
public String violation() {
  addActionMessage(getText("need.authentication"));
  return SUCCESS; // to the login form
}

Worked for me.

Cheers,

Arnaud

-Message d'origine-
De : M.Liang Liu [mailto:[EMAIL PROTECTED] 
Envoyé : mercredi 18 juillet 2007 10:59
À : Struts Users Mailing List
Objet : Re: How can I add ActionErrors when do the interceptor's intercept()
method?

I tried many times,but there's no solutions then.

Any help could be greatly appreciated.
On 7/17/07, M.Liang Liu <[EMAIL PROTECTED]> wrote:
>
> Thanks for you quick reply,Nuwan.
>
> yeah,ur code works and action-error should be add to the original action(I
> tested).
> However,I set my global result in my default package,and when the invalid
> action accessing was intercepted,the browser was redirect to the login
page.
>
> It's strange that the action-error did NOT display.I am sure that my
> interceptor has been configured correctly and the actionError has been add
> to the very action.
> I guess the global result whose type is "redirect" cause this problem,but
> am not sure.
>
> So,I define my login result as dispatch,which is default, it
works.Myglobal result is follwing:
>
>


> 
> /error.jsp
> /common/login.jsp
> /error.jsp
> 
>
>

--
>
> Does it work?yes.action error has been add and can display correctly.
> The problem is that I can NOT use redirect type any more.As a result,the
> doLogin action---the login form's action---can not mapped,as  the
namespace
> now is still the invalid action's.
> eg.I access :http://localhost:8080/myapp/kms/showNews.tbs before logged in
> Then access was intercepted and dispatched to :
> http://localhost:8080/myapp/common/login.jsp
> so I logged.
> The form was submitted  to http://localhost:8080/myapp/kms/doLogin.tbs
> which should be: http://localhost:8080/myapp/common/doLogin.tbs
>
> Any comment?
>
> Thanks a lot.
> On 7/18/07, Nuwan Chandrasoma <[EMAIL PROTECTED]> wrote:
> >
> > Hi,
> >
> > hope this code will help you.
> >
> >  Object action = invocation.getAction ();
> >  if (action instanceof com.opensymphony.xwork2.ValidationAware) {
> >   ((com.opensymphony.xwork2.ValidationAware) action).addActionError
> > ("Username or password incorrect.");
> >  }
> >
> > Thanks,
> >
> > Nuwan.
> >
> > - Original Message -
> > From: "M.Liang Liu" <[EMAIL PROTECTED] >
> > To: 
> > Sent: Tuesday, July 17, 2007 9:49 AM
> > Subject: How can I add ActionErrors when do the interceptor's
> > intercept()
> > method?
> >
> >
> > >
> > > Hi,all
> > > I've got a problem when I put my own interceptors in my app:
> > > I write an interceptor to authenticate whether the user access the
> > current
> > > page or action has logged in.
> > > I write the code in the following style(refer to the mailreader
> > example):
> > > 
> > > ..
> > > public String intercept(ActionInvocation actionInvocation) throws
> > > Exception
> > > {
> > > Map session = actionInvocation.getInvocationContext().getSession();
> > > User user = (User) session.get(Constants.USER_KEY);
> > > boolean isAuthenticated = (null != user);
> > > if (isAuthenticated) {
> > > return actionInvocation.invoke();
> > > } else {
> > >//how to add actionErrors here?
> > > return Action.LOGIN;
> > > }
> > > .
> > >
> > > 
> > > The question is that :how can I addActionErrors to the interceptor,so
> > that
> > > when the invalid action---namelly not logged in---was redirected to
> > the
> > > login page,some actionErrors messages like "You are not logged in" can
> >
> > > display.
> > >
> > > I notice that I can put cite addActionErrors("You are not logged in");
> > in
> > > my
> > > action class,however,I do NOT have any hint how to add action errors
> > in my
> > > interceptor.
> > > Just or can't?
> > >
> > > Any comment would be appreciated.
> > > --
> > > View this message in context:
> > >
> >
http://www.nabble.com/How-can-I-add-ActionErrors-when-do-the-interceptor%27s
-intercept%28%29-method--tf4095868.html#a11646263
> > > Sent from the Struts - Use

Re: How can I add ActionErrors when do the interceptor's intercept() method?

2007-07-18 Thread M.Liang Liu

I tried many times,but there's no solutions then.

Any help could be greatly appreciated.
On 7/17/07, M.Liang Liu <[EMAIL PROTECTED]> wrote:


Thanks for you quick reply,Nuwan.

yeah,ur code works and action-error should be add to the original action(I
tested).
However,I set my global result in my default package,and when the invalid
action accessing was intercepted,the browser was redirect to the login page.

It's strange that the action-error did NOT display.I am sure that my
interceptor has been configured correctly and the actionError has been add
to the very action.
I guess the global result whose type is "redirect" cause this problem,but
am not sure.

So,I define my login result as dispatch,which is default, it works.Myglobal 
result is follwing:



/error.jsp
/common/login.jsp
/error.jsp


--

Does it work?yes.action error has been add and can display correctly.
The problem is that I can NOT use redirect type any more.As a result,the
doLogin action---the login form's action---can not mapped,as  the namespace
now is still the invalid action's.
eg.I access :http://localhost:8080/myapp/kms/showNews.tbs before logged in
Then access was intercepted and dispatched to :
http://localhost:8080/myapp/common/login.jsp
so I logged.
The form was submitted  to http://localhost:8080/myapp/kms/doLogin.tbs
which should be: http://localhost:8080/myapp/common/doLogin.tbs

Any comment?

Thanks a lot.
On 7/18/07, Nuwan Chandrasoma <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> hope this code will help you.
>
>  Object action = invocation.getAction ();
>  if (action instanceof com.opensymphony.xwork2.ValidationAware) {
>   ((com.opensymphony.xwork2.ValidationAware) action).addActionError
> ("Username or password incorrect.");
>  }
>
> Thanks,
>
> Nuwan.
>
> - Original Message -
> From: "M.Liang Liu" <[EMAIL PROTECTED] >
> To: 
> Sent: Tuesday, July 17, 2007 9:49 AM
> Subject: How can I add ActionErrors when do the interceptor's
> intercept()
> method?
>
>
> >
> > Hi,all
> > I've got a problem when I put my own interceptors in my app:
> > I write an interceptor to authenticate whether the user access the
> current
> > page or action has logged in.
> > I write the code in the following style(refer to the mailreader
> example):
> > 
> > ..
> > public String intercept(ActionInvocation actionInvocation) throws
> > Exception
> > {
> > Map session = actionInvocation.getInvocationContext().getSession();
> > User user = (User) session.get(Constants.USER_KEY);
> > boolean isAuthenticated = (null != user);
> > if (isAuthenticated) {
> > return actionInvocation.invoke();
> > } else {
> >//how to add actionErrors here?
> > return Action.LOGIN;
> > }
> > .
> >
> > 
> > The question is that :how can I addActionErrors to the interceptor,so
> that
> > when the invalid action---namelly not logged in---was redirected to
> the
> > login page,some actionErrors messages like "You are not logged in" can
>
> > display.
> >
> > I notice that I can put cite addActionErrors("You are not logged in");
> in
> > my
> > action class,however,I do NOT have any hint how to add action errors
> in my
> > interceptor.
> > Just or can't?
> >
> > Any comment would be appreciated.
> > --
> > View this message in context:
> >
> 
http://www.nabble.com/How-can-I-add-ActionErrors-when-do-the-interceptor%27s-intercept%28%29-method--tf4095868.html#a11646263
> > Sent from the Struts - User mailing list archive at Nabble.com .
> >
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


--
  --M.Liang Liu





--
 --M.Liang Liu


RE: [S2] Struts's JAR not deleted when undeployed

2007-07-18 Thread Arnaud Cogoluegnes
Same problem, even using the struts blank application. Perhaps some JAR
resources is not correctly closed. Yet it is a known problem of Tomcat on
Windows, it would be great if Struts 2 apps could avoid it.

Here's a workaround which worked for me, even if it is not totally
satisfying: create a META-INF directory in your web app and create a file
named context.xml with this code in it:





When deploying your web app as a WAR, Tomcat will copy this file in
CATALINA_HOME/conf/Catalina/localhost (depending on your Tomcat
configuration: engine, host...) You can find all the details in the tomcat
documentation (http://tomcat.apache.org/tomcat-5.5-doc/config/context.html)

Hope it helps

Arnaud

-Message d'origine-
De : hezjing [mailto:[EMAIL PROTECTED] 
Envoyé : lundi 16 juillet 2007 11:46
À : Struts Users Mailing List
Objet : Re: [S2] Struts's JAR not deleted when undeployed

Yes, I'm having this problem almost every time I undeploy the
application on Windows XP.

The S2 application is using Spring, Hibernate, MySQL and etc.

May I know what are you expecting in the test environment? Simply a
WAR file to simulate the problem? with database schema and etc?

:-)


On 7/16/07, Antonio Petrelli <[EMAIL PROTECTED]> wrote:
> 2007/7/16, hezjing <[EMAIL PROTECTED]>:
> >
> > Well, I'm not sure if this is the Tomcat's problem.
>
>
>
> Usually this happens under Windows, when a JAR is opened (for example, to
> read a file) and it is never closed when finished (it will be closed by
the
> garbage collector, but it could pass AFTER the undeployment).
> It could be a Struts bug. Can you prepare a small test environment, see if
> you can replicate the problem and open a JIRA issue?
>
> Antonio
>


-- 

Hez

-
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: Does Tiles Layout page can have struts form components

2007-07-18 Thread Antonio Petrelli

2007/7/18, Arunkumar Balasubramanian <[EMAIL PROTECTED]>:


Hi

Thanks for your response.

Could you please elaborate on this. I read your message and was trying to
extract the information from it. If you could elaborate it, It will be of
great help.





Ok, I'll try to tell you step by step.

1. Create one (better two, one for each javascript command) "Controller", by
extending the "ControllerSupport" class. In the controller, fill the
attributes through the "ComponentContext" object in the "execute" method.
2. Associate the "controllers" to your definitions:


...


You should use the same template/attributes, since you want to reuse them.
3. Use your definitions.

I hope I have been clearer.

Antonio