×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    May 2003
    Posts
    17

    bad content encountered: error

    hi there

    i am using tomcat server now
    with nokia 3.0.1 browser

    i have written a jsp file as below with xhtml content and also i have set mime types for xhtml in web.xml file found in conf directory...but when i call this page from the browser it is giving me error:bad content encountered.Can you tell me where exactly i should include mime settings.

    please can anyone help me regarding this

    thankyou in advance

    <% response.setContentType("application/vnd.wap.xhtml+xml");
    %>

    <?xml version="1.0"?>
    <!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN"
    "http://www.wapforum.org/DTD/xhtml-mobile10.dtd" >

    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <title>XHTML Mobile Profile Document</title>
    </head>
    <body>
    <h1> Heading </h1>
    <p>
    Body
    </p>
    </body>
    </html>


    web.xml file

    <mime-mapping>
    <extension>xhtml</extension>
    <mime-type>text/html</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>xhtml</extension>
    <mime-type>application/xhtml+xml</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>xhtml</extension>
    <mime-type>application/vnd.wap.xhtml+xml</mime-type>
    </mime-mapping>

  2. #2
    Registered User
    Join Date
    May 2003
    Posts
    17

    urgent

    please

    i am totally new to this field and badly need the solution

    please can anyone help

    thanks
    sash

  3. #3
    Regular Contributor
    Join Date
    Apr 2003
    Posts
    305
    Your code seems correct. But notice that you need to do several things before you can make your code works.

    Have you make sure the web.xml file has been applied to the correct directary? Are you sure the web.xml is taking effect? Try to verify this by putting some static sample xhtml pages (e.g., from NMIT3.1 sample folder) under the Tomcat directary you are working on, and see if you can get them from Nokia 3.0.1 browser.

  4. #4
    Registered User
    Join Date
    May 2003
    Posts
    17

    thanks a lot

    I tried with static xhtml page ..it worked.
    I did a small change to my jsp page, I removed the content type.
    It worked fine...
    Is it ok if there in no content type in the jsp page.
    I think it worked because i had already set it in the web.xml right?

    thanks
    sash

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×