Hi there, I'm new to this mailing list!

Well here is my question or problem... anyway...

I have two servlet and one is trying to access the other servlet's
linked list. I read the Servlet Online Tutorial but nothing seem to
work. I have special problems with the method "instance()" that
appears in the examples...  can anyone explain me how must I write
the code in the init method in the rigth way?

Thanks all for your patience...


Some Source:
-----------------
package burrano;

import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;
import java.util.*;
import java.net.*;

public class EnviaNoticia extends HttpServlet
{
        ListaNoticias miLista= new ListaNoticias();

        public void init() throws ServletException
        {
                        if (miLista == null)
                        {

        getServletContext().setAttribute("burrano.EnviaNoticia.ListaNoticias",new


        ListaNoticias());

                }
        }

--------------------
package burrano;

import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;

public class buscador extends HttpServlet
{
        ListaNoticias n;
        public void init() throws ServletException
        {
        n =
(ListaNoticias)getServletContext().getAttribute("burrano.EnviaNoticia.ListaNoticias");
        }
.
.
.
}
--
__________________________________
Andr�s Wagner Acu�a
Estudiante Ing. Civil Industrial
Universidad Adolfo Iba�ez

ICQ: 39542425
__________________________________

"Programing 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".

-Rich Cook

___________________________________________________________________________
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