File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSP and the fly likes dynamic value for Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » JSP
Reply Bookmark "dynamic value for "class" attribute of jsp:useBean" Watch "dynamic value for "class" attribute of jsp:useBean" New topic
Author

dynamic value for "class" attribute of jsp:useBean

sonali jingar
Greenhorn

Joined: Mar 01, 2013
Posts: 2
I am working in finance module i need to know wheteer value for "class" attribute in jsp:useBean tag can be set dynamically..
ie . if
branch is 1 then id='X'
<jsp:useBean id="dbprd" class="<%=session.getAttribute(id)%>" scope="application"/>
else id =' y'
<jsp:useBean id="dbprd" class="<%=session.getAttribute(id)%>" scope="application"/>
is it possible to set dynamic value for "class" attribute.

please help.....
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 56529
    
  14

Not possible.


[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
 
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: dynamic value for "class" attribute of jsp:useBean
 
Similar Threads
Dynamic "id=" attribute for jsp:useBean?
jsp:useBean Topics
Session.removeAttribute doesnt work
Doubt in jsp:setProperty tag
Value for the useBean class attribute is invalid -- why?