Author Login
Post Reply
user Digest 15 May 2008 14:46:00 -0000 Issue 8030
Topics (messages 186459 through 186484):
Struts2 JUnit 4.x
186459 by: Kibo
186468 by: Laurie Harper
Sitemesh or Tiles2
186460 by: Kibo
186461 by: Antonio Petrelli
186463 by: Alberto A. Flores
uniform exception handling
186462 by: Jakub Milkiewicz
Re: What is the functionality of struts 2 anchor tag?
186464 by: Laurie Harper
186471 by: akshi gupta
Re: Struts2 with Turbine
186465 by: Laurie Harper
186473 by: JKrishna
Re: File upload issue
186466 by: Laurie Harper
Re: interceptors
186467 by: Laurie Harper
[ANN] May 20 - Writing JPA Applications by Patrick Linskey at Google in Silicon Valley
186469 by: Van Riper
Action Validation with Slashes
186470 by: Yellek
Re: [Struts 2] Pass value between two action classes
186472 by: ravi_eze
186479 by: Milan Milanovic
186480 by: ravi_eze
186481 by: Milan Milanovic
186482 by: ravi_eze
186483 by: Milan Milanovic
186484 by: Al Sutton
Struts 2 - Velocity Templates rendered twice
186474 by: Canny Duck
Struts2 Vs ExtJs - support and coexistence?
186475 by: Dhandapani Ponnurangam
186476 by: Frans Thamura
186477 by: Rafael Antunes
186478 by: Frans Thamura
Administrivia:
---------------------------------------------------------------------
To post to the list, e-mail: user@(protected)
To unsubscribe, e-mail: user-digest-unsubscribe@(protected)
For additional commands, e-mail: user-digest-help@(protected)
----------------------------------------------------------------------

Attachment:
user_186459.ezm (zipped)
Hi konference
I saw that struts2-archetype-starter for Maven use JUnit 3.8 dependency.
Why Struts2 already does not use JUnit 4.x ?
Does it some problem when i will use JUnit 4.x in Struts 2 apps?
Thanks very much.
-----
Tomas Jurman
Czech Republic
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_186468.ezm (zipped)Kibo wrote:
> Hi konference
>
> I saw that struts2-archetype-starter for Maven use JUnit 3.8 dependency.
> Why Struts2 already does not use JUnit 4.x ?
Probably the archetype has its origins before JUnit 4.x came out. Feel
free to submit a patch to update the archetype ;-)
> Does it some problem when i will use JUnit 4.x in Struts 2 apps?
No, Struts itself has no dependency on JUnit, it's only included in the
archetype-generated project to encourage you to write tests :-) The only
thing possibly affected by upgrading to JUnit 4.x is your own unit tests.
L.

Attachment:
user_186460.ezm (zipped)
Hi konference
In Struts1 i used Tiles and i was satisfied. I saw that now in Struts2 it is
recomended use Sitemesh.
I read about Sitemesh and i dont find whay is Sitemesh for me better then
Tiles 2.
Maybe is Sitemesh better when:
- i need to decorate some old application
- i use other framework then Struts2
but I started new application in Struts2.
Is it other reason why i have to use Sitemesh?
Thanks very much
-----
Tomas Jurman
Czech Republic
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_186461.ezm (zipped)2008/5/14 Kibo <tomasjurman@(protected)>:
> I read about Sitemesh and i dont find whay is Sitemesh for me better then
> Tiles 2.
>...
> Is it other reason why i have to use Sitemesh?
Why not using them both?
Essentially Sitemesh is better than Tiles in decoration: if you have a
web application in which only the "body" part changes, then Sitemesh
fits for you.
But if you need to compose the page in complex ways and you want to
control how these pieces are generated then you can use Tiles.
But if you have a mix of these cases, you can use them both, that's
nothing that prevents you from that :-)
Ciao
Antonio

Attachment:
user_186463.ezm (zipped)Actually, for me it was a tradeoff. Here are a few thoughts:
Good things about Sitemesh:
- Sitemesh does not have as much XML configuration as tiles, which was
very compelling (most configuration was maintained in the JSP page).
- Relatively simple to learn and simpler to maintain since most things
you need are configured once in an XML (decorator) and the rest you
could rely on an included JSP (optional) to managed other attributes.
- Since there is no XML that dictates the tiles (only a filter that
knows how to decorate the fetched HTML page), there is no need to add
the overhead of managing another XML structure (e.g. tiles) to know
which tile goes where.
Bad things about Sitemesh:
- Sitemesh has not been maintained for a long time. Release of 2.3 was
done in 2006 and 2.4 and 3.0 is still in development.
- Sitemesh uses a StringBuffer object to decorate the output (as far as
I know, this is the case in version 2.3) which means that depending on
the presentation you need to fetch, such decorating can become an
expensive operation.
I like Sitemesh a lot and after working with both for some years now, I
would recommend Sitemesh mostly for simplicity.
Hope this helps!
Kibo wrote:
> Hi konference
>
> In Struts1 i used Tiles and i was satisfied. I saw that now in Struts2 it is
> recomended use Sitemesh.
> I read about Sitemesh and i dont find whay is Sitemesh for me better then
> Tiles 2.
>
> Maybe is Sitemesh better when:
> - i need to decorate some old application
> - i use other framework then Struts2
>
> but I started new application in Struts2.
> Is it other reason why i have to use Sitemesh?
>
> Thanks very much
>
>
> -----
> Tomas Jurman
> Czech Republic
--
Alberto A. Flores
http://www.linkedin.com/in/aflores

Attachment:
user_186462.ezm (zipped)
Attachment:
user_186464.ezm (zipped)As far as I can see, most of that code is redundant; removing all the
noise, this would be completely equivalent:
package com.axis.tag;
import
java.util.Properties;
import com.axis.utils.PropertyLoader;
public class MyAnchorTag extends AnchorTag {
@Override
public int doStartTag() throws JspException {
Properties props =
PropertyLoader.loadPropertiesBundle("resources/permissionParameter");
String permission = props.getProperty("permission");
System.out.println(" Method :" + permission);
if(permission == null){
return super.doStartTag();
}
return SKIP_BODY;
}
}
And that doesn't seem to relate in any way to the question you're
asking. In particular, it doesn't use or access the href attribute in
any way, nor does it attempt to use the method Musachy mentioned.
So, what do you actually want to do, and how is it not working?
L.
akshi gupta wrote:
> Hello,
>
> I am unable to use this method in my tag handler can you please help me
> .. Following is my tag handler code :
>
> package com.axis.tag;
>
> import
java.util.Properties;
>
> import
javax.servlet.http.HttpServletRequest;
> import
javax.servlet.http.HttpServletResponse;
> import
javax.servlet.jsp.JspException;
> import
javax.servlet.jsp.tagext.Tag;
> import
javax.servlet.jsp.PageContext;
> import
javax.servlet.jsp.tagext.BodyContent;
>
> import
org.apache.struts2.components.Component;
> import org.apache.struts2.views.jsp.ui.AnchorTag;
>
> import com.axis.utils.PropertyLoader;
> import
com.opensymphony.xwork2.util.ValueStack;
>
> public class MyAnchorTag extends AnchorTag {
>
> /**
> *
> */
> private static final long serialVersionUID = 1L;
> private PageContext pageContext;
> private Tag parent;
> protected String preInvokeJS;
> protected String targets;
> protected ValueStack stack ;
> public HttpServletRequest req;
> public HttpServletResponse res;
> @Override
> public void doInitBody() throws JspException {
> super.doInitBody();
> }
>
> @Override
> public void setBodyContent(BodyContent arg0) {
> super.setBodyContent(arg0);
> }
>
> @Override
> public int doAfterBody() throws JspException {
> return super.doAfterBody();
> }
>
> @Override
> public int doStartTag() throws JspException {
> Properties props =
> PropertyLoader.loadPropertiesBundle("resources/permissionParameter");
> String permission = props.getProperty("permission");
> System.out.println(" Method :" + permission);
> if(permission == null){
> return super.doStartTag();
> }
> return SKIP_BODY;
> }
> @Override
> public int doEndTag() throws JspException {
> return EVAL_BODY_INCLUDE;
> }
>
> @Override
> public Tag getParent() {
> return super.getParent();
> }
> @Override
> public Component getComponent() {
> // TODO Auto-generated method stub
> return super.getComponent();
> }
>
> @Override
> public void release() {
> super.release();
> }
>
> @Override
> public void setPageContext(PageContext pageContext) {
> this.pageContext = pageContext;
> super.setPageContext(pageContext);
> }
>
> @Override
> public void setParent(Tag parent) {
> this.parent = parent;
> super.setParent(parent);
> }
>
> @Override
> public Component getBean(ValueStack stack, HttpServletRequest req,
> HttpServletResponse res) {
> return super.getBean(stack, req, res);
> }
> @Override
> protected void populateParams() {
> // TODO Auto-generated method stub
> super.populateParams();
> }
> }
>
> Thanks,
> Akshi
>
>
> Musachy Barroso wrote:
>> In org.apache.struts2.components.Achor
>>
>> public void evaluateExtraParams() {
>> super.evaluateExtraParams();
>>
>> if (href != null)
>> addParameter("href",
>> ensureAttributeSafelyNotEscaped(findString(href)));
>> }
>>
>>
>> On Fri, May 9, 2008 at 9:59 AM, akshi gupta <akshi@(protected):
>>
>>> Actually I am writing my own custom tag by extending AnchorTag class
>>> because
>>> I want "href" value for some business rules thats why I wanthref
>>> evaluated
>>> value.
>>>
>>> Now can you tell me from which method href evaluated value is coming?
>>>
>>> Thanks,
>>> Akshi
>>>
>>>
>>> Musachy Barroso wrote:
>>>
>>>> I am not really sure why you want to know but here is the short
>>>> explanation:
>>>>
>>>> <s:url id="edit" action="edit" method="input" namespace="/">
>>>>
>>>> This will construct a url like: "/edit.action", and push it into the
>>>> stack, associated with the key "edit" (from the "id" attribute). Later
>>>> on
>>>>
>>>> <s:a href="%{edit}" >Edit</s:a>
>>>>
>>>> "%{edit}" will be evaluated against the stack and "/edit.action" will
>>>> be found, so that is the value that the anchor tag will use on its
>>>> href.
>>>>
>>>> musachy
>>>>
>>>>
>>>> On Fri, May 9, 2008 at 8:59 AM, akshi gupta <akshi@(protected):
>>>>
>>>>
>>>>> Hello,
>>>>>
>>>>> If we use anchor tag like this :
>>>>>
>>>>> (ListSuccess.jsp) : ========> <%@(protected)"
>>>>> uri="/struts-tags"%>
>>>>> .............................
>>>>> .............................
>>>>> ========> <s:url id="edit" action="edit" method="input"
>>>>> namespace="/"
>>>>> />
>>>>> ========> <s:a href="%{edit}" >Edit</s:a>
>>>>>
>>>>>
>>>>> Now , how href value get parse and get the complete url ?
>>>>> Exactly through which method of the AnchorTag.java?
>>>>>
>>>>> Can anyone please help me out ?
>>>>>
>>>>>
>>>>> Thanks,
>>>>>
>>>>> Akshi
>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>>>>> For additional commands, e-mail: user-help@(protected)
>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>>> For additional commands, e-mail: user-help@(protected)
>>>
>>>
>>>
>>
>>
>>
>>

Attachment:
user_186471.ezm (zipped)I want to write my custom tag because my aim is to get the href value
for the authorisation so that I can able to render the link according to
the conditions.
Thats why I am writing my own custom tag by extending struts anchor tag
class.
Now can you suggest me how I will get href value in my own custom tag by
extending struts anchor tag.
Thanks,
Akshi Gupta.
Laurie Harper wrote:
> As far as I can see, most of that code is redundant; removing all the
> noise, this would be completely equivalent:
>
>
> package com.axis.tag;
>
> import
java.util.Properties;
> import com.axis.utils.PropertyLoader;
>
> public class MyAnchorTag extends AnchorTag {
> @Override
> public int doStartTag() throws JspException {
> Properties props =
> PropertyLoader.loadPropertiesBundle("resources/permissionParameter");
> String permission = props.getProperty("permission");
> System.out.println(" Method :" + permission);
> if(permission == null){
> return super.doStartTag();
> }
> return SKIP_BODY;
> }
> }
>
>
> And that doesn't seem to relate in any way to the question you're
> asking. In particular, it doesn't use or access the href attribute in
> any way, nor does it attempt to use the method Musachy mentioned.
>
> So, what do you actually want to do, and how is it not working?
>
> L.
>
> akshi gupta wrote:
>> Hello,
>>
>> I am unable to use this method in my tag handler can you please help
>> me .. Following is my tag handler code :
>>
>> package com.axis.tag;
>>
>> import
java.util.Properties;
>>
>> import
javax.servlet.http.HttpServletRequest;
>> import
javax.servlet.http.HttpServletResponse;
>> import
javax.servlet.jsp.JspException;
>> import
javax.servlet.jsp.tagext.Tag;
>> import
javax.servlet.jsp.PageContext;
>> import
javax.servlet.jsp.tagext.BodyContent;
>>
>> import
org.apache.struts2.components.Component;
>> import org.apache.struts2.views.jsp.ui.AnchorTag;
>>
>> import com.axis.utils.PropertyLoader;
>> import
com.opensymphony.xwork2.util.ValueStack;
>>
>> public class MyAnchorTag extends AnchorTag {
>>
>> /**
>> *
>> */
>> private static final long serialVersionUID = 1L;
>> private PageContext pageContext;
>> private Tag parent;
>> protected String preInvokeJS;
>> protected String targets;
>> protected ValueStack stack ;
>> public HttpServletRequest req;
>> public HttpServletResponse res;
>> @Override
>> public void doInitBody() throws JspException {
>> super.doInitBody();
>> }
>>
>> @Override
>> public void setBodyContent(BodyContent arg0) {
>> super.setBodyContent(arg0);
>> }
>>
>> @Override
>> public int doAfterBody() throws JspException {
>> return super.doAfterBody();
>> }
>>
>> @Override
>> public int doStartTag() throws JspException {
>> Properties props =
>> PropertyLoader.loadPropertiesBundle("resources/permissionParameter");
>> String permission = props.getProperty("permission");
>> System.out.println(" Method :" + permission);
>> if(permission == null){
>> return super.doStartTag();
>> }
>> return SKIP_BODY;
>> }
>> @Override
>> public int doEndTag() throws JspException {
>> return EVAL_BODY_INCLUDE;
>> }
>>
>> @Override
>> public Tag getParent() {
>> return super.getParent();
>> }
>> @Override
>> public Component getComponent() {
>> // TODO Auto-generated method stub
>> return super.getComponent();
>> }
>>
>> @Override
>> public void release() {
>> super.release();
>> }
>>
>> @Override
>> public void setPageContext(PageContext pageContext) {
>> this.pageContext = pageContext;
>> super.setPageContext(pageContext);
>> }
>>
>> @Override
>> public void setParent(Tag parent) {
>> this.parent = parent;
>> super.setParent(parent);
>> }
>>
>> @Override
>> public Component getBean(ValueStack stack, HttpServletRequest req,
>> HttpServletResponse res) {
>> return super.getBean(stack, req, res);
>> }
>> @Override
>> protected void populateParams() {
>> // TODO Auto-generated method stub
>> super.populateParams();
>> }
>> }
>>
>> Thanks,
>> Akshi
>>
>>
>> Musachy Barroso wrote:
>>> In org.apache.struts2.components.Achor
>>>
>>> public void evaluateExtraParams() {
>>> super.evaluateExtraParams();
>>>
>>> if (href != null)
>>> addParameter("href",
>>> ensureAttributeSafelyNotEscaped(findString(href)));
>>> }
>>>
>>>
>>> On Fri, May 9, 2008 at 9:59 AM, akshi gupta <akshi@(protected):
>>>
>>>> Actually I am writing my own custom tag by extending AnchorTag
>>>> class because
>>>> I want "href" value for some business rules thats why I wanthref
>>>> evaluated
>>>> value.
>>>>
>>>> Now can you tell me from which method href evaluated value is coming?
>>>>
>>>> Thanks,
>>>> Akshi
>>>>
>>>>
>>>> Musachy Barroso wrote:
>>>>
>>>>> I am not really sure why you want to know but here is the short
>>>>> explanation:
>>>>>
>>>>> <s:url id="edit" action="edit" method="input" namespace="/">
>>>>>
>>>>> This will construct a url like: "/edit.action", and push it into the
>>>>> stack, associated with the key "edit" (from the "id" attribute).
>>>>> Later
>>>>> on
>>>>>
>>>>> <s:a href="%{edit}" >Edit</s:a>
>>>>>
>>>>> "%{edit}" will be evaluated against the stack and "/edit.action" will
>>>>> be found, so that is the value that the anchor tag will use on its
>>>>> href.
>>>>>
>>>>> musachy
>>>>>
>>>>>
>>>>> On Fri, May 9, 2008 at 8:59 AM, akshi gupta <akshi@(protected)>
>>>>> wrote:
>>>>>
>>>>>
>>>>>> Hello,
>>>>>>
>>>>>> If we use anchor tag like this :
>>>>>>
>>>>>> (ListSuccess.jsp) : ========> <%@(protected)"
>>>>>> uri="/struts-tags"%>
>>>>>> .............................
>>>>>> .............................
>>>>>> ========> <s:url id="edit" action="edit" method="input"
>>>>>> namespace="/"
>>>>>> />
>>>>>> ========> <s:a href="%{edit}" >Edit</s:a>
>>>>>>
>>>>>>
>>>>>> Now , how href value get parse and get the complete url ?
>>>>>> Exactly through which method of the AnchorTag.java?
>>>>>>
>>>>>> Can anyone please help me out ?
>>>>>>
>>>>>>
>>>>>> Thanks,
>>>>>>
>>>>>> Akshi
>>>>>>
>>>>>>
>>>>>> ---------------------------------------------------------------------
>>>>>>
>>>>>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>>>>>> For additional commands, e-mail: user-help@(protected)
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>>>> For additional commands, e-mail: user-help@(protected)
>>>>
>>>>
>>>>
>>>
>>>
>>>
>>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>
>
>

