Custom tag for Database cinnectivity

Hi ,
Can anyone provide a sample code that can help to create db connectivity using custom tag?
thanks in advance
regards,
mayen

There exist the JSTL SQL taglib, but I don't recommend this. It should only be used for quick development and testing. For database connectivity, rather create a data layer with DAO classes which you on its turn just plug in your business layer (with servlets).

Similar Messages

  • Can i use Custom Tags for Database retrieval (as per MVC pattern)?

    In our project we are dealing with database, and i've used the Cutom Tags for database retrieval (as per the Article from Mr Faisal Khan) and it is working fine. But i have a doubt if it affects the performance in any way . I wanted to know if its recommendable to use Custom Tags for the DB retrieval as per MVC Pattern or shall i create a intermediate bean and then call the bean in custom tag.
    Thanks
    Prakash

    Putting database code in your JSPs certainly couples your view to the database. That's usually not good.
    If it's a simple app, it might be justified.
    When you start having lots of pages and complex business logic it becomes less attractive. - MOD

  • Custom tag for Marquee in JSF

    Hi,
    I am trying to develop a custom tag for Marquee in JSF, my usecase is to display a value from managed bean(Dynamically). please find the code below and guide me where i have made mistake
    regards
    Sandeep
    Component class:
    package customtags;
    import javax.el.ValueExpression;
    import javax.faces.component.UIComponentBase;
    import javax.faces.context.FacesContext;
    public class Marquee extends UIComponentBase {
         public static final String COMPONENT_TYPE = "marqueecomp";
         public static final String RENDERER_TYPE = "marqueeRenderer";
         private Object[] _state = null;
         private String value;
         public String getValue() {
              if (null != this.value) {
                   return this.value;
              ValueExpression _ve = getValueExpression("value");
              return (_ve != null) ? (String) _ve.getValue(getFacesContext()
                        .getELContext()) : null;
         public void setValue(String marquee) {
              this.value = marquee;
         public String getFamily() {
              // TODO Auto-generated method stub
              return COMPONENT_TYPE;
    //     public void encodeBegin(FacesContext context) throws IOException {
    //          ResponseWriter writer = context.getResponseWriter();
    //          writer.startElement("marquee", this);
    //          writer.write(getValue());
    //          writer.endElement("marquee");
         public void restoreState(FacesContext context, Object state) {
              this._state = (Object[]) _state;
              super.restoreState(_context, this._state[0]);
              value = (String) this._state[1];
         public Object saveState(FacesContext _context) {
              if (_state == null) {
                   _state = new Object[2];
              state[0] = super.saveState(context);
              _state[1] = value;
              return _state;
    Tag Class:
    package customtags;
    import javax.el.ValueExpression;
    import javax.faces.component.UIComponent;
    import javax.faces.webapp.UIComponentELTag;
    public class MarqueeTag extends UIComponentELTag {
         protected ValueExpression marquee;
         public String getComponentType() {
              // TODO Auto-generated method stub
              return Marquee.COMPONENT_TYPE;
         public String getRendererType() {
              // TODO Auto-generated method stub
              return Marquee.RENDERER_TYPE;
         * protected void setProperties(UIComponent component) {
         * super.setProperties(component); Marquee marqComp = (Marquee) component;
         * if (marquee != null) { marqComp.setValue(marquee); } }
         protected void setProperties(UIComponent component) {
              super.setProperties(component);
              Marquee marqComp = null;
              try {
                   marqComp = (Marquee) component;
              } catch (ClassCastException cce) {
                   throw new IllegalStateException(
                             "Component "
                                       + component.toString()
                                       + " not expected type. Expected: com.foo.Foo. Perhaps you're missing a tag?");
              if (marquee != null) {
                   //marqComp.setValueExpression("value", marquee);
                   marqComp.setValue("fsdfsdfsdfsdfsd");
         * @return the marquee
         public ValueExpression getMarquee() {
              return marquee;
         * @param marquee
         * the marquee to set
         public void setMarquee(ValueExpression marquee) {
              this.marquee = marquee;
    *.tld file*
    <?xml version="1.0" encoding="UTF-8"?>
    <taglib 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-jsptaglibrary_2_1.xsd"
         version="2.1">
         <tlib-version>1.0</tlib-version>
         <short-name>marqueecomp</short-name>
         <uri>http://tags.org/marquee</uri>
         <tag>
              <name>marqueeTag</name>
    <tag-class>customtags.MarqueeTag</tag-class>
    <body-content>empty</body-content>
    <attribute>
    <description><![CDATA[Your description here]]></description>
    <name>id</name>
    <required>false</required>
    <rtexprvalue>true</rtexprvalue>
    </attribute>
    <attribute>
    <description><![CDATA[Your description here]]></description>
    <name>value</name>
    </attribute>
         </tag>
    </taglib>
    Renderer class:
    package customtags;
    import java.io.IOException;
    import javax.faces.component.UIComponent;
    import javax.faces.context.FacesContext;
    import javax.faces.context.ResponseWriter;
    import javax.faces.render.Renderer;
    public class MarqueeRenderer extends Renderer {
         public void encodeBegin(final FacesContext facesContext,
    final UIComponent component) throws IOException {
    super.encodeBegin(facesContext, component);
    final ResponseWriter writer = facesContext.getResponseWriter();
    writer.startElement("DIV", component);
    /*String styleClass =
    (String)attributes.get(Shuffler.STYLECLASS_ATTRIBUTE_KEY);
    writer.writeAttribute("class", styleClass, null);*/
    public void encodeEnd(final FacesContext facesContext,
    final UIComponent component) throws IOException {
    final ResponseWriter writer = facesContext.getResponseWriter();
    writer.endElement("DIV");
    in Faces-Config:
    <component>
              <display-name>marqueecomp</display-name>
              <component-type>marqueecomp</component-type>
              <component-class>customtags.Marquee</component-class>
              <component-extension>
    <renderer-type>marqueeRenderer</renderer-type>
    </component-extension>
         </component>
         <render-kit>
    <renderer>
    <component-family>marqueecomp</component-family>
    <renderer-type>marqueeRenderer</renderer-type>
    <renderer-class>customtags.MarqueeRenderer</renderer-class>
    </renderer>
    </render-kit>
    In class path --->marquee.taglib.xml
    <?xml version="1.0"?>
    <!DOCTYPE facelet-taglib PUBLIC
    "-//Sun Microsystems, Inc.//DTD Facelet Taglib 1.0//EN"
    "http://java.sun.com/dtd/facelet-taglib_1_0.dtd">
    <facelet-taglib>
    <namespace>http://tags.org/marquee</namespace>
    <tag>
    <tag-name>marqueeTag</tag-name>
    <component>
    <component-type>marqueecomp</component-type>
    <renderer-type>marqueeRenderer</renderer-type>
    </component>
    </tag>
    </facelet-taglib>
    *.xhtml file*
    <html xmlns="http://www.w3.org/1999/xhtml"
         xmlns:ui="http://java.sun.com/jsf/facelets"
         xmlns:h="http://java.sun.com/jsf/html"
         xmlns:f="http://java.sun.com/jsf/core" xml:lang="en" lang="en"
         xmlns:a4j="http://richfaces.org/a4j"
         xmlns:rich="http://richfaces.org/rich" xmlns:mycomp="http://tags.org/marquee">
    <head>
    <title>DEBTDOC Home Page</title>
    <meta http-equiv="keywords" content="enter,your,keywords,here" />
    <meta http-equiv="description"
         content="A short description of this page." />
    <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
    <link rel="stylesheet" type="text/css" href="../css/common.css"></link>
    <script language="javascript" src="../script/common.js"></script>
    </head>
    <body>
    <f:view>
    <mycomp:marqueeTag value="hello World"></mycomp:marqueeTag>

    There exist the JSTL SQL taglib, but I don't recommend this. It should only be used for quick development and testing. For database connectivity, rather create a data layer with DAO classes which you on its turn just plug in your business layer (with servlets).

  • How to use custom tags for integrating FCK Editor?

    Hi All,
    I am looking for the integrating the FCK Editor in my jsp page. any one can please provide the procedure of How to create fckeditor in jsp?
    I have the jar file of fck editor but i am confusing while creating the custom tag for that editor.
    I want like this:
    <FCKeditor:fck ?> like this
    Regards,
    Sateesh

    google answers it all..
    [http://www.jroller.com/coreteam/entry/using_fckeditor_in_jsp_web]
    [http://java.fckeditor.net/properties.html]
    [http://java.fckeditor.net/java-core/tagreference.html]

  • Custom tag for backup

    hello!
    i have a question regarding the tag flag in rman. is it possible to create a tag that looks like weekly_2009_46 (46 is the week of the year)? if i use the command
    backup as compressed backupset tag=weekly_YYYY_WW database;
    the tag is weekly_YYYY_WW, but should be weekly_2009_46.
    any ideas? thx!
    best regards,
    christian

    If it is required to have the week component in the TAG, then you could use the following process to capture that and pass it to the rman commands:
    E:\>type yw.sql
    set pages 0
    select to_char(sysdate, 'yyyy_iw') from dual;
    exit
    E:\>type yw.cmd
    @echo off
    for /f %%i in ('sqlplus -s / as sysdba @yw.sql') do @set yw=%%i
    echo backup datafile 4 tag 'weekly_%yw%';
    exit
    ) | rman target /
    E:\>yw
    Recovery Manager: Release 10.2.0.4.0 - Production on Fri Nov 13 11:20:45 2009
    Copyright (c) 1982, 2007, Oracle.  All rights reserved.
    connected to target database: ORA10G (DBID=4021649597)
    RMAN>
    Starting backup at 13-NOV-09
    using target database control file instead of recovery catalog
    allocated channel: ORA_DISK_1
    channel ORA_DISK_1: sid=146 devtype=DISK
    channel ORA_DISK_1: starting full datafile backupset
    channel ORA_DISK_1: specifying datafile(s) in backupset
    input datafile fno=00004 name=E:\ORACLE\ORADATA\ORA10G\USERS01.DBF
    channel ORA_DISK_1: starting piece 1 at 13-NOV-09
    channel ORA_DISK_1: finished piece 1 at 13-NOV-09
    piece handle=E:\ORACLE\FLASH_RECOVERY_AREA\ORA10G\BACKUPSET\2009_11_13\O1_MF_NNNDF_WEEKLY_2009_46_5HV1V7TK_.BKP tag=WEEK
    LY_2009_46 comment=NONE
    channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
    Finished backup at 13-NOV-09
    RMAN>
    Recovery Manager complete.
    E:\>rman target /
    Recovery Manager: Release 10.2.0.4.0 - Production on Fri Nov 13 11:21:03 2009
    Copyright (c) 1982, 2007, Oracle.  All rights reserved.
    connected to target database: ORA10G (DBID=4021649597)
    RMAN> list backup summary;
    using target database control file instead of recovery catalog
    List of Backups
    ===============
    Key     TY LV S Device Type Completion Time #Pieces #Copies Compressed Tag
    3       B  F  A DISK        13-NOV-09       1       1       NO         WEEKLY_2009_46
    RMAN> exit
    Recovery Manager complete.

  • Problem creating custom tags for site that has no outside internet connecti

    I've created a set of custom tags that work fine until we install our app at the customer site. The customer site has no outside Internet access, and so the DOCTYPE is failing since it references the web-jsptaglibrary_1_1.dtd located on Sun's site.
    I tried copying the dtd locally and got it to work, but the solution sucks because this web-jsptaglibrary_1_1.dtd file is referenced in both my taglib.tld file AND the web-jsptaglibrary_1_1.dtd itself. Soooo....I can put in a URL that references it on the local machine, e.g.,
    In the taglib.tld file:
    <!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.// DTD JSP Tag Library 1.1//EN"
    "http://ClientAAA/web-jsptaglibrary_1_1.dtd">
    In the web-jsptaglibrary_1_1.dtd file:
    <!ATTLIST taglib id ID #IMPLIED
    xmlns CDATA #FIXED
    "http://ClientAAA/AdProduction/web-jsptaglibrary_1_1.dtd"
    >
    but that means for every client that uses this app (and we have several) I have to change that URL inside both these files.
    I tried simply changing it to the relative "web-jsptaglibrary_1_1.dtd", e.g.,
    taglib.tld:
    <!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.// DTD JSP Tag Library 1.1//EN"
    "web-jsptaglibrary_1_1.dtd">
    web-jsptaglibrary_1_1.dtd:
    <!ATTLIST taglib id ID #IMPLIED
    xmlns CDATA #FIXED
    "web-jsptaglibrary_1_1.dtd"
    >
    but then it is requiring me to put the dtd in both my web app root directory AND my jakarta/bin directory. I get the following error:
    XML parsing error on file ../vtaglib.tld: java.io.FileNotFoundException: D:\jakarta\jakarta-tomcat-4.1.29\bin\web-jsptaglibrary_1_1.dtd (The system cannot find the file specified)
    It seems like I must be missing something here. This shouldn't be this hard. And it seems funny that to use custom tags, you have to have Internet access in the first place.
    Help!!! :)
    Thanks.

    Yeah, I think it's a bit ridiculous that in order to make all the tag library examples and instructions work, you have to have access to the Internet. I haven't seen a single example on how to make it work if there is no Internet access. That's very limiting. And I've tried all sorts of other ways of doing it, such as
    <!DOCTYPE taglib SYSTEM "web-jsptaglibrary_1_1.dtd">
    but even then it won't work because I get an error message saying:
    XML parsing error on file /assets/../vtaglib.tld: java.io.FileNotFoundException: D:\jakarta\jakarta-tomcat-4.1.29\bin\web-jsptaglibrary_1_1.dtd (The system cannot find the file specified)
    I just don't think I should have to place this file in the bin directory. There has to be another way. Do I need to modify the dtd somehow? Cuz the dtd has the following line...is this messing it up??
    <!ATTLIST taglib id ID #IMPLIED xmlns CDATA #FIXED "web-jsptaglibrary_1_1.dtd">
    I sure could use some help.

  • Customized Tags for Songs

    I am a bit of an organization freak. I have been using J. River Media Center to play songs, but now that I have an iPod, I am disgruntled because when I copy the songs to my iPod, the images do not come over, and half the songs don't play.
    I am trying to use iTunes now, but I cannot seem to figure out how to show custom tags. For example, in Media Center, I invented new tags that did not exist to allow me to categorize my tracks in different ways. I made a Mood tag, a Principal Instrument tag, a How Discovered tag, a Country tag, a Status tag, a Fave tag, etc. iTunes does not seem to have a way to show these tags or allow me to create them. Am I missing something?
    [email protected]

    But why not? It is a no-brainer. Why not provide people with the convenience of creating their own tags? I think I shall stay with Media Center just for this reason.
    I know I can put tags in the Grouping or Comments field, but this is really a visual inconvenience when you have many tags. For example, I have a song that I want to tag with Piano, Norway, Faves and Upbeat for the purpose of creating separate playlists. I know I can set the smart playlist to say, "Grouping contains Piano" or "Grouping contains Faves", but visually this is an inconvenience, and when you have tons of songs you want to categorize in many different ways, it is more convenient to be able to create separate tags entirely.

  • How to create a custom tag for a custom converter

    In Jdeveloper 11g, I have a project where I have created a custom converter class that impements the javax.faces.convert.Converter class. I have registered the converter with an id in the faces-config.xml file of the project, and the converter works fine by using the <f:converter type="myconverter"> tag. However, the custom converter has a field which I would like to set from the tag itself. Hence, I would like to add an attribute to <f:converter> tag if possible or create a custom tag that has the attribute.
    I have done some reserach and I found that a custom tag can be implemented: I need to create a class which extends from the ConverterTag class or javax.faces.webapp.ConverterElTag class, which I did, but I also need to create ".tld" (tag library) file which defines the tag itself.
    The part about creating the ".tld" file and registring the new tag is what I'm not sure how to do.
    Does someone know how to do this?
    thank you

    Hi frank,
    that's a good document, and it explains how to make a custom converter. I already created the custom converter, it converts a number to any currency pattern. I know java already has a currency converter, but it doesn't support Rupee currency format, and I need that format.
    My converter works, but I would like to pass the pattern of the format through an attribute in a tag. Since f:converter doesn't seem to support that, I created a custom tag which uses my converter, and it enables me to pass a pattern to the converter.
    All of that works, but I need to be able to pass the pattern as an EL expression, and it's not evaluating the expression before passing it to the converter. It just passes the whole expression as a string. I'm thinking It may be something I'm doing wrong.
    this is the tag library definition file:
    <!DOCTYPE taglib
    PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN"
    "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd">
    <taglib>
    <tlib-version>1.2</tlib-version>
    <jsp-version>2.1</jsp-version>
    <short-name>custom</short-name>
    <uri>custom-currency-converter</uri>
    <description>
    custom currency custom tag library
    </description>
    <tag>
    <name>CurrencyConverter</name>
    <tag-class>
    converter.Tag.CurrencyConverterTag
    </tag-class>
    <body-content>JSP</body-content>
    <attribute>
    <name>pattern</name>
    <type>java.util.String</type>
    <required>true</required>
    <rtexprvalue>true</rtexprvalue>
    </attribute>
    </tag>
    </taglib>
    Edited by: Abraham Ciokler on Feb 4, 2011 11:20 AM

  • How to use Custom Tags for Theme and Base Map Definitions

    In Mapviewer documentation I've found the following new feature:
    The XML definition of a theme or base map now supports application-specific
    attribute tags. You can use the Custom Tags option in the theme definition in Map
    Builder to specify tags and their values, which can be interpreted by your application
    but are ignored by MapViewer itself.
    I'm able to define a custom tag in Mapbuilder, but how can I use it in my Application?
    Thanks.

    As he said, you have to use as Platform service to create adapter in OIM.
    tcUserOperationsIntf service = Platform.getService(Thor.API.Operations.tcUserOperationsIntf.class);
    HashMap<String,String> searchmap=new HashMap<String,String>();
    searchmap.put("Users.User ID", userID);
    tcResultSet searchset=service.findAllUsers(searchmap);

  • Custom Tag for Logging?

              I would think that there must be a weblogic custom tag that I can use in my jsp
              to access the weblog.log file - but I can't find any info on it. How should I
              be logging from within jsp's?
              Thanks,
              Dave
              

    You can use the NonCatalogLogger class:
              http://e-docs.bea.com/wls/docs61////javadocs/weblogic/logging/NonCatalogLogger.html
              It's pretty easy to wrap this class in a little wrapper class or custom
              tag.
              Hope that helps,
              Nils
              David Finkbeiner wrote:
              >
              > I would think that there must be a weblogic custom tag that I can use in my jsp
              > to access the weblog.log file - but I can't find any info on it. How should I
              > be logging from within jsp's?
              > Thanks,
              > Dave
              ============================
              [email protected]
              

  • Cannot able to see the class in custom tag for WASD4.0

    I am using an simple custom tag to print name
    my .tld file
    <?xml version="1.0" encoding="ISO-8859-1" ?>
    <!DOCTYPE taglib
    PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN"
    "http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd">
    <taglib>
    <tlibversion>1.0</tlibversion>
    <jspversion>1.1</jspversion>
    <shortname>ST</shortname>
    <uri></uri>
    <tag>
    <name>sortTag</name>
    <tagclass>com.abcea.pos.jspTags.sort.SortTag </tagclass>
    <bodycontent>EMPTY</bodycontent>
    </tag>
    </taglib>
    and my tag class
    package com.abcea.pos.jspTags.sort;
    import javax.servlet.jsp.*;
    import javax.servlet.jsp.tagext.*;
    public class SortTag extends TagSupport {
         String Name="Hai";
    public int doStartTag() throws JspException {
              return EVAL_BODY_INCLUDE;
    public int doEndTag() throws JspException {
         try {
              pageContext.getOut().write("Hello Name:praveen");
         } catch (IOException e) {
    return     EVAL_PAGE;
    I am getting an error
    JSPG0058E: Unable to load class com.abcea.pos.jspTags.sort.SortTag : org.apache.jasper.JasperException: JSPG0058E: Unable to load class com.abcea.pos.jspTags.sort.SortTag
    You guys might have came across this error ,
    please help me in solving this.

    yap!
    I could see the compiled class in WEB-INF/classes/com/abcea/pos/jspTags/sort/SortTag.class
    in jsp i am calling
    <%@taglib uri="/WEB-INF/lib/SortTag.tld" prefix="ST"%>
    <ST:sortTag/>
    in web.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN" "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
    <web-app id="WebApp">
         <display-name>POSWeb</display-name>
         <servlet>
              <servlet-name>LogoutServlet</servlet-name>
              <display-name>LogoutServlet</display-name>
              <servlet-class>com.abcea.pos.role.servlet.LogoutServlet</servlet-class>
         </servlet>
         <servlet-mapping>
              <servlet-name>LogoutServlet</servlet-name>
              <url-pattern>/Logout</url-pattern>
         </servlet-mapping>
         <taglib>
    <taglib-uri>/WEB-INF/lib/SortTag.tld</taglib-uri>
    <taglib-location>/WEB-INF/lib/SortTag.tld</taglib-location>
    </taglib>
    </web-app>
    I don't know what i am skipping?

  • Custom Connector for Database for reconicitation

    Hi,
    I have written my own customer connector to load all the users from external application database to OIM for reconcilitation (just initial loading of users).Now I want to check if a user information is changed in OIM it should be reflected in database and vice versa (if a user information is changed in database it should reflect in OIM).Which API will get us the all details from OIM or atleast.. those details.. from which I can get to know.. which records were updated....I cant find it in API guides of OIM.. please dont give me the link for OIM api guides
    Thanks
    Edited by: user642288 on Apr 6, 2009 9:35 AM

    For changes in the target, i would suggest using a last modified timestamp. Use this value on your it resource. During your reconciliation, query only for those records that have been modifed. When you complete the recon, update the timestamp with the current value.
    If there are specific fields you want to pass from the Xellerate User profile to the target database, you'll need to trigger the changes using the Lookup.USR_PROCESS_TRIGGERS lookup. Add your triggers to the provisioning process definition for your database provisioning to update the fields on your form to trigger the "Updated" tasks to write the value to the target.
    You should not need any OIM APIs for the provisioning so long as you have configuring provisioning tasks to your target.
    -Kevin

  • Custom tag for selecting BW images

    I wish LR had a filter button to select the images converted to grayscale via Treatment command or 'V' button. For now I have to flag 'em either by star rating (and keep in mind not to do that with color photos) or color tagging.

    >ps Do you also have to use such a user name? I'm sure you're a perfectly nice bloke but take an instant dislike to your virtual self for parading such beliefs in this forum. It would be great if you could have a neutral user name.
    Also it might avoid OT, and in appropriate comments form other users, such as the one with 666 in his user name.
    Any long time reader here knows I like a bit of frivolity in the forum, myself, but this seems beyond that.
    Don
    Don Ricklin, MacBook 1.83Ghz Duo 2 Core running 10.4.10 & Win XP, Pentax *ist D
    See LR Links list at my
    Blog for related sites.

  • Custom Report For Database Availability

    SELECT target_name,
    target_type,
    SUM (up_time) up_time,
    SUM (down_time) down_time,
    SUM (blackout_time) blackout_time,
    TRUNC( SUM (up_time)
    / (SUM (NVL (up_time, 1)) + SUM (NVL (down_time, 1)))
    * 100)
    availability_pct
    FROM ( SELECT target_name,
    target_type,
    SUM(TRUNC( (NVL (end_timestamp, SYSDATE) - start_timestamp)
    * 24))
    total_hours,
    CASE availability_status
    WHEN 'Target Down'
    THEN
    0
    WHEN 'Target Up'
    THEN
    0
    WHEN 'Blackout'
    THEN
    SUM(TRUNC( (NVL (end_timestamp, SYSDATE)
    - start_timestamp)
    * 24))
    END
    blackout_time,
    CASE availability_status
    WHEN 'Target Down'
    THEN
    0
    WHEN 'Target Up'
    THEN
    SUM(TRUNC( (NVL (end_timestamp, SYSDATE)
    - start_timestamp)
    * 24))
    WHEN 'Blackout'
    THEN
    0
    END
    up_time,
    CASE availability_status
    WHEN 'Target Down'
    THEN
    SUM(TRUNC( (NVL (end_timestamp, SYSDATE)
    - start_timestamp)
    * 24))
    WHEN 'Target Up'
    THEN
    0
    WHEN 'Blackout'
    THEN
    0
    END
    down_time,
    availability_status
    FROM MGMT$AVAILABILITY_HISTORY
    WHERE target_type IN ('oracle_database', 'rac_database')
    AND availability_status IN
    ('Target Down', 'Target Up', 'Blackout')
    GROUP BY target_name, target_type, availability_status
    ORDER BY target_name, availability_status)
    GROUP BY target_name, target_type
    ORDER BY target_name
    Above is the Query that i'm using for the element "Table from SQL" but getting the error "Error rendering element. Exception: ORA-01476: divisor is equal to zero "
    Can anyone please help me with fixing this report.
    Thanks
    Edited by: 822424 on Aug 22, 2011 8:27 AM
    Edited by: 822424 on Aug 22, 2011 8:27 AM

    The error says that somewhere in you statement you are using a value 0 as an divisor.
    So A / B where B = 0
    Try to debug you SQL statement to make sure you will never use the value 0 as divisor.
    Once you corrected your statement, your report will work fine
    Rob
    http://oemgc.wordpress.com

  • Query reg adding custom tags in SOAP Header - AXIS Receiver Adapter

    Hi All,
    I need to send custom tags as mentioned below to my traget webservice application. I think I can do this with Receiver AXIS adapter but not sure how it can be done. Can any of you suggest?
                                                  <WSContext>
                   <FromAppId>ABC</FromAppId>
                   <ToAppId>XYZ</ToAppId>
              </WSContext>
    Thanks,

    If you want to add custom tags in the soap header, one possible solution is use XSLT mapping or Java mapping to create header first then do message mapping for mapping the payload structure between your source and target  as usual.
    So in operation mapping you sequence mapping like this... first XSLT mapping for custom tags for the SOAP Header followed by payload mapping.
    Hope that helps.
    Search SDN for XSLT Mapping for soap header. Already we have handled these issues.

Maybe you are looking for

  • After using DNG converter, Lightroom still won't recognize and import my photos...

    I just started shooting with a Sony A6000 and couldn't import the photos due to compatibility issues with my current version of lightroom (4.4).  After reading about it on the forums I found that I had to either download LR5 or use the DNG converter

  • Regarding ERP Integrator

    Dear All, I have few doubts on ERP Integrator. 1) What are things required from Oracle GL to Planning for Data Loading using ERP Integrator? (Trail Balance is enough or we required some other file from Oracle GL) 2) Is there any scheduling options av

  • Best way to move through recordset using html buttons?

    Hi, I would like to allow users of a jsp page to be able to navigate through a recordset using buttons on the webpage. Could someone please advise on the best / easiest way to do this? Thanks, Jay

  • Need to restrict numeric entry to two decimal places

    Hello, I have a cfform with a cfinput of type=text. I need to restrict what can be entered into the cfinput so that it allows only two decimal places. I have tried the mask, but it won't work because "99999.99" will not allow 12.34 and "99.99" will n

  • Getting jsp html generated code

    Hi, I face a problem that I can't solve easily. I've got a jsp page and I would like to save the html content generated in a file to be more efficient for future connections (if no change have been made). The way I tried was : 1) at the end of my jsp