Struts 2 load problems?

2007-04-09 Thread Jeff C
This is an update to a queston I asked last week..with a little more info this 
time.

We noticed last week the s:text calls would sometimes fail in our jsp files 
(we are running on tomcat 5.5 and using struts 2.0.6).

Today, we finally tracked it down to a load issue. When there is light traffic 
on the server, everything is fine. When the server is under load, the s:text 
lookups fail. The rest of the logic works fine (i.e. the action itself does 
what its supposed to do). The only problem is the s:text failures, which cause 
the key to be displayed instead of the label, as if the property key lookup 
failed. The s:text works inside the i18n tag just fine..it only seems to fail 
when looking for properties files looking up the action class heirarchy.

My first thought was that maybe it was an ognl or freemarker issue. I tried 
running with the 2 jars we were using with webwork, but still had the problem. 
I tried Struts 2.0.5 and still saw the problem.

Has anyone else run into this? Its definitely a load related issue. When i am 
the only one hitting the machine, s:text calls work just fine. When i hit the 
server with JMeter load tests, the s:text starts failing. Stop the load test, 
and s:text once again works.

Thought i would try to ask again if anyone else has seen this before, as i've 
spent 4 weeks upgrading our code, and now it appears to have been for nothing. 
(we did roll our site back to webwork 2.2.2, and of course the problem went 
away).

Thoughts?


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



S2: error result - what is it?

2007-04-09 Thread Paul Benedict
What does the error result mean? How is it used by the framework, and 
what causes it to be selected?


Paul

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



Modeling Struts with UML

2007-04-09 Thread Asaf Paris Mandoki

What kind of UML diagrams are necessary to fully model a complete
struts application?

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



Somewhat OT: Forward to JSP in JAR file

2007-04-09 Thread Frank W. Zammetti
Quick question... can anyone tell me if it's possible to forward to a 
JSP that is stored in a JAR file (i.e., in a JAR located in 
WEB-INF/lib), and if so, how?  I couldn't find a quick answer on the 
first few pages of Googling, figured someone here would probably know 
off the top of their heads.  Thanks!


Frank


--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM/Yahoo: fzammetti
MSN: [EMAIL PROTECTED]
Author of "Practical Ajax Projects With Java Technology"
 (2006, Apress, ISBN 1-59059-695-1)
Java Web Parts - http://javawebparts.sourceforge.net
 Supplying the wheel, so you don't have to reinvent it!

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



an odd application...but doable?

2007-04-09 Thread Chris Pat
 Hello
I need to talk to a server and parse the response. I will be running TC on a 
specified port. I would like to use an Action to format and process the request 
parameters and then forward to the full web url of the server. I believer I can 
do this with a simple forward in the Struts framework. 
 
The difficulty is the server will send back a standard http response with 
name/value pairs to the port that originated the request. The server is not a 
sending a client response and it will not have a webapp context. Can/how I get 
this response and process it within a Struts framework? Any ideas? I really 
need to understand why/why not. Thank you.

Re: How to change "targets" attribute for submit button from java script?

2007-04-09 Thread Musachy Barroso

The widget for the submit button will have a "targets" string field, but you
want to change the "targetsArray" field, given:



you can do this:

var widget = dojo.widget.byId("mybutton");
widget.targetsArray = ["id1", "id2"];

regards
musachy

On 4/9/07, Shekhar Yadav <[EMAIL PROTECTED]> wrote:


I have been trying to do this:



function submitNext() {

var tabId = $("nextPage").value;

submit_next = document.getElementById(tabId);

var cells = submit_next.getElementsByTagName("input");

for (var i = 0; i < cells.length; i++) {

id = cells[i].id;

if ( id == "submit_next") {

cells[i].targets = tabId;

alert(cells[i].targets);

cells[i].click();

}

}

}



The attempt to set targets in the above function does not work. In alert
it does display the changed targets value, but the click seems to not
find it.



The reason I am trying to do this is to create tabbed pages, where the
content of the each tab has a submit button that should only update its
tab on clicking submit. Now, as the tabs have generated id from java
script, I need to modify the targets attribute on the fly.



I have been struggling with this for last 4-5 days; any help would be
greatly appreciated.



Thanks,

Shekhar Yadav



---

Tea, what else !!







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


Re: S2 Action Validation

2007-04-09 Thread Dave Newton
--- [EMAIL PROTECTED] wrote:
> Beyond this, how do I get an S2 action class to
> display a message on the web page?  

See

http://struts.apache.org/2.x/struts2-core/apidocs/com/opensymphony/xwork2/ActionSupport.html#addActionMessage(java.lang.String)

It takes a String, I18N provided by ActionSupport's
standard getText method.

To display on a JSP page:

http://struts.apache.org/2.x/docs/actionmessage.html

> Also, is there a way to search through the messages 
> from this forum? 

Search via your email client, search one of the
archives (see below), or keep a knowledge base
containing only the important bits and tag it however
your system allows (this is the best solution for
several reasons).

> Does this not work like a NewsGroup?

Nope, it works like a mailing list. There are some
archives available; see:

http://struts.apache.org/mail.html

d.



 

We won't tell. Get more on shows you hate to love 
(and love to hate): Yahoo! TV's Guilty Pleasures list.
http://tv.yahoo.com/collections/265 

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



Re: Simple Login demo issue

2007-04-09 Thread Jae K

Hello Vignesh,
You should configure log4j, and look at both the tomcat's catalina.out log
file and log4j log file. The output of the log file should tell you what
went wrong. Let me know if you have trouble setting any of these up.

- Jae

On 4/9/07, [EMAIL PROTECTED] <
[EMAIL PROTECTED]> wrote:


Hi all

I am trying to run the Simple Login demo for Struts 2.
http://struts.apache.org/2.x/docs/simplelogin-with-session.html

I am using struts 2.0.6 with tomcat 5.5.23. "r5sis" is "context root" and
"WebContent" is "Content Directory". I copied the struts jars to the
"WebContent/WEB-INF/lib" folder. The jsp files are placed in
"WebContent/WEB-INF/jsp" folder.

When I run "http://localhost:8080/r5sis/"; it gives a 404 error. I think
there is a problem in configuring the following files.

Following is my folder structure
+ WebContent
- + WEB-INF
   - + classes
  - struts.xml
   - + jsp
   - + lib
   - + src
   - web.xml
- index.jsp

Following are the source code.

web.xml


http://java.sun.com/xml/ns/j2ee"; xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation=
"http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd";>
r5test

struts

org.apache.struts2.dispatcher.FilterDispatcher


struts
/*


index.jsp



struts.xml












/WEB-INF/jsp/welcome.jsp
/WEB-INF/jsp/login.jsp



/WEB-INF/jsp/login.jsp




/WEB-INF/jsp/login.jsp






index.jsp

<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
http://www.w3.org/TR/html4/loose.dtd";>



Insert title here


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



The rest of the code is as same as the sample code given in the demo.

Please help me.

Vignesh




Re: S2 Action Validation

2007-04-09 Thread Harring Figueiredo

Hi Scott:

All you have to do is:

YouAction{

public String your_execute_method() {

 If(some error){
 / * Chose what is appropriate for you  - Field errors display the message
on top of the field on HTML page*/
   this.addActionError();
   this.addActionMessage()
   this.addFieldError();
   return INPUT ;  /* or ERROR */ and display the same .jsp on the struts
.xml  file
}
}

Please let me know if you still need more clarification/ help.

--
Sincerely,

Harring Figueiredo
Sr. Software Engineer
Email: [EMAIL PROTECTED]

"We never become truly spiritual by sitting down and wishing to become so.
You must undertake something so great that you cannot accomplish it
unaided."

On 4/9/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:


I have a situation where an attempt could be made to enter a description
for
an item that already exists in the database.  I am using Hibernate and
suspect the easiest way to prevent this is to use HQL prior to my save.
Beyond this, how do I get an S2 action class to display a message on the
web
page?  My action extends ActionSupport so I see a few methods here that
look
interesting:

getFieldErrors()
getActionErrors()
getActionMessages()
getErrorMessages()

However, I can't tell what I need to add to these Collections as in one
case
it wants the name of the field in error.  This too is unknown since the
name
I give a screen field is not what the name ultimately becomes once
rendered.  It appears the S2 tag expands the name of the field.  I also
see
a ValidationAware interface that can be implemented.

I would be happy to read about the technique if someone could point me in
the right direction.  I cannot seem to find anything on the S2 site when I
need it.  Is there a search facility somewhere?  I would probably post far
fewer questions if the available docs were search-able.  Also, is there a
way to search through the messages from this forum?  I am starting to
wonder
how many of us have personal collections of email messages storing up so
we
can get back to that useful tip someone shared three weeks ago Tuesday!
Does this not work like a NewsGroup?

--
Scott
[EMAIL PROTECTED]



Simple Login demo issue

2007-04-09 Thread Manickam-Periaswamy . Vignesh
Hi all

I am trying to run the Simple Login demo for Struts 2. 
http://struts.apache.org/2.x/docs/simplelogin-with-session.html

I am using struts 2.0.6 with tomcat 5.5.23. "r5sis" is "context root" and 
"WebContent" is "Content Directory". I copied the struts jars to the 
"WebContent/WEB-INF/lib" folder. The jsp files are placed in 
"WebContent/WEB-INF/jsp" folder.

When I run "http://localhost:8080/r5sis/"; it gives a 404 error. I think 
there is a problem in configuring the following files.

Following is my folder structure
+ WebContent
- + WEB-INF
   - + classes
  - struts.xml
   - + jsp
   - + lib
   - + src
   - web.xml
- index.jsp

Following are the source code.

web.xml


http://java.sun.com/xml/ns/j2ee"; xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation=
"http://java.sun.com/xml/ns/j2ee 
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd";>
r5test

struts

org.apache.struts2.dispatcher.FilterDispatcher


struts
/*


index.jsp



struts.xml












/WEB-INF/jsp/welcome.jsp
/WEB-INF/jsp/login.jsp



/WEB-INF/jsp/login.jsp




/WEB-INF/jsp/login.jsp






index.jsp

<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
http://www.w3.org/TR/html4/loose.dtd";>



Insert title here


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



The rest of the code is as same as the sample code given in the demo.

Please help me.

Vignesh 



S2 Action Validation

2007-04-09 Thread stanlick

I have a situation where an attempt could be made to enter a description for
an item that already exists in the database.  I am using Hibernate and
suspect the easiest way to prevent this is to use HQL prior to my save.
Beyond this, how do I get an S2 action class to display a message on the web
page?  My action extends ActionSupport so I see a few methods here that look
interesting:

getFieldErrors()
getActionErrors()
getActionMessages()
getErrorMessages()

However, I can't tell what I need to add to these Collections as in one case
it wants the name of the field in error.  This too is unknown since the name
I give a screen field is not what the name ultimately becomes once
rendered.  It appears the S2 tag expands the name of the field.  I also see
a ValidationAware interface that can be implemented.

I would be happy to read about the technique if someone could point me in
the right direction.  I cannot seem to find anything on the S2 site when I
need it.  Is there a search facility somewhere?  I would probably post far
fewer questions if the available docs were search-able.  Also, is there a
way to search through the messages from this forum?  I am starting to wonder
how many of us have personal collections of email messages storing up so we
can get back to that useful tip someone shared three weeks ago Tuesday!
Does this not work like a NewsGroup?

--
Scott
[EMAIL PROTECTED]


Re: Type-Conversion error - NPE

2007-04-09 Thread Tim Williams

On 4/9/07, Felipe Rodrigues <[EMAIL PROTECTED]> wrote:


Hi Guys,
I'm trying to use the Type Conversion at Struts2, but I'm getting a NPE.

Here is my MyAction-conversion.properties file:

KeyProperty_insertList=id
Element_insertList=my.package.MyBean
CreateIfNull_insertList=true

MyAction has the attribute List insertList as well as its setters
and getters.

Does somebody knows if it is required to override toString in MyBean?

I'm also trying to set a value of a Bean inside a Map under my Bean.
Something like this:

insertList('%{id}').movMap['5'].value

Would it work?

Thanks in Advance,

Felipe


Felipe,
Can you please stop this spam.  Be nice/patient and ask your question
once vs. 6 duplicate emails in less than an hour.  Give it some time.
Thanks,
--tim

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



Re: [OT] problem with displaytag column sorting in struts 1.2 web project

2007-04-09 Thread robinbajaj

Awesome, worked like a charm. Thanks a ton !


Tim Williams wrote:
> 
> Just put requestURI="/mypage.do"  (where mypage.do==the page that
> displays the table).
> 
> --tim
> 
> On 4/8/07, robinbajaj <[EMAIL PROTECTED]> wrote:
>>
>> thanks for the tip.
>> can you please provide more specific example/code-snippet for using the
>> requestURI attribute. i couldnt find enough documentation on this
>> feature.
>> thanks in advance,
>> robin
>>
>>
>> Tim Williams wrote:
>> >
>> > On 4/8/07, robin bajaj <[EMAIL PROTECTED]> wrote:
>> >> Hi All,
>> >> In my Struts 1.2.x webapp, I am getting some Patient records from
>> >> backend using my PatientManager businessObject (which uses Hibernate)
>> >> to send back a populated Patients List in the request scope. (Patient
>> is
>> >> my bean).
>> >>
>> >> I am feeding this patientsList to Displaytag table,
>> >> to show the data in a table.
>> >>
>> >> Here's the code snippet for my jsp containing displaytag table.
>> >> http://rafb.net/p/artIJr98.html
>> >>
>> >> Now, I want to sort this table based on the PatientID
>> >> when I click on the PatientID column.
>> >>
>> >> I read in the Displaytag docs
>> >>
>> >>
>> http://displaytag.homeip.net/displaytag-examples-1.1/example-sorting.jsp
>> >>
>> >> where it mentions the following :
>> >>
>> >> If you want to allow the user to sort the data as it is coming back,
>> >> then you need to just do two things, make sure that the data returned
>> >> from your property implements the Comparable interface (if it doesn't
>> >> natively - use the decorator pattern as shown a couple of examples
>> ago),
>> >> and then set the attribute sortable="true" on the columns that you
>> want
>> >> to be able to sort by.
>> >>
>> >>
>> >> Following the above suggestion, I changed my Patient class to
>> implement
>> >> Comparable interface and implemented the following compareTo method
>> (as
>> >> following)
>> >> http://rafb.net/p/t0CR4Q98.html
>> >>
>> >> Then I re-build my app and restart it on the server, the displaytag
>> >> table shows up fine. But when I click on the first column PtId, it
>> >> doesn't sort the table. I just get the Http404 error page.
>> >>
>> >> Am I missing something ?
>> >
>> > Try setting the requestURI attribute of the table itself?
>> > --tim
>> >
>> > -
>> > To unsubscribe, e-mail: [EMAIL PROTECTED]
>> > For additional commands, e-mail: [EMAIL PROTECTED]
>> >
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/-OT--problem-with-displaytag-column-sorting-in-struts-1.2-web-project-tf3543922.html#a9895137
>> 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/-OT--problem-with-displaytag-column-sorting-in-struts-1.2-web-project-tf3543922.html#a9908623
Sent from the Struts - User mailing list archive at Nabble.com.


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



Type-Conversion error - NPE

2007-04-09 Thread Felipe Rodrigues

Hi Guys,
I'm trying to use the Type Conversion at Struts2, but I'm getting a NPE.

Here is my MyAction-conversion.properties file:

KeyProperty_insertList=id
Element_insertList=my.package.MyBean
CreateIfNull_insertList=true

MyAction has the attribute List insertList as well as its setters
and getters.

Does somebody knows if it is required to override toString in MyBean?

I'm also trying to set a value of a Bean inside a Map under my Bean.
Something like this:

insertList('%{id}').movMap['5'].value

Would it work?

Thanks in Advance,

Felipe
-- 
View this message in context: 
http://www.nabble.com/Type-Conversion-error---NPE-tf3549169.html#a9908217
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: resume after login feature

2007-04-09 Thread Dave Newton
--- Jae K <[EMAIL PROTECTED]> wrote:
> I don't want to turn this into flamebait, but do you
> really think that the links you provided are 
> sufficient?

All I can say is that they were for me (the Wiki
links, not the API links).

As I said previously I agree that there could be
improvement (I have added another bit about dynamic
results to the result configuration element page along
with a link to the original FAQ entry and put the
application stack element onto the top-level OGNL
page) but the specific things we were talking about
*were* documented, but you had to read to the bottom
of the page in one case and have perused the FAQs in
another.

d.



 

It's here! Your new message!  
Get new email alerts with the free Yahoo! Toolbar.
http://tools.search.yahoo.com/toolbar/features/mail/

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



Re: S2 Request Lifecycle

2007-04-09 Thread Ted Husted

If validation fails, then the original input values are pushed onto
the stack, so that the tags can present the input values. If the
Action or Model properties were different, then the original input
properties would still be presented by the tags, because the original
input properties were the last one's pushed on to the stack. If for
some reason, a different value needed to be displayed for the original
invalid input, the solution would be to push the wanted values onto
the stack, so that they are the first ones found.,

On 4/9/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:

Then is something reloading the properties back into the bean if the action
method returns INPUT?

On 4/9/07, Ted Husted <[EMAIL PROTECTED]> wrote:
>
> It shouldn't. The interceptor only autowires become the action invocation.
> 
http://svn.opensymphony.com/fisheye/browse/xwork/trunk/src/java/com/opensymphony/xwork2/spring/interceptor/ActionAutowiringInterceptor.java?r=1063
>
> -T.
>
> On 4/9/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> > Sorry Ted!
> >
> > I should have been more clear with my question.  Does S2 leverage Spring
> in
> > such a way as so fetch a new Action bean when the Action method returns
> > SUCCESS?  It appears a new bean is being injected into my Action when a
> > method returns SUCCESS.
> >
> > Scott
> >
> > On 4/9/07, Ted Husted <[EMAIL PROTECTED]> wrote:
> > >
> > > By default, "input" is one of the magic methods that bypass
> > > validation. In the case of a request for the input method, validation
> > > is not applied, and input is returned. In the case of request for the
> > > default execute/success method, input would be returned if validation
> > > fails, and success returned if validation succeeds. Of course, if an
> > > exception is thrown, then the exception handling would apply instead.
> > >
> > > HTH, Ted
> > > 
> > >
> > > On 4/9/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> > > > I have an interesting situation occurring but let me first ask how
> the
> > > > request lifecycle differs between returning INPUT or SUCCESS from an
> > > action
> > > > method.  Consider this action mapping:
> > > >
> > > > 
> > > > /pages/course.jsp
> > > > /pages/course.jsp
> > > > 
> > > > --
> > > > Scott
> > > > [EMAIL PROTECTED]


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



Re: resume after login feature

2007-04-09 Thread Jae K

There are several factors that are multiplicitave in the final utility of a
software package, such as performance, correctness, etc and one of them is
ease of use / documentation. I love javadocs for development, but the
javadoc API is usually never a proper form of overall documentation.

I don't want to turn this into flamebait, but do you really think that the
links you provided are sufficient?

- Jae

On 4/9/07, Dave Newton <[EMAIL PROTECTED]> wrote:


--- Dale Newfield <[EMAIL PROTECTED]> wrote:
> [links to API docs]
> I would disagree that "it's not documented".

I think my links were easier to find ;)

d.






Never miss an email again!
Yahoo! Toolbar alerts you the instant new Mail arrives.
http://tools.search.yahoo.com/toolbar/features/mail/

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




Re: S2 Request Lifecycle

2007-04-09 Thread stanlick

Then is something reloading the properties back into the bean if the action
method returns INPUT?

On 4/9/07, Ted Husted <[EMAIL PROTECTED]> wrote:


It shouldn't. The interceptor only autowires become the action invocation.


http://svn.opensymphony.com/fisheye/browse/xwork/trunk/src/java/com/opensymphony/xwork2/spring/interceptor/ActionAutowiringInterceptor.java?r=1063

-T.

On 4/9/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> Sorry Ted!
>
> I should have been more clear with my question.  Does S2 leverage Spring
in
> such a way as so fetch a new Action bean when the Action method returns
> SUCCESS?  It appears a new bean is being injected into my Action when a
> method returns SUCCESS.
>
> Scott
>
> On 4/9/07, Ted Husted <[EMAIL PROTECTED]> wrote:
> >
> > By default, "input" is one of the magic methods that bypass
> > validation. In the case of a request for the input method, validation
> > is not applied, and input is returned. In the case of request for the
> > default execute/success method, input would be returned if validation
> > fails, and success returned if validation succeeds. Of course, if an
> > exception is thrown, then the exception handling would apply instead.
> >
> > HTH, Ted
> > 
> >
> > On 4/9/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> > > I have an interesting situation occurring but let me first ask how
the
> > > request lifecycle differs between returning INPUT or SUCCESS from an
> > action
> > > method.  Consider this action mapping:
> > >
> > > 
> > > /pages/course.jsp
> > > /pages/course.jsp
> > > 
> > > --
> > > Scott
> > > [EMAIL PROTECTED]

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





--
Scott
[EMAIL PROTECTED]


Type-Conversion error - NPE

2007-04-09 Thread Felipe Rodrigues

Hi Guys,
I'm trying to use the Type Conversion at Struts2, but I'm getting a NPE.

Here is my MyAction-conversion.properties file:

KeyProperty_insertList=id
Element_insertList=my.package.MyBean
CreateIfNull_insertList=true

MyAction has the attribute List insertList as well as its setters
and getters.

Does somebody knows if it is required to override toString in MyBean?

I'm also trying to set a value of a Bean inside a Map under my Bean.
Something like this:

insertList('%{id}').movMap['5'].value

Would it work?

Thanks in Advance,

Felipe
-- 
View this message in context: 
http://www.nabble.com/Type-Conversion-error---NPE-tf3549020.html#a9907753
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: S2 Request Lifecycle

2007-04-09 Thread Ted Husted

It shouldn't. The interceptor only autowires become the action invocation.

http://svn.opensymphony.com/fisheye/browse/xwork/trunk/src/java/com/opensymphony/xwork2/spring/interceptor/ActionAutowiringInterceptor.java?r=1063

-T.

On 4/9/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:

Sorry Ted!

I should have been more clear with my question.  Does S2 leverage Spring in
such a way as so fetch a new Action bean when the Action method returns
SUCCESS?  It appears a new bean is being injected into my Action when a
method returns SUCCESS.

Scott

On 4/9/07, Ted Husted <[EMAIL PROTECTED]> wrote:
>
> By default, "input" is one of the magic methods that bypass
> validation. In the case of a request for the input method, validation
> is not applied, and input is returned. In the case of request for the
> default execute/success method, input would be returned if validation
> fails, and success returned if validation succeeds. Of course, if an
> exception is thrown, then the exception handling would apply instead.
>
> HTH, Ted
> 
>
> On 4/9/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> > I have an interesting situation occurring but let me first ask how the
> > request lifecycle differs between returning INPUT or SUCCESS from an
> action
> > method.  Consider this action mapping:
> >
> > 
> > /pages/course.jsp
> > /pages/course.jsp
> > 
> > --
> > Scott
> > [EMAIL PROTECTED]


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



Type-Conversion error - NPE

2007-04-09 Thread Felipe Rodrigues

Hi Guys,
I'm trying to use the Type Conversion at Struts2, but I'm getting a NPE.

Here is my MyAction-conversion.properties file:

KeyProperty_insertList=id
Element_insertList=my.package.MyBean
CreateIfNull_insertList=true

MyAction has the attribute List insertList as well as its setters
and getters.

Does somebody knows if it is required to override toString in MyBean?

I'm also trying to set a value of a Bean inside a Map under my Bean.
Something like this:

insertList('%{id}').movMap['5'].value

Would it work?

Thanks in Advance,

Felipe
-- 
View this message in context: 
http://www.nabble.com/Type-Conversion-error---NPE-tf3549019.html#a9907751
Sent from the Struts - User mailing list archive at Nabble.com.


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



Type-Conversion at Struts2 - NPE

2007-04-09 Thread Felipe Rodrigues

Hi Guys,
I'm trying to use the Type Conversion at Struts2, but I'm getting a NPE.

Here is my MyAction-conversion.properties file:

KeyProperty_insertList=id
Element_insertList=my.package.MyBean
CreateIfNull_insertList=true

MyAction has the attribute List insertList as well as its setters
and getters.

Does somebody knows if it is required to override toString in MyBean?

I'm also trying to set a value of a Bean inside a Map under my Bean.
Something like this:

insertList('%{id}').movMap['5'].value

Would it work?

Thanks in Advance,

Felipe
-- 
View this message in context: 
http://www.nabble.com/Type-Conversion-at-Struts2---NPE-tf3549018.html#a9907750
Sent from the Struts - User mailing list archive at Nabble.com.


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



Type-Conversion at Struts2 - NPE

2007-04-09 Thread Felipe Rodrigues

Hi Guys,
I'm trying to use the Type Conversion at Struts2, but I'm getting a NPE.

Here is my MyAction-conversion.properties file:

KeyProperty_insertList=id
Element_insertList=my.package.MyBean
CreateIfNull_insertList=true

MyAction has the attribute List insertList as well as its setters
and getters.

Does somebody knows if it is required to override toString in MyBean?

I'm also trying to set a value of a Bean inside a Map under my Bean.
Something like this:

insertList('%{id}').movMap['5'].value

Would it work?

Thanks in Advance,

Felipe
-- 
View this message in context: 
http://www.nabble.com/Type-Conversion-at-Struts2---NPE-tf3549017.html#a9907749
Sent from the Struts - User mailing list archive at Nabble.com.


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



Type-Conversion at Struts2 - NPE

2007-04-09 Thread Felipe Rodrigues

Hi Guys,
I'm trying to use the Type Conversion at Struts2, but I'm getting a NPE.

Here is my MyAction-conversion.properties file:

KeyProperty_insertList=id
Element_insertList=my.package.MyBean
CreateIfNull_insertList=true

MyAction has the attribute List insertList as well as its setters
and getters.

Does somebody knows if it is required to override toString in MyBean?

I'm also trying to set a value of a Bean inside a Map under my Bean.
Something like this:

insertList('%{id}').movMap['5'].value

Would it work?

Thanks in Advance,

Felipe
-- 
View this message in context: 
http://www.nabble.com/Type-Conversion-at-Struts2---NPE-tf3549015.html#a9907747
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: S2 Request Lifecycle

2007-04-09 Thread stanlick

Sorry Ted!

I should have been more clear with my question.  Does S2 leverage Spring in
such a way as so fetch a new Action bean when the Action method returns
SUCCESS?  It appears a new bean is being injected into my Action when a
method returns SUCCESS.

Scott

On 4/9/07, Ted Husted <[EMAIL PROTECTED]> wrote:


By default, "input" is one of the magic methods that bypass
validation. In the case of a request for the input method, validation
is not applied, and input is returned. In the case of request for the
default execute/success method, input would be returned if validation
fails, and success returned if validation succeeds. Of course, if an
exception is thrown, then the exception handling would apply instead.

HTH, Ted


On 4/9/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> I have an interesting situation occurring but let me first ask how the
> request lifecycle differs between returning INPUT or SUCCESS from an
action
> method.  Consider this action mapping:
>
> 
> /pages/course.jsp
> /pages/course.jsp
> 
> --
> Scott
> [EMAIL PROTECTED]
>

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





--
Scott
[EMAIL PROTECTED]


How to change "targets" attribute for submit button from java script?

2007-04-09 Thread Shekhar Yadav
I have been trying to do this:

 

function submitNext() {

var tabId = $("nextPage").value;

submit_next = document.getElementById(tabId);

var cells = submit_next.getElementsByTagName("input");

for (var i = 0; i < cells.length; i++) {

id = cells[i].id;

if ( id == "submit_next") {

cells[i].targets = tabId;

alert(cells[i].targets);

cells[i].click();

}

}

}

 

The attempt to set targets in the above function does not work. In alert
it does display the changed targets value, but the click seems to not
find it. 

 

The reason I am trying to do this is to create tabbed pages, where the
content of the each tab has a submit button that should only update its
tab on clicking submit. Now, as the tabs have generated id from java
script, I need to modify the targets attribute on the fly.

 

I have been struggling with this for last 4-5 days; any help would be
greatly appreciated.

 

Thanks,

Shekhar Yadav

 

---

Tea, what else !!

 



Re: resume after login feature

2007-04-09 Thread Dave Newton
--- Dale Newfield <[EMAIL PROTECTED]> wrote:
> [links to API docs]
> I would disagree that "it's not documented".

I think my links were easier to find ;)

d.



 

Never miss an email again!
Yahoo! Toolbar alerts you the instant new Mail arrives.
http://tools.search.yahoo.com/toolbar/features/mail/

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



Re: resume after login feature

2007-04-09 Thread Dale Newfield

Jae K wrote:

Last but not least, it is not obvious that the OGNL expressions need
to be enclosed in ${} when used in the struts config file. (Is this
even true? I don't know since it's not documented! It certainly isn't
documented so in the OGNL documentation).


http://struts.apache.org/2.0.6/struts2-core/apidocs/org/apache/struts2/dispatcher/StrutsResultSupport.html
documents where such OGNL expressions can be used, and refers to
http://struts.apache.org/2.0.6/struts2-core/apidocs/com/opensymphony/xwork2/util/TextParseUtil.html#translateVariables(java.lang.String,%20com.opensymphony.xwork2.util.ValueStack)
to explain just how these expressions are substituted when found in 
parsable strings.


I don't disagree that it could be documented in more places, but I would 
disagree that "it's not documented".


-Dale

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



Re: S2 Request Lifecycle

2007-04-09 Thread Ted Husted

By default, "input" is one of the magic methods that bypass
validation. In the case of a request for the input method, validation
is not applied, and input is returned. In the case of request for the
default execute/success method, input would be returned if validation
fails, and success returned if validation succeeds. Of course, if an
exception is thrown, then the exception handling would apply instead.

HTH, Ted


On 4/9/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:

I have an interesting situation occurring but let me first ask how the
request lifecycle differs between returning INPUT or SUCCESS from an action
method.  Consider this action mapping:


/pages/course.jsp
/pages/course.jsp

--
Scott
[EMAIL PROTECTED]



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



S2 Request Lifecycle

2007-04-09 Thread stanlick

I have an interesting situation occurring but let me first ask how the
request lifecycle differs between returning INPUT or SUCCESS from an action
method.  Consider this action mapping:

   
   /pages/course.jsp
   /pages/course.jsp
   
--
Scott
[EMAIL PROTECTED]


Re: Creating custom struts 2 tags

2007-04-09 Thread Musachy Barroso

Tabletags uses Struts Tags to generate the tld, you can use them also.

musachy

On 4/9/07, Telmo Costa <[EMAIL PROTECTED]> wrote:


Correct... well thought! Struts-core jar includes the struts-tags.tld that
it generated. I created a new tld for my tags, and it worked fine!

Tks a lot!

-Original Message-
From: Dave Newton [mailto:[EMAIL PROTECTED]
Sent: segunda-feira, 9 de Abril de 2007 17:35
To: Struts Users Mailing List
Subject: RE: Creating custom struts 2 tags

--- Telmo Costa <[EMAIL PROTECTED]> wrote:
> I also changed the annotation to
> @StrutsTag(name="date2", tldTagClass="my.Date2Tag"
> ...). It compiled fine, but when I try to use it in
> a jsp, it throws "javax.servlet.ServletException:
> /pages/example/Format.jsp(42,2) No tag "date2"
> defined in tag library imported with prefix
> "s"". I couldn't understand yet how the annotation
> works, so can you tell me what is wrong?

I'm not sure how the annotation is being processed,
but I would imagine that (at least in the beginning)
define your own TLD for your own custom tags.

The annotation is (probably, anyway?) used to create
the S2 TLD file at build-time.

So you'd either need to duplicate that step, or just
create one manually.

d.







Get your own web address.
Have a HUGE year through Yahoo! Small Business.
http://smallbusiness.yahoo.com/domains/?p=BESTDEAL

-
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: Creating custom struts 2 tags

2007-04-09 Thread Telmo Costa
Correct... well thought! Struts-core jar includes the struts-tags.tld that
it generated. I created a new tld for my tags, and it worked fine!

Tks a lot!

-Original Message-
From: Dave Newton [mailto:[EMAIL PROTECTED] 
Sent: segunda-feira, 9 de Abril de 2007 17:35
To: Struts Users Mailing List
Subject: RE: Creating custom struts 2 tags

--- Telmo Costa <[EMAIL PROTECTED]> wrote:
> I also changed the annotation to 
> @StrutsTag(name="date2", tldTagClass="my.Date2Tag"
> ...). It compiled fine, but when I try to use it in
> a jsp, it throws "javax.servlet.ServletException:
> /pages/example/Format.jsp(42,2) No tag "date2" 
> defined in tag library imported with prefix
> "s"". I couldn't understand yet how the annotation 
> works, so can you tell me what is wrong?

I'm not sure how the annotation is being processed,
but I would imagine that (at least in the beginning)
define your own TLD for your own custom tags.

The annotation is (probably, anyway?) used to create
the S2 TLD file at build-time.

So you'd either need to duplicate that step, or just
create one manually.

d.



 


Get your own web address.  
Have a HUGE year through Yahoo! Small Business.
http://smallbusiness.yahoo.com/domains/?p=BESTDEAL

-
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: Creating custom struts 2 tags

2007-04-09 Thread Dave Newton
--- Telmo Costa <[EMAIL PROTECTED]> wrote:
> I also changed the annotation to 
> @StrutsTag(name="date2", tldTagClass="my.Date2Tag"
> ...). It compiled fine, but when I try to use it in
> a jsp, it throws "javax.servlet.ServletException:
> /pages/example/Format.jsp(42,2) No tag "date2" 
> defined in tag library imported with prefix
> "s"". I couldn't understand yet how the annotation 
> works, so can you tell me what is wrong?

I'm not sure how the annotation is being processed,
but I would imagine that (at least in the beginning)
define your own TLD for your own custom tags.

The annotation is (probably, anyway?) used to create
the S2 TLD file at build-time.

So you'd either need to duplicate that step, or just
create one manually.

d.



 

Get your own web address.  
Have a HUGE year through Yahoo! Small Business.
http://smallbusiness.yahoo.com/domains/?p=BESTDEAL

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



RE: Creating custom struts 2 tags

2007-04-09 Thread Telmo Costa
Hi, 

That was exactly my first approach: I copied Date and DateTag to my own
package, and renamed them to Date2 and Date2Tag just for testing. I also
changed the annotation to @StrutsTag(name="date2", tldTagClass="my.Date2Tag"
...). It compiled fine, but when I try to use it in a jsp, it throws
"javax.servlet.ServletException: /pages/example/Format.jsp(42,2) No tag
"date2" defined in tag library imported with prefix "s"". I couldn't
understand yet how the annotation works, so can you tell me what is wrong?

Tks

-Original Message-
From: Dave Newton [mailto:[EMAIL PROTECTED] 
Sent: segunda-feira, 9 de Abril de 2007 17:16
To: Struts Users Mailing List
Subject: Re: Creating custom struts 2 tags

--- Telmo Costa wrote:
> I've been searching for documentation on how to
> create a custom tag for struts2, but I haven't 
> succeed. Can you tell me where to find a tutorial or
> give me some guidelines on that subject?

They're just like any other custom tags.

Are you referring specifically about how to pull OGNL
values like the S2 tags do?

I'd probably start by looking at the source of
org.apache.struts2.components.Date, since it does what
you want (but for dates :)

I'm guessing if you extend Component you're a *long*
way through the process already; getting the value
appears to be as easy as calling findValue(valueName)
and doing what you need to with it.

That's a good idea for a quick tutorial though; if I
have time I'll add something tonight.

d.



 


Finding fabulous fares is fun.  
Let Yahoo! FareChase search your favorite travel sites to find flight and
hotel bargains.
http://farechase.yahoo.com/promo-generic-14795097

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

2007-04-09 Thread Dave Newton
--- Skip Hollowell <[EMAIL PROTECTED]> wrote:
> minLength and maxLength (case is important and I am
> an idiot)

;) I'd bet we'd turn the game over if we all kept
score on stuff like that!

d.



 

Never miss an email again!
Yahoo! Toolbar alerts you the instant new Mail arrives.
http://tools.search.yahoo.com/toolbar/features/mail/

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



Re: [S2] Validation setup

2007-04-09 Thread Skip Hollowell

minLength and maxLength (case is important and I am an idiot)

Done and done.  Thanks Dave for helping where you could.  Much appreciated.

Skip.

Skip Hollowell wrote:

Now, if I could only figure out why I am getting errors on the minlength
and maxlength of my stringlength validator:
   




  4
  4
  



WARNING: Caught OgnlException while setting property 'minlength' on type
'com.opensymphony.xwork2.validator.validators.StringLengthFieldValidator'. 


ognl.NoSuchPropertyException:
com.opensymphony.xwork2.validator.validators.StringLengthFieldValidator.minlength 







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



struts.action.extension question

2007-04-09 Thread meeboo


-- 
View this message in context: 
http://www.nabble.com/struts.action.extension-question-tf3548145.html#a9905001
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: Creating custom struts 2 tags

2007-04-09 Thread Musachy Barroso

You can check tabletags as an example of creating a plugin with tags:

http://code.google.com/p/tabletags/

regards
musachy

On 4/9/07, Dave Newton <[EMAIL PROTECTED]> wrote:


--- Telmo Costa wrote:
> I've been searching for documentation on how to
> create a custom tag for struts2, but I haven't
> succeed. Can you tell me where to find a tutorial or
> give me some guidelines on that subject?

They're just like any other custom tags.

Are you referring specifically about how to pull OGNL
values like the S2 tags do?

I'd probably start by looking at the source of
org.apache.struts2.components.Date, since it does what
you want (but for dates :)

I'm guessing if you extend Component you're a *long*
way through the process already; getting the value
appears to be as easy as calling findValue(valueName)
and doing what you need to with it.

That's a good idea for a quick tutorial though; if I
have time I'll add something tonight.

d.






Finding fabulous fares is fun.
Let Yahoo! FareChase search your favorite travel sites to find flight and
hotel bargains.
http://farechase.yahoo.com/promo-generic-14795097

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

2007-04-09 Thread Dave Newton
--- Skip Hollowell <[EMAIL PROTECTED]> wrote:
> Now, if I could only figure out why I am getting
> errors on the minlength and maxlength of my 
> stringlength validator:
>   4
>   4

Try minLength/maxLength.

> WARNING: Caught OgnlException while setting property
> 'minlength' on type 

That's a warning, btw :p

d.



 

No need to miss a message. Get email on-the-go 
with Yahoo! Mail for Mobile. Get started.
http://mobile.yahoo.com/mail 

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



Re: Creating custom struts 2 tags

2007-04-09 Thread Dave Newton
--- Telmo Costa wrote:
> I've been searching for documentation on how to
> create a custom tag for struts2, but I haven't 
> succeed. Can you tell me where to find a tutorial or
> give me some guidelines on that subject?

They're just like any other custom tags.

Are you referring specifically about how to pull OGNL
values like the S2 tags do?

I'd probably start by looking at the source of
org.apache.struts2.components.Date, since it does what
you want (but for dates :)

I'm guessing if you extend Component you're a *long*
way through the process already; getting the value
appears to be as easy as calling findValue(valueName)
and doing what you need to with it.

That's a good idea for a quick tutorial though; if I
have time I'll add something tonight.

d.



 

Finding fabulous fares is fun.  
Let Yahoo! FareChase search your favorite travel sites to find flight and hotel 
bargains.
http://farechase.yahoo.com/promo-generic-14795097

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



Re: [S2] Validation setup

2007-04-09 Thread Skip Hollowell

The file name for the validation file is:
{ActionName}-{AliasName}-validation.xml

In my case:
AccountAction-Payment_retrieveFee-validation.xml

Now, if I could only figure out why I am getting errors on the minlength 
and maxlength of my stringlength validator:

  
   
   
   
   
 4
 4
 
   
   

WARNING: Caught OgnlException while setting property 'minlength' on type 
'com.opensymphony.xwork2.validator.validators.StringLengthFieldValidator'.
ognl.NoSuchPropertyException: 
com.opensymphony.xwork2.validator.validators.StringLengthFieldValidator.minlength


Anyone?

Skip Hollowell wrote:

I had the whole validation thing working great, and then I had to go and
get 'fancy' with my Actions and aliases, and now, I can't seem to get my
validator xml files named correctly...



/WEB-INF/jsp/UC01-EnterPayment.jsp




name="input">/WEB-INF/jsp/UC01-FindAccount.jsp

/WEB-INF/jsp/UC01a-RetrieveFee.jsp
/WEB-INF/jsp/UC01-FindAccount.jsp
name="search">/WEB-INF/jsp/UC01-FindAccount.jsp

Account_input
Account_input

 
name="input">/WEB-INF/jsp/UC01a-RetrieveFee.jsp
name="list">/WEB-INF/jsp/UC01a-RetrieveFee.jsp

/WEB-INF/jsp/UC01b-EnterPayment.jsp
/WEB-INF/jsp/UC01b-EnterPayment.jsp
/WEB-INF/jsp/UC01a-RetrieveFee.jsp
/WEB-INF/jsp/UC01b-EnterPayment.jsp
Menu
/WEB-INF/jsp/UC01a-RetrieveFee.jsp


According to the doc:

Validation rules can be specified:

   1. Per Action class: in a file named ActionName-validation.xml
   2. Per Action alias: in a file named ActionName-alias-validation.xml
   3. Inheritance hierarchy and interfaces implemented by Action class:
  WebWork searches up the inheritance tree of the action to find
  default validations for parent classes of the Action and
  interfaces implemented


So I have a form that will be submitting a payment, and I want to
validate a couple fields on the form...


What do I name my validation xml file in com.skip.action?
AccountAction-valdiation.xml is too broad
AccountAction_payment-validation.xml doesn't work
AccountAction_Payment-validation.xml doesn't work
Payment-validation.xml doesn't work


I'll keep digging through Wikis, Examples and Doc, but I haven't found
it yet.
Thanks for any help

Skip


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



Creating custom struts 2 tags

2007-04-09 Thread Telmo Costa
Hi,

I've been searching for documentation on how to create a custom tag for
struts2, but I haven't succeed. Can you tell me where to find a tutorial or
give me some guidelines on that subject?

I need to create a tag for immediate amount values formatting, as exists for
date values.

Tks a lot



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



Exception starting filter struts2

2007-04-09 Thread McKinley, Kevin
I am attempting to add a struts2 page to an existing struts1
application.  I get an exception starting filter on deploy (see stack
trace below). Anyone have idea on how to resolve. My struts2 entry in
web.xml is:

 



struts2



org.apache.struts2.dispatcher.FilterDispatcher





 



struts2

/*



   

 

 

07:13:08,750 INFO  [TilesPlugin] Tiles definition factory loaded for
module ''.

07:13:18,484 INFO  [TomcatDeployer] deploy, ctxPath=/query-tool,
warUrl=.../tmp/deploy/tmp27603query-tool-exp.war/

07:13:20,234 ERROR [[/query-tool]] Exception starting filter struts2

Class: net.sf.saxon.event.SerializerFactory

File: SerializerFactory.java

Method: getReceiver

Line: 154 - net/sf/saxon/event/SerializerFactory.java:154:-1

at
com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadCo
nfigurationFiles(XmlConfigurationProvider.java:791)

at
com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadDo
cuments(XmlConfigurationProvider.java:132)

at
com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.init(X
mlConfigurationProvider.java:100)

at
com.opensymphony.xwork2.config.impl.DefaultConfiguration.reload(DefaultC
onfiguration.java:130)

at
com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(Con
figurationManager.java:52)

at
org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispa
tcher.java:398)

at
org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:455)

at
org.apache.struts2.dispatcher.FilterDispatcher.init(FilterDispatcher.jav
a:201)

at
org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFi
lterConfig.java:225)

at
org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(Applicatio
nFilterConfig.java:308)

at
org.apache.catalina.core.ApplicationFilterConfig.(ApplicationFilte
rConfig.java:79)

at
org.apache.catalina.core.StandardContext.filterStart(StandardContext.jav
a:3540)

at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4110
)

at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.ja
va:759)

at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)

at
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)

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

 



The information contained in this communication may be CONFIDENTIAL and is 
intended only for the use of the recipient(s) named above.  If you are not the 
intended recipient, you are hereby notified that any dissemination, 
distribution, or copying of this communication, or any of its contents, is 
strictly prohibited.  If you have received this communication in error, please 
notify the sender and delete/destroy the original message and any copy of it 
from your computer or paper files.


Re: AJAX div loads local URL but not remote one

2007-04-09 Thread Eduardo Kortright

Thanks.  Does that mean that the ajax tags allow only clients in the same
domain as the server to communicate with the server?  Or does it mean that
clients (in any domain) can communicate only with the server that served out
the pages containing the ajax call?

--
Eduardo


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


Dojo supports crossdomain XHR using IFrames, but the ajax tags do not
support it, yet.

musachy

On 4/7/07, Eduardo Kortright <[EMAIL PROTECTED]> wrote:
>
> Sorry about that... cut and paste went crazy on me; let me try
> again.  Here
> is the JSP again:
>
> <%@ page language="java" contentType="text/html;
> charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
>  http://www.w3.org/TR/html4/loose.dtd";>
> <%@ taglib prefix="s" uri="/struts-tags" %>
> 
> 
> 
> Welcome
> 
> 
> 
> 
> http://localhost:8080/Struts2-tutorial1/";>
>   Local page goes here.
> 
> 
> http://www.google.com";
>   loadingText="Please wait . . ." errorText="Sorry, can't load remote
> page">
>   Remote page goes here.
> 
> 
> 
> 
>
>
> On 4/7/07, Eduardo Kortright <[EMAIL PROTECTED]> wrote:
> >
> > Hi all,
> >
> > I'm trying to learn how to use AJAX, but I'm having some trouble.  In
> the
> > JSP below, the first  loads the URL just fine, but the second
> >  simply displays "Loading..." and stays that way forever.  IE
> > displays "Error on page" in the status bar when it is (apparently)
> trying to
> > contact the server, then "Done".  Is there anything that needs to be
> done
> > differently for a remote URL?
> >
> > Thanks.
> >
> > --
> > Eduardo
> >
>



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





--
Eduardo Kortright


S2 XSLT Result Content-Type

2007-04-09 Thread Erik Costlow
I have a Struts2 action that uses an XSLT result to generate a final
XHTML document that gets sent to the client. This action is sending the
content-type of "text/xml" so IE6 is displaying the information as an
XML tree, instead of showing a rendered html document.


  /xsl/defaults.xsl
  ^/result/[^/*]$
  1
.*(locale).*
  


Is there a way that I can combine this result with an HttpHeader result
to make sure that the content-type header is "text/html?" Or, what is
the recommended way of controlling this header?

Thanks,
  Erik

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



Re: AJAX div loads local URL but not remote one

2007-04-09 Thread Musachy Barroso

This is not specific to the Struts ajax tags, HXR (ajax) calls can only be
done to the domain from where the page was loaded from. Dojo and other
frameworks use some neat tricks to get around this, but the Struts ajax tags
do not expose this Dojo functionality yet.

regards
musachy

On 4/9/07, Eduardo Kortright <[EMAIL PROTECTED]> wrote:


Thanks.  Does that mean that the ajax tags allow only clients in the same
domain as the server to communicate with the server?  Or does it mean that
clients (in any domain) can communicate only with the server that served
out
the pages containing the ajax call?

--
Eduardo


On 4/7/07, Musachy Barroso <[EMAIL PROTECTED]> wrote:
>
> Dojo supports crossdomain XHR using IFrames, but the ajax tags do not
> support it, yet.
>
> musachy
>
> On 4/7/07, Eduardo Kortright <[EMAIL PROTECTED]> wrote:
> >
> > Sorry about that... cut and paste went crazy on me; let me try
> > again.  Here
> > is the JSP again:
> >
> > <%@ page language="java" contentType="text/html;
> > charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
> >  > http://www.w3.org/TR/html4/loose.dtd";>
> > <%@ taglib prefix="s" uri="/struts-tags" %>
> > 
> > 
> > 
> > Welcome
> > 
> > 
> > 
> > 
> > http://localhost:8080/Struts2-tutorial1/";>
> >   Local page goes here.
> > 
> > 
> > http://www.google.com";
> >   loadingText="Please wait . . ." errorText="Sorry, can't load remote
> > page">
> >   Remote page goes here.
> > 
> > 
> > 
> > 
> >
> >
> > On 4/7/07, Eduardo Kortright <[EMAIL PROTECTED]> wrote:
> > >
> > > Hi all,
> > >
> > > I'm trying to learn how to use AJAX, but I'm having some
trouble.  In
> > the
> > > JSP below, the first  loads the URL just fine, but the
second
> > >  simply displays "Loading..." and stays that way
forever.  IE
> > > displays "Error on page" in the status bar when it is (apparently)
> > trying to
> > > contact the server, then "Done".  Is there anything that needs to be
> > done
> > > differently for a remote URL?
> > >
> > > Thanks.
> > >
> > > --
> > > Eduardo
> > >
> >
>
>
>
> --
> "Hey you! Would you help me to carry the stone?" Pink Floyd
>



--
Eduardo Kortright





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


Re: WildCards and Results

2007-04-09 Thread Ted Husted

On 4/9/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:

###struts.enable.DynamicMethodInvocation = false

That was it!  I updated the value last week with false but it was commented
out!  Too much time passed between then and now!  I guess the default is
true?  I would hope you would not get this behavior unless you specify the
need yourself???


Since Struts 2.0.x is the "compatibility release", after an extended
discussion, we left the behavior as enabled. This could change in
Struts 2.1.x (as the "new syntax" default changed in successive
releases of WebWork).

-Ted.

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



Re: WildCards and Results

2007-04-09 Thread stanlick

This seems to me like putting another bullet in the gun!  I agree you should
pick a strategy and go with it.  Having said that, do you agree the default
for WCM should be false?

Scott

On 4/9/07, Ted Husted <[EMAIL PROTECTED]> wrote:


We consider Wildcard Methods and DMI to be distinct strategies, and I
would suggest that an application use one or the other. But, Wildcards
and DMI can co-exist if the Wildcard URIs don't use the ! character.

HTH, Ted


On 4/9/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> After refactoring my app to use the S2 Dynamic Method Invocation as
follows:
>
> 
> /pages/course.jsp
> /pages/course.jsp
> 
>
> I am discovering that both
> http://localhost:8080/dsms/course_create.action AND
> http://localhost:8080/dsms/course!create.action work the same way.  Is
this
> a feature?  This is the sort of voodoo that should probably be cast out!
>
> Scott
>
>
>
> On 4/6/07, Ted Husted <[EMAIL PROTECTED]> wrote:
> >
> > There's a feature embedded in WebWork that lets the "!" character
> > invoke a method other than execute. In WebWork, it doesn't really have
> > a name. During the S2 discussions, we coined the term "dynamic method
> > invocation" to describe how WW/S2 use the ! notation.
> >
> > For Struts 2, we added a switch to disable Dynamic Method Invocation"
> > for two reasons. First, it can cause security issues if POJO actions
> > are used. Second, it overlaps with the Wildcard feature that we
> > brought over from Struts 1 (and from Cocoon before that).
> >
> > S2 does support  "dynamic method invocation", but there are problems
> > with the implementation. Essentially, the code scans the action name
> > for a "!", and finding one, tricks the framework into invoking the
> > other method instead of execute. The other method is invoked, but it
> > uses the same configuration as the execute method, including
> > validations.  The framework "believes" it is invoking the "Category"
> > action with the execute method.
> >
> > The Wildcard feature is implemented differently. When a Wildcard
> > action is invoked, the framework acts as if the matching action had
> > been hardcoded. The framework "believes" it's executing
> > "Category!create" and "knows" it is executing the "create" method.
> > This permits us to add specific validations, localizations, and type
> > converters, for a Wildcard action, just like a conventional action.
> >
> > If someone were to implement [WW-1522], then the  "dynamic method
> > invocation" approach could have its own validations too. Here, the
> > notion is to generate carbon actions for qualifying methods. The
> > invocation would no longer be dynamic, because there would be an
> > actual action in the configuration, but any method could be invoked.
> >
> > * https://issues.apache.org/struts/browse/WW-1522
> >
> > My first pass at implementing [WW-1522] didn't work out. Though, I'm
> > wondering if whatever we do for the codebehind plugin might work here
> > too. At this point, I will probably never get to it myself, but
> > perhaps someone will pickup the baton.
> >
> > In my own applications, I tend to use the underscore ("_") as a
> > Wildcard separator, to avoid confusion with the WebWork bang. In
> > practice, these are the only two special characters that work without
> > causing JavaScript issues.
> >
> > HTH, Ted
> > 
> >
> >
> > On 4/6/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> > > since '!' is already a special character which specifies the method
name
> > > automatically see struts.properties configuration file for more
details
> > > about how to enable/disable dynamic method invocation
> > >
> > > Can you explain this?  I read all I could find on this topic and
their
> > was
> > > discussion dating back to early XWorks changes, however I could not
make
> > > sense out of it.  I do recall changing my struts.properties and it
does
> > seem
> > > to be working as I hoped.  What is meant by "already a special
> > character?"
> > >
> > > Thanks,
> > > Scott
> > >
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
>
> --
> Scott
> [EMAIL PROTECTED]
>

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





--
Scott
[EMAIL PROTECTED]


Re: WildCards and Results

2007-04-09 Thread Ted Husted

On 4/9/07, Dave Newton <[EMAIL PROTECTED]> wrote:

Does turning off dynamic method invocation not disable
the "!" functionality? As Ted said, the "!" is part of
XWork but there's a config param to disable it.


When DMI is disabled, then the ! is an ordinary character again.

Wildcards will always work, but only if the asterisk character is used
in the action name.

HTH, Ted


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



Re: WildCards and Results

2007-04-09 Thread Ted Husted

We consider Wildcard Methods and DMI to be distinct strategies, and I
would suggest that an application use one or the other. But, Wildcards
and DMI can co-exist if the Wildcard URIs don't use the ! character.

HTH, Ted


On 4/9/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:

After refactoring my app to use the S2 Dynamic Method Invocation as follows:


/pages/course.jsp
/pages/course.jsp


I am discovering that both
http://localhost:8080/dsms/course_create.action AND
http://localhost:8080/dsms/course!create.action work the same way.  Is this
a feature?  This is the sort of voodoo that should probably be cast out!

Scott



On 4/6/07, Ted Husted <[EMAIL PROTECTED]> wrote:
>
> There's a feature embedded in WebWork that lets the "!" character
> invoke a method other than execute. In WebWork, it doesn't really have
> a name. During the S2 discussions, we coined the term "dynamic method
> invocation" to describe how WW/S2 use the ! notation.
>
> For Struts 2, we added a switch to disable Dynamic Method Invocation"
> for two reasons. First, it can cause security issues if POJO actions
> are used. Second, it overlaps with the Wildcard feature that we
> brought over from Struts 1 (and from Cocoon before that).
>
> S2 does support  "dynamic method invocation", but there are problems
> with the implementation. Essentially, the code scans the action name
> for a "!", and finding one, tricks the framework into invoking the
> other method instead of execute. The other method is invoked, but it
> uses the same configuration as the execute method, including
> validations.  The framework "believes" it is invoking the "Category"
> action with the execute method.
>
> The Wildcard feature is implemented differently. When a Wildcard
> action is invoked, the framework acts as if the matching action had
> been hardcoded. The framework "believes" it's executing
> "Category!create" and "knows" it is executing the "create" method.
> This permits us to add specific validations, localizations, and type
> converters, for a Wildcard action, just like a conventional action.
>
> If someone were to implement [WW-1522], then the  "dynamic method
> invocation" approach could have its own validations too. Here, the
> notion is to generate carbon actions for qualifying methods. The
> invocation would no longer be dynamic, because there would be an
> actual action in the configuration, but any method could be invoked.
>
> * https://issues.apache.org/struts/browse/WW-1522
>
> My first pass at implementing [WW-1522] didn't work out. Though, I'm
> wondering if whatever we do for the codebehind plugin might work here
> too. At this point, I will probably never get to it myself, but
> perhaps someone will pickup the baton.
>
> In my own applications, I tend to use the underscore ("_") as a
> Wildcard separator, to avoid confusion with the WebWork bang. In
> practice, these are the only two special characters that work without
> causing JavaScript issues.
>
> HTH, Ted
> 
>
>
> On 4/6/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> > since '!' is already a special character which specifies the method name
> > automatically see struts.properties configuration file for more details
> > about how to enable/disable dynamic method invocation
> >
> > Can you explain this?  I read all I could find on this topic and their
> was
> > discussion dating back to early XWorks changes, however I could not make
> > sense out of it.  I do recall changing my struts.properties and it does
> seem
> > to be working as I hoped.  What is meant by "already a special
> character?"
> >
> > Thanks,
> > Scott
> >
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


--
Scott
[EMAIL PROTECTED]



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



Re: Trying to update bean?

2007-04-09 Thread stanlick

label.save is only a key in the resource bundle.

On 4/9/07, Felipe Rodrigues <[EMAIL PROTECTED]> wrote:



Is label.save an attribute of your action?
Could you post your action code here, pls?

Thanks,

Felipe


stanlick wrote:
>
> I have a form that contains this submit button.  When I submit the form,
I
> get the following error:
>
> 09:31:38,360 ERROR ParametersInterceptor:198 - ParametersInterceptor -
> [setParameters]: Unexpected Exception catched: Error setting expression
'
> label.save' with value '[Ljava.lang.String;@1a3fb76'
>
> How do I "paint" the caption with a resource bundle and avoid this error
>
> --
> Scott
> [EMAIL PROTECTED]
>
>

--
View this message in context:
http://www.nabble.com/%3Cs%3Asubmit-key%3D%22label.save%22-%3E-Trying-to-update-bean--tf3547607.html#a9903552
Sent from the Struts - User mailing list archive at Nabble.com.


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





--
Scott
[EMAIL PROTECTED]


Re: WildCards and Results

2007-04-09 Thread stanlick

###struts.enable.DynamicMethodInvocation = false

That was it!  I updated the value last week with false but it was commented
out!  Too much time passed between then and now!  I guess the default is
true?  I would hope you would not get this behavior unless you specify the
need yourself???

On 4/9/07, Dave Newton <[EMAIL PROTECTED]> wrote:


--- [EMAIL PROTECTED] wrote:
> I am discovering that both
> http://localhost:8080/dsms/course_create.action AND
> http://localhost:8080/dsms/course!create.action work
> the same way.  Is this a feature?  This is the sort
of
> voodoo that should probably be cast out!

Does turning off dynamic method invocation not disable
the "!" functionality? As Ted said, the "!" is part of
XWork but there's a config param to disable it.

d.






Looking for earth-friendly autos?
Browse Top Cars by "Green Rating" at Yahoo! Autos' Green Center.
http://autos.yahoo.com/green_center/

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





--
Scott
[EMAIL PROTECTED]


Re: Trying to update bean?

2007-04-09 Thread Felipe Rodrigues

Is label.save an attribute of your action?
Could you post your action code here, pls?

Thanks,

Felipe


stanlick wrote:
> 
> I have a form that contains this submit button.  When I submit the form, I
> get the following error:
> 
> 09:31:38,360 ERROR ParametersInterceptor:198 - ParametersInterceptor -
> [setParameters]: Unexpected Exception catched: Error setting expression '
> label.save' with value '[Ljava.lang.String;@1a3fb76'
> 
> How do I "paint" the caption with a resource bundle and avoid this error
> 
> -- 
> Scott
> [EMAIL PROTECTED]
> 
> 

-- 
View this message in context: 
http://www.nabble.com/%3Cs%3Asubmit-key%3D%22label.save%22-%3E-Trying-to-update-bean--tf3547607.html#a9903552
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: WildCards and Results

2007-04-09 Thread Dave Newton
--- [EMAIL PROTECTED] wrote:
> I am discovering that both
> http://localhost:8080/dsms/course_create.action AND
> http://localhost:8080/dsms/course!create.action work
> the same way.  Is this a feature?  This is the sort
of 
> voodoo that should probably be cast out!

Does turning off dynamic method invocation not disable
the "!" functionality? As Ted said, the "!" is part of
XWork but there's a config param to disable it.

d.



 

Looking for earth-friendly autos? 
Browse Top Cars by "Green Rating" at Yahoo! Autos' Green Center.
http://autos.yahoo.com/green_center/

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



Re: Architecture of Struts from a server application's point of view

2007-04-09 Thread Ian Roughley
I don't see why a restful URI or ajax call wouldn't be accessible via a 
VPN (if these are the APIs you are talking about).  I think it is more 
dependant on the VPN configuration than anything else.


/Ian


Session Mwamufiya wrote:

Hello,

 


I'm new to Struts 2 and have to design an architecture in which my server
applications would be included in Struts, which would be responsible for
providing a web interface for the apps.  However, I also need to communicate
with these server apps via a client that will use VPN access into the
server.  Are apps placed in Struts accessible from APIs other than those of
Struts' web interface?  I may not be clear enough in my question, but please
feel free to ask for clarification, and any attempt to answer it would be
greatly appreciated.

 


Thanks,

 


Session A. Mwamufiya

MBA | Tepper School of Business

MSE (Software Engineering) | School of Computer Science

Carnegie Mellon University

T: (412) 508-5455 | Email:  
[EMAIL PROTECTED]

 



  


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



Re: WildCards and Results

2007-04-09 Thread stanlick

Ted --

After refactoring my app to use the S2 Dynamic Method Invocation as follows:

   
   /pages/course.jsp
   /pages/course.jsp
   

I am discovering that both
http://localhost:8080/dsms/course_create.action AND
http://localhost:8080/dsms/course!create.action work the same way.  Is this
a feature?  This is the sort of voodoo that should probably be cast out!

Scott



On 4/6/07, Ted Husted <[EMAIL PROTECTED]> wrote:


There's a feature embedded in WebWork that lets the "!" character
invoke a method other than execute. In WebWork, it doesn't really have
a name. During the S2 discussions, we coined the term "dynamic method
invocation" to describe how WW/S2 use the ! notation.

For Struts 2, we added a switch to disable Dynamic Method Invocation"
for two reasons. First, it can cause security issues if POJO actions
are used. Second, it overlaps with the Wildcard feature that we
brought over from Struts 1 (and from Cocoon before that).

S2 does support  "dynamic method invocation", but there are problems
with the implementation. Essentially, the code scans the action name
for a "!", and finding one, tricks the framework into invoking the
other method instead of execute. The other method is invoked, but it
uses the same configuration as the execute method, including
validations.  The framework "believes" it is invoking the "Category"
action with the execute method.

The Wildcard feature is implemented differently. When a Wildcard
action is invoked, the framework acts as if the matching action had
been hardcoded. The framework "believes" it's executing
"Category!create" and "knows" it is executing the "create" method.
This permits us to add specific validations, localizations, and type
converters, for a Wildcard action, just like a conventional action.

If someone were to implement [WW-1522], then the  "dynamic method
invocation" approach could have its own validations too. Here, the
notion is to generate carbon actions for qualifying methods. The
invocation would no longer be dynamic, because there would be an
actual action in the configuration, but any method could be invoked.

* https://issues.apache.org/struts/browse/WW-1522

My first pass at implementing [WW-1522] didn't work out. Though, I'm
wondering if whatever we do for the codebehind plugin might work here
too. At this point, I will probably never get to it myself, but
perhaps someone will pickup the baton.

In my own applications, I tend to use the underscore ("_") as a
Wildcard separator, to avoid confusion with the WebWork bang. In
practice, these are the only two special characters that work without
causing JavaScript issues.

HTH, Ted



On 4/6/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> since '!' is already a special character which specifies the method name
> automatically see struts.properties configuration file for more details
> about how to enable/disable dynamic method invocation
>
> Can you explain this?  I read all I could find on this topic and their
was
> discussion dating back to early XWorks changes, however I could not make
> sense out of it.  I do recall changing my struts.properties and it does
seem
> to be working as I hoped.  What is meant by "already a special
character?"
>
> Thanks,
> Scott
>

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





--
Scott
[EMAIL PROTECTED]


Trying to update bean?

2007-04-09 Thread stanlick

I have a form that contains this submit button.  When I submit the form, I
get the following error:

09:31:38,360 ERROR ParametersInterceptor:198 - ParametersInterceptor -
[setParameters]: Unexpected Exception catched: Error setting expression '
label.save' with value '[Ljava.lang.String;@1a3fb76'

How do I "paint" the caption with a resource bundle and avoid this error

--
Scott
[EMAIL PROTECTED]


Re: Architecture of Struts from a server application's point of view

2007-04-09 Thread Jae K

Hello Session,

Just curious, why do you need an interface other than a web HTTP interface?
I don't see why VPN would preclude HTTP.

- Jae

On 4/9/07, Session Mwamufiya <[EMAIL PROTECTED]> wrote:


Hello,



I'm new to Struts 2 and have to design an architecture in which my server
applications would be included in Struts, which would be responsible for
providing a web interface for the apps.  However, I also need to
communicate
with these server apps via a client that will use VPN access into the
server.  Are apps placed in Struts accessible from APIs other than those
of
Struts' web interface?  I may not be clear enough in my question, but
please
feel free to ask for clarification, and any attempt to answer it would be
greatly appreciated.



Thanks,



Session A. Mwamufiya

MBA | Tepper School of Business

MSE (Software Engineering) | School of Computer Science

Carnegie Mellon University

T: (412) 508-5455 | Email:  
[EMAIL PROTECTED]






Architecture of Struts from a server application's point of view

2007-04-09 Thread Session Mwamufiya
Hello,

 

I'm new to Struts 2 and have to design an architecture in which my server
applications would be included in Struts, which would be responsible for
providing a web interface for the apps.  However, I also need to communicate
with these server apps via a client that will use VPN access into the
server.  Are apps placed in Struts accessible from APIs other than those of
Struts' web interface?  I may not be clear enough in my question, but please
feel free to ask for clarification, and any attempt to answer it would be
greatly appreciated.

 

Thanks,

 

Session A. Mwamufiya

MBA | Tepper School of Business

MSE (Software Engineering) | School of Computer Science

Carnegie Mellon University

T: (412) 508-5455 | Email:  
[EMAIL PROTECTED]

 



Re: Struts 2 and Validation Testing

2007-04-09 Thread Thomas Ferris Nicolaisen

I made a test that ran successfully when extending StrutsTestCase.
Attached the test to the Jira issue. As a result of extending
StrutsTestCase, I encountered a new bug in the spring-plugin, but
that's another story.

I still would like some dev to comment on whether there is an actual
requirement for our tests to extend StrutsTestCase like this. I would
like to avoid it as several of my tests already extend various Spring
utility test classes. If it is a requirement the spring-plugin should
be extended to support the StrutsTestCase.

On 4/6/07, Rich Thornett <[EMAIL PROTECTED]> wrote:


Tried extending XWorkTestCase in a sample test, but sgot the same error.  I'm
extending MockObjectTestCase anyway, so inheritance wouldn't be the best
solution for me.

Doesn't look like there's been any traction on this issue in Jira yet:
https://issues.apache.org/struts/browse/WW-1868


qmnonic wrote:
>
>
> I experienced the same problem in a test case (though different
> circumstances), and it was solved by extending XWorkTestCase instead of
> TestCase as noted in the example -
> 
http://struts.apache.org/2.x/docs/how-do-i-unit-test-my-actions-validation-logic.html
> .  This might help...
>
>
>

--
View this message in context: 
http://www.nabble.com/Struts-2-and-Validation-Testing-tf3451623.html#a9872429
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: problem extending the ComposableRequestProcessor process chain

2007-04-09 Thread Joe Germuska

On 4/8/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:


...

...
Is there a way that I can terminate the "process-action" chain early but
still have it execute the "process-view" chain after? I will greatly
appreciate any help or suggestions that you can offer.



Yes.  LookupCommand has a property, "ignoreExecuteResult" that overrides its
default process to return whatever boolean is returned by the
looked-up-command.  You would turn it on like this:



Intuitively, I expected the same behavior you expected, but that's not how
the commons-chain package was first implemented.  This should do it, unless
you sometimes want the lookup to return Command.PROCESSING_COMPLETE (that
is, true)  When using "ignoreExecuteResult," LookupCommand always returns
Command.CONTINUE_PROCESSING (false).

Joe

--
Joe Germuska
[EMAIL PROTECTED] * http://blog.germuska.com

"The truth is that we learned from João forever to be out of tune."
-- Caetano Veloso


Re: Validation Annotations

2007-04-09 Thread Antony Stubbs

I have the same issue. atm I send everything to !input which is by default
excluded from validation.

But try looking at something like this in your struts.xml:

edit,create
 

I haven't tried it yet, not quite sure how it works.
You can see here that by default, input, back and cancel are excluded from
validation. (this comes from struts-default.xml):

input,back,cancel




André Faria-3 wrote:
> 
> I have the following problem: 
> 
> The methods execute() and list()  must not be validated by the save 
> method rule...  I have differentes validation rules for each method, but 
> when I call the action, the interceptor tries to validate the input 
> before call execute method.  How can I resolve this?
> 
> 
> @Validation
> public class PersonAction {
>
> public void execute();
> 
> public void list();
> 
> @Validations(requiredFields = { @RequiredFieldValidator(fieldName = 
> "person.name", message = "Fill the name field.") })
> public void save(){}
> 
> }
> 
> André Faria escreveu:
>> Is possible to use the validation annotations like  
>> @RequiredFieldValidator only for a method of the Action class?
>>
>> -
>> 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/Validation-Annotations-tf2939610.html#a9900700
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: resume after login feature

2007-04-09 Thread Dave Newton
--- Jae K <[EMAIL PROTECTED]> wrote:
> [...] it doesn't require sessions for guest users

I can't get all worked up about a single string in
session for guests who will only use it if they hit a
page where they need to log in, and if they're logging
in, they're not guests anymore!

> For example, the Struts wiki does not explain what 
> the 'request' stack value is (I thought it was the 
> session request object, but it is not), 

While I agree the OGNL docs need some rework:

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

does say "Along with the value stack, the framework
places other objects in the ActionContext, including
Maps representing the application, session, and
request contexts."

Could be clearer, especially for those that don't know
the framework, but it's sorta there, and it's also in
the FAQ:

http://struts.apache.org/2.x/docs/what-are-the-default-variables-in-the-value-stack.html

http://struts.apache.org/2.x/docs/ognl-basics.html
actually mentions 'parameters' down at the bottom, and
specifically states that 'parameters' is for
request.getParameter, 'request' is for
request.getAttribute, etc.

> Last but not least, it is not obvious that the OGNL
> expressions need to be enclosed in ${} when used in
> the struts config file. (Is this even true? I don't 
> know since it's not documented! It certainly isn't 
> documented so in the OGNL documentation).

That's a config-file issue, not OGNL, and actually is
addressed in the FAQs, but someone or myself will add
a note to the results configuration page (I think that
makes the most sense?)

http://struts.apache.org/2.x/docs/parameters-in-configuration-results.html

> Anyways, are you a developer for Struts Dave?

Brain's too small :/

A lot of the issues with the documentation isn't so
much that the information isn't there, but that it's
somewhat difficult find at times.

...and sometimes you are forced to read to the bottom
of the page ;)

d.



 

Bored stiff? Loosen up... 
Download and play hundreds of games for free on Yahoo! Games.
http://games.yahoo.com/games/front

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