Attachment:
user_186465.ezm (zipped)JKrishna wrote:
> Hi,
>
> We have a turbine web application. We want to add new features using
> Struts2.
> As struts2 uses servlet filters to serve the requests and the turbine
> servlet serves the turbine requests, theortically this should work.
>
> But tomcat gives "startup failed due to previous errors" without any error
> messages
>
> Can we use struts2 and turbine in the same application?
I haven't looked at Turbine in many years but, provided Turbine doesn't
do anything too tricky, this probably *should* be possible. The only way
I can think of to be sure, though (unless someone chimes in to say they
are doing this successfully) would be to get it working :-/
Check your log files again; if startup failed, there should be errors in
at least one of them. It's often not the same log file the 'startup
failed' message appears in.
If you still can't find anything, try enabling debug logging for Struts
and/or Turbine.
L.

Attachment:
user_186473.ezm (zipped)
Thanks Laurie. It failed with Tomcat 6, but worked in Tomcat 5.5 without any
issues.
we were able to navigate between struts2 and turbine pages, access the
session information.
we are now trying to use struts2 to update the turbine velocity templates.
Krishna
Laurie Harper wrote:
>
> JKrishna wrote:
>> Hi,
>>
>> We have a turbine web application. We want to add new features using
>> Struts2.
>> As struts2 uses servlet filters to serve the requests and the turbine
>> servlet serves the turbine requests, theortically this should work.
>>
>> But tomcat gives "startup failed due to previous errors" without any
>> error
>> messages
>>
>> Can we use struts2 and turbine in the same application?
>
> I haven't looked at Turbine in many years but, provided Turbine doesn't
> do anything too tricky, this probably *should* be possible. The only way
> I can think of to be sure, though (unless someone chimes in to say they
> are doing this successfully) would be to get it working :-/
>
> Check your log files again; if startup failed, there should be errors in
> at least one of them. It's often not the same log file the 'startup
> failed' message appears in.
>
> If you still can't find anything, try enabling debug logging for Struts
> and/or Turbine.
>
> L.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>
>
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_186466.ezm (zipped)Zoran Avtarovski wrote:
> Further digging found that file uploads work fine with all browsers except
> Safari Mac. Safari windows is fine as is Opera, IE and the Mozilla Browsers.
>
> Does anybody know a good debugging tool for Safari?
Nope, but there are a number of command-line tools that can give you the
same view of what's going over the wire as you get from Live Headers or
Firebug independent of what browser you're using (ethereal, tcpflow,
tcpdump, to name a few off the top of my head). I'd suggest using one of
those (or some other 'packet sniffer') as a next step.
L.

Attachment:
user_186467.ezm (zipped)krishna chary wrote:
> when I use intercepters in Struts.xml in Struts2 application for
> validation,I got an
I'm not sure what that means. An example of your configuration would
have been helpful.
> Exception starting filter struts
>
> Unable to find interceptor class referenced by ref-name staticParams -
> interceptor-ref -
> file:/C:/Program%20Files/Apache%20Software%20Foundation/Tomcat%205.5/webapps/CAMPUZZ/WEB-INF/classes/struts.xml:26:55
> [...]
So what's in your struts.xml at the indicated location? What version of
Struts are you using? Does your application start up and run correctly
if you remove the offending section from your struts.xml?
L.

Attachment:
user_186469.ezm (zipped)This is a free event open to the general public. So, please forward
this announcement on to other interested parties. The full meeting
announcement including directions to meeting site at Google in Silicon
Valley is here:
https://sv-web-jug.dev.java.net/servlets/NewsItemView?newsItemID=5601
Advanced Registration is required to be part of give-away drawing. You
can register at:
http://sv-web-jug-4.eventbrite.com/
Agenda:
18:30-19:00 Arrive & mingle -- Food & drinks provided by Google
19:00-20:30 Writing JPA Applications Presentation
Description:
In this talk, Patrick explores the Java Persistence API, and examines
some common practices for how to write applications that use JPA.
Patrick will focus more on API usage than on mapping configuration,
and will look at the bootstrapping and runtime behavior of JPA
applications. You will learn about JPA's optimistic locking semantics,
including the benefits of optimistic read locks. Patrick looks at when
it's appropriate to use the different facilities of the Java
Persistence Query Language (JPQL), and also discusses common
extensions to the spec, including performance caching, pessimistic
locking, and fetch strategies.
---
| Michael "Van" Riper
| http://weblogs.java.net/blog/van_riper/
| http://www.linkedin.com/in/vanriper
----
| Silicon Valley Web JUG
| mailto:van_riper@(protected)
| https://sv-web-jug.dev.java.net

