请问,要写一个程序解析xml文件,访问的时候还要输入用户名和密码进行认证,访问的协议是http get 方式,请问怎么可以实现啊,有没有这方面的例子,谢谢啦!
解决方案 »
- 急!java.lang.NoClassDefFoundError: org/hibernate/HibernateException
- 再强的人,也有难题,各位强人,欢迎来到强人所难WEB技术交流群(3901579)
- 关于在类中写Session
- 装完JB后郁闷的问题!!
- JSP框架(frameset)跳转后,部分栏无法显示
- 大家帮我看看,Servlet向Applet返回从数据库中取得的数据时报错
- 喜力搜索:www.syneed.com
- Tomcat里怎么配才能运行Servlet
- Servlet继承runnable接口是什么意思?
- Struts中的checkbox问题,如何根据数据库中的内容让checkbox为选中和未选中
- 这样为什么出现错误
- 类似人人网的在线聊天方案
第二步,把大象放进去。找个xml的示例,运行一下。两示例合在一起。。哈哈。。
client.getState().setCredentials("http://192.168.1.88", "realm", new UsernamePasswordCredentials("test","111"));
GetMethod get = new GetMethod("http://192.168.1.88/test.html");
get.setDoAuthentication(true);
int status = client.executeMethod(get);
System.out.println(status+ "\n" + get.getResponseBodyAsString());
get.releaseConnection();总是返回这样的错误:INFO auth.AuthChallengeProcessor - ntlm authentication scheme selected,有没有做过这方面的高手,指导一下!