RE: problem There is no Action mapped for namespace / and action name hellome. -

2007-11-22 Thread Rajagopal_Yendluri
Where is your struts.xml placed  How you are invoking the action
from your jsp ???

Regards,
Rajagopal Y (Raj)
HCU-Consulting & Enterprise Solutions.
Phone: (C) +91-9986584084 / (W)+91-80-6658 3685.
-Original Message-
From: kushi [mailto:[EMAIL PROTECTED] 
Sent: Friday, November 23, 2007 1:23 PM
To: user@struts.apache.org
Subject: problem There is no Action mapped for namespace / and action
name hellome. -


Hello 
i am beginner,i have just make a small hello program .when i run my
program
i fine this error.

HTTP Status 500 -

type Exception report

message

description The server encountered an internal error () that prevented
it
from fulfilling this request.

exception

There is no Action mapped for namespace / and action name hellome. -
[unknown location]

com.opensymphony.xwork2.DefaultActionProxy.prepare(DefaultActionProxy.ja
va:186)

org.apache.struts2.impl.StrutsActionProxyFactory.createActionProxy(Strut
sActionProxyFactory.java:41)

org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:4
94)

org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher
.java:419)

org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFi
lter.java:368)

note The full stack trace of the root cause is available in the Apache
Tomcat/5.5.17 logs.
Apache Tomcat/5.5.17

please let me suggest why this error is encounter.

Thanks
kushi
-- 
View this message in context:
http://www.nabble.com/problem-There-is-no-Action-mapped-for-namespace---
and-action-name-hellome.---tf4860176.html#a13908169
Sent from the Struts - User mailing list archive at Nabble.com.


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




DISCLAIMER:
This email (including any attachments) is intended for the sole use of the 
intended recipient/s and may contain material that is CONFIDENTIAL AND PRIVATE 
COMPANY INFORMATION. Any review or reliance by others or copying or 
distribution or forwarding of any or all of the contents in this message is 
STRICTLY PROHIBITED. If you are not the intended recipient, please contact the 
sender by email and delete all copies; your cooperation in this regard is 
appreciated.

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



problem There is no Action mapped for namespace / and action name hellome. -

2007-11-22 Thread kushi

Hello 
i am beginner,i have just make a small hello program .when i run my program
i fine this error.

HTTP Status 500 -

type Exception report

message

description The server encountered an internal error () that prevented it
from fulfilling this request.

exception

There is no Action mapped for namespace / and action name hellome. -
[unknown location]

com.opensymphony.xwork2.DefaultActionProxy.prepare(DefaultActionProxy.java:186)

org.apache.struts2.impl.StrutsActionProxyFactory.createActionProxy(StrutsActionProxyFactory.java:41)

org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:494)

org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:419)

org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:368)

note The full stack trace of the root cause is available in the Apache
Tomcat/5.5.17 logs.
Apache Tomcat/5.5.17

please let me suggest why this error is encounter.

Thanks
kushi
-- 
View this message in context: 
http://www.nabble.com/problem-There-is-no-Action-mapped-for-namespace---and-action-name-hellome.---tf4860176.html#a13908169
Sent from the Struts - User mailing list archive at Nabble.com.


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



Invalid Field Value For Field

2007-11-22 Thread sagarlotiya

Hi,
When i am trying to add "String" in "int" field, struts2 gives me following
message.
"invalid field value for field xyz".
Now i want to change this message to my custome message.
Then i have to create file ClassName.properties and in that if i will put
something like this
invalid.fieldvalue.fieldname = Custome message
Then it works fine.

Now the question is, How to provide "Localization" for this kind of message.
Any one if knows Please reply
Thank you

-- 
View this message in context: 
http://www.nabble.com/Invalid-Field-Value-For-Field-tf4860067.html#a13907853
Sent from the Struts - User mailing list archive at Nabble.com.


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



How to include CSS file in struts

2007-11-22 Thread Unnikrishnan

Hello

I am new to struts and started building a sample application . I would like
to know how a css file should be included in struts2 . and where should I
include the file exactly (in which folder).

Could any one please help

thanks
Unnikrishnan
-- 
View this message in context: 
http://www.nabble.com/How-to-include-CSS-file-in-struts-tf4859909.html#a13907378
Sent from the Struts - User mailing list archive at Nabble.com.


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



[s2]Runtime exception in a bean setter

2007-11-22 Thread Vincent Lin
I'm using struts 2.0.9.
I have a bean in a action.
The setter of the bean will throw a RuntimeException when the value is not a
legal value.
But when I submitted the form with the illegal value, and the
RuntimeException was thrown.
Nothing happens to struts 2 container. The exception disappeared and is not
displayed in log.

What I expected is a Error 500 page, but it seems nothing happen at all
except the value is not set to the bean.
The behavior is quite different from struts 1.

Is this a feature of struts 2? Hide the exception of setter of bean?
Or can I turn this off in struts.properties or struts.xml?

Thanks!
Vincent Lin


[Dojo] Pass topic parameters to action

2007-11-22 Thread Matthew (IRQ)

Hi there,

I'm using Struts 2.1.1 with the new dojo plugin library and I stumpled over
the following problem for which I couldn't find any solution yet even after
hours of searching the net.

The application I'm building is a small calendar application that shows your
absences in a monthly view. What I'd like to add is some kind of info bar
that dynamically loads additional information as soon as the user hovers
over an absence.

At the moment, I'm using a parameterized url for each single absence (within
an iterator):





Show Info

This now generates lots of ajax source code and it only works when I click
on the link (but I want that it also works when I just move over the link
with the mouse). From what I've seen this is possible with the bind tag and
so I'd like to have is the following:
Show
Info


But how do I pass the userid object to my action? Every help is welcomed.

Greetings,

Matthias


-- 
View this message in context: 
http://www.nabble.com/-Dojo--Pass-topic-parameters-to-action-tf4858767.html#a13904168
Sent from the Struts - User mailing list archive at Nabble.com.


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



how to avoid css clashes?

2007-11-22 Thread Giovanni Azua

hi all,

I have lot of trouble importing any css as it will most likely clash and 
screw the dojo widgets. I was wondering whether there is a configuration 
setting in Struts that would yield the same effect as e.g. 
displaytag.property "css.table" i.e. provide a different css namespace 
and avoid completely the clashing ...


TIA,
regards,
Giovanni

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



Re: param tag won't work!

2007-11-22 Thread Dave Newton
Is it rendering properly? (I'm actually a little
surprised you don't have to use the "#" character, eg.
href="#url"--I thought you did.)

--- slideharmony <[EMAIL PROTECTED]> wrote:

> 
> hi,
> I'm using the following code in my jsp:
> 
> 
>   
> 
> Link
> 
>the following code for my action:
> 
> package prova.actions;
> import java.util.Iterator;
> import java.util.Map;
> import java.util.Set;
> 
> public class Test extends ActionSupport {
> 
> public String execute() throws Exception {
> return SUCCESS;
> }
> 
> 
> private String test;
> 
>   private String getTest() {
>   return test;
>   }
> 
>   private void setTest(String test) {
>   this.test = test;
>   }
> 
> 
> }
> 
> Here is my struts.xml:
> 
> 
> 
> /Test.jsp
> 
> 
> 
> and finally my Test.jsp:
> 
> <%@ taglib prefix="s" uri="/struts-tags" %>
> 
> 
> 
> Hello World!
> 
> 
> 
> 
> 
> 
> 
> 
> It should print "test" right? But it doesn't print
> nothing! And I have
> logged the request parameter map, the test parameter
> doesn't appear! Any
> ideas
> 
> -- 
> View this message in context:
>
http://www.nabble.com/param-tag-won%27t-work%21-tf4857419.html#a13899935
> 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]



param tag won't work!

2007-11-22 Thread slideharmony

hi,
I'm using the following code in my jsp:


  

Link

   the following code for my action:

package prova.actions;
import java.util.Iterator;
import java.util.Map;
import java.util.Set;

public class Test extends ActionSupport {

public String execute() throws Exception {
return SUCCESS;
}


private String test;

private String getTest() {
return test;
}

private void setTest(String test) {
this.test = test;
}


}

Here is my struts.xml:



/Test.jsp



and finally my Test.jsp:

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



Hello World!








It should print "test" right? But it doesn't print nothing! And I have
logged the request parameter map, the test parameter doesn't appear! Any
ideas

-- 
View this message in context: 
http://www.nabble.com/param-tag-won%27t-work%21-tf4857419.html#a13899935
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: Select tag on freemarker

2007-11-22 Thread Aristides P. Preto Jr

Hello,

For anyone interested...
After several searches (and some sleeping too :-)), I've finally found a 
possible solution - to use the freemarker "r" (raw) prefix:


<@s.set name="entityTypeList" value=r'#{"CST":"Customer", 
"SPL":"Supplier" }' />
<@s.select name="entity.entityType"  value="%{entity.entityType}" 
list="entityTypeList" emptyOption="true"/>


Found this post to the mailing list: 
http://www.nabble.com/Can-anyone-explain-the-leading-%22r%22-in-OGNL-list-syntax--tf4349553.html#a12395847 
, and also some info on 
http://www.jroller.com/cdaniluk/entry/webwork_and_freemarker_part_deux .


Unfortunatelly, the docs. on 
http://struts.apache.org/2.0.11/docs/freemarker-tags.html does not refer 
this...


Bests,

---
Aristides P. Preto Jr. - [EMAIL PROTECTED]
Project Manager - Information Systems  Unit
INOV - Inesc Inovação - http://www.inov.pt - +351-213100444



Aristides P. Preto Jr wrote:


Hello,

In JSP, I could do the following:

value="%{#{'CST':'Customer','SPL':'Supplier','OTH':'Other'}}"/>
list="entityType"  emptyOption="true" />


How can I  do the same using FreeMarker ?

I get errors if I try this:

<@s.set name="entityTypeList" 
value="%{#{'CST':'Customer','SPL':'Supplier','OTH':'Other'}}" />
<@s.select name="entity.entityType"  value="%{entity.entityType}" 
list="entityTypeList" emptyOption="true"/>


or this:
<@s.set name="entityTypeList" 
value="#{'CST':'Customer','SPL':'Supplier','OTH':'Other'}" />


and the list is not populated if I try this:

<#assign entityTypeList = {"CST":"Customer", "SPL":"Supplier" } >


Note: If I change entityTypeList for a OGNL List (not a hashmap), all 
works file.



I am using struts 2.0.9 and freemarker 2.3.8 on tomcat 5.5.20.

Thanks in advance for any help.
Bests,




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



Re: [s2] conditional validation

2007-11-22 Thread lbastil

Yes, ok, right, thats a point.

But I still cannot see a clear alternative to handle it at all, not in
the xml way and even less in the annotation way (which would be our
preferred realization approach)

In a model driven action I have to handle in model, or?
Ok I could specify it direct on action level without vistor validator like
model.xxx, but in
this case I have the field errors for attributes model.xxx and all
the error rendering does not work out of the box (as model is directly
on value stack without model prefix)

Could you explain the approach you initial described a little more in
detail?

Thank you,
Basti



newton.dave wrote:
> 
> If you're doing validation differently based on the
> action then trying to do validation based on the model
> doesn't seem like a good idea: you're not trying to
> validate the model the same way for every action.
> 
> --- lbastil <[EMAIL PROTECTED]> wrote:
> 
>> 
>> Could someone please state whether I have error in
>> reasoning here or not?
>> 
>> ... even a "I would think its not possible with
>> build in features yet" would
>> help me.
>> 
>> Thank you a lot,
>> Basti
>> 
>> 
>> lbastil wrote:
>> > 
>> > OK, sorry, I may have to describe it a little more
>> in detail or I did not
>> > understand the whole point ...
>> > 
>> > Yes, lets assume I have:
>> > 
>> > > > class="foo.FooClass" 
>> > method="method1" .../>
>> > > > class="foo.FooClass"
>> > method="method2" .../>
>> > 
>> > FooClass-meth1-validation.xml
>> >   First set of validations
>> >   
>> > FooClass-meth2-validation.xml
>> >   Second set of validations
>> > 
>> > Action class FooClass is modeldriven, so something
>> like
>> > 
>> > Public ModelClass getModel() ...
>> > 
>> > In result I want to check different attributes of
>> ModelClass.
>> > 
>> > But in both validation files on action level
>> > (FooClass-meth1-validation.xml,
>> FooClass-meth2-validation.xml)
>> > I had to specify the same, something like:
>> > ...
>> >
>> >
>> >   false
>> >   
>> >
>> > 
>> > ...
>> > 
>> > when I read documentation correctly, on model
>> level I would then create
>> > another validation xml file like:
>> > ModelClass-validation.xml
>> > 
>> > Here the validations on attribute level have to be
>> done, but here it is
>> > not possible to distinguish between the action
>> methods meth1 and meth2,
>> > or?
>> > 
>> > Thank you again,
>> > Basti
>> > 
>> > 
>> > 
>> > 
>> > newton.dave wrote:
>> >> 
>> >> You said you wanted different validation for
>> different
>> >> methods in an action, yes?
>> >> 
>> >> > >> class="foo.FooClass" 
>> >> method="method1" .../>
>> >> > >> class="foo.FooClass"
>> >> method="method2" .../>
>> >> 
>> >> FooClass-meth1-validation.xml
>> >>   First set of validations
>> >>   
>> >> FooClass-meth2-validation.xml
>> >>   Second set of validations
>> >> 
>> >> Perhaps I'm misunderstanding what you want to do.
>> >> 
>> >> Regarding annotations, AFAIK you can set the
>> >> "validateAnnotatedMethodOnly" attribute on the
>> >> validation interceptor [1] and annotate methods
>> in
>> >> your action class as normal. Haven't done that
>> myself,
>> >> so I don't know if it works or not.
>> >> 
>> >> d.
>> >> 
>> >> [1]
>> >>
>>
> http://struts.apache.org/2.x/docs/validations-annotation.html
>> >> 
>> >> --- lbastil <[EMAIL PROTECTED]> wrote:
>> >> 
>> >>> 
>> >>> Hm, but as I have model driven action,
>> >>> for both methods (even if I want to validate
>> >>> different attributes later on)
>> >>> the first I have to use is VisitorFieldValidator
>> >>> with appendPrefix=false for
>> >>> the model attribute of the action class.
>> >>> 
>> >>> So at this level there is no difference, thats
>> why I
>> >>> cannot see how it
>> >>> should help.
>> >>> 
>> >>> Could you explain your suggestion a little more
>> in
>> >>> detail?
>> >>> Would it be realizable with annotation approach
>> too?
>> >>> 
>> >>> Thank you very much in advance,
>> >>> Basti
>> >>> 
>> >>> 
>> >>> 
>> >>> newton.dave wrote:
>> >>> > 
>> >>> > Create two validation XML files, one for each
>> >>> method.
>> >>> > You can differentiate between them in a couple
>> >>> > different ways, the easiest may be to just
>> create
>> >>> two
>> >>> > action mappings, one for each method.
>> >>> > 
>> >>> > d.
>> >>> > 
>> >>> > --- lbastil <[EMAIL PROTECTED]> wrote:
>> >>> > 
>> >>> >> 
>> >>> >> Is there any way with the build in
>> declarative
>> >>> >> validation possibilities in
>> >>> >> struts 2 (annotations, xml)
>> >>> >> to do something like conditional validation
>> in
>> >>> the
>> >>> >> following sense:
>> >>> >> 
>> >>> >> in the action class I have a model class,
>> where
>> >>> on
>> >>> >> action method one i want
>> >>> >> to validate
>> >>> >> a special subset of model attributes and on
>> >>> action
>> >>> >> method two another subset
>> >>> >> of attributes?
>> >>> >> 
>> >>> >> (note the model i

Re: Migration from S2.0.x to S2.1.x

2007-11-22 Thread Dave Newton
--- Giovanni Azua <[EMAIL PROTECTED]> wrote:
> I have put together all issues I have encountered
> while migrating my application from Struts 2.0.x 
> to 2.1.x under the following link:

Thanks :)

