Displaying an remote image in Oracle Mobile Application Framework - oracle-maf

How do I display an image from a remote server using the Oracle mobile application framework (MAF)?
<amx:image id="i2" inlineStyle="width: 75%" source="http://www.somesite.com/path/to/image.jpg"/>

You have to add (a part) of the external URL to your whitelist. That whitelist can be found in your
maf-application.xml -> Security -> Remote URL Whitelist
More info and an example can be found on this blog: MAF: UNABLE TO DISPLAY IMAGE / URL / …
Nice video about it whitelists in Oracle MAF: Remote URLs and Whitelists in Oracle MAF

Related

Application Request Routing: Why some sites return HTTP 404 some don't?

I want to add a load balancer to an existing asp.net project using Application Request Routing. So I made myself familiar with the concepts and created a local test-setup:
IIS locally running on Windows 10:
Installed Application Request Routing 3.0 with Windows Platform Installer
Created server farm with following servers:
<test-server-name>.de (Microsoft 2012 R2 Server: contains the asp.net project)
www.google.com (just to see if load balancing and url rewriting works because I don't have two test servers available)
URL-Rewriting rule:
After typing localhost multiple times in any browser, I can see that load balancing (weighted round robin) is working fine. It's alternating between 1. and 2. website.
The problem I'm facing is a 404 Error on both websites.
I already tried the following:
Installing and enabling Failed Request Tracing Rules (on local IIS): URL Rewriting is working properly i think.
Failed Request Log for www.google.com: google drive, unzip and open xml in e.g. IE for better view
Create Server Farm without automatic creation of URL Rewrite rules
(selecting No and create own URL Rewrite rule)
Change "Managed Pipeline Mode"-setting of Applcation Pool from Integrated to Classic
Healthcheck on other Websites I have absolutly no clue why it's working on Git-websites and why facebook is returning a 400 error code.
Enabling/disabling proxy (IIS-Manager -> Application Request Routing Cache -> Server Proxy Settings...)
I don't know what i could do next, so I appreciate any help. Thanks.
Answer can be found here: https://forums.iis.net/t/1238739.aspx?Why+some+sites+return+HTTP+404+some+don+t+
Some websites simply don't support localhost as hostname, which is why localhost can't be found (error 404) e.g. on google.com
Detailed answer if link above is not working in future:
That is not an effective test.
What you are doing is sending the hostname of your request to the third party servers. Like Google.
So if your request is say http://example.com you are sending this to say www.google.com and the Google servers will likely reject this as you can see
Web server admins generally don't let themselves receive traffic from domain thet do not host.
If you sent a request to my servers IP with mysite.com I too would likely reject it. (Things get complex if you have wildcard sites and you allow all traffic through)
But simply showing that 404 page from Google means tour request hit there server so that implies ARR is working.
If you really wanted to test it this way have a local host file with www.google.com resolving to your servers IP. Set up a site with www.google.com as the hostheader and then you should see the correct info hitting Google. But there is no accounting for what 3rd party admins do on their side.

Wifi hotspot with redirect to HTML

I'm trying to create a wifi hotspot in windows 10 that redirects the connected devices to a specific HTML page, hosted on the pc. I can create the hotspot. Is there a way to force a HTML page load, like some routers do?
The plan is:
1- The user will connect to the pc wifi hotspot.
2- The user device will load a HTML page hosted on the pc.
3- The user will download files through the links on the HTML page.
The simple way to do that is to install any DNS server. This article can help to choise one. After that you can redirect all DNS requests to your PC. However it does not ptotect from opening web page by its IP.
The other way is to have Proxy on your PC that will redirect all traffic.

How to serve html page or AMI test page in browser on new amazon ec2 server

I got an Amazon ec2 server and when I go to the URL (Public DNS (IPv4)) in my browser I get "ERR_CONNECTION_TIMED_OUT"
I did the tutorial "Installing a LAMP Web Server on Amazon Linux" http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/install-LAMP.html
But got stuck on "If you are unable to see the Apache test page, check that the security group you are using contains a rule to allow HTTP (port 80) traffic."
I checked the security groups and they both set to "All traffic
All
All
sg-7496280c (default)"
And I still can't see the test page. I've also tried using the public IP address and I get the same thing.
There were no errors when installing packages.
I am able to connect using winSCP and upload html files but it doesn't serve them.
I don't know if I'm doing the right tutorial, or if I need to do other things first, or which tutorials apply to which types of servers or if ec2 and aws are the same thing or not etc.
I tried contacting support but it said I don't get technical support for basic accounts. I tried posting this on Amazon forums but it said something like "you can't post new threads right now, try again later"
I'm only doing any of this because you can't run node.js on hostgator.
ERR_CONNECTION_TIMED_OUT only happen either your apache not running or your server or your server is redirecting too much
Just I am unsure where you uploaded your HTML file and with what permission.
Do the basic thing reinstall only apache first.
check in your inbound and outbound port in aws security group in aws dashboard
if 80 port is open with anywhere option
check for
security rule
See if apache default page come. then upload your file.
can you tell in what directory you uploaded all your HTML
"ERR_CONNECTION_TIMED_OUT" can also be happen if you have not properly configure security group while creating the EC2 instance as it allows specific traffic to reach your instance.
If you want to set up a web server and allow Internet traffic to reach your instance, add rules that allow unrestricted access to the HTTP and HTTPS ports.
and copy Public IPV4 and use to visit the webpage rather than copying the url.

WebSphere Outbound FTP adapter doesn't work on IIS

As is clear from the title, we are developing some applications on WebSphere ESB 7.5 by using FTP Adapter. When we try to create a new file on a ftp directory, we get the following error
ResourceException thrown in J2CMethodBindingImpl.invoke() javax.resource.spi.InvalidPropertyException: Adapter failed to check permission on the specified directory.Either the DirectoryPath does not have the necessary permissions for outbound operation or the long listing provided by the FTP server differs from the standard format.
By using the same username/password pair I can view/edit/remove and create files under these folders. The strange part is, when I update configuration as:
Host: 10.10.0.78, Directory:
There is no problem. But when I do this
Host: 10.10.0.78, Directory: /test
I get the exception. Any suggestion ?
Details:
FTP Server is Windows / IIS 7
WebSphere Application Server 7.0
ESB 7.5.1.1
FTP Adapter 7.5.1
Integration Designer 7.5
After I changed the listing type from MS-DOS to UNIX from IIS, it worked.
But the technical documents say by changing the Custom Parser Class Name to "com.ibm.j2ca.ftp.util.FTPLongListEntryParser" is another solution.
I tried that one, but still no progress.
I having some classNotFoundException but I'm still working and I let you know the updates...
I solved my problem as:
• Write a new customParserClass that extends org.apache.commons.net.ftp.parser.NTFTPEntryParser.
• Add this to build path of the FTP Adapter.

Asp.Net publish on server does not some html controls

I have a web application which works fine when i publish and host it on my localhost ...
The same published folder i host to a remote server and a few controls go missing on load of the page .I log into remote desktop to the server and try opening the site on the server itself it works fine. But only when i access it from my local system some controls go missing .Is there something i am missing on the Browserused on the swerver as well as my local system is IE 8 .
Thanks & Regards,
Francis P.
You probably have some URLs with a hard-coded http://localhost/....
Change all of your absolute URLs to relative URLs.
Fiddler and Firebug will be very helpful to see which URLs are being requested.

Resources