Java Mailing List Archive

http://www.gg3721.com/

Home » Struts Users Mailing List »

user Digest 19 Aug 2010 01:10:48 -0000 Issue 9147

user-digest-help

2010-08-18


Author LoginPost Reply

user Digest 19 Aug 2010 01:10:48 -0000 Issue 9147

Topics (messages 207221 through 207248):

Re: Calling Struts Action file through command line.
 207221 by: Dave Newton

REST on Struts2 - DAO - Service
 207222 by: Frans Thamura

Spring configuration error
 207223 by: Rakeshkumar Parmar
 207224 by: Eduard Neuwirt
 207225 by: Dave Newton

Re: [ANN] Struts 2.2.1 GA release available
 207226 by: Per Johansson
 207228 by: Lukasz Lenart

Struts, WAS, and Authentication
 207227 by: Jesse Hill

Re: [S2.2.1] Javassist dependency
 207229 by: Lukasz Lenart
 207230 by: Dave Newton
 207231 by: Lukasz Lenart

How do you write unit tests for annotation based validation?
 207232 by: Dready

Struts 2.2.1 - Unit Testing Interceptors
 207233 by: Stephen Turner
 207238 by: Lukasz Lenart
 207241 by: Stephen Turner
 207242 by: Lukasz Lenart

Re: Turning freemarker logging off
 207234 by: ricoq
 207235 by: ricoq

Choosing a result dynamically based on session attribute?
 207236 by: java.rgm.spamgourmet.com
 207248 by: Dave Newton

Performance issues
 207237 by: Nathan Meeker
 207239 by: Lukasz Lenart
 207240 by: Nathan Meeker
 207243 by: Greg Lindholm
 207246 by: Nathan Meeker

Retrieving Value from Row in Struts2 Table While using Displaytag
 207244 by: raychang

Struts 2-Spring Plugin with Spring 3 - Looks good so far...
 207245 by: Burton Rhodes
 207247 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_207221.ezm (zipped)
Another option is to just make a service request from the command line (or
anywhere else): it's still HTTP, it's just not coming from a browser.
Depending on what you need to get back this can be quite convenient.

Dave

On Tue, Aug 17, 2010 at 3:45 PM, Cimballi <cimballi@(protected):

> Struts allows its actions to be tested using unit testing with mock
> requests and responses, so yes, you can call the actions from a
> command line tool.
>
> You can follow the guide here about unit testing Struts actions :
>
> http://cimballisblog.blogspot.com/2009/09/unit-testing-struts2-actions-with.html
>
> Cimballi
>
>
> On Tue, Aug 17, 2010 at 2:40 PM, E2241 <amuh41@(protected):
> >
> > Hi,
> >
> > 1.) I would like to know if it is possible to call the struts framework
> > through a command line or a console application. Can one call an action
> > class? Is there any possibility to do so? I think its not possible as
> > everything would depend on the struts-config file and the Http Request
> > object. From the config file the request would probably know which action
> > class to invoke and the respective bean (if needed for any business
> logic)
> > would be called.
> >
> > 2.) I have a web application which is based on the struts framework. I
> know
> > for a fact that only once the request is submitted the struts-config
> would
> > map the action and the bean. But what happens in a case where there would
> be
> > no Http Servlet Request object, instead it would be a call from a console
> > application trying to invoke an action class to perform the business
> logic;
> > is that possible?
> >
> > 3.) What if i create a HttpServletRequest object in the console app and
> then
> > call the action class? Can we call the action class in this manner by
> > instantiating it and calling execute(). Then I would probably have to
> call
> > the bean in the action class itself beating the MVC pattern framework and
> > the use of the config file. Not sure if we can invoke the config file
> from
> > command line.
> >
> > Please give your thoughts on this. I am not sure if I have been clear
> enough
> > in explaining this. My main requirement is to try and see if i can call
> and
> > execute the business logic implemented on the struts framework (in action
> > and bean) through a console application
> >
> > --
> > View this message in context:
> http://old.nabble.com/Calling-Struts-Action-file-through-command-line.-tp29449292p29449292.html
> > Sent from the Struts - User mailing list archive at Nabble.com.
> >
>
>
>
> --
> Cimballi
> Freelance - JAVA J2EE project leader
> http://cimballi.elance.com/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>

Attachment: user_207222.ezm (zipped)
hi all

we create an example using Struts2-Spring-Hibernate, using Spring way,
DAO-Services

this is the SVN

http://ugforge.gunadarma.ac.id/svn/cimande/branches/rest-struts

the project run perfectly

but we use this package for @Services and @Transactional

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

my idea to remove all depedency with Spring

any idea to replace this code?

this is the full code

/**
* PersonServiceImpl.java
*
* Created on 01 Agu 2010 13:07:24
*/
package org.blueoxygen.cimande.example.geneology.service;

import java.sql.Timestamp;
import java.util.List;

import org.blueoxygen.cimande.example.geneology.Person;
import org.blueoxygen.cimande.example.geneology.dao.PersonDAO;
import org.blueoxygen.cimande.security.SessionCredentials;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
* @author Dian Aditya
*
*/
@Service
@Transactional(readOnly = true)
public class PersonServiceImpl implements PersonService {
@Autowired
private PersonDAO personDao;

@Autowired
private SessionCredentials credentials;

@Transactional
public void save(Person person) {
if (credentials.getCurrentUser() != null) {
person.getLogInformation().setLastUpdateBy(
credentials.getCurrentUser().getId());
person.getLogInformation().setLastUpdateDate(
new Timestamp(System.currentTimeMillis()));
person.getLogInformation().setCreateBy(
credentials.getCurrentUser().getId());
person.getLogInformation().setCreateDate(
new Timestamp(System.currentTimeMillis()));
}
personDao.persist(person);
}

@Transactional
public void update(Person person) {
Person temp = personDao.getById(Person.class, person.getId());
if (temp != null) {
if (credentials.getCurrentUser() != null) {
person.getLogInformation().setLastUpdateBy(
credentials.getCurrentUser().getId());
person.getLogInformation().setLastUpdateDate(
new Timestamp(System.currentTimeMillis()));
}
personDao.merge(person);
}
}

@Transactional
public void delete(Person person) {
Person temp = personDao.getById(Person.class, person.getId());
if (temp != null) {
List<Person> childs = personDao.getChilds(temp);
if (temp.isMale()) {
for (Person c : childs) {
c.setFather(null);
personDao.persist(c);
}
} else {
for (Person c : childs) {
c.setMother(null);
personDao.persist(c);
}
}

personDao.remove(temp);
}
}

@Transactional(readOnly = true)
public List<Person> getPersons() {
return personDao.findAll(Person.class);
}

@Transactional(readOnly = true)
public List<Person> getPersons(String field, String contain) {
return personDao.find(Person.class, field, contain);
}

@Transactional(readOnly = true)
public Person getPerson(String id) {
return personDao.getById(Person.class, id);
}

@Transactional(readOnly = true)
public List<Person> getChilds(Person parent) {
return personDao.getChilds(parent);
}

@Transactional(readOnly = true)
public List<Person> getChildsList(Person parent) {
return personDao.getCildsList(parent);
}

}

Attachment: user_207223.ezm (zipped)
Hi,

 I am not using spring to configure Hello World sample application. But it still gives me listener not registered error for spring context. I am using struts 2.7.1 distribution.

Regards,
Rakesh



DISCLAIMER
==========
This e-mail may contain privileged and confidential information which is the property of Persistent Systems Ltd. It is intended only for the use of the individual or entity to which it is addressed. If you are not the intended recipient, you are not authorized to read, retain, copy, print, distribute or use this message. If you have received this communication in error, please notify the sender and delete all copies of this message. Persistent Systems Ltd. does not accept any liability for virus infected mails.

Attachment: user_207224.ezm (zipped)
Hello Rakesh,

are you using spring 3.x version ? If yes, please make sure, you have
already included all spring 3.0 jars. The entire list of jars can be
found here:
http://blog.springsource.com/2009/12/02/obtaining-spring-3-artifacts-with-maven/

