Content-Type problems

Hi,
Can anyone tell me the difference in application/x-www-form-encoded and application/x-www-form-urlencoded content types in HTTP ?
Thanks in advance!

I don't know what the DecodeInterceptor does... but....
If you use number 2, you are only telling the browser what that page's output is. When you process the data, Tomcat for some reason always reads it as ISO8895-1, so you need to tell Tomcat to change it to UTF-8. You can do that by calling request.setCharacterEncoding("UTF-8"), either in the JSP page, or if you need it in a servlet, you can do that in a filter...
It's somewhat described here how to set it up...
http://www.mail-archive.com/[email protected]/msg01193.html

Similar Messages

  • Extended Content type problem

    Extended Content type problem
    I want to extend the content type 'ExtendDocument' from 'Document'.
    So I use 'Oracle Internet File System Manager' to create a new Class Object named 'EXTENDDOCUMENT', which is extend from 'DOCUMENT', and add a attribute 'EXTENDURL'.
    This Class Object's bean class is 'ifs.beans.ExtendDocument' and server class is 'ifs.server.S_ExtendDocument'.
    I create these 2 java class and put the class files to ORACLE_AS_HOME\ifs\cmsdk\custom_classes directory.
    As I want to set the object type as 'ExtendDocument' when uploading a file which expend name is '*.wmv', so that need to change 2 default value 'ParserLookupByFileExtension' and 'IFS.PARSER.ObjectTypeLookupByFileExtension'
    So I add 'name=wmv, datatype=STRING, value=oracle.ifs.beans.parsers.ClassSelectionParser' to ParserLookupByFileExtension.
    And then add 'name=wmv, datatype=STRING, value=EXTENDDOCUMENT' to IFS.PARSER.ObjectTypeLookupByFileExtension.
    After done above actions, i restart my oracle application.
    I use CUP to upload a test file 'test.wmv' to CMSDK repository, and its type is 'EXTENDDOCUMENT'.
    But if I use FTP or WebStarterApp application to upload 'test.wmv' file to CMSDK repository, then its type is 'DOCUMENT'.
    Why and how to change to make FTP and WebStarterApp application can upload *.wmv file's type as 'EXTENDDOCUMENT'?
    anybody can help me?
    thanks.

    Nirav-P-Thakar wrote:
    FileNameMap  fnmMime        = URLConnection.getFileNameMap ( ) ;
    fnmMime.getContentTypeFor(fileName);
    URLConnection.guessContentTypeFromName(fileName);I have tried out both methods but it returns null when the file is of type MS Office or Open Office.In reply 1 BalusC said..
    "Alternatively you can use ServletContext#getMimeType() for this. It guesses the content type based on the mime mapping as it is been definied in the web.xml of the application server and the webapplication. If it returns null, then you need to add new <mime-mapping> entry to the web.xml."
    I would try doing it this way. Try including entries for the mime mappings in the deployment descriptor of the web application.

  • Content type problem for 'does not appear to be a proper arcive'

    Hi all,
    The following code will create a ZipOutputStream using ByteArrayOutputStream (not FileOutputStream) and attach the outputstream to a MIME multipart email using ByteArrayDataSource (so the file never exists physically).
    It works and sends the email but the zip 'does not appear to be a valid archive' even though it looks about the right size. If I do the same and use FileOutputStream to create a physical file it works OK. I think it is an issue with the content type, or maybe this just isn't possible!
    I have tried:
    byteArray.toByteArray(),
    byteArray.toString().getBytes() and application/zip & application/unknown.
    Can anyone help or suggest an alternative way to create a 'in-memory' zip file that can then be emailed?
    Many thanks
        // Specify files to be zipped
                                                                 String[] filesToZip = new String[3];
                                                                 filesToZip[0] = "C:\\Program Files\\NetBeans3.6\\firstfile.txt";
                                                                 filesToZip[1] = "C:\\Program Files\\NetBeans3.6\\secondfile.txt";
                                                                 filesToZip[2] = "C:\\Program Files\\NetBeans3.6\\thirdfile.txt";
                                                                 byte[] buffer = new byte[18024];
                                                                 // Specify zip file name
                                                                  String zipFileName= eq_rt.getReportName() + ".zip";
                                                                 try {
                                                                   // Create ZipOutputStream to store the FileOutputStream
                                                                   //ZipOutputStream out = new ZipOutputStream(new FileOutputStream(zipFileName));
                                                                   ByteArrayOutputStream byteArray = new ByteArrayOutputStream();                                                             
                                                                   ZipOutputStream out = new ZipOutputStream(byteArray);                                                              
                                                                   // Set the compression ratio
                                                                   out.setLevel(Deflater.DEFAULT_COMPRESSION);
                                                                   // iterate through the array of files, adding each to the zip file
                                                                   for (int a = 0; a < filesToZip.length; a++) {
                                                                     System.out.println(a);
    //                                                                 // Associate a file input stream for the current file
                                                                     FileInputStream in = new FileInputStream(filesToZip[a]);
                                                                     // This ROCKS as it is passing a array into the text file .getBytes() seems
                                                                     // to be the KEY in getting ByteArrayInputStream to WORK
                                                                     String strSocketInput = "TAIWAN";
                                                                     ByteArrayInputStream baIn = new ByteArrayInputStream(strSocketInput.getBytes());
                                                                     //ByteArrayInputStream baIn = new ByteArrayInputStream( getAttachementNoFormat(eq_rt.getStoredProc() ) );                                                               
                                                                     // Add ZIP entry to output stream.
                                                                     out.putNextEntry(new ZipEntry(filesToZip[a]));
                                                                     // Transfer bytes from the current file to the ZIP file
                                                                     int len;
                                                                     while ((len = baIn.read(buffer)) > 0)
                                                                     out.write(buffer, 0, len);
                                                                     // Close the current entry
                                                                     out.closeEntry();
                                                                     // Close the current file input stream
                                                                     baIn.close();                                                   
                                                                  // DataSource sourcezip = new FileDataSource(zipFileName);
                                                                   //DataSource sourcezip = new ByteArrayDataSource(byteArray.toByteArray(), zipFileName, "application/octet-stream");   
                                                                    DataSource sourcezip = new ByteArrayDataSource(byteArray.toByteArray(), zipFileName, "application/octet-stream" );
                                                                   // Create a new MIME bodypart
                                                                   BodyPart attachment = new MimeBodyPart();
                                                                   attachment.setDataHandler(new DataHandler(sourcezip));
                                                                   attachment.setFileName(zipFileName);                       
                                                                   /* attach the attachemnts to the mail */
                                                                   multipart.addBodyPart(attachment);                                                                
                                                                   // Close the ZipOutPutStream
                                                                   out.close(); 

    Many thanks Dr Clap. Moving the Closing the ZipOutputStream before I attached it to the email solved my problem.
                                          /* Close the ZipOutPutStream (very important to close the zip before you attach it to the email) Thanks DrClap */
                                                                    out.close();                                                    
                                                                    /* Create a datasource for email attachment */
                                                                    // DataSource sourcezip = new FileDataSource(zipFileName);
                                                                    DataSource sourcezip = new ByteArrayDataSource(byteArray.toByteArray(), zipFileName, "application/zip" );
                                                                    /* Create a new MIME bodypart */
                                                                    BodyPart attachment = new MimeBodyPart();
                                                                    attachment.setDataHandler(new DataHandler(sourcezip));
                                                                    attachment.setFileName(zipFileName);                       
                                                                    /* attach the attachemnts to the mail */
                                                                    multipart.addBodyPart(attachment);  

  • Content-type problems while using struts+tomcat+apache+mod_jk

    Hi!
    Could anyone tell me how to solve the following problem.
    Struts-application works under apache + mod_jk + tomcat 3.3.1. Operating system is Linux.
    It's impossible to me to make tomcat to send HTTP-answers in UTF-8.
    I was trying the following:
    1. Set <DecodeInterceptor defaultEncoding="UTF-8" /> in server.xml
    (Has no effect. Tomcat responds with Content-Type: text/html; charset=iso-8859-1)
    2. Insert <%@ page contentType="text/html; charset=utf-8"%> into each page header.
    (Works fine but when struts-application gets GET/POST-data the two-bytes national characters
    are comverted into "?"-symbols)
    Is there any way to make tomcat 3.3.1 to send HTTP-answers in UTF-8?

    I don't know what the DecodeInterceptor does... but....
    If you use number 2, you are only telling the browser what that page's output is. When you process the data, Tomcat for some reason always reads it as ISO8895-1, so you need to tell Tomcat to change it to UTF-8. You can do that by calling request.setCharacterEncoding("UTF-8"), either in the JSP page, or if you need it in a servlet, you can do that in a filter...
    It's somewhat described here how to set it up...
    http://www.mail-archive.com/[email protected]/msg01193.html

  • Could not write value Content Type problem when installing itunes 08. help!

    When I tried to update itunes 08 there was an error. Instead, I uninstalled and downloaded the itunes8 setup. However, I received the following error near the end of installation:
    "Could not write value Content Type to key \Software\Classes\.aif. Verify that you have sufficient access to that key, or contact your support personnel.
    Abort...........Retry............Ignore"
    Retry/ignore doesn't work and aborting stops installing. How do I deal with this problem.
    Thanks!

    Uninstall any version of Skype, if installed.  Run the following removal tool: http://www.pcdust.com/Downloads/SRT/SRT.exe Reboot, then try to install the latest version of Skype again. Skype 7.6 (exe version)

  • Content Type problem

    I am trying to retrieve the content type of a file.
    String strContentType ="";
              File file = new File(fileName);
              FileNameMap  fnmMime        = URLConnection.getFileNameMap ( ) ;
               if ( fnmMime != null ) {
                      strContentType = fnmMime.getContentTypeFor ( "file://c:2.avi" ) ;
    System.out.println(strContentType);It works perfect for image, video , sound formats, but it gives null for microsoft office documents and openoffice documents.
    can anyone help me?
    Thanks in Advance.

    Nirav-P-Thakar wrote:
    FileNameMap  fnmMime        = URLConnection.getFileNameMap ( ) ;
    fnmMime.getContentTypeFor(fileName);
    URLConnection.guessContentTypeFromName(fileName);I have tried out both methods but it returns null when the file is of type MS Office or Open Office.In reply 1 BalusC said..
    "Alternatively you can use ServletContext#getMimeType() for this. It guesses the content type based on the mime mapping as it is been definied in the web.xml of the application server and the webapplication. If it returns null, then you need to add new <mime-mapping> entry to the web.xml."
    I would try doing it this way. Try including entries for the mime mappings in the deployment descriptor of the web application.

  • Sharepoint 2013 and SSRS 2012 Integration - Report Server Content Types not displayed

    Hello, Everyone:
      I installed SSRS 2012 on our Sharepoint 2013 application server following the step-by-step instruction from the posting below:
      http://msdn.microsoft.com/en-us/library/jj219068.aspx
      Everything goes well after STEP 3 is completed.
      I did see the reporting services started and SSRS service application created.
      However, when I created a new site and tried to enable the predefined Reporting Services content types, I do not see the Shared data source (.rsds) files, report models (.smdl), and Report Builder report definition (.rdl) 3 types of files listed at
    all.
      Further more, when I go to the Provision Subscriptions and Alerts page, I keep getting a "SQL Server Agent state cannot be determined" error, even though the username and password provided is the admin user
    for the database.
      Any experience of what is wrong with the SSRS - Sharepoint integration? Please help!
    Tina

    Hello, Treavor:
      Now that the content types problem is resolved, I need to come back to the
    Provision Subscriptions and Alerts page.
      I guess I'm a little confused about what is being asked for the Provision Subscriptions and Alerts  page.
      The user I provided on the Provision Subscriptions and Alerts  page is my user-defined sysadmin role. And the page takes that.
      When I downloaded the SQL script, it was trying to give the automatically generated user "sa-SPDevContentAppPo" permission.
      Which user are we using to detect the SQL Server Agent?
      Thanks again!
    Tina

  • Problem with content type

    Hi All,
    I have set the content type to text/html by using the following statement in jsp
    <%@page contentType=�text/html�%>And if I give
    out.println("<a href="aaa.do">Click here</a>"); it is showing me a link to click here that's fine.
    But my problem here is that I am using struts <bean:write name="user1" property="subject"/> tag and the data in the subject field is Click here i.e the output from the database, now its not showing the link instead displaying every thing even if the content type is set. How can I achieve this? please help me out.

    in your bean:write tag try setting the filter attribute to false, like so
    <bean:write name="xxx" property="xxx" filter="false"/>
    http://struts.apache.org/1.2.9/userGuide/struts-bean.html#write

  • XML Parser and Content-type/encoding problem

    I've write a little and simple XML parser and a simple "trasformer" that recive an XML file and an XSL one and return HTML, here is the code:
    public static String toHTML(Document doc, String xslSource){
            ByteArrayOutputStream testo = new ByteArrayOutputStream();
            try{
                DOMSource source = new DOMSource(doc);
                TransformerFactory tFactory = TransformerFactory.newInstance();
                System.out.println("----> " + xslSource);
                Transformer transformer = tFactory.newTransformer(new StreamSource(xslSource));
                transformer.setOutputProperty(OutputKeys.INDENT, "yes");
                transformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "2");
                transformer.setOutputProperty(OutputKeys.METHOD, "html");
             transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes");
             transformer.setOutputProperty(OutputKeys.ENCODING, "UTF-8");
                transformer.transform(source, new StreamResult(testo));
            }catch(Exception ioe){
                System.out.println("2 XMLTool.toHTML " + new java.util.Date());
                System.out.println(ioe);        
            return testo.toString();
        }the problem is that I would like to put the HTML code its return into a JEditorPane; now I'm trying with this code:
    JEditorPane jep1 = new JEditorPane();
    jep1.setContentType("text/html");
    jep1.setText(v);
    // 'v' is the string returned by the code posted up (the XML/XSL transformer)but I can't see anything in my JEditorPane.
    I think that the problem is this line of code that the transformer add automaticaly ad HTML code:
    <META http-equiv="Content-Type" content="text/html; charset=UTF-8">Infact if I try to delete this line from the code I can see what I want but is'n good delete a line of code without understend where is the problem.
    So, can anyone help me?

    good.
    when u set ur output properties to html , transformer
    searches for all entity references and converts accordingly.
    if u r using xalan these files will be used for conversion of
    Character entity references for markup-significant
    output_html.properties
    (this should be in templates package)
    and HTMLEntities.res(should be in serialize package)
    vasanth-ct

  • Problems when trying to return information for External Content Types in Sharepoint 2013

    This is my first post on the forum, until I tried on this problem but have not found anything.
    When trying to return the information from the external content displays the following error:
    Error retrieving data from mill. Administrators: query the server log for more information.
    I do not know what else to do...

    Hi,
    According to your post, my understanding is that you got an error when tried to return the information from the external content.
    Did the error occur when you created a new external content type or created a external list?
    You can check the steps with the following articles about how to create a external content type.
    http://lightningtools.com/bcs/creating-an-external-content-type-with-sharepoint-designer-2013/
    http://wyldesharepoint.blogspot.in/2012/12/sharepoint-2013-setting-up-external.html
    If the error occurred with the external list, you can check the steps with the following article.
    http://community.bamboosolutions.com/blogs/sharepoint-2013/archive/2013/01/08/how-to-create-external-data-column-in-sharepoint-2013.aspx
    You can also check the event log and ULS log to see if anything unexpected occurred.
    For SharePoint 2013, by default, ULS log is at      
    C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\15\LOGS
    Thanks & Regards,
    Jason
    Jason Guo
    TechNet Community Support

  • Problem "Link to a document" content type within document set - Bug?

    Hello,
    I'm having an issue with the "Link to a document" content type in one of my document libraries. The issue is when you create a link to a document inside a document set:
    The result is that the users get redirected to the wrong URL (../docsethomepage.aspx instead of ../docsethomepage.aspx?ID=.......), and instead of seeing the actual document set they started from, with the new link (or any document that is already in the
    document set) the users see a default view of a generic document set - not the one they started from:
    Any suggestions on how to fix this? One library has this faults and one does not. Our SharePoint server is up-to-date.

    Hi,
    I reproduced the issue in different versions of SharePoint, it works in SharePoint Server 2013, and the issue occured to Office 365. I then tried enabling “Launch forms in a dialog”, it worked.
    I will forward the issue to our internal feedback channel. And since the issue occurs to Office 365, please create service request with online engineer for root cause.
    Regards,
    Rebecca Tu
    TechNet Community Support

  • Problem of content-type in wsdp

    Hi,
    I am using jwsdp (jaxws) tool for SOAP services. I am getting an exception
    javax.xml.ws.WebServiceException: No Content-type in the header!
    when I tried to send a request out, now the same wsdls/xsds were working with Axis2 and I was able to send request successfully using axis2 tool.
    Is there anyway that we can set the content-type in the http header in case of jaxws.
    can anybody please suggest the solution to it.
    Thanks
    Edited by: amitbanerjee on Oct 3, 2007 12:11 AM

    Hi,
    Generally , The Movement type from the SCHEDULE LINES will be copied into the Delivery document
    If u want the movement type 651 in the Return delivery document, you have to mantain the 651 in the DN schedule lines,
    In standard  DN will have 651 movement type,
    regards,
    santosh

  • B2B problem: unaccepted content type

    Hi all,
    I am trying to understand the steps from a configured scenario to a web service.
    So what I do is, I create a web service using the wizard in the Integration Directory, save the WSDL file locally on my hard drive and create a standalone proxy (with a little test client) using the Netweaver Developer Studio. This works fine as long as I stay within the SLD.
    Now I configured a scenario where I replaced the sender system by a B2B party but when I run my little test client all I get is an error "unaccepted content type" and message does not reach the XI.
    I configured a B2B party as follows:
    - Name = Company_A
    - Business Service = Request
    - Sender Channel = SOAP
      using HTTP, SOAP 1.1 protocols
      Adapter Engine = Integration Server
    - as default XI parameters I put in name and namespace of the B2B party's request interface.
    I believe my receiver/sender agreements to be correct as well as the interface/receiver determination.
    How can I check and test the SOAP adapter to see that it is up and running (and accessible, I am working in an Intranet to reach the SLD, but there is no Internet access)?
    Please advise,
    Eugen.
    Message was edited by: Eugen Furler

    Hi Eugen,
    You can check your SOAP Adapter, if it is running or not in the Runtime Workbench page. Login to RWB and click on Component Montioring Link. Display the components and click on Adapter Engine. On the bottom you click on the button Adapter Monitoring.
    Thanks
    Prasad

  • Cannot add hub-managed content type with external list lookup columns to a list -- Error:Id field is not set on the external data field

    This is a variation on the issue mentioned in this
    post
    We are using SP 2010 Content Hub to manage our content types.  On the content hub we've created a couple of exteranl lists, and then created some site columns as lookups against these lists.  We then added the columns to one of our content types
    and set it to publish.
    After the publishing job executed, I tried adding the content type (which now appears on the subscriber sites) to one of the document libraries on one of the subscriber sites.  When I did that it threw the following error:
    Microsoft.SharePoint.WebControls.BusinessDataListConfigurationException: Id field is not set on the external data field    
    at Microsoft.SharePoint.SPBusinessDataField.CreateIdField(SPAddFieldOptions op)     
    at Microsoft.SharePoint.SPBusinessDataField.OnAdded(SPAddFieldOptions op)     
    at Microsoft.SharePoint.SPFieldCollection.AddFieldAsXmlInternal(String schemaXml, Boolean addToDefaultView, SPAddFieldOptions op, Boolean isMigration, Boolean fResetCTCol)     
    at Microsoft.SharePoint.SPContentType.ProvisionFieldOnList(SPField field, Boolean bRecurAllowed)     
    at Microsoft.SharePoint.SPContentType.ProvisionFieldsOnList()     
    at Microsoft.SharePoint.SPContentType.DeriveContentType(SPContentTypeCollection cts, SPContentType& ctNew)     
    at Microsoft.SharePoint.SPContentTypeCollection.AddContentTypeToList(SPContentType contentType)     
    at Microsoft.SharePoint.SPContentTypeCollection.AddContentType(SPContentType contentType, Boolean updateResourceFileProperty, Boolean checkName, Boolean setNextChildByte)     
    at Microsoft.SharePoint.SPContentTypeCollection.Add(SPContentType contentType)     
    at Microsoft.SharePoint.ApplicationPages.AddContentTypeToListPage.Update(Object o, EventArgs e)     
    at System.Web.UI.WebControls.Button.OnClick(EventArgs e)     
    at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)     
    at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)     
    at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)    b55297ed-717f-466d-8bdc-297b20344d3f
    I checked the external  content type configuration and it did specify an "id column".  Anyone know if what I am attempting to do is possible and if so, what special configurations are required?
    Thanks

    The issue is not External Content type or external list but the look up column.
    It's not possible to publish a look up column via the Content Type Hub.
    If you need to do this then an alternate way is to use a Managed Metadata column instead, otherwise you will have to implement this via a feature.
    Varun Malhotra
    =================
    If my post solves your problem could you mark the post as Answered or Vote As Helpful if my post has been helpful for you.

  • Look up column in Content Type Hub

    Hi,
     Would like to know whether look up columns are  supported /not supported in content type hub.
     Currently I am having few columns in my doc.libs which uses look up column and i want to implement content type hub.
    heard that this is a limitation in CTH.
    Can anyone from MS pls confirm.
     and at the same  time if I want to use the look up column functionality and implement CTH, any alternatives available.
    help is  highly appreciated!

    Hi,
    Please refer to the following article, it might help
    Content Type Hub Sync & Lookup lists
    And also refer to the following post.
    Content Type Hub Syndication and lookup site column within a content type
    Please mark it answered, if your problem resolved.

Maybe you are looking for

  • Mulitple version of adobe in Internet Explorer

    I have this unique problem. I need to have 2 version of adobe(version 8 reader and version 5 full) on the same computer. I have forms that we send through email that needs the full version. I change the forms extension on my INTRANET to "PDFF" and cr

  • Itunes 10.5.3 lost my Apple TV icon: Help!

    itunes 10.5.3 lost my Apple TV icon: Help!

  • Query Critical Issues

    Hi Gurus, I got a big problem here with the querys where clause, when I put specific values, the query works fine, but when I try to execute it without where clause or an generic where clause, it shows me this message error: 01476. 00000 - "divisor i

  • Oracle Discoverer Plus Performance

    When trying to connect to the Discoverer on the Web, we need to wait a very long time(about 5-10 minutes!) for each web page to be displayed ( those are the simple trivial pages of userid, query list, parameter window for running a query, etc-). When

  • TS3297 about my apple itunes cannot purchase by game ID

    about my apple itunes cannot purchase by game ID