Struts2 rest plugin, spring integration

2009-03-04 Thread mahanare

Hi,

Is there any specific set of instructions to be followed to do the spring
integration with struts2 rest plugin?

Please do let me know.

-- 
View this message in context: 
http://www.nabble.com/Struts2-rest-plugin%2C-spring-integration-tp22346177p22346177.html
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



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

2009-03-04 Thread markbeek


I have a Struts2 action with a double property called "amount". No
validation rules on the action as yet.

When I enter "0.0" into the amount on the JSP page, it displays an "Invalid
field value for field "amount"" error.
---

I've encountered the same behavior.

I've traced it to the isInRange method of an XWork class called
com.opensymphony.xwork2.conversion.impl.XWorkBasicConverter. The isInRange
method returns false (ultimately causing an exception to be thrown) if the
double value is less than an infinitesimally tiny positive number. Since
zero is less than this number, it is not accepted as a legitimate value for
a double.

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?

Thanks

-- 
View this message in context: 
http://www.nabble.com/Struts-2-Type-conversion-refuses-0.0-for-a-double--tp21738188p22345989.html
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Struts2 rest plugin - making default response to xml

2009-03-04 Thread mahanare

Hi,

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 to have any JSPs
or html files in my web application. It will be a plain rest based services
which process forms and respond with xml.

Thanks in advance

Thanks
harinath

-- 
View this message in context: 
http://www.nabble.com/Struts2-rest-plugin---making-default-response-to-xml-tp22345042p22345042.html
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



RE: Possible to return ibatis query in xml file?

2009-03-04 Thread Martin Gainty

--you can with oracle so instead of coding this simple statement in 
ibatis_query.xml

 select * from a


--put in this PL/SQL in ibatis_query.xml:


DECLARE
 ctxdbms_xmlgen.ctxHandle;
 xmlCLOB;  --Character Large Object (>64k of character string)
 i  PLS_INTEGER;
BEGIN
  ctx := dbms_xmlgen.newContext('SELECT * FROM A);
  xml := dbms_xmlgen.getXML(ctx);
  DBMS_OUTPUT.PUT_LINE(xml);
  i := dbms_xmlgen.getNumRowsProcessed(ctx);
  dbms_output.put_line(TO_CHAR(i));
END;


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 confidential nature and Sender does not 
endorse distribution to any party other than intended recipient. Sender does 
not necessarily endorse content contained within this transmission. 




> Date: Wed, 4 Mar 2009 23:14:16 -0200
> Subject: Re: Possible to return ibatis query in xml file?
> From: hgonza...@gmail.com
> To: user@struts.apache.org
> 
> If I understand right, the answer is no (and the question is not
> related to struts, but only to ibatis).
> You can't get (AFAIK) the sql generated/executed by ibatis, and there
> are good reasons for that.
> If you are debugging some sql problem, your database should allow you
> to turn on full logging
> of your sql queries.
> 
> Hernán J. González
> http://hjg.com.ar/
> 
> On Wed, Mar 4, 2009 at 4:46 PM, Emi Lu  wrote:
> > Good morning,
> >
> > I have a question based on ibatis + struts. Would it be possible that in
> > java code, I could get the query in ibatis.
> >
> > For example, in ibatis_query.xml
> > 
> > select * from a
> > 
> >
> >
> > In java,
> > ===
> >   public ActionForward execute(
> >  ActionMapping mapping,
> >  ActionForm aform,
> >  HttpServletRequest request,
> >  HttpServletResponse response)
> >   throws Exception
> >   {
> >  String ibatis_sql = ***(something need to know).getQuery("test", null);
> >... ...
> >   }
> >
> >
> > Thanks a lot!
> > Lu Ying
> >
> >
> >
> >
> >
> >
> > -
> > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> > For additional commands, e-mail: user-h...@struts.apache.org
> >
> >
> 
> 
> 
> --
> 
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
> 

_
Windows Live™ Contacts: Organize your contact list. 
http://windowslive.com/connect/post/marcusatmicrosoft.spaces.live.com-Blog-cns!503D1D86EBB2B53C!2285.entry?ocid=TXT_TAGLM_WL_UGC_Contacts_032009

Re: Possible to return ibatis query in xml file?

2009-03-04 Thread hernan gonzalez
If I understand right, the answer is no (and the question is not
related to struts, but only to ibatis).
You can't get (AFAIK) the sql generated/executed by ibatis, and there
are good reasons for that.
If you are debugging some sql problem, your database should allow you
to turn on full logging
of your sql queries.

Hernán J. González
http://hjg.com.ar/

On Wed, Mar 4, 2009 at 4:46 PM, Emi Lu  wrote:
> Good morning,
>
> I have a question based on ibatis + struts. Would it be possible that in
> java code, I could get the query in ibatis.
>
> For example, in ibatis_query.xml
> 
> select * from a
> 
>
>
> In java,
> ===
>   public ActionForward execute(
>      ActionMapping mapping,
>      ActionForm aform,
>      HttpServletRequest request,
>      HttpServletResponse response)
>   throws Exception
>   {
>      String ibatis_sql = ***(something need to know).getQuery("test", null);
>    ... ...
>   }
>
>
> Thanks a lot!
> Lu Ying
>
>
>
>
>
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>



--

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: prepare method not working

2009-03-04 Thread Dave Newton

vhumble wrote:

Is there anything else that I need to do to get prepare method working like
specifically implementing preparable interface.


Are you, or are you not, implementing Preparable? You need to, AFAIK. Is 
there documentation that suggests otherwise?


Dave


-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: Participem da minha vaquinha! - Vakinha.com.br

2009-03-04 Thread Felipe Fraga
Since this is a spam/mistake thread after all to clarify:

Vaquinha (spelled vakinha for some weird marketing thing probably) is
a brazillian portuguese expression.

Someone do a "vaquinha" when they need money for something and wants
their friends to cheap in.

The site, aparently, is an online version of it.

And yes, vaquinha literally means "little cow".

Felipe

On Wed, Mar 4, 2009 at 5:41 AM, Antonio Petrelli
 wrote:
> 2009/3/4 Ronaldo Rigoni :
>> Vakinha.com.br - vaquinhas online
>
> Online little cows? Oh dear, spam is creative :-D
>
> Antonio
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Date time picker

2009-03-04 Thread Zoran Avtarovski
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 and time picker I can use or suggestions on
how to easily combine the dojo date and time picker to combine.

Z.


Re: Propery way to change getText()'s source

2009-03-04 Thread Wes Wannemacher
On Wednesday 04 March 2009 15:52:37 Security Management wrote:
> I would like the getText() methods to pull information from a database
> "Meaning" table.
>
> Would the proper way to do that be to subclass ActionSupport and
> re-implement that interface?  Then, all my actions inherit from
> MyActionSupport, and the getText stuff is different.
>
> If that's not the way to do it, what's the best way?
>

The best way would be to write your code in a class that implements 
TextProvider - 

http://struts.apache.org/2.x/struts2-
core/apidocs/com/opensymphony/xwork2/TextProvider.html

Then, specify your class as the text provider bean in your app.

-Wes

-- 

Wes Wannemacher
Author - Struts 2 In Practice 
Includes coverage of Struts 2.1, Spring, JPA, JQuery, Sitemesh and more
http://www.manning.com/wannemacher


-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: interceptor on pdf

2009-03-04 Thread herreraedgardo
testing the list

Sorry


Re: Problem with default value

2009-03-04 Thread benjamin haimerl

hi i would use
html:optionsCollection if you want to use the "selected=selected" feature

form.jsp:
<%@ page language="java" pageEncoding="UTF-8"%>
<%...@page import="java.util.ArrayList"%>
<%...@page import="java.util.Collection"%>
<%...@page import="java.util.Vector"%>
<%...@page import="org.apache.struts.util.LabelValueBean"%>
<%@ taglib uri="http://struts.apache.org/tags-bean"; prefix="bean"%>
<%@ taglib uri="http://struts.apache.org/tags-html"; prefix="html"%>


   
   JSP for TestNameForm form
   
   
   <%
   Collection myList = new Vector();
   for(int i=0;i<20;i++) {
   myList.add(new LabelValueBean("label"+i, i+"value"));
   }
   pageContext.setAttribute("myList", myList);
%>
   
   name : 
   label="label"/>

   
   
   
   


*HTML-Output:*

 
	

JSP for TestNameForm form





name : label0
label1
label2
label3
label4
label5
label6
label7

label8
label9
label10
label11
label12
label13
label14
label15
label16

label17
label18
label19





so its possible to set the default value by the 'value=""' attribute of the 
html:select tag
  ...of course the value must 
match to any of your existing
values... otherwise the first option will be selected by default


I hope this was helpfull		 
Benny



Yves Dessertine wrote:

Hello,

I'm having a problem with  from the struts taglib. The
default option is only selected in the first example (but all 3 lists
are created well in jsp page). I googled a lot, but could't find
similar problem.

My JSP page contains 3 selects:

==
1) Default value selected:





Generated output:
INT1
INT2



==
2) Default value not selected:


">
">
">
">
">



Generated output:
2007
2008
2009
2010
2011

==
3) Default value not selected:

Janvier 
Février 
Mars 
Avril 
Mai 
Juin 
Juillet 
Août 
Septembre 
Octobre 
Novembre 
Décembre 


Generated output:
Janvier 2009
Février 2009
Mars 2009
Avril 2009
Mai 2009
Juin 2009
Juillet 2009
Août 2009
Septembre 2009
Octobre 2009
Novembre 2009
Décembre 2009




The afficheStockIAD.extractIntegrator, afficheStockIAD.extractYear and
afficheStockIAD.extractMonth are filled, and get transfered with the
formbean.

Formbean like this :
private String extractYear;
private String extractIntegrator;
private String extractMonth;

public String getExtractYear() {
return extractYear;
}

public void setExtractYear(String extractYear) {
this.extractYear = extractYear;
}

public String getExtractIntegrator() {
return extractIntegrator;
}

public void setExtractIntegrator(String extractIntegrator) {
this.extractIntegrator = extractIntegrator;
}

public String getExtractMonth() {
return extractMonth;
}

public void setExtractMonth(String extractMonth) {
this.extractMonth = extractMonth;
}


Help, if any ideas.


Regards,


Yves

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org

  



-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



interceptor on pdf

2009-03-04 Thread Gianluca Musella

Hello boys.

Is there something similar interceptors but fired on resources different from 
actions? I need to fire an interceptor before to show a pdf.

If no I must use a Filter.

Thank in advance

Gianluca





Gianluca Musella 
Delivery Manager
 E-Mail: gianluca.muse...@bsc.it
 Mobile: +39 348 1204961

BSC Consulting S.p.A.
via Mentore Maggini 50 
00143 Roma
 Tel.  +39 06.51957867
 Fax. +39 06.51957870 
 http://www.bsc.it
 Please consider the environment before printing  this email 
