Problem with actionForm scope

2002-11-25 Thread Yann Verlynde
Hello,

It seems that I lost my attributes of the form. It seems that my form is
reinitialized when the form is redisplayed.
My form is well defined in my struts-config.xml file as to be used in
session scope.
However, I would like to keep these parameter because I would like to fill
the form at different moments.

name.jsp (1)--->Form class -->name.jsp (filled with the (1)
information)-->Form class etc

Thanks in advance
Yann





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




Re: Problem with pre-select html:select Tag

2002-11-22 Thread Yann Verlynde
Unfortunatly no :(
- Original Message -
From: "Patrice" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Friday, November 22, 2002 6:09 PM
Subject: Re: Problem with pre-select html:select Tag


> I'm searching, but I don't see what's wrong...
> A stupid question: you don't remove the form from the request (or the
> session) in your action, or do something like setSelectCmp("") ?
>
>
> - Original Message -
> From: "Yann Verlynde" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> Sent: Friday, November 22, 2002 5:56 PM
> Subject: Re: Problem with pre-select html:select Tag
>
>
> > Patrice,
> >
> > I have a form Class and an Action class. My action class access to a
> > database and get back the content of the second list (which is
calculated
> by
> > the value clicked on the first list) . I have the second list in my JSP
> but
> > the first is not positionned on the user's choice.
> >
> > Thanks in advance
> > Yann
> > - Original Message -
> > From: "Patrice" <[EMAIL PROTECTED]>
> > To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> > Sent: Friday, November 22, 2002 5:48 PM
> > Subject: Re: Problem with pre-select html:select Tag
> >
> >
> > > Yann,
> > >
> > > I've got another question: the form action is a struts action that
> > > calculates the content of the second list, isn't it ?
> > >
> > >
> > > - Original Message -
> > > From: "Yann Verlynde" <[EMAIL PROTECTED]>
> > > To: "Struts" <[EMAIL PROTECTED]>
> > > Sent: Friday, November 22, 2002 5:15 PM
> > > Subject: Problem with pre-select html:select Tag
> > >
> > >
> > > > Hello,
> > > >
> > > > I have already read a lot of posts to implements that but I don't
> > > > understand.
> > > >
> > > > Process: When the user select a value on the combo select, the page
> > > refresh
> > > > and fill a new select tag by a content which depend on the value
> > selected
> > > by
> > > > the user.  The second select tag is well filled but the first is not
> pre
> > > > select on the value clicked by the user.
> > > >
> > > > I don't understand why my select tag doesn't pre-select the good
> value.
> > My
> > > > form class is in session scope and when I test my value it seems
that
> it
> > > has
> > > > the good value.
> > > > Does anyone can help me please?
> > > >
> > > > <%=request.getParameter("selectCMP")%>
> > > > 
> > > >   
> > > > Choisissez votre Cadre
Emploi
> > > >   
> > > >> > property="CMP_ID"/>
> > > > 
> > > >
> > > > Thanks in advance
> > > >
> > > > Yann VERLYNDE
> > > > Ingénieur d'Etudes
> > > > Oxade Ingénierie
> > > > 13, Place Kossuth
> > > > 75009 PARIS
> > > >
> > > > Tel  : 01 42 82 99 38
> > > > Fax : 01 42 82 99 35
> > > > www.oxade.com
> > > >
> > > >
> > > > --
> > > > To unsubscribe, e-mail:
> > > <mailto:[EMAIL PROTECTED]>
> > > > For additional commands, e-mail:
> > > <mailto:[EMAIL PROTECTED]>
> > > >
> > >
> > >
> > > --
> > > To unsubscribe, e-mail:
> > <mailto:[EMAIL PROTECTED]>
> > > For additional commands, e-mail:
> > <mailto:[EMAIL PROTECTED]>
> > >
> >
> >
> > --
> > To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
> >
>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>


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




Re: Problem with pre-select html:select Tag

2002-11-22 Thread Yann Verlynde
Patrice,

I have a form Class and an Action class. My action class access to a
database and get back the content of the second list (which is calculated by
the value clicked on the first list) . I have the second list in my JSP but
the first is not positionned on the user's choice.

Thanks in advance
Yann
- Original Message -
From: "Patrice" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Friday, November 22, 2002 5:48 PM
Subject: Re: Problem with pre-select html:select Tag


> Yann,
>
> I've got another question: the form action is a struts action that
> calculates the content of the second list, isn't it ?
>
>
> - Original Message -
> From: "Yann Verlynde" <[EMAIL PROTECTED]>
> To: "Struts" <[EMAIL PROTECTED]>
> Sent: Friday, November 22, 2002 5:15 PM
> Subject: Problem with pre-select html:select Tag
>
>
> > Hello,
> >
> > I have already read a lot of posts to implements that but I don't
> > understand.
> >
> > Process: When the user select a value on the combo select, the page
> refresh
> > and fill a new select tag by a content which depend on the value
selected
> by
> > the user.  The second select tag is well filled but the first is not pre
> > select on the value clicked by the user.
> >
> > I don't understand why my select tag doesn't pre-select the good value.
My
> > form class is in session scope and when I test my value it seems that it
> has
> > the good value.
> > Does anyone can help me please?
> >
> > <%=request.getParameter("selectCMP")%>
> > 
> >   
> > Choisissez votre Cadre Emploi
> >   
> >property="CMP_ID"/>
> > 
> >
> > Thanks in advance
> >
> > Yann VERLYNDE
> > Ingénieur d'Etudes
> > Oxade Ingénierie
> > 13, Place Kossuth
> > 75009 PARIS
> >
> > Tel  : 01 42 82 99 38
> > Fax : 01 42 82 99 35
> > www.oxade.com
> >
> >
> > --
> > To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
> >
>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>


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




Re: Problem with pre-select html:select Tag

2002-11-22 Thread Yann Verlynde
function choix(select){
  var choixSelect;
  if( select.name == 'selectCMP'){
choixSelect = new getObj("choixSelect");
choixSelect.obj.value = '1';
  }
  else if( select.name == 'selectSPE'){
choixSelect = new getObj("choixSelect");
choixSelect.obj.value = '2';
  }
  else alert('Erreur!!!');

  alert(choixSelect.obj.value);
  document.SaisieAgentForm.submit();
}
This function is used to know on which select the user interact.

- Original Message -
From: "Patrice" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Friday, November 22, 2002 5:29 PM
Subject: Re: Problem with pre-select html:select Tag


> Hi Yann,
>
> Should I know what is in your javascript function choix(this) ?
>
> Patrice
>
> - Original Message -
> From: "Yann Verlynde" <[EMAIL PROTECTED]>
> To: "Struts" <[EMAIL PROTECTED]>
> Sent: Friday, November 22, 2002 5:15 PM
> Subject: Problem with pre-select html:select Tag
>
>
> > Hello,
> >
> > I have already read a lot of posts to implements that but I don't
> > understand.
> >
> > Process: When the user select a value on the combo select, the page
> refresh
> > and fill a new select tag by a content which depend on the value
selected
> by
> > the user.  The second select tag is well filled but the first is not pre
> > select on the value clicked by the user.
> >
> > I don't understand why my select tag doesn't pre-select the good value.
My
> > form class is in session scope and when I test my value it seems that it
> has
> > the good value.
> > Does anyone can help me please?
> >
> > <%=request.getParameter("selectCMP")%>
> > 
> >   
> > Choisissez votre Cadre Emploi
> >   
> >property="CMP_ID"/>
> > 
> >
> > Thanks in advance
> >
> > Yann VERLYNDE
> > Ingénieur d'Etudes
> > Oxade Ingénierie
> > 13, Place Kossuth
> > 75009 PARIS
> >
> > Tel  : 01 42 82 99 38
> > Fax : 01 42 82 99 35
> > www.oxade.com
> >
> >
> > --
> > To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
> >
>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>


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




Problem with pre-select html:select Tag

2002-11-22 Thread Yann Verlynde
Hello,

I have already read a lot of posts to implements that but I don't
understand.

Process: When the user select a value on the combo select, the page refresh
and fill a new select tag by a content which depend on the value selected by
the user.  The second select tag is well filled but the first is not pre
select on the value clicked by the user.

I don't understand why my select tag doesn't pre-select the good value. My
form class is in session scope and when I test my value it seems that it has
the good value.
Does anyone can help me please?

<%=request.getParameter("selectCMP")%>

  
Choisissez votre Cadre Emploi
  
  


Thanks in advance

Yann VERLYNDE
Ingénieur d'Etudes
Oxade Ingénierie
13, Place Kossuth
75009 PARIS

Tel  : 01 42 82 99 38
Fax : 01 42 82 99 35
www.oxade.com


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




How pre-select an ?

2002-11-22 Thread Yann Verlynde
Hello,

I have a problem with html:select preselection?
I have a value in my request (select_CMP) when I going to my JSP page and I
want to preselect an element of my options list. I use this code to produce
my select.


   


CMP is an ArrayList stored in the request.

Thanks in advance


Yann VERLYNDE
Ingénieur d'Etudes
Oxade Ingénierie
13, Place Kossuth
75009 PARIS

Tel  : 01 42 82 99 38
Fax : 01 42 82 99 35
www.oxade.com


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




Re: Problem with

2002-11-21 Thread Yann Verlynde
Sorry but I doesn't work this is my complete code.

 Choisissez votre cadre emplois
 
   
 
   
 


- Original Message -
From: "Sri Sankaran" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Thursday, November 21, 2002 6:35 PM
Subject: RE: Problem with 


Have you tried





Sri

-Original Message-
From: Yann Verlynde [mailto:[EMAIL PROTECTED]]
Sent: Thursday, November 21, 2002 12:28 PM
To: Struts
Subject: Problem with 


Hello,

This code doesn't work. How can I do I put a bean value in my option tag?

   

Thanks in advance

Yann VERLYNDE
Ingénieur d'Etudes
Oxade Ingénierie
13, Place Kossuth
75009 PARIS

Tel  : 01 42 82 99 38
Fax : 01 42 82 99 35
www.oxade.com


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


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



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




Problem with

2002-11-21 Thread Yann Verlynde
Hello,

This code doesn't work. How can I do I put a bean value in my option tag?

   

Thanks in advance

Yann VERLYNDE
Ingénieur d'Etudes
Oxade Ingénierie
13, Place Kossuth
75009 PARIS

Tel  : 01 42 82 99 38
Fax : 01 42 82 99 35
www.oxade.com


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




Problem with database connexion on Struts Nightly Build

2002-11-20 Thread Yann Verlynde
Hello, I tried to connect Struts with Oracle Database, when I did a
dataSource.getConnection(); on my datasource I have the following exception:
Can I have Helps please?

Thanks in advance.

javax.servlet.ServletException: Servlet execution threw an exception
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:269)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:193)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:243)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:190)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2343)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180
)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
java:170)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170
)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:174)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:
1012)
at
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1107
)
at java.lang.Thread.run(Thread.java:484)


root cause

java.lang.NoClassDefFoundError: java/sql/Savepoint
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:486)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:111)
at
org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLo
ader.java:1631)
at
org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.jav
a:926)
at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.jav
a:1360)
at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.jav
a:1243)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313)
at
oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:468)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:314)
at
org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConne
ctionFactory.java:83)
at
org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnect
ionFactory.java:184)
at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(Unknown
Source)
at
org.apache.commons.dbcp.AbandonedObjectPool.borrowObject(AbandonedObjectPool
.java:117)
at
org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.ja
va:108)
at
org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:3
12)
at
org.apache.struts.util.GenericDataSource.getConnection(GenericDataSource.jav
a:276)
at
com.oxade.struts.action.RechercheAction.getAllDGCL(RechercheAction.java:56)
at
com.oxade.struts.action.RechercheAction.perform(RechercheAction.java:104)
at org.apache.struts.action.Action.execute(Action.java:410)
at
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProces
sor.java:465)
at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1349)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:489)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
Filte

Validator Problem

2002-11-13 Thread Yann Verlynde
Hello,

Excuse me for this silly question but I don't understand the difference between these 
2 attributes in html:javascript tag

dynamicJavascript="false" 
staticJavascript="true"

Thanks in advance



Re: Problem with multipart/mixed and file Tag

2002-11-06 Thread Yann Verlynde
Brian,

Yes I have.


Yann
- Original Message -
From: "Brian Hickey" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Tuesday, November 05, 2002 6:52 PM
Subject: Re: Problem with multipart/mixed and file Tag


> Yann,
>
> Apologies if this is lame, but do you have an 
> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> Sent: Tuesday, November 05, 2002 12:12 PM
> Subject: Re: Problem with multipart/mixed and file Tag
>
>
> > When I try multipart/form-data I have a
"java.util.NoSuchElementException"
> > in my Action Class.
> > It is due to an empty reference: List fileItems =
> > upload.parseRequest(request);
> >
> > Does anyone can help me please?
> >
> > - Original Message -
> > From: "Yann Verlynde" <[EMAIL PROTECTED]>
> > To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> > Sent: Tuesday, November 05, 2002 5:42 PM
> > Subject: Re: Problem with multipart/mixed and file Tag
> >
> >
> > > Thanks, but I tried and it doesn't work...
> > > - Original Message -
> > > From: "Sukhenko, Mikhail (Contr)" <[EMAIL PROTECTED]>
> > > To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
> > > Sent: Tuesday, November 05, 2002 5:28 PM
> > > Subject: RE: Problem with multipart/mixed and file Tag
> > >
> > >
> > > > should not you use enctype="multipart/form-data"
> > > > instead of enctype="multipart/mixed"?
> > > >
> > > >
> > > > -Original Message-
> > > > From: Yann Verlynde [mailto:yverlynde@;oxade.com]
> > > > Sent: Tuesday, November 05, 2002 3:46 AM
> > > > To: Struts
> > > > Subject: Problem with multipart/mixed and file Tag
> > > >
> > > >
> > > > Hello,
> > > >
> > > > I have a problem with this code (a form with content multipart/mixed
> and
> > > an
> > > > form class).
> > > >
> > > > This is my form:
> > > >
> > > >   
> > > > Please select the file that you would like to upload:
> > > > 
> > > >
> > > > If you checked the box to write to a file, please specify the
file
> > > path
> > > > here:
> > > > 
> > > >
> > > > 
> > > >   
> > > >
> > > > My form class:
> > > >
> > > > public class UploadForm extends ActionForm
> > > > {
> > > > public static final String ERROR_PROPERTY_MAX_LENGTH_EXCEEDED =
> > > > "org.apache.struts.webapp.upload.MaxLengthExceeded";
> > > >
> > > > protected FormFile theFile;
> > > >
> > > > protected String filePath;
> > > >
> > > > public FormFile getTheFile() {
> > > > return theFile;
> > > > }
> > > >
> > > > public void setTheFile(FormFile theFile) {
> > > > this.theFile = theFile;
> > > > }
> > > >
> > > > public void setFilePath(String filePath) {
> > > > this.filePath = filePath;
> > > > }
> > > >
> > > > public String getFilePath() {
> > > > return filePath;
> > > > }
> > > >
> > > > public void reset() {}
> > > >
> > > > public ActionErrors validate(ActionMapping mapping,
> > HttpServletRequest
> > > > request)
> > > > {
> > > > ActionErrors errors = null;
> > > > //has the maximum length been exceeded?
> > > > Boolean maxLengthExceeded = (Boolean)
> > > >
> > > >
> > >
> >
>
request.getAttribute(MultipartRequestHandler.ATTRIBUTE_MAX_LENGTH_EXCEEDED);
> > > > if ((maxLengthExceeded != null) &&
> > > > (maxLengthExceeded.booleanValue()))
> > > > {
> > > > errors = new ActionErrors();
> > > > errors.add(ERROR_PROPERTY_MAX_LENGTH_EXCEEDED, new
> > > > ActionError("maxLengthExceeded"));
> > > > }
> > > > return errors;
> > > > }
> > > > }
> > > >
> > > > This is the

Re: Problem with multipart/mixed and file Tag

2002-11-05 Thread Yann Verlynde
Thanks, but I tried and it doesn't work...
- Original Message -
From: "Sukhenko, Mikhail (Contr)" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Tuesday, November 05, 2002 5:28 PM
Subject: RE: Problem with multipart/mixed and file Tag


> should not you use enctype="multipart/form-data"
> instead of enctype="multipart/mixed"?
>
>
> -Original Message-
> From: Yann Verlynde [mailto:yverlynde@;oxade.com]
> Sent: Tuesday, November 05, 2002 3:46 AM
> To: Struts
> Subject: Problem with multipart/mixed and file Tag
>
>
> Hello,
>
> I have a problem with this code (a form with content multipart/mixed and
an
> form class).
>
> This is my form:
>
>   
> Please select the file that you would like to upload:
> 
>
> If you checked the box to write to a file, please specify the file
path
> here:
> 
>
> 
>   
>
> My form class:
>
> public class UploadForm extends ActionForm
> {
> public static final String ERROR_PROPERTY_MAX_LENGTH_EXCEEDED =
> "org.apache.struts.webapp.upload.MaxLengthExceeded";
>
> protected FormFile theFile;
>
> protected String filePath;
>
> public FormFile getTheFile() {
> return theFile;
> }
>
> public void setTheFile(FormFile theFile) {
> this.theFile = theFile;
> }
>
> public void setFilePath(String filePath) {
> this.filePath = filePath;
> }
>
> public String getFilePath() {
> return filePath;
> }
>
> public void reset() {}
>
> public ActionErrors validate(ActionMapping mapping, HttpServletRequest
> request)
> {
> ActionErrors errors = null;
> //has the maximum length been exceeded?
> Boolean maxLengthExceeded = (Boolean)
>
>
request.getAttribute(MultipartRequestHandler.ATTRIBUTE_MAX_LENGTH_EXCEEDED);
> if ((maxLengthExceeded != null) &&
> (maxLengthExceeded.booleanValue()))
> {
> errors = new ActionErrors();
> errors.add(ERROR_PROPERTY_MAX_LENGTH_EXCEEDED, new
> ActionError("maxLengthExceeded"));
> }
> return errors;
> }
> }
>
> This is the exception:
> javax.servlet.ServletException: BeanUtils.populate
> at
> org.apache.struts.util.RequestUtils.populate(RequestUtils.java:980)
> at
>
org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.j
> ava:779)
> at
>
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:246)
> at
> org.apache.struts.action.ActionServlet.process(ActionServlet.java:1292)
> at
> org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:510)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> at
>
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
> FilterChain.java:247)
> at
>
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
> ain.java:193)
> at
>
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
> va:243)
> at
>
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
> 66)
> at
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
> at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
> at
>
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
> va:190)
> at
>
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
> 66)
> at
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
> at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
> at
> org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2343)
> at
>
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180
> )
> at
>
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
> 66)
> at
>
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
> java:170)
> at
>
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
> 64)
> at
>
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170
> )
> at
>
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
> 64)
> at
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
> at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
> at
>
org.apache.catalina.core.StandardEngineValve.in

Problem with multipart/mixed and file Tag

2002-11-05 Thread Yann Verlynde
Hello,

I have a problem with this code (a form with content multipart/mixed and an form 
class). 

This is my form:

  
Please select the file that you would like to upload:


If you checked the box to write to a file, please specify the file path here:



  

My form class:

public class UploadForm extends ActionForm
{
public static final String ERROR_PROPERTY_MAX_LENGTH_EXCEEDED = 
"org.apache.struts.webapp.upload.MaxLengthExceeded";

protected FormFile theFile;

protected String filePath;

public FormFile getTheFile() {
return theFile;
}

public void setTheFile(FormFile theFile) {
this.theFile = theFile;
}

public void setFilePath(String filePath) {
this.filePath = filePath;
}

public String getFilePath() {
return filePath;
}

public void reset() {}

public ActionErrors validate(ActionMapping mapping, HttpServletRequest request)
{
ActionErrors errors = null;
//has the maximum length been exceeded?
Boolean maxLengthExceeded = (Boolean)

request.getAttribute(MultipartRequestHandler.ATTRIBUTE_MAX_LENGTH_EXCEEDED);
if ((maxLengthExceeded != null) && (maxLengthExceeded.booleanValue()))
{
errors = new ActionErrors();
errors.add(ERROR_PROPERTY_MAX_LENGTH_EXCEEDED, new 
ActionError("maxLengthExceeded"));
}
return errors;
}
}

