• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Request Dispatcher problem

 
Megha Singhal
Ranch Hand
Posts: 225
IBM DB2 Eclipse IDE Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 165
Hibernate Spring Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
can you please make yourself clear on what you want??
 
Megha Singhal
Ranch Hand
Posts: 225
IBM DB2 Eclipse IDE Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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


java.lang.ClassCastException: java.lang.Integer


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
Posts: 165
Hibernate Spring Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
post both your servlet codes here. The issue is you are doing a wrong cast to Integer.
 
Megha Singhal
Ranch Hand
Posts: 225
IBM DB2 Eclipse IDE Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1601
5
Android Java Java ME
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In both servlet you have . But where are you setting ccno in session, and where is the code related to RequestDispatcher?
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic