File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes problem in configuring servlet parameters to jsp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "problem in configuring servlet parameters to jsp" Watch "problem in configuring servlet parameters to jsp" New topic
Author

problem in configuring servlet parameters to jsp

Prasanna RamKumar
Ranch Hand

Joined: Nov 30, 2005
Posts: 31
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

Joined: Nov 24, 2005
Posts: 14687
    
  16

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.


[My Blog]
All roads lead to JavaRanch
Prasanna RamKumar
Ranch Hand

Joined: Nov 30, 2005
Posts: 31
yes now it is working after accesing through mapping
thanks for your help

prasanna
Alexey Korneychuk
Greenhorn

Joined: Sep 06, 2005
Posts: 18
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

Joined: Nov 30, 2005
Posts: 31
then how i can print the value in that jsp page other than using implicit
objects
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: problem in configuring servlet parameters to jsp
 
Similar Threads
Initialization Parameter
Regarding jspInit() overriding
servlet init parameters for jsp
Initialization Parameter in JSP
JSP Initialization Parameters