Win a copy of Murach's MySQL this week in the JDBC and Relational Databases forum!

Rahi Sanj

Greenhorn
+ Follow
since Feb 13, 2003
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 Rahi Sanj

No. The results are not many. Not more than 25 records.
Hello,
I am using oracle 10g and using Weblogic's 10g jdbc driver.
I am struck with a wierd problem while retrieving results from a ResultSet object returned from a stored proc.
The program gets struck at the point where I do..

while (resultSet.next())
{..

It takes about 600-900 sec. to go to the first record. After that, when it tries to execute again to retrieve next records, its fast and runs normally. It is having an issue in moving the cursor to the first record for some reason. The proc. itself executes faster and gets the results back. But takes a lot of time when trying to get records.
I have other stored procs. too which return refcursor as resultset objects in exactly similar fashion and I am not having any issue with them.
So, I am not sure if the ResultSet.next() is causing the problem or there is an issue with the cursor or data itself. Does any one had this kind of problem or tell me what might be the issue. Any help is very much appreciated. Thank you.
Hello,
""Does your browser have an application registred (acrobat) to handle viewing PDFs?""
--- I have pdf reader 7.0 installed in my machine. I didnt understand what you meant by application registered (acrobat).
When I save the file, I can open it and view properly. But, its not opening inline or streaming in the browser.
dont know why?

Thank You.
Rahi S.
18 years ago
Thank You for the reply.
Yes, I can now see the filename when I try to save it.

But, actually I wanted to inline or stream the file so that it is displayed in the browser. I changed the content-disposition to inline as,

response.setHeader("Content-Disposition", "inline; filename=testName.pdf");

But still I get the File Download option of saving or opening the file. On the File Download window, I see the "File Name: testName.pdf"(which is correct) but, the "File Type: "is empty. I am setting the contentType as "application/pdf" and also the content length. I doubt that this might be reason why the file is not opened inline or inside browser but not sure.
I dont know what I'm missing. Is there a way that the content type can be checked if it is set correctly. How to open the file inline or inside the browser.

Thank You.
Rahi S.
18 years ago
Hello,
I am trying to read a pdf file from database. I want the pdf file to be opened streaming in the sense the file should open automatically.

I am getting the bytes properly. I am seeting the response content type, content length properly. I am including part of my code below.
... response.setContentType("application/pdf");
response.setContentLength(pdfBytes.length);
ServletOutputstream out = response.getOutputStream();
out.write(pdfBytes);
out.flush(); ....

When I try to write the bytes using ServletOutputstream I get the window's window option of saving or opening the file. When I select open option, I get message saying "there is an error reading the file.
First I have to save the file to system then open using pdf editor. Then file opens fine. While trying to save file, the default file extension is '.do'. I have to manually save as .pdf file. Is it because I am trying to response out from action?

But, if I read the pdf file from file system rather than from database, the pdf file is read streaming and the file is opened directly and properly.

I dont know what is the problem. Any valuable suggestions please?
Thank You.

Rahi S.
18 years ago
Hello,
I am trying to read a pdf file from database. I want the pdf file to be opened streaming in the sense the file should open automatically.

I am getting the bytes properly. I am seeting the response content type, content length properly. I am including part of my code below.
... response.setContentType("application/pdf");
response.setContentLength(pdfBytes.length);
ServletOutputstream out = response.getOutputStream();
out.write(pdfBytes);
out.flush(); ....

When I try to write the bytes using ServletOutputstream I get the window's window option of saving or opening the file. When I select open option, I get message saying "there is an error reading the file.
First I have to save the file to system then open using pdf editor. Then file opens fine. While trying to save file, the default file extension is '.do'. I have to manually save as .pdf file. Is it because I am trying to response out from action?

But, if I read the pdf file from file system rather than from database, the pdf file is read streaming and the file is opened directly and properly.

I dont know what is the problem. Any valuable suggestions please?
Thank You.

Rahi S.
18 years ago
Hi,
You are getting a NullPointerException in EMPLOYEE.java at line 367. You are trying to invoke something on an object which is Null.
I dont think it is to do with accessing the database.
Make sure that you have NullPointerCheck on that particular object where it is throwing that exception.
18 years ago
JSP
Hello,
Not quite sure about what you meant by whose implementation.
I have defined the below declaration in my jsp.
<%@ taglib uri="http://java.sun.com/jstl/fmt"prefix="fmt" %>

I dont know if WebSphere has its own implementation. If so, how to find out which implementation it is using?

You are right. "???xyz???" is displayed if key xyz is not found. But, in my case, I have defined the key in my properties file. Not seeing the value happens only once per session and only few times. If I start a new session again, I see the value.

I'm not quite sure if this is to do with fmt:message tag or with app server not loading properly. But, in either case, I should not be seeing the value at any point of time which is not the scenario.

Thanks for the suggestions.
18 years ago
JSP
Hello,
I am experiencing a wierd problem. I'm using fmt:message tag to display locale specific properties. In a particluar instance when I'm running my application, I dont see values displayed for a property but instead I see "???APPTY_1???". Sometimes it stays like that for that particular session and next time when I login again, I see the value perfectly fine. Any ideas why it is like that?
Usually we see "???.." whenever fmt tag doesnt find value for that particular key. But I have key listed.

I'm also using struts bean:message tag in some places and I dont see such things.
Is there any known issue with fmt:message tag?
I'm using Websphere as app server.

Thank You.
18 years ago
JSP
Hello,
Can I use bean:message or any other struts tag inside my jstl c tag?

I am trying to use it like this,

<c:if test="${thisError eq '<bean:message key="error.del"/>'}">
// other display tags
</c:if>

but getting parse exception. Is it because I'm using struts tag inside jstl or syntax is wrong?

I know I cant struts tag inside another struts tag. Is it the same case with JSTL too.

also, can I use another jstl tag inside jstl tag.

Thank You.

regards,
rahi
18 years ago
JSP
Hi all,
I am a beginner on Struts framework.I have some struts questions. I would be thankful if any one could send the answers.
1. Name the 4 attributes of action tags in Struts config.XML
2. Where is server side form validation implemented in Struts?
3. How do you display a value from application resource properties to a web page using STRUTS
4. What interface allows you to save a cookie from application class?
It would be more helpful if any one could tell me what are the possible interview questions on Struts.
Thanks.
20 years ago