Archive for 5月, 2008

托运蜂蜜时遭遇四川航空的刁难.

星期日, 5月 11th, 2008

今年的运气不好,4月30号回家的时候被成都的的士司机黑了一把。
在机场打的车,目的地是就在出机场旁边的西南民族大学,司机硬是把我们们拉到了人民南路才对我们们说以为我们们是要去老校区。
最后再拉了回来到机场旁边的新校区,61块钱打车费,收得心安理得。
不过还是表扬一下咋们的老乡,特别是成都双流机场的那些拉客的,宰人一律平等对待,机场到昭觉寺,打车花50的,他们一律报价70,还说是看在你也是老乡的份上给优惠了20。
下车的时候把司机的车牌号和名字记录下来了,将姓名记录在此,让google和baidu记住他吧。
姓名是 钟绍宽.

2号准备回深圳,亲爱的爸爸妈妈给我们了装了腊肉,花生米,黄豆,
又用汇源橙汁2L的瓶子装了6瓶天然蜂蜜,当时因为知道现在安检比较严,
于是我们就打电话到 028-88888888 去问,客服说他们应该是可以托运蜂蜜的,
让我们问安检,只要安检没问题就可以托运,并把安检电话告诉了我们。
我们打电话去问了安检,安检说没有问题,可以托运。

于是我们就带上了腊肉,花生,黄豆,蜂蜜到了机场。
在37号柜台办理登机手续的时候,那个男胖子服务员把蜂蜜拦了下来,要拆了包装检查,
检查之后,再告诉我们蜂蜜不能托运,当时旁边柜台的(也是四川航空的)服务员也看了是蜂蜜,
当时小声的说了声,就让他托运吧,但是这个胖子不理,并找出各种理由。
我们告诉他我们已经打电话咨询过我们才带的蜂蜜,并且安检也说没有问题,
这个胖子开始说安检和航空是两码事,不准托运是四川航空自家的规定,
我们告诉他028-88888888答复我们的是没有问题,
他有开始说,8个8那边的小妹懂个屁,不准托运蜂蜜是昨天才通知的,
总之扯很多理由。

我们当场投诉给028-88888888,四川航空的客服与这个服务员沟通了,也没用,他依然不同意托运。
后来再投诉机场现场四川航空值班电话028-85205631,对方答复不能托运,但是可以用货运托运,
告诉了我们四川航空的货运电话028-85393622,我们打电话问了货运处,货运处说可以托运。
后来我们抱着蜂蜜历经千辛万苦,找到了机场旁边的四川航空货运处,
办理了随机货运,16公斤的天然蜂蜜,托运费花了172元。

在飞机到了深圳之后,拿着货运单,又千辛万苦的总算找到了货运站,
结果又被要求交了6块钱,还在旁边等了很久才取到货,最后折腾到家已经晚上很晚。

在办理登机手续时不给托运的东西,拿到货运处却在同一趟飞机上给运过来了。
让我们不得不认为是四川航空在故意刁难,通过这种手段,四川航空让我们5块钱一斤买的蜂蜜,
运费却花了5块多,还浪费了我们大量的时间。

幸好另外15公斤腊肉花生黄豆托运了,没走货运,不然非被气个半死不可。

在深圳机场货运站取货的时候,老婆由于手机没电,见我半天没回,
在2号出站口的地方,向保安借手机给我打电话,第一个保安不肯借,说没有手机,
然后一个保安主动上来借电话,并主动说“我可是要收费的哦”,
等打完之后,问他要多少钱,他说要5块钱,老婆说打的是市话,都不够一分钟。
他说,“我知道,这个本来就是一个愿打,一个愿挨,我又没有强迫你”。
在此对这位深圳机场的保安提个小建议,请你下次主动服务的时候,也请预先主动告知通话价格!

补记: 四川航空的金熊猫卡用户的网上服务做的实在太烂,登录入口很难找到,

在此记录一下:

http://www.88888888.cn/sw/system/MemberLogin.aspx

顺便收藏几个关四川航空的链接:

http://bbs.feeyo.com/posts/258/topic-0028-2581805.html

http://bbs.chetx.com/post/30_6124131_6124131.htm

Tags: 投诉

Related posts

linux下ssh自动登录的脚本

星期六, 5月 10th, 2008

由于每次都要从中转的Linux服务器上链接到其它Linux服务器,

每次都需要输入长串的ssh命令。并且还要重复输入密码,很繁琐。
因此整理脚本,简化为每次只要输入主机名,即可自动登录

1.最简单的省略用户名和主机名的做法

alias mq=’ssh -llizongbo -p13800 ‘

这样
输入 mq 618119.com
即为: ssh -llizongbo -p13800 618119.com

解决了每次需要输入lizongbo的繁琐。

但是并没有解决每次需要输入密码的繁琐

2.改进,需要解决输入密码的问题

编写 mssh.sh脚本,内容如下:
[code]
#!/usr/bin/expect -f

#auto ssh login
set timeout 30
set sshhost [lindex $argv 0]
spawn ssh -llizongbo -p13800 $sshhost
expect “password:”
send “lizongbo_618119\r”
interact
[/code]

给文件加上可执行权限

chmod +x ./mssh.sh

如果文件默认有其它权限,建议最好设置为只能自己读取,修改和执行

chmod 700 ./mssh.sh

测试成功:

./mssh.sh 618119.com

直接登录到了 618119.com

参考
http://blog.chinaunix.net/u/12838/showart_365812.html

Tags: Linux, ssh

Related posts

配置独立运行的jsp预编译ant脚本

星期四, 5月 8th, 2008

配置resin开启预编译jsp,在启动时,resin会自动编译jsp,出错信息在 stdout.log中。

[code]
<web-app id=”/lizongbo” document-directory=”webapps/lizongbo”>
<listener>
<listener-class>com.caucho.jsp.JspPrecompileListener</listener-class>
<init>
<extension>jsp</extension>
<extension>jspx</extension>
<extension>xtp</extension>
</init>
</listener>
</web-app>
[/code]

在开发过程,经常将页面传到resin上,才发现页面编译失败,浪费了不少时间,因此需要一个在本地预编译进行检查的操作。

resin 3.1以前的版本提供命令行方式进行jsp预编译。

完整的命令例子如下
%JAVA_HOME%\bin\java.exe -classpath %JAVA_HOME%\lib\tools.jar;D:\Java\resin-3.0.19\lib\aopalliance.jar;D:\Java\resin-3.0.19\lib\ejb-20.jar;D:\Java\resin-3.0.19\lib\ejb-30.jar;D:\Java\resin-3.0.19\lib\j2eedeploy.jar;D:\Java\resin-3.0.19\lib\jca-15.jar;D:\Java\resin-3.0.19\lib\jms-11.jar;D:\Java\resin-3.0.19\lib\jmx-12.jar;D:\Java\resin-3.0.19\lib\jsdk-24.jar;D:\Java\resin-3.0.19\lib\jstl-11.jar;D:\Java\resin-3.0.19\lib\jta-101.jar;D:\Java\resin-3.0.19\lib\portlet-10.jar;D:\Java\resin-3.0.19\lib\quercus.jar;D:\Java\resin-3.0.19\lib\resin-jdk15.jar;D:\Java\resin-3.0.19\lib\resin.jar;D:\Java\resin-3.0.19\lib\resinboot.jar;D:\Java\resin-3.0.19\lib\script-10.jar;D:\Java\resin-3.0.19\lib\webutil.jar;D:\Java\resin-3.0.19\plugins\resin-ant.jar com.caucho.jsp.JspCompiler -app-dir  E:\lizongbo\workspace\webapp E:\lizongbo\workspace\webapp
使用起来很不方便。(注意classpath里特意加了%JAVA_HOME%\lib\tools.jar,否则会报错,
出错信息如下:
Exception in thread “main” com.caucho.java.JavaCompileException: Resin can’t loa
d com.sun.tools.javac.Main.  Usually this means that the JDK tools.jar is missin
g from the classpath, possibly because of using a JRE instead of the JDK.  You c
an either add tools.jar to the classpath or change the compiler to an external o
ne with <java compiler=’javac’/> or jikes.

java.lang.ClassNotFoundException: com.sun.tools.javac.Main
at com.caucho.java.InternalCompiler.compileInt(InternalCompiler.java:77)
at com.caucho.java.AbstractJavaCompiler.run(AbstractJavaCompiler.java:101)
at java.lang.Thread.run(Thread.java:595)
)

