SuprajaY Yasoda

Greenhorn
+ Follow
since Oct 17, 2005
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by SuprajaY Yasoda

Thanks a lot for the reply, validate method of my ActionFomm returns actionErros, but still am unable to display message. I tried removing webitt(folder in which my ApplicationResources.properties file is residing.)
15 years ago
Hi,

I am having similar problem , please suggest me,

Code at ActionForm:

if(totaltenderAwdAmtSGD.compareTo(finLimitAmt) > 0)
{
ActionErrors actionErrors=new ActionErrors();
actionErrors.add(ActionErrors.GLOBAL_ERROR,new ActionError("error.tender.finAmt.chk.msg"));
Log.out.debug(" finLimitAmtfinLimitAmt 0000: "+actionErrors.isEmpty());

if (!actionErrors.isEmpty()) {
saveErrors(req,actionErrors);
Log.out.debug(" finLimitAmtfinLimitAmt 1111: "+finLimitAmt);

}

Log.out.debug(" finLimitAmtfinLimitAmt 2222: "+finLimitAmt);
strForward = "awardConfirmItem";

}


Am getting all the prints,

entry at ApplicationProperties.properties

error.tender.finAmt.chk.msg=<li>You may want to reduce the Total Awarded Amount as it exceeds selected Approving/ Verifyin Officer financial limit of approval.</li>

and at JSP

<td><html:errors bundle="webitt"/></td></tr>

Still am unable to get error message, please suggest me on this.
15 years ago
I am getting the following exception
Could not establish a connection with -705750746771584844767S:10.2444.1.141[7001,7001,-1,-1,7001,-1,-1]:10.244.1.140,10.244.1.141:App112,java.rmi.ConnectException: Destnation unreachable; nested exception is: java.net.ConnectException:Connection refused: connect: No available router to destinatio .

Any Suggestions pls?
15 years ago
hi am also getting the same error for this below code, can some pls help me
try {
//get the connection
conn = CommonUtil.getConnection();

psSupp = new StringStatement(conn, strTP);
psSupp.setString(1,strITTCode);
psSupp.setString(2,strResponseNo);

Log.out.debug(psSupp.toString());

rsSupp = psSupp.executeQuery();

if (rsSupp.next()) {
udSupplierBriefInfo.setStrSupplierType("0");
udSupplierBriefInfo.setStrSupplierCode(rsSupp.getString("SUPP_CODE"));
udSupplierBriefInfo.setStrSupplierSiteId(rsSupp.getString("SUPP_SITE_ID"));
udSupplierBriefInfo.setStrSupplierName(rsSupp.getString("SUPP_NAME"));
udSupplierBriefInfo.setIntResponseNo(Integer.parseInt(strResponseNo));

if (rsSupp != null) rsSupp.close();
rsSupp = null;
if (psSupp != null) psSupp.close();
psSupp = null;
if (conn != null && !conn.isClosed()) conn.close();


}
else {
conn = CommonUtil.getConnection();
psSupp = new StringStatement(conn, strNonTP);
psSupp.setString(1,strITTCode);
psSupp.setString(2,strResponseNo);

Log.out.debug("Not a TP that is logically undeleted -> Next querry :" +psSupp.toString());

rsSupp = psSupp.executeQuery();

if (rsSupp.next()) {
udSupplierBriefInfo.setStrSupplierType("1");
udSupplierBriefInfo.setStrSupplierCode(rsSupp.getString("SUPP_CODE"));
udSupplierBriefInfo.setStrSupplierSiteId(rsSupp.getString("SUPP_SITE_ID"));
udSupplierBriefInfo.setStrSupplierName(rsSupp.getString("SUPP_NAME"));
udSupplierBriefInfo.setIntResponseNo(Integer.parseInt(strResponseNo));

if (rsSupp != null) rsSupp.close();
rsSupp = null;
if (psSupp != null) psSupp.close();
psSupp = null;
if (conn != null && !conn.isClosed()) conn.close();

}
/*else {

psSupp = new StringStatement(conn, strNonTPDeleted);
psSupp.setString(1,strITTCode);
psSupp.setString(2,strResponseNo);

Log.out.debug("Not a TP or Non-TP that are logically undeleted -> Next querry :" +psSupp.toString());

rsSupp = psSupp.executeQuery();

if (rsSupp.next()) {
udSupplierBriefInfo.setStrSupplierType("1");
udSupplierBriefInfo.setStrSupplierCode(rsSupp.getString("SUPP_CODE"));
udSupplierBriefInfo.setStrSupplierSiteId(rsSupp.getString("SUPP_SITE_ID"));
udSupplierBriefInfo.setStrSupplierName(rsSupp.getString("SUPP_NAME"));
udSupplierBriefInfo.setIntResponseNo(Integer.parseInt(strResponseNo));
}*/
else {
conn = CommonUtil.getConnection();
psSupp = new StringStatement(conn, strTPDeleted);
psSupp.setString(1,strITTCode);
psSupp.setString(2,strResponseNo);

Log.out.debug("Not a TP that is logically undeleted or Non-TP -> Next querry :" +psSupp.toString());

rsSupp = psSupp.executeQuery();

if (rsSupp.next()) {
udSupplierBriefInfo.setStrSupplierType("0");
udSupplierBriefInfo.setStrSupplierCode(rsSupp.getString("SUPP_CODE"));
udSupplierBriefInfo.setStrSupplierSiteId(rsSupp.getString("SUPP_SITE_ID"));
udSupplierBriefInfo.setStrSupplierName(rsSupp.getString("SUPP_NAME"));
udSupplierBriefInfo.setIntResponseNo(Integer.parseInt(strResponseNo));
}
if (rsSupp != null) rsSupp.close();
rsSupp = null;
if (psSupp != null) psSupp.close();
psSupp = null;
if (conn != null && !conn.isClosed()) conn.close();

}
}

if (rsSupp != null) rsSupp.close();
rsSupp = null;
if (psSupp != null) psSupp.close();
psSupp = null;
}// end try
catch(Exception ex) {
ex.printStackTrace();
Log.out.error("Exception in method loadSupplierBriefInfo() in AwardDAO : "+ ex);
throw new WebittException("LAD007","Could not get Supplier Brief Info", ex);

}
finally {
try {
if (rsSupp != null) rsSupp.close();
if (psSupp != null) psSupp.close();
if (conn != null && !conn.isClosed()) conn.close();
}
catch(Exception fex) {
Log.out.error("Exception in method loadSupplierBriefInfo() finally block in AwardDAO : "+ fex.getMessage());
}
}
15 years ago
think it helps

