Vis Deo

Ranch Hand
+ Follow
since Jul 02, 2004
Merit badge: grant badges
For More
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 Vis Deo

How many times have you regret being proactive?

You are a developer, all leads (business, analyst and tech) had reviewed, approved & designed the implementation, and you raise concern, find the fault and proactively raise it.

The reaction from team - not at this time, or how come, as lead or approver I didn’t catch it, Most of the reactions are unpleasant.
If this feature goes into production without catching and critical problem occurs, the person who solves is appreciated more.

From this I always feel, I need to be reactive than proactive. What do you think?
9 years ago
I am trying to run Spring batch sample to read fixed length flat file
I am getting exception with Range definition
What can be changed in xml def?

org.springframework.beans.TypeMismatchException: Failed to convert property value of type [java.lang.String]
to required type [org.springframework.batch.item.file.transform.Range[]]
for property 'columns'; nested exception is java.lang.IllegalArgumentException:

code snippet
ApplicationContext context=new ClassPathXmlApplicationContext(new String[]{"fixedLength.xml"});
BeanFactory factory=context;
FlatFileItemReader<CustomerCredit> itemReader = ((FlatFileItemReader<CustomerCredit>)factory.getBean("itemReader"));

This is xml definition
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns=""
xmlns:aop="" xmlns:tx=""
xmlns:p="" xmlns:xsi=""

<bean id="itemReader" class="org.springframework.batch.item.file.FlatFileItemReader">
<property name="resource" value="data/iosample/input/fixedLength.txt" />
<property name="lineMapper">
<bean class="org.springframework.batch.item.file.mapping.DefaultLineMapper">
<property name="lineTokenizer">
<property name="names" value="name,credit" />
<property name="columns" value="1-9,10-11" /> </bean>
<property name="fieldSetMapper">
<property name="targetType"
value="" />

12 years ago
I want to know if ItemReader and flatfilereader - from spring batch package - does it read line by line data from file or read whole byte stream in memory?

I am trying to read fixed length flat file - large size - may be 30mb+ and extract few fields from each record. For e.g this file has each record that is size of 3000 char/bytes and I am interested in retrieving 2 fields from char position 10-30 and 2090-2100.

Because of large size 30MB+ I would like to read it line by line and creat javaobjects for each record. Therefore I want to know if flatfile reader reads line by line or loads whole file as bytestream in memory.

12 years ago
Simplest solution can be xml based per user.
Define schema for different types of preferences

If I am designing preference manager for Internet option,
Default browser, size, default site to open, pop up blocker etc can be required preferences,
Subsciption based preferences may be allowed sites, user can be asked to subscribe for allowed sites..

Irrespesctive of the requirements, I would like to understand best way of storing the preferences and retrival using Java.

If you have to design preference Manager for Internet Options - what are different types to design?

One part of it is storing preferences per user, that is going to be simple
Difficult part would be Providing new preferences on Fly. Let's say x Company has y applications and each applications is allowing 1-n number of preferences to set. Preference Manager sould allow to save these preferences. Also new application comes up and Preference manager should allow to provide preferences for this new application with no code changes.
We come across many Prefrences that are managed within application, OS level, windows, MAC, handheld devices. Can any one point me - different design patterns, ideas to design Preference Manager.

Some of the things it should do
Some preferences are by deafult assigned,
Some preferences are subscription based,

What is the best underlying data structure to store these preferences?
Congratulations - Can you please share the material you referred for preparing this exam?

I have registered for beta exam. Not sure where to start. I am looking at study notes for version 5. If you/anyone know where to start - please post more info.

Does anyone know reason for not executing javascriptlet in javascript function? I am using struts 1.0
This code executes fine ---> value="<%=rprCode%>"

But InsertContent('<%=itrCount%>'); results in InsertContent('%=itrCount%');

itrCount has valid value and I am able to read it by assigning to hidden field as
<html:hidden name="formBean" property="rowKey" value="itrCount" />

Any thoughts?

In my code I have following javascriptlet

name="formBean" property="rTypeArray" value="<%=rprCode%>" onchange="InsertContent('<%=itrCount%>');">
<html:options collection="REPAIRTYPES" property="key"
labelProperty="value" />


That results into


<select name="rTypeArray" onchange="InsertContent('%=itrCount%');">
<option value="1" selected="selected">N/A</option>
<option value="2">Pre-Repair</option>
<option value="3">Post-Repair</option>

14 years ago
I found the syntax

<html:options collection="MAPTYPES" property="key" labelProperty="value" />

and in Action form set the MAP to session like


14 years ago

error is given below.
I want to know syntax to use Map for options collection
if this syntax is correct?
<html:options collection="linkParams" property="params" label="value" value="key"/>

As the Map is generalized and will not have any specific getter / setter but through getKey and getValue?
Is using MAp is supported at all?

Map of specific value object that has getter setter may be easy to code bu my situation is addressing it for generalized codes table
that has code and description

ERROR! Failed to process your request.
JSPG0227E: Exception caught while translating /patient_setAneurysmType.jsp: /patient_setAneurysmType.jsp(176,6) --> JSPG0123E: Unable to locate tag attribute info for tag attribute label.

14 years ago

I am trying to implement dropdown using MAP data and getting error

Here is the code, Can you please help? is it possible to use value & key?

Part of JSP

<%@ page import="java.util.Collections" %>
<%@ page import="java.util.HashMap" %>


HashMap params = new HashMap();
params.put("param1", "param1Value");
pageContext.setAttribute("linkParams", params);

<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" >
<html:form method="get" action="listType" >

<html:options collection="linkParams" property="params" value="value" label="key"/> </html:select>

14 years ago


Does any one know about these exam? What do you need to prepare for these exams? Where to find study material, exam info, mock exam etc..

Bunch of Thanks
15 years ago
We will expand this to between think client running on Citrix metaframe and web app on desktop browser. Citrix metaframe is remote terminal.
17 years ago
These 2 applications are not tightly coupled but are based on same key - like member identity.
Transfering data - parameters from one app to other saves time for users as they don't have to remember member id. to save time of busy people - like doctors. They just have appointments for 7-15 mins and within this time they need to use lots of web apps to complete their tasks -

Coming ack to cookie part - WebAppA and WebAppB will not share same cookie

Lets see if I open 2 hotmail sessions on my desktop - can tchnology allows to create 2 different cookies? If so then first browser window for webAppA wil have cookie 1 and when user clicks link in webApp2 - new browser will be opened url with parameters will be submitted to app server. response will be received. That received response will create another cookie for webAppA and will store these parameter received from webApp2

I am poor in cookie and seesion handling.

17 years ago
Thanks for all response.

Hope this clarifies my requirement

WebAppB has href � URL with target window new for WebAppA � like

1.User1 has one browser1 open for webAppA and he is middle of doing something. that is session1 on appserver1
2.Then User1 goes to browser2 of WebApp2. And clicks above URL for WebAppA. New browser3 window submits above URL. Response is received by browser3 from appserverN with new session. The javascript code in the browser3 response checks for presence of browsers for WebAppA. It founds the instance of Browser1.
3.The code will close browser3 and make the Browser1 active and will prompt user1 that you have active session for WebAppA. The code will prompt the user something like � �You have active session for WebAppA, Do you want to abort the activities in WebAppA and bring the parameters from the url you cliked and start request�

User will need to have choice to continue with what ever he was doing in WebAppA in browser1 and bring these (ubb=get_topic&f=7&t=018460) parameters latter in the browser1 � like some button bring datafrom previous click/request.

There will be many other alternative flows. This may be the most crucial one to handle.

The solution

WebAppA for browser1 will have cookie1 for session1
When the new request comes in on browser3, WebAppA it may create another cookie for session2 and writes those parameters in that cookie
1. WebAppA is responsible to read all cookie(1 & 2) data for WebAppA
2. Should it share the same cookie?
What are the advantages � disadvantages with these 2 approaches?

Is there any other solution that can be implemented from AppServer side ?

[ January 09, 2007: Message edited by: Vis Deo ]
17 years ago