이클립스에서 앱엔진플러그인으로 설치한 다음에 프로젝트를 만들고 테스트서버를 가동하면 해당PC로컬에서 밖에 접속이 안됩니다. 제가 모바일페이지를 만들고 있어서 폰에서도 테스트해보려고 열었더니 접속이 되지 않았습니다.
netstat -an을 때려보면 127.0.0.1의 8888포트로 접속을 연것을 볼 수 있습니다. 그렇다는 건 로컬에서밖에 접속이 안된다는 것이죠.
그래서 테스트할 땐 로컬에서 밖에 안되나....라고 검색해보니 역시나 방법이 있네요.

AppEngine에서 The Java Development Server를 보면 실행 시 옵션을 제공하는데요.
http://code.google.com/intl/ko-KR/appengine/docs/java/tools/devserver.html

--address=...
The host address to use for the server. You may need to set this to be able to access the development server from another computer on your network. An address of 0.0.0.0 allows both localhost access and hostname access. Default is localhost.

--address를 0.0.0.0값으로 해서 실행하면 된다는군요.

이클립스에서 Debug As로 가서 실행할 때 Arguments를 수정합니다.
--address=0.0.0.0 --port=8888 D:\mudchobo\workspace36\appengine\Mudchobo\war

이렇게 하면 됩니다.

모바일에서 접속하고 싶은 경우에는 공유기를 써서 접속했다면 같은 공유기에 접속을 하고 PC에서 ipconfig로 나오는 ip로 접속하면 됩니다~
 
Posted by 머드초보
,