This is the exception:
javax.servlet.ServletException: BeanUtils.populate
at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:980)
at 
org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.java:779)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:246)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1292)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:510)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2343)
at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at 
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at 
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1012)
at 
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1107)
at java.lang.Thread.run(Thread.java:484)


root cause 

java.lang.IllegalArgumentException: argument type mismatch
at java.lang.reflect.Method.invoke(Native Method)
at 
org.apache.commons.beanutils.PropertyUtils.setSimpleProperty(PropertyUtils.java:1650)
at 
org.apache.commons.beanutils.PropertyUtils.setNestedProperty(PropertyUtils.java:1545)
at 
org.apache.commons.beanutils.PropertyUtils.setProperty(PropertyUtils.java:1574)
at org.apache.commons.beanutils.BeanUtils.setProperty(BeanUtils.java:919)
at org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:726)
   

Re: Problem with FileUpload

2002-11-04 Thread Yann Verlynde
Yes,

This is my form declaration:



Yann
- Original Message -
From: "Sukhenko, Mikhail (Contr)" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Monday, November 04, 2002 4:45 PM
Subject: RE: Problem with FileUpload


> are you using "multipart" in your form declaration on the jsp page?
>
> -Original Message-
> From: Yann Verlynde [mailto:yverlynde@;oxade.com]
> Sent: Monday, November 04, 2002 10:41 AM
> To: Struts
> Subject: Problem with FileUpload
>
>
> Hello,
>
> This is my code in an Action Class, I don't receive the upload file. The
> fileItems element is null.
> How can I do to upload a file?
>
> Thanks in advance
>
> public ActionForward execute(ActionMapping mapping,
>  ActionForm form,
>  HttpServletRequest request,
>  HttpServletResponse response)
> throws Exception {
>
>try {
>   FileUpload fu = new FileUpload();
>   // maximum size before a FileUploadException will be thrown
>   fu.setSizeMax(100);
>   // maximum size that will be stored in memory
>   fu.setSizeThreshold(4096);
>   // the location for saving data that is larger than
getSizeThreshold()
>   fu.setRepositoryPath("/tmp");
>
>   List fileItems = fu.parseRequest(request);
>   // assume we know there are two files. The first file is a small
>   // text file, the second is unknown and is written to a file on
>   // the server
>   Iterator i = fileItems.iterator();
>   String comment = ((FileItem)i.next()).getString();
>   FileItem fi = (FileItem)i.next();
>
>   // filename on the client
>   String fileName = fi.getFieldName();
>   // save comment and filename to database
>
>   MessageResources messages =
>
(MessageResources)getServlet().getServletContext().getAttribute("APPLICATION
> _CONFIGURATION");
>
>   // write the file
>   fi.write(messages.getMessage("upload.destination") + fileName);
> }
> catch (Exception e) {
>   e.printStackTrace();
> }
> //return a forward to display.jsp
> return mapping.findForward("display");
> }
>
> --
> To unsubscribe, e-mail:
<mailto:struts-user-unsubscribe@;jakarta.apache.org>
> For additional commands, e-mail:
<mailto:struts-user-help@;jakarta.apache.org>
>


--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@;jakarta.apache.org>




Problem with FileUpload

2002-11-04 Thread Yann Verlynde
Hello,

This is my code in an Action Class, I don't receive the upload file. The fileItems 
element is null.
How can I do to upload a file?

Thanks in advance

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

   try {
  FileUpload fu = new FileUpload();
  // maximum size before a FileUploadException will be thrown
  fu.setSizeMax(100);
  // maximum size that will be stored in memory
  fu.setSizeThreshold(4096);
  // the location for saving data that is larger than getSizeThreshold()
  fu.setRepositoryPath("/tmp");

  List fileItems = fu.parseRequest(request);
  // assume we know there are two files. The first file is a small
  // text file, the second is unknown and is written to a file on
  // the server
  Iterator i = fileItems.iterator();
  String comment = ((FileItem)i.next()).getString();
  FileItem fi = (FileItem)i.next();

  // filename on the client
  String fileName = fi.getFieldName();
  // save comment and filename to database

  MessageResources messages = 
(MessageResources)getServlet().getServletContext().getAttribute("APPLICATION_CONFIGURATION");

  // write the file
  fi.write(messages.getMessage("upload.destination") + fileName);
}
catch (Exception e) {
  e.printStackTrace();
}
//return a forward to display.jsp
return mapping.findForward("display");
}