Listener not cofigured means that one of spring-web jars has not been
included.

Regards
Eduard

Am 18.08.2010 06:18, schrieb Rakeshkumar Parmar:
> Hi,
>
>   I am not using spring to configure Hello World sample application. But it still gives me listener not registered error for spring context. I am using struts 2.7.1 distribution.
>
> Regards,
> Rakesh
>
>
>
> DISCLAIMER
> ==========
> This e-mail may contain privileged and confidential information which is the property of Persistent Systems Ltd. It is intended only for the use of the individual or entity to which it is addressed. If you are not the intended recipient, you are not authorized to read, retain, copy, print, distribute or use this message. If you have received this communication in error, please notify the sender and delete all copies of this message. Persistent Systems Ltd. does not accept any liability for virus infected mails.
>


Attachment: user_207225.ezm (zipped)
Are you deploying the Spring plugin?

Dave

On Aug 18, 2010 12:19 AM, "Rakeshkumar Parmar" <
rakeshkumar_parmar@(protected):
> Hi,
>
> I am not using spring to configure Hello World sample application. But it
still gives me listener not registered error for spring context. I am using
struts 2.7.1 distribution.
>
> Regards,
> Rakesh
>
>
>
> DISCLAIMER
> ==========
> This e-mail may contain privileged and confidential information which is
the property of Persistent Systems Ltd. It is intended only for the use of
the individual or entity to which it is addressed. If you are not the
intended recipient, you are not authorized to read, retain, copy, print,
distribute or use this message. If you have received this communication in
error, please notify the sender and delete all copies of this message.
Persistent Systems Ltd. does not accept any liability for virus infected
mails.

Attachment: user_207226.ezm (zipped)
"The release is also available through the central Maven repository under
Group ID "org.apache.struts". "

I cannot find version 2.2.1 under

http://mvnrepository.com/artifact/org.apache.struts/struts2-parent

/Per Johansson

Attachment: user_207228.ezm (zipped)
2010/8/18 Per Johansson <perjoha@(protected)>:
> "The release is also available through the central Maven repository under
> Group ID "org.apache.struts". "
>
> I cannot find version 2.2.1 under
>
> http://mvnrepository.com/artifact/org.apache.struts/struts2-parent

Here you have
http://repo2.maven.org/maven2/org/apache/struts/struts2-parent/2.2.1/


Regards
--
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/
Kapituła Javarsovia 2010 http://javarsovia.pl


Attachment: user_207227.ezm (zipped)
Hello,

I'm wondering if anybody has run in to this particular problem ...

I have two trivial applications, each having a protected "Home" action and an
accessible "Login" action. Both applications protect the home action using form
based authentication in the web.xml. The only difference between these two apps
is that one includes a struts filter and accesses the actions through struts
actions, while the other just uses JSPs with no struts and accesses Home.jsp and
Login.jsp.

There are no java classes used in the struts app, it just has config like:

  <package name="default" extends="struts-default">
    <action name="Home">
       <result>/Home.jsp</result>
    </action>

    <action name="Login">
       <result>/Login.jsp</result>
    </action>
  </package>

So - there's no code to the apps other than the JSPs, which are plain html.

Both of these apps work cleanly on WAS 6.x and 7.x. For the struts app - I've
tried several versions including 2.0.14 and 2.1.8 and I see identical results.


The problem I have is that with struts, when a user logs out of the application
and is redirected to the login page, the log fills with messages like:

[8/18/10 4:00:32:750 CST] 00000036 srt       W
com.ibm.ws.webcontainer.srt.SRTServletResponse setStatus WARNING: Cannot set
status. Response already committed.
[8/18/10 4:00:32:765 CST] 00000036 srt       W
com.ibm.ws.webcontainer.srt.SRTServletResponse addHeader WARNING: Cannot set
header. Response already committed.With the JSP-only version, I don't have these
warnings.

My WAS has the custom properties:
com.ibm.ws.webcontainer.assumefiltersuccessonsecurityerror=truecom.ibm.ws.webcontainer.invokefilterscompatibility=true

