Hi,

Has anybody any idea how to display a textarea in a servlet. I have a page (generated 
by a servlet) which is suppose to display a textarea,
but if I do call this page, instead of displaying the textarea, it throws the 
following error msg. :

****

java.awt.TextArea[text0,0,0,0x0,invalid,text=,editable,selection=0-0,rows=10,columns=50,scrollbarVisibility=both]


*****


My code looks something like :



import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
import java.sql.*;
import java.awt.*;
import java.lang.*;


public class adminServlet extends HttpServlet {

    ActualNews adminActual;
    ResultSet res;
    TextArea newsText = new TextArea(10,50);


    public void init(ServletConfig config) throws ServletException {
            super.init(config);

    }

    protected void processRequest(HttpServletRequest request, HttpServletResponse 
response)
    throws ServletException, IOException {

    response.setContentType("text/html");
        java.io.PrintWriter out = response.getWriter();


       adminActual = new ActualNews();

       newsText.getText();
       try {
       newsText.setText(adminActual.newsSummary());
       } catch (SQLException e){}

       out.println(newsText);



    }


    protected void doPost(HttpServletRequest request, HttpServletResponse response)
    throws ServletException, java.io.IOException {
            processRequest(request, response);
    }


}

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to