Discussion Locked

changingIPAdd,PortNodynamicallyinservlet

0 helpful
3 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I'm calling a servlet from another servlet by passing the IPaddress and Port Number in the embedded html form tag in the calling servlet.
I want to change the IP Address and port number
dynamically without having to compile the calling servlet again.How do I do it?Is there any way I can store the IPAddress and portno in a file so that I can change there and use that in the calling servlet

3 replies

by zeshanzia

Your problem is that you need dynamic data in your first servlet right?

1. You can use HTML forms to read data from user.
2. You can use standard java techniques to read from file. Use standard IO techniques.
3. If you adopt the second method do it with Properties file and respective class api.

This discussion is closed to new replies.