Is there an abstract meta-model of Struts ?

2005-10-27 Thread Begur, Praveen
Hi All,

Quesiton: I understand that there exists a programmatic API, documentation
and source-code of Struts, but is there a formal meta-model of Struts ( from
an application development point of view ) ?

Purpose: I am a practioner of MDA ( Model Driven Architecture ) and use
AndroMDA to create meta-models of popular technologies like DAO, EJB, etc
and then auto-generate User applications like HR ( by modeling Employee,
Department etc) etc. 

I am interested in the meta-model of Struts so that I can feed / create such
a Model into AndroMDA and use the tool to help me auto-generate Presentation
Tier code components based on Struts.

Any help would be greatly appreciated.

regards,
Praveen



The contents of this e-mail are intended for the named addressee only. It
contains information that may be confidential. Unless you are the named
addressee or an authorized designee, you may not copy or use it, or disclose
it to anyone else. If you received it in error please notify us immediately
and then destroy it. 


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



Cross-Site Scripting attack

2005-10-27 Thread Deepa Khetan
Hi,
 I am working for the Security of my site. Read about Cross-Site-Scripting
attacks being most common. Can anyone help me regarding what can be the best
freeware tool to test a CSS vulnerability of my site. Also, any suggestions
on how CSS attack can be avoided? We are using Struts framework.
 Any information/suggestion is most welcome.
 Deepa


Re: Problems emailing from struts

2005-10-27 Thread Xavier Vanderstukken

www.jarhoo.com is your friend to find missing jar files libraries

C.F. Scheidecker Antunes wrote:


Hello,

Thanks for the info. I am still having problems sending email from a 
struts action.


I've created a separate class emailClient to send the message. The 
class is on the end

of the email.

I have mailapi.jar under /WEB-INF/lib/ version 1.3.3.01 
 but nothing works.

Here's the exception I am getting:

*exception*

javax.servlet.ServletException: Servlet execution threw an exception
org.securityfilter.filter.SecurityFilter.doFilter(SecurityFilter.java:188) 



*root cause*

java.lang.NoClassDefFoundError: javax/activation/DataSource
com.nando.utils.emailClient.doSend(emailClient.java:43)
com.nando.struts.action.TestAction.send2Mail(TestAction.java:51)
com.nando.struts.action.TestAction.execute
(TestAction.java:77)
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:419) 

org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224) 


org.apache.struts.action.ActionServlet.process
(ActionServlet.java:1194)
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
javax.servlet.http.HttpServlet.service(HttpServlet.java
:802)
org.securityfilter.filter.SecurityFilter.doFilter(SecurityFilter.java:188) 





*import* java.util.*;

*import* javax.mail.*;
*import* javax.mail.internet.*;
*import* javax.mail.MessagingException;

*public* *class* emailClient {

*private* *Properties* props;

*protected* Session session;

*protected* Message msg;

/// default constructor/
*public* emailClient() {
   
   
}

*public* void doSend(*String* From, *String* To, *String* 
*Subject*, *String* Body) {
   
props = *new* *Properties*();

props.put("smtp.nando.com","mailhost");
   
/// Create the session object/

session = Session.getDefaultInstance(props,*null*);
session.setDebug(*true*);
   
*try* {

msg = *new* MimeMessage(session);
   
/// From/

InternetAddress fromAddress = *new* InternetAddress(From);
msg.setFrom(fromAddress);
   
/// To address/

InternetAddress toAddress = *new* InternetAddress(To);
msg.addRecipient(Message.RecipientType.TO, toAddress);

/// Subject/
msg.setSubject(*Subject*);
   
/// Body/

msg.setText(Body);
   
/// send the message/

Transport.send(msg);
}

*catch* (MessagingException ex) {
*while* ((ex = (MessagingException)ex.getNextException()) 
!= *null*) {

ex.printStackTrace();
}
}
}

}

On the action I create an emailClient object and call doSend with the 
params.

It crashes as the messages above.

Borislav Sabev wrote:





java.lang.NoClassDefFoundError: javax/mail/Message
com.nando.struts.action.TestAction.send1Mail(TestAction.java:35)
com.nando.struts.action.TestAction.execute(TestAction.java:69)




Seems that you don't have mail.jar in WEB-INF/lib.

borislav

-
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: Problems emailing from struts

2005-10-27 Thread C.F. Scheidecker Antunes

Hello,

Thanks for the info. I am still having problems sending email from a 
struts action.


I've created a separate class emailClient to send the message. The class 
is on the end

of the email.

I have mailapi.jar under /WEB-INF/lib/ version 1.3.3.01 
 but nothing works.

Here's the exception I am getting:

*exception*

javax.servlet.ServletException: Servlet execution threw an exception

org.securityfilter.filter.SecurityFilter.doFilter(SecurityFilter.java:188)

*root cause*

java.lang.NoClassDefFoundError: javax/activation/DataSource
com.nando.utils.emailClient.doSend(emailClient.java:43)
com.nando.struts.action.TestAction.send2Mail(TestAction.java:51)
com.nando.struts.action.TestAction.execute
(TestAction.java:77)

org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:419)

org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
org.apache.struts.action.ActionServlet.process
(ActionServlet.java:1194)
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
javax.servlet.http.HttpServlet.service(HttpServlet.java
:802)

org.securityfilter.filter.SecurityFilter.doFilter(SecurityFilter.java:188)



*import* java.util.*;

*import* javax.mail.*;
*import* javax.mail.internet.*;
*import* javax.mail.MessagingException;

*public* *class* emailClient {

*private* *Properties* props;

*protected* Session session;
*protected* Message msg;

/// default constructor/
*public* emailClient() {


}

*public* void doSend(*String* From, *String* To, *String* *Subject*, 
*String* Body) {

props = *new* *Properties*();
props.put("smtp.nando.com","mailhost");

/// Create the session object/
session = Session.getDefaultInstance(props,*null*);
session.setDebug(*true*);

*try* {
msg = *new* MimeMessage(session);

/// From/
InternetAddress fromAddress = *new* 
InternetAddress(From);
msg.setFrom(fromAddress);

/// To address/
InternetAddress toAddress = *new* InternetAddress(To);
msg.addRecipient(Message.RecipientType.TO, toAddress);

/// Subject/
msg.setSubject(*Subject*);

/// Body/
msg.setText(Body);

/// send the message/
Transport.send(msg);
}

*catch* (MessagingException ex) {
*while* ((ex = 
(MessagingException)ex.getNextException()) != *null*) {
ex.printStackTrace();
}
}
}

}

On the action I create an emailClient object and call doSend with the 
params.

It crashes as the messages above.

Borislav Sabev wrote:





java.lang.NoClassDefFoundError: javax/mail/Message
com.nando.struts.action.TestAction.send1Mail(TestAction.java:35)
com.nando.struts.action.TestAction.execute(TestAction.java:69)



Seems that you don't have mail.jar in WEB-INF/lib.

borislav

-
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: Submit buttons getting their value

2005-10-27 Thread Dakota Jack
By the way, I find your use of a disaster in the course of human
affairs to advance your own interests at best creepy.  If you don't
know the difference between this conversation and Nazism, you are not
going to do all that well in social situations.

On 10/16/05, Martin Gainty <[EMAIL PROTECTED]> wrote:
> saying your solution is better and everyone else on the planet is 'ignorant'
> if they dont believe in your solution
> is fascism
> Sieg Heil Jack
>
> - Original Message -
> From: "Dakota Jack" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" 
> Sent: Sunday, October 16, 2005 7:51 PM
> Subject: Re: Submit buttons getting their value
>
>
> Breathe in; breathe out, Martin.
>
> This tag does almost exactly what actions do when you use the
> solutions on www.michaelmcgrady.com.  Presumably, since people are on
> the Struts site here, they would prefer to use an action that a tag?
>
> Could you please tone your language down a bit, Martin.  I think that
> sending people to a solution on a website is hardly "pushing your own
> c _ _ p" as you so eloquently say.  There is nothing for sale here.
> Just trying to be helpful.  I am sorry you don't understand this area
> of coding, but you don't.  The solutions mentioned are still
> preferrable.
>
> Blessings!
>
> On 10/15/05, Martin Gainty <[EMAIL PROTECTED]> wrote:
> > All
> > Whatever solution is proposed is proferred based on the predilections and
> > perhaps even the emotions of the author
> > at the time of their proposal
> > Accordingly I *believe* I have found an incredibly simple implementation
> > of
> > SubmitTag for use in your app
> > which extends org.apache.struts.taglib.html.BaseHandlerTag the location is
> > http://www.docjar.com/docs/api/com/RuntimeCollective/webapps/tag/SubmitTag.html
> >
> > Note that once you have constructed the Tag in your jsp there are 2
> > methods
> > that will be of immediate use to you
> > getValue which acquires the value of the property to submit (this
> > presupposes you have indeed set a property attribute first!..)
> > getLabel which acquires the actual label which is the unique text string
> > which is a mandatory string which must be supplied
> > to properly construct the tag
> > name is the other attribute which is required to properly contruct the
> > SubmitTag
> > I hope this works for you,
> >
> > Martin-
> > I will now wait for Dakota Jack to explain why this is an *(!&^%ic
> > solution
> > ..
> >
> > - Original Message -
> > From: "Dakota Jack" <[EMAIL PROTECTED]>
> > To: "Struts Users Mailing List" 
> > Sent: Monday, October 10, 2005 5:59 PM
> > Subject: Re: Submit buttons getting their value
> >
> >
> > Actually this won't work either.  The problem is that the request
> > object has been purloined and given another wrapper name.  You might
> > want to look at the code before giving these ideas.
> >
> > On 10/10/05, Richard Yee <[EMAIL PROTECTED]> wrote:
> > > Try getParameter() instead of getAttribute().
> > >
> > > -Richard
> > >
> > >
> > > C.F. Scheidecker Antunes wrote:
> > > > Hello all,
> > > >
> > > > I have two submit buttons, one with a value of Continue and the other
> > > > Back.
> > > >
> > > > How do I check their values?
> > > >
> > > > I've tried request.getAttribute("submit").toString() but I do not get
> > > > anything.
> > > >
> > > > My buttons are like this:
> > > >
> > > > back
> > > > continue
> > > >
> > > > They are within the same form structure.
> > > >
> > > > My action has already a Session Bean scope to save the form contents.
> > > > But the submit is not
> > > > in that DynaBean.
> > > >
> > > > I will decide on what to do within the action based on what button is
> > > > pressed.
> > > >
> > > > Thanks,
> > > > C.F.
> > > >
> > > > -
> > > > 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]
> > >
> > >
> >
> >
> > --
> > "You can lead a horse to water but you cannot make it float on its back."
> > ~Dakota Jack~
> >
> > -
> > 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]
> >
> >
>
>
> --
> "You can lead a horse to water but you cannot make it float on its back."
> ~Dakota Jack~
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
> -
> T

Re: Submit buttons getting their value

2005-10-27 Thread Dakota Jack
Try to stay on topic, Martin.  Less heat and more light, please.  If
you have something enlightening to say, I am sure we all would be
interested.  Building straw men and torching them is an old trick.  I
am not talking about the Planet.  Although, in this area I don't know
a better solution.  One thing for sure is that your suggestions are
misguided and not up on the state of the art.

The only one I have suggested in this discussion is missing the boat
to the beheading is you, so, unless you somehow identify yourself with
the entire Planet, that is a straw man.

On 10/16/05, Martin Gainty <[EMAIL PROTECTED]> wrote:
> saying your solution is better and everyone else on the planet is 'ignorant'
> if they dont believe in your solution
> is fascism
> Sieg Heil Jack
>
> - Original Message -
> From: "Dakota Jack" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" 
> Sent: Sunday, October 16, 2005 7:51 PM
> Subject: Re: Submit buttons getting their value
>
>
> Breathe in; breathe out, Martin.
>
> This tag does almost exactly what actions do when you use the
> solutions on www.michaelmcgrady.com.  Presumably, since people are on
> the Struts site here, they would prefer to use an action that a tag?
>
> Could you please tone your language down a bit, Martin.  I think that
> sending people to a solution on a website is hardly "pushing your own
> c _ _ p" as you so eloquently say.  There is nothing for sale here.
> Just trying to be helpful.  I am sorry you don't understand this area
> of coding, but you don't.  The solutions mentioned are still
> preferrable.
>
> Blessings!
>
> On 10/15/05, Martin Gainty <[EMAIL PROTECTED]> wrote:
> > All
> > Whatever solution is proposed is proferred based on the predilections and
> > perhaps even the emotions of the author
> > at the time of their proposal
> > Accordingly I *believe* I have found an incredibly simple implementation
> > of
> > SubmitTag for use in your app
> > which extends org.apache.struts.taglib.html.BaseHandlerTag the location is
> > http://www.docjar.com/docs/api/com/RuntimeCollective/webapps/tag/SubmitTag.html
> >
> > Note that once you have constructed the Tag in your jsp there are 2
> > methods
> > that will be of immediate use to you
> > getValue which acquires the value of the property to submit (this
> > presupposes you have indeed set a property attribute first!..)
> > getLabel which acquires the actual label which is the unique text string
> > which is a mandatory string which must be supplied
> > to properly construct the tag
> > name is the other attribute which is required to properly contruct the
> > SubmitTag
> > I hope this works for you,
> >
> > Martin-
> > I will now wait for Dakota Jack to explain why this is an *(!&^%ic
> > solution
> > ..
> >
> > - Original Message -
> > From: "Dakota Jack" <[EMAIL PROTECTED]>
> > To: "Struts Users Mailing List" 
> > Sent: Monday, October 10, 2005 5:59 PM
> > Subject: Re: Submit buttons getting their value
> >
> >
> > Actually this won't work either.  The problem is that the request
> > object has been purloined and given another wrapper name.  You might
> > want to look at the code before giving these ideas.
> >
> > On 10/10/05, Richard Yee <[EMAIL PROTECTED]> wrote:
> > > Try getParameter() instead of getAttribute().
> > >
> > > -Richard
> > >
> > >
> > > C.F. Scheidecker Antunes wrote:
> > > > Hello all,
> > > >
> > > > I have two submit buttons, one with a value of Continue and the other
> > > > Back.
> > > >
> > > > How do I check their values?
> > > >
> > > > I've tried request.getAttribute("submit").toString() but I do not get
> > > > anything.
> > > >
> > > > My buttons are like this:
> > > >
> > > > back
> > > > continue
> > > >
> > > > They are within the same form structure.
> > > >
> > > > My action has already a Session Bean scope to save the form contents.
> > > > But the submit is not
> > > > in that DynaBean.
> > > >
> > > > I will decide on what to do within the action based on what button is
> > > > pressed.
> > > >
> > > > Thanks,
> > > > C.F.
> > > >
> > > > -
> > > > 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]
> > >
> > >
> >
> >
> > --
> > "You can lead a horse to water but you cannot make it float on its back."
> > ~Dakota Jack~
> >
> > -
> > 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]
> >
> >
>
>
> --
> "You can lead a horse

Re: java.util.Date in Action Form Bean

2005-10-27 Thread Yujun Liang

Murray,

Thanks for your reply. I know how to use other methods to handle it, such as 
putting String property on form bean and convert it to date inside mybean. I 
am asking whether it is possible for Struts to handle date conversion with 
Locale automatically, then I can only configure a single entry form bean for 
the action form, it can save a great deal of effort. Please compare the 
following configuration style,


Do you configure your action form like this,
type="org.apache.struts.validator.DynaValidatorForm">


   



or like this,
type="org.apache.struts.validator.DynaValidatorForm">


   

   

   

   

   

   

   

   

   

   

   

   

   

   

   

   

   

   

   

   

   

   

   

   

   

   

   

   

   

   





Regards
Yujun Liang
[EMAIL PROTECTED]
(0408) 467 448
- Original Message - 
From: "Murray Collingwood" <[EMAIL PROTECTED]>

To: "Struts Users Mailing List" 
Sent: Friday, October 28, 2005 2:44 PM
Subject: Re: java.util.Date in Action Form Bean



Hi

I add additional getters and setters for handling dates and prices (and 
other special
numeric formats).  For example, in addition to the normal getter I code an 
additional

one to retrieve the date as a string.

   public Date getDateStart() {
   return dateStart;
   }
   public String getDateStartAsString() {
   if (dateStart == null) return "";
   return Focus.date2String(dateStart);
   }


I then code up some static methods to format dates to strings and similar 
methods to
make the opposite translation (string back to date).  For example, a 
method from my

Focus class related to the above code:

   public static String date2String(Date date) {
   return sdf.format(date);
   }

And if you're desparate, here is the sdf definition:

   private static SimpleDateFormat sdf = new 
SimpleDateFormat("dd/MM/");


You can do the same thing with a Timestamp, depends how many fields you 
want to
declare on your form and how much data entry you want your user to do.  I 
used a
similar method in my Focus class to get/set the date portion of the 
timestamp value:


   public static String timestamp2String(Timestamp ts) {
   if (ts == null) return "";
   return date2String(new Date(ts.getTime()));
   }

HTH
mc


On 28 Oct 2005 at 14:31, Yujun Liang wrote:


Hello,

I am working on a project using Struts. Struts uses BeanUtil to populate 
Action Form

Bean. This is such a nice framework to work with, except,


BeanUtil doesn't support java.util.Date conversion. But when I use

java.sql.Timestamp, it asks for the format of

-mm-dd hh:mm:ss.f

Here is the exception when I enter other format,

Caused by: java.lang.IllegalArgumentException: Timestamp format must 
be -

mm-dd hh:mm:ss.f


In a web application, it is not reasonable to ask user to input 
-mm-dd

hh:mm:ss.f.


Also, it doesn't support Locale.

Do you have experience getting java.util.Date populated in a Java Bean 
inside a

FormBean?



Thanks in advance.

Regards
Yujun Liang
[EMAIL PROTECTED]
(0408) 467 448

1. Form Bean Definition,
type="org.apache.struts.validator.DynaValidatorForm">






2. Java Bean,

package com.mycompany.myproject.bean;

import java.io.Serializable;

import java.sql.Timestamp;

import org.apache.commons.lang.builder.EqualsBuilder;

import org.apache.commons.lang.builder.HashCodeBuilder;

import org.apache.commons.lang.builder.ToStringBuilder;

public abstract class MyBean implements Serializable {

private long interchangeId;

private Timestamp creationTime;

private String originatingChannel;

public long getInterchangeId() {

return this.interchangeId;

}

public void setInterchangeId(long interchangeId) {

this.interchangeId = interchangeId;

}

public Timestamp getCreationTime() {

return this.creationTime;

}



public void setCreationTime(Timestamp creationTime) {

this.creationTime = creationTime;

}


public String getOriginatingChannel() {

return this.originatingChannel;

}

public void setOriginatingChannel(String originatingChannel) {

this.originatingChannel = originatingChannel;

}

}

3. HTML Form


value="25/10/2005">
maxlength="40"

value="originating channel1">


maxlength="60" value="originating_channel_userid1">


4. Exception.

[28/10/05 14:05:42:623 EST] 3f64a3f WebGroup E SRVE0026E: [Servlet 
Error]-
[BeanUtils.populate]: org.apache.commons.beanutils.ConversionException: 
Timestamp

format must be -mm-dd hh:mm:ss.f


at

org.apache.commons.beanutils.converters.SqlTimestampConverter.convert(SqlTimesta
mpConverter.java:117)


at

org.apache.commons.beanutils.ConvertUtilsBean.convert(ConvertUtilsBean.java:428)


at

org.apache.commons.beanutils.BeanUtilsBean.setProperty(BeanUtilsBean.java:1004)


at 
org.apache.commons.beanutils.BeanUtilsBean.populate(BeanUtilsBean.java:811)


at org.apache.commons.beanutils.BeanUtils.populate(BeanU

Re: java.util.Date in Action Form Bean

2005-10-27 Thread Murray Collingwood
Hi 

I add additional getters and setters for handling dates and prices (and other 
special 
numeric formats).  For example, in addition to the normal getter I code an 
additional 
one to retrieve the date as a string.

public Date getDateStart() {
return dateStart;
}
public String getDateStartAsString() {
if (dateStart == null) return "";
return Focus.date2String(dateStart);
}


I then code up some static methods to format dates to strings and similar 
methods to 
make the opposite translation (string back to date).  For example, a method 
from my 
Focus class related to the above code:

public static String date2String(Date date) {
return sdf.format(date);
}

And if you're desparate, here is the sdf definition:

private static SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/");

You can do the same thing with a Timestamp, depends how many fields you want to 
declare on your form and how much data entry you want your user to do.  I used 
a 
similar method in my Focus class to get/set the date portion of the timestamp 
value:

public static String timestamp2String(Timestamp ts) {
if (ts == null) return "";
return date2String(new Date(ts.getTime()));
}

HTH
mc


On 28 Oct 2005 at 14:31, Yujun Liang wrote:

> Hello,
> 
> I am working on a project using Struts. Struts uses BeanUtil to populate 
> Action Form 
Bean. This is such a nice framework to work with, except, 
> 
> BeanUtil doesn't support java.util.Date conversion. But when I use 
java.sql.Timestamp, it asks for the format of 
> -mm-dd hh:mm:ss.f
> 
> Here is the exception when I enter other format,
> 
> Caused by: java.lang.IllegalArgumentException: Timestamp format must be 
> -
mm-dd hh:mm:ss.f
> 
> In a web application, it is not reasonable to ask user to input -mm-dd 
hh:mm:ss.f.
> 
> Also, it doesn't support Locale.
> 
> Do you have experience getting java.util.Date populated in a Java Bean inside 
> a 
FormBean?
> 
> 
> Thanks in advance.
> 
> Regards
> Yujun Liang
> [EMAIL PROTECTED]
> (0408) 467 448
> 
> 1. Form Bean Definition,
> 
> 
> 
> 
> 
> 
> 2. Java Bean,
> 
> package com.mycompany.myproject.bean;
> 
> import java.io.Serializable;
> 
> import java.sql.Timestamp;
> 
> import org.apache.commons.lang.builder.EqualsBuilder;
> 
> import org.apache.commons.lang.builder.HashCodeBuilder;
> 
> import org.apache.commons.lang.builder.ToStringBuilder;
> 
> public abstract class MyBean implements Serializable {
> 
> private long interchangeId;
> 
> private Timestamp creationTime;
> 
> private String originatingChannel;
> 
> public long getInterchangeId() {
> 
> return this.interchangeId;
> 
> }
> 
> public void setInterchangeId(long interchangeId) {
> 
> this.interchangeId = interchangeId;
> 
> }
> 
> public Timestamp getCreationTime() {
> 
> return this.creationTime;
> 
> }
> 
> 
> 
> public void setCreationTime(Timestamp creationTime) {
> 
> this.creationTime = creationTime;
> 
> }
> 
> 
> public String getOriginatingChannel() {
> 
> return this.originatingChannel;
> 
> }
> 
> public void setOriginatingChannel(String originatingChannel) {
> 
> this.originatingChannel = originatingChannel;
> 
> }
> 
> }
> 
> 3. HTML Form
> 
> 
> 
> 
> 
> 4. Exception.
> 
> [28/10/05 14:05:42:623 EST] 3f64a3f WebGroup E SRVE0026E: [Servlet Error]-
[BeanUtils.populate]: org.apache.commons.beanutils.ConversionException: 
Timestamp 
format must be -mm-dd hh:mm:ss.f
> 
> at 
org.apache.commons.beanutils.converters.SqlTimestampConverter.convert(SqlTimesta
mpConverter.java:117)
> 
> at 
org.apache.commons.beanutils.ConvertUtilsBean.convert(ConvertUtilsBean.java:428)
> 
> at 
org.apache.commons.beanutils.BeanUtilsBean.setProperty(BeanUtilsBean.java:1004)
> 
> at org.apache.commons.beanutils.BeanUtilsBean.populate(BeanUtilsBean.java:811)
> 
> at org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:298)
> 
> at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:493)
> 
> at 
org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.java:80
5)
> 
> at 
> org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:203)
> 
> at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
> 
> at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
> 
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
> 
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> 
> at 
com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.
java:110)
> 
> at 
com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.j
ava:174)
> 
> at 
com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:3
13)
> 
> at 
com.ibm.ws.webcontainer.servlet.StrictLifecycleServl

Struts Validation Rule for Single Java Bean form-property

2005-10-27 Thread Yujun Liang
Hello,

I define a single Java Bean Form Bean, do you know how to define the validation 
rule? Thanks.

Regards
Yujun Liang
[EMAIL PROTECTED]
(0408) 467 448


1. Form Bean Definition,






2. Java Bean,

package com.mycompany.myproject.bean;

import java.io.Serializable;

import java.sql.Timestamp;

import org.apache.commons.lang.builder.EqualsBuilder;

import org.apache.commons.lang.builder.HashCodeBuilder;

import org.apache.commons.lang.builder.ToStringBuilder;

public class MyBean implements Serializable {

private long interchangeId;

private Timestamp creationTime;

private String originatingChannel;

public long getInterchangeId() {

return this.interchangeId;

}

public void setInterchangeId(long interchangeId) {

this.interchangeId = interchangeId;

}

public Timestamp getCreationTime() {

return this.creationTime;

}


public void setCreationTime(Timestamp creationTime) { 

this.creationTime = creationTime;

}


public String getOriginatingChannel() {

return this.originatingChannel;

}

public void setOriginatingChannel(String originatingChannel) {

this.originatingChannel = originatingChannel;

}

}

3. HTML Form






java.util.Date in Action Form Bean

2005-10-27 Thread Yujun Liang
Hello,

I am working on a project using Struts. Struts uses BeanUtil to populate Action 
Form Bean. This is such a nice framework to work with, except, 

BeanUtil doesn't support java.util.Date conversion. But when I use 
java.sql.Timestamp, it asks for the format of 
-mm-dd hh:mm:ss.f

Here is the exception when I enter other format,

Caused by: java.lang.IllegalArgumentException: Timestamp format must be 
-mm-dd hh:mm:ss.f

In a web application, it is not reasonable to ask user to input -mm-dd 
hh:mm:ss.f.

Also, it doesn't support Locale.

Do you have experience getting java.util.Date populated in a Java Bean inside a 
FormBean?


Thanks in advance.

Regards
Yujun Liang
[EMAIL PROTECTED]
(0408) 467 448

1. Form Bean Definition,






2. Java Bean,

package com.mycompany.myproject.bean;

import java.io.Serializable;

import java.sql.Timestamp;

import org.apache.commons.lang.builder.EqualsBuilder;

import org.apache.commons.lang.builder.HashCodeBuilder;

import org.apache.commons.lang.builder.ToStringBuilder;

public abstract class MyBean implements Serializable {

private long interchangeId;

private Timestamp creationTime;

private String originatingChannel;

public long getInterchangeId() {

return this.interchangeId;

}

public void setInterchangeId(long interchangeId) {

this.interchangeId = interchangeId;

}

public Timestamp getCreationTime() {

return this.creationTime;

}



public void setCreationTime(Timestamp creationTime) {

this.creationTime = creationTime;

}


public String getOriginatingChannel() {

return this.originatingChannel;

}

public void setOriginatingChannel(String originatingChannel) {

this.originatingChannel = originatingChannel;

}

}

3. HTML Form





4. Exception.

[28/10/05 14:05:42:623 EST] 3f64a3f WebGroup E SRVE0026E: [Servlet 
Error]-[BeanUtils.populate]: org.apache.commons.beanutils.ConversionException: 
Timestamp format must be -mm-dd hh:mm:ss.f

at 
org.apache.commons.beanutils.converters.SqlTimestampConverter.convert(SqlTimestampConverter.java:117)

at 
org.apache.commons.beanutils.ConvertUtilsBean.convert(ConvertUtilsBean.java:428)

at 
org.apache.commons.beanutils.BeanUtilsBean.setProperty(BeanUtilsBean.java:1004)

at org.apache.commons.beanutils.BeanUtilsBean.populate(BeanUtilsBean.java:811)

at org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:298)

at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:493)

at 
org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.java:805)

at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:203)

at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)

at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)

at 
com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)

at 
com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)

at 
com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313)

at 
com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)

at 
com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)

at 
com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)

at 
com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)


Re: [ot] utility to verify if an Object implements all methods from Interface?

2005-10-27 Thread David Evans
I think you could use the java.lang.reflect package classes:

Object obj = new Object();
Method[] methods = obj.getClass.getMethods();

Create another test object that does implement all of the interfaces,
and then compare the methods array to the array created by the test
object's .getClass.getMethods()

dave



On Thu, 2005-10-27 at 15:47, Mick Knutson wrote:
> I have some generated Objects that I CAN"T make implement my given
> interface, but I would like to run a test at startup time, if the Object
> has all the methods it is suppose to have?
>  
> 
> "MMS " made the following annotations.
> --
> Warning: 
> All e-mail sent to this address will be received by the Safeway corporate 
> e-mail system, and is subject to archival and review by someone other than 
> the recipient.  This e-mail may contain information proprietary to Safeway 
> and is intended only for the use of the intended recipient(s).  If the reader 
> of this message is not the intended recipient(s), you are notified that you 
> have received this message in error and that any review, dissemination, 
> distribution or copying of this message is strictly prohibited.  If you have 
> received this message in error, please notify the sender immediately. 
>   
> ==


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



Re: html:base and Tiles

2005-10-27 Thread Craig McClanahan
On 10/27/05, Laurie Harper <[EMAIL PROTECTED]> wrote:
>
> I feel like I should know the answer to this one but I seem to be
> stumped... How do I get the actual request URI (or URL) in a JSP that's
> included via Tiles?
>
> Both ${pageContext.request.requestURI} and
> ${pageContext.request.requestURL} are pointing to the Tiles layout JSP,
> whether or not I include an  tag in the  section in
> the layout.
>
> To be exact, what I actually need is the full context-relative request
> path -- and I'm using URL prefix mapping, so for example the URL I
> browse to would be http://host/bin/some/path and the bit I need is
> '/some/path'.


If you're within the context of a RequestDispatcher.include() -- which is
what Tiles is doing under the covers -- the servlet container promises to
create some request attributes for you that contain useful information about
the included URI, rather than the original request URI. In particular, the
attribute named "javax.servlet.include.request_uri" will include what you
are looking for. Other attributes of interest:
* javax.servlet.include.context_path
* javax.servlet.include.servlet_path
* javax.servlet.include.path_info
* javax.servlet.include.query_string

(See section SRV.8.3.1 of the Servlet Spec for more info.)

Craig


Thanks,
>
> L.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


RE: Cross Tab Reports with Jasper

2005-10-27 Thread Meenakshi Singh
Is there a GUI tool available which creates a crosstab report also.

Thanks & Regards

-Original Message-
From: Martin Gainty [mailto:[EMAIL PROTECTED]
Sent: Thursday, October 27, 2005 8:35 PM
To: [EMAIL PROTECTED]
Cc: Struts Users Mailing List
Subject: Re: Cross Tab Reports with Jasper


Have you looked at net.sf.jasperreports.crosstabs interface available from
sourceforge jasperreports?
http://jasperreports.sourceforge.net/api/index.html
Here is crosstab dataset implementation class (used at design time)
http://jasperreports.sourceforge.net/api/net/sf/jasperreports/crosstabs/desi
gn/JRDesignCrosstabDataset.html

Martin-
- Original Message -
From: "Meenakshi Singh" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List (E-mail)" 
Sent: Thursday, October 27, 2005 9:40 AM
Subject: Cross Tab Reports with Jasper


> Hi,
>
> Would anybody please tell me :
>
> Do Jasper Reports have a support for crosstab reports?
> if yes, then how do we make a crosstab report with Jasper API?
>
> Thanks & Regards,
> Meenakshi.
>
> -
> 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]



logic:iterate and bean:write not showing when jstl c:out does

2005-10-27 Thread Stephen Souness

Hi all,

I am using Struts 1.2.7, under Tomcat 5.0.25.

I have a JSP within my struts application which I ultimately want to 
have output some checkboxes (using ).


Other areas of my application use LabelValueBean with  
and  just fine.


However, this particular area of my application has a few differing 
requirements and is not behaving the way I had hoped.


The key difference is that this particular area of the application 
involves a FormBean which is shared across several pages, and is stored 
in session scope.


I think that the action is correct in adding the Form like so:

request.getSession().setAttribute("myForm", myForm);


The JSP which acts as the view for the action can display attributes 
from the form if I refer to them using JSTL tags, but if I refer to the 
same attributes through struts tags, e.g.


property="myLabelValueBeans">




the page finishes loading and displays nothing at all.


I've seen behaviour like this in the past when a list is not being 
populated, but I am quite certain that this is not the case.


Does anyone have any advice on what else I should be looking out for? 
(Logging to enable? etc.)


This is the third project using Struts that I have worked on, so I hope 
this does not turn out to be a "newbie" issue :)



--
Stephen


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



Re: how many Form beans

2005-10-27 Thread Laurie Harper

fea jabi wrote:

thankyou for your responses.

for my Jsp I created a formbean and for  Form1
with attributes
name
row[]

table row in the jsp created another formbean.--- Form2
with attributes
type
currency
amount

In the action I created dummy data
Form2[] - row[] and set it to the form1 attribute


I'm not sure I understand what you're doing here. Are you saying that 
Form1 and Form2 are ActionForm subclasses, and that 'row' in Form1 is an 
array of Form2 instances? And that the JSP is rendering a single form, 
part of which is shown in a table? In that case, Form2 doesn't have to 
be a form bean (ActionForm instance), it can be any arbitrary java bean 
-- or you could have Form1 declare three arrays named type[], currency[] 
and amount[].


There's lots of options here, depending on exactly what you're trying to 
achieve. That said, if I understand what you have then it should work.


Now I am not sure how this row[] values to be displayed using struts in 
the jsp. i mean how to loop thru this to get values.


To loop through a colllection of values, you would use the 
 tag from Struts [1] or, if you have it available, the 
 tag from JSTL.


Maybe you could post your code, JSP and struts-config.xml so we can see 
more clearly what you're doing.


HTH,

L.

[1] 
http://struts.apache.org/struts-taglib/tagreference-struts-logic.html#iterate




I would appreciate your help.

can I do this?? or is there an easier way to display data in table?

thanks.







From: "Martin Gainty" <[EMAIL PROTECTED]>
Reply-To: "Martin Gainty" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" 
Subject: Re: how many Form beans
Date: Thu, 27 Oct 2005 17:16:09 -0400

A couple of gotchas concerning TagLibs

what version JSP container ?
if its 2.0 then consider JSTL 1.1.x tags

On the other hand the struts html tag library outstrips anything 
available from JSTL
But if you want performance steer clear Struts logic: tags as they 
rank slowest of all available Logic Taglibs


If you are concerned about being tied into a TagLib that doesnt 
accomplish everything you want to do go with scriptlets

and wait for JSF Tag Library

Good Luck,
Martin-
- Original Message - From: "Laurie Harper" <[EMAIL PROTECTED]>
To: 
Sent: Thursday, October 27, 2005 3:51 PM
Subject: Re: how many Form beans



fea jabi wrote:


I am new to web development and struts too.

I am trying to create a jsp which has

a text field for display only for Name

and a Table below it with couple of rows and columns in it.


how many form beans do I have to create?

Do I have to create one for the jsp and one for the table alone?

do I have to use nested tag? not really sure. if so how do I have to 
use this in jsp?



It's really up to you to a large extent. You can have a single form 
bean for an entire application if you want. One for each page that 
has a form on it is probably typical though.


The User Guide section on developing view components [1] may help you 
get a better overall understanding of what your options are.


I'm not sure when you say 'nested tags' if you're referring to the 
'nested' tag library, or if you just mean having tags nested inside 
other tags. Assuming the former, no, you don't necessarily need to 
use them, though they may make some things easier. I'd suggest 
getting to grips with the basics first and then looking at the 
'nested' taglib again later, when you'll be better able to understand 
if what it offers applies to what you're doing.


L.

[1] http://struts.apache.org/struts-core/userGuide/building_view.html


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



_
Is your PC infected? Get a FREE online computer virus scan from McAfee® 
Security. http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963




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



Re: [Shale] new Clay replacement symbols

2005-10-27 Thread Gary VanMatre
Ryan Wynn Wrote:

> I think I may have narrowed down the problem. 
> 
> In org.apache.shale.clay.component.chain.CreateComponentCommand 
> 
> String id = null; 
> 
> if ((id = displayElement.getId()) == null) 
> id = facesContext.getViewRoot().createUniqueId(); 
> 
> UIComponent child = null; 
> if (displayElement.getFacetName() != null) 
> child = parent.getFacet(displayElement.getFacetName()); 
> else 
> child = parent.findComponent(id); 
> if (child == null) { 
> // create child 
> } 
> 
> probably needs to take into account that id may have a mnemonic associated 
> with it. 
> 
> so, 
> 
> String id = null; 
> id = hasMnemonic(displayElement.getId()) ? 
> getMnemoic(displayElement.getId()): displayElement.getId(); 
> 
> if (id == null) 
> id = facesContext.getViewRoot().createUniqueId(); 
> ... 
> 
> Then a duplicate component will not be created in the render cycle. 
> 

Thanks for the help Ryan.  I believe I addressed the component id problem you 
identified.  


I think we might be able to extend this symbol replacement to the JSP clay tag. 
 Maybe create a tag similar to the jsf attribute tag.  I guess that would 
require changing the clay tag to a body tag.  This would be similar to what 
Craig described in the original clay todo list  (#7 
http://issues.apache.org/bugzilla/show_bug.cgi?id=33752 )


I was also thinking about adding to the clay DTD so that "symbols" could be use 
for full XML views too?
 
Gary

html:base and Tiles

2005-10-27 Thread Laurie Harper
I feel like I should know the answer to this one but I seem to be 
stumped... How do I get the actual request URI (or URL) in a JSP that's 
included via Tiles?


Both ${pageContext.request.requestURI} and 
${pageContext.request.requestURL} are pointing to the Tiles layout JSP, 
whether or not I include an  tag in the  section in 
the layout.


To be exact, what I actually need is the full context-relative request 
path -- and I'm using URL prefix mapping, so for example the URL I 
browse to would be http://host/bin/some/path and the bit I need is 
'/some/path'.


Thanks,

L.


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



Re: [ot] utility to verify if an Object implements all methods from Interface?

2005-10-27 Thread Frank W. Zammetti

Interesting... why can't you implement the interface?  Just curious.

Does it implement any other interfaces to build up the method list?  If 
so, you could just do a serious of instanceof's against all the 
interfaces it implements.  Alternatively, you can use reflection to get 
a list of the methods it contains and do your checks against that.


Frank

Mick Knutson wrote:

I have some generated Objects that I CAN"T make implement my given
interface, but I would like to run a test at startup time, if the Object
has all the methods it is suppose to have?
 


"MMS " made the following annotations.
--
Warning: 
All e-mail sent to this address will be received by the Safeway corporate e-mail system, and is subject to archival and review by someone other than the recipient.  This e-mail may contain information proprietary to Safeway and is intended only for the use of the intended recipient(s).  If the reader of this message is not the intended recipient(s), you are notified that you have received this message in error and that any review, dissemination, distribution or copying of this message is strictly prohibited.  If you have received this message in error, please notify the sender immediately. 
  
==




--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM: fzammetti
Yahoo: fzammetti
MSN: [EMAIL PROTECTED]

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



Re: how many Form beans

2005-10-27 Thread fea jabi

thankyou for your responses.

for my Jsp I created a formbean and for  Form1
with attributes
name
row[]

table row in the jsp created another formbean.--- Form2
with attributes
type
currency
amount

In the action I created dummy data
Form2[] - row[] and set it to the form1 attribute

Now I am not sure how this row[] values to be displayed using struts in the 
jsp. i mean how to loop thru this to get values.


I would appreciate your help.

can I do this?? or is there an easier way to display data in table?

thanks.







From: "Martin Gainty" <[EMAIL PROTECTED]>
Reply-To: "Martin Gainty" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" 
Subject: Re: how many Form beans
Date: Thu, 27 Oct 2005 17:16:09 -0400

A couple of gotchas concerning TagLibs

what version JSP container ?
if its 2.0 then consider JSTL 1.1.x tags

On the other hand the struts html tag library outstrips anything available 
from JSTL
But if you want performance steer clear Struts logic: tags as they rank 
slowest of all available Logic Taglibs


If you are concerned about being tied into a TagLib that doesnt accomplish 
everything you want to do go with scriptlets

and wait for JSF Tag Library

Good Luck,
Martin-
- Original Message - From: "Laurie Harper" <[EMAIL PROTECTED]>
To: 
Sent: Thursday, October 27, 2005 3:51 PM
Subject: Re: how many Form beans



fea jabi wrote:

I am new to web development and struts too.

I am trying to create a jsp which has

a text field for display only for Name

and a Table below it with couple of rows and columns in it.


how many form beans do I have to create?

Do I have to create one for the jsp and one for the table alone?

do I have to use nested tag? not really sure. if so how do I have to use 
this in jsp?


It's really up to you to a large extent. You can have a single form bean 
for an entire application if you want. One for each page that has a form 
on it is probably typical though.


The User Guide section on developing view components [1] may help you get 
a better overall understanding of what your options are.


I'm not sure when you say 'nested tags' if you're referring to the 
'nested' tag library, or if you just mean having tags nested inside other 
tags. Assuming the former, no, you don't necessarily need to use them, 
though they may make some things easier. I'd suggest getting to grips with 
the basics first and then looking at the 'nested' taglib again later, when 
you'll be better able to understand if what it offers applies to what 
you're doing.


L.

[1] http://struts.apache.org/struts-core/userGuide/building_view.html


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



_
Is your PC infected? Get a FREE online computer virus scan from McAfee® 
Security. http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963



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



Re: Problems with custom taglibs

2005-10-27 Thread Wendy Smoak

From: "Eric Plante" <[EMAIL PROTECTED]>


I have the one that comes with Exadel studio 3.0 (or eclipse3.1). it is
named jstl.jar but I don'T know which version I have.


Unzip/unjar it (jar -xvf fileame.jar) or open it with WinZip and look in the 
META-INF directory for the manifest.mf file.  It should tell you what 
version you're using.  For Servlet 2.3 you need an implementation of JSTL 
1.0.


Can you post a snippet of the JSP, including the <%@ taglib ...> and the JSP 
code, along with the HTML it renders?


--
Wendy 



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



Re: Problems with custom taglibs

2005-10-27 Thread Eric Plante
I have the one that comes with Exadel studio 3.0 (or eclipse3.1). it is
named jstl.jar but I don'T know which version I have.

All standard taglibs(bean, html and logic) works fine and core tags are
recognized but the variables are seens as common strings and my personnal
taglibs don't compile but not sure if that is tied to the jstl as
well(anyone knows?)

How can I know which jstl.jar version I'm using? it's property doesn't say.

I'm using servlet 2.3(I started my project with an olded version by mistake)

Thanks

> From: "Eric Plante" <[EMAIL PROTECTED]>
>
> > Well, I do have a jstl.jar in the lib of my project already.
>
> Do you also have standard.jar?   (Both are in contrib/struts-el/lib of the
> Struts 1.2.7 distribution.)
>
> -- 
> Wendy
>
>
>
>
>
>
> -
> 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: Problems with custom taglibs

2005-10-27 Thread Wendy Smoak

From: "Eric Plante" <[EMAIL PROTECTED]>


Well, I do have a jstl.jar in the lib of my project already.


Do you also have standard.jar?   (Both are in contrib/struts-el/lib of the 
Struts 1.2.7 distribution.)


--
Wendy






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



[ot] utility to verify if an Object implements all methods from Interface?

2005-10-27 Thread Mick Knutson
I have some generated Objects that I CAN"T make implement my given
interface, but I would like to run a test at startup time, if the Object
has all the methods it is suppose to have?
 

"MMS " made the following annotations.
--
Warning: 
All e-mail sent to this address will be received by the Safeway corporate 
e-mail system, and is subject to archival and review by someone other than the 
recipient.  This e-mail may contain information proprietary to Safeway and is 
intended only for the use of the intended recipient(s).  If the reader of this 
message is not the intended recipient(s), you are notified that you have 
received this message in error and that any review, dissemination, distribution 
or copying of this message is strictly prohibited.  If you have received this 
message in error, please notify the sender immediately. 
  
==


Re: Implementing Wizards

2005-10-27 Thread Michael Jouravlev
On 10/27/05, Ross Gibb <[EMAIL PROTECTED]> wrote:
> I know this comes up from time to time and yes I have read the previous
> posts on implementing wizard like interfaces.  As a result of previous
> posts I decided to give Struts Workflow Extension a shot,
> http://www.livinglogic.de/Struts/.  I implemented a simple five screen
> wizard like interface for adding a new user to my system.  I did get it
> to work the way I wanted.  However, I found that using Struts Workflow
> Extension was often counter-intuitive and at times frustrating.  Also, I
> am using Struts 1.2.7 and I will have to make a few bug fixes to the
> Struts Workflow Extension code to make it work properly.
>
> My question is: has anyone used Struts Workflow Extension and then
> switched to another wizard tool kit and found it to be superior to
> Struts Workflow Extension?  I am specifically looking for input from
> people who have actually used Struts Workflow Extension because even
> though I knock it, I did get it to work the way I wanted it to and I am
> reasonably sure I can easily fix the bugs I am experiencing with it.

So, did you also try this:
http://struts.sourceforge.net/strutsdialogs/wizardaction.html
If you did, did you find it counterintuitive? complex? not doing what
you want? I would really appreciate the feedback.

I tried Struts Workflow Extension before, I was not completely
satisfied with it, because it is based on artificial steps, not on
model state. I even wrote a short comparison:
http://www.jroller.com/comments/javadujour/Weblog/spring_web_flow_vs_struts
Also, with SWE you can use navigation buttons, and then wizard will
bite you, telling that you cannot do it. But sometimes you can get SWE
wizard out of sync.

Michael.

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



Re: Problems with custom taglibs

2005-10-27 Thread Eric Plante
Well, I do have a jstl.jar in the lib of my project already.


> From: "Laurie Harper" <[EMAIL PROTECTED]>
>
> > Yes, you need to add the implementation jars to your application
> > classpath. Which version you need to install will depend on your servlet
> > container.
>
> This might help you sort out which one you need:
>http://wiki.wsmoak.net/cgi-bin/wiki.pl?StrutsAndJSTL
>
> If it's Servlet 2.3, just copy the .jar files under the 'contrib'
directory
> of Struts 1.2.x into your webapp.
>
> -- 
> Wendy
>
>
> -
> 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: [Shale] new Clay replacement symbols

2005-10-27 Thread Ryan Wynn
I think I may have narrowed down the problem.

In org.apache.shale.clay.component.chain.CreateComponentCommand 

String id = null;

if ((id = displayElement.getId()) == null)
id = facesContext.getViewRoot().createUniqueId();

UIComponent child = null;
if (displayElement.getFacetName() != null)
child = parent.getFacet(displayElement.getFacetName());
else
child = parent.findComponent(id);
if (child == null) {
// create child
}

probably needs to take into account that id may have a mnemonic associated 
with it.

so, 

String id = null;
id = hasMnemonic(displayElement.getId()) ? 
getMnemoic(displayElement.getId()): displayElement.getId();

if (id == null)
id = facesContext.getViewRoot().createUniqueId();
...

Then a duplicate component will not be created in the render cycle.





Ryan Wynn/Vienna/[EMAIL PROTECTED] 
10/27/2005 04:04 PM
Please respond to
"Struts Users Mailing List"


To
user@struts.apache.org
cc
[EMAIL PROTECTED]
Subject
[Shale] new Clay replacement symbols






I noticed the new code for the replacement symbols. Gary,  I like how 
you've opened it up to any attribute that is not defined.  Great job on 
this.

It seems that the ClayViewHandler will now have to change to accomodate 
this.  I noticed the following problem today.

If I have 








then in the html




What happens it that the first time the page is rendered, everything works 

properly.  I get an input field with in id of 'foo'.  Then the next time 
the page is rendered I get a Duplicate Id in the Faces Tree error for 
'foo'.  I debugged this a little bit and I noticed that the second time 
the page is rendered 2 HtmlInputText components exist in the Faces Tree 
for 'foo'.  So I am guessing that Clay is doing the replacement on the 
symbol later than it needs to for id.  In which case it would look for a 
component with id @myId instead of foo when deciding whether or not a 
component needs to be created.

Ryan






RE: Implementing Wizards

2005-10-27 Thread Mark Benussi

Yep +1.

I did the same. Implemented my own. I was nervous about using yet another 
framework, when what I did instead was get a pen and paper and design it 
from scratch. Yes I had some time to kill (Although not that much) but I 
learnt a lot, about how users work as well as Struts.


Its not prefect, but when I need to change it, i know exactly what the code 
does.


There you have my tupence worth.

Original Message Follows
From: <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" 
To: 
Subject: RE: Implementing Wizards
Date: Thu, 27 Oct 2005 15:33:15 -0600

Hi Ross.  I created a User Wizard to add Users to Microsoft Active Directory 
from Linux.  I did look at the Workflow Extensions as a possibility but I 
found it cumbersome to use and chose to create a Wizard using pure Struts 
and not the extensions.  I have to tell you the Struts knowledge I gained 
from doing it from scratch was worth the effort and it was great fun (I have 
only been doing Struts for 2 1/2 weeks).


I used Struts 1.2.7 and used the LookupDispatchAction as the basis for my 
Wizard.  The book "Jakarta Struts Cookbook" on pages 199 to 203 gives a good 
example of how to do this.  Validating the Wizard form on pages 251 to 254 
is good also.


The action mapping is as follows:

 
 

 
 























  


-Original Message-
From: Ross Gibb [mailto:[EMAIL PROTECTED]
Sent: Thu 10/27/2005 2:58 PM
To: Struts Users Mailing List
Subject: Implementing Wizards

I know this comes up from time to time and yes I have read the previous
posts on implementing wizard like interfaces.  As a result of previous
posts I decided to give Struts Workflow Extension a shot,
http://www.livinglogic.de/Struts/.  I implemented a simple five screen
wizard like interface for adding a new user to my system.  I did get it
to work the way I wanted.  However, I found that using Struts Workflow
Extension was often counter-intuitive and at times frustrating.  Also, I
am using Struts 1.2.7 and I will have to make a few bug fixes to the
Struts Workflow Extension code to make it work properly.

My question is: has anyone used Struts Workflow Extension and then
switched to another wizard tool kit and found it to be superior to
Struts Workflow Extension?  I am specifically looking for input from
people who have actually used Struts Workflow Extension because even
though I knock it, I did get it to work the way I wanted it to and I am
reasonably sure I can easily fix the bugs I am experiencing with it.

Thanks,

Ross

-
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: Implementing Wizards

2005-10-27 Thread bsimonin
Hi Ross.  I created a User Wizard to add Users to Microsoft Active Directory 
from Linux.  I did look at the Workflow Extensions as a possibility but I found 
it cumbersome to use and chose to create a Wizard using pure Struts and not the 
extensions.  I have to tell you the Struts knowledge I gained from doing it 
from scratch was worth the effort and it was great fun (I have only been doing 
Struts for 2 1/2 weeks). 

I used Struts 1.2.7 and used the LookupDispatchAction as the basis for my 
Wizard.  The book "Jakarta Struts Cookbook" on pages 199 to 203 gives a good 
example of how to do this.  Validating the Wizard form on pages 251 to 254 is 
good also.  

The action mapping is as follows:

 
 
  
 
 






 








 







  


-Original Message-
From: Ross Gibb [mailto:[EMAIL PROTECTED]
Sent: Thu 10/27/2005 2:58 PM
To: Struts Users Mailing List
Subject: Implementing Wizards
 
I know this comes up from time to time and yes I have read the previous 
posts on implementing wizard like interfaces.  As a result of previous 
posts I decided to give Struts Workflow Extension a shot, 
http://www.livinglogic.de/Struts/.  I implemented a simple five screen 
wizard like interface for adding a new user to my system.  I did get it 
to work the way I wanted.  However, I found that using Struts Workflow 
Extension was often counter-intuitive and at times frustrating.  Also, I 
am using Struts 1.2.7 and I will have to make a few bug fixes to the 
Struts Workflow Extension code to make it work properly.

My question is: has anyone used Struts Workflow Extension and then 
switched to another wizard tool kit and found it to be superior to 
Struts Workflow Extension?  I am specifically looking for input from 
people who have actually used Struts Workflow Extension because even 
though I knock it, I did get it to work the way I wanted it to and I am 
reasonably sure I can easily fix the bugs I am experiencing with it.

Thanks,

Ross

-
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 many Form beans

2005-10-27 Thread Martin Gainty

A couple of gotchas concerning TagLibs

what version JSP container ?
if its 2.0 then consider JSTL 1.1.x tags

On the other hand the struts html tag library outstrips anything available 
from JSTL
But if you want performance steer clear Struts logic: tags as they rank 
slowest of all available Logic Taglibs


If you are concerned about being tied into a TagLib that doesnt accomplish 
everything you want to do go with scriptlets

and wait for JSF Tag Library

Good Luck,
Martin-
- Original Message - 
From: "Laurie Harper" <[EMAIL PROTECTED]>

To: 
Sent: Thursday, October 27, 2005 3:51 PM
Subject: Re: how many Form beans



fea jabi wrote:

I am new to web development and struts too.

I am trying to create a jsp which has

a text field for display only for Name

and a Table below it with couple of rows and columns in it.


how many form beans do I have to create?

Do I have to create one for the jsp and one for the table alone?

do I have to use nested tag? not really sure. if so how do I have to use 
this in jsp?


It's really up to you to a large extent. You can have a single form bean 
for an entire application if you want. One for each page that has a form 
on it is probably typical though.


The User Guide section on developing view components [1] may help you get 
a better overall understanding of what your options are.


I'm not sure when you say 'nested tags' if you're referring to the 
'nested' tag library, or if you just mean having tags nested inside other 
tags. Assuming the former, no, you don't necessarily need to use them, 
though they may make some things easier. I'd suggest getting to grips with 
the basics first and then looking at the 'nested' taglib again later, when 
you'll be better able to understand if what it offers applies to what 
you're doing.


L.

[1] http://struts.apache.org/struts-core/userGuide/building_view.html


-
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: new website look

2005-10-27 Thread Adam Hardy

Ted Husted on 27/10/05 14:03, wrote:

On 10/26/05, Niall Pemberton <[EMAIL PROTECTED]> wrote:


Personally I'm still in the Struts Classic camp at this point
in time, but thats because my day job has 4+ years worth of investment
in it and I havem't had time to evaluate the alternatives yet.



It wouldn't surprise me to find that at least 80% of us are in that
same boat :)

I think the real question now is how soon teams will be ready to try
Rich Internet Applications, including Ajax, and what is going to be
the best RIA choice when a Struts Classic team is ready switch.


Do you really think RIA is going to be so big?

When I surf using my Handspring Treo mobile, I really appreciate 
websites that are lean and technically elegant and display on my screen. 
I can't even run javascript, so any RIAs are no-go for my mobile.


I can't see javascript being implemented on this type of browser for a 
long time either.


Plus there is always the issue that user interaction design is still in 
its infancy, and many people and companies and websites haven't grasped 
the basics of it for simple websites, let alone RIAs.


Anyway I cant see how RIAs in browsers are going to make any difference 
to server-side architecture. They still have to deal with HTTP even if 
they hide it from the user.


All pure hypothesising of course.

Adam

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



Implementing Wizards

2005-10-27 Thread Ross Gibb
I know this comes up from time to time and yes I have read the previous 
posts on implementing wizard like interfaces.  As a result of previous 
posts I decided to give Struts Workflow Extension a shot, 
http://www.livinglogic.de/Struts/.  I implemented a simple five screen 
wizard like interface for adding a new user to my system.  I did get it 
to work the way I wanted.  However, I found that using Struts Workflow 
Extension was often counter-intuitive and at times frustrating.  Also, I 
am using Struts 1.2.7 and I will have to make a few bug fixes to the 
Struts Workflow Extension code to make it work properly.


My question is: has anyone used Struts Workflow Extension and then 
switched to another wizard tool kit and found it to be superior to 
Struts Workflow Extension?  I am specifically looking for input from 
people who have actually used Struts Workflow Extension because even 
though I knock it, I did get it to work the way I wanted it to and I am 
reasonably sure I can easily fix the bugs I am experiencing with it.


Thanks,

Ross

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



Re: Validator Logic Help Needed

2005-10-27 Thread Niall Pemberton
On 10/27/05, Laurie Harper <[EMAIL PROTECTED]> wrote:
> There are a couple of validation rules you can look at for this; the
> first, and older option, is the 'validif' rule. The more modern option
> is the 'validwhen' option. Unfortunately, I can't see where the
> validator documentation has moved to on the new Struts site or I'd give
> you links... Anyone know where this is now?

You can access the 1.2.x docs here...

http://struts.apache.org/struts-doc-1.2.x/index.html

Validator User Guide:
http://struts.apache.org/struts-doc-1.2.x/userGuide/dev_validator.html

http://struts.apache.org/struts-doc-1.2.x/userGuide/dev_validator.html#validwhen

http://struts.apache.org/struts-doc-1.2.x/userGuide/dev_validator.html#conditionals

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



[Shale] new Clay replacement symbols

2005-10-27 Thread Ryan Wynn
I noticed the new code for the replacement symbols. Gary,  I like how 
you've opened it up to any attribute that is not defined.  Great job on 
this.

It seems that the ClayViewHandler will now have to change to accomodate 
this.  I noticed the following problem today.

If I have 








then in the html




What happens it that the first time the page is rendered, everything works 
properly.  I get an input field with in id of 'foo'.  Then the next time 
the page is rendered I get a Duplicate Id in the Faces Tree error for 
'foo'.  I debugged this a little bit and I noticed that the second time 
the page is rendered 2 HtmlInputText components exist in the Faces Tree 
for 'foo'.  So I am guessing that Clay is doing the replacement on the 
symbol later than it needs to for id.  In which case it would look for a 
component with id @myId instead of foo when deciding whether or not a 
component needs to be created.

Ryan





Re: how many Form beans

2005-10-27 Thread Laurie Harper

fea jabi wrote:

I am new to web development and struts too.

I am trying to create a jsp which has

a text field for display only for Name

and a Table below it with couple of rows and columns in it.


how many form beans do I have to create?

Do I have to create one for the jsp and one for the table alone?

do I have to use nested tag? not really sure. if so how do I have to use 
this in jsp?


It's really up to you to a large extent. You can have a single form bean 
for an entire application if you want. One for each page that has a form 
on it is probably typical though.


The User Guide section on developing view components [1] may help you 
get a better overall understanding of what your options are.


I'm not sure when you say 'nested tags' if you're referring to the 
'nested' tag library, or if you just mean having tags nested inside 
other tags. Assuming the former, no, you don't necessarily need to use 
them, though they may make some things easier. I'd suggest getting to 
grips with the basics first and then looking at the 'nested' taglib 
again later, when you'll be better able to understand if what it offers 
applies to what you're doing.


L.

[1] http://struts.apache.org/struts-core/userGuide/building_view.html


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



Re: Validator Logic Help Needed

2005-10-27 Thread Laurie Harper

Jim Reynolds wrote:

Using Validator in struts 1.2
 Problem:
 I have a form that has two rows of data: The first column is a "radio"
button and its value is either "new" or "old"
See mimic form below
 So the user must select either the new or existing but not both. No big
deal. Problem is for each row, there are two columns that are required: Here
is a kind of visual
 () OLD text1[ put your data here ] text2[ put data here]
or
() NEW text1[ put your data here ] text2[ put data here]
  Here is how the form kind of lays out.
 

 
 
 or

 
 
 The user will select only one radio, but I must make sure that its row
members are valid.
 So in the validator I need to find out whether new or existing was clicked,
and based upon that, I need to ensure that the two members belonging to that
row are valid. Not empty.
 Make sense?


Can you just have the two radio buttons and two text fields (rather than 
four text fields)? That would simplify the interface for your users and 
reduce the complexity of the validation a little, since you can just 
mark everything as 'required'.


If that's not an option, you need to do conditional validation to say 
that 'newText1' and 'newText2' are required if 'new' is set; 'oldText1' 
and 'oldText2' are required if 'old' is set (assuming I've understood 
you correctly).


There are a couple of validation rules you can look at for this; the 
first, and older option, is the 'validif' rule. The more modern option 
is the 'validwhen' option. Unfortunately, I can't see where the 
validator documentation has moved to on the new Struts site or I'd give 
you links... Anyone know where this is now?


L.


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



Re: how to copy the properties of one Struts form-bean to another?

2005-10-27 Thread Laurie Harper
And Struts 1.3 will make it much easier to setup your form bean 
declarations in struts-config.xml when you do this :-) But note that 
having a shared form bean and having a common parent class don't achieve 
the same thing.


A shared form bean means having a single instance of a particular bean 
that you can refer to from different contexts and always see the same 
data. Having a superclass only shares the *structure*, not the data; you 
would still need to use a shared bean of some type to get shared data.


In other words, one's not an alternative to the other, they're seperate 
concerns. You can use either or both to achieve different things, but a 
shared parent class doesn't automatically give you shared data.


L.

atta-ur rehman wrote:

Hi Starky,

Yes, I'd think that having a common super class for a set of form classes
that all have some common fields should be a good idea. Not only you get
shared fields but also reset() and validate() can be reused in subclasses,
for example.

ATTA


On 10/27/05, starki78 <[EMAIL PROTECTED]> wrote:


Thank you for your answer!
But if you have a shared form bean, would it also
be an alternative to have a super class form
bean with the shared paramters and the heritaged
subclasses?

Nice greetings
Starky






-- Initial Header ---

From : "Wendy Smoak" [EMAIL PROTECTED]
To : "Struts Users Mailing List" user@struts.apache.org
Cc :
Date : Wed, 26 Oct 2005 09:44:54 -0700
Subject : Re: how to copy the properties of one Struts form-bean to
another?









From: "starki78" <[EMAIL PROTECTED]>


thanks that was what I was exactly looking for!


If you find yourself copying properties from form to form too much, you
might consider consolidating the forms.

One of my Struts apps uses a single session-scoped form bean across the
entire app. It's a front end for accounting reports, so in this way I'm
able to easily 'remember' the list of accounts and other settings the


person


was working with, no matter which report they're requesting.

--
Wendy Smoak


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



how many Form beans

2005-10-27 Thread fea jabi

I am new to web development and struts too.

I am trying to create a jsp which has

a text field for display only for Name

and a Table below it with couple of rows and columns in it.


how many form beans do I have to create?

Do I have to create one for the jsp and one for the table alone?

do I have to use nested tag? not really sure. if so how do I have to use 
this in jsp?


I would appreciate if you can help me with the same.

Thanks.

_
Express yourself instantly with MSN Messenger! Download today - it's FREE! 
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/



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



Validator Logic Help Needed

2005-10-27 Thread Jim Reynolds
Using Validator in struts 1.2
 Problem:
 I have a form that has two rows of data: The first column is a "radio"
button and its value is either "new" or "old"
See mimic form below
 So the user must select either the new or existing but not both. No big
deal. Problem is for each row, there are two columns that are required: Here
is a kind of visual
 () OLD text1[ put your data here ] text2[ put data here]
or
() NEW text1[ put your data here ] text2[ put data here]
  Here is how the form kind of lays out.
 

 
 
 or

 
 
 The user will select only one radio, but I must make sure that its row
members are valid.
 So in the validator I need to find out whether new or existing was clicked,
and based upon that, I need to ensure that the two members belonging to that
row are valid. Not empty.
 Make sense?


Re: Cross Tab Reports with Jasper

2005-10-27 Thread Martin Gainty
Have you looked at net.sf.jasperreports.crosstabs interface available from 
sourceforge jasperreports?

http://jasperreports.sourceforge.net/api/index.html
Here is crosstab dataset implementation class (used at design time)
http://jasperreports.sourceforge.net/api/net/sf/jasperreports/crosstabs/design/JRDesignCrosstabDataset.html

Martin-
- Original Message - 
From: "Meenakshi Singh" <[EMAIL PROTECTED]>

To: "Struts Users Mailing List (E-mail)" 
Sent: Thursday, October 27, 2005 9:40 AM
Subject: Cross Tab Reports with Jasper



Hi,

Would anybody please tell me :

Do Jasper Reports have a support for crosstab reports?
if yes, then how do we make a crosstab report with Jasper API?

Thanks & Regards,
Meenakshi.

-
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 prevent the login information cached

2005-10-27 Thread info3853 Bush
Hi, Michael,

What you suggest works fine. In this way, the URL is
changed from login.do to login.jsp. And in jsp, all
user information has been reinitialized so user has to
provide login information.

Thanks,

Bush

--- Michael Jouravlev <[EMAIL PROTECTED]> wrote:

> On 10/26/05, info3853 Bush <[EMAIL PROTECTED]>
> wrote:
> > I had a web application based on struts framework.
> Recently, I found that after you logout, you use the
> browser back button back to the login.do
> > page, the page shows the Page Time Out, however,
> if you click the refresh button, the page
> automatically login to the application without ask
> you any user information. Anyone has idea to handle
> this situation?
> 
> After you log in, you must redirect to the success
> page instead of
> forwarding to it.
> 
> What probably happens in your case, you log in and
> forward to success
> page. At this point success page is addressed with
> prior login
> request, so if you refresh success page, you will
> reinvoke login
> request. After you log in, you go back to success
> page and reload it,
> which reinvokes login request and bam, you logged in
> again.
> 
> Michael.
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 




__ 
Yahoo! FareChase: Search multiple travel sites in one click.
http://farechase.yahoo.com

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



Cross Tab Reports with Jasper

2005-10-27 Thread Meenakshi Singh
Hi,

Would anybody please tell me :

Do Jasper Reports have a support for crosstab reports?
if yes, then how do we make a crosstab report with Jasper API?

Thanks & Regards,
Meenakshi.

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



Re: [OT] Re: How to prevent the login information cached

2005-10-27 Thread info3853 Bush
Thanks for the information.

Unfortunately, we did exactly the same as described.
The thing is that Window 2000 allows login formation
cached. When you use the back button to the point
where
URL is something like
http://xxxDomain/applicationName/logon.do
and you refresh the page, windown will ask you if you
want to resend the information, if you hit yes, then
the cached user and password information will send to
your webserver with a new session id(this will not
directly go through your login page, instead just
login action with the cached user information).

--- Hotmail <[EMAIL PROTECTED]> wrote:

> why not have a action configured for logoff in
> struts-config.zml
>path="/logoff"
>  
>
type="org.apache.struts.webapp.example.LogoffAction">
>path="/WEB-INF/jsp/index.jsp"/>
> 
> 
> then somewhere inside LogoffAction class invalidate
> your session and 
> redirect to your index.jsp
> e.g.
> public class LogoffAction extends Action
> {
> public ActionForward execute( ActionMapping
> actionMapping,
> ActionForm actionForm, HttpServletRequest
> httpServletRequest,
> HttpServletResponse httpServletResponse )
> { //start execute
>HttpSession session =
> httpServletRequest.getSession( false );
>if ( session != null )
>   {
>  session.invalidate();
>   }
> //go to index.jsp
>  return actionMapping.findForward( "success" );
>   } //end execute
> }  //end LogoffAction
> - Original Message - 
> From: "info3853 Bush" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List"
> 
> Sent: Wednesday, October 26, 2005 1:13 PM
> Subject: Re: [OT] Re: How to prevent the login
> information cached
> 
> 
> > In my logout method, we use the
> session.invalidate(); method and redirect 
> > the page to login page again.
> >
> > Dave Newton <[EMAIL PROTECTED]> wrote:info3853
> Bush wrote:
> >
> >>Anyone has idea to handle this situation?
> >>
> >>
> > Sounds like your logout method is broken.
> >
> > Dave
> >
> >
> >
> >
>
-
> > To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> > For additional commands, e-mail:
> [EMAIL PROTECTED]
> >
> >
> >
> > __
> > 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]
> 
> 




__ 
Yahoo! FareChase: Search multiple travel sites in one click.
http://farechase.yahoo.com

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



Re: new website look

2005-10-27 Thread Martin Gainty

Usability Integrators typically will go thru all of a sites features
test all links, make sure all backgrounds have uniform color, placement of 
menus doesnt hop about

Use of CSS tags whenever possible and presents the same in all browsers
Better to be a pain in the neck than someone who blindly accepts a 
user-hostile site

Not to say this site is user-hostile
Keep up the Good Work!
M
- Original Message - 
From: "Michael Jouravlev" <[EMAIL PROTECTED]>

To: "Struts Users Mailing List" 
Sent: Wednesday, October 26, 2005 8:54 PM
Subject: Re: new website look


On 10/26/05, Wendy Smoak <[EMAIL PROTECTED]> wrote:

What does that leave outstanding for the site, then?  Michael, you've
mentioned the background, and I think it can go in the custom theme
stylesheet, if you want to suggest one.


Does anyone have any other minor annoyances, things that have moved that 
you

can't find, broken links, etc?  Do whatever is easier, open a Bugzilla
ticket with a suitably generic title to collect them, or just post it 
here.


Well, I guess this is my karma to be the pain in the neck, but you
asked for it, so here it is. I understand, that these are probably
Maven's problems ;-)

