Problem wityh including tags...

Hi,
I am having a menu.jsp....which is included in all other display pages.In menu.jsp i hav a query running.....for that if i had to import package sql.* . But few of the pages in which menu.jsp is included might hav queries. so they r gaving packa sql.* as well. So i guess i am getting error because of including same package twice. Is there any way to check if the package is included?
Thanks
Vivek

Hi,
I am having a menu.jsp....which is included in all other display pages.In menu.jsp i hav a query running.....for that if i had to import package sql.* . But few of the pages in which menu.jsp is included might hav queries. so they r gaving packa sql.* as well. So i guess i am getting error because of including same package twice. Is there any way to check if the package is included?
Thanks
Vivek

Similar Messages

  • Problems with include tags

    Ok, I am having a peculairly annoying problem for my site. My include tags (action or directives) are not working approx. 40% of the time. They did work in the past but they are not today. So for instance any of my pages that are referring to a common navigation bar using an include action show up without the navigation bar. It is a total mess. I am not sure if it is my servers fault or mine. I have already complained to my website provider but I was wondering if there is anything I can do to make them work or atleast throw an error when they dont get displayed instead of what its doing right now. If you think its a server issue, I would appreciate any tech jargon you can provide me to throw at them. They tend to say things like "it worked for me."
    Btw, I havnt done anything fancy.. in a normal html page I have included an include action(s). None of my pages have more than 2 actions and 1 directive. Most have only 1 action.

    Could you post a sample of a JSP causing the problem?

  • Problem with flush=true in the jsp:include tag

    Hello
    I have deployed a JSP based application , based on the apache struts framework. The web server is Sun One Webserver 6 Service Pack4, on a windows 2000 machine
    The same application was tried on SunONE application server 7, and it works without any problem. However in this case the following error , on the page
    javax:servlet.jspexception:Illegal to flush within a custom tag
    Does this mean flush="true" is not allowed within custom tags
    Or is there a workaround for this
    Any help is appreciated
    thanks
    - Aniruddha

    Hi,
    This is a known problem, ��flush before you include�� limitation in JSP 1.1.
    As a result, you have to state flush="true" every time you include a jsp using <jsp:include> tag if you are using JSP1.1.
    Fortunately, it is fixed in JSP1.2. The flush attribute controls flushing. If true, then, if the page output is buffered and the flush attribute is given a ��true�� value, then the buffer is flushed prior to the inclusion, otherwise the buffer is not flushed. The default value for the flush attribute is ��false��.
    Gary Wang
    Developer Technical Support
    SUN Microsystems
    http://www.sun.com/developers/support/

  • Scriptlet within a jsp:include tag

    In Jrun 2.3.3 you could include a scriptlet within a <jsp:include> tag like this:
    <%
    String language = "E";
    %>
    <jsp:include page="/Conditions<%= language %>.html"/>
    Since I have to programme for four languages on our site, I used this convenient way of including different language pages on the fly all over the site.
    I then had a problem with 2.3.3 so I got 2.3.8 and discovered that all of these jsp:includes with scriptlets didn't work any more.
    I hastily uninstalled 2.3.8 and have continued with 2.3.3 ever since, thinking that they would sort this out in 3.0., which they didn't.
    Presumably to deal with this when I want to upgrade JRun I will have to use a load of if{} statements instead, but for four languages I will need four if {} statements which is incredibly long-winded compared to the single line of code above.
    <%
    if(language.equals("E")){
    %>
    <jsp:include page="/ConditionsE.html"/>
    <%
    %>
    Can anybody help:
    1) by giving me a neater solution that the one I've come up with.
    2) by explaining what happened at JRun to cause this change.
    Thanks.

    I could be wrong, but at least with WSAD (WebSphere), I couldn't do this:
    <html:text maxlength="14" size="10" property="proofOfClaim[<%=memberAccountIndex%>].sentDate%>"/>
    but could do this:
    <% String property = "proofOfClaim[" + memberAccountIndex +"].sentDate"; %>
    <html:text maxlength="14" size="10" property="<%=property%>%>"/>
    I think the reason is that since <html:text> is a custom tag, any scriptlets <%=...%> must be the ENTIRE value, and not be inserted in the middle of a value, for an attribute. Try it out. :)

  • Problems with include jsp

    Hi... my english are not good enough but im trying to explain.
    I wanna include a url using <jsp:include tag, but my url have params.... so i know i have to use <jsp:param 4 each param.... So i did a little scriptlet that takes the url and separe each param to put it in a bidimensional array then i make a string with all the result... i mean... <jsp:inlcude page="relative URL" flush="true"><jsp:param name="hi" value="2"/>... next param... next param... </jsp:inlcude>.... i write the string at the jsp but it seems doesnt work.. this i made it with a document.write...
    the problem here is... the string its ok coz if i cut and paste the result i work great... but... if i make it dynamically ... nothing happens....
    Either i did put it the bidimensional array at the request.setAttribute for catch it at the next jsp and make a bucle for... but the same trouble... nothings happen...
    Some idea? :(

    You definitely want to use a jsp include action, not a directive. The directive
    happens at translation time and does not process the requested page. An action
    happens at request time and treats the requested page as a new request, thus
    including the results of the invoked jsp.
    BTW, the include action is the tags that looks line <jsp:inculde
    page="included_page.jsp" flush="true"/> or something similar (parameters can
    also be specified).
    The JSP 1.1 spec has more details. See sections 2.7.5 & 2.7.6 (for the include
    directive and a quick comparison of the directive vs the action) and 2.13.4 (for
    the include action).
    Matt
    Gurjit wrote:
    Hi ,
    I have a typical problem. The iplanet server doesn't interpret the code
    from a jsp which is included in another jsp. For eg.
    code for main jsp
    request.getParameter("username");
    <%@ include file="/jsp/ui/left_nav.jsp" %>
    processing code.
    Now when I start the server and the first time I load this page I get a
    dearranged page which has the code of the left_nav.jsp present in the html
    output.
    On opening this page to edit, when a small modification is made and the file
    is saved, a reload of the same page gives the proper output with all the
    jsp's interpreted.
    Thanks to one and all,
    Regards,
    Gurjit

  • Flush in the jsp:include tag

    should I state flush="true" every time I include a jsp using <jsp:include> tag in a jsp pages? For example I am trying to include a menu bar on the top of every jsp pages. Should I flush the buffer every time? if not, will it affect the performance?
    Thank you
    Cal

    Hi,
    This is a known problem, ��flush before you include�� limitation in JSP 1.1.
    As a result, you have to state flush="true" every time you include a jsp using <jsp:include> tag if you are using JSP1.1.
    Fortunately, it is fixed in JSP1.2. The flush attribute controls flushing. If true, then, if the page output is buffered and the flush attribute is given a ��true�� value, then the buffer is flushed prior to the inclusion, otherwise the buffer is not flushed. The default value for the flush attribute is ��false��.
    Gary Wang
    Developer Technical Support
    SUN Microsystems
    http://www.sun.com/developers/support/

  • I need to get the complete element including tag. How to parse this xml?

    I am sure there should be some solution to this. I have XML file like this
    <test>
    <data value="123" color="RED">
    <type>single</type>
    </data>
    <data value="13323" color="BLUE">
    <type>double</type>
    </data>
    </test>
    I need to parse this XML and get the data element(s). The problem is that I need to get the complete data element include tags like
    "<data value="123" color="RED"><type>single</type></data>". I need to parse the complete XML file and get every data element including tag and send it to another upstream process.
    Any solution to this will be appreciated. I am little familiar with SAX. Is there any solution around using xerces SAX parser.
    Other solution is also appreciated.
    Thanks

        DocumentBuilder builder = factory.newDocumentBuilder();
        document = builder.parse(srcFile);
        NodeList list = document.getElementsByTagName("data");
        Node node = list.item(0); // Loop this
        TransformerFactory tFactory = TransformerFactory.newInstance();
        Transformer transformer = tFactory.newTransformer();
        DOMSource source = new DOMSource(node);
        StreamResult result = new StreamResult(outputstream);
        transformer.transform(source, result);
    Using XSLT will be lot easier.No it won't. Extending DefaultHandler is easy.Do you really think so?
    Hardly 10-15 lines.

  • Problem with display tags (not accepting inner tags)

    Hi guys ,
    I am using display tags which is fine but i had a problem with anchor tag and the jsp display tag.
    <display:column title="Row_Id" >
    ' target="-blank" onclick=""><c:out value="${row_rowNum}"/>
    </display:column>
    here i got the exception:
    The value of attribute "href" associated with an element type "a" must not contain the '<' character.
    here if jstl is not used then how to put my value in anchor tag
    please help me.

    Can you use EL directly:
    <a href="example.jsp?id=${row.id"/"></a>

  • Including Tagged Text in a Table of Contents

    I would like to include only a few words from a given paragraph in the Table of Contents.
    For example in the example paragraph, I would like only the term Blather to appear in the TOC "Blather - Blah blah blah blah."
    Is there a way I can tag "Blather" and then have the TOC dialog include Tagged Text?
    I'm using CS 5.5.
    Thanks you.

    Thanks Peter,
    I like the auto-updating feature of the second option.
    So that I understand, you're suggesting I create a hyperlink destination on the text to display in the TOC (right-click --> Interactive --> New Hyperlink Destination), and then manually insert a cross-reference to that hyperlink destination in my TOC (Type --> Hyperlinks & Cross-References --> Insert Cross-References --> Link to: Text Anchor)?

  • XSLT problem with img tag in Saxon

    Hi,
    Iam getting a problem with <img> tag when transforming a document using Saxon transformer. In the input XSLT I have proper closing tag for <img>, but the output of the transformation is not well formed as the closing tag for <img> does not appear. I need to feed the output to a FO object to generate a print preview, but the output is not well-formed.
    Kindly help to resolve the issue.
    Kind Regards,
    Abhinandan

    Perhaps that is because you are generating HTML as your output? As I recall, <img> tags don't have to be closed in HTML. So try generating XML instead if you need XML.

  • Problem in fragment tag

    Hi, Im new to JSF and Facelets, I faced some problems in fragement tag when i was desigining my page, here is the code,
    <s:fragment rendered="#{show eq 'true'}">
    <ui:param name="currency" value="true"/>
    </s:fragment>
    <s:fragment rendered="#{show eq 'false'}">
    <ui:param name="currency" value="false"/>
    </s:fragment>
    <h:outputText value="#{currency}}/>
    Here, i can pass show value from another .xhtml page. If the first condition is satisfied it will print true, if the second condition satisfied expect to print false. But my code only print "false". Eventhoug its satisfied first condition, it will print "false". If i give <h:outputText value="#{currency}}/> within the fragment tag it works fine as I expect. I need helps.
    thanks
    Rajesh
    Message was edited by:
    rajeshkumar.b
    Message was edited by:
    rajeshkumar.b

    Trying
    <description><![CDATA[About 4 PM , March 31,1917.
    The salute from the Fort Christian&rsquo;s Saluting Battery as
    the Captain and officers leave the USS Hancock on their way to
    shore to take over the Danish West
    Indies.]]></description>
    This fixes the
    onmouseover="ShowToolTip('{dsPhotos::description}') problem,
    BUT
    <p>{dsPhotos::description}</p>
    now appears as
    'About 4 PM , March 31,1917. The salute from the Fort
    Christian&rsquo;s Saluting ..."
    with the undesireable &rsquo; instead of '.
    So my problem requires both html translation and javascript
    argument quoting/non-parsing.
    Any ideas?

  • How to dynamically include jsp files using jsf el in include tag ?

    Hi,
    I'm trying to get the jsp file name from my backing bean to use it in an include tag but I can't make it work
    When using this piece of code I can get the generated path
             <h:outputText value="/_partial/#{myBean.jspName}.jsp"/>whereas in this code the jsf el is not replaced by this value.
            <%@ include file="/_partial/#{myBean.jspName}.jsp" %> Have you any idea of how to solve this ? I'm currently developing for J2EE 1.4 platform.     
    Thanks for your help,
    Regards.

    If you're using JSF 1.2 and JSTL 1.2 at a JSP 2.1 environment, then you can just use <jsp:include> with unified EL.
    If you're using JSF 1.1, then you may find this article useful [http://balusc.blogspot.com/2007/01/dynamic-jsf-subviews.html]

  • Include Tag

    When I use the include tag (<!--#include file="top_nav.html -->) it works on the internet, but when I go to edit the rest of the page in the design view, everything below this tage disappears. Any solutions?

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>St. Lucian's Residence Inc.</title>
    <style type="text/css">
    <!--
    margin: 0px;
    padding: 0px;
    -->
    </style>
    <link href="layout.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
    <!--
    #body {
    height: 340px;
    width: 780px;
    text-align: center;
    background-image: url(Images/body-bg.png);
    background-color: #F4F1ED;
    padding-top: 20px;
    padding-right: 10px;
    padding-bottom: 10px;
    padding-left: 10px;
    body,td,th {
    font-family: Tahoma, Geneva, sans-serif;
    font-size: 12px;
    color: #0000B3;
    body {
    background-color: #FFE217;
    background-image: url(Images/bg.png);
    background-repeat: repeat-x;
    -->
    </style>
    <script type="text/javascript">
    <!--
    function MM_preloadImages() { //v3.0
      var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
        var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
        if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
    //-->
    </script>
    </head>
    <body onload="MM_preloadImages('Images/leftNav-hover_fundraiser.png','Images/leftNav-hover_appl y.png','Images/leftNav-hover_directions.png','Images/about-us_hover.png','Images/services_ hover.png','Images/giving-opportunities_hover.png','Images/directions_hover.png','Images/c ontact_hover.png')">
    <div class="topNav" id="topNav"><a href="index.html">Home</a> | Site Map | Contact | 860-223-2123</div>
    <div id="shadow">
      <div id="wrapper">
        <div id="header"><img src="Images/header.png" width="800" height="100" /></div>
        <div>
         <!--#include virtual="top_nav.html" -->
        </div>
        <div id="leftNav">
         <!--#include virtual="left_nav.html" -->
        </div>
        <div class="shadow" id="body">
          <p class="reg">St Lucian's is a non-profit home for seniors, providing them with basic living needs.    </p>
          <p class="reg"> </p>
          <p class="reg">All applicants for the residence must be 65 years of age, </p>
          <p class="reg">independent, ambulatory and capable of self-care. An</p>
          <p class="reg">application and an interview are required prior to admission.</p>
          <p class="heading"><img src="http://schlissellaw.files.wordpress.com/2010/03/nursing-home.jpg" width="134" height="95" /></p>
          <p class="reg">St. Lucian's provides a refreshing, </p>
          <p class="reg">residential community environment </p>
          <p class="reg">for the elderly to relax, socialize and</p>
          <p class="reg"> enjoy their retirement years.</p>
          <p class="heading"> </p>
          <p class="heading"></p>
        </div>
        <div>
          <!--#include virtual="footer.html" -->
        </div>
      </div>
    </div>
    </body>
    </html>
    The pages is saintlucians.org

  • Jsp include tag 1.1

    Hi all,
    i am getting the following error if my code snippet has a <jsp:include> tag
    org.apache.jasper.JasperException: Invalid jsp:include tag
    i am using VAJ3.5.3 and i modified the hosts file to support jsp1.1.
    But when i change to jsp1.0 the code works fine and fetching me the page contents.
    Need inputs.
    Regards
    Ramesh Kesavanarayanan

    Hi kesavramesh,
    I think some time ago, you're looking for something like this
    - Can I use jsp includes inside the taglib ?-
    See point 1 and 2.
    -- Paul
    1. link:
    http://www.jguru.com/faq/view.jsp?EID=115446
    2. text from the link:
    Normally when you call one JSP page from another you have no significant access to the result of the called JSP. So if I have
    Hi, I like nice clean JSP output
    <jsp:include page="gobbledegook.jsp" flush="true"/>
    Doh!
    When it would be much nicer to be able to do this:
    <%@ taglib uri="blahblah" prefix="myTags"%>
    Hi, I like nice clean JSP output
    <myTags:cleanUp>
    <jsp:include page="gobbledegook.jsp" flush="true"/>
    </myTags:cleanUp>
    Wahoo!
    This can be accomplish with the tag class:
    public class TakeOutTheTrashTag extends BodyTagSupport
    public int doStartTag() throws JspTagException
    return EVAL_BODY_TAG;
    public int doAfterBody() throws JspTagException
    try {
    if (bodyContent != null) {
    String messy = bodyContent.getString();
    String clean = takeOutTheTrash(messy);
    bodyContent.getEnclosingWriter().print(clean);
    } catch (IOException ie) {}
    return EVAL_PAGE;
    public int doEndTag() throws JspTagException
    return EVAL_PAGE;
    private String takeOutTheTrash(String messy)
    String cleanedUp = messy;
    return cleanedUp;

  • Can we change source of fx:include tag from controller class?

    Is it possible to change source of <fx:include> tag from controller class? The requirement is to dynamically change certain section of a page.

    Thanks Daniel.
    Is it possible to load <fx:include> into Anchor Tag from controller class?
    Edited by: Ravi_Teja on Jun 15, 2012 3:45 AM

Maybe you are looking for