Re: Action change in form

2003-04-06 Thread Marcel Maré
> Here is my code. Some how form is not submitted. Once i click the
'aboutus'
> link nothing is happening.
>
> Can some one tell me what is going on please.
>
> function setAction(action, link)
> {
>  document.form.action = act;

Shouldn't this be: action

>  document.form.method = "POST";
>  document.form.selectedGlobalLink.value = link; // This is hidden filed to
remember which   link is selected
>
> document.form.submit();
> }
>
>
> 
>
> About Us

You sure it isn't  "/aboutus.do"?

Regards,

Marcel


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



File upload

2002-03-04 Thread Marcel Maré

In case anybody ran into the error "Cannot find message resources under key
org.apache.struts.action.MESSAGE." when trying the
Struts File upload example in the nightly build.

Here's the solution thanks to the bugfixers:

Add a "dummy" init parameter to the web.xml file like so:

  
action
org.apache.struts.action.ActionServlet

  config
  /WEB-INF/struts-config.xml


  debug
  2


  detail
  2




  application
  

    

    1
  


Regards

Marcel Maré



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




REPOST: File upload example in nightly build is broken

2002-02-18 Thread Marcel Maré

The struts file upload example (struts-upload.war) in the nightly build
gives the following exception om TC 4.0.1 on Win2K SP2:

javax.servlet.ServletException: Cannot find message resources under key
org.apache.struts.action.MESSAGE

Does anybody know what's wrong? Somebody suggested that putting xerces.jar
in the webapps' lib directory solved it. But is doesn't in my case.

TIA

Marcel Maré



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




REPOST: Multiple file upload not possible due to MultiPartRequestHandler limitation?

2002-02-18 Thread Marcel Maré

File upload of a single file with Struts 1.0.2 seems to work OK. But it
fails for multiple files. Note: I mean 1  tag where the
user selects *multiple* files (Opera and IE allow this), not multiple  tags!

The MultipartRequestHandler doesn't seem to support this, since it
getFileElements() returns FormFiles in a hashtable, and cannot therefore
handle more than 1 FormFile for each input name.

The only way around this is to put multiple INPUT tags on the page, whicih
is a problem when I want to allow the user to upload a lot of (small) files.

If I'm not correct, how does one handle this?

TIA

Marcel Maré




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




File upload example in nightly build is broken

2002-02-14 Thread Marcel Maré

The struts file upload example (struts-upload.war) in the nightly build
gives the following exception om TC 4.0.1 on Win2K SP2:

javax.servlet.ServletException: Cannot find message resources under key
org.apache.struts.action.MESSAGE

Does anybody know what's wrong? Somebody suggested that putting xerces.jar
in the webapps' lib directory solved it. But is doesn't in my case.

TIA

Marcel Maré



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




Multiple file upload not possible due to MultiPartRequestHandler limitation?

2002-02-14 Thread Marcel Maré

File upload of a single file with Struts 1.0.2 seems to work OK. But it
fails for multiple files. Note: I mean 1  tag where the
user selects *multiple* files (Opera and IE allow this), not multiple  tags!

The MultipartRequestHandler doesn't seem to support this, since it
getFileElements() returns FormFiles in a hashtable, and cannot therefore
handle more than 1 FormFile for each input name.

The only way around this is to put multiple INPUT tags on the page, whicih
is a problem when I want to allow the user to upload a lot of (small) files.

If I'm not correct, how does one handle this?

TIA

Marcel Maré




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




RE: ShoppingBasket persistence problem

2002-01-10 Thread Marcel Maré

Take a look at www.db4o.com.
Disclaimer: I don't work for them. I don't even have/use the product, but it
sure looks good.

Marcel

> -Oorspronkelijk bericht-
> Van: Narendranatha R Sajjala [mailto:[EMAIL PROTECTED]]
> Verzonden: donderdag 10 januari 2002 23:31
> Aan: 'Struts Users Mailing List'
> Onderwerp: ShoppingBasket persistence problem
>
>
> persisting Shoppingbasket as a Blob object is decreasing the performance,
> any one can give a better idea about alternative for this.
> At present blob object contains ShoppingBasketBean
> it is a collection of
> 1)shopperId
> 2)OrderData
> 3)ItemData
> 4)RecipientData
> 5)BillingMessage
> 6)SoldToMessage
>
> as per the business requirements we need to persist this Object
> in database
> everytime user add an item to basket
> so if user adds 10 items to shopping basket it results 1 INSERT
> and 9 UPDATE
> statements against database using blob object.
>
> another problem is one of the object is changes for example added a new
> field into ItemData.java as per business requirements
> i am getting ClassCastException versionID is changed.
>
> any alternative solution for this.
> Thanks in advance..
>
> Narendranatha R Sajjala,
> 1800flowers.com
> Ph:516-237-4881
>
>
>
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 
>
>



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




i18n: What is the best way to acces MessageResource from non-servlet/JSP application modules?

2002-01-10 Thread Marcel Maré

Hi all,

I would like to access the Struts message resources from parts of my
application which are not servlet or JSP related, say in business components
or non-JSP presentation parts.

In an action or form I would do something like this:
MessageResources messages = getServlet().getResources();
String msg = messages.getMessage( locale, key );

But how can I get my hands on the MessageResources without passing a
reference to the servlet or the MessageResources to the interested
component? Is there a static method lurking somewhere?

TIA

Marcel Maré

WebToTheMax



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




Unexpected behavoir of html:options tag

2001-09-01 Thread Marcel Maré

Why isn't this allowed:

  
 
  


but this is:

  
  
 
  

Looks kinda clumsy.



Marcel Maré

WebToTheMax

T 31(0) 204 100 240
M 31(0) 654 354 479
E [EMAIL PROTECTED]
W http://www.webtothemax.com





2nd attempt: Unexpected behavior of html:options tag

2001-08-29 Thread Marcel Maré

Why isn't this allowed :

  
 
  

where variantOptions is a property (of type ArrayList) of cartItem.

but this is:

  
  
 
  

IOW if I copy the property into a new bean (with ), I can
access the collection.

The same happens if instead of using "name=cartItem" I want to access a
collection property of the formbean. I need the same workaround.

Marcel Maré

WebToTheMax

T 31(0) 204 100 240
M 31(0) 654 354 479
E [EMAIL PROTECTED]
W http://www.webtothemax.com





Unexpected behavoir of html:options tag

2001-08-17 Thread Marcel Maré

Why isn't this allowed:

  
 
  


but this is:

  
  
 
  

Looks kinda clumsy.



Marcel Maré

WebToTheMax

T 31(0) 204 100 240
M 31(0) 654 354 479
E [EMAIL PROTECTED]
W http://www.webtothemax.com





RE: what setters do i implement in an indexed tag ?

2001-08-15 Thread Marcel Maré

I'm following closely Dave's example code and almost have it working, except
that on post of the JSP form the parameter's values (which are correct) are
not stored in the Formbean's list. So seem to have had the same problem and
solved it. However, I fail to see what the difference between your 'hacked'
version and Dave's original code is. Please enlighten me.

TIA

Marcel


> -Oorspronkelijk bericht-
> Van: Warwick Boote [mailto:[EMAIL PROTECTED]]
> Verzonden: woensdag 25 juli 2001 17:13
> Aan: [EMAIL PROTECTED]
> Onderwerp: RE: what setters do i implement in an indexed tag ?
>
>
> Here is a hacked version of the code posted by David Hay previously.  The
> code here will compile and run - a Vector is populated then displayed.
> After a post, the vector is retrieved from the form and then System.out is
> used to show its size.
>
> This should help others that are having problems with indexed
> tags.  You'll
> need to point your browser to somthing that looks like
> http://localhost/struts/ShowParameters.do once you've copied all the files
> into the correct locations.
>
> There were two issues with the way i was trying to do it, firstly
> it seems that unless the scope of the form is set to session (or
> not specified) it doesn't work and secondly because i was using a
> different id for the name in the logic:iterate / html:text tags
> (when i set them to
> "parameter" it worked).
>
>  property="parameterList">
>indexed="true"/> 
> 
>
>
> type="com.eurobenefits.dta.presentation.FieldsMapAction"
>scope="session"
>name="FieldsMapForm"
>validate="false">
> path="/DefineFieldMappings.jsp"/>
> 
>
> Waz.
> =)
>
> -Original Message-
> From: Warwick Boote [mailto:[EMAIL PROTECTED]]
> Sent: 24 July 2001 14:09
> To: [EMAIL PROTECTED]
> Subject: what setters do i implement in an indexed tag ?
>
>
> I've created a page using indexed tags (neat stuff!).
> Here is what is currently working for me:
> o If i populate the form's vector, values from that vector are
> displayed in
> the jsp
> Here is what it not working:
> o when the form is posted back, the vector is null (in the struts
> perform()
> method)
> I suspect i haven't implemented some sort of setter within the form but i
> can't find an example as to what method should be implemented.  I've tried
> ArrayList and using parameterList instead with no different result.
> Thanks,
> Waz.
> =)
> Here are some code snippits for help:
> ---jsp---
>  property="fieldMappings">
>  
> 
> ---Form---
> public class FieldsMapForm extends ActionForm {
> private String fileColCount;
> private java.util.Vector fieldMappings = new java.util.Vector();
> private String action;
> public String getFileColCount() {
> return fileColCount;
> }
> public void setFileColCount(String newFileColCount) {
> fileColCount = newFileColCount;
> }
> public void setFieldMappings(java.util.Vector newFieldMappings) {
> fieldMappings = newFieldMappings;
> }
> public java.util.Vector getFieldMappings() {
> return fieldMappings;
> }
> public FieldMapping getParameter(int index) {
> return (FieldMapping)fieldMappings.elementAt(index);
> }
> public void setAction(String newAction) {
> action = newAction;
> }
> public String getAction() {
> return action;
> }
> public void reset(ActionMapping mapping, HttpServletRequest request) {
> fileColCount = null;
> fieldMappings = new java.util.Vector();
> action = null;
> }
> }
> ---The vector contains these:---
> public class FieldMapping implements Serializable {
> private Integer fieldNumber;
> private String attributeCode;
> public void setFieldNumber(Integer newFieldNumber) {
> fieldNumber = newFieldNumber;
> }
> public Integer getFieldNumber() {
> return fieldNumber;
> }
> public void setAttributeCode(String newAttributeCode) {
> attributeCode = newAttributeCode;
> }
> public String getAttributeCode() {
> return attributeCode;
> }
> }
>  <>
>
>




RE: indexed properties weirdness. I'm desperate...

2001-08-14 Thread Marcel Maré

Hi Dave

Thanks for your prompt answer, it saves me from banging the wall with my
head wondering why it won't work.

Any time frame for the addition of nested properties to the indexed tags?

What I would really appreciate if, whenever the new tags are added to the
nightly build, you could also add a code snippet illustrating the use of the
tag and outlining the *minimum* requirements on the property getters. The
examples posted to this list are a bit confusing.

Anyway, thanks for the existing tags and TIA for any improvements.

Marcel

> -Oorspronkelijk bericht-
> Van: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Verzonden: maandag 13 augustus 2001 23:58
> Aan: [EMAIL PROTECTED]
> Onderwerp: Re: indexed properties weirdness. I'm desperate...
>
>
>
>
> Hi Marcel,
>
> Unfortunately using the indexed tags you cannot currently use
> nested properties.
>
> This is on my todo list, but I just got back from vacation and
> may take a while.
> Solution with scriptlets was posted a while back, I believe,
>
> Cheers,
>
> Dave
>
>
>
>
>
> Marcel Maré <[EMAIL PROTECTED]> on
> 08/11/2001 11:10:45
> AM
>
> Please respond to [EMAIL PROTECTED]
>
> To:   "Mailinglist Struts-User"
>   <[EMAIL PROTECTED]>
> cc:(bcc: David Hay/Lex/Lexmark)
> Subject:  indexed properties weirdness. I'm desperate...
>
>
>
> This is driving me crazy. I've spent days figuring this out. Yes, I have
> read other postings about this, but obviously I'm missing
> something (part of
> my brain perhaps).
>
> What I want is the form bean to contain a list of objects, which have some
> properties. The jsp will iterate over the objects in the list to display
> it's (nested) properties in a form. Sounds simple? It isn't.
>
> I just can't figure out what property getters I *have* to implement.
>
> This is a test case I have created:
>
> =
> The Form bean
> =
>
> public class EditCartForm extends ActionForm {
>
> // other stuff omitted
>
>
> private ArrayList indexables = new ArrayList();
>
> public EditCartForm() {
> }
>
> public Indexable getIndexable(int index) {
> return (Indexable) indexables.get(index);
> }
>
> public List getIndexables() {
> return indexables;
> }
>
> }
>
> ==
> The Indexable class that is in the list
> ==
>
> public class Indexable extends Object implements java.io.Serializable {
>
> private String stringProp;
> private Integer intObjProp;
> private int intProp;
>
> public Indexable() {
> }
>
> public Indexable( int value ) {
> intProp = value;
> intObjProp = new Integer(intProp);
> stringProp = String.valueOf(intProp);
> }
>
> public String getStringProp() {
> return stringProp;
> }
>
> public void setStringProp(String value) {
> this.stringProp = value;
> }
>
> public Integer getIntObjProp() {
> return intObjProp;
> }
>
> public void setIntObjProp(Integer intObjProp) {
> this.intObjProp = intObjProp;
> }
>
> public int getIntProp() {
> return intProp;
> }
>
> public void setIntProp(int intProp) {
> this.intProp = intProp;
> }
> }
>
>
> ===
> struts-config
> ===
>
>
> type="com.webtothemax.shop.actions.AddToCartAction"
>name="theForm"
>scope="session"
>validate="false"
>
>
> ===
> The jsp
> ===
>
> 
>
> 
>
>  type="com.webtothemax.shop.common.CartItem" property="cart.cartItems">
>
> 
>  indexed="true" />
>  indexed="true" />
>  indexed="true"
> />
>
> : This is just an example: I have only 1 of these lines in the real file.
> :
> : stuff omitted
> :
> : Note that I iterate over another collection (which has the same size)
> ===
>
>
> What I would expect:
>
>  
>
> to be rendered as something like :
>
> 
>
> Where because of omitting the "name" attribute the formbean should be
> referenced.
>
> This is what I get in reality:
>
> When I include the name attribute:
>ERROR: "No getter method for property indexable.stringProp of bean
> theForm"
> When I omit the name attribute:
>ERROR: "No getter method for property indexable.stringProp of bean
> org.apache.struts.taglib.html.BEAN"
> When also omit stringProp:
>ERROR: "No getter method for property indexable of bean
> org.apache.struts.taglib.html.BEAN"
>
>
>
> So, if somebody could spell it out for me, real slowly, I would be very
> grateful.
>
> TIA
>
> Marcel Maré
>
> WebToTheMax
>
> E [EMAIL PROTECTED]
> W http://www.webtothemax.com
>
>
>
>
>
>
>
>




Oops, sorry for the double posts

2001-08-08 Thread Marcel Maré

Something fishy going on here (duplicator worm? ;-)

Marcel Maré

WebToTheMax





Can't get setter method(s) for indexed property right. Pleeze help

2001-08-08 Thread Marcel Maré

I'm having trouble getting the setter methods of an indexed property of my
formbean to work (despite some postings on this list). It's driving me nuts.

So what I'm trying to do is use a String property of my formbean (actually a
List of Strings) as an indexed property.

===
JSP
===









 :
 :

 :
 :
-
Note that the last field references the formbean (at least it should since
"name=" is omittted). Note also that the iteration is not over the formbean
(property).


=
Struts-config
=

 









-
AddToCartAction adds the product and prepopulates the formbean.

==
Form bean editCartForm
==

public class EditCartForm extends ActionForm {

 :
 :

private ArrayList testList = new ArrayList();

public EditCartForm() {}

 :
 :
 :

public String getTest(int index) {
return (String) testList.get(index);
}

public void setTest(int index, String test) {
testList.set(index, test);
}

public ArrayList getTestList() {
return testList;
}

public void setTestList( ArrayList testList ) {
this.testList = testList;
}
}
-
I got the idea for set/getTestList from this mailinglist.


The result:

Error: 500
Location: /WEB-INF/jsp/editCart.jsp
Internal Servlet Error:
javax.servlet.ServletException: No getter method for property test of bean
editCartForm
at
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp
l.java:459)
at
WEB_0002dINF.jsp._0002fWEB_0002dINF_0002fjsp_0002feditCart_0002ejspeditCart_
jsp_7._jspService(_0002fWEB_0002dINF_0002fjsp_0002feditCart_0002ejspeditCart
_jsp_7.java:690)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)

 :
 :

Root cause:
javax.servlet.jsp.JspException: No getter method for property test of bean
editCartForm
at org.apache.struts.util.RequestUtils.lookup(RequestUtils.java:519)
at
org.apache.struts.taglib.html.BaseFieldTag.doStartTag(BaseFieldTag.java:190)
at
WEB_0002dINF.jsp._0002fWEB_0002dINF_0002fjsp_0002feditCart_0002ejspeditCart_
jsp_7._jspService(_0002fWEB_0002dINF_0002fjsp_0002feditCart_0002ejspeditCart
_jsp_7.java:534)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)



What am I doing wrong? Any help appreciated


Marcel Maré

WebToTheMax
[EMAIL PROTECTED]





Formbean Reset() called on every pass?

2001-08-08 Thread Marcel Maré

Why is the Formbean Reset() method called on every pass, regardless of scope
(request vs session).
This makes prepopulating a form a bit awkward.

TIA

Marcel Maré
WebToTheMax




Formbean Reset() called on every pass?

2001-08-08 Thread Marcel Maré

Why is the Formbean Reset() method called on every pass, regardless of scope
(request vs session).
This makes prepopulating a form a bit awkward.

TIA

Marcel Maré
WebToTheMax




Can't get setter method(s) for indexed property right. Pleeze help

2001-08-08 Thread Marcel Maré

I'm having trouble getting the setter methods of an indexed property of my
formbean to work (despite some postings on this list). It's driving me nuts.

So what I'm trying to do is use a String property of my formbean (actually a
List of Strings) as an indexed property.

===
JSP
===









 :
 :

 :
 :
-
Note that the last field references the formbean (at least it should since
"name=" is omittted). Note also that the iteration is not over the formbean
(property).


=
Struts-config
=

 









-
AddToCartAction adds the product and prepopulates the formbean.

==
Form bean editCartForm
==

public class EditCartForm extends ActionForm {

 :
 :

private ArrayList testList = new ArrayList();

public EditCartForm() {}

 :
 :
 :

public String getTest(int index) {
return (String) testList.get(index);
}

public void setTest(int index, String test) {
testList.set(index, test);
}

public ArrayList getTestList() {
return testList;
}

public void setTestList( ArrayList testList ) {
this.testList = testList;
}
}
-
I got the idea for set/getTestList from this mailinglist.


The result:

Error: 500
Location: /WEB-INF/jsp/editCart.jsp
Internal Servlet Error:
javax.servlet.ServletException: No getter method for property test of bean
editCartForm
at
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp
l.java:459)
at
WEB_0002dINF.jsp._0002fWEB_0002dINF_0002fjsp_0002feditCart_0002ejspeditCart_
jsp_7._jspService(_0002fWEB_0002dINF_0002fjsp_0002feditCart_0002ejspeditCart
_jsp_7.java:690)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)

 :
 :

Root cause:
javax.servlet.jsp.JspException: No getter method for property test of bean
editCartForm
at org.apache.struts.util.RequestUtils.lookup(RequestUtils.java:519)
at
org.apache.struts.taglib.html.BaseFieldTag.doStartTag(BaseFieldTag.java:190)
at
WEB_0002dINF.jsp._0002fWEB_0002dINF_0002fjsp_0002feditCart_0002ejspeditCart_
jsp_7._jspService(_0002fWEB_0002dINF_0002fjsp_0002feditCart_0002ejspeditCart
_jsp_7.java:534)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)



What am I doing wrong? Any help appreciated


Marcel Maré

WebToTheMax
[EMAIL PROTECTED]





Can't get setter method(s) for indexed property right. Pleeze help

2001-08-07 Thread Marcel Maré

I'm having trouble getting the setter methods of an indexed property of my
formbean to work (despite some postings on this list). It's driving me nuts.

So what I'm trying to do is use a String property of my formbean (actually a
List of Strings) as an indexed property.

===
JSP
===









 :
 :

 :
 :
-
Note that the last field references the formbean (at least it should since
"name=" is omittted). Note also that the iteration is not over the formbean
(property).


=
Struts-config
=

 









-
AddToCartAction adds the product and prepopulates the formbean.

==
Form bean editCartForm
==

public class EditCartForm extends ActionForm {

 :
 :

private ArrayList testList = new ArrayList();

public EditCartForm() {}

 :
 :
 :

public String getTest(int index) {
return (String) testList.get(index);
}

public void setTest(int index, String test) {
testList.set(index, test);
}

public ArrayList getTestList() {
return testList;
}

public void setTestList( ArrayList testList ) {
this.testList = testList;
}
}
-
I got the idea for set/getTestList from this mailinglist.


The result:

Error: 500
Location: /WEB-INF/jsp/editCart.jsp
Internal Servlet Error:
javax.servlet.ServletException: No getter method for property test of bean
editCartForm
at
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp
l.java:459)
at
WEB_0002dINF.jsp._0002fWEB_0002dINF_0002fjsp_0002feditCart_0002ejspeditCart_
jsp_7._jspService(_0002fWEB_0002dINF_0002fjsp_0002feditCart_0002ejspeditCart
_jsp_7.java:690)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)

 :
 :

Root cause:
javax.servlet.jsp.JspException: No getter method for property test of bean
editCartForm
at org.apache.struts.util.RequestUtils.lookup(RequestUtils.java:519)
at
org.apache.struts.taglib.html.BaseFieldTag.doStartTag(BaseFieldTag.java:190)
at
WEB_0002dINF.jsp._0002fWEB_0002dINF_0002fjsp_0002feditCart_0002ejspeditCart_
jsp_7._jspService(_0002fWEB_0002dINF_0002fjsp_0002feditCart_0002ejspeditCart
_jsp_7.java:534)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)



What am I doing wrong? Any help appreciated


Marcel Maré

WebToTheMax
[EMAIL PROTECTED]





RE: Form processing question

2001-08-06 Thread Marcel Maré

You do know there's a typo in your example, don't you? You're trying to pair
a  with a  (note the missing "not"). Maybe
it's only in your email, but it has bitten me IRL.

Marcel

