This week's book giveaway is in the JDBC and Relational Databases forum.
We're giving away four copies of Murach's MySQL and have Joel Murach on-line!
See this thread for details.
Win a copy of Murach's MySQL this week in the JDBC and Relational Databases forum!

manoj samarasinghe

+ Follow
since Nov 17, 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 manoj samarasinghe


I am using MailLogger for my nightly build for sending a mail with status.
I use something like this,

/vobs/pub/apache-ant-1.6.1/bin/ant -logger -buildfile /vobs/prof/custom-applications/TBM/nightly_build/call-review.xml -DMailLogger.failure.subject="$failure" -DMailLogger.success.subject="$success" -logfile /vobs/prof/custom-applications/TBM/nightly_build/review-status.log

it works fine.

But i need a way to add one more extra message to the end of the body of the mail i send.

But Content of the mail is taken by the log file ,declared as last line.
(-logfile vobs/prof/custom-applications/TBM/nightly_build/review-status.log)

I cannot add any thing to that file because it is created after each build and overrides preveios information.

Is there any way to add extra information to my mail body (not to mail subject, etc ..)? like MailLogger.message= .

here is my property file i use.



In my Struts front end.....

i get a collcetin of data from database and populate a table with them.
Each raw has a radio button associated.when one raw is selected by clicking the radio button and click another button called "edit" will appears a new raw with fields enabling to edit and those fields should alredy populated with corresponding values of the selected raw.

I need a way to identify a raw seperately and populate that newly created raw with those data in that selected raw.

thanks a lot
manoj samarasinghe
waiting for reply................
18 years ago

I was able to use jaas NTLogin authentication successfully for my project.
For the moment it will ask user for userName & password.

But because user is already login to the matchine (intranet) login again seems unnecessary.

I need a way to use those credentials without login again.
(i found out its callre "Single signOn")


18 years ago

I tried to use NTLogin module for my JAAS login.
I put NTSystem.dll in right place.
But when i run the program it gives following erroe message

Load NTLibrary..........
Username: msamarasinghe
Password: Tgb5Nhy6
Just before calling ntSystem.logon()
userName manoj
pasword ijnmko
domain SAMPLE java.lang.UnsatisfiedLinkError: logon
at NTSystem.logon(Native Method)
at NTSystemLogin.login(
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at Source)
at$000(Unknown Source)
at$ Source)
at Method)
at Source)
at Source)
at JaasTest.main(

I have no any idea what causes it.
help me

18 years ago

i know how to get data from a collection in to a jsp table,using Struts logic:Itrate tag.

but after populating them in a jsp table, i need a way to edit them in the same place (same jsp page )and when a button is clicked save those data in corresponding elements in side the collection.

for the moment those data are not saved proprely. because dont have a way to identify which element is changed and which one is the corresponding element in the collection .

help me

18 years ago

i am trying to use Windows Authentication for my struts project.
but i am new to that area. I need to restrict some people by accessing
certain jsp pages. And some pages should be allowed only to view but not to edit.How can i restrict different users for view,edit,... for the same page?

I need a way to disable some links in the main page for certain users.(Those who have non administative rights)

please give mea solution or any resources tutorial etc regarding this.

18 years ago
it is TimeZone.getAvailableIDs() method

i am getting timeZone as Asia/Colombo.
19 years ago

calendar.set(year , month , day , hour , minute , second);
TimeZone timeZone = null;

if ((timezone != null) && (!(timezone.toString().equals(""))))
timeZone = TimeZone.getTimeZone(timezone);

if (!timezone.equalsIgnoreCase(timeZone.getID()))
String msg = MPWAUtils.getLogMessage(
throw new InvalidParameterException(

log.debug("time zone " + timeZone);
log.debug("time zone after set in Calendar " + timeZone);
//Generate TimeStamp from Calendar
timeStamp = new Timestamp(calendar.getTime().getTime());

i use above code to check any entered time zone is valid.

i need to check its validity and throw an exception if it is wrong timeZone.

but i dont want the time zone to be converted to default one.

and i need to get all available time zones in the world.

currently TimeZOne.getAvailableZones() will not get all of them\

help me

thanks maoj.
19 years ago
thanks a lot....

solved it....

19 years ago

i used Calender object to set valus ..

i set year 2004 12 that..

but after setting those values if i display them again
the year value is changed to 2005 and month to 1(january).... and
other values changed too.

what is the reason for that ?
need a help to get unchanged values form the calendar.
19 years ago

in my program i need to use a xml document as a input to a perticuler that class i need to parse that xml and identify methods and attributes of that class from that xml.

and also i need a way to make all returned values from methods of that class in to a another xml string.

xml string as input-----> class---->identify mehod calls from that xml string---->calling methods---->return values as xml string.

i am expecting more simple solution for this
manoj samarasinghe
19 years ago

Can we handle more than one action from single jsp page ?
if possible how.

19 years ago

earlier i used normal html forms. eg...<form name="customize" method="post" onsubmit="checkSubmit()">

then when i insert any struts <html:...> tags (for example <html:text> in to that form it dosnt display.or error is given.

but if i change the normal form in to struts form the problom solved.
it displays without problom.
but whan i use struts forms i can use only one action for a form.

but still i need a way to use normal html forms.
beause then i can only use more than one action in a form.

i need a way to handle multiple actions within a one form (normal html form)and use struts tags .not struts forms.

help me...

if you use normal form instead of struts forms u can see that...
<%@ page language="java" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"

<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
body {
background-image: url(Nback.jpg);
#list {height: 380px; width: 900px; overflow: auto}
<link href="ARS.css" rel="stylesheet" type="text/css">
<style type="text/css">
.style2 {font-size: 18px}

<body >
java.util.Date date = new java.util.Date();

<span class="ARS style2">
<div align="center">
<span class="ARS style2">New CV's</span></span><table width="1000" border="0" cellpadding="0" cellspacing="0">
<td width="867" height="63"> </td>
<td colspan="2" valign="top"><div id="Layer1" class="ARS" style="position:absolute; left:761px; top:12px; width:237px; height:79px; z-index:1">
<p>Login As: [Cordinator]</p>
<p align="right">[
<html:link page="/">Home</html:link>
] [
<html:link page="">LogOff</html:link>
] </p>
</div> <p> </p>
<p> </p></td>
<td width="7"></td>
<td height="44"></td>
<td width="13"></td>
<td width="113"></td>
<td height="582" colspan="2" valign="top">

<html:form action=""> <!--change to ...<form name=..... to see the problom -->

<p class="ARS">
<label> Select Candidates By,
<html:radio property="optDateOrName" value="Date"/>
<html:radio property="optDateOrName" value="Name"/>
<html:radio property="optDateOrName" value="All"/>
<html:text property="txtSearch" size="20"/><font color="#FF0000"><html:errors/></font>
<html:submit property="btnSend" ><bean:message key=""/></html:submit>
<div ID="list">
<table width="823" border="1">
<tr bgcolor="#CCCCCC" class="ARS">
<th width="72" height="42" valign="top" scope="col">Candidate name </th>
<th width="99" valign="top" scope="col">Date Posted </th>
<th width="73" valign="top" scope="col">Select Track </th>
<th width="127" valign="top" scope="col">Select Short Lister </th>
<th width="102" valign="top" scope="col">Return Date </th>

<html:form action="">
<logic:iterate id="cvs" name="newCvPageForm" property="newCV" indexId="indexID">
<tr class="ARS">
<td height="35" valign="top"><a href="Cvtest.doc">
<html:checkbox property="chkNewCv"/><bean:write name="cvs" property="candidateName"/>
</a><bean:write name="indexID"/>
<td valign="top"><bean:write name="cvs" property="datePosted"/></td>
<td valign="top"><html:select indexed="true" name="newCvPageForm" property="selTrack">
<html ption value="a">
TR-1</html ption>
<html ption value="b">
TR-2</html ption>
<html ption value="c">
TR-3</html ption>
<td valign="top"><html:select indexed="true" name="newCvPageForm" property="selShortList">
<html ption value="a">SL-1</html ption>
<html ption value="b">SL-2</html ption>
<html ption value="c">SL-3</html ption>
<td valign="top"><html:text indexed="true" property="txtReturnDate"/></td>

<html:submit property="btnSend"><bean:message key="button.sendtosl"/></html:submit>
<html:submit property="btnSend" ><bean:message key="button.sendtohold"/></html:submit>
19 years ago
IN MY STRUTS PROJECT................

i used struts html forms with multiple buttons each should trigger different methods..but same action.

how do i seperately identify which button was clicked and excute appropriate method.

it is better to have a way to identify them using java script.
passing parameter or something like that.
19 years ago
For my STRUTS PROJECT....I have to connect to a database using DAOs.
I used two layerse called DAO (data access objects) and "service" layer where business logic is reside.i used DTO (datatarnsfer objects) for transfer data from frountend to backend.

later i add another layer between frount and service layer called delegate layer to redue coupling.

Actions-->delegate--> service-->DAO

my problom is what kind of methods i have to use in these layerse.
do i have to use more specific methods at delegate layer, and fewer and 'more general' ones at the DAO or othr way round?
19 years ago