resin 3.1.5及以后的版本终于提供了 ant方式的jspc的atsk,但是却有bug。
[code]
<project name=”test” default=”test” basedir=”.”>
<property name=”resin.home” value=”/usr/local/share/resin”/>

<target name=”test”>
<taskdef name=”resin-jspc
classname=”com.caucho.ant.Jspc”>
<classpath>
<fileset dir=”${resin.home}”>
<include name=”plugins/resin-ant.jar”/>
<include name=”lib/*.jar”/>
</fileset>
</classpath>
</taskdef>

<resin-jspc rootDirectory=”/home/ferg/ws/dist/my-webapp”/>
</target>

</project>
[/code]
来源: http://wiki.caucho.com/--escaped_anchor:0fd040dca4b275d0386c280bf39bd048--
在该方式下,会遇到提示说contentType重复定义的bug
出错信息如下:
E:\lizongbo\workspace\webapp\WEB-INF\ant\resin-jspc.xml:38:
com.caucho.jsp.JspLineParseException: /618119/test.jsp:6: contentType ‘text/vnd.wap.wml; charset=UTF-8′ conflicts with previous value of contentType ‘text/html; charset=UTF-8′.  Check the .jsp and any included .jsp files for conflicts.

原因是resin 3.1 对带BOM格式的UTF-8编码的jsp识别有问题。
参考: http://anotherbug.blog.chinajavaworld.com/entry/3683/0/

此时改页面是件痛苦的事情,于是想到使用Tomcatant jspC task

Tomcat 6.0.16的文件目录已经发生了变化,而官方的jspC的文档还没有更新:
http://tomcat.apache.org/tomcat-6.0-doc/jasper-howto.html

以前写过一篇笔记,基本是copy tomcat的官方文档
参考: http://blog.donews.com/lizongbo/archive/2005/06/06/413985.aspx
而现在主要用resin,因此想要一个可以独立进行jsp预编译的ant脚本,
所以手工清理后制作了个独立的jspc,方便随时预编译.

所用到的jar文件为:D:\Java\apache-tomcat-6.0.16\lib和D:\Java\apache-tomcat-6.0.16\bin 目录下所有jar
[code]
D:\Java\jspc\tomcat6lib 的目录

2008-05-08  20:09    <DIR>          .
2008-05-08  20:09    <DIR>          ..
2008-01-28  23:39            10,368 annotations-api.jar
2008-01-28  23:39            17,530 bootstrap.jar
2008-01-28  23:39            49,240 catalina-ant.jar
2008-01-28  23:39           122,869 catalina-ha.jar
2008-01-28  23:39           228,175 catalina-tribes.jar
2008-01-28  23:39         1,128,229 catalina.jar
2008-01-28  23:39             9,341 commons-daemon.jar
2008-01-28  23:39            27,699 el-api.jar
2008-01-28  23:39           102,129 jasper-el.jar
2008-01-28  23:39         1,395,270 jasper-jdt.jar
2008-01-28  23:39           511,240 jasper.jar
2008-01-28  23:39            72,408 jsp-api.jar
2008-01-28  23:39            85,287 servlet-api.jar
2008-01-28  23:39           742,089 tomcat-coyote.jar
2008-01-28  23:39           197,846 tomcat-dbcp.jar
2008-01-28  23:39            18,980 tomcat-juli.jar
16 个文件      4,718,700 字节
2 个目录    895,870,976 可用字节
[/code]

tomcat-jspc.bat的内容为:
(因为jsp文件太多,消耗内存较大,因此通过 ANT_OPTS=-Xmx512m 指定内存)
[code]
set ANT_OPTS=-Xmx512m
ant -f tomcat-jspc.xml -Dwebapp.name=mywebapp
[/code]
tomcat-jspc.properties的内容为:
[code]
webapp.root=E:/lizongbo/workspace
webapp.name = webapp
[/code]

tomcat-jspc.xml的内容如下:

[code]
<project name=”Webapp Precompilation” default=”all” basedir=”.”>
<property file=”${basedir}/tomcat-jspc.properties”/>
<property name=”tomcatlib.home” value=”${basedir}/tomcat6lib”/>
<property name=”webapp.path” value=”${webapp.root}/${webapp.name}”/>
<description> JSPC Tasks</description>
<taskdef resource=”org/apache/catalina/ant/catalina.tasks”>
<classpath>
<fileset file=”${tomcatlib.home}/tomcat-juli.jar”/>
<fileset file=”${tomcatlib.home}/jasper.jar”/>
<fileset file=”${tomcatlib.home}/jasper-el.jar”/>
<fileset file=”${tomcatlib.home}/el-api.jar”/>
<fileset file=”${tomcatlib.home}/jsp-api.jar”/>
<fileset file=”${tomcatlib.home}/servlet-api.jar”/>
<fileset file=”${tomcatlib.home}/catalina-ant.jar”/>
</classpath>
</taskdef>
<taskdef resource=”org/apache/catalina/ant/jmx/jmxaccessor.tasks”>
<classpath>
<fileset file=”${tomcatlib.home}/catalina-ant.jar”/>
</classpath>
</taskdef>
<typedef
name=”jmxEquals”
classname=”org.apache.catalina.ant.jmx.JMXAccessorEqualsCondition”>
<classpath>
<fileset file=”${tomcatlib.home}/catalina-ant.jar”/>
</classpath>
</typedef>
<typedef
name=”jmxCondition”
classname=”org.apache.catalina.ant.jmx.JMXAccessorCondition”>
<classpath>
<fileset file=”${tomcatlib.home}/catalina-ant.jar”/>
</classpath>
</typedef>
<!– 先把WEB-INF/src下的java文件编译成class –>
<target name=”compilejava”>
<echo>jdk path: ${java.home} </echo>
<echo>webapp path: ${webapp.path} </echo>

<mkdir dir=”${webapp.path}/WEB-INF/classes”/>
<mkdir dir=”${webapp.path}/WEB-INF/lib”/>

<javac destdir=”${webapp.path}/WEB-INF/classes”
optimize=”off”
debug=”on” failonerror=”false”
encoding=”utf-8″ nowarn=”true” target=”1.5″
srcdir=”${webapp.path}/WEB-INF/src”
excludes=”**/*.smap”>
<classpath>
<pathelement location=”${webapp.path}/WEB-INF/classes”/>
<fileset dir=”${webapp.path}/WEB-INF/lib”>
<include name=”*.jar”/>
</fileset>
<pathelement location=”${tomcatlib.home}”/>
<fileset dir=”${tomcatlib.home}”>
<include name=”*.jar”/>
</fileset>
</classpath>
<include name=”**” />
<exclude name=”tags/**” />
</javac>

</target>
<!– 再把jsp页面生成java文件 –>
<target name=”jspc”>
<jasper
validateXml=”false”
uriroot=”${webapp.path}”
webXmlFragment=”${webapp.path}/WEB-INF/generated_web.xml”
outputDir=”${webapp.path}/WEB-INF/jspsrc” />

</target>
<!– 再把jsp的java代码编译成class –>
<target name=”compilejspjava”>

<mkdir dir=”${webapp.path}/WEB-INF/work”/>
<mkdir dir=”${webapp.path}/WEB-INF/lib”/>

<javac destdir=”${webapp.path}/WEB-INF/work”
optimize=”off”
debug=”on” failonerror=”true”
encoding=”utf-8″ nowarn=”true” target=”1.5″
srcdir=”${webapp.path}/WEB-INF/jspsrc”
excludes=”**/*.smap”>
<classpath>
<pathelement location=”${webapp.path}/WEB-INF/classes”/>
<fileset dir=”${webapp.path}/WEB-INF/lib”>
<!– need ignore mywebapp/WEB-INF/lib/servlet.jar 在这里忽略掉webapp lib里的低版本的servlet,以免编译失败–>
<exclude name=”servlet.jar”/>
<include name=”*.jar”/>
</fileset>
<pathelement location=”${tomcatlib.home}”/>
<fileset dir=”${tomcatlib.home}”>
<include name=”*.jar”/>
</fileset>
</classpath>
<include name=”**” />
<exclude name=”tags/**” />
</javac>

</target>

<target name=”all” depends=”compilejava,jspc,compilejspjava,cleanup”>
</target>

<target name=”cleanup”>
<delete includeEmptyDirs=”true”>
<fileset dir=”${webapp.path}/WEB-INF/jspsrc”/>
<fileset dir=”${webapp.path}/WEB-INF/work”/>
</delete>
</target>

</project>
[/code]

Tags: ant, eclipse, javac, jspc, Resin, Tomcat

Related posts