Re: Query regarding printing and closing Jasper reports in Struts2.5

2024-03-20 Thread Tanveer Alaie
Thank you for your response

On Wed, 20 Mar, 2024, 1:04 pm Nate Kerkhofs,  wrote:

> Hi Tanveer,
>
> This isn't really a struts issue, but I'll answer regardless.
>
> There are security and usability issues related to automatic printing, so
> browsers block JavaScript from printing documents without user interaction.
> You won't be able to print pages automatically, you NEED to have the user
> confirm they want to print it through the browser print dialog. Those
> parameters you pass to the print() function have no effect in modern
> browsers. I'd recommend you open the PDF in the browser's PDF handler so
> the user can choose to click the print button in the browser's PDF handler
> itself.
>
> That said, it is possible to use the "afterprint" event in the browser to
> automatically execute JavaScript code to close the browser window after
> printing.
> https://developer.mozilla.org/en-US/docs/Web/API/Window/afterprint_event
>
> Regards,
>
> Nate Kerkhofs
>
> -Original Message-
> From: Tanveer Alaie 
> Sent: Tuesday, 19 March 2024 08:08
> To: user@struts.apache.org
> Subject: Query regarding printing and closing Jasper reports in Struts2.5
>
> I am facing an issue with printing and closing Jasper reports in my
> Struts2 application. Here's a brief overview of the problem:
>
> Description: In my Struts2 web application, I have a requirement to
> generate Jasper reports and provide an option to print them directly from
> the browser. Additionally, I need to automatically close the browser
> tab/window after the report is printed.
>
> Approach: I have tried implementing this functionality using JavaScript to
> call an action class where I get jasper report print .
>
> *Here's the JavaScript code on button click which call the action *
>
>  var
>
> url="/Ipd/dischargeManagement/bill_print?billNo="+val2+"&admissionId="+val1;
> var popupWin= window.open(url,'Report','menubar, toolbar,
> location=center, directories, status, scrollbars, resizable, dependent,
> width=600, height=400 left=210, top=260');
>
> *struts2 action configuration *
>
>   method="getBillPrint">
> 
> getBillPrint
> 
> 
> application/pdf
> inputStream
>  name="contentDisposition">inline;filename="discharge_bill.pdf"
>  ${contentLength}
> 
>  name="input">/views/DischargeManagement/DischargeBill.jsp
>
> 
> *Action in controller*
>
> public String getBillPrint() throws Exception {
>
> HttpServletResponse response =
> ServletActionContext.getResponse();
> HttpServletRequest request = ServletActionContext.getRequest();
> //Connection con = null;
> Map map = new HashMap();
> Connection con=null;
>
> Session session = null;
> Long admissionId=0l;
> Long billNo=0l;
> String empCode=null;
> String imgPath;
> //String wardName=null;
>System.out.println("formate id==="+dischargeBill.getId());
>
> try {
> if(request.getParameter("admissionId")!=null)
>
>  admissionId=Long.parseLong(request.getParameter("admissionId"));
> if(request.getParameter("billNo")!=null)
>  billNo=Long.parseLong(request.getParameter("billNo"));
> if(request.getParameter("empCode")!=null)
>  empCode=request.getParameter("empCode");
> session = HibernateUtil.getSessionFactory().openSession();
> SessionImpl sessionImpl = (SessionImpl) session;
> con = sessionImpl.connection();
>
>
> String reportPath;
>
> reportPath =
>
> ServletActionContext.getServletContext().getRealPath("/Reports/DischargeBill.jasper");
> imgPath =
> ServletActionContext.getServletContext().getRealPath("/images/logo.jpg");
>
>
> map.put("imgPath", imgPath);
>
> map.put("empCode",empCode);
> map.put("admissionId",admissionId);
> map.put("billNo",billNo);
>
> //System.out.println("sub report
> path==="+ServletActionContext.getServletContext().getRealPath("/Reports").concat("\\"));
>
>
>
> map.put("SUBREPORT_DIR",ServletActionContext.getServletContext().getRealPath("/Reports").concat("\\"));
> //
> map.put("imgPath",ClassLoader.getSystemResourceAsStream("1LOGO.JPG"));
> //map.put(JRParameter.REPORT_FILE_RESOLVER, new
> SimpleFileResolver(reportFile));
> JasperReport jasperReport = (JasperReport)
> JRLoader.loadObjectFromFile(reportPath);
> net.sf.jasperreports.engine.JasperPrint jasperPrint =
> JasperFillManager.fillReport(jasperReport, map, con);
>   //for pdf format
>
>
>
> // Export PDF bytes
> ByteArrayOutputStream byteArrayO

RE: Query regarding printing and closing Jasper reports in Struts2.5

2024-03-20 Thread Nate Kerkhofs
Hi Tanveer,

This isn't really a struts issue, but I'll answer regardless.

There are security and usability issues related to automatic printing, so 
browsers block JavaScript from printing documents without user interaction. You 
won't be able to print pages automatically, you NEED to have the user confirm 
they want to print it through the browser print dialog. Those parameters you 
pass to the print() function have no effect in modern browsers. I'd recommend 
you open the PDF in the browser's PDF handler so the user can choose to click 
the print button in the browser's PDF handler itself.

That said, it is possible to use the "afterprint" event in the browser to 
automatically execute JavaScript code to close the browser window after 
printing. 
https://developer.mozilla.org/en-US/docs/Web/API/Window/afterprint_event

Regards,

Nate Kerkhofs

-Original Message-
From: Tanveer Alaie  
Sent: Tuesday, 19 March 2024 08:08
To: user@struts.apache.org
Subject: Query regarding printing and closing Jasper reports in Struts2.5

I am facing an issue with printing and closing Jasper reports in my Struts2 
application. Here's a brief overview of the problem:

Description: In my Struts2 web application, I have a requirement to generate 
Jasper reports and provide an option to print them directly from the browser. 
Additionally, I need to automatically close the browser tab/window after the 
report is printed.

Approach: I have tried implementing this functionality using JavaScript to call 
an action class where I get jasper report print .

*Here's the JavaScript code on button click which call the action *

 var
url="/Ipd/dischargeManagement/bill_print?billNo="+val2+"&admissionId="+val1;
var popupWin= window.open(url,'Report','menubar, toolbar, 
location=center, directories, status, scrollbars, resizable, dependent, 
width=600, height=400 left=210, top=260');

*struts2 action configuration *

 

getBillPrint


application/pdf
inputStream
inline;filename="discharge_bill.pdf"
 ${contentLength}

/views/DischargeManagement/DischargeBill.jsp


*Action in controller*

public String getBillPrint() throws Exception {

HttpServletResponse response = ServletActionContext.getResponse();
HttpServletRequest request = ServletActionContext.getRequest();
//Connection con = null;
Map map = new HashMap();
Connection con=null;

Session session = null;
Long admissionId=0l;
Long billNo=0l;
String empCode=null;
String imgPath;
//String wardName=null;
   System.out.println("formate id==="+dischargeBill.getId());

try {
if(request.getParameter("admissionId")!=null)

 admissionId=Long.parseLong(request.getParameter("admissionId"));
if(request.getParameter("billNo")!=null)
 billNo=Long.parseLong(request.getParameter("billNo"));
if(request.getParameter("empCode")!=null)
 empCode=request.getParameter("empCode");
session = HibernateUtil.getSessionFactory().openSession();
SessionImpl sessionImpl = (SessionImpl) session;
con = sessionImpl.connection();


String reportPath;

reportPath =
ServletActionContext.getServletContext().getRealPath("/Reports/DischargeBill.jasper");
imgPath =
ServletActionContext.getServletContext().getRealPath("/images/logo.jpg");


map.put("imgPath", imgPath);

map.put("empCode",empCode);
map.put("admissionId",admissionId);
map.put("billNo",billNo);

//System.out.println("sub report 
path==="+ServletActionContext.getServletContext().getRealPath("/Reports").concat("\\"));


map.put("SUBREPORT_DIR",ServletActionContext.getServletContext().getRealPath("/Reports").concat("\\"));
//
map.put("imgPath",ClassLoader.getSystemResourceAsStream("1LOGO.JPG"));
//map.put(JRParameter.REPORT_FILE_RESOLVER, new 
SimpleFileResolver(reportFile));
JasperReport jasperReport = (JasperReport) 
JRLoader.loadObjectFromFile(reportPath);
net.sf.jasperreports.engine.JasperPrint jasperPrint = 
JasperFillManager.fillReport(jasperReport, map, con);
  //for pdf format



// Export PDF bytes
ByteArrayOutputStream byteArrayOutputStream = new 
ByteArrayOutputStream();
JRPdfExporter exporter = new JRPdfExporter();
exporter.setParameter(JRPdfExporterParameter.JASPER_PRINT,
jasperPrint);
exporter.setParameter(JRPdfExporterParameter.OUTPUT_STREAM,
byteArrayOutputStream);
// Add JavaScript code to automatically print the PDF
  

Re: Query regarding Tiles in Struts

2023-03-29 Thread Lukasz Lenart
czw., 30 mar 2023 o 03:12 Yew Hwa Ho  napisał(a):
>
> Hi Lukasz,
>
> May I check when Tiles will be merged into the Struts code base? Is there a
> timeline for that?

There is no exact date but I plan to include this change in incoming
Struts 6.2.0 - yet there is discussion to bring Tiles back to live.


Regards
-- 
Łukasz
+ 48 606 323 122 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: Query regarding Tiles in Struts

2023-03-29 Thread Yew Hwa Ho
Hi Lukasz,

May I check when Tiles will be merged into the Struts code base? Is there a
timeline for that?

Thank you.

Regards,
Yew HWa


Re: Query regarding Tiles in Struts

2022-11-22 Thread Lukasz Lenart
wt., 22 lis 2022 o 11:53 Yew Hwa Ho  napisał(a):
>
> Hi Lukasz,
>
> Thank you for your reply.
>
> In the event that Tiles 3.0.8 in the current versions of Struts has CVE,
> will the Struts team be providing the fixes for the CVE.

Do you refer to that https://devhub.checkmarx.com/cve-details/Cx78f40514-81ff/ ?

If so, this is a vulnerability in a third-party library, which isn't
used by Struts, which means the problem will be automatically
addressed once Tiles gets merged into Struts code base.


Regards
-- 
Łukasz
+ 48 606 323 122 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: Query regarding Tiles in Struts

2022-11-22 Thread Yew Hwa Ho
Hi Lukasz,

Thank you for your reply.

In the event that Tiles 3.0.8 in the current versions of Struts has CVE,
will the Struts team be providing the fixes for the CVE.

Thank you.

Regards,
Yew Hwa


On Tue, Nov 22, 2022 at 4:37 PM Lukasz Lenart 
wrote:

> wt., 22 lis 2022 o 08:30 Yew Hwa Ho  napisał(a):
> > I understand that the Apache Tiles has already retired (
> > https://tiles.apache.org/). However Tiles is still being used in Struts
> > framework (both in version 2 and 6). Can I check if Tiles is currently
> > being maintained by Struts if CVE is found?
>
> We are porting Tiles directly into the Struts Tiles plugin, which
> means we won't be using the Tiles project but our own copy. And if
> CVEs are reported regarding our copy, we will try to address them.
> Yet, this is still work-in-progress and probably will be added in
> Struts 6.2.0 or even in Struts 7.0.0
> https://github.com/apache/struts/pull/608
>
>
> Regards
> --
> Łukasz
> + 48 606 323 122 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: Query regarding Tiles in Struts

2022-11-22 Thread Lukasz Lenart
wt., 22 lis 2022 o 08:30 Yew Hwa Ho  napisał(a):
> I understand that the Apache Tiles has already retired (
> https://tiles.apache.org/). However Tiles is still being used in Struts
> framework (both in version 2 and 6). Can I check if Tiles is currently
> being maintained by Struts if CVE is found?

We are porting Tiles directly into the Struts Tiles plugin, which
means we won't be using the Tiles project but our own copy. And if
CVEs are reported regarding our copy, we will try to address them.
Yet, this is still work-in-progress and probably will be added in
Struts 6.2.0 or even in Struts 7.0.0
https://github.com/apache/struts/pull/608


Regards
-- 
Łukasz
+ 48 606 323 122 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: Query: SOAP Webservices

2010-04-11 Thread dusty

Take a look at using Enunciate with Struts2.


http://enunciate.codehaus.org/
http://docs.codehaus.org/display/ENUNCIATE/A+Rich+Web+service+API+for+Struts+2


-D


jayakumar ala wrote:
> 
> I don't understand why i should look into IBM site.? I am asking with
> respect to struts what i should do if i am going to use AXIS 2 and how i
> can
> expose an action as a service etc..? Not sure how we can do the same in
> struts2
> 
> On Fri, Apr 9, 2010 at 9:06 PM, Juan Chung  wrote:
> 
>> consult IBM office site, you may find the documents( tutorial) you
>> need there. good luck.
>>
>> On Sat, Apr 10, 2010 at 4:39 AM, jayakumar ala 
>> wrote:
>> > Hi All,
>> >  Quick question:
>> >   Did anyone here worked with SOAP webservices for Fileupload using
>> > struts2..? We have the requirement to upload files through SOAP web
>> > services(JAX-WS). I am looking for document on the same... Any help is
>> > appreciated..
>> >
>> > Thanks
>> >
>>
>>
>>
>> --
>> Life is irrational.
>>
>> -
>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>> For additional commands, e-mail: user-h...@struts.apache.org
>>
>>
> 
> 

-- 
View this message in context: 
http://old.nabble.com/Query%3A-SOAP-Webservices-tp28197197p28213309.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: Query: SOAP Webservices

2010-04-10 Thread jayakumar ala
I don't understand why i should look into IBM site.? I am asking with
respect to struts what i should do if i am going to use AXIS 2 and how i can
expose an action as a service etc..? Not sure how we can do the same in
struts2

On Fri, Apr 9, 2010 at 9:06 PM, Juan Chung  wrote:

> consult IBM office site, you may find the documents( tutorial) you
> need there. good luck.
>
> On Sat, Apr 10, 2010 at 4:39 AM, jayakumar ala 
> wrote:
> > Hi All,
> >  Quick question:
> >   Did anyone here worked with SOAP webservices for Fileupload using
> > struts2..? We have the requirement to upload files through SOAP web
> > services(JAX-WS). I am looking for document on the same... Any help is
> > appreciated..
> >
> > Thanks
> >
>
>
>
> --
> Life is irrational.
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>


Re: Query: SOAP Webservices

2010-04-09 Thread Juan Chung
consult IBM office site, you may find the documents( tutorial) you
need there. good luck.

On Sat, Apr 10, 2010 at 4:39 AM, jayakumar ala  wrote:
> Hi All,
>  Quick question:
>   Did anyone here worked with SOAP webservices for Fileupload using
> struts2..? We have the requirement to upload files through SOAP web
> services(JAX-WS). I am looking for document on the same... Any help is
> appreciated..
>
> Thanks
>



-- 
Life is irrational.

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



Re: query regarding Input Validation

2009-11-08 Thread Dave Newton

gaurav nigam wrote:

Do I need to add this interceptor for each action mapping?
Is it possible to have only single entry of this interceptor in the struts.xml ?


Make your own default interceptor stack, but it's already in the 
"defaultStack".


Dave


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



Re: query regarding Input Validation

2009-11-07 Thread gaurav nigam
Thanks for your reply Martin

Few more Queries.

Do I need to add this interceptor for each action mapping?
Is it possible to have only single entry of this interceptor in the struts.xml ?



Thanks & Regards

Gaurav

On Sun, Nov 8, 2009 at 1:56 AM, Martin Gainty  wrote:
>
> this comes from http://struts.apache.org/2.1.8/docs/i18n-interceptor.html
>
>
> For example, using the default parameter name, a request to 
> foo.action?request_locale=en_US, then the
> locale for US English is saved in the user's session and will be used for all 
> future requests.
>
>
>
> Parameters
>
>
> parameterName (optional) - the name of the HTTP request parameter that 
> dictates the locale to switch to and save
> in the session. By default this is request_localeattributeName (optional) - 
> the name of the session key to store the selected locale. By default this is
> WW_TRANS_I18N_LOCALE
>
>
> Extending the Interceptor
>
>
> There are no known extensions points for this interceptor.
>
>
>
> Examples
>
>
> 
>    
>    
>    good_result.ftl
> 
> ### This can be used to set your default locale and encoding scheme in 
> default.properties
> # struts.locale=en_US
> struts.i18n.encoding=UTF-8
>
> hth
> Martin Gainty
> __
> Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
>
> Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
> sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
> oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich 
> dem Austausch von Informationen und entfaltet keine rechtliche 
> Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen 
> wir keine Haftung fuer den Inhalt uebernehmen.
> Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
> destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
> l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci 
> est interdite. Ce message sert à l'information seulement et n'aura pas 
> n'importe quel effet légalement obligatoire. Étant donné que les email 
> peuvent facilement être sujets à la manipulation, nous ne pouvons accepter 
> aucune responsabilité pour le contenu fourni.
>
>
>
>
>> Date: Sat, 7 Nov 2009 21:41:27 +
>> Subject: Re: query regarding Input Validation
>> From: mailgaura...@gmail.com
>> To: user@struts.apache.org
>>
>> Thanks for the reply.
>> getText() method can be useful but only to some extent only as there
>> is no way to provide parameterized  value of locale to getText()
>> method.
>>
>> I can create the new instance of resource bundle with locale as
>> parameter but that would not be a nice workaround...
>>
>> I am expecting there will be some way within the struts 2 existing
>> methods which can be used in such scenario.
>>
>> I looking for solution with the expectation to support i18n functionality.
>>
>>
>> Regards
>>
>> Gaurav
>>
>> On Sat, Nov 7, 2009 at 7:13 PM, Siddiq Syed  wrote:
>> > I never try this , but you can get messages from 
>> > applicationResource.propeties file by doing
>> > getText("")
>> >
>> > http://struts.apache.org/2.0.6/struts2-core/apidocs/com/opensymphony/xwork2/TextProvider.html
>> >
>> > But I am not sure if this is going to work for annotations.
>> >  Regards,
>> > Siddiq
>> > 919-924-9850
>> >
>> >
>> >
>> >
>> > 
>> > From: gaurav nigam 
>> > To: Struts Users Mailing List 
>> > Sent: Sat, November 7, 2009 2:03:41 PM
>> > Subject: Re: query regarding Input Validation
>> >
>> > Hi Siddiq,
>> >
>> > My Question 2 is mentioned below
>> >
>> > i came to know that there is annotation  validation which can be used
>> > and will be invoked per method...as mentioned in this link
>> > http://struts.apache.org/2.0.14/docs/validations-annotation.html
>> >
>> > but here, in need to hard code, my messages which i really want to
>> > avoid it,
>> > "Is there any way to use property file here..."
>> > please provide suggestion on this.
>> >
>> > I have also learned that this annotation validation will not work for
>> > client side validation. Is there any work around for this
>> >
>> >
>> > Regards
>> 

RE: query regarding Input Validation

2009-11-07 Thread Martin Gainty

this comes from http://struts.apache.org/2.1.8/docs/i18n-interceptor.html


For example, using the default parameter name, a request to 
foo.action?request_locale=en_US, then the
locale for US English is saved in the user's session and will be used for all 
future requests.



Parameters


parameterName (optional) - the name of the HTTP request parameter that dictates 
the locale to switch to and save
in the session. By default this is request_localeattributeName (optional) - the 
name of the session key to store the selected locale. By default this is
WW_TRANS_I18N_LOCALE


Extending the Interceptor


There are no known extensions points for this interceptor.



Examples





good_result.ftl

### This can be used to set your default locale and encoding scheme in 
default.properties
# struts.locale=en_US
struts.i18n.encoding=UTF-8

hth
Martin Gainty 
__ 
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
 
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem 
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. 
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung 
fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est 
interdite. Ce message sert à l'information seulement et n'aura pas n'importe 
quel effet légalement obligatoire. Étant donné que les email peuvent facilement 
être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité 
pour le contenu fourni.




> Date: Sat, 7 Nov 2009 21:41:27 +
> Subject: Re: query regarding Input Validation
> From: mailgaura...@gmail.com
> To: user@struts.apache.org
> 
> Thanks for the reply.
> getText() method can be useful but only to some extent only as there
> is no way to provide parameterized  value of locale to getText()
> method.
> 
> I can create the new instance of resource bundle with locale as
> parameter but that would not be a nice workaround...
> 
> I am expecting there will be some way within the struts 2 existing
> methods which can be used in such scenario.
> 
> I looking for solution with the expectation to support i18n functionality.
> 
> 
> Regards
> 
> Gaurav
> 
> On Sat, Nov 7, 2009 at 7:13 PM, Siddiq Syed  wrote:
> > I never try this , but you can get messages from 
> > applicationResource.propeties file by doing
> > getText("")
> >
> > http://struts.apache.org/2.0.6/struts2-core/apidocs/com/opensymphony/xwork2/TextProvider.html
> >
> > But I am not sure if this is going to work for annotations.
> >  Regards,
> > Siddiq
> > 919-924-9850
> >
> >
> >
> >
> > 
> > From: gaurav nigam 
> > To: Struts Users Mailing List 
> > Sent: Sat, November 7, 2009 2:03:41 PM
> > Subject: Re: query regarding Input Validation
> >
> > Hi Siddiq,
> >
> > My Question 2 is mentioned below
> >
> > i came to know that there is annotation  validation which can be used
> > and will be invoked per method...as mentioned in this link
> > http://struts.apache.org/2.0.14/docs/validations-annotation.html
> >
> > but here, in need to hard code, my messages which i really want to
> > avoid it,
> > "Is there any way to use property file here..."
> > please provide suggestion on this.
> >
> > I have also learned that this annotation validation will not work for
> > client side validation. Is there any work around for this
> >
> >
> > Regards
> >
> > Gaurav
> >
> > On Sat, Nov 7, 2009 at 6:54 PM, Siddiq Syed  wrote:
> >>
> >> Please refer the section
> >>
> >> Defining Validation Rules in the below mention link.
> >>
> >> http://docs.huihoo.com/webwork/2.2.6/Validation.html
> >>
> >> -siddiq.
> >>
> >>
> >> Siddiq Syed wrote:
> >>>
> >>>
> >>> From: gaurav nigam 
> >>> To: Struts Users Mailing List 
> >>> Sent: Sat, November 7, 2009 1:21:41 PM
> >>> Subject: Re: query regarding Input Validation
> >>>
> >>> Hi Saddiq,
> >>> -- siddiq
> >>>
> >>> Thanks for your help
> >>> I am not able to u

Re: query regarding Input Validation

2009-11-07 Thread gaurav nigam
Thanks for the reply.
getText() method can be useful but only to some extent only as there
is no way to provide parameterized  value of locale to getText()
method.

I can create the new instance of resource bundle with locale as
parameter but that would not be a nice workaround...

I am expecting there will be some way within the struts 2 existing
methods which can be used in such scenario.

I looking for solution with the expectation to support i18n functionality.


Regards

Gaurav

On Sat, Nov 7, 2009 at 7:13 PM, Siddiq Syed  wrote:
> I never try this , but you can get messages from 
> applicationResource.propeties file by doing
> getText("")
>
> http://struts.apache.org/2.0.6/struts2-core/apidocs/com/opensymphony/xwork2/TextProvider.html
>
> But I am not sure if this is going to work for annotations.
>  Regards,
> Siddiq
> 919-924-9850
>
>
>
>
> 
> From: gaurav nigam 
> To: Struts Users Mailing List 
> Sent: Sat, November 7, 2009 2:03:41 PM
> Subject: Re: query regarding Input Validation
>
> Hi Siddiq,
>
> My Question 2 is mentioned below
>
> i came to know that there is annotation  validation which can be used
> and will be invoked per method...as mentioned in this link
> http://struts.apache.org/2.0.14/docs/validations-annotation.html
>
> but here, in need to hard code, my messages which i really want to
> avoid it,
> "Is there any way to use property file here..."
> please provide suggestion on this.
>
> I have also learned that this annotation validation will not work for
> client side validation. Is there any work around for this
>
>
> Regards
>
> Gaurav
>
> On Sat, Nov 7, 2009 at 6:54 PM, Siddiq Syed  wrote:
>>
>> Please refer the section
>>
>> Defining Validation Rules in the below mention link.
>>
>> http://docs.huihoo.com/webwork/2.2.6/Validation.html
>>
>> -siddiq.
>>
>>
>> Siddiq Syed wrote:
>>>
>>>
>>> From: gaurav nigam 
>>> To: Struts Users Mailing List 
>>> Sent: Sat, November 7, 2009 1:21:41 PM
>>> Subject: Re: query regarding Input Validation
>>>
>>> Hi Saddiq,
>>> -- siddiq
>>>
>>> Thanks for your help
>>> I am not able to understand meaning of below line
>>> You can achive this by creating an separate file for each method
>>> ...do you mean that i should create separate action class for each method
>>> or you mean to say separate validation file for each method of an
>>> action class...
>>>
>>> --- Separate validation file for each action name speicifed in the
>>> struts.xml ,
>>> http://docs.huihoo.com/webwork/2.2.6/Validation.html
>>>
>>>
>>>
>>> By your suggestion, I need to create multiple action mappings in
>>> struts.xml for each of the method of the action class
>>>
>>> Its not with the method of the actin class , its the action name what is
>>> been defined in the strust.xlml
>>> -- For example if you have an action class user
>>> UserAction.java
>>> public class UserAction extends action {
>>>  public String addUser(){
>>>     return success;
>>>     }
>>>     public String modifyUser(){
>>>     return success;
>>>     }
>>> }
>>>
>>> struts.xml
>>> 
>>>     otherjsp.jsp
>>> 
>>>
>>> 
>>>     otherjsp.jsp
>>> 
>>>
>>> Validation files naming convection .
>>>
>>> UserAction-addUser-validation.xml -- when user click on adduser --this
>>> validation file is going to be invoked
>>> UserAction-modifyUser-validation.xml -- when user click on modifyuser --
>>> this validation file is going to be invoked.
>>>
>>> http://docs.huihoo.com/webwork/2.2.6/Validation.html
>>>
>>> Note : this validation files need to be in the same package with action
>>> class.
>>>
>>> Can we avoid this multiple action mappings by wildcard characters.?
>>>
>>> -- Yes we can avoid multiple action mapping.
>>>
>>>
>>> Please suggest your opinion.
>>>
>>> I am also waiting for some reply on Question 2 I have asked on earlier
>>> mail
>>>  Question 2 ?
>>>
>>> Thanks
>>>
>>> Gaurav
>>>
>>> On Sat, Nov 7, 2009 at 6:02 PM, Siddiq Syed  wrote:
>>>> You can achive this by creating an seprate file for each method and add
>>>> the vali

Re: query regarding Input Validation

2009-11-07 Thread Siddiq Syed
I never try this , but you can get messages from applicationResource.propeties 
file by doing 
getText("")

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

But I am not sure if this is going to work for annotations.
 Regards,
Siddiq
919-924-9850 





From: gaurav nigam 
To: Struts Users Mailing List 
Sent: Sat, November 7, 2009 2:03:41 PM
Subject: Re: query regarding Input Validation

Hi Siddiq,

My Question 2 is mentioned below

i came to know that there is annotation  validation which can be used
and will be invoked per method...as mentioned in this link
http://struts.apache.org/2.0.14/docs/validations-annotation.html

but here, in need to hard code, my messages which i really want to
avoid it,
"Is there any way to use property file here..."
please provide suggestion on this.

I have also learned that this annotation validation will not work for
client side validation. Is there any work around for this


Regards

Gaurav

On Sat, Nov 7, 2009 at 6:54 PM, Siddiq Syed  wrote:
>
> Please refer the section
>
> Defining Validation Rules in the below mention link.
>
> http://docs.huihoo.com/webwork/2.2.6/Validation.html
>
> -siddiq.
>
>
> Siddiq Syed wrote:
>>
>>
>> From: gaurav nigam 
>> To: Struts Users Mailing List 
>> Sent: Sat, November 7, 2009 1:21:41 PM
>> Subject: Re: query regarding Input Validation
>>
>> Hi Saddiq,
>> -- siddiq
>>
>> Thanks for your help
>> I am not able to understand meaning of below line
>> You can achive this by creating an separate file for each method
>> ...do you mean that i should create separate action class for each method
>> or you mean to say separate validation file for each method of an
>> action class...
>>
>> --- Separate validation file for each action name speicifed in the
>> struts.xml ,
>> http://docs.huihoo.com/webwork/2.2.6/Validation.html
>>
>>
>>
>> By your suggestion, I need to create multiple action mappings in
>> struts.xml for each of the method of the action class
>>
>> Its not with the method of the actin class , its the action name what is
>> been defined in the strust.xlml
>> -- For example if you have an action class user
>> UserAction.java
>> public class UserAction extends action {
>>  public String addUser(){
>>     return success;
>>     }
>>     public String modifyUser(){
>>     return success;
>>     }
>> }
>>
>> struts.xml
>> 
>>     otherjsp.jsp
>> 
>>
>> 
>>     otherjsp.jsp
>> 
>>
>> Validation files naming convection .
>>
>> UserAction-addUser-validation.xml -- when user click on adduser --this
>> validation file is going to be invoked
>> UserAction-modifyUser-validation.xml -- when user click on modifyuser --
>> this validation file is going to be invoked.
>>
>> http://docs.huihoo.com/webwork/2.2.6/Validation.html
>>
>> Note : this validation files need to be in the same package with action
>> class.
>>
>> Can we avoid this multiple action mappings by wildcard characters.?
>>
>> -- Yes we can avoid multiple action mapping.
>>
>>
>> Please suggest your opinion.
>>
>> I am also waiting for some reply on Question 2 I have asked on earlier
>> mail
>>  Question 2 ?
>>
>> Thanks
>>
>> Gaurav
>>
>> On Sat, Nov 7, 2009 at 6:02 PM, Siddiq Syed  wrote:
>>> You can achive this by creating an seprate file for each method and add
>>> the validation.
>>> When ever the a method from the action class is invoked the corresponding
>>> validation will get invoked.
>>>
>>> actionname-aliasname-validationname.xml
>>>
>>> actinname -- name of your actin class.
>>> aliasname -- name of the action specifed in the strust-xml file.
>>>
>>> 
>>>  validationresult.jsp
>>> 
>>>
>>> name of the validation file for the above mention action will be
>>>
>>> yaction-x-validation.xml -- where you can define the validation and will
>>> be invoke when action x is invoked.
>>>
>>>
>>>  -Siddiq.
>>>
>>>
>>>
>>> 
>>> From: gaurav nigam 
>>> To: Struts Users Mailing List 
>>> Sent: Sat, November 7, 2009 12:14:32 PM
>>> Subject: query regarding Input Validation
>>>
>>> Hi All,
>>>
>>> I have a query regarding input validation.
>>>

Re: query regarding Input Validation

2009-11-07 Thread gaurav nigam
Hi Siddiq,

My Question 2 is mentioned below

 i came to know that there is annotation  validation which can be used
and will be invoked per method...as mentioned in this link
http://struts.apache.org/2.0.14/docs/validations-annotation.html

but here, in need to hard code, my messages which i really want to
avoid it,
"Is there any way to use property file here..."
please provide suggestion on this.

I have also learned that this annotation validation will not work for
client side validation. Is there any work around for this


Regards

Gaurav

On Sat, Nov 7, 2009 at 6:54 PM, Siddiq Syed  wrote:
>
> Please refer the section
>
> Defining Validation Rules in the below mention link.
>
> http://docs.huihoo.com/webwork/2.2.6/Validation.html
>
> -siddiq.
>
>
> Siddiq Syed wrote:
>>
>>
>> From: gaurav nigam 
>> To: Struts Users Mailing List 
>> Sent: Sat, November 7, 2009 1:21:41 PM
>> Subject: Re: query regarding Input Validation
>>
>> Hi Saddiq,
>> -- siddiq
>>
>> Thanks for your help
>> I am not able to understand meaning of below line
>> You can achive this by creating an separate file for each method
>> ...do you mean that i should create separate action class for each method
>> or you mean to say separate validation file for each method of an
>> action class...
>>
>> --- Separate validation file for each action name speicifed in the
>> struts.xml ,
>> http://docs.huihoo.com/webwork/2.2.6/Validation.html
>>
>>
>>
>> By your suggestion, I need to create multiple action mappings in
>> struts.xml for each of the method of the action class
>>
>> Its not with the method of the actin class , its the action name what is
>> been defined in the strust.xlml
>> -- For example if you have an action class user
>> UserAction.java
>> public class UserAction extends action {
>>  public String addUser(){
>>     return success;
>>     }
>>     public String modifyUser(){
>>     return success;
>>     }
>> }
>>
>> struts.xml
>> 
>>     otherjsp.jsp
>> 
>>
>> 
>>     otherjsp.jsp
>> 
>>
>> Validation files naming convection .
>>
>> UserAction-addUser-validation.xml -- when user click on adduser --this
>> validation file is going to be invoked
>> UserAction-modifyUser-validation.xml -- when user click on modifyuser --
>> this validation file is going to be invoked.
>>
>> http://docs.huihoo.com/webwork/2.2.6/Validation.html
>>
>> Note : this validation files need to be in the same package with action
>> class.
>>
>> Can we avoid this multiple action mappings by wildcard characters.?
>>
>> -- Yes we can avoid multiple action mapping.
>>
>>
>> Please suggest your opinion.
>>
>> I am also waiting for some reply on Question 2 I have asked on earlier
>> mail
>>  Question 2 ?
>>
>> Thanks
>>
>> Gaurav
>>
>> On Sat, Nov 7, 2009 at 6:02 PM, Siddiq Syed  wrote:
>>> You can achive this by creating an seprate file for each method and add
>>> the validation.
>>> When ever the a method from the action class is invoked the corresponding
>>> validation will get invoked.
>>>
>>> actionname-aliasname-validationname.xml
>>>
>>> actinname -- name of your actin class.
>>> aliasname -- name of the action specifed in the strust-xml file.
>>>
>>> 
>>>  validationresult.jsp
>>> 
>>>
>>> name of the validation file for the above mention action will be
>>>
>>> yaction-x-validation.xml -- where you can define the validation and will
>>> be invoke when action x is invoked.
>>>
>>>
>>>  -Siddiq.
>>>
>>>
>>>
>>> 
>>> From: gaurav nigam 
>>> To: Struts Users Mailing List 
>>> Sent: Sat, November 7, 2009 12:14:32 PM
>>> Subject: query regarding Input Validation
>>>
>>> Hi All,
>>>
>>> I have a query regarding input validation.
>>>
>>> # Can we use method wise input validation in struts 2 ?
>>> if this is not supported directly, then is there any workaround for the
>>> same.
>>>
>>> #To utilise the xml based validation, I have to create different
>>> action class for same module...like module is "user" and i had to
>>> create different action classes like adduser.action, modifyuser.action
>>> cla

Re: query regarding Input Validation

2009-11-07 Thread Siddiq Syed

Please refer the section 

Defining Validation Rules in the below mention link.

http://docs.huihoo.com/webwork/2.2.6/Validation.html

-siddiq.


Siddiq Syed wrote:
> 
> 
> From: gaurav nigam 
> To: Struts Users Mailing List 
> Sent: Sat, November 7, 2009 1:21:41 PM
> Subject: Re: query regarding Input Validation
> 
> Hi Saddiq,
> -- siddiq
> 
> Thanks for your help
> I am not able to understand meaning of below line
> You can achive this by creating an separate file for each method
> ...do you mean that i should create separate action class for each method
> or you mean to say separate validation file for each method of an
> action class...
> 
> --- Separate validation file for each action name speicifed in the
> struts.xml , 
> http://docs.huihoo.com/webwork/2.2.6/Validation.html
> 
> 
> 
> By your suggestion, I need to create multiple action mappings in
> struts.xml for each of the method of the action class
> 
> Its not with the method of the actin class , its the action name what is
> been defined in the strust.xlml
> -- For example if you have an action class user
> UserAction.java
> public class UserAction extends action {
>  public String addUser(){
>     return success;
>     }
>     public String modifyUser(){
>     return success;
>     } 
> }
> 
> struts.xml
> 
>     otherjsp.jsp
> 
> 
> 
>     otherjsp.jsp
> 
> 
> Validation files naming convection .
> 
> UserAction-addUser-validation.xml -- when user click on adduser --this
> validation file is going to be invoked
> UserAction-modifyUser-validation.xml -- when user click on modifyuser --
> this validation file is going to be invoked.
> 
> http://docs.huihoo.com/webwork/2.2.6/Validation.html
> 
> Note : this validation files need to be in the same package with action
> class.
> 
> Can we avoid this multiple action mappings by wildcard characters.?
> 
> -- Yes we can avoid multiple action mapping. 
> 
> 
> Please suggest your opinion.
> 
> I am also waiting for some reply on Question 2 I have asked on earlier
> mail
>  Question 2 ?
> 
> Thanks
> 
> Gaurav
> 
> On Sat, Nov 7, 2009 at 6:02 PM, Siddiq Syed  wrote:
>> You can achive this by creating an seprate file for each method and add
>> the validation.
>> When ever the a method from the action class is invoked the corresponding
>> validation will get invoked.
>>
>> actionname-aliasname-validationname.xml
>>
>> actinname -- name of your actin class.
>> aliasname -- name of the action specifed in the strust-xml file.
>>
>> 
>>  validationresult.jsp
>> 
>>
>> name of the validation file for the above mention action will be
>>
>> yaction-x-validation.xml -- where you can define the validation and will
>> be invoke when action x is invoked.
>>
>>
>>  -Siddiq.
>>
>>
>>
>> 
>> From: gaurav nigam 
>> To: Struts Users Mailing List 
>> Sent: Sat, November 7, 2009 12:14:32 PM
>> Subject: query regarding Input Validation
>>
>> Hi All,
>>
>> I have a query regarding input validation.
>>
>> # Can we use method wise input validation in struts 2 ?
>> if this is not supported directly, then is there any workaround for the
>> same.
>>
>> #To utilise the xml based validation, I have to create different
>> action class for same module...like module is "user" and i had to
>> create different action classes like adduser.action, modifyuser.action
>> class etc...i have to do this as there are some fields which are
>> different in each actionideally i want to have single action class
>> with different methods like add, modify, etc... to handle this..but
>> can not do it so as same set of validation will be called for each
>> method...which is not required in my case...
>>
>> After some search and study, i came to know that there is annotation
>> validation which can be used and will be invoked per method...as
>> mentioned in this link
>> http://struts.apache.org/2.0.14/docs/validations-annotation.html
>>
>> but here, in need to hard code, my messages which i really want to
>> avoid it, Is there any way to use property file here...please provide
>> suggestion on this.
>>
>> I have also learned that this annotation validation will not work for
>> client side validation. Is there any work around for this
>>
>>
>> Kindly help me in this regard
>>
>>
>> Thanks
>>
>> Gaurav
>>
>> 

Re: query regarding Input Validation

2009-11-07 Thread Siddiq Syed

From: gaurav nigam 
To: Struts Users Mailing List 
Sent: Sat, November 7, 2009 1:21:41 PM
Subject: Re: query regarding Input Validation

Hi Saddiq,
-- siddiq

Thanks for your help
I am not able to understand meaning of below line
You can achive this by creating an separate file for each method
...do you mean that i should create separate action class for each method
or you mean to say separate validation file for each method of an
action class...

--- Separate validation file for each action name speicifed in the struts.xml , 
http://docs.huihoo.com/webwork/2.2.6/Validation.html



By your suggestion, I need to create multiple action mappings in
struts.xml for each of the method of the action class

Its not with the method of the actin class , its the action name what is been 
defined in the strust.xlml
-- For example if you have an action class user
UserAction.java
public class UserAction extends action {
 public String addUser(){
    return success;
    }
    public String modifyUser(){
    return success;
    } 
}

struts.xml

    otherjsp.jsp



    otherjsp.jsp


Validation files naming convection .

UserAction-addUser-validation.xml -- when user click on adduser --this 
validation file is going to be invoked
UserAction-modifyUser-validation.xml -- when user click on modifyuser -- this 
validation file is going to be invoked.

http://docs.huihoo.com/webwork/2.2.6/Validation.html

Note : this validation files need to be in the same package with action class.

Can we avoid this multiple action mappings by wildcard characters.?

-- Yes we can avoid multiple action mapping. 


Please suggest your opinion.

I am also waiting for some reply on Question 2 I have asked on earlier mail
 Question 2 ?

Thanks

Gaurav

On Sat, Nov 7, 2009 at 6:02 PM, Siddiq Syed  wrote:
> You can achive this by creating an seprate file for each method and add the 
> validation.
> When ever the a method from the action class is invoked the corresponding 
> validation will get invoked.
>
> actionname-aliasname-validationname.xml
>
> actinname -- name of your actin class.
> aliasname -- name of the action specifed in the strust-xml file.
>
> 
>  validationresult.jsp
> 
>
> name of the validation file for the above mention action will be
>
> yaction-x-validation.xml -- where you can define the validation and will be 
> invoke when action x is invoked.
>
>
>  -Siddiq.
>
>
>
> 
> From: gaurav nigam 
> To: Struts Users Mailing List 
> Sent: Sat, November 7, 2009 12:14:32 PM
> Subject: query regarding Input Validation
>
> Hi All,
>
> I have a query regarding input validation.
>
> # Can we use method wise input validation in struts 2 ?
> if this is not supported directly, then is there any workaround for the same.
>
> #To utilise the xml based validation, I have to create different
> action class for same module...like module is "user" and i had to
> create different action classes like adduser.action, modifyuser.action
> class etc...i have to do this as there are some fields which are
> different in each actionideally i want to have single action class
> with different methods like add, modify, etc... to handle this..but
> can not do it so as same set of validation will be called for each
> method...which is not required in my case...
>
> After some search and study, i came to know that there is annotation
> validation which can be used and will be invoked per method...as
> mentioned in this link
> http://struts.apache.org/2.0.14/docs/validations-annotation.html
>
> but here, in need to hard code, my messages which i really want to
> avoid it, Is there any way to use property file here...please provide
> suggestion on this.
>
> I have also learned that this annotation validation will not work for
> client side validation. Is there any work around for this
>
>
> Kindly help me in this regard
>
>
> Thanks
>
> Gaurav
>
> -
> 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: query regarding Input Validation

2009-11-07 Thread gaurav nigam
Hi Saddiq,

Thanks for your help
I am not able to understand meaning of below line
You can achive this by creating an separate file for each method
...do you mean that i should create separate action class for each method
or you mean to say separate validation file for each method of an
action class...

By your suggestion, I need to create multiple action mappings in
struts.xml for each of the method of the action class

Can we avoid this multiple action mappings by wildcard characters.?

Please suggest your opinion.

I am also waiting for some reply on Question 2 I have asked on earlier mail


Thanks

Gaurav

On Sat, Nov 7, 2009 at 6:02 PM, Siddiq Syed  wrote:
> You can achive this by creating an seprate file for each method and add the 
> validation.
> When ever the a method from the action class is invoked the corresponding 
> validation will get invoked.
>
> actionname-aliasname-validationname.xml
>
> actinname -- name of your actin class.
> aliasname -- name of the action specifed in the strust-xml file.
>
> 
>  validationresult.jsp
> 
>
> name of the validation file for the above mention action will be
>
> yaction-x-validation.xml -- where you can define the validation and will be 
> invoke when action x is invoked.
>
>
>  -Siddiq.
>
>
>
> 
> From: gaurav nigam 
> To: Struts Users Mailing List 
> Sent: Sat, November 7, 2009 12:14:32 PM
> Subject: query regarding Input Validation
>
> Hi All,
>
> I have a query regarding input validation.
>
> # Can we use method wise input validation in struts 2 ?
> if this is not supported directly, then is there any workaround for the same.
>
> #To utilise the xml based validation, I have to create different
> action class for same module...like module is "user" and i had to
> create different action classes like adduser.action, modifyuser.action
> class etc...i have to do this as there are some fields which are
> different in each actionideally i want to have single action class
> with different methods like add, modify, etc... to handle this..but
> can not do it so as same set of validation will be called for each
> method...which is not required in my case...
>
> After some search and study, i came to know that there is annotation
> validation which can be used and will be invoked per method...as
> mentioned in this link
> http://struts.apache.org/2.0.14/docs/validations-annotation.html
>
> but here, in need to hard code, my messages which i really want to
> avoid it, Is there any way to use property file here...please provide
> suggestion on this.
>
> I have also learned that this annotation validation will not work for
> client side validation. Is there any work around for this
>
>
> Kindly help me in this regard
>
>
> Thanks
>
> Gaurav
>
> -
> 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: query regarding Input Validation

2009-11-07 Thread Siddiq Syed
You can achive this by creating an seprate file for each method and add the 
validation.
When ever the a method from the action class is invoked the corresponding 
validation will get invoked.

actionname-aliasname-validationname.xml

actinname -- name of your actin class.
aliasname -- name of the action specifed in the strust-xml file.


 validationresult.jsp


name of the validation file for the above mention action will be 

yaction-x-validation.xml -- where you can define the validation and will be 
invoke when action x is invoked.


 -Siddiq.




From: gaurav nigam 
To: Struts Users Mailing List 
Sent: Sat, November 7, 2009 12:14:32 PM
Subject: query regarding Input Validation

Hi All,

I have a query regarding input validation.

# Can we use method wise input validation in struts 2 ?
if this is not supported directly, then is there any workaround for the same.

#To utilise the xml based validation, I have to create different
action class for same module...like module is "user" and i had to
create different action classes like adduser.action, modifyuser.action
class etc...i have to do this as there are some fields which are
different in each actionideally i want to have single action class
with different methods like add, modify, etc... to handle this..but
can not do it so as same set of validation will be called for each
method...which is not required in my case...

After some search and study, i came to know that there is annotation
validation which can be used and will be invoked per method...as
mentioned in this link
http://struts.apache.org/2.0.14/docs/validations-annotation.html

but here, in need to hard code, my messages which i really want to
avoid it, Is there any way to use property file here...please provide
suggestion on this.

I have also learned that this annotation validation will not work for
client side validation. Is there any work around for this


Kindly help me in this regard


Thanks

Gaurav

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


  

Re: Query regarding optional method attribute in action tag - struts.xml

2009-04-19 Thread Dave Newton

HariniKaushik wrote:

getUserList would just return the List(java.util.List)
And its just the method that 'll get called when the action
Register_getUserList action is triggered.
I have combined two actions together through Register_* action names.
And no validation is done for getUserList method.

Actually if i give the viewusers.jsp in "Input" result , it gets executed
but it doesnt get executed if given in success.I guess its not returning
success.
I dont know what result i can give for "java.util.list" one.
Its confusing..


I think you've missed something very important about action method 
return values: these methods will generally return a string. That string 
is used to select the result that will be displayed to the user.


Dave


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



Re: Query regarding optional method attribute in action tag - struts.xml

2009-04-19 Thread HariniKaushik

Thanks for the reply.
getUserList would just return the List(java.util.List)
And its just the method that 'll get called when the action
Register_getUserList action is triggered.
I have combined two actions together through Register_* action names.
And no validation is done for getUserList method.

Actually if i give the viewusers.jsp in "Input" result , it gets executed
but it doesnt get executed if given in success.I guess its not returning
success.
I dont know what result i can give for "java.util.list" one.
Its confusing..



HariniKaushik wrote:
> 
> Hi All,
> I feel this is the correct Forum where in my doubts 'll be cleared.
> I've created Login,UserRegistration page and UserView page(where in admin
> only can view the users)
> And this is my action tag for Register_createUser and Register_getUserList
>   method="{1}">
> common/{1}.jsp
> common/usersList.jsp
> result/{1}.jsp
> 
> 
> The problem is that for Register_getUserList action I ve defined the
> getUserList  method that returns the List.Since it returns the correct
> List I want the "success" result name to be executed and go to the
> UserList page.
> But what happens is that though the correct List is returned the "input"
> result gets executed and it goes again to the validation page.
> That validation I ve given for "Register_createUser" action which I do not
> want to get executed for "getUserList Action." I dunno why it goes to
> input rather than success page.
> If any body is aware of this please let me know!
> Appreciate any help
> 
> Thanks,
> Harini
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Query-regarding-optional-method-attribute-in-action-tag---struts.xml-tp23122390p23123097.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: Query regarding optional method attribute in action tag - struts.xml

2009-04-19 Thread Dave Newton

HariniKaushik wrote:

Hi All,
I feel this is the correct Forum where in my doubts 'll be cleared.
I've created Login,UserRegistration page and UserView page(where in admin
only can view the users)
And this is my action tag for Register_createUser and Register_getUserList
 
common/{1}.jsp
common/usersList.jsp
result/{1}.jsp


The problem is that for Register_getUserList action I ve defined the
getUserList  method that returns the List.Since it returns the correct List
I want the "success" result name to be executed and go to the UserList page.
But what happens is that though the correct List is returned the "input"
result gets executed and it goes again to the validation page.
That validation I ve given for "Register_createUser" action which I do not
want to get executed for "getUserList Action." I dunno why it goes to input
rather than success page.


What does getUserList() return?

Do you have any validation, either XML- or annotation-based, configured 
that would fire for this action?


Dave


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



Re: Query String limitation

2008-10-29 Thread Amir Jamak
Thanks a lot Paweł I think you have solved my problem. In fact I didn't know 
how to change from get to post. :-)
Thanks again.

Amir

--- On Wed, 10/29/08, Paweł Wielgus <[EMAIL PROTECTED]> wrote:
From: Paweł Wielgus <[EMAIL PROTECTED]>
Subject: Re: Query String limitation
To: "Struts Users Mailing List" , [EMAIL PROTECTED]
Date: Wednesday, October 29, 2008, 11:40 PM

Hi Amir,
i have completly no idea what Your problem is, but maybe this will help:
use  instead of ... on the jsp where this action is
triggered,
also pay attention to not to add method="get" inside form tag.
If You would provide more details about what You want to do it would
be simpler to answear.

Best greetings,
Paweł Wielgus.



2008/10/29 Amir Jamak <[EMAIL PROTECTED]>:
> Hello everyone,
>
> I am using Struts 1.2.9, and this is my first post to this list. I was
trying to find solution elsewhere without any success.
> This is the problem, in the action form I have some sort of a collections
which can grow in size.  I have observed that all of the items are listed in the
query string. Once the collection reaches certain size, the page becomes white
after form submission, and query string becomes more than 1500 characters long.
I suppose that query string has some length limitation, therefore I should use
POST instead of GET, but I don't know how. In the struts-config.xml file the
action form is configured as follows:
>
> type="com.mycom.ActionForm" />
>
> 
>
>  type="com.mycom.Action"
> path="/Action"
> parameter="method"
> name="ActionForm"
> validate="true"
> scope="session">
> 
> 
>
> Any help is appreciated. Thanks in advance.
>
> Amir
>
>
>
>



  

Re: Query String limitation

2008-10-29 Thread Paweł Wielgus
Hi Amir,
i have completly no idea what Your problem is, but maybe this will help:
use  instead of ... on the jsp where this action is triggered,
also pay attention to not to add method="get" inside form tag.
If You would provide more details about what You want to do it would
be simpler to answear.

Best greetings,
Paweł Wielgus.



2008/10/29 Amir Jamak <[EMAIL PROTECTED]>:
> Hello everyone,
>
> I am using Struts 1.2.9, and this is my first post to this list. I was trying 
> to find solution elsewhere without any success.
> This is the problem, in the action form I have some sort of a collections 
> which can grow in size.  I have observed that all of the items are listed in 
> the query string. Once the collection reaches certain size, the page becomes 
> white after form submission, and query string becomes more than 1500 
> characters long. I suppose that query string has some length limitation, 
> therefore I should use POST instead of GET, but I don't know how. In the 
> struts-config.xml file the action form is configured as follows:
>
> type="com.mycom.ActionForm" />
>
> 
>
>  type="com.mycom.Action"
> path="/Action"
> parameter="method"
> name="ActionForm"
> validate="true"
> scope="session">
> 
> 
>
> Any help is appreciated. Thanks in advance.
>
> Amir
>
>
>
>


RE: Query

2008-09-22 Thread Jishnu Viswanath
>I actually think some people here have reported that they're doing so
successfully, >although I haven't done it myself.

Well that would be one amazing work cos both dojo object is entirely
different, ya u can use it in 2 iframes, but in same iframe both dojo .4
and 1.x, well until I see it I wont believe it :D

Regards,

Jishnu Viswanath

Software Engineer

*(+9180)41190300 - 222(Ext) ll * ( + 91 ) 9731209330ll

Tavant Technologies Inc.,

www.tavant.com

PEOPLE :: PASSION :: EXCELLENCE


-Original Message-
From: Dave Newton [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, September 23, 2008 12:36 AM
To: Struts Users Mailing List
Subject: RE: Query

--- On Mon, 9/22/08, Jishnu Viswanath wrote:
> Hmmm, I think these are the valid 2.0.11.2 strut-tags
> http://struts.apache.org/2.0.11.2/docs/ajax-tags.html

They're supported under S2.0 as well, but not as a plugin, and cotnain
somewhat less functionality.

> well if they don't we will have problem if u use .4
> and 1.x together. In simple it can't work.

I actually think some people here have reported that they're doing so
successfully, although I haven't done it myself.

Dave


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Any comments or statements made in this email are not necessarily those of 
Tavant Technologies.
The information transmitted is intended only for the person or entity to which 
it is addressed and may 
contain confidential and/or privileged material. If you have received this in 
error, please contact the 
sender and delete the material from any computer. All e-mails sent from or to 
Tavant Technologies 
may be subject to our monitoring procedures.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Query

2008-09-22 Thread Dave Newton
--- On Mon, 9/22/08, Jishnu Viswanath wrote:
> Hmmm, I think these are the valid 2.0.11.2 strut-tags
> http://struts.apache.org/2.0.11.2/docs/ajax-tags.html

They're supported under S2.0 as well, but not as a plugin, and cotnain somewhat 
less functionality.

> well if they don't we will have problem if u use .4
> and 1.x together. In simple it can't work.

I actually think some people here have reported that they're doing so 
successfully, although I haven't done it myself.

Dave


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Query

2008-09-22 Thread Dave Newton
--- On Mon, 9/22/08, Martin Gainty wrote:
> great if we were programming php on Apache!

Or S2 on an app server; I use jQuery regularly.

Dave


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Query

2008-09-22 Thread Jishnu Viswanath
1. Dojo and struts-tags and sitemesh and tiles are already supported in struts
Hmmm, I think these are the valid 2.0.11.2 strut-tags
http://struts.apache.org/2.0.11.2/docs/ajax-tags.html
Well there is no where specified that struts moved to dojo 1.0, well if they 
don't we will have problem if u use .4 and 1.x together. In simple it can't 
work.

2. Well I did not get what you meant,  But these libraries are designed to work 
like that, If you say that jQuery is simple not much features, a full fledged 
app will be equally complex when you use jQuery or dojo.

Well this chart will bring some light in what we are looking at
http://javascriptant.com/articles/24/javascript-libraries-by-comparison

for perf
http://jst.pbwiki.com/

I don't think you can find any performance comparison of extjs as its in GPL or 
Commercial License.

I can not, cos I am more or less dojo developer, not jQuery :D
But I have to accept Grid is ++jQuery;--dojo/dijit.

Regards,

Jishnu Viswanath

Software Engineer

*(+9180)41190300 - 222(Ext) ll * ( + 91 ) 9731209330ll

Tavant Technologies Inc.,

www.tavant.com

PEOPLE :: PASSION :: EXCELLENCE


-Original Message-
From: Martin Gainty [mailto:[EMAIL PROTECTED] 
Sent: Monday, September 22, 2008 11:41 PM
To: Struts Users Mailing List
Subject: RE: Query


dojo and struts-tags and sitemesh and tiles are already supported in struts
http://struts.apache.org/2.0.11.2/docs/dojo-head.html

BTW: you're loading one heck of alot of functionality into JS with these 
external JS libraries
http://struts.apache.org/2.0.11.2/docs/ajax.html

(i'm not picking on JQuery per se but why not GWT or Scriptaculous which have 
equal amount of functionality?)

are you enlisting yourself to write a JQuery plugin for struts
http://cwiki.apache.org/WW/plugins.html

?
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: RE: Query
> Date: Mon, 22 Sep 2008 23:22:22 +0530
> From: [EMAIL PROTECTED]
> To: user@struts.apache.org
> 
> 
> That's really weird, I can not find any thing so php specific with grid, its 
> plain simple grid.
> 
> Bye the way, dojo 1.1 has grid, or was it 1.0 Well I personally did not 
> like the grid implementation, mainly one reason, sluggish, heavy.
> 
> I do remember some other contributed and they migrated it to dojo, I read it 
> some where but I am not sure about it.
> 
> Well who cares about it.
> 
> I would recommend still to use jQuery, personally I am a big fan of dojo(Only 
> second to extjs) but Grid is something really heavy and jQuery is simple CSS 
> based rules work much faster on grid.
> 
> PS: jQuery, dojo, ext every thing is js no relation with PHP/ASP/JSP correct 
> me if I am wrong.
> 
> PS2: If you are using dojo grid with original ajax frame work with struts2 
> which uses .4 and the grid is 1.1(1.2) where the API's are entirely 
> diffrenet? Well rewrite every ajax widget you want, as we did, or put grid in 
> a different frame if you still use dojo.
> 
> Regards,
> 
> Jishnu Viswanath
> 
> Software Engineer
> 
> *(+9180)41190300 - 222(Ext) ll * ( + 91 ) 9731209330ll
> 
> Tavant Technologies Inc.,
> 
> www.tavant.com
> 
> PEOPLE :: PASSION :: EXCELLENCE
> 
> 
> -----Original Message-
> From: Martin Gainty [mailto:[EMAIL PROTECTED] 
> Sent: Monday, September 22, 2008 10:35 PM
> To: Struts Users Mailing List
> Subject: RE: Query
> 
> 
> great if we were programming php on Apache!
> 
> I recommend the Dojo Grid control 
> http://dojotoolkit.org/book/dijit-functional-spec/other-widgets/table
> 
> anyone else?
> 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: RE: Query
> > Date: Mon, 22 Sep 2008 21:29:17 +0530
> > From: [EMAIL PROTECTED]
> > To: user@struts.apache.org
> > 
> > If you are using jQuery  try this also
> > http://www.webplicity.net/flexigrid/
> > I felt its better polished and finished.
> > 
> > Regards,
> > 
> > Jishnu Viswanath
> > 
> > Software Engineer
> > 
> > *(+9180)41190300 - 222

RE: Query

2008-09-22 Thread Martin Gainty

dojo and struts-tags and sitemesh and tiles are already supported in struts
http://struts.apache.org/2.0.11.2/docs/dojo-head.html

BTW: you're loading one heck of alot of functionality into JS with these 
external JS libraries
http://struts.apache.org/2.0.11.2/docs/ajax.html

(i'm not picking on JQuery per se but why not GWT or Scriptaculous which have 
equal amount of functionality?)

are you enlisting yourself to write a JQuery plugin for struts
http://cwiki.apache.org/WW/plugins.html

?
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: RE: Query
> Date: Mon, 22 Sep 2008 23:22:22 +0530
> From: [EMAIL PROTECTED]
> To: user@struts.apache.org
> 
> 
> That's really weird, I can not find any thing so php specific with grid, its 
> plain simple grid.
> 
> Bye the way, dojo 1.1 has grid, or was it 1.0 Well I personally did not 
> like the grid implementation, mainly one reason, sluggish, heavy.
> 
> I do remember some other contributed and they migrated it to dojo, I read it 
> some where but I am not sure about it.
> 
> Well who cares about it.
> 
> I would recommend still to use jQuery, personally I am a big fan of dojo(Only 
> second to extjs) but Grid is something really heavy and jQuery is simple CSS 
> based rules work much faster on grid.
> 
> PS: jQuery, dojo, ext every thing is js no relation with PHP/ASP/JSP correct 
> me if I am wrong.
> 
> PS2: If you are using dojo grid with original ajax frame work with struts2 
> which uses .4 and the grid is 1.1(1.2) where the API's are entirely 
> diffrenet? Well rewrite every ajax widget you want, as we did, or put grid in 
> a different frame if you still use dojo.
> 
> Regards,
> 
> Jishnu Viswanath
> 
> Software Engineer
> 
> *(+9180)41190300 - 222(Ext) ll * ( + 91 ) 9731209330ll
> 
> Tavant Technologies Inc.,
> 
> www.tavant.com
> 
> PEOPLE :: PASSION :: EXCELLENCE
> 
> 
> -Original Message-
> From: Martin Gainty [mailto:[EMAIL PROTECTED] 
> Sent: Monday, September 22, 2008 10:35 PM
> To: Struts Users Mailing List
> Subject: RE: Query
> 
> 
> great if we were programming php on Apache!
> 
> I recommend the Dojo Grid control 
> http://dojotoolkit.org/book/dijit-functional-spec/other-widgets/table
> 
> anyone else?
> 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: RE: Query
> > Date: Mon, 22 Sep 2008 21:29:17 +0530
> > From: [EMAIL PROTECTED]
> > To: user@struts.apache.org
> > 
> > If you are using jQuery  try this also
> > http://www.webplicity.net/flexigrid/
> > I felt its better polished and finished.
> > 
> > Regards,
> > 
> > Jishnu Viswanath
> > 
> > Software Engineer
> > 
> > *(+9180)41190300 - 222(Ext) ll * ( + 91 ) 9731209330ll
> > 
> > Tavant Technologies Inc.,
> > 
> > www.tavant.com
> > 
> > PEOPLE :: PASSION :: EXCELLENCE
> > 
> > 
> > -Original Message-
> > From: Miguel [mailto:[EMAIL PROTECTED] 
> > Sent: Monday, September 22, 2008 9:06 PM
> > To: Struts Users Mailing List
> > Subject: Re: Query
> > 
> > You could use jQgrid, it has lots of options.
> > http://www.trirand.com/jqgrid/jqgrid.html
> > To use jqgrid you need to pass it the data via xml or json, so I
> > recomend use the xslt or the json result of struts. You should not
> > build the xml or the json using a jsp.
> > It's not somewhat easy, but you will need to do your homework.
> > 
> > 
> > Si quieres ser más positivo, pierde un electrón
> > Miguel Ruiz Velasco S.
> > 
> > 
> > 
> > On Sun, Sep 21, 2008 at 20:32, Jim Kiley <[EMAIL PROTECTED]> wrote:
> > > You're going to need to provide a lot more detail if you want a useful
> > > answer of any kind.
> > >
> > > On Sun, Sep 21, 2008 at 1:27 AM, greatshalu.6 <[EMAIL PROTECTED]>wrote:
> > >
> > >>
>

RE: Query

2008-09-22 Thread Jishnu Viswanath

That's really weird, I can not find any thing so php specific with grid, its 
plain simple grid.

Bye the way, dojo 1.1 has grid, or was it 1.0 Well I personally did not 
like the grid implementation, mainly one reason, sluggish, heavy.

I do remember some other contributed and they migrated it to dojo, I read it 
some where but I am not sure about it.

Well who cares about it.

I would recommend still to use jQuery, personally I am a big fan of dojo(Only 
second to extjs) but Grid is something really heavy and jQuery is simple CSS 
based rules work much faster on grid.

PS: jQuery, dojo, ext every thing is js no relation with PHP/ASP/JSP correct me 
if I am wrong.

PS2: If you are using dojo grid with original ajax frame work with struts2 
which uses .4 and the grid is 1.1(1.2) where the API's are entirely diffrenet? 
Well rewrite every ajax widget you want, as we did, or put grid in a different 
frame if you still use dojo.

Regards,

Jishnu Viswanath

Software Engineer

*(+9180)41190300 - 222(Ext) ll * ( + 91 ) 9731209330ll

Tavant Technologies Inc.,

www.tavant.com

PEOPLE :: PASSION :: EXCELLENCE


-Original Message-
From: Martin Gainty [mailto:[EMAIL PROTECTED] 
Sent: Monday, September 22, 2008 10:35 PM
To: Struts Users Mailing List
Subject: RE: Query


great if we were programming php on Apache!

I recommend the Dojo Grid control 
http://dojotoolkit.org/book/dijit-functional-spec/other-widgets/table

anyone else?
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: RE: Query
> Date: Mon, 22 Sep 2008 21:29:17 +0530
> From: [EMAIL PROTECTED]
> To: user@struts.apache.org
> 
> If you are using jQuery  try this also
> http://www.webplicity.net/flexigrid/
> I felt its better polished and finished.
> 
> Regards,
> 
> Jishnu Viswanath
> 
> Software Engineer
> 
> *(+9180)41190300 - 222(Ext) ll * ( + 91 ) 9731209330ll
> 
> Tavant Technologies Inc.,
> 
> www.tavant.com
> 
> PEOPLE :: PASSION :: EXCELLENCE
> 
> 
> -Original Message-
> From: Miguel [mailto:[EMAIL PROTECTED] 
> Sent: Monday, September 22, 2008 9:06 PM
> To: Struts Users Mailing List
> Subject: Re: Query
> 
> You could use jQgrid, it has lots of options.
> http://www.trirand.com/jqgrid/jqgrid.html
> To use jqgrid you need to pass it the data via xml or json, so I
> recomend use the xslt or the json result of struts. You should not
> build the xml or the json using a jsp.
> It's not somewhat easy, but you will need to do your homework.
> 
> 
> Si quieres ser más positivo, pierde un electrón
> Miguel Ruiz Velasco S.
> 
> 
> 
> On Sun, Sep 21, 2008 at 20:32, Jim Kiley <[EMAIL PROTECTED]> wrote:
> > You're going to need to provide a lot more detail if you want a useful
> > answer of any kind.
> >
> > On Sun, Sep 21, 2008 at 1:27 AM, greatshalu.6 <[EMAIL PROTECTED]>wrote:
> >
> >>
> >> how we use grids in struts
> >> --
> >> View this message in context:
> >> http://www.nabble.com/Query-tp19591765p19591765.html
> >> Sent from the Struts - User mailing list archive at Nabble.com.
> >>
> >>
> >> -
> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
> >> For additional commands, e-mail: [EMAIL PROTECTED]
> >>
> >>
> >
> >
> > --
> > Jim Kiley
> > Technical Consultant | Summa
> > [p] 412.258.3346 [m] 412.445.1729
> > http://www.summa-tech.com
> >
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> Any comments or statements made in this email are not necessarily those of 
> Tavant Technologies.
> The information transmitted is intended only for the person or entity to 
> which it is addressed and may 
> contain confidential and/or privileged material. If you have received this in 
> error, please contact the 
> sender and delete the material from any computer. All e-mails sent from or to 
> Tavant Technologies 
> may be subject to our monitoring procedures.
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


RE: Query

2008-09-22 Thread Martin Gainty

great if we were programming php on Apache!

I recommend the Dojo Grid control 
http://dojotoolkit.org/book/dijit-functional-spec/other-widgets/table

anyone else?
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: RE: Query
> Date: Mon, 22 Sep 2008 21:29:17 +0530
> From: [EMAIL PROTECTED]
> To: user@struts.apache.org
> 
> If you are using jQuery  try this also
> http://www.webplicity.net/flexigrid/
> I felt its better polished and finished.
> 
> Regards,
> 
> Jishnu Viswanath
> 
> Software Engineer
> 
> *(+9180)41190300 - 222(Ext) ll * ( + 91 ) 9731209330ll
> 
> Tavant Technologies Inc.,
> 
> www.tavant.com
> 
> PEOPLE :: PASSION :: EXCELLENCE
> 
> 
> -Original Message-
> From: Miguel [mailto:[EMAIL PROTECTED] 
> Sent: Monday, September 22, 2008 9:06 PM
> To: Struts Users Mailing List
> Subject: Re: Query
> 
> You could use jQgrid, it has lots of options.
> http://www.trirand.com/jqgrid/jqgrid.html
> To use jqgrid you need to pass it the data via xml or json, so I
> recomend use the xslt or the json result of struts. You should not
> build the xml or the json using a jsp.
> It's not somewhat easy, but you will need to do your homework.
> 
> 
> Si quieres ser más positivo, pierde un electrón
> Miguel Ruiz Velasco S.
> 
> 
> 
> On Sun, Sep 21, 2008 at 20:32, Jim Kiley <[EMAIL PROTECTED]> wrote:
> > You're going to need to provide a lot more detail if you want a useful
> > answer of any kind.
> >
> > On Sun, Sep 21, 2008 at 1:27 AM, greatshalu.6 <[EMAIL PROTECTED]>wrote:
> >
> >>
> >> how we use grids in struts
> >> --
> >> View this message in context:
> >> http://www.nabble.com/Query-tp19591765p19591765.html
> >> Sent from the Struts - User mailing list archive at Nabble.com.
> >>
> >>
> >> -
> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
> >> For additional commands, e-mail: [EMAIL PROTECTED]
> >>
> >>
> >
> >
> > --
> > Jim Kiley
> > Technical Consultant | Summa
> > [p] 412.258.3346 [m] 412.445.1729
> > http://www.summa-tech.com
> >
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> Any comments or statements made in this email are not necessarily those of 
> Tavant Technologies.
> The information transmitted is intended only for the person or entity to 
> which it is addressed and may 
> contain confidential and/or privileged material. If you have received this in 
> error, please contact the 
> sender and delete the material from any computer. All e-mails sent from or to 
> Tavant Technologies 
> may be subject to our monitoring procedures.
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

_
Stay up to date on your PC, the Web, and your mobile phone with Windows Live.
http://clk.atdmt.com/MRT/go/msnnkwxp1020093185mrt/direct/01/

RE: Query

2008-09-22 Thread Jishnu Viswanath
If you are using jQuery  try this also
http://www.webplicity.net/flexigrid/
I felt its better polished and finished.

Regards,

Jishnu Viswanath

Software Engineer

*(+9180)41190300 - 222(Ext) ll * ( + 91 ) 9731209330ll

Tavant Technologies Inc.,

www.tavant.com

PEOPLE :: PASSION :: EXCELLENCE


-Original Message-
From: Miguel [mailto:[EMAIL PROTECTED] 
Sent: Monday, September 22, 2008 9:06 PM
To: Struts Users Mailing List
Subject: Re: Query

You could use jQgrid, it has lots of options.
http://www.trirand.com/jqgrid/jqgrid.html
To use jqgrid you need to pass it the data via xml or json, so I
recomend use the xslt or the json result of struts. You should not
build the xml or the json using a jsp.
It's not somewhat easy, but you will need to do your homework.


Si quieres ser más positivo, pierde un electrón
Miguel Ruiz Velasco S.



On Sun, Sep 21, 2008 at 20:32, Jim Kiley <[EMAIL PROTECTED]> wrote:
> You're going to need to provide a lot more detail if you want a useful
> answer of any kind.
>
> On Sun, Sep 21, 2008 at 1:27 AM, greatshalu.6 <[EMAIL PROTECTED]>wrote:
>
>>
>> how we use grids in struts
>> --
>> View this message in context:
>> http://www.nabble.com/Query-tp19591765p19591765.html
>> Sent from the Struts - User mailing list archive at Nabble.com.
>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>
>
> --
> Jim Kiley
> Technical Consultant | Summa
> [p] 412.258.3346 [m] 412.445.1729
> http://www.summa-tech.com
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Any comments or statements made in this email are not necessarily those of 
Tavant Technologies.
The information transmitted is intended only for the person or entity to which 
it is addressed and may 
contain confidential and/or privileged material. If you have received this in 
error, please contact the 
sender and delete the material from any computer. All e-mails sent from or to 
Tavant Technologies 
may be subject to our monitoring procedures.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Query

2008-09-22 Thread Miguel
You could use jQgrid, it has lots of options.
http://www.trirand.com/jqgrid/jqgrid.html
To use jqgrid you need to pass it the data via xml or json, so I
recomend use the xslt or the json result of struts. You should not
build the xml or the json using a jsp.
It's not somewhat easy, but you will need to do your homework.


Si quieres ser más positivo, pierde un electrón
Miguel Ruiz Velasco S.



On Sun, Sep 21, 2008 at 20:32, Jim Kiley <[EMAIL PROTECTED]> wrote:
> You're going to need to provide a lot more detail if you want a useful
> answer of any kind.
>
> On Sun, Sep 21, 2008 at 1:27 AM, greatshalu.6 <[EMAIL PROTECTED]>wrote:
>
>>
>> how we use grids in struts
>> --
>> View this message in context:
>> http://www.nabble.com/Query-tp19591765p19591765.html
>> Sent from the Struts - User mailing list archive at Nabble.com.
>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>
>
> --
> Jim Kiley
> Technical Consultant | Summa
> [p] 412.258.3346 [m] 412.445.1729
> http://www.summa-tech.com
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Query

2008-09-21 Thread Jim Kiley
You're going to need to provide a lot more detail if you want a useful
answer of any kind.

On Sun, Sep 21, 2008 at 1:27 AM, greatshalu.6 <[EMAIL PROTECTED]>wrote:

>
> how we use grids in struts
> --
> View this message in context:
> http://www.nabble.com/Query-tp19591765p19591765.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Jim Kiley
Technical Consultant | Summa
[p] 412.258.3346 [m] 412.445.1729
http://www.summa-tech.com


Re: Query

2007-07-10 Thread Antonio Petrelli

2007/7/10, Amit Sharma <[EMAIL PROTECTED]>:

So if above can't be done then I am planning to have a JSP
being called and then redirecting it to the action.


It is exactly what you have to do.

Antonio

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Query on struts application design

2007-06-20 Thread Yoge

Another alternative,

Move all the images/css specific to abc.com  to a subdirectory named
/abc/...
Let all the images related to xyz.com be in another sub-directory /xyx/

Change path of images in your application to /abc or /xyz based on the
request.*getRemoteHost*() .

--
Yoge,
AdventNet, Inc.
[EMAIL PROTECTED]



On 6/15/07, Rakesh Sharma <[EMAIL PROTECTED]> wrote:


Dear All,

I am new to struts so would need your help here.

My client has an enterprise application(struts1.0 based) with :
  1 WAR (virtual host www.abc.com)
  1 EJB module

Now, the client want the same application(almost same business rules..i.e
same EJB module) but in different look and feel on another domain(
www.xyz.com).

Can any one suggest me a good way out for this on struts.

My take was :
- Make one more webmodule in the same application which can be configured
for www.xyz.com using virtual host settings.
- Copy the JSPs/taglibs/CSS/image etc from the first webapp to second and
make the customization on these UI components.
- Copy the struts related configuration from the first webapp to second(I
donot intend to change any thing is these files, including in the struts
config xml.)

I am not able to do a test of the above approach as I am at client
location
and donot have any IDE with me.

Do you guys thinks that I would be able to achieve what I want ?

Please note that all the 3 modules(2 webapp and 1 EJB) would be deployed
on
same JVM, so my guess was that there should not be any issue while
accessig
the struts related classes(such as controller etc..) in webapp2 at
runtime.

Please help me out here and tell me if my thinking is flawed...
Your help would be highly appreciated.

Thanks and Regards
Rakesh





--
--Yoge
91-9840425388


Re: Query regarding file upload

2006-12-10 Thread Rahul Joshi

Does anyone has an example ??

On 12/8/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]>
wrote:


You would have to control this on the client end, perhaps using
javascript to break the transaction into two HTTP requests.

> -Original Message-
> From: Rahul Joshi [mailto:[EMAIL PROTECTED]
> Sent: Friday, December 08, 2006 8:50 AM
> To: user@struts.apache.org
> Subject: Query regarding file upload
>
>
>  Hi,
>
> I have created a Struts action which accepts a file from
> client, I used org.apache.struts.upload.FormFile as a member
> inside the actionform that is associated with that Action.
> Before saving that file uploaded by client, I first look for
> a token string in the request's query part. That token is
> first verified and the file is saved only it its valid.
>
> The problem here is I cannot verify the token unless until
> file is completely uploaded, so in case of a big file, server
> has to wait till all the contents arrives, then only that
> request/token is verified.
>
>
> Can there be any mechanism by which I can verify the
> request/token first then only start uploading the content of the file.
>
>
> -Rahul
>
>
> --
> Thanks & Regards
> --RahulJoshi
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





--
Thanks & Regards
--RahulJoshi
Salary Axiom: The pay raise is just large enough
to increase your taxes and just small enough to have
no effect on your take-home pay


RE: Query regarding file upload

2006-12-08 Thread George.Dinwiddie
You would have to control this on the client end, perhaps using
javascript to break the transaction into two HTTP requests.

> -Original Message-
> From: Rahul Joshi [mailto:[EMAIL PROTECTED] 
> Sent: Friday, December 08, 2006 8:50 AM
> To: user@struts.apache.org
> Subject: Query regarding file upload
> 
> 
>  Hi,
> 
> I have created a Struts action which accepts a file from 
> client, I used org.apache.struts.upload.FormFile as a member 
> inside the actionform that is associated with that Action. 
> Before saving that file uploaded by client, I first look for 
> a token string in the request's query part. That token is 
> first verified and the file is saved only it its valid.
> 
> The problem here is I cannot verify the token unless until 
> file is completely uploaded, so in case of a big file, server 
> has to wait till all the contents arrives, then only that 
> request/token is verified.
> 
> 
> Can there be any mechanism by which I can verify the 
> request/token first then only start uploading the content of the file.
> 
> 
> -Rahul
> 
> 
> -- 
> Thanks & Regards
> --RahulJoshi
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Query

2006-12-06 Thread Jagaran Bubai Das
thanks to you..
  lemme know if any other details are there 
  i am going through the lesson 1

Ed Griebel <[EMAIL PROTECTED]> wrote:
  Start here, it doesn't get much clearer than this, and google for
unfamiliar terms: http://www.learntechnology.net/struts-lesson-1.do

On 12/5/06, Jagaran Bubai Das wrote:
> I hav done that...
> but how to install and run the sample application i am not clear..
> it would be great if could get some simple steps and some simple application
>
> "Narayanaswamy, Mohan" wrote:
>
> First download the struts from http://struts.apache.org/downloads.html
> and play with the sample programs.
>
> -Original Message-
> From: Jagaran Das [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, December 05, 2006 5:04 PM
> To: user@struts.apache.org
> Subject: Query
>
>
> Hi all,
>
>
>
>
> How to install a simple application in Struts?
>
> I am new to this field.
>
> Please let me know what is good way to start exploring STRUTS.
>
>
>
>
>
> Thanks in Advance
>
> Jagaran
>
>
>
>
>
>
>
>  CAUTION - Disclaimer * This e-mail
> contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely for the
> use of the addressee(s). If you are not the intended recipient, please
> notify the sender by e-mail and delete the original message. Further,
> you are not to copy, disclose, or distribute this e-mail or its contents
> to any other person and any such actions are unlawful. This e-mail may
> contain viruses. Infosys has taken every reasonable precaution to
> minimize this risk, but is not liable for any damage you may sustain as
> a result of any virus in this e-mail. You should carry out your own
> virus checks before opening the e-mail or attachment. Infosys reserves
> the right to monitor and review the content of all messages sent to or
> from this e-mail address. Messages sent to or from this e-mail address
> may be stored on the Infosys e-mail system.
> ***INFOSYS End of Disclaimer INFOSYS***
> This email is confidential. If you are not the addressee tell the sender 
> immediately and destroy this email
> without using, sending or storing it. Emails are not secure and may suffer 
> errors, viruses, delay,
> interception and amendment. Standard Chartered PLC and subsidiaries 
> ("SCGroup") do not accept liability for
> damage caused by this email and may monitor email traffic.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
>
> -
> Find out what India is talking about on - Yahoo! Answers India
> Send FREE SMS to your friend's mobile from Yahoo! Messenger Version 8. Get it 
> NOW
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
 Find out what India is talking about on  - Yahoo! Answers India 
 Send FREE SMS to your friend's mobile from Yahoo! Messenger Version 8. Get it 
NOW

Re: Query

2006-12-05 Thread Ed Griebel

Start here, it doesn't get much clearer than this, and google for
unfamiliar terms: http://www.learntechnology.net/struts-lesson-1.do

On 12/5/06, Jagaran Bubai Das <[EMAIL PROTECTED]> wrote:

I hav done that...
  but how to install and run the sample application i am not clear..
  it would be great if could get some simple steps and some simple application

"Narayanaswamy, Mohan" <[EMAIL PROTECTED]> wrote:

First download the struts from http://struts.apache.org/downloads.html
and play with the sample programs.

-Original Message-
From: Jagaran Das [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 05, 2006 5:04 PM
To: user@struts.apache.org
Subject: Query


Hi all,




How to install a simple application in Struts?

I am new to this field.

Please let me know what is good way to start exploring STRUTS.





Thanks in Advance

Jagaran







 CAUTION - Disclaimer * This e-mail
contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely for the
use of the addressee(s). If you are not the intended recipient, please
notify the sender by e-mail and delete the original message. Further,
you are not to copy, disclose, or distribute this e-mail or its contents
to any other person and any such actions are unlawful. This e-mail may
contain viruses. Infosys has taken every reasonable precaution to
minimize this risk, but is not liable for any damage you may sustain as
a result of any virus in this e-mail. You should carry out your own
virus checks before opening the e-mail or attachment. Infosys reserves
the right to monitor and review the content of all messages sent to or
from this e-mail address. Messages sent to or from this e-mail address
may be stored on the Infosys e-mail system.
***INFOSYS End of Disclaimer INFOSYS***
This email is confidential. If you are not the addressee tell the sender 
immediately and destroy this email
without using, sending or storing it. Emails are not secure and may suffer 
errors, viruses, delay,
interception and amendment. Standard Chartered PLC and subsidiaries ("SCGroup") 
do not accept liability for
damage caused by this email and may monitor email traffic.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
 Find out what India is talking about on  - Yahoo! Answers India
 Send FREE SMS to your friend's mobile from Yahoo! Messenger Version 8. Get it 
NOW



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Query

2006-12-05 Thread Jagaran Bubai Das
I hav done that...
  but how to install and run the sample application i am not clear..
  it would be great if could get some simple steps and some simple application 

"Narayanaswamy, Mohan" <[EMAIL PROTECTED]> wrote:
  
First download the struts from http://struts.apache.org/downloads.html
and play with the sample programs.

-Original Message-
From: Jagaran Das [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 05, 2006 5:04 PM
To: user@struts.apache.org
Subject: Query


Hi all,




How to install a simple application in Struts?

I am new to this field.

Please let me know what is good way to start exploring STRUTS.





Thanks in Advance

Jagaran







 CAUTION - Disclaimer * This e-mail
contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely for the
use of the addressee(s). If you are not the intended recipient, please
notify the sender by e-mail and delete the original message. Further,
you are not to copy, disclose, or distribute this e-mail or its contents
to any other person and any such actions are unlawful. This e-mail may
contain viruses. Infosys has taken every reasonable precaution to
minimize this risk, but is not liable for any damage you may sustain as
a result of any virus in this e-mail. You should carry out your own
virus checks before opening the e-mail or attachment. Infosys reserves
the right to monitor and review the content of all messages sent to or
from this e-mail address. Messages sent to or from this e-mail address
may be stored on the Infosys e-mail system.
***INFOSYS End of Disclaimer INFOSYS***
This email is confidential. If you are not the addressee tell the sender 
immediately and destroy this email
without using, sending or storing it. Emails are not secure and may suffer 
errors, viruses, delay,
interception and amendment. Standard Chartered PLC and subsidiaries ("SCGroup") 
do not accept liability for
damage caused by this email and may monitor email traffic.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
 Find out what India is talking about on  - Yahoo! Answers India 
 Send FREE SMS to your friend's mobile from Yahoo! Messenger Version 8. Get it 
NOW

RE: Query

2006-12-05 Thread Narayanaswamy, Mohan

First download the struts from http://struts.apache.org/downloads.html
and play with the sample programs.

-Original Message-
From: Jagaran Das [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 05, 2006 5:04 PM
To: user@struts.apache.org
Subject: Query


Hi all,




How to install a simple application in Struts?

I am new to this field.

Please let me know what is good way to start exploring STRUTS.





Thanks in Advance

Jagaran







 CAUTION - Disclaimer * This e-mail
contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely for the
use of the addressee(s). If you are not the intended recipient, please
notify the sender by e-mail and delete the original message. Further,
you are not to copy, disclose, or distribute this e-mail or its contents
to any other person and any such actions are unlawful. This e-mail may
contain viruses. Infosys has taken every reasonable precaution to
minimize this risk, but is not liable for any damage you may sustain as
a result of any virus in this e-mail. You should carry out your own
virus checks before opening the e-mail or attachment. Infosys reserves
the right to monitor and review the content of all messages sent to or
from this e-mail address. Messages sent to or from this e-mail address
may be stored on the Infosys e-mail system.
***INFOSYS End of Disclaimer INFOSYS***
This email is confidential. If you are not the addressee tell the sender 
immediately and destroy this email
without using, sending or storing it. Emails are not secure and may suffer 
errors, viruses, delay,
interception and amendment. Standard Chartered PLC and subsidiaries ("SCGroup") 
do not accept liability for
damage caused by this email and may monitor email traffic.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Query in action messages

2006-11-15 Thread Hanmay Udgiri

Hi Nuwan,
Actually I am using Form and this method is available in Action class

On 11/15/06, Nuwan Chandrasoma <[EMAIL PROTECTED]> wrote:


Ops..,, sorry ignore the last mail..

It should be.. first call the getResources() and get the MessageResource
and
from there u can get the message..

eg:-

errors.add(Error_FIELD_KEY,new ActionMessage("
error.required",getResources(request).getMessage("error.zipcode"));

Regards,

Nuwan



- Original Message -
From: "Hanmay Udgiri" <[EMAIL PROTECTED]>
To: 
Sent: Wednesday, November 15, 2006 8:25 AM
Subject: Query in action messages


> Hi
> I am doing validation in my Action Form which is extending
> ValidatorActionForm.
> In validate method,I am checking for mandatory field and adding error.
> The error in ApplicationResources.properties is like this.
> error.required=The {0) field is required field.
> error.notInRange=The {0} field should be in between {1) and {2)
> error.zipcode=Zip Code
> And I am addding the the error in validate mehod like this
> errors.add(Error_FIELD_KEY,new ActionMessage(" error.required","
> error.zipcode"));
>
> But It is printing the error mesasges like this.
> The error.zipcode field in reuqired field.
> It works if I add error like this.
> errors.add(Error_FIELD_KEY,new ActionMessage(" error.required","Zip
> Code"));
> The Zip Code field in reuqired field.
>
> Can anybody help on this
>
> --
> Thanks and Regards
> Hanmayya Udgiri
>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





--
Thanks and Regards
Hanmayya Udgiri


RE: Query in action messages

2006-11-15 Thread Anil Kumar T

I was wrong... ignore my earlier mail..
Thanks.
Anil.

-Original Message-
From: Hanmay Udgiri [mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 15, 2006 1:56 PM
To: user@struts.apache.org
Subject: Query in action messages

Hi
I am doing validation in my Action Form which is extending
ValidatorActionForm.
In validate method,I am checking for mandatory field and adding error.
The error in ApplicationResources.properties is like this.
error.required=The {0) field is required field.
error.notInRange=The {0} field should be in between {1) and {2)
error.zipcode=Zip Code
And I am addding the the error in validate mehod like this
errors.add(Error_FIELD_KEY,new ActionMessage(" error.required","
error.zipcode"));

But It is printing the error mesasges like this.
The error.zipcode field in reuqired field.
It works if I add error like this.
errors.add(Error_FIELD_KEY,new ActionMessage(" error.required","Zip
Code"));
The Zip Code field in reuqired field.

Can anybody help on this

--
Thanks and Regards
Hanmayya Udgiri

Information transmitted by this e-mail is proprietary to Infinite Computer 
Solutions and / or its Customers and is intended for use only by the individual 
or the entity to which it is addressed, and may contain information that is 
privileged, confidential or exempt from disclosure under applicable law. If you 
are not the intended recipient or it appears that this mail has been forwarded 
to you without proper authority, you are notified that any use or dissemination 
of this information in any manner is strictly prohibited. In such cases, please 
notify us immediately at [EMAIL PROTECTED] and delete this email from your 
records.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Query in action messages

2006-11-15 Thread Anil Kumar T

There is empty space before the key.. just observe..



errors.add(Error_FIELD_KEY,new ActionMessage(" error.required","Zip
Code"));



should like ...



errors.add(Error_FIELD_KEY,new ActionMessage("error.required","Zip
Code"));



hope it helps you...



Anil.



-Original Message-
From: Hanmay Udgiri [mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 15, 2006 1:56 PM
To: user@struts.apache.org
Subject: Query in action messages



Hi

I am doing validation in my Action Form which is extending

ValidatorActionForm.

In validate method,I am checking for mandatory field and adding error.

The error in ApplicationResources.properties is like this.

error.required=The {0) field is required field.

error.notInRange=The {0} field should be in between {1) and {2)

error.zipcode=Zip Code

And I am addding the the error in validate mehod like this

errors.add(Error_FIELD_KEY,new ActionMessage(" error.required","

error.zipcode"));



But It is printing the error mesasges like this.

The error.zipcode field in reuqired field.

It works if I add error like this.

errors.add(Error_FIELD_KEY,new ActionMessage(" error.required","Zip
Code"));

The Zip Code field in reuqired field.



Can anybody help on this



--

Thanks and Regards

Hanmayya Udgiri



Information transmitted by this e-mail is proprietary to Infinite Computer 
Solutions and / or its Customers and is intended for use only by the individual 
or the entity to which it is addressed, and may contain information that is 
privileged, confidential or exempt from disclosure under applicable law. If you 
are not the intended recipient or it appears that this mail has been forwarded 
to you without proper authority, you are notified that any use or dissemination 
of this information in any manner is strictly prohibited. In such cases, please 
notify us immediately at [EMAIL PROTECTED] and delete this email from your 
records.

RE: Query in action messages

2006-11-15 Thread Mano Chinthaka Dasanayaka
Hi,
Yes. When u use. errors.add(Error_FIELD_KEY,new ActionMessage("
error.required","
error.zipcode"));

It will just replace what ever u pass as the second argument with the 
"{0)". Second way is correct...
Regards,
Mano 


-Original Message-
From: Hanmay Udgiri [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, November 15, 2006 1:56 PM
To: user@struts.apache.org
Subject: Query in action messages

Hi
I am doing validation in my Action Form which is extending
ValidatorActionForm.
In validate method,I am checking for mandatory field and adding error.
The error in ApplicationResources.properties is like this.
error.required=The {0) field is required field.
error.notInRange=The {0} field should be in between {1) and {2)
error.zipcode=Zip Code
And I am addding the the error in validate mehod like this
errors.add(Error_FIELD_KEY,new ActionMessage(" error.required","
error.zipcode"));

But It is printing the error mesasges like this.
The error.zipcode field in reuqired field.
It works if I add error like this.
errors.add(Error_FIELD_KEY,new ActionMessage(" error.required","Zip Code"));
The Zip Code field in reuqired field.

Can anybody help on this

-- 
Thanks and Regards
Hanmayya Udgiri



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Query in action messages

2006-11-15 Thread Nuwan Chandrasoma

Ops..,, sorry ignore the last mail..

It should be.. first call the getResources() and get the MessageResource and 
from there u can get the message..


eg:-

errors.add(Error_FIELD_KEY,new ActionMessage(" 
error.required",getResources(request).getMessage("error.zipcode"));


Regards,

Nuwan



- Original Message - 
From: "Hanmay Udgiri" <[EMAIL PROTECTED]>

To: 
Sent: Wednesday, November 15, 2006 8:25 AM
Subject: Query in action messages



Hi
I am doing validation in my Action Form which is extending
ValidatorActionForm.
In validate method,I am checking for mandatory field and adding error.
The error in ApplicationResources.properties is like this.
error.required=The {0) field is required field.
error.notInRange=The {0} field should be in between {1) and {2)
error.zipcode=Zip Code
And I am addding the the error in validate mehod like this
errors.add(Error_FIELD_KEY,new ActionMessage(" error.required","
error.zipcode"));

But It is printing the error mesasges like this.
The error.zipcode field in reuqired field.
It works if I add error like this.
errors.add(Error_FIELD_KEY,new ActionMessage(" error.required","Zip 
Code"));

The Zip Code field in reuqired field.

Can anybody help on this

--
Thanks and Regards
Hanmayya Udgiri




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Query in action messages

2006-11-15 Thread Nuwan Chandrasoma

Hi,

there is a method called getMessage(), use that one and get the message from 
the resource bundle,


eg:_

errors.add(Error_FIELD_KEY,new ActionMessage(" error.required", 
getMessage("error.zipcode")));


Regards,

Nuwan

- Original Message - 
From: "Hanmay Udgiri" <[EMAIL PROTECTED]>

To: 
Sent: Wednesday, November 15, 2006 8:25 AM
Subject: Query in action messages



Hi
I am doing validation in my Action Form which is extending
ValidatorActionForm.
In validate method,I am checking for mandatory field and adding error.
The error in ApplicationResources.properties is like this.
error.required=The {0) field is required field.
error.notInRange=The {0} field should be in between {1) and {2)
error.zipcode=Zip Code
And I am addding the the error in validate mehod like this
errors.add(Error_FIELD_KEY,new ActionMessage(" error.required","
error.zipcode"));

But It is printing the error mesasges like this.
The error.zipcode field in reuqired field.
It works if I add error like this.
errors.add(Error_FIELD_KEY,new ActionMessage(" error.required","Zip 
Code"));

The Zip Code field in reuqired field.

Can anybody help on this

--
Thanks and Regards
Hanmayya Udgiri




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: query about application resource and charset

2006-03-16 Thread Roy, Ansuman
yes... £ symbol

-Original Message-
From: Antonio Petrelli [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 16, 2006 2:49 PM
To: Struts Users Mailing List
Subject: Re: query about application resource and charset


Roy, Ansuman ha scritto:
> Thanks Antonio,
> that solved the problem. I used java.util.Properties so now the special 
> characters are not coming
>
> by the way, what if I try to put russian characters or use non ascii 
> characters in my keys??
>   
You'll find a lot of \u, not very readable ;-) What I can say is 
that Italian stressed characters are converted the \u way.
> what would be the display like for example the Pound symbol
>   
Do you mean '£'? \u00A3 if I am correct
Ciao
Antonio

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



This e-mail and any attachment is for authorised use by the intended 
recipient(s) only. It may contain proprietary material, confidential 
information and/or be subject to legal privilege. It should not be copied, 
disclosed to, retained or used by, any other party. If you are not an intended 
recipient then please promptly delete this e-mail and any attachment and all 
copies and inform the sender. Thank you.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: query about application resource and charset

2006-03-16 Thread Antonio Petrelli

Roy, Ansuman ha scritto:

Thanks Antonio,
that solved the problem. I used java.util.Properties so now the special 
characters are not coming

by the way, what if I try to put russian characters or use non ascii characters 
in my keys??
  
You'll find a lot of \u, not very readable ;-) What I can say is 
that Italian stressed characters are converted the \u way.

what would be the display like for example the Pound symbol
  

Do you mean '£'? \u00A3 if I am correct
Ciao
Antonio

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: query about application resource and charset

2006-03-15 Thread Roy, Ansuman
Thanks Antonio,
that solved the problem. I used java.util.Properties so now the special 
characters are not coming

by the way, what if I try to put russian characters or use non ascii characters 
in my keys??

would it be converted to ascii and what would be the display like for example 
the Pound symbol

regards,
Roy

-Original Message-
From: Antonio Petrelli [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 15, 2006 6:17 PM
To: Struts Users Mailing List
Subject: Re: query about application resource and charset


Roy, Ansuman ha scritto:
> I parse through the xml and using io i write it into a .properties file
>
> I think instead of java io i should use java.util's property class is it??
>   
Yes, java.util.Properties. ".properties" files must be ASCII 7-bit, the 
"Properties" class takes all the burden of encoding.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



This e-mail and any attachment is for authorised use by the intended 
recipient(s) only. It may contain proprietary material, confidential 
information and/or be subject to legal privilege. It should not be copied, 
disclosed to, retained or used by, any other party. If you are not an intended 
recipient then please promptly delete this e-mail and any attachment and all 
copies and inform the sender. Thank you.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: query about application resource and charset

2006-03-15 Thread Antonio Petrelli

Roy, Ansuman ha scritto:

I parse through the xml and using io i write it into a .properties file

I think instead of java io i should use java.util's property class is it??
  
Yes, java.util.Properties. ".properties" files must be ASCII 7-bit, the 
"Properties" class takes all the burden of encoding.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: query about application resource and charset

2006-03-15 Thread Roy, Ansuman
using key value pairs. Basically the xml file has 


hello.name
Roy

I parse through the xml and using io i write it into a .properties file

I think instead of java io i should use java.util's property class is it??

regards,
Anshuman

-Original Message-
From: Antonio Petrelli [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 15, 2006 5:33 PM
To: Struts Users Mailing List
Subject: Re: query about application resource and charset


Roy, Ansuman ha scritto:
> But the struts application uses bean tags every where so I have to generate 
> the property file
>   
How do you generate this file then?

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



This e-mail and any attachment is for authorised use by the intended 
recipient(s) only. It may contain proprietary material, confidential 
information and/or be subject to legal privilege. It should not be copied, 
disclosed to, retained or used by, any other party. If you are not an intended 
recipient then please promptly delete this e-mail and any attachment and all 
copies and inform the sender. Thank you.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: query about application resource and charset

2006-03-15 Thread Antonio Petrelli

Roy, Ansuman ha scritto:

But the struts application uses bean tags every where so I have to generate the 
property file
  

How do you generate this file then?

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: query about application resource and charset

2006-03-15 Thread Roy, Ansuman
Thanks a lot for the info. But the way I go about is 

html file  xslt--> xml file --java code --> . properties file

But the struts application uses bean tags every where so I have to generate the 
property file
any further suggestion,
regards,
Anshuman

-Original Message-
From: Antonio Petrelli [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 15, 2006 4:32 PM
To: Struts Users Mailing List
Subject: Re: query about application resource and charset


Roy, Ansuman ha scritto:
> Hi,
> I have a content management system that generates the application 
> resources.properties file. Now the value of many keys
> are found to be of filled with  keys.
File .properties MUST have escape codes for special characters (i.e. 
\u codes). This is the default behaviour when you save a 
".properties" file directly from Properties.store. I suppose that you 
don't use Properties at all...
Now you have two options:
a) use Properties in your code
b) use /bin/native2ascii utility by Sun.
I suggest, anyway, the first solution.
Ciao
Antonio

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



This e-mail and any attachment is for authorised use by the intended 
recipient(s) only. It may contain proprietary material, confidential 
information and/or be subject to legal privilege. It should not be copied, 
disclosed to, retained or used by, any other party. If you are not an intended 
recipient then please promptly delete this e-mail and any attachment and all 
copies and inform the sender. Thank you.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: query about application resource and charset

2006-03-15 Thread Antonio Petrelli

Roy, Ansuman ha scritto:

Hi,
I have a content management system that generates the application 
resources.properties file. Now the value of many keys
are found to be of filled with  keys.
File .properties MUST have escape codes for special characters (i.e. 
\u codes). This is the default behaviour when you save a 
".properties" file directly from Properties.store. I suppose that you 
don't use Properties at all...

Now you have two options:
a) use Properties in your code
b) use /bin/native2ascii utility by Sun.
I suggest, anyway, the first solution.
Ciao
Antonio

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: query parameters

2006-03-08 Thread Madhav Bhargava
Yup i realised that as soon as sent this mail. Thanks for the reply.

On 3/7/06, David Delbecq <[EMAIL PROTECTED]> wrote:
>
> Encoding and decoding of query parameters is the job of container
> (tomcat, jboss, websphere, what ever you are using). The only struts
> related exception is for multipart/form-data (used for file uploads).
> There it's common-fileupload library which does the decoding. Why would
> you want to do the decoding yourself? The decoding/encoding process is
> done according to rfc1630 specifications.
>
> Madhav Bhargava a écrit :
>
> >Hi All,
> >
> >It is a common practice to encode special characters such as ' ', %, #,
> :, $
> >etc.. when sending parameters in the query string along with the URL. We
> >have a similar requirement. Some of the query parameters can contain
> special
> >characters and therefore we went for UTf-8 encoding.
> >
> >Before using the encoded parameters we call request.getParameter() in the
> >struts action class, decode these parameters and then do any further
> >processing. The problem comes when % is a part of the parameter value.
> For
> >instance the drugName parameter contains a value *pan% jon%. *This gets
> >encoded into *pan%25+jon%25*. The problem comes when we say
> >request.getParameter() in the action class. The value we get is already
> >decoded to *pan% jon%. *So now when we run the decoder it throws an
> >exception.
> >
> >*How do i stop the automatic decoding of query parameters and do decoding
> of
> >all the query parameters explicitely? *
> >
> >
> >Madhav
> >
> >
> >--
> >When I tell the truth, it is not for the sake of convincing those who do
> not
> >know it, but for the sake of defending those that do
> >
> >
> >
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


--
When I tell the truth, it is not for the sake of convincing those who do not
know it, but for the sake of defending those that do


Re: query parameters

2006-03-07 Thread David Delbecq
Encoding and decoding of query parameters is the job of container
(tomcat, jboss, websphere, what ever you are using). The only struts
related exception is for multipart/form-data (used for file uploads).
There it's common-fileupload library which does the decoding. Why would
you want to do the decoding yourself? The decoding/encoding process is
done according to rfc1630 specifications.

Madhav Bhargava a écrit :

>Hi All,
>
>It is a common practice to encode special characters such as ' ', %, #, :, $
>etc.. when sending parameters in the query string along with the URL. We
>have a similar requirement. Some of the query parameters can contain special
>characters and therefore we went for UTf-8 encoding.
>
>Before using the encoded parameters we call request.getParameter() in the
>struts action class, decode these parameters and then do any further
>processing. The problem comes when % is a part of the parameter value. For
>instance the drugName parameter contains a value *pan% jon%. *This gets
>encoded into *pan%25+jon%25*. The problem comes when we say
>request.getParameter() in the action class. The value we get is already
>decoded to *pan% jon%. *So now when we run the decoder it throws an
>exception.
>
>*How do i stop the automatic decoding of query parameters and do decoding of
>all the query parameters explicitely? *
>
>
>Madhav
>
>
>--
>When I tell the truth, it is not for the sake of convincing those who do not
>know it, but for the sake of defending those that do
>
>  
>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: query string parameters problem

2005-10-25 Thread Michael Jouravlev
On 10/21/05, R.Vijayaraghavan <[EMAIL PROTECTED]> wrote:
> struts-config.xml
> 
> 
> 
> 
>  type = "app.QueryParamsAction"
> name = "QueryParamsForm"
> validate = "false"
> >
> 
> 
> 
>
> ActionForm has the setter and getter methods for name, age and description.
>
> Action:
> public final class QueryParamsAction extends Action {
>
> public ActionForward execute(ActionMapping mapping,
> ActionForm form1,
> HttpServletRequest request,
> HttpServletResponse response)
> throws Exception {
>
> QueryParamsForm form = (QueryParamsForm)form1;
>
> //String name = (String) 
> PropertyUtils.getSimpleProperty(form, "name");
> String name = (String) request.getParameter("name");
> //String age = (String) 
> PropertyUtils.getSimpleProperty(form, "age");
> String age = (String) request.getParameter("age");
> String description = (String) 
> PropertyUtils.getSimpleProperty(form,
> "description");
>
> out.println(name);
> out.println(age);
> out.println(description);
>
> return (mapping.findForward("nextPage"));
> }
>
> My initial query string is:
>
> http://localhost:8080/vijay/QueryParams.do?name=vijay&age=26
>
> This instantiates the ActionForm, sets age and name, comes to teh Action,
> print age and name correctly, prints description as null(as expected), goes
> to "nextPage" whcih is QueryParams.jsp. In QueryParams.jsp, I print name,
> age and assign a textbox for the atribute 'description' which when submitted
> should set description in the ActionForm. It does so. When it comes back to
> Action, description gets printed but name and age are now null.

You read name and age directly from request object, what else do you
expect? The simplest choice is to set ActionForm scope to session and
to read from ((QueryParamsForm)form1).getName()

Michael.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: query string parameters problem

2005-10-22 Thread Aymeric Alibert
If you  are using struts 1.2.7 or later, you can use the
ActionRedirect class to dynamically add parameters to the forward. In
your case, something like:

public ActionForward execute(ActionMapping mapping,
ActionForm form1,
HttpServletRequest request,
HttpServletResponse response)
throws Exception {

   QueryParamsForm form = (QueryParamsForm)form1;

   String name = (String) request.getParameter("name");
   String age = (String) request.getParameter("age");
   String description = (String)
PropertyUtils.getSimpleProperty(form,"description");

   ActionRedirect forward = new
ActionRedirect(mapping.findForward("nextPage"));
   forward.setRedirect(false);
   forward.addParameter("name", name);
   forward.addParameter("age", age);
  return forward;

}

Aymeric
On 10/22/05, R.Vijayaraghavan <[EMAIL PROTECTED]> wrote:
>
>
> > -Original Message-
> > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> > Sent: Saturday, October 22, 2005 12:25 PM
> > To: Struts Users Mailing List
> > Subject: RE: query string parameters problem
> >
> >
> >
> > The scope of the ActionForm is session means that the last submitted
> > ActionForm will remain in the session till the session ends. In you case,
> > even though the ActionForm is getting populated with the values for the
> > first time, those are getting overridden by the second request and the
> > second request is not taking the values of name and age in the query
> > string (As the querystring URL is getting overridden by "/submit.do").
>
> True. It does not re-instantiate the bean but it calls the reset() method on
> submitting the form. So the only way it can be done is to use the hidden
> fields ??
>
> regards,
> vijay.
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: query string parameters problem

2005-10-22 Thread R.Vijayaraghavan


> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: Saturday, October 22, 2005 12:25 PM
> To: Struts Users Mailing List
> Subject: RE: query string parameters problem
>
>
>
> The scope of the ActionForm is session means that the last submitted
> ActionForm will remain in the session till the session ends. In you case,
> even though the ActionForm is getting populated with the values for the
> first time, those are getting overridden by the second request and the
> second request is not taking the values of name and age in the query
> string (As the querystring URL is getting overridden by "/submit.do").

True. It does not re-instantiate the bean but it calls the reset() method on
submitting the form. So the only way it can be done is to use the hidden
fields ??

regards,
vijay.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: query string parameters problem

2005-10-21 Thread rajasekhar . cherukuri

The scope of the ActionForm is session means that the last submitted 
ActionForm will remain in the session till the session ends. In you case, 
even though the ActionForm is getting populated with the values for the 
first time, those are getting overridden by the second request and the 
second request is not taking the values of name and age in the query 
string (As the querystring URL is getting overridden by "/submit.do").

Regards,
Rajasekhar Cherukuri




"R.Vijayaraghavan" <[EMAIL PROTECTED]> 
10/22/2005 12:14 PM
Please respond to
"Struts Users Mailing List" 


To
"Struts Users Mailing List" 
cc

Subject
RE: query string parameters problem







> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: Saturday, October 22, 2005 12:08 PM
> To: Struts Users Mailing List
> Subject: RE: query string parameters problem
>
>
>
> Are you able to see the 'age' and 'name' attributes in the address bar
> after submitting the form ? If not, the action="/submit.do" in your
>  is overwriting the URL you wanted to post. IN this case you
> can use the hidden variables for age and name and set the required 
values
> in the Javascript.

Yes it overwrites the address bar with just /submit.do. But why should the
name and age attributes be null when the ActionForm is in session scope.
Shouldn't the values be re-used.

>
> Regards,
> Rajasekhar Cherukuri
>

regards,
vijay.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


ForwardSourceID:NT674A 


Notice: The information contained in this e-mail message and/or attachments to 
it may contain confidential or privileged information.   If you are not the 
intended recipient, any dissemination, use, review, distribution, printing or 
copying of the information contained in this e-mail message and/or attachments 
to it are strictly prohibited.   If you have received this communication in 
error, please notify us by reply e-mail or telephone and immediately and 
permanently delete the message and any attachments.  Thank you

RE: query string parameters problem

2005-10-21 Thread R.Vijayaraghavan

> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: Saturday, October 22, 2005 12:08 PM
> To: Struts Users Mailing List
> Subject: RE: query string parameters problem
>
>
>
> Are you able to see the 'age' and 'name' attributes in the address bar
> after submitting the form ? If not, the action="/submit.do" in your
>  is overwriting the URL you wanted to post. IN this case you
> can use the hidden variables for age and name and set the required values
> in the Javascript.

Yes it overwrites the address bar with just /submit.do. But why should the
name and age attributes be null when the ActionForm is in session scope.
Shouldn't the values be re-used.

>
> Regards,
> Rajasekhar Cherukuri
>

regards,
vijay.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: query string parameters problem

2005-10-21 Thread R.Vijayaraghavan
struts-config.xml









ActionForm has the setter and getter methods for name, age and description.

Action:
public final class QueryParamsAction extends Action {

public ActionForward execute(ActionMapping mapping,
ActionForm form1,
HttpServletRequest request,
HttpServletResponse response)
throws Exception {

QueryParamsForm form = (QueryParamsForm)form1;

//String name = (String) 
PropertyUtils.getSimpleProperty(form, "name");
String name = (String) request.getParameter("name");
//String age = (String) 
PropertyUtils.getSimpleProperty(form, "age");
String age = (String) request.getParameter("age");
String description = (String) 
PropertyUtils.getSimpleProperty(form,
"description");

out.println(name);
out.println(age);
out.println(description);

return (mapping.findForward("nextPage"));
}

My initial query string is:

http://localhost:8080/vijay/QueryParams.do?name=vijay&age=26

This instantiates the ActionForm, sets age and name, comes to teh Action,
print age and name correctly, prints description as null(as expected), goes
to "nextPage" whcih is QueryParams.jsp. In QueryParams.jsp, I print name,
age and assign a textbox for the atribute 'description' which when submitted
should set description in the ActionForm. It does so. When it comes back to
Action, description gets printed but name and age are now null.

> It should work the way you want (session scoped forms retain
> their values.)
>
> Post the relevant parts of struts-config (the form bean and action)
> and the part of the Action code where you're trying to access the form
> properties, and see if someone can spot a problem.  Also describe
> the flow
> of your app.
>
> My guess is that you're dealing with two different form beans,
> but I need to
> see the config file.
>
> --
> Wendy Smoak
>



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: query string parameters problem

2005-10-21 Thread rajasekhar . cherukuri

Are you able to see the 'age' and 'name' attributes in the address bar 
after submitting the form ? If not, the action="/submit.do" in your 
 is overwriting the URL you wanted to post. IN this case you 
can use the hidden variables for age and name and set the required values 
in the Javascript.

Regards,
Rajasekhar Cherukuri





"R.Vijayaraghavan" <[EMAIL PROTECTED]> 
10/22/2005 11:53 AM
Please respond to
"Struts Users Mailing List" 


To
"Struts Users Mailing List" 
cc

Subject
RE: query string parameters problem








> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: Saturday, October 22, 2005 8:36 AM
> To: Struts Users Mailing List
> Subject: Re: query string parameters problem
>
>
>
> Hi,
> You should use
> request.getParameter("name")
> request.getParameter("age")

It does not work.

> to get the values from the request. I don't think the values set
> through through query string will be set to ActionForm automatically. In
> this case you should explicitly call the setter methods of the 
ActionForm
> and then set the new ActionForm object to session with the same name 
that
> was used in the action element attribute "attribute" in 
struts-config.xml.

No, the values are set even while passing the values through the query
string. Why should not this work. The URL with the query string will call
teh appropriate ActionForm, set the values that it gets from the Http GET
request.

The problem I face is that when I submit the html page, the name and age 
do
not get added to the query string(and thats fine, it should not). The
description goes via the Http POST request, ActionForm sets the value of
description, comes to the Action. Its here that I am not able to get the
values of name and age.

regards,
vijay.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


ForwardSourceID:NT6736 


Notice: The information contained in this e-mail message and/or attachments to 
it may contain confidential or privileged information.   If you are not the 
intended recipient, any dissemination, use, review, distribution, printing or 
copying of the information contained in this e-mail message and/or attachments 
to it are strictly prohibited.   If you have received this communication in 
error, please notify us by reply e-mail or telephone and immediately and 
permanently delete the message and any attachments.  Thank you

Re: query string parameters problem

2005-10-21 Thread Wendy Smoak

From: "R.Vijayaraghavan" <[EMAIL PROTECTED]>


The action is set to /submit.do. Since I am only sending the description
in
the http request, only the setDescription() method should be called and it
happens so. The problem is when I try to access the age and name variables
from the ActionForm in the Action class, I get null. Why so? I am not
setting age and name after submitting the form, they are already set. The
form is in session scope, so shouldn't it be re-used.


It should work the way you want (session scoped forms retain their values.)

Post the relevant parts of struts-config (the form bean and action)
and the part of the Action code where you're trying to access the form
properties, and see if someone can spot a problem.  Also describe the flow 
of your app.


My guess is that you're dealing with two different form beans, but I need to
see the config file.

--
Wendy Smoak



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: query string parameters problem

2005-10-21 Thread R.Vijayaraghavan


> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: Saturday, October 22, 2005 8:36 AM
> To: Struts Users Mailing List
> Subject: Re: query string parameters problem
>
>
>
> Hi,
> You should use
> request.getParameter("name")
> request.getParameter("age")

It does not work.

> to get the values from the request. I don't think the values set
> through through query string will be set to ActionForm automatically. In
> this case you should explicitly call the setter methods of the ActionForm
> and then set the new ActionForm object to session with the same name that
> was used in the action element attribute "attribute" in struts-config.xml.

No, the values are set even while passing the values through the query
string. Why should not this work. The URL with the query string will call
teh appropriate ActionForm, set the values that it gets from the Http GET
request.

The problem I face is that when I submit the html page, the name and age do
not get added to the query string(and thats fine, it should not). The
description goes via the Http POST request, ActionForm sets the value of
description, comes to the Action. Its here that I am not able to get the
values of name and age.

regards,
vijay.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: query string parameters problem

2005-10-21 Thread R.Vijayaraghavan
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]
> Sent: Friday, October 21, 2005 7:01 PM
> To: user@struts.apache.org
> Subject: RE: query string parameters problem
>
>
> R.Vijayaraghavan asked:
>   [snip]
> > The action is set to /submit.do. Since I am only sending the
> > description in the http request, only the setDescription()
> > method should be called and it happens so. The problem is
> > when I try to access the age and name variables from the
> > ActionForm in the Action class, I get null. Why so? I am not
> > setting age and name after submitting the form, they are
> > already set. The form is in session scope, so shouldn't it be re-used.
>
> You might want to add hidden fields in your HTML form so that the name
> and age get resubmitted.

This can be done.

> Or, if the data you want is already in session
> scope, have your Action read that data from there.

When I say that the form is in session scope, does it mean that the
attributes in the form bean will hold their values until modified. If yes,
then why in my case it does not work.

regards,
vijay.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: query string parameters problem

2005-10-21 Thread rajasekhar . cherukuri

Hi,
You should use 
request.getParameter("name") 
request.getParameter("age")

to get the values from the request. I don't think the values set 
through through query string will be set to ActionForm automatically. In 
this case you should explicitly call the setter methods of the ActionForm 
and then set the new ActionForm object to session with the same name that 
was used in the action element attribute "attribute" in struts-config.xml.

Regards,
Rajasekhar Cherukuri



"R.Vijayaraghavan" <[EMAIL PROTECTED]> 
10/21/2005 03:40 PM
Please respond to
"Struts Users Mailing List" 


To
"Struts Users Mailing List" 
cc

Subject
query string parameters problem






Hello,

I have 3 variables, namely age, name and description. I have the values 
for
name and age before sending the request. That is, my URL would look like
http://localhost:8080/vijay/submit.do?name=xyz&age=22

I have a form that sets the values of age and name which is then accessed 
in
a html page using bean:write. In the html page, the user will enter the
description in the corrosponding textarea.

The action is set to /submit.do. Since I am only sending the description 
in
the http request, only the setDescription() method should be called and it
happens so. The problem is when I try to access the age and name variables
from the ActionForm in the Action class, I get null. Why so? I am not
setting age and name after submitting the form, they are already set. The
form is in session scope, so shouldn't it be re-used.

Or am I understanding it in-correctly.

regards,
vijay.

Sorry if the subject of the mail is not proper, I couldn't think of any
other subject.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


ForwardSourceID:NT66BE 


Notice: The information contained in this e-mail message and/or attachments to 
it may contain confidential or privileged information.   If you are not the 
intended recipient, any dissemination, use, review, distribution, printing or 
copying of the information contained in this e-mail message and/or attachments 
to it are strictly prohibited.   If you have received this communication in 
error, please notify us by reply e-mail or telephone and immediately and 
permanently delete the message and any attachments.  Thank you

RE: query string parameters problem

2005-10-21 Thread George.Dinwiddie
R.Vijayaraghavan asked:
[snip]
> The action is set to /submit.do. Since I am only sending the 
> description in the http request, only the setDescription() 
> method should be called and it happens so. The problem is 
> when I try to access the age and name variables from the 
> ActionForm in the Action class, I get null. Why so? I am not 
> setting age and name after submitting the form, they are 
> already set. The form is in session scope, so shouldn't it be re-used.

You might want to add hidden fields in your HTML form so that the name
and age get resubmitted.  Or, if the data you want is already in session
scope, have your Action read that data from there.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Query depends part of validation.xml ?

2004-10-12 Thread Twan Kogels
Hello again ;-)
I've dived into the struts source code and struggled for a couple of hours 
(was already struggling a bit before i wrote the email at the bottom).

Then i discovered the Resource class which seems to be the answer to my 
question. Here's some pseudo code:
(warning this is only theorical)


Getting the depends part in the validation.xml. This will print every 
element in the depends part.

ValidatorResources vr=Resources.getValidatorResources(); //validator 
already parsed xml stuff
Forum f=vr.getForm(loc, "myform");
Field f=f.getField("myfield");
List list=f.getDependencyList();
while(item in list){
print(item);
}


What do you all think am i on the right approach or am i just totally wrong?
Cheers,
Twan Kogels
At 21:03 12-10-2004, you wrote:
Hello people,
I'm wondering if there is a way to query the value's in validation.xml. 
I'm particulary interested in the "depends" part which contains the 
"required" statement.

This one indicates if a form field is required. When i know this one then 
i can program a general routine which prints a little red star with the 
required form field in my html.

But the problem is i don't know how i can query the "depends" part in the 
validation.xml. Does anybody know where i must start, for example which 
classes should i extend or override?

I'm currently using Velocity for my View layer.
Can anyone offer me a helping hand?
Cheers,
Twan Kogels

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: Query question

2004-06-16 Thread Pilgrim, Peter

> -Original Message-
> From: CRANFORD, CHRIS [mailto:[EMAIL PROTECTED]
> Sent: 14 June 2004 18:13
> To: '[EMAIL PROTECTED]'
> Subject: Query question
> 
> 
> Anyone here familiar with using CATSEARCH type oracle 
> queries?  If so, I am
> trying to do something like:
> SELECT COLNAME
>FROM MYTABLE
>  WHERE CATSEARCH(MYFIELD,'motor',NULL) > 0 
>  OR SHORT_DESCRIPTION LIKE '%motor%'
> The problem is I get an oracle error about functional 
> invocation; however I
> and use an AND in my where clause and no errors occur.  
> Thanks for any help
> anyone can provide.

Ok with the Value List Handler pattern. There are two options
to consider

1. Deterministic result set

   In this case you are actually sure the SQL query will return
   a set of results that will not exhaust the memory and will
   not overload the network transfer between data and controller tiers.

2. Non deterministic result set

   In this case you are NOT actually sure the SQL query will return
   a set of results. Either it will exhaust the memory and take
   in reality to transfer the data.

The difference between (1) and (2) is whether you can call

   SELECT COUNT(*) FROM ...

to get the finite size of the database result set. So therefore it
decide how you implement the Value List Handler pattern. If you cannot
be sure how data you have, then you have write an optimistic version.
This also affects how you design the GUI. In other words the web user
will alway be able to click on the [NEXT] button in (2). Also you
cannot tell the user exactly how much data is really available 
on page 1 of the iteration. Interesting stuff.

For case (1) also consider the trade off between calling SQL 
to retrieve the size and to query the data. Effectively you are
executing the same SQL twice. So what you might want to do is
retrieve all the data first (if that is actually realistically)
and then give the user the size as the size of the cache.

--
Peter Pilgrim
Operations/IT - Credit Suisse First Boston, 
10 South Colonnade, London E14 4QJ, United Kingdom
Tel: +44 (0)207 883 4447

==
This message is for the sole use of the intended recipient. If you received
this message in error please delete it and notify us. If this message was
misdirected, CSFB does not waive any confidentiality or privilege. CSFB
retains and monitors electronic communications sent through its network.
Instructions transmitted over this system are not binding on CSFB until they
are confirmed by us. Message transmission is not guaranteed to be secure.
==


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]