RE: BeanUtils, Form Bean and POJO Bean

2006-06-18 Thread Joe Hertz
For starters, you should generally be using String properties in your form
bean because this is what the JSP sends to you. If you declare an integer in
your form bean, and the user enters character data into the text field,
youre going to get an exception thrown before you (or the validator) ever
gets to see it.

When you call BeanUtils.copyProperties(destObject, srcObject), it will do
the type conversions for you. If the field names are the same, it will
typically handle it.

If youre using your own type that BeanUtils doesn't understand out of the
box, you can register a class that implements the Converter interface. This
tells copyProperties() how to convert it from a String. I do this quite a
bit with enumerations.


> -Original Message-
> From: Caroline Jen [mailto:[EMAIL PROTECTED] 
> Sent: Saturday, June 17, 2006 10:48 PM
> To: user@struts.apache.org
> Subject: BeanUtils, Form Bean and POJO Bean
> 
> The Java "types" of the properties in my form bean sometimes 
> are not the same as those of the data fields in my database.
> 
> The request.getParameter(); always return a String.  I can 
> use the copyProperties() method of the BeanUtils to convert 
> all the String(s) read from the web page to proper Java 
> "types" in my form bean.
> 
> What do I do when the property type in my form bean does not 
> match the data field type in my POJO bean?
> 
> __
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection 
> around http://mail.yahoo.com 
> 
> -
> 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]



jsp:setProperty puzzlement

2006-06-18 Thread Don Vawter
I am trying to set a property using setProperty. The method works if  
the property doesn't already exist but if the property is already  
defined (subsequent page hits) it fails to update the property.


Here is the snippet:
scope="session" >



The current active link is:<%=menu%>
<%=d%>
The current navbean is:property="menuItem" />


The first time the page is hit  "active link"  and menuItem are the  
same but on subsequent page hits (in the session)  menuItem remains  
at its initial value.


If I update the session object directly by adding the following:

<%
((NavigationBean)request.getSession(false).getAttribute 
("navbean")).setMenuItem(menu);

%>

The current navbean is:property="menuItem" />


it is updated correctly.

Is this the designed functionality of the setProperty that it does  
not update properties which are already set

or am I using it incorrectly.



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



Re: BeanUtils, Form Bean and POJO Bean

2006-06-18 Thread Rick Reumann

Paul Benedict wrote:


I can use the copyProperties() method of the BeanUtils
to convert all the String(s) read from the web page to
proper Java "types" in my form bean.


Just be weary though, that BeanUtils can really by a major PAIN when you 
have domain objects that have number wrapper data types (Integer, 
Double, etc). BeanUtils has the VERY annoying behavior of converting 
null Strings to 0 for those number types. I end up always have to make 
Converters to deal with this and I really think BeanUtils should have a 
release that makes this NOT the default behavior. (Possibly provide some 
kind of extra param if you really want null to become 0).


Here's a test to demonstrate...

public class Test() {

 public static void main(String[] args) {
Test test = new Test();
test.doTest();
}

private void doTest() {
FormBean form = new FormBean();
DomainBean bean = new DomainBean();

try {
BeanUtils.copyProperties(bean, form);
System.out.println("The string value of integer: "+ 
bean.getNumber() ); //0 !!!

} catch (IllegalAccessException e) {
e.printStackTrace();
} catch (InvocationTargetException e) {
e.printStackTrace();
}
}
public class FormBean {
private String number;

public String getNumber() {
return number;
}

public void setNumber(String number) {
this.number = number;
}
}
public class DomainBean {
private Integer number;

public Integer getNumber() {
return number;
}

public void setNumber(Integer number) {
this.number = number;
}

}
}

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



Re: BeanUtils, Form Bean and POJO Bean

2006-06-18 Thread Paul Benedict
And to Rick's note, I should mention I never use copyProperties.. I "can" if I 
was insane enough :o) 

Rick Reumann <[EMAIL PROTECTED]> wrote: Paul Benedict wrote:

> I can use the copyProperties() method of the BeanUtils
> to convert all the String(s) read from the web page to
> proper Java "types" in my form bean.

Just be weary though, that BeanUtils can really by a major PAIN when you 
have domain objects that have number wrapper data types (Integer, 
Double, etc). BeanUtils has the VERY annoying behavior of converting 
null Strings to 0 for those number types. I end up always have to make 
Converters to deal with this and I really think BeanUtils should have a 
release that makes this NOT the default behavior. (Possibly provide some 
kind of extra param if you really want null to become 0).

Here's a test to demonstrate...

public class Test() {

  public static void main(String[] args) {
 Test test = new Test();
 test.doTest();
 }

private void doTest() {
 FormBean form = new FormBean();
 DomainBean bean = new DomainBean();

 try {
 BeanUtils.copyProperties(bean, form);
 System.out.println("The string value of integer: "+ 
bean.getNumber() ); //0 !!!
 } catch (IllegalAccessException e) {
 e.printStackTrace();
 } catch (InvocationTargetException e) {
 e.printStackTrace();
 }
 }
 public class FormBean {
 private String number;

 public String getNumber() {
 return number;
 }

 public void setNumber(String number) {
 this.number = number;
 }
 }
 public class DomainBean {
 private Integer number;

 public Integer getNumber() {
 return number;
 }

 public void setNumber(Integer number) {
 this.number = number;
 }

 }
}

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




-
New Yahoo! Messenger with Voice. Call regular phones from your PC and save big.

Re: jsp:setProperty puzzlement

2006-06-18 Thread Don Vawter
Figured it out. The setProperty tag is ignored when inside a useBean  
tag if the bean has already been instantiated.


On Jun 18, 2006, at 7:38 AM, Don Vawter wrote:

I am trying to set a property using setProperty. The method works  
if the property doesn't already exist but if the property is  
already defined (subsequent page hits) it fails to update the  
property.


Here is the snippet:
scope="session" >



The current active link is:<%=menu%>
<%=d%>
The current navbean is:property="menuItem" />


The first time the page is hit  "active link"  and menuItem are the  
same but on subsequent page hits (in the session)  menuItem remains  
at its initial value.


If I update the session object directly by adding the following:

<%
((NavigationBean)request.getSession(false).getAttribute 
("navbean")).setMenuItem(menu);

%>

The current navbean is:property="menuItem" />


it is updated correctly.

Is this the designed functionality of the setProperty that it does  
not update properties which are already set

or am I using it incorrectly.



-
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]



How to set size of submit button

2006-06-18 Thread pankaj . gupta
I am using html:submit for creating 4 sumit buttons. The requirement is to
make them of same size. can anyone suggest how to do that?

regards,
Pankaj

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



Re: How to set size of submit button

2006-06-18 Thread Frank W. Zammetti

Hi Pankaj,

In the  of your page (or via import):


  .cssSubmitButtons {
width  : 100px;
height : 20px;
  }


...



You can make the heights all the same this way too, or just remove that 
attribute from the style selector.  Alternatively, you can use the style 
attribute of the  tag to render the style inline, whichever 
you prefer.


HTH,
Frank

[EMAIL PROTECTED] wrote:

I am using html:submit for creating 4 sumit buttons. The requirement is to
make them of same size. can anyone suggest how to do that?

regards,
Pankaj

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



.



--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM: fzammetti
Yahoo: fzammetti
MSN: [EMAIL PROTECTED]
Java Web Parts -
http://javawebparts.sourceforge.net
Supplying the wheel, so you don't have to reinvent it!

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



RE: How to set size of submit button

2006-06-18 Thread Yee, Richard K CTR DMDC
Pankaj,
You are sending this to the wrong address. You should be sending it to
struts-user@jakarta.apache.org

-Richard


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Sunday, June 18, 2006 11:11 AM
To: user@struts.apache.org>
Subject: How to set size of submit button

I am using html:submit for creating 4 sumit buttons. The requirement is to
make them of same size. can anyone suggest how to do that?

regards,
Pankaj

-
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: How to set size of submit button

2006-06-18 Thread Richard Yee

My appologies. Please disregard. user@struts.apache.org is correct.

-Richard


Yee, Richard K CTR DMDC wrote:

Pankaj,
You are sending this to the wrong address. You should be sending it to
struts-user@jakarta.apache.org

-Richard


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Sunday, June 18, 2006 11:11 AM

To: user@struts.apache.org>
Subject: How to set size of submit button

I am using html:submit for creating 4 sumit buttons. The requirement is to
make them of same size. can anyone suggest how to do that?

regards,
Pankaj

-
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]


  



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



Re: How to set size of submit button

2006-06-18 Thread Eddie Bush
Generally, what I will do to accomplish this is to use CSS.  You can either 
use incline styles in the "style" attribute, or you could specify a style 
class with the styleClass attribute.


It would necessarily take a more contrived solution if you weren't able to 
arrive at a fixed width for all buttons and had to use the width of one 
button to determine the width of another button.  In this case, I'd probably 
use a combination of style IDs (to uniquely identify the buttons whose width 
I wanted to modify), and JavaScript.  You could then setup an onload page 
handler that would determine the width of the widest button, and use that to 
set the other button's width, using ... again ... styles -- but added 
programatically, rather than explicitly.  For a button, whose style ID 
happens to be 'idMyButton', you could do something akin to:


var myButton = document.getElementById('idMyButton');
myButton.style = "width: " + width + "px;";

- Original Message - 
From: <[EMAIL PROTECTED]>

To: 
Sent: Sunday, June 18, 2006 1:10 PM
Subject: How to set size of submit button



I am using html:submit for creating 4 sumit buttons. The requirement is to
make them of same size. can anyone suggest how to do that?

regards,
Pankaj

-
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: How to set size of submit button

2006-06-18 Thread Frank W. Zammetti
Would that even work Eddie?  I seem to remember that if you didn't 
explicitly set the width of an element yourself, you can't retrieve it. 
 Indeed, this quick test:








...results in a blank alert in both IE and FF.

This only matters of course if you have to make all the buttons the same 
width dynamically, but now I'm just curious!  Is there a way to do it I 
wonder?


Frank

Eddie Bush wrote:
Generally, what I will do to accomplish this is to use CSS.  You can 
either use incline styles in the "style" attribute, or you could specify 
a style class with the styleClass attribute.


It would necessarily take a more contrived solution if you weren't able 
to arrive at a fixed width for all buttons and had to use the width of 
one button to determine the width of another button.  In this case, I'd 
probably use a combination of style IDs (to uniquely identify the 
buttons whose width I wanted to modify), and JavaScript.  You could then 
setup an onload page handler that would determine the width of the 
widest button, and use that to set the other button's width, using ... 
again ... styles -- but added programatically, rather than explicitly.  
For a button, whose style ID happens to be 'idMyButton', you could do 
something akin to:


var myButton = document.getElementById('idMyButton');
myButton.style = "width: " + width + "px;";

- Original Message - From: <[EMAIL PROTECTED]>
To: 
Sent: Sunday, June 18, 2006 1:10 PM
Subject: How to set size of submit button


I am using html:submit for creating 4 sumit buttons. The requirement 
is to

make them of same size. can anyone suggest how to do that?

regards,
Pankaj

-
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]






--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM: fzammetti
Yahoo: fzammetti
MSN: [EMAIL PROTECTED]
Java Web Parts -
http://javawebparts.sourceforge.net
Supplying the wheel, so you don't have to reinvent it!

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



Re: How to set size of submit button

2006-06-18 Thread Eddie Bush

Frank,

I don't think you could extract the width from the control's style unless 
you'd set it.  I'd have to agree with you on that one.  Isn't there a 
property on the control (width?) you could determine the width from?  Maybe 
I answered too quick and should have done some research first.  I was 
thinking I had done something similar before, but as I dig deeper into my 
memory I realize that it was the height of an iframe I set, and that was 
based off the contained document's height (scroll height or some such 
thing).


I suppose it seemed intuitive to me that the button should have a width. 
I'll dig into my JavaScript book while at the office tomorrow and see if 
there isn't a property that a person can determine the width of a button 
with.  There's got to be a way to do it.  I'm curious now, too!  I have been 
wrong before though.


I'll try to pop-in at lunch and drop my findings ;-)

Eddie

- Original Message - 
From: "Frank W. Zammetti" <[EMAIL PROTECTED]>

To: "Struts Users Mailing List" 
Sent: Sunday, June 18, 2006 4:50 PM
Subject: Re: How to set size of submit button


Would that even work Eddie?  I seem to remember that if you didn't 
explicitly set the width of an element yourself, you can't retrieve it. 
Indeed, this quick test:








..results in a blank alert in both IE and FF.

This only matters of course if you have to make all the buttons the same 
width dynamically, but now I'm just curious!  Is there a way to do it I 
wonder?


Frank 



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



Re: How to set size of submit button

2006-06-18 Thread Adam Samere
Frank and Eddie are right about not being able to read the css property 
unless you have set it ahead of time. The javascript Element Object 
(from which buttons etc are derived) has properties called clientWidth 
and clientHeight. This will give you the width and height of the element 
in pixels as rendered on the client. Hopefully that helps!


document.getElementById('b').clientWidth

-Adam

Eddie Bush wrote:

Frank,

I don't think you could extract the width from the control's style 
unless you'd set it.  I'd have to agree with you on that one.  Isn't 
there a property on the control (width?) you could determine the width 
from?  Maybe I answered too quick and should have done some research 
first.  I was thinking I had done something similar before, but as I 
dig deeper into my memory I realize that it was the height of an 
iframe I set, and that was based off the contained document's height 
(scroll height or some such thing).


I suppose it seemed intuitive to me that the button should have a 
width. I'll dig into my JavaScript book while at the office tomorrow 
and see if there isn't a property that a person can determine the 
width of a button with.  There's got to be a way to do it.  I'm 
curious now, too!  I have been wrong before though.


I'll try to pop-in at lunch and drop my findings ;-)

Eddie

- Original Message - From: "Frank W. Zammetti" 
<[EMAIL PROTECTED]>

To: "Struts Users Mailing List" 
Sent: Sunday, June 18, 2006 4:50 PM
Subject: Re: How to set size of submit button


Would that even work Eddie?  I seem to remember that if you didn't 
explicitly set the width of an element yourself, you can't retrieve 
it. Indeed, this quick test:








..results in a blank alert in both IE and FF.

This only matters of course if you have to make all the buttons the 
same width dynamically, but now I'm just curious!  Is there a way to 
do it I wonder?


Frank 



-
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: How to set size of submit button

2006-06-18 Thread Frank W. Zammetti
Cool, I wasn't aware of that.  Thanks Adam, that will come in very handy 
indeed! :)


Frank

Adam Samere wrote:
Frank and Eddie are right about not being able to read the css property 
unless you have set it ahead of time. The javascript Element Object 
(from which buttons etc are derived) has properties called clientWidth 
and clientHeight. This will give you the width and height of the element 
in pixels as rendered on the client. Hopefully that helps!


document.getElementById('b').clientWidth

-Adam

Eddie Bush wrote:

Frank,

I don't think you could extract the width from the control's style 
unless you'd set it.  I'd have to agree with you on that one.  Isn't 
there a property on the control (width?) you could determine the width 
from?  Maybe I answered too quick and should have done some research 
first.  I was thinking I had done something similar before, but as I 
dig deeper into my memory I realize that it was the height of an 
iframe I set, and that was based off the contained document's height 
(scroll height or some such thing).


I suppose it seemed intuitive to me that the button should have a 
width. I'll dig into my JavaScript book while at the office tomorrow 
and see if there isn't a property that a person can determine the 
width of a button with.  There's got to be a way to do it.  I'm 
curious now, too!  I have been wrong before though.


I'll try to pop-in at lunch and drop my findings ;-)

Eddie

- Original Message - From: "Frank W. Zammetti" 
<[EMAIL PROTECTED]>

To: "Struts Users Mailing List" 
Sent: Sunday, June 18, 2006 4:50 PM
Subject: Re: How to set size of submit button


Would that even work Eddie?  I seem to remember that if you didn't 
explicitly set the width of an element yourself, you can't retrieve 
it. Indeed, this quick test:








..results in a blank alert in both IE and FF.

This only matters of course if you have to make all the buttons the 
same width dynamically, but now I'm just curious!  Is there a way to 
do it I wonder?


Frank 



-
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]






--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM: fzammetti
Yahoo: fzammetti
MSN: [EMAIL PROTECTED]
Java Web Parts -
http://javawebparts.sourceforge.net
Supplying the wheel, so you don't have to reinvent it!

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



Re: How to set size of submit button

2006-06-18 Thread Frank W. Zammetti
Hehe, looks like Adam saved us both the trouble :)  I guess I didn't 
realize everything was derived from Element, I thought that was just 
what you got back via DOM access (can't say I ever actually thought 
about it, but I don't think I would have known that even if I did).


Frank

Eddie Bush wrote:

Frank,

I don't think you could extract the width from the control's style 
unless you'd set it.  I'd have to agree with you on that one.  Isn't 
there a property on the control (width?) you could determine the width 
from?  Maybe I answered too quick and should have done some research 
first.  I was thinking I had done something similar before, but as I dig 
deeper into my memory I realize that it was the height of an iframe I 
set, and that was based off the contained document's height (scroll 
height or some such thing).


I suppose it seemed intuitive to me that the button should have a width. 
I'll dig into my JavaScript book while at the office tomorrow and see if 
there isn't a property that a person can determine the width of a button 
with.  There's got to be a way to do it.  I'm curious now, too!  I have 
been wrong before though.


I'll try to pop-in at lunch and drop my findings ;-)

Eddie

- Original Message - From: "Frank W. Zammetti" 
<[EMAIL PROTECTED]>

To: "Struts Users Mailing List" 
Sent: Sunday, June 18, 2006 4:50 PM
Subject: Re: How to set size of submit button


Would that even work Eddie?  I seem to remember that if you didn't 
explicitly set the width of an element yourself, you can't retrieve 
it. Indeed, this quick test:








..results in a blank alert in both IE and FF.

This only matters of course if you have to make all the buttons the 
same width dynamically, but now I'm just curious!  Is there a way to 
do it I wonder?


Frank 



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






--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM: fzammetti
Yahoo: fzammetti
MSN: [EMAIL PROTECTED]
Java Web Parts -
http://javawebparts.sourceforge.net
Supplying the wheel, so you don't have to reinvent it!

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



Checkling Security

2006-06-18 Thread chamal desilva
Hi,

How should we test wether a user has permission for an
action. Can we do it in action class or do we have to
do it in EJB tier.

Thanking You,
Chamal.

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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



Re: Checkling Security

2006-06-18 Thread Adam Samere
You can use the standard Servlet authorization/authentication mechanism, 
or use a Servlet filter, or use a custom ActionMappings class or common 
base Action subclass if you're bent on handling it within Struts.


-Adam

chamal desilva wrote:

Hi,

How should we test wether a user has permission for an
action. Can we do it in action class or do we have to
do it in EJB tier.

Thanking You,
Chamal.

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


-
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: Checkling Security

2006-06-18 Thread Paul Benedict
Struts action mappings also contain a role attribute. This role is checked 
against HttpServletRequest.isUserInRole.

Adam Samere <[EMAIL PROTECTED]> wrote: You can use the standard Servlet 
authorization/authentication mechanism, 
or use a Servlet filter, or use a custom ActionMappings class or common 
base Action subclass if you're bent on handling it within Struts.

-Adam

chamal desilva wrote:
> Hi,
>
> How should we test wether a user has permission for an
> action. Can we do it in action class or do we have to
> do it in EJB tier.
>
> Thanking You,
> Chamal.
>
> __
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around 
> http://mail.yahoo.com 
>
> -
> 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]




-
Do you Yahoo!?
 Next-gen email? Have it all with the  all-new Yahoo! Mail Beta.

Re: Checkling Security

2006-06-18 Thread Richard Yee

I'd suggest doing it in a filter or a base Action class.

-Richard

chamal desilva wrote:

Hi,

How should we test wether a user has permission for an
action. Can we do it in action class or do we have to
do it in EJB tier.

Thanking You,
Chamal.

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


-
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]



want javamail debug help

2006-06-18 Thread Patil, Sheetal
Hello friends,
I am trying to send email from my application but I am not able to. So I
set debug=true and get following debug. I am having exception
"javax.mail.NoSuchProviderException: Invalid protocol: null" . Can u
please describe me this debugs.

DEBUG: JavaMail version 1.4ea
DEBUG: java.io.FileNotFoundException: C:\Program
Files\Java\jdk1.5.0_06\jre\lib\javamail.providers (The system cannot
find the file specified)
DEBUG: !anyLoaded
DEBUG: not loading resource: /META-INF/javamail.providers
DEBUG: successfully loaded resource:
/META-INF/javamail.default.providers
DEBUG: Tables of loaded providers
DEBUG: Providers Listed By Class Name:
{com.sun.mail.smtp.SMTPSSLTransport=javax.mail.Provider[TRANSPORT,smtps,
com.sun.mail.smtp.SMTPSSLTransport,Sun Microsystems, Inc],
com.sun.mail.smtp.SMTPTransport=javax.mail.Provider[TRANSPORT,smtp,com.s
un.mail.smtp.SMTPTransport,Sun Microsystems, Inc],
com.sun.mail.imap.IMAPSSLStore=javax.mail.Provider[STORE,imaps,com.sun.m
ail.imap.IMAPSSLStore,Sun Microsystems, Inc],
com.sun.mail.pop3.POP3SSLStore=javax.mail.Provider[STORE,pop3s,com.sun.m
ail.pop3.POP3SSLStore,Sun Microsystems, Inc],
com.sun.mail.imap.IMAPStore=javax.mail.Provider[STORE,imap,com.sun.mail.
imap.IMAPStore,Sun Microsystems, Inc],
com.sun.mail.pop3.POP3Store=javax.mail.Provider[STORE,pop3,com.sun.mail.
pop3.POP3Store,Sun Microsystems, Inc]}
DEBUG: Providers Listed By Protocol:
{imaps=javax.mail.Provider[STORE,imaps,com.sun.mail.imap.IMAPSSLStore,Su
n Microsystems, Inc],
imap=javax.mail.Provider[STORE,imap,com.sun.mail.imap.IMAPStore,Sun
Microsystems, Inc],
smtps=javax.mail.Provider[TRANSPORT,smtps,com.sun.mail.smtp.SMTPSSLTrans
port,Sun Microsystems, Inc],
pop3=javax.mail.Provider[STORE,pop3,com.sun.mail.pop3.POP3Store,Sun
Microsystems, Inc],
pop3s=javax.mail.Provider[STORE,pop3s,com.sun.mail.pop3.POP3SSLStore,Sun
Microsystems, Inc],
smtp=javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,
Sun Microsystems, Inc]}
DEBUG: successfully loaded resource:
/META-INF/javamail.default.address.map
DEBUG: !anyLoaded
DEBUG: not loading resource: /META-INF/javamail.address.map
DEBUG: java.io.FileNotFoundException: C:\Program
Files\Java\jdk1.5.0_06\jre\lib\javamail.address.map (The system cannot
find the file specified)

Thanks 
Shital


Re: want javamail debug help

2006-06-18 Thread Patil, Sheetal
 

properties.put ("mail.smtp.host","smtp host name);

properties.put("mail.debug", "true");

auth a=new auth ();

Session session = Session.getDefaultInstance
(properties,null);

MimeMessage message = new MimeMessage (session);

try

{

Store sr=session.getStore ();

}

catch (MessagingException e)

{

System.out.println (""+e);

//e.printStackTrace ();



}

 



From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Monday, June 19, 2006 11:23 AM
To: Patil, Sheetal
Subject: Re: want javamail debug help

 


Kindly Post the Source Code.

Thanks and regards,
Pazhanikanthan. P (Paz)

Consultant for AXA,
HCL Australia Services Pty. Ltd.
Off   : +61-3-9618-4085
Mob : +61-0411-354-838 

 

"Patil, Sheetal" <[EMAIL PROTECTED]> 

19/06/2006 03:50 PM 
Please respond to "Struts Users Mailing List" 


To:"Struts Users Mailing List"  
cc: 
Subject:want javamail debug help




Hello friends,
I am trying to send email from my application but I am not able to. So I
set debug=true and get following debug. I am having exception
"javax.mail.NoSuchProviderException: Invalid protocol: null" . Can u
please describe me this debugs.

DEBUG: JavaMail version 1.4ea
DEBUG: java.io.FileNotFoundException: C:\Program
Files\Java\jdk1.5.0_06\jre\lib\javamail.providers (The system cannot
find the file specified)
DEBUG: !anyLoaded
DEBUG: not loading resource: /META-INF/javamail.providers
DEBUG: successfully loaded resource:
/META-INF/javamail.default.providers
DEBUG: Tables of loaded providers
DEBUG: Providers Listed By Class Name:
{com.sun.mail.smtp.SMTPSSLTransport=javax.mail.Provider[TRANSPORT,smtps,
com.sun.mail.smtp.SMTPSSLTransport,Sun Microsystems, Inc],
com.sun.mail.smtp.SMTPTransport=javax.mail.Provider[TRANSPORT,smtp,com.s
un.mail.smtp.SMTPTransport,Sun Microsystems, Inc],
com.sun.mail.imap.IMAPSSLStore=javax.mail.Provider[STORE,imaps,com.sun.m
ail.imap.IMAPSSLStore,Sun Microsystems, Inc],
com.sun.mail.pop3.POP3SSLStore=javax.mail.Provider[STORE,pop3s,com.sun.m
ail.pop3.POP3SSLStore,Sun Microsystems, Inc],
com.sun.mail.imap.IMAPStore=javax.mail.Provider[STORE,imap,com.sun.mail.
imap.IMAPStore,Sun Microsystems, Inc],
com.sun.mail.pop3.POP3Store=javax.mail.Provider[STORE,pop3,com.sun.mail.
pop3.POP3Store,Sun Microsystems, Inc]}
DEBUG: Providers Listed By Protocol:
{imaps=javax.mail.Provider[STORE,imaps,com.sun.mail.imap.IMAPSSLStore,Su
n Microsystems, Inc],
imap=javax.mail.Provider[STORE,imap,com.sun.mail.imap.IMAPStore,Sun
Microsystems, Inc],
smtps=javax.mail.Provider[TRANSPORT,smtps,com.sun.mail.smtp.SMTPSSLTrans
port,Sun Microsystems, Inc],
pop3=javax.mail.Provider[STORE,pop3,com.sun.mail.pop3.POP3Store,Sun
Microsystems, Inc],
pop3s=javax.mail.Provider[STORE,pop3s,com.sun.mail.pop3.POP3SSLStore,Sun
Microsystems, Inc],
smtp=javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,
Sun Microsystems, Inc]}
DEBUG: successfully loaded resource:
/META-INF/javamail.default.address.map
DEBUG: !anyLoaded
DEBUG: not loading resource: /META-INF/javamail.address.map
DEBUG: java.io.FileNotFoundException: C:\Program
Files\Java\jdk1.5.0_06\jre\lib\javamail.address.map (The system cannot
find the file specified)

Thanks 
Shital

_ 
This e-mail has been scanned for viruses by MCI's Internet Managed 
Scanning Services - powered by MessageLabs. For further information 
visit http://www.mci.com 






*
Important Note
This email (including any attachments) contains information which is 
confidential and may be subject to legal privilege.  If you are not 
the intended recipient you must not use, distribute or copy this 
email.  If you have received this email in error please notify the 
sender immediately and delete this email. Any views expressed in this 
email are not necessarily the views of AXA.   Thank you.

**

 



[ANN] Mail Reader sample application implemented with Struts Action Framework + JSP Controls Tag Library

2006-06-18 Thread Michael Jouravlev

JSP Controls Tag Library version 0.6.2 includes yet another
implementation of venerable Mail Reader sample application. Struts
Framework is used to obtain and process input data and for
business/persistence services. JSP Controls Tag Library is used to
implement portlet-like components on one web page, like Menu
component, Login component and Language component.

The components are updated without full page reload if Javascript/XHR
are enabled, or with full page reload via redirection if Javascript is
turned off.

See more at JSP Controls Tag Library website: http://www.jspcontrols.net
Or download WAR file from:
https://sourceforge.net/project/showfiles.php?group_id=154342&package_id=171420&release_id=425861

Michael J.

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