Re: Unit Test with Struts2 + Spring + Maven

2009-03-05 Thread Nils-Helge Garli Hegvik
As both Martin and Dave pointed out, this is a maven related question. Please check here: http://maven.apache.org/users/getting-help.html Nils-H On Fri, Mar 6, 2009 at 8:19 AM, nani2ratna wrote: > > Can i run a particular test case. > Instead of running every test case all the time i just want t

Re: Unit Test with Struts2 + Spring + Maven

2009-03-05 Thread nani2ratna
Can i run a particular test case. Instead of running every test case all the time i just want to run only one test case. Thanks and Regards Ratna newton.dave wrote: > > nani2ratna wrote: >> I am just giving mvn test, it running the 2 tests in the >> srs/main/test/../HelloworldActionTest.java >

Re: Struts 2 / Tiles 2 / Spring Security

2009-03-05 Thread Mohan Radhakrishnan
Actually I included Spring security because I remember having seen some mails about Tiles and Spring security combination( Something to do with includes/forwards ). We don't have experience with Sitemesh. Out pages are not very complex now but in the future they may be. We require customized them

Re: prepare method not working

2009-03-05 Thread markbeek
vhumble wrote: > > Even after implementing the prepare method, I still get the same error as > before and when I debug with eclipse, i never enter into prepare method. I > am using basic struts-default stack and in this stack, prepare comes > before validation. > You do need to implement the

Struts + Dojo problem

2009-03-05 Thread chumbobumbo
This is more of a dojo related question but since struts and dojo combination is relatively common I thought someone may be able to tell me what's going on here. The problem is that dojo.event.connect doesn't like the element that is referred in a second .jsp (namely the line:

Re: S2: Unexpected Exception

2009-03-05 Thread Dave Newton
Ryan Peterson wrote: I'm working with Dojo and Struts 2, and getting the following error when I submit my form (It seems to be referring to a null input from the two single quotes): [2009-03-05 15:56:25,688] ERROR com.opensymphony.xwork2.interceptor.ParametersInterceptor - ParametersInterceptor

S2: Unexpected Exception

2009-03-05 Thread Ryan Peterson
Hi guys, I'm working with Dojo and Struts 2, and getting the following error when I submit my form (It seems to be referring to a null input from the two single quotes): [2009-03-05 15:56:25,688] ERROR com.opensymphony.xwork2.interceptor.ParametersInterceptor - ParametersInterceptor - [setParamet

Re: prepare method not working

2009-03-05 Thread vhumble
Thanks Dave. It is working after I implemented the Preparable interface vhumble wrote: > > Thank you. As of now I am not implementing Preparable. But I will try > implementing it and see. I thought the order of interceptors in > struts-default package will automatically take precedence and get a

Re: struts1 - html:hidden tag

2009-03-05 Thread Dave Newton
Emi Lu wrote: 2) actually assigns the value "" 1) gets the value of the property from the formbean if it has been assigned in the formbean. You may have an action that populates the form by hitting a database, loading the data in the form and the forwarding to your current page ie before editi

Re: Unit Test with Struts2 + Spring + Maven

2009-03-05 Thread Dave Newton
nani2ratna wrote: I am just giving mvn test, it running the 2 tests in the srs/main/test/../HelloworldActionTest.java and another test class. But how, from where its getting called. Please explain me how its calling those tests. Maven's surefire plugin will run tests--as Martin said you should

Re: prepare method not working

2009-03-05 Thread Dave Newton
vhumble wrote: Thank you. As of now I am not implementing Preparable. But I will try implementing it and see. I thought the order of interceptors in struts-default package will automatically take precedence and get applied as validation happens automatically. It does, but validation != preparab

RE: Problem with Jboss 4.2.3.GA and convention plug-in 2.1.6

