How to removing whitespace in jsp

hi,
i am loading a jsp file, which had some space at the beginning. i want remove the space, then i need ot parse the data, just like ignoreWhiteSpace in xml. can anybody help on this.
thanks
ayathas

Actually straight replacement will not work because it converts data to string because variables are expected.
So there are at least two ways to deal with it:
1. You can create a fake (unused) variable in JSP that prepends URL query - this way all the chars before will not interfere with reading variable:
  fake=fake&username=test&password=xxxxxxxx&result=true"
2. In your complete handler you can read variables in a loop and hold them in a separate object:
function completeHandler(e:Event):void
     var varObject:Object = {};
     for (var prop:String in e.target.data)
          trace(prop.replace(/^\W+/, ""), e.target.data[prop]);
          varObject[prop.replace(/^\W+/, "")] = e.target.data[prop];
     trace(varObject.password);

Similar Messages

  • Parsing CF tags - how to remove whitespace?

    I have an index.cfm in which I include additional CFM pages.
    index.cfm:
    </head>
    <cfinclude template="first.cfm">
    <cfinclude template="second.cfm">
    <cfinclude template="third.cfm">
    <cfinclude template="forth.cfm">
    <body>
    After executing the file:
    </head>
    <body>
    How can I remove these whitespace? For example first.cfm
    contains the following rows:
    <cfif isDefined("cookie.myCookie")>
    <cfif cookie.ZulzBeta neq "1234">
    <cflocation url="
    http://mypage">
    </cfif>
    </cfif>
    <cfif not isDefined("cookie.myCookie")>
    <cflocation url="
    http://mypage">
    </cfif>
    I know that using <cfscript> this problem won't happen
    but there are a lot of things that I'm not able to do with
    <cfscript>. What should I do?

    <cfprocessingdirective suppressWhiteSpace = "Yes">
    <cfinclude template="first.cfm">
    <cfinclude template="second.cfm">
    <cfinclude template="third.cfm">
    <cfinclude template="forth.cfm">
    <cfprocessingdirective suppressWhiteSpace = "No">
    <!--- Code for the rest of the page --->
    </cfprocessingdirective>
    </cfprocessingdirective>

  • How to remove whitespace in deamweaver in design view?

    m having this issue which is driving me crazy. when am looking at my code in design view in Dreamweaver, there is a space below my nav bar like this..... I do not understand how to get rid it?
    but it doent show in live view or the browser..... Edit fiddle - JSFiddle

    Don't expect much from Design view, it's merely a vague approximation.
    Trust your Browser preview.

  • How to remove the Page Item in thin Bean JSP

    Hi, I'm wondering how to remove the Page Item in JSP developed by BIBeans, since I have tried to remove the Presentation's Page Item in BiBeans Catalog, but with no result in JSP. Thank you!
    Jeff

    There are two ways to do this:
    1) If you want to remove and individual dimension from a presentation, you can hide the dimension. This can be performed directly from within QueryBuilder. Within the first section of Query Builder that shows the selected measures selected and associated dimensions, simply remove the required dimensions from the right dialog panel.
    2) To hide all page items within a presentation, simply add the following the property, pagingControlVisible="False", to the presentation tag in your JSP. For example:
    <orabi:Presentation location="Local Computer Sales/Products/KPI Sales Prior Period and Prior Year" id="BIProductKPIs_pres2" pagingControlVisible="False"/>
    Hope this helps
    Business Intelligence Beans Product Management Team
    Oracle Corporation

  • How to remove save, cancel option when end user runs the workbook in Portal

    Hi,
    how to remove save, cancel option when end user runs the workbook and make some small changes like using page items or increasing rows and columns
    I already made 2 changes
    1) I removed the option in Oracle Enterprise Manager under discoverer viewer of saving
    2) I also removed the option of Allow saving changes made in Viewer when adding workbook to portal
    But still the end user gets options of saving when made small changes to workbook like increasing rows and columns
    Is their any place, I need to make changes?
    Thanks in Advance
    Rowdheer

    Don't use JSP to serve a binary file. It almost implies the use of awful scriptlets and the invocation of both the response writer and the response outputstream which would only lead to IllegalStateException headaches in the server logs.
    Use a Servlet instead. Specify the file name as request parameter and let the servlet read the file and write it to the outputstream of the response.

  • How to remove Login, sites, register icons in the iStore page

    Hi,
    Can some one guide me in finding how to remove the Sites and Register icon that comes on the top of the iStore pages along with the logo on the left corner.
    Also i want to know how to change the jsp file of the Login icon that comes along with the Sites and Register icon in the top part of the iStore page.
    Please guide me in figuring out the solution for this requirement.
    Thanks
    ri

    Hi,
    No need to customize the ibeCCtdMenu.jsp to remove the icons, It is enough to change the Profile option "FND Branding size" to the value "Medium" or "Small".
    After changing the profile option value, bounce apache. The links will be dispalying now without icons. Try out this!!
    Rajarajan A

  • How to use EJB in JSP...urgent!!!

    hello,
    i am novice programmer in EJB.
    i am using weblogic 6.1 ...
    my problem is how to use EJB in jsp page.
    my code is as follow..but its not displaying any result.
    <%@ page import="javax.naming.InitialContext,
    javax.naming.Context,
    java.util.Properties,
    firstEJB.First,
    firstEJB.FirstHome"%>
    <%
         long t1 = System.currentTimeMillis();
         System.out.println(t1);
         Properties props = new Properties();
         p.put(Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.TengahInitialContextFactory");
         props.put(Context.PROVIDER_URL, "localhost:7001");
         Context ctx = new InitialContext(props);
         FirstHome home = (FirstHome)ctx.lookup("FirstEJB");
         First bean = home.create();
         String time = bean.getTime();
         bean.remove();
         ctx.close();
         long t2 = System.currentTimeMillis();
    %>
    <html>
         <head>
              <style>p { font-family:Verdana;font-size:12px; }</style>
         </head>
         <body>
              <p>Message received from bean = "<%= time %>".<br>Time taken :
              <%= (t2 - t1) %> ms.</p>
         </body>
    </html>
    please tell me the solution.

    Hi, I don't know if it may be the cuase of your problems, but you should narrow the Object obtained doing the lookup, like this:
    FirstHome home = (FirstHome) PortableRemoteObject.narrow(ctx.lookup("FirstEJB"), FirstHome.class);

  • Portal 7.3 masthead customization - How to remove Logoff dialog box "Are you sure you want to logoff?"

    Portal 7.3 masthead customization - How to remove Logoff dialog box "Are you sure you want to logoff?"
    I have recently upgraded our portal to 7.3 sps10 and we are using the Ajax framework
    I have a requirement to Remove the Logoff Dialog box "Are you sure you want to logoff?"
    I am able to Import masthead.war into NWDS and get the project ready for development with the appropriate jar and libraries.
    I am able to deploy the project also. I need help finding How to turn this dialog box off and just log the user off. I was able to accomplish this in Classic frame work page HeaderiView.jsp.
    I have looked at afpmasthead.org.sj and masthead.jsp. I am not a js/jsp developer.
    I can see the logoff dialog box being created but I am having trouble finding the logoff code.
    Please advise me on the code changes required to remove the  Logoff dialog box "Are you sure you want to logoff?" from the Ajax framework.
    Any help on this matter would be greatly appreciated.
    Thank you
    Sarah

    Thank you Troy for your Helpful Threads.
    Problem Solution:
    Followed the thread on How to download and change AFP Masthead on SAP Portal 7.3
    Located the file which contains the logoff code from thread http://scn.sap.com/thread/3265584
    The File with the Logoff coding in it is a Javascript file afpmasthead.js
    Identified logoff code without dialog box using this thread https://scn.sap.com/thread/3307601
    NovaDialogBox.performLogout();    (perform logoff)
    I was able to remove the Logoff dialog box Do you really want to logoff? And replace it with logging the user off.
    afpmasthead.js  All the code is on 1 line,  To fix this go to -->Source -->Format
    Comment out the following lines of code and replace with logoff code
    logoffLinkElement.onmouseup= function(aS) {
    logoffLinkElement.onmouseup= function(aS) {
    NovaDialogBox.performLogout();
    Sarah

  • How to remove blank spaces in the source code of my page?

    I created a page with the following code for testing:
    <dsp:page>
    <dsp:importbean bean="/atg/commerce/catalog/ProductLookup"/>
         <dsp:droplet name="ProductLookup">
              <dsp:param name="id" value="xprod2046" />
              <dsp:param name="elementName" value="product" />
              <dsp:oparam name="output">
                   <dsp:valueof param="product.DisplayName"/>
              </dsp:oparam>
         </dsp:droplet>
    </dsp:page>
    It only shows the product name in the browser. But if I look at the source code of my page he created 61 lines in response to this code, where a line is the product name and the other 60 have nothing.
    I know how to remove these lines that the ATG creates no content because my project is full of these empty lines.
    Anyone ever had this problem and could help me?
    Thanks

    Hi ,
    Yup this is a problem ,
    you can use following ways :
    1- use jsp comments eg :
    <dsp:page>
    <dsp:importbean bean="/atg/commerce/catalog/ProductLookup"/><%--
         ----%><dsp:droplet name="ProductLookup"><%--
              ----%><dsp:param name="id" value="xprod2046" /><%--
              ----%><dsp:param name="elementName" value="product" /><%--
              ----%><dsp:oparam name="output"><%--
                   ----%><dsp:valueof param="product.DisplayName"/><%--
              ----%></dsp:oparam><%--
         ----%></dsp:droplet><%--
    ----%></dsp:page>
    2- End tags at next line :
    e g :
    * <dsp:page
    * ><dsp:droplet name=”xyz”
    * ><dsp:oparam name=”output”
    * >Name: <dsp:valueof param=”abc”
    * /></dsp:oparam
    * ></dsp:droplet
    * ></dsp:page>
    3- Always use TAB instead of using SPACEBAR whie writing source code.
    4 - From JSP 2.1 onwards we have a page directive trimwhitespaces ( see if that works , i was not able to ), google for it for more info
    5 - You can modify your build scripts to remove white spaces from jsps while building EAR.(complex though, as you may not want to trim all white space.)
    6 - modifying the deployment descriptor.
    <init-param>
    <param-name>trimSpaces</param-name>
    <param-value>true</param-value>
    </init-param>

  • How to remove default Apply, OK and Cancel buttons in portlet edit mode.

    Hi,
    Iam facing problem in customizing default edit mode of portlet, my question is how to remove those default buttons and how to implement our own links for SAVE and CANCEL functionality. Because if we implement our own <form> in edit JSP page then default form will override our own <form> and default buttons works rather then our own forms.
    Please someone help me on this.
    Thanks
    Abhishek

    Ah, this one is easy, if im not mistaken, set this tag in your provider.xml
    <renderCustomize>false</renderCustomize>
    Defines whether RenderManager should automatically render the portlet's container (border and title) in "Edit" and "EditDefaults" modes before and after processing/invoking the page.
    This however means you have to write your own renderer for the customize page. Then you can add your own code for the buttons and the events behind them.
    I created my own derived container and added this line to my provider.xml
    <containerRenderer class="nl.rsm.eventCalendar.myContainerRenderer"/>
    This is however for rendering the showmode of the servlet, dont know if this is the same
    render class for the editmode.
    Do you realy need custom save functionality, Oracle also has something called DBPreferenceStore, you can store self defined attributes into the database. Perhaps this is sufficiant enough.
    anyway good luck, if you find out all the correct steps to take, please share, im also interested

  • How to remove the Sessions used in the application

    Hai Techies,,,
    i am using many number of sessions in my application, for example i am using 5 sessions in reports module
    my application is a web based application
    if can't remove the sessions it contains the huge amount of data , my application is going into mess, and the application performance will be decreased..
    Can anybody tell the solution for this Problem
    How to remove the Sessions used in the application
    Hoping a reply
    Thanks & Regards
    Krishna mangamuri

    Hai Gita,
    i am not able to do the session invalidate method bcoz, i am mainatainting the session from login along with the current userid who is login into the system and putting some of the data in session....
    thats session is to be valid upto when i click on logoff link
    except that i have to remove the sessions in my application
    while navigating from one jsp to another i have to remove the sessions, bit somes times that sessions may be used somewhere
    Can u Understand My problem
    session remove method may also helpful to me but some times it will casue some prob to me
    Is there any other Way to remove the sessions in the Application ????
    Thanks & Regards
    Krishna Mangamuri

  • How to remove a session-overflow cache entry?

    Hi,
    Customer wants to remove a session entry in session-storage cache as the following:
      NamedCache sessionStorage = CacheFactory.getCache("session-storage");
      sessionStorage.remove(oldSessionId);
    Is the entry related to the "oldSessionId"  in a session-overflow deleted together when a entry is removed in session-storage?
    If not, how to remove the entry in session-overflow?
    Thanks in advance.

    The reason for doing this is when ever i come to this user.jsp from account.jsp with a different account number this user.jsp is not refreshed and i still
    see the same old user.jsp for the previous account that i naviated before. Also please let me know if there is any other approach to acheive this taskDoes refreshing the page by pushing F5 solve the problem?
    If so, then the browser is caching the page, despite your attempts to stop it.

  • Firefox hangs on opening requiring force quit I have snow leopard mac It hangs when I try safe mode. I need to know how to remove all traces of firefox on my mac so I can reinstall. I have tried terminal as advised on firefox webpage. Please advise m

    Firefox hangs on opening requiring force quit I have snow leopard Mac It even hangs when I try safe mode. I need to know how to remove all traces of firefox on my mac so I can reinstall. I have tried terminal as advised on firefox webpage. Please advise me
    == This happened ==
    Every time Firefox opened
    == I tried to update firefox add-ons ==
    == User Agent ==
    Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_3; en-us) AppleWebKit/531.22.7 (KHTML, like Gecko) Version/4.0.5 Safari/531.22.7

    Try a new profile. See [[Recovering important data from an old profile]]

  • ALV .  How to remove the sort buttons on toolbar in ALV report?

    Hi,experts
      As you know, in default case , the alv report will display two sort buttons(ascending ,descending) on its toolbar , So How to remove the sort buttons on toolbar in ALV report?
      Thanks for your help .

    Hi guixin,
    1. Before calling REUSE_ALV_LIST_DISPLAY
    2. Write this code :
    data : excl type SLIS_T_EXTAB.
    data : exclwa type SLIS_EXTAB.
    exclwa = '&OUP'.
    append exclwa to excl.
    exclwa = '&ODN'.
    append exclwa to excl.
    3. Then while calling the FM,
       pass this parameter also .
    IT_EXCLUDING     = excl
    It will work fantastic.
    regards,
    amit m.

  • How to remove blank pages from WebI Report in view page layout option

    Hi,
             I am working in Business Objects XIR2 environment. I have a WebI report with several sections. I need to show the report as a book with 69 sections (each section on new page). there are 69 sections on cost center and each cost center section has almost 10 sections embedded in it. When i see in regular view - I only see 69 pages but when I try to see in "View Page Lay out" option, there is one blank page added after each results page.
    Please let me know how to remove this blank page. I need to give users the option to download the book as PDF on to their machine. Now, when I download to my machine, I see one blank page after each results page.
    Thanks in advance.

    Jus convert your report in Page Layout mode and see if your first pafe is getting expand in the second page.
    Now check if there are any cell going into second page.
    - if there are any blank cell which is there after table.
    you have to check formating very carefull.

Maybe you are looking for