> redirect-action

Redirect action is still supported; the result type is
"redirectAction".

d.



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



RE: using in struts2..

2007-11-22 Thread Filippov, Andrey
That's great!! Thanx a lot!!!

-Original Message-
From: Dave Newton [mailto:[EMAIL PROTECTED] 
Sent: Thursday, November 22, 2007 6:18 PM
To: Struts Users Mailing List
Subject: Re: using  in struts2..

Well,  only iterates over a single
array--it has no idea about any other arrays you're
dealing with.

If your action has, say, three arrays of equal
length...

public String[] getArr1() {...
public String[] getArr2() {...
public String[] getArr3() {...

... then...


  
  
  


... will iterate over a single array and use the
current iteration index to retrieve values from the
other arrays.

d.

--- "Filippov, Andrey" <[EMAIL PROTECTED]>
wrote:

> Hi everybody!
> 
>  
> 
> I have the following question - I have several
> String[] objects of the
> same size. I have to render them on the jsp. First I
> thought that this
> way is correct:
> 
>  
> 
>  
> 
> 
> 
> 
> 
>  
> 
> value="#stat.index" />
> 
>  
> 
>  
> 
>,
>  value="firstName"/>
> 
>  
> 
>  
> 
> value="position"/>
> 
>  
> 
>  
> 
> value="project"/>
> 
>  
> 
>  
> 
> value="room"/>
> 
>  
> 
>  
> 
> 
> 
>   
> 
>  
> 
> But it's wrong. Are there any opportunities to do
> it?
> 
>  
> 
> Appreciate.
> 
>  
> 
> Best regards.
> 
> 


-
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: Migration from S2.0.x to S2.1.x

2007-11-22 Thread Antonio Petrelli
2007/11/22, Giovanni Azua <[EMAIL PROTECTED]>:
>
> I have put together all issues I have encountered while migrating my
> application from Struts 2.0.x to 2.1.x under the following link:
>
>
> http://cwiki.apache.org/confluence/display/S2WIKI/Migrating+From+Struts+2.0.x+to+2.1.x



Nice work Giovanni!
This page seems like a troubleshooting guide when migrating, probably it
should be renamed.
I fixed the width of the page, so now you can read it easily; and I added a
comment about Tiles.

Thanks!
Antonio


Re: using in struts2..

2007-11-22 Thread Dave Newton
Well,  only iterates over a single
array--it has no idea about any other arrays you're
dealing with.

If your action has, say, three arrays of equal
length...

public String[] getArr1() {...
public String[] getArr2() {...
public String[] getArr3() {...

... then...


  
  
  


... will iterate over a single array and use the
current iteration index to retrieve values from the
other arrays.

d.

--- "Filippov, Andrey" <[EMAIL PROTECTED]>
wrote:

> Hi everybody!
> 
>  
> 
> I have the following question - I have several
> String[] objects of the
> same size. I have to render them on the jsp. First I
> thought that this
> way is correct:
> 
>  
> 
>  
> 
> 
> 
> 
> 
>  
> 
> value="#stat.index" />
> 
>  
> 
>  
> 
>,
>  value="firstName"/>
> 
>  
> 
>  
> 
> value="position"/>
> 
>  
> 
>  
> 
> value="project"/>
> 
>  
> 
>  
> 
> value="room"/>
> 
>  
> 
>  
> 
> 
> 
>   
> 
>  
> 
> But it's wrong. Are there any opportunities to do
> it?
> 
>  
> 
> Appreciate.
> 
>  
> 
> Best regards.
> 
> 


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



Re: Migration from S2.0.x to S2.1.x

2007-11-22 Thread Giovanni Azua

hi!

I have put together all issues I have encountered while migrating my 
application from Struts 2.0.x to 2.1.x under the following link:


http://cwiki.apache.org/confluence/display/S2WIKI/Migrating+From+Struts+2.0.x+to+2.1.x

My knowledge of Struts 2 is very shallow and at Users level so don't 
expect the explanations to be deep :) this is just a simple list of 
issue/resolutions that have worked for me and will be used by some of my 
colleagues to port to 2.1.x. There are some assumptions I have made like 
e.g. "... redirect-action is no longer supported ..." so please correct 
me if I am wrong ...


Best regards,
Giovanni

Ted Husted wrote:

While the paperwork clears, you can always start a "Migrating From 2.0
to 2.1" page in the Struts 2 community wiki, and we can move the page
over later.

* http://cwiki.apache.org/S2WIKI/home.html

Then, to point people to it, add a comment to the Migration Guide page.

HTH, Ted



On Nov 14, 2007 5:03 AM, Antonio Petrelli <[EMAIL PROTECTED]> wrote:
  

2007/11/14, Giovanni Azua <[EMAIL PROTECTED]>:


hi,

I have been collecting a few points required for migrating from S2.0.x
to S2.1.x and I would like to bookkeep this info somewhere. Of course,
if we do it in Wiki  it will benefit others too ... where exactly could
we enter this?
  


Thanks a lot Giovanni!
First of all I suggest to read this FAQ:
http://struts.apache.org/helping.html#documentation

Possibly the best place to put it is under this page:
http://cwiki.apache.org/confluence/display/WW/Migration+Guide

Ciao
Antonio




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

2007-11-22 Thread Dave Newton
If you're doing validation differently based on the
action then trying to do validation based on the model
doesn't seem like a good idea: you're not trying to
validate the model the same way for every action.

--- lbastil <[EMAIL PROTECTED]> wrote:

> 
> Could someone please state whether I have error in
> reasoning here or not?
> 
> ... even a "I would think its not possible with
> build in features yet" would
> help me.
> 
> Thank you a lot,
> Basti
> 
> 
> lbastil wrote:
> > 
> > OK, sorry, I may have to describe it a little more
> in detail or I did not
> > understand the whole point ...
> > 
> > Yes, lets assume I have:
> > 
> >  > class="foo.FooClass" 
> > method="method1" .../>
> >  > class="foo.FooClass"
> > method="method2" .../>
> > 
> > FooClass-meth1-validation.xml
> >   First set of validations
> >   
> > FooClass-meth2-validation.xml
> >   Second set of validations
> > 
> > Action class FooClass is modeldriven, so something
> like
> > 
> > Public ModelClass getModel() ...
> > 
> > In result I want to check different attributes of
> ModelClass.
> > 
> > But in both validation files on action level
> > (FooClass-meth1-validation.xml,
> FooClass-meth2-validation.xml)
> > I had to specify the same, something like:
> > ...
> >
> >
> >   false
> >   
> >
> > 
> > ...
> > 
> > when I read documentation correctly, on model
> level I would then create
> > another validation xml file like:
> > ModelClass-validation.xml
> > 
> > Here the validations on attribute level have to be
> done, but here it is
> > not possible to distinguish between the action
> methods meth1 and meth2,
> > or?
> > 
> > Thank you again,
> > Basti
> > 
> > 
> > 
> > 
> > newton.dave wrote:
> >> 
> >> You said you wanted different validation for
> different
> >> methods in an action, yes?
> >> 
> >>  >> class="foo.FooClass" 
> >> method="method1" .../>
> >>  >> class="foo.FooClass"
> >> method="method2" .../>
> >> 
> >> FooClass-meth1-validation.xml
> >>   First set of validations
> >>   
> >> FooClass-meth2-validation.xml
> >>   Second set of validations
> >> 
> >> Perhaps I'm misunderstanding what you want to do.
> >> 
> >> Regarding annotations, AFAIK you can set the
> >> "validateAnnotatedMethodOnly" attribute on the
> >> validation interceptor [1] and annotate methods
> in
> >> your action class as normal. Haven't done that
> myself,
> >> so I don't know if it works or not.
> >> 
> >> d.
> >> 
> >> [1]
> >>
>
http://struts.apache.org/2.x/docs/validations-annotation.html
> >> 
> >> --- lbastil <[EMAIL PROTECTED]> wrote:
> >> 
> >>> 
> >>> Hm, but as I have model driven action,
> >>> for both methods (even if I want to validate
> >>> different attributes later on)
> >>> the first I have to use is VisitorFieldValidator
> >>> with appendPrefix=false for
> >>> the model attribute of the action class.
> >>> 
> >>> So at this level there is no difference, thats
> why I
> >>> cannot see how it
> >>> should help.
> >>> 
> >>> Could you explain your suggestion a little more
> in
> >>> detail?
> >>> Would it be realizable with annotation approach
> too?
> >>> 
> >>> Thank you very much in advance,
> >>> Basti
> >>> 
> >>> 
> >>> 
> >>> newton.dave wrote:
> >>> > 
> >>> > Create two validation XML files, one for each
> >>> method.
> >>> > You can differentiate between them in a couple
> >>> > different ways, the easiest may be to just
> create
> >>> two
> >>> > action mappings, one for each method.
> >>> > 
> >>> > d.
> >>> > 
> >>> > --- lbastil <[EMAIL PROTECTED]> wrote:
> >>> > 
> >>> >> 
> >>> >> Is there any way with the build in
> declarative
> >>> >> validation possibilities in
> >>> >> struts 2 (annotations, xml)
> >>> >> to do something like conditional validation
> in
> >>> the
> >>> >> following sense:
> >>> >> 
> >>> >> in the action class I have a model class,
> where
> >>> on
> >>> >> action method one i want
> >>> >> to validate
> >>> >> a special subset of model attributes and on
> >>> action
> >>> >> method two another subset
> >>> >> of attributes?
> >>> >> 
> >>> >> (note the model in action is used
> "modeldriven")
> >>> >> 
> >>> >> Thank you for any idea,
> >>> >> Basti
> >>> >> -- 
> >>> >> View this message in context:
> >>> >>
> >>> >
> >>>
> >>
>
http://www.nabble.com/-s2--conditional-validation-tf4843582.html#a13857280
> >>> >> Sent from the Struts - User mailing list
> archive
> >>> at
> >>> >> Nabble.com.
> >>> >> 
> >>> >> 
> >>> >>
> >>> >
> >>>
> >>
>
-
> >>> >> To unsubscribe, e-mail:
> >>> >> [EMAIL PROTECTED]
> >>> >> For additional commands, e-mail:
> >>> >> [EMAIL PROTECTED]
> >>> >> 
> >>> >> 
> >>> > 
> >>> > 
> >>> >
> >>>
> >>
>
-
> 
=== message truncated ===


-
To unsubscribe, 

Re: is there any book on struts 2 in the market.................

2007-11-22 Thread Giovanni Azua

hi wicketshafi,

You may also want to consider buying "WebWork in Action" I found it to 
be a great reference for Struts 2.


HTH,
regards,
Giovanni

wicketshafi wrote:

Hello,,

is there any book on struts2 in the market...

if it is there please send a message.

regards
-Shafi
  



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



Re: Upload exception in Struts2

2007-11-22 Thread Le Van
Thank for your feedback,
But that release is used in my active project and I don't want to
upgrade it now. So have you ever get that error? is it be because of
struts version?
Thanks,
Van
On Nov 22, 2007 6:07 PM, Alexis Pigeon <[EMAIL PROTECTED]> wrote:
> Hi Van,
>
> On 22/11/2007, Le Van <[EMAIL PROTECTED]> wrote:
> > Hi all,
> > I'm using Struts 2 (2.04) and running it on Tomcat 5.5.20 (*Nix
> > machine). When I trace the log, I get this
>
> 2.0.4 never qualified as a GA release :
> < http://struts.apache.org/downloads.html#PriorReleases >
>
> The first GA release of Struts 2 was 2.0.6.
>
> Latest GA release is 2.0.11, you should really consider upgrading
> prior any debugging...
>
> cheers,
> alexis
>
> -
> 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]



using in struts2..

2007-11-22 Thread Filippov, Andrey
Hi everybody!

 

I have the following question - I have several String[] objects of the
same size. I have to render them on the jsp. First I thought that this
way is correct:

 

 





 

   

 

 

   , 

 

 

   

 

 

   

 

 

   

 

 



  

 

But it's wrong. Are there any opportunities to do it?

 

Appreciate.

 

Best regards.



Re: is there any book on struts 2 in the market.................

2007-11-22 Thread Antonio Petrelli
2007/11/22, wicketshafi <[EMAIL PROTECTED]>:
>
>
> Hello,,
>
> is there any book on struts2 in the market...
>
> if it is there please send a message.



http://struts.apache.org/2.x/docs/home.html
See the "books" section.

Antonio


[S2] error 404 + sitemesh template

2007-11-22 Thread Joe Lam

I set this in web.xml


404
/error404.jsp



but the output doesnt come with the site template (using sitemesh)
anyone know why and how to solve this??

btw, any chance to make error 404 to call an action ?
like


404
/custom.action


seems tomcat only calls an existing file (e.g. a jsp file) or servlet.

thank you very much

Joe

-- 
View this message in context: 
http://www.nabble.com/-S2--error-404-%2B-sitemesh-template-tf4855736.html#a13894878
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: Upload exception in Struts2

2007-11-22 Thread Alexis Pigeon
Hi Van,

On 22/11/2007, Le Van <[EMAIL PROTECTED]> wrote:
> Hi all,
> I'm using Struts 2 (2.04) and running it on Tomcat 5.5.20 (*Nix
> machine). When I trace the log, I get this

2.0.4 never qualified as a GA release :
< http://struts.apache.org/downloads.html#PriorReleases >

The first GA release of Struts 2 was 2.0.6.

Latest GA release is 2.0.11, you should really consider upgrading
prior any debugging...

cheers,
alexis

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



is there any book on struts 2 in the market.................

2007-11-22 Thread wicketshafi

Hello,,

is there any book on struts2 in the market...

if it is there please send a message.

regards
-Shafi
-- 
View this message in context: 
http://www.nabble.com/is-there-any-book-on-struts-2--in-the-market.-tf4855723.html#a13894838
Sent from the Struts - User mailing list archive at Nabble.com.


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



Upload exception in Struts2

2007-11-22 Thread Le Van
Hi all,
I'm using Struts 2 (2.04) and running it on Tomcat 5.5.20 (*Nix
machine). When I trace the log, I get this

2007-11-22 10:13:40,158 - ERROR
org.apache.struts2.dispatcher.multipart.MultiPartRequest(JakartaMultiPartRequest.java:130)
- org.apache.commons.fileupload.FileUploadException: Processing of
multipart/form-data request failed. Exception filling buffer with data
from underlying input stream: not an EAGAIN status, so perhaps
disconnected client?

2007-11-22 10:13:40,231 - ERROR
org.apache.struts2.interceptor.FileUploadInterceptor(FileUploadInterceptor.java:227)
- Processing of multipart/form-data request failed. Exception filling
buffer with data from underlying input stream: not an EAGAIN status,
so perhaps disconnected client?

How does this appear? Any idea? How to avoid this ?
Thanks in advance,
Van

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



Re: Struts+JavaScript i18n

2007-11-22 Thread nuwan chandrasoma
Hi,

Sorry i replied to the mail you have sent to the dev list which is used
by the struts developers to communicate about struts, sorry dev list guys :)

As you have included the struts tag inside a .js file it will not be
recognize as an jsp tag. therefore you need to include this inside the
.jsp page or try something like this.


alloc_common.js contain
 function confirmDelete(message) {
  alert(message); return
false;
  }


');"
action="/blabla.do?method=doSomething" paramId="id" paramProperty="id"
transaction="true">
  Our Link


Thanks,

Nuwan


On Nov 22, 2007 2:28 PM, iv_va_unq <[EMAIL PROTECTED]> wrote:
>
>  Hi friends I need your help
>
> <<< Application.properties >>>
> pa.filter.show=Show
>
> <<< *.jsp >>>
> <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
> pageEncoding="ISO-8859-1"%> <%@ taglib uri="/WEB-INF/struts-bean.tld"
> prefix="bean"%>
> <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
> 
>   
> 
>  
>  Insert title here
>
>
> function confirmDelete() {
>   alert('');
>   return false;
> }
>
> 
>
> 
> action="/blabla.do?method=doSomething" paramId="id" paramProperty="id"
> transaction="true">
>Our Link
> 
> 
> 
>
> It worked correctly and showed Show (value of pa.filter.show) but when I use
> 
> alloc_common.js contain
>   function confirmDelete() {
>alert(''); return
> false;
>}
>
> It show 
> How can it fix ?
> --
> View this message in context: 
> http://www.nabble.com/Struts%2BJavaScript--i18n-tf4855150.html#a13893174
> 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: [s2] conditional validation

2007-11-22 Thread lbastil

Could someone please state whether I have error in reasoning here or not?

... even a "I would think its not possible with build in features yet" would
help me.

Thank you a lot,
Basti


lbastil wrote:
> 
> OK, sorry, I may have to describe it a little more in detail or I did not
> understand the whole point ...
> 
> Yes, lets assume I have:
> 
>  class="foo.FooClass" 
> method="method1" .../>
>  class="foo.FooClass"
> method="method2" .../>
> 
> FooClass-meth1-validation.xml
>   First set of validations
>   
> FooClass-meth2-validation.xml
>   Second set of validations
> 
> Action class FooClass is modeldriven, so something like
> 
> Public ModelClass getModel() ...
> 
> In result I want to check different attributes of ModelClass.
> 
> But in both validation files on action level
> (FooClass-meth1-validation.xml, FooClass-meth2-validation.xml)
> I had to specify the same, something like:
> ...
>
>
>   false
>   
>
> 
> ...
> 
> when I read documentation correctly, on model level I would then create
> another validation xml file like:
> ModelClass-validation.xml
> 
> Here the validations on attribute level have to be done, but here it is
> not possible to distinguish between the action methods meth1 and meth2,
> or?
> 
> Thank you again,
> Basti
> 
> 
> 
> 
> newton.dave wrote:
>> 
>> You said you wanted different validation for different
>> methods in an action, yes?
>> 
>> > class="foo.FooClass" 
>> method="method1" .../>
>> > class="foo.FooClass"
>> method="method2" .../>
>> 
>> FooClass-meth1-validation.xml
>>   First set of validations
>>   
>> FooClass-meth2-validation.xml
>>   Second set of validations
>> 
>> Perhaps I'm misunderstanding what you want to do.
>> 
>> Regarding annotations, AFAIK you can set the
>> "validateAnnotatedMethodOnly" attribute on the
>> validation interceptor [1] and annotate methods in
>> your action class as normal. Haven't done that myself,
>> so I don't know if it works or not.
>> 
>> d.
>> 
>> [1]
>> http://struts.apache.org/2.x/docs/validations-annotation.html
>> 
>> --- lbastil <[EMAIL PROTECTED]> wrote:
>> 
>>> 
>>> Hm, but as I have model driven action,
>>> for both methods (even if I want to validate
>>> different attributes later on)
>>> the first I have to use is VisitorFieldValidator
>>> with appendPrefix=false for
>>> the model attribute of the action class.
>>> 
>>> So at this level there is no difference, thats why I
>>> cannot see how it
>>> should help.
>>> 
>>> Could you explain your suggestion a little more in
>>> detail?
>>> Would it be realizable with annotation approach too?
>>> 
>>> Thank you very much in advance,
>>> Basti
>>> 
>>> 
>>> 
>>> newton.dave wrote:
>>> > 
>>> > Create two validation XML files, one for each
>>> method.
>>> > You can differentiate between them in a couple
>>> > different ways, the easiest may be to just create
>>> two
>>> > action mappings, one for each method.
>>> > 
>>> > d.
>>> > 
>>> > --- lbastil <[EMAIL PROTECTED]> wrote:
>>> > 
>>> >> 
>>> >> Is there any way with the build in declarative
>>> >> validation possibilities in
>>> >> struts 2 (annotations, xml)
>>> >> to do something like conditional validation in
>>> the
>>> >> following sense:
>>> >> 
>>> >> in the action class I have a model class, where
>>> on
>>> >> action method one i want
>>> >> to validate
>>> >> a special subset of model attributes and on
>>> action
>>> >> method two another subset
>>> >> of attributes?
>>> >> 
>>> >> (note the model in action is used "modeldriven")
>>> >> 
>>> >> Thank you for any idea,
>>> >> Basti
>>> >> -- 
>>> >> View this message in context:
>>> >>
>>> >
>>>
>> http://www.nabble.com/-s2--conditional-validation-tf4843582.html#a13857280
>>> >> 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]
>>> > 
>>> > 
>>> > 
>>> 
>>> -- 
>>> View this message in context:
>>>
>> http://www.nabble.com/-s2--conditional-validation-tf4843582.html#a13859839
>>> 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]
>> 
>> 
>> 
> 
> 

