Netbeans中Tomcat服务器配置
- 格式:docx
- 大小:22.86 KB
- 文档页数:4
本教程向您展示了如何通过一个Java 类创建并部署Apache Axis2 Web 服务。
您也可以学习如何设置与NetBeans IDE 绑定的Tomcat 和GlassFish 服务器,以部署Axis2 Web 服务。
本教程还展示了如何在IDE 中配置Axis2 选项,以便IDE 正确部署Axis2 Web 服务。
Apache Axis 是向 W3C 提交的 SOAP(Simple Object-Access Protocol,简单对象访问协议)实现。
Apache Axis2 是一种更加高效、模块化和面向 XML 的 Axis。
Axis2 不仅支持 SOAP 1.1 和 SOAP 1.2,它还集成了对 REST 风格的 Web 服务的支持。
同一业务逻辑实现可以同时提供一个 WS-* 样式的类型接口以及一个 REST/POX 样式的接口。
有关 Axis2 的详细信息,请参见 网站。
Axis2 Web 服务可与 Metro 进行互操作。
您可以为 Axis2 Web 服务创建一个 JAX-WS 客户端,但是可能不支持一些更加复杂的 Axis2 WSDL 操作。
目录•设置 Axis2 和 NetBeans IDEo下载 Apache Axis2 WAR 文件o安装 Axis2 支持插件o设置 Tomcat 的 Axis2 选项o设置 GlassFish 的 Axis2 选项•创建 Axis2 Web 服务o部署和测试 Axis2 Web 服务o更改 Web 服务的操作•疑难解答•更多练习要学习本教程,您需要具备以下软件和资源。
软件或资源要求的版本NetBeans IDE 6.1 版 Web 和 Java EE 下载包或6.5 版 Java Web 下载包Java Development Kit (JDK)版本 6 或版本 5Apache Axis 2版本 1.3 或更高版本,WAR 分发软件符合 Java EE 规范的 Web 服务器或应用服务器Tomcat Web Server 6.0 和/或GlassFish 应用服务器 v2 或 v3Tomcat 和 GlassFish 都可以随同 NetBeans IDE 的 Java Web 分发软件一起安装。
【前言】Eclipse,MyEclipse和NetBeans皆有庞大的用户群。
还有什么JBuilder等等。
英文学得一般的人用什么工具好呢?容易调试,易于找程序中难以发现的逻辑错误,用什么工具好呢?完全免费,又获得Oracle/Sun大力支持的工具在哪里? Here !以下,除了特别说明,均以NetBeans 6.5 为例。
实际上,NetBeans 6.X系列的设置都是大同小异的。
特别是,其集成的本地帮助文件能解决几乎全部的开发中遇见的问题。
自己按下F1键,试试。
NetBeans 6.5 ml版的IDE和帮助是中文的,6.9的IDE是中文的,帮助是英文的。
【内容】一、安装与卸载步骤:【安装】机器里要安装有JDK。
没有?先要单独安装JDK,最好是JDK1.6(即JDK6.0)及以上版本;对于操作系统的环境变量:不要求设置什么东西。
默认安装即可。
对于普通用途,可以不安装以下软件:Java ME、Ruby、C/C++、PHP、SOA、GlassFish、Open ESB 。
有时候,当你的系统较慢时,安装过程最多可能要用时30分钟;这种情况很少出现,但有时会出现,而且启动也慢,原因不明。
【卸载】卸载完后,最好是删除以下文件夹:C:\Documents and Settings\Administrator 下面的.nbi.netbeans.netbeans-registration当然,不删除,也没有什么问题。
PS:任何软件,用360卸载最好。
二、推荐理由:1、全中文环境,包括完善的帮助系统也是中文的。
你按一下F1键嘛! 【好】2、可以很方便第逐条运行语句,同时观察相应变量的值的变化情况。
【特!】支持逐条语句调试 JSP、Java Script、Java、Jsf 等等;【特!】这个自己一定要练练!单击代码编辑器左边,即可增加一个断点,是个粉红色的方形。
运行:F6 。
开始调试:ctrl+F5 ;如果弹出什么在何处调试窗口,你又不清楚,点击“确定”即可。
tomcat常用的调优参数Tomcat常用的调优参数Tomcat是一个开源的Java Servlet容器,广泛应用于Java Web 应用程序的部署和运行。
为了提高Tomcat的性能和稳定性,我们可以通过调优参数来优化其配置。
本文将介绍一些常用的Tomcat 调优参数,帮助您更好地配置和优化T omcat服务器。
1. 内存设置- -Xms: 设置JVM的初始堆大小,建议设置为物理内存的1/4或1/3。
- -Xmx: 设置JVM的最大堆大小,建议设置为物理内存的1/2或2/3。
- -XX:MaxPermSize: 设置JVM的永久代大小,建议设置为256MB或512MB。
- -XX:MaxMetaspaceSize: 设置JVM的元空间大小,建议设置为256MB或512MB。
2. 线程设置- maxThreads: 设置Tomcat的最大线程数,建议根据服务器的硬件配置和并发请求数进行调整。
- acceptCount: 设置Tomcat接受请求的队列大小,建议设置为200或300。
- connectionTimeout: 设置Tomcat的连接超时时间,建议设置为30秒或60秒。
3. 连接器设置- protocol: 设置连接器的协议,常用的有HTTP/1.1和AJP/1.3。
- port: 设置连接器的监听端口,建议使用80端口作为HTTP连接器的默认端口。
- maxKeepAliveRequests: 设置每个Keep-Alive连接的最大请求数,建议设置为100或200。
- keepAliveTimeout: 设置Keep-Alive连接的超时时间,建议设置为5秒或10秒。
4. 缓存设置- cacheSize: 设置Tomcat的静态文件缓存大小,建议根据静态文件的数量和大小进行调整。
- cacheTTL: 设置静态文件缓存的过期时间,建议设置为1小时或更长。
- cacheObjectMaxSize: 设置缓存对象的最大大小,建议根据缓存对象的平均大小进行调整。
tomcat内存配置及配置参数详解1、jvm内存管理机制:1)堆(Heap)和⾮堆(Non-heap)内存按照官⽅的说法:“ 虚拟机具有⼀个堆,堆是运⾏时数据区域,所有类实例和数组的内存均从此处分配。
堆是在 Java 虚拟机启动时创建的。
”“在JVM中堆之外的内存称为⾮堆内存(Non-heap memory)”。
可以看出JVM主要管理两种类型的内存:堆和⾮堆。
简单来说堆就是Java代码可及的内存,是留给开发⼈员使⽤的;⾮堆就是JVM留给⾃⼰⽤的,所以⽅法区、JVM内部处理或优化所需的内存(如JIT编译后的代码缓存)、每个类结构(如运⾏时常数池、字段和⽅法数据)以及⽅法和构造⽅法的代码都在⾮堆内存中。
堆内存分配JVM初始分配的堆内存由-Xms指定,默认是物理内存的1/64;JVM最⼤分配的堆内存由-Xmx指定,默认是物理内存的1/4。
默认空余堆内存⼩于40%时,JVM就会增⼤堆直到-Xmx的最⼤限制;空余堆内存⼤于70%时,JVM会减少堆直到-Xms的最⼩限制。
因此服务器⼀般设置-Xms、-Xmx 相等以避免在每次GC 后调整堆的⼤⼩。
说明:如果-Xmx 不指定或者指定偏⼩,应⽤可能会导致ng.OutOfMemory错误,此错误来⾃JVM,不是Throwable的,⽆法⽤try...catch捕捉。
⾮堆内存分配JVM使⽤-XX:PermSize设置⾮堆内存初始值,默认是物理内存的1/64;由XX:MaxPermSize设置最⼤⾮堆内存的⼤⼩,默认是物理内存的1/4。
(还有⼀说:MaxPermSize缺省值和-server -client选项相关,-server选项下默认MaxPermSize为64m,-client选项下默认MaxPermSize为32m。
这个我没有实验。
)上⾯错误信息中的PermGen space的全称是Permanent Generation space,是指内存的永久保存区域。
一、安装软件需要在计算机中安装以下软件:NetBeans IDE 4.1Java Standard Development Kit (JDKTM) 1.4.2 版或 5.0 版二、WEB服务器NetBeans IDE 4.1 捆绑了 Tomcat三、创建新的 Web 应用程序项目1、选择“文件”>“新建项目”。
在“类别”下选择 "Web"。
在“项目”下选择“Web 应用程序”,然后单击“下一步”。
2、在“项目名称”下输入 Testjsp。
请注意,“上下文路径”为 /Testjsp。
3、将“项目位置”更改为d:\App。
4、选择要部署应用程序的服务器。
Bundled Tomcat( 5.5.7)5、将“设置为主项目”复选框保留为选中状态。
单击“完成”。
IDE 将创建d:/App/Testjsp项目文件夹。
该项目文件夹包含所有的源和项目元数据,如项目的 Ant 生成脚本。
将在 IDE 中打开 HelloWeb 项目。
可以在“项目”窗口中查看其逻辑结构,并在“文件”窗口中查看其文件结构。
四、创建 Java 包和 JavaBeans 组件1、展开 HelloWeb 项目节点和“源包”节点。
请注意,“源包”节点只包含一个空的缺省包节点。
2、右键单击“源包”节点并选择“新建”>“文件/文件夹”。
在“类别”下选择“JavaBeans 对象”。
在“文件类型”下选择“JavaBeans 组件”,然后单击“下一步”。
在“类名”文本框中输入 NameHandler,然后在“包”组合框中输入。
单击“完成”。
五、编辑 JavaBeans 组件1、展开 NameHandler.java 节点,然后双击 NameHandler 类节点。
在源编辑器中,删除以下类声明部分:extends Object implements Serializable2、展开 NameHandler 类节点和“字段”节点。
Tomcat配置你所需要做的就是:按照你的需求配置Tomcat,只要你正确配置,Tomcat一般都能适合你的要求。
下面是一系列关于Tomcat的配置技巧,这些技巧源自于我的书:《Tomcat权威指南》,希望对你有所帮助。
Jason Brittain1.配置系统管理(Admin Web Application)大多数商业化的J2EE服务器都提供一个功能强大的管理界面,且大都采用易于理解的Web应用界面。
Tomcat按照自己的方式,同样提供一个成熟的管理工具,并且丝毫不逊于那些商业化的竞争对手。
Tomcat的Admin Web Application最初在4.1版本时出现,当时的功能包括管理context、data source、user和group等。
当然也可以管理像初始化参数,user、group、role的多种数据库管理等。
在后续的版本中,这些功能将得到很大的扩展,但现有的功能已经非常实用了。
Admin Web Application被定义在自动部署文件:CATALINA_BASE/webapps/admin.xml 。
(译者注:CATALINA_BASE即tomcat安装目录下的server目录)你必须编辑这个文件,以确定Context中的docBase参数是绝对路径。
也就是说,CATALINA_BASE/webapps/admin.xml 的路径是绝对路径。
作为另外一种选择,你也可以删除这个自动部署文件,而在server.xml文件中建立一个Admin Web Application的context,效果是一样的。
你不能管理Admin Web Application这个应用,换而言之,除了删除CATALINA_BASE/webapps/admin.xml ,你可能什么都做不了。
如果你使用UserDatabaseRealm(默认),你将需要添加一个user以及一个role到CATALINA_BASE/conf/tomcat-users.xml 文件中。
Netbeans中Tomcat服务器配置Netbeans Tomcat服务器实例配置1.在netbeans-tools-server manerger下添加tomcat服务器,默认是已经配置好的。
配置用户:这个要在base directory 下的tomcat-users.xml文件中设置用户角色(role):admin 或者manager 或者admin,managerHome Directory.服务器所在目录,安装好以后基本不管它的事了Base Directory:用户配置所在目录,设置你的服务器和你的servlets2.发布servlet新建一个工程,samples下有tomcat servlet example.命名为TomcatServletExample 在base directory下有apache-tomcat-5.5.17_base\work\Catalina\localhost\servlets-examples\tldCache.ser 在apache-tomcat-5.5.17_base\conf\Catalina\localhost下有depth#examples.xml:这是以文件夹和文件形式发布的结构。
前面提到的servlets-examples.xml文件中的docBase 属性就是我工程文件的目录,path是制定的访问路径,比如,我这里可以通过http://localhost:8084/servlets-examples/访问, 客户端的访问就是通过这个文件来转向的docBase的典型结构是:*.html, *.jsp, etc :页面/WEB-INF/web.xml :he Web Application Deployment Descriptor for your application. This is an XML file describing the servlets and other components that make up your application, along with any initialization parameters and container-managed security constraints that you want the server to enforce for you./WEB-INF/classes/ :编译后的.class文件/WEB-INF/lib/ :This directory contains JAR files that contain Java class files (andassociated resources) required for your application, such as third party class libraries or JDBC drivers.3. 弄清了结构,然后自己动手写一个简单新建一个web application, 默认有一个index.jsp作为首页,首页可以在web.xml的pages 标签下修改index.jsp在body标签下添加:Execute在source packages下添加NewServlet.class, 代码附在后面在web.xmlservlet标签下配置NewServlet, 指定servlet class和url pattern, 我指定的是/NewServlet,在http://localhost:8084/WebServletTest/NewServlet下就访问到了发现有时候要编译两次才能显示正确的结果连接一个图片时,文件名竟然是大小写敏感的netbeans的web sample下有tomcat servlet的例子,是学习servlet的很好的例子实例代码:1.-------------------------------------2.3.import java.io.*;4.import .*;5.import javax.servlet.*;6.import javax.servlet.http.*;7.public class NewServlet extends HttpServlet {8./** Initializes the servlet. Connections to databases belong here !9.*/10.public void init(ServletConfig config) throws ServletException {11.super.init(config);12.13.}14.15./** Destroys the servlet. Close connections, files, etc.16.*/17.public void destroy() {18.19.}20.21.// Form values can be passed by 2 methods, GET or POST22.// the doGet() (resp. doPost()) method is called when the method is23.// GET (resp POST).24.// The following trick allows us to process both with one function25.26.protected void doGet(HttpServletRequest request, HttpServletResponse response)27.throws ServletException, IOException {28.processRequest(request, response);29.}30.31.protected void doPost(HttpServletRequest request, HttpServletResponse response)32.throws ServletException, IOException {33.processRequest(request, response);34.}35.36.protected void processRequest(HttpServletRequest request, HttpServletResponseresponse)37.throws ServletException, IOException {38.response.setContentType("text/html");39.PrintWriter out = response.getWriter();40.41.out.println("");42.out.println("");43.out.println("");44.out.println("");45.out.println("");46.// The real work of the servlet begins here47.48.// A servlet does nothing else than outputing HTML code49.// to the webserver. It can output the HTML code corresponding50.// to a form. The user fills this form and, when the Submit button51.// is clicked, the values are sent to the appropriate program on the52.// webserver (in this case, our servlet) which then uses these values53.// to `calculate' what it should display this time54.55.// If the servlet is simply56.// called by visiting an url or clicking a link, all parameters57.// will have null values. This is what happens when you type58.// `' in your browser. We can detect this and59.// print out a default `welcome' message (as below).60.// If the servlet is called by clicking a submit61.// button, no parameter will have null values (fields not filled62.// by the user will return empty strings, not null).63.64.if (request.getParameter("myparam") != null)65.// the request.getParameter function allows us to obtain the66.// values entered by the user in the various input fields67.out.println("Your parameter is "+request.getParameter("myparam")+"68.");69.else70.out.println("Hello, please enter a parameter !71.");72.out.println(" Enter your new parameter here:73.");74.out.println(75.// The `action` field of the `form` tag indicates which program76.// should be called by the webserver when the user clicks `submit'77.// in this case, we tell it to call the same servlet again78." "+79.// The 'name' of the input field corresponds to the name of the80.// parameter which will contain the value81.// entered in this input field (here, it is 'myparam' - see above)82."83."+84.// The special `submit` input field generates a submit button85.""86.// When the user clicks the submit button, the browser sends a87.// request to the servlet whose name is contained in the `action`88.// field of the `` tag, which in this case is the present89.// servlet. This request includes the values entered by the user90.// in the different input fields as parameters.91.+""92.);93.94.out.println("");95.out.println("");96.97.out.close();98.}99.100.public String getServletInfo() { 101.return "Short description"; 102.}103.104.}。
1.直接使用MyEclipse在服务器上配置<1> 打开MyEclipse>>选择window>>preferences>>MyEclipse>>applicationServers>>选择所用服务tomact6.0>>选择enable(表示可用)>>选择tomcat主目录>>JDK主目录(只要选择到jdk主目录就可以了)>>选择apply<2> 回到MyEclipse主界面>>选择ProjectDeployments >>选择add(添加第一步配置好的tomcat6.0服务)>>确定就可以直接运行web程度(项目已经保存到webapps中表示已经配置成功了)<3>不推荐使用当前方法,因为如果project有一个文件修改必须重新配置项目。
2.通过外接服务器方式运行程序(推荐)<1>通过修改tomacat6.0/conf文件夹下的server.xml,打开server.xml添加Context<Host><Context page="/demo" docBase="C:\Documents and Settings\Lang\workspace\testStruts\WebRoot"/></Host><2>重新启动服务器可以直接运行web程序在MyEclipse中配置Tomcat服务器收藏郁闷!为了在MyEclipse配置Tomcat 服务器,竟然弄了我几乎一个上午,也没弄成功,最后才注意到本该早注意到Tomcat 5.x还有个JDK这个东东,才成功了。
一上午辛辛苦苦也没解决就是因为没注意到他害的,其实配置是很简单的。
下面是其步骤:一、单击工具栏的的黑小三角或者单击菜单栏窗口—>首选项,出现首选项对话框,在对话框的左边框中找到MyEclipse—>Application Servers下找到Tomcat选项,如下图,二、根据自己的Tomcat版本选择相应的Tomcat选项(我的是5.0版本),然后在对话框右侧的Tomcat home directory选项选择Tomcat的安装目录,下面的Tomcat base directory和Tomcat temp directory系统会自动为你填上,Optional program arguments可以不用填,我也不知道这是做什么用的,再选上Enable选项,要不然在待会儿在Server中看不到Tomcat服务器三、千万别忘了Tomcat 选项下面的JDK,我就是因为没注意到它才一直不成功,单击JDK,弹出如下对话框,Notes会提示你怎么做,四、点击Tomcat JDK name旁的"Add",弹出如下对话框:JRE名称(N)选项填上名字(可以随便取),在JRE主目录选项选择你的jdk安装目录(仅仅只是jdk,不包含jre),JRE系统库系统会自动添加,缺省JVM参数可以不用填,按“确定”回到上级再按“确定”就OK了。
tomcat的配置使⽤详细版(⼩结)摘要:开发者开发部署web应⽤时通常使⽤tomcat服务器,很多初学者只懂得在开发⼯具上配置,但离开了开发⼯具,⾃⼰⼿动配置部署,并让⼀个项⽬跑起来,你会了吗。
⼩编也遇到过这样的困扰。
⽹上查找的资料说法不⼀,⼩编就亲⾃动⼿实验⼀. 下载tomcat服务器直接到官⽹下载就好,根据⾃⼰的电脑系统选择对应的版本下载,window系统下载zip包,下载后解压、⼆. 配置我们下载完成后,我们试图启动tomcat,启动有两种⽅式直接到tomcat服务器的bin⽬录下双击startup.bat通过cmd进⼊bin⽬录,输⼊命令startup.bat但这时会出现的问题是,服务器启动程序只是⼀闪⽽过,为什么呢?其实问题就是,没有Java的JDK,我们需要到环境变量配置系统变量JAVA_HOME。
我们都知道,1.5 以上的版本的JDK只需要配置path变量就可以了。
但是如果你想在机器上使⽤tomcat的话,你就必须配置JAVA_HOME,指向JDK的安装位置。
这样就能使⽤tomcat部署应⽤了吗,还不⾏。
我们还需要另外的⼀些配置2.1 配置环境变量我们需要配置三个系统环境变量1. ATALINA_BASE:指向tomcat的安装位置2. CATALINE_HOME:指向tomcat的安装位置3. Path:%CATALINA_HOME%\lib;%CATALINA_HOME%\bin2.2 配置tomcat的服务端⼝tomcat的默认服务端⼝是8080。
可以通过配置⽂件来改变该服务端⼝,甚⾄通过修改配置⽂件让tomcat同时在多个端⼝提供服务tomcat的配置⽂件都放在conf⽬录下。
使⽤⽆格式⽂本编辑器打开该⽬录下的server.xml⽂件,定位到68⾏处<Connector port="8080" protocol="HTTP/1.1"connectionTimeout="20000"redirectPort="8443" />其中,port="8080"就是web应⽤的服务端⼝,将8080改为任意端⼝,建议使⽤1024以上的端⼝,避免与公⽤端⼝冲突。
Netbeans中Tomcat服务器配置Netbeans Tomcat服务器实例配置1.在netbeans-tools-server manerger下添加tomcat服务器,默认是已经配置好的。
配置用户:这个要在base directory 下的tomcat-users.xml文件中设置用户角色(role):admin 或者manager 或者admin,managerHome Directory.服务器所在目录,安装好以后基本不管它的事了Base Directory:用户配置所在目录,设置你的服务器和你的servlets2.发布servlet新建一个工程,samples下有tomcat servlet example.命名为TomcatServletExample 在base directory下有apache-tomcat-5.5.17_base\work\Catalina\localhost\servlets-examples\tldCache.ser 在apache-tomcat-5.5.17_base\conf\Catalina\localhost下有depth#examples.xml:这是以文件夹和文件形式发布的结构。
前面提到的servlets-examples.xml文件中的docBase 属性就是我工程文件的目录,path是制定的访问路径,比如,我这里可以通过http://localhost:8084/servlets-examples/访问, 客户端的访问就是通过这个文件来转向的docBase的典型结构是:*.html, *.jsp, etc :页面/WEB-INF/web.xml :he Web Application Deployment Descriptor for your application. This is an XML file describing the servlets and other components that make up your application, along with any initialization parameters and container-managed security constraints that you want the server to enforce for you./WEB-INF/classes/ :编译后的.class文件/WEB-INF/lib/ :This directory contains JAR files that contain Java class files (andassociated resources) required for your application, such as third party class libraries or JDBC drivers.3. 弄清了结构,然后自己动手写一个简单新建一个web application, 默认有一个index.jsp作为首页,首页可以在web.xml的pages 标签下修改index.jsp在body标签下添加:Execute在source packages下添加NewServlet.class, 代码附在后面在web.xmlservlet标签下配置NewServlet, 指定servlet class和url pattern, 我指定的是/NewServlet,在http://localhost:8084/WebServletTest/NewServlet下就访问到了发现有时候要编译两次才能显示正确的结果连接一个图片时,文件名竟然是大小写敏感的netbeans的web sample下有tomcat servlet的例子,是学习servlet的很好的例子实例代码:1.-------------------------------------2.3.import java.io.*;4.import .*;5.import javax.servlet.*;6.import javax.servlet.http.*;7.public class NewServlet extends HttpServlet {8./** Initializes the servlet. Connections to databases belong here !9.*/10.public void init(ServletConfig config) throws ServletException {11.super.init(config);12.13.}14.15./** Destroys the servlet. Close connections, files, etc.16.*/17.public void destroy() {18.19.}20.21.// Form values can be passed by 2 methods, GET or POST22.// the doGet() (resp. doPost()) method is called when the method is23.// GET (resp POST).24.// The following trick allows us to process both with one function25.26.protected void doGet(HttpServletRequest request, HttpServletResponse response)27.throws ServletException, IOException {28.processRequest(request, response);29.}30.31.protected void doPost(HttpServletRequest request, HttpServletResponse response)32.throws ServletException, IOException {33.processRequest(request, response);34.}35.36.protected void processRequest(HttpServletRequest request, HttpServletResponseresponse)37.throws ServletException, IOException {38.response.setContentType("text/html");39.PrintWriter out = response.getWriter();40.41.out.println("");42.out.println("");43.out.println("");44.out.println("");45.out.println("");46.// The real work of the servlet begins here47.48.// A servlet does nothing else than outputing HTML code49.// to the webserver. It can output the HTML code corresponding50.// to a form. The user fills this form and, when the Submit button51.// is clicked, the values are sent to the appropriate program on the52.// webserver (in this case, our servlet) which then uses these values53.// to `calculate' what it should display this time54.55.// If the servlet is simply56.// called by visiting an url or clicking a link, all parameters57.// will have null values. This is what happens when you type58.// `' in your browser. We can detect this and59.// print out a default `welcome' message (as below).60.// If the servlet is called by clicking a submit61.// button, no parameter will have null values (fields not filled62.// by the user will return empty strings, not null).63.64.if (request.getParameter("myparam") != null)65.// the request.getParameter function allows us to obtain the66.// values entered by the user in the various input fields67.out.println("Your parameter is "+request.getParameter("myparam")+"68.");69.else70.out.println("Hello, please enter a parameter !71.");72.out.println(" Enter your new parameter here:73.");74.out.println(75.// The `action` field of the `form` tag indicates which program76.// should be called by the webserver when the user clicks `submit'77.// in this case, we tell it to call the same servlet again78." "+79.// The 'name' of the input field corresponds to the name of the80.// parameter which will contain the value81.// entered in this input field (here, it is 'myparam' - see above)82."83."+84.// The special `submit` input field generates a submit button85.""86.// When the user clicks the submit button, the browser sends a87.// request to the servlet whose name is contained in the `action`88.// field of the `` tag, which in this case is the present89.// servlet. This request includes the values entered by the user90.// in the different input fields as parameters.91.+""92.);93.94.out.println("");95.out.println("");96.97.out.close();98.}99.100.public String getServletInfo() { 101.return "Short description"; 102.}103.104.}。