File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes new to servlets Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "new to servlets" Watch "new to servlets" New topic

new to servlets


Joined: Dec 01, 2000
Posts: 2
Can we output a grahic item onto a browser through a servlet.
I tried writing this in a servlet
out.println("<input type=button" + " name=\"B1\"" +
" value=\"Add\"" + ">");
but I dont get a button on the browser. Can somebody correct me if I am wrong somewhere.
Thanks in advance
Brett Knapik
Ranch Hand

Joined: Oct 15, 2000
Posts: 255
you should to use a string buffer for resource perposes. For a button you need a argument for name, and value, the code should be

I wish there was a button on my monitor to turn up the intellegince.
Theres a button called 'brightness' but it doesn't work

"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning."
Carl Trusiak

Joined: Jun 13, 2000
Posts: 3340
Your viewing this with netscape. If you viewed it with IE you will see your Button. Netscape will not display any input objects unless it is inside a form. Change your code to something like:

Hope this helps

[This message has been edited by Carl Trusiak (edited December 01, 2000).]

I Hope This Helps
Carl Trusiak, SCJP2, SCWCD
Carl Trusiak

Joined: Jun 13, 2000
Posts: 3340
please read and follow the Naming Policy. It's to your benefit. We periodically do book give aways to people who post to a forum and as a matter of fact one is being conducted on the Servlet forum now. Only those who meet the naming policy are entered in the contest for the give away so....
Looking forward to your posts
ram mohan
Ranch Hand

Joined: Oct 17, 2000
Posts: 68
Inaddition to what others said u have to include this as well

Joined: Dec 01, 2000
Posts: 2
Thanks guys for the replies. I got it worked out. I forgot to put
the form tag in the servlet. Appreciate your help guys. Carl, I am sorry to use an alias, from now on I am going to use my real name. Thanks Carl, Brett and Ram for your help.
I agree. Here's the link:
subject: new to servlets
jQuery in Action, 3rd edition