I have to create an native application for the device which has Windows CE 5.0 and having .NET CF 2.0 installed in it. The App has to get the ip address of the device and then open an html page to which the ip address has to be passed by using POST method.
I am able to get the ip address and open the page using process.start. But this is using GET method(i can see the value in the address bar)
Now how can i POST the parameter to the page??
I am using Microsoft Visual Studio 2008 pro edition.
Please Help....Thanks in Advance
See my blo article here: http://www.hjgode.de/wp/2009/06/14/mdiwatch2/
It shows how to use POST to send data to a server (java servlet). The code uses HttpWebRequest and then builds the POST stream.
In a simpler form you just need to use HttpWebRequest and the just build your special URI: http://msdn.microsoft.com/en-us/library/debx8sh9.aspx
Related
My program uses basic authentication. When the web page makes an ajax-based request to the security servlet getUserPrincipal returns null. But here is the twist. It only returns null on my local laptop connected via VPM. If I use the remote application test server environment on the company LAN the servlet finds the value for getUserPrincipal. Also, another developer on my team does not get this error from his Laptop. But he is on India and I am in the US.
What should I look for? Is it a network permissions issue? I'm using jee JBoss 6.2 and Java 8.
In Vaadin Flow, such as version 14.1, how can I get the IP address of the user’s web browser through a Java call on the server-side?
Like the Question, Get user’s IP address, and other client-side info in Vaadin 7 web app, but for Vaadin Flow instead of Vaadin 7 & 8.
WebBrowser::getAddress
In Vaadin Flow, use the class WebBrowser::getAddress to get the user's IP address.
To get a WebBrowser object, ask the current VaadinSession object.
String ipAddress = VaadinSession.getCurrent().getBrowser().getAddress() ;
The WebBrowser object also holds information about the client’s browser kind and version, their current default Locale, host OS, browser’s ability to handle modern Vaadin Flow web apps, and more.
By the way, in Vaadin 14 you can run snippets of JavaScript on the client. So that might be a way to obtain even more details about the browser and host of your client user. And coming in Vaadin 15 is greatly enhanced support for executing in JavaScript on the client while maintaining communications with the Vaadin Flow Java runtime on the server.
I am working on a prototype android app that will draw data from a remote server.
I have a number of sensors connected to my PC that are constantly updating cells in an Excel file. I am trying to build an Android app that will remotely connect to my PC and display these values on users' cell phones.
Umm... I don't really know here to start with it.
The actual result is that users with connection to the internet will be able to open the app and see the values taken from the Excel file on my computer.
i recommend you use StringRequest to connect an Apache server with PHP, u can use XAMPP, then u can send a Request Method POST, take the request and return the data that u want to show in android, after this u can use a recycler view to inflate the data.
I am developping web applications using the Xpages framework from the IBM Lotus Notes technology.
My users don't use the embedded Notes Client browser, but use a regular modern browser (Firefox, Chrome) to browse Notes applications.
Everything is ok when the user has an internet connexion, he can access the application on the online server through his favorite browser.
However some of my applications need to be used Offline, in local. When a user works in local, he opens the IBM Notes Client, go to his workspace and click to open an application locally. Then, the Notes Client runs a http server on a random port and open the application with the embedded Notes Client browser.
What I want to achieve is to be able to open the application on a regular browser (Firefox, Chrome), by just using the default system browser and not the embedded Notes Client browser.
Here is what I tried without success :
With window.location.href I get the port where the local http server runs and the path to the page that is opened in the embedded Notes Client browser. I get this kind of result :
127.0.0.1:54428/xsp/Gfn/CoffeShop.nsf/xp_home.xsp?OpenXPage&&xspRunningContext=Notes
So I just keep the interesting part :
127.0.0.1:54428/xsp/Gfn/CoffeShop.nsf/xp_home.xsp
Now I need to pass the session id has a parameter of this http request so the browser will have the right to access the application. I get the session ID with the following :
facesContext.getExternalContext().getRequest().getSession().getId()
From this I get an ID and I build my complete http request :
127.0.0.1:54428/xsp/Gfn/CoffeShop.nsf/xp_home.xsp?SessionID=ID-fae7aca8f062023972fe35e5909b0106f44ba2ae
But when I try this into a regular browser, instead of getting the page I get an error 500. If I look at the log of the server, I see the following error message :
Exception Thrown
javax.servlet.ServletException: The request is not coming from a trusted Rich Client part
But I am sure my ID is correct. I tried to investigate this on the internet but no success for now, I would be happy if someone has an idea about what do I miss? Or maybe another way to open a local application in the default system browser?
Thank you!
In short, you can't. This is disabled by security restrictions.
But maybe you should think again about a XPiNC application: With 9.0.1, the underlying XULRunner component was upgraded and supports now HTML5 and a lot of the "newer" features.
It matches Firefox 10.0.6, here are the HTML5 test results:
https://html5test.com/s/555ae51ca555ac7b.html
The only reasonable action you have at you disposal is to install Domino designer on the clients. Then you get the nhttp task that serves to a standard browser (you might get away analysing what nhttp needs and only install that part).
The caveat there: the local nhttp does not support authentication. So you need to hack around it (e.g. copy data back and forth between the local NSF and the properly secured one).
Alternative you could try the approach I took with vert.x (should work with any Java container, but then you won't have any XPages, just raw Domino data.
Danielle pushed that forward with the Crossworlds Project - which might be what you need.
Stephan says it as it is: the way you are considering is just going to cause you huge headaches.
If offline capacity is a must, have you thought about creating a pure Notes-Client application? That would certainly be far easier.
I have followed the instructions found here and here. Also:
I am using Orchard Orchard v.1.7.0.0
I am hosting in a Windows Azure Website
I have setup Remote Blog Publishing and XmlRpc.
I have tried the all three domain names that point to the website.
My actual blog name is http://www.muddlingthru.com/we-re-all-just-muddling-thru
Here is an image of my attempt to add the blog.
Windows Live Writer says it "was not able to automatically detect your blog settings." So, I try to do it manually as follows.
Windows Live Writer says, "Invalid Server Response - The response to the blogger.getUsersBlogs method received from the blog server was invalid."
I have already setup Remote Blog Publishing and XmlRpc as follows.
Is there anything else that I need to do? For instance, when Windows Live Writer asked for the "Remote posting web address for your blog," it has a template like this:
http://<hostname>/<mw-script>
That I fill in like this:
http://www.muddlingthru.com/we-re-all-just-muddling-thru
I suspect I might have the incorrect remote posting web address.
The blog account must be the url of your blog, not of a blog post.
It will then detect special metas that indicates the /XmlRpc url that implements MetaWeblog API.
You can also configure it manually choosing Metaweblog provider.
I had the same problem, then I disabled the HTML minifier and it worked...
I just installed OpenLive Writer and tried to connect to my Orchard blog and ran into the same problem.
After playing with it a few minutes, I opened the blog page and simply copied and pasted the URL into the Web Address of Your Blog text box.
Bingo, it worked. Only difference, no ending /.