> -Oorspronkelijk bericht-
> Van: Greg Maletic [mailto:[EMAIL PROTECTED]]
> Verzonden: maandag 6 augustus 2001 1:29
> Aan: Martin Cooper; [EMAIL PROTECTED]
> Onderwerp: RE: Form processing question
>
>
> That was my idea, too, but it doesn't seem to work.  I'm doing the
> following:
>
> 
>   
> 
> 
>   
> 
>
>
> But the parser goes nuts with this.  XML doesn't allow improperly nested
> tags, so it complains that there's no matching  tag inside of
> the  tag.
>
> Does anyone have any other ideas?
>
> Thanks.
>
> -Original Message-
> From: Martin Cooper [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, August 04, 2001 11:27 AM
> To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject: Re: Form processing question
>
>
> One way to do this would be to use the Struts conditional tags to
> generate a
> different URL on the page for edit versus add. You could base the decision
> on the presence or absence of your productId parameter.
>
> --
> Martin Cooper
>
>
> - Original Message -
> From: "Greg Maletic" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Thursday, August 02, 2001 5:09 PM
> Subject: Form processing question
>
>
> > I have a JSP that is used to edit data on a ActionForm bean.  There are
> two
> > ways for users to reach this JSP:  1) if they're adding a new
> object into
> my
> > app; 2) if they're editing an existing object in my app.  I'm using two
> > mappings in my struts-config.xml file to represent these two types of
> > actions ("/add" and "/edit"), although they both map to this same JSP.
> > (Additionally, the "/edit" mapping has a parameter called
> "productId" that
> > describes which product to edit, while the "/add" mapping doesn't have a
> > parameter.)
> >
> > It's the behavior when the JSP's form is submitted that I'm
> having trouble
> > with.  If the JSP was reached through the "add" mapping, I want it to go
> to
> > an "/addExecute" mapping that will actually add the object.  And if the
> JSP
> > was reached through the "edit" mapping, I want the form to go to an
> > "/editExecute" mapping that will actually make the modifications to the
> > object.  (As above, the "/editExecute" mapping needs a "productId"
> parameter
> > specified--passed through from the original "/edit" mapping--while the
> > "/addExecute" mapping doesn't.)  Unfortunately, I can't figure
> out how to
> > conditionally make the form submit to one of two different actions
> > ("/addExecute" or "/editExecute").
> >
> > Is there a way to make this work?  Is this the right technique
> for solving
> > this problem?  If not, could someone please let me know how this is
> > typically done?
> >
> > Thanks!
> >
> > Greg
> >
> >
>
>
>
>




log4j log file location (was: RE: struts and log4J)

2001-08-01 Thread Marcel Maré

Yes, this is how I did it, and it works fine. Does anybody know how you can
set the location of the log-file to a *relative* path (e.g. /WEB-INF/log)
instead of an absolute path?

Marcel

> -Oorspronkelijk bericht-
> Van: William Jaynes [mailto:[EMAIL PROTECTED]]
> Verzonden: dinsdag 31 juli 2001 15:43
> Aan: [EMAIL PROTECTED]
> Onderwerp: Re: struts and log4J
> 
> 
> The easiest way is to let the log4j static initializer work 
> for you. Place
> log4j.jar in your WEB-INF/lib directory and your 
> log4j.properties file in
> WEB-INF/classes.
> 
> - Original Message -
> From: "DUPRAT Alexandre" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, July 31, 2001 5:03 AM
> Subject: struts and log4J
> 
> 
> > Hi all,
> >
> > I'm a newbie in struts.
> > I'd like to use log4J with struts.
> > I don't know where  i must do the log4J configuration.
> > In another servlet, i would do it in init method but i 
> would like to use
> > ActionServlet.
> > Where can i put code like :
> > BasicConfigurator.configure()  . ?
> >
> > Thanks for help.
> >
> > Alexandre Duprat
> > SOPRA. Direction France Sud. Bordeaux
> > [EMAIL PROTECTED]
> >
> >
> >
> > ++
> > | Ce courrier ainsi que les fichiers joints sont confidentiels.  |
> > | Si vous avez recu ce courrier par erreur, veuillez en informer |
> > | l'administrateur du systeme : [EMAIL PROTECTED]   |
> > |  - |
> > | Ce message confirme que le courrier a passe le controle|
> > | antivirus du relais de messagerie Internet avec succes.|
> > ++
> 
> 



Iterate tag: length and offset set by bean properties don't work?

2001-07-19 Thread Marcel Maré

Can somebody please explain why I can't set offset and length with
properties of a bean (in this case Integer properties "pager")?
What would be the best way to set these attributes from the bean?






...do stuff here...





TIA


Marcel Maré

WebToTheMax

T 31(0) 204 100 240
M 31(0) 654 354 479
E [EMAIL PROTECTED]
W http://www.webtothemax.com