• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Calling Servlet form Command Prompt

 
Ravi Shankar Mukkavilli
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

This question is out of curiosity and not really conderned with SCWCD. Thought this might be the best place to put in.

My Question is " Can we call a Servlet (or) JSp from command propmpt."
If Yes how?


Thanks
Ravi Shankar M
 
Ner min
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
no main(String[] args) , no cmd-promt

but u can test it via telnet or so
 
Ravi Shankar Mukkavilli
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
if we can call the servelt for a main() method... then we need to call the servlet's lifecycle methods in the main method, but will the container create the request and response objects?? or do we have to create those??
 
Ner min
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
u can "instantiate" u're servlet class from some app, but u wont get the "servletness",it would be POJO but not real servlet(if it compiles).

But what u can do in u're main is: make a socet or so and then call the servlet via GET througth HTTP. But u still need to have de deployed servlet on the server to which u r callin.
[ September 23, 2005: Message edited by: Ner min ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic