mike mimmis

Ranch Hand
+ Follow
since Feb 11, 2011
mike likes ...
Java MySQL Database Netbeans IDE
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 mike mimmis

Hi,

I am having small doubt can you please look into the following code snippet.

String s1 = new String("Legend");

String s2 = s1.intern();

System.out.println(s1==s2); //>> It is printing as false

but s1.intern() method will give s1 object reference right. and by using s1==s2 we are comparing two object references but why it is coming false.

5 years ago
Hi Ranchers,

I am developing a project in which I need to generate unique random numbers between two given input numbers. I have implemented the following but not getting as expected.





It is generating unique numbers but most of them are serial numbers like 1 2 3 4 5 6 8 7 9 10 11 13 14 12...... but i need random numbers which are not serial order...


Thanks and Regards,

Mike....
6 years ago
Hi all,

Thanks for your valuable suggestions. Now I can solve this issue with your suggestions.

Thanks and Regards,
mike
6 years ago
JSP
Dear Ranchers,

I have a small doubt but I could not able to find a solution for it. Please help me regarding this issue.

Issue: in my web application there are nearly 40 JSP pages all JSP pages with same header and footer. So I have designed 2 jsp pages like

1. header.jsp

2. footer.jsp

What I have done is I have included this two pages in my all 40 JSP pages with following mechanism



It is working fine but what is my problem is whenever I want to rename the header.jsp or footer.jsp to other names I have to change the file names in all my 40 JSP pages.I want avoid changing the same file names in 40 pages. Is there any solution for this problem.

Please reply me as soon as possible.

Thanks and Regards,

mike......
6 years ago
JSP
Thanks for reply,

I have gone through your link but I did n't get anything. give me any idea to achieve this...

Thanks and regards,

mike...
Hi ranchers,

I am developing an application with servlets and jsp and database is MYSQL. I want to insert data into mysql database. The data comes from an pdf . I am able to read pdf using itext but the problem is " when I was reading the pdf whole page is reading which is not required. I need only table data which present on pdf. i.e, pdf contains one table which contains data in column and row wise. that data i have to read and insert it into mysql database." Any suggestions or alternative ways to solve this problem . Plase reply me as soon as poosible..

Thanks and regards,

mike...
Hello Ranchers,

I am developing an web application using servlets and jsp using MySql as database. In my data base in one table there are 50000 records are there . I have to generate Pdf(or excel) from all those 50000 records. I am generating other reports which are nearly 2000 records These reports are executing perfectly. when I want to generate the report which contains all 50000 it is taking long time and after an half-an-hour also it is showing in browser as "generating report". I have used Virtualizer concept also.

While the same report is generating in "jasper report" software within 2-3 minutes. and also my query excuting with in one minute of time.

How to generate that report please give me any suggestions.....

please reply me....

Thanks in advance
7 years ago
Hello Ranchers,

I am developing an web application using servlets and jsp using MySql as database. In my data base in one table there are 50000 records are there . I have to generate Pdf(or excel) from all those 50000 records. I am generating other reports which are nearly 2000 records These reports are executing perfectly. when I want to generate the report which contains all 50000 it is taking long time and after an half-an-hour also it is showing in browser as "generating report". I have used Virtualizer concept also.

While the same report is generating in "jasper report" software within 2-3 minutes. and also my query excuting with in one minute of time.

How to generate that report please give me any suggestions.....

Paul Clapham wrote:My guess: the "image path" is the file path on the server. This of course is useless on any computer except the server; but if your browser is running on the same machine as the server, a link using the file path might actually work in some browsers.



Thanks for reply,

Your guess is absolutely correct. In my local system only i was checking if images are displaying correct or not . but it is working only in Internet Explorer but not in other browsers what is the reason for this? and how we avoid that.

Actually I have to upload 18000 images into my sql database if I store all images to Mysql database as Blob type the performance is reduced and It will slow down if we upload other images if required.To avoid this problem I am storing all images into folder and their path's into mysql database table. If there is any alternative way to deal with this problem please reply me as soon as possible...

Thanks in advance
7 years ago
JSP

Bear Bibeault wrote:Then I'm really confused. If the image is in the DB, then why does your code use a file path to show it?



Sir,

Actually I am storing images in my local drive (that is creating new directory as new File("/root/example").mkdir(); ) and storing images to this newly created folder and storing relative path in data base. So when i want to show images to users by getting their id's I have to fetch path from my database and show related images to user.
7 years ago
JSP

Bear Bibeault wrote:Using a file path will not work anywhere else but on your computer. Is that what you want?



Sir I am storing image path in mysql database table with an id. To display that image using my jsp it is not working sir(that is working in internet explorer but not in other browsers) what I have to do..

Thanks in advance
7 years ago
JSP

olivier dutranoit wrote:
you only need to do this if you actually send an image on byte level...but this is not the case in here...

maybe this could be the problem?



Thanks for reply,

I have removed that element response.setContentType(); Still the problem is there how to avoid that reply me....

Thanks in advance..
7 years ago
JSP
My Servlet code is:

7 years ago
JSP
ok I have changed the path to

"C:\NetbeanProjects\Image\build\web\image1.jpg" this is correct path. Still the problem comes It is not working in chrome/mozilla browsers...
7 years ago
JSP

olivier dutranoit wrote:Actually, this has nothing to do with servlet or jsp...
but pure HTML...and very strange that it works in only in IE...


what is the final html code of your image tag?

Check the path where you are (the url), the path in your src attribute, and check if it is actually right what you are doing...




Thanks for reply,

when i viewed the source of generated html (src) it is displaying correct path.

that is if my image in C:\netbeansprojects/build/web/image1.jpeg the path displaying correct as it is when i copy that address and pasted in my computer it is displaying image .

It is working fine in Internet Explorer but not in other browsers...

Thanks in advance..
7 years ago
JSP