URGENT! Can response object contain text as well as binary data
hi all,
My test scneario is like this..
a) User is having a button "Download File" i will call this as download.jsp
b) After hitting the download button i will be sending the file to user by writting into the ServletOutputSream.
c) Whatever option user chooses (i.e. Save / Open / Cancel) I want to do some updations on the existing user screen.
Maybe presenting him the download status e.g. "File Downloaded"
The problems i am facing are
1. SInce i am using ServletOutputSream once i flush the stream i loose the control on response object.
2. After user's operation (i.e. Save / Open / Cancel) unless user again hits
something on UI my server has to look at him with dumb eyes. :(
3.The download operation that i am performing expects some attributes from the request ..
they are Object attributes and not string attribute so i cant user URL rewritting.
If anybody has encountered this type of problem in there projects please share the workaround you used.
Thanx a lot
--Bhupendra Mahajan
Here in order to send the file to Client i must use Stream ... and in prder to
update the status i.e. HTML i must use Printwritter.... That is the reason
i need both ... If you have some OutputStream available deep down somewhere you can use
both; it just takes a bit of discipline:OutputStream ros; // available from somewhere
// use the following stream for your binary output:
BufferedOutputStream bos= new BufferedOutputStream(ros);
// and use this one for your PrintWriter:
PrintWriter pw= new PrintWriter(bos);Everytime before you want to print some binary data, flush the pw, and everytime
before you want to print some text data, flush the bos.
kind regards,
Jos
Similar Messages
-
How to upload a file which may contain text as well as image to the server using windows phone 8 application ?
You're going to need to give way more detail about the situation before we can help.
-
Web service response object contains no values
Hi,
Using Netweaver, I've created an EJB-based web service that contains a single method. The method takes two input parameters and returns as a response, a data transfer object (DTO) containing several boolean values. When I test this web service with the Web Service Navigator however, the response object contains a flat DTO-- meaning the contents of the DTO are missing. For example, this is what happens now when I call the web
service...
Incoming parameters:
...userID (String) = some user ID
...systemID (String) = some system ID
Outgoing parameters:
...response
......(nothing contained within response--
...... there should be boolean values here)
But this is what I should see when I call the web service...
Incoming parameters:
...userID (String) = some user ID
...systemID (String) = some system ID
Outgoing parameters:
...response
......booleanValue1
......booleanValue2
......booleanValue3
Documentation doesn't seem to address this problem. Does anyone know how to correct this?
Thanks,
AmyHi
Have you found the workaround?
Sorry for refreshing topic. Flag mustUnderstand ='1' in response is unussual thing.
BR -
Can Business Objects Web Intelligency reports access NearLine Storage data Via BW Bex Query
Hi Gurus,
I am aware BEX queries can access NearLine Storage data for reporting but can Business Objects Web Intelligency reports access NearLine Storage data Via BICS connection ( Bex Query as a Source).
Thanks,
Shak.I would recommend to let your SAP Basis guys do a security trace on the SAP BW side and see if some authorization check for the user fails when trying to fetch data over the universe.
Regards,
Stratos -
How can i read the text files and buffer the data in Vector?
hi. I have been running into this problem for days, but with no luck and losing right direction.
The problem is : I am trying to read a text file and buffer the data into a
Queue for each user.
the sample text file is as below:( 1st column is timestamp, 2nd is user_id, 3rd is packet_id, 4th is packet_seqno, 5th is packet_size)
0 1 1 1 512
1 2 1 2 512
2 3 1 3 512
3 4 1 4 512
4 5 1 5 512
5 6 1 6 512
6 7 1 7 512
7 8 1 8 512
8 9 1 9 512
9 10 1 10 512
10 1 2 11 512
11 2 2 12 512
12 3 2 13 512
13 4 2 14 512
14 5 2 15 512
15 6 2 16 512
16 7 2 17 512
17 8 2 18 512
18 9 2 19 512
19 10 2 20 512
20 1 3 21 512
21 2 3 22 512
22 3 3 23 512
23 4 3 24 512
24 5 3 25 512
25 6 3 26 512
26 7 3 27 512
27 8 3 28 512
28 9 3 29 512
29 10 3 30 512
30 1 4 31 512
31 2 4 32 512
32 3 4 33 512
33 4 4 34 512
34 5 4 35 512
35 6 4 36 512
36 7 4 37 512
37 8 4 38 512
38 9 4 39 512
39 10 4 40 512
40 1 5 41 512
41 2 5 42 512
42 3 5 43 512
43 4 5 44 512
44 5 5 45 512
45 6 5 46 512
46 7 5 47 512
47 8 5 48 512
48 9 5 49 512
49 10 5 50 512
50 1 6 51 512
51 2 6 52 512
52 3 6 53 512
53 4 6 54 512
54 5 6 55 512
55 6 6 56 512
56 7 6 57 512
57 8 6 58 512
58 9 6 59 512
59 10 6 60 512
60 1 7 61 512
61 2 7 62 512
62 3 7 63 512
63 4 7 64 512
64 5 7 65 512
65 6 7 66 512
66 7 7 67 512
67 8 7 68 512
68 9 7 69 512
69 10 7 70 512
70 1 8 71 512
71 2 8 72 512
What I wanna do is to read all the data above and buffer them in a queue for each user( there are only 10 users in total).
I already created a class called Class packet:
public class packet {
private int timestamp;
private int user_id;
private int packet_id;
private int packet_seqno;
private int packet_size;
/** Creates a new instance of packet */
public packet(int timestamp,int user_id, int packet_id,int packet_seqno, int packet_size)
this.timestamp = timestamp;
this.user_id=user_id;
this.packet_id=packet_id;
this.packet_seqno=packet_seqno;
this.packet_size=packet_size;
}then I wanna to create another Class called Class user which I can create a queue for each user (10 users in total) to store type packet information. the queue for each user will be in the order by timestamp.
any idea and sample code will be appreciated.Doesn't sound too hard to me. Your class User (the convention says to capitalize class names) will have an ArrayList or Vector in it to represent the queue, and a method to store a Packet object into the List. An array or ArrayList or Vector will hold the 10 user objects. You will find the right user object from packet.user_id and call the method.
Please try to write some code yourself. You won't learn anything from having someone else write it for you. Look at sample code using ArrayList and Vector, there's plenty out there. Post in the forum again if your code turns out not to behave. -
How to read a file with both text and binary data?
For text data I use a BufferedReader,
for binary data I use a DataInputStream.
Since readLine is deprecated in DataInputStream, how can I read in a proper way a file that contains some lines of text followed by some binary data.
Is there a way to do this without writing a new 'readLine' for DataInputStream (that has to take into account the different newlines for Unix en other OS's)?sorry about that ^
NEW STRING str
WHILE there is stuff in the file DO
getByte()
IF reading a string THEN
WHILE byte is not a return character DO
convert the byte to character/string
append char to str
WEND
ELSE IF reading raw data THEN
parse raw data
do stuff with it
END IF
WEND -
Can you embed object into text in Indesign?
I am about to do a large project in Indesign that will involve a lot of charts and text. I used to work in Quark and I could embed objects into the text so that the object and text flowed together (instead of the object sitting on top of the text). Can anyone tell me if this is possible in Indesign?
Cathy,
You're using the word "embed" in a way that is confusing.
An embedded object in InDesign is one where the link to the outside photoshop or other graphic file format has been cut and the entire file information is contained within the InDesign file.
This has nothing to do with having images move along with the text.
InDesign has two types of images that move along with the text.
b Anchored objects
are the easier ones to create but they have less controls.
b Inline graphics
are the more complex.
Look these up in the Help files.
Or get yourself a good book on InDesign. -
Can't move objects or text boxes in indesign CS6
I'm using a Mac (10.8.5), CS6 InDesign, and today my move tool stopped working. Any object or text box I create I can't move with the selection tool/dragging it -- they'll move with the arrows on my keyboard. I tried resetting the preferences (cmd + opt + control + shift). Any other fixes?
The solutions in this thread may be helpful:
Suddenly can't drag objects... tried several potential solutions with no luck so far. -
I'm trying to hi-light objects and text in a pdf converted from a cadd drawing but can't do either?
Hi blueteam,
Please check :http://www.wikihow.com/Highlight-Text-in-a-PDF-Document
Regards,
Rave -
How to return multipart HTTP response containing image data as well as xml data
Hi,
My web service accepts
request as string and returns response as string. Being new to ASP.Net, please clarify my below doubts.
a) How
can i provide multipart response of the below format while returning response in string format.. How to implement multi-part response where I need to return Image data as well as xml data also.
HTTP/1.0 200 OK
Date: Wed, 03 Mar 2004 14:45:11 GMT
Server: xxx
Connection: close
Content-Type: application/xxx-multipart
Content-Length: 6851
Content-Type: image/jpeg
Content-Length: 5123
CommandID: asset14521
<5123 bytes of jpeg data>
Content-Type: xxx-xml
Content-Length: 1523
<?xml...
Thanks,
DivyaHi MeetDivya,
I suggestion you post the question in the ASP.NET forums at
http://forums.asp.net/. It is appropriate and more experts will assist you.
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey. -
does not let me add text to my verizon website. This adding text feature works well on internet explorer. I can click on add text, the box opens up but I can not type in the box for some unknown reason. What can be done to correct this problem ...
I didn't search before, but "you are not alone" (the thread [https://support.mozilla.com/en-US/questions/747424 In Verizon's Sitebuilder for webpages, I can not edit text boxes when using Firefox. I do not have this problem if I use Internet Explorer. Is there a setting I can change in Firefox to correct this problem?] has 18 votes for "I have this problem, too).
I can only guess about the reason... Firefox works with many websites' "rich text" editors, but ones that haven't been updated for five years may assume that Firefox is the old Netscape browser and use scripting techniques that don't work in Firefox.
If Verizon has a different "basic" or HTML editor that you can tolerate using, you could try that. It might not be subject to the same incompatibilities.
If I someday get a Verizon account, I will surely be looking into this further, but for now, it's hard to suggest anything else. -
Help! I can send emails from my ipad2 that contain text - but they're unable to send if I attach any pictures! So frustrating! I have an iPhone
I have an iPhone & can send pictures via email without issue but I can't on ipad2. Any ideas why?? Thx!
-
An email can't send "server response: Message contains spam...
One of my email accounts can’t send an email.. And the message came up
“Server response: Message contains spam or virus or sender is blocked: field32_1e2afb1a2cd02"
It says to select a different out going server..
Have I done something wrong, or is there a setting I need to change?
Thank youHi
Could you please confirm if the issue was resolved or needs further assistance? -
Can anyone post me a solution for converting gif containing text to a .txt
Can anyone post me a solution for converting gif containing text to a .txt file using Java
wow!!!
not gonna put a full solution (since its huge!!!)
but heres how you would do it
open the gif in a bufferd image, then do some image recognition on it
easy (hehe) case is if the gif only contains text (black on white of a standard font)
then i would scan down the image until i find a raster line that isnt all white (top of a text line), then find the next raster line that is all white (bottom of text line.
half(ish) way between these lines scan from the left until you find a black pixel (start <maybe> of next character) (be careful you dont aim for the gap in "i"
from that point (x, y) test a set of pixels (x+n1, y+m1) to (x+nt, x+mt) where t should only have to be ~8 or 10 such that for each character in the font these test points return a unique combination, you then know what character is next, add it to a string and repeat along the line, then down the page
tahh dahh there ya go
you can write a program to learn the required test points by giving it a line of the full character set
good piggin luck is what i say :-) -
I am creating a NetStream object in Adobe Media Server application, and getting the following error:
Sending error message: Response object not found (_result:0).
I have defined a handler for the onStatus message, which is working fine, but it doesn't catch this error. And I can't find any information on this error message anywhere. Indeed, the documentation on server-side error messages is very limited.
The code causing this error is:
var ns = null;
try
ns = new NetStream(application.nc);
catch (e)
trace("____NetStream error" + e.name + " " + e.message);
return;
ns.onStatus = netStreamStatusHandler;
I am getting NetStream.Connect.Success though. And I was wondering if the NetStream constructor calls a method initStream() on the other server?
thanks, PaulI highly recommend you read either the Sun Servlet tutorial or one on the web. But this should at least get you started:
HttpServletRequest
Used to retrieve HTML form parameters submitted to the Servlet
Maintains a reference to the user's HTTP web session
Used to inspect any HTTP headers sent by the client browser
Used to retrieve any HTTP message body data (say, XML submitted to the server or form parameters, as above)
Used to retrieve references to other objects descriping the Servlet configuration, intialization parameters, and container informationHttpServletResponse
Used to send HTTP headers back to the client browser (content-type, content-length, etc.)
Used to send HTTP message body data back to the client browser (HTML content, PDF content, etc.)The reason you passed the response object to sendPage2() is so the content type could be set (in this case, 'text/html' indicating an HTML web page) and so that a Writer reference could be obtained to output the actual HTML content back to the browser.
- Saish
Maybe you are looking for
-
I recently restored my 2009 macbook to factory settings and now its stuck on the welcome screen where u choose your country. My trackpad allows me to move the arrow around but when I tap on it to select continue it does nothing at all. The only thing
-
Login Module configuration for soap adapter ?
Hi Guys, I have configured XISOAPAdapter for client certificate Authentication and i have created 1443 as the HTTPS port on the ABAP stack and defined this port in the instance profile. Under SSL provider i have selected 50101 as the HTTPS port and t
-
Interview questions need solution
Dear all 1. I have an interview question Is it posible to do credit check at base value say pr00 value, generally credit check is done at netvalue, all open items or total value but at base value is is possible 2. Tcode for list of customers 3. Can w
-
Help:convert form 6i to load it on windows mobile?
hi, i have a form 6i and i want to see it on windows mobile 6.0, is there a tool that convert the form to load it on windows mobile. i convert the form 6i to form 10g but i didn't succeeded to load the form on windows mobile, i have search for a jini
-
Please Help! Need to get this done soon - Bigger Size slideshow on web
Hello, I need to publish on the web a slideshow of some of my pics, but I need to publish them at a size much bigger than the little iMovie screen size I have now with iLife 06 and .Mac (the little screens that looks like a movie screen and other des