Invalid URL ; How to make it valid ??
HI All,
After recent netweaver upgrade due to enhanced security checks ,few URLs which were working earlier are not accepted by the system now.
Actually in my scenario the URLs are shown as "Link to Actions" on the UI.
To avoid the dump first I am checking the validity of the "URL string" using this method.
cl_abap_utility=>is_valid_url( ).
If it is valid, only then the URL is binded on UI otherwise its ignored.
Following is an example of an invalid URL:
https://portal.wdf.sap.corp/irj/go/km/docs/guid/600840f6-2d2d-2e10-5bb7-##fca7779a24cc
I checked, presence of extra characters '#' makes it invalid .
Is there any way to remove this extra character '#' from the URL ??
(I tried replacing all occurences of # and condense it: but that did not work ).
or
Is there any other way to convert this invalid URL to a valid format, accepted by system ???
Thanks a lot in advance..!!!!!
Best Regards,
Kumar Ashesh
Hi ,
I got one alternative which seems working for this scenario:
I used cl_utility_abap again
First use escape URL, convert to hexa form :
Then replace hexa values of '#' or '##" or "###' by space and condense
Again unescape the URL
Now the new URL becomes valid always
<fs_url>-url = cl_http_utility=>escape_url( <fs_url>-url ).
REPLACE ALL OCCURRENCES OF '%23' IN <fs_url>-url WITH ' '. " ( '#' = '%23' )
REPLACE ALL OCCURRENCES OF '%0d%0a' IN <fs_url>-url WITH ' '. "( '##" = '%0d%0a' )
CONDENSE <fs_url>-url NO-GAPS.
<fs_url>-url = cl_http_utility=>unescape_url( <fs_url>-url ).
lv_is_link_ok = cl_http_utility=>is_valid_url( <fs_url>-url ).
Well this alternative is working, but how fool proof it is I dont know.
Regards,
Ashesh
Similar Messages
-
How to make this validation ?
Dear all
In my Entity Object I have 4 attributes:
ID , AccomplishDate ,cancelDate,Status
I want to make a validation on the Status attribute , which is:
if status = "CAN" then the CancelDate attribute value will be current date and the AccomplishDate attribute value be null.
Please can any one tell me how to make this validation.
ThanksThank you so much for replaying
The original method was
public void setProcStatus(String value) {
setAttributeInternal(PROCSTATUS, value);
}I changed it to be like this
public void setProcStatus(String value) {
if (value.equals("CAN")){
setAccomplishDate(new Date());
setCancelDate(null);
setAttributeInternal(PROCSTATUS, value);
}is this right
please tell me how to set the value of AccomplishDate attribute to the current date -
How to make xml validation with automatic error fixed
Hi', i have some string which i want to validate it:
String word = "<style>body {background-color:transparent}";
byte[] bytes = word.getBytes();
InputStream inputStream = new ByteArrayInputStream(bytes);
DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance();
docBuilderFactory.setValidating(true);
DocumentBuilder docBuilder = docBuilderFactory.newDocumentBuilder();
DOcument doc = docBuilder.parse(inputStream);This code will produce some exception like this:
Warning: validation was turned on but an org.xml.sax.ErrorHandler was not set, which is probably not what is desired. Parser will use a default ErrorHandler to print the first 10 errors. Please call the setErrorHandler method to fix this.
Error: URI = "null", Line = "1", : Document root element "style", must match DOCTYPE root "null".
Error: URI = "null", Line = "1", : Document is invalid: no grammar found.
org.xml.sax.SAXParseException: XML document structures must start and end within the same entity.Is there anyway to make this validation not only show the errors but automatic fix it?
Thanks a lot...I mean there is no general method which is capable of correcting all possible errors found by schema validation.
For example if the validation says it expected to find an <organization> element or a <company> element but it found a <banana> element, there is no way to determine what repair is necessary.
Anyway the requirement is fighting against the way things work in the real world. The purpose of validation is just to find out whether a document matches a schema. If it doesn't, then too bad. Send it back to be fixed or replaced. If you are having a problem because you repeatedly get documents which don't quite match your schema, then you need to train the users to produce valid documents or to give them tools which help them do that. -
Loop in smartform - how to make values valid in all pages
Hi All.
I have a smartforms with several pages (9). I must print these 9 pages once for each line in the internal table ITAB. When I put a loop in the first page, the data under that loop is printed correctly, but every text node outside the loop always prints the last line of ITAB.
Do any of you know how to make the data in the loop valid throughout the other pages?
any help will be welcome.
thanks,
Hermes.I got it. The main window must be the first one in the first page. The loop must be inside the main window, and bellow the loop there must be a page-break command.
-
How to make a validation for a field?
Is any possible to make input value
validation for a field?
E.g. Force the user enter ItemCode in a
correct format with proper prefix XX-BB-.... .
If SDK is a only solution, how to do it?
Regards,
KennethYou can't realy do it with out sdk. You could always try to right a query that will clear the code when it isn't in the correct format. then if they press add it will give an error cause there is no item code. But you'll struggle to get this right and it won't be full proof.
In sdk in your item event you'll test if the specific edit box lost focus and before the action, if that is true then check the value. If it is not correct then bubble the event and give an error. when you bubble the event it won't do the action they wanted to do.
Hope this helps. -
How to make the ValidIf work as a ValidIfNot?
The metric "M1" has two different ColumnDescriptor list. If the dynamic property "version" is 4, then M1's ColumnDescriptor list includes 'C1', 'C2'. If the dynamic properties "version" is not 4, then M1's CoumnDescriptor list includes 'C1', 'C2', 'C3'. Is it possible to make this requirement accomplish?
Thanks,
SatineHey Caroy,
Thank you for your help.
I used to make the old requirement like below,
<Metric NAME="M1" TYPE="TABLE" HELP="NO_HELP" >
<ValidIf>
<CategoryProp NAME="version" CHOICES="4.1"/>
</ValidIf>
<TableDescriptor>
<ColumnDescriptor NAME="C1" TYPE="NUMBER" />
<ColumnDescriptor NAME="C2" TYPE="NUMBER" />
</TableDescriptor>
<Metric NAME="M1" TYPE="TABLE" HELP="NO_HELP" >
<ValidIf>
<CategoryProp NAME="version" CHOICES="5.1"/>
</ValidIf>
<TableDescriptor>
<ColumnDescriptor NAME="C1" TYPE="NUMBER" />
<ColumnDescriptor NAME="C2" TYPE="NUMBER" />
<ColumnDescriptor NAME="C3" TYPE="NUMBER" />
</TableDescriptor>
But now the requirement changed that the condition works for second M1 is not only version=5.1, but the version more than 5.1. I don't know how to do that. Could you give my some comments?
Thanks,
Satine -
How to make custom validator in jsf
hi
i am using jsf for web designing in my projects.now we are using java script for JSF validation .but i am interested to do validation using validator tag of JSF.i have tried ,but it is not working.what can i do for this problem.can u give some simple examples with clear explanations.
My validator class file is
package com.obs.ftw.util.validation;
public class isEmpty implements Validator{
public isEmpty(){}
public void validate(FacesContext context, UIComponent uiComponent,Object value) throws ValidatorException{
System.out.println("Inside the validate");
FacesContext context=new FacesContext();
String firstName=(String)value;
if(StringUtils.isEmpty(firstName)){
FacesMessage message=new FacesMessage();
message.setSeverity(FacesMessage.SEVERITY_ERROR);
message.setSummary("First Name is Empty");
message.setDetail("First Name is Empty");
context.addMessage("Application:T5",message);
faces-config is
<validator>
<validator-id>isEmpty</validator-id>
<validator-class>com.obs.ftw.util.validation.isEmpty</validator-class>
</validator>
jsf page is
<h:message for="T5"></h:message>
<h:inputText value=#{mybean.lcFirstname} id="T5" required="true">
<f:validator validatorId="isEmpty"/>
</h:inputText>
this function calls isEmpty constructor.but system.out.println("Hi") isn't called which is defined inside the validate()
fuction.
any problem in this isEmpty function?any one give me a solution with an example
advance thanks
with regards
oasisdesertsThanks for reply.i was expecting this one and it is working fine .but i want to validate null or empty string using
validator tag.Is any other way to do this .There is no standard way to do this. You may consider to write your own implementation of the JSF LifeCycle.
can u give some explanation to create messagebundle Check chapter 2.5.2.4 of the JSF specification: [http://jcp.org/aboutJava/communityprocess/final/jsr252/index.html]
whether it will be useful to validate empty string?The default behaviour is:
The 'required' attribute already validates the empty value. If the value is empty and the 'required' attribute is set to true, then the "field is required" message will show up (text may depend on the message settings and configuration -- in JSF 1.2 you can use the 'requiredMessage' attribute to specify that message right in the JSF page). If the value is not empty, then the attached validator will be fired, regardless of the setting of the 'required' attribute. If the value is empty and the 'required' attribute is false or not set, then no validation will be taken place.jsf -
Importing subtemplate using http url - how to make it server agnostic
I am trying to include a subtemplate into my rtf template:
<?import http://appservername:port/bitemplate/test.xsl?>
This is fine for now - for a particular server and port.
To be able to port this template on different servers, we need to get the server and port dynamically.
Is there a way to do so?The scenario is as follows:
Instance A:
Oracle EBS 11i10 - on its rgular tech stack
Instance B:
A Custom App, which is built using the Oracle Fusion Middleware with Weblogic 11g/ADF/BPEL, etc.
The Custom App could have been built into Apps 11i10 tech stack, but the chosen path has been the OFM, hence the second instance.
Both the instance are using the same DB instance.
Now the Problem:
We need to build a print functionality, using the BI-Publisher APIs, and the layout templates. We are able to access the layout templates from the XDO_LOBS (since we are using the same DB instance), and generate the report in PDF /HTML etc. using the xml pub apis.
So far so good.
Now, we need to include a xsl stylesheet into the RTF template.
If it was in Apps context, we would have done that using the <?import:xdo: ?> construct.
But, in this context to initiate the print from the Instance B, the xdo:// context does not work.
So, we used the import construct using the file path, which works. But, this would lead to portability issues.
The other option is to use the http construct, which is fine, but needs a server and port to work, and hardcoding that would again lead to portability issues.
We do not have xdo.cfg in the Intance B, to be able to set a property that could be used in the RTF template for the server/port names - as suggested in the reply above.
We would have to update all the templates to change the file path or the server /port to make it work on any new instance.
Hope this clarifies the issue.
We need to be able to derive the server and port at runtime, so the solution is portable to other instances. IT might be fine to set a property or maybe a file somewhere.
Rgds...
Edited by: app_tsaifee on Feb 14, 2010 8:57 PM -
Safari 5.1.7 "Invalid URL" & "certificate not valid"-Google won't even work! HELP
I have the newest version of Safari and as far as I know everything else on my computer is up-to-date. I checked for a software update and it claims everything is up to date. This has been happening for a little while and started with the invalid site certificates. I never was sure if I should click "continue" or "cancel". I first was clicking cancel and continue trying to see what changed. Cancel would keep me on the same page (I think, if I remember correctly) and continue would usually take me to the desired site. But recently this problem with site certificates has been happening more and more on different sites (I believe it began on facebook; and on sites I use daily). I just tried to google the problem and of course a web page of "Invalid URL" comes up. So I tried to see if it would work on a different browser (Firefox and Chrome), I had the same problem on those two, too, which makes me think a Google problem. However, this happens on other sites, such as facebook, and the site doesn't work for a little while (usually a period of X minutes). Even when I completely quit Safari, this doesnt change.
I reset Safari tonight, and I've cleared the cookies, and I've emptied the cache, but nothing seems to be working. Im starting to wonder if there is a way to downgrade just one version of Safari to see if maybe this is a bug on this version of Safari, but I have no idea if that's possible or if it'll work.
Please help!I hear ya...irritating as ****. It's on all the other I've followed th other threads and tried the fixes, so far nothing. Hit me up if you ever find a workable solution other than going back to a PC. :s You'd think Apple would've fixed this by now, cause they're supposedly very very very very good.
-
How to make a reading implausible in user define validations?
Hi all,
Can any1 tell me how to make a reading implausible
in user define validations.
Regards,
Darshana.I don't have an example at hand right now, but I've done this in the past.
If my memory doesn't fail me, one of the return parameters of the user-exit in which you have to make your validations has a parameter that let's you define (im)plausibility.
Edit: the user exit has:
EXCEPTIONS
PLAUSI_ERROR
So, raise this exception to get an implausible reading.
Hope this helps!
Kevin
Edited by: Kevin De Wilde on Jul 8, 2008 11:09 AM -
i have unlocked iphone 5.i tried to use it with tmobile.it shows full network but fails to activate and shows sim invalid.how to make it work?
Who was your original carrier; did you call them to ask them to unlock your phone, and are you aware of what their unlock policy is (THey may only unlock for international sims and not US sims
-
How to make validation in Bean and select value from another table
I want to know how to select data from table in backing bean according to primary key i have
the problem is that
i have a table Employee_Salary contains Employee ids and their salary
Empoloyee_Salary table
Employee_ID Number
Employee_salary Number
And Another table Called Employees
Employees table
Employee_ID Number
IsManager Varchar2 its value is [*Yes or NO*]
and other columns that i don't care about this table
i have on a jsff page an <af:table> this table is editable this is the Empoloyee_Salary table
*i want to check before save or after insert if this employee is Manager [from Employees tabke(yes or no)] the salary*
cannot be less that 100
i want to know how to make this how to select the value from employees table according to the id i have in the employee_salary table how to make this and make this validation
i have to select IsManager from Employees Table to see if this manager or no
i want to know how to make this in a bean
i use jdeveloper 11g
and my project is ADF Fusion project
and the page that have the Emplpyee_Salary table is JSFF
thanks in advanceYou might want to write this code in a validator on the entity object if it should apply from every screen.
If you want to access view objects from a backing bean the basics are here: http://download.oracle.com/docs/cd/E15523_01/web.1111/b31974/bcservices.htm#sthref918 -
How can I get rid of an "Invalid URL" message?
How can I get rid of an "Invalid URL" message?
rosarian --
Welcome to Apple Discussions.
Glad you found us.
We're all volunteers here, sharing solutions.
Carolyn & Linc will help you. -
Hi can anyone tell me how to make the forms url short to the end user
Hi,
Im using oracle forms 11gR2 and everything is working fine, but my question in how to make the forms url short to the end user.
For example my forms url is " http://localhost:9001/forms/frmservlet " now i want to modify this url as "myweb.gov.ae"
can anybody suggest me the possibilities to change to default forms url to our own url as mentioned in the above example.
Thanks & Regards,
HariYou would have to either -
* edit the code pointed to by the new action attribute to
include the form
processing and email generation, or
* edit the form processing script to also include the insert
record and
check user name scripting
The former is probably the better procedure, since I suppose
you'd want to
do the check user name before sending the email.
Unfortunately, this means
you will have to get your hands into the code, or hire
someone to do it for
you.
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.projectseven.com/go
- DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs,
Tutorials & Resources
==================
"ducati1" <[email protected]> wrote in
message
news:gkriis$et6$[email protected]..
> Hi guys.
> I have a page with a form on it here.
>
http://www.thechallenge.net.au/superredemption.php
> I want the data placed in the textfields within the form
to come to me in
> an
> email upon submission.
> Now normally I would action the form to use this page
here
>
http://www.thechallenge.net.au/Redemptionform.txt
> But because the action of the form is now <?php echo
$editFormAction; ?>
> due
> to an insert record and check user name server behavior
I cannot use my
> normal
> method.
> Can anyone tell me how I can get around this problem?
> -
I put in my gift card code and at the top of my home page it says that I have 15 dollars. When I go to purchase it still makes me put in the code and says that it invalid. How do I pay for something when I already put in the code? please help
See Here > http://support.apple.com/kb/TS1646
If no joy...
Contact iTunes Customer Service
Apple Support iTunes Store Contact Us
Maybe you are looking for
-
Sharing Itunes library between an admin and user account on one imac G5
Hello, Please forgive the repetitive question. i have set up an admin and a user account on my iMac. I set the itunes library to users/shared/music/itunes/itunes library on both accounts. The music shows up on the admin account but not the user accou
-
Counter counts twice as many edges as it should, but correct frequency. Why?
Hi everyone, I am using a PCI 6122 (S Series, DAQ-STC) and Labview 7.1 on a Windows XP. There are only two counters on this card (Ctr 0 and Ctr 1) and I need to use both of them to count edges. While testing the counters, I am inputing a TTL signal
-
How do update latest operating system to my mac 10.4.11
My mac is outdated and doesn't even support my iphone.....I tried to download the new lion operating sytem but it said I need to have Leopard already installed, so I realized I'm starting a journey that may have no end! Bascially my current mac is f
-
Need help with overlaying divs
I want a top nav bar within the (top) banner. I am doing this by putting a div (#toplinks) within the banner div (#banner). But I want a bottom allignment on that nav bar. When I give it a top margin to push it down, it pushes the banner down. #wrap
-
I have Labview 6.0/6.1 Activex vi's that no longer work in LabView 7.0 There are no longer ActiveX Events vi's in the Communications->ActiveX control set. What is the deal with that??? Pretty much makes my $2400 upgrade investment worth nothing as fa