Java Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming LanguagesJava Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old June 29th, 2002, 12:13 PM
wesd wesd is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2002
Posts: 0 wesd User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via AIM to wesd
Applet Not Reading Page Contents Right

I have this java applet that connects to a webserver and hits an ASP page. The ASP page runs some code then outputs some data. The applet is supposed to read this data and act accordingly, but it isn't reading the data even though it is hitting the webpage (checked the stats).

I am using the Java 1.1 compiler. Heres a version of the code I am using to connect to the page and read the output.

Code:
	public void CheckIfNew() {

		URLConnection objConn = null;
		DataInputStream strData = null;
		String strLine;

		try {

			objConn = this.strURL.openConnection();
			objConn.connect();

			strData = new DataInputStream(objConn.getInputStream());

			while ((strLine = strData.readLine()) != null) {

				if (strLine.equals("End")) {
					// Chat has Ended
					break;
				}

				if (strLine.equals("True")) {

					// Chat is Fresh

				}

				if (strLine.equals("False")) {
					// Chat is Old
				}

			}

		}
		catch (IOException e) {
			System.out.println("IO Error:" + e.getMessage());
		}

	}


Thanks

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesJava Help > Applet Not Reading Page Contents Right


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway