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

Similar Messages

  • 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).

  • 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]

  • Can i use java only for database transaction with vb as a front end

    Hello All.
    I am sorry,i don't know whether this location is the correct location to post my question or not
    I have developed one application using complete vb only. That is completly desktop appliation and not suitable for centralized database. Is there any facility to keep my front end as same (vb application) and for the database transaction can i use jdbc? Is there any possibility to do that like View is vb based application and the database connectivity is only jdbc
    If my thought is wrongplease execuse me.
    thanks in advance
    sowjanya

    Sounds like a really bad choice even if it was possible.

  • 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);

  • Can I use polling frequency for Database Adapter

    I need to use Database Adapter that acts like FileAdapter. Can I set polling frequency for my Database Adapter, so that the adapter can query every 5 secs?

    You can use polling feature when you configure your DB adapter Operation Type as "Poll for New or Changed Records in Table"
    If you use Adapter configuration wizard it will promot for "Pollling Options" and Polling Frequency is the option which you can configure in seconds, mins or hrs

  • I can't use JSTL tag for read rss.

    I want to read rss from another web. but I can't read rss . I use Netbeans and I add JSTL Library already. I can use forEach tag but every time when I use xml tag it show error. This is my code for read rss. I don't know how to read rss with JSTL tag please help me.
    <h6><!-- Filename: ShowStudents.jsp -->
    <%@taglib uri="http://java.sun.com/jsp/jstl/xml" prefix="x"%>
    <%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
    <HTML>
    <BODY>
    <c:import var="xmlDoc" url="http://www.manager.co.th/RSS/Home/Breakingnews.xml"/>
    <x:parse var="parsedDocument" xml="${xmlDoc}"/>
    <table>
    <tr>
    <th>Title : </th>
    <th>Link : </th>
    </tr>
    <x:forEach select="$parsedDocument/channel/item"> // This code I ever been change to $parsedDocument/rss/channel/ and $parsedDocument/rss/channel/title ,but it show same error.
    <tr>
    <td> <x:out select="title" /> </td>
    <td> <x:out select="link" /> </td>
    </tr>
    </x:forEach>
    </table>
    </BODY>
    </HTML></h6>
    when I run this code it show error like this. how to read rss with JSTL tag please help me.
    <h6>
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    org.apache.jasper.JasperException: javax.servlet.ServletException: javax.servlet.jsp.JspException: org.xml.sax.SAXParseException: Content is not allowed in prolog.
    org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:527)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:401)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    Filter.ThaiRequest.doFilter(ThaiRequest.java:38)
    org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:393)
    root cause
    javax.servlet.ServletException: javax.servlet.jsp.JspException: org.xml.sax.SAXParseException: Content is not allowed in prolog.
    org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:858)
    org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:791)
    org.apache.jsp.test_jsp._jspService(test_jsp.java:101)
    org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    Filter.ThaiRequest.doFilter(ThaiRequest.java:38)
    org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:393)
    root cause
    org.xml.sax.SAXParseException: Content is not allowed in prolog.
    com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:249)
    com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:284)
    org.apache.taglibs.standard.tag.common.xml.ParseSupport.parseInputSource(ParseSupport.java:227)
    org.apache.taglibs.standard.tag.common.xml.ParseSupport.parseInputSourceWithFilter(ParseSupport.java:193)
    org.apache.taglibs.standard.tag.common.xml.ParseSupport.parseReaderWithFilter(ParseSupport.java:199)
    org.apache.taglibs.standard.tag.common.xml.ParseSupport.parseStringWithFilter(ParseSupport.java:206)
    org.apache.taglibs.standard.tag.common.xml.ParseSupport.doEndTag(ParseSupport.java:138)
    org.apache.jsp.test_jsp._jspx_meth_x_005fparse_005f0(test_jsp.java:150)
    org.apache.jsp.test_jsp._jspService(test_jsp.java:80)
    org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    Filter.ThaiRequest.doFilter(ThaiRequest.java:38)
    org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:393)
    </h6>
    Edited by: user12864851 on 15 ม.ค. 2554, 22:59 น.

    Ok, I did a bit more experimenting, and web searching, and found you are the victim of the UTF-8 BOM bug.
    Basically the java UTF-8 reader does not recognise a BOM at the start of a UTF-8 stream, and it has to be discarded manually.
    For details: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4508058
    Here is a 'fixed' JSP for you.
    <%@taglib uri="http://java.sun.com/jsp/jstl/xml" prefix="x"%>
    <%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
    <%@taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
    <%@ page contentType="text/html; charset=UTF-8"%>
    <HTML>
    <BODY>
         <c:import var="xmlDoc"
              url="http://www.manager.co.th/RSS/Home/Breakingnews.xml"
              charEncoding="UTF8" />
         <%--
            JSTL hack to work around the UTF-8 BOM bug in JDK.
            http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4508058
         --%>
         <c:set var="testChar" value="fn:substring(xmlDoc, 0, 1)}"/>
         <c:if test="${testChar != '<'}">
           <c:set var="xmlDoc" value="${fn:substring(xmlDoc, 1, fn:length(xmlDoc))}" />
         </c:if>
         <table>
              <tr>
                   <th>Title :</th>
                   <th>Link :</th>
              </tr>
              <x:parse var="parsedDocument" doc="${xmlDoc}" />
              <x:forEach select="$parsedDocument/rss/channel/item">
                   <tr>
                        <td><x:out select="title" /></td>
                        <td><x:out select="link" /></td>
                   </tr>
              </x:forEach>
         </table>
    </BODY>
    </HTML>cheers,
    evnafets

  • How can I use custom urls for my clouds?

    Currently my clouds are [cloudname].adobecqcloud.com, but how do I redirect or point them to [mysite].com?  Or say, for my development cloud, how would I point it to dev.[mysite].com?  I need to be able to control this ASAP.  Thank you for your help.

    Hi,
    You have the choice between 2 topologies when creating your AWS account in Cloud Manager:
    1) Development/Testing
    2) Staging/Production
    In order to preserve your DNS record from changing and have it always pointing to your site, you need to use the Staging/Production topology that includes an ELB in front of the Dispatcher instance(s). In this scenario, you need to point your DNS CNAME record to the DNS name associated with the ELB, that you can retrieve from the AWS console (will be added to Cloud Manager UI soon). Even when you pause/start your cloud, the ELB remains up and running, therefore after restarting your cloud the mapping of your DNS CNAME record to the ELB DNS name will be functional with no delay.
    Using the Development/Testing topology, every time you pause/restart the cloud from Cloud Manager, the IP address of the instances change because it is using dynamic IPs. Therefore, even if you point your DNS CNAME record to the name of the instance (ex: mysite.com pointing to mysite.adobecqcloud.com), it will take some time for the new DNS/IP mapping (mysite.adobecqcloud.com / new IP address of Dispatcher) to propagate. Note: there is no ELB configured for this topology.
    The main reason for using this method is to eliminate the need for using EIP address (static IP address) when it's not really necessary and because they are hard to get from Amazon. But it's also for not paying for EIP address when they are not used (cloud is paused/stopped).
    Hope this helps answer your question.

  • Can i use HTML tag in text when sending contens as "Attachement(PDF)".

    Hi all!!
    i try to add html tag on ibot email text column.
    is it possible?
    - in ibot delivery content.
    send content as Attachment(PDF)
    "if sent as attachement, include this text" <--- mark this field
    and below multi line input column, can i use html tag, for example,
    Yahoo
    thanks in advance.
    Edited by: vingorius on 2010. 10. 31 오후 7:27

    hi vingorius ,
    No you cant include html but u can use variables
    To add a variable in a text message to provide context for the iBot attachment
    1. Click the following option:
    If sent as attachment, include this text
    2. Type the text into the text box with a session variable, a repository variable, or a presentation variable using the syntax shown in the following table:
    Variable Type
    Syntax
    Repository @{Variable_Name}
    Session @{NQ_SESSION.Variable_Name}
    Presentation @{Variable_Name}
    For example, Dear, @{NQ_SESSION.Variable_Name}, here is your personalized Weekly Sales Territory Update.
    NOTE: If you want to use the @ character, you need to precede it with the \ (back slash) character to separate it from the variable syntax. For example, Dear @{NQ_SESSION.DISPLAYNAME}, \@ New York, appears as Dear Joe Smith, @ New York.
    Source : BI Guide
    Thanks,
    Saichand.v

  • Can we use custom subtype (9001) in 0105?

    Hi,
    Can we user custom subtype 9001 in 0105 to store the user ids for ESS&MSS?
    I know by default the standard function modules of ESS will look for a user id in 0105 with subtype 0001. But 0001 has been used by some other portal pointing the same back end. we cannot use the same user id for ESS.
    For ESS, can we use custom subtype for the user ids? Is there any configuration to handle this scenario? How do we link the new portal should validate the user ids in custom subtype.
    Advance thanks for your valuable input.
    cheers
    Jayanthi

    Hi Kirsten,
    Thanks for your feedback.
    Definitly I dont want to make changes to any of the standard programs. Changing the existing portal is also a major impact in the project.
    Is there any configuration option available for ESS to point to the custom subtype 0105? We are in requirement gathering phase,the DEV environment is yet to be ready.
    If you find any info, please let me know.
    cheers
    Jayanthi

  • How can we use Custom MessageBox in SelectionChangedEvent of LongListSelector for Windows Phone 8

    Dear Sir/Madam,
    How can we use Custom MessageBox in SelectionChangedEvent of LongListSelector for Windows Phone 8.
    Actually my problem is that When i am using Custom  MessageBox in SelectionChangedEvent of LongListSelector,when i am click Open(Left Button) it's working fine and navigated correctly,But when i am Click the No(Right Button) then it stayed in same page
    but all that page is in stuckup i mean that page is not working and not doing any event.
    My C#.net Code
    private async void userPageLongListSelector_SelectionChanged(object sender, SelectionChangedEventArgs e)
    if (e.AddedItems.Count > 0)
    if (userPageLongListSelector.SelectedItem == null)
    return;
    if (dbTenMin == null)
    dbTenMin = new Database(ApplicationData.Current.LocalFolder, "tenMInDBSchema.db");
    await dbTenMin.OpenAsync();
    var res = (sender as LongListSelector).SelectedItem as _10Min._10MinClass.minUserPages;
    var resIndex = (sender as LongListSelector).ItemsSource.IndexOf(userPageLongListSelector.SelectedItem);
    string selectedPageName = res.userPages.ToString();
    string selectedPageDesignUser = res.pageDesignUser.ToString();
    int selectedIndex = resIndex;
    CustomMessageBox messageBox = new CustomMessageBox()
    Caption = "Message...!",
    Message = "This form need offline datalist,Please load now.",
    LeftButtonContent = "Open",
    RightButtonContent = "No"
    messageBox.Dismissed += (s1, e1) =>
    switch (e1.Result)
    case CustomMessageBoxResult.LeftButton:
    string uidAndpwd = _10MinClass._10MinStaticClass.csUidAndPwd.ToString();
    _10MinClass._10MinStaticClass.csDataListPageDetails = selectedPageDataDetailsForSchema.ToString();
    _10MinClass._10MinStaticClass.csAllDataLists = offlineDataBaseDataListNam;
    _10MinClass._10MinStaticClass.csNotCreatedSchemaNameOfDBList = notCreatedDataLists;
    userPageLongListSelector.SelectedItem = null;
    if (dbTenMin != null)
    dbTenMin.Dispose();
    dbTenMin = null;
    NavigationService.Navigate(new Uri("/10MinformDataList.xaml", UriKind.Relative));
    else
    NavigationService.Navigate(new Uri("/10MinformDataList.xaml", UriKind.Relative));
    break;
    case CustomMessageBoxResult.RightButton:
    break;
    case CustomMessageBoxResult.None:
    break;
    default:
    break;
    messageBox.Show();
    Same custom messagebox code working in Phone_BackKeyPress event i am writing the code in Right Button that e.OriginalSource.ToString(); then it is working fine.
    But It is not working in Selection Changed Event in LongListSelector control in Windows Phone 8.
    Please help me,as soon as possible.
    Thanks & Regards,
    SrinivaaS.

    What happens if you leave the implementation for LeftButton empty as well , does the page gets stuck in that case also, if you press left button?
    i.e.
    CustomMessageBox messageBox = new CustomMessageBox()
    Caption = "Message...!",
    Message = "This form need offline datalist,Please load now.",
    LeftButtonContent = "Open",
    RightButtonContent = "No"
    messageBox.Dismissed += (s1, e1) =>
    switch (e1.Result)
    case CustomMessageBoxResult.LeftButton:
    break;
    case CustomMessageBoxResult.RightButton:
    break;
    case CustomMessageBoxResult.None:
    break;
    default:
    break;
    messageBox.Show();
    http://developer.nokia.com/community/wiki/Using_Crypto%2B%2B_library_with_Windows_Phone_8

  • Can i make own formatted textbox using custom tag

    Hai,
    Can i create own format textbox similar to vb activex control.for example i want make own formatted textbox for enter only numeric value if entry any alpha value it's show error.Is this possible using custom tag

    Hai,
    Can i create own format textbox similar to vb
    activex control.for example i want make own
    formatted textbox for enter only numeric value if
    entry any alpha value it's show error.Is this
    possible using custom tag
    If you mean a custom text box in a web page without an applet (in other words an html component), then Java has nothing to do with it. And by mentioning activex (even only in a 'like' comparison), and custom tag, you are once again hinting that you want an html component. I think you need to place your request to a JavaScript Forum, which, once again, has absolutely nothing to do with Java.
    A "custom tag" in JSP is not an HTML Tag. It may look a little like an html or xml tag, but it is evaluated on the server side. The control you need must be executed on the client side, which, once again, tells me you need to post to a JavaScript forum.

  • Can I use "dvt" function for customizing the chart format in OBIEE 11g?

    Hi,
    ".pcxml" file cannot be found in OBIEE11g. However, can I use "dvt" function for customization? If yes, how?
    Reference for dvt function:
    http://docs.oracle.com/cd/E23943_01/apirefs.1111/e12418/tagdoc/dvt_pieGraph.html

    Hello,
    I know it's possible, because i already found some blogs about changing the chart colors and turning off the animated graphs.
    <Graph visualEffects="NONE" animationDuration="0">
    But we want to alter more chart options, like make a bar chart default stacked. In 10G this was possible. I think this is also
    possible in 11G through the dvt-graph-skin.xml, but what i want to know is, is there a document that explains which tags you could use in this file.
    It would be great to get some help on this.

  • Cannot change setting in privacy from remember history to use custom settings for history. I can set in to change but on closing with the ok button thus closing the privacy tab, it then reverts back to remember history.

    I have been by a web sit that the cookies are disabled in the browser. on looking at the help on firefox help the instuction as i understand was to change the setting under the privacy tab ref history fromthe default setting of rember hhistory to use custom settings for history. I change the setting click ok but it reverts back to rember history. I just cannot change the setting.This also happend in the prevous version.

    To see History and Cookie settings in Tools > Options > Privacy, choose the setting <b>Firefox will: Use custom settings for history</b>
    You need to make at least one change to make "Use Custom settings" stay selected.
    If all history settings are the default then the History and Cookie setting revert to "Remember history" the next time you open Tools > Options > Privacy.
    So it looks that your cookie setting are already correct.
    * http://kb.mozillazine.org/Cookies
    * http://kb.mozillazine.org/Websites_report_cookies_are_disabled

  • How can I use jbo:InputSelect for a char type filed?

    How can I use <jbo:InputSelect for a char type filed?
    I have two tables. One is room (primary key is room(type is char)), another table is responsibility (foreign ker is room(type is char)). Both tables have same length for room column.
    There is a problem:
    If I use (in the "DataEditComponent.jsp" file)
    <jbo:InputSelect multiple="false" datasource="dsEdit" displaydatasource="roomData" displaydataitem="ROOM" displayvaluedataitem="ROOM" ></jbo:InputSelect>
    to get the room input for responsibility from combobox(Datasource roomData is from room table). In the form the room field cannot bind the data in combobox, alway select the first item. And if I select one item and click the update button.There is an error message:
    Error Message: JBO-27010: Attribute set with value H409 for Room in Responsibility has invalid precision/scale
    I found If I changed the field type from char to varchar2 in database also change the entity objects, it works well. I wonder if there are any diffrence using <jbo:InputSelect tag in char and varchar2 type. How can I use <jbo:InputSelect for a char type filed as i don't want to change my datatype in database at this stage.
    I try this in JDeveloper 9.03, 9.034, 9.04. The result is the same.

    If I were in your shoes, here's how I would do it:
    <%-- Assuming you have dsRoom and dsResponsibility --%>
    <%-- Select is an HTML tag --%>
    <select name="ROOM" size="1">
    <% char roomID =""; // Init your character var
    // Open a rowsetIterator to get the records and add them to the LOV
    <jbo:RowsetIterate datasource="dsResponsibility" changecurrentrow="true" >
    <% roomID = (char)dsResponsibility.getRowSet().getCurrentRow().getAttribute("ROOM"); // Grab the char value
    // add the value to the LOV
    %>
    <option value="<%=roomID%>"><%=roomID%></option>
    </jbo:RowsetIterate>
    </select>
    If you are using this as part of an edit page you may want to utilize the "selected" option of the <option> tag. In one instance I am doing this on an edit page because the use may open an existing record. If I don't account for it, then it will change the DB to contain the first value from the list! You can do a simple check like:
    //Set the current record's char
    char curRecord = (char)rowEdit.getAttribute("ROOM");
    // inside the iterate:
    if (curRecord == roomID) {
    <option value="<%=roomID%>" selected><%=roomID%></option>
    } else {
    <option value="<%=roomID%>" ><%=roomID%></option>
    Hope that helps!

Maybe you are looking for

  • GR value is higher the po value

    Dear SAP GURU We have a problem with GR value. PO Quantity Order for item 10 is: 100.800 KG Net Order Price for item 10: 3.287,30 USD (Price Unit 1 TO) Conversion order qty: 1000 KG to 1 TO The GR value, in Purchase order quantity, should be: u201CQu

  • Enabling Global Script Protection is not working while adding "&"

    Hi All, To prevent crosssite scripting attacks I ticked the the check box "Enable Global Script Protection" in CF admin. But it is not working , I mean not able to prevent the scripting attacks. Steps I followed 1] I executed the below URL.      http

  • Views - Security Loop Hole ?

    Dear Friends To my understanding VIEWS can be used to provided elementary security to data. New Features like VPD (DBMS_RLS package) and Oracle Lable Security have been introduced in Oracle. Can you please tell me what is limitation of using views fr

  • Error with mouse event function

    Hi,      I have inserted two keyframes in the timeline, then i included scripts on each keyframe. The script in first keyframe is following: stop(); var mc:MovieClip = new MovieClip(); mc.graphics.beginFill(0xFF0000); mc.graphics.drawRect(0,0,300,20)

  • What to do with itunes!!!!

    ok so my itunes will not open up because it says it can't find quick time and i have to redownload itunes but i'm afraid that if i do download itunes 7 that all my music will be gone! i have the itunes version i think 6? its the one before version 7