javax.servlet.ServletException: BeanUtils.populate

2003-08-01 Thread Yan, Charlene
All,

I have been strugling with this for a while.  I looked at the archive and found 
similar questions but no answers there.

I have a form that has two fields - a bean and a String field.
My jsp displays the two fields.  I was able to get to the JSP by calling 
ssoXref.do?operation=showSsoXref.  But when I click on look up button on the page.  It 
throws the exception --javax.servlet.ServletException: BeanUtils.populate.  

My action and struts-config are attached below.  THANKS FOR ANY INSIGHT ON THIS...  
Charlene
  
  

=
public class SsoXrefForm extends TlnActionForm
{
  private TlnSsoXref tlnSsoXref = new TlnSsoXref();

  private String searchSwbId = "";

  public String getSearchSwbId()
  {
return searchSwbId;
  }

  public void setSearchSwbId(String newSearchSwbId)
  {
searchSwbId = newSearchSwbId;
  }

  public TlnSsoXref getTlnSsoXref()
  {
return tlnSsoXref;
  }

  public void setTlnSsoXref(TlnSsoXref newTlnSsoXref)
  {
tlnSsoXref = newTlnSsoXref;
  }
}

<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ include file="/include/incPageStart.jsp" %>







<%=crumbName%>




function handleSubmit(action) {
document.forms[0].operation.value=action;
alert("operation is " + document.forms[0].operation.value);
return true;
  }










  

















  <%=crumbName%>



  

Swb ID: *


 
    

  

  

Swb ID: *






  



Auth Class: *



  


  
Expiration 
Date: *






  
Maintained 
By: *





 
 
  










<%@ include file="/include/incPageEnd.jsp" %>



=

public class SsoXrefAction extends TlnAction
{
  private DateFormat formatter = 
DateFormat.getDateInstance(java.text.DateFormat.MEDIUM);
  
  public SsoXrefAction()
  {
  }

  public ActionForward showSsoXref(ActionMapping mapping,
 ActionForm form,
 HttpServletRequest request,
 HttpServletResponse response) {
 System.out.println("Inside showSsoXref");
SsoXrefForm ssoXrefForm = (SsoXrefForm) form;
return mapping.findForward("showSsoXref");
  
   }

   public ActionForward lookup(ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response)
{
System.out.println("Am I here?");
SsoXrefForm ssoXrefForm = (SsoXrefForm) form;
try
{
TlnSsoXref tlnSsoXref = 
getTlnSsoXref(ssoXrefForm.getSearchSwbId(), "");
if(tlnSsoXref != null) {
ssoXrefForm.setTlnSsoXref(tlnSsoXref);
} else {
ssoXrefForm.setTlnSsoXref(new TlnSsoXref());
setErrors(request, "error.ssoXref.norFound"); 
}

} catch (Throwable t) {
t.printStackTrace();
return mapping.findForward("error");
}
return mapping.findForward("lookupSsoXref");
}

  private TlnSsoXref getTlnSsoXref(String swbId, String customerId)
throws Throwable
{
TlnSsoXref tlnSsoXref = null;;
Criteria criteria = new Criteria();
criteria.addEqualTo("swbId", swbId);
criteria.addEqualTo("customerId", customerId);
Query query = QueryFactory.newQuery(TlnSsoXref.class, criteria);
try
{
PersistenceBroker broker = getBroker();
tlnSsoXref = (TlnSsoXref)broker.getObjectByQuery(query);
} catch (Throwable t) {
throw t;
}
return tlnSsoXref;
}

  private void setErrors(HttpServletRequest request, String err) {
ActionErrors errors = new ActionErrors();
errors.add(ActionErrors.GLOBAL_ERROR, new ActionError(err));
 

RE: [OT]Java equivalent to ASP function

2003-07-24 Thread Yan, Charlene
David,

Thank you for the info!!

Charlene

-Original Message-
From: Hibbs, David [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 24, 2003 10:43 AM
To: Struts Users Mailing List
Subject: RE: [OT]Java equivalent to ASP function


Digging out... got behind a few days recently.

Important note:  Integer may not be big enough for all applications.  There
are also a Long.toHexString() and Long.valueOf() functions for those cases.

David Hibbs
Staff Programmer / Analyst
American National Insurance Company

> -Original Message-
> From: atta-ur rehman [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, July 22, 2003 3:43 PM
> To: Struts Users Mailing List
> Subject: Re: [OT]Java equivalent to ASP function 
> 
> 
> hello charlene,
> 
> for ascii code of character you could simple use java cast operation:
> char c = 'A'
> byte b = (byte) c;
> 
> now b should be set to 65. the ascii value of capital 'a'.
> 
> for converting a number to hex you can use 
> Integer.toHexString(int) static
> method. at the same time you can use Integer.valueOf(String, 
> int) to convert
> hex number string back to int.
> 
> hope this helps.
> 
> ATTA
> 
> - Original Message - 
> From: "Yan, Charlene" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> Sent: Tuesday, July 22, 2003 12:26 PM
> Subject: [OT]Java equivalent to ASP function
> 
> 
> All,
> 
> I need to rewrite some ASP codes in Java.  What are the Java 
> equivalent to
> Asc(String) and Hex(Number) in VB?  I appreciate any insight from you!
> 
> Thanks.
> 
> Charlene
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 
> 


**
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.
**


-
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: [OT]Java equivalent to ASP function

2003-07-22 Thread Yan, Charlene
Asc(String) returns a asci number.  For example, Asc("A") = 65.

-Original Message-
From: Erik Price [mailto:[EMAIL PROTECTED]
Sent: Tuesday, July 22, 2003 4:42 PM
To: Struts Users Mailing List
Subject: Re: [OT]Java equivalent to ASP function




Yan, Charlene wrote:
> All,
> 
> I need to rewrite some ASP codes in Java.  What are the Java equivalent to 
> Asc(String) and Hex(Number) in VB?  I appreciate any insight from you!


I don't know VB.  I assume Hex(Number) transforms the number to 
hexadecimal.  You can get the hexadecimal representation of a binary 
number like so:

int x = 4;
String hexOf4 = Integer.toHexString(x); // becomes "0x4"

What does Asc(String) do?



Erik


-
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: [OT]Java equivalent to ASP function

2003-07-22 Thread Yan, Charlene
That helps a lot.  Thanks!!

-Original Message-
From: atta-ur rehman [mailto:[EMAIL PROTECTED]
Sent: Tuesday, July 22, 2003 4:43 PM
To: Struts Users Mailing List
Subject: Re: [OT]Java equivalent to ASP function 


hello charlene,

for ascii code of character you could simple use java cast operation:
char c = 'A'
byte b = (byte) c;

now b should be set to 65. the ascii value of capital 'a'.

for converting a number to hex you can use Integer.toHexString(int) static
method. at the same time you can use Integer.valueOf(String, int) to convert
hex number string back to int.

hope this helps.

ATTA

- Original Message - 
From: "Yan, Charlene" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Tuesday, July 22, 2003 12:26 PM
Subject: [OT]Java equivalent to ASP function


All,

I need to rewrite some ASP codes in Java.  What are the Java equivalent to
Asc(String) and Hex(Number) in VB?  I appreciate any insight from you!

Thanks.

Charlene

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



[OT]Java equivalent to ASP function

2003-07-22 Thread Yan, Charlene
All,

I need to rewrite some ASP codes in Java.  What are the Java equivalent to Asc(String) 
and Hex(Number) in VB?  I appreciate any insight from you!

Thanks.

Charlene

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



Intermediate screen before data is displayed

2003-07-16 Thread Yan, Charlene
All,

I have a page that creates an Excel report.  When the create button is clicked, it 
takes some time for the report to be displayed on the page.  How can I give users some 
information such as "Please wait.  Processing..." before the report stuff comes up?  I 
did a search in the archives and didn't find anything.  

Thanks in advance for your ideas.

Charlene

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



Struts 1.1 in iPlanet 6.0 Vs Tomcat 4.0.5

2003-05-30 Thread Yan, Charlene
All,

I developed a web app using Tomcat 4.0.5 and struts 1.1.  It is deployed in iPlanet 
6.0.  I use ActionErrors to validate the form.  Somehow iPlanet is not displaying the 
errors at all.  Tomcat does it correctly.  iPlanet 6.0 is using servlet 2.2 and Tomcat 
is 2.3.  I had to change the DOCTYPE in web.xml to make the app run in iPlanet.  Is 
the version difference causing the problem?  

Thanks.

Charlene

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



RE: French Font in PDF (OT)

2003-03-24 Thread Yan, Charlene
Thank you for replying.  I'm not using FOP, so I can't use your stylesheet.  Thanks 
anyway.  

The support guy just emailed me and said that my data bean that I used to write the 
report content needs to use unicode character-set to encode the text.  How can I check 
the character set of my data bean?  

Thanks.

Charlene

-Original Message-
From: Enrico Donelli [mailto:[EMAIL PROTECTED]
Sent: Monday, March 24, 2003 10:19 AM
To: Struts Users Mailing List
Subject: Re: French Font in PDF (OT)


I had a similar problem with italian, using the FOP transformation.
I don't know if this can help, but I solved definining in the xsl used 
to create the fo document the entities, like:




  ]>

and then using the defined entities .

Hope it helps.

Best regards
Enrico


Yan, Charlene wrote:

>All,
>
>I use a third party Java library to create PDF report.  Everything works fine except 
>that some French products are not displayed correctly.  Please look at the following:
>
>LSW Product Description in PDF Report:
>Ce cours, premier d'une s?rie constitu?e de deux parties, permet d'acqu?rir les 
>connaissances essentielles ? la planification et ? la mise en oeuvre des strat?gies 
>de sauvegarde et de restauration d'une base de donn?es. Dans ce cours, les 
>utilisateurs prendront connaissance des objectifs de sauvegarde et de restauration et 
>identifieront les fonctions des structures et des processus de l'architecture Oracle. 
>Ils apprendront ?galement ? g?rer le processus d'archivage et ? mettre ? jour un 
>catalogue de restauration. Ce cours pr?sente ?galement les concepts li?s ? 
>l'ex?cution de sauvegardes physiques avec ou sans l'utilitaire Recovery Manager 
>(RMAN).
>
>LSW Product Description:  
>Ce cours, premier d'une série constituée de deux parties, permet d'acquérir les 
>connaissances essentielles à la planification et à la mise en oeuvre des stratégies 
>de sauvegarde et de restauration d'une base de données. Dans ce cours, les 
>utilisateurs prendront connaissance des objectifs de sauvegarde et de restauration et 
>identifieront les fonctions des structures et des processus de l'architecture Oracle. 
>Ils apprendront également à gérer le processus d'archivage et à mettre à jour un 
>catalogue de restauration. Ce cours présente également les concepts liés à 
>l'exécution de sauvegardes physiques avec ou sans l'utilitaire Recovery Manager 
>(RMAN). 
>
>I know we have a lot of French users on the list.  The third party lib user guides 
>says that it supports Western European language.  I', still investigating it.  I may 
>have to specify a TrueType font that can display both English and French.  I don't 
>know and have never used/typed any French words.  Any insights on this?  TIA!
>
>Charlene
>
>-
>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]



French Font in PDF (OT)

2003-03-24 Thread Yan, Charlene
All,

I use a third party Java library to create PDF report.  Everything works fine except 
that some French products are not displayed correctly.  Please look at the following:

LSW Product Description in PDF Report:
Ce cours, premier d'une s?rie constitu?e de deux parties, permet d'acqu?rir les 
connaissances essentielles ? la planification et ? la mise en oeuvre des strat?gies de 
sauvegarde et de restauration d'une base de donn?es. Dans ce cours, les utilisateurs 
prendront connaissance des objectifs de sauvegarde et de restauration et identifieront 
les fonctions des structures et des processus de l'architecture Oracle. Ils 
apprendront ?galement ? g?rer le processus d'archivage et ? mettre ? jour un catalogue 
de restauration. Ce cours pr?sente ?galement les concepts li?s ? l'ex?cution de 
sauvegardes physiques avec ou sans l'utilitaire Recovery Manager (RMAN).

LSW Product Description:  
Ce cours, premier d'une série constituée de deux parties, permet d'acquérir les 
connaissances essentielles à la planification et à la mise en oeuvre des stratégies de 
sauvegarde et de restauration d'une base de données. Dans ce cours, les utilisateurs 
prendront connaissance des objectifs de sauvegarde et de restauration et identifieront 
les fonctions des structures et des processus de l'architecture Oracle. Ils 
apprendront également à gérer le processus d'archivage et à mettre à jour un catalogue 
de restauration. Ce cours présente également les concepts liés à l'exécution de 
sauvegardes physiques avec ou sans l'utilitaire Recovery Manager (RMAN). 

I know we have a lot of French users on the list.  The third party lib user guides 
says that it supports Western European language.  I', still investigating it.  I may 
have to specify a TrueType font that can display both English and French.  I don't 
know and have never used/typed any French words.  Any insights on this?  TIA!

Charlene

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



RE: Sort a collection in alphabetic order

2003-03-10 Thread Yan, Charlene
Try this:

import org.apache.commons.beanutils.BeanComparator;

Collections.sort(people, new BeanComparator("lastname"));

Charlene

-Original Message-
From: Søren Blidorf [mailto:[EMAIL PROTECTED]
Sent: Monday, March 10, 2003 4:33 PM
To: 'Struts Users Mailing List'
Subject: SV: Sort a collection in alphabetic order 


Sorry, but I can't get it to work.

Does any body have a simple example I can look at?

Soren

-Oprindelig meddelelse-
Fra: nash e. foster [mailto:[EMAIL PROTECTED] 
Sendt: 10. marts 2003 19:27
Til: Struts Users Mailing List
Emne: Re: Sort a collection in alphabetic order 



You could have your PeopleBean implement Comparable, which is pretty 
easy, and then use TreeSet to create a sorted set using your compareTo 
method.

-nash

On Monday, March 10, 2003, at 01:16  PM, Søren Blidorf wrote:

>
> Hi.
> I need to sort my collection "people" in alphabetic order by lastname,
> firstname.
> Can anybody help me?
>
> I guess I should do it in the Action and not when displayed in jsp 
> page.
>
>
>
> Collection people = new ArrayList();
>
> while( rs.next() ) {
> PeopleBean pb = new PeopleBean();
> pb.setId(rs.getInt("ID"));
> pb.setFirstname( rs.getString( "FIRSTNAME" ));
> pb.setLastname( rs.getString( "LASTNAME" ));
> }
>
> people.add( pb );
>
>
> Søren Blidorf
>
>
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


***
This message is intended only for the use of the intended recipient and
may contain information that is PRIVILEGED and/or CONFIDENTIAL.  If you
are not the intended recipient, you are hereby notified that any use,
dissemination, disclosure or copying of this communication is strictly
prohibited.  If you have received this communication in error, please
destroy all copies of this message and its attachments and notify us
immediately.
***


-
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: XML to PDF

2003-01-21 Thread Yan, Charlene
Thank you all for your information.  I was told to take a look at 
http://www.rrsys.com/.  We are going to buy the tool from Root River because someone 
here has experience with it.

Charlene

-Original Message-
From: Durham David Cntr 805CSS/SCBE [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 21, 2003 4:08 PM
To: Struts Users Mailing List
Subject: RE: XML to PDF


Just wanted to add that the license for iText is LGPL.

> -Original Message-
> From: Attila Szegedi [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, January 21, 2003 2:31 PM
> To: Struts Users Mailing List
> Subject: Re: XML to PDF
> 
> 
> > You should check out the FOP project on apache.It is a pretty good
> > transformation tool and works pretty well.
> 
> Unless you want non ISO-8859-1 characters in your PDF output. 
> (Actually, my
> experience might be outdated since it's been at least 18 
> months since I
> evaluated FOP). The lack of support for international charsets made me
> switch to iText (www.lowagie.com/iText). I found it in 
> general to be much
> more feature complete and easier to use than FOP.
> 
> Attila.
> 
> 
> 
> --
> To unsubscribe, e-mail:   
> 
> For additional commands, e-mail: 
> 
> 
> 

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




XML to PDF

2003-01-21 Thread Yan, Charlene
Hello all,

I just got assigned to convert XML to pdf to do reports.  Is any of you working on it? 
 Any insights where I should get started my research?  I am looking at xmlmil and 
aparche xml home right now.

Thanks in advance for your help!

Charlene

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: ClassCastException using type attribute with iterate tag

2003-01-21 Thread Yan, Charlene
Does this work?

 


If yes, make changes as the following:

 



Let me know if it works.

Charlene
-Original Message-
From: Jeremy Cavagnolo [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 21, 2003 2:41 PM
To: [EMAIL PROTECTED]
Subject: ClassCastException using type attribute with iterate tag


I wasn't exactly clear with what I am trying to do.  Here is what I really 
want to do:


 



but when I add type="org.alf.msq.data.Problem" to my iterate tag, I get 
the ClassCastException.  Further, no matter how I try to cast an element 
of the problemArray to org.alf.msq.data, whether it is inside or outside 
the iterate tag, I get the Exception.  I even did the following:

System.out.println(problemArray.get(0).getClass().getName()); 

and it returned org.alf.msq.data.Problem!

Any insight is much appreciated.  The relevant stack trace from the log 
follows.

Thanks,

Jeremy

jsp: init
ApplicationDispatcher[/MSQ] Servlet.service() for servlet jsp threw 
exception org.apache.jasper.JasperException
at org.apache.jasper.servlet.JspServletWrapper.service(Unknown Source)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(Unknown Source)
at org.apache.jasper.servlet.JspServlet.service(Unknown Source)
at javax.servlet.http.HttpServlet.service(HttpServlet.java)

...


- Root Cause -
java.lang.ClassCastException
at org.apache.jsp.probSelect_jsp._jspService(probSelect_jsp.java:161)
at org.apache.jasper.runtime.HttpJspBase.service(Unknown Source)
at javax.servlet.http.HttpServlet.service(HttpServlet.java)
at org.apache.jasper.servlet.JspServletWrapper.service(Unknown Source)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(Unknown Source)
at org.apache.jasper.servlet.JspServlet.service(Unknown Source)

...


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: StoreFront

2002-10-15 Thread Yan, Charlene

Chuck, Could you send the package to [EMAIL PROTECTED] as well?  Thanks 
a lot!

Charlene

-Original Message-
From: Xue-Feng Yang [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, October 15, 2002 10:56 AM
To: Struts Users Mailing List
Subject: RE: StoreFront


Thank you Chuck, I recieved the package.

I looked at the package. There are no database tables
and data in the war file. I am wondering if there is a
magic way in Struts which I don't have to make all the
tables and data available in the database.

__ 
Post your free ad now! http://personals.yahoo.ca

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: IP Address

2002-09-18 Thread Yan, Charlene

Here is the correct one:
request.getHeader("referer");

Charlene

-Original Message-
From: Emmanuel Boudrant [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, September 18, 2002 9:33 AM
To: Struts Users Mailing List
Subject: RE: IP Address



I put getRemoteXxx() because you can retrice IP or Hostname.

request.getRemoteAddr()  > IP
request.getRemoteHost()  > Hostname

BTW: Check the HttpServletRequest name in the perform(...) method parameters. 
getRemoteAddr() must
be invoked on your HttpServletRequest object passed in parameter.

-emmanuel

 --- "Cohan, Sean" <[EMAIL PROTECTED]> a écrit : > Is that the correct method?  I get a 
'can;t
resolve symbol' compiler error.
> Thanks.
> 
> -Original Message-
> From: Emmanuel Boudrant
> To: Struts Users Mailing List
> Sent: 9/18/02 6:09 AM
> Subject: Re: IP Address
> 
> try this:
>  
>  request.getRemoteXxx();
> 
> -emmanuel
> 
> 
>  --- "Cohan, Sean" <[EMAIL PROTECTED]> a écrit : > 
> > How do I get the referrer's IP address in my action class?  Thanks.
> > 
> > --
> > To unsubscribe, e-mail:
> 
> > For additional commands, e-mail:
> 
> >  
> 
> ___
> Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !
> Yahoo! Mail : http://fr.mail.yahoo.com
> 
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 
>  

___
Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !
Yahoo! Mail : http://fr.mail.yahoo.com

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: