易截截图软件、单文件、免安装、纯绿色、仅160KB

Delphi调用Servlet

一直想让Delphi做为RIA,而业务层使用Java!今天没事做,简单实现了一下!
目前有2种方案:
WebService
IndyHttp调用Servlet
以下是用IndyHttp来调用Servlet
一、先写一个helloworld的Servlet
1.编写ui以及service
//工具包
package com.cdrs.jutils;
import java.io.IOException;
import java.util.Date;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
public abstract class FormObject extends HttpServlet {

protected static final String ACTION = "ACTION";
public FormObject() {
super();
}
/**
* Destruction of the servlet. <br>
*/
public void destroy() {
super.destroy(); // Just puts "destroy" string in log
// Put your code here
}

*/
public void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {

}

@SuppressWarnings("deprecation")
public void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
Date date = new Date();
System.out.println(date.getHours()+date.getMinutes()+date.getSeconds());
performTask(request, response);
}
/**
* Initialization of the servlet. <br>
*
* @throws ServletException if an error occurs
*/
public void init() throws ServletException {
// Put your code here
}
public abstract void performTask(HttpServletRequest req,
HttpServletResponse res) throws ServletException, IOException;
}
//ui包
package com.cdrs.servlettest.ui;
import java.io.IOException;
import java.io.PrintWriter;
import java.sql.SQLException;
import javax.naming.NamingException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.cdrs.jutils.FormObject;
import com.cdrs.servlettest.service.ServletTestService;
public class ServletTes


相关文档:

Delphi中的Record


在Delphi中的Record类型中,与之C语言对应的即是结构体类型(struct
),也可能是为了符合C语言或C++程序员的习惯,对于它在Delphi中的应用存在的一些问题进行初步的说明。在Delphi中的记录体类型有两种方式定义
Type
    RecTest = record (packed
)
      ID :integer; ......

Delphi主窗口任务栏菜单的问题

Delphi的VCL框架在创建应用时TApplication是一个自动创建的隐藏窗口,其它创建的窗口是自动以该窗口为窗口,这就导致创始的主窗口在任务栏的系统菜单只有三项,只要在主窗口的Create事件中将系统菜单用Application的系统菜单替换,并将SysCommand消息转发到主窗口就正常了。
unit Unit1;
interface
uses
  Windows ......

C#学习及与delphi的比较(一)

刚开始很不习惯c#的风格,哎,先入为主啊,delphi习惯了,{}代替begin/end太扎眼。
属性方法的宣告和代码在一起,没有像delphi分interface/implementation,感觉太乱,都不知道一个class到底有几个方法。
每个属性和方法前面都要单独写private/protected/public,老天,c#是delphi之父设计的揶,怎么不学delphi写一个就行 ......

Delphi游戏开发网址大全[转贴]


Source Code
http://www.codefans.com/CodeList/Catalog_5_CodeTime_Desc_1.html
http://www.vscodes.com/sitemap.html
http://www.itlove.net/Soft/261/
DelphiX
http://www.micrel.cz/Dx/
http://www.delphi3d.net/index.php
http://www.pascalgamedevelopment.com/
http://www.2ccc.com/article.asp?articleid ......

WSAAsyncSelect模型Delphi简单实现


TCP连接建立与关闭
相信各位读者现在对於 Winsock 的定义、系统环境,以及一些 Winsock Stack及 Winsock 应用程式,都有基本的认识了。接下来笔者希望能分几期为各位读者介绍一下简单的 Winsock 网路应用程式设计。我们将以 Winsock 1.1 规格所定义的 46 个应用程式介面(API)为基础,逐步来建立一对 TCP socket 主从架 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号