当前位置:首页 » 软件开发
开发技术指南» 文章正文
    引言: Chapter 8. Creating Web Clients
 

 

 ·使用ejb3.o简化ejb开发(一)    »显示摘要«
    摘要: 使用ejb3.o简化ejb开发 原著:debu panda我们引入ejb来构造分布式的组件。它诞生之时是为了解决所有corba的问题和复杂性。经历过几次重要的版本更新和增加许多特性之后,ejb已经成为了j2ee的核心。在早期,很多开发人员沉迷于ejb甚至在没有任何意义的情况下在他们的工程中使用ejb。而当他们发现所使用的工程并没有质的变化后,谴责ejb成了一种趋势。开发ejb从来没有变得简单甚至......
 ·java规则——开发篇    »显示摘要«
    摘要: 本文介绍的java规则的说明分为3个主要级别,本篇抛弃了平时开发中很少遇到的情况,那些用得比较少的以后再高级篇里面出现。并有六个有用的国际软件开发重要注意的有关string的问题,遵守了这些规则可以提高程序的效率、使代码又更好的可读性等。(1) 如果有jdbc连接没有关掉的话,需要在"finally"方法中关掉如果数据库连接失败或者是没有释放连接,看上去无关紧要。但是其他的用......


Tutorial for building J2EE Applications using JBOSS and ECLIPSE (8)

chapter 8.

creating web clients 【程序编程相关:如何在weblogic 中对EJB 使用

【推荐阅读:java.net.URLClassLoa

【扩展信息:利用MS的CAPICOM控件与Java结

this chapter describes how to create web clients in the client tier/presentation tier to access or otherwise communicate with the business tier. servlets and jsp pages are the two examples of web clients which will be created. in a typical model view controller pattern, the servlet acts as the controller whilst jsp pages act as the view (the model being the data, of course).

tasks :

create a servlet named accesscontroller under the package au.com.tusc.servlet.

add a business method to storeaccess bean named getallitems() with the following signature

public java.util.arraylist getallitems()

implement the init method.

implement doget and dopost methods.

add a method processrequest with the following signature

protected void processrequest (httpservletrequest request,httpservletresponseresponse)

throwsservletexception, ioexception

implement the processrequest method.

deploy the accesscontroller servlet.

test the accesscontoller servlet.

create a jsp page named showitems.

modify the method processrequest in servlet accesscontroller.

add html and jsp tags to display a list of all items in mystore.

deploy the module onlinestore.

test the showitems.jsp page.

create accesscontroller servlet :

go to package explorer > expand mystore (project) node > select src, right click and a menu will pop up.

on the pop up menu > new > lomboz servlet wizard as shown below.


...   下一页
    摘要: 配置好了,那么我们一起用myeclipse来做一个小小的struts应用吧。1.新建struts project file-->new-->project 选择j2ee-->web project,确定,起个名字,这里就叫demostruts,然后finish.2.“升级”project 选中左边列表中你刚才建立的demostruts工程,点击菜单栏m......
» 本期热门文章:

©2000-2007 All Rights Reserved. 最佳浏览:1024X768 MSIE