Re: How to set up the conditions to test web pages for HTTP status codes 403, 404, 500, 503

2021-06-21 Thread Lukasz Lenart
pt., 18 cze 2021 o 14:11 albert kao napisał(a): > > Following "Exception mapping" at: > https://struts.apache.org/getting-started/exception-handling.html > > Something like: > public class HttpIOException extends Exception { > private static final long serialVersionUID = -4261703341L; > > public

Re: How to set up the conditions to test web pages for HTTP status codes 403, 404, 500, 503

2021-06-18 Thread albert kao
ic 12c server. > > When any one of the HTTP status codes 403, 404, 500, 503 occurs, my web > > application will display a corresponding web page. > > e.g. When the HTTP status code 503 occurs, my web application will > display > > the web page 503.html. > > How to se

Re: How to set up the conditions to test web pages for HTTP status codes 403, 404, 500, 503

2021-06-17 Thread Lukasz Lenart
503 occurs, my web > application will display a corresponding web page. > e.g. When the HTTP status code 503 occurs, my web application will display > the web page 503.html. > How to set up or simulate the conditions to test my web application web > pages for HTTP status codes 403,

How to set up the conditions to test web pages for HTTP status codes 403, 404, 500, 503

2021-06-17 Thread albert kao
. When the HTTP status code 503 occurs, my web application will display the web page 503.html. How to set up or simulate the conditions to test my web application web pages for HTTP status codes 403, 404, 500, 503? i.e. simulate the HTTP status codes 503, etc so as to test my web application UI

Re: NPE when running unit test with struts rest plugin

2020-11-09 Thread Lukasz Lenart
pon., 9 lis 2020 o 14:38 Paul Zepernick napisał(a): > > Thank you very much, this has resolved the issue! I have created a ticket in > Jira. > > https://issues.apache.org/jira/browse/WW-5095 Great, thanks a lot! Regards -- Łukasz + 48 606 323 122 http://www.lenart.org.pl/

RE: NPE when running unit test with struts rest plugin

2020-11-09 Thread Paul Zepernick
: Saturday, November 7, 2020 8:51 AM To: Struts Users Mailing List Subject: Re: NPE when running unit test with struts rest plugin NOTICE: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe. śr

Re: NPE when running unit test with struts rest plugin

2020-11-07 Thread Lukasz Lenart
śr., 4 lis 2020 o 17:29 Paul Zepernick napisał(a): > I have posted an example project that reproduces the error in the junit test > > https://github.com/zepernick/struts25-rest-junit I think I have found the problem, mapping is not set in getActionProxy(), you can fix it by overridin

RE: NPE when running unit test with struts rest plugin

2020-11-04 Thread Paul Zepernick
Lukasz, I have posted an example project that reproduces the error in the junit test https://github.com/zepernick/struts25-rest-junit Paul R Zepernick | Sr Programmer Analyst HealthSmart paul.zepern...@healthsmart.com | www.HealthSmart.com -Original Message- From: Paul Zepernick

RE: NPE when running unit test with struts rest plugin

2020-11-03 Thread Paul Zepernick
To: Struts Users Mailing List Subject: Re: NPE when running unit test with struts rest plugin NOTICE: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe. wt., 3 lis 2020 o 13:24 Paul

Re: NPE when running unit test with struts rest plugin

2020-11-03 Thread Lukasz Lenart
wt., 3 lis 2020 o 13:24 Paul Zepernick napisał(a): > Yes, I am using the struts2-junit plugin and extending > StrutsSpringJUnit4TestCase from the plugin. Would you mind preparing a small example and put it on Github? Regards -- Łukasz + 48 606 323 122 http://www.lenart.org.pl/

RE: NPE when running unit test with struts rest plugin

2020-11-03 Thread Paul Zepernick
, November 3, 2020 1:16 AM To: Struts Users Mailing List Subject: Re: NPE when running unit test with struts rest plugin NOTICE: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe. pon., 2 lis 2020

Re: NPE when running unit test with struts rest plugin

2020-11-02 Thread Lukasz Lenart
pon., 2 lis 2020 o 14:48 Paul Zepernick napisał(a): > Struts: 5.2.25 > > Plugins: struts2-rest, struts2-spring, struts2-convention > junit 4 > > Did you try to use struts2-junit plugin and based your tests on StrutsJUnit4TestCase? https://struts.apache.org/plugins/junit/ Regards -- Łukasz +

NPE when running unit test with struts rest plugin

2020-11-02 Thread Paul Zepernick
Struts: 5.2.25 Plugins: struts2-rest, struts2-spring, struts2-convention junit 4 The test below is currently failing in the RestWorkflowInterceptor 205 @Test public void testValidation() throws Exception { // the login uses the create() which expects the POST method

Re: why the code passes Servlet container test but fails in StrutsTestCase

2016-02-14 Thread Dave Newton
qq.com>: > > > Hi, > > > > I was trying to use StrutsTestCase to write a test for a Bean, which has > a > > member of String[]. The code runs perfectly in servlet container(Tomcat), > > but fails as a mock test. In EditActionTest.java, assertNotNull("The > a

Re: why the code passes Servlet container test but fails in StrutsTestCase

2016-02-13 Thread JOSE L MARTINEZ-AVIAL
The method execute has void as a return type, instead of a String. 2016-02-13 2:26 GMT-05:00 小唐 <644282...@qq.com>: > Hi, > > I was trying to use StrutsTestCase to write a test for a Bean, which has a > member of String[]. The code runs perfectly in servlet container(To

why the code passes Servlet container test but fails in StrutsTestCase

2016-02-12 Thread ????
Hi, I was trying to use StrutsTestCase to write a test for a Bean, which has a member of String[]. The code runs perfectly in servlet container(Tomcat), but fails as a mock test. In EditActionTest.java, assertNotNull("The action is null but should not be.", action) still

Howw to test RegisterTest in unit_testing ?

2014-01-06 Thread Chris
The sample unit-testing works with Struts2.3.16 http://struts.apache.org/development/2.x/docs/unit-testing.html and https://svn.apache.org/repos/asf/struts/sandbox/trunk/struts2examples/unit_testing/ But without running RegisterTest.java I don't how I can run this RegisterTest extends

Re: Howw to test RegisterTest in unit_testing ?

2014-01-06 Thread Chris
It's OK now. I added in ProjectProperties / Test Package Folder / test.java All 3 tests passed Le Lundi 6 janvier 2014 22h39, Chris christal...@yahoo.fr a écrit : The sample unit-testing works with Struts2.3.16 http://struts.apache.org/development/2.x/docs/unit-testing.html and https

Re: Test with StrutsJUnit4TestCase

2013-08-26 Thread Lukasz Lenart
Please register an issue in JIRA 2013/8/17 Alireza Fattahi afatt...@yahoo.com: Hi, Regarding to page: http://struts.apache.org/release/2.2.x/docs/struts-2-junit-plugin-tutorial.html I could not find the getConfigPath() method in StrustTestCase class I searched the javadocs and I found that

Re: Test with StrutsJUnit4TestCase

2013-08-26 Thread Lukasz Lenart
2013/8/17 Alireza Fattahi afatt...@yahoo.com: I forgot to merntion: When I extend StrutsJUnit4TestCase the assertTrue method is not found ! You must import them statically Regards -- Łukasz + 48 606 323 122 http://www.lenart.org.pl/

Test with StrutsJUnit4TestCase

2013-08-17 Thread Alireza Fattahi
Hi,   Regarding to page: http://struts.apache.org/release/2.2.x/docs/struts-2-junit-plugin-tutorial.html   I could not find the getConfigPath() method in StrustTestCase class  I searched the javadocs and I found that only the StrutsJUnit4TestCase class has the getcinfigpath() method. So I should

Re: Test with StrutsJUnit4TestCase

2013-08-17 Thread Alireza Fattahi
: Test with StrutsJUnit4TestCase Hi,   Regarding to page: http://struts.apache.org/release/2.2.x/docs/struts-2-junit-plugin-tutorial.html   I could not find the getConfigPath() method in StrustTestCase class  I searched the javadocs and I found that only the StrutsJUnit4TestCase class has

[S1] Trouble writing a unit test

2013-01-20 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 All, I'm trying to write a unit test to test my fix(es) for but I keep getting this exception during the test: java.lang.NullPointerException at org.apache.struts.util.ModuleUtils.getModuleConfig(ModuleUtils.java:93

Test

2012-11-13 Thread Lukasz Lenart
Sorry for that but I have a problem sending mails to dev@struts.a.o -- Łukasz + 48 606 323 122 http://www.lenart.org.pl/ - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail:

Re: Does the StrutsTestCase test filters defined in web.xml?

2012-05-15 Thread J. Garcia
I recommend you use canoo webtest. This is not a unit test tool, but integration test tool. This is the tool used for instance in AppFuse. It has specific pdf verification steps. Cheers, J. On Mon, May 14, 2012 at 5:33 PM, Miguel Almeida mig...@almeida.at wrote: Hi Steve, On Mon, 2012-05-14

Does the StrutsTestCase test filters defined in web.xml?

2012-05-14 Thread Miguel Almeida
] The way the filter works is, in short: a (odd looking, numerical) parameter is added to the request. The filter checks for the existence of that parameter and, if it exists, creates the pdf/excel. I want to test the creation of this file (and its contents). However, when I debug

RE: Does the StrutsTestCase test filters defined in web.xml?

2012-05-14 Thread Steve Higham
is called. You could try looking at Apache Cactus or Apache HttpClient to test this behaviour? Alternatively if you generate the file within Struts then the StrutsTestCase will suffice. I've generated exports from Struts this way. Cheers, Steve -Original Message- From: Miguel Almeida

RE: Does the StrutsTestCase test filters defined in web.xml?

2012-05-14 Thread Miguel Almeida
the resulting page. Yes, that's what I thought. You could try looking at Apache Cactus or Apache HttpClient to test this behaviour? Alternatively if you generate the file within Struts then the StrutsTestCase will suffice. I've generated exports from Struts this way. Both are no longer

Re: Does the StrutsTestCase test filters defined in web.xml?

2012-05-14 Thread Łukasz Lenart
You can try to use Jetty as an embedded server, take a look on BasePortletTest in Portlet Plugin Regards -- Łukasz http://www.lenart.org.pl/ mobile +48 606 323 122, office +27 11 0838747 Warszawa JUG conference - Confitura http://confitura.pl/

Need Help On Writing JUnit / Http Unit test case for Struts 2 Application

2012-04-11 Thread chiranjib.das
Hi All - My Team is using Struts 2 to build a web application. As a part of writing unit test case for web application , I need a small favour. Can Anyone provide me any small POC or Sample code to run JUNIT for Struts2 Application[Using Security Interceptor etc ]or any Http Unit test Case

Re: Need Help On Writing JUnit / Http Unit test case for Struts 2 Application

2012-04-11 Thread Maurizio Cucchiara
://plus.google.com/107903711540963855921 Linkedin    :http://www.linkedin.com/in/mauriziocucchiara Maurizio Cucchiara On 11 April 2012 09:19, chiranjib@accenture.com wrote: Hi All - My Team is using Struts 2 to build a web application. As a part of writing unit test case for web

Unit Test Exception

2011-12-18 Thread 叶伟平
Hi, I am attempting to unit test my actions with struts2-junit-plugin-2.2.1, but I keep getting the follow exception: WARN [main] o.s.m.w.MockServletContext - Couldn't get resource paths for class path resource [WEB-INF/content/admin/] java.io.FileNotFoundException: class path resource [WEB-INF

Re: Message lookup (from key) in Test

2011-11-17 Thread Li Ying
another story). How do you get the value of your message from within the test? The assertion I'm trying is: assertEquals(expectedMessage, action.getActionErrors().iterator().next()); But actionErrors() contains the key (error.authorisation) and not the value (you cannot do this). What's

Message lookup (from key) in Test

2011-11-16 Thread Miguel Almeida
Dear all, I am unit-testing an application under the skin using SpringStrutsTestCase as base (actually, things are a bit more complicated because I'm doing it from Cucumber, but that's another story). How do you get the value of your message from within the test? The assertion I'm trying

Re: how do you test your action classes?

2011-10-14 Thread jaredtims
Can anyone confirm that the Struts2 Convention Plugin will not work with the Struts2 jUnit Plugin? I am attempting to unit test my actions, but I keep getting the following error: 2011-10-14 14:15:42,380 WARN org.springframework.mock.web.MockServletContext.getResourcePaths:212 - Couldn't get

Re: Unit Test Struts2 Action - Custom type converters not being run?

2011-09-30 Thread Carl Ballantyne
it is something silly I am doing. On Wed, Sep 21, 2011 at 5:47 PM, Maurizio Cucchiara mcucchi...@apache.orgwrote: What Struts version are you using? Could you give a try to the nightly version [1] and tell me if it works as you expect? Be aware that you can write your test as follow

Re: Unit Test Struts2 Action - Custom type converters not being run?

2011-09-30 Thread Dave Newton
On Fri, Sep 30, 2011 at 11:21 AM, Carl Ballantyne carlballant...@gmail.comwrote: I had a User-conversion.properties file in the same package as the User.java file. However when the project was being built with maven it was not copying over the .properties files from the src/main/java folder.

Re: Can Struts Junit plugin be used to test the redirect result of an action

2011-09-24 Thread miguel
the StrutsSpringTestCase for a regression test of an action in my application. (Optional reading: Long story short on the problem, the action adds a record to a database via hibernate. The result is a redirect to execute() of the same class, whose prepare() populates a ListRecord object with all

Re: Can Struts Junit plugin be used to test the redirect result of an action

2011-09-24 Thread Carl Ballantyne
test of an action in my application. (Optional reading: Long story short on the problem, the action adds a record to a database via hibernate. The result is a redirect to execute() of the same class, whose prepare() populates a ListRecord object with all the records available

Re: Unit Test Struts2 Action - Custom type converters not being run?

2011-09-22 Thread Carl Ballantyne
write your test as follow: public void testValidationRequired() throws Exception { request.setParameter(user.roles, ); executeAction(/your_package/your_action.action); // asserts to check errors etc.. } } [1] https://builds.apache.org

Re: Can Struts Junit plugin be used to test the redirect result of an action

2011-09-22 Thread Maurizio Cucchiara
Cucchiara On 21 September 2011 17:25, Miguel Almeida mig...@almeida.at wrote: I am using the Struts Junit plugin (http://struts.apache.org/2.2.3.1/docs/struts-2-junit-plugin-tutorial.html ), extending the StrutsSpringTestCase for a regression test of an action in my application. (Optional reading

Re: Unit Test Struts2 Action - Custom type converters not being run?

2011-09-22 Thread Carl Ballantyne
as you expect? Be aware that you can write your test as follow: public void testValidationRequired() throws Exception { request.setParameter(user.roles, ); executeAction(/your_package/your_action.action); // asserts to check errors etc

Can Struts Junit plugin be used to test the redirect result of an action

2011-09-21 Thread Miguel Almeida
I am using the Struts Junit plugin (http://struts.apache.org/2.2.3.1/docs/struts-2-junit-plugin-tutorial.html ), extending the StrutsSpringTestCase for a regression test of an action in my application. (Optional reading: Long story short on the problem, the action adds a record to a database

Unit Test Struts2 Action - Custom type converters not being run?

2011-09-21 Thread Carl Ballantyne
Hi All, I have an action that I am trying to unit test. However it seems the converters I have set for the User object that is being create by the action are not being applied at all when running the unit test. The converters are run when running the application. For example I have a test class

Re: Unit Test Struts2 Action - Custom type converters not being run?

2011-09-21 Thread Maurizio Cucchiara
What Struts version are you using? Could you give a try to the nightly version [1] and tell me if it works as you expect? Be aware that you can write your test as follow: public void testValidationRequired() throws Exception { request.setParameter(user.roles

Re: Unit Test Struts2 Action - Custom type converters not being run?

2011-09-21 Thread Carl Ballantyne
version [1] and tell me if it works as you expect? Be aware that you can write your test as follow: public void testValidationRequired() throws Exception { request.setParameter(user.roles, ); executeAction(/your_package/your_action.action); // asserts to check

Re: Unit Test Struts2 Action - Custom type converters not being run?

2011-09-21 Thread Miguel Almeida
On Wed, 2011-09-21 at 17:55 +0200, Carl Ballantyne wrote: How can I try the nightly build if using Maven? I do not see it listed as an option. Would be nice if Struts released SNAPSHOT versions into maven. Does it? Be aware that you can write your test as follow: public void

Re: Unit Test Struts2 Action - Custom type converters not being run?

2011-09-21 Thread Maurizio Cucchiara
your test as follow: public void testValidationRequired() throws Exception {            request.setParameter(user.roles, );             executeAction(/your_package/your_action.action);           // asserts to check errors etc..    } } [1] https://builds.apache.org/job/Struts2

How do i test Struts 2 jsp page rendering time.

2011-09-13 Thread mohan rao
Hi, I want to test jsp page rendering time used struts-tags. I put a log message at the end of the action class before returning result and again at first calling interceptor because it will be executed last. And after result is sending all the interceptors will be executed in reverse order

Re: How do i test Struts 2 jsp page rendering time.

2011-09-13 Thread Maurizio Cucchiara
mohanara...@gmail.com wrote: Hi,    I want to test jsp page rendering time used struts-tags. I put a log message at the end of the action class before returning result and again at first calling interceptor because it will be executed last. And after result is sending all the interceptors

DISC test

2011-08-10 Thread Frans Thamura
hi all can check? http://m.mervpolis.com, our psychological test apps, using jqm, server s2-spring-hibernate if u using non web, will be redirect to full page web, at www.mervpolis.com, we still not ready to make the mobile user people, redirect from www to m. stay tune :0 we also create REST

Where's the best way to test session timeout?

2011-05-23 Thread Miguel
-config However, how does one test it? More specifically: 1) Can we test it with a struts integration test? 2) How can we mock the time span (ie, we obviously don't want to wait 5 minutes for the test to finish...). Thanks for the input, Miguel Almeida

RE: Where's the best way to test session timeout?

2011-05-23 Thread Biesbrock, Kevin
session-config session-timeout1/session-timeout /session-config? Beez - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org

Re: Where's the best way to test session timeout?

2011-05-23 Thread Eric Lentz
1) Can we test it with a struts integration test? 2) How can we mock the time span (ie, we obviously don't want to wait 5 minutes for the test to finish...). Are you testing what happens when a session is no longer a session? Invalidate the session in your test: http://struts.apache.org/2.2.1

S2 TEst Best Practices

2011-05-20 Thread Frans Thamura
hi all thx to john geppe that gave us a lot of example based on his jquery, esp to change the cimande project with total jquery plugins and i have several question, and i think that is good if we can share it here i want to know, the test mechanisme , best practices of testing in Struts2 world

Re: S2 TEst Best Practices

2011-05-20 Thread Miguel
Hi Frans, On Fri, 2011-05-20 at 14:52 +0700, Frans Thamura wrote: and i have several question, and i think that is good if we can share it here i want to know, the test mechanisme , best practices of testing in Struts2 world I work in TDD, which means I write the tests first

Re: S2 TEst Best Practices

2011-05-20 Thread Frans Thamura
my idea to setup jenkins/hudson server so we can test it there can TDD do this? F On Fri, May 20, 2011 at 4:38 PM, Miguel mig...@almeida.at wrote: Hi Frans, On Fri, 2011-05-20 at 14:52 +0700, Frans Thamura wrote: and i have several question, and i think that is good if we can share

Re: S2 TEst Best Practices

2011-05-20 Thread Miguel
On Fri, 2011-05-20 at 16:41 +0700, Frans Thamura wrote: my idea to setup jenkins/hudson server so we can test it there can TDD do this? TDD stands for test driven development. It is a development methodology. The end result is (better and working) code and (more) tests. So of course you

Re: S2 TEst Best Practices

2011-05-20 Thread Frans Thamura
-To: Struts Users Mailing List user@struts.apache.org Subject: Re: S2 TEst Best Practices On Fri, 2011-05-20 at 16:41 +0700, Frans Thamura wrote: my idea to setup jenkins/hudson server so we can test it there can TDD do this? TDD stands for test driven development. It is a development

RE: S2 TEst Best Practices

2011-05-20 Thread Ilya Kazakevich
Hello, In pure struts your action is just a presenter (see MVP pattern). So you can test it using unit testing engines like testNG and jUnit. For GUI testing you can use selenium. Ilya Kazakevich, Developer JetBrains Inc http://www.jetbrains.com Develop with pleasure! -Original Message

RE: S2 TEst Best Practices

2011-05-20 Thread Miguel
On Fri, 2011-05-20 at 15:38 +0400, Ilya Kazakevich wrote: Hello, In pure struts your action is just a presenter (see MVP pattern). So you can test it using unit testing engines like testNG and jUnit. For GUI testing you can use selenium. Ilya, what kind of tests do you usually run

[OT] RE: S2 TEst Best Practices

2011-05-20 Thread Dave Newton
On May 20, 2011 9:18 AM, Miguel wrote: An interesting view on this from Gojko Adzic seems to almost suggest these tests should be avoided: I read it more as do them right. Dave

RE: S2 TEst Best Practices

2011-05-20 Thread Ilya Kazakevich
to view (written in jsp for example): display user name or hide cancel button. There should not be logic in view. If there is no logic -- there is nothing to test:) Ilya Kazakevich, Developer JetBrains Inc http://www.jetbrains.com Develop with pleasure! -Original Message- From: Miguel

RE: S2 TEst Best Practices

2011-05-20 Thread Dave Newton
On May 20, 2011 9:26 AM, Ilya Kazakevich wrote: There should not be logic in view. If there is no logic -- there is nothing to test:) Sure there is, and I'm not even including JavaScript-based functionality. Are the right things displayed? Does the UI reflect proper state? Is the flow correct

Re: S2 TEst Best Practices

2011-05-20 Thread Frans Thamura
We move all our struts2 app to all json We extend current json plugins And we play around with interceptor We want to test this So, Our apps is json server based on s2 Dunno Is this best Still seeking a way to test Fyi the return still http post -Original Message- From: Ilya

RE: S2 TEst Best Practices

2011-05-20 Thread Ilya Kazakevich
! -Original Message- From: Dave Newton [mailto:davelnew...@gmail.com] Sent: Friday, May 20, 2011 5:29 PM To: Struts Users Mailing List Subject: RE: S2 TEst Best Practices On May 20, 2011 9:26 AM, Ilya Kazakevich wrote: There should not be logic in view. If there is no logic -- there is nothing

RE: S2 TEst Best Practices

2011-05-20 Thread Miguel
On Fri, 2011-05-20 at 09:29 -0400, Dave Newton wrote: On May 20, 2011 9:26 AM, Ilya Kazakevich wrote: There should not be logic in view. If there is no logic -- there is nothing to test:) Sure there is, and I'm not even including JavaScript-based functionality. Are the right things

RE: S2 TEst Best Practices

2011-05-20 Thread Dave Newton
On May 20, 2011 9:40 AM, Ilya Kazakevich wrote: That is action logic, not view itself. Sure, unless there's a bug in the view layer, which is why it gets tested. Dave

How to test json output from json plugin?

2011-05-10 Thread Jim Talbut
Hi, I've got an action declared as: @Results( { @Result( name=success, type=json, params={ root, schools } ) }) @Namespace(/json) @ParentPackage(json-default) public class SchoolSearchAction extends ActionSupport { and I have a test class that is able to get hold of the actionProxy

Re: How to test json output from json plugin?

2011-05-10 Thread Frans Thamura
we have full json=struts-spring-hibernate apps please checkout from http://cimande.java.net it is using maven, but little tricky use mysql F - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional

Incorrect test syntax

2010-09-24 Thread Michaël JERUSALMI
Hi, I'm working on a web application with Struts, made for several projects, and I'm trying to write a test to display (or not) a tab in case of a particular project. I wrote a test, which positive result should be to add a new tab, and which negative result is to write the content

Re: Incorrect test syntax

2010-09-24 Thread 李颖
Hi Michael: Maybe you can not check if a String has same content with another by the operator [==]. Try the method [String.equals()] instead. In your case, i think i should be: s:if test=config.project.eqauls('dba2') 2010/9/24 Michaël JERUSALMI michaelj...@hotmail.com Hi, I'm

RE: Incorrect test syntax

2010-09-24 Thread Michaël JERUSALMI
Sorry, it didn't change a thing. It still goes by the else... Date: Fri, 24 Sep 2010 22:32:04 +0900 Subject: Re: Incorrect test syntax From: liying.cn.2...@gmail.com To: user@struts.apache.org Hi Michael: Maybe you can not check if a String has same content with another

Re: Incorrect test syntax

2010-09-24 Thread Dave Newton
a thing. It still goes by the else... Date: Fri, 24 Sep 2010 22:32:04 +0900 Subject: Re: Incorrect test syntax From: liying.cn.2...@gmail.com To: user@struts.apache.org Hi Michael: Maybe you can not check if a String has same content with another by the operator [==]. Try the method

Re: Incorrect test syntax

2010-09-24 Thread Li Ying
think i need see what the property config.project exactly is to find out what's going wrong. 2010/9/24 Michaël JERUSALMI michaelj...@hotmail.com Sorry, it didn't change a thing. It still goes by the else... Date: Fri, 24 Sep 2010 22:32:04 +0900 Subject: Re: Incorrect test syntax From

RE: Incorrect test syntax

2010-09-24 Thread Michaël JERUSALMI
, searching on forums, i saw many times that syntax, and tried it, but I never knew what it was for. Date: Fri, 24 Sep 2010 09:39:38 -0400 Subject: Re: Incorrect test syntax From: davelnew...@gmail.com To: user@struts.apache.org First I'd try wrapping the expression in the OGNL escape

Re: Incorrect test syntax

2010-09-24 Thread Dave Newton
it, but I never knew what it was for. Date: Fri, 24 Sep 2010 09:39:38 -0400 Subject: Re: Incorrect test syntax From: davelnew...@gmail.com To: user@struts.apache.org First I'd try wrapping the expression in the OGNL escape: %{config.project == 'dba2'} Then I'd try checking the type

Re: Incorrect test syntax

2010-09-24 Thread Li Ying
constant, rather than a string constant. in your case, it should be: ... s:if test=project == @yourfullpackagename.proj...@dba2 ... check this page: http://www.opensymphony.com/ognl/html/LanguageGuide/staticFields.html to see the syntax to reference [Static Fields] in OGNL. 2010/9/24 Michaël

Re: Incorrect test syntax

2010-09-24 Thread Li Ying
Hi Michael: Or you can use another simple solution: Convert the value to String(by invoke the [toString] method), before you can compare it to the String constant. In your case, it should be: s:if test=config.project.toString() == 'dba2' ... 2010/9/24 Li Ying liying.cn.2...@gmail.com Hi

Re: s:if test condition

2010-06-27 Thread lucas owen
OMG! that was it!!! I would never have figured out by myself, THANKS BILL!!! 2010/6/26 Bill Bohnenberger bill98...@gmail.com Since 'activated' is a String, try swapping your single double quotes, e.g. s:if test='%{warning.activated==Y}' -Bill On Sat, Jun 26, 2010 at 11:28 AM, lucas

Re: s:if test condition

2010-06-27 Thread Dale Newfield
lucas owen wrote: Bill Bohnenbergerbill98...@gmail.com Since 'activated' is a String, try swapping your single double quotes, e.g. s:if test='%{warning.activated==Y}' that was it!!! The key is understanding *why* it makes a difference. The reason is that a single character demarcated

Re: s:if test condition

2010-06-27 Thread Bill Bohnenberger
Yes, that is why I said Since 'activated' is a String,... On Sun, Jun 27, 2010 at 3:47 PM, Dale Newfield d...@newfield.org wrote: lucas owen wrote: Bill Bohnenbergerbill98...@gmail.com Since 'activated' is a String, try swapping your single double quotes, e.g. s:if test

s:if test condition

2010-06-26 Thread lucas owen
Hi Struts 2 users: I was wondering if you can use a s:if test based on a pojo's attribute value: POJO: public class Warning{ String text; String activated; // Y or N } JSP: s:if test=*%{warning==null}* -- *Warning* null! /s:if s:else -- *Warning* not null! -- Activated: s:property

Re: s:if test condition

2010-06-26 Thread Bill Bohnenberger
Since 'activated' is a String, try swapping your single double quotes, e.g. s:if test='%{warning.activated==Y}' -Bill On Sat, Jun 26, 2010 at 11:28 AM, lucas owen sr.ilus...@gmail.com wrote: Hi Struts 2 users: I was wondering if you can use a s:if test based on a pojo's attribute value

RE: unit test the service layer (aka data access layer)

2010-06-21 Thread James Cook
Get involved with: Junit 4.4 Spring-test libs And started your service test class like such: @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(locations = classpath:/testConfigXML.xml) public class MyServiceImplTest extends AbstractJUnit4SpringContextTests { @Autowired(required

Re: unit test the service layer (aka data access layer)

2010-06-21 Thread Jake Vang
james, would setting up the unit test in that way load up the service class as if it would in in the J2EE container? the reason why i asked is because in the tutorial, as far as i understand, they have wired in using Spring a transaction manager. that means in my service object, when i call

RE: unit test the service layer (aka data access layer)

2010-06-21 Thread James Cook
AbstractTransactionalJUnit4SpringContextTests for your unit test and the like Cheers James -Original Message- From: Jake Vang [mailto:vangj...@googlemail.com] Sent: 21 June 2010 17:27 To: Struts Users Mailing List Subject: Re: unit test the service layer (aka data access layer) james

Re: unit test the service layer (aka data access layer)

2010-06-21 Thread Jake Vang
AbstractTransactionalJUnit4SpringContextTests for your unit test and the like Cheers James -Original Message- From: Jake Vang [mailto:vangj...@googlemail.com] Sent: 21 June 2010 17:27 To: Struts Users Mailing List Subject: Re: unit test the service layer (aka data access layer) james

unit test the service layer (aka data access layer)

2010-06-20 Thread Jake Vang
hi, i've been following this code here at http://struts.apache.org/2.0.14/docs/struts-2-spring-2-jpa-ajax.html. what i want to know is how to unit test the service layer (or data access object layer). in the case of the link, it would be the PersonServiceImpl class

Re: How to test optimization of a application in struts 1.x

2010-06-03 Thread Rupali Gupta
Hello Abhishek You can do a performance testing on ur local system to check this. There are open source performance testing tools like Apache JMeter, Allmon, DBMonster, Database Opensource Test Suite etc with which you can test database driven applications under heavy load. -Rupali On 6/3

Re: How to test optimization of a application in struts 1.x

2010-06-02 Thread abhishek jain
Hello Rupali , thanks for the links and advice, Can i also ask, is there a way i can simulate the code in my local system as it will work on the server. As i feel that the Desktop i am using is a bit fast then the server i use, i need to test that the code is not consuming more resources mainly

Re: How to test optimization of a application in struts 1.x

2010-06-01 Thread abhishek jain
Hi, Ok,thanks, how can i zip and send every page from the website. to reduce the size of HTMLs thanks abhishek On Mon, May 31, 2010 at 5:12 PM, Rupali Gupta r.gup...@mpstechnologies.comwrote: Hi Abhishek 1. You can do memory profiling by doing performance testing on your code. 2. You can

Re: How to test optimization of a application in struts 1.x

2010-06-01 Thread Rupali Gupta
this lets you use regular expressions to test and modify the url before the web server ever gets around to actually serving the file. The trick is that with just a few lines put into our .htaccess file we can check to see if the browser can accept compressed files (almost all of them can

Re: How to test optimization of a application in struts 1.x

2010-06-01 Thread Rupali Gupta
web directory there's a file called .htaccess. This file lets you tweak the server settings without having to touch the REAL server configuration files. A feature of the .htaccess file is a system known as the rewrite engine. Basically this lets you use regular expressions to test and modify

How to test optimization of a application in struts 1.x

2010-05-31 Thread abhishek jain
Dear friends, I have recently developed an application in struts 1.x and i am thinking is there a way i can get to know that is the load time (in browser) as per the standard or competitive with other applications / websites, Can anyone give me some pointers? I do would like to know the time

Re: How to test optimization of a application in struts 1.x

2010-05-31 Thread Rupali Gupta
Hi Abhishek 1. You can do memory profiling by doing performance testing on your code. 2. You can use memcache server and cache data from db once the server is started to save the db hits every time. It will make application fast. 3. Try to follow Coding guidelines to save memory and load time

Re: Error in running juit test case for struts2 action class

2010-05-03 Thread rameshbabu
wrote: Hi, I am getting error when i am running my junit test case for struts2 action class. Here is the code. public class RoleMasterNewActionTest extends StrutsTestCase

Error in running juit test case for struts2 action class

2010-04-30 Thread rameshbabu
Hi, I am getting error when i am running my junit test case for struts2 action class. Here is the code. public class RoleMasterNewActionTest extends StrutsTestCase { public

Re: Error in running juit test case for struts2 action class

2010-04-30 Thread Wes Wannemacher
components know where to find it. Since a unit test runs in the unit test context, it's not going to find the application context where it expects to. The StrutsSpringTestCase adds some extra bootstrap plumbing to make it work. -Wes On Fri, Apr 30, 2010 at 6:07 AM, rameshbabu rameshbab

How to Test Struts 2 Actions Without a Container

2010-01-27 Thread Shane Witbeck
Hi all, I put together a blog post explaining how to test Struts actions using Spring integration without using a container: http://www.digitalsanctum.com/2010/01/25/how-to-test-struts-2-actions-without-a-container/ I thought this might be a helpful resource for those using Struts and Spring

  1   2   3   4   5   6   >