• Post Reply Bookmark Topic Watch Topic
  • New Topic

can not send jsp param when using HttpServletRequestWrapper ?

 
amir taghvayi
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi
i used tomcat7 . the structure my project is :
--as1.jsp
--as2.jsp

the content of web.xml is :


filter1 used in HttpServletRequestWrapper :

the content of as1.jsp is :

the content of as2.jsp is :


when i deploy project get this result:



and when remove HttpServletRequestWrapper in filter1 i get correct result:


pleas help me , how get request.getParameter("test") with HttpServletRequestWrapper in filter1 ?
thank you
 
Piyush Mangal
Ranch Hand
Posts: 196
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you post the complete code for RequestWrapper class? I do not see any method named setParameter in HttpServletRequestWrapper class hierarachy.
 
amir taghvayi
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

the content of filter 1 is :

 
amir taghvayi
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thank you . The problem was solved ​​with a modified .getParameter() method .
 
Piyush Mangal
Ranch Hand
Posts: 196
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Good to hear that you solved your problem yourself.
 
amir taghvayi
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
change return value of getparameter method to :
return (val == null ? getRequest().getParameter(name) : val.toString());

by this change ،the error was resolved .

thanks all.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!