• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

If there is output in Class file then how can i take this out put on Browser

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi friends
I have problem that,
If there is output in a class file then how can we take this output on the
web browser.
Please ive answer as soon as possible it is so urgent.
Thanks
Avi
 
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
what sort of output are we talking about? More information please.
 
avinash maurya
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi
first i tell u about my application.
in my application i am using one servlet in which doGet method is defined..in that doGet method i called one method of another java Class.. this method(method of java class) receiving some files from the QUEUE..
i want to print the result of every file received...one after another...on the browser......this is an JMS application......how can i send message or string from that program to the browser....
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You have two options,
1) you can get the method to return the data as a String to the Servlet and get the servlet to write it to the client or
2) you can pass the PrintWriter or OPutputStream to the second class and get it write its own output to the client.

I tend to prefer option 1, since option 2 may require the second class to know it is outputting HTML data. This tends to confuse the responsibilities of the second class.
 
It sure was nice of your sister to lend us her car. Let's show our appreciation by sharing this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic