enter the package name au.com.tusc.servlet, with servlet name accesscontroller and select four methods to be implemented in the servlet as shown.
press next. a new screen will appear as shown below. add web module (browse.. web module and it will show list of web modules in this project), in this case it is onlinestore, so select that. enter the servlet name as access, and mapping url as /access/* . 【程序编程相关:如何在weblogic 中对EJB 使用】
【推荐阅读:java.net.URLClassLoa】
this will create a package named au.com.tusc.servlet under src and accesscontroller within that package as shown below. 【扩展信息:利用MS的CAPICOM控件与Java结】
press finish.
as can be seen from the figure above the four methods we selected in the wizard are created, and only their implementation is required.
apart from this, some descriptors are generated in web.xml, under web-module onlinestore/web-inf as shown below:
these tags are generated by the servlet creation wizard, where <url-pattern> tag specifies the path name by which the servlet will to be accessed. in this case it will be http://localhost:8080/onlinestore/access. (n.b. - its not necessary to have the same <servlet-name> and <url-pattern>.)
web.xml contains all the deployment descriptors required for deployment of servlets.
lomboz creates two pages when you create your web module, index.jsp and error.jsp.
before we go further and start getting our hands dirty with servlets, lets have a look at what directories and files are generated by lomboz under web modules, in this case onlinestore, as shown below.
... 下一页