老师,这里的域名是不是也可以是服务端的IP?就像自己的电脑没有域名充当服务端的时候,这里是不是也可以是自己电脑的IP?
老师我越搞越混了,就是json格式和里面那种id:name:这种不是json格式吗为什么啊
没看懂报的是什么错
ServletDemon.rar
老师麻烦帮我看下为什么不能访问adduser.html
老师,为什么打开网页源代码的时候好多检查里面的数据就会被折叠了,怎么才能复制那些被折叠了的源代码呢?
老师,这里8,9,10步返回的是HttpServletRespon对象吗?是把结果基于对象返回给客户端?还是把流里面的数据给客户端?
老师,为啥我的控制台不答应监听相关的内容,我写了触发监听的代码,也配置了信息,当我请求的时候控制台没有反应
@WebServlet("/attr.do") public class ServletContextAttrListenerServlet extends HttpServlet { @Override protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { ServletContext servletContext = this.getServletContext(); servletContext.setAttribute("key","itBz"); servletContext.setAttribute("key","SxtIt"); servletContext.removeAttribute("key"); } }
public class ServletContextAttrListener implements ServletContextAttributeListener { /** * 向ServletContext对象中添加属性时会触发该监听方法,并将 * ServletContext对象传递到该方法中。触发事件的方法 * servletContext.setAttribute("key","value")。 * @param scae */ @Override public void attributeAdded(ServletContextAttributeEvent scae) { System.out.println("------------------Start Added----------------------"); System.out.println("name: "+scae.getName()+"value: "+scae.getValue()); System.out.println(scae.getServletContext()); System.out.println("------------------End Added----------------------"); }
com.itbaizhan.listener.ServletContextAttrListener
老师,这个时候我用tomcat应用服务器的时候,硬件服务器是不是就是我的电脑cpu?然后我电脑上运行了tomcat,其他电脑也可以访问我电脑上写的东西?
此次requestdemo.jsp中没有得到Servlet的响应一般是什么问题导致,总感觉发送不了请求
老师,HttpServlet里的service方法调用的doGet方法,调用的是我们自己重写的doGet方法吗,
老师,添加用户和更新用户的点击事件,不能再标签上直接写事件嘛,一定要在页面加载的时候绑定嘛?
解决了
这个页面是怎么回事啊,按着步骤来的,拒绝连接啊啊啊啊
com.panda.xmlorg.jsoup.Jsouporg.jsoup.nodes.Documentorg.jsoup.nodes.Elementorg.jsoup.select.Elementsjava.io.IOExceptionjava.net.MalformedURLExceptionjava.net.URLGrawlDemo StringargsIOException i=i<=i++Document document = Jsoup.URL+iSystem..printlndocumentElements headerImgEle = document.getElementsByAttributeValueElements headerEle = document.selectElements authorEle = document.selectElements contentEle = document.selectString headerImg = headerImgEle.get.attrString header = headerEle.textString author = authorEle.textString content = contentEle.textSystem..printlnheaderImgSystem..printlnheaderSystem..printlnauthorSystem..printlncontent
老师,这个编译后还存在标签和报错Exception in thread "main" org.jsoup.HttpStatusException: HTTP error fetching URL. Status=404, URL=https://daily.zhihu.com/story/9747249 at org.jsoup.helper.HttpConnection$Response.execute(HttpConnection.java:760) at org.jsoup.helper.HttpConnection$Response.execute(HttpConnection.java:706) at org.jsoup.helper.HttpConnection.execute(HttpConnection.java:299) at org.jsoup.helper.HttpConnection.get(HttpConnection.java:288) at org.jsoup.Jsoup.parse(Jsoup.java:183) at com.panda.xml.GrawlDemo.main(GrawlDemo.java:17)
非常抱歉给您带来不好的体验!为了更深入的了解您的学习情况以及遇到的问题,您可以直接拨打投诉热线:
我们将在第一时间处理好您的问题!
关于
课程分类
百战程序员微信公众号
百战程序员微信小程序
©2014-2025百战汇智(北京)科技有限公司 All Rights Reserved 北京亦庄经济开发区科创十四街 赛蒂国际工业园网站维护:百战汇智(北京)科技有限公司 京公网安备 11011402011233号 京ICP备18060230号-3 营业执照 经营许可证:京B2-20212637