OSB cluster --reading a writing into a file
Dear All,
I have a requirement in which my first OSB service s writing into a file(In a clustered environment).So in this case some of the files are being written in managed_server1 while some of the files are getting written in managed_server2.
My second OSB service has to poll those files.Now as we know while polling,we have to define one target server(managed server).So this service will only be able to poll from one managed server.Is there any way it can poll from both the managed servers?
Hello Deepthi,
Can you please explian what is meant by shared storage as i am not aware of that.From shared storage, I meant common mounted/mapped file system.
We have 2 managed servers on two different physical machines and we are using clustered environment.In this case you have two option -
1. Use unique endpoint & mask combo for both the proxies and make sure that all the servers in the cluster have access to the staging directory of the polling manged server (by mounting/mapping the file system appropriately).
2. Create a shared storage by mounting/mapping the file system for business services to put file and have a single proxy to poll that shared storage. Again all managed server need to have access to the staging directory of the polling manged server.
You may like to refer metalink note ID 965135.1
To understand how to achieve HA in this case, please refer -
OSB10gR3:High-availbility of file protocol based proxy service
Regards,
Anuj
Similar Messages
-
I have a small LabVIEW program which writes random numbers very fast into a ASCII-file. I want that file to be copied to a new position every 10 min. Therefor I use a backup/synchronisation software which is doing a copy operation every 10 min. It works fine a certian amount of time and after a while I get either an LabVIEW error (LabVIEW: Fiel already open: NI-488 Comand requieres GPIB Controller to be System controller) or an backup-software error (couldn´t open file...whatever). I´m guessing, it has something to do with file-access but I don´t know why?!? If I run the LabVIEW program and I copy and paste the random-number-file with the windows explorer very fast (pressing ctrl+v rapidly) while LabVIEW is still writing into this file, no error appears. Can sombody help me?
LabVIEW 2011Hi Serdj,
you don't get a GPIB error, the error number has just 2 different explanations...
Well, you have two programs accessing the same file. One program just wants to make a copy, the other (LabView) is trying to write to the file. When copying a file that is written to you get inconsistent results! That's why one of both programs is complaining an error...
You can't have write and read access at the same time! (But you can have more than one read access at the same time...)
Best regards,
GerdW
CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
Kudos are welcome -
ORA-48913: Writing into trace file failed
Hi
my OS: OUL5x64
DB: 11.1.0.7
receive this error in alert.log but could not figure out which parameter to increase.
Can someone please help.
Non critical error ORA-48913 caught while writing to trace file
Error message: ORA-48913: Writing into trace file failed, file size limit [10485760] reached
the suggestion:
ORA-48913: Writing into trace file failed
*Cause:An attempt was made to write into a trace file that exceeds the trace's file size limit
*Action:increase the trace's file size limit.
Thanks in advance.Hi ,
I have one more doubt :
ORACLE_SID=XXXX
/XXXX/XX/ofaroot/XXXX/diag/rdbms/xxxx/XXXXX/trace
Non critical error ORA-48913 caught while writing to file "trace /XXXX/XX/ofaroot/XXXX/diag/rdbms/xxxx/XXXXX/trace/XXXX_ora_8218.trc"
Error message: ORA-48913: Writing into trace file failed, file size limit [10485760]everywhere its written to increase the parameter max_dump_file_size or to relocate the alert log, but as far as i understand ,
is this because a trace file with the name XXXX_ora_8218.trc was getting generated with a greater size than the one defined in max_dump_file_size. Is this what happened ?
Also , I am not able to find what directory does this parameter points to ? is it the trace directory or diag directory ?
i checked select * from v$diag_info ,but i could not find any conclusion.
Probably , on getting the above info , i will be able to decide where to move the alert.log to create space. -
Code for JProgressbar for monitoring while writing into a files
Could anybody help me in sample code to implement a JProgressbar while writing into a file.
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import java.lang.reflect.*; // for InvocationTargetException
public class Test extends JApplet {
private JProgressBar pb = new JProgressBar();
public void init() {
Container contentPane = getContentPane();
final JButton startButton = new JButton("start");
contentPane.setLayout(new FlowLayout());
contentPane.add(startButton);
contentPane.add(pb);
startButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
GetInfoThread t = new GetInfoThread(Test.this);
t.start();
// this is okay because actionPerformed
// is called on the event dispatch thread
startButton.setEnabled(false);
public JProgressBar getProgressBar() {
return pb;
class GetInfoThread extends Thread {
Runnable getValue, setValue;
int value, currentValue;
public GetInfoThread(final Test applet) {
getValue = new Runnable() {
public void run() {
JProgressBar pb = applet.getProgressBar();
currentValue = pb.getValue();
setValue = new Runnable() {
public void run() {
JProgressBar pb = applet.getProgressBar();
pb.setValue(value);
public void run() {
while(true) {
try {
Thread.currentThread().sleep(500);
// This is okay because the getValue's run()
// is invoked on the event dispatch thread
value = (int)(Math.random() * 100);
try {
SwingUtilities.invokeAndWait(getValue);
catch(InvocationTargetException ite) {
ite.printStackTrace();
catch(InterruptedException ie) {
ie.printStackTrace();
if(currentValue != value) {
SwingUtilities.invokeLater(setValue);
catch(InterruptedException e) {
e.printStackTrace();
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import java.lang.reflect.*; // for InvocationTargetException
public class Test extends JApplet {
private JProgressBar pb = new JProgressBar();
public void init() {
Container contentPane = getContentPane();
final JButton startButton = new JButton("start");
contentPane.setLayout(new FlowLayout());
contentPane.add(startButton);
contentPane.add(pb);
startButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
GetInfoThread t = new GetInfoThread(Test.this);
t.start();
// this is okay because actionPerformed
// is called on the event dispatch thread
startButton.setEnabled(false);
public JProgressBar getProgressBar() {
return pb;
class GetInfoThread extends Thread {
Runnable getValue, setValue;
int value, currentValue;
public GetInfoThread(final Test applet) {
getValue = new Runnable() {
public void run() {
JProgressBar pb = applet.getProgressBar();
currentValue = pb.getValue();
setValue = new Runnable() {
public void run() {
JProgressBar pb = applet.getProgressBar();
pb.setValue(value);
public void run() {
while(true) {
try {
Thread.currentThread().sleep(500);
// This is okay because the getValue's run()
// is invoked on the event dispatch thread
value = (int)(Math.random() * 100);
try {
SwingUtilities.invokeAndWait(getValue);
catch(InvocationTargetException ite) {
ite.printStackTrace();
catch(InterruptedException ie) {
ie.printStackTrace();
if(currentValue != value) {
SwingUtilities.invokeLater(setValue);
catch(InterruptedException e) {
e.printStackTrace(); -
Writing into Excel file using PL/SQL and formatting the excel file
Hi,
I am writing into a excel file using PL/SQL and I want to make the first line bold on the excel. Also let me know if there are any other formatting options when writing into excel.
Regards,
-AnandI am writing into a excel file using PL/SQL
Re: CSV into Oracle and Oracle into CSV
check that thread or search in this forum... -
Reading and writing from a file
I am trying to read and write to a file so that I may store an array of string and a double in my application, but I have come upon a couple of problems; first when I put my file path into the path constant it will say that the file is not there ever though it is (so I have to force the issue and when the application asks for a file I have to browse and add the files), secondly when I run the program and it reads from the file it does not display the strings or doubles immediately instead I have to hit the submit button and than they finally come up, thirdly when I reset my values in the .txt files and put in my string and double and hit submit the array jumps one spot and starts at the index of 1 (array[1]) if anyone can help I would appreciate it a lot.
here is my code:
Harold Timmis
[email protected]
Orlando,Fl
*Kudos always welcome
Solved!
Go to Solution.
Attachments:
testingfileIO.vi 30 KB
double.txt 1 KB
string.txt 1 KBHarold Timmis wrote:
I am trying to read and write to a file so that I may store an array of string and a double in my application, but I have come upon a couple of problems; first when I put my file path into the path constant it will say that the file is not there ever though it is (so I have to force the issue and when the application asks for a file I have to browse and add the files),
I don't see that behavior at all about forcing the issue. Why are you using Not a Path constants? Why not turn those constants into controls you put on your front panel?
secondly when I run the program and it reads from the file it does not display the strings or doubles immediately instead I have to hit the submit button and than they finally come up,
Put your array indicators before your event structure rather than after. Think dataflow. The code pauses at the event structure waiting for an even to fire. Only when it does (such as hitting the submit button) does the data get written to the array indicators.
thirdly when I reset my values in the .txt files and put in my string and double and hit submit the array jumps one spot and starts at the index of 1 (array[1]) if anyone can help I would appreciate it a lot.
I don't see this behavior either. How come your double.txt file has names in it, and your string.txt file has doubles in it? -
Problems reading xmp data into dng files
Hi there,
I am working on a Mac and have exported files as lossy dng for colour correction externally. They have done the work for LR 5 process (I am using CC) and returned xml files. I cannot seem to read this data into the dng files for further editing in Lightroom. I have tried re-importing them and I have tried reading metadata from file. Any help would be appreciated as I usually simply read the xmp to the original RAW but the RAW files are currently on an external drive in another country!!!
Thanks,
AndyMoominman wrote:
I am basically trying to export xmp files from a set of low resolution dng files so that I can access my Lightroom edits in the RAW files. I have separated the RAW and dng files in different folders
Hi Andy,
I dunno how best to get extracted xmp files into the raw folders, but if you are comfortable with exiftool, you can use it to extract xmp sidecars from DNG files.
If you want a turn-key solution which does not required you to futz with exiftool, then consider a free plugin I wrote:
robcole.com - xEmP
It will allow you to create xmp sidecars with all your DNG adjustments and metadata (which can then be applied to the non-dng raw files).
However, if you won't need the DNGs in your catalog afterward, then the easiest way is to convert them back to proprietary raw format using this plugin (also free, and I wrote it):
robcole.com - UnDNG
Conceptually, you can think of it as converting the DNGs to proprietary raw format, but note: it doesn't convert anything, it just allows existing raw files that are NOT in the catalog, to replace the DNGs that are in the catalog. All adjustments and metadata and everything else will be preserved (just like when you convert a proprietary raw to DNG format).
Rob -
Reading and Writing large Excel file using JExcel API
hi,
I am using JExcelAPI for reading and writing excel file. My problem is when I read file with 10000 records and 95 columns (file size about 14MB), I got out of memory error and application is crashed. Can anyone tell me is there any way that I can read large file using JExcelAPI throug streams or in any other way. Jakarta POI is also showing this behaviour.
Thanks and advanceSorry when out of memory error is occurred no stack trace is printed as application is crashed. But I will quote some lines taken from JProfiler where this problem is occurred:
reader = new FileInputStream(new File(filePath));
workbook = Workbook.getWorkbook(reader);
*sheeet = workbook.getSheet(0);* // here out of memory error is occured
JProfiler tree:
jxl.Workbook.getWorkBook
jxl.read.biff.File
jxl.read.biff.CompoundFile.getStream
jxl.read.biff.CompoundFile.getBigBlockStream Thanks -
Labview to read and white into .csv file only
I have a security question.
Is it possible for labview to read/write into a .CSV file only and make it not applicable to the user?
for instant, labview writes to file OUTPUT.CSV,
my current system, on windows xp, i can go to output.csv and use notepad/excel to read/write and save output.csv data.
i want to make it not accessible to write or modify output.csv (ONLY POSSIBLE IF DONE USING LABVIEW PROGRAM).
how would i do something like that?
thanks in advance.
Best regards,
KrispiekreamI am not sure if you can do that. What makes this file so important? What does it do?
Depending on the reason you want to do this there might be a different/better soloution. Maybe save the file as binary and if it was opened it would not be easy to read. Or save the file in a location that has nothing to do with LabVIEW?
Under File I/O >> Advanced, There is a VI called Access Rights that you might be able to use. -
Hi,
I want to create a XML file (dynamically) and writes data
into that xml file(data coming from web service).
Thanks in advance.i want to write the data(coming from web service) into XML
file and keep that XML file in Cache,then read that XML file
contents and post into UI Control(Datagrid).
<b>Sample Output Data from my Webservice:</b>
<CoreProgramming>
<BasicProgramming>
<ProductId>10049</ProductId>
<ProgrammingName>America'sTop60</ProgrammingName>
<Price>29.99</Price>
<IncludesLocals>false</IncludesLocals>
<IncludesRSN>false</IncludesRSN>
<Listing>
<CategoryName>WOMEN'SPROG</CategoryName>
<Station>
<StationCallLetters>TLC</StationCallLetters>
<Hdflag>false</Hdflag>
</Station>
<Station>
</Listing>
</BasicProgramming>
<BasicProgramming>
<ProductId>10041</ProductId>
<ProgrammingName>America'sTop120</ProgrammingName>
<Price>39.99</Price>
<IncludesLocals>false</IncludesLocals>
<IncludesRSN>true</IncludesRSN>
<Listing>
<CategoryName>WOMEN'SPROG</CategoryName>
<Station>
<StationCallLetters>TLC</StationCallLetters>
<Hdflag>false</Hdflag>
</Station>
<Station>
<StationCallLetters>DHLTH</StationCallLetters>
<Hdflag>false</Hdflag>
</Station>
<Station>
<StationCallLetters>DISC</StationCallLetters>
<Hdflag>false</Hdflag>
</Station>
</Listing>
</BasicProgramming>
<BasicProgramming>
<ProductId>10045</ProductId>
<ProgrammingName>America'sTop180</ProgrammingName>
<Price>49.99</Price>
<IncludesLocals>false</IncludesLocals>
<IncludesRSN>true</IncludesRSN>
<Listing>
<CategoryName>WOMEN'SPROG</CategoryName>
<Station>
<StationCallLetters>TLC</StationCallLetters>
<Hdflag>false</Hdflag>
</Station>
<Station>
<StationCallLetters>DIY</StationCallLetters>
<Hdflag>false</Hdflag>
</Station>
<Station>
<StationCallLetters>LIME</StationCallLetters>
<Hdflag>false</Hdflag>
</Station>
</Listing>
</BasicProgramming>
</CoreProgramming> -
READING AND WRITING FROM A FILE(WRITTEN IN ANOTHER LANGUAGE)
# Comment
INTEGER Declares integer type variable
STRING Declares string type variable
LET Assigns a variable
CALCULATE Performs an arithmetic calculation
PRINT Writes data to the console
PRINTLN As print, but followed by a new line
END Terminates the program
Each line of the program must begin with one of these words, and the language should not be case sensitive.
Tim Brailsford, 2007
G64ICP
COMMENT
Any line beginning with the # character is completely ignored.
Example:
# ignore this line!
INTEGER
The INTEGER reserved word declares an Integer variable, and assigns a default value of 0 to it.
Example:
INTEGER myInt
This example is equivalent to the Java statment "int myInt=0;"
STRING
The STRING reserved word declares a String variable, and assigns an empty string to it.
Example:
STRING myString
This is equivalent to the Java statement "String myString;"
LET
This assigns values to variables (either integers, or strings enclosed
in double quotes).
Examples:
LET myInt=42
LET myString="Hello World!"
CALCULATE
This performs numeric calculations upon values or variables, and assigns the result to a variable (which must have
been declared earlier). Four operators are supported: + *
and / (for addition, subtraction multiplication and
integer division respectively).
Examples:
CALCULATE myInt=2*2
CALCULATE myInt=myInt+24
CALCULATE myInt=intA/intB
PRINT and PRINTLN
These words both print to the console the
only difference being that PRINTLN appends a new line (as does
System.out.println in Java). These can print either text provided as an argument, or variables (string or integer).
Examples:
PRINTLN "Hello World!"
PRINT myString
PRINTLN myInt
END
This terminates the program, and prints a message to that effect.
TPL Example
To the left is an example TPL input file , to
calculate the factorial of 5. This should produce
an output similar to that shown overleaf (except
that calculates the factorial of 10).
# A TPL Program to calculate the factorial of 5
INTEGER myInt
INTEGER factorial
STRING myString
LET mystring="Factorial Program"
LET myInt=5
CALCULATE factorial=myInt*4
CALCULATE factorial=factorial*3
CALCULATE factorial=factorial*2
Tim Brailsford, 2007
G64ICP
PRINTLN mystring
PRINTLN
PRINT "The factorial of "
PRINT myInt
PRINT " is "
PRINTLN factorial
END
Documentation
Document your code by writing instructions explaining how to run it, listing all of the files you have submitted,
and specifying any limitations (eg you might want to say what platforms you would expect it to run on, and what
platforms you have tested it on). This document should be written as a plain text file (ie ASCII � MS Word binary
files are not acceptable) � and this file should be called README.TXT. This file should constitute the user
manual of your program, and should explain exactly how to use your program.
The README file should be the user manual for your language as implemented.
NB:
I want it to read values from the file as given above and execute the answer in the command prompt( as intented in the file above)
Thanks
Alam IkennaHai I have one doubt in doing other peoples homework for them. Why bother?
-
Need Help: UTL_FILE Reading and Writing to Text File
Hello I am using version 11gR2 using the UTL_FILE function to read from a text file then write the lines where it begins with word 'foo' and end my writing to the text file where the line with the word 'ZEN' is found. Now, I have several lines that begin with 'foo' and 'ZEN' Which make for one full paragraph, and in this paragraph there's a line that begins with 'DE4.2'. Therefore,
I need to write all paragraphs that include the line 'DE4.2' in their beginning and ending lines 'foo' and 'ZEN'
FOR EXAMPLE:
FOO/234E53LLID
THIS IS MY SECOND LINE
THIS IS MY THIRD LINE
DE4.2 THIS IS MY FOURTH LINE
THIS IS MY FIFTH LINE
ZEN/DING3434343
FOO/234E53LLID
THIS IS MY SECOND LINE
THIS IS MY THIRD LINE
THIS IS MY FIFTH LINE
ZEN/DING3434343
I am only interested in writing the first paragraph tha includes line DE4.2 in one of ther lines Not the Second paragraph that does not include the 'DE4.2'
Here's my code thus far:
CREATE OR REPLACE PROCEDURE my_app2 IS
infile utl_file.file_type;
outfile utl_file.file_type;
buffer VARCHAR2(30000);
b_paragraph_started BOOLEAN := FALSE; -- flag to indicate that required paragraph is started
BEGIN
-- open a file to read
infile := utl_file.fopen('TEST_DIR', 'mytst.txt', 'r');
-- open a file to write
outfile := utl_file.fopen('TEST_DIR', 'out.txt', 'w');
-- check file is opened
IF utl_file.is_open(infile)
THEN
-- loop lines in the file
LOOP
BEGIN
utl_file.get_line(infile, buffer);
--BEGINPOINT APPLICATION
IF buffer LIKE 'foo%' THEN
b_paragraph_started := TRUE;
END IF;
--LOOK FOR GRADS APPS
IF b_paragraph_started AND buffer LIKE '%DE4%' THEN
utl_file.put_line(outfile,buffer, FALSE);
END IF;
--ENDPOINT APPLICATION
IF buffer LIKE 'ZEN%' THEN
b_paragraph_started := FALSE;
END IF;
utl_file.fflush(outfile);
EXCEPTION
WHEN no_data_found THEN
EXIT;
END;
END LOOP;
END IF;
utl_file.fclose(infile);
utl_file.fclose(outfile);
EXCEPTION
WHEN OTHERS THEN
raise_application_error(-20099, 'Unknown UTL_FILE Error');
END my_app2;
When I run this code I only get one line: DE4.2 I AM MISSING THE ENTIRE PARAGRAPH
PLEASE ADVISE...Hi,
Look at where you're calling utl_file.put_line. The only time you're writing anything is immediately after you find the the key word 'DE4', and then you're writing just that line.
You need to store the entire paragraph, and when you reach the end of the paragraph, write the whole thing only if you found the key word, like this:
CREATE OR REPLACE PROCEDURE my_app2 IS
TYPE line_collection
IS TABLE OF VARCHAR2 (30000)
INDEX BY BINARY_INTEGER;
infile utl_file.file_type;
outfile utl_file.file_type;
input_paragraph line_collection;
input_paragraph_cnt PLS_INTEGER := 0; -- Number of lines stored in input_paragraph
b_paragraph_started BOOLEAN := FALSE; -- flag to indicate that required paragraph is started
found_key_word BOOLEAN := FALSE; -- Does this paragraph contain the magic word?
BEGIN
-- open a file to read
infile := utl_file.fopen('TEST_DIR', 'mytst.txt', 'r');
-- open a file to write
outfile := utl_file.fopen('TEST_DIR', 'out.txt', 'w');
-- check file is opened
IF utl_file.is_open(infile)
THEN
-- loop lines in the file
LOOP
BEGIN
input_paragraph_cnt := input_paragraph_cnt + 1;
utl_file.get_line (infile, input_paragraph (input_paragraph_cnt));
--BEGINPOINT APPLICATION
IF LOWER (input_paragraph (input_paragraph_cnt)) LIKE 'foo%' THEN
b_paragraph_started := TRUE;
END IF;
--LOOK FOR GRADS APPS
IF b_paragraph_started
THEN
IF input_paragraph (input_paragraph_cnt) LIKE '%DE4%'
THEN
found_key_word := TRUE;
END IF;
--ENDPOINT APPLICATION
IF input_paragraph (input_paragraph_cnt) LIKE 'ZEN%' THEN
b_paragraph_started := FALSE;
IF found_key_word
THEN
FOR j IN 1 .. input_paragraph_cnt
LOOP
utl_file.put_line (outfile, input_paragraph (j), FALSE);
END LOOP;
END IF;
found_key_word := FALSE;
input_paragraph_cnt := 0;
END IF;
ELSE -- paragraph is not started
input_paragraph_cnt := 0;
END IF;
EXCEPTION
WHEN no_data_found THEN
EXIT;
END;
END LOOP;
END IF;
utl_file.fclose (infile);
utl_file.fclose (outfile);
--EXCEPTION
-- WHEN OTHERS THEN
-- raise_application_error(-20099, 'Unknown UTL_FILE Error');
END my_app2;
SHOW ERRORSIf you don't have an EXCEPTION section, the default error handling will print an error message, spcifying exactly what the error was, and which line of your code caused the error. By using your own EXCEPTION section, you're hiding all that information. I admit, the error messages aren't always as informative as we'd like, but they're never less informative than "Unknown UTL_FILE Error'. Don't use your own EXCEPTION handling unless you can improve on the default.
Remember that anything inside quotes is case-sensitive. If your file contains upper-case 'FOO', then it won't be "LIKE 'foo%' ".
Edited by: Frank Kulash on Dec 7, 2011 1:35 PM
You may have noticed that this site normally doesn't display multiple spaces in a row.
Whenever you post formatted text (such as your code) on this site, type these 6 characters:
\{code}
(small letters only, inside curly brackets) before and after each section of formatted text, to preserve spacing. -
Read and write into csv file using procedure
I would like to read a particular column value from csv file(which will have many columns) using procedure and for that value I have to retrieve some more values from database table and have to append into same csv file.
can someone help me?
Thanks
Edited by: 1002478 on Apr 25, 2013 5:52 AM
Edited by: 1002478 on Apr 25, 2013 5:55 AM1002478 wrote:
thanks for your reply.
Using UTL_FILE i'm able to read csv file. I'm stuck up in appending some more columns to same csvYou'll struggle to append data to an existing CSV.
You'd be better to read the data from one CSV, and create another CSV using that data, and the extra data you want, and then when finished, delete the original file and rename the new file to the old filename.
You should be able to do that using External Tables to read the source file (easier than using UTL_FILE) and UTL_FILE to write the new file. -
Hi All,
I need to add a line of text/string to about
1000 or so number of pdf files. whats the best
way of writing this string to the pdf file.
Has anyone done this using java/javascript.
If so could you please tell the best solution
or provide some code samples.
Thanks
laredI know there is an API available from http://www.adobe.com for java (90% sure). I'd suggest starting there.
-
Writing into a file in clients' machine from a jsp application
is it possible to write some data fetched from database into a .CSV file on the clients machine from an JSP application?
signed applets is one possibility , any other possibilities are there?
thanks
Mohammed Rafeeq([email protected])* @(#)ExcelServlet.java
import javax.servlet.http.*;
import javax.servlet.*;
import java.io.*;
import java.util.*;
import java.sql.*;
* @author M.Rajendra
public class ExcelServlet extends HttpServlet {
public void init(ServletConfig config)throws ServletException{
super.init(config);
} // end of init method
public void doGet(HttpServletRequest req, HttpServletResponse res)
throws ServletException,IOException {
doPost(req,res);
} // end of doGet method
public void doPost(HttpServletRequest req,HttpServletResponse res)
throws ServletException,IOException {
HttpSession session = req.getSession(true); // session is already created at loginscreen
OutputStream oout = res.getOutputStream();
res.setHeader("Content-disposition","filename=excel.csv");
//res.setContentType("application/octet-stream");
FileInputStream fis = new FileInputStream("D:\\JRun3.1\\servers\\default\\default-app\\WEB-INF\\classes\\test.csv");
//here i am reading a csv file, we can output whatever format and set filename of ours
byte[] buf = new byte[1024]; //get from statics
int bytesRead = 0;
while((bytesRead = fis.read(buf)) != -1){
oout.write(buf,0,bytesRead);
oout.close();
fis.close();
}//end of doPost method
public void destroy() {
}// end of destroy
} //end of ExcelServlet class
Maybe you are looking for
-
Can't sync / uninstall / reinstall BB DM v4.7 - Windows Vista error 1402.
I am running BlackBerry Desktop Manager v4.7 on Windows Vista Business. I was having no problems with the program until I downloaded the update that was recently published (build 59, date of publication 2009-06-05, size 111Mb). I downloaded this upda
-
Hi SAP GURU, Can anyone help me on the following issue: My Client receive 7680 pieces, and the P.O. Said 7500 Pieces. The issue is the received quantity vs the invoiced quantity. The discrepancy is a GR / IR and is showing up on the GR / IR report.
-
Wrong price picked in purchase order created with reference to RFQ.
Hi Experts, We are encountering an error when we adopt a service RFQ. We maintained 3 RFQs at different prices for 3 different vendors. When we try to adopt the RFQs in the PO, the system picks up the price of the last RFQ maintained. The system give
-
Unable to sync movies. I get a message saying my computer isn't authorized. I even tried to deauthorize it and reauthorize it, but I still get the message. latest iTunes version is running on my system 7 computer. I didn't have this problem until
-
I upgraded my IPhone 4S to ios 7.1 and now I can no longer view my Calendar by Day only. I have a toggle at top of Calendar that allows me to switch between a monthly calendar, or monthly calendar with a few appts on bottom of screen that I have to