Please Help !  Simple question !

Hi all,
Please anybody tell me why the following line
<input type="text" name="price" value="<%=myBean.getPrice()==0.0?"":myBean.getPrice()%>">gives me the error:
incompatible types for ?: neither is a subtype of the other
second operand: java.lang.String
third operand : float
out.print(myBean.getPrice()==0.0?"":myBean.getPrice());
^
1 error
I am doing this in JSP.
Please help and reply soon.
Please reply soon.................
Waiting for your reply !
Thanks
amitindia

Like annie said, change the method to return a String (doubt if you want this)
or
<%=myBean.getPrice()==0.0?"":""+myBean.getPrice()%>

Similar Messages

  • Please help, simple question about Smart Playlists and Live Updating

    PLEASE for some reason I've never gotten an answer on this.
    I have a Smart Playlist called "Recently Played" with Live Updating. No matter how I set the parameters, the most recently played *song will ALWAYS appear on the bottom of the list when using my iPhone on the go.* I bolded that because I want you to be aware I'm not talking about on iTunes - I'm aware you can change how the list is viewed on iTunes.
    When using your iPod/iPhone on the fly and Live Updating is enabled, is there any way to make the most recently played song appear at the very top???
    Thanks so much

    Haven't seen that problem before but try the following: in iTunes, right-click the playlist name and enable the option "Copy to Play Order." Then sync.
    The normal use of "Copy to Play Order" when you have the playlist displayed in iTunes in some sort order, but you want it to display in the iPod in shuffled order (as it will actually play). Different problem than you are observing, but the same thing "might" help.... Let us know.

  • Context help (please help, simple question i think)

    Hi, on my webserver, I have a nested tag that goes:
    <Host name="www.mydomain.com">
    <Alias>domain.com</Alias>
    <Context docBase="/home/domainacct/public_html/jsp" path="/jsp" reloadable="true">
    </Context>
    </Host>
    When I use this setup, JSP works! I can access any http://www.mydomain.com/jsp/*.jsp
    But I don't want JSP files to be loadable only from the /jsp directory, as I would like
    to be able to do:
    <Host name="www.mydomain.com">
    <Alias>domain.com</Alias>
    <Context docBase="/home/domainacct/public_html" path="" reloadable="true">
    </Context>
    </Host>
    so that I can access jsp files like: http://www.mydomain.com/test.jsp
    But when I try that setup it doesn't work.
    Do you guys know how I can do this? Thanks.

    nope u can't do that i far as i know.
    the context docBase should be the actual path to the folder. so if your webapp is in C:\TOOLS\webapps\Development than ur docBase is Development....like the root directory for example.
    the context tag as far as i know cannot be used for what u want 2 do. i don't think u can in Java.

  • *****Please Help Simple Java Corba Problem*****

    This is probably a really simple one but I am very cheased off about it.
    I run my applications on a Win XP pro OS, and when I go to type in nameserv it gives me the following error I hava downloaded and installed JDK 1.4.1. I also have the JRE, And jbuilder personal edition ver 8.....And J2RE 1.4.1
    C:\Documents and Settings\Ash>nameserv
    Exception in thread "main" java.lang.NoClassDefFoundError: java/util/HashSet
    at com.inprise.vbroker.orb.ORB.<init>(ORB.java:81)
    at org.omg.CORBA.ORB.create_impl(ORB.java)
    at org.omg.CORBA.ORB.init(ORB.java)
    at com.inprise.vbroker.naming.ExtFactory.main(ExtFactory.java:126)
    my classpath looks like this
    .;C:\VisualCafePDETrial\BIN\COMPONENTS\SYMBEANS.JAR;C:\VisualCafePDETrial\JAVA\LIB\CLASSES.ZIP;C:\VisualCafePDETrial\JAVA\LIB;C:\BES\bin;C:\j2sdk1.4.1\lib\tools.jar;.;
    and my path is
    C:\VisualCafePDETrial\BIN;C:\VisualCafePDETrial\JAVA\BIN;C:\BES\binC:\j2sdk1.4.1\lib\tools.jar;.;
    what on earth am I doing wrong ??
    Also when I goto compile any java program it comes up with the following
    C:\DOCprac\Prac5\bank_naming>vbmake
    Building the bank_agent example ...
    Exception in thread "main" java.lang.ClassCastException
    at com.visigenic.vbroker.tools.idl2java.main(idl2java.java:30)
    Symantec Java! JustInTime Compiler Version 3.00.021(i) for JDK 1.1.x (TRIAL VER)
    Copyright (C) 1996-98 Symantec Corporation
    compiling: Client.java
    Client.java:2: Package org.omg.CORBA not found in import.
    import org.omg.CORBA.*;
    ^
    Client.java:3: Package org.omg.CosNaming not found in import.
    import org.omg.CosNaming.*;
    ^
    2 errors
    Symantec Java! JustInTime Compiler Version 3.00.021(i) for JDK 1.1.x (TRIAL VER)
    Please help I am really desperate to sort this one out. Can you give me some detailed info on how I would do this.>>>Thanx in advance

    You have 2 sets of errors, at least.
    The first is : Exception in thread "main" java.lang.NoClassDefFoundError: java/util/HashSet which is that you have not imported the class for hashset.
    The second is that the import of the jars is probably wrong, hard to say without seeing code.

  • Please help - simple drop down box

    i am very new to this - i have just opened the app for the first time - i have to create this form by tomorrow!!
    I have a simple list in access - it contains 15 fields in the table - very simple.  I need EVERY drop down box on the page to ref. this table to populate the list - which changes on a daily basis.  There will be a total of 35 drop down boxes on the form - all pointing to the exact same CHANGING list.
    PLEASE HELP!!!

    You can enter the sales tax rate for each province as the export value and
    then use the drop-down field directly in your calculations.
    On Thu, Feb 5, 2015 at 6:06 PM, jennam90934439 <[email protected]>

  • Please help (Simple chat programme)

    I made a simple chat programme.
    It has a server object and it can handle several client.
    It is working properly and can use to chat.
    I have some problems. can you please help me.
    1.What is the best method to read input and outputStreams
    I have used inputStream.readUTF()/outputStream.writeUTF() methods and
    also I have used bufferedReader.readLine()/Printwriter.println() methods.
    I don't know about other methods.So please tell me what is the best and new out of these two.
    And are there any method which is better than these two.
    2.Is there any way to get more details from input and output streams
    Here more details means Fontcolor,Size etc;
    by now I'm adding them in to my output streams and filtering them when rea input stream.
    I'm getting other details(Fontcolor,Size) and add them all to a string.
    that means if client type "hi" my string will be something like this
    "12ff0000hi".
    When read the input stream i make a char[] and take first 2 chars to integer next six to a string and rest
    to another string.
    I think now you can understand my concept. So I'll not tell every thing.(if you want i can fully describe it)
    I' feeling this is very bad way to do that kind of work.
    Am i correct?
    so can you give me some hints or examples to do such kind of things.

    Here's a simple DataInputStream program that talks to itself. It runs the server as a seperate thread.
    import java.io.*;
    import java.net.*;
    public class DataXfer
            private int port = 5050;
            private String address="127.0.0.1";
            public static void main(String args[])
                    new DataXfer().startup();
            // run the server code as a thread and then run the client code
            private void startup()
                    new Thread(new Runnable(){public void run(){listen();}}).start(); // start server thread
                    synchronized(this){
                            try{wait();}catch(InterruptedException ie){}    // wait until its ready
                    connect();                                      // do client stuff     
            private void listen()
                    ServerSocket ss = null;
                    Socket us = null;
                    boolean running = true;
                    try{
                            System.out.println("Listening on port "+port);
                            synchronized(this){notify();}               // tell client we're ready
                            ss = new ServerSocket(port);    // listen for incoming connection
                            us = ss.accept();
                            ss.close();
                            ss = null;
                            DataInputStream dis = new DataInputStream(us.getInputStream());
                            try{
                                    while(running){
                                            int len = dis.readShort();      // read the count
                                            byte [] ba = new byte[len];
                                            int rlen = dis.read(ba,0,len);  // read the data
                                            System.out.println("len="+len+" read length="+rlen);
                                            if(rlen < len){
                                                    us.close();
                                                    running = false;
                                            else{
                                                    for(int j = 0; j<rlen; j++)System.out.print(ba[j]+" ");
                                                    System.out.println("");
                            catch(EOFException ee){System.out.println("EOF");}
                    catch(IOException ie){
                            ie.printStackTrace();
                            System.exit(0);
                    finally{
                            if(ss != null)try{ss.close();}catch(IOException se){}
                            if(us != null)try{us.close();}catch(IOException ue){}
            private void connect()
                    Socket us=null;
                    byte [] ba = new byte[31];
                    for(byte i = 0; i<ba.length; i++)ba=i;
    try{
    System.out.println("Connecting to "+address+":"+port);
    us = new Socket(address, port); // make connection
    System.out.println("Connected");
    DataOutputStream dos = new DataOutputStream(us.getOutputStream());
    for(int j = 0; j<ba.length;j+=10){
    dos.writeShort(j); // write the count
    dos.write(ba,0,j); // write the data
    System.out.println("sent "+j+" bytes");
    try{Thread.sleep(1000);}catch(InterruptedException ie){}
    catch(IOException ie){ie.printStackTrace();}
    finally{
    if(us != null)try{us.close();}catch(IOException ue){}
    For an example of a chat program using NIO see my NIO Server Example. That example is neither short nor simple.

  • PLEASE HELP - Simple movieclip click to URL is NOT working... Why???

    I've tried over 4 tutorials to make my movieclip link to a URL. It's just not working for some reason...
    Here is my code.
    ondemand.addEventListener(MouseEvent.CLICK,goThere);
    function goThere(e:MouseEvent){
    var request:URLRequest = new URLRequest("www.money.net");
    navigateToURL(request);
    ondemand.buttonMode = true;
    ondemand.useHandCursor = true;
    stop();
    ondemand is a movieclip instance with a PNG image of text.
    This should work!! There are no compilation errors...
    No mouse cursor change on hover... just like nothing is there.
    Please help...   

    I am overall confused by your description of what you have, especially when you get to doubleclicking the movie and assigning code in it.
    In any case, you need to assign the name (the same name) to every instance of a tweened object. The lack of a name in earlier frames will be inherited by instances in subsequent frames
    I'm confused about your mention of 3 instances being in the library.  Just for clarity, an instance is a library symbol (or an object) that you place on the stage.  If you place two of the same objects on the stage, then you have 2 instances.  Items in the library are instance-wanna-bes.  If you have three different symbols in the library, and you are tweening them as if they were the same, your tween can't possibly work.

  • PLEASE HELP - VIDEO QUESTION

    hey
    a while ago my mate downloaded music videos to a cd for me and i put them on itunes and then converted them to fit the ipod as they wouldnt go on the ipod, but when i converted them the sound disappeared. anyone know what i can do? i watch the music videos but theres no sound, and on my ipod theres also no sound when i watch them.
    PLEASE HELP
    Dell   Windows XP  

    hiya!
    it sounds like you might be running into the following problem:
    iPod plays video but not audio of some exported files
    were the original files muxed?
    love, b

  • PlEASE HELP EASY QUESTION: unload event is not firing at all.

    Hi, onUnload event is not firing in Safari browser. I tried with different ways to capture that event but i failed to capture that event. So please help me on this, give suggestions to capture that event. Or any other event is firing when window is closing. Actually, i need to execute when window is closing. But in Safari the window is closing without firing of any events.

    Safari doesn't execute the unLoad action when closing windows, period!
    It only executes it when loading another page.
    I might be wrong but I think Safari doesn't allow you to close a window with Javascript at all. All close events are blocked.
    Maybe a SWF file can do it somehow. But I'm not sure...

  • Please help, simple requirement using Layers, there must be a solution?!

    Hi, I am using a trial version of Adobe Acrobat X Pro, with a view to purchasing the program for several members of my staff. However, it does not seem to be able to do something fairly simple which I need.. unless someone can help please! I work with maps that come to me as pdfs, and I need to be able to add text items (with arrows) to these maps that are then visible only when certain layers are selected in the new pdf, so that the three sub-contractors I distribute our completed maps to can view either all the text/arrows we have added, or only the info relevant to them if they prefer.
    We've tried saving three maps each with different info on then importing them as three new layers to the original map, but that doesn't give the functionality to interchange views and it's very time-consuming. We've tried using InDesign on trial version but the layers are messy in the exported pdf (adds obsolete layers as a 'feature', the administrator in the InDesign forum said). I've experimented with the pre-flight functions in Acrobat Pro but found them not so user-friendly. Is there a way to select some text items and export them to a tiff with transparent background, then import these as a new layer perhaps? Or please someone tell me I'm being stupid and this was addressed in a simple function since Acrobat v2?!

    Thanks all, I do appreciate these feedbacks, but I am struggling to understand the analogy between a car and iPad. When buying a car in a different location, you are adviced of all the features and then you take a decision if you are okay with it or not. But this was not the case with the iPad. I only found that out after a while being that it is my first iPad. Of course I will not make this same mistake again but I find it challenging that there are no provisions for correct this facetime issues for none residents.
    I assume as you have all continiously stated that I may not make a difference on this as a lone voice but if Apple can consider making it possible for none residents or insisting that this is explicitly mentioned at the point of sales in Duabi for Apple products then it begins to be fair. In the car example, you are at least sure that certain feutures are unavailable and do not realize this after the purchase is done and you are back to your home country.
    I also think saying "Dubai iPad" might not be correct as I always believed I was dealing with Apple product which out to give same level of satisfaction accross the globe....
    I am a frequent traveller and really it would not have been inconveniencing not to buy this iPad when I did as I could have bought it from the UK, US or SA.....but just thought iPad was iPad everywhere.
    Again why do I really have to buy another one? These cost money. And I do not have a shop to sell it as a non-facetime ipad. I would have expected apple center to receive these ipads and replace them or correct them.....
    I am just listing this out incase the Apple team can see some sence in what I am saying. There are a number of ways this current situation would have been avoided for people like me.
    Regards

  • Please help , A question that i got no answer for

    Okie here is ma problem i wanna know if its possible or no way
    we know that the Select * from table will retrieve all column , and if i wanna retrieve a specific columns i will have to mention it after the select keyword
    but here is the question
    i got table that contain loads of column and i wanna a query that will retrieve all column but one for example
    i have table name , job , sal , hiredate , phone , id .....etc
    i wanna to type select * from table to retrieve all those column without retrievin phone column
    so is theere iis a away to drop the visability of column with select * !
    i wanna some think like in a logic
    select * from table except column phone << so how to do this and please put in your consideration that columns are so much and i dont wanna type them all

    In SQL*Plus, command of hiding is COLUMN column_name NOPRINT.
    http://download-west.oracle.com/docs/cd/B19306_01/server.102/b14357/ch12013.htm#i2697128
    Is this your help?
    SQL> desc scott.emp
    Name                                      Null?    Type
    EMPNO                                     NOT NULL NUMBER(4)
    ENAME                                              VARCHAR2(10)
    JOB                                                VARCHAR2(9)
    MGR                                                NUMBER(4)
    HIREDATE                                           DATE
    SAL                                                NUMBER(7,2)
    COMM                                               NUMBER(7,2)
    DEPTNO                                             NUMBER(2)
    SQL> column hiredate noprint
    SQL> column comm noprint
    SQL> column sal noprint
    SQL> select * from scott.emp where rownum <=5;
         EMPNO ENAME      JOB              MGR     DEPTNO
          7788 SCOTT      ANALYST         7566         20
          7369 SMITH      CLERK           7902         20
          7499 ALLEN      SALESMAN        7698         30
          7521 WARD       SALESMAN        7698         30
          7566 JONES      MANAGER         7839         20

  • PLEASE HELP- flashing question mark in folder

    Hi everyone,
    last night I was just on my macbook as usual and suddenly it froze, so I turned it off. When i went to turn it back on, all that appeared was a flashing question mark in a folder.
    I have tried all the suggestions on this page http://docs.info.apple.com/article.html?artnum=58042 , but none of them worked because it didn't even recognise/find the harddrive in the disk utility section. I don't have apple care ($419 is a lot of money for a student!) but I only bought the macbook about 6 months ago, so it is still within warranty. What should I do now?
    Any help is much much appreciated!
    Melissa

    Melissa,
    I just had the same exact problem last night too. I called the apple technical service number and nothing they did helped because the hard drive wasn't found. I even got a fire wire cable and tried to hook my MacBook up to another Mac and tried the target disk mode hoping I could pull off data that I needed, but the other mac couldn't find the disk either. I'm kind of worried about losing some of my data. If you could let me know if you find any solution that would be awesome! I plan on going to the apple store this weekend to get it looked at.
    -Michelle

  • Need help , simple question

    how to implement "if else "operation in JSF pages.
    Because i want to show different sub pages in the same JSF page depends on different cases. Help me please.

    The simplest way is using the rendered attribute such as:
    <h:panelGrid rendered="#{foo.bar}" >
    </h:panelGrid>
    <h:panelGrid rendered="#{! foo.bar}" >
    </h:panelGrid>
    Actually, you can use jstl tags, but you have to provide the ids for each inner components.
    Sergey : http://jsfTutorials.net

  • Please help, simple flash intro

    Hello,
    I have an intro page which consists of two layers. one with
    an image that fades in the other with the stop action.
    When I upload the movie to the site the loading time is 15
    seconds (blank screen)
    Please could some one help me with a adding a preloader
    layer? so that veiwers know to wait. I can't seem to get one to
    work through tutorials.
    Thanks in advance.

    What you would need is more something like preload frames.
    Evry frame will/can be displayes only after its content has
    been (down-)loaded, so you have to make a frame without the image
    before the frame with the image.
    A frame with text like "pleas be patient image is loading",
    that extends (layer-wise) to the frame where your image appears
    first would be the simplest solution.

  • Please help, few questions on JDI

    Hi,
      I am quite new to JDI and have the following questions which might be silly to you..but these helps me in better understanding of JDI.
    1. Can a track has Multiple SC's?
    2. say if i have a clustered environoment, since we are able to define only one runtime system for production, how are we going to transport to the remaining systems in cluster?
    3. Should a developer import the DC every morning he comes to work?
    4. When does a developer really uses DTR, I mean ofcourse it is used internally by development configuration to maintain the code, but since he will be dealing with development configurations.. it is not really necessary for him to access DTR directly until and unless he wants the prev versions of code. Am I Right?
    5. when a developer 1 creates a DC X with an activity and uses "CHECK IN" on the context menu of the activity, will the developer 2 be able to access the DC X? or should he wait until the developer1 releases the activity.
    6. Is it really necessary to maintain DC's locally in NWDS or is it ok to maintain them in Development configurations?
    I hope that you can help me with your suggestions.
    Thank you
    Shiva

    Hi Sidharth,
      First let me thank you for the reply.
    Following are my comments
    1. OK
    2. OK
    3. I mean, Since the developer doesnt have any code in the local desktop, every morning when he comes to work, he should login and get the dev configs.
      I think the answer for this is "YES". am i right?
    4. I mean, when would it be necessary for me as a developer to use DTR perspective at all? because I am dealing with the Dev configs and any changes and checkins etc.. is done automatically.. I need not go to , DTR perspective to do this. isnt it? if "yes" then when wud a DTR perspective be useful for me.
    5. Got it
    6. But local DC's will be automatically created whenever you import a Dev config and create a new DC in that Dev configuration. Am I right? i.e. although I am disconnected from Central Infrastructure, I will be having DC's locally. isnt it?
    Thank you

  • Please help! --Question about lauching application by JavaWebStart

    Hi,
    I am a new user of the Java Web Start technique. When I tried to launch my application by it, I got the error of
    javaw.exe -- Application error
    "the instruction" at "0x5006bf974" referenced memory at "0x000000e7f". The memory could not be "read"".
    Could anyone tell me what is the cause of this problem and how to fix it? Many thanks!
    Ling

    I'm having the same problem. Specs are:
    Win2K SP2
    IBM Pentium 4 1500 MHZ 512MB RAM
    Java Web Start 1.01
    JRE 1.2.2 and 1.3.1_02 and 1.4.0_01 (setting default to any of these results in the same problem).
    Any help is appreciated.
    Lon

Maybe you are looking for

  • Problem with flash player in firefox 12

    Problem with flash 11.3 (beta 1,2) in firefox 12. Works in all other browser. Screenshots http://i.imgur.com/OZXvQ.png http://i.imgur.com/VwUzk.png http://i.imgur.com/XbXgV.png http://i.imgur.com/dOT3w.png http://i.imgur.com/aGgg8.png Win 7 Ultimate

  • How to connect Cam to Video to Satellite L655D?

    My daughter has a Toshiba Satellite L655D and wants to get Video footage she has shot on a Sony DCR-HC51 camcorder onto her system. The camera supports DV iLink s400 with a 4 pin IEEE1394 firewire connector. The laptop however doesn't appear to have

  • All or parts of character not printing in Windows 8

    HP DeskJet 6840 printer worked fine under Windows 7 but now on Windows 8, in some instances, parts of the first character in a line are missing and occasionally further missing characters across some lines.  In some cases, the top part of characters

  • Error ORA-29855:

    when i try to create index ihave an error below this: ORA-29855: error occurred in the execution of ODCIINDEXCREATE routine ORA-20000: ConText error: DRG-11422: linguistic initialization failed DRG-00100: internal error, arguments : [52100],[drxf.c],

  • PO item should not be change in case of change PO if ASN has created

    Hello Experts, We have implemented MM-SUS. We are facing a problem, A PO consist of 2 items on different delivery date, Vendor has created a ASN For first item. Now the ASN is pending for 2nd item on require delivery date. In between, Purchase change