---
title: "Struts访问Servlet API"
author: "cakin24"
date: "2017-10-20T20:24:57Z"
tags: []
categories: ["编程语言"]
slug: "struts-servlet-api"
draft: false
lastmod: "2017-10-20T20:24:57Z"
id: 2397115
url: "https://cakin24.iteye.com/blog/2397115"
---

一 访问Servlet API

![](http://dl2.iteye.com/upload/attachment/0127/4686/051fb26a-ac48-35e6-9ba7-5e1b9300dfc7.png)  
 

 

二 Struts2中Action的execute方法

![](http://dl2.iteye.com/upload/attachment/0127/4688/063e0ae0-9d38-339e-a7d3-3810193d8311.png)  
 

 

三 Struts2提供了三种方式去访问Servlet API

 

![](http://dl2.iteye.com/upload/attachment/0127/4690/a0c4b699-2e8a-3f6a-aa34-17a9ef32ed56.png)