You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Mohd Amin Mohd Din <am...@nc.com.my> on 2003/09/22 09:40:24 UTC

multiple rows of editable data

Hi,
 
I have a master detail form where the detail section has multiple rows
which have one field to be updated per row. There is one submit button
at the end of the form which will allow the data in the form to be
updated in to the data store.  How do I make the field represent a
unique number, putting the detail row id?
 
 
Thanks 
Amin

Re: Log4J and Struts

Posted by Mahesh Joshi <jo...@comcast.net>.
Hi,

Unfortunately this does not work for Tomcat 4.1.24

When I put log4j-1.2.8 in the jak*/common/lib or jak*/shared/lib I dont get
the results desired.
In the former, tomcat doesnt startup and in the latter struts does not
initialize.

Looks like I am missing something in the relationship between
commons-logging and Log4J.

Thanks!

Mahesh

----- Original Message ----- 
From: "Abhijeet Mahalkar" <Ab...@indussoft.com>
To: "Struts Users Mailing List" <st...@jakarta.apache.org>
Sent: Monday, September 22, 2003 2:39 AM
Subject: Re: Log4J and Struts


hi Mahesh,

No u have to keep ur log4j-1.2.8.jar into websphere\appserver\lib dir not
web-inf.
here it will not give any error.
I was working on the same kind of error an hr before but copy paste into
websphere\appserver\lib solved my problem...

regards
abhijeet

----- Original Message ----- 
From: "Mahesh Joshi" <jo...@comcast.net>
To: "Struts Users Mailing List" <st...@jakarta.apache.org>
Sent: Monday, September 22, 2003 2:59 PM
Subject: Log4J and Struts


Hi,

I am moving my current web application to struts and I am facing a problem.

We use Log4J for our logging (Log4J version 1.2.8)

If I have the log4j-1.2.8.jar in my WEB-INF/lib directory, the Action
servlet does not initialize

Tomcat log file says:
javax.servlet.ServletException: Error instantiating servlet class
org.apache.struts.action.ActionServlet
 at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:91
2)
...
----- Root Cause -----
java.lang.ExceptionInInitializerError
Caused by: org.apache.commons.logging.LogConfigurationException:
org.apache.commons.logging.LogConfigurationException: No suitable Log
constructor [Ljava.lang.Class;@3a5794 for
org.apache.commons.logging.impl.Log4JLogger
 at
org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.ja
va:532)
Caused by: org.apache.commons.logging.LogConfigurationException: No suitable
Log constructor [Ljava.lang.Class;@3a5794 for
org.apache.commons.logging.impl.Log4JLogger
 at
org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryI
mpl.java:432)
 at
org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.ja
va:525)
 ... 28 more
Caused by: java.lang.NoClassDefFoundError: org/apache/log4j/Logger
 at java.lang.Class.getDeclaredConstructors0(Native Method)
 at java.lang.Class.privateGetDeclaredConstructors(Class.java:1590)
 at java.lang.Class.getConstructor0(Class.java:1762)
 at java.lang.Class.getConstructor(Class.java:1002)
 at
org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryI
mpl.java:429)
 ... 29 more


If I remove the log4J.jar from WEB-INF/lib, the ActionServlet
initializes(but then my app. cant log).
I searched the archive and implemented the solution provided by Sgarlata
Matt
http://www.mail-archive.com/struts-user@jakarta.apache.org/msg79448.html

Howeve, putting the commons-logging.properties in the WEB-INF/classes/
folder didnt help either.
(note that our log4J config file has been kept in the WEB-INF folder. Even
if I keep the commons-logging.properties in the WEB-INF folder, it doesnt
work).

Please help!

Mahesh


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



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


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


Re: Log4J and Struts

Posted by Abhijeet Mahalkar <Ab...@indussoft.com>.
hi Mahesh,

No u have to keep ur log4j-1.2.8.jar into websphere\appserver\lib dir not web-inf. 
here it will not give any error.
I was working on the same kind of error an hr before but copy paste into websphere\appserver\lib solved my problem...

regards
abhijeet

----- Original Message ----- 
From: "Mahesh Joshi" <jo...@comcast.net>
To: "Struts Users Mailing List" <st...@jakarta.apache.org>
Sent: Monday, September 22, 2003 2:59 PM
Subject: Log4J and Struts


Hi,

I am moving my current web application to struts and I am facing a problem.

We use Log4J for our logging (Log4J version 1.2.8)

If I have the log4j-1.2.8.jar in my WEB-INF/lib directory, the Action
servlet does not initialize

Tomcat log file says:
javax.servlet.ServletException: Error instantiating servlet class
org.apache.struts.action.ActionServlet
 at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:91
2)
...
----- Root Cause -----
java.lang.ExceptionInInitializerError
Caused by: org.apache.commons.logging.LogConfigurationException:
org.apache.commons.logging.LogConfigurationException: No suitable Log
constructor [Ljava.lang.Class;@3a5794 for
org.apache.commons.logging.impl.Log4JLogger
 at
org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.ja
va:532)
Caused by: org.apache.commons.logging.LogConfigurationException: No suitable
Log constructor [Ljava.lang.Class;@3a5794 for
org.apache.commons.logging.impl.Log4JLogger
 at
org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryI
mpl.java:432)
 at
org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.ja
va:525)
 ... 28 more
Caused by: java.lang.NoClassDefFoundError: org/apache/log4j/Logger
 at java.lang.Class.getDeclaredConstructors0(Native Method)
 at java.lang.Class.privateGetDeclaredConstructors(Class.java:1590)
 at java.lang.Class.getConstructor0(Class.java:1762)
 at java.lang.Class.getConstructor(Class.java:1002)
 at
org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryI
mpl.java:429)
 ... 29 more


If I remove the log4J.jar from WEB-INF/lib, the ActionServlet
initializes(but then my app. cant log).
I searched the archive and implemented the solution provided by Sgarlata
Matt
http://www.mail-archive.com/struts-user@jakarta.apache.org/msg79448.html

Howeve, putting the commons-logging.properties in the WEB-INF/classes/
folder didnt help either.
(note that our log4J config file has been kept in the WEB-INF folder. Even
if I keep the commons-logging.properties in the WEB-INF folder, it doesnt
work).

Please help!

Mahesh


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



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


Log4J and Struts

Posted by Mahesh Joshi <jo...@comcast.net>.
Hi,

I am moving my current web application to struts and I am facing a problem.

We use Log4J for our logging (Log4J version 1.2.8)

If I have the log4j-1.2.8.jar in my WEB-INF/lib directory, the Action
servlet does not initialize

Tomcat log file says:
javax.servlet.ServletException: Error instantiating servlet class
org.apache.struts.action.ActionServlet
 at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:91
2)
...
----- Root Cause -----
java.lang.ExceptionInInitializerError
Caused by: org.apache.commons.logging.LogConfigurationException:
org.apache.commons.logging.LogConfigurationException: No suitable Log
constructor [Ljava.lang.Class;@3a5794 for
org.apache.commons.logging.impl.Log4JLogger
 at
org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.ja
va:532)
Caused by: org.apache.commons.logging.LogConfigurationException: No suitable
Log constructor [Ljava.lang.Class;@3a5794 for
org.apache.commons.logging.impl.Log4JLogger
 at
org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryI
mpl.java:432)
 at
org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.ja
va:525)
 ... 28 more
Caused by: java.lang.NoClassDefFoundError: org/apache/log4j/Logger
 at java.lang.Class.getDeclaredConstructors0(Native Method)
 at java.lang.Class.privateGetDeclaredConstructors(Class.java:1590)
 at java.lang.Class.getConstructor0(Class.java:1762)
 at java.lang.Class.getConstructor(Class.java:1002)
 at
org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryI
mpl.java:429)
 ... 29 more


If I remove the log4J.jar from WEB-INF/lib, the ActionServlet
initializes(but then my app. cant log).
I searched the archive and implemented the solution provided by Sgarlata
Matt
http://www.mail-archive.com/struts-user@jakarta.apache.org/msg79448.html

Howeve, putting the commons-logging.properties in the WEB-INF/classes/
folder didnt help either.
(note that our log4J config file has been kept in the WEB-INF folder. Even
if I keep the commons-logging.properties in the WEB-INF folder, it doesnt
work).

Please help!

Mahesh


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


Re: multiple rows of editable data

Posted by Abhijeet Mahalkar <Ab...@indussoft.com>.
Yes If you are having ur data in the Xml then generate one tag srlNo aong with other tags and add this tag for each row and id of each tag in the row has to be the same as well as it has to be row id. Then u can retireve this activelement.getAttribute("id") ; and get the TR of the table depends on this "id" value  then retrieve cell value of this row.. this way you can retireve the values as well as you can maintain uniqeness in each row of the table.. 

if you do not understand pls tell me i will forward a sample code for you..

regards
asbhijeet


----- Original Message ----- 
From: "Mohd Amin Mohd Din" <am...@nc.com.my>
To: <st...@jakarta.apache.org>
Sent: Monday, September 22, 2003 1:10 PM
Subject: multiple rows of editable data


Hi,
 
I have a master detail form where the detail section has multiple rows
which have one field to be updated per row. There is one submit button
at the end of the form which will allow the data in the form to be
updated in to the data store.  How do I make the field represent a
unique number, putting the detail row id?
 
 
Thanks 
Amin



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