Wednesday, August 25. 2010

Tomcat中appBase和docBase的配置误区

Java

其实我是清楚这两个属性的区别的,但是我的服务器上一般每个host只有一个context,所以我习惯把host的appBase和context的docBase指向同一个位置,今天让我遇到问题了。我在看tomcat的日志的时候已经看到里面写着

Deploying web application directory images
Deploying web application directory templates
之类的,但是还是没往深了想,折腾了个把小时才搞定,大意啊。

网上一个兄弟已经把这个问题描述的很清楚了,不懂的人请入内看。

更多内容…

web.xml中servlet-mapping的url-pattern的配置(zt)

Java
在配置web.xml的servlet-mapping 的 url-pattern 碰到问题, 上网查, 查到servelt2_2-spec.pdf才得到答案.

结论:
'/XXX/*'
'*.html'
'/'
其他都是精确映射
      例: '/XXX/Y*.html' 只能映射/XXX/Y*.html 的URL请求.注:某些版本项目启动会抛出异常.
      例: '/XXX' 只可以映射/XXX的URL请求.

引用

10.2 Specification of Mappings
In the web application deployment descriptor, the following syntax is used to define mappings:
• A string beginning with a '/' character and ending with a '/*' postfix is used as a path
mapping.
• A string beginning with a '*.' prefix is used as an extension mapping.
• All other strings are used as exact matches only
• A string containing only the '/' character indicates that servlet specified by the mapping becomes the "default" servlet of the application.


翻译如下:
1.    在web应用的部署描述中(web.xml)中, 以下语法结构用于定义映射:
2.    以'/'开头 并以'/*'结尾的字符串用于做路径的映射.
3.    以'*.'开头 用于做扩展的映射.
4.    一个只是'/'的字符串 将当前这个servlet明确为应用的默认servlet.

参考:
下载servelt2_2-spec.pdf
http://java.sun.com/products/servlet/2.2/
Wednesday, January 6. 2010

如何使jira支持在project key中使用数字等字符?

编程开发
To do so, modify this file:
atlassian-jira\WEB-INF\classes\jira-application.properties
line 93 (# Project Key Pattern)

Simply comment out the original code, and put in your own, using a regular expression that defines a valid format. I've included mine (which expects three upper case letters followed by any number of letters and numbers), and a modified description.
jira.projectkey.pattern = ([A-Z]{3}[A-Z0-9_]*)
jira.projectkey.warning = You must specify a unique project key, at least 3 characters long, containing only uppercase letters.
jira.projectkey.description = Usually the key is just the docket ID - e.g. ABC001<br><i>It is recommended to use only ASCII characters, as other characters may not work.</i>

jira.projectkey.pattern = ([A-Z][A-Z]+)
jira.projectkey.warning = You must specify a unique project key, at least 3 characters long. The first two characters must be uppercase letters.
jira.projectkey.description = Usually the key is just 3 letters - i.e. if your project name is Foo Bar Raz, a key of FBR would make sense.<br>The key must contain only uppercase alphabetic characters, and be at least 2 characters in length.<br><i>It is recommended to use only ASCII characters, as other characters may not work.</i>
I will warn you, though... if you change the properties such that an existing project key will not satisfy the new rule, you'll have a problem.. in that case, I dumped the date to XML and changed the project key manually (and had to rename all attachment folders too).

Hope that helps.
Wednesday, March 25. 2009

重建oracle dbcontrol的方法

编程开发
1、emctl stop dbconsole,先停止dbconsole
2、emca -deconfig dbcontrol db ,删除原来错误的配置文件,主要和sid相关,这个命令执行完后,查看$ORACLE_HOME下有没有hostname_sid这个目录,并且检查$ORACLE_HOME/oc4j/j2ee下有没有和OC4J_DBConsole_hostname_sid这个目录,如果有,请再次执行emca -deconfig dbcontrol db命令
3、使用emca -r配置新的配置文件,这是一个交互式的命令
4、用emctl start dbconsole启动,应该就正常了。
Monday, February 9. 2009

集成JIRA 和 Confluence

编程开发
更多内容…

(Page 1 of 9, totalling 43 entries) » next page

Categories

All categories

Calendar

« 2010 年 September »
Mon Tue Wed Thu Fri Sat Sun
    1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30      

Archives

Quicksearch

友情链接

Syndicate This Blog

XML RSS 1.0 feed
XML RSS 2.0 feed

Blog Administration

Open login screen

访问统计

Locations of visitors to this page
The articles in this sites are copyrighted, except those marked as reshipped
MII Record: 05029638