displaying pictures in a jsf page [duplicate] - file

This question already has answers here:
Load images from outside of webapps / webcontext / deploy folder using <h:graphicImage> or <img> tag
(4 answers)
Closed 7 years ago.
I'm working on a web application using EJB (netbeans & glassfish server). I want to display pictures on my jsf page. These pictures are stored on my disk and I believe that my application cannot access the pictures using the absolute path.
I've been looking for answers on the internet but i've not got a good result besides using servlets.
Is there another way of doing it ?

That depends on just where "on disk" these pictures are stored:
If the pictures are stored within the web application, Tomcat (or whatever servlet container you use) will make them available over HTTP, and you can use an ordinary <img src="path/to/your/image.jpg"> to include them into the page.
Otherwise, you'll have to write code to make them available over http, for instance through a servlet, or by using p:graphicImage.

Related

How to trigger and download a zip from my react website [duplicate]

This question already has answers here:
How to download entire folder from Firebase Storage?
(5 answers)
Firebase storage - Download directory as ".zip"
(1 answer)
Closed 1 year ago.
I have a website built with ReactJS and I have some image data stored in Firebase storage. I want to download the images as a zip file to the user's computer by clicking on a button. How can I achieve this? I can get the urls to the images (to show it on the page), but I don't know where to start to make it so that the user can download them as a file. Any advice? Thanks!

React - not showing images on build [duplicate]

This question already has answers here:
Names starting with underscore shows errors Page doesnot exists for gh-pages branch
(2 answers)
Closed 2 years ago.
I have developed a blog app using React.
Images are shown on development environment, however, when I build & upload the app, the images are 'not found'.
I can see the images are in the media folder, it's just not found on github page.
Is there anything I can do to fix this issue?
The code is here:
https://github.com/machikolacey/react-blog-app
The page is here:
https://machikolacey.github.io/react-blog-app/
It happen when you provide wrong file type, like i mean when the file is picName.jpg and you write picName.png instead of piName.jpg

How to download file using primefaces and jsf? [duplicate]

This question already has answers here:
How to provide a file download from a JSF backing bean?
(5 answers)
Closed 3 years ago.
I am developing a jsf/primefaces web application which utilizes primefaces FileUpload and FileDownload. I am able to upload the image to the database as a blob. However i am unsure on how to retrieve it.
The picture above shows the id of the images in a data table. And when the user clicks download the image corresponding to that id should download. However i am unsure on how to do this. Can anyone link me to a tutorial or give me some pointers on how to achieve this?
You can find the solution from the jsf2-export-pdf-portlet created by Neil Griffin. It shows you how to develop Jsf Resource and ResourceHandler. It gives you information about how the bridge uses Resource_Phase for generating Url.

Application Update of a Kendo-UI mobile application

As we know, an Kendo-UI Mobile application has some major parts:
HTML files
JavaScript files
CSS files
resource files (images)
My main question is: Is there is a way to update HTML, CSS, JS and other resources? I mean doing this without native OS update procedure.
Could I access KendoUI Mobile storage, where these resources (index.html, etc.) are stored?
If the user accesses your application as a web page, then these files are updated automatically. Then the goal is to cache them on the local device so that every time the user accesses them, they are not re-downloaded.
If you want your html + javascript to act like a downloadable app, then Telerik recommends using Phonegap (aka Cordova) to wrap your html into a downloadable app. One of the big advantages of Cordova is that it gives your javascript access to the device's features (such as GPS, camera, contacts, and local storage). Telerik has a dev environment that (Icenium) which makes this extra simple. Once the user has downloaded your app, the standard mobile practice for updating the app to a new version takes place (ex: the user sees version upgrade badge and chooses which apps will be updated). For details as to why an app can't simply update all it's files invisibly, kxb as a great post.

Request.InputStream empty

A number of years ago I wrote a .aspx page that handled a HTTP POST Request which contained a piece of xml. The code read the xml using Request.InputStream - it worked fine for years until The DNN site that it was running in was updated to 5.6.8 now Request.InputStream is always empty. Note that the page is completely separate to DNN but located in site.com/Special/tlweb.aspx .
I've tested the same page on the same server using .net 4 but with a different IIS site and it works fine. Since another app POSTS data to the current URL I need to get it working in the existing location - changing the app is not an option.
I kind of think something was done in DNN 5.6.8 that was intended to stop cross site scripting attacks but I'm really having trouble figuring out what changed and what I can do to ensure that the specific page runs as it did previously.
Can anyone make any suggestions please?
Thanks
Josh

Resources