|
 |
pro_jsp thread: Problem Request dispatcher
Message #1 by "Christine L." <kyrsl@y...> on Mon, 10 Dec 2001 03:54:03
|
|
Hi
this work fine
I have doGet up and a doPost how call de doGet...
public void doGet (HttpServletRequest request, HttpServletResponse
response) throws IOException, ServletException {
/** Cargo las paginas que seran de resultado */
RequestDispatcher paginauno
this.getServletContext().getRequestDispatcher
("/jsp/Rentas/PortalFinal.jsp");
//////////////////////////////////////////////////////////////////
public void doPost(HttpServletRequest request,
HttpServletResponse response)
throws IOException, ServletException
{
doGet(request, response);
}
///////////////////////////////////////////////////////////////////
Julio Oliveira
Oliveira_Julio@y...
Buenos Aires - Argentina
-----Mensaje original-----
De: Christine L. [mailto:kyrsl@y...]
Enviado el: Lunes, 10 de Diciembre de 2001 03:54 a.m.
Para: Pro_JavaServer_Pages
Asunto: [pro_jsp] Problem Request dispatcher
Hi there,
I have this text hyperlink to servletTest1 which will then redirect the
request to another servlet by using the RequestDispatcher. The weird thing
is that it doesn't work, while previously it works when I tried the same
thing except that I used a submit button within a form to trigger the
servletTest1. I noticed that it works for doPost but not for doGet. How
can I get it to work in my doGet?
Thank You~
Christine
Code:
----
RequestDispatcher summary = getServletContext().getRequestDispatcher
("/servlet/ServletTest1");
if(summary != null)
{
try {
System.out.println("here 1");
summary.include(request, response);
System.out.println("here 2");
} catch (IOException e)
{ System.out.println("Exception=>" +e);
} catch ServletException ) {
System.out.println"Exception=>" +e);
}
Results:
-------
for doPost():
here 1
Running ServletTest1.....
here 2
for doGet():
here 1
here 2
---
Do you need true END-TO-END (e2e) Java Messaging (JMS)? Softwired
offers industry's ONLY complete 100% JMS messaging solutions for your
needs TODAY.
Visit
http://adtracking.wrox.com/track.asp?x=p2p%2Fe%2Fjava%2Dsoftwired&url=www.so
ftwired-inc.com NOW and find
out more!
Our unique product range includes: iBus//Mobile (wireless data),
iBus//MessageBus (IP Multicast), iBus//MessageServer (store and forward)
and much more!
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
|
|
 |