This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes JSP and the fly likes not opening a page in browser Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "not opening a page in browser" Watch "not opening a page in browser" New topic
Author

not opening a page in browser

Anil Makavana
Greenhorn

Joined: May 07, 2008
Posts: 5
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

Joined: Jan 28, 2008
Posts: 5575

can you send your servlet as well as jsp code...

thanks & regards,
seetharaman.v
Anil Makavana
Greenhorn

Joined: May 07, 2008
Posts: 5
this is my Servlet code
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41599
    
  55
"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.


Ping & DNS - my free Android networking tools app
Anil Makavana
Greenhorn

Joined: May 07, 2008
Posts: 5
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
Marshal

Joined: Mar 22, 2005
Posts: 41599
    
  55
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

Joined: Jan 28, 2008
Posts: 5575

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

Joined: Dec 11, 2004
Posts: 13410

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?


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Anil Makavana
Greenhorn

Joined: May 07, 2008
Posts: 5
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.
 
wood burning stoves
 
subject: not opening a page in browser