Re: Help please in ApplicationResources

2002-10-31 Thread Yann Verlynde
Hi Lucas,

Thanks for the response but you don't understand my question, I think it is
due to my english...;-)
I have already one application resources file named
ApplicationResources.properties so I use already a Resource Bundle but I
want to write a page that print all the content of this ResourceBundle.
I know that to have a property I must use:

So with that, I can print all the properties but I is very long and not
flexible.
It is not a very good solution because I put the name of the property
'email.protocol".
So I would like a generic method or Tag to take back all the properties in
an Array of the Resources Bundle in my JSP.

Thanks in advance
Yann


- Original Message -
From: "Lucas" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Thursday, October 31, 2002 11:05 AM
Subject: RE: Help please in ApplicationResources


> Hi Yann,
>
> IMHO, from my understanding, the idea of having message resources bundle
> in a separate text file is so that we do not have to change any codes
> (JSP/Java) which means easier maintenance and more flexibility. So I
> would suggest using a text file for a resource bundle and put it
> anywhere below your WEB-INF/classes/dir1/dir2 as somefilename.properties
> (I would put all the resources in the same directory) and then you can
> access using
>  (note
> that the .properties extension is not needed).
>
> If you insist on using JSP then you should just use scriplet variables
> like
> <%
> String emailProtocol = "POP3"
> %>
>
> and call it using
>
> <%= emailProtocol %>
>
> Do I get your question right?
>
> Hope it helps,
>
> Lucas
>
>
>
> > -Original Message-
> > From: Yann Verlynde [mailto:yverlynde@;oxade.com]
> > Sent: Wednesday, October 30, 2002 11:58 PM
> > To: Struts
> > Subject: Help please in ApplicationResources
> >
> > If I want to have a message in a JSP, I use this code:
> >  bundle="APPLICATION_CONFIGURATION"/>
> >
> > But I want to have all the messages resources in my JSP,
> > How can I do that please?
> >
> > Thanks in advance
>
>
>
> --
> To unsubscribe, e-mail:
<mailto:struts-user-unsubscribe@;jakarta.apache.org>
> For additional commands, e-mail:
<mailto:struts-user-help@;jakarta.apache.org>
>


--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@;jakarta.apache.org>




Help please in ApplicationResources

2002-10-31 Thread Yann Verlynde
If I want to have a message in a JSP, I use this code:


But I want to have all the messages resources in my JSP, 
How can I do that please?

Thanks in advance




ApplicationsRessources

2002-10-31 Thread Yann Verlynde
If I want to have a message in a JSP, I use:



How do u do to take back all the messages?




Re: Multiple Ressources

2002-10-30 Thread Yann Verlynde
It seems that the initialization is well done but:
[INFO] PropertyMessageResources - -Initializing,
config='com.oxade.struts.Configuration', returnNull=true
[INFO] PropertyMessageResources - -Initializing,
config='com.oxade.struts.ApplicationResources', returnNull=true

But I can't extract the second configuration properties.

- Original Message -
From: "Yann Verlynde" <[EMAIL PROTECTED]>
To: "Struts" <[EMAIL PROTECTED]>
Sent: Wednesday, October 30, 2002 9:24 AM
Subject: Multiple Ressources


Hello,

This is my struts-config.xml:



In my Action:
MessageResources messages =
(MessageResources)getServlet().getServletContext().getAttribute("APPLICATION
_CONFIGURATION");
When I debug, I saw a reference but nothing is inside.


Moreover, in a JSP, this code work so it have loaded my configuration file
in memory.


Thanks in advance






--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@;jakarta.apache.org>




Multiple Ressources

2002-10-30 Thread Yann Verlynde
Hello,

This is my struts-config.xml:



In my Action:
MessageResources messages = 
(MessageResources)getServlet().getServletContext().getAttribute("APPLICATION_CONFIGURATION");
When I debug, I saw a reference but nothing is inside.


Moreover, in a JSP, this code work so it have loaded my configuration file in memory.


Thanks in advance