Java Mailing List Archive

http://www.gg3721.com/

Home » Struts Users Mailing List »

user Digest 12 Feb 2010 03:29:15 -0000 Issue 9004

user-digest-help

2010-02-11


Author LoginPost Reply

user Digest 12 Feb 2010 03:29:15 -0000 Issue 9004

Topics (messages 205001 through 205009):

SkrubCRM
 205001 by: Saeed Iqbal

package com.opensymphony.xwork2 does not exist
 205002 by: swathi reddy
 205004 by: Siddiq Syed

Re: How struts2 supports "optgroup"?
 205003 by: Felipe Lorenz

[Struts 2.1.8] Has struts a problem with using own converts on nested beans?
 205005 by: Michael Obster

Re: ognl can't handle converting from string to float?
 205006 by: BlackKnight
 205007 by: Cimballi
 205008 by: BlackKnight

Reading properties from separate source folder
 205009 by: Peter Bliznak

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_205001.ezm (zipped)
http://skrubcrm.com is an Open Source CRM that I made recently in
Struts/Spring/Hibernate

--
Saeed Iqbal
Independant Consultant
J2EE - Application Architect / Developer

Attachment: user_205002.ezm (zipped)
Hi

when i taken struts2blank2.0.14 files in and compiled no problem is showing
but when i tried to deploy then the

[*javac*] Compiling 3 source files to F:\work\myprojects\Strutsspro1\WEB-INF

[*javac*] *
F:\work\myprojects\Strutsspro1\WEB-INF\src\java\example\ExampleSupport.java*:24:
package com.opensymphony.xwork2 does not exist

[*javac*] import com.opensymphony.xwork2.ActionSupport;

[*javac*] ^

[*javac*] *
F:\work\myprojects\Strutsspro1\WEB-INF\src\java\example\ExampleSupport.java*:29:
cannot find symbol

[*javac*] symbol: class ActionSupport

[*javac*] public class ExampleSupport extends ActionSupport {

[*javac*] ^

[*javac*] *
F:\work\myprojects\Strutsspro1\WEB-INF\src\java\example\HelloWorld.java*:30:
cannot find symbol

[*javac*] symbol : method getText(java.lang.String)

[*javac*] location: class example.HelloWorld

[*javac*] setMessage(getText(MESSAGE));

[*javac*] ^

[*javac*] *
F:\work\myprojects\Strutsspro1\WEB-INF\src\java\example\HelloWorld.java*:31:
cannot find symbol

[*javac*] symbol : variable SUCCESS

[*javac*] location: class example.HelloWorld

[*javac*] return SUCCESS;

[*javac*] ^

[*javac*] *
F:\work\myprojects\Strutsspro1\WEB-INF\src\java\example\Login.java*:28:
cannot find symbol

[*javac*] symbol : variable INPUT

[*javac*] location: class example.Login

[*javac*] if (isInvalid(getUsername())) return INPUT;

[*javac*] ^

[*javac*] *
F:\work\myprojects\Strutsspro1\WEB-INF\src\java\example\Login.java*:30:
cannot find symbol

[*javac*] symbol : variable INPUT

[*javac*] location: class example.Login

[*javac*] if (isInvalid(getPassword())) return INPUT;

[*javac*] ^

[*javac*] *
F:\work\myprojects\Strutsspro1\WEB-INF\src\java\example\Login.java*:32:
cannot find symbol

[*javac*] symbol : variable SUCCESS

[*javac*] location: class example.Login

[*javac*] return SUCCESS;

[*javac*] ^

[*javac*] 7 errors
is comming

please suggest me the correction
--
Thanks& Regards

Swathi

Attachment: user_205004.ezm (zipped)
Make sure your struts JAR is in the Classpath of your project.




________________________________
From: swathi reddy <swathi23.reddy@(protected)>
To: Struts Users Mailing List <user@(protected)>
Sent: Wed, February 10, 2010 6:07:38 AM
Subject: package com.opensymphony.xwork2 does not exist

Hi

when i taken struts2blank2.0.14 files in and compiled no problem is showing
but when i tried to deploy then the

[*javac*] Compiling 3 source files to F:\work\myprojects\Strutsspro1\WEB-INF

[*javac*] *
F:\work\myprojects\Strutsspro1\WEB-INF\src\java\example\ExampleSupport.java*:24:
package com.opensymphony.xwork2 does not exist

[*javac*] import com.opensymphony.xwork2.ActionSupport;

[*javac*] ^

[*javac*] *
F:\work\myprojects\Strutsspro1\WEB-INF\src\java\example\ExampleSupport.java*:29:
cannot find symbol

[*javac*] symbol: class ActionSupport

[*javac*] public class ExampleSupport extends ActionSupport {

[*javac*] ^

[*javac*] *
F:\work\myprojects\Strutsspro1\WEB-INF\src\java\example\HelloWorld.java*:30:
cannot find symbol

[*javac*] symbol : method getText(java.lang.String)

[*javac*] location: class example.HelloWorld

[*javac*] setMessage(getText(MESSAGE));

[*javac*] ^

[*javac*] *
F:\work\myprojects\Strutsspro1\WEB-INF\src\java\example\HelloWorld.java*:31:
cannot find symbol

[*javac*] symbol : variable SUCCESS

[*javac*] location: class example.HelloWorld

[*javac*] return SUCCESS;

[*javac*] ^

[*javac*] *
F:\work\myprojects\Strutsspro1\WEB-INF\src\java\example\Login.java*:28:
cannot find symbol

[*javac*] symbol : variable INPUT

[*javac*] location: class example.Login

[*javac*] if (isInvalid(getUsername())) return INPUT;

[*javac*] ^

[*javac*] *
F:\work\myprojects\Strutsspro1\WEB-INF\src\java\example\Login.java*:30:
cannot find symbol

[*javac*] symbol : variable INPUT

[*javac*] location: class example.Login

[*javac*] if (isInvalid(getPassword())) return INPUT;

[*javac*] ^

[*javac*] *
F:\work\myprojects\Strutsspro1\WEB-INF\src\java\example\Login.java*:32:
cannot find symbol

[*javac*] symbol : variable SUCCESS

[*javac*] location: class example.Login

[*javac*] return SUCCESS;

[*javac*] ^

[*javac*] 7 errors
is comming

please suggest me the correction
--
Thanks& Regards

Swathi



   

Attachment: user_205003.ezm (zipped)
Im sory, but the example at http://struts.apache.org/2.1.8.1/docs/optgroup
.html is very simple. Dont have a real example...

But anyway... Im trying to use s:optgroup without success..

Here is how I did without struts tag:

<select name="despesa.projeto.codigo">
<s:iterator value="projetos">
  <s:if test="%{projetoCollection.size > 0}">
   <optgroup label="<s:property value="descricao" />">
    <s:iterator value="projetoCollection">
      <option value="<s:property value="codigo"/>"><s:property
value="descricao"/></option>
    </s:iterator>
   </optgroup>
  </s:if>
</s:iterator>
</select>

And here is how im trying to do:

<s:select name="despesa.projeto.codigo" list="projeto">
<s:optgroup label="%{descricao}" list="projetoCollection" listKey="codigo"
listValue="descricao"/>
</s:select>

But the result I want something like this:

<select name="despesa.projeto.codigo">
<optgroup label="Blabla">
  <option value="53">Blabla</option>
</optgroup>
<optgroup label="IDEALOGIC">
  <option value="3">Assessoria de Comunica&#xE7;&#xE3;o</option>
  <option value="8">Capacita&#xE7;&#xE3;o de Clientes</option>
  <option value="11">Instala&#xE7;&#xE3;o/Manuten&#xE7;&#xE3;o servidor
Idealogic</option>
  <option value="5">Prospec&#xE7;&#xE3;o</option>
  <option value="7">Prova de Conceito</option>
  <option value="2">Rotinas Administrativas</option>
  <option value="6">Visita T&#xE9;cnica</option>
</optgroup>
<optgroup label="OUTROS CLIENTES">
  <option value="31">Blabla</option>
  <option value="24">Blabla</option>
  <option value="51">Blabla</option>
  <option value="23">Blabla</option>
  <option value="30">Blabla</option>
  <option value="25">Blabla</option>
  <option value="32">Blabla</option>
  <option value="50">Blabla</option>
</optgroup>
</select>

Thks.



On Tue, Jan 12, 2010 at 7:39 PM, Gabriel Belingueres
<belingueres@(protected):

> http://struts.apache.org/2.1.8.1/docs/optgroup.html
>
> 2010/1/12 Emi Lu <emilu@(protected)>:
> > Good afternoon,
> >
> > Could someone tell me how struts2 support "optgroup" please?
> >
> > Thanks a lot!
> > --
> > Lu Ying
> >
> >
> > <select>
> > <optgroup label="Australia">
> > <option value ="sydney">Sydney</option>
> > <option value ="melbourne">Melbourne</option>
> > </optgroup>
> > <optgroup label="New Zealand">
> > <option value ="cromwell">Cromwell</option>
> > <option value ="queenstown">Queenstown</option>
> > </optgroup>
> > </select>
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@(protected)
> > For additional commands, e-mail: user-help@(protected)
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>


--
Felipe A. Lorenz
Idealogic Software
http://www.idealogic.com.br

Attachment: user_205005.ezm (zipped)
Hi,

does Struts2 has a problem using own converters on nested beans? I
created a file with <ActionName>-conversion.properties with following
content:
order.orderPart.property=de.eposcat.xyz.converter.MyOwnConverter

When the action is running the converter is not called (sysout for
testing on both convert methods, but does not come to the console).

Some testing has shown that
order.property=de.eposcat.xyz.converter.MyOwnConverter
is working.

Can you explain this behaviour, because this from my point of view very
annoying :-(.

Kind regards,
Michael Obster


Attachment: user_205006.ezm (zipped)
Hi Cimballi,


 Have you tried to set latitude = 0f (in java class) or 0.0 in the
web textfield and then submit the form?

 I debuged the source code and I believe there is a bug in ongl when
handling float value 0,

Of course when the value is not 0f, ognl can handle converition from
string to float quite well.


Frankie


Cimballi 写道:
> I have a working case with this declaration :
> private Float latitude; and getXxx setXxx.
>
> And in the JSP : <s:textfield key="latitude" />
>
> Using Struts 2.1.8.1
>
> Cimballi
>
>
> 2010/2/9 BlackKnight <wwwwar3com@(protected)>:
>  
>> Hi,
>>
>> Just curious,
>>
>> Lib Version:
>> ognl 2.6.11/Struts2.1.6,
>>
>> Initial setting:
>> I have a float variable utm1 in my java model class, the initial value
>> is set to to 0f,
>>
>> Problem Desc:
>> when submitting the form, struts2 throw a error something like "can't
>> find the setter methods SetUtm1(String)".
>>
>> Debug and trace info:
>> After the submitting, struts2 call ognl to set value of utm1, first ognl
>> look up for a converter to convert the para type(String) to the java
>> class type(Java.lang. float). However, there isn't any converter handle
>> such kind of convertion. So the ognl try to treat the para as a string
>> and apply the SetUtm1(String) methods.
>>
>> Question:
>> Is it true that ognl didn't handle convertion from string to float? How
>> do you guys handle float variable in struts2 form?
>>
>> Any comments? Thanks
>>
>>
>> Frank
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>> For additional commands, e-mail: user-help@(protected)
>>
>>
>>  
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>
>  



Attachment: user_205007.ezm (zipped)
Frankie, here it works also with "0.0" entered in the UI.

Cimballi


On Wed, Feb 10, 2010 at 11:32 AM, BlackKnight <wwwwar3com@(protected):
> Hi Cimballi,
>
>
>  Have you tried to set latitude = 0f (in java class) or  0.0 in the web
> textfield and then submit the form?
>
>  I debuged the source code and I believe there is a bug in ongl when
> handling float value 0,
>
>  Of course when the value is not 0f, ognl can handle converition from string
> to float quite well.
>
>
> Frankie
>
>
> Cimballi 写道:
>>
>> I have a working case with this declaration :
>> private Float latitude; and getXxx setXxx.
>>
>> And in the JSP : <s:textfield key="latitude" />
>>
>> Using Struts 2.1.8.1
>>
>> Cimballi
>>
>>
>> 2010/2/9 BlackKnight <wwwwar3com@(protected)>:
>>
>>>
>>> Hi,
>>>
>>> Just curious,
>>>
>>> Lib Version:
>>> ognl 2.6.11/Struts2.1.6,
>>>
>>> Initial setting:
>>> I have a float variable utm1 in my java model class, the initial value
>>> is set to to 0f,
>>>
>>> Problem Desc:
>>> when submitting the form, struts2 throw a error something like "can't
>>> find the setter methods SetUtm1(String)".
>>>
>>> Debug and trace info:
>>> After the submitting, struts2 call ognl to set value of utm1, first ognl
>>> look up for a converter to convert the para type(String) to the java
>>> class type(Java.lang. float). However, there isn't any converter handle
>>> such kind of convertion. So the ognl try to treat the para as a string
>>> and apply the SetUtm1(String) methods.
>>>
>>> Question:
>>> Is it true that ognl didn't handle convertion from string to float? How
>>> do you guys handle float variable in struts2 form?
>>>
>>> Any comments? Thanks
>>>
>>>
>>> Frank
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>>> For additional commands, e-mail: user-help@(protected)
>>>
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>> For additional commands, e-mail: user-help@(protected)
>>
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>


Attachment: user_205008.ezm (zipped)
Hi, Cimballi,

    I find it out, it's a bug of xwork 2.1.2, not ognl~~.

    The converstion failed in xwork2,

    Acctually , xwork guys has already noticed this and have it
fixed since xwork2.1.3.

    Xwork2.1.3. Changlong :
http://jira.opensymphony.com/secure/ReleaseNote.jspa?projectId=10050&styleName=Html&version=21790
<http://jira.opensymphony.com/secure/ReleaseNote.jspa?projectId=10050&styleName=Html&version=21790>

       [XW-677 <http://jira.opensymphony.com/browse/XW-677>] -
double/float parameters not converted when <= 0

  Struts2.1.8 is using xwork 2.1.6 so it didn't have this problem in
dealing with 0.0:-)



Frankie

Cimballi 写道:
> Frankie, here it works also with "0.0" entered in the UI.
>
> Cimballi
>
>
> On Wed, Feb 10, 2010 at 11:32 AM, BlackKnight <wwwwar3com@(protected):
>  
>> Hi Cimballi,
>>
>>
>> Have you tried to set latitude = 0f (in java class) or 0.0 in the web
>> textfield and then submit the form?
>>
>> I debuged the source code and I believe there is a bug in ongl when
>> handling float value 0,
>>
>> Of course when the value is not 0f, ognl can handle converition from string
>> to float quite well.
>>
>>
>> Frankie
>>
>>
>> Cimballi 写道:
>>  
>>> I have a working case with this declaration :
>>> private Float latitude; and getXxx setXxx.
>>>
>>> And in the JSP : <s:textfield key="latitude" />
>>>
>>> Using Struts 2.1.8.1
>>>
>>> Cimballi
>>>
>>>
>>> 2010/2/9 BlackKnight <wwwwar3com@(protected)>:
>>>
>>>    
>>>> Hi,
>>>>
>>>> Just curious,
>>>>
>>>> Lib Version:
>>>> ognl 2.6.11/Struts2.1.6,
>>>>
>>>> Initial setting:
>>>> I have a float variable utm1 in my java model class, the initial value
>>>> is set to to 0f,
>>>>
>>>> Problem Desc:
>>>> when submitting the form, struts2 throw a error something like "can't
>>>> find the setter methods SetUtm1(String)".
>>>>
>>>> Debug and trace info:
>>>> After the submitting, struts2 call ognl to set value of utm1, first ognl
>>>> look up for a converter to convert the para type(String) to the java
>>>> class type(Java.lang. float). However, there isn't any converter handle
>>>> such kind of convertion. So the ognl try to treat the para as a string
>>>> and apply the SetUtm1(String) methods.
>>>>
>>>> Question:
>>>> Is it true that ognl didn't handle convertion from string to float? How
>>>> do you guys handle float variable in struts2 form?
>>>>
>>>> Any comments? Thanks
>>>>
>>>>
>>>> Frank
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>>>> For additional commands, e-mail: user-help@(protected)
>>>>
>>>>
>>>>
>>>>      
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>>> For additional commands, e-mail: user-help@(protected)
>>>
>>>
>>>
>>>    
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>> For additional commands, e-mail: user-help@(protected)
>>
>>
>>  
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>
>  



Attachment: user_205009.ezm (zipped)
Hi all,
here's my problem. How do I make S2 read property files from separate folder.
We have different properties for prod, uat and so on ... so we want the have
separate folder which will contain different set of files for each environment.

in S1 we used to have two source folders one for java files and second for all properties.
I tried same thing here and I can't make it work or maybe it is not even supported.Any ideas?

Peter.



©2008 gg3721.com - Jax Systems, LLC, U.S.A.