Win a copy of Beginning Java 17 Fundamentals: Object-Oriented Programming in Java 17 this week in the Java in General forum!

Balbir Singh

Ranch Hand
+ Follow
since Jun 01, 2001
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Balbir Singh

I am using dynavalidator form in which the type for one of the form-
property is list. For eg
<form-bean name="ABCForm"
<form-property name="statelistString" type="java.lang.String"></form-
<form-property name="statelist"
type="java.util.List" ></form-property>
I am populating the list in the reset method for the default values
List test = new ArrayList();
someVO is a ValueObject which has got a String attribute name, so
basically in my reset method i create 2 objects of someVO with
different names.
and in the jsp, i am retrieving the list like this
<html:select name="ABCForm" property="stateListString" size="1">
<html ptions
collection="list" property="name"/>

This works fine, but there are two problems in this :
1) I have to create a VO for every string to be displayed in the List
2)I have to explicitly put the list in the session.
There must be a better solution to this, since if a type is declared
as list in the DynaValidatorForm and the form is available in the
session, then i need not put the list back in the session again.
Please help !!!
18 years ago
This maybe a basic question, but I need some justification for my cause. I am working on an application (using struts) which is not required to support internationalisation, so in that case for displaying labels, do i need to use bean:message tag in my Jsp's. Is there any benefit that I will gain in using bean:message tag for the labels. I know it will work either way but I would definately like to follow the recommended approach here.
Thanks and Regards
18 years ago
I am using map-backed forms for generating dynamic views. The concept goes like this that one jsp constitues of defined no of views, some of the views are static and some are dynamic, each view is made up of a value object, which is a form. The dynamic views are populated by using maps. So if i used map-backed forms for static pages, it works fine but for dynamic views, i have to use a map inside a map. The code for actionform eg looks like this :
public class TestForm extends ActionForm {
private Map values = new HashMap();
Map testMap = new HashMap();

public TestForm() {

public void setValue(String key, Object value) {

values.put(key, value);

public Object getValue(String key) {
return values.get(key);

public void reset(ActionMapping arg0, HttpServletRequest arg1) {

testMap.put("testField", "Why can't I populate it");
values.put("testMap", testMap);
values.put("retest", "Retest String");

public ActionErrors validate(ActionMapping arg0, HttpServletRequest arg1) {

return super.validate(arg0, arg1);
the jsp code is

<TABLE border="0" width="497">
<TD width="101">Test</TD>
<TD width="388">

<html:text property="value(testMap).testField"></html:text>
<TD width="101">Reset</TD>
<TD width="388">
<html:text property="value(retest)"></html:text>

but when I enter a value in the jsp and press submit, then only the value for the second field is dynamically filled by the form, but not for the first field (which is actually a field of a map inside a map). Is there any way i can use nested map-backed forms, i guess it should work since its able to get the values in the jsp using nested map, so it should also set the values as such. I am not sure what i m doing wrong over here ?
I will really appreciate your help in this.
18 years ago
Please make sure that JAVA_HOME is pointing to WebSphere's JDK. We had faced a similar problem on NT since our JAVA_HOME was pointing to Weblogic's JDK. After rectifing it, things started working. Hope it helps !!!
18 years ago
Hello All,

My working env is WAS4.0.4-DB27.2-AIX5.2. The problem I am facing is that while executing batch programs(which is calling EJB's) with multiple records I am getting this exception.

CONM6014I: Caught exception (RollbackException) in method (enlist).
Throwing new exception (TransactionAbortedException). The original
exception's stack trace was: javax.transaction.RollbackException
java(Compiled Code))
at Code))
at Code))
.java(Compiled Code)) at
mpiled Code))
at$ Code))

I had got the same problem earlier on NT and I was able to fix the problem by increasing the Transaction Timeout for the AppServer to 3000 seconds(since the method of the stateless session bean is taking long to execute, otherwise the container is terminating the transaction). On AIX I have tried with even 7000, but still the same problem persists. WAS and DB2 are on different boxes of AIX. Is there any settings related to transaction's on WAS except for the one through administrative console or anything related to transactions on DB2. For db cfg for the database, I tried by setting LOCKLIST to 10000 and MAXLOCKS to 20, then LOCKLIST to 20000 and MAXLOCKS to 50, but the problem is still persisting. Also the UDB is on a SMP box.

Any help will be greatly appreciated.
18 years ago
Well practically it all depends on the hardware that you are using, i mean no of cupu's, etc (remember each app server is running in its own jvm). Last week the IBM guys told us that for one application server we require minimum 4 cpu's, so for any clone/appserver u require +4 cpu's.
Check these two links:
Link 1


I hope it helps.
19 years ago
I read in this forum Vertical clustering (adding more JVM's on a multi-CPU box) rarely helps much if the box has fewer than 6 CPU's . Well we are running our application on 8 cpus, so how can i figure out abt how many clones do i need to have for best performance of the application. Is there any specific formula for that or is it just on hit and try basis by using some load testing tools.
The other query is regarding being WebSphere single threaded - i mean to say is that when we
run WebSphere (without clones) on Solaris using 8 cpu's, it utilizes 100% of one cpu at a given moment while other cpu's are idle. Though the process moves to other cpus' as such but at a given point of time the utilization of one cpu is 100% while others are hardly being utilized.
Sorry i forgot to mention its a Solaris 2.8 box and we are using WebSphere 4.0.3Cloning
19 years ago
Hi maya,
Please check the log files for details which is in WAS_HOME/logs. The error can be of many reasons, either insufficent priviliges to the user or if u r not using jdbc2.0 drivers, etc. Pls post the details of the log file which will give a clear view of the problem.
19 years ago
Hi Kishan,
WebSphere provides a very good utility wscp which is based on TCL for administrative purposes. We use it, keeps us away from the administrative console which is very slow in comparison to wscp.
19 years ago
The redbook has very good details in chapter 15 - "Configuring Session Management", go through that and you will find answers to your queries
19 years ago
Hi David,
Well yes i have defined the security, actually i checked up with the HitCount servlet in the examples, it gives me the same error when i try to access it, which means that theres nothing wrong with my application but yes some messing up in the configuration of websphere on my machine. I m curious, has anyone else encountered this problem and is there any fix pack for it?
19 years ago
Hi guys,
Any answers plsssss.....
19 years ago
We encountered the same problem. It was related to heap size parameters. Please check the min and maz heap size values.
19 years ago
I am trying to use form based authentication using os security. Everytime i try to access the secured jsp, it says that u r not authenticated to view the jsp but it doesnt forward it to the login page. The log says - Authentication failed for reason null. After enabling trace, this is the output:
[4/27/02 12:56:28:234 GMT+05:30] 3d846878 WebCollaborat getUserPrincipal
[4/27/02 12:56:28:234 GMT+05:30] 3d846878 WebCollaborat getUserPrincipal
[4/27/02 12:56:56:375 GMT+05:30] 3d846878 EJSWebCollabo D preInvoke: contextRoot= /Exercise1
[4/27/02 12:56:56:375 GMT+05:30] 3d846878 EJSWebCollabo D HttpServletRequest parameters and values:
[4/27/02 12:56:56:375 GMT+05:30] 3d846878 EJSWebCollabo D Http Header names and values:
accept=[image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/, application/, application/msword, */*]
accept-encoding=[gzip, deflate]
user-agent=[Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)]
[4/27/02 12:56:56:375 GMT+05:30] 3d846878 EJSWebCollabo D VirtualHost is : default_host
[4/27/02 12:56:56:375 GMT+05:30] 3d846878 WebCollaborat SetUnauthenticatedCredIfNeeded
[4/27/02 12:56:56:375 GMT+05:30] 3d846878 WebCollaborat D Invoked and received Credential are null, setting it anonymous/unauthenticated.
[4/27/02 12:56:56:375 GMT+05:30] 3d846878 WebCollaborat SetUnauthenticatedCredIfNeeded:true
[4/27/02 12:56:56:375 GMT+05:30] 3d846878 EJSWebCollabo D Request Context Path=/Exercise1, Servlet Path=/information.jsp, Path Info=null
[4/27/02 12:56:56:375 GMT+05:30] 3d846878 WebCollaborat authorize
[4/27/02 12:56:56:375 GMT+05:30] 3d846878 WebCollaborat D URI requested: /information.jsp
[4/27/02 12:56:56:375 GMT+05:30] 3d846878 WebAppCache D Okay, I found the entry for [default_host:/Exercise1]
[4/27/02 12:56:56:375 GMT+05:30] 3d846878 WebResourceCo D URI Match type = EXACT
[4/27/02 12:56:56:375 GMT+05:30] 3d846878 WebCollaborat checkConstraints
[4/27/02 12:56:56:375 GMT+05:30] 3d846878 WebCollaborat checkConstraints
[4/27/02 12:56:56:375 GMT+05:30] 3d846878 WebCollaborat D We have a custom login or error page request, web app login URL:[/login.html], errorPage URL:[/error.jsp], and the requested URI:[/information.jsp]
[4/27/02 12:56:56:375 GMT+05:30] 3d846878 WSAccessManag isEveryoneGranted
[4/27/02 12:56:56:375 GMT+05:30] 3d846878 WSAccessManag No roles granted to the special subject, Everyone
[4/27/02 12:56:56:375 GMT+05:30] 3d846878 WebCollaborat D URI - /information.jsp.GET is protected
[4/27/02 12:56:56:375 GMT+05:30] 3d846878 WebAuthentica authenticate
[4/27/02 12:56:56:375 GMT+05:30] 3d846878 WebAuthentica D handleTrustAssociation
[4/27/02 12:56:56:375 GMT+05:30] 3d846878 WebAuthentica D TrustAssociation is enabled.
[4/27/02 12:56:56:375 GMT+05:30] 3d846878 TrustAssociat getInterceptor
[4/27/02 12:56:56:375 GMT+05:30] 3d846878 TrustAssociat getInterceptor
[4/27/02 12:56:56:375 GMT+05:30] 3d846878 WebAuthentica handleTrustAssociation: (null user)
[4/27/02 12:56:56:375 GMT+05:30] 3d846878 WebAuthentica handleCustomLogin
[4/27/02 12:56:56:375 GMT+05:30] 3d846878 WebAuthentica D Form based login is configured for the resource
[4/27/02 12:56:56:375 GMT+05:30] 3d846878 WebAuthentica D Exception occurred: null
[4/27/02 12:56:56:375 GMT+05:30] 3d846878 WebAuthentica D Authentication failed.
[4/27/02 12:56:56:375 GMT+05:30] 3d846878 WebAuthentica authenticate
[4/27/02 12:56:56:375 GMT+05:30] 3d846878 WebCollaborat A SECJ0056E: Authentication failed for reason null
[4/27/02 12:56:56:406 GMT+05:30] 3d846878 WebCollaborat D Authentication failed. Reason: null
[4/27/02 12:56:56:406 GMT+05:30] 3d846878 WebCollaborat authorize
I am using the fully qualified domain name to access the page. Can anyone pls help
19 years ago
Hi Don,
Thanks for the post. Can you please elaborate on that.......