Re: Can this be breaking security ?

2009-06-20 Thread Girish Naik
sorry its not possible to pick files from the clients machine as when a file
is uploaded it (someone) creates a tmp file in
'work\Catalina\localhost\\upload__70e25ce7_121fcf971b2__7ff2_0003.tmp'

hmm ... super.


Regards,
-
Girish Naik
Mobile:-+91-09740091638
girish.n...@gmail.com
George Carlin
- "Electricity is really just organized lightning."

On Sun, Jun 21, 2009 at 11:32 AM, Girish Naik  wrote:

> Hi, i was just implementing file upload in struts 2.0. When the form with
> file is submitted, I can see the full path in the path property of file.
>
> Can it be possible for any one to get the path and look for any other file
> in that location of folder?
>
>
> Regards,
> -
> Girish Naik
> Mobile:-+91-09740091638
> girish.n...@gmail.com
> George Carlin 
> - "Electricity is really just organized lightning."


Cannot retrieve mapping for action

2009-06-20 Thread Sam Wun
Dear all,

I am a bit confused about generating mapping in the structs-config.xml
file (with Xdoclet).

Currently, I am getting this error:


15:55:47,890 INFO  [PluginPackageUtil:1391] Finished checking for
available updates in 2 ms
15:55:54,284 ERROR [PortletRequestDispatcherImpl:316]
org.apache.jasper.JasperException: javax.servlet.ServletException:
javax.servlet.jsp.JspException: Cannot retrieve mapping for action
/onlinepayment_portlet/order
org.apache.jasper.JasperException: javax.servlet.ServletException:
javax.servlet.jsp.JspException: Cannot retrieve mapping for action
/onlinepayment_portlet/order
at 
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:522)
at 
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:398)
at 
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
...

-- In my OrderForm.java file, I have:
package com.XYZ.onlinepayment.portlet;

import javax.servlet.http.HttpServletRequest;

import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ActionMessage;

/**
 * Search query entry form.
 *
 * @struts.form name="OrderForm"
 */


-- In OrderAction.java file:
package com.XYZ.onlinepayment.portlet;

import java.io.IOException;

import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ActionForm;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.XYZ.onlinepayment.portlet.OrderForm;

import com.liferay.portal.struts.PortletAction;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import javax.portlet.ActionRequest;
import javax.portlet.ActionResponse;
import javax.portlet.PortletConfig;
import javax.portlet.RenderRequest;
import javax.portlet.RenderResponse;


/** @struts.action name="OrderForm" path="/onlinepayment_portlet/order1"
 * scope="session"
 * input="/portlet/onlinepayment_portlet/order.jsp"
 *
 * @struts.action-forward
name="/onlinepayment_portlet/success_to_order2"
path="/onlinepayment_portlet/order2"
 */

public class OrderAction extends PortletAction{

...

-- xdoclet generated struts-config.xml file:

  



  

  
   

  


  

   
   

   

-- my build.xml file:














































I know it seems messy. But I don't know how to instruct xdoclet
"automatically" generate correct mappings in struts-config.xml file.

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



Can this be breaking security ?

2009-06-20 Thread Girish Naik
Hi, i was just implementing file upload in struts 2.0. When the form with
file is submitted, I can see the full path in the path property of file.

Can it be possible for any one to get the path and look for any other file
in that location of folder?


Regards,
-
Girish Naik
Mobile:-+91-09740091638
girish.n...@gmail.com
George Carlin
- "Electricity is really just organized lightning."


Re: File "/WEB-INF/tld/struts-bean.tld" not found

2009-06-20 Thread Girish Naik
If your getter is 'getShippingAddress()' then your property will be
'shippingAddress' .


Regards,
-
Girish Naik
Mobile:-+91-09740091638
girish.n...@gmail.com
Fran Lebowitz
- "Life is something to do when you can't get to sleep."

On Sun, Jun 21, 2009 at 11:09 AM, Sam Wun  wrote:

> getShippingAddress()


Re: File "/WEB-INF/tld/struts-bean.tld" not found

2009-06-20 Thread Sam Wun
Hi,

I changed the property match the get methods, eg. if a getter is
getShippingAddress(), my property is "ShippingAddress".
but it still complained "ShippingAddress" has no getter method:

3:20,454 ERROR [PortletRequestDispatcherImpl:316]
org.apache.jasper.JasperException: javax.servlet.ServletException:
javax.servlet.jsp.JspException: No getter method for property:
"ShippingAddress" of bean: "OrderForm"
org.apache.jasper.JasperException: javax.servlet.ServletException:
javax.servlet.jsp.JspException: No getter method for property:
"ShippingAddress" of bean: "OrderForm"
at 
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:522)
at 
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:398)
at 
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)

 - OrderForm.java:
public class OrderForm extends ActionForm{
private String firstname="";
private String lastname="";
private String email_address="";
private String phone_number="";
private String shipping_address="";
private String billing_address="";

public void setShippingAddress(String shipping) {
this.shipping_address = shipping;
}
public String getShippingAddress(){
return this.shipping_address;
}
...

- order.jsp:
<%@ include file="/html/portlet/onlinepayment_portlet/init.jsp" %>















  
  


Thanks


On Sun, Jun 21, 2009 at 3:25 PM, Girish Naik wrote:
> can you change the bean id to something different than the property name.
> and check again.
>
>
> Regards,
> -
> Girish Naik
> Mobile:-+91-09740091638
> girish.n...@gmail.com
> Henny 
> Youngman
> - "I told the doctor I broke my leg in two places. He told me to quit
> going
> to those places."
>
> On Sun, Jun 21, 2009 at 10:24 AM, Sam Wun  wrote:
>
>> Opps. I commented out the taglibs in a jsp file.
>> Added back in, now got antoehr problem with the getters:
>>
>> 14:48:04,429 ERROR [PortletRequestDispatcherImpl:316]
>> org.apache.jasper.JasperException: javax.servlet.ServletException:
>> javax.servlet.jsp.JspException: No getter method for property: "ship
>> ping_address" of bean: "OrderForm"
>> org.apache.jasper.JasperException: javax.servlet.ServletException:
>> javax.servlet.jsp.JspException: No getter method for property:
>> "shipping_address" of bean: "OrderForm"
>>        at
>> org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:522)
>>        at
>> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:398)
>>        at
>> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
>>        at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
>>        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
>>        at
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
>>
>> I have the getters/setters in this java file.
>> Here are the relevant files:
>>
>> 1/ order.jsp:
>> <%@ include file="/html/portlet/onlinepayment_portlet/init.jsp" %>
>>
>> > property="shipping_address" type="java.lang.String" />
>>
>> 
>>        
>>        
>>        
>> 
>>
>> 
>> 
>> > focus="shipping_address">
>>
>> 
>> 
>>   
>>  > />
>> 
>>  
>>    > />
>> 
>> 
>>  
>>     > />
>> 
>> 
>>  
>>     > rows="12" cols="50" />
>> 
>> 
>>  
>>     > cols="50" />
>> 
>>
>> 
>> 
>>
>> 
>>   
>>   
>> 
>>
>> 2/ OrderForm.java:
>> package com.ip6networks.onlinepayment.portlet;
>>
>> import javax.servlet.http.HttpServletRequest;
>>
>> import org.apache.struts.action.ActionErrors;
>> import org.apache.struts.action.ActionForm;
>> import org.apache.struts.action.ActionMapping;
>> import org.apache.struts.action.ActionMessage;
>>
>> /**
>>  * Search query entry form.
>>  *
>>  * @struts.form name="OrderForm"
>>  */
>> public class OrderForm extends ActionForm{
>>    private String firstname="";
>>    private String lastname="";
>>    private String email_address="";
>>    private String phone_number="";
>>    private String shipping_address="";
>>    private String billing_address="";
>>    /**
>>     * Sets the query attribute of the OrderForm object
>>     *
>>     * @struts.validator type="required" msgkey="error.firstname.required"
>>     * @struts.validator type="required" msgkey="error.lastname.required"
>>     * @struts.validator type="required"
>> msgkey="error.email_address.required"
>>     * @struts.validator type="required"
>> msgkey="error.phone_number.required"
>>     * @struts.validator type="required"
>> msgkey="error.shipping_address.required"
>>     * @struts.validator type="required"
>> msgkey="error.billing_address.required"
>>     */
>>    public void setFirstName(String fn){
>>  

Re: Doubt with using check box

2009-06-20 Thread Girish Naik
You can look at *Map Backed
ActionForms*Section
4.3.3



Regards,
-
Girish Naik
Mobile:-+91-09740091638
girish.n...@gmail.com
P. J. O'Rourke
- "If government were a product, selling it would be illegal."

On Sun, Jun 21, 2009 at 10:26 AM, Vishnu Vyasan Nelliparmbil <
vis...@mun.gov.bh> wrote:

>
> Can anybody help me on this issue?
>
>
>
>
> -Original Message-
> From: Vishnu Vyasan Nelliparmbil [mailto:vis...@mun.gov.bh]
> Sent: 20 June 2009 13:21
> To: Struts Users Mailing List
> Subject: RE: Doubt with using check box
>
>
>
> Pawel , can you expalin  with a example. I am totally new to struts.
>
> I tried with another way.
>
> Ie by adding a 'selected' field to the EmployeeBean.
>
> 
> 
>  />
>  />
> onchange="checkEmployee();" > 
> 
> 
>
> Now I am getting the values of selected as false in the Action. Even though
> I have selected it.
> I am using a action form for the some other elements in the same view.
>
> Could you guys can through some light on how to make this work?
>
>
> Regards
> Vishnu
>
>
>
> -Original Message-
> From: Paweł Wielgus [mailto:poulw...@gmail.com]
> Sent: 20 June 2009 10:40
> To: Struts Users Mailing List
> Subject: Re: Doubt with using check box
>
> Hi Vishnu,
> on the html page you will have a list of checkboxes with the same name
> "selectedEmployees" and a value of an employee identificator. In the
> action create settet setSelectedEmloyees(String[] selectedEmployees),
> then in execute You can access this table of employee identificators.
> Just as a side note, i don't know what type of is your employee
> identificator, so i proposed String, but it can also be long.
>
> Best greetings,
> Pawel Wielgus.
>
> 2009/6/20, Vishnu Vyasan Nelliparmbil :
> > Hi Friends,
> >
> > I am new to web development and struts. I have a simple question.
> >
> > I am using  tag to iterate through a list of Employees
> > and display their details.
> > The list contains the Employee objects.
> > Now while displaying Employee details in a table, the row is ending with
> > a check box , so that the user can select employees. The check boxes are
> > created dynamically since they are inside the iterate tag.
> >
> > Now how in Action I know that a specific employee is selected?
> >
> > In action form I would get whether the check box is selected or not. But
> > how can I relate that to employees in list?
> >
> > Thanks in Advance
> > vishnu
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>


Re: File "/WEB-INF/tld/struts-bean.tld" not found

2009-06-20 Thread Girish Naik
can you change the bean id to something different than the property name.
and check again.


Regards,
-
Girish Naik
Mobile:-+91-09740091638
girish.n...@gmail.com
Henny Youngman
- "I told the doctor I broke my leg in two places. He told me to quit
going
to those places."

On Sun, Jun 21, 2009 at 10:24 AM, Sam Wun  wrote:

> Opps. I commented out the taglibs in a jsp file.
> Added back in, now got antoehr problem with the getters:
>
> 14:48:04,429 ERROR [PortletRequestDispatcherImpl:316]
> org.apache.jasper.JasperException: javax.servlet.ServletException:
> javax.servlet.jsp.JspException: No getter method for property: "ship
> ping_address" of bean: "OrderForm"
> org.apache.jasper.JasperException: javax.servlet.ServletException:
> javax.servlet.jsp.JspException: No getter method for property:
> "shipping_address" of bean: "OrderForm"
>at
> org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:522)
>at
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:398)
>at
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
>at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
>at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
>at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
>
> I have the getters/setters in this java file.
> Here are the relevant files:
>
> 1/ order.jsp:
> <%@ include file="/html/portlet/onlinepayment_portlet/init.jsp" %>
>
>  property="shipping_address" type="java.lang.String" />
>
> 
>
>
>
> 
>
> 
> 
>  focus="shipping_address">
>
> 
> 
>   
>   />
> 
>  
> />
> 
> 
>  
>  />
> 
> 
>  
>  rows="12" cols="50" />
> 
> 
>  
>  cols="50" />
> 
>
> 
> 
>
> 
>   
>   
> 
>
> 2/ OrderForm.java:
> package com.ip6networks.onlinepayment.portlet;
>
> import javax.servlet.http.HttpServletRequest;
>
> import org.apache.struts.action.ActionErrors;
> import org.apache.struts.action.ActionForm;
> import org.apache.struts.action.ActionMapping;
> import org.apache.struts.action.ActionMessage;
>
> /**
>  * Search query entry form.
>  *
>  * @struts.form name="OrderForm"
>  */
> public class OrderForm extends ActionForm{
>private String firstname="";
>private String lastname="";
>private String email_address="";
>private String phone_number="";
>private String shipping_address="";
>private String billing_address="";
>/**
> * Sets the query attribute of the OrderForm object
> *
> * @struts.validator type="required" msgkey="error.firstname.required"
> * @struts.validator type="required" msgkey="error.lastname.required"
> * @struts.validator type="required"
> msgkey="error.email_address.required"
> * @struts.validator type="required"
> msgkey="error.phone_number.required"
> * @struts.validator type="required"
> msgkey="error.shipping_address.required"
> * @struts.validator type="required"
> msgkey="error.billing_address.required"
> */
>public void setFirstName(String fn){
>this.firstname = fn;
>}
>public String getFirstName(){
>return this.firstname;
>}
>public void setLastName(String ln){
>this.lastname = ln;
>}
>public String getLastName(){
>return this.lastname;
>}
>public void setEmailAddress(String email){
>this.email_address = email;
>}
>public String getEmailAddress(){
>return this.email_address;
>}
>public void setShippingAddress(String shipping) {
>this.shipping_address = shipping;
>}
>public String getShippingAddress(){
>return this.shipping_address;
>}
>public void setBillingAddress(String billing) {
>this.billing_address = billing;
>}
>public String getBillingAddress(){
>return this.billing_address;
>}
>public void setPhoneNumber(String ph) {
>this.phone_number = ph;
>}
>public String getPhoneNumber(){
>return this.phone_number;
>}
>
>public void reset(ActionMapping mapping, HttpServletRequest req) {
>this.firstname="";
>this.lastname="";
>this.phone_number="";
>this.email_address="";
>this.shipping_address="";
>this.billing_address="";
>}
>
> ...
> }
>
> I have already defined a set of getters/setters methods, I don't
> understand why it still complained.
> Is a problem in my path setting, thus it can't find my OrderForm.class?
>
> Thanks
>
> On Sun, Jun 21, 2009 at 6:13 AM, Dave Newton wrote:
> > Did you un-comment the taglib directives?
> >
> > Sam Wun wrote:
> >>
> >> Hi,
> >>
> >> Thanks for the instruction. It works after removed the struts-bean
> >> lines in web.xml and the lines in jsp files.
> >> But now I can't display message f

RE: Doubt with using check box

2009-06-20 Thread Vishnu Vyasan Nelliparmbil

Can anybody help me on this issue?




-Original Message-
From: Vishnu Vyasan Nelliparmbil [mailto:vis...@mun.gov.bh] 
Sent: 20 June 2009 13:21
To: Struts Users Mailing List
Subject: RE: Doubt with using check box



Pawel , can you expalin  with a example. I am totally new to struts.

I tried with another way.

Ie by adding a 'selected' field to the EmployeeBean. 



 
 
   



Now I am getting the values of selected as false in the Action. Even though I 
have selected it.
I am using a action form for the some other elements in the same view.

Could you guys can through some light on how to make this work?


Regards
Vishnu 



-Original Message-
From: Paweł Wielgus [mailto:poulw...@gmail.com] 
Sent: 20 June 2009 10:40
To: Struts Users Mailing List
Subject: Re: Doubt with using check box

Hi Vishnu,
on the html page you will have a list of checkboxes with the same name
"selectedEmployees" and a value of an employee identificator. In the
action create settet setSelectedEmloyees(String[] selectedEmployees),
then in execute You can access this table of employee identificators.
Just as a side note, i don't know what type of is your employee
identificator, so i proposed String, but it can also be long.

Best greetings,
Pawel Wielgus.

2009/6/20, Vishnu Vyasan Nelliparmbil :
> Hi Friends,
>
> I am new to web development and struts. I have a simple question.
>
> I am using  tag to iterate through a list of Employees
> and display their details.
> The list contains the Employee objects.
> Now while displaying Employee details in a table, the row is ending with
> a check box , so that the user can select employees. The check boxes are
> created dynamically since they are inside the iterate tag.
>
> Now how in Action I know that a specific employee is selected?
>
> In action form I would get whether the check box is selected or not. But
> how can I relate that to employees in list?
>
> Thanks in Advance
> vishnu
>
>
>
>
>
>
>
>
>
>
>
>

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



Re: File "/WEB-INF/tld/struts-bean.tld" not found

2009-06-20 Thread Sam Wun
Opps. I commented out the taglibs in a jsp file.
Added back in, now got antoehr problem with the getters:

14:48:04,429 ERROR [PortletRequestDispatcherImpl:316]
org.apache.jasper.JasperException: javax.servlet.ServletException:
javax.servlet.jsp.JspException: No getter method for property: "ship
ping_address" of bean: "OrderForm"
org.apache.jasper.JasperException: javax.servlet.ServletException:
javax.servlet.jsp.JspException: No getter method for property:
"shipping_address" of bean: "OrderForm"
at 
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:522)
at 
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:398)
at 
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)

I have the getters/setters in this java file.
Here are the relevant files:

1/ order.jsp:
<%@ include file="/html/portlet/onlinepayment_portlet/init.jsp" %>















  
  

  



  
 


  
 


  
 






   
   


2/ OrderForm.java:
package com.ip6networks.onlinepayment.portlet;

import javax.servlet.http.HttpServletRequest;

import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ActionMessage;

/**
 * Search query entry form.
 *
 * @struts.form name="OrderForm"
 */
public class OrderForm extends ActionForm{
private String firstname="";
private String lastname="";
private String email_address="";
private String phone_number="";
private String shipping_address="";
private String billing_address="";
/**
 * Sets the query attribute of the OrderForm object
 *
 * @struts.validator type="required" msgkey="error.firstname.required"
 * @struts.validator type="required" msgkey="error.lastname.required"
 * @struts.validator type="required" msgkey="error.email_address.required"
 * @struts.validator type="required" msgkey="error.phone_number.required"
 * @struts.validator type="required"
msgkey="error.shipping_address.required"
 * @struts.validator type="required" msgkey="error.billing_address.required"
 */
public void setFirstName(String fn){
this.firstname = fn;
}
public String getFirstName(){
return this.firstname;
}
public void setLastName(String ln){
this.lastname = ln;
}
public String getLastName(){
return this.lastname;
}
public void setEmailAddress(String email){
this.email_address = email;
}
public String getEmailAddress(){
return this.email_address;
}
public void setShippingAddress(String shipping) {
this.shipping_address = shipping;
}
public String getShippingAddress(){
return this.shipping_address;
}
public void setBillingAddress(String billing) {
this.billing_address = billing;
}
public String getBillingAddress(){
return this.billing_address;
}
public void setPhoneNumber(String ph) {
this.phone_number = ph;
}
public String getPhoneNumber(){
return this.phone_number;
}

public void reset(ActionMapping mapping, HttpServletRequest req) {
this.firstname="";
this.lastname="";
this.phone_number="";
this.email_address="";
this.shipping_address="";
this.billing_address="";
}

...
}

I have already defined a set of getters/setters methods, I don't
understand why it still complained.
Is a problem in my path setting, thus it can't find my OrderForm.class?

Thanks

On Sun, Jun 21, 2009 at 6:13 AM, Dave Newton wrote:
> Did you un-comment the taglib directives?
>
> Sam Wun wrote:
>>
>> Hi,
>>
>> Thanks for the instruction. It works after removed the struts-bean
>> lines in web.xml and the lines in jsp files.
>> But now I can't display message from the struts tags as shown below:
>> The message "This is Order page!!" is shown in my portlet page, the
>> rest of struts tagged message are not shown.
>>
>> in order.jsp file:
>>
>> <%@ include file="/html/portlet/onlinepayment_portlet/init.jsp" %>
>>
>> > property="shipping_address" type="java.lang.String" />
>>
>> 
>>        
>>        
>>        
>> 
>>
>> 
>> 
>> > focus="shipping_address">
>>
>> 
>> 
>>  This is Order page!!
>>  
>>  > />
>> 
>>  
>>    > />
>> 
>> 
>>  
>>     > />
>> 
>> 
>>  
>>     > rows="12" cols="50" />
>> 
>> 
>>  
>>     > cols="50" />
>> 
>>
>> 
>> 
>>
>> 
>>   
>>   
>> 
>>
>> In the path of
>> /usr/liferay-portal-5.2.3/tomcat-6.0.18/webapps/online-payment-5.2.3.1/WEB-INF/classes/resource:
>> I have a file application.properties:
>> ##
>> ## Custom errors
>> 

Re: confusion about s:select with multiple true

2009-06-20 Thread Dave Newton

Bhaarat Sharma wrote:

I have been playing around with this sample code:



This works as I want it to.  My question is, if I want values for 'list' and
'value' coming from the action class then should the method for list be
returning a hashMap? and value be returning a list? is that the only way?


Did you try using a list for the "list" attribute? Or check out the docs 
regarding the "list", "listKey", and "listValue" attributes?


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

Dave

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



confusion about s:select with multiple true

2009-06-20 Thread Bhaarat Sharma
I have been playing around with this sample code:




This works as I want it to.  My question is, if I want values for 'list' and
'value' coming from the action class then should the method for list be
returning a hashMap? and value be returning a list? is that the only way?


Re: Custom validation interceptor

2009-06-20 Thread Peter Bliznak
Preciously!..what you said about changing form is exactly what I was thinking.





From: Dave Newton 
To: Struts Users Mailing List 
Sent: Saturday, June 20, 2009 8:35:50 PM
Subject: Re: Custom validation interceptor

Peter Bliznak wrote:
> It is across entire app (there are many dozen of actions) - every
> single action has to have same behavior - 3 crosses go and try again.
>  It's app for changing personal info on government issued documents -
> sorta wizard like thing. I can see how I can do it by keeping eye of
> parameters - but I am looking for cleanest possible implementation. But if I 
> decide to modify default stack I am not certain what might
> be consequences for the rest of app.

None, if you do it right.

Since it's across the entire app I'd go the interceptor route--but you're still 
going to have to either use a hidden parameter, keep something in session, or 
whatever. Both have their advantages and disadvantages, but are basically the 
same complexity.

I'd probably consider modifying the  template to insert a hidden 
parameter, but that leaves it vulnerable to someone spoofing the validation 
count--if that's an issue. Otherwise you'd have to track a session variable, 
re-initialize it when a form is displayed for the first time, and so on.

Dave

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

Re: Custom validation interceptor

2009-06-20 Thread Dave Newton

Peter Bliznak wrote:

It is across entire app (there are many dozen of actions) - every
single action has to have same behavior - 3 crosses go and try again.
 It's app for changing personal info on government issued documents -
sorta wizard like thing. I can see how I can do it by keeping eye of
parameters - but I am looking for cleanest possible implementation. 
But if I decide to modify default stack I am not certain what might

be consequences for the rest of app.


None, if you do it right.

Since it's across the entire app I'd go the interceptor route--but 
you're still going to have to either use a hidden parameter, keep 
something in session, or whatever. Both have their advantages and 
disadvantages, but are basically the same complexity.


I'd probably consider modifying the  template to insert a hidden 
parameter, but that leaves it vulnerable to someone spoofing the 
validation count--if that's an issue. Otherwise you'd have to track a 
session variable, re-initialize it when a form is displayed for the 
first time, and so on.


Dave

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



Re: Custom validation interceptor

2009-06-20 Thread Peter Bliznak
It is across entire app (there are many dozen of actions) - every single action 
has to have same behavior - 3 crosses go and try again.
It's app for changing personal info on government issued documents - sorta 
wizard like thing.
I can see how I can do it by keeping eye of parameters - but I am looking for 
cleanest possible implementation.
But if I decide to modify default stack I am not certain what might be 
consequences for the rest of app.






From: Dave Newton 
To: Struts Users Mailing List 
Sent: Saturday, June 20, 2009 7:57:24 PM
Subject: Re: Custom validation interceptor

Peter Bliznak wrote:
> I have following requirement: If validation of the page fails 3 times
> in row - invalidate session and redirect to index page. Should I
> replace default validation interceptor in default stack with my own
> to achieve what I am after? I there any other way?

Is this across the entire app or just a single action?

If it's just a single action then this could probably be done via a session var 
or a hidden counter (updated in the actions validate() method)... although I'm 
not sure how you'd tell the workflow interceptor to go to the "strike three" 
page.

AFAICT the workflow.inputResultName parameter doesn't eval OGNL, so you'd have 
to set the result location in the action--seems messy.

I started off thinking no on the interceptor, but now I'm not so sure.

Dave

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

Re: using multiple param in s:url tag

2009-06-20 Thread Dave Newton

Bhaarat Sharma wrote:

had to used 'escape' in s:property tag.

like this: 


Just FYI, the "escape" attribute is a boolean (true/false).

I forget when 's "escapeAmp" property was added--knowing what 
version of S2 you're using would be a helpful diagnostic.


Dave

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



Re: Custom validation interceptor

2009-06-20 Thread Dave Newton

Peter Bliznak wrote:

I have following requirement: If validation of the page fails 3 times
in row - invalidate session and redirect to index page. Should I
replace default validation interceptor in default stack with my own
to achieve what I am after? I there any other way?


Is this across the entire app or just a single action?

If it's just a single action then this could probably be done via a 
session var or a hidden counter (updated in the actions validate() 
method)... although I'm not sure how you'd tell the workflow interceptor 
to go to the "strike three" page.


AFAICT the workflow.inputResultName parameter doesn't eval OGNL, so 
you'd have to set the result location in the action--seems messy.


I started off thinking no on the interceptor, but now I'm not so sure.

Dave

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



Re: using multiple param in s:url tag

2009-06-20 Thread Bhaarat Sharma
nevermind..solved it.

had to used 'escape' in s:property tag.

like this: 

On Sat, Jun 20, 2009 at 7:25 PM, Bhaarat Sharma  wrote:

> according to documentation...if I try to use escapeAmp property in my s:url
> tag then I get the following error...
>
> Attribute escapeAmp invalid for tag url according to TLD
>
>
> On Sat, Jun 20, 2009 at 7:16 PM, Bhaarat Sharma wrote:
>
>> Hello,
>>
>> I am using param tag inside s:url tag like the following
>>
>> 
>>
>>
>>   
>>
>>">> name="tenant.edit"/>
>> 
>>
>> hshid is int
>> sSN is string
>>
>> However, in the final URL the two parameters are separated by &  This
>> should not be there.  Does anyone know how to avoid &?
>>
>
>


Re: Custom validation interceptor

2009-06-20 Thread Wes Wannemacher
I don't think a custom interceptor is required. You could probably get
this done through hidden parameters or by storing attempts in the
session or something. Do you have this req for one action or all
actions in the app?

On 6/20/09, Peter Bliznak  wrote:
> Hi,
> I have following requirement:
> If validation of the page fails 3 times in row - invalidate session and
> redirect to index page.
> Should I replace default validation interceptor in default stack with my own
> to achieve what I am after?
> I there any other way?
> Any hint would be greatly appreciated
>
> Peter.
>


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

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



Re: using multiple param in s:url tag

2009-06-20 Thread Bhaarat Sharma
according to documentation...if I try to use escapeAmp property in my s:url
tag then I get the following error...

Attribute escapeAmp invalid for tag url according to TLD

On Sat, Jun 20, 2009 at 7:16 PM, Bhaarat Sharma  wrote:

> Hello,
>
> I am using param tag inside s:url tag like the following
>
> 
>
>
>   
>
>"> name="tenant.edit"/>
> 
>
> hshid is int
> sSN is string
>
> However, in the final URL the two parameters are separated by &  This
> should not be there.  Does anyone know how to avoid &?
>


using multiple param in s:url tag

2009-06-20 Thread Bhaarat Sharma
Hello,

I am using param tag inside s:url tag like the following


   
   
  
   
   ">


hshid is int
sSN is string

However, in the final URL the two parameters are separated by &  This
should not be there.  Does anyone know how to avoid &?


Custom validation interceptor

2009-06-20 Thread Peter Bliznak
  Hi,I have following requirement:If validation of the page fails 3 times
 in row - invalidate session and redirect to index page.Should I replace default validation interceptor in default stack with my own to achieve what I am after?I there any other way?Any hint would be greatly appreciatedPeter.  

Re: Input validation in Struts 2 and extrating the errors in jsp

2009-06-20 Thread Thomas Rene Vervik

Perfect, thanks both, it solve the issue :)



Thomas Rene Vervik wrote:
> 
> I manage to do input validation when I have one of the default themes
> selected (xhtml, css_xhtml, etc). But what if I dont want to use
> Freemarker, I want to build the whole HTML in my Jsp, how do I "extract"
> the error messages the validation framework generate.
> Example, see the code in the code paragraph
> 
> 
> 
> How do I extract the error messages in the Jsp when I have the theme set
> to simple?
> 
> 
> public class Person{
> private String name;
> Private String email;
> } 
>  
> I have the following validation xml file:
> 
> 
> 
> You must enter a name
> 
> 
> 
> 
> You must enter a email address
> 
> 
> 
>  
> And this form:
> 
>  value="%{name}"/>
>  value="%{email}"/>
> 
> 
> 
> Thanks for all help
> 

-- 
View this message in context: 
http://www.nabble.com/Input-validation-in-Struts-2-and-extrating-the-errors-in-jsp-tp24120894p24129281.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: File "/WEB-INF/tld/struts-bean.tld" not found

2009-06-20 Thread Dave Newton

Did you un-comment the taglib directives?

Sam Wun wrote:

Hi,

Thanks for the instruction. It works after removed the struts-bean
lines in web.xml and the lines in jsp files.
But now I can't display message from the struts tags as shown below:
The message "This is Order page!!" is shown in my portlet page, the
rest of struts tagged message are not shown.

in order.jsp file:

<%@ include file="/html/portlet/onlinepayment_portlet/init.jsp" %>















  This is Order page!!
  
  

  



  
 


  
 


  
 






   
   


In the path of 
/usr/liferay-portal-5.2.3/tomcat-6.0.18/webapps/online-payment-5.2.3.1/WEB-INF/classes/resource:
I have a file application.properties:
##
## Custom errors
##
error.shipping_address.invalid=Shipping address is required.
error.name.required=Please enter your name.
error.name.invalid=Invalid input in Name field.
error.emailaddr.required=Please enter your email address.
error.emailaddr.invalid=Invalid input for email address.
error.comment.required=Please enter your inquiry.
error.comment.invalid=Please fill in all fields. Email field must be a
valid email address.

##
## Custom labels and Messages
##
form.firstname=First Name *
form.lastname=Lasat Name *
form.shipping_address=Shipping Address *
form.billing_address=Billing Address *
form.email_address=Email Address*
button.submit=Submit

These messages are supposed mapped into the order.jsp file in run
time. But nothing is shown on the webpage at the moment, except the
message in  html tags.

That has happened here? Any idea?

Thanks again.



On Sun, Jun 21, 2009 at 2:44 AM, Girish Naik wrote:

as you dont have the files in WEB-INF can you remove the mapping in web.xml
and run again?


Regards,
-
Girish Naik
Mobile:-+91-09740091638
girish.n...@gmail.com
George Carlin
- "Electricity is really just organized lightning."

On Sat, Jun 20, 2009 at 8:57 PM, Sam Wun  wrote:


thanks for the response.
I moved the following taglib lines into the /** ***/ area in the jsp
file, and the recompile/deploy with ant. It still give me the same
errors.

Here is the jsp file load the tld files:
<%
/**
<%@ taglib uri="http://java.sun.com/portlet_2_0"; prefix="portlet" %>
<%@ taglib uri="http://struts.apache.org/tags-bean"; prefix="bean" %>
<%@ taglib uri="http://struts.apache.org/tags-html"; prefix="html" %>
<%@ taglib uri="http://struts.apache.org/tags-logic"; prefix="logic" %>
 */
%>

<%@ page import="javax.portlet.PortletRequest" %>
<%@ page import="javax.portlet.PortletSession" %>




  <%@ include file="/css/style.css" %>



here is the errors again:
01:23:47,290 INFO  [PluginPackageUtil:1347] Checking for available updates
01:23:47,293 INFO  [PluginPackageUtil:1391] Finished checking for
available updates in 3 ms
01:23:54,476 ERROR [PortletRequestDispatcherImpl:316]
org.apache.jasper.JasperException:
/html/portlet/onlinepayment_portlet/order.jsp(1,1) File
"/WEB-INF/tld/struts-bean.tld" not found
org.apache.jasper.JasperException:
/html/portlet/onlinepayment_portlet/order.jsp(1,1) File
"/WEB-INF/tld/struts-bean.tld" not found
   at
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:40)
   at
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407)
at
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:88)
   at
org.apache.jasper.compiler.Parser.processIncludeDirective(Parser.java:345)
   at
org.apache.jasper.compiler.Parser.parseIncludeDirective(Parser.java:378)
   at org.apache.jasper.compiler.Parser.parseDirective(Parser.java:486)
   at org.apache.jasper.compiler.Parser.parseElements(Parser.java:1444)



On Sun, Jun 21, 2009 at 1:10 AM, Girish Naik wrote:

I would sugest you to remove the taglib configuration in ur web.xml. As

it

is matching the uri and trying to load from the local file.

In my previous application i had given :
<%@ taglib uri="http://struts.apache.org/tags-bean"; prefix="bean" %>

in my jsp header and

   /tags/struts-bean
   /WEB-INF/struts-bean.tld
   
in web.xml
And they are working fine.

So either you can give :
<%@ taglib uri="http://struts.apache.org/tags-bean"; prefix="bean" %>

 or (if u have a local tag lib)

<%@ taglib uri="/tags/struts-bean" prefix="bean" %>


Regards,
-
Girish Naik
Mobile:-+91-09740091638
girish.n...@gmail.com
Fran Lebowitz<

http://www.brainyquote.com/quotes/authors/f/fran_lebowitz.html>

- "Life is something to do when you can't get to sleep."

On Sat, Jun 20, 2009 at 7:42 PM, Sam Wun  wrote:


Dear all,

Can anyone tell me what is wrong with the following errors:



00:05:59,378 ERROR [PortletRequestDispatcherImpl:316]
org.apache.jasper.JasperException:
/html/portlet/onlinepayment_portlet/order.jsp(1,1) File
"/WEB-INF/tld/struts-bean.tld" not found
org.a

Re: File "/WEB-INF/tld/struts-bean.tld" not found

2009-06-20 Thread Sam Wun
I have already defined the following xml codes in the struts-config.xml file:






and I have created this application.properties in the followiong path:
 # pwd
/usr/liferay-portal-5.2.3/dev/portlets/online-payment/docroot/WEB-INF/classes/resources



On Sun, Jun 21, 2009 at 3:15 AM, Sam Wun wrote:
> Hi,
>
> Thanks for the instruction. It works after removed the struts-bean
> lines in web.xml and the lines in jsp files.
> But now I can't display message from the struts tags as shown below:
> The message "This is Order page!!" is shown in my portlet page, the
> rest of struts tagged message are not shown.
>
> in order.jsp file:
>
> <%@ include file="/html/portlet/onlinepayment_portlet/init.jsp" %>
>
>  property="shipping_address" type="java.lang.String" />
>
> 
>        
>        
>        
> 
>
> 
> 
>  focus="shipping_address">
>
> 
> 
>  This is Order page!!
>  
>  
> 
>  
>     />
> 
> 
>  
>     
> 
> 
>  
>      rows="12" cols="50" />
> 
> 
>  
>      cols="50" />
> 
>
> 
> 
>
> 
>   
>   
> 
>
> In the path of 
> /usr/liferay-portal-5.2.3/tomcat-6.0.18/webapps/online-payment-5.2.3.1/WEB-INF/classes/resource:
> I have a file application.properties:
> ##
> ## Custom errors
> ##
> error.shipping_address.invalid=Shipping address is required.
> error.name.required=Please enter your name.
> error.name.invalid=Invalid input in Name field.
> error.emailaddr.required=Please enter your email address.
> error.emailaddr.invalid=Invalid input for email address.
> error.comment.required=Please enter your inquiry.
> error.comment.invalid=Please fill in all fields. Email field must be a
> valid email address.
>
> ##
> ## Custom labels and Messages
> ##
> form.firstname=First Name *
> form.lastname=Lasat Name *
> form.shipping_address=Shipping Address *
> form.billing_address=Billing Address *
> form.email_address=Email Address*
> button.submit=Submit
>
> These messages are supposed mapped into the order.jsp file in run
> time. But nothing is shown on the webpage at the moment, except the
> message in  html tags.
>
> That has happened here? Any idea?
>
> Thanks again.
>
>
>
> On Sun, Jun 21, 2009 at 2:44 AM, Girish Naik wrote:
>> as you dont have the files in WEB-INF can you remove the mapping in web.xml
>> and run again?
>>
>>
>> Regards,
>> -
>> Girish Naik
>> Mobile:-+91-09740091638
>> girish.n...@gmail.com
>> George Carlin
>> - "Electricity is really just organized lightning."
>>
>> On Sat, Jun 20, 2009 at 8:57 PM, Sam Wun  wrote:
>>
>>> thanks for the response.
>>> I moved the following taglib lines into the /** ***/ area in the jsp
>>> file, and the recompile/deploy with ant. It still give me the same
>>> errors.
>>>
>>> Here is the jsp file load the tld files:
>>> <%
>>> /**
>>> <%@ taglib uri="http://java.sun.com/portlet_2_0"; prefix="portlet" %>
>>> <%@ taglib uri="http://struts.apache.org/tags-bean"; prefix="bean" %>
>>> <%@ taglib uri="http://struts.apache.org/tags-html"; prefix="html" %>
>>> <%@ taglib uri="http://struts.apache.org/tags-logic"; prefix="logic" %>
>>>  */
>>> %>
>>>
>>> <%@ page import="javax.portlet.PortletRequest" %>
>>> <%@ page import="javax.portlet.PortletSession" %>
>>>
>>> 
>>>
>>> 
>>>   <%@ include file="/css/style.css" %>
>>> 
>>>
>>>
>>> here is the errors again:
>>> 01:23:47,290 INFO  [PluginPackageUtil:1347] Checking for available updates
>>> 01:23:47,293 INFO  [PluginPackageUtil:1391] Finished checking for
>>> available updates in 3 ms
>>> 01:23:54,476 ERROR [PortletRequestDispatcherImpl:316]
>>> org.apache.jasper.JasperException:
>>> /html/portlet/onlinepayment_portlet/order.jsp(1,1) File
>>> "/WEB-INF/tld/struts-bean.tld" not found
>>> org.apache.jasper.JasperException:
>>> /html/portlet/onlinepayment_portlet/order.jsp(1,1) File
>>> "/WEB-INF/tld/struts-bean.tld" not found
>>>        at
>>> org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:40)
>>>        at
>>> org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407)
>>>         at
>>> org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:88)
>>>        at
>>> org.apache.jasper.compiler.Parser.processIncludeDirective(Parser.java:345)
>>>        at
>>> org.apache.jasper.compiler.Parser.parseIncludeDirective(Parser.java:378)
>>>        at org.apache.jasper.compiler.Parser.parseDirective(Parser.java:486)
>>>        at org.apache.jasper.compiler.Parser.parseElements(Parser.java:1444)
>>>
>>>
>>>
>>> On Sun, Jun 21, 2009 at 1:10 AM, Girish Naik wrote:
>>> > I would sugest you to remove the taglib configuration in ur web.xml. As
>>> it
>>> > is matching the uri and trying to load from the local file.
>>> >
>>> > In my previous application i had given :
>>> > <%@ taglib uri="http://struts.apache.org/tags-bean"; prefix="bean" %>
>>> >
>>> > in my jsp header and
>>> > 
>>> >        /tags/struts-bean
>>> > 

Re: File "/WEB-INF/tld/struts-bean.tld" not found

2009-06-20 Thread Sam Wun
Hi,

Thanks for the instruction. It works after removed the struts-bean
lines in web.xml and the lines in jsp files.
But now I can't display message from the struts tags as shown below:
The message "This is Order page!!" is shown in my portlet page, the
rest of struts tagged message are not shown.

in order.jsp file:

<%@ include file="/html/portlet/onlinepayment_portlet/init.jsp" %>















  This is Order page!!
  
  

  



  
 


  
 


  
 






   
   


In the path of 
/usr/liferay-portal-5.2.3/tomcat-6.0.18/webapps/online-payment-5.2.3.1/WEB-INF/classes/resource:
I have a file application.properties:
##
## Custom errors
##
error.shipping_address.invalid=Shipping address is required.
error.name.required=Please enter your name.
error.name.invalid=Invalid input in Name field.
error.emailaddr.required=Please enter your email address.
error.emailaddr.invalid=Invalid input for email address.
error.comment.required=Please enter your inquiry.
error.comment.invalid=Please fill in all fields. Email field must be a
valid email address.

##
## Custom labels and Messages
##
form.firstname=First Name *
form.lastname=Lasat Name *
form.shipping_address=Shipping Address *
form.billing_address=Billing Address *
form.email_address=Email Address*
button.submit=Submit

These messages are supposed mapped into the order.jsp file in run
time. But nothing is shown on the webpage at the moment, except the
message in  html tags.

That has happened here? Any idea?

Thanks again.



On Sun, Jun 21, 2009 at 2:44 AM, Girish Naik wrote:
> as you dont have the files in WEB-INF can you remove the mapping in web.xml
> and run again?
>
>
> Regards,
> -
> Girish Naik
> Mobile:-+91-09740091638
> girish.n...@gmail.com
> George Carlin
> - "Electricity is really just organized lightning."
>
> On Sat, Jun 20, 2009 at 8:57 PM, Sam Wun  wrote:
>
>> thanks for the response.
>> I moved the following taglib lines into the /** ***/ area in the jsp
>> file, and the recompile/deploy with ant. It still give me the same
>> errors.
>>
>> Here is the jsp file load the tld files:
>> <%
>> /**
>> <%@ taglib uri="http://java.sun.com/portlet_2_0"; prefix="portlet" %>
>> <%@ taglib uri="http://struts.apache.org/tags-bean"; prefix="bean" %>
>> <%@ taglib uri="http://struts.apache.org/tags-html"; prefix="html" %>
>> <%@ taglib uri="http://struts.apache.org/tags-logic"; prefix="logic" %>
>>  */
>> %>
>>
>> <%@ page import="javax.portlet.PortletRequest" %>
>> <%@ page import="javax.portlet.PortletSession" %>
>>
>> 
>>
>> 
>>   <%@ include file="/css/style.css" %>
>> 
>>
>>
>> here is the errors again:
>> 01:23:47,290 INFO  [PluginPackageUtil:1347] Checking for available updates
>> 01:23:47,293 INFO  [PluginPackageUtil:1391] Finished checking for
>> available updates in 3 ms
>> 01:23:54,476 ERROR [PortletRequestDispatcherImpl:316]
>> org.apache.jasper.JasperException:
>> /html/portlet/onlinepayment_portlet/order.jsp(1,1) File
>> "/WEB-INF/tld/struts-bean.tld" not found
>> org.apache.jasper.JasperException:
>> /html/portlet/onlinepayment_portlet/order.jsp(1,1) File
>> "/WEB-INF/tld/struts-bean.tld" not found
>>        at
>> org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:40)
>>        at
>> org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407)
>>         at
>> org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:88)
>>        at
>> org.apache.jasper.compiler.Parser.processIncludeDirective(Parser.java:345)
>>        at
>> org.apache.jasper.compiler.Parser.parseIncludeDirective(Parser.java:378)
>>        at org.apache.jasper.compiler.Parser.parseDirective(Parser.java:486)
>>        at org.apache.jasper.compiler.Parser.parseElements(Parser.java:1444)
>>
>>
>>
>> On Sun, Jun 21, 2009 at 1:10 AM, Girish Naik wrote:
>> > I would sugest you to remove the taglib configuration in ur web.xml. As
>> it
>> > is matching the uri and trying to load from the local file.
>> >
>> > In my previous application i had given :
>> > <%@ taglib uri="http://struts.apache.org/tags-bean"; prefix="bean" %>
>> >
>> > in my jsp header and
>> > 
>> >        /tags/struts-bean
>> >        /WEB-INF/struts-bean.tld
>> >    
>> > in web.xml
>> > And they are working fine.
>> >
>> > So either you can give :
>> > <%@ taglib uri="http://struts.apache.org/tags-bean"; prefix="bean" %>
>> >
>> >  or (if u have a local tag lib)
>> >
>> > <%@ taglib uri="/tags/struts-bean" prefix="bean" %>
>> >
>> >
>> > Regards,
>> > -
>> > Girish Naik
>> > Mobile:-+91-09740091638
>> > girish.n...@gmail.com
>> > Fran Lebowitz<
>> http://www.brainyquote.com/quotes/authors/f/fran_lebowitz.html>
>> > - "Life is something to do when you can't get to sleep."
>> >
>> > On Sat, Jun 20, 2009 at 7:42 PM, Sam Wun  wrote:
>> >
>> >> Dea

Re: File "/WEB-INF/tld/struts-bean.tld" not found

2009-06-20 Thread Girish Naik
as you dont have the files in WEB-INF can you remove the mapping in web.xml
and run again?


Regards,
-
Girish Naik
Mobile:-+91-09740091638
girish.n...@gmail.com
George Carlin
- "Electricity is really just organized lightning."

On Sat, Jun 20, 2009 at 8:57 PM, Sam Wun  wrote:

> thanks for the response.
> I moved the following taglib lines into the /** ***/ area in the jsp
> file, and the recompile/deploy with ant. It still give me the same
> errors.
>
> Here is the jsp file load the tld files:
> <%
> /**
> <%@ taglib uri="http://java.sun.com/portlet_2_0"; prefix="portlet" %>
> <%@ taglib uri="http://struts.apache.org/tags-bean"; prefix="bean" %>
> <%@ taglib uri="http://struts.apache.org/tags-html"; prefix="html" %>
> <%@ taglib uri="http://struts.apache.org/tags-logic"; prefix="logic" %>
>  */
> %>
>
> <%@ page import="javax.portlet.PortletRequest" %>
> <%@ page import="javax.portlet.PortletSession" %>
>
> 
>
> 
>   <%@ include file="/css/style.css" %>
> 
>
>
> here is the errors again:
> 01:23:47,290 INFO  [PluginPackageUtil:1347] Checking for available updates
> 01:23:47,293 INFO  [PluginPackageUtil:1391] Finished checking for
> available updates in 3 ms
> 01:23:54,476 ERROR [PortletRequestDispatcherImpl:316]
> org.apache.jasper.JasperException:
> /html/portlet/onlinepayment_portlet/order.jsp(1,1) File
> "/WEB-INF/tld/struts-bean.tld" not found
> org.apache.jasper.JasperException:
> /html/portlet/onlinepayment_portlet/order.jsp(1,1) File
> "/WEB-INF/tld/struts-bean.tld" not found
>at
> org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:40)
>at
> org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407)
> at
> org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:88)
>at
> org.apache.jasper.compiler.Parser.processIncludeDirective(Parser.java:345)
>at
> org.apache.jasper.compiler.Parser.parseIncludeDirective(Parser.java:378)
>at org.apache.jasper.compiler.Parser.parseDirective(Parser.java:486)
>at org.apache.jasper.compiler.Parser.parseElements(Parser.java:1444)
>
>
>
> On Sun, Jun 21, 2009 at 1:10 AM, Girish Naik wrote:
> > I would sugest you to remove the taglib configuration in ur web.xml. As
> it
> > is matching the uri and trying to load from the local file.
> >
> > In my previous application i had given :
> > <%@ taglib uri="http://struts.apache.org/tags-bean"; prefix="bean" %>
> >
> > in my jsp header and
> > 
> >/tags/struts-bean
> >/WEB-INF/struts-bean.tld
> >
> > in web.xml
> > And they are working fine.
> >
> > So either you can give :
> > <%@ taglib uri="http://struts.apache.org/tags-bean"; prefix="bean" %>
> >
> >  or (if u have a local tag lib)
> >
> > <%@ taglib uri="/tags/struts-bean" prefix="bean" %>
> >
> >
> > Regards,
> > -
> > Girish Naik
> > Mobile:-+91-09740091638
> > girish.n...@gmail.com
> > Fran Lebowitz<
> http://www.brainyquote.com/quotes/authors/f/fran_lebowitz.html>
> > - "Life is something to do when you can't get to sleep."
> >
> > On Sat, Jun 20, 2009 at 7:42 PM, Sam Wun  wrote:
> >
> >> Dear all,
> >>
> >> Can anyone tell me what is wrong with the following errors:
> >>
> >> 
> >>
> >> 00:05:59,378 ERROR [PortletRequestDispatcherImpl:316]
> >> org.apache.jasper.JasperException:
> >> /html/portlet/onlinepayment_portlet/order.jsp(1,1) File
> >> "/WEB-INF/tld/struts-bean.tld" not found
> >> org.apache.jasper.JasperException:
> >> /html/portlet/onlinepayment_portlet/order.jsp(1,1) File
> >> "/WEB-INF/tld/struts-bean.tld" not found
> >>at
> >>
> org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:40)
> >>at
> >>
> org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407)
> >> ...
> >>
> >> I have already defined tag-libs in my web.xml file:
> >>
> >>http://struts.apache.org/tags-bean
> 
> >>
> >>  /WEB-INF/tld/struts-bean.tld
> >>
> >>
> >> of course struts-bean.tld is not in my WEB-INF/tld directory, but I
> >> expect it will pick up the file from the lib path like the other
> >> sample does.
> >> I am sure most of you don't have this file in your project directory.
> >>
> >> This is the init.jsp file that is included in the order.jsp file:
> >>
> >> <%@ taglib uri="http://java.sun.com/portlet_2_0"; prefix="portlet" %>
> >> <%@ taglib uri="http://struts.apache.org/tags-bean"; prefix="bean" %>
> >> <%@ taglib uri="http://struts.apache.org/tags-html"; prefix="html" %>
> >> <%@ taglib uri="http://struts.apache.org/tags-logic"; prefix="logic" %>
> >>
> >> <%@ page import="javax.portlet.PortletRequest" %>
> >> <%@ page import="javax.portlet.PortletSession" %>
> >>
> >>
> >> Any idea?
> >> Your help is very much appreciated.
> >> Thanks
> >>
> >> ---

Re: File "/WEB-INF/tld/struts-bean.tld" not found

2009-06-20 Thread Sam Wun
Yeah, it works after removed them all :)
but what  have happened? I just don't know why another project works
wtih these lines here, may be there is some xml configuration
difference.

Thanks


On Sun, Jun 21, 2009 at 1:41 AM, Dave Newton wrote:
> Did you remove the configurations from the web.xml file?
>
> Sam Wun wrote:
>>
>> Here is the jsp file load the tld files:
>> <%
>> /**
>> <%@ taglib uri="http://java.sun.com/portlet_2_0"; prefix="portlet" %>
>> <%@ taglib uri="http://struts.apache.org/tags-bean"; prefix="bean" %>
>> <%@ taglib uri="http://struts.apache.org/tags-html"; prefix="html" %>
>> <%@ taglib uri="http://struts.apache.org/tags-logic"; prefix="logic" %>
>>  */
>> %>
>
> That won't work at all--now your page has no taglibs.
>
>> 
>
> Dave
>
> -
> 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: File "/WEB-INF/tld/struts-bean.tld" not found

2009-06-20 Thread Dave Newton

Did you remove the configurations from the web.xml file?

Sam Wun wrote:

Here is the jsp file load the tld files:
<%
/**
<%@ taglib uri="http://java.sun.com/portlet_2_0"; prefix="portlet" %>
<%@ taglib uri="http://struts.apache.org/tags-bean"; prefix="bean" %>
<%@ taglib uri="http://struts.apache.org/tags-html"; prefix="html" %>
<%@ taglib uri="http://struts.apache.org/tags-logic"; prefix="logic" %>
 */
%>


That won't work at all--now your page has no taglibs.





Dave

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



Re: File "/WEB-INF/tld/struts-bean.tld" not found

2009-06-20 Thread Sam Wun
thanks for the response.
I moved the following taglib lines into the /** ***/ area in the jsp
file, and the recompile/deploy with ant. It still give me the same
errors.

Here is the jsp file load the tld files:
<%
/**
<%@ taglib uri="http://java.sun.com/portlet_2_0"; prefix="portlet" %>
<%@ taglib uri="http://struts.apache.org/tags-bean"; prefix="bean" %>
<%@ taglib uri="http://struts.apache.org/tags-html"; prefix="html" %>
<%@ taglib uri="http://struts.apache.org/tags-logic"; prefix="logic" %>
 */
%>

<%@ page import="javax.portlet.PortletRequest" %>
<%@ page import="javax.portlet.PortletSession" %>




   <%@ include file="/css/style.css" %>



here is the errors again:
01:23:47,290 INFO  [PluginPackageUtil:1347] Checking for available updates
01:23:47,293 INFO  [PluginPackageUtil:1391] Finished checking for
available updates in 3 ms
01:23:54,476 ERROR [PortletRequestDispatcherImpl:316]
org.apache.jasper.JasperException:
/html/portlet/onlinepayment_portlet/order.jsp(1,1) File
"/WEB-INF/tld/struts-bean.tld" not found
org.apache.jasper.JasperException:
/html/portlet/onlinepayment_portlet/order.jsp(1,1) File
"/WEB-INF/tld/struts-bean.tld" not found
at 
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:40)
at 
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407)
at 
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:88)
at 
org.apache.jasper.compiler.Parser.processIncludeDirective(Parser.java:345)
at 
org.apache.jasper.compiler.Parser.parseIncludeDirective(Parser.java:378)
at org.apache.jasper.compiler.Parser.parseDirective(Parser.java:486)
at org.apache.jasper.compiler.Parser.parseElements(Parser.java:1444)



On Sun, Jun 21, 2009 at 1:10 AM, Girish Naik wrote:
> I would sugest you to remove the taglib configuration in ur web.xml. As it
> is matching the uri and trying to load from the local file.
>
> In my previous application i had given :
> <%@ taglib uri="http://struts.apache.org/tags-bean"; prefix="bean" %>
>
> in my jsp header and
> 
>        /tags/struts-bean
>        /WEB-INF/struts-bean.tld
>    
> in web.xml
> And they are working fine.
>
> So either you can give :
> <%@ taglib uri="http://struts.apache.org/tags-bean"; prefix="bean" %>
>
>  or (if u have a local tag lib)
>
> <%@ taglib uri="/tags/struts-bean" prefix="bean" %>
>
>
> Regards,
> -
> Girish Naik
> Mobile:-+91-09740091638
> girish.n...@gmail.com
> Fran Lebowitz
> - "Life is something to do when you can't get to sleep."
>
> On Sat, Jun 20, 2009 at 7:42 PM, Sam Wun  wrote:
>
>> Dear all,
>>
>> Can anyone tell me what is wrong with the following errors:
>>
>> 
>>
>> 00:05:59,378 ERROR [PortletRequestDispatcherImpl:316]
>> org.apache.jasper.JasperException:
>> /html/portlet/onlinepayment_portlet/order.jsp(1,1) File
>> "/WEB-INF/tld/struts-bean.tld" not found
>> org.apache.jasper.JasperException:
>> /html/portlet/onlinepayment_portlet/order.jsp(1,1) File
>> "/WEB-INF/tld/struts-bean.tld" not found
>>        at
>> org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:40)
>>        at
>> org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407)
>> ...
>>
>> I have already defined tag-libs in my web.xml file:
>>        
>>                http://struts.apache.org/tags-bean
>>
>>  /WEB-INF/tld/struts-bean.tld
>>        
>>
>> of course struts-bean.tld is not in my WEB-INF/tld directory, but I
>> expect it will pick up the file from the lib path like the other
>> sample does.
>> I am sure most of you don't have this file in your project directory.
>>
>> This is the init.jsp file that is included in the order.jsp file:
>>
>> <%@ taglib uri="http://java.sun.com/portlet_2_0"; prefix="portlet" %>
>> <%@ taglib uri="http://struts.apache.org/tags-bean"; prefix="bean" %>
>> <%@ taglib uri="http://struts.apache.org/tags-html"; prefix="html" %>
>> <%@ taglib uri="http://struts.apache.org/tags-logic"; prefix="logic" %>
>>
>> <%@ page import="javax.portlet.PortletRequest" %>
>> <%@ page import="javax.portlet.PortletSession" %>
>>
>>
>> Any idea?
>> Your help is very much appreciated.
>> Thanks
>>
>> -
>> 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: File "/WEB-INF/tld/struts-bean.tld" not found

2009-06-20 Thread Girish Naik
I would sugest you to remove the taglib configuration in ur web.xml. As it
is matching the uri and trying to load from the local file.

In my previous application i had given :
<%@ taglib uri="http://struts.apache.org/tags-bean"; prefix="bean" %>

in my jsp header and

/tags/struts-bean
/WEB-INF/struts-bean.tld

in web.xml
And they are working fine.

So either you can give :
<%@ taglib uri="http://struts.apache.org/tags-bean"; prefix="bean" %>

 or (if u have a local tag lib)

<%@ taglib uri="/tags/struts-bean" prefix="bean" %>


Regards,
-
Girish Naik
Mobile:-+91-09740091638
girish.n...@gmail.com
Fran Lebowitz
- "Life is something to do when you can't get to sleep."

On Sat, Jun 20, 2009 at 7:42 PM, Sam Wun  wrote:

> Dear all,
>
> Can anyone tell me what is wrong with the following errors:
>
> 
>
> 00:05:59,378 ERROR [PortletRequestDispatcherImpl:316]
> org.apache.jasper.JasperException:
> /html/portlet/onlinepayment_portlet/order.jsp(1,1) File
> "/WEB-INF/tld/struts-bean.tld" not found
> org.apache.jasper.JasperException:
> /html/portlet/onlinepayment_portlet/order.jsp(1,1) File
> "/WEB-INF/tld/struts-bean.tld" not found
>at
> org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:40)
>at
> org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407)
> ...
>
> I have already defined tag-libs in my web.xml file:
>
>http://struts.apache.org/tags-bean
>
>  /WEB-INF/tld/struts-bean.tld
>
>
> of course struts-bean.tld is not in my WEB-INF/tld directory, but I
> expect it will pick up the file from the lib path like the other
> sample does.
> I am sure most of you don't have this file in your project directory.
>
> This is the init.jsp file that is included in the order.jsp file:
>
> <%@ taglib uri="http://java.sun.com/portlet_2_0"; prefix="portlet" %>
> <%@ taglib uri="http://struts.apache.org/tags-bean"; prefix="bean" %>
> <%@ taglib uri="http://struts.apache.org/tags-html"; prefix="html" %>
> <%@ taglib uri="http://struts.apache.org/tags-logic"; prefix="logic" %>
>
> <%@ page import="javax.portlet.PortletRequest" %>
> <%@ page import="javax.portlet.PortletSession" %>
>
>
> Any idea?
> Your help is very much appreciated.
> Thanks
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>


RequestProcessor and contentType response header

2009-06-20 Thread Avlesh Singh
I am using Struts 1.2.7
I wrote a Filter which intercepts all requests and applies response headers
(based on some external configuration) to it. All response headers applied
in my Filter other than "Content-Type" were obeyed and sent to the client.
Content-Type was always "text/html".
After a lot of debugging, I realized the value for this particular header
are always getting overwritten in the struts' RequestProcessor class.
Underneath is the method which in my case turned out to be the "culprit"

>
> protected void processContent(HttpServletRequest request,
>HttpServletResponse response) {
> String contentType =
> moduleConfig.getControllerConfig().getContentType();
> if (contentType != null) {
>response.setContentType(contentType);
>  }
> }
>

Couple of questions:

   1. Shouldn't this method also check if the response already has a
   contentType header applied or not? Is this a known bug, or am I missing
   something?
   2. I subclassed the RequestProcessor and defined a controller in my
   struts config as .
   The class merely overrides the processContent method to check for an
   existing contentType. Am I doing it correctly, or is there some other way to
   achieve the desired behavour in my case.

Cheers
Avlesh


File "/WEB-INF/tld/struts-bean.tld" not found

2009-06-20 Thread Sam Wun
Dear all,

Can anyone tell me what is wrong with the following errors:



00:05:59,378 ERROR [PortletRequestDispatcherImpl:316]
org.apache.jasper.JasperException:
/html/portlet/onlinepayment_portlet/order.jsp(1,1) File
"/WEB-INF/tld/struts-bean.tld" not found
org.apache.jasper.JasperException:
/html/portlet/onlinepayment_portlet/order.jsp(1,1) File
"/WEB-INF/tld/struts-bean.tld" not found
at 
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:40)
at 
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407)
...

I have already defined tag-libs in my web.xml file:

http://struts.apache.org/tags-bean
/WEB-INF/tld/struts-bean.tld


of course struts-bean.tld is not in my WEB-INF/tld directory, but I
expect it will pick up the file from the lib path like the other
sample does.
I am sure most of you don't have this file in your project directory.

This is the init.jsp file that is included in the order.jsp file:

<%@ taglib uri="http://java.sun.com/portlet_2_0"; prefix="portlet" %>
<%@ taglib uri="http://struts.apache.org/tags-bean"; prefix="bean" %>
<%@ taglib uri="http://struts.apache.org/tags-html"; prefix="html" %>
<%@ taglib uri="http://struts.apache.org/tags-logic"; prefix="logic" %>

<%@ page import="javax.portlet.PortletRequest" %>
<%@ page import="javax.portlet.PortletSession" %>


Any idea?
Your help is very much appreciated.
Thanks

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



Re: Error when deploying portlets beside a normal Struts2 web app?

2009-06-20 Thread phillips1021

Nils-H:

I did some more trouble-shooting and think I may have found what is causing
the problem.

I noticed that the originator of this thread said his action was causing a
jsp to render that included the s:form tag.

My application's action that would cause the NullPointerException also was
causing a jsp to render that included the s:form tag

I removed the s:form from the jsp and I no longer get the
NullPointerException when using the Struts 2.1.6 plugin.

Some of the exception stack trace seems to indicate the problem is with the
s:form tag when using the Struts 2.1.6 Portlet Plugin:

java.lang.NullPointerException 
org.apache.struts2.components.UIBean.evaluateParams(UIBean.java:792)
org.apache.struts2.components.UIBean.end(UIBean.java:510)
   
org.apache.struts2.views.jsp.ComponentTagSupport.doEndTag(ComponentTagSupport.java:42)
   
org.apache.jsp.jsp.employeeForm_jsp._jspx_meth_s_005ftextfield_005f0(employeeForm_jsp.java:424)
   
org.apache.jsp.jsp.employeeForm_jsp._jspx_meth_s_005fform_005f0(employeeForm_jsp.java:359)
   
org.apache.jsp.jsp.employeeForm_jsp._jspService(employeeForm_jsp.java:121)




phillips1021 wrote:
> 
> Nils-H:
> 
>I created a Jira Issue (WW-3164) and attached a sample app that you can
> use to duplicate the problem I'm encountering.
> 
> Bruce
> 
> 
> Nils-Helge Garli wrote:
>> 
>> It would be helpful if you could create a sample app and attach it to
>> a JIRA issue. Then I'll have a look at it.
>> 
>> Nils-H
>> 
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Error-when-deploying-portlets-beside-a-normal-Struts2-web-app--tp23981728p24124806.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: Error when deploying portlets beside a normal Struts2 web app?

2009-06-20 Thread phillips1021

Nils-H:

   I created a Jira Issue (WW-3164) and attached a sample app that you can
use to duplicate the problem I'm encountering.

Bruce


Nils-Helge Garli wrote:
> 
> It would be helpful if you could create a sample app and attach it to
> a JIRA issue. Then I'll have a look at it.
> 
> Nils-H
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Error-when-deploying-portlets-beside-a-normal-Struts2-web-app--tp23981728p24124720.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: Doubt with using check box

2009-06-20 Thread Vishnu Vyasan Nelliparmbil


Pawel , can you expalin  with a example. I am totally new to struts.

I tried with another way.

Ie by adding a 'selected' field to the EmployeeBean. 



 
 
   



Now I am getting the values of selected as false in the Action. Even though I 
have selected it.
I am using a action form for the some other elements in the same view.

Could you guys can through some light on how to make this work?


Regards
Vishnu 



-Original Message-
From: Paweł Wielgus [mailto:poulw...@gmail.com] 
Sent: 20 June 2009 10:40
To: Struts Users Mailing List
Subject: Re: Doubt with using check box

Hi Vishnu,
on the html page you will have a list of checkboxes with the same name
"selectedEmployees" and a value of an employee identificator. In the
action create settet setSelectedEmloyees(String[] selectedEmployees),
then in execute You can access this table of employee identificators.
Just as a side note, i don't know what type of is your employee
identificator, so i proposed String, but it can also be long.

Best greetings,
Pawel Wielgus.

2009/6/20, Vishnu Vyasan Nelliparmbil :
> Hi Friends,
>
> I am new to web development and struts. I have a simple question.
>
> I am using  tag to iterate through a list of Employees
> and display their details.
> The list contains the Employee objects.
> Now while displaying Employee details in a table, the row is ending with
> a check box , so that the user can select employees. The check boxes are
> created dynamically since they are inside the iterate tag.
>
> Now how in Action I know that a specific employee is selected?
>
> In action form I would get whether the check box is selected or not. But
> how can I relate that to employees in list?
>
> Thanks in Advance
> vishnu
>
>
>
>
>
>
>
>
>
>
>
>

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



Re: Doubt with using check box

2009-06-20 Thread Paweł Wielgus
Hi Vishnu,
on the html page you will have a list of checkboxes with the same name
"selectedEmployees" and a value of an employee identificator. In the
action create settet setSelectedEmloyees(String[] selectedEmployees),
then in execute You can access this table of employee identificators.
Just as a side note, i don't know what type of is your employee
identificator, so i proposed String, but it can also be long.

Best greetings,
Pawel Wielgus.

2009/6/20, Vishnu Vyasan Nelliparmbil :
> Hi Friends,
>
> I am new to web development and struts. I have a simple question.
>
> I am using  tag to iterate through a list of Employees
> and display their details.
> The list contains the Employee objects.
> Now while displaying Employee details in a table, the row is ending with
> a check box , so that the user can select employees. The check boxes are
> created dynamically since they are inside the iterate tag.
>
> Now how in Action I know that a specific employee is selected?
>
> In action form I would get whether the check box is selected or not. But
> how can I relate that to employees in list?
>
> Thanks in Advance
> vishnu
>
>
>
>
>
>
>
>
>
>
>
>

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