六狼论坛

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博账号登陆

只需一步,快速开始

搜索
查看: 96|回复: 0

OpenCms修改默认的Servlet名称

[复制链接]

升级  80.67%

45

主题

45

主题

45

主题

秀才

Rank: 2

积分
171
 楼主| 发表于 2013-2-7 18:42:26 | 显示全部楼层 |阅读模式
OpenCms的请求连接形式类似这样
http://localhost:8080/opencms/opencms/sites/default/index.html
特殊的地方,第一个opencms是你的web项目的名字,第二个opencms是OpenCms默认的servlet
名字,其后的字符串在操作的时候作为参数传递。

欲修改OpenCms默认的servlet:
先看一下web项目下的web.xml文件,其开始部分有一段注释
    <!--        Changing the servlet name from "opencms" to something else requires 2 changes in this file.                For example, to change the servlet name to "mycms" you must:                1. Change the <context-param> called "OpenCmsServlet" from "/opencms/*" to "/mycms/*"        2. Change the <servlet-mapping> for "OpenCmsServlet" from "/opencms/*" to "/mycms/*"    -->

所以改动的时候注意,必须改动这两个地方。
您需要登录后才可以回帖 登录 | 立即注册 新浪微博账号登陆

本版积分规则

快速回复 返回顶部 返回列表