Le informazioni contenute in questo messaggio di posta elettronica e/o nel/i 
file allegato/i, sono da considerarsi strettamente riservate. Il loro utilizzo 
è consentito  esclusivamente al destinatario del messaggio, per le finalità 
indicate nel messaggio stesso. Qualora riceveste questo messaggio senza esserne 
il destinatario, Vi preghiamo cortesemente di darcene notizia via e-mail e di  
procedere alla distruzione del messaggio stesso, cancellandolo dal Vostro 
sistema; costituisce comportamento contrario ai principi dettati dal Dlgs. 
196/2003  il  trattenere il messaggio stesso, divulgarlo anche in parte, 
distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità diverse.
The information in this e-mail and in any attachments is confidential and may 
be privileged. If you aren’t the intended recipient, please destroy this 
message, delete any copies held on your systems and notify the sender 
immediately. You shouldn’t retain, copy or use this e-mail for any purpose, nor 
disclose all or any part of its content to any other person.  




prepare method not working

2009-03-04 Thread vhumble

Hi,

I am implementing prepare method to populate the values in the list if
validation fails and we need to present the same page back to the user.

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.

Is there anything else that I need to do to get prepare method working like
specifically implementing preparable interface.

Attached are the code snippets.







 
/WEB-INF/jsp/AddTestAccount.jsp
/WEB-INF/jsp/AddTestAccount.jsp
 

/WEB-INF/jsp/companyList.jsp
/WEB-INF/jsp/blank.jsp

Attachment of jsp page: AddTestAccount.jsp
http://www.nabble.com/file/p22339038/AddTestAccount.jsp AddTestAccount.jsp 
Attachment of Action Classes:
http://www.nabble.com/file/p22339038/AddAccount.java AddAccount.java 
http://www.nabble.com/file/p22339038/RefreshCompanyList.java
RefreshCompanyList.java 

Thanks for your help
-- 
View this message in context: 
http://www.nabble.com/prepare-method-not-working-tp22339038p22339038.html
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Propery way to change getText()'s source

2009-03-04 Thread Security Management
I would like the getText() methods to pull information from a database
"Meaning" table.

Would the proper way to do that be to subclass ActionSupport and
re-implement that interface?  Then, all my actions inherit from
MyActionSupport, and the getText stuff is different.

If that's not the way to do it, what's the best way?

Thanks,
Mike.


-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: Getting Servlets and Struts 2.1.6 to work together?

2009-03-04 Thread Dave Newton

Greg Lindholm wrote:

I spent some time in the debugger and found out what 'really' changed was
the default action extensions (struts.action.extension) changed from just
'action' to 'action' plus "" (no extension).  This was causing my "/status"
request with no extension to be treated as an action.

The old (2.0.11) struts default.properties had:
struts.action.extension=action

The new (2.1.6) has:
struts.action.extension=action,,


I'm not quite sure why this happens here instead of in the Convention 
plugin (or maybe it happens both places?) but I'm not convinced the 
default setting is the correct place.



So I still have the question of what is the 'correct' filter mapping for the
struts filter? 


