File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes How to get resource from server using doGet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "How to get resource from server using doGet" Watch "How to get resource from server using doGet" New topic
Author

How to get resource from server using doGet

kamalakannan kamal
Ranch Hand

Joined: May 19, 2008
Posts: 32
Hi,

I just started learning servlet. Can any of you explain me how to get resource from server using doGet method.... Also please explain about <mime-mapping> in web.xml....

Thanks,
G. Kamal
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

It depends on what you mean by "get resource".

Also, if you're just starting out, you probably don't need to worry about mime-mappings yet.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
kamalakannan kamal
Ranch Hand

Joined: May 19, 2008
Posts: 32
Ben,

Thanks for your reply. Resource here i mean any file say xml, pdf, anything...
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12671
    
    5
If I understand your question correctly, Java provides classes in the java.net package which let you create a URL addressing a server resource, create a request and handle the returned response data.

See for example java.net.URLConnection and HttpURLConnection.

Bill


Java Resources at www.wbrogden.com
kamalakannan kamal
Ranch Hand

Joined: May 19, 2008
Posts: 32
Thanks williams
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to get resource from server using doGet
 
Similar Threads
Question about Head and put method
This weeks giveaway
difference between doGet() and DoPost()
GET vs POST-Doubt
Spring aware servlets