* I don't have any specific suggestion about background color, but at
least for now it should be white, because ASF logo
http://www.apache.org/images/asf-logo.gif and Struts logo
http://struts.apache.org/images/struts.gif have non-transparent white
background
* Better yet, logos should have transparent backgrounds, especially
considering that they are quite simple and do not require any specific
background. In this case explicit background color is not needed,
which I actually prefer.
* Why "Struts 1.3.x" points to the same page, where ApacheCon ad is located?
* Using as-designed font sizes in my Firefox 1.0.6, the left bar font
sizes are too small, while the main pane fonts are too large. I would
prefer just a tad larger for left nav bar, -1 for main panel text and
-2 for  headers like "Struts @ ApacheCon".   (By the way, is there
any chance to get to ApacheCon for lower admittance price? Or maybe
there is an empty slot for a presentation? :-) )
* The border around topmost  header, the "Struts @ ApacheCon" is
not aligned with top portion of border around left nav bar (You
probably wondering, do I have to be *that* nitpicking?)
* The width of left nav bar is proportional to window widith, which is 
wrong.

* The width of left nav bar is not proportional to font size.
* Page does not seem to have minsize, left nav bar does not have
minsize too; window look ugly when its with is being decreased. Nav
bar items get outside navbar border, common ugliness for
CSS-controlled websites.
* Fonts typefaces. Seems like the page uses default browser settings,
which is usually a serif. I do not have a strong opinion here. Serif
is considered easier to read, but sans serif is considered "more
professional", whatever that means. But I like the appearance of say,
DisplayTag page http://displaytag.sourceforge.net or Java.Net website
http://www.java.net

Michael.

-
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: new website look

2005-10-27 Thread Ted Husted
On 10/26/05, Niall Pemberton <[EMAIL PROTECTED]> wrote:
> Personally I'm still in the Struts Classic camp at this point
> in time, but thats because my day job has 4+ years worth of investment
> in it and I havem't had time to evaluate the alternatives yet.

It wouldn't surprise me to find that at least 80% of us are in that
same boat :)

I think the real question now is how soon teams will be ready to try
Rich Internet Applications, including Ajax, and what is going to be
the best RIA choice when a Struts Classic team is ready switch.

Components and events are cool. I use them extensively every day. But,
that's not a compelling enough reason to put aside years of stuff that
ain't broke.

-Ted.

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



Re: new website look

2005-10-27 Thread Ted Husted
Just to keep things in perspective: The Struts site is not meant to be
business-to-consumer. We are geek-to-geek :)

The primary purpose of the site is to attract new committers to the
project. We don't care about anonymous downloads, or marketshare, or
any of that. We care about working together to create and maintain the
framework that we ourselves want to use to build our very own
applications. So long as the site helps us communicate between
ourselves, and the site helps us attact new committers, then the site
is doing its job.

If someone has an itch to patch the stylesheets, that's great. Never
settle for the best. But, the site is only a means to an end for us,
and it's important to keep that end in mind.

-Ted.

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



Re: how to copy the properties of one Struts form-bean to another?

2005-10-27 Thread atta-ur rehman
Hi Starky,

Yes, I'd think that having a common super class for a set of form classes
that all have some common fields should be a good idea. Not only you get
shared fields but also reset() and validate() can be reused in subclasses,
for example.

ATTA


On 10/27/05, starki78 <[EMAIL PROTECTED]> wrote:
>
> Thank you for your answer!
> But if you have a shared form bean, would it also
> be an alternative to have a super class form
> bean with the shared paramters and the heritaged
> subclasses?
>
> Nice greetings
> Starky
>
>
>
>
>
>
> -- Initial Header ---
>
> From : "Wendy Smoak" [EMAIL PROTECTED]
> To : "Struts Users Mailing List" user@struts.apache.org
> Cc :
> Date : Wed, 26 Oct 2005 09:44:54 -0700
> Subject : Re: how to copy the properties of one Struts form-bean to
> another?
>
>
>
>
>
>
>
> > From: "starki78" <[EMAIL PROTECTED]>
> >
> > > thanks that was what I was exactly looking for!
> >
> > If you find yourself copying properties from form to form too much, you
> > might consider consolidating the forms.
> >
> > One of my Struts apps uses a single session-scoped form bean across the
> > entire app. It's a front end for accounting reports, so in this way I'm
> > able to easily 'remember' the list of accounts and other settings the
> person
> > was working with, no matter which report they're requesting.
> >
> > --
> > Wendy Smoak
> >
> >
> > -
> > 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: MockStrutsTestCase problem

2005-10-27 Thread atta-ur rehman
Hi,

what's the exception?

does your form class has a method getPb()/setPb() and is it non-null for the
current instance of the form?

ATTA

On 10/27/05, Kanuri, Chand <[EMAIL PROTECTED]> wrote:
>
> Hi,
> i am testing my action class using MockStrutsTestCase.
> the properties that are threre directly in the form are getting tested
> properly.
> but the nested properties(the properties of bean used in action form) are
> getting failed
>
> any ideas?
>
> my test case code looks like this
>
> public class PeopleActionTest extends MockStrutsTestCase {
> ItemBean pb=new ItemBean();
>
> /**
> *
> */
> public PeopleActionTest() {
> super();
> // TODO Auto-generated constructor stub
> }
>
> /**
> * @param arg0
> */
> public PeopleActionTest(String arg0) {
> super(arg0);
> // TODO Auto-generated constructor stub
> }
>
> protected void setUp() throws Exception {
> super.setUp();
>
> }
>
> public void tearDown() throws Exception {
> super.tearDown();
> }
>
> public void testPeopleAction() {
> try {
> setContextDirectory(new File("WebContent"));
> setConfigFile("/WEB-INF/struts-config.xml");
> setServletConfigFile("/WEB-INF/web.xml");
> setRequestPathInfo("/People");
> addRequestParameter("number", "126");
> addRequestParameter("pb.sortcode","68945");
> actionPerform();
> verifyTilesForward("success",
> ".view.generationDetails");
> RequestItem requestItem =
> RequestItem
> getSession().getAttribute(WebConstants.getRequestItemName());
> assertEquals("126", requestItem.getNumber();
> assertEquals("68945", requestItem .getItem().getCode());
>
> } catch (Exception e) {
> // TODO: handle exception
> }
>
> }
>
> }
>
> the Number is tested properly whereas Item sortcode failed
>
> any ideas please let me know
>
>
> This e-mail (and any attachments) may contain privileged and/or
> confidential information. If you are not the intended recipient please do
> not disclose, copy, distribute, disseminate or take any action in reliance
> on it. If you have received this message in error please reply and tell us
> and then delete it. Should you wish to communicate with us by e-mail we
> cannot guarantee the security of any data outside our own computer systems.
> For the protection of Legal & General's systems and staff, incoming emails
> will be automatically scanned.
>
> Any information contained in this message may be subject to applicable
> terms and conditions and must not be construed as giving investment advice
> within or outside the United Kingdom.
>
> The following companies are subsidiary companies of the Legal & General
> Group Plc which are authorised and regulated by the Financial Services
> Authority for advising and arranging the products shown: Legal & General
> Partnership Services Limited (insurance and mortgages), Legal & General
> Insurance Limited (insurance), Legal & General Assurance Society Limited
> (life assurance, pensions and investments), Legal & General Unit Trust
> Managers Limited and Legal & General Portfolio Management Services Limited
> (investments).
>
> They are registered in England under numbers shown.
> The registered office is Temple Court, 11 Queen Victoria Street, London
> EC4N 4TP.
>
> Legal & General Partnership Services Limited: 5045000 Legal & General
> Assurance Society Limited: 166055 Legal & General (Unit Trust Managers)
> Limited: 1009418 Legal & General (Portfolio Management Services) Limited:
> 2457525 Legal & General Insurance Limited: 423930
>
> They are registered with the Financial Services Authority under numbers
> shown. You can check this at 
> www.fsa.gov.uk/register
>
> Legal & General Partnership Services Limited: 300792 Legal & General
> Assurance Society Limited: 117659 Legal & General (Unit Trust Managers)
> Limited: 119273 Legal & General (Portfolio Management Services) Limited:
> 146786 Legal & General Insurance Limited: 202050
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


MockStrutsTestCase problem

2005-10-27 Thread Kanuri, Chand
Hi,
i am testing my action class using  MockStrutsTestCase.
the properties that are threre directly in the form are getting tested
properly.
but the nested properties(the properties of bean used in action form) are
getting failed

any ideas?

my test case code looks like this

public class PeopleActionTest extends MockStrutsTestCase {
ItemBean pb=new ItemBean();

/**
 * 
 */
public PeopleActionTest() {
super();
// TODO Auto-generated constructor stub
}

/**
 * @param arg0
 */
public PeopleActionTest(String arg0) {
super(arg0);
// TODO Auto-generated constructor stub
}

protected void setUp() throws Exception {
super.setUp();

}

public void tearDown() throws Exception {
super.tearDown();
}

public void testPeopleAction() {
try {
setContextDirectory(new File("WebContent"));
setConfigFile("/WEB-INF/struts-config.xml");
setServletConfigFile("/WEB-INF/web.xml");
setRequestPathInfo("/People");
addRequestParameter("number", "126");
addRequestParameter("pb.sortcode","68945");
actionPerform();
verifyTilesForward("success",
".view.generationDetails");
RequestItem requestItem =
RequestItem
getSession().getAttribute(WebConstants.getRequestItemName());
assertEquals("126", requestItem.getNumber();
assertEquals("68945", requestItem .getItem().getCode());

} catch (Exception e) {
// TODO: handle exception
}

}

}

the Number is tested properly whereas Item sortcode failed

any ideas please let me know


This e-mail (and any attachments) may contain privileged and/or confidential 
information. If you are not the intended recipient please do not disclose, 
copy, distribute, disseminate or take any action in reliance on it. If you have 
received this message in error please reply and tell us and then delete it. 
Should you wish to communicate with us by e-mail we cannot guarantee the 
security of any data outside our own computer systems. For the protection of 
Legal & General's systems and staff, incoming emails will be automatically 
scanned.

Any information contained in this message may be subject to applicable terms 
and conditions and must not be construed as giving investment advice within or 
outside the United Kingdom.

The following companies are subsidiary companies of the Legal & General Group 
Plc which are authorised and regulated by the Financial Services Authority for 
advising and arranging the products shown: Legal & General Partnership Services 
Limited (insurance and mortgages), Legal & General Insurance Limited 
(insurance), Legal & General Assurance Society Limited 
(life assurance, pensions and investments), Legal & General Unit Trust Managers 
Limited and Legal & General Portfolio Management Services Limited (investments).

They are registered in England under numbers shown.
The registered office is Temple Court, 11 Queen Victoria Street, London EC4N 
4TP.

Legal & General Partnership Services Limited: 5045000 Legal & General Assurance 
Society Limited: 166055 Legal & General (Unit Trust Managers) Limited: 1009418 
Legal & General (Portfolio Management Services) Limited: 2457525 Legal & 
General Insurance Limited: 423930

They are registered with the Financial Services Authority under numbers shown. 
You can check this at www.fsa.gov.uk/register

Legal & General Partnership Services Limited: 300792 Legal & General Assurance 
Society Limited: 117659 Legal & General (Unit Trust Managers) Limited: 119273 
Legal & General (Portfolio Management Services) Limited: 146786 Legal & General 
Insurance Limited: 202050


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



Re: how to copy the properties of one Struts form-bean to another?

2005-10-27 Thread starki78
Thank you for your answer!
But if you have a shared form bean, would it also
be an alternative to have a super class form
bean with the shared paramters and the heritaged
subclasses?

Nice greetings
Starky






-- Initial Header ---

>From  : "Wendy Smoak" [EMAIL PROTECTED]
To  : "Struts Users Mailing List" user@struts.apache.org
Cc  :
Date  : Wed, 26 Oct 2005 09:44:54 -0700
Subject : Re: how to copy the properties of one Struts form-bean to another?







> From: "starki78" <[EMAIL PROTECTED]>
>
> > thanks that was what I was exactly looking for!
>
> If you find yourself copying properties from form to form too much, you
> might consider consolidating the forms.
>
> One of my Struts apps uses a single session-scoped form bean across the
> entire app.  It's a front end for accounting reports, so in this way I'm
> able to easily 'remember' the list of accounts and other settings the person
> was working with, no matter which report they're requesting.
>
> --
> Wendy Smoak
>
>
> -
> 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: difference between setAtttibute and setPatameter

2005-10-27 Thread rajasekhar . cherukuri
Hi,
There is nothing like request.setParameter(). When ever you submit 
a form (say JSP),  all the controls in the form like textbox, checkbox, 
textarea etc..will be submitted to the Action or Servelt with the names 
given to them and these values can be retrieved through 
request.getParameter("name").  Here the "name" is the name given to each 
control in JSP. On the other hand request.setAttribute() is some thing 
through which the user can explicitly store the required information. For 
example, if you use request.setAttribute("MY_ATT", new Interger(4)) in 
either Action or Servlet, then you can retrieve the value in JSP through 
request.getAttribute("MY_ATT").

Regards,
Rajasekhar Cherukuri




"Ankit Pancholi" <[EMAIL PROTECTED]> 
10/27/2005 03:04 PM
Please respond to
"Struts Users Mailing List" 


To
"Struts Users Mailing List" 
cc

Subject
difference between setAtttibute and setPatameter







Hi guys

I wanted to know wat is the difference between request.setAttribute and
request.setParameter. Rather there seems to be nothing called
request.setParameter wen there is request.getParameter.

Is the only way to pass values from action to jsp is
request.setAttribute and then request.getAttribute in jsp???

Thanks

Ankit





Its amazing wat u can achieve if u don't care who gets the credit






 CAUTION - Disclaimer *
This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended 
solely for the use of the addressee(s). If you are not the intended 
recipient, please notify the sender by e-mail and delete the original 
message. Further, you are not to copy, disclose, or distribute this e-mail 
or its contents to any other person and any such actions are unlawful. 
This e-mail may contain viruses. Infosys has taken every reasonable 
precaution to minimize this risk, but is not liable for any damage you may 
sustain as a result of any virus in this e-mail. You should carry out your 
own virus checks before opening the e-mail or attachment. Infosys reserves 
the right to monitor and review the content of all messages sent to or 
from this e-mail address. Messages sent to or from this e-mail address may 
be stored on the Infosys e-mail system.
***INFOSYS End of Disclaimer INFOSYS***
ForwardSourceID:NT6B4E 


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



difference between setAtttibute and setPatameter

2005-10-27 Thread Ankit Pancholi

Hi guys

I wanted to know wat is the difference between request.setAttribute and
request.setParameter. Rather there seems to be nothing called
request.setParameter wen there is request.getParameter.

Is the only way to pass values from action to jsp is
request.setAttribute and then request.getAttribute in jsp???

Thanks

Ankit



Its amazing wat u can achieve if u don't care who gets the credit





 CAUTION - Disclaimer *
This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely 
for the use of the addressee(s). If you are not the intended recipient, please 
notify the sender by e-mail and delete the original message. Further, you are 
not to copy, disclose, or distribute this e-mail or its contents to any other 
person and any such actions are unlawful. This e-mail may contain viruses. 
Infosys has taken every reasonable precaution to minimize this risk, but is not 
liable for any damage you may sustain as a result of any virus in this e-mail. 
You should carry out your own virus checks before opening the e-mail or 
attachment. Infosys reserves the right to monitor and review the content of all 
messages sent to or from this e-mail address. Messages sent to or from this 
e-mail address may be stored on the Infosys e-mail system.
***INFOSYS End of Disclaimer INFOSYS***

Re: Problem with request.setAttribute

2005-10-27 Thread rajasekhar . cherukuri
Hi,
When you use request.setAttribute() in Action, it is the same 
request which goes to JSP also. So, you are able to get the values in JSP 
through request.getAttribute(). But when you use request.setAttribute() in 
JSP and submit the form, then a new request is generated with the values 
that are contained in the current form and that new request erases all the 
previous values. If you want to use these values in the Action also, you 
need to set them to session rather than request.

Regards,
Rajasekhar Cherukuri



Deepa Khetan <[EMAIL PROTECTED]> 
10/27/2005 02:22 PM
Please respond to
"Struts Users Mailing List" 


To
user@struts.apache.org
cc

Subject
Problem with request.setAttribute






Hi,
 I have a observed a peculiar behaviour with Struts. We cannot use
request.setAttribute() while passing values from JSP to Action class. It
works fine if i do it from Action to JSP. but when i use it in JSP and
retreive value in Action class, it results in null. Can anyone please
explain why this happens?
 Deepa

ForwardSourceID:NT6B3E 


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



Problem with request.setAttribute

2005-10-27 Thread Deepa Khetan
Hi,
 I have a observed a peculiar behaviour with Struts. We cannot use
request.setAttribute() while passing values from JSP to Action class. It
works fine if i do it from Action to JSP. but when i use it in JSP and
retreive value in Action class, it results in null. Can anyone please
explain why this happens?
 Deepa


Re: Problems emailing from struts

2005-10-27 Thread Borislav Sabev




java.lang.NoClassDefFoundError: javax/mail/Message
com.nando.struts.action.TestAction.send1Mail(TestAction.java:35)
com.nando.struts.action.TestAction.execute(TestAction.java:69)


Seems that you don't have mail.jar in WEB-INF/lib.

borislav

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



Problems emailing from struts

2005-10-27 Thread C.F. Scheidecker Antunes

Hello all,

I've been trying to email from my struts application without success.
I've first tried the standard approach wich is to use javax.mail.* 
javax.mail.internet.* classes.

As on O'reilly's Servlet Cookbook.

Then I've tried commons email, also without success.

So at this point I wonder if I need to add something to my classpath 
within my Tomcat5 which is part of my Fedora core box.


I wonder if I could get some advice on that?

I am having exceptions thrown at SecurityFilter but I haven't done 
anything to my app as far as security goes as it is very simple

at this point, just a simple work for school.

Any ideas?

Here's a test action from my last attempt:

import org.apache.commons.mail.*;


public class TestAction extends Action {
  
  
   private void send1Mail(String From, String To, String Subject, 
String Body) {

   try {
   SimpleEmail email = new SimpleEmail();
   email.setHostName("smtp.mail.br ");
   email.addTo(To);
   email.setFrom(From);
   email.setSubject(Subject);
   email.setMsg(Body);
   email.send();
   }
   catch (EmailException e) {
   getServlet().log("Error Mail : "+e.toString());
   }
  
   }


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

   response.setContentType("text/html");
   PrintWriter out = response.getWriter();
 
  
   String Subject = "Email test ";

   // message to owner.
   String to = "[EMAIL PROTECTED] ";
   String body = "Hello nando,\n\n";
   send1Mail("[EMAIL PROTECTED] 
",to,Subject,body);

   return null;
   }

javax.servlet.ServletException: Servlet execution threw an exception

org.securityfilter.filter.SecurityFilter.doFilter(SecurityFilter.java:188)

*root cause*

java.lang.NoClassDefFoundError: javax/mail/Message
com.nando.struts.action.TestAction.send1Mail(TestAction.java:35)
com.nando.struts.action.TestAction.execute(TestAction.java:69)





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