If your router supports SSH or Telnet, I would use a proper library for that. You can find some on Google. If not, and HTTP is the only options, then you simply won't be able to send it commands other than those already available on its web management console. You can use something like Apache's HttpClient to execute GET and POST request.
Ulf Dittmer wrote:Are you certain that the way to get the router to do something is to POST "sh runn" to it? Is that what its documentation says to do?
i am not sure
i connected to router
What is the response of the router
i am getting status 500
i know it is server error i.e router
i don't know what is the problem internally.
after connecting to the server i want execute a the "show run-configuration" command
then read the response.
can any one give the idea or sample code to execute that command on router
my router is "cisco 2161"
Thanks in advance,
Joined: Mar 22, 2005
Cisco hardware is rather expensive - I'd expect there to be extensive documentation available on Cisco's web site.
subject: how to execute commands on router using java code