One last thing to note is that I run with a network deployment of WAS. I don't
seem to see these errors on a standalone WAS config.

Anybody have any ideas? I'll attach the source for both apps (7k) in case that
helps. So far google has not bailed me out.

Thanks,
Jesse



Attachment: clean.zip (zipped)
Attachment: struts.zip (zipped)
Attachment: user_207229.ezm (zipped)
Reposting just for future reference

2010/8/18 Dave Newton <davelnewton@(protected)>:
> Oh, you're right, it says it's provided. Which confuses me even more :/
>
> On Wed, Aug 18, 2010 at 7:43 AM, Lukasz Lenart
> <lukasz.lenart@(protected):
>>
>> 2010/8/18 Dave Newton <davelnewton@(protected)>:
>> > Hmm, I guess I'm misreading the POMs for various things then; on the
>> > Maven
>> > browser site I was looking at the S2.1.8.1 core POM specifically
>> > excluded
>> > Javassist, the S2.2.1 one doesn't (local; not on browsing site yet).
>> > I'm still not sure why S2.2.1 distro /lib doesn't have javassist,
>> > though--shouldn't it? I didn't see an exclusion anywhere (but haven't
>> > dug
>> > around yet) and it's in s2-blank.
>>
>> Javassist is excluded in OGNL pom, you can check XWork pom to see that
>> Javassist is included in case of tests.
>>
>>
>> Regards
>> --
>> Łukasz
>> + 48 606 323 122 http://www.lenart.org.pl/
>> Kapituła Javarsovia 2010 http://javarsovia.pl
>
>


Attachment: user_207230.ezm (zipped)
What, to prove to historians that I'm usually confused?!

On Wed, Aug 18, 2010 at 9:05 AM, Lukasz Lenart <lukasz.lenart@(protected)
> wrote:

> Reposting just for future reference
>
> 2010/8/18 Dave Newton <davelnewton@(protected)>:
> > Oh, you're right, it says it's provided. Which confuses me even more :/
> >
> > On Wed, Aug 18, 2010 at 7:43 AM, Lukasz Lenart
> > <lukasz.lenart@(protected):
> >>
> >> 2010/8/18 Dave Newton <davelnewton@(protected)>:
> >> > Hmm, I guess I'm misreading the POMs for various things then; on the
> >> > Maven
> >> > browser site I was looking at the S2.1.8.1 core POM specifically
> >> > excluded
> >> > Javassist, the S2.2.1 one doesn't (local; not on browsing site yet).
> >> > I'm still not sure why S2.2.1 distro /lib doesn't have javassist,
> >> > though--shouldn't it? I didn't see an exclusion anywhere (but haven't
> >> > dug
> >> > around yet) and it's in s2-blank.
> >>
> >> Javassist is excluded in OGNL pom, you can check XWork pom to see that
> >> Javassist is included in case of tests.
> >>
> >>
> >> Regards
> >> --
> >> Łukasz
> >> + 48 606 323 122 http://www.lenart.org.pl/
> >> Kapituła Javarsovia 2010 http://javarsovia.pl
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>

Attachment: user_207231.ezm (zipped)
W dniu 18 sierpnia 2010 15:17 użytkownik Dave Newton
<davelnewton@(protected):
> What, to prove to historians that I'm usually confused?!

Just to put it on the list. If you didn't notice, I answered directly to you ;-)


Regards
--
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/
Kapituła Javarsovia 2010 http://javarsovia.pl


Attachment: user_207232.ezm (zipped)
Hi!

I am using annotation based validation in my actions and tried to
write a unittest for it, with no success.

I found several links, one looked very promising but is not working
with 2.1.8.1. (NullPointerException):
http://bloodredsun.blog.com/2009/10/21/unit-testing-struts2-actions-with-annotation-based-validation/
http://fromthesource.liquidorange.net/?p=16

Is there anyone who can tell me what i have to do?

I am using Struts 2.1.8.1. with Spring 2.5.6 and tried jUnit 4.

