• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

problem in configuring servlet parameters to jsp

 
Prasanna RamKumar
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
this is my part of web.xml file

<servlet>
<servlet-name>test</servlet-name>
<jsp-file>/test2.jsp</jsp-file>
<init-param>
<param-name>email</param-name>
<param-value>prasanna@genevasoftech.com</param-value>
</init-param>
<servlet-class>test</servlet-class>
</servlet>




but iam not able to get the parameters
why this problem occurs
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did you access the JSP file via its mapping (the servlet-mapping tag), or directly via the file name ? You have to use the mapping.
 
Prasanna RamKumar
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yes now it is working after accesing through mapping
thanks for your help

prasanna
 
Alexey Korneychuk
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You are using BOTH <jsp-file>/test2.jsp</jsp-file>
and <servlet-class>test</servlet-class>.
It's wrong.

The Strng dwe variable was declared in public void jspInit().
So You cannot use <%= dwe %>.
 
Prasanna RamKumar
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
then how i can print the value in that jsp page other than using implicit
objects
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic