tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian.Schi...@Elaxy.com
Subject Antwort: calling other servlets inside a servlet...
Date Mon, 25 Jun 2001 13:40:14 GMT

Hi,

Try the following

  try
  {
    RequestDispatcher dispatcher = getServletContext().getRequestDispatcher
( TargetServletPath );
    dispatcher.forward( request, response );
  }
  catch( IOException e )
  {
    System.out.println( e );
  }
  catch( ServletException e )
  {
    System.out.println( e );
  }


Mit freundlichen Grüßen

Christian Schildt
Diplom-Betriebswirt (FH)

Softwaredeveloper

Phone: 089/89013023
Mailto:  christian.schildt@elaxy.com
________________________________________________
ELAXY AG
Gutenbergstr. 5
D-82178 Puchheim bei München
Phone: +089/8901300
Fax:   +089/89013089
www.elaxy.com
________________________________________________



                                                                                         
                                 
                    Pedro Salazar                                                        
                                 
                    <pedro-b-salazar@ptin        An:     tomcat-user@jakarta.apache.org
                                   
                    ovacao.pt>                   Kopie:                               
                                    
                                                 Thema:  calling other servlets inside a servlet...
                       
                    25.06.2001 14:27                                                     
                                 
                    Bitte antworten an                                                   
                                 
                    tomcat-user                                                          
                                 
                                                                                         
                                 
                                                                                         
                                 


Greetings,

how can I call another servlet inside a servlet? And I would like to
have two options: one is that the servlet called is the final servlet,
and the other option is calling a servlet just to get a result
(outputstream) o the main servlet and continue processing the main servlet.
This is just a servlet question specification or it depends if I'm
working on tomcat or other product?

thanks,
Pedro Salazar.





Mime
View raw message