How to encode entire url

hi,
I want to know how can i encode url. Provide me code if u can.
thanks

thanks for reply
here something, that i have tried pls check the code
example.jsp
<%
String Login_Id = request.getParameter("Login_Id");
String Pwd = request.getParameter("Pwd");
String url = URLEncoder.encode("example2.jsp?Login_Id=" + Login_Id + "&Pwd=" + Pwd );
               %>
                    <FORM name="form" ACTION="<%=url%>" style="margin-bottom: 0px" onsubmit="return check(this)">
     <TABLE border="0" align="center">
     <TR>
                              <TD><B>Login Id:</B></TD>
                              <TD><INPUT TYPE="text" NAME="Login_Id" style="border: 1px solid #800000"></TD>
                              <TD><FONT SIZE="" COLOR="#D20000">*</FONT></TD>
     </TR>
     <TR>
                              <TD><B>Password:</B></TD>
                              <TD><INPUT TYPE="password" NAME="Pwd" style="border: 1px solid #800000"></TD>
                              <TD><FONT SIZE="" COLOR="#D20000">*</FONT></TD>
     </TR>
     <TR>
                              <TD colspan="2" align="right"><INPUT TYPE="submit" value="go.">
</TD>
</TR>
</TABLE>
</FORM>
example2.jsp
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
</HEAD>
<BODY>
welcome, <%=request.getParameter("Login_Id")%>
</BODY>
</HTML>
here i want to encode url along with queryString.

Similar Messages

  • How to encode request url

    String szUsrName="venkat & ashique";
    <a href="javascript :
    window.open(../jsp/Customer.jsp?cust_name=<%=szUsrName%">)">
    </a>
    Request URL:=> Customer.jsp?cust_name=venkat & ashique
    --I think from ashique it is taking as another req parameter.
    but in Customer.jsp the request parameter value comming as '''venkat''' iwant to get whole String venkat & ashique. What is the problem i know.Problem is in the string '&' symbol is there.But the solution i dont know plz can u help me. How to encode that url</a>

    You need to escape non-alphanumeric characters with %XX where XX is the hexadecimal value for that character. For example:
    "venkat & ashique" => "venkat%20%26%20ashique"%20 is space and %26 is the &.

  • How to encode/decode URLs ...

    Hello,
    I wanted to send an entire URL as parameter to a Stored Procedure.
    How can I encode/decode this URL?
    Thanks
    Madhav

    I don't know of an encoder, but IBM alphaWorks has a decoder:
    http://www.alphaworks.ibm.com/tech/mpeg-4

  • How to encode short urls to long

    Hi community,
    Is there a way, to encode a short url like http://myServer:50000/irj/portal?NavigationTarget=navurl://b3d6d9ebac16a46574d62757803b05d4 to a long one like http://myServer:50000/irj/portal?NavigationTarget=ROLES://portal_content/every_user/general/eu_role/com.sap.portal.portal_personalization/com.sap.portal.persoUserMapping?
    I want to keep the short urls for the navigation, however I have a issue where I need to get some infos that I can only find in the long url.
    Thanks!
    Edited by: Harald Falzberger on Mar 31, 2011 3:19 PM

    check this :
    http://www.sap-basis-abap.com/sapac002.htm
    this apply to PM orders too

  • How can I see the entire url in the address bar in Mountain Lion including the http or https?

    I recently updated Safari and now when the url of the site I am visiting shows up in the adress bar...it is minus the http or https so I am unaware fo whether the site is secure or not. How can I enable Safari to show me the entire url each and everytime I visit a webpage? Like before??

    Users can revert to the old behavior by setting '''browser.urlbar.trimURLs''' to '''false''' in '''about:config'''.<br>
    <br>
    <br>
    To change this preference:<br>
    <br>
    type about:config in the Location/URL bar and press Enter.<br>
    if you see a warning, accept (promise to be careful)<br>
    Filter: browser.urlbar.trimURLs<br>
    in lower panel, double-click that item to toggle value to false<br>

  • How to encode URL parameters in pl/sql?

    How to encode url and its paramters in PL/SQL to call a page using html GET method? Is there any equiavlent method of java's URLEncoder.encode() method in pl/sql (in any web packages) ?
    Any help/pointers highly appreciated.
    P.S. : URGENT PLEASE!!!

    http://asktom.oracle.com/pls/ask/f?p=4950:8:::::F4950_P8_DISPLAYID:371959198986

  • How to encode URL in UTF-8 Using PL/SQL

    Hello,
    Platform:Oracle 9i, Sun Solaris,
    Using Oracle 0i XML/XDK Iam able to generate xml data and post it to url via HTTP POST. But the xml data need to be encoded in utf-8. Does anyone know how to encode the xml data within PL/sql ?
    Thanks for your time
    Seema

    Thanks for the suggestion. I like this approach as Java is more familiar to me than other languages.
    Our DBA is out of touch today, so I could not grant the javauserpriv to my database user. I tried to run the script anyway in the chance that my user had the privs, and it seemed to have hung. I am now combing Oracle's site for more documentation so I can write some tests to see if I can get a basic Java object working. Under what heading would I find this?
    ajt

  • How to hide the URL path on click of an link to URL element,from user

    Hi All,
          I have an link to URL element, on click of the link it opens the specified url in a new window. But in new window the user is able to see the entire URL path. I want to hide this path from the user. Can any one please suggest me how to do it.
    Regards,
    lakshmi.

    hi,
    just check this help
    http://help.sap.com/saphelp_nwce10/helpdata/en/f7/f289c67c759a41b570890c62a03519/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/7d/fdc99ab37a8d42892e0d39bbd23be8/frameset.htm
    Link to URL Question

  • How to assign a URL in the Tabular Form

    Hi,
    I am using the htmldb.item api's to create manually,the Tabular form. I have got a column in the database(View) like
    ''||substr(DESCRIPTION,1,30)||decode(substr(DESCRIPTION,30,1),null,null,'...')||'' DESCRIPTION,
    which displays as a URL and when the user clicks this URL, the page will have a popup page(in this case it is redirected to page 52).
    My probelm is , if I use wwv_flow_item.display_and_save for this column, I dont see the URL, but it displays the above entire string (along with the HTML tags).
    If I do not use wwv_flow_item.display_and_save, I can not use this item in the COllections as I am using the some validations to display an Error message (Inline with field and in Notification)
    I cannot display the Validation error in the - On Error Page as I should prevent the user to use the browser buttons
    Please let me know how to display the URL and to have this information in the Collection
    TIA
    Ravi

    Ravi,
    Can you fetch the column twice, once into a non-escaped display type that does not generate a form item and again into a hidden item for your collection?
    Scott

  • How do you harness URL external application in a JSP?

    I have successfully deployed the Yahoo Finance sample URL External Application. However, I do not understand how to utilize the URL classes (in the pdkjava.jar) to harness the external application information once a user has authenticated. I am building a JSP portlet that displays and applet, however the applet requires a username and password. I need to get the Username and Password from external application, which it gets from the user via External Application. How do I get these values in my JSP (that is defined in my provider.xml)? I keep seeing documentation regarding the ExternalPrincipal object however I don't understand how to utilize this object in my JSP. I beleive the ExternalPrincipal object is what I need in my JSP, seeing that it has the methods for getting the user and password. Unless is there a better way of achieving this, can anyone shed some light on getting the ExternalPrincipal object for an External Application session?
    Thanks,
    Laith E.H.

    Thanks for the example. I have a better understanding now, however I'm still having trying to comprehend the flow of executing in this portal model.
    I have a problem with:
    PortletRenderRequest pr = (PortletRenderRequest) request.getAttribute("oracle.portal.PortletRenderRequest");
    ProviderUser prUser = pr.getUser();
    ProviderSession pSession = prUser.getSession(true);
    I get a NullPointerException on the second line when trying to getUser(). I'm not sure where the problem could be. In the provider.xml, my ExternalProviderInstance, or the JSP itself? I have another JSP portlet on the same page that calls the same method with success.
    Thanks,
    Laith E.H.
    provider.xml:
    <?xml version="1.0" encoding="UTF-8"?>
    <?providerDefinition version="3.1"?>
    <provider class="oracle.portal.provider.v2.http.URLProviderDefinition">
         <providerInstanceClass>com.cox.portal.provider.ExternalProviderInstance</providerInstanceClass>
         <session>true</session>
         <authentication class="oracle.portal.provider.v2.security.Authentication">
              <authType>ExternalApp</authType>
              <userFieldName>Username</userFieldName>
              <userPwdName>Password</userPwdName>
              <errorPageMessages>Invalid ID,Invalid Password</errorPageMessages>
         </authentication>
         <portlet class="oracle.portal.provider.v2.http.URLPortletDefinition">
         <id>1</id>
         <name>ExternalAnalyzer</name>
         <title>Main Analyzer</title>
         <description>This portlet logs into analyzer</description>
         <timeout>100</timeout>
         <timeoutMessage>analyzer timed out</timeoutMessage>
              <showEdit>false</showEdit>
              <showEditDefault>false</showEditDefault>
              <showPreview>false</showPreview>
              <showDetails>false</showDetails>
              <hasHelp>false</hasHelp>
              <hasAbout>false</hasAbout>
              <acceptContentType>text/html</acceptContentType>
              <registrationPortlet>false</registrationPortlet>
              <accessControl>registered</accessControl>
              <renderer class="oracle.portal.provider.v2.render.RenderManager">
                   <showPage class="oracle.portal.provider.v2.render.http.URLRenderer">
                        <pageUrl>http://catl0dv31.corp.cox.com/bic/analyzerIFrame.jsp?ap_doc=analyzer&amp;ap_id=105</pageUrl>
                        <contentType>text/html</contentType>
                   </showPage>
              </renderer>
              <securityManager class="oracle.portal.provider.v2.security.URLSecurityManager">
                   <authorizType>registered</authorizType>
              </securityManager>
         </portlet>
    </provider>
    ExternalProviderInstance:
    package com.cox.portal.provider;
    import oracle.portal.provider.v2.*;
    import oracle.portal.provider.v2.http.*;
    import oracle.portal.provider.v2.externalApp.*;
    public class ExternalProviderInstance extends URLProviderInstance
    public static final String EXTERNAL_APP = "externalapp.object.key";
    ProviderSession pSession = null;
    public Object[] initSession(ProviderUser user, ExternalPrincipal externalApp)
    throws ProviderException {
    //UrlServicesUtils.logMessage("BasicURLProvider : Entering initSession.", getDebugLevel());
    //Create/Retrieve provider user session.
    if (mProviderDefinition.getHasSession()) {
    // Create the session if it doesn't already exist.
    pSession = user.getSession(true);
    // Store external app in provider session so that other modules
    // can extract it later.
    if (pSession != null) {
    pSession.setAttribute(EXTERNAL_APP, externalApp);
    // Get javax.servlet.http.Cookie[] from user
    javax.servlet.http.Cookie[] cookies = ((ServletProviderUser)user).getCookies();
    if(cookies != null)
    return cookies;
    else
    return null;

  • How to Decode the urls in web application

    Hi all,
    I am encoded the url in jsp by using the URLEncoder.encode()
    method like <% String msg=URLEncoder.encode("string");How can i decode this one without using URLDecoder.decode().
    My Actual Requirement is if i encoded any url which is present in any form like <html:form action="url">.actually this url is mapped in struts-config file. In the address bar how can i get the encoded url.If any body gives the solution highly appriciated.
    koti
    Message was edited by:
    [email protected]

    From the workflow when you create the link, also add the proposal number as an url parameter.
    For example if the url for requesting WD application is <WD_URL>, then URL with parameter would be
    <WD_URL>?PROPOSAL_NO=<actual_proposal_number>
    In the webdynpro, you can access this parameter with the following piece of code(ideally in wdDoInit of component controller).
    String proposalNo = WDProtocolAdapter.getProtocolAdapter().getRequestObject().getParameter("PROPOSAL_NO");
    Regards
    kk..

  • Read entire URL with WD

    Hi @ all,
    I have to do some upgrade work for my WD application from 6.4 to version 7.0
    I have some codings that don`t work anymore, where the Request URL was read out like this way:
    HttpServletRequest request = (HttpServletRequest)WDProtocolAdapter.getProtocolAdapter().getRequestObject();
    String url = (String) request.getRequestURL().toString();
    With this i got values like this: http://sappep.server-customer.de:60000/irj/portal/anonymous/activation?guest_user=ep_selfreg_anon
    In NW 7 this coding doesn`t work at all. There must be a new method of access I cannot find.
    Please note: I need the entire url and not only the parameters of the url. How to get the url parameters I already got in an other document but how to get the entire url?
    Thx in advance
    Mathias

    Hi,
       If you know the name of the querystring parameter, then you can read it within your WD application like the following:
    //let's say the URL is of the form http://<servername>:<port>/webdynpro/dispatcher/<package>/<component>/<Application name>?param1="abc"&param2="123"
    String qParam1 = WDProtocolAdapter.getProtocolAdapter().getRequestParameter("param1");
    String qParam2 = WDProtocolAdapter.getProtocolAdapter().getRequestParameter("param2");
       For your requirement about server information, you can use
    String serverName    = WDProtocolAdapter.getProtocolAdapter().getRequestObject().getServerName();
    String serverPort    = WDProtocolAdapter.getProtocolAdapter().getRequestObject().getServerPort();
       In case you don't see the above mentioned methods (I use CE), then you can also use the not-so-sophisticated way of reading the server information:
    String appURL = WDURLGenerator.getWorkloadBalancedApplicationURL(wdComponentAPI.getApplication().getDeployableObjectPart());
    *appURL will be of the form  http://<servername>:<port>/webdynpro/dispatcher/<package>/<component>/<Application name>
    *now you can do a standard string split to fetch the information
    Regards,
    Satyajit.

  • SharePoint Search encodes the URL incorrectly when there are special characters in a filename on a file share

    In our Sharepoint Server 2013 CA, Search Administration, Content Sources, we have configured a File Share Content Source.
    Search queryes works fine and it returns relevant documents from the file share content source.
    But when click on a file with a filename that contains special characters like "ÁÝÚÍÓÐ", Sharepoint encodes the link to the file incorect, and when we click on the link to the file, it throws an error on the screen saying "This
    page can’t be displayed".
    The following picture shows an example on how Sharepoint shows encodes the URL to a file with a special character in the filename:
    As you can see, the link to the file is
    \\xserver1\felagstest\Kompliserað\Ólavur.pdf, but when I hoover over the file, it translates og encodes this to
    \\xserver1\Felagstest\Kompliserað\Ólavur.pdf. If I manually type the correct link in the address field in Internet Explorer then it works.
    What is the problem here, and more importently what is the solution to this problem?

    This is solved in the Hotfix KB 2899469 for SharePoint Server 2013 October 14, 2014:
    http://blogs.technet.com/b/stefan_gossner/archive/2014/10/14/october-2014-cu-for-sharepoint-2013-has-been-released.aspx
    I installed the http://support2.microsoft.com/kb/2899469 hotfix, and now I can search and open files on external file shares with path and filenames containing non-US-ASCII characters,
    without getting "This page can’t be displayed".
    Where in the description of this hotfix is written, that it solves the encoding issue?

  • How to encode request parameters?

    Hi I'm running a small web application developed with JSP pages. But it turns out that it relies on cookies to maintain sessions, which is a limitation if the client's cookie setting disables cookies.
    I know that I could encode the request parameters and use GET method to communicate information between client and server, but have no idea how this is done.
    Can you give me some code, or recommend some tutorial to me? Thanks!

    1. If you don't want to use cookies, you could use URL rewriting to append the session ID. When you redirect to another page, do something like the following:
    a. first choose whether you want to forward or sendRedirect: (the following example is a redirect)
    //encode the parameter values to encode special characters, such as spaces
    String parameterOne = java.net.URLEncoder.encode("some value");
    String parameterTwo = java.net.URLEncoder.encode("some other value");
    //build the query string any way you want
    String queryString="?key1="+parameterOne+"&key2="+parameterTwo;
    /* Use response.encodeRedirectURL if running it through a sendRedirect.
       Doing so will rewrite the url with the session ID appended to the
       end. */
    response.sendRedirect(response.encodeRedirectURL("some.jsp"+queryString));This little code snippet demonstrates two things. It shows that URL rewriting can be used to append the session ID. It also shows you how to encode parameters (i.e. use URLEncoder.encode()).
    If you want to encode your string in the JSP, you could also do it using javascript:
    <script language="JavaScript">
    <!--
       //this is just an example javascript function
       function openPage() {
          var thisForm=document.formName;
          /* get your form element values (these are text boxes).
             Note: the javascript escape() function url encodes the values.
                   there are also other js functions to do this. */
          var paramOne=escape(thisForm.paramOne);
          var paramTwo=escape(thisForm.paramTwo);
          var queryString="?paramOne="+paramOne+"&paramTwo="+paramTwo;
          window.open("some.jsp"+queryString,"some_window_name");
       }//end openPage
    //-->
    </script>Or, you could build it using JSP expressions and scriptlets. Its really up to you. These are just rudimentary examples to help you get started.

  • IMovie imports only about 75% of the lenght of clips from my camcorder, I can`t find out how to import entire clips. can anyone help please?

    iMovie imports only about 75% of the lenght of clips from my camcorder, I can`t find out how to import entire clips. can anyone help please?

    '''''"... I have about 20 bookmark folders and about 100 bookmarks altogether. " '''''
    Firefox doesn't store bookmarks like that, sound like a Windows / IE favorites scheme used for '''''url''''' files and folders which isn't directly compatible with the way Firefox does things. Firefox uses a '''json''' file for bookmark backups, a '''bookmarks.html''' for import and export is bookmarks, and stores the users bookmarks in the '''places.sqlite''' file, along with browsing history.
    Put those folders and bookmarks in the '''\user\Favorites\''' folder so they are in IE and export your IE Favorites in HTML format, so you can import them into Firefox.
    In IE:
    File > Import/Export - Export to HTML file
    ''then in Firefox:'' <br />
    Bookmarks > Show All Bookmarks -> Import & Backup - Import HTML... = From HTML file

Maybe you are looking for

  • Patch Install Breaks TCP/IP Connectivity

    Today (8/29/02) I installed the latest patch cluster for Solaris 2.8 (Sparc). Ever since I installed it, I have been unable to telnet or establish a socket connection from my Solaris system (port 10014) to a particular TCP/IP device. This is not a co

  • Swingbench2.4: Can not start schema creation wizards

    Hi Community, When trying swingbench2.4 I got "java.lang.NoClassDefFoundError: while resolving class: com.dom.benchmarking.swingbench.wizards.Wizard" error. I've included $SWINGHOME/lib/swingbench.jar, where the wizard class file can be found, in my

  • How do I change page back to 100%

    Went onto my email page and the print was extremely small. Could not find where to change it back to 100% like I could in internet explorer

  • Unable to provide repair order information?

    Hi all, Ok so here's my story, for the past week and a half I've been keeping up to date on my repair order which is resulting in HP having me send my laptop into them and them sending me a different one. The problem is, my case manager can't provide

  • Installing 4.2.1 iPad upgrade

    I have downloaded the software thru iTunes. When it should be installing it, I get the error message..."could not back up because the iPad disconnected". The iPad is not disconnected!!