aspose file tools*
The moose likes Servlets and the fly likes Servlet mapping problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Servlet mapping problem" Watch "Servlet mapping problem" New topic
Author

Servlet mapping problem

Darian Zahab
Greenhorn

Joined: Aug 26, 2002
Posts: 1
Hi,

I need some help with servlet-mapping; the problem is that I have the struts ActionServlet mapped as follows:

<servlet>
<servlet-name>action</servlet-name>
<servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
<load-on-startup>2</load-on-startup>
</servlet>

<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>*.html</url-pattern>
</servlet-mapping>


now I have some really html files that don't need to be handled by this servlet (all this files are in /htmlarea/*), any idea how to do that?

thanks


SCJP1.2
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61610
    
  67

<url-pattern>*.html</url-pattern>


Bad, bad, BAD idea.

Not only does it create the problem you stated, but we did this once before at a previous job and it caused no end of problems. There are many "helpful" servers on the net (the AOL servers were an example), that would see ".html", assume it was a static page, and not bother to go fetch new pages when they were requested. The result was that data for one customer was being fetched from their cache and being shown to another. What a mess!

Don't do it!

Why aren't you using *.do like the rest of the Struts world?
[ March 25, 2006: Message edited by: Bear Bibeault ]

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Servlet mapping problem