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 Scriptless JSP and  config param Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Reply Bookmark "Scriptless JSP and  config param" Watch "Scriptless JSP and  config param" New topic
Author

Scriptless JSP and config param

Armand Thierry Bessala
Greenhorn

Joined: Apr 07, 2006
Posts: 9
Hello all,
I have some init parameters for my JSP file and I wanted to display them without using scriptlet.
With scriptlet I wrote this:

and it work fine.
Whithout scriptlet ( with EL ):

How can I retreive servlet init paramameter fom DD. There is no "config" implicit variable for JSP file. Witch implicit variable can I use ? How ?

This is my DD:


Thank you.


Regards,<br />Armand<br />SCJP1.4
Ed Ward
Ranch Hand

Joined: Jan 30, 2006
Posts: 147
Not sure you could do this without a scripting element. The examples I've seen have overridden jspInit() and from there used getServletConfig().getInitParameter("name") and then set it in a scoped attribute.
Krishna Latha Grandhi
Ranch Hand

Joined: Nov 08, 2005
Posts: 110
See this link http://faq.javaranch.com/view?InitParamsThruExpressionLanguage
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14672
    
  11

Hi Krishna,
With almost 100 posts, you've never heard of the ranch's naming policy ?
Could you please read it and change your name accordingly ?
http://www.javaranch.com/name.jsp


[My Blog]
All roads lead to JavaRanch
Armand Thierry Bessala
Greenhorn

Joined: Apr 07, 2006
Posts: 9
Hi Ed, Hi Krishna,
Thank you for your replies. I also seen the example with overriding of jspInit...I tougth that there was another way ..
With krishna link, I see now there is no way I can directlly access theses values with EL...
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Scriptless JSP and config param
 
Similar Threads
jsp init parameters
A question about servlet initParameter
Complete web.xml file in XML format
jsp initialization parameter always gives null
config with JSP