I found the FilterDispatcher javadocs which says:
"IMPORTANT: this filter must be mapped to all requests. Unless you know
exactly what you are doing, always map to this URL pattern: /* "


That recommendation still stands, AFAIK: most people probably aren't 
running mixed systems, and unless they're paying enough attention to 
realize that S2 relies on serving its own CSS/JavaScript/etc. via the 
filter, they shouldn't change the mapping.


Dave

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Possible to return ibatis query in xml file?

2009-03-04 Thread Emi Lu

Good morning,

I have a question based on ibatis + struts. Would it be possible that in 
java code, I could get the query in ibatis.


For example, in ibatis_query.xml

select * from a



In java,
===
   public ActionForward execute(
  ActionMapping mapping,
  ActionForm aform,
  HttpServletRequest request,
  HttpServletResponse response)
   throws Exception
   {
  String ibatis_sql = ***(something need to know).getQuery("test", 
null);

... ...
   }


Thanks a lot!
Lu Ying






-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: Getting Servlets and Struts 2.1.6 to work together?

2009-03-04 Thread Greg Lindholm



Greg Lindholm wrote:
> 
> 
> 
> Wes Wannemacher wrote:
>> 
>> On Tuesday 03 March 2009 14:31:36 Greg Lindholm wrote:
>>> Is this what you mean?
>>>
>>> 
>>> struts2
>>> *.action
>>> 
>>>
>>> I previously had it as /* based on all the
>>> books
>>> and examples I was able to find. So is there no reason to include
>>> everything in the filter?
>>>
>> 
>> I would also map /struts/* 
>> 
>> I noticed today as well that struts was picking up an action I had
>> defined, 
>> even though I had no .action. I think I had seen it before
>> intermittently, but 
>> wasn't able to nail it down. Truthfully, I've been using conventions so
>> long 
>> that it strike me as odd at first. It was only because I was explicitly
>> trying 
>> to take it out of the equation for something I was working on that I
>> noticed. 
>> 
>> -Wes
>> 
>> -- 
>> 
>> Wes Wannemacher
>> Author - Struts 2 In Practice 
>> Includes coverage of Struts 2.1, Spring, JPA, JQuery, Sitemesh and more
>> http://www.manning.com/wannemacher
>> 
>> 
> 
> Why do you recommend mapping '/struts/*' to the struts filter? What uses
> this convention?
> 
> Clearly there has been a change in behavior between 2.0.11  and 2.1.6, I'm
> wondering if this was intentional?  Does the FilterDispatcher now assume
> that ever request it sees must be an action? If so this kind of feels
> wrong for a Filter, I expect filters to handle what they need to and pass
> everything else through to the next layer.
> 
> 
> 

I spent some time in the debugger and found out what 'really' changed was
the default action extensions (struts.action.extension) changed from just
'action' to 'action' plus "" (no extension).  This was causing my "/status"
request with no extension to be treated as an action.

The old (2.0.11) struts default.properties had:
struts.action.extension=action

The new (2.1.6) has:
struts.action.extension=action,,

If I explicitly set the extension back to just 'action' then It works like
it used to and the request goes thru to my servlet.

In my struts.xml I added: 

So I still have the question of what is the 'correct' filter mapping for the
struts filter? 

I found the FilterDispatcher javadocs which says:
"IMPORTANT: this filter must be mapped to all requests. Unless you know
exactly what you are doing, always map to this URL pattern: /* "

I also see that FilterDispatcher has been deprecated, a note in the upgrade
guide would have been nice :).  (I'm going to add what I've found to the
wiki so will include a note.)

 



-- 
View this message in context: 
http://www.nabble.com/Getting-Servlets-and-Struts-2.1.6-to-work-together--tp22315139p22336289.html
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Problem with default value

2009-03-04 Thread Yves Dessertine
Hello,

I'm having a problem with  from the struts taglib. The
default option is only selected in the first example (but all 3 lists
are created well in jsp page). I googled a lot, but could't find
similar problem.

My JSP page contains 3 selects:

==
1) Default value selected:





Generated output:
INT1
INT2



==
2) Default value not selected:


">
">
">
">
">



Generated output:
2007
2008
2009
2010
2011

==
3) Default value not selected:

Janvier 
Février 
Mars 
Avril 
Mai 
Juin 
Juillet 
Août 
Septembre 
Octobre 
Novembre 
Décembre 


Generated output:
Janvier 2009
Février 2009
Mars 2009
Avril 2009
Mai 2009
Juin 2009
Juillet 2009
Août 2009
Septembre 2009
Octobre 2009
Novembre 2009
Décembre 2009




The afficheStockIAD.extractIntegrator, afficheStockIAD.extractYear and
afficheStockIAD.extractMonth are filled, and get transfered with the
formbean.

Formbean like this :
private String extractYear;
private String extractIntegrator;
private String extractMonth;

public String getExtractYear() {
return extractYear;
}

public void setExtractYear(String extractYear) {
this.extractYear = extractYear;
}

public String getExtractIntegrator() {
return extractIntegrator;
}

public void setExtractIntegrator(String extractIntegrator) {
this.extractIntegrator = extractIntegrator;
}

public String getExtractMonth() {
return extractMonth;
}

public void setExtractMonth(String extractMonth) {
this.extractMonth = extractMonth;
}


Help, if any ideas.


Regards,


Yves

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: Retrieving the values from list

2009-03-04 Thread Dave Newton

Martin Gainty wrote:

also as Patrick points out in his comment on Iteration Tags, the '[n]' notation 
refers to a sub-stack beginning at position n
http://struts.apache.org/2.0.14/docs/iterator-tag-examples.html
your reference to fu[bar] 
tries to resolve bar to a number and display what is located at stack position fu[barIntegerValue]


Unless fu is a collection or map. [n] only refers to (stack-n entries) 
when it stands on its own.


Dave


-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: Runtime error while using openEJB3.1

2009-03-04 Thread Dave Newton

http://bancomicsans.com/home.html

vikram.g.by...@accenture.com wrote:

Hi Celinio,

 


Apologies for the delay in responding back.

   

After following the steps mentioned by David Blevins i.e;  
adding


log4j.category.Transaction = warn,TX

to looging.properties file, I was able to invoke the EJB and it is 
working fine now.


 

 

 


Best Regards,

 


Vikram

 




*From:* Fernandes Celinio SGCF [mailto:celinio.fernan...@socgen.com]
*Sent:* Wednesday, January 07, 2009 4:07 PM
*To:* Struts Users Mailing List
*Cc:* Byali, Vikram G.
*Subject:* RE: Runtime error while using openEJB3.1

 


Hi Vikram,

it looks like a JNDI lookup error :

 


DefectBean defectBean = (DefectBean) ctx.lookup("DefectBeanRemote");

 

Check with Open EJB documentation for the correct parameters to add to 
the lookup method, it is specific to each vendor.


Let us know what you find out.

 


It is out of topic though, not Struts related.

 

 




*De :* vikram.g.by...@accenture.com [mailto:vikram.g.by...@accenture.com]
*Envoyé :* mardi 6 janvier 2009 06:21
*À :* user@struts.apache.org
*Objet :* RE: Runtime error while using openEJB3.1

 


Hi Celinio,

 

Please find the snippet attached. 

 


The flow is;

*DefectDelegate **à** DefectBean.createDefect() 
**à** ORADefectDAO.createDefect() (uses the DAOFactory)*


 

Please note that the error is generated when the 
DefectDelegate tries to create the EJB instance and call createDefect().


Also note that the request does not complete and the log 
file grows to enormous size continuousely with the same error (in a 
recurssive way) until we stop the server.


 

The same flow works if we bypass the EJB and invoke the DAO 
with some other means using Java hence the DAO seems to be fine.


 


Appreciate your help in this regard.

 


Best Regards,

 


Vikram

 

 



Accenture - IDC | BANG4 | Bangalore - 560037 | e-mail: 
vikram.g.by...@accenture.com  | 
Office: +91 80 2576 3008 | Mobile: +91 99865 93789 | AOL :vikramgb


 




*From:* Fernandes Celinio SGCF [mailto:celinio.fernan...@socgen.com]
*Sent:* Friday, January 02, 2009 7:44 PM
*To:* Struts Users Mailing List
*Subject:* RE: Runtime error while using openEJB3.1

 


That looks like a parsing error in your method createDefect()

Show us the code for the class defectBean and in particular the method 
defectBean.createDefect();


 


Celinio Fernandes

 

 

 

 




*De :* vikram.g.by...@accenture.com [mailto:vikram.g.by...@accenture.com]
*Envoyé :* vendredi 2 janvier 2009 05:12
*À :* user@struts.apache.org
*Objet :* Runtime error while using openEJB3.1

 


Hi,

   

I am developing an application using Struts 2 (Tiles 2 framework).  
Below are the details of the platform used:


 


Java:  JDK 1.5

Framework: Strtus 2.0 (Tiles 2.0)

EJB Version:  EJB 3.1

Environment:  Windows XP

Server: Tomcat Apache 5.5

 

 

I am getting the following error while invoking a stateful session bean 
from Delegate (client).  We tried both Local & Remote options, but no 
success. We have a all the code deployed in one single server, local 
development setup, Apache Tomcat 5.5 version. Please help.


 

 1) The Local (DefectLocal), Remote (DefectRemote) & Implementation 
(DefectBean) of the Bean are done as per the documentation in open ejb  site


 2) The Delegate (client) code also as per the documentation – snippet below

 


 *

 Properties p = new Properties();

//p.put("java.naming.factory.initial", 
"org.apache.openejb.client.RemoteInitialContextFactory");



p.setProperty(Context.INITIAL_CONTEXT_FACTORY, 
"org.apache.openejb.client.LocalInitialContextFactory");


p.put("java.naming.provider.url", 
"http://127.0.0.1:8080/openejb/ejb";);


// user and pass optional

//p.put("java.naming.security.principal", "myuser");

//p.put("java.naming.security.credentials", 
"mypass");


try {

   

InitialContext ctx = new 
InitialContext(p);


//DefectBean defectBean = 
(DefectBean) ctx.lookup("DefectBeanRemote");


DefectLocal defectBean = 
(DefectLocal) ctx.lookup("DefectBeanLocal");


return defectBean.createDefect();

   


} catch (Exception e) {

 

Re: [s2] Would like to do

2009-03-04 Thread Dave Newton

jeto wrote:



Is it possible do to that or not. Everything I tried yet gives me a false in
the test statement.

Any ideas?


I'd guess it's a string v. char issue, without actually knowing what you 
have in your map:


http://struts.apache.org/2.x/docs/why-wont-the-if-tag-evaluate-a-one-char-string.html

Dave

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: [s2] Would like to do

2009-03-04 Thread Dale Newfield

http://struts.apache.org/2.1.6/docs/why-wont-the-if-tag-evaluate-a-one-char-string.html

-Dale

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: [OT] POM, licenses and dependency trees

2009-03-04 Thread Wes Wannemacher
On Tue, Mar 3, 2009 at 11:20 PM, stanlick  wrote:
>
> Java != C?
>
> I realize the strength and duration of dependencies varies, and I understand
> the issues concerning use vs. redistribution.  This notwithstanding, I am
> looking to satisfy the legal team and this requires collecting the sum of
> licenses from all the dependent archives before anything large or small can
> be adopted into the corporation.  Some people explain away dependencies as
> being only necessary for testing or compiling, thereby resulting in only a
> small list of "real" dependencies.  The legal folks are saying if a
> dependency is necessary for any phase in the life cycle,

Who's lifecycle? What if I told you that during compile-time, I would
like to use Rational Rose? Will your legal team think that you need to
purchase a license for it? Or, the fact that we use Bamboo and JIRA
during the dev lifecycle. They are proprietary licenses from
Atlassian. You don't need to be licensed on them to use struts. I hate
to use the old car analogy, but you don't indemnify yourself against
any of Ford's patents just because you drive a car.

You really can go too far digging into it. The pom.xml includes things
_we_ use to _write_ the software, you as a user should only be
concerned with _your_ application's lifecycle. If their concern for
dependencies is recursive, how far down the rabbit hole will you go?
Struts depends on Java, which depends on OS, which depends on binary
blobs to control hardware which was designed most likely using CAD
software which runs on an OS which depends (ad nauseum)...

I do understand though that they want to review licenses, but I think
we'll have to agree to disagree as to the level of review required.
Anyhow, I would also suggest pointing them to the OSI website
(http://www.opensource.org/licenses/category). They are about as much
of a governing body as you can get. Licenses are not considered "Open
Source" unless they are approved by the OSI.

> they need to
> inspect the respective licenses.  The procedure today is tedious and manual
> and I am looking for a mechanical solution.  FOSSology appears to do a nice
> job of scraping anything that resembles a license; I am trying to build a
> dependency tree of jars to feed the FOSSology sniffer.
>
> Ideally, I will give the script the three key Maven elements and it will
> cache out a tree.
>
> Peace,
> Scott
>
>
>
>
> Wes Wannemacher wrote:
>>
>> On Tuesday 03 March 2009 15:40:43 stanlick wrote:
>>> If you look at the POM for Struts 2.1.6 there are many more dependencies
>>> than what show up running
>>> dependency:resolve.  I verifies the default for scope because several of
>>> the dependencies are "test."   It appears the default is all scopes, so I
>>> am wondering why I don't see them all when I run dependency:resolve.
>>>
>>
>> There are a few things to keep in mind here Scott, Java is not like C. If
>> you
>> have a compiled binary, the executable is linked to it's required
>> libraries,
>> whether you use them or not. Then, if you try to run the executable and
>> one of
>> the libraries is not available, the program will crash. In Java, there is
>> a
>> difference between compile-time and run-time dependencies. Java programs
>> will
>> only seek out it's required classes when they are used. Because of this
>> behavior, libraries like Struts typically have many compile-time and unit-
>> test-time dependencies that do not need to be satisfied at run-time. If
>> you
>> are using struts2-core w/o any plugins, the list of dependencies is
>> (purposely) small. Add the spring plugin and the dependencies grow, add
>> hibernate, etc. etc.
>>
>> On licensing, it is messy, but here are a few thoughts -
>>
>> 1. Nearly all of the (F)(L)OSS licenses are more concerned with
>> distribution
>> than usage. I've used GPL licensed software in many commercial projects,
>> but
>> the software was used, rather than distributed. This is perfectly
>> acceptable,
>> you only have to become concerned when you want to distribute (i.e. sell)
>> the
>> software. Since we are mostly web-app developers, we are generally writing
>> software that our customers use, but we are rarely concerned about the
>> distribution of the software.
>>
>> 2. To keep things straight, there are different families of license. Most
>> OSS
>> licenses fall into one of only a few categories. There is the GPL which
>> basically states that if you plan to use it in a distributable project,
>> you
>> need to plan on making your source GPL licensed as well. The ASF style
>> license
>> is much less restrictive, IMO, this is why you often see things like
>> Apache
>> HTTPD distributed with commercially licensed software like Solaris. The
>> Apache
>> license really only has a few requirements... You have to include a copy
>> of
>> the Apache license if you distribute Apache licensed software, you can't
>> use
>> the Apache trademarks, you have to attribute apache -
>>
>> http://www.apache.org/foundation/licence

Re: Struts2, file tag, setting value

2009-03-04 Thread Nils-Helge Garli Hegvik
Hi!

I believe setting the path of a file input is prohibited for security
reasons, so that probably won't work.

Nils-H

On Wed, Mar 4, 2009 at 2:53 PM, Mageshwaran  wrote:
> Hi All,
>   I am using * *tag for uploading a
> file in JSP.
>
> Is there any *value attribute* for this tag?
> If present, is it possible set a default value  to this tag so that this
> file path is set on loading the page first time.
>
> Thanks in advance,
> Magesh.
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



RE: Retrieving the values from list

2009-03-04 Thread Martin Gainty

Not understanding why you would not to display #session.sessionListDefects
http://struts.apache.org/2.0.14/docs/accessing-application-session-request-objects.html

also as Patrick points out in his comment on Iteration Tags, the '[n]' notation 
refers to a sub-stack beginning at position n
http://struts.apache.org/2.0.14/docs/iterator-tag-examples.html
your reference to fu[bar] 
tries to resolve bar to a number and display what is located at stack position 
fu[barIntegerValue]

does your ActionForm implement SessionAware interface as earlier suggested
implements SessionAware
?
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 confidential nature and Sender does not 
endorse distribution to any party other than intended recipient. Sender does 
not necessarily endorse content contained within this transmission. 




Subject: Retrieving the values from list
Date: Wed, 4 Mar 2009 14:51:40 +0530
From: vikram.g.by...@accenture.com
To: user@struts.apache.org
















Hi,

 

I am setting the
values retrieved from DB into a list “sessionListDefects” in my Action class as 
shown below:

 

try

{

  DefectDelegate defectDelegate = new DefectDelegate();

  sessionListDefects =
defectDelegate.findDefect();

  

  

  for (Iterator iterator = sessionListDefects.iterator();
iterator.hasNext();) {

DefectDTO defectDTO = (DefectDTO)
iterator.next();

System.out.println("defectDTO.getDefectNo : 
"+defectDTO.getDefectNo());

System.out.println("defectDTO.getProject : 
"+defectDTO.getProject());



  }

  

  session.put(WebConstants.SESSION_LIST_DEFECTS, 
sessionListDefects);

 

}

 

 

But
I am not able to print the values from the list using the iterator in JSP:

 













   
   

 

 

Please let me know the right syntax. 

 

Best Regards,

 

Vikram

 


_
Windows Live™ Groups: Create an online spot for your favorite groups to meet.
http://windowslive.com/online/groups?ocid=TXT_TAGLM_WL_groups_032009

Re: Getting Servlets and Struts 2.1.6 to work together?

2009-03-04 Thread Greg Lindholm



Wes Wannemacher wrote:
> 
> On Tuesday 03 March 2009 14:31:36 Greg Lindholm wrote:
>> Is this what you mean?
>>
>>  
>>  struts2
>>  *.action
>>  
>>
>> I previously had it as /* based on all the
>> books
>> and examples I was able to find. So is there no reason to include
>> everything in the filter?
>>
> 
> I would also map /struts/* 
> 
> I noticed today as well that struts was picking up an action I had
> defined, 
> even though I had no .action. I think I had seen it before intermittently,
> but 
> wasn't able to nail it down. Truthfully, I've been using conventions so
> long 
> that it strike me as odd at first. It was only because I was explicitly
> trying 
> to take it out of the equation for something I was working on that I
> noticed. 
> 
> -Wes
> 
> -- 
> 
> Wes Wannemacher
> Author - Struts 2 In Practice 
> Includes coverage of Struts 2.1, Spring, JPA, JQuery, Sitemesh and more
> http://www.manning.com/wannemacher
> 
> 

Why do you recommend mapping '/struts/*' to the struts filter? What uses
this convention?

Clearly there has been a change in behavior between 2.0.11  and 2.1.6, I'm
wondering if this was intentional?  Does the FilterDispatcher now assume
that ever request it sees must be an action? If so this kind of feels wrong
for a Filter, I expect filters to handle what they need to and pass
everything else through to the next layer.



-- 
View this message in context: 
http://www.nabble.com/Getting-Servlets-and-Struts-2.1.6-to-work-together--tp22315139p22330799.html
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Struts2, file tag, setting value

2009-03-04 Thread Mageshwaran

Hi All,
   I am using * *tag for 
uploading a file in JSP.


Is there any *value attribute* for this tag?
If present, is it possible set a default value  to this tag so that this 
file path is set on loading the page first time.


Thanks in advance,
Magesh.

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



[s2] Would like to do

2009-03-04 Thread jeto

Hi,

I would like to do the following




Is it possible do to that or not. Everything I tried yet gives me a false in
the test statement.


Any ideas?


Bye
Hagen
-- 
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-tp22328913p22328913.html
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: How to pass Result dynamic param value while using Annotation to define action

2009-03-04 Thread Lukasz Lenart
2009/3/4 Matt Jiang :
> Do I just use ${expression} as well?

try #expression

http://struts.apache.org/2.1.6/docs/ognl.html


Regards
-- 
Lukasz
http://www.lenart.org.pl/

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: Struts Ajax Newbie

2009-03-04 Thread konf
  BODY { font-family:Arial, Helvetica, sans-serif;font-size:12px; }Hi,
I relpaced in by javascript instead of ajaxtag, but generated by
ajaxtag:
 new AjaxJspTag.Select(
 {
 baseUrl: "http:///FillCarModels";,
 source: "make",
 onCreate: initProgress,
 onComplete: resetProgress,
 onFailure: reportError,
 target: "model",
 parameters: "make={make}",
 emptyOptionName: "Select model"
 });
 result is then 
 new AjaxJspTag.Select(
 {
 baseUrl: "http://127.0.0.1:8080/cars/FillCarModels";,
 source: "make",
 onCreate: initProgress,
 onComplete: resetProgress,
 onFailure: reportError,
 target: "model",
 parameters: "make={make}",
 emptyOptionName: "Select model"
 });
 then, form contains:
 Značka:
 --
 Škoda
 Hyunday
 Kia
 Toyota
 Model
 Select model
 Still not working ...
 On Tue 03/03/09 14:45 , Mileidys Gonzalez Prieto
mileidys.gonza...@i-frontier.net sent:
  baseUrl: "${contextPath}/FillCarModels", 
 for me looks like the url is not the real url... can y send the
piece of
 code where u call the ajaxtags?
 On Tue, 2009-03-03 at 10:37 +0100, k...@chalu.cz [1] wrote:
 > BODY { font-family:Arial, Helvetica, sans-serif;font-size:12px;
 > }Hallo, it is not really for this forum, but thread is already
here.
 >  I have following problem with ajaxtags, described in ajaxtags
forum,
 > but maybe it is not visited often. For javascript sources and
function
 > - it is the same if it is included in html head or body.
 >  I have form in included tiles template, which has:  
 > ${pageContext.request.contextPath} 
 >  Značka: 
 >  -- 
 >  Škoda 
 >  Hyunday 
 >  Kia 
 >  Toyota 
 >  Select model 
 >  ... 
 >  /cars/FillCarModel returns XML file with models for make. 
 >  But using this not works, base URL is not called (there is some
log
 > messages, which are not in log). If I will use hard codded path to
 > baseUrl, then init method of this servlet is called, but neither
 > doGet or doPost. 
 >  In html is generated to: 
 >  new AjaxJspTag.Select( 
 >  { 
 >  baseUrl: "${contextPath}/FillCarModels", 
 >  source: "make", 
 >  onCreate: initProgress, 
 >  onComplete: resetProgress, 
 >  onFailure: reportError, 
 >  target: "model", 
 >  parameters: "make={make}", 
 >  emptyOptionName: "Select model" 
 >  }); 
 >  Where can be problem? looks that something is not initialized ...

 >   Thanks, Jiri
 >  On Mon 02/03/09 02:47 , Mileidys Gonzalez Prieto
 > mileidys.gonza...@i-frontier.net [2] sent:
 >  Well, for to do actions like that in my code I'm using AjaxTags.
 >  http://ajaxtags.sourceforge.net/
 >  Is really easy to use...
 >  On Sun, 2009-03-01 at 15:47 -0800, chumbobumbo wrote:
 >  > This is probably so basic - I'll put my flame proof suit just
in
 > case.
 >  > 
 >  > I have a 2 combos and (yes ;-) I would like the second one to
be
 > loaded
 >  > depending on what's been chosen in the first one, so in my
action
 > execute
 >  > method I have:
 >  > 
 >  >  model.setList(service.getData1());
 >  > 
 >  > my struts.xml looks like this (note that I am using spring and
I
 > am hitting
 >  > the same action 'class' (demoAction):
 >  > 
 >  >
 >  > method="execute">
 >  >  jsp/output.jsp
 >  >  jsp/error.jsp
 >  >  
 >  >  
 >  >  jsp/second.jsp
 >  >  jsp/error.jsp
 >  >  
 >  > 
 >  > in my output jsp I have:
 >  > 
 >  > .
 >  > 
 >  > 
 >  > listValue="entry.desc"  name="selection.listCode"
 >  > onchange="javascript:load_second_list();return
 >  > false;">
 >  >  
 >  > 
 >  >  
 >  >  
 >  >  
 >  > 
 >  > theme="ajax"
 >  > listenTopics="load_second_list" formId="demo"/>
 >  >  
 >  >  
 >  > 
 >  > that's all fine and dandy, but when I call loadSecond.action I
 > find that my
 >  > model is re-initialised anew (i.e. as the action is marked
 > 'prototype' in
 >  > spring config, the data for the first combo is no longer there)

 >  > 
 >  > obviously I need data in the 1st combo to be available in the
 > resulting
 >  > page, as the user should be allowed to change the first
selection
 > (that
 >  > would in turn relaod the second combo again). 
 >  > 
 >  > Is there a way to serialize/cache the data that was retrieved
in
 > the first
 >  > call so that it is available in the subsequent call other than
 > putting it in
 >  > the session?
 >  > 
 >  > Thanks,
 >  > 
 >  > 99-L Blue 
 > 
 >
-
 >  To unsubscribe, e-mail: user-unsubscr...@struts.apache.org [3]
[1]
 >  For additional commands, e-mail: user-h...@struts.apache.org [4]
[2]
 > 
 > 
 > Links:
 > --
 > [1] user-unsubscr...@struts.apache.org [5]
 > [2] user-h...@struts.apache.org [6]

-
 To unsubscribe, e-mail: user-unsubscr...@struts.apache.org [7]
 For additional commands, e-mail: user-h...@struts.apache.org [8]


Links:
--
[1] mailto:k...@chalu.cz
[2] mailto:mileidys.gonza...@i-frontier.net
[3] mailto:user-unsubscr...@st

Ajax functinality works but how to pass parameter to the request ?

2009-03-04 Thread sajidbigler


Hi Friends,

I tried to check whether the user is available or not by using ajax
funtionality as shown below

In action i get parameter "id" but not "username" and i want a event to be
fired onblur to a testfield and using the textfield data i want to check
availability if the user does't exists in database then i want him to go to
next field to do entry and if the user exists in database then i need to
restrict him by asking him to select another username by clearing the
textfield.please help me to accomplish this





   
   
   dojo.event.topic.subscribe("/after", function(data, request, widget){
  alert('inside a topic event. after request');
  //data : text returned from request
  //request: XMLHttpRequest object
  //widget: widget that published the topic
   });





 






public class AjaxTestForUserNameAvailability   extends ActionSupport{
private String username;
   private boolean exist;
public String execute(){
if(this.getUsername().equals("Admin")){
this.setExist(true);
   }
  else{
   this.setExist(false);
   }
return SUCCESS;
}

 }
-- 
View this message in context: 
http://www.nabble.com/Ajax-functinality-works-but-how-to-pass-parameter-to-the-request---tp22326366p22326366.html
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Retrieving the values from list

2009-03-04 Thread vikram.g.byali
Hi,

 

I am setting the values retrieved from DB into a list
"sessionListDefects" in my Action class as shown below:

 

try

{

  DefectDelegate defectDelegate = new DefectDelegate();

  sessionListDefects = defectDelegate.findDefect();

  

  

  for (Iterator iterator = sessionListDefects.iterator();
iterator.hasNext();) {

DefectDTO defectDTO = (DefectDTO) iterator.next();

System.out.println("defectDTO.getDefectNo :
"+defectDTO.getDefectNo());

System.out.println("defectDTO.getProject :
"+defectDTO.getProject());



  }

  

  session.put(WebConstants.SESSION_LIST_DEFECTS,
sessionListDefects);

 

}

 

 

But I am not able to print the values from the list using the
iterator in JSP:

 





 


 







 

 

Please let me know the right syntax. 

 

Best Regards,

 

Vikram

 



smime.p7s
Description: S/MIME cryptographic signature


How to pass Result dynamic param value while using Annotation to define action

2009-03-04 Thread Matt Jiang
Hi guys,

As you can see example in http://cwiki.apache.org/WW/convention-plugin.html
You can pass static parameters to Results.
The example shows below is static String, but if I would like to use dynamic
value, such as getting value from Action. How do I write it?
Do I just use ${expression} as well?

public class HelloWorld extends ActionSupport {
  @Action(value="/different/url",
result...@result(name="success", type="httpheader",
params={"status", "500", "errorMessage", "Internal Error"})}

  )
  public String execute() {
return SUCCESS;
  }
}

thanks a lot,
Matt


Re: Participem da minha vaquinha! - Vakinha.com.br

2009-03-04 Thread Antonio Petrelli
2009/3/4 Ronaldo Rigoni :
> Vakinha.com.br - vaquinhas online

Online little cows? Oh dear, spam is creative :-D

Antonio

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: [OT] Struts/Hibernate Open Session in View

2009-03-04 Thread Antonio Petrelli
2009/3/3 Burton Rhodes :
> Has anyone had issues with the scalability of hibernate's recommended
> OSiV pattern?  I am upgrading my struts app from 5 users to handle
> 1000+ users and I am curious if I should avoid this pattern for the
> upgrade. I have heard some have had performance issues but I am not
> sure at what point this becomes an issue.

AFAIK the problem is the double submit: for instance, if an object is
in HTTP session, it might be attached to two Hibernate sessions,
causing an exception.
If you are putting an Hibernate-loaded object, you should detach it
first and reattach when you need to save it.
However, about performances, I don't think it causes a performance
problem, since opening a Hibernate session does not get a connection
immediately (only when needed), it's only a way to ease programming.

Ciao
Antonio

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: [OT] POM, licenses and dependency trees

2009-03-04 Thread Antonio Petrelli
FYI here are the Apache guidelines about licensing of Apache projects:
http://www.apache.org/legal/3party.html

Ciao
Antonio

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org