-- 
View this message in cont

Struts+JavaScript i18n

2007-11-22 Thread iv_va_unq

 Hi friends I need your help 

<<< Application.properties >>> 
pa.filter.show=Show 

<<< *.jsp >>> 
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%> <%@ taglib uri="/WEB-INF/struts-bean.tld"
prefix="bean"%> 
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> 
 
   

 
 Insert title here


function confirmDelete() { 
  alert(''); 
  return false; 
} 

 



   Our Link 
 
 
 

It worked correctly and showed Show (value of pa.filter.show) but when I use
 
alloc_common.js contain 
  function confirmDelete() { 
   alert(''); return
false; 
   } 

It show  
How can it fix ?
-- 
View this message in context: 
http://www.nabble.com/Struts%2BJavaScript--i18n-tf4855150.html#a13893174
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 & i18n...

2007-11-22 Thread Filippov, Andrey
Hi everybody!

 

I am developing WEBApp now and there is a problem... Well actually - 2
problems... 

 My application should be bilingual. So I have 2 bundle files -
locale_ru_Ru.properties and locale_en_Us.properties. As I understand
struts2 tag  automatically detect the user locale setting and
choose the right bundle for it. So I have the following:

 



  

  

  











  

  



 

1.  But finally I have to implement the possibility of changing
language manually by means of href (ru | eng). What is the best way to
do it?
2.  Could I anywhere set the default locale - I mean if someone
accesses my application from another locale I would want to set en_Us as
a default for this case.

 

Thanks a lot!

 

Best regards.



Re: EL Statements are not evaluated in logic:equal tag

2007-11-22 Thread Antonio Petrelli
2007/11/21, Slattery, Tim - BLS <[EMAIL PROTECTED]>:
>
> > I saw many examples on the net with the normal logic:equal
> > tag and the el
> > statement:
> >  >
> > So I thought I don't need 
> You can use EL without the EL libraries if your servlet container
> supports J2EE version 2.4. If you have that support, you can use EL
> anyplace in your jsp page, and the container will take care of it.



I hope that you meant Servlet 2.4, included in J2EE 1.4. Anyway EL is in JSP
2.0, not Servlet 2.4...

> I run tomcat 5.5.12
>
> I don't know whether that supports J2EE 2.4 or not.



It supports Servlets 2.4 and JSP 2.0

Antonio


Components for Struts2?

2007-11-22 Thread Joachim Ansorg

Hi all,
I'm new to this list. I started to use Struts2 for a new project. I like 
it quite a lot compared to the frameworks I used before.


Are there any additional component/tag libraries available for Struts2?

Thanks a lot,
Joachim

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