Attachment:
user_186470.ezm (zipped)
We have an issue where we are trying to set up validation.xml files for
action invocations that contain slashes. From running a debugger on the
XWork code it would appear that if action com.mycompany.action.MyAction is
being executed via the url /context-root/package/MyAction/operation.action
that the XWork validation framework is looking for a file in the classpath
of the form:
com/mycompany/action/MyAction-package/MyAction/operation-validation.xml
This is an invalid java package name in the jar (no - characters allowed)
and so even if the validation.xml file is named appropriately and placed in
the appropriate directory it is failing to be found.
The culprit appears to be 2 lines in
com.opensymphony.xwork.validator.AnnotationActionValidatorManager:
String fileName = aClass.getName().replace('.', '/') + "-" + context +
VALIDATION_CONFIG_SUFFIX;
and
String fileName = aClass.getName().replace('.', '/') +
VALIDATION_CONFIG_SUFFIX;
should I be raising a Jira issue for this?
Peter Kelley
Fujitsu Australia Limited
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_186472.ezm (zipped)
quite possible.
for this u need to define the object fruit in session scope. and in 1st page
say: vitamins, color can be filled. In 2nd page say: weight, age can be
filled and all the time the same object fruit in the session would be
filled.
http://struts.apache.org/2.x/docs/scope-interceptor.html
hope this helps.
ravi
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_186479.ezm (zipped)O.K. Thaks.
But what is general good practice for big forms, two different forms and actions for
one object like this, or maybe tabbedPanel or something third ? What is easier to implement
and more efficient ?
--
Thx in advance, Milan Milanovic
----- Original Message ----
From: ravi_eze <ravichandrac@(protected)>
To: user@(protected)
Sent: Thursday, May 15, 2008 7:08:57 AM
Subject: Re: [Struts 2] Pass value between two action classes
quite possible.
for this u need to define the object fruit in session scope. and in 1st page
say: vitamins, color can be filled. In 2nd page say: weight, age can be
filled and all the time the same object fruit in the session would be
filled.
http://struts.apache.org/2.x/docs/scope-interceptor.html
hope this helps.
ravi
--
Sent from the Struts - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)

Attachment:
user_186480.ezm (zipped)Here we are implementing one action class with multiple methods
providing multiple pages. More like a wizard like functionality....
however I would suggest to break things into multiple actions to the
extent possible. The main disadvantage we our approach was with the
validation layer... all had only one validate method... and we had to go
with interceptors...
-----Original Message-----
From: Milan Milanovic [mailto:milanmilanovich@(protected)]
Sent: Thursday, May 15, 2008 7:09 PM
To: Struts Users Mailing List
Subject: Re: [Struts 2] Pass value between two action classes
O.K. Thaks.
But what is general good practice for big forms, two different forms and
actions for
one object like this, or maybe tabbedPanel or something third ? What is
easier to implement
and more efficient ?
--
Thx in advance, Milan Milanovic
----- Original Message ----
From: ravi_eze <ravichandrac@(protected)>
To: user@(protected)
Sent: Thursday, May 15, 2008 7:08:57 AM
Subject: Re: [Struts 2] Pass value between two action classes
quite possible.
for this u need to define the object fruit in session scope. and in 1st
page
say: vitamins, color can be filled. In 2nd page say: weight, age can be
filled and all the time the same object fruit in the session would be
filled.
http://struts.apache.org/2.x/docs/scope-interceptor.html
hope this helps.
ravi
--
http://www.nabble.com/-Struts-2--Pass-value-between-two-action-classes-t
p17234969p17246034.html
Sent from the Struts - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)

Attachment:
user_186481.ezm (zipped)Is a better approach to use one action class with multiple jsp pages ?
--
Thx, Milan
----- Original Message ----
From: Ravichandra C <ravichandrac@(protected)>
To: Struts Users Mailing List <user@(protected)>
Sent: Thursday, May 15, 2008 3:44:10 PM
Subject: RE: [Struts 2] Pass value between two action classes
Here we are implementing one action class with multiple methods
providing multiple pages. More like a wizard like functionality....
however I would suggest to break things into multiple actions to the
extent possible. The main disadvantage we our approach was with the
validation layer... all had only one validate method... and we had to go
with interceptors...
-----Original Message-----
From: Milan Milanovic [mailto:milanmilanovich@(protected)]
Sent: Thursday, May 15, 2008 7:09 PM
To: Struts Users Mailing List
Subject: Re: [Struts 2] Pass value between two action classes
O.K. Thaks.
But what is general good practice for big forms, two different forms and
actions for
one object like this, or maybe tabbedPanel or something third ? What is
easier to implement
and more efficient ?
--
Thx in advance, Milan Milanovic
----- Original Message ----
From: ravi_eze <ravichandrac@(protected)>
To: user@(protected)
Sent: Thursday, May 15, 2008 7:08:57 AM
Subject: Re: [Struts 2] Pass value between two action classes
quite possible.
for this u need to define the object fruit in session scope. and in 1st
page
say: vitamins, color can be filled. In 2nd page say: weight, age can be
filled and all the time the same object fruit in the session would be
filled.
http://struts.apache.org/2.x/docs/scope-interceptor.html
hope this helps.
ravi
--
http://www.nabble.com/-Struts-2--Pass-value-between-two-action-classes-t
p17234969p17246034.html
Sent from the Struts - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)