alert(document.FBRePre["arrSelectedAO["+i+"]"][document.FBITT["arrSelectedAO["+i+"]"].selectedIndex].value)


FBRePre is name of the form
arrSelectedAO is name of the field in form
15 years ago
It will be better to insert the values into the database once Save button is pressed. On clicking of Cancel button user will see the data fetched from database
15 years ago
Net is the best resource to get on. If you want to stick to books then have a look at Complete Reference Struts book. Try to work by taking small examples, it will really create confidence in you. Hope this helps you.
15 years ago
Time outs most often occur when the image is too big or not the correct file type.
15 years ago
You'll need to implement and configure [http://struts.apache.org/struts-core/userGuide/configuration.html#5_2_2_Message
_Resources_Configuration
] your own resource bundle
factory that takes care of the reloading (or search the net, someone's
probably already published one you can use).
15 years ago
Hi Dutta,

Check the following jar files were not in the application lib folder
commons-beanutils.jar
commons-digester.jar
15 years ago
You can try javscript validation some what like this

function checkFileExtension() {
//get the file extension in a variable
var extension = document.FBITT.ffAttachment.value;
var isValid = false;
var strExtensions="";
//alert("ext before while:"+ extension);
//substring
while(extension.indexOf('.') != -1) {
//alert("gkmkc");
//alert(extension.length);
//alert(extension.indexOf('.'));
extension = extension.substring((extension.indexOf('.')+1), extension.length);
//alert("ext :"+ extension);
//alert("ext :"+ extension);
}
//alert("ext after while:"+ extension);

//iterate and valiadte against the arraylist in the formbean
<%
//i hate to do this, but alas.. may i think of a better way given the time...
sg.gov.sco.gebiz.webitt.formbean.itts.FBITT fbFBITT = (sg.gov.sco.gebiz.webitt.formbean.itts.FBITT) request.getSession(false).getAttribute("FBITT");
for(int i=0; i<fbFBITT.getArrValidFileExtensions().size(); i++) {
%>
var validExtensionU = '<%=((String)fbFBITT.getArrValidFileExtensions().get(i)).toUpperCase()%>';
var validExtensionL = '<%=((String)fbFBITT.getArrValidFileExtensions().get(i)).toLowerCase()%>';
strExtensions = strExtensions + validExtensionL + ", ";
//make this case independent in java script
//alert(validExtension)
if(extension==validExtensionU || extension == validExtensionL) {
//set isValid to true, though redundant
isValid = true;
}
<% } %>

if(isValid==false) {
alert("Please select a file with one of the following file extension:\n"+strExtensions.substring(0, strExtensions.length-2));
}
//alert("isValid :"+isValid);
return isValid;
} //checkFileExtension-ends
15 years ago
HI,

Thanks a lot for the reply. I placed the alert before and after submitting the form, at both places I can get the value, which Submit button needs to submit.
Thanks for the response, I tried by using saveToken(req, but still am facing the same problem. So I disabled the button after clicking it once, its working for 4,5 jsp's but in once JSP, submit button value is not getting passed to actionbean. Can you please suggest me on this.
15 years ago