ServletResponse(response);
String result = action.dummyAction();
Assert.assertNull(result); //should always be null
String json = response.getContentAsString();
Assert.assertNotNull(json); //shouldn't be null
On Fri, May 13, 2011 at 2:58 PM, Jake Vang wrote:
> hi,
>
> i am using
hi,
i am using struts v2.1.8.1 + spring 3.0 + junit 4.0. it should be
noted that i am using convention plugin for spring.
my action class extends ActionSupport and implements
ServletRequestAware and ServletResponseAware. the method i am testing
inside my action class never returns a string litera
help You:
> http://struts.apache.org/2.2.1.1/docs/stream-result.html
>
> Best greetings,
> Paweł Wielgus.
>
>
> 2011/4/24 Jake Vang :
>> Dave,
>>
>> is there anyway to set it up so that the session can be created and
>> not destroyed when i return
, Dave Newton wrote:
> My first guess would be to return null so you're not rendering a jsp after
> the output stream is closed.
>
> Dave
> On Apr 22, 2011 11:49 PM, "Jake Vang" wrote:
>> what i did to get rid of this message was to add the following line
>&
ess.jsp.
Thank you so much.
On Sat, Apr 23, 2011 at 12:11 AM, Dave Newton wrote:
> My first guess would be to return null so you're not rendering a jsp after
> the output stream is closed.
>
> Dave
> On Apr 22, 2011 11:49 PM, "Jake Vang" wrote:
>> what i did
e. if anyone has a better suggestion,
please let me know.
On Fri, Apr 22, 2011 at 11:22 PM, Jake Vang wrote:
> i am using struts 2 with the convention plugin. i have a bunch of
> actions that streams back plain text, json or xml. however, when a
> user goes to a certain URL, i
i am using struts 2 with the convention plugin. i have a bunch of
actions that streams back plain text, json or xml. however, when a
user goes to a certain URL, i keep seeing an IllegalStateException :
Cannot create a session after the response has been committed.
why is this happening?
my action
s
> Eduard
> P.S.: Do not forget to define the corresponding setter method for injection
>
> Am 01.11.2010 08:37, schrieb Jake Vang:
>>
>> i have a custom field validator that extends FieldValidatorSupport.
>> inside this class, i need to access some beans as defined i
i have a custom field validator that extends FieldValidatorSupport.
inside this class, i need to access some beans as defined in
applicationContext.xml by Spring. how do i access the spring managed
beans? any help is appreciated.
hi,
i am trying to validate an integer field (int primitive type) on a
POJO (i.e. MyPojo.integer). i have the validation defined in
--validation.xml as follows.
...
Integer is required!
...
when the form posts to the action, if the value of is left blank, i keep seeing a
java.lang.NoSuc
bean.
oh well, you win some, you lose some. if anyone has a better idea,
please let me know.
thanks.
On Mon, Jul 12, 2010 at 11:26 AM, Jake Vang wrote:
> hi,
>
> i am trying to validate an integer field (int primitive type) on a
> POJO (i.e. MyPojo.integer). i have the validatio
your backing beans inside the Prepare method in your
> action. That when 'input' is needed, your backing beans will be
> loaded.
>
> On 7/10/10, Jake Vang wrote:
>> i have a form that i display. but to display that form, i have to
>> fetch some data from the data
i have a form that i display. but to display that form, i have to
fetch some data from the database and then place that data on the
valuestack (via backing beans). when the form is displayed, it expects
that those backing beans should be populated. the form then posts to a
save action.
i have a --
h annotations and the convention
plugin.
On Tue, Jun 29, 2010 at 7:28 AM, Jake Vang wrote:
> i have an Action class in the package
> com.company.web.struts.actions.admin.LoginAction. inside LoginAction,
> i use Annotation to specify the Action (i.e. @Action(value="/
i have an Action class in the package
com.company.web.struts.actions.admin.LoginAction. inside LoginAction,
i use Annotation to specify the Action (i.e. @Action(value="/login")
on a method. according to the documentation at,
http://struts.apache.org/2.1.8.1/docs/convention-plugin.html, this
should
never mind, i removed # from the OGNL expression and i get the correct
behavior now.
On Tue, Jun 29, 2010 at 12:23 AM, Jake Vang wrote:
> i have a User class with two fields, password and confirmPassword. on
> a web form, upon post, i am trying to see if they match using the
> fielde
i have a User class with two fields, password and confirmPassword. on
a web form, upon post, i am trying to see if they match using the
fieldexpression validator. however, no matter what i try, i keep
getting the message that they don't match. in the Tomcat console, i
can see this message: Got resu
ken,
thanks for responding. i got things to work, but i haven't figured out
really why it's working (on a conceptual, philosophical level). here's
what i did to the code above.
1. for the Company class, i removed the @ForeignKey annotation
2. for the Employee class, i removed the companyId field.
i am following the example at
http://struts.apache.org/2.1.8.1/docs/struts-2-spring-2-jpa-ajax.html.
in this example, a very simple persistence is given (of which i am
thankful). but, what i am trying to do is slightly more complicated
with persistence. i need to persist a one-to-many relationship.
where it talks about extending
> 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:
.xml")
> public class MyServiceImplTest extends AbstractJUnit4SpringContextTests
> {
>
> �...@autowired(required = true)
> private MyService myService = null;
>
> testConfigXML.xml will contain your *test* config..
>
> Then do the do!
>
>
> -Original
e les email
> peuvent facilement être sujets à la manipulation, nous ne pouvons accepter
> aucune responsabilité pour le contenu fourni.
>
>
>
>
>> To: user@struts.apache.org; vangj...@googlemail.com
>> Subject: Re: i need more documentation on applicationContext.xml
get things working, but doesn't really explain in detail "why" we are
doing what we are doing. that's kind of what i meant.
On Mon, Jun 21, 2010 at 10:04 AM, Stephen Turner wrote:
>
> On Mon, 21 Jun 2010 00:56:19 -0400, Jake Vang
> wrote:
>
>> hi,
hi, i've been reading and studying
http://struts.apache.org/2.0.14/docs/struts-2-spring-2-jpa-ajax.html.
i want to know what is actually going on in applicationContext.xml.
for example, what do these two lines do? please explain or refer me to
better documentation.
-
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.
---
ected into the Action class. The third and fourth lines
confirm that the String and boolean values are injected into the
service class.
thanks.
On Thu, May 13, 2010 at 9:32 AM, RogerV wrote:
>
>
>
> Jake Vang wrote:
>>
>>> If you want Spring to create your action cla
uts 2 will use Spring to manage
> the Action lifecycle, meaning you can inject anything the way you are
> describing it above (including String, etc...)
> Denis.
>
> Le 2010-05-13 08:09, Jake Vang a écrit :
>>
>> thanks. example please? (when you have time).
>&
think off the top
> of my head.
>
> -Original Message-
> From: Jake Vang [mailto:vangj...@googlemail.com]
> Sent: 13 May 2010 11:44
> To: Struts Users Mailing List
> Subject: Re: spring, struts2, convention plugin, how to "wire" an action class
>
> yes. pr
> If you want Spring to create your action class (as opposed to Struts
> creating them) then you need to define your action in the
> applicationContext.xml file.
how do you do that? here's a couple of ways i have tried that do NOT work.
1. (normal, naive way that works for defining services)
yes. precisely.
On Thu, May 13, 2010 at 6:41 AM, James Cook wrote:
> Oh, did you want your action as a spring managed bean? Ah I think i massively
> miss read you. You want to inject predefined values etc?
>
>
> -Original Message-----
> From: Jake Vang [mailto:vangj
seem verbose with the xml).
On Thu, May 13, 2010 at 6:20 AM, James Cook wrote:
> Yeah sorry, short on time here, didn't see your question at the bottom. Add
> the spring jar from the spring project.
>
> -----Original Message-
> From: Jake Vang [mailto:vangj...@googlemail.com]
gt;
>> I found at some point I could jsut do
>>
>> public class MyAction extends ActionSupport {
>>
>> private MyInjectedService service
>>
>> etc etc
>>
>> But I have started doing:
>>
>> public class MyAction extends ActionSupport {
t;
> I am not sure if that alters the way Struts2/Spring does it. But it does
> make it a bit clearer to read.
>
> -Original Message-
> From: Jake Vang [mailto:vangj...@googlemail.com]
> Sent: 13 May 2010 10:23
> To: user@struts.apache.org
> Subject: spring, struts2,
vate MyInjectedService service
>
> etc etc
>
> But I have started doing:
>
> public class MyAction extends ActionSupport {
>
> @Autowired
> private MyInjectedService service
>
> I am not sure if that alters the way Struts2/Spring does it. But it does
> make
i am using struts 2.1.8.1 and the convention plugin. i am also using
spring for dependency injections (DI). my question is if it is
possible to to use struts2 + convention plugin with spring for DI on
my Action classes? i have searched the internet but only seen
examples using struts 1 + spring fo
M, Stephen Ince wrote:
> Jake,
> I actually ran into a lot problems accessing dojo from other
> servers. They all went away when I installed it locally. I think you
> get some sandbox security issues with some of the packages.
>
> cheers,
> Steve
>
> On Fri, Feb
new dojo tags are at 1.4. I solved a similiar height problem on dojo
> 1.4 by doing the following.
>
>
>
> body, html { height: 99%;overflow:hidden;
> margin-bottom:0;padding-bottom:0;}
>
>
>
>
> preload="false" style="width:100%;height:100
i'm using the in the struts2-dojo-plugin. i have a
few questions on controlling the display/rendering of this component.
1. can i make the expand 100% in height? i've tried
several things: a) place the inside a and
set the height of the table to 100%, b) set the height to
100%, c) set the he
g list)
> {
> this.list = list;
> }
> }
>
> Of course "list" is one of my custom tag's attributes and appropriately
> defined in my TLD.
>
> Cheers,
> Bill
>
>
> On Mon, Feb 1, 2010 at 5:04 AM, Jake Vang wrote:
>
>> i fo
i found something helpful here. it works.
http://struts.apache.org/2.1.8.1/docs/access-to-valuestack-from-jsps.html
On Mon, Feb 1, 2010 at 7:34 AM, Jake Vang wrote:
> i was wondering if it was possible to write a custom tag that is able
> to access objects in the ActionContext using OGN
rkpackages
>>
> several times and do not see the connection. I'm not sure I understand
> exactly what you
> did solved the problem, but it is clerarer than the documention
>
>
> --- On Sat, 1/30/10, Jake Vang wrote:
>
>
> From: Jake Vang
> Subject: Re: inter
i was wondering if it was possible to write a custom tag that is able
to access objects in the ActionContext using OGNL? i'm not sure if
this is a "correct" question.
my problem is that i have a form. the form is posted to an action. the
action has getters/setters for the form fields. i then forwa
lets
>
>
> On Sun, Jan 31, 2010 at 9:12 AM, Jake Vang wrote:
>> i am using servlets (HttpServlet) and struts 2. my mapping in web.xml
>> for the struts filter maps to the url pattern, /*. my servlet maps to
>> something like this, /test. however, when i try to access my se
i am using servlets (HttpServlet) and struts 2. my mapping in web.xml
for the struts filter maps to the url pattern, /*. my servlet maps to
something like this, /test. however, when i try to access my servlet,
http://localhost:8080/myapp/test, i get the following message:
"There is no Action mappe
and methods.
wow, it was that easy.
On Sat, Jan 30, 2010 at 6:14 PM, Jake Vang wrote:
> okay, after fiddling around for 2 hours, with the weak documentation out
> there, i think i have it figured out. at least empirically, it works now.
> just in case there are other users out ther
and methods i want to use the
stack?
i don't know why this is such a pain (but then again, i'm not a developer on
the struts2 project, so there may be a lot of complexities to get this
working elegantly that i'm unaware of).
On Sat, Jan 30, 2010 at 4:10 PM, Jake Vang wrote:
&g
or is not called).
On Sat, Jan 30, 2010 at 4:37 PM, Dave Newton wrote:
>
> http://struts.apache.org/2.x/docs/convention-plugin.html#ConventionPlugin-XWorkpackages
>
>
> - Original Message
> > From: Jake Vang
> > To: user@struts.apache.org
> > Sent: Sat, Ja
what does that have to do with my problem? please enlighten.
On Sat, Jan 30, 2010 at 4:37 PM, Dave Newton wrote:
>
> http://struts.apache.org/2.x/docs/convention-plugin.html#ConventionPlugin-XWorkpackages
>
>
> - Original Message
> > From: Jake Vang
> >
i have written an interceptor implementation, however, it seems i cannot get
it to work. i have followed the instructions at
http://struts.apache.org/2.x/docs/interceptors.html. i have also followed
the instructions at
http://struts.apache.org/2.x/docs/how-do-we-configure-an-interceptor-to-be-used-
49 matches
Mail list logo