首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > Web前端 >

servlet和struts2的请求斜杠有关问题

2012-08-21 
servlet和struts2的请求斜杠问题1.servlet接受request:1发送:页面actionlogin2接受:web.xml中配置L

servlet和struts2的请求斜杠问题

1.servlet接受request:

<1>发送:页面action="login"

<2>接受:web.xml中配置LoginServlet:"/login"

2.struts接受request:

<1>发送:页面action="login"

<2>接受:struts.xml配置

<action name="login" class="action.LoginAction"><result name="success">/hello.jsp</result><result name="none">/error.jsp</result></action>

?之前老是记不清楚斜杠("/")有无,做个总结:

?

1.[页面请求都!]

2.[配置servlet有,struts2没!]

别再混淆了!

热点排行