I was just wondering if there is a method or something in Java that, once a URL has been passed, can determine if a webpage under that URL was written in HTML, PHP, XML, and so on. I looked in URL and HTTPConnection classes but didn't find anything. Maybe missed something.

Recommended Answers

All 2 Replies

Good mornin' mate,

If you have internet explorer, once you viewing a webpage, simply click on 'view > Source'. That will display the HTML of the webpage. Most often you'll get code like java,javascript etc will be in seperate files used in the webpage through simple "href" links (That then obviously stops you from seeing that).

Anyways, hope you find this usefull!

Are you talking about server side? If so, what object are you using to hold the request?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.