jQuery in Action, 3rd edition
The moose likes Servlets and the fly likes RequestDispatcher  and Blank Page Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "RequestDispatcher  and Blank Page" Watch "RequestDispatcher  and Blank Page" New topic

RequestDispatcher and Blank Page

Eric Baxter

Joined: Jun 13, 2000
Posts: 7

I'm trying to forward the results of a JDBC / servlet call to a JSP. Rather than going to the results JSP I view a blank page. In the address screen is the path of the URL-Pattern in the web.xml file. I'm at wits end
Thanks alot!!

JMSDemo is the context (dir just below webapps)

Starting JSP Page action tag

Web.xml lines ---

Servlet Code ---

Result -http://localhost:8080/JMSDemo/Demo (BLANK PAGE)

Thanks again!!

Eric Baxter
Ali Gohar
Ranch Hand

Joined: Mar 18, 2004
Posts: 572
<servlet><servlet-name>DemoServlet</servlet-name><servlet-class>com.TestDemo.DemoServlet</servlet-class> </servlet> <servlet-mapping> <servlet-name>DemoServlet</servlet-name> <url-pattern>/Demo</url-pattern> </servlet-mapping>

You have mapped the servlet as /Demo and you are using "Demo" in following line instead of /Demo

<form name ="GUIform" method="POST" action="Demo">

Use /Demo instead of Demo and use http://localhost:8080/Demo to access this servlet.

May be this will solve the problem. If not then tell what happens when you change these things
Eric Baxter

Joined: Jun 13, 2000
Posts: 7
Thank you for your help.

The answer was multipart.

When I commented out the print statement used when an exception was thrown, the page forwarded correctly.

Thanks again
I agree. Here's the link: http://aspose.com/file-tools
subject: RequestDispatcher and Blank Page
It's not a secret anymore!