Resource injection in tag handler

I can't seem to find a straight answer for this anywhere. Using release 9.1 of the Sun Application Server, should resource injection in a tag handler be working? Tak something really simple like this:
public class TestHandler extends SimpleTagSupport {
    @EJB SomeEJBLocal beanInstance;
    public void doTag() throws JspException {
} When I try this, beanInstance is null. Is this a configuration issue or does this just not work yet?

Found the answer myself. When the web module was being ported over, the web.xml was copied as-is. It still had version 2.4 as an attribute to the web-app element. Changing the attributes to match a newly created 2.5 version fixed the problem.

Similar Messages

  • Resource injection in DAO?

    I use a Data Acces Object pattern in a Java EE 5 Web-Tier Application.
    The servlets (and JSP) in the front-end call a separate object that that hides the implementation of accessing data in the databases and maintains the connection to databases.
    Can I use the new Resource Injection annotations to simplify the JNDI and DataSoucce code in my DAO class?
    I have read that Resource Injection only works in Container managed objects like Servlets (but not in JSP which can be complied after deployment).
    Can you point me to a runnable sample application that uses Resource Injection to simplify the JNDI and DataSoucre code?

    Sample Application Listener
    package com.eshop.web;
    import com.eshop.biz.DBAccessor;
    import com.eshop.biz.ShoppingCart;
    import javax.persistence.EntityManagerFactory;
    import javax.persistence.PersistenceUnit;
    import javax.servlet.ServletContextListener;
    import javax.servlet.ServletContextEvent;
    import javax.servlet.http.HttpSessionListener;
    import javax.servlet.http.HttpSessionEvent;
    * @author Aliyu Musa
    * @version
    * Web application lifecycle listener.
    public class ShopListener implements ServletContextListener, HttpSessionListener {
    @PersistenceUnit(name="e-unit")
    private EntityManagerFactory emf;
    * ### Method from ServletContextListener ###
    * Called when a Web application is first ready to process requests
    * (i.e. on Web server startup and when a context is added or reloaded).
    * For example, here might be database connections established
    * and added to the servlet context attributes.
    public void contextInitialized(ServletContextEvent evt) {   
    DBAccessor db=new DBAccessor(emf);
    evt.getServletContext().setAttribute("db",db);
    * ### Method from ServletContextListener ###
    * Called when a Web application is about to be shut down
    * (i.e. on Web server shutdown or when a context is removed or reloaded).
    * Request handling will be stopped before this method is called.
    * For example, the database connections can be closed here.
    public void contextDestroyed(ServletContextEvent evt) {
    // TODO add your code here e.g.:
    Connection con = (Connection) e.getServletContext().getAttribute("con");
    try { con.close(); } catch (SQLException ignored) { } // close connection
    * ### Method from HttpSessionListener ###
    * Called when a session is created.
    public void sessionCreated(HttpSessionEvent evt) {
    ShoppingCart cart=new ShoppingCart();
    evt.getSession().setAttribute("cart",cart);
    evt.getSession().setMaxInactiveInterval(10*60*60);
    * ### Method from HttpSessionListener ###
    * Called when a session is destroyed(invalidated).
    public void sessionDestroyed(HttpSessionEvent evt) {
    evt.getSession().invalidate();
    }

  • Registering a new TAG handler

    I need to parse a META tag from HTML document and I cannot do it with standard tag handlers. I think I need to set up a new tag handler.
    Please can anybody tell me how to do it??
    I'll be graetful for any information.

    If you click on the APIs link on the left, and then click on HTML.Tag in the bottom-left frame, it gives you the documentation for HTML.Tag. Now click on Uses at the top and it tells you everywhere in the standard API which uses HTML.Tag. Of these, HTMLDocument.HTMLReader.registerTag(HTML.Tag t, HTMLDocument.HTMLReader.TagAction a) looks the most promising, although it's protected so you'll have to subclass HTMLReader.

  • The tag handler gridcolumn does not have a setter for the attribute autoExpand specified in the Tag Library Descriptor.

    I recently moved from coldfusion 8 to coldfusion 9 but all the pages with cfgrid: is throwing the following error. Any suggestion would be of great help
    coldfusion.jsp.JRunTagLibraryInfo$NoSuchAttributeException: The tag handler gridcolumn does not have a setter for the attribute autoExpand specified in the Tag Library Descriptor.
    at coldfusion.jsp.JRunTagLibraryInfo.getPropertyType(JRunTagLibraryInfo.java:627)
    at coldfusion.jsp.JRunTagLibraryInfo.buildTagInfo(JRunTagLibraryInfo.java:585)
    at coldfusion.jsp.JRunTagLibraryInfo.getTag(JRunTagLibraryInfo.java:267)
    at coldfusion.compiler.NeoTranslationContext.findTagName(NeoTranslationContext.java:346)
    at coldfusion.compiler.NeoTranslationContext.isKnownTag(NeoTranslationContext.java:222)
    at coldfusion.compiler.CFMLParserBase.isKnownTagName(CFMLParserBase.java:589)
    at coldfusion.compiler.cfml40TokenManager.TokenLexicalActions(cfml40TokenManager.java:6704)
    at coldfusion.compiler.cfml40TokenManager.getNextToken(cfml40TokenManager.java:6586)
    at coldfusion.compiler.cfml40.getToken(cfml40.java:11879)
    at coldfusion.compiler.CFMLParserBase.isTrivialAngleBracket(CFMLParserBase.java:707)
    at coldfusion.compiler.cfml40.jj_3_1(cfml40.java:9392)
    at coldfusion.compiler.cfml40.jj_3_2(cfml40.java:9460)
    at coldfusion.compiler.cfml40.jj_3R_67(cfml40.java:9500)
    at coldfusion.compiler.cfml40.jj_3_86(cfml40.java:8147)
    at coldfusion.compiler.cfml40.jj_3R_92(cfml40.java:8584)
    at coldfusion.compiler.cfml40.jj_3_85(cfml40.java:8641)
    at coldfusion.compiler.cfml40.jj_2_85(cfml40.java:7619)
    at coldfusion.compiler.cfml40.cfml(cfml40.java:4215)
    at coldfusion.compiler.cfml40.cfif(cfml40.java:311)
    at coldfusion.compiler.cfml40.cfml(cfml40.java:4224)
    at coldfusion.compiler.cfml40.cfif(cfml40.java:311)
    at coldfusion.compiler.cfml40.cfml(cfml40.java:4224)
    at coldfusion.compiler.cfml40.cfelse(cfml40.java:442)
    at coldfusion.compiler.cfml40.cfelseif(cfml40.java:374)
    at coldfusion.compiler.cfml40.cfif(cfml40.java:314)
    at coldfusion.compiler.cfml40.cfml(cfml40.java:4224)
    at coldfusion.compiler.cfml40.start(cfml40.java:4664)
    at coldfusion.compiler.NeoTranslator.parsePage(NeoTranslator.java:667)
    at coldfusion.compiler.NeoTranslator.parsePage(NeoTranslator.java:648)
    at coldfusion.compiler.NeoTranslator.parseAndTransform(NeoTranslator.java:401)
    at coldfusion.compiler.NeoTranslator.translateJava(NeoTranslator.java:343)
    at coldfusion.compiler.NeoTranslator.translateJava(NeoTranslator.java:144)
    at coldfusion.runtime.TemplateClassLoader$TemplateCache$1.fetch(TemplateClassLoader.java:418 )
    at coldfusion.util.LruCache.get(LruCache.java:180)
    at coldfusion.runtime.TemplateClassLoader$TemplateCache.fetchSerial(TemplateClassLoader.java :362)
    at coldfusion.util.AbstractCache.fetch(AbstractCache.java:58)
    at coldfusion.util.SoftCache.get_statsOff(SoftCache.java:133)
    at coldfusion.util.SoftCache.get(SoftCache.java:81)
    at coldfusion.runtime.TemplateClassLoader.findClass(TemplateClassLoader.java:591)
    at coldfusion.filter.PathFilter.invoke(PathFilter.java:80)
    at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:70)
    at coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:2 8)
    at coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38)
    at coldfusion.filter.NoCacheFilter.invoke(NoCacheFilter.java:46)
    at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38)
    at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22)
    at coldfusion.filter.CachingFilter.invoke(CachingFilter.java:53)
    at coldfusion.CfmServlet.service(CfmServlet.java:201)
    at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:89)
    at jrun.servlet.FilterChain.doFilter(FilterChain.java:86)
    at coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilter.java:42 )
    at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46)
    at jrun.servlet.FilterChain.doFilter(FilterChain.java:94)
    at jrun.servlet.FilterChain.service(FilterChain.java:101)
    at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:106)
    at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
    at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:286)
    at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:543)
    at jrun.servlet.jrpp.JRunProxyService.invokeRunnable(JRunProxyService.java:203)
    at jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(ThreadPool.java:320)
    at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428)
    at jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable(ThreadPool.java:266)
    at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)

    Thanks Vishu,
    We are running Coldfusion 9 and attach is the sample code and error message.:
    The tag handler gridcolumn does not have a setter for the attribute autoExpand specified in the Tag Library Descriptor.
    The CFML compiler was processing:
      A cfgrid tag beginning on line 39, column 18.
    The error occurred in E:/Websites/DreData/sobrietytesting/main/Sobrietytesting/Admin/view_users.cfm: line 54
    52 :                     hrefkey="member_id"
    53 :                     bind="cfc:tabledisplay.browseAccessAcountRequests(,,,)"
    54 :                     >
    55 :                    

  • Sending value to JSP page from Tag Handler

    Is there some reason why a call to setAttribute inside a Body tag handler would not succeed in making visible a variable outside the scope of the tag? I mean a situation like this:
    <% String p=request.getParameter("p"); %>
    <taglib:tag count="<%= p %>">
    ...body which handler fills in...
    </taglib:tag>
    <form action="thispage.jsp?p=<% newcount %>">
    <input type=submit>
    </form>
    Assume that "count" and "newcount" are defined in the Tag Extra Info class for this handler and that TLD allows a run time evaluation of the "count" attribute.
    (The idea here is to have the handler recall the same jsp file with an incremented counter.)
    Some other way to do this?
    Thanks,
    Alan

    Never mind... I see that I forgot to set the scope of the scripting variable to AT_END in the "Handler Extra Info" class.

  • How to submit a form in jsp from tag handler class

    I have a form in jsp.I created some more links in the tag handler class.Based on the link we click form action will take place.Now how can i submit the form in tag handler class for the links i created in that class.

    I have a form in jsp.I created some more links in the tag handler class.Based on the link we click form action will take place.Now how can i submit the form in tag handler class for the links i created in that class.

  • Finding the custom tag name from inside the tag handler

    Hello,
    I searched the forum, but couldnt find the answer (or in the API). In my custom tag handler, I want to know what the name of the custom tag was. Is this possible?
    Thanks in advance.
    Chris
    ps. Without parsing the .tld file... :)

    Hmm, that's unfortunate. Thanks a lot for your work. I had a feeling since it wasn't in the API that it wasn't possible. Here's why, and maybe they will add this feature later...
    We are making our own tags for buttons on our app (the button will be an HTML table, with a clickable background, that looks like an image, but isnt).
    The HTML designers want tags they can drag and drop to the screen in DreamWeaver, including visual feedback on what they dragged and dropped. So the tag <fast:blueButton>Continue</fast:blueButton> will show a blue button image in dreamWeaver with "Continue" as the text. There are a lot of parameters to set for each button, like height, width, border, etc. that will be configured in an XML config file for each button.
    It would be nice if all the buttons we invent in the tld point to the same generic button class, and when the generic button class runs, sees which button called it, and gets its config from an XML file.
    This way the designer could add more buttons with the tld and XML config, and no more java classes are needed. However, if a generic button is sent with a type param: <fast:button type="blue">Continue</fast:button> then there is no visual feedback in the tool (in the first case we could have set the fast:blueButton to be the image of a blue button) and it cant be picked from a list in the tool (the designer needs to remember which types exist). It seems not important to programmers, but for designers it is important.
    Oh well, I will see if there is another way to NOT have tons of Java classes to support.
    Thanks,
    Chris

  • JSF 1.2 tag handler classes in JSF 1.1 environment

    Hi,
    I’m developing a JSF 1.2 application with RSA 7.5.1. When I run it in the WAS 6.1 I get the following exception:
    javax.servlet.ServletException:
    Unable to convert string '#{onebean.onestring}' to class
    javax.el.ValueExpression for attribute title:
    java.lang.IllegalArgumentException:
    Property Editor not registered with the PropertyEditorManager
    at org.apache.jasper.runtime.PageContextImpl.handlePageException
    (PageContextImpl.java:660)etc...
    I think my WAS 6.1 running environment doesn’t admit Tag Handler classes in JSF 1.2 style (you know: Extending UIComponentELTag, with all attributes in the tag class of type valueExpression along with setter methods...).
    In case this suspect is true, is there any tricky way to run this JSF 1.2 components in a JSF 1.1 environment?
    Do you have any ideas to solve this problem without downgrading my JSF tag handler classes from 1.2 to 1.1?
    Thanks a lot!

    Hi BalusC,
    This is the full history:
    I started coding the tag handler classes of my JSF components in the JSF 1.2 way.
    But know, I’am being forced to run the web app that uses those JSF 1.2 components in a WAS 6.1 (servlet 2.4 & jsp 2.0, I suppose).
    Not very elegant solution, I put a ‘servlet2.5-jsp2.1-api.jar’ file in my ‘WebContent\WEB-INF\lib’ directory, and configured a ‘PARENT-LAST’ class loader policy in the server configuration.
    This is my web.xml:
    <?xml version="1.0"?>
    <web-app xmlns="http://java.sun.com/xml/ns/javaee"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
            http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
         version="2.5">
       <servlet>
          <servlet-name>Faces Servlet</servlet-name>
          <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
          <load-on-startup>1</load-on-startup>
       </servlet>
       <servlet-mapping>
          <servlet-name>Faces Servlet</servlet-name>
          <url-pattern>*.faces</url-pattern>
       </servlet-mapping>
         <welcome-file-list>
              <welcome-file>index.html</welcome-file>
              <welcome-file>index.htm</welcome-file>
              <welcome-file>index.jsp</welcome-file>
              <welcome-file>default.html</welcome-file>
              <welcome-file>default.htm</welcome-file>
              <welcome-file>default.jsp</welcome-file>
         </welcome-file-list>
    </web-app>When I launch the JSF example page, I get no logs, no messages, ONLY a blank page (¿?)
    Thank you very much for your skilled help!

  • Tag Handler Class classpath

              Hi.
              I have some problems with Tag Handler Classes in custom tags. When tag handler
              class store in package all is OK - I place it's class-file in /WEB-INF/classes/%package-path%/%class-name%.class
              and in tld-file in <tagclass> write: %package-path%.%class-name%.
              When tag handler class don't store in package I place class-file in /WEB-INF/classes/%class-name%.class
              and in tld-file in <tagclass> write: %class-name%, but it's doen't work. When
              jsp starts I recieve:
              D:\bea\wlserver\config\mydomain\applications\.wl_temp_do_not_delete\WEB-INF\_tmp_war_myserver_myserver_CustomTag\jsp_servlet\_simpleexample.java:81:
              cannot resolve symbol
              symbol : class ExampleTag
              location: class jsp_servlet._simpleexample
              ExampleTag csajspexample0 = null;
              ^
              Why? Plese, help me.
              Igor
              

    You probably should not use unnamed packages at all.
              Language spec specifically says that "Unnamed packages are provided by the
              Java platform principally for convenience when developing small or temporary
              applications or when just beginning development."
              Igor Vinnikov <[email protected]> wrote:
              > Hi.
              > I have some problems with Tag Handler Classes in custom tags. When tag handler
              > class store in package all is OK - I place it's class-file in /WEB-INF/classes/%package-path%/%class-name%.class
              > and in tld-file in <tagclass> write: %package-path%.%class-name%.
              > When tag handler class don't store in package I place class-file in /WEB-INF/classes/%class-name%.class
              > and in tld-file in <tagclass> write: %class-name%, but it's doen't work. When
              > jsp starts I recieve:
              > D:\bea\wlserver\config\mydomain\applications\.wl_temp_do_not_delete\WEB-INF\_tmp_war_myserver_myserver_CustomTag\jsp_servlet\_simpleexample.java:81:
              > cannot resolve symbol
              > symbol : class ExampleTag
              > location: class jsp_servlet._simpleexample
              > ExampleTag csajspexample0 = null;
              > ^
              > Why? Plese, help me.
              > Igor
              Dimitri
              

  • Java Bean access in a JSP Tag handler class

    Hello Everybody,
    I am trying to access my java bean(ErrorBean.java) in th doEndTag() method of the tag handler class(MyTagHandler.java) and iam getting an "CLASSCAST EXCEPTION"
    I am doing it like this in the tag handler class.
    MyBeans.ErrorBean errorBean = (MyBeans.ErrorBean)pageContext.getSession().getAttribute("ErrorBean");
    Where MyBeans is the package in which my Error Bean is and iam placing the ErrorBean object in the session object before it comes to the jsp page where i have the jsp Custom tag:
    <%@ taglib uri="/WEB-INF/taglib.tld" prefix="errors" %>
    <errors:message/>
    <%@ include file="footer.jsp"%>
    I was of the opinion that i was casting it right...can anyone help me to find ...where iam doing it wrong...its really URGENT ..PLEASE

    Friend that did not work either ...
    u know what...the ErrorTagHandler class is comiling fine with out errors but in the jsp page when the custom tag is hit..this error is showing up when i see the server log.
    can you throw some light on this..
    thanks..
    Firasath

  • Tool to downgrade Tag handler classes from JSF 1.2 to JSF 1.1

    Is there any tool to downgrade Tag handler classes from JSF 1.2 to JSF 1.1?
    thanks!

    I am not sure if I understand you, but what's wrong with just replacing the JAR files?

  • JWSDP Custom Tags (finding tag handler class)

    Hi,
    ive been using the Java Web Services Development Pack
    ive tried several examples of creating custom tags all seem to have different directory structures and none seem to work. Heres my setup...
    rootdir -> index.jsp
    rootdir -> WEB-INF -> web.xml
    rootdir -> WEB-INF -> tlds -> demo.tld (the tag library descriptor)
    rootdir -> WEB-INF -> classes -> demo -> tags -> Greeter.java (the tag handler class)
    there are some other folders created by deploytool but they are empty.
    heres demo.tld...
    <taglib>
    <tlib-version>1.0</tlib-version>
    <jsp-version>2.0</jsp-version>
    <short-name>demo</short-name>
    <uri>DemoTags</uri>
    <tag>
    <name>greeter</name>
    <tag-class>demo.tags.Greeter</tag-class>
    <body-content>empty</body-content>
    </tag>
    </taglib>
    here is the tag handler class Greeter.java...
    package demo.tags;
    import javax.servlet.jsp.tagext.*;
    import javax.servlet.jsp.*;
    public class Greeter extends SimpleTagSupport {
    public void doTag() throws JspException {
    PageContext pageContext = (PageContext) getJspContext();
    JspWriter out = pageContext.getOut();
    try {
    out.println("Hello World");
    } catch (Exception e) {
    // Ignore.
    and heres the code in index.jsp...
    <%@taglib prefix="t" uri="DemoTags" %>
    <t:greeter />
    Id love to know if these directory structures are fixed and where they are specified - its confusing the way so many examples show differences.
    this is the exception i get when trying to run index.jsp through the admin page (localhost:4848)
    org.apache.jasper.JasperException: /index.jsp(11,0) Unable to load tag handler class "demo.tags.Greeter" for tag "t:greeter"
    ----

    Sincere Apologies - It might be a good idea to compile my java files so i actually have classes in my classes directory !!
    i think a build.xml file is needed for ant to compile everything that is needed now.
    and the beat goes on !

  • Accessing JSP Variables in Custom Tag Handler.

    Hi,
    I am creating a custom tag which builds a list view. I have certain String array in my JSP and I need to pass the same into my Tag Handler class. I tried following ways :
    1. In doStartTag() implementation I used
       public int doStartTag() {
             String[] myArray = (String[])pageContext.getAttribute("mystringarray", PageContext.PAGE_SCOPE;
       }This is not recognizing the String array variable defined in my JSP.
    2. I used separate attribute which is passed from the JSP to the custom tag as parameter having "rtexprvalue" as true. But I cann't pass a Sting array into my tag handler class. I can pass only String.
    How can I access variables which are defined in the JSP using declaration block. i.e.
    <%!
    String[] myArray = new String[100];
    %>
    Thanks for the time.

    You should be able to pass any type you like as an attribute to the tag.
    You just have to define its type as String[] in your tld:
    <attribute>
    <name>stringArray</name>
    <required>false</required>
    <rtexprvalue>true</rtexprvalue>
    <type>java.lang.String[]</type>
    </attribute>
    Alternatively, If you declare your array like:
    <%!
    String[] myArray = new String[100];
    %>You can do this:
    pageContext.setAttribute("mystringarray", myArray);
    which will put it into the page context for you to pick up in your custom tag.
    Hope this helps,
    evnafets

  • Resource Injection Annotation

    Hey All,
    I am experiencing an issue with the @Resource Injection annotation.
    Following is attached my code from my class. QueueConnectionFactory is null.
    Wierdly enough when I copy over this code and @Resource Injection in an MDB it works fine!
    Any ideas of why this might be.
    I am using WLS 10.3.5
    @Stateless
    public class dummysFriend implements dummysFriendRemote, dummysFriendLocal{
         @Resource(name = "ConnectionFactory-0",
         mappedName = "jms/connectionFactory",
         description = "Connection Factory for WLS")
         private QueueConnectionFactory connectionFactory;
         @Resource(name = "DistributedQueue-3",
         mappedName = "jms/provisionASDLQueue",
         description = "Queue which holds tokenized ASDL(s) for provision")
    private Queue provisionASDLQueue;
    private QueueConnection queueConnection = null;
    private QueueSession queueSession = null;
    private QueueSender queueSender = null;
    public dummysFriend() {
    // TODO Auto-generated constructor stub
    @PostConstruct
    public void initialize(){
    try {
              queueConnection = connectionFactory.createQueueConnection();
              queueSession = queueConnection.createQueueSession(true,
                             Session.AUTO_ACKNOWLEDGE);
              queueSender = queueSession.createSender(provisionASDLQueue);
              MapMessage message = queueSession.createMapMessage();
         message.setString("ASDL", "123");
         message.setString("Token", "456");
         // Sending message to queue
         System.out.println("Sending Message");
         queueSender.send(message);
         // Closing connections
         queueSender.close();
         queueSession.close();
         queueConnection.close();
    } catch (JMSException e) {
              // TODO Auto-generated catch block
              e.printStackTrace();
    }

    I am experiencing an issue with the @Resource Injection annotation. Can you post what the issue is that you are seeing?
    -steve-

  • Use of resource-env-ref tag

    Hi,
    Can anybody tell me what is the use of the resource-env-ref tag. I am using resourec-ref tag where I have specified a jdbc datasource configuration. But I do not know what does resource-env-ref do? Does it add any extra feature to the resource-ref tag? I know the use of env-entry tag. Is it similar to env-entry tag?
    Please give an example.
    Thanking in advance.

    * <env-entry> - Environment entry, a single-value
    parameter that can be used to configure how the
    application will operate.
    * <resource-ref> - Resource reference, which is
    typically to an object factory for resources such as
    a JDBC DataSource, a JavaMail Session, or custom
    object factories
    * <resource-env-ref> - Resource environment
    reference, a new variation of resource-ref added in
    Servlet 2.3 that is simpler to configure for
    resources that do not require authentication
    information.Ok, u mean to say that i can use either resource-ref or resource-env-ref tag depending on whether i require authentication or not, right?
    Also, please tell me what does the web container do with these configurations? Does it load these resources at container start-up or it simply
    creates the environment where resources can be accessed through a name like, say java:comp/env/jdbc/MyDataSource where this is again mapped to a jndi name?
    I know that using this type of configuration helps make changes to the jndi name without recompiling our servlets.
    Also, could u please tell me can we use ejbs the same way as above (using resourec-ref or resource-env-ref tag) or I must use the ejb-ref tag. Since ejbs are also bound to jndi names, they should be accessible throught the above tags and not only through the ejb-ref tag.

Maybe you are looking for

  • "PDB file does not contain provider information" Win8.1 - Error when using traceview

    We have been attempting to manage a Windows 8.1 machine by using the Enterprise Device Management Protocol. We are encountering a failure during the process and would like to inspect what is going wrong on the Client Side. Used the "Windows 8.1 Enter

  • Pdf file transfer using ftp in java

    Hi, I am tried to get a pdf file from ftp. I am using the following code. This code works fine with .txt files but not with .pdf files. The pdf file generated is empty. import java.awt.Desktop; import java.io.File; import java.io.FileNotFoundExceptio

  • Blackberry bold 9650 os 6.0 and windows 7

    For the last 48 hours I have not been able to sync my phone with my desktop. My desktop software keeps freezing whether I try to open the software from the sdesk top or whether I plug my phone in with a ubs cord and choose the snyc media option on th

  • Error ORA-01467: sort key too long

    Hi. I have just come across the error ORA-01467: sort key too long . In the Oracle documentation, the 2 line description of this error basically says that there may be too many columns or group functions in the query, so I need to reduce the number o

  • Flash Player Hanging while Droping Object at Edge of Canvas

    Hi, I had a problem with Drag and Drop operation, While i am droping object at edge of canvas flash player is hanging, if i drop object center of canas it's working fine. can any one please healp on this issue.