当前位置: 首页 > news >正文

自我介绍的网站设计怎么做wordpress自定义类型的分类名称

自我介绍的网站设计怎么做,wordpress自定义类型的分类名称,做门户网站可以用的字体,欧美视频在线电影尽管很长一段时间以来我一直在使用Maven#xff0c;但直到最近我才使用过Jetty插件。 为了能够测试REST客户端#xff0c;我创建了一个Servlet#xff0c;向我显示了所有传入的参数和带有传入请求的标头。 为了在容器中运行servlet#xff0c;我决定尝试使用Maven Jetty插件… 尽管很长一段时间以来我一直在使用Maven但直到最近我才使用过Jetty插件。 为了能够测试REST客户端我创建了一个Servlet向我显示了所有传入的参数和带有传入请求的标头。 为了在容器中运行servlet我决定尝试使用Maven Jetty插件 。 所以首先我使用特定的Maven原型创建一个Web应用程序 mvn archetype:generate -DgroupIdnet.pascalalma -DartifactIdrest-service -Dversion1.0.0-SNAPSHOT -DarchetypeArtifactIdmaven-archetype-webapp 这将导致完整的项目和以下日志记录 [INFO] Scanning for projects... [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building Maven Stub Project (No POM) 1 [INFO] ------------------------------------------------------------------------ [INFO] [INFO] maven-archetype-plugin:2.2:generate (default-cli) standalone-pom [INFO] [INFO] maven-archetype-plugin:2.2:generate (default-cli) standalone-pom [INFO] [INFO] --- maven-archetype-plugin:2.2:generate (default-cli) standalone-pom --- [INFO] Generating project in Interactive mode Downloading: http://artifactory.redstream.nl/repo/org/apache/maven/archetypes/maven-archetype-webapp/1.0/maven-archetype-webapp-1.0.jar Downloaded: http://artifactory.redstream.nl/repo/org/apache/maven/archetypes/maven-archetype-webapp/1.0/maven-archetype-webapp-1.0.jar (4 KB at 5.2 KB/sec) Downloading: http://artifactory.redstream.nl/repo/org/apache/maven/archetypes/maven-archetype-webapp/1.0/maven-archetype-webapp-1.0.pom Downloaded: http://artifactory.redstream.nl/repo/org/apache/maven/archetypes/maven-archetype-webapp/1.0/maven-archetype-webapp-1.0.pom (533 B at 1.1 KB/sec) [INFO] Using property: groupId net.pascalalma [INFO] Using property: artifactId rest-service [INFO] Using property: version 1.0.0-SNAPSHOT [INFO] Using property: package net.pascalalma Confirm properties configuration: groupId: net.pascalalma artifactId: rest-service version: 1.0.0-SNAPSHOT package: net.pascalalmaY: : Y [INFO] ---------------------------------------------------------------------------- [INFO] Using following parameters for creating project from Old (1.x) Archetype: maven-archetype-webapp:1.0 [INFO] ---------------------------------------------------------------------------- [INFO] Parameter: groupId, Value: net.pascalalma [INFO] Parameter: packageName, Value: net.pascalalma [INFO] Parameter: package, Value: net.pascalalma [INFO] Parameter: artifactId, Value: rest-service [INFO] Parameter: basedir, Value: /Users/pascal/projects [INFO] Parameter: version, Value: 1.0.0-SNAPSHOT [INFO] project created from Old (1.x) Archetype in dir: /Users/pascal/projects/rest-service [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 13.057s [INFO] Finished at: Sun Feb 03 17:13:33 CET 2013 [INFO] Final Memory: 7M/81M [INFO] ------------------------------------------------------------------------ MacBook-Air-van-Pascal:projects pascal$ 接下来我将servlet代码添加到项目中 package net.pascalalma.servlets;import java.io.IOException; import java.io.PrintWriter; import java.util.Enumeration; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse;/**** author pascal*/ public class TestRestServlet extends HttpServlet {public void doGet(HttpServletRequest request,HttpServletResponse response)throws ServletException, IOException {PrintWriter out response.getWriter();out.println(GET method called);out.println(parameters:\n parameters(request));out.println(headers:\n headers(request));}public void doPost(HttpServletRequest request,HttpServletResponse response)throws ServletException, IOException {PrintWriter out response.getWriter();out.println(POST method called);out.println(parameters: parameters(request));out.println(headers: headers(request));}public void doDelete(HttpServletRequest request,HttpServletResponse response)throws ServletException, IOException {PrintWriter out response.getWriter();out.println(Delete method called);}private String parameters(HttpServletRequest request) {StringBuilder builder new StringBuilder();for (Enumeration e request.getParameterNames(); e.hasMoreElements();) {String name (String) e.nextElement();builder.append(| name - request.getParameter(name)\n);}return builder.toString();}private String headers(HttpServletRequest request) {StringBuilder builder new StringBuilder();for (Enumeration e request.getHeaderNames(); e.hasMoreElements();) {String name (String) e.nextElement();builder.append(| name - request.getHeader(name)\n);}return builder.toString();} } 并在“ web.xml”中配置servlet。 顺便说一下生成的“ web.xml”无法显示在我的Netbeans版本v7.2.1中。 我收到消息 Web应用程序版本不受支持。 将web.xml升级到2.4或更高版本或使用以前的NetBeans版本 为了解决这个问题我修改了web.xml使其从以下命名空间声明开始 web-app xmlns:xsihttp://www.w3.org/2001/XMLSchema-instance xmlnshttp://java.sun.com/xml/ns/javaee xmlns:webhttp://java.sun.com/xml/ns/javaee/web-app_2_5.xsd xsi:schemaLocationhttp://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd idWebApp_ID version2.5 接下来将servlet添加到修改后的“ web.xml”中 ?xml version1.0 encodingUTF-8? ...display-nameArchetype Created Web Application/display-nameservletservlet-nameTestRestServlet/servlet-nameservlet-classnet.pascalalma.servlets.TestRestServlet/servlet-class/servletservlet-mappingservlet-nameTestRestServlet/servlet-nameurl-pattern/TestRestServlet/url-pattern/servlet-mapping ... 现在一切准备就绪可以测试servlet。 正如我之前所说的我将为此使用Jetty插件。 要将插件添加到项目中只需将以下内容放入“ pom.xml”中 pluginsplugingroupIdorg.mortbay.jetty/groupIdartifactIdjetty-maven-plugin/artifactIdconfigurationscanIntervalSeconds10/scanIntervalSecondscontextPath//contextPathscanIntervalSeconds10/scanIntervalSecondsstopKeySTOP/stopKeystopPort8005/stopPortport8080/port/configuration/plugin /plugins 现在我可以在终端中运行命令“ mvn jettyrun”以使容器运行servlet。 日志应该以以下内容结尾 .... 2013-02-19 09:54:53.044:INFO:oejs.AbstractConnector:Started SelectChannelConnector0.0.0.0:8080 [INFO] Started Jetty Server [INFO] Starting scanner at interval of 10 seconds./code 现在如果您打开浏览器并转到该URLhttp// localhost8080 / TestRestServletbla true8217 ; 您将看到servlet的运行并输出到浏览器 GET method called parameters: |bla-trueheaders: |DNT-1 |Host-localhost:8080 |Accept-text/html,application/xhtmlxml,application/xml;q0.9,*/*;q0.8 |Accept-Charset-ISO-8859-1,utf-8;q0.7,*;q0.3 |Accept-Language-en-US,en;q0.8 |User-Agent-Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_5) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.57 Safari/537.17 |Connection-keep-alive |Cache-Control-max-age0 |Accept-Encoding-gzip,deflate,sdch 注意事项如您所见在插件配置中为方便起见我添加了一些额外的参数。 因此容器将每隔10秒检查一次servlet中的更改因此我不必在每次更改servlet之后重新启动Jetty容器。 要停止容器您现在可以在另一个终端会话中输入命令mvn jettystop -DstopPort 8005 -DstopKey STOP。 顺便说一句请确保将插件命名为“ jetty-maven-plugin”而不是“ maven-jetty-plugin”因为那样您将使用该插件的旧版本而该插件不会使用配置参数是的非常令我感到困惑和沮丧。 参考在The Pragmatic Integrator博客上使用我们JCG合作伙伴 Pascal Alma的Maven Jetty插件 。 翻译自: https://www.javacodegeeks.com/2013/03/using-maven-jetty-plugin.html
http://wiki.neutronadmin.com/news/57438/

相关文章:

  • 从化网站建设服务html网页设计作业代码
  • 苏州专业做网站较好的公司有哪些视频网站logo怎么做的
  • 定制网站建设简介信阳网站建设公司
  • 网站信息平台建设方案钟表玻璃东莞网站建设
  • 社区微网站建设方案提供网络推广服务
  • 酷站官网庐山市建设规划局网站
  • ajax+jsp网站开发从入门到精通彩票网站有人做吗
  • 常州商城网站制作公司wordpress shopme
  • 免费发布网站建设的平台软件开发三个主要阶段
  • 外贸网站建站平台seo怎么优化排名
  • 有哪些电商网站wordpress 滑块插件
  • 模拟炒股网站开发开发门户网站多少钱
  • 空间主机 建网站content index for wordpress
  • 立水桥网站建设网站被抄袭怎么投诉
  • 郓城菏泽网站建设上海网站建设开发
  • 昆明建网站的公司wordpress每篇文章加水印
  • 百度搜索官方网站2023新闻头条最新消息今天
  • 学技能的免费网站开发者选项在哪里打开
  • 杭州网站建设教育机构没域名 打开网站
  • 杭州网站排名提升专业的企业宣传片制作企业
  • 海康打开网站显示建设中rss网站推广法
  • 趣php网站开发实战代码制作网站接单
  • 门户型网站网店营销推广策略
  • 临沧网站建设网站设计西安学习
  • 建设一个网站的基本步骤网站的毕业设计怎么做
  • 灯具网站建设门户网站建设需求模板
  • 免费网站你懂我意思正能量软件网站制作难度
  • 收录查询站长工具上海大型网站开发公司
  • 五合一免费建站中小企业管理软件
  • vc 做网站源码ajax网站开发技术