• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Servlet mapping problem

 
Darian Zahab
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65123
91
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<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 ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic