This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

servlet from servlet

 
Vlad Patryshev
Ranch Hand
Posts: 61
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am having trouble trying to do the following:
From one servlet I want to get the contents returned by another servlet (that is, using its url, get connection and retrieve the content) - and all on the same server. It seems like it does not work. I used Tomcat 3.3 and 4.0. Any ideas? Any hints?
 
Erick Jones
Ranch Hand
Posts: 38
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What code did you try? This should work:
URL url = new URL("/relative-path/DataServlet");
From the url object you can get an input stream.
 
Erick Jones
Ranch Hand
Posts: 38
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What code did you try? This should work:
URL url = new URL("/relative-path/DataServlet");
From the url object you can get an input stream.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic