Home  >  Article  >  Web Front-end  >  新手关于在DreamWever上写的Html链接到编写的服务器的问题_html/css_WEB-ITnose

新手关于在DreamWever上写的Html链接到编写的服务器的问题_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 12:03:301430browse

<form action="http://123.235.2.217:20000">(自己机子的ip)       <fieldset >       <legend>注册区域</legend>    	<table border= "1" bordercolor="#00FF66" width="400" cellpadding="10" cellspacing="0" >        	<tr>            	<th colspan="2">注册信息</th>            </tr>        	<tr>            	<td>用户名</td>                <td><input  type="text" name="user"/></td>            </tr>


下面是在eclipse上写的简单的服务端
import java.io.IOException;import java.io.InputStream;import java.io.OutputStream;import java.io.OutputStreamWriter;import java.io.PrintWriter;import java.net.ServerSocket;import java.net.Socket;public class Client {	public static void main(String[] args) throws IOException{		ServerSocket sever = new ServerSocket(20000);		Socket socket = sever.accept();		InputStream in = socket.getInputStream();		byte[] buf = new byte[1024];				int len = in.read(buf);		System.out.println(new String(buf, 0, len));				OutputStream out = socket.getOutputStream();				PrintWriter pw = new PrintWriter(out,true);		pw.println("<font size = 7 color = green>注册成功</font>");				System.out.println("hello world");		sever.close();		socket.close();			}}


不知道为什么连不上, 求解,谢啦


回复讨论(解决方案)

不知道java是怎么写action的,php在action中写的路径是程序的相对路径

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn