It is just a simple if statement Why it is not working?

I have a problem of not displaying a text once a simple condition is right, here is my code:
<%
  String[] q1 = request.getParameterValues("q1");
  String t="t";
  for (int i = 0; i < q1.length; i++) {
       if(q1=="t")
     {out.print("Good");} }
%>one of the q1 values is "t", so why i am not getting the "Good" text?
Anyone can help me...?
Thank you
Adam
Edited by: AQ_Java on Feb 5, 2008 2:15 AM
Edited by: AQ_Java on Feb 5, 2008 2:23 AM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

try, if(q1.equalsIgnoreCase("t"))

Similar Messages

  • CTRL+P requires manual tab focus when printing a PDF within FF4. This worked fine in FF3. Why does it not work any more? Thanks!

    Hi,
    CTRL+P requires manual tab focus when printing a PDF within FF4. This worked fine in FF3 - i.e, you could just select the tab. Why does it not work any more? Thanks!

    Hi
    https://discussions.apple.com/thread/4325038?tstart=0
    CCT

  • I just bought more icloud storage, why does it not let me backup my iPhone 5..says i need 1.4 GB of space

    i just bought more icloud storage, why does it not let me backup my iPhone 5..says i need 1.4 GB of space?..I just bought 10 more in icloud.

    I think you are confused. Syncing apps and music to your phone will not get store in the cloud by adding more cloud storage. If you don't have enough space to sync the music and apps, buying cloud storage won't help. If you have a 16GB phone, the phone still only has 16GB for apps and music even if you buy 10 mor GB of cloud storage.

  • Unsure why this is not working?

    Can anyone give me a pointer as to why this is not working? I put the code from line 16 through 50 in the "...before displaying the page" additional pl/sql section of the wizard. The form wizard created the code from 5 through 15 and 51 through 55. The first error I understand because I think the wizard forgot to end the procedure correctly by saying "end beforeModuleDisplay;" instead of just putting "end;".
    If I am right, how can I fix this since the wizard is the one putting in this info? I tried putting the correct end statement in where I put the rest of my code, but that created even more errors.
    Error creating package SOCSBO_USER.ACCT_INFO
    Error creating package SOCSBO_USER.ACCT_INFO
    Line/ColumnError
    56/5PLS-00103: Encountered the symbol "PROCEDURE" when expecting one of the following: begin declare end exception exit for goto if loop mod null pragma raise return select update while <an identifier> <a double-quoted delimited-identifier> <a bind variable> << close current delete fetch lock insert open rollback savepoint set sql execute commit forall <a single-quoted SQL string> The symbol "declare" was substituted for "PROCEDURE" to continue.
    2128/5PLS-00103: Encountered the symbol "END" when expecting one of the following: begin function package pragma procedure form
    -- PACKAGE BODY SOCSBO_USER.ACCT_INFO
    -- created Monday 05-NOV-2001 16:52
    create or replace
    1 package body ACCT_INFO as
    2 --
    3 -- Created by ASAPP using WebDB at 15:16:46, Mar 04, 2002
    4 --
    5 procedure beforeModuleDisplay
    6 (
    7 p_block_name in varchar2,
    8 p_object_name in varchar2,
    9 p_instance in integer,
    10 p_event_type in varchar2,
    11 p_user_args in varchar2,
    12 p_session in out PORTAL30.wwa_api_module_session
    13 )
    14 is
    15 begin
    16 declare
    17 l_fs varchar2(200);
    18 l_cv varchar2(200);
    19 l_sv varchar2(200);
    20 l_lang varchar2(100);
    21 l_idx integer;
    22 begin
    23 l_lang := portal30.wwctx_api.get_nls_language;
    24 l_fs := p_session.get_value_as_varchar2(
    25 p_block_name => 'DEFAULT',
    26 p_attribute_name => '_FORM_STATE');
    27 l_cv := p_session.get_shadow_value(
    28 p_block_name => 'DEFAULT',
    29 p_attribute_name => 'A_ACCOUNT_COURSE',
    30 p_language => l_lang);
    31 l_sc := p_session.get_shadow_value(
    32 p_block_name => 'DEFAULT',
    33 p_attribute_name => 'A_ACCOUNT_SUBPROJECT',
    34 p_language => l_lang);
    35 if upper(l_fs) = 'UPDATE_AND_DELETE' then
    36 l_idx := row_function.get_index('COURSE_BOTTOM');
    37 if upper(l_cv) = 'Y' then
    38 p_form.items(l_idx).visible := 'Y';
    39 else
    40 p_form.items(l_idx).visible := 'N';
    41 end if;
    42 end if;
    43 if upper(l_fs) = 'UPDATE_AND_DELETE' then
    44 l_idx := row_function.get_index('SUBPROJECT_BOTTOM');
    45 if upper(l_sv) = 'Y' then
    46 p_form.items(l_idx).visible := 'Y';
    47 else
    48 p_form.items(l_idx).visible := 'N';
    49 end if;
    50 end if;
    51 exception
    52 when others then
    53 PORTAL30.wwerr_api_error.add(PORTAL30.wwerr_api_error.DOMAIN_WWV,'app','generic','SOCSBO_USER.ACCT_INFO.beforeModuleDisplay', p1 => sqlerrm);
    54 raise;
    55 end;
    56 procedure row_function
    REST OF CODE NOT RELEVANT

    Hello Albert,
    You open a new pl/sql block on line 16, but you have only one 'end' statement.
    You can correct this by adding another 'end' statement after line 55 or you can remove the inner PL/SQL block and place it in the procedure itself. Variables can be declared after 'is' on line 14. In your example it's better to do it this way. See example.
    Hope this helps...
    Nancy.
    Example solution 2:
    -- PACKAGE BODY SOCSBO_USER.ACCT_INFO
    -- created Monday 05-NOV-2001 16:52
    create or replace
    1 package body ACCT_INFO as
    2 --
    3 -- Created by ASAPP using WebDB at 15:16:46, Mar 04, 2002
    4 --
    5 procedure beforeModuleDisplay
    6 (
    7 p_block_name in varchar2,
    8 p_object_name in varchar2,
    9 p_instance in integer,
    10 p_event_type in varchar2,
    11 p_user_args in varchar2,
    12 p_session in out PORTAL30.wwa_api_module_session
    13 )
    14 is
    15 l_fs varchar2(200);
    16 l_cv varchar2(200);
    17 l_sv varchar2(200);
    18 l_lang varchar2(100);
    19 l_idx integer;
    20
    21 begin
    22
    23 l_lang := portal30.wwctx_api.get_nls_language;
    24 l_fs := p_session.get_value_as_varchar2(
    25 p_block_name => 'DEFAULT',
    26 p_attribute_name => '_FORM_STATE');
    27 l_cv := p_session.get_shadow_value(
    28 p_block_name => 'DEFAULT',
    29 p_attribute_name => 'A_ACCOUNT_COURSE',
    30 p_language => l_lang);
    31 l_sc := p_session.get_shadow_value(
    32 p_block_name => 'DEFAULT',
    33 p_attribute_name => 'A_ACCOUNT_SUBPROJECT',
    34 p_language => l_lang);
    35 if upper(l_fs) = 'UPDATE_AND_DELETE' then
    36 l_idx := row_function.get_index('COURSE_BOTTOM');
    37 if upper(l_cv) = 'Y' then
    38 p_form.items(l_idx).visible := 'Y';
    39 else
    40 p_form.items(l_idx).visible := 'N';
    41 end if;
    42 end if;
    43 if upper(l_fs) = 'UPDATE_AND_DELETE' then
    44 l_idx := row_function.get_index('SUBPROJECT_BOTTOM');
    45 if upper(l_sv) = 'Y' then
    46 p_form.items(l_idx).visible := 'Y';
    47 else
    48 p_form.items(l_idx).visible := 'N';
    49 end if;
    50 end if;
    51 exception
    52 when others then
    53 PORTAL30.wwerr_api_error.add(PORTAL30.wwerr_api_error.DOMAIN_WWV,'app','generic','SOCSBO_USER.ACCT_INFO.beforeModuleDisplay', p1 => sqlerrm);
    54 raise;
    55 end;
    56 procedure row_function
    REST OF CODE NOT RELEVANT

  • Why does abode not work on my galaxy tab2

    Why does abode not work on my galaxy tab 2?

    The games dont load they just say I need to update to the latest version or say that it is not compaterble with it.

  • Why it is not working?

    hai all,
    i am new to jsp. please help me with the necessary corrections of the code given below.
    <%@ page import="java.io.*, java.sql.*" %>
    <%
         ResultSet rs;
         Class.forName("oracle.jdbc.driver.OracleDriver()");
         Connection Con=DriverManager.getConnection("jdbc:oracle:thin:@192.168.x.xx:1521:new","old","new");     
         Statement st=Con.createStatement();
    %>
    why it is not working
    Thanks in advance.
    by
    ramki.

    I think you have to put the variables definition (rs, st, con...) in a specific place like this, i mark with (*) what i changed:
    <%! (*)
    ResultSet rs; (*)
    Connection Con; (*)
    Statement st; (*)
    %> (*)
    <% (*)
    Class.forName("oracle.jdbc.driver.OracleDriver()");
    Con=DriverManager.getConnection ("jdbc:oracle:thin:@192.168.x.xx:1521:new","old","new");
    st=Con.createStatement();
    %>
    good luck,
    javi

  • Why ps3 is not working well with airport

    why ps3 does not work well wth the airport?

    If you are referring to online gaming, then PS3 like all non-apple devices uses upnp to open ports.
    Apple uses NAT-PMP to open ports.. East and West.. never the twain shall meet.
    If it is internal wireless issues.. that is different.. airport should be just like any other wireless router.
    If you tell us the issue we have more hope to help.

  • No earbuds work for the left side...why dis it not working?

    My sons and husbands iphones work just fine with earbuds that dont work on mine. Why is mine not working? Earbuds used to work but not anymore.

    Melinda1933 wrote:
    It couldnt be that cause they work just fine on my hisbands iphone. Im wondering if it can even be fixed! But its nothing i can fix with teouble shooting. Thanks though.
    Read my post again
    CHECK the earphone socket on YOUR iPhone
    The small round hole on top on left that is where the earphones are not working of course they work on
    another iPhone that is not the one wityh a problem
    If it is not debris it could be software  do the troubleshooting ..........

  • Why is FaceTime not working in UAE

    Why is FaceTime not working in UAE ?
    Also is iMessage working ? In UAE ?

    OMG... Your answer doesn't help.
    I am using Mac for 25 years and supported so many users that I do understand what the word Help means...
    The fact that a gov doesn't allow the use, doesn't mean it is also not allowed worldwide and the telephone is supposed to work worlwide, be sold in another country one day where Facetime is welcome.
    North Korea doesn't not allow cellphone, so it must be bad to use it there, isn't it?
    By the way I have the solution via http://www.macworld.com/ forum but it is not allowed so... in mp the answer you will get, young Padawan, just if HELP is required.

  • Why my app not work in new version, Why my app not work in new version

    I just update to new version software ios6.0 for my iPad, but I found that few of my apps downloaded before are not working now, how can I do now?

    Lily yu wrote:
    Why my app not work in new version
    Ummm..I think that's obvious...the developer hasn't updated them to work with iOS 6

  • Why is Adobe not working after I've downloaded the recommended updated version??

    Why is Adobe not working (I don't get even a picture!!, let alone audio) after downloading the recommended "updated version?"

    When I try to read the news clips...like OMG, or any of the "gossip" that involves a short video clip, a screen pops up saying that there's a new version of Adobe, which I should update to.  So I updated it...by the usual clicking where it says to click and I can see the new version being added.  But, after it's finished updating, I don't get even a picture...or sound...of the usual OMB lady speaking, nor do I get the video clips of any of the "gosspi" items or trailers, or anything else.
    There's just a big, blank space where the video would normally be showing.
    I could see the updates taking place on a separate screen that pops up, too.  It took a minute or so to finish.  I've done it at least 5 times, but I still get just a blank space in place of the picture and sound that used to pop up!  (The video clip of the father who jumped out of a moving car to pick up his daughter, who fell out of the car onto the road, for instance, does not appear...just a blank space!)
    I hope this clarifies my problem.
    What's "OS?"

  • Why is scrolling not working with multiple youtube embeds layed out vertically in a stack on one page?

    Why is scrolling not working with multiple youtube embeds layed out in a stack on one page?

    Hi ,  
      This is a sort of performance issue , because your program takes more than the max time set for the program to execute in foreground.
    There are many stuff in program which will hamper your performance.
    I will list down a few
    1. SELECT *
    FROM konp
    INTO CORRESPONDING FIELDS OF TABLE konp_itab
    FOR ALL ENTRIES IN a363_itab
    WHERE knumh EQ a363_itab-knumh
    in this statement you are using for all entries a363_itab , but before this statement you are not checking if the table has any entry or not , please do remember that for all entries has this characterstic , that if you internal table does not contain any record , then all the records are selected from the database table. So in this case if you table a363_itab is empty , so what you want is no data must be seelcted from table konp , but what will happen is all the records in KONP will be seelcted.
    2. While retreiving data you are using seelct * even though you do not require all the fields , an example is
    <b>SELECT *
    FROM mkpf
    INTO CORRESPONDING FIELDS OF TABLE mkpf_itab
    FOR ALL ENTRIES IN mseg_itab
    WHERE mblnr EQ mseg_itab-mblnr.</b>
    in this your internal table contains only 2 fields
    <b>mblnr LIKE mkpf-mblnr, "Number of Material Document
    bldat LIKE mkpf-bldat, "Document Date in Document</b> , but to get these 2 fields you are selecting all the fields of the table.
    3. In select you are using into corresponding fields of table , it is not a good practice., so please avoidd it.
    Please understand that you must try to reduce the access to your database tables and try to keep it minimal , because this same thing may happen becasue data in DEV is very less compared to the volume of data in production , so a program working in DEV will take much more time in PRD if not written properly and may result in timeouts , as in your case.
    Please try to make chanegs to the prorgam and see if it works.
    In case you have more queries , please do revert back.
    Regards
    Arun
    *Reward points if replay is helpful

  • Why does iMessenger not work/takes ages to load?

    Why does iMessenger not work/takes ages to load?
    - done all the log in stuff (username and display name but then takes for ever to load so just give up!

    How has it stopped working?
    ARe you on wifi or cellular data?

  • Why does sound not work on my Mac Air?

    Why does sound not work on my Mac Air --all setting seem okay. OSX 10.9.2 operating systyem.

    Open System Preferences > Sound > Output
    Make sure the coorect output devices is selected and the Mute button is not checked.

  • Why youtube dose not work on my macbook pro 10.6.6?

    why youtube dose not work on my macbook pro 10.6.6 ?

    Double check you have the latest version of Adobe Flash.

Maybe you are looking for

  • [WIN7] Enable Microphone and "What U Hear" at the same time?

    Hey folks! I am trying to enable both at the same time on my Windows 7 in order to record Battlefield 2 and my own voice at the same time. Please do NOT start with "do this and that", I have tried everything for at least 1 year by now and the only wa

  • Sales Revenue by Profit Center

    Hi Gurus, Cd some one tell how to get or which extractors we need to look into pull Sales Revenues by customer by Profit Center. The Billing Extractors is not having Profit Center Info. At the same time this Revenues should match with GL Accounts Sal

  • No internet access, ping general failure, no IP address after SOFTWARE updates to Windows 7 on 15th April,2015

    Hi , I using windows 7 Home premium, and OS got updated yesterday night. Then on wards, i am unable to access internet and while pinging, its giving "General Failure". Why its happened? Is something wrong in the latest Windows 7 update? How to resolv

  • Basic shape tools defaults

    I'm using Illustrator CS4. After changing the number of points on the star and so forth, using the shortcut keys -- how do I get the basic shape tools to go back to their default settings? (In previous versions I was able to do that by clicking on th

  • Cloning of connector eBusiness Suite User OIM 11g r2

    Hi I did the cloning of the EBS connector using the feature of the OIM 11g r2 for cloning. I did  import the xml to cloning and was created all objects . I followed the steps in the document http://docs.oracle.com/cd/E23943_01/doc.1111/e14308/conn_mg