Sherryl Philip

Greenhorn
+ Follow
since Jul 02, 2004
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 Sherryl Philip

Hi,
I need to know which is a better Reporting tool when intergration with my J2EE project.
I've got to know of Crystal reports. I've got Business Objects Crystal Report XI and also Seagate Crystal Report 8.

Now, I'm in dilemma - on which one to choose. If i'm to choose , on what basis should I choose.

Please Help Me

Thanks

Regards
Sherryl
Hi,
My applocation server is JBoss.
How does the code go and see that it has to read the datasource from oracle-ds.xml file in the client? I've given tried as what you have adviced me to do. And it does work out.

This is the code of the method of ServiceLocator class:


And finally I call the method in the client like this :


When the client tries to call the method - I get the folllowing error


javax.naming.NameNotFoundException: OracleDS not bound
at servicelocator.ServiceLocator.getDataSource(ServiceLocator.java:249)
at servicelocator.ServiceLocatorTester.main(ServiceLocatorTester.java:38)


Looking forward for the solution.

thanks & rgds,
Sherryl
[ January 31, 2005: Message edited by: Sherryl Philip ]
Hi,

Could please tell me the "MyDataSource" mapping should be specified in which configuration file. Is the struts-congif.xml file , as i use the Struts framework?
Or is it the oracle-ds.xml file, as I use Oracle as my database?

Thanks again.

regards,
Sherryl
Hi,
I'm completely to the Service Locator Pattern. I'm aware of the need.
Now, I need to know what is the String to be passed to call the method getDataSource(String datasourceName) of the Service Locator class.

Please do help me.

Thanks.

Regards,
Sherryl
Hi,
I've just started working on sample JSF applilcations. As we are planning to go for JSF in our next project. I've tried out the sample applications.

Now, my concern is how to work out EJB in JSF. can anybody provide a sample application or code where you have used EJB within the JSF framework.

I hope I'll get a reply soon. Thanks for the concern.

Regards,
19 years ago
JSF
Hi,
See I'm working on JFreeCHart - for generating charts and graphs for my application. I've worked on sample charts where the data is set to the chart by hard coding the values. Now, what I'd like to know is how to give data from the database to the chart that I need to develop.

I already have Jasper Reports and the GUI tool iReport.I've generated a sample report with Jasper Reports. I'm stuck up here .
Can anybody please give me a sample code to work with my database to generate the Charts using the JFreeChart?

Please help me out!!
I need help urgently....

Thanks in advance....

Regards,
Sherryl
19 years ago
Hi,
I have the following JSP page where I'm trying to view a report which is generated using the iReport tool. But when I try to generate the Report, the Report turns up with the template and it also fetches the number of records, but the records are not seen on the Report. Anybody knows why is this so??
Can anybody help me out?
I'm stuck up here!!!

the Following is the code written for it :

<%@ page errorPage="error.jsp" import="net.sf.jasperreports.engine.*,net.sf.jasperreports.engine.util.*,net.sf.jasperreports.engine.export.*,
java.util.Map,java.util.HashMap,java.sql.*,java.io.File,java.io.PrintWriter,oracle.jdbc.driver.OracleDriver"%>


<%
Connection conn = null;
String driver = "oracle.jdbc.driver.OracleDriver";
String hostName = "....";
String user = "abcde";
String password = "abcde";


File reportFile = new File(application.getRealPath("/reports/report.jasper"));

JasperReport jasperReport = (JasperReport)JRLoader.loadObject(reportFile.getPath());

Map parameters = new HashMap();
parameters.put("ReportTitle", "Address Report");
parameters.put("BaseDir", reportFile.getParentFile());


try{
Class.forName(driver);
conn = DriverManager.getConnection(hostName, user, password);

JasperPrint jasperPrint =JasperFillManager.fillReport(jasperReport,parameters,conn);

/*JasperPrint jasperPrint =
JasperFillManager.fillReport(
jasperReport,
parameters,
dataSource);*/

JRHtmlExporter exporter = new JRHtmlExporter();

StringBuffer sbuffer = new StringBuffer();
Map imagesMap = new HashMap();
session.setAttribute("IMAGES_MAP", imagesMap);
System.out.println("before exporter ");
exporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint);
System.out.println("JASPER_PRINT ");
exporter.setParameter(JRExporterParameter.OUTPUT_WRITER, out);
System.out.println("OUTPUT_WRITER ");
exporter.setParameter(JRHtmlExporterParameter.IMAGES_MAP, imagesMap);
exporter.setParameter(JRHtmlExporterParameter.IMAGES_URI, "image.jsp?image=");
exporter.exportReport();
}catch(Exception e){
System.out.println(e.getMessage());
}

%>


Please do tell me where I'm wrong

thanks inadvance

Sherryl
Paul,
I've put MyResourcebundle.properties in the src folder for it to locate the properties file. why does it take time to even find the properties file???/

thanks
19 years ago
Hi,
I need to know how to read some values of certain keys from the properties file. this is possible when i tried to do in the Tomcat server but this was not possible when i tried out with the Jboss server. Why is this so??

please do help me out.


public class SampleResource {
public SampleResource() {}
public String callResourcebundle() {
ResourceBundle bundle = ResourceBundle.getBundle("MyResourceBundle");
String emailAdd = bundle.getString("emailAdd");
return emailAdd;
}
}

And then I tried to get it from another class..

SampleResource sample = new SampleResource();
String adminEmail = sample.callResourcebundle();


The same code is being put in the both the servers, but it doesnt work on Jboss server where Tomcat is bundled with it. Why should this kind of problem arise, even when the code is the same?

Please do help me out. Thanks in advance...
19 years ago
Hi,
I'm trying to implement Jasper Reports in my application. I'm planning to generate reports with iReport0.4.0.
Could anyone tell me how to go about this? I've downloaded iReport0.4.0 and have tried to generate a sample report. But what to do and that too how is the question....
any sample code? from where do i get it? I also wanna know how to integrate it with my application.

Please help me out.. Waiting for an answer very soon.

Thanks in advance.

Sherryl
Hi,


Created a SessionListener, that gets notified when ever a session gets ceated or destroyed.
When ever the user login in the Application, the session id is stored in the DB for that user .
1. When the user log's out Session is cleared (invalidated ) so the sessionListener gets notified So i'm Clearing the SessionId that is stored in the DB for that user.




Well, thanks for the solution. Actually, I have been trying to do the same thing, without the SessionListener. But now my concern, is to restrict the same user login same time without logging out the first one, in which case I want to invalidate the user's previous login session, make it available in the second login. That is restrict the user's multiple login.

The best you can do is keep a list of logged in users somewhere and clear the userids from this list when their sessions are closed (they log out) or time out (they're killed).



I'm already storing some values in the session, so storing the sessionId will again cause performance issues, when so many sessions are maintained in the server.

Thanks for the help.
19 years ago
JSP
Hi,
I have a scenario where i want to restrict the login second time by the same user. In this case, i want to invalidate the previous session. But using the getSession(sessionId) method of the HttpSessionContext, I get a null value. This is because the API is deprecated.

So, nothing can be done using the HttpSessionContext. I have already stored the sessionId of the previous session in the database. My problem now is that i need to get the previous session which has its sessionId stored in the database, so as to invalidate that session.

I hope my problem is clear to you guys out there. Is there any way out for this issue? Could anybody tell me what to do? What could be the solution for this problem?

Thanks.
[ October 06, 2004: Message edited by: Sherryl Philip ]
19 years ago
JSP
Hi,
Firstly, I'd like to know whether you are using the Struts Framework. Well, in my application - I use the Struts framework, so I had the Action class and ActionForm class.

See, if you need to upload an excel file into the database, you can read the excel file using the Jakarta POI package. But before you start reading the file, you need to decide upon the structure of the Excel file. It should have the same number of columns.

For reading the Excel file,

InputStream stream = file.getInputStream();
POIFSFileSystem fs = new POIFSFileSystem((stream));
HSSFWorkbook wb = new HSSFWorkbook(fs);

for (int k = 0; k < wb.getNumberOfSheets(); k++) {
HSSFSheet sheet = wb.getSheetAt(k);
int rows = sheet.getPhysicalNumberOfRows();

int r = sheet.getFirstRowNum();

HSSFRow row = sheet.getRow(r);
int cells = row.getPhysicalNumberOfCells();

for (int c = 0; c < cells; c++) {
HSSFCell cell = row.getCell((short) c);
/* what ever operation is required ..... */
}}


Hope this will help you to get started!!
All the Best!

Have a good day!










19 years ago
JSP
Hi,
I would like to know how to go about testing the DispatchAction, DynaAction class. When a DynaValidatorForm is used - how to go about doing theStruts testing using MockStrutsTestCase .
I work in Eclipse IDE with tomcat 5.1 as the server. Please help me out with this problem. I'm looking forwardly eagerly for the solution.

Thanks in advance.

Regards
Sherryl
19 years ago
Hi everybody,
I'm planning to use quartz scheduler in my application. I checked up the site www.quartzscheduler.org , and i understood the concept.

But the question is how to start working on it, in my application.


I work on Eclipse IDE. Has anybody worked on the Quartz Scheduler.
I'd be very happy if somebody could help me.

Thanks in advance
19 years ago