willsion lim

Greenhorn
+ Follow
since Feb 01, 2009
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by willsion lim

for example if I have code like this:



then i can have ${host.hostName} value,

if i want to create a String <% String str= ...%> which includes it as a part, how can i do that.

thnx..
15 years ago
JSP
i figure out the problem.

i use .available() to estimate the inputstream, some times it will return 0 depends on web condition.

I have some problem when writing a java server to receive data from vb client.

on the java side i use socket to listen

public class myServer extends Thread{
private Socket client;
public myServer(Socket c){
this.client=c;
}

public void run(){
String host;
String ipAddr;
try{

ipAddr = client.getInetAddress().getHostAddress();

System.out.println("connection from "+ipAddr+" ");

DataInputStream input = new DataInputStream(new BufferedInputStream(client.getInputStream()));
DataOutputStream output = new DataOutputStream(new BufferedOutputStream(client.getOutputStream()));
.............
===============================================================
on the vb side, i define tcpClient like

Dim tcpclient As New System.Net.Sockets.TcpClient();
Try
tcpclient.Connect(iAdd,iPort) <----the client send a blank message to server at here, and my server treat it as the message expected,
then the rest of the vb codes do nothing and hang there..
Dim networkStream As NetworkStream = tcpClient.GetStream();
........

i am a newbie in java network programming, so i still cannot find the error
Can anyone give me any reason about this kind of problem? thanks