---
title: "struts 2.1.6 中 servlet无法工作的解决办法"
author: "xgene"
date: "2009-04-14T20:41:54Z"
tags: []
slug: "struts-2-1-6-servlet"
draft: false
lastmod: "2009-04-14T20:41:54Z"
id: 367390
url: "https://xgene.iteye.com/blog/367390"
---

如果你将struts2的servlet的URL映射匹配为/*,那你自己写的servlet就无法工作了
实际上/*只是一个设定,还有一个.action呢, /fsffsdf/jj.action都会以struts的servlet来做
如果你不是以.action结尾,以.ok结尾如/myservlet/uuuuuu.ok,就会跑到/myservlet/*了