抓取server Path 路徑,我比較常用的二個方法
方法一(印出的時侯code比較短)
<%
String addr = request.getRemoteAddr();
int port = request.getServerPort();
String contextpath = request.getContextPath();
String path = "http://"+addr+":"+String.valueOf(port)+contextpath;
pageContext.setAttribute("path",path);
%>
${path} //印出
//方法二(一行搞到)
http://${pageContext.request.remoteAddr}:${pageContext.request.serverPort}
2007年9月26日 星期三
2007年9月17日 星期一
mysql install --Mac OS X (TAR packages)
下載 Mac OS X (TAR packages)
1.解壓縮放到自已方便記住的地方
2.執行以下的command
shell> scripts/mysql_install_db --user=root
shell> chown -R root .
shell> chown -R mysql data
shell> bin/mysqld_safe --user=mysql &
3.加上權限
macbook@jimmys-Macbook[[~/data/mysql/bin]$./mysql -u root
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 4
Server version: 5.0.45 MySQL Community Server (GPL)
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> create database testdb character set utf8;
Query OK, 1 row affected (0.04 sec)
mysql> grant all on *.* to jimmy@localhost identified by '1234';
Query OK, 0 rows affected (0.00 sec)
4.測試
macbook@jimmys-Macbook[[~/data/mysql/bin]$./mysql -u jimmy -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 5
Server version: 5.0.45 MySQL Community Server (GPL)
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> use mysql
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
mysql> select * from user;
1.解壓縮放到自已方便記住的地方
2.執行以下的command
shell> scripts/mysql_install_db --user=root
shell> chown -R root .
shell> chown -R mysql data
shell> bin/mysqld_safe --user=mysql &
3.加上權限
macbook@jimmys-Macbook[[~/data/mysql/bin]$./mysql -u root
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 4
Server version: 5.0.45 MySQL Community Server (GPL)
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> create database testdb character set utf8;
Query OK, 1 row affected (0.04 sec)
mysql> grant all on *.* to jimmy@localhost identified by '1234';
Query OK, 0 rows affected (0.00 sec)
4.測試
macbook@jimmys-Macbook[[~/data/mysql/bin]$./mysql -u jimmy -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 5
Server version: 5.0.45 MySQL Community Server (GPL)
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> use mysql
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
mysql> select * from user;
2007年9月5日 星期三
jforum 討論區 測試
在安裝的過程當中,出現了一個很奇怪的error
Please give write access for the user who is running the webserver
to the file 'index.htm' and for the directory 'WEB-INF/config' and its
subdirectories before continuing.
叫你要把那些地方的權限修改成可以讀寫的,但是都改了仍舊不行
在網路上有找到一個解決的方法
命名一支為 __index.redirect 的檔案,且內容是空的就可以了
太神了,這樣竟然過了。
Please give write access for the user who is running the webserver
to the file 'index.htm' and for the directory 'WEB-INF/config' and its
subdirectories before continuing.
叫你要把那些地方的權限修改成可以讀寫的,但是都改了仍舊不行
在網路上有找到一個解決的方法
命名一支為 __index.redirect 的檔案,且內容是空的就可以了
太神了,這樣竟然過了。
訂閱:
文章 (Atom)