best regards,

Thomas

--
"Power corrupts. Power failure corrupts absolutely"


Attachment: user_207233.ezm (zipped)
Unit tests for interceptors in Struts 2.2.1

In TokenInterceptorTest I see a reference to
org.apache.struts2.TestConfigurationProvider, but I can't find this class
in a jar file. I do see the source code though.

Which jar should I be using for TestConfigurationProvider?

Thanks,
Steve


Attachment: user_207238.ezm (zipped)
2010/8/18 Stephen Turner <sturner@(protected)>:
> Unit tests for interceptors in Struts 2.2.1
>
> In TokenInterceptorTest I see a reference to
> org.apache.struts2.TestConfigurationProvider, but I can't find this class in
> a jar file. I do see the source code though.
>
> Which jar should I be using for TestConfigurationProvider?

You must include JUnit Plugin
http://struts.apache.org/2.x/docs/junit-plugin.html


Regards
--
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/
Kapituła Javarsovia 2010 http://javarsovia.pl


Attachment: user_207241.ezm (zipped)
On Wed, 18 Aug 2010 16:22:37 -0400, Lukasz Lenart
<lukasz.lenart@(protected):

> 2010/8/18 Stephen Turner <sturner@(protected)>:
>> Unit tests for interceptors in Struts 2.2.1
>>
>> In TokenInterceptorTest I see a reference to
>> org.apache.struts2.TestConfigurationProvider, but I can't find this
>> class in
>> a jar file. I do see the source code though.
>>
>> Which jar should I be using for TestConfigurationProvider?
>
> You must include JUnit Plugin
> http://struts.apache.org/2.x/docs/junit-plugin.html
>
>
> Regards

I'm looking in struts2-junit-plugin-2.2.1.jar that came as part of
struts2-2.2.1-all.zip and I see only these classes in the
org/apache/struts2 folder:

StrutsTestCase.class
StrutsTestCase$1.class
StrutsSpringTestCase.class

What am I missing?

Thanks,
Steve


Attachment: user_207242.ezm (zipped)
2010/8/18 Stephen Turner <sturner@(protected)>:
> I'm looking in struts2-junit-plugin-2.2.1.jar that came as part of
> struts2-2.2.1-all.zip and I see only these classes in the org/apache/struts2
> folder:
>
> StrutsTestCase.class
> StrutsTestCase$1.class
> StrutsSpringTestCase.class
>
> What am I missing?

