File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes Login page not completely loading after RequestDispatcher.forward is used Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Login page not completely loading after RequestDispatcher.forward is used" Watch "Login page not completely loading after RequestDispatcher.forward is used" New topic
Author

Login page not completely loading after RequestDispatcher.forward is used

adeeb alexander
Ranch Hand

Joined: May 29, 2008
Posts: 268
Hi.
I have a login screen, which send the values to a servlet. In that servlet validations are done. If password is wrong, I have used RequestDispatcher.forward to forward a message and view it on that page back. The problem is i am getting the message, but the page is not loading completely, i can only see two fields and a button with white background, where as my original page has images and all. The servlet part is below



and retiving tht vaalue in jsp like this

${message}

. Can someone please point out the mistake.


Thanks and Regards.
Adeeb
Chandraprakash Sarathe
Greenhorn

Joined: Jan 21, 2012
Posts: 16
The problem is i am getting the message, but the page is not loading completely, i can only see two fields and a button with white background, where as my original page has images and all.


My be dynamic code in your JSP having some issue. It would be nice if you can paste the JSP code here.
You can also try putting messages in JSP and identify yourself.



Chandraprakash Sarathe
http://javaved.blogspot.com
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60046
    
  65

Is the entire HTML page being sent to the browser? Or is it cut off?

If the latter, then it's likely an exception is being thrown that is preventing the page from being completely sent to the browser.

If the entire page is there and it's just the images that are not showing, then it's likely that your image URLs are not correctly formed using server-relative addressing that starts with the context path. See the JspFaq for more details.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Login page not completely loading after RequestDispatcher.forward is used
 
Similar Threads
doubt on RequestDispatcher
Problem with RequestDispatcher
Requested Dispatcher
Servlet Communication
Method call with Parameter