I have the same camera and the only way I could get it to stream inside my openHAB UI was to install 'motion' on my Ubuntu home server and do the following;
Configure motion for my Foscam with;
netcam_url http://<%foscamhostname%>/videostream.cgi?user=<%username%>&pwd=<%password%>
netcam_keepalive on
control_port 9280
webcam_port 9282
# the following are just simple python scripts which send REST API updates to openhab so
# I can track motion events in my rules (not necessary)
on_event_start python /home/ben/services/motion/living_motion.py 'ON'
on_event_end python /home/ben/services/motion/living_motion.py 'OFF'
Then add the following at /opt/openhab/webapps/static/living.html;
<html>
<head>
<style>
body
{
margin: 0px;
padding: 0px;
}
img
{
width: 100%;
height: 100%;
}
</style>
</head>
<body>
<img src="http://<%motionhostname%>:9282" />
</body>
</html>
Finally in my sitemap;
Webview url="https://<openhabhost>:8080/static/living.html" height=12 visibility=[PresenceBen_WifiHome==ON]
Which is only visible when my phone is on the home WIFI network, since this view doesn't work when accessing externally.
So it is a bit of a convoluted setup, but it works! Plus you can use the 'motion' detection features to track presence in openHAB etc.
You can arm/disarm detection using simple HTTP posts from openHAB;
Switch Camera_LivingArmed "Living Room Armed" <camera> (CamerasArmed) { http=">[ON:GET:http://<motionhostname>:9280/1/detection/start] >[OFF:GET:http://<motionhostname>:9280/1/detection/pause]" }
So for example I only arm my motion detector in the living room when the security system is armed. Then if the camera detects any motion I play a loud barking dog track through my Squeezeboxes throughout the house! Scares the sh!t out of the cat, but hopefully any would-be intruders as well!!