Assets not found in Railo Express - image

I downloaded and extracted railo express 4.2.1 to the base of my C: drive on windows 7. I started the application without making any configuration changes as I don't know what I would need to change. I created a CustomerService folder inside the webapps/root directory which holds my FW/1 customer service application. The ColdFusion code runs perfect however when I try to link to any other kind of resource such as css, js or image files they are not found. If I place an image in the CustomerService/assets/images/icons folder and add a link to it using the image does not show up (broken link icon instead). If I right click and view image I get a page that says:
Problem accessing /customerservice/assets/images/icons/add.png. Reason:
Not Found
Powered by Jetty://
The url path for the image that is displayed in the address bar is:
http://localhost:8888/customerservice/assets/images/icons/add.png
which from my understanding is correct and I have verified that the add.png image is in the icons folder of the images folder for the assets folder which is in the CustomerService folder.
Does anyone have any suggestions? Do I need to configure something in the Railo server or web administrators or in Jetty some how? If so what and how do I do that?
Thanks,
Jason Presley

When you use the internal server on Railo, it is case sensitive. That may be the issue. I see that you have "CustomerService" in camel case

Related

Unable to retrieve new image on webpage

I am using Spring boot and I am still getting the old image in my web page after I swapped the image. I have cleared my browser cache, did a maven clean install and still no difference. I even changed the entire folder name where the images are kept and yet, I am still able to get the correct images when I should be getting nothing. I have double checked and it is definitely the correct path. There is no other images folder in this project to cause any confusion.
Please refer to image. The correct folder name should be "images". Instead I changed the folder name to "images1" to test and yet I get the correct images. I don't understand what kind of caching is going on here. Please advice how to clear it.

Media Error with Google App Engine Deployment

I have successfully deployed a running website on the app engine - here is the URL:
https://black-backup-96302.appspot.com/
This website was on a PHP hosting, and we migrated it to Google Apps, and deployed it using the App Engine. I understand that to put up any media, I will have to change my local version, and then re-deploy it. Same goes for plugins. However, when I browse into my local version using the App Engine launcher, login wordpress, and try to add an image in the media section, I get an error, as shown in the image below:
I googled this, and understand it is a permission error from the file system. My folder has a "Read only" checkbox which is marked blue, and no matter how many times I uncheck it, it is checked again.
I also assigned all the users full control, i.e. the following privileges (to folders, and subfolders)
Any help or ideas will be appreciated!
Adding google_app_engine.disable_readonly_filesystem = 1 to your php.ini file should fix the issue.

Jquery-Mobile data Icons not displaying when using iis 8

I am using jquery-mobile version 1.2.0. When I run it in my development environment everything works great. when I publish it to windows server 2012/IIS 8
I don't see the Icons for the jquery-mobile ui features....things like arrow-r, home, back etc... the buttons show up, but the icons are empty.
I have checked to make sure the png files are being pushed to the iis and they are.
Both my local and iis have the icons in ~/Content/Themes/base/images where the jquery-mobile controls are in ~/Content/Themes/Base
Any ideas?
I found the problem....When I was added the jquery framework it create the images folder in the correct location on my dev machine ...the right folder being ~/Content/Mobile/Css/Images
However, I had neglected to include this folder in my project. When looking for the images used by the data-icons I found them in another folder ~content/images..... I think months ago I had put these here to try to get the data-icon images to work on the local dev machine.... and had forget about them...
Any way having the folder present on the local machine let the icon images be displayed....but not having the folder copy over to IIS caused them not to be displayed...

How to download images from the same folder as where the image is uploaded?

I am creating a project wherein the user can upload his photo. This photo is stored in the folder "images/uploads/filename". When his profile is created and the photo is to be shown, I use the <img> tag with src as "images/uploads/filename", but the photo does not show up.
If I manually copy the photo to an adjacent folder "images/abc/filename" and then use it as the source then it works.
How is this caused and how can I solve it? I need to use the same folder to upload and download photos.
That can happen if you're running the webapp as an IDE project and are storing the uploaded images in the IDE's project space. Changes in the IDE's project folder which are performed externally (as by your servlet code) does not immediately get reflected in the deployed server's work folder. Only when you touch it (by refreshing the project) or by copying it (as you happen to have found out), then it will get reflected.
After all, storing uploaded files in the webapp's deploy folder is a bad idea. Those files will get all lost whenever you redeploy the webapp, simply because those files are not contained in the original WAR file.
You need to store them somewhere outside the webapp's deploy folder on a different fixed path like /var/webapp/uploads. You should not use relative paths or getRealPath() to create the File object around it. Just use a fixed path. You can always make the fixed path configureable as a context param setting, a VM argument, a properties file setting or even a JNDI entry.
Then, to serve it to the world wide web, just add exactly that path as another docroot to the server config. It's unclear what server you're using, but in Tomcat it's a matter of adding another <Context> to the server.xml.
See also:
Uploaded image only available after refreshing the page
How I save and retrieve an image on my server in a java webapp
Make sure your have the correct path and include the image extension
just for testing, put your img tag inside the index.php
<img src="images/abc/filename.jpg">
/root/index.php
now put you image in to the your abc/ folder
/root/images/abc/filename.jpg
This should display the image.
if you have your img tag inside another folder in the root like below
/root/user/index.php
now when you use you img tag use this path (relative link):
<img src="../images/abc/filename.jpg">
note the beginning of the image path "../" this is used to go back to the root.
if the php or html file that is holding the img tag is even deeper, just remember to add ../ for every level, 2 folders deep whould be:
<img src="../../images/abc/filename.jpg">
Question was quite vague so hope this is what you are looking for.
let me know and if this is wrong, explain a little more and i will try to help :)

Swapping an image during web development

I'm trying to see what a certain webpage would look like if I replaced a certain image with another. Rather than upload the image, edit the site, etc, each time I tweak it, I'd like to know if there's a way to change the image in the page to my local version while viewing the remote page.
I use Firebug for debugging web development usually, but I'm open to any other tool that might do this.
(It is absolutely impossible to search for this and find anything but questions about dynamic image swapping on a deployed website, so sorry if this is a duplicate.)
Added: I just tried substituting a file:/// URI pointing to the image (copied and pasted from the address bar after manually opening the image), and alas, it did not work — the image fails to change.
It seems to only work with the http[s] protocols (likely for security reasons). You can store your images on service like Dropbox, share the image or folder, then use the public URLs.
Really, you can use any web accessible images, so a local server would work too.
If your image is in a localhost server(not as file mind you) i think you can still put that localhost url in the firebug inspect element and it'll work.
Tried an absolute file path but it doesn't work apparently. So I guess you just have to make do with a localhost server image. That works for me
Quick and Lowtech Answer: Take a screen shot of the page open it in photoshop and drop the local image on a layer above the webpage image.
Hi if you are serving from a webserver, u probably can't point it to a file on ur local drive. Even if its localhost, u can't point to a local file c:/test.jpg for example. Its because the browser sorts of sandbox ur page so that scripts can't access local files.
One way is to upload the new file (new_file.jpg) to the webserver, give the image link an id
<img id="something1" src="test.jpg"/>
Using jQuery in the firebug watch window do
$("#something1").attr("src","new_file.jpg");
You should see the image change. If you are not using jQuery, you can use document.getElementById("something1") and get the element to modify.
Another way is to use http://makiapp.com/
You can overlay an image from you computer onto any website you look at with this. Very cool tool for lining up a comp with your code.
You can:
Drag your test image into Google Drive
Open it in a browser
Go to the actual image path
Use this path as a substitute in Firebug
It's almost as fast as working from a local drive.

Resources