• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Tomcat CGI to lunch Java Jar Server

 
Rui Miranda
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey community,

I'm having a problem making a cgi to run my alredy packed and "ready-for-sale" Java Server, in jar compact fully functional when i run the jar in the windows environment.
Now im trying to make a cgi, on Tomcat6.0 WebServer via Eclipse, using a Dynamic Web Project with the strutcure(briefed):

WebProject:
>WebContent:
>index.jsp (Where i have the links to the cgi's/bat's)
>WEB-INF:
>cgi:
>ServerRemoteStart.bat
>helloworld.bat

I have alredy sucessfuly seted Tomcat to run CGI, the prof of that is that i can execute helloworld.bat with no problems. The ServerRemoteStart.bat is as follow:

And it works fine if i copy paste it to the cmd, but when i click the link in the index to the ServerRemoteStart.bat i get the following error:


********* = HostName
The 3 last lines are my handling of the IOException(there's nothing alredy running on that port, runned Netstat -a -n -o to checked)

PS: i would like to change the server java code as least as possible, pref no change.

Does this problem as somthing to do with the tomcat environment ports? It's my first time using this kind of Server so realy have no other clue or sulution ideia here

Thanks in advance,
Rui Miranda

 
Rui Miranda
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Debug update, commented the part of the Java Server that was trowing the UnkownHostException(it was only used to print the host IP to the server console) and know i get the following exeception when trying to instanceate the ServerSocket:



Searched the ENTIRE WEB, no one as ever gotten the 126 error, my stated of mind is a mix of blessed but most of all extremly frusted, any clues ot there?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic