![Type Type](/uploads/1/2/6/4/126414480/228506512.png)
Set ContentType and transfer Pdf document to client: Servlet « PDF « Java Tutorial. Java Tutorial; PDF; Servlet. Sep 14, 2009 The content types 'application/pdf' and 'application/msword' should work, assuming that the content you're sending is correct. What do you mean by 'nothing happens'?
|
Definition
ContentTypeContentTypeContentTypeContentType
Examples
Content-type X-pdf
![C Contenttype Pdf C Contenttype Pdf](/uploads/1/2/6/4/126414480/245786421.jpg)
The following code example sends an email message with an attachment and displays the ContentDisposition properties for the attachment.
Remarks
The information in the ContentType class is used to describe the data contained in an email message in such a way that software that displays email can present the content in an appropriate manner. ContentType is used with the Attachment class to specify the type of content in the attachment.
The syntax of the Content-Type header is described in RFC 2045 Section 5.1. RFC 2046 provides detailed information about MIME media types and their parameters. These RFCs are available at https://www.ietf.org.
Constructors
ContentType()ContentType()ContentType()ContentType() | Initializes a new default instance of the ContentType class. |
ContentType(String)ContentType(String)ContentType(String)ContentType(String) | Initializes a new instance of the ContentType class using the specified string. Viking range serial number location. |
Properties
BoundaryBoundaryBoundaryBoundary | Kirk franklin greatest hits download. Gets or sets the value of the boundary parameter included in the Content-Type header represented by this instance. |
CharSetCharSetCharSetCharSet | Gets or sets the value of the charset parameter included in the Content-Type header represented by this instance. |
MediaTypeMediaTypeMediaTypeMediaType | God hand for ppsspp emulator. Gets or sets the media type value included in the Content-Type header represented by this instance. |
NameNameNameName | Gets or sets the value of the name parameter included in the Content-Type header represented by this instance. |
ParametersParametersParametersParameters | Gets the dictionary that contains the parameters included in the Content-Type header represented by this instance. |
Methods
Equals(Object)Equals(Object)Equals(Object)Equals(Object) | Determines whether the content-type header of the specified ContentType object is equal to the content-type header of this object. |
GetHashCode()GetHashCode()GetHashCode()GetHashCode() | Determines the hash code of the specified ContentType object |
GetType()GetType()GetType()GetType() | Gets the Type of the current instance. (Inherited from Object) |
MemberwiseClone()MemberwiseClone()MemberwiseClone()MemberwiseClone() | Creates a shallow copy of the current Object. (Inherited from Object) |
ToString()ToString()ToString()ToString() | Returns a string representation of this ContentType object. |