Re: Dynamically passing Templates name in struts.config file

2011-03-12 Thread aum strut
Thanks Dave for the help,but i am aware about dynamic results and we are using it quite a lot in our application but my problem is not like choosing a dynamic result since when validation fails i am always being get input as control string and in all cases we have ApplicationFrame as parent templat

Re: NullPointerException Using StrutsSpringTestCase

2011-03-12 Thread bphill...@ku.edu
StrutsSpringTestCase extends StrutsTestCase which extends another class that depends on JUnit 3 not JUnit 4. So you cannot use JUnit 4 annotations and the SpringJUnit4ClassRunner. You may find this blog article helpful: http://www.brucephillips.name/blog/index.cfm/2009/12/2/Using-JUnit-To-Test

Re: NullPointerException Using StrutsSpringTestCase

2011-03-12 Thread Jason Ferguson
1. Yes. The LoginAction is annotated with @Namespace("/login"), and the register() action is annotated with @Action(value="register"). 2. I'm not sure what you're saying. Since StrutsTestCase initializes this to a new object, why do I need to check for null? On Sat, Mar 12, 2011 at 7:43 PM, Marti

RE: NullPointerException Using StrutsSpringTestCase

2011-03-12 Thread Martin Gainty
1)does /login/register exist in your struts webapp? 2)in StrutsTestCase protected void initServletMockObjects() { request = new MockHttpServletRequest(); //check request for null before referencing the request object later on Martin Gainty ___

RE: Just a stab in the dark

2011-03-12 Thread Martin Gainty
you can use String constructor to construct what you need from any part of a previous String then use StringBuffer to concat the Strings together but Scanner will work too. Maurizio can you put a scanf method in StringTools that uses scanner to replicate scanf functionality and send it to d...

NullPointerException Using StrutsSpringTestCase

2011-03-12 Thread Jason Ferguson
(Sorry, hit the wrong key combination and hit send without meaning to...) I am attempting to do some out-of-container testing of a Struts Action which extends StrutsSpringTestCase. I've tried configuring the application context two separate ways: via the @ContextConfiguration annotation and by ove

NullPointerException Using StrutsSpringTestCase

2011-03-12 Thread Jason Ferguson
I am attempting to do some out-of-container testing of a Struts Action which extends StrutsSpringTestCase. I've tried configuring the application context two separate ways: via the @ContextConfiguration annotation and by overriding getContextLocations()

RE: Code Help:CRUD example

2011-03-12 Thread Jose Luis Martinez Avial
I would check exactly where the NPE is happenning. According to your code and stck trace it happens here: public String listDomain(Integer dt_oid) { String result= SUCCESS; try { domList=DomainDAO.listDomain(

Re: Unable to Load Configuration

2011-03-12 Thread Dave Newton
Under what server? I usually suspect conflicting Xerces libs, but it's hard to say not knowing *anything* about your app, your libs, your environment, etc. Doesn't look like anything related to Struts 2, though, at this point. Dave On Sat, Mar 12, 2011 at 1:11 PM, Jason Ferguson wrote: > I'm try

Unable to Load Configuration

2011-03-12 Thread Jason Ferguson
I'm trying in the middle of converting an app from struts 1.3 to 2.2.1.1. I'm trying to run the app using the Maven jetty plugin, but am getting the following Exception thrown on attempting to execute mvn jetty:run: 2011-03-12 07:49:53.447:WARN::Failed startup of context JettyWebAppContext@a63bd d

Re: Dynamically passing Templates name in struts.config file

2011-03-12 Thread Dave Newton
Check out dynamic results and see if that helps. http://struts.apache.org/2.x/docs/result-configuration.html http://struts.apache.org/2.x/docs/parameters-in-configuration-results.html Dave On Sat, Mar 12, 2011 at 12:49 PM, aum strut wrote: > Hi All, > > In my application i have a single Applica

Dynamically passing Templates name in struts.config file

2011-03-12 Thread aum strut
Hi All, In my application i have a single ApplicationFrame.jsp which takes care of the overall look and feel of the application,from my action classes i am setting the name of working template and this dynamic template name is being used in the ApplicationFrame as follows and i have following en

Re: RE: Just a stab in the dark

2011-03-12 Thread Maurizio Cucchiara
Why do you prefer scanf to scanner class? I could be wrong, but I don't believe it is possible cause of the immutability of the string class (you cannot pass a string object as reference). Maurizio Cucchiara Il giorno 12/mar/2011 15.22, "Martin Gainty" ha scritto: havent seen scanf method in an

RE: Just a stab in the dark

2011-03-12 Thread Martin Gainty
havent seen scanf method in any of the Java classes i welcome factoring a scanf method in org.apache.struts2.convention.StringTools anyone ? Martin __ Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité Diese Nachricht ist vertr

Just a stab in the dark

2011-03-12 Thread Adam Hardy
Hi List this is a bit OT but it's the weekend and I have a question which I am desperate to answer and my googling skills are no match for it. Does anyone know where I can get a Java implementation of scanf? I want to do C-style scanf and read a string into a list of parameters - the exact