How to show single quote on a JSP page

Currently I am using javascript together with java codes.
here is the snippets.
var TREE_NODES = [
['<%=dirName%>', null, null,
          <% path +=(String)dirname.get(i);
               System.out.println(" Path Name is "+path);
               if (tem.checkdir(path))
                    Vector subFold = new Vector();
%>
I try to replace \' but it doesnt work cos this will caus this part ( ['<%=dirName%>', ) to end abruptly causing the page to be faulty...
hope that someone can help me out with this.

dirName has a ' in it, right?
<%= dirName.replaceAll("\\\'", "\\\\\\\'"); %>

Similar Messages

  • How to concatenate single quote with any field like 'VBAK'

    Hi,
    How to concatenate single quote with any fields.
    say for example I have table name as MARA, I have to pass that table name to other fields with single quote , like I have to pass that as
    tab name = 'MARA'.
    but how to do this,
    below statement will not work
    concatenate '''  'MARA'   ''' into string.. it's giving syntax error...
    Regards,
    Mrunal

    gv_name = 'MARA'.
    gc_quote = '''.
    CONCATENATE gc_quote gv_name gc_quote INTO value.
    Pushpraj

  • How to do The quotes and subscripts in pages??

    Hi guys,
    I don't know how to do the quotes and subscripts in pages for iOS...
    Someone can tell me this??
    Sorry for my English, I'm not American...

    You can create left and right single quotes with option + }, and shift + option + }, respectively.
    Double quotes work the same way using the { character substituted above.
    Menu > Format > Font > Baseline:
    Superscript is control + command and +
    Subscript is control + command and -

  • How to show "ALL" Values by default in Page Drop-Down Lists in Pivot Tables

    Hi Everyone,
    Iam stuck with 1 problem please can any 1 help me if u know the solution.
    Here is my problem:
    How to show "ALL" Values by default in Page Drop-Down Lists in Oracle BI Pivot Tables?
    For example, if you place Region in the pages area, a Region drop-down list allows the user to select a particular region, and see the data for only that region, rather than seeing all the Regions,But by default its not showing "ALL" option in the drop down list ,rather than doing that its showing result for only 1 region by default.
    And an other problem with this pages area is, if we palce the multiple attributes in the Pages area in the pivot table, the (Fields)result is showing in vertically, the attributes 1 by 1(Every attribute in a new line) ,rather than showing like that, is there any way to show the results in horizantally?(We want to have it as a seperate drop drown list for every field horizantally not as a concatenated list).

    Thanks Nikhil. But I am fetching the values from the LOVCache.java.
    I am using <af:selectManyChoice>. Is there any way I can use LOVCache.java value for selecting default values instead of hard coding?
    I mean to say can I write
    unselectedLabel="#{LOVCache.entityTypeSelectionList.anyValue}"
    where LOVCache.entityTypeSelectionList is used to populate the drop down box.
    Regards,
    Aseet

  • How do i use Connection pool in JSP pages

    Hey everyone,
    I am using a connection pool in my web application. I am using DbConnectionBroker from Javaexchange.com. It has a class that creates a connection pool available for the servlets. I am trying to figure out that how to use connection pool within the JSP pages if I want to connect to the database. In the servlets i am using DBConnectionBroker pool = (DbConnectionBroker) getServletContext().getAttribute("dbPool") to get database connection. How Can i use this in JSP page to get a db connection.
    Thanks

    If the reference to the connection pool is already stored as an ServletContex attribute, try:
    <jsp:useBean id="dbPool" scope="application" class="com.javaexchange.dbConnectionBroker" />
    <%
    Connection con = dbPool.getConnection();
    %>

  • How we can generate dynamic menu in jsp page

    Hi all,
    how we can generate dynamic menu in jsp page.
    Thanks
    Manjinder

    by reading more about them on the web or in a good book, OR BY HIRING SOMEBODY TO DO SO. ;)

  • HOW to send a value to another jsp page

    HOW to send a value to another jsp page, like user name in one jsp page to another jsp page

    In the most simplest form...
    // pageA.jsp
    <html>
    <body>
    <form action="pageB.jsp" method="post">
    <b>First Name:</b> <input type="text" name="FNAME" value="Joe">
    <input type="submit" value="Submit">
    </form>
    </body>
    </html>
    // pageB.jsp
    <html>
    <body>
    <b>Name:<b> <%=request.getParameter("FNAME")%>
    </body>
    </html>

  • How to replace single quote with double quote

    hai all,
    i have a problem,
    i am trying insert a string containing single quote into ms-access database.
    it is giving error.
    how can i avoid this .if i replace a single quote in the text with double quote it will defenitely
    insert into database.
    in java.lang.String
    replace () will not work to replace quote with double quote.
    any otherway to solve this problem.
    please mail me to [email protected]
    thank you
    sambareddy
    inida

    java.lang.String.replace () will not work to replace quote with double quote.Really?
    String x = ...
    x.replace( "'", "\"" );

  • How to handle single quote between two single quotes in ABAP?

    Dear SAP Gurus
    I have a question regarding handling a string data.
    Say I have a string  ABCD'\&%$!!ABC'AAA123.   Please notice that there are single quotes in my string.
    I am writing a parser code in ABAP and getting into problem with if statement to check if the character read is a single quote.
    When I type the following with a singleQuote between 2 singleQuoes as below, it gives error.
    If CHAR = '''.
    ENDIF.
    How do I handle that? I searched for escape sequence and couldn't get any useful info.
    Any feedback will be highly appreciated.
    Thanks
    Ram

    Or just use string literals
    if char = `'`.   "note that ` is the "backquotation" mark not a regular quotation mark '
    Regards
    Marcin

  • How to open single quote, how to open single quote

    Tried to use single quote marks on keyboard using the apostrophe key but this just places the opening mark comma level how do I do this??  I need to for my uni assignment thanks in advance!!! New MAC user :-)

    What application are you using? In most word processors and page-layout apps, there's the option to turn on "smart quotes"...
    Clinton

  • How to insert single quote in to the table

    Pl help me out in how to insert the single quote ie ' into the table. If there is no other way, i will go for some other alternative
    Regards,
    Basavaraju

    SQL> desc varchar2_test
    Name                                      Null?    Type
    TEXT                                               VARCHAR2(4000)
    SQL> insert into varchar2_test values ('''ABCDEFGHIJ''');
    1 row created.
    SQL> select * from varchar2_test;
    TEXT
    'ABCDEFGHIJ'Thanks,
    BB

  • How to put single quotes around selected data

    Is there a way to return selected column value with single quotes around it?
    Example I have a table:
    select name from test_table;
    returns: George Clooney
    I want it to return 'George Clooney'
    I tried: select '''||name||''' from test_table;
    returns: '||name||'

    ...or
    SCOTT@demo102> select chr(39)||ename||chr(39) from emp;
    CHR(39)||ENA
    'SMITH'
    'ALLEN'
    'WARD'
    'JONES'
    'MARTIN'
    'BLAKE'
    'CLARK'
    'SCOTT'
    'KING'
    'TURNER'
    'ADAMS'Nicolas.

  • How to disply Single Quote?

    In the web page , I want to display "Don't worry".
    I used 3 ways to do so. But none of them works.
    Way 1. solutionadvisorentry.label4=Don't worry
    Way 2. solutionadvisorentry.label4=Don\t worry
    Way 3. solutionadvisorentry.label4=Don\\'t worry.
    Any advice?
    Thanks,
    Aaron

    In the web page , I want to display "Don't worry".
    Way 1. solutionadvisorentry.label4=Don't worryWhat does that display?
    Way 2. solutionadvisorentry.label4=Don\t worryWhy should that display "Don't worry" when there isn't a single-quote character?
    Way 3. solutionadvisorentry.label4=Don\\'t worry.Why should that display "Don't worry" when there isn't a single-quote character?
    Did you try
    Way 4. solutionadvisorentry.label4=Don\'t worry?

  • Do you know how to reload a frame from a JSP page?

              I've build a tree view in java that shows the correct JSP page, it's like a configuration
              page. The problem is that when I want to update the frame, I don't know how to
              do it without press the reload button of the browser.
              Thank you very much in advance. I hope you can help me.
              

              "Ivan Fontanals" <[email protected]> wrote:
              >
              >I've build a tree view in java that shows the correct JSP page, it's
              >like a configuration
              >page. The problem is that when I want to update the frame, I don't know
              >how to
              >do it without press the reload button of the browser.
              >
              >Thank you very much in advance. I hope you can help me.
              Try to use HTML-tag:
              <META HTTP-EQUIV="refresh" CONTENT="60" RL="...">
              Best regards,
              Igor
              

  • How to create editable select box in jsp page

    hi,
    i got som peculiar requirement in my jsp page.i have my page like this.
    <html>
    <body>
    <form name="test">
    <select name="test">
    <option value="one">USA</option>
    <option value="two">India</option>
    <option value="three">UAE</option>
    </select>
    </body>
    </html>
    this is one of the select box in my jsp page.
    now i want to change the look and feel of select box..
    1-dont want to show the scrollbar means the right side arrow which allows to see the total options in select box.
    it should look like normal text box.
    2-roveer apert from the existing values if there is no matching value user must be allowed to enter his own value in above select box..
    how i can solve this problen..
    regards,
    sam

    Is that maybe a browser memory auto-complete thing? It works on Netscape 7.2. But no, it's not a browser auto-complete thing (does NS have that? IE does... either way, I would've disabled that). It's definitely a Javascript trick, I'm sure of that. I know I haven't sent mail to all people in my address book from my work PC, but it doesn't stop them from showing in the list as I type...
    Unless there is a special HTML tag option or browser extension that I've never heard of that allows you to supply a set of values to a text input field for auto-completion (as opposed to the browser remembering what was typed).

Maybe you are looking for

  • Calendar App shortcut

    Ok, let's be intuitive here. If there's a great and convenient back swipe gesture on the Pre, which I love, why not use it? For instance, in the Calendar app (which I again love), If I go: Month view -> Week view -> Day view I should be able to back

  • Can Apple TV be used in Cayman Islands?

    Hi, I want to purchase Apple TV but before I do, I want to know if the subscriptions such as Netflix and HBO are available to users in Cayman Islands. Thanks!

  • Mac Mini Sound problem

    Hi all, i have a mac mini early 2009, the sound dont work and i run apple hardware test and show me following error  4mot/1/40000002 master-0 Any ideas to solve it or explaint what happen? Thanks for the help

  • Problems in extracting data from r/3

    Hi Guys I am extracting data from r/3(QA) to BW(QA), into an ODS. Now, my previous load failed but i saw from RSMO that the load had more than 4 million records. I am scheduled the load again. And in monitor(RSMO) it says: (yellow symbol) 17:24:50 (

  • Informix 7.X To Oracle 9i

    Hi All, I'm in the process of migrating the data from Informix 7.X databse to Oracle 9i. I need to migrate data from selected columns and selected tables only from the informix schema.The data migration deals with Huge volumes[ Around 50GB ] of data.