static-content

How do I make Weblogic 8.1 serve static content?

I come from the Open source world where I'm used to having Apache serve up my images, css, javascript, etc., while Tomcat or an app server of its ilk handles all the JEE lifting. But now I'm doing a project with Weblogic 8.1, and I can't seem to figure out how to get it to work. For example, the concept of a document root. How can I con...

How to do static content in Rails?

Looking at different options: One is to just put the static pages in the public/ folder, but I do want the header from layout/application to be consistent. I tried this, but I got an error: in routes.rb: map.connect '*path', :controller => 'content', :action => 'show' in content_controller.rb: def show render :action => params[:pat...

Search in static pages

I have an ASP web application which has pages with static content as well as dynamic content(data from database). I want to implement a search feature in the site.I Can do this with the dynamic data easily by framing the select query based on the search keys and pull data from the tables,But i would like to know how can i implement the ...

Separation of static and dynamic content in J2EE applications

We work with IBM products and we typically use IBM Http Servers (read Apache) as a reverse proxy for our application servers. For performance reasons we serve static content (.gif, .jpg, .css, .html etc.) from our http servers, to ease the burden a bit from the application server. So far, we have to distribute files to http server and c...

404 with iis7 asp.mvc doc and pdf files in folder

Hi, I have got folder "binaries" in my web application. I would like to download pdf and doc (static ontent) files from that direcotory but when i try to get them i have got error 404. I tried to set up static module for *.doc and *.pdf but it not works. ...

Simplest way to serve static data from outside the application server in a Java web application

I have a Java web application, using Spring and Struts, running on Tomcat 5.5. I want to load static images that will be shown both on the Web UI and in PDF files generated by the application. Also new images will be added and saved by uploading via the Web UI. It's not a problem to do this by having the static data stored within the th...

ASP.Net MVC - Why is a controller being created for favicon.ico?

I am using a custom ControllerFactory (to use Castle Windsor's IOC to create controllers), and I notice it's getting requests to create a controller for "favicon.ico". I have put a favicon.ico file in my Content folder, but I'm still getting these requests. How do I resolve this and serve static content without trying to create controll...

what software to use for a web site with mostly static content

Hey dear stacklers, my company is about to redesign and relaunch their website. It will be my part to implement it. My company produces a variety of photo products and wants to present them to the end user. Most of the ~50 sites will contain static content (such as text and imagery). The layout is a simple 2-column: header, content, sid...

Advice for setting up a static file server with ASP.NET/ASP.NET MVC

I would like to set up a subdomain (similar to stackoverflow's http://sstatic.net/) in order to serve static content for my existing web applications. I have never done this before and was wondering if anyone has advice - which technology to use (i am using the Microsoft stack), how i should structure the static site, what are the securi...

How to serve of content files with "abnormal" file extensions in ASP.NET MVC

So, I want to serve up some .ejs files (EJS templates.. see http://embeddedjs.com for more info) from my /Content or /Scripts folder in an ASP.NET MVC project. This behavior doesn't seem to work out of the box. Is there a configuration-based solution to make this happen? I suppose this would apply to those wanting to serve any kind of "...

What should Apache serve and what should Tomcat serve?

I'm trying to set up Apache in front of Tomcat. What do I have Apache serve? I know Apache works better for static pages and images. I currently deploy a war file in Tomcat that contains static pages, images, and Flash files. Should I put those all on the Apache server? How to I reference those pages/images from the Tomcat applicati...

Static content on Wicket application served from OSGi HTTP Service

I'm developing a web application that is going to be served from an OSGi HTTP service, I register it using a WicketServlet, and I don't know how to serve static files (CSS, JS, images and so). How could I mount a directory as a resource with the static content? Or should I configure the resource locator in some way? ...

CDN for Images in ASP.NET

I am in the process of moving all of the images in my web application over to a CDN but I want to easily be able to switch the CDN on or off without having to hard code the path to the images. My first thought was to add an HttpHandler for image extensions that depending whether a variable in the web.config (something like ) will serve ...

How do I serve nested static content on Heroku?

I have a rails application with static content in the public directory (e.g. public/index.html) and additional static content in nested subdirectories (e.g. public/one/two/index.html). All the static content is served correctly if I run it locally via script/server but when I upload it to Heroku the top-level page loads correctly but t...

Lightweight HTTP application/server for static content

Hi, I am in need of a scalable and performant HTTP application/server that will be used for static file serving/uploading. So I only need support for GET and PUT operations. However, there are a few extra features that I need: Custom authentication: I need to check credentials against a database for each request. Thus I must be able ...

Apache is randomly not serving content.

I have Apache installed on a corporate XP (yeah, I know) machine that I can't re-image. I have partial admin rights on the box. I can install software, but I cannot disable/uninstall or change configs on any of the corporate junk. Random content is not getting served to localhost from Apache. The same content may be served fine (or n...

how to create a VirtualHost to serve only static content

I want to create a virtual host in apache such that it serves only static content like stylesheets, videos, images, javascripts, text files, etc. I am not looking at any "processing" capabilities from this virtual host. ...

Django Direct_to_template or flatpages

Ok, fairly new to Django so bare with me. Building a django app with some mostly static pages at the front of the site e.g. about.html faq.html that kind of thing I was looking at how urls.py work and I created this. ('(.+\.html)$', direct_to_template), It seems to do exactly what I needed. Now for any new .html page I add to the r...

Using .htaccess to serve static files via a subdomain

Right, excuse my stupidity, I've looked through a load of examples on t'interweb but I don't think I've found what I'm looking for. I have a website, photography.example.com is the main site but I also want to have another subdomain to serve static files, for example static.photography.example.com. If I request a file (e.g. http://stat...

Form Authentication on Purely HTML pages

Hello! I am using forms authentication in IIS7 to password-protect a dev site, but the authentication seems to get by-passed when the site contains only static HTML files + login.aspx + web.config. When I renamed the files to .aspx, I am prompted with the login form I am not doing anything fancy. I have a very simple login script and i...