Zhlw.com - 中华龙网

站长资讯通告:
搜索: 您的位置中华龙网 > 计算机网络 > 网络编程 > ASP技术 > 文章列表

手把手教你使用Java来编写ASP组件(2)

作者:bear  来源:转载  发布时间:2006-1-25 16:14:46
  5、 双击Java
  import com.ms.iis.asp.*;
  import com.ms.mtx.*;

  这两句应当出现在程序的最前面,它们是导入命令,导入我们在工程中需要用到的某些Java
/** * This class is designed to be packaged with a COM DLL output format. * The class has no standard entry points, other than the constructor. * Public methods will be exposed as methods on the default COM interface. * @com.register ( clsid=ADE14872-9CF6-42A0-A8F2-7A571E51A840, typelib=5E11D496-7229-4283-A40B-139E05DEF44C ) */ //上面我们看到一个clsid,它是用来标记微软COM组件所用的。

import com.ms.iis.asp.*;//导入两个包

import com.ms.mtx.*;

public class Java{

 public boolean HelloWorld()

 {
  Response newRes = Asp  newRes.write("Hello World,Maybe it is your first Java  return true;
 }

        用户名: 验证码: 验证码,看不清楚?请点击刷新验证码 (注“”为必填内容。)


文章评论: [ 查看全部 ] 网友评论
关于本站 - 网站帮助 - 广告合作 - 友情连接 - 网站地图