Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Java > Java and JDK > BOOK: Expert One-on-One J2EE Design and Development
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Expert One-on-One J2EE Design and Development
This is the forum to discuss the Wrox book Expert One-on-One J2EE Design and Development by Rod Johnson; ISBN: 9780764543852
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Expert One-on-One J2EE Design and Development section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old October 25th, 2007, 08:08 AM
Registered User
 
Join Date: Oct 2007
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default How to send a file with HTTP Request in Jmeter

Hi,


I have the latest version of jmeter downloaded.( Version 2.2.3)
I am new to jmeter.

I need to send a binary file with the HTTP Request Post .
When i tried this i get the following error : Response Code 500 ( my request is not successful.

I filled the HTTP Request form of jmeter as below:

-------------------------------------------------------------------------------------------------------------------------------------------
File Name: Path of the file to send.
MIME : application/octet-stream
value: file name.
-------------------------------------------------------------------------------------------------------------------------------------------------



When I captured the response in wireshark i get the following response:


-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Hypertext Transfer Protocol
POST /skavaea/emailadaptor/pop3;jsessionid=76853F9CBDFD7E27A67901417D75E4DC HTTP/1.1\r\n
Request Method: POST
Request URI: /skavaea/emailadaptor/pop3;jsessionid=76853F9CBDFD7E27A67901417D75E4DC
Request Version: HTTP/1.1
Connection: keep-alive\r\n
Content-Type: multipart/form-data; boundary=---------------------------7d159c1302d0y0\r\n
Content-Length: 618
User-Agent: Java/1.5.0_12\r\n
Host: server17.skavamail.com\r\n
Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2\r\n
-------------------------------------------------------------------------------------------------------------------------------------------------------

- The size of the file which i attached with the http Request differs from the response which i get from wireshark. (Content-Length: 618 bytes, but my file size is 202 bytes)



Can anyone help me in this regard.





Reply With Quote
  #2 (permalink)  
Old Yesterday, 04:29 AM
Registered User
Points: 15, Level: 1
Points: 15, Level: 1 Points: 15, Level: 1 Points: 15, Level: 1
Activity: 14%
Activity: 14% Activity: 14% Activity: 14%
 
Join Date: Nov 2013
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Looking into response headers of your server I can see
Quote:
Accept: text/html, image/gif, image/jpeg
And as far as I understand you're trying to send
Quote:
MIME : application/octet-stream
So I would expect that the application under test would reject your upload request.

See Performance testing: Upload and Download Scenarios with Apache JMeter for how to correctly construct and send a file upload request including MIME type bit.
Reply With Quote
  #3 (permalink)  
Old Yesterday, 05:32 AM
Registered User
Points: 3, Level: 1
Points: 3, Level: 1 Points: 3, Level: 1 Points: 3, Level: 1
Activity: 7%
Activity: 7% Activity: 7% Activity: 7%
 
Join Date: Apr 2014
Location: new york
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to SarahFrancis
Default Premium Pure Garcinia Cambogia – Thigh time to pamper yourself !

If you wish to look your best then make use of Premium Pure Garcinia Cambogia. This is the best weight loss supplement that gets you slim figure without any side effects and without any issues. So you must give this a try so that losing weight can become easier.
https://soundcloud.com/groups/premiu...ily-and-faster
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
JMeter:problem with HTTP proxy Server gaya3 Forum and Wrox.com Feedback 3 February 19th, 2014 02:56 AM
how to send http post request via stored procedure kissvineet SQL Server 2000 6 August 18th, 2008 12:26 AM
how to send Http request via a trigger kissvineet .NET Web Services 0 October 28th, 2005 04:50 AM
how to send Http request via a trigger kissvineet .NET Web Services 0 October 28th, 2005 04:48 AM



All times are GMT -4. The time now is 08:33 AM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.