Two Laptop Bag*
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
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: 200

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: 200

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: 200

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: 1474
    
    6

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


Swastik
 
Don't get me started about those stupid light bulbs.
 
subject: Request Dispatcher problem