How to do a URL encode in EP5
Dear all,
I am trying to construct a URL in side a iView and access the constructed URL. However, do any one knows how can I encode the parameter inside the URL? For example, convert a space to %20. Is there any object function can do that?
Regards
Sam
Hi all,
I found there have a object URICodec with method encodePath in library com.sapportals.wcm.util.uri.URICodec which can do what I needed.
Similar Messages
-
Hi, how to use URL encoding in jsp
hi, how to apply URL encoding in jsp for a string, could u pls suggest some ideas to use URL encoding in jsp
thank you in advancehi, thnx for the reply, but my problem is to use url encoding method
i would u like to know how to represent in jsp program i have asp code some thing like this
href='/project/tel_number.asp?team=<%=DbRecTeam("id")%>&name=<%=Server.URLEncode(DbRec("name"))%>'
i would like to know how replace that Server.URLEncode stmt in jsp, could u pls suggest some equivalent method for the above stmt
thanx in advance -
I have a string in URL encoded format. How do I unencode?
I'm sure there is a single command for this but I can't find it, so my workaround is a long list of 'replace' commands :-(
vari = vari.replace(/%22/g,"'");
vari = vari.replace(/%20/g," ");
vari = vari.replace(/%3C/g,"<");
etc.
Help!!! How do I unencode my URL encoded string?http://livedocs.adobe.com/flex/3/langref/package.html#unescape()
try this link..
unescape(); function.. it is a global function
hope this helps,
BaBo, -
How is URL encoding done by Agentry for HTML Fields ?
Hello All!
I have an HTML Field that has a few url parameters defined and one of the values for a parameter contains a pipe delimiter i.e. " | ".
When agentry constructs the final url for iPad platforms, the HTML field is not rendered at all and a page error shows up.
If I manually encode | to %7C as per URL encoding rules Agentry in turn encodes the escape character '%' to %25 by itself!
How can I turn off encoding in value attribute of a html field ?
Any help is appreciated
Cheers
ShaunakHey Kevin,
Nope. This would be a limitation in how Agentry handles urls.
No workaround possible here so we had to make do with limited functionality.
Cheers
Shaunak -
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&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; -
Newbie ERROR- URL Encoded SQL Length exceeds allowed 32K limit
My SQL Query worked fine yesterday.( I'm still in developing mode)
I made a copy of it and put it into a text file.( Just to be sure I had it.)
Today When I tried to run it in APEX , I get error
URL Encoded SQL Length exceeds 32K limit.
Is there any way to tell how the size of my query ( for example 33K)
is using?
TIA
Steve42I had to put out some other fires for the last few days.
I'm trying to use it in SQL worksheet.
That is my entire error message. It does NOT have an Error #.
Product Build: 3.0.0.00.20
TIA,
Steve42 -
Hello Friends,
I have been working on this problem for some time now. I have a web page that has forms fields like first name, last name etc. and then posts the data back to a servlet that writes it into a file that is utf-8 encoded. The web page has charset specified as utf-8. I was assuming that data would be sent back in the url as utf-8. I entered some japanese data copied from a japanese web page. When I looked at the file into which the form data was written I saw that it wasn't even close to utf-8 or unicode encoding of the data I had posted. For eg. I entered a japanese character: '\u4F1A' which is utf-8 encoded as 'E4 BC 9A'. But the data written into the file is '25 45 34 25 42 43 25 39 41'. This is of course because the data is url encoded which is '%E4%BC%9A', since 45 is hex for E, 34 is hex for 4 and so on. Now the question is how is it that I proceed to get the right utf data back. I am using a jrun server. Is there something that I need to set here in order to get the right characters back.The UTF-8 encoded sequence of bytes of the character '\u4F1A' is {-E4, -BC, -9A}, and the character '-' is (char)0x2d instead of (char)0x25. And I suppose 25 should be 2d.
-
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.. -
Sending document to oracle xml gateway web service and body is url encoded
Hello,
a question from a complete newbie to web services. I have some code that is sending a soap message to an oracle xml gateway web service. In the soap message the values in the soap body look like < ;CNTROLAREA> ;
when I would be expecting <CNTROLAREA>. What I have been told is that the content of the ReceiveDocument element has been url encoded which causes the < and to correct it I need to change the paramater type from object to xmlnode and to build the request as an xmldocument. The xmlnode and xmldocument comes from a .net guy so I've been trying to find the equivalent in java but am not having any luck. I have a lot of reading to do but was wondering if someone might be able to point me in the right direction on how to correct the problem. I captured the soap message being sent using tcpmon. Why does the body have the < instead of the < as I was expecting and is there an xmldocument type? The header part of the soap message looks as I expect. "><soapenv:Header><ns1:XMLGateway_Header xmlns:ns1="http://xmlns.oracle.com/apps/fnd/XMLGateway"><ns1:MESSAGE_TYPE>XML</ns1:MESSAGE_TYPE>. It is being sent as a com.oracle.xmlns.apps.fnd.XMLGateway.XMLGateway_Header type.
thanks
Thanks
Edited by: twf123 on May 5, 2010 11:59 AM
Edited by: twf123 on May 5, 2010 12:00 PMtwf123 wrote:
What I have been told is that the content of the ReceiveDocument element has been url encoded which causes the < and to correct it I need to change the paramater type from object to xmlnode and to build the request as an xmldocument. Where do you change the parameter type?
The xmlnode and xmldocument comes from a .net guy so I've been trying to find the equivalent in java but am not having any luck. How do you get the data from .net guy? Which interface do you use? What processing do you do after receiving the data? -
URL Encoding and Decoding in OSB
Hi,
Do we have out-of-box solution in OSB to decode XML which is URL encoded and encode XML to URL encoding. If so how can I do it.
This might be basic question. I am unable to figure out. new to OSB.
Thanks
Sham.Hi Sham,
Probably these are what you looking for...
fn-bea:inlinedXML()
fn-bea:serialize()
fn-bea:serialize() to represent an XML document as a string
fn-bea:inlinedXML() to parses textual XML and returns an instance of the XQuery 1.0 Data Model.
Supported Function Extensions from Oracle
http://docs.oracle.com/cd/E23943_01/admin.1111/e15867/xquery.htm#i1101407
Oracle’s XQuery Implementation
http://docs.oracle.com/cd/E13162_01/odsi/docs10gr3/xquery/extensions.html
Cheers,
Vlad
It is considered good etiquette to reward answerers with points (as "helpful" - 5 pts - or "correct" - 10pts)
https://forums.oracle.com/forums/ann.jspa?annID=893 -
Hi all!
I'd like to use URL encoding (I guess base64) to mask url parameters in our URL (instead of default.htm?param1=value¶m2=value etc.) to prevent URL manipulation. In most parts of our application we use PopUp-Windows without the location bar of the browser, but we have email links to workitems which launch BSPs and these new opened browser windows do have a location bar and a URL which can be manipulated.
How do you set up URL encoding in your BSP application? (entries in the BSP service of /sicf for example or BSP Application Attributes ?). Is there a way to encode the only parts of the application? How to use and when the if_http_utility->en/decode_base64 methods?
best regards,
Christophdid you try the following?
ex. you have page a.htm and from there you are calling page b.htm with params param1 and param2.
use
CALL METHOD cl_http_utility=>if_http_utility~encode_base64
EXPORTING
unencoded = param1value
receiving
encoded = param1value .
and pass this as the value for param1 and call the URL for page b.htm.
and within page b.htm decode it and use .
CALL METHOD cl_http_utility=>IF_HTTP_UTILITY~DECODE_BASE64 EXPORTING
encoded = param1value
receiving
decoded = param1value .
<b>Sample application:</b>
Create a BSP application withe two pages a.htm and b.htm
and have a page attribute called name in both the pages.
<u><b>a.htm layout code</b></u>
<%@page language="abap"%>
<%@extension name="htmlb" prefix="htmlb"%>
<htmlb:content design="design2003">
<htmlb:page title = " ">
<htmlb:form>
<%
if name is initial .
name = sy-uname .
endif .
%>
<htmlb:textView text = "<%= name %>"
design = "EMPHASIZED" />
<%
CALL METHOD cl_http_utility=>if_http_utility~encode_base64
EXPORTING
unencoded = name
receiving
encoded = name .
%>
<htmlb:button text = "Press Me"
onClientClick = "javascript:window.open('b.htm?name=<%= name %>');" />
</htmlb:form>
</htmlb:page>
</htmlb:content>
<u><b>b.htm layout code</b></u>
<%@page language="abap"%>
<%@extension name="htmlb" prefix="htmlb"%>
<htmlb:content design="design2003">
<htmlb:page title = " ">
<htmlb:form>
<%
CALL METHOD cl_http_utility=>if_http_utility~DECODE_BASE64
EXPORTING
encoded = name
receiving
decoded = name .
%>
<htmlb:textView text = "<%= name %>"
design = "EMPHASIZED" />
</htmlb:form>
</htmlb:page>
</htmlb:content>
Hope this helps.
Regards
Raja -
hi,
I am devoloping using JSP pages and servlets on JRUN web server. I found that when the browser passes the URL (along with my custom parameters) to the servlet, it encodes any spaces in my parameter values with '%20'. Now am I correct that this is done using Base64encoding?? However, I am not using any encoding mechanism and this automatic conversion seems to cause a problem in that the web server thinks that it needs to authenticate this URL and is unable to process it. Does anyone know how I can turn this encoding off and pass any spaces in my parameter values as they are, or is there any other known solution to this.
Any help will be much appreciated.
Thankshi,
I am devoloping using JSP pages and servlets on JRUN
web server. I found that when the browser passes the
URL (along with my custom parameters) to the servlet,
it encodes any spaces in my parameter values with
'%20'. Now am I correct that this is done using
Base64encoding?? All browsers will do this, and it's called "URL encoding". It's a little trick to use other characters than simple letters and digits in URLs (including parameters). This has nothing to do with Base64 encoding.
However, I am not using any encoding
mechanism The browser uses this encoding, and you (the server) cannot do anything about it. It shouldn't actually be a problem at all.
and this automatic conversion seems to cause
a problem in that the web server thinks that it needs
to authenticate this URL and is unable to process it.I think you're making a mistake here. URL encoding has nothing to do with URL authentication. I guess you mean that the webserver is requesting username/password ? Then you have configured the requested URL to be authenticated at yuor webserver.
Does anyone know how I can turn this encoding off and
pass any spaces in my parameter values as they are, or
is there any other known solution to this.You really don't want to turn URL encoding off. Next, it can't be 'turned off'. Jrun will automatically decode the %20 to a space again; you won't notice it has been encoded at all.
Your problem must be somewhere else. Have a close look at your http authentication settings...
>
Any help will be much appreciated.
ThanksNo problem
Cheers,
Tom -
How to open a URL with a "#" in Automator?
I am trying to open a url in Automator using the "Display Webpages" action. The URL I need to open has a hash within it -- e.g. http://translate.google.com/#fr|en|testing. Automator URL encodes the # to %23. I can't figure out how to prevent it from escaping the anchor charater. FWIW, the terminal command...
/usr/bin/open "http://translate.google.com/#fr|en|Text"
does the exact same thing. Anyone know how to stop the # from being encoded?Hi,
I have the exact same problem but I don't have a bar. I'm trying to use this URL "http://translate.google.com/#auto/en/" but the script changes the # to %23. Any ideas? Thanks
Edit:
OK, that's starting to get weird. I tried using this URL instead "http://translate.google.com/#auto%7Cen%7C". When I put it directly in the browser it works which means that it is correct. When I use it through Automator it keeps changing the # to %23. Now the weird part. If I put #fr like the original poster it doesn't change it. It only change it with #auto. Anyone have any suggestions? Thank you.
Message was edited by: j.giazlas -
H:outputlink stop url encoding
Hi, I have a simple outputlink like this:
<h:outputLink value="#{myBean.myUrlFile}"/>the problem is that myUrl file can contains characters like é, à, I know this is not very a good idea but I had to deal with it.
When the JSF is parsed a link like this is created:
<a href="/R%E9glement.pdf"></a>I'd like that jsf don't encode the link beacause like it is not valid.
Like this it is valid:
<a href="/Réglement.pdf"></a>any idea?
ThxBut this link is used file, like a pdf file for exemple.So?
This file can be uploaded and so can contains characters like é à ù etcThat has nothing to do with how the URL is encoded.
What I don't understand is when the link is encoded, file is not found => 404 error.It means Not Found. Again that has nothing to do with URL-encoding.
when the link is not encoded (so as you've said with a bad format) the file is found.Then you have a co-operating bug. Your server should be URL-decoding the URL. What is your server exactly? -
Unescaping URL Encoded Strings
Anyone know how to unescape URL encoded strings using XSL? I can use the translate() function to replace the + signs with spaces but the %3F and %3E style characters are causing problems. The escaped characters are in an XML doc.
Any help would be appreciated.Anyone know how to unescape URL encoded strings using XSL? I can use the translate() function to replace the + signs with spaces but the %3F and %3E style characters are causing problems. The escaped characters are in an XML doc.
Any help would be appreciated.
Maybe you are looking for
-
How do I start Icons on IPhone 6 from the bottom of the screen
Hello, The new phone is too big for me to reach the top of the phone without moving my hand position, this means I can not do one handed operation of the 6 as easily as the 5. Is there a way to make each page of Icons begin from the bottom? If not
-
I want to pay for a season of a show,on iTunes. My iTunes fund has some $ but not enough. I have a credit card registered. Why won't apple tv accept that for the remaining cost? Wanted the shows tonite.
-
Append two structures in an internal table.
hi, if i join two tables by innerjoining will it effect the performance?If such,how i can join these with better performance?can i get the data from different tables in a single internal table by appending different structures in this case?Pleas
-
pls sent to me table source coding.
-
My phone crashed during a software update and when i try to restore it on the itunes site, i keep getting an error 3194 message. It is an iphone4, what can i do?