Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa JSP-Servlet java Servlets
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


bhanupriya
java Servlets
2 Answer(s)      5 years and 7 months ago
Posted in : JSP-Servlet



Advertisement
View Answers

March 2, 2009 at 4:34 AM


Hello,

tell me one thing that you are writing your html code in servlet through "out.println()" if yes then try this
My servlet code//
public class HelloServlet extends HttpServlet {

public void doGet (HttpServletRequest req,
HttpServletResponse res)
throws ServletException, IOException
{
PrintWriter out = res.getWriter();
//Write your connection code here
Class.fo...
////
String dataFromDB="testData"; //copy your data in dataFromDB variable which you fetch from the database.
out.println("<html>");
out.println("<input type=text value="+dataFromDB+" />");
out.println("</html>");
out.close();
}
}
try this hope it will help you
plz give feedback


March 2, 2009 at 5:04 AM


thanks sir
i tried i got the output


Related Tutorials/Questions & Answers:
java servlets
java servlets  please help... how to connect java servlets with mysql i am using apache tomcat 5.5
Java Servlets
Java Servlets  If the binary data is posted by both doGet and doPost then which one is efficient?Please give me some example by using both doGet and doPost. Thanks in Advance   The doPost method is more efficient
Advertisements
java servlets - Java Beginners
java servlets  hai my question is on xml documentation in creation of a java servlets. whether we have to create for each and every servelet we have to create each xml documentation?   Hi friends Exactly what you
servlets - Java Beginners
to respond to HTTP requests. A JSP layered on top of Java Servlets. Whereas...servlets  what is the difference b/w servlets and JSP, what servlets..., The Java Servlet is the fundamental component to using Java for web
servlets - Java Beginners
servlets   I am doing small project in java on servlets. I want to generate reports on webpage ,how is it possible and what is the difference between dynamic pages & reports ? tell me very urgent pls,pls
Servlets - Java Beginners
Servlets  Hi, How can i run the servlet programon my system? I wrote the code in java.(I've taken the Helloworld program as example program... for more information, http://www.roseindia.net/servlets/ Thanks Amardeep
java servlets jdbc - JDBC
java servlets jdbc  i am running the servlet program with jdbc connections in this porgram i used two 'esultset' objects.. in this wat ever coding is available in the first resultset is executed like updating and retrieiving
servlets - Java Interview Questions
html and processing in servlets and store in DB like ORACLE. And next i want to retrieve this image into web page using servlets. please try to send the answer to me servlets. i was not strong otherthan this. so please send me answer using
servlets mails - Java Beginners
servlets mails  Hi, My problem is " i want to send a one mail to many persons(i.e.,same mail to many persons) using servlets". Pls help me.  Hi Friend, Please visit the following links: http
servlets bulk - Java Beginners
servlets bulk  Hi, My problem is " i want to send a one mail to many persons(i.e.,same mail to many persons) using servlets". Pls help me.  Hi Friend, Please visit the following links: http
java servlets - Java Beginners
java servlets  i want to close window when ever he logout from one page... this closing is done with yes/no option. when ever press "yes" it means he successfully logout from page. if press "no" it means he not logout from
java Servlets - JSP-Servlet
java Servlets  Hi i am having a doubt regarding servlets as i am in learning stage give me any clew how to retrive data from mysql database after getting data from db and again i have to add that data to textbox using html
Servlets - Java Interview Questions
and are available to all the servlets within that application. It represents your web... are specified for a particular servlet and are unknown to other servlets... information visit to : http://www.roseindia.net/servlets/ServletContext.shtml
servlets - Java Beginners
servlets  Hello! am doin my servlet course at niit, i want know in detail methods of servlets,and where can we implement it i.e. i want to know the examples of the methods used in it. what is getInParameter(); does.please
servlets - Java Beginners
servlets   Q: i write program to upload image into perticular folder.but i want to store that path into database but not image and display that image in page from the db.pls any one send me code for that in servlets asap.pls
servlets deploying - Java Beginners
servlets deploying  how to deploy the servlets using tomcat?can you...); } } -------------------------------------------------------  This is servlets.... http://www.roseindia.net/servlets Thanks Amardeep
java servlets with database interaction
java servlets with database interaction  hai friends i am doing a web application in that i have a registration page, after successfully registered it has to display a message like "you have successfully registered" and those
Servlets
Servlets  Java Servlet technology  You have set.... Anyways, please visit the following links: http://www.roseindia.net/servlets/introductiontoconfigrationservlet.shtml http://www.roseindia.net/servlets
java servlets - JSP-Servlet
java servlets  how to get the parameter value of input type file using java servlets  Hi, You can use request.getParameter(). In Jsp, --- --- IN servlet, String fileName=request.getParameter('fl'); If you
java servlets - JSP-Servlet
java servlets  I am using eclipse . please help me to write a web application that follows mvc architecture and use jdbc connection pooling for oracle 10g
java-servlets - JSP-Servlet
java-servlets  I have one doubt.if we update resume in jobportal websites, at that place i saw only some fields are possible to edit at a time. how is it possible. pls clarify my doubt any one. I will be thankful to you
java servlets - JDBC
java servlets  First thank you sir for your reply sir i am using "Oracle Database" it asking for 1.User Name 2.Password 3.Host String if we doesn't give that "Host String" it doesn't connecting to the Oracle.In
java struts servlets writing - Struts
java struts servlets writing  sir..i am using eclipse here for software development.and i just want to know what all are the neccessary steps to write servlets pragrams for stuts applicatuin.here am developing a small application
servlets
servlets  what is the duties of response object in servlets
servlets
servlets  why we are using servlets
servlets
what are advantages of servlets  what are advantages of servlets   Please visit the following link: Advantages Of Servlets
Java Servlets - Java Interview Questions
Java Servlets  1.What is Pojo class? How and where it is used? 2.Can... where can i download NetBean 5.5.1?  Pojo class is normal java... " THE JAVA CLASS CANNNOT EXTENDS ANY PREDEFINED THIRDPARTY API CLASS OR INTERFACE". 3
Servlets
Servlets  How to edit and delete a row from the existing table in servlets
servlets
servlets  How do you communicate between the servlets?   We can communicate between servlets by using RequestDespatcher interface and servlet chaining
servlets
what is the architecture of a servlets package  what is the architecture of a servlets package   The javax.servlet package provides interfaces and classes for writing servlets. The Servlet Interface The central
Servlets
Servlets  How to check,whether the user is logged in or not in servlets to disply the home page
Advertisements
 

 

 

DMCA.com