Rishi Kant

Greenhorn
+ Follow
since Apr 18, 2000
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 Rishi Kant

I am trying to download a form to my local drive from my JSP page through a save button in the JSP page.I am able to save the file thru JSP(similar to File-->Save As functionality in web browser).But the footer of the downloaded form has the URL from where its downloaded.....I dont want the URL to appear on the footer...
Has anyone faced similar problem?....Is there anyway the URL can be hidden in the downloaded form ?
Please help
Thanks
22 years ago
I want to include a "Save" button (along with print and close buttons) in my JSP page...when user clicks on the "Save" button, the page gets saved in the local drive in HTML format.But my page has image file (logos)...which are not getting saved...I tried to download the image files in the same directory as the html file, but it doesnt work..I am using JSP 2, websphere
Please respond
Thanks
22 years ago
My JSP page has two parts.The top part has buttons for different forms.The bottom part has the forms.Initially I thought of using frames but thats against company standards.When I click on a button say Form# 1, then the whole page refreshes and form# 1 shows up in the bottom part and buttons on top.When I click on Print button, the form gets printed WITHOUT THE BUTTONS...Can this be done in a JSP page without frames?
Please help
Thanks
22 years ago
I want to download a form containing dynamic data from database to word 2000 using JSP...I know how to do that.But the downloaded form in word are editable, that is, a user can change the data (maybe by mistake) before saving/printing the word document.
I want to make the word document non-editable...
Using JSP, is there any way I can download a form to word and make the word document non-editable(read only) at the same time.
I am using Oracle 8i DB, JSP 2, Websphere.
Please help.
Thanks
22 years ago
Lot has been said about the advantages of using Connection Pooling in JDBC 2.0.
In our application, we have tried both options..using datasource and connection pooling and using DriverManger.getConnection().We have found that the second option ie DriverManager.getConnection() is faster and more reliable.When using datasource.getConnection() we had frequently encountered ConnectionWaitTimeout exception..also the application sometimes becomes very slow.We are using Oracle 8.x for database.Since ours is a large organization,changing the adminstrator options for the datasource,like increasing the size of connections in a pool, would be the last option to be considered.
We are using Websphere as our application server.
Also we are not using EJBs,we are using jsp and beans for database access.
Any thoughts/comments from the members of this forum would be very helpful.
Thanks

[This message has been edited by Rishi Kant (edited August 02, 2001).]
[This message has been edited by Rishi Kant (edited August 02, 2001).]
Hi,
Which is the best way to draw graphs in webpages using JSP?
Thanks
23 years ago
I used to get this error in weblogic ejb deployer tool when the compiler was not set properly...it should be set to jdk javac like c:\jdk1.2\bin\javac.exe.
23 years ago
If you are using EJB Deployer tool of weblogic then stub and skeleton is generated when you do 'generate container' in tools option.
Rishi
23 years ago
Hi
I want to download a file stored in root of the server. I don't want to open the file in the browser but user should be able to download and store it on his local file system.
Attached ia the part of the code:
ServletOutputStream out = res.getOutputStream();
res.setHeader("Content-disposition","attachment;fileName=Template.doc");
BufferedInputStream bis = null;
BufferedOutputStream bos = null;
try{
URL url = new URL("http", hostName, portNumber, fileURL);
bis = new BufferedInputStream(url.openStream());
ByteArrayOutputStream bytes = new ByteArrayOutputStream();
bos = new BufferedOutputStream(bytes);
byte[] buff = new byte[2048];
int bytesRead;
int readbytes = 0;
while ((bytesRead = bis.read(buff, 0, buff.length)) != -1){
bos.write(buff, 0, bytesRead);
}
bos.flush();
res.setContentLength(bytes.size());
bytes.writeTo(out);
out.flush();
if (bis != null)
bis.close();
if (bos != null)
bos.close();
out.close();
My problem is after the file is downloaded properly the IE globe does not stop spinning . To stop it ,I have to click stop button .
Please help.
Rishi
23 years ago
You should put those class files in weblogic/classes.If ur class file is in a package com.xxx.yyy then the file should be in weblogic/classes/com/xxx/yyy otherwise it should be in weblogic/classes.
23 years ago
You should put those class files in weblogic/classes.If ur class file is in a package com.xxx.yyy then the file should be in weblogic/classes/com/xxx/yyy otherwise it should be in weblogic/classes.
The way which I have been following is by using helper classes.
For example:
my method in the bean is
public helperObject getSomeData(param you pass){}
The helperObject would have get and set methods for the fields you are trying to retrieve.In the bean the set methods would be used to set the values of result set.The servlet would call the getSomeData() method and use the get methods to get those values.
This would work if you know the db structure and the fields you want to retrieve.
You can use the ejb deployer tool to generate the jar file which would be deployed.The jar file contains all the class files and descriptors.Its easier to use the deployer tool since it would generate the container and create the jar file for you.Also it would create the deployment descriptor.So only thing you need is class files of your bean.
If you dont use the deployer tool then you have to use DOS commands to generate the container and create the jar file.You also have to write the deployment descriptor(.xml files).The commands and the process to do it can be found in the docs that come with weblogic.
Once jar file is generated,it should be deployed in weblogic server either by editing the weblogic.properties file or by using weblogic console(hot deployment).
After it is successfully deployed you can use the methods of the bean.
I prefer using StructureBuilder for writing EJBs.This tool also comes with VisualCafe IDE which you can download for trial ,or you can download just StructureBuilder separately.It is good for creating CMP entity beans.For BMPs and Session Beans you can get a basic structure created,after that you have to anyway write the code.
If you intend to use weblogic,then its better to use VisualCafe IDE,since they have built in capabilities to deploy beans in weblogic from the IDE.
Hi,
One way of getting rid of assertion error is to start the deployer tool from the location where your class files are stored.For example,if you have a directory structure c:\development\classes\com\xxxx\reports and you have coded your package as com.xxxx.reports,then open the DOS prompt,go to c:\development\classes and type ejbdeployer.This should start the deployer tool if classpath is ok and you should not get the error.
Hope this helps!
23 years ago