How to interact with a java servlet running on glassfish with telnet?

I have a servlet hosted in the glassfish server. i want to communicate with it using telnet to understand what is going on behind the scenes when using html form get method. What should i give in the Host field of the HTTP request? Get /WebApplication1/NServlet HTTP/1.1 Host: localhost If i want to send custom properties in the HTTP request as below, is it possible to extract their value using request.getAttribute() method. Get /WebApplication1/NServlet HTTP/1.1 Host: localhost Custom-Attribute: xyz Another doubt is that is javax.servlet package not a part of java SE sdk. i had to install java ee to get it running.
Why do you want to use telnet, that's nuts. If you want to understand what's going on then write a simple client using Python and httplib, alternatively the Apache HttpClient library will help you...

以上就是How to interact with a java servlet running on glassfish with telnet?的详细内容,更多请关注web前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » JavaScript 答疑

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准

联系我们

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