×

Discussion Board

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

    problem in viewing xhtml file

    i am using jboss server.
    with nokia 3.0.1 browser.
    i have written a jsp file (given below)
    the browser is giving an error msg: bad content type..

    please help me

    <% response.setContentType("application/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>

  2. #2
    Nokia Developer Expert
    Join Date
    Mar 2003
    Location
    Singapore
    Posts
    101
    Hi,

    Perhaps you should set the content type (mime settings) in the application server's configuration files instead of within the jsp itself. For more information on mime type settings, please refer to the "Nokia Mobile Internet Toolkit XHTML Guidelines" document.

    Best Regards,
    Valerie / Forum Nokia

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

    i have set the mime types

    I have set the mime types as below in a file called web.xml..but still it doesnot work...is there anything to do with the browser...i mean does the browser(nokia 3.0.1) which i am using support xhtml(it accepts local xhtml files).


    <?xml version="1.0" encoding="ISO-8859-1"?>

    <!DOCTYPE web-app
    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
    "http://java.sun.com/dtd/web-app_2_3.dtd">

    <web-app>
    <mime-mapping>
    <extension>
    wmls
    </extension>
    <mime-type>
    text/vnd.wap.wmlscript
    </mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>
    wml
    </extension>
    <mime-type>
    text/vnd.wap.wml
    </mime-type>
    </mime-mapping>
    <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>


    </web-app>

  4. #4
    Nokia Developer Expert
    Join Date
    Mar 2003
    Location
    Singapore
    Posts
    101
    Hi,

    The browser has no problems viewing xhtml pages served out from an application/web server. Perhaps you could try to set the mime settings in the application server-wide web.xml too.

    Best Regards,
    Valerie / Forum Nokia

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

    messed

    hi there

    i tried doing that too..but i ended with messing up everything....so now i am using tomcat standalone server in my comp...but still it is not working....i had posted a question regarding this please can u help me regarding this


    thanks a lot
    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
  •  
×