Jim Colwood

Greenhorn
+ Follow
since Jul 10, 2007
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 Jim Colwood

Duh! it seems simple after you explained it, but it's easy to miss it.

Thanks a lot Henry.
Thanks for your replies guys.

Yes Joe, I had my doubts about your reply. so I added couple of lines in the code to see what's going on at runtime.



Ruban, your calculation is right. but the real question i have is, even if the FIRST return statement returns the int, why is the returned value 15?

I had a question with similar logic in a Java test offered to me by a recruiter.
Thanks again.
Hi all,

any idea why this would return "Sum = 15" and not "Sum = 1"?



couldn't find a similar thread with my brief search in the forum.
Thanks.
hi all,

following example is on page 419 of KS&BB (1.5) book...



the book says there are total of eight String objects created, PRIOR to the println statement. agreed!

1. what about " " in println? can you say that " " is created & lost instantly, assuming no String object exists in the SCP?

2. also, the answer explains which of the eight objects are "lost". are the lost objects eligible for GC?

3. is SCP part of heap? if no, how does GC work on SCP?

feel free to yell at me if these q's sound stupid :lol:
Hi,

I am trying to configure DB2 database in MyEclipse 6.0, getting following error...

Error while performing database login with the IBM DB2 driver:
The application server rejected establishment of the connection. An attempt was made to access a database, *****, which was not found.
DB2ConnectionCorrelator: null


The message seems to be obvious that it couldn't find db, but I can connect to it via WinSQL. I double checked the hostname, port, dbname, userid & pw.

I am using IBM DB2 (Universal driver) template in My Eclipse. Also, pointing to the same jar for driver in MyEclipse that my WinSQL uses to connect successfully.

any clue?

Thanks for your help.
Hi All,

I am trying to add a reporting module in my existing web app. I am using Struts & IBatis frameworks in my app.

This is waht I have so far...
In my Actin class...
1. I compile .jrxml & get jasperReport object.
2. create dataSource object by passing a List in JRBeanCollectionDataSource() constructor.
3. get JasperPrint object by calling JasperFillManager.fillReport(jasperReport, parameters, dataSource)
4. create exporter object from JRHtmlExporter class & call exporter.exportReport().
5. forawrd control to the display jsp to display the report.

The problem is...
It doesn't forward to the JSP I specified in struts-config.xml. I think exportReport() method take control & process the request w/o giving control back to struts. I also tried doing all of the above on my display JSP & just forwarding request to this JSP from my action class, but of no use.

Is there an easier way of configuring Jasper Reports with struts? I would appreciate any help.
16 years ago
i tried different patterns to distinguish between my index.jsp & viewer jsp's for crystal reports. it either blocks access to all pages or doesn't block any! any suggestions? also, can anyone provide a sample configuration of crystal reports with struts framework?
16 years ago
Hi,

I am using "crystal reports" facet in RAD 7 to add a reporting module in my existing J2EE web app. I am using Struts & iBatis frameworks in my app. It seems like a nightmare to configure crystal reports with struts. Currently, my directory structure looks like this.

Web Content->crystalreportviewers(folder containing css, html, images, js folders and crystalimagehandler.jsp)
Web Content->reports->xyz.rpt
Web Content->WEB-INF->pages->reports->xyz-viewer.jsp
Web Content->WEB-INF->crystal-tags-reportviewer.tld
src->CRConfig.xml

the real trouble is, when i use struts forward to display the viewer JSP, it doesn't display report if the JSP is under WEB-INF. i can display report if i keep my JSP outside WEB-INF, under Web Content. but i don't want to expose my JSP for obvious reasons.

any help will be greatly appreciated!

Thanks.
16 years ago
hope this works. sorry for that.
16 years ago
hi,

i am trying to iterate list of lists using nested logic:iterate on my JSP. following is my code.



i am getting following error message.

Cannot create iterator for this collection

i am using Tomcat 5.5. any ideas friends?

thanks.
16 years ago