This class is used internally by Struts 2 (src/main/test) and it isn't
exposed to users :-(


Regards
--
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/
Kapituła Javarsovia 2010 http://javarsovia.pl


Attachment: user_207234.ezm (zipped)



nodje wrote:
>
> Hi,
>
> I'm using Struts 2.1.2. I've configured log4j logging with the following
> line
> log4j.logger.com.opensymphony.xwork2.ognl=ERROR
>
> in order to turn off what seemed to be xwork logging.
>
> However, I'm still getting hundreds of line like these:
> Could not find template in cache, creating new one;
> id=[template/css_xhtml/form.ftl[en_US,UTF-8,parsed] ]
> DEBUG [945512262@(protected)
> template/css_xhtml/form.ftl[en_US,UTF-8,parsed] from
> jar:file:/Users/nodje/Documents/project/allence/alpha2/target/alpha2/WEB-INF/lib/struts2-core-2.1.2.jar!/template/css_xhtml/form.ftl
> DEBUG [945512262@(protected)
> cache, creating new one;
> id=[template/css_xhtml/form-validate.ftl[en_US,UTF-8,parsed] ]
> ....
>
> What I don't understand is from which class this logging comes from:
> cache.debug:81 should indicate a class and the calling method. But in
> "cache.debug:81" 'cache' is not a class. There must be some centralized
> system used to perfom logging.
>
> Anyone knows where this logging comes from?
>
> cheers
> -nodje
>

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



Attachment: user_207235.ezm (zipped)

In your log4j.properties file add the following line:

log4j.logger.freemarker.beans=WARN, CA



This assigns the level of WARNING to the freemarker.beans package only. All
other packages will inherit the root logger level (usually set to DEBUG).
You can set other packages as well, like:

log4j.logger.freemarker.cache=INFO, CA
log4j.logger.com.foo.bar=ERROR, CA

You do not need to change any java code.
Hope this helps.

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



Attachment: user_207236.ezm (zipped)
Is it possible to choose an action result based on a value in the HttpSession? I have read the following page:
 http://struts.apache.org/2.0.11.1/docs/parameters-in-configuration-results.html

I understand how to reference properties from the action itself, but is it possible if the action does NOT provide a getSession() method?
I'd like to do something like this:

<action name="index">
<result type="freemarker">/layouts/${Session.layout}/index.ftl</result>
</action>

-rgm


Attachment: user_207248.ezm (zipped)
Did you try using normal OGNL syntax for accessing value stack properties?

On Aug 18, 2010 4:16 PM, <java.rgm@(protected):
Is it possible to choose an action result based on a value in the
HttpSession? I have read the following page:

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

I understand how to reference properties from the action itself, but is it
possible if the action does NOT provide a getSession() method?
I'd like to do something like this:

<action name="index">
<result type="freemarker">/layouts/${Session.layout}/index.ftl</result>
</action>

-rgm

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)

Attachment: user_207237.ezm (zipped)
I have a small Struts 2 application that displays a JSP page with a table of
about 300 rows. Each row in turn contains about 20 links to other actions.
The JSP is created using Struts2 tags (OGNL). There is a loop that iterates
over a collection and pulls properties of the elements combining them into
other action requests.

The pages takes about 60-70 seconds to render.

Here's a snippet from profiling log:

===
[67546ms] - interceptor: profiling
[67546ms] - invoke:
[203ms] - invokeAction: search
[67343ms] - executeResult: success
===

I am using Struts 2.2.1. Before that I was using 2.1.8 or some such and it
took about 30 seconds.

Thanks!

Attachment: user_207239.ezm (zipped)
Did you enabled FreeMarker cache?
http://struts.apache.org/2.x/docs/freemarker.html Cache sesction


Regards
--
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/
Kapituła Javarsovia 2010 http://javarsovia.pl


Attachment: user_207240.ezm (zipped)
I just enabled the cache (using the settings you suggested) and the time is
down to 15 seconds (from 60-70). Is there anything else I should be doing?
Thanks!

On Wed, Aug 18, 2010 at 2:24 PM, Lukasz Lenart <lukasz.lenart@(protected)
> wrote:

> Did you enabled FreeMarker cache?
> http://struts.apache.org/2.x/docs/freemarker.html Cache sesction
>
>
> Regards
> --
> Łukasz
> + 48 606 323 122 http://www.lenart.org.pl/
> Kapituła Javarsovia 2010 http://javarsovia.pl
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>

Attachment: user_207243.ezm (zipped)
I have found most the struts tags to be really slow but <s:form> seems
to stick out.
For really high performance pages I find I have to not use struts tags.

See this old thread:
http://old.nabble.com/S2-%3Cs%3Aform%3E-in-interator-really-slow-tc28073962.html

On Wed, Aug 18, 2010 at 4:46 PM, Nathan Meeker <nate.meeker@(protected):
> I just enabled the cache (using the settings you suggested) and the time is
> down to 15 seconds (from 60-70). Is there anything else I should be doing?
> Thanks!
>
> On Wed, Aug 18, 2010 at 2:24 PM, Lukasz Lenart <lukasz.lenart@(protected)
>> wrote:
>
>> Did you enabled FreeMarker cache?
>> http://struts.apache.org/2.x/docs/freemarker.html Cache sesction
>>
>>
>> Regards
>> --
>> Łukasz
>> + 48 606 323 122 http://www.lenart.org.pl/
>> Kapituła Javarsovia 2010 http://javarsovia.pl
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>> For additional commands, e-mail: user-help@(protected)
>>
>>
>


Attachment: user_207246.ezm (zipped)
Well, I added Javatemplate plugin:

http://struts.apache.org/2.x/docs/javatemplates-plugin.html

and now the page renders in about 3 seconds. That solves the immediate issue
for me.

Not sure what's going on with struts2 tags, but in the default configuration
they seem to be hideously slow. Am I doing it wrong? Should I not be using
struts tags in JSP pages?

Attachment: user_207244.ezm (zipped)

Hi,

I am trying to access the value of a particular row in my table (to perform
edit or remove actions), but I can't seem to get the value...

Here is the code for my table in my JSP page:

  <display:table name="table" pagesize="25" requestURI="">
  <display:column title="Action" >
   <s:form theme="simple">
     <s:hidden key="cpc" />
     <s:submit action="remove" value="Remove"
     onclick="return confirm('Are you sure you want to delete this
item?');"/>
     <s:submit action="displayEdit" value="Edit"/>
   </s:form>
  </display:column>
  <display:column property="cpc" title="CPC" sortable="true"
headerClass="sortable"/>
  <display:column property="companyName" title="Company Name"
sortable="true" headerClass="sortable"/>
  <display:column property="eventType" title="Event Type" sortable="true"
headerClass="sortable"/>
  <display:column property="industryType" title="Industry Type"
sortable="true" headerClass="sortable"/>
  <display:column property="previousEvents" sortable="true"
headerClass="sortable"/>
  <display:column property="creditNotifications" sortable="true"
headerClass="sortable"/>
  <display:column property="interimNotifyEnterprise" sortable="true"
headerClass="sortable"/>
  </display:table>

The source for the table is an ArrayList<TableRow>, where TableRow is a
wrapper class of all the various fields (and I have getters and setters for
all the fields). Now when I check my HTML source code, I see this for the
hidden field:

  <input type="hidden" name="cpc" value="" id="displayResults_cpc"/>

For some reason, there is no value to be found... It was working fine before
I used Displaytag, and I do have a getter and setter in my Action class
(right now it returns an empty String).

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



Attachment: user_207245.ezm (zipped)
I have queried this list in the past about using Struts 2-Spring
Plugin with Spring 3. A few commented that you've intergrated with no
issue. While upgrading to 2.2.1, I decided to also try a Spring 3
upgrade as well. It seems to be working correctly. However, taking a
closer look at the source code of the Struts-Spring plugin, it appears
that if you implement Class Reloading
(http://struts.apache.org/2.2.1/docs/spring-plugin.html#SpringPlugin-ClassReloading),
the combination of the Struts-Spring Plugin with Spring 3 will most
certainly "break". Since this setting is not to be used in production
systems, I would like to think this combination should be *okay*
moving forward. Can anyone provide any color or experience on this
one?


Attachment: user_207247.ezm (zipped)
we have a code using SpringMVC 3 and Struts 2.2.1,

if we make both one by one, implementation work well, but if we make one
.war, crash happen here

i put the code here

http://ugforge.gunadarma.ac.id/gf/project/cimande/scmsvn/?action=browse&path=/branches/rest-springmvc-struts2/

my idea wanna to make SpringMVC and Struts2 work in one container, and using
Spring 3 as the IoC and share Hibernate Session fActory




On Thu, Aug 19, 2010 at 6:38 AM, Burton Rhodes <burtonrhodes@(protected):

> I have queried this list in the past about using Struts 2-Spring
> Plugin with Spring 3. A few commented that you've intergrated with no
> issue. While upgrading to 2.2.1, I decided to also try a Spring 3
> upgrade as well. It seems to be working correctly. However, taking a
> closer look at the source code of the Struts-Spring plugin, it appears
> that if you implement Class Reloading
> (
> http://struts.apache.org/2.2.1/docs/spring-plugin.html#SpringPlugin-ClassReloading
> ),
> the combination of the Struts-Spring Plugin with Spring 3 will most
> certainly "break". Since this setting is not to be used in production
> systems, I would like to think this combination should be *okay*
> moving forward. Can anyone provide any color or experience on this
> one?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>
©2008 gg3721.com - Jax Systems, LLC, U.S.A.