java .do是什么_为什么Java webapps使用.do扩展?它从哪里来的?

07000

Note: The material in this section is not specific to Struts. The

configuration of servlet mappings is

defined in the Java Servlet

Specification. This section describes

the most common means of configuring a

application.

There are two common approaches to

defining the URLs that will be

processed by the controller servlet —

prefix matching and extension

matching. An appropriate mapping entry

for each approach will be described

below.

Prefix matching means that you want

all URLs that start (after the context

path part) with a particular value to

be passed to this servlet. Such an

entry might look like this:

06000

which means that a request URI to

match the /logon path described

earlier might look like this:

06001

where /myapplication is the context

path under which your application is

deployed.

Extension mapping, on the other hand,

matches request URIs to the action

servlet based on the fact that the URI

ends with a period followed by a

defined set of characters. For

example, the JSP processing servlet is

mapped to the *.jsp pattern so that

it is called to process every JSP page

that is requested. To use the *.do

extension (which implies “do

something”), the mapping entry would

look like this:

06002

and a request URI to match the

/logon path described earlier might

look like this:

06003

WARNING – The framework will not operate correctly if you define more

than one element

for the controller servlet.

WARNING – If you are using the new module support since version 1.1, you

should be aware that only extension

mapping is supported.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值