Naveen Kumar

Greenhorn
+ Follow
since Mar 12, 2008
Merit badge: grant badges
For More
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 Naveen Kumar

Hi ,
I have to write an java application which has to recognize when the system shutdowns abturbly or when the battery in the laptop is getting down. is there is any possibility to recognize ??
please reply
Regards,
Naveen
14 years ago
hi ,
I have an little knowledge on jni calls. i am not clear how to proceed with this issue.
The issue is we have an java code which calls the com4j code. (it works in tomcat and websphere in windows xp .but it is not working in the server (windows 2003).
the code is



package com.intelliview.pdflib.core;

import org.apache.log4j.Logger;

import com.intelliview.com4j.ivdb.ClassFactory;
import com.intelliview.com4j.ivdb.IIViewX;
import com.intelliview.commonlibs.api.IPdfViewer;
import com.intelliview.dal.dao.ResourcesBundleHandler;

public class ReportExporter implements IPdfViewer {
static Logger logger = Logger.getLogger("ReportExporter");
private static IIViewX ivdb = null;
private static boolean exportSupport = false;

private static final ReportExporter pdfExporter = new ReportExporter();

private ReportExporter() {
try {
boolean testPDFSupport = true;
try {
String pdfSupport = ResourcesBundleHandler.getResourceBundle().getString("PDF_SUPPORT");
testPDFSupport = Boolean.parseBoolean(pdfSupport);
}catch(Exception ex1) {}
if(testPDFSupport && System.getProperty("os.name").toUpperCase().startsWith("WIN") ) {
ivdb = ClassFactory.createIViewX();
System.out.println("IVDB is "+ivdb);
exportSupport = true;
}

}catch (Exception e) {
System.out.println("Error while loading IntelliVIEW Analyzer ocx for com4j");
logger.error("Error while loading IntelliVIEW Analyzer ocx for com4j",e);
}
}

public static boolean isReportExportable() {
return exportSupport;
}

public static ReportExporter getPdfExporter() {
return pdfExporter;
}

public void exportReport(int type, String ivwrFilePath, String outputFilePath) {
System.out.println("ivwr file path "+ivwrFilePath);
System.out.println("outputFilePath "+outputFilePath);
System.out.println("Type is "+type);
if(exportSupport) {
ivdb.exportReport(type,ivwrFilePath,outputFilePath);
System.out.println("Export done");
}else {
System.out.println("Unable to export report using Analyzer ocx");
}
}

public static void main(String[] args) {
ReportExporter rp = ReportExporter.getPdfExporter();
rp.exportReport(1,"C:\\Program Files\\IntelliVIEW Reporter 4.1.1 (Java)\\generated_files\\companyid_1\\temp_1244466448703.ivwr","e:\\pdf1.pdf");
/* rp.exportReport(2,"E:\\Program Files\\IntelliVIEW Reporter 4.1.1 (Java)\\generated_files\\companyid_1\\temp_1244206070619.ivwr","e:\\pdf2.xls");
rp.exportReport(3,"E:\\Program Files\\IntelliVIEW Reporter 4.1.1 (Java)\\generated_files\\companyid_1\\temp_1244206070619.ivwr","e:\\pdf3.xls");
rp.exportReport(4,"E:\\Program Files\\IntelliVIEW Reporter 4.1.1 (Java)\\generated_files\\companyid_1\\temp_1244206070619.ivwr","e:\\pdf4.xls");
rp.exportReport(5,"E:\\Program Files\\IntelliVIEW Reporter 4.1.1 (Java)\\generated_files\\companyid_1\\temp_1244206070619.ivwr","e:\\pdf5.xls");
rp.exportReport(6,"E:\\Program Files\\IntelliVIEW Reporter 4.1.1 (Java)\\generated_files\\companyid_1\\temp_1244206070619.ivwr","e:\\pdf6.xls");
*/
}
}






package com.intelliview.com4j.ivdb ;

import com4j.*;

/**
* Defines methods to create COM objects
*/
public abstract class ClassFactory {
private ClassFactory() {} // instanciation is not allowed


/**
* IViewX Control
*/
public static com.intelliview.com4j.ivdb.IIViewX createIViewX() {
return COM4J.createInstance( com.intelliview.com4j.ivdb.IIViewX.class, "{D6645B31-AC56-4E9B-85CB-12939C7367B9}" );
}
}



the problem is while calling the exportReport()- method in the websphere server in the server machine(windows 2003) it gets hanged. no error message is been displayed. but it works fine in other machine.

please could any one has any suggessions how to proceed..
is any thing to be configured to make the method call work in websphere..

thanks
Regards,
Naveen

15 years ago
hi Cameron McKenzie,
nice to meet you through this forum.
is there is anyway to purchase this book through online in indian rupees.
please reply.
thanks
naveen
can Cameron McKenzie reply whether he has released his book in india.
hi ,
can anyone please reply is the book
hibernate made easy
-cameron white
indian edition released.
did that book is available in india??
please replly...
hi ,
is hibernate made easy is available in india .
regards,
naveen
hi ,
can anyone help how to use median function in oracle to be used in hibernate
.how to use median function in hibernate .
we are using oracle as a database using hibernate .
Hi ,
can anyone please tell me what is the use of struts-logic in struts.
Regards ,
Naveen
15 years ago
hi ,
can anyone help me to know session facade design pattern .
and is purpose .
hi ,
can anyone help me to know the difference between dom and sax parser .
also please explain when to go for dom and sax parser.
if you have any good example .
please do the need full
naveen
hi ,
I need a good material on servlet and jsp api or url.
can anyone please refer me.
hi
I have read HFSJ book where the purpose of flush is stated as


Once the flush method is invoked ,the response object is commited.
commited means the response is sent to the client.

but below in this url flushurl

Mark peabody has given a sample coding .where the flush method is used more then once and the sample coding is working fine.

my doubt is

1., If a flush method is used ,is the response is commited or not?
2., If the response is commited means ,then how can we use flush or print message once again ??

please clarify me.
hi ,
can anyone tell me what is portal site??
and state the advantages or uses of using websphere for designing portal sites???
16 years ago
consider this sample coding given by Marc Peabody .

<%
out.write("This will print!<br/>");
out.flush();
out.write("This will also print!<br/>");
out.flush();
out.write("This will get sent to the client too!<br/>");
%>

by default jsp pages are buffered.that means the stuff written to the JspWriter (out) object does not immediately or directly goes to the client through the response.

the character are stored in the buffer and once we flush it everything in the buffer goes to the client through the response object.

but in the above coding. the flush is been used many times.
my doubt is on each time we are invoking the flush method on out object means each time it gets the datas stored in the buffer is sent to the client through the response object??
for example :
flush is used 2 times in the above code.
then response object will be invoked twice??
Hi ,
I have a doubt regarding flush attribute .
In <jsp:include page="relativeurl" flush="true" /> what is the purpose of flush attribute here.can we use it in forward tag also??.
can anyone help me.