Attachment:
user_186482.ezm (zipped)as I see... no!
-----Original Message-----
From: Milan Milanovic [mailto:milanmilanovich@(protected)]
Sent: Thursday, May 15, 2008 7:20 PM
To: Struts Users Mailing List
Subject: Re: [Struts 2] Pass value between two action classes
Is a better approach to use one action class with multiple jsp pages ?
--
Thx, Milan
----- Original Message ----
From: Ravichandra C <ravichandrac@(protected)>
To: Struts Users Mailing List <user@(protected)>
Sent: Thursday, May 15, 2008 3:44:10 PM
Subject: RE: [Struts 2] Pass value between two action classes
Here we are implementing one action class with multiple methods
providing multiple pages. More like a wizard like functionality....
however I would suggest to break things into multiple actions to the
extent possible. The main disadvantage we our approach was with the
validation layer... all had only one validate method... and we had to go
with interceptors...
-----Original Message-----
From: Milan Milanovic [mailto:milanmilanovich@(protected)]
Sent: Thursday, May 15, 2008 7:09 PM
To: Struts Users Mailing List
Subject: Re: [Struts 2] Pass value between two action classes
O.K. Thaks.
But what is general good practice for big forms, two different forms and
actions for
one object like this, or maybe tabbedPanel or something third ? What is
easier to implement
and more efficient ?
--
Thx in advance, Milan Milanovic
----- Original Message ----
From: ravi_eze <ravichandrac@(protected)>
To: user@(protected)
Sent: Thursday, May 15, 2008 7:08:57 AM
Subject: Re: [Struts 2] Pass value between two action classes
quite possible.
for this u need to define the object fruit in session scope. and in 1st
page
say: vitamins, color can be filled. In 2nd page say: weight, age can be
filled and all the time the same object fruit in the session would be
filled.
http://struts.apache.org/2.x/docs/scope-interceptor.html
hope this helps.
ravi
--
http://www.nabble.com/-Struts-2--Pass-value-between-two-action-classes-t
p17234969p17246034.html
Sent from the Struts - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)

Attachment:
user_186483.ezm (zipped)Why not ? Different methods are calling different result jsp-s ?
--
Milan
----- Original Message ----
From: Ravichandra C <ravichandrac@(protected)>
To: Struts Users Mailing List <user@(protected)>
Sent: Thursday, May 15, 2008 3:52:12 PM
Subject: RE: [Struts 2] Pass value between two action classes
as I see... no!
-----Original Message-----
From: Milan Milanovic [mailto:milanmilanovich@(protected)]
Sent: Thursday, May 15, 2008 7:20 PM
To: Struts Users Mailing List
Subject: Re: [Struts 2] Pass value between two action classes
Is a better approach to use one action class with multiple jsp pages ?
--
Thx, Milan
----- Original Message ----
From: Ravichandra C <ravichandrac@(protected)>
To: Struts Users Mailing List <user@(protected)>
Sent: Thursday, May 15, 2008 3:44:10 PM
Subject: RE: [Struts 2] Pass value between two action classes
Here we are implementing one action class with multiple methods
providing multiple pages. More like a wizard like functionality....
however I would suggest to break things into multiple actions to the
extent possible. The main disadvantage we our approach was with the
validation layer... all had only one validate method... and we had to go
with interceptors...
-----Original Message-----
From: Milan Milanovic [mailto:milanmilanovich@(protected)]
Sent: Thursday, May 15, 2008 7:09 PM
To: Struts Users Mailing List
Subject: Re: [Struts 2] Pass value between two action classes
O.K. Thaks.
But what is general good practice for big forms, two different forms and
actions for
one object like this, or maybe tabbedPanel or something third ? What is
easier to implement
and more efficient ?
--
Thx in advance, Milan Milanovic
----- Original Message ----
From: ravi_eze <ravichandrac@(protected)>
To: user@(protected)
Sent: Thursday, May 15, 2008 7:08:57 AM
Subject: Re: [Struts 2] Pass value between two action classes
quite possible.
for this u need to define the object fruit in session scope. and in 1st
page
say: vitamins, color can be filled. In 2nd page say: weight, age can be
filled and all the time the same object fruit in the session would be
filled.
http://struts.apache.org/2.x/docs/scope-interceptor.html
hope this helps.
ravi
--
http://www.nabble.com/-Struts-2--Pass-value-between-two-action-classes-t
p17234969p17246034.html
Sent from the Struts - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)

Attachment:
user_186484.ezm (zipped)One class with different action methods is fine, One class with a single
execute method that's recalled is bad.
I think Milan is saying the former, if he is saying the latter then it's not
good due to the extra instructions needed to determine where you're going
from and where you're going to.
Al.
----- Original Message -----
From: "Milan Milanovic" <milanmilanovich@(protected)>
To: "Struts Users Mailing List" <user@(protected)>
Sent: Thursday, May 15, 2008 3:06 PM
Subject: Re: [Struts 2] Pass value between two action classes
Why not ? Different methods are calling different result jsp-s ?
--
Milan
----- Original Message ----
From: Ravichandra C <ravichandrac@(protected)>
To: Struts Users Mailing List <user@(protected)>
Sent: Thursday, May 15, 2008 3:52:12 PM
Subject: RE: [Struts 2] Pass value between two action classes
as I see... no!
-----Original Message-----
From: Milan Milanovic [mailto:milanmilanovich@(protected)]
Sent: Thursday, May 15, 2008 7:20 PM
To: Struts Users Mailing List
Subject: Re: [Struts 2] Pass value between two action classes
Is a better approach to use one action class with multiple jsp pages ?
--
Thx, Milan
----- Original Message ----
From: Ravichandra C <ravichandrac@(protected)>
To: Struts Users Mailing List <user@(protected)>
Sent: Thursday, May 15, 2008 3:44:10 PM
Subject: RE: [Struts 2] Pass value between two action classes
Here we are implementing one action class with multiple methods
providing multiple pages. More like a wizard like functionality....
however I would suggest to break things into multiple actions to the
extent possible. The main disadvantage we our approach was with the
validation layer... all had only one validate method... and we had to go
with interceptors...
-----Original Message-----
From: Milan Milanovic [mailto:milanmilanovich@(protected)]
Sent: Thursday, May 15, 2008 7:09 PM
To: Struts Users Mailing List
Subject: Re: [Struts 2] Pass value between two action classes
O.K. Thaks.
But what is general good practice for big forms, two different forms and
actions for
one object like this, or maybe tabbedPanel or something third ? What is
easier to implement
and more efficient ?
--
Thx in advance, Milan Milanovic
----- Original Message ----
From: ravi_eze <ravichandrac@(protected)>
To: user@(protected)
Sent: Thursday, May 15, 2008 7:08:57 AM
Subject: Re: [Struts 2] Pass value between two action classes
quite possible.
for this u need to define the object fruit in session scope. and in 1st
page
say: vitamins, color can be filled. In 2nd page say: weight, age can be
filled and all the time the same object fruit in the session would be
filled.
http://struts.apache.org/2.x/docs/scope-interceptor.html
hope this helps.
ravi
--
http://www.nabble.com/-Struts-2--Pass-value-between-two-action-classes-t
p17234969p17246034.html
Sent from the Struts - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)

Attachment:
user_186474.ezm (zipped)Hi,
I realized a Struts 2 process to create a new contract. As template results
I tried JSP and Velocity. All JSP templates are rendered correct, but the
velocity templates are rendered twice. So I see the same content twice on
the page.
Are there people with similar problems? Does somebody has a solution?
Greets
I'm using Struts 2.0.11.
struts.xml:
...
<package name="contract" namespace="/contract" extends="base-package">
<result-types>
<result-type name="velocity" default="true"
class="
org.apache.struts2.dispatcher.VelocityResult" />
</result-types>
<action name="createContract*" class="CreateContractAction"
method="{1}">
<interceptor-ref name="conversationStack" />
<result
name="input">/WEB-INF/vm/contract/createContract-input.vm</result>
<result
name="success">/WEB-INF/vm/contract/createContract-success.vm</result>
</action>
</package>
...
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_186475.ezm (zipped)Hi
I am trying to integrate ExtJs into Struts2 framework.
Couldnt see my .html files rendering with ExtJs stuff...
Can somebody throw light on this?
How can i do about this?
Thanks,
Dhandapani

Attachment:
user_186476.ezm (zipped)On Thu, May 15, 2008 at 6:40 PM, Dhandapani Ponnurangam <
inspiregates@(protected):
> Hi
>
> I am trying to integrate ExtJs into Struts2 framework.
> Couldnt see my .html files rendering with ExtJs stuff...
>
> Can somebody throw light on this?
> How can i do about this?
>
we are working with it, we can see that to integrate we need JSON plugins
but i am still have problem with SMD example here
F

Attachment:
user_186477.ezm (zipped)You need json-lib-*.*.jar and json-taglib*.*.jar, the tag lib "transform"
the java object in json objects.
2008/5/15 Frans Thamura <frans@(protected)>:
> On Thu, May 15, 2008 at 6:40 PM, Dhandapani Ponnurangam <
> inspiregates@(protected):
>
> > Hi
> >
> > I am trying to integrate ExtJs into Struts2 framework.
> > Couldnt see my .html files rendering with ExtJs stuff...
> >
> > Can somebody throw light on this?
> > How can i do about this?
> >
>
> we are working with it, we can see that to integrate we need JSON plugins
>
> but i am still have problem with SMD example here
>
> F
>
--
---------------------------------------------
Rafael Antunes Torquato Araujo

Attachment:
user_186478.ezm (zipped)On Thu, May 15, 2008 at 7:44 PM, Rafael Antunes <rafael.araujodf@(protected)>
wrote:
> You need json-lib-*.*.jar and json-taglib*.*.jar, the tag lib "transform"
> the java object in json objects.
>
we use the JSON Plugins,
i still dont know how to make the result output as JSON using json-lib
i am know very close the json-lib creator
any glue friend
F