2009-03-05 Thread Vogel,Chris
Jerome, I wanted to let you know that a colleague of mine worked with Musachy and got this problem fixed for the next version (2.1.3) of XWork. I believe it will now only log the exception at a debug level. Chris From: Jerome ROBERT [mailto:jrm.rob...@gmail

Re: Access ActionForm methods/varaibles in JSP

2009-03-05 Thread Emi Lu
I suggest that you not embed Java code in JSPs in scriptlets like this. It's better to use Struts tags instead. Are you looking at using Struts 1 or Struts 2? Struts1 for now. Do you have a simple code. I am not sure I quite understand how you propose to use java code in JSP? Thanks, -- Lu

Re: Access ActionForm methods/varaibles in JSP

2009-03-05 Thread Jim Kiley
I suggest that you not embed Java code in JSPs in scriptlets like this. It's better to use Struts tags instead. Are you looking at using Struts 1 or Struts 2? jk On Thu, Mar 5, 2009 at 3:22 PM, Emi Lu wrote: > Good morning, > > In JSP file, may I know how to get action bean please? > > > <%

Access ActionForm methods/varaibles in JSP

2009-03-05 Thread Emi Lu
Good morning, In JSP file, may I know how to get action bean please? <% if(f1.getCode().equals('abc')) { %> ... ... <% } %> In JSP, I'd like to know how to call "methods, fields" in action form bean? Thanks a lot! -- Lu Ying ---

Re: Struts Themes Problem - help

2009-03-05 Thread Edward Song
I recently had to override the 'simple' template to remove the HTML list formatting. Try these links http://struts.apache.org/2.0.14/docs/themes-and-templates.html http://struts.apache.org/2.0.14/docs/template-loading.html I found them extremely helpful. HTH On Tue, Mar 3, 2009 at 8:57 AM,

Re: Writing a unit test that goes through result-types

2009-03-05 Thread Greg Lindholm
I always test against my real production struts.xml because I need to be sure it is correct. I want my test to ensure the Actions, Results, and Interceptors are all configured correctly. I see your struts-test package does NOT extends="struts-default", so you are missing all the default configur

Re: Writing a unit test that goes through result-types

2009-03-05 Thread Timothy Astle
Hi Greg / all, I've gone back to Greg's example and I'm getting the stack trace below. From what I've read, it is because I'll need to define an object factory for my test to run. My application is using a combination of Struts 2 and Spring 2. I've created a struts-test.xml that bypasses so

Re: struts1 - html:hidden tag

2009-03-05 Thread Mark Shifman
I am not really sure what you are doing?? If you need a datasource and have set it up appropriately in your context.xml see http://tomcat.apache.org/tomcat-6.0-doc/jndi-datasource-examples-howto.html(for tomcat 6.0) you get the datasource doing something like this: Context initContext =

Re: Struts 2 Type conversion refuses 0.0 for a double?

2009-03-05 Thread markbeek
newton.dave wrote: > > I believe it was probably what's conventionally known as a "mistake". > It appears to have been resolved with XW-677. > Yep, looks like that will take care of it. Thanks. -- View this message in context: http://www.nabble.com/Struts-2-Type-conversion-refuses-0.0-for-a-

Re: struts1 - html:hidden tag

2009-03-05 Thread Emi Lu
Hi Mas, 2) actually assigns the value "" 1) gets the value of the property from the formbean if it has been assigned in the formbean. You may have an action that populates the form by hitting a database, loading the data in the form and the forwarding to your current page ie before editing a r

RE: Unit Test with Struts2 + Spring + Maven

2009-03-05 Thread nani2ratna
Hi this is my pom.xml. 4.0.0 TutorialFromTextbook TutorialFromTextbook war 0.0.1-SNAPSHOT Struts 2 Starter http://www.myComp.com Struts 2 Starter junit

Re: struts1 - html:hidden tag

2009-03-05 Thread Mark Shifman
2) actually assigns the value "" 1) gets the value of the property from the formbean if it has been assigned in the formbean. You may have an action that populates the form by hitting a database, loading the data in the form and the forwarding to your current page ie before editing a record. mas

RE: struts1 - html:hidden tag

2009-03-05 Thread Alvaro Gomez
It's while return value in operation en ActionStrust y parameter in IN -Mensaje original- De: Emi Lu [mailto:em...@encs.concordia.ca] Enviado el: Jueves, 05 de Marzo de 2009 10:18 a.m. Para: Struts Users Mailing List Asunto: struts1 - html:hidden tag Good morning, A question about strut

struts1 - html:hidden tag

2009-03-05 Thread Emi Lu
Good morning, A question about struts1 tag. May I know the differences between (1) vs. (2) please? (1) (2) When I load value from popup windows, it seems that default value will be setup on (1); while (2) always return value="". Could someone let me know why? I am lost why default value wi

Re: [OT] POM, licenses and dependency trees

2009-03-05 Thread Wes Wannemacher
On Thu, Mar 5, 2009 at 10:26 AM, stanlick wrote: > > Thanks Wes -- > > First off, you are preaching to the choir bro.  My question stems from the > fact we have a small army of lawyers who stake their careers on looking in > these rabbit holes and they are now asking me to help them dig!  Telling

RE: Unit Test with Struts2 + Spring + Maven

2009-03-05 Thread Martin Gainty
this is a maven question (which you should post to maven users group) maven-users as will I request the pom.xml which contains the details of execution of Unit-test goals show us your pom.xml so we can be of further assistance Martin __ Disclaimer a

Re: [OT] POM, licenses and dependency trees

2009-03-05 Thread stanlick
Thanks Wes -- First off, you are preaching to the choir bro. My question stems from the fact we have a small army of lawyers who stake their careers on looking in these rabbit holes and they are now asking me to help them dig! Telling them not to concern themselves with this and that archive f

Unit Test with Struts2 + Spring + Maven

2009-03-05 Thread nani2ratna
Hi Everybody, I just created a struts 2 project from nexus. It created a default project with 2 actions. Every thing is working excellent. But i got a doubt how this Unit test is working. I am just giving mvn test, it running the 2 tests in the srs/main/test/../HelloworldActionTest.java and anot

Re: Server-side equivalent of tag?

2009-03-05 Thread Robert Graf-Waczenski
Nils-Helge Garli Hegvik wrote: If I understand your problem correctly, you might solve your problem by adding a FORWARD element to the Struts 2 filter mapping. That will make sure that the Struts 2 filter also will handle requests forwarded with a RequestDispatcher. Nils-H On Thu, Mar 5, 2009 a

Re: Server-side equivalent of tag?

2009-03-05 Thread Nils-Helge Garli Hegvik
If I understand your problem correctly, you might solve your problem by adding a FORWARD element to the Struts 2 filter mapping. That will make sure that the Struts 2 filter also will handle requests forwarded with a RequestDispatcher. Nils-H On Thu, Mar 5, 2009 at 3:09 PM, Robert Graf-Waczenski

Server-side equivalent of tag?

2009-03-05 Thread Robert Graf-Waczenski
Hi! We need the ability to fetch the result of a Struts2 action on the server, so that the response text is available as a String. With a Struts1 action, we were able to utilize a RequestDispatcher for this task. Due to Struts2 being served by a filter and not by a servlet, this approach no l

Re: Re: Struts Ajax Newbie

2009-03-05 Thread konf
BODY { font-family:Arial, Helvetica, sans-serif;font-size:12px; }Hi, about: >baseUrl: "http://127.0.0.1:8080/cars/FillCarModels";, >Check that the action is valid, example if u are using Struts, the >FillCarModels need to be define like an action in the struts-config >file. yes, it is real

Re: prepare method not working

2009-03-05 Thread vhumble
Thank you. As of now I am not implementing Preparable. But I will try implementing it and see. I thought the order of interceptors in struts-default package will automatically take precedence and get applied as validation happens automatically. newton.dave wrote: > > vhumble wrote: >> Is there

Re: Date time picker

2009-03-05 Thread Zoran Avtarovski
It’s one of plugins in the plugin repository: http://code.google.com/p/struts2jscalendarplugin/ It’s not the best implementation of the time but it works and time was of the essence. It uses dropdowns for the time. I’ve had to modify the code a little because of some locale specific issues, let m

RE: Date time picker

2009-03-05 Thread Martin Gainty
Zoran where did you find jscalendar? how does it render both date and time? Martin __ Disclaimer and confidentiality note Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidenti

Re: Writing a unit test that goes through result-types

2009-03-05 Thread Timothy Astle
I found an article on how to statically load Tiles to get past the container issue. I found a web site that explained how to initialize the tiles container. See below: protected void setUp() throws Exception { if (applicationContext == null) { // this is the first time s

Re: [s2] Would like to do

2009-03-05 Thread Dave Newton
jeto wrote: Ok, it was my fault the foo object was not a String it was an enum type. But still is it possible to do something like contains? OGNL can call arbitrary methods. Dave - To unsubscribe, e-mail: user-unsubscr...@st

Re: Problem with default value

2009-03-05 Thread Dave Newton
Yves Dessertine wrote: Yeah, thanks a lot Benjamin! I did *basically* what you told (building a Collection of LabelValueBean, but I did this in an action -- same result: it works :)). But I still don't understand why selecting default values hadn't worked when building a list of option with ind

Re: Struts 2 Type conversion refuses 0.0 for a double?

2009-03-05 Thread Dave Newton
markbeek wrote: Can anyone (a) confirm this analysis of the source code, and (b) if so, explain why the decision was made to consider zero an invalid entry for a double property on a form field? I believe it was probably what's conventionally known as a "mistake". It appears to have been resol

Re: Struts2 rest plugin - making default response to xml

2009-03-05 Thread Dave Newton
mahanare wrote: I am wondering if it is possible to use default response of the rest action using rest plugin to xml? instead of http://<>/orders.xml if i can make it http://<>/orders as the action for a POST method in a form submssion and the response should be xml. Essentially i do not want t

Struts 2.1.6 - No Action Extension, Cannot Access Dojo Javascript Files

2009-03-05 Thread Richard Rauser
Hi all, I recently began migrating a working Struts 2.0.11 app to Struts 2.1.6. This has been a bit of a painful process, particularly moving from the SmartURLs plugin to the Convention plugin and from ajax tags to the Dojo plugin. Here is my problem: I am not using an action extension within my

Re: tag causing could not be resolved as a collection/array/map/enumeration/iterator type error

2009-03-05 Thread catchme
HI I was lookin for the same Query for last whole day . i m working on struts 2.0.11.2 an dfinnaly got to know that its not tah much easy to use selct tag :-| anywasy finally i got the answer that v need to passs list in action class to get record list in select tag thx 4 help Mark Greene wrot

Re: Struts Ajax Newbie

2009-03-05 Thread Mileidys Gonzalez Prieto
Some of the reasons can be: Well... I will give u a list of some reasons: - baseUrl: "http://127.0.0.1:8080/cars/FillCarModels";, Check that the action is valid, example if u are using Struts, the FillCarModels need to be define like an action in the struts-config file. > source: "make", Be sure

Re: Display BigDecimal Format

2009-03-05 Thread Zoran Avtarovski
Thanks Seshagari, But I¹d have to do this in every action and on every form. I might just write a customConverter for BigDecimals and place it in my xwork properties file. Z. > > Hi > > Follows anapest code, in your action class. Me be resolved your problem. > // Round two decimal function

Re: Struts 2 / Tiles 2 / Spring Security

2009-03-05 Thread Antonio Petrelli
2009/3/5 Mohan Radhakrishnan : > >      Is Tiles still the most common approach to layout pages especially > when you have a combination of Struts 2 / Tiles 2 / Spring Security ? What > is the recommendation of the forum ? I think that your question was not "well-formed" :-D In fact you have to as

Struts 2 / Tiles 2 / Spring Security

2009-03-05 Thread Mohan Radhakrishnan
Hi, Is Tiles still the most common approach to layout pages especially when you have a combination of Struts 2 / Tiles 2 / Spring Security ? What is the recommendation of the forum ? Thanks, Mohan -- View this message in context: http://www.nabble.com/Struts-2---Tiles-2---Spring-Security-

Re: Get Server Port

2009-03-05 Thread Nils-Helge Garli Hegvik
In that case, you either have to pass the information you need as parameters to the task/thread, or make it possible to look it up in a configuration file of some kind. Nils-H On Thu, Mar 5, 2009 at 9:09 AM, kate_cl wrote: > > Hi,the request is null when i'm running a schedule task. A thread wil

RE: Display BigDecimal Format

2009-03-05 Thread Seshagiri V
Hi Follows anapest code, in your action class. Me be resolved your problem. // Round two decimal function double roundTwoDecimals(double amout) { DecimalFormat twoCurrencyDecimalForm = new DecimalFormat(getText("#.##")); return Double.valueOf(twoCurrencyDecimalForm.format(a

Can I send parameters between jsp pages?

2009-03-05 Thread Loupita
Hello! This is my issue: I have a jsp with a list of users: UserList.jsp <%@ page contentType="text/html; charset=UTF-8" %> <%@ taglib prefix="s" uri="/struts-tags" %> <%@ taglib prefix="sx" uri="/struts-dojo-tags" %> <%@ taglib uri="http://displaytag.sf.net"; prefix="display" %> Users

Re: [s2] Would like to do

2009-03-05 Thread jeto
Ok, it was my fault the foo object was not a String it was an enum type. But still is it possible to do something like contains? -- View this message in context: http://www.nabble.com/-s2--Would-like-to-do-%3Cs%3Aif-test%3D%22foo.contains%28%27N%27%29%22%3E-tp22328913p22348897.html Sent from th

Display BigDecimal Format

2009-03-05 Thread Zoran Avtarovski
Our forms have some currency and and we need to display to 2 decimal points when the data is prepopulated. At the moment is displays as a single decimal point. I could specify all the relevant fields in a package.properties file but I¹d like to do it across the board for big decimals. Do I have t

Re: Date time picker

2009-03-05 Thread Zoran Avtarovski
No need. I found the plugin for jscalendar which does exactly what I need and dropped in without a hitch. Z. > > > Hi, > > I¹m hoping somebody can help. > > I need a date and time picker. The dojo based one is either a date or time > picker, but not both. > > Does anybody know of a good date

Problem with convention plugin, trying to load a spring bean as a class object

2009-03-05 Thread mahanare
Hi, We are facing a problem in a struts2 rest (2.1.6) application. We have configured spring and spring configuration contains the bean definitions for all rest action classes, While it seem to work, we have the following problem: When the rest service action class returns something, it is som

Re: Problem with default value

2009-03-05 Thread Yves Dessertine
Yeah, thanks a lot Benjamin! I did *basically* what you told (building a Collection of LabelValueBean, but I did this in an action -- same result: it works :)). But I still don't understand why selecting default values hadn't worked when building a list of option with individual tags in jsp page

Re: Get Server Port

2009-03-05 Thread kate_cl
Hi,the request is null when i'm running a schedule task. A thread will wake up at certain time and send email to user. I need to include the server url in this,including the server port and context path. Nils-Helge Garli wrote: > > When is the request null? And what do you need the server port