Dave Brooks

Greenhorn
+ Follow
since May 16, 2004
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 Dave Brooks

You need to set the response header and specify the Content-Disposition.

Try this to get an Excel file created from your servlet.

response.setContentType("application/vnd.ms-excel");
response.setHeader("Content-Disposition", "attachment; filename=myfile.xls");

Or for Word use:

response.setContentType("application/vnd.ms-word");
response.setHeader("Content-Disposition", "attachment; filename=myfile.doc");
I have serached high and low for a way to do this. I hope someone can help. Project dealine is here!!! I have a barcode printer that I need to send raw data to from my JSP. The file contains instructions for the printer on how to print the document. Using window.print() formats the file as text and I simply get what displays in the web browser. Security is not really an issue as the application is only going to be used over company intranet. Any help anyone could provide would be greatly appreciated. Thanks in advance.

Below is the type of data I need to send to the client printer


N
A300,100,0,3,2,2,R,"123-45467890"
A50,100,0,3,2,2,N,"PART : "
A300,200,0,3,2,2,R,"DEF"
A50,200,0,3,2,2,N,"SUB : "
A300,300,0,3,2,2,R,"9876543210"
A50,300,0,3,2,2,N,"RMA : "
B50,400,0,1,4,6,100,B,"9876543210"
P1
I have serached high and low for a way to do this. I hope someone can help. Project dealine is here!!! I have a barcode printer that I need to send raw data to from my JSP. The file contains instructions for the printer on how to print the document. Using window.print() formats the file as text and I simply get what displays in the web browser. Security is not really an issue as the application is only going to be used over company intranet. Any help anyone could provide would be greatly appreciated. Thanks in advance.

Below is the type of data I need to send to the client printer


N
A300,100,0,3,2,2,R,"123-45467890"
A50,100,0,3,2,2,N,"PART : "
A300,200,0,3,2,2,R,"DEF"
A50,200,0,3,2,2,N,"SUB : "
A300,300,0,3,2,2,R,"9876543210"
A50,300,0,3,2,2,N,"RMA : "
B50,400,0,1,4,6,100,B,"9876543210"
P1
17 years ago
JSP