This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Servlets and the fly likes Request Dispatcher problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Request Dispatcher problem" Watch "Request Dispatcher problem" New topic
Author

Request Dispatcher problem

Megha Singhal
Ranch Hand

Joined: Feb 28, 2012
Posts: 182

actualy on my page there is action of submit button on which i am calling another servlet but as i am maintaining session so is there is any that i can perform request dispatcher on the action submit or any other alternative that i have to click submit button and also request dispatcher session variable to other page.
Anurag Verma
Ranch Hand

Joined: Mar 30, 2012
Posts: 124

can you please make yourself clear on what you want??
Megha Singhal
Ranch Hand

Joined: Feb 28, 2012
Posts: 182

Anurag Verma wrote:can you please make yourself clear on what you want??


i am maintaining session for the variable so on one servlet that session variable is working beacause i am dispatching request to that page but on next page when i am clicking on submit button that session variable is not coming and giving following exception



so i want to know is there any way like request dispatcher so that i can send that variable on that page on submit button action.
Anurag Verma
Ranch Hand

Joined: Mar 30, 2012
Posts: 124

post both your servlet codes here. The issue is you are doing a wrong cast to Integer.
Megha Singhal
Ranch Hand

Joined: Feb 28, 2012
Posts: 182

Anurag Verma wrote:post both your servlet codes here. The issue is you are doing a wrong cast to Integer.


my first servlet


my second servlet
Swastik Dey
Rancher

Joined: Jan 08, 2009
Posts: 1445
    
    6

In both servlet you have . But where are you setting ccno in session, and where is the code related to RequestDispatcher?


Swastik
 
jQuery in Action, 2nd edition
 
subject: Request Dispatcher problem
 
Similar Threads
session lost problem
session lost problem
Problem in invoking the action method
dispatcher.forward(req, res): not able to invoke the jsp page
Filter-mapping in web.xml error