Tomcat returning JSP instead of WML

Morning,
I've been stuck for 2 days and have searched the forum twice looking for answers. Found great help in learning how to write a JSP page that throws back a WML code. The problem is that my browser simulator gets JSP code instead of WML code. A user clicks on a link in a wml page and the link refers to the jsp page. the jsp page uses a bean to connect to database and throws back wml code. I am not getting errors in Tomcat console or the gateway admin console. I am using Tomcat 4 and Nokia Mobile Internet Packet.
Thanks.

Have you set the content-type of the response.
you might use response.setContentType("application/wml");
Check your conf/web.xml file
you should see something like
<mime-mapping> <!-- Wireless Bitmap -->
<extension>wbmp</extension>
<mime-type>image/vnd.wap.wbmp</mime-type>
</mime-mapping>
<mime-mapping> <!-- WML Source -->
<extension>wml</extension>
<mime-type>text/vnd.wap.wml</mime-type>
</mime-mapping>
<mime-mapping> <!-- Compiled WML -->
<extension>wmlc</extension>
<mime-type>application/vnd.wap.wmlc</mime-type>
</mime-mapping>
<mime-mapping> <!-- WML Script Source -->
<extension>wmls</extension>
<mime-type>text/vnd.wap.wmls</mime-type>
</mime-mapping>
<mime-mapping> <!-- Compiled WML Script -->
<extension>wmlscriptc</extension>
<mime-type>application/vnd.wap.wmlscriptc</mime-type>
</mime-mapping>
You might not be having these lines in your web.xml.

Similar Messages

  • Tomcat servlet/JSP container default files on 10gAS(10.1.2.0.2)

    Hi Friends,
    I am using Oracle Application Server 10g (10.1.2.0.2) on windows
    I have the Vulnerability: Apache Tomcat servlet/JSP container default files.
    and the fix is Review the files and delete those that are not needed.
    i would like to know the location of the files to review and delete.Please suggest?
    Regards,
    DB

    Apache/Tomcat is not related to OAS, where did you get this info? OAS is based in a Orion Web Server and Apache HTTP Server, not Tomcat.
    For this kind of problems there are the CPU you may want to check in Metalink for them.
    Can you clarify also what default files?
    Greetings.

  • How to use JOptionPane in jsp, instead of javascript message alert box?

    HI,
    How to use JOptionPane in jsp,
    instead of javascript "message alert box"?
    I hate javascript,
    I'd like to only use java in jsp. don't use javascript.
    javascript is client side,
    jsp is server side. i know that.
    how to... instead of javascript box?
    how to use ... message box in webpage?
    don't use applet,,,, don't use javascript,,,
    hm...zzzZzz
    I hate javascript..T.T
    <SCRIPT language=JavaScript>
    alert("hate javascript");
    </SCRIPT>
    ===>>>>
    In this way,,
    JOptionPane.showOptionDialog(null,"I love java")
    I'd like to only use jsp and java and html...in webpage.
    don't use javascript....
    Why? don't sun provide message box in jsp, instead of javascrip box?
    Why?
    Edited by: seong-ki on Nov 4, 2007 8:38 PM

    Drugs are bad, m'kay?

  • Why do we use jsp instead of servlet

    why do we use jsp instead of servlet

    Hi,
    I am and web/Java developer and have used a mixture of JSPs and servlets. I use JSPs for my actual web pages. Whether they are displaying dynamic database driven content or simple pages doing nothing but password protecting.
    I tend to separate other reusable code into servlets, like database connections and business logic.
    For example: I have worked on a mortgage site and there quite a lot that goes into calculating a monthly payment and ARP. These calculations will not change (only values I send to them will) therefore I do this type of coding in a servlet.
    Cheers
    Mark
    :o)

  • Directory structure in Tomcat for JSP

    I am new to JSP/Tomcat
    I have the following jsp page, classtest.jsp stored in %tomcat%webapps/myproject
    <html>
    <head>
    </head>
    <body>
    <%@ page import="com.clanda.mypack.*" %>
    <%
    Sayhi myhi = new Sayhi();
    int x = myhi.doSpeak();
    out.println(x);
    %>
    </body>
    </html>and the class file defining Sayhi is in %tomcat%webapps/myproject/WEB-INF/classes/com/clanda/mypack/Sayhi.class
    package mypack;
    public class Sayhi {
         public int doSpeak() {
              return 123;
    }I get the following Tomcat/Jasper error "Sayhi cannot be resolved to a type". I have run out of ideas? Can some one please put me right.
    Many thanks
    Bob

    You have defined your Sayhi class to be in the mypack package but you have put it under com/clanda/mypack/.
    Recompile your Sayhi class in the correct package:
    package com.clanda.mypack;Then replace the Sayhi .class file under %tomcat%webapps/myproject/WEB-INF/classes/com/clanda/mypack/

  • How to set Tomcat's JSP compilation package

    Is it possible to configure what root package name Tomcat uses when creating .java files from JSPs? I've searched Google, this forum, and the Tomcat JSP documentation (http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jasper-howto.html) and cannot find any indication that it is. I found the description of all the JSP compiler servlet options, both in web.xml and on the Jakarta site, but it doesn't list any option for this. I know it's possible with Ant's JSPC task, so it's tempting to think the same can be done with Jasper, but maybe not.

    You're running Jasper by running "jspc.bat" (or "jspc.sh") from Tomcat's bin directory, yes?
    If so, it's
    jspc.bar -p <package> ...
    Usage: jspc <options> [--] <jsp files>
    where jsp files is any number of:
        <file>         A file to be parsed as a jsp page
        -webapp <dir>  A directory containing a web-app, all jsp pages
                       will recursivly be parsed
    where options include:
        -q          Quite mode (same as -v0)
        -v[#]       Verbose mode (optional number is level, default is 2)
        -d <dir>    Output Directory
        -dd <dir>   Literal Output Directory.  (package dirs will not be made)
        -l          Outputs the name of the JSP page upon failure
        -s          Outputs the name of the JSP page upon success
        -p <name>   Name of target package
        -c <name>   Name of target class name
                    (only applies to first JSP page)
        -mapped     Generate separate write() calls for each HTML line in the JSP
        -die[#]     Generate an error return code (#) on fatal errors.
                    If the number is absent or unparsable it defaults to 1.
        -uribase <dir>  The uri directory compilations shoule be relative to
                        (Default is "/")
        -uriroot <dir>  The root directory that uri files should be resolved
                        against, (Default is the directory jspc is invoked from)
        -webinc <file>  Creates partial servlet mapings for the -webapp option
        -webxml <file>  Creates a complete web.xml when using the -webapp option.
        -ieplugin <clsid>  Java Plugin classid for Internet Explorer
        -sax2 <driverclassname>  Driver class name for the SAX 2.0 parser to be used

  • Tomcat webapp jsp pages are blanc

    Hi,
    I'm using tomcat 5.5.17 and it's working fine. When I deploy my webapp to,I can start Tomcat , but when I request a jsp page, no matter which one it is, it returns a blanc page.
    Can someone help me?
    Thanks.
    Regards,
    Michiel.

    Hi,
    My Tomcat is configured well. Other webapps run just fine.
    Within my war file that Ideploy to this Tomcat installation there are several jar files included as a reference to them.Because at first I included as well the javax.servlet.jar and the javax.servlet.jsp.jar which Tomcat uses as well, I thought that there might bea conflictas I describedin my first post. But I removed them and there is no change (I stopped Tomcat before).
    Thanks.
    Michiel.

  • Using OCI driver with Tomcat for JSP?Servlets

    We have a need to switch to OCI drivers instead of JDBC thin driver. Our tomcat is running on Sun and Linix platform. Does anyone have real world experience in terms of configuring the OCI driver and connection pooling? Please help to provide some configuration tips.

    You should repost this in the JDBC forum here on OTN so that you can get some better expertise in this area.
    The URL is http://forums.oracle.com/forums/forum.jsp?forum=99
    Hope this helps,
    Rob

  • Display jsp content into wml format for Mobile?

    hi..Currently i have many jsp's in my application and now i want to display the same content into mobile. the problem is that it looses the formatting... what are the ways to display these jsp's into my mobile web brower. any help in the same will be really appreciated. thanx.

    JoachimSauer wrote:
    You either need a browser that supports HTML on your mobile or produce WML instead of HTML in your JSPs.Or use XSLT to generate WML from the HTML that the JSP generates. As usual, nothing an additional layer won't solve!

  • SSRS 2012: How to get a "Select All" that returns NULL instead of an actual list of all values from a multi-select parameter?

    I have a multi-select parameter that can have a list of thousands of entries. In general, the user will pick a few entries from the list or "Select All". If they check "Select All", I would much prefer that I get a NULL or an empty string
    instead of a list of all values. Is there any way to do that?
    In experimenting with a work-around, I tried putting an "All" label with a null value in the list, but it is ignored (does not display in the drop-down). If I use an empty string for the value, my "All" entry does get displayed, but so
    does "Select All", which is confusing. Is there a way to suppress "Select All"?
    - Mark

    I adapted the following from a workaround posted by JNeo on 4/16/2010 at 11:14 AM at
    http://connect.microsoft.com/SQLServer/feedback/details/249227/multi-value-select-all-parameter-in-reporting-services
    To get a null value instead of the full list of all values when "Select All" is chosen:
    1) Add a multi-value parameter "MyParam" that lists the values to choose.
    2) Add a DataSet "ParamCount" identical to the one used by "MyParam", except that it returns a single column named [Count] that is a COUNT(*) of the same data
    3) Add a parameter "MyParamCount", set it to hidden and internal, then set the default value to 'Get values from a query', choosing "ParamCount" for the Dataset and the one [Count] column for the Value field.
    4) Change the parameter for the main report DataSet so that instead of using [@MyParam], it uses this expression:
    =IIF(Parameters!MyParam.Count =
    Parameters!ParamCount.Value, Nothing, Join(Parameters!MyParam.Value, ","))

  • Need help with Tomcat and JSP

    Hi
    I'm a complete beginner with JSP, I have experience with Java, Dreamweaver and HTML, but I'm having alot difficulty understanding JSP.
    I tried doing out some of the tutorial examples but they don't seem to come out right on the browser.
    For Example the Code for Date
    <HTML>
    <BODY>
    <%
    // This is a scriptlet. Notice that the "date"
    // variable we declare here is available in the
    // embedded expression later on.
    System.out.println( "Evaluating date now" );
    java.util.Date date = new java.util.Date();
    %>
    Hello! The time is now <%= date %>
    </BODY>
    </HTML>
    Comes out as
    <% // This is a scriptlet. Notice that the "date" // variable we declare here is available in the // embedded expression later on. System.out.println( "Evaluating date now" ); java.util.Date date = new java.util.Date(); %> Hello! The time is now <%= date %>
    I know this probably really sounds like a stupid question but what could be the problem?

    Those it have to saved on the desktop, or in the Tomcat webapps folder or what?It has to be in a web application under tomcat. The easiest one to get up and running with basic jsp is the webapps/ROOT directory which is where the main index page is.
    [url http://www.coreservlets.com/Apache-Tomcat-Tutorial/]This one is a good basic guide to installing/getting it running.
    Also the tomcat documentation itself is reasonable good. Of specific relevance to you would be [url http://tomcat.apache.org/tomcat-5.5-doc/appdev/index.html]Application developers guide which explains the basic layout/structure of a web application.

  • New Bug in 10.1.2: getAccessor in Entity returns Row instead of RowIterator

    Hi
    There seems to be a new serious Bug in JDeveloper 10.1.2. Please assume the following Situation:
    MaEntity - Master Entity
    DetEntity - Detail Entity
    MaView - A View for the Master Entity
    DetView - A View for the Detail Entity
    DetMaFkAssoc - Association between MaEntity and DetEntity
    DetMaVL - ViewLink between MaView and DetView.
    Accessor "DetView" is exposed in Entity MaEntity. Here is the generated code in MaEntity:
    public RowIterator getDetView()
      return (RowIterator)getAttributeInternal(DETVIEW);
    }This Accessor failes with a class cast exception
      java.lang.ClassCastException: my.package.DetViewRowImplUps, what is this??? The Accessor obviously returned a Row for the Detail View, where a RowIterator should have been returned!
    I'd appreciate if anyone from oracle could have a look at this!
    Thanks

    Some more info:
    A short look into MaEntity.xml reveals the following code snippet  
       <AccessorAttribute
          Name="DetEntity"
          Association="my.package.DetMaFkAssoc"
          AssociationEnd="my.package.DetMaFkAssoc.DetEntity"
          AssociationOtherEnd="my.package.DetMaFkAssoc.MaEntity"
          Type="oracle.jbo.RowIterator"
          IsUpdateable="false" >
       </AccessorAttribute>
       <ViewLinkAccessor
          Name="DetView"
          ViewLink="my.package.DetMaVL"
          ViewLinkEnd="my.package.DetMaVL.DetView"
          ViewLinkOtherEnd="my.package.DetMaVL.MaView1"
          Type="oracle.jbo.server.ViewRowImpl"
          IsUpdateable="false" >
       </ViewLinkAccessor>Obviously the two Accessors point into different directions. The Association-Accessor is correct, whereas the ViewLinkAccessor returns a ViewRowImpl instead of a RowIterator.
    The codesample above was generated by a wizard in a new simple test project of JDeveloper 10.1.2. I realized, that JDeveloper 9.0.5.2 has also created wrong XML Code. But, for some reason it has worked in this Version.
    This is a serious bug, which will probably prevent me from upgrading to 10.1.2 as this will break my application. :-(
    Any hints are appreciated
    Thanks Frank Brandstetter

  • My lov results into the return value instead of the display value in APEX

    Hi,
    For 1 of the columns I'm representing in APEX, I choose 'Display as text, based on a lov'. I'm using:
    select aan.id||', '||r.naam||', '||a.woonplaats d, aan.id r
    from wmo_aanvragen aan
    , wmo_dossiers d
    , wmo_relaties r
    , wmo_adressen a
    where d.avg_1_id = aan.id
    and d.rel_nummer = r.nummer
    and a.rel_nummer = r.nummer
    and a.id = (select min(e.id) from wmo_adressen e where e.REL_NUMMER = r.nummer
    and e.EIND_DATUM is null)
    and d.id = (select min(f.id) from wmo_dossiers f where f.AVG_1_ID = aan.id)
    But somehow it displays the 'aan.id' value instead of the display value. Does anyone know howcome?? In TOAD it works fine
    Niels
    Edited by: user6394263 on 10-apr-2009 1:22

    Hello Niels,
    Your LOV Displays your concatenated value, but returns the "aan.id" (into the Form field), just as expected. If you want to show the description on your Form, use a PopUp LOV - Displays Description Return Key value
    Greetings,
    Roel
    http://roelhartman.blogspot.com/
    You can reward this reply by marking it as either Helpful or Correct ;-)

  • Important: how to generate serialS of char in JSP instead of Serial nos

    Hai all,
    in the following JSP Code, im generating an index number i.e. "rowcount"
    now i need to change to chatacters. i.e. instead of serial number 1,2,3... i need to get a,b,c........etc
    in the following code according to logical iterate the rowcount is incremented nothing has to be done but when we have to change to characters whts the process...... also after reaching a......z, it has to continue like aa, ab, ac,......az, ba,bb,bc.......bz.....
    <div id="div1" style="overflow:auto; width:100%; height:135; position:relative; border-left:1px solid gray;">
    <% int rowCount=1;%>
    <logic:present name="freqCollect">
    <table width="100%" border="0" cellpadding="0" cellspacing="0" id="tblSample">
    <logic:iterate id="freqMasId" name="freqCollect">
    <tr>
    <td align="center" width="10%">
    <input type="hidden" name="freqChk" value=""/>
    <logic:notEmpty name='freqMasId' property='freqDesc'>
    <logic:empty name='parentQipSeqId'>
    <logic:equal name='freqMasId' property='freqDelete' value='Y'>
    <input type="checkbox" name="freqChkBox" checked="true" tabindex=""/>
    </logic:equal>
    <logic:notEqual name='freqMasId' property='freqDelete' value='Y'>
    <input type="checkbox" name="freqChkBox" tabindex=""/>
    </logic:notEqual>
    </logic:empty>
    <logic:notEmpty name='parentQipSeqId'>
    <input type="checkbox" name="freqChkBox" tabindex="" disabled/>
    </logic:notEmpty>
    </logic:notEmpty>
    <logic:empty name='freqMasId' property='freqDesc'>
    <input type="checkbox" name="freqChkBox" tabindex="" disabled/>
    </logic:empty></td>
    <td align="center" width="10%"><input type="text" name="freqCode" id="txtblue" value="<%= rowCount++%>" size="5" tabindex="" readonly/></td>
    <td align="center" width="50%"><input type="text" name="freqDescription" id="txtblue" value="<bean:write name='freqMasId' property='freqDesc'/>" size="40" maxLength="80" tabindex=""/></td>
    <td align="center" width="15%"><input type="text" name="freqSample" id="txtblue" value="<bean:write name='freqMasId' property='freqSample'/>" size="5" maxLength="9" tabindex=""/>
    <input type="hidden" name="freqSeqId" id="txtblue" value="<logic:notEmpty name='freqMasId' property='freqId'><bean:write name='freqMasId' property='freqId'/></logic:notEmpty>" tabindex=""/>
    </td>
    </tr>                    
    </logic:iterate>
    </table>
    </logic:present>                         
    </div>

    Hai all,
    in the following JSP Code, im generating an index number i.e. "rowcount"
    now i need to change to chatacters. i.e. instead of serial number 1,2,3... i need to get a,b,c........etc
    in the following code according to logical iterate the rowcount is incremented nothing has to be done but when we have to change to characters whts the process...... also after reaching a......z, it has to continue like aa, ab, ac,......az, ba,bb,bc.......bz.....
    <div id="div1" style="overflow:auto; width:100%; height:135; position:relative; border-left:1px solid gray;">
    <% int rowCount=1;%>
    <logic:present name="freqCollect">
    <table width="100%" border="0" cellpadding="0" cellspacing="0" id="tblSample">
    <logic:iterate id="freqMasId" name="freqCollect">
    <tr>
    <td align="center" width="10%">
    <input type="hidden" name="freqChk" value=""/>
    <logic:notEmpty name='freqMasId' property='freqDesc'>
    <logic:empty name='parentQipSeqId'>
    <logic:equal name='freqMasId' property='freqDelete' value='Y'>
    <input type="checkbox" name="freqChkBox" checked="true" tabindex=""/>
    </logic:equal>
    <logic:notEqual name='freqMasId' property='freqDelete' value='Y'>
    <input type="checkbox" name="freqChkBox" tabindex=""/>
    </logic:notEqual>
    </logic:empty>
    <logic:notEmpty name='parentQipSeqId'>
    <input type="checkbox" name="freqChkBox" tabindex="" disabled/>
    </logic:notEmpty>
    </logic:notEmpty>
    <logic:empty name='freqMasId' property='freqDesc'>
    <input type="checkbox" name="freqChkBox" tabindex="" disabled/>
    </logic:empty></td>
    <td align="center" width="10%"><input type="text" name="freqCode" id="txtblue" value="<%= rowCount++%>" size="5" tabindex="" readonly/></td>
    <td align="center" width="50%"><input type="text" name="freqDescription" id="txtblue" value="<bean:write name='freqMasId' property='freqDesc'/>" size="40" maxLength="80" tabindex=""/></td>
    <td align="center" width="15%"><input type="text" name="freqSample" id="txtblue" value="<bean:write name='freqMasId' property='freqSample'/>" size="5" maxLength="9" tabindex=""/>
    <input type="hidden" name="freqSeqId" id="txtblue" value="<logic:notEmpty name='freqMasId' property='freqId'><bean:write name='freqMasId' property='freqId'/></logic:notEmpty>" tabindex=""/>
    </td>
    </tr>                    
    </logic:iterate>
    </table>
    </logic:present>                         
    </div>

  • Write file into sever--tomcat and jsp

    i have some .jsp file and run on tomcat 3.2.4, it works well nomally.
    in my programming i want to write some file or make some dir in sever. but i once to do that , the xxx.jsp will not be found in the sever. 404 error message will be throwen.
    by the way, i make all the .jsp into war and put .war into tomcat-home/webapps/.
    and if i change the port number 8080 into 8004, i can write something into 8004 but no 8080..
    any ideas

    Firstly, when you write the file out you need to find the web context base directory and extend the file reference from there.
    In your jsp you need code like this...
    String baseDir = this.getServletContext().getRealPath("/");
    File webRootDirectory = new File(baseDir);
    // Assuming the target directory exists, otherwise create it....
    File targetFile = new File(webRootDirectory, "mynew.jsp");
    // Open a stream and write to your hearts content into it, after you close it it will be available to be requestedApplication Servers can and often do disallow the writing of files etc via a security policy file so you often have to check that and adjust the security policy accordingly.

Maybe you are looking for

  • Kernel Panic Woes

    This kernel panic seems to pop up when I unplug my Apple keyboard, but I can't figure out as to why. Does anyone know? panic(cpu 1 caller 0x001A3135): Unresolved kernel trap (CPU 1, Type 14=page fault), registers: CR0: 0x8001003b, CR2: 0x00000008, CR

  • Complaints and Returns Management in CRM

    Hi, We are working on Complaints and Return Business Process in CRM. Let us know if any Enterprise Service available to create the Complaints and Process the same. I am able to see the process in the ES workplace however not able to see the correspon

  • PDF File Size - Live Type with Flattened Images

    I am looking for a way to Export my PDF to include live type but flatten all other imagery (like saving as a JPG). I work on fairly large catalogs - intended for print - that later need to be saved for web. The imagery is just too complex for the PDF

  • Application hangs on setVisible call in Solaris 8

    I have a Swing application that I am having trouble with. The swing part of it is simple enough, however it does use a C++ API with JNI. It all works perfectly on Linux. However in Solaris 8 the application hangs on the call to either myFrame.pack ()

  • How to maintain table TPMUS ??

    I try to find how I can maintain the default values for each user ?? now when I create a new user one of the key users has to maintain those values when the user creates a serviceorder or notification is there a way to maintain this table centrally ?