Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Connection times out

Status
Not open for further replies.

SKelem

Programmer
Aug 2, 2002
4
US
I'm trying to deploy a bot from the book "Programming Spiders, Bots, and Aggregators in Java".
It's the "translate" program in chapter 4, which is supposed to translate a page into pig latin.
Whenever I run it in Tomcat, I get a connection timed out message, even though I told my socket not to time out.

1. Does Tomcat restrict access to network connections?
If so, how do I enable my application to talk to any site? (You're supposed to be able to enter the url of the site you
want to translate into the .jsp form, and then the java program will do the translation and then output the translated page.)

2. I tried adding the following lines to conf/catalina.policy:

grant codeBase "file:${catalina.home}/webapps/translate/-" {
permission java.net.SocketPermission "*", "connect, accept, connect, listen, resolve";
};

grant codeBase "file:${catalina.home}/webapps/translate.war" {
permission java.net.SocketPermission "*", "connect, accept, connect, listen, resolve";
};

Is the specification "*" okay? I hope I don't have to list every possible url.

3. I tried stopping the Tomcat service and addint the -security "start parameter" in the Windows Services Properties window.
How do I get the tomcat service to use this parameter always?

Thanks,
Steve Kelem
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top