Advertisement

04.21.2008 at 09:40PM PDT, ID: 23341847
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

error java.net.MalformedURLException unknown protocol

Hi
   I have a code which is monitor URL open by client machine.But Problem is that when client open a www.google.com then it will work open a page and show on serve side.But when client open a goole linke like http://picasaweb.google.co.in/home?hl=en&tab=wq' then give error like this.
 error java.net.MalformedURLException: unknown protocol: www.google.com.

I am useing httprequest.java ,httpreply.java and some more java file.  If any one need my code then i give link.

Regard's
Ddipro
Start your free trial to view this solution
Question Stats
Zone: Programming
Question Asked By: ddipro
Solution Provided By: Bart_Cr
Participating Experts: 2
Solution Grade: B
Views: 28
Translate:
Loading Advertisement...
04.21.2008 at 11:15PM PDT, ID: 21408435

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
04.22.2008 at 12:39AM PDT, ID: 21408773

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
04.22.2008 at 12:41AM PDT, ID: 21408777

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
04.22.2008 at 01:28AM PDT, ID: 21408989

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
04.22.2008 at 02:33AM PDT, ID: 21409280

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
04.22.2008 at 03:34AM PDT, ID: 21409540

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
04.22.2008 at 04:26AM PDT, ID: 21409807

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
04.22.2008 at 04:41AM PDT, ID: 21409886

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
04.22.2008 at 09:20PM PDT, ID: 21417761

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
04.22.2008 at 11:20PM PDT, ID: 21418097

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
04.22.2008 at 11:27PM PDT, ID: 21418131

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
04.22.2008 at 11:33PM PDT, ID: 21418161

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
04.22.2008 at 11:50PM PDT, ID: 21418238

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
04.23.2008 at 12:01AM PDT, ID: 21418284

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
04.23.2008 at 02:06AM PDT, ID: 21418702

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
05.07.2008 at 02:16AM PDT, ID: 21514459

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
05.10.2008 at 01:12AM PDT, ID: 21538198

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
Loading Advertisement...
Microsoft
  • Internet Protocols
  • Applications
  • Development
  • OS
  • Hardware
  • Windows Security
Apple
  • Operating Systems
  • Hardware
  • Programming
  • Networking
  • Software
Internet
  • Search Engines
  • File Sharing
  • WebTrends / Stats
  • Spy / Ad Blockers
  • Web Browsers
  • New Net Users
  • Web Development
  • Chat / IM
  • Anti Spam
  • Web Servers
  • Anti-Virus
  • Email Clients
Gamers
  • Tips
  • Online / MMORPG
  • Puzzle
  • Emulators
  • Action / Adventure
  • Role Playing
  • Consoles
  • Game Programming
  • Strategy
  • Sports
  • Misc
  • Computer Games
Digital Living
  • Hardware
  • New Net Users
  • New Users
  • Software
  • Digital Music
  • Gaming World
  • Home Security
  • Apple
  • Networking Hardware
Virus & Spyware
  • Vulnerabilities
  • IDS
  • Encryption
  • Anti-Virus
  • Operating Systems Security
  • Software Firewalls
  • WebApplications
  • Cell Phones
  • Operating Systems
  • Internet
  • Hardware Firewalls
Hardware
  • Handhelds / PDAs
  • Displays / Monitors
  • Components
  • Networking Hardware
  • Peripherals
  • Laptops/Notebooks
  • Storage
  • Servers
  • Desktops
  • New Users
  • Misc
  • Apple
Software
  • System Utilities
  • Industry Specific
  • Network Management
  • Photos / Graphics
  • Page Layout
  • VMWare
  • Misc
  • Web Development
  • OS
  • CYGWIN
  • Voice Recognition
  • Message Queue
  • Quality Assurance
  • Security
  • Firewalls
  • MultiMedia Applications
  • Development
  • Database
  • Office / Productivity
  • Business Management
  • OS/2 Apps
  • Server Software
  • Internet / Email
ITPro
  • OS
  • Storage
  • Encryption
  • Operating Systems Security
  • Apple Hardware
  • Laptops & Notebooks
  • Servers
  • Networking Hardware
  • Peripherals
  • Devices
  • Displays / Monitors
  • WebTrends / Stats
  • Search Engines
  • Firewalls
  • WebApplications
  • IDS
  • Vulnerabilities
  • Email Clients
  • File Sharing
  • Spy / Ad Blockers
  • Web Browsers
  • Web Servers
  • Networking
  • Anti-Virus
  • Chat / IM
  • Anti Spam
Developer
  • Web Servers
  • Web Browsers
  • Game Programming
  • Dev Tools
  • Industry Specific
  • Office / Productivity
  • Database
  • CYGWIN
  • Web Development
  • Search Engines
  • File Sharing
  • WebTrends / Stats
  • Programming
  • Content Management
  • Application Servers
  • Protocols
Storage
  • Removable Backup Media
  • Storage Technology
  • Servers
  • Grid
  • Remote Access
  • Backup / Restore
  • Misc
  • Hard Drives
OS
  • Miscellaneous
  • Security
  • Development
  • Linux
  • VMWare
  • MainFrame OS
  • Unix
  • Apple
  • OS / 2
  • AS / 400
  • BeOS
  • Microsoft
  • VMS / OpenVMS
Database
  • Oracle
  • Miscellaneous
  • MySQL
  • Software
  • Sybase
  • Contact Management
  • PostgreSQL
  • Data Manipulation
  • Clarion
  • InterSystems Cache
  • Siebel
  • MUMPS
  • OLAP
  • SQLBase
  • SAS
  • GIS & GPS
  • 4GL
  • Berkeley DB
  • DB2
  • Informix
  • Interbase / Firebird
  • FoxPro
  • Reporting
  • LDAP
  • Filemaker Pro
  • MS SQL Server
  • dBase
  • MS Access
Security
  • Misc
  • Web Browsers
  • Software Firewalls
  • Operating Systems Security
  • File Sharing
  • Spy / Ad Blockers
  • Vulnerabilities
  • WebApplications
  • IDS
  • Anti-Virus
  • Encryption
  • Anti Spam
  • Email Clients
  • VPN
  • Chat / IM
Programming
  • Editors IDEs
  • Installation
  • Handhelds / PDAs
  • Multimedia Programming
  • System / Kernel
  • Algorithms
  • Game
  • Signal Processing
  • Project Management
  • Open Source
  • Database
  • Misc
  • Languages
  • Processor Platforms
  • Theory
Web Development
  • Scripting
  • Blogs
  • Web Servers
  • Software
  • Search Engines
  • Web Graphics
  • Images
  • Internet Marketing
  • Images and Photos
  • Components
  • Document Imaging
  • Web Languages/Standards
  • Illustration
  • WebApplications
  • Fonts
  • WebTrends / Stats
  • Authoring
  • Digital Camera Software
  • Miscellaneous
Networking
  • Protocols
  • Apple Networking
  • Network Management
  • Message Queue
  • Application Servers
  • Content Management
  • File Servers
  • Email Servers
  • Misc
  • Java Editors & IDEs
  • Wireless
  • Networking Hardware
  • Backup / Restore
  • System Utilities
  • ISPs & Hosting
  • Web Servers
  • Storage Technology
  • Removable Backup Media
  • Servers
  • Broadband
  • Grid
  • OS / 2
  • Novell Netware
  • Unix Networking
  • Windows Networking
  • Security
  • Telecommunications
  • Operating Systems
  • Linux Networking
Other
  • Community Advisor
  • Lounge
  • Community Support
  • New Net Users
  • Philosophy / Religion
  • Math / Science
  • Miscellaneous
  • URLs
  • Expert Lounge
  • Politics
  • Puzzles / Riddles
Community Support
  • Suggestions
  • New to EE
  • New Topics
  • Community Advisor
  • CleanUp
  • Announcements
  • General
  • Feedback
  • Input
  • EE Bugs
 
04.21.2008 at 11:15PM PDT, ID: 21408435
It's indeed impossible to answer this question without the code.
 
04.22.2008 at 12:39AM PDT, ID: 21408773
ok i am sending code link.
 
04.22.2008 at 12:41AM PDT, ID: 21408777
 
04.22.2008 at 01:28AM PDT, ID: 21408989
Parsing the request is not done correctly. First, you don't need to do a substring(1) on the token for the url. The url should be the entire token. Second, the url is not always prefixed with a protocol. The java URL class expects this. If the protocol is missing in the url, you need to make sure you prefix it correctly.

You can find a list of port numbers and the attached protocol on following address:
http://en.wikipedia.org/wiki/List_of_TCP_and_UDP_port_numbers

You'll need to make sure you map the needed ports to the correct protocol. Make sure you provide at least a mapping for http and https. If you can't map the port to a protocol you can default safely to http IMHO.
 
04.22.2008 at 02:33AM PDT, ID: 21409280
thxs for reply

   but can you give me code after debug.. becouse i am new programmar..point will be adjust..
 
04.22.2008 at 03:34AM PDT, ID: 21409540
url    = getToken(tz).substring(1);

should become

 url    = getToken(tz);

This will make the proxy server work for the requests where the protocol is correctly specified.  I don't have the time or ambition to create a working proxy server, but I'll be glad to review solutions and to help find causes for errors if you encounter them.
 
04.22.2008 at 04:26AM PDT, ID: 21409807
thxs for reply

i did this but still " error java.net.MalformedURLException: unknown protocol: www.google.com is found "

 
04.22.2008 at 04:41AM PDT, ID: 21409886
That's a case where the request does not contain a protocol in the URL. If it does not contain a protocol you should prefix the url string before creating a java.net.URL object with the string. In this case it should be prefixed with "http://".

Checking the string for occurence of ":/" should be sufficient to find out if a protocol is specified.

url    = getToken(tz);

if (url.indexOf(":/") < 0) {
    // Do some port magic...
    url = "http://" + url;
}
Accepted Solution
 
04.22.2008 at 09:20PM PDT, ID: 21417761
thxs for reply

   i try your code but page is not open.Error is not show on out windows but page is not not open.one thing i want to know you write "do some port magic " what it mean sir...

Regard's
Ddipro
 
04.22.2008 at 11:20PM PDT, ID: 21418097
The port magic means you should check if there's a port defined in the URL and map the protocol accordingly.

If you receive a url as follows: www.an-address.com:443 it means the url should connect to port 443 on the server. And from the list of default port number you can state that the protocol should be https instead of http, so you're url becomes "https://www.an-address.com".
 
04.22.2008 at 11:27PM PDT, ID: 21418131
You are right but how can i set the protocol https insted to http.Plz give me tips..
 
04.22.2008 at 11:33PM PDT, ID: 21418161
You can simply create a new URL objects using the above string: URL url = new URL("https://www.an-address.com");
If Java knows the protocol it will handle it correctly.
 
04.22.2008 at 11:50PM PDT, ID: 21418238
hello sir

  i am useing URL url = new URL("https://www.an-address.com"); but it is not working...
 
04.23.2008 at 12:01AM PDT, ID: 21418284
hello sir

   i am useing Url url in proxy.java class alraedy.Now you have told me to use Url url = new URL("").So if i use this in httprequest.java then nothing to show and when i use it in proxy.java then it show error.

so i am not grting result...

Plz help me
 
04.23.2008 at 02:06AM PDT, ID: 21418702
hello sir
  i am waiting for your responce....
 
05.07.2008 at 02:16AM PDT, ID: 21514459
please check your firewall settings otherwise try to access with the IP Address of the URL which u r trying.
 
05.10.2008 at 01:12AM PDT, ID: 21538198
hello sir

   sorry for late responce ..

   i stop firewall and use Ip address of url but error is same ..
 
 
20080236-EE-VQP-29 / EE_QW_2_20070628