Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

not opening a page in browser

 
Anil Makavana
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When i send request to jsp page using forward, it is not opening page in browser. I am calling this page from servlet.

Using debug, i pointed out that it is calling a jsp page, and not giving any exception on server console but it is not opening in browser.

Anybody can give possible reason for that or how to solve this problem?

Thanks in advance...........
 
Seetharaman Venkatasamy
Ranch Hand
Posts: 5575
Eclipse IDE Java Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
can you send your servlet as well as jsp code...

thanks & regards,
seetharaman.v
 
Anil Makavana
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
this is my Servlet code
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"process" is not a method in the Servlet API, so that method will never be called.


This looks suspicious. When that message is printed, the JavaScript code is not being called, it is being generated. JavaScript code and Java code can't call one another, because they run at different times and on different machines.
 
Anil Makavana
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,,

I am calling process method from doPost()method...

Thanks for giving information....

but My question is why page is not opening, if it is not giving any exception on server console.......
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are there any error messages in the log files?

Is really no response being returned, or just an empty response? The JSP snippet you posted above does not generate any visible output.
 
Seetharaman Venkatasamy
Ranch Hand
Posts: 5575
Eclipse IDE Java Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi anil,

your code in jsp is not correct .it will give compilation error...

please once again post your jsp code(correct one)

thanks & regards,
seetharaman
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Anil Makavana:

but My question is why page is not opening, if it is not giving any exception on server console.......


What exactly do you mean when you say your page is not opening?
What are you seeing? A blank page?
 
Anil Makavana
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i would like to give brief in that so you guys can explore more.....

i run application on server and default jsp page has been displayed lets say XYZ.jsp ...

Now i am sending a request to servlet from java classs, which again send request to XYZ.jsp using forward like this way.......


context.getRequestDispatcher("/jsp/api.jsp").forward(request, response);

i am sending some data in response which needs to be displayed in that page.

But that page is not refreshing................

I checked that jsp page